»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend! Set by moritz on 22 December 2015. |
|||
00:03
themonkeybob11 left
00:04
cdg left,
skids joined
00:05
yqt left
00:16
[particle] joined,
[particle]1 left
00:19
dhunt left
00:20
donaldh left
00:21
themonkeybob11 joined
00:24
johndau joined
00:32
ParsonsNose left
00:34
Skarsnik left
00:38
perlawhirl joined
|
|||
perlawhirl | how can i round down to a unit? ... | 00:40 | |
m: 3650.round(1000) # i want 3000 | |||
camelia | ( no output ) | ||
perlawhirl | m: say 3650.round(1000) # i want 3000 | ||
camelia | rakudo-moar 4a0ba7: OUTPUT«4000» | ||
perlawhirl | i guess i could... | 00:41 | |
00:41
lichtkind left
|
|||
perlawhirl | m: say (3650 / 1000).floor * 1000 | 00:41 | |
camelia | rakudo-moar 4a0ba7: OUTPUT«3000» | ||
geekosaur | subtract 1000 (or 100 * signum if you need negative numbers) then round to 1000? | 00:42 | |
er 1000 * .signum | |||
AlexDaniel | perlawhirl: so .floor should accept a unit just like .round does? This makes sense | 00:43 | |
geekosaur | actually I meant 500 not 1000 | 00:44 | |
wheee | |||
geekosaur is probably too tired for this kind of thing | |||
perlawhirl | AlexDaniel: it does not :( it was the first thing i tried | ||
geekosaur | right, they're taking it as a proposal | ||
it was the first thing I thought of and checked too :p | 00:45 | ||
00:46
petercommand left,
petercommand joined
|
|||
perlawhirl | geekosaur: the minus 500 thing makes more sense then my divisin/multiplication dance... thanks | 00:46 | |
geekosaur | bit of a rabbit hole though, do you want round-to-nearest, round-down, round-up, round-to-zero[, round-to-nearest-infinity]? | ||
perlawhirl | i don't need negatives | 00:47 | |
well... maybe just some :down and :up attribute... eg: 3650.round(1000, :down) | 00:48 | ||
that's nice without being too obtrusive | |||
because it's named, it also reads niceey as 3650.round(:down, 1000) | 00:49 | ||
00:49
canw joined
|
|||
canw | Hello | 00:50 | |
AlexDaniel | hoelzro: февраль :) | 00:51 | |
hoelzro: ь missing | |||
timotimo | greetings canw | 00:53 | |
= | |||
er | |||
AlexDaniel | hoelzro: it seems like you didn't provide any links to produced stats. Was it intended? | 00:54 | |
00:56
canw left,
canw_ joined
|
|||
canw_ | d:\shell>panda install HTTP::UserAgent ==> HTTP::UserAgent depends on DateTime::Parse, Encode, IO::Capture::Simple ==> Fetching DateTime::Parse ==> Building DateTime::Parse ==> Testing DateTime::Parse no such file or directory in sub run-and-gather-output at C:\rakudo\share\perl6\site\sources\5AEF9DA5AE15E5AB5CB2ADB58A455E007FA7839E line 85 in block at C:\rakudo\share\perl6\site\sources\FB10E7A100D50F6DB505EC4DC538BEAB5154DED3 line | 00:56 | |
What's wrong? | 00:57 | ||
00:57
idiosyncrat_ left
01:05
BenGoldberg joined
|
|||
timotimo | i don't know :( | 01:12 | |
i'm not on windows | |||
01:12
idiosyncrat_ joined
|
|||
canw_ | d:\shell\panda>panda --notests install HTTP::UserAgent | 01:20 | |
add --notests option ok | |||
01:25
araujo left
01:26
araujo joined
01:27
araujo left
01:28
araujo joined
|
|||
timotimo | mhm | 01:28 | |
canw_ | thanks | 01:31 | |
01:32
perlawhirl left,
perlawhirl joined
01:34
canw_ left
01:44
perlawhirl left
01:45
perlawhirl joined
01:55
zpmorgan joined
01:59
Herby_ joined
|
|||
Herby_ | Evening, everyone! | 02:00 | |
\o | |||
o/ | 02:02 | ||
timotimo | good night, Herby_ | 02:06 | |
Herby_ | Good night, sweet prince! | 02:07 | |
timotimo | see you, space cowpeople | ||
02:14
gfldex left
|
|||
Hotkeys | m: my $foo = (1..4) ==> sum; say $foo | 02:14 | |
camelia | rakudo-moar 4a0ba7: OUTPUT«1..4» | ||
Hotkeys | Am I misunderstanding pipe | ||
timotimo | m: my $foo = (1..4) ==> sum ==> say; say $foo | ||
camelia | rakudo-moar 4a0ba7: OUTPUT«5===SORRY!5=== Error while compiling /tmp/id9xSRjxI1Preceding context expects a term, but found infix ==> insteadat /tmp/id9xSRjxI1:1------> 3my $foo = (1..4) ==> sum ==>7⏏5 say; say $foo» | ||
timotimo | m: my $foo = (1..4) ==> sum() ==> say; say $foo | 02:15 | |
camelia | rakudo-moar 4a0ba7: OUTPUT«5===SORRY!5=== Error while compiling /tmp/RRRfvGv4cjUnsupported use of bare "say"; in Perl 6 please use .say if you meant $_, or use an explicit invocant or argument, or use &say to refer to the function as a nounat /tmp/RRRfvGv4cj:1------> 3…» | ||
timotimo | m: my $foo = (1..4) ==> sum() ==> say(); say $foo | ||
camelia | rakudo-moar 4a0ba7: OUTPUT«101..4» | ||
timotimo | i think this is actually (my $foo = (1..4)) ==> sum; that you executed | ||
Hotkeys | Oh | ||
Weird | |||
timotimo | m: my $foo <== sum() <== (1..4); say $foo | ||
camelia | rakudo-moar 4a0ba7: OUTPUT«[10]» | ||
timotimo | ^- do note that feeds are about lists, so you'll end up with a list here | 02:16 | |
Hotkeys | Right | ||
02:16
kalkin--- joined,
AlexDaniel left
|
|||
skids | feeds should not be expected to be a particularly stable API. | 02:16 | |
timotimo | skids: well, in 6.c they can be expected to be that | 02:17 | |
stable, that is | |||
timotimo heads off to bed | |||
skids | I think they may have been on the list of features specially called out as incomplete. | ||
timotimo | hm. could be | ||
but if we didn't throw out the spec tests ... dunno | 02:18 | ||
skids tries to find the "nope" gist | |||
Hotkeys | Oh I see | ||
So if I wanted to do it my way | |||
I'd have to put it in parens | |||
Hotkeys just looked at s06 | 02:19 | ||
02:19
kalkin-- left
|
|||
skids | Hotkeys: also you'd want &sum I think. | 02:19 | |
02:20
Actualeyes joined
|
|||
Hotkeys | Right | 02:20 | |
sum() works too | |||
skids | Shouldn't? | 02:21 | |
Like, how would that work, syntactically? | |||
Hotkeys | m: (1..4) ==> sum() ==> my @sum; say @sum | ||
camelia | rakudo-moar 4a0ba7: OUTPUT«[10]» | ||
skids | weird. | 02:22 | |
OIC it's the external slurpy syntactical thing. | |||
02:34
BenGoldberg left
02:37
BenGoldberg joined
02:38
kalkin--- is now known as kalkin0,
kalkin0 is now known as kalkin-
02:39
Ben_Goldberg joined
02:41
BenGoldberg left
|
|||
Ben_Goldberg | m: (1..4) => sum() => print(); | 02:55 | |
camelia | rakudo-moar 4a0ba7: OUTPUT«WARNINGS for /tmp/XTqSnENcnr:Useless use of "=>" in expression "(1..4) => sum() =>" in sink context (line 1)» | ||
Ben_Goldberg | m: (1..4) ==> sum() ==> print(); | 02:56 | |
camelia | rakudo-moar 4a0ba7: OUTPUT«10» | ||
03:07
idiosyncrat_ left
03:14
bpmedley left
03:16
noganex joined
03:17
kid51 left,
perlawhirl left,
perlawhirl joined
03:19
noganex_ left
|
|||
hoelzro | .tell AlexDaniel ах, спасибо! Я всегда забаваю мягкий знак =/ | 03:31 | |
yoleaux | hoelzro: I'll pass your message to AlexDaniel. | ||
03:31
BenGoldberg_ joined
|
|||
hoelzro | .tell AlexDaniel I only included stats for single letters to show that my data was consistent with known frequencies; maybe I should've published the rest | 03:33 | |
yoleaux | hoelzro: I'll pass your message to AlexDaniel. | ||
03:33
Ben_Goldberg left
03:45
noganex_ joined
03:48
noganex left
|
|||
TEttinger | hoelzro: is this russian scrabble or some other word-game thing? | 03:48 | |
Гыпогозуск, глынуск сид фавуриджйглътод | 03:49 | ||
I hope that isn't a swear | |||
it's pseudo-random text gen | 03:50 | ||
hoelzro | none of those words look familiar to me =/ | ||
TEttinger | because they ain't dictionary words! | ||
hoelzro | heh | 03:51 | |
TEttinger | if it makes a word something very rare happened! | ||
it's for generating gibberish for game-like stuff, for situations like "you wander out of your homeland and don't speak the language" | |||
hoelzro | ahhh | 03:53 | |
BenGoldberg_ | So it's like simlish, but with cryllic letters? | 04:02 | |
04:02
BenGoldberg_ is now known as BenGoldberg
04:03
molaf joined,
BenGoldberg left
|
|||
awwaiid | TEttinger: I need to remember to tell people that Perl6 has Dependent Types :) | 04:04 | |
04:05
skids left
|
|||
TEttinger | yep! perl 6 has many features that are rare, and it's inspiring to see how many new things are here. I may make the effort to learn p6 fully when performance is better | 04:06 | |
awwaiid | I'm still trying to learn it minimally :) . I'm still trying to figure out the axioms. | ||
Hotkeys | What are dependent types in perl 6 | 04:28 | |
is that the 'where' pattern | |||
awwaiid: | 04:29 | ||
04:33
jack_rabbit joined
04:34
molaf left
04:38
perlawhirl left
04:42
vendethiel joined
04:44
clayton_ joined,
clayton_ left
|
|||
awwaiid | ya | 04:51 | |
sjn | TEttinger: If I were you, I'd start learning Perl 6 now, and when you're comfortable with it (after enough coding) chances are that much of the performance you're looking for now will be there :) | 04:57 | |
TEttinger: and if it's not, or you find some things are less performant than you'd like, while you're learning and experimenting, then you'd be giving useful feedback here about what would be useful to make faster :D | 04:58 | ||
TEttinger | mostly I have stuff people depend on me for now, and that's currently java code. I'd like to rewrite another version of this game lib someday, but I doubt that would be a good use for perl 6 | 05:00 | |
sjn | sure | ||
in the meantime, play around, learn the different bits of it :) | |||
05:05
vendethiel left
05:09
Herby_ left
05:37
Cabanossi left
05:39
Cabanossi joined,
yeahnoob joined
05:46
broquaint left,
bjz joined
05:49
bjz left
05:50
khw left
05:52
jack_rabbit left
05:56
bjz joined
06:02
bjz left
06:05
perlawhirl joined
|
|||
perlawhirl | hi perlers | 06:05 | |
halp | |||
hastebin.com/ubupetipez.perl | 06:06 | ||
i've never written one of these udp thingys... the perl one works perfectly, but now i'm trying to write the listener in perl6 and i'm failing hard | |||
06:06
jack_rabbit joined
|
|||
perlawhirl | i'm pretty much copy/pasting exsamples from the docs, so mabe those examples don't exactly map to the write solution. anyone point me in the right direction | 06:07 | |
ermm... s/write/right/ | |||
jdv79 | did you look at the tests? (S32-io/IO-Socket-Async-UDP.t) | 06:13 | |
06:19
darutoko joined
06:24
bjz joined
|
|||
jdv79 | perlawhirl: seems to work - gist.github.com/anonymous/e82c7c424cb49e4ee6b5 | 06:24 | |
perlawhirl | i'm looking at them now... i'm still struggling to get a working example. different machines | ||
oh thanks... i will have a look | |||
jdv79 | nite | ||
06:26
araujo_ joined
|
|||
Timbus | yeah the async one you pasted works for me =/ | 06:26 | |
perlawhirl | it's still not working for me. my sender and recever are different machines. sender is p5. i'll keep poking at it and see what... | 06:27 | |
oh | |||
it works for you? which version of rakudo? | |||
Timbus | This is Rakudo version 2016.02-72-g50a4df3 built on MoarVM version 2016.02 | ||
perlawhirl | This is Rakudo version 2016.02 built on MoarVM version 2016.02 | ||
Timbus | so, at most a few weeks there. should be working then =/ | 06:28 | |
how bout a localhost test | 06:29 | ||
perlawhirl | yeah, i'll keep poking and prodding | ||
06:29
araujo left
|
|||
perlawhirl | ideally i need it working from a separate machine, and sender is one of our old solaris boxes i do not have admin on, so i need it to work with p5 sender | 06:30 | |
Timbus | that's fair | ||
but if it works locally but not over a host, there might be more involved... | |||
perlawhirl | thanks Timbus, good point... i will try a local p5->p6 implementaion first and see if i can get that working | 06:31 | |
gotta go now... feel free to provide extra help if you want! :D i'll check the logs later | |||
06:31
perlawhirl left
|
|||
Timbus | just use the netcat example aaa he's gone | 06:31 | |
06:39
themonkeybob11 left
06:41
jack_rabbit left,
CIAvash joined
06:46
bjz left,
bjz joined
06:54
mkz___ is now known as mkz
06:55
m0ltar joined
07:04
domidumont joined
07:08
domidumont left
07:09
domidumont joined
07:15
firstdayonthejob joined
07:23
araujo_ left
07:24
wamba joined
07:33
wamba left
07:40
FROGGS joined
07:42
jjido joined
07:43
nakiro joined
|
|||
_nadim | Good morning. | 07:43 | |
given a string to be split in chuncks of , say, 5 characters, what would be the cleanest way to do it? subst? split? comp? | 07:44 | ||
comb | |||
masak | comb, I'd say | 07:47 | |
what do you want to happen at the end of the string, if there's < 5 characters left? | 07:48 | ||
m: .say for "abcdefghijkl".comb(/. ** 1..5/) | |||
camelia | rakudo-moar 4a0ba7: OUTPUT«abcdefghijkl» | ||
_nadim | get it back | 07:49 | |
07:50
sno left
|
|||
masak | then the above should do you fine | 07:50 | |
_nadim | yes it should :) | ||
07:50
jjido left
|
|||
nine | m: dd "foobarbazq".comb(3) | 07:51 | |
camelia | rakudo-moar 4a0ba7: OUTPUT«("foo", "bar", "baz", "q").Seq» | ||
nine | _nadim: ^^^ | 07:52 | |
_nadim | even better | ||
masak | ooh, didn't know about that one | ||
_nadim | P6 code can get "dangerously compact when one takes time | ||
07:53
fireartist joined
07:55
rindolf joined
|
|||
Hotkeys | check out this wonderful compactness I made today for codegolf | 07:58 | |
{[»+«](@^a Z»*»@^b) »/»sum @b} | |||
Finds center of mass given a list of points and a list of their respective masses | |||
m: my &CoM = {[»+«](@^a Z»*»@^b) »/»sum @b}; say CoM([[0,2],[3,4],[0,1],[1,1]],[2,6,2,10]); say CoM([[3,1],[0,0],[1,4]],[2,4,1]) | 07:59 | ||
camelia | rakudo-moar 4a0ba7: OUTPUT«[1.4 2][1 0.857143]» | ||
Hotkeys | _nadim: | ||
masak | it's so good to see the new generation discover these little things <3 | ||
Hotkeys | new generation? | 08:00 | |
08:01
abraxxa joined
08:02
zakharyas joined
|
|||
masak | Hotkeys: I'm sorry, maybe I misremember. maybe you've been here for years and years and I forgot | 08:02 | |
Hotkeys | oh | ||
I haven't been here that long | |||
only a few months | |||
masak | pleased to meet you | ||
been here since 2005 ;) | |||
Hotkeys | ah | ||
it seems I am new generation | 08:03 | ||
:p | |||
in 2005 I was barely a person | |||
masak | heh | ||
Hotkeys | (are 8 year olds people?) | ||
tweakism | yes, terrible ones. | 08:04 | |
Hotkeys | okay | ||
in 2005 I was a terrible person | |||
tweakism | a terrible, little, dirty, person who needed constant supervision. | ||
…it's probably a good thing that I don't have kids. | 08:05 | ||
08:07
cpage_ left,
Laurent_R joined
|
|||
moritz | ah well, even those of us how are kids are terrible persons :-) | 08:14 | |
08:15
sno joined
|
|||
[Tux] | test 21.657 | 08:18 | |
test-t 12.648 | |||
csv-parser 51.950 | |||
lizmat clickbaits the Perl 6 Weekly again: p6weekly.wordpress.com/2016/03/07/...-enchante/ | 08:19 | ||
moritz | reddit'ed | 08:23 | |
08:24
RabidGravy joined
|
|||
moritz | lizmat++ | 08:24 | |
08:38
wamba joined
08:39
firstdayonthejob left
|
|||
_nadim | is there any ETA for private multi? | 08:40 | |
masak | no | ||
tadzik | yay, p6weekly | 08:41 | |
yoleaux | 5 Mar 2016 11:14Z <azawawi> tadzik: please enable Travis CI / App | ||
_nadim | and a reason why they are not supported, technical that is not because of time. | ||
yoleaux | 5 Mar 2016 11:14Z <azawawi> tadzik: please enable Travis CI / AppVeyor support. See github.com/tadzik/Shell-Command/pull/10 | ||
tadzik | oh gawd | ||
tadzik hides | |||
masak | tadzik! \o/ | 08:42 | |
tadzik | funny how github notifies me of changes in ingy's mo-pm, but not in my own Shell-Command | ||
masak! \o/ | 08:43 | ||
masak: in Germany already? | |||
08:43
tmch joined
|
|||
masak | tadzik: no, but will be this evening | 08:43 | |
tadzik | ossum | ||
me and sergot land at 18-ish | |||
08:44
cpage_ joined
|
|||
tadzik | azawawi: thanks for the PR, I'll get it somewhere today/tomorrow, since it requires digging into panda's dependencies, bootstrap etc | 08:44 | |
masak | _nadim: I don't have the whole story, but... private methods are actually not late-bound. in that sense, they are more like subs than like methods. | 08:45 | |
_nadim: naively one would think that the solution would then look like multisubs. but I don't know if it's that easy. | |||
RabidGravy | yeah, I've actually done something using multi subs that gives the effect of private multi methods, can't remember what it is in though | 08:50 | |
masak | seems to me you could emulate it easily by turning `multi method !foo($x, $y)` into `multi sub foo($self, $x, $y)` | 08:51 | |
_nadim: would that be an option for you? | |||
moritz | the difference is that you can't declare trusts, and that you don't get access to it when augmenting the class | ||
masak | troo | 08:52 | |
there's probably a workaround for the trusts thing, too (using composition, say) -- but it'd be slightly more involved | |||
moritz | you could always have method !wrapper(|c) { callthesub(|c) } | 08:53 | |
RabidGravy | oh yeah there are reasons they would be good things but there are ways of working round the common case so I'm relaxed about it | ||
08:58
gfldex joined
09:01
araujo joined,
araujo left
|
|||
DrForr | lucs: I'm around now. | 09:01 | |
(not that you are, but at least it serves notice :) ) | 09:02 | ||
lizmat | afk for a few hours& | 09:05 | |
09:11
araujo joined
09:18
MadcapJake left
09:21
ab6tract joined
|
|||
ab6tract | o/ #perl6 | 09:21 | |
DrForr | \o | 09:22 | |
09:22
[particle]1 joined
|
|||
DrForr | \m/ # as well... Changing sound streams to suit. | 09:22 | |
09:22
[particle] left
|
|||
ab6tract | DrForr: :D | 09:23 | |
RabidGravy | harr! | ||
ab6tract | m: my %h = x => 'y'; say %h.invert{'y'}; say %h.invert.Hash{'v'} | 09:24 | |
camelia | rakudo-moar 4a0ba7: OUTPUT«Type Seq does not support associative indexing. in block <unit> at /tmp/PbmqQlSHnY line 1Actually thrown at: in block <unit> at /tmp/PbmqQlSHnY line 1» | ||
RabidGravy | Ooh didn't know there was a docker image for informix | ||
ab6tract | i was curious whether this feels weird to anyone else | ||
DrForr | (Motõrhead covering /Enter Sandman/ in this case.) | 09:25 | |
ab6tract | i understand the Seq not doing assoc indexing, but it also seems to make things cluttered | ||
RabidGravy | It's .hash not .Hash | 09:27 | |
ooh no it's both | 09:28 | ||
09:29
musiKk_ joined
09:32
dakkar joined
|
|||
ab6tract | RabidGravy: any hash constructor/coercer will work | 09:33 | |
RabidGravy | the only time I've use invert I've assigned it straight to another hash | ||
ab6tract | m: my %h = x => 'y'; say %h.invert{'y'}; say %(%h.invert){'v'} | 09:34 | |
camelia | rakudo-moar 4a0ba7: OUTPUT«Type Seq does not support associative indexing. in block <unit> at /tmp/1xA5hJF2kW line 1Actually thrown at: in block <unit> at /tmp/1xA5hJF2kW line 1» | ||
ab6tract | m: my %h = x => 'y'; say %(%h.invert){'v'} | ||
camelia | rakudo-moar 4a0ba7: OUTPUT«(Any)» | ||
ab6tract | m: my %h = x => 'y'; say %(%h.invert){'y'} | ||
camelia | rakudo-moar 4a0ba7: OUTPUT«x» | ||
moritz | ab6tract: invert returns a Seq (or List or whatever), because hash values aren't always unique | ||
ab6tract | moritz: that's fair i suppose | 09:35 | |
moritz: i thought that used to work though, but i take your point | 09:36 | ||
09:37
s_kilk joined
09:39
M-matthew left,
tadzik left
09:42
vendethiel joined
09:45
Actualeyes left
|
|||
RabidGravy | There "IBM Informix Dynamic Server Version 12.10.FC6IE -- On-Line -- Up 00:04:45 -- 156276 Kbytes" gigantic image though | 09:50 | |
09:55
Actualeyes joined
09:57
wamba left
09:58
M-tadzik joined
10:02
yeahnoob left
10:03
musiKk_ left
10:04
Laurent_R left
10:05
vendethiel left
10:06
hanekomu joined
10:07
M-matthew joined,
M-Illandan joined,
donaldh joined
|
|||
timotimo | o/ | 10:12 | |
donaldh | o/ | 10:17 | |
10:18
johndau left
10:19
domidumont left
10:23
M-tadzik left
10:24
M-matthew left
10:25
s_kilk left
10:29
John[Lisbeth] left
10:32
M-Illandan left
10:34
tmch left
10:42
vendethiel joined,
espadrine joined
10:46
espadrine_ joined
10:47
espadrine left
|
|||
RabidGravy | right off out for a bit | 10:49 | |
toodles | |||
10:53
RabidGravy left
10:59
donaldh left
11:05
vendethiel left
11:13
donaldh joined
|
|||
nine | OT but fun: aadrake.com/command-line-tools-can-...uster.html | 11:28 | |
timotimo | yeah | ||
"we've reached 2 gigabytes of data, we can't solve our problems without Big Data applications now!" | |||
arnsholt | Indeed. Big data proper is more in the terabyte neck of the woods than gigabytes | 11:29 | |
timotimo | yeah. if it fits in your ram, it's definitely not big data | ||
if it fits on an SSD, it's probably also not big data yet | 11:30 | ||
nine | SSDs are now larger than HDDs | ||
timotimo | amazingly, yeah | ||
but also quite expensive :D | |||
11:32
labster left
11:37
bjz_ joined
11:38
bjz left
11:40
stmuk_ joined
11:41
John[Lisbeth] joined
11:43
bjz_ left,
stmuk left
11:48
TEttinger left
|
|||
ilmari | if it fits on one server, it's not big data | 12:04 | |
12:06
colomon joined
12:07
nemo joined
12:08
nemo is now known as Guest3956
|
|||
timotimo | unless it's a big server :P | 12:10 | |
12:11
John[Lisbeth] left
12:12
John[Lisbeth] joined
12:13
kid51 joined
12:18
cosimo left
|
|||
llfourn | nine: that was a great article thanks | 12:21 | |
12:26
Guest3956 is now known as nemo
12:29
donaldh left
|
|||
fireartist | nine: thanks for that link - I had no idea about xargs -n flag! | 12:30 | |
xargs -I str # who knew? that's awesome! | 12:31 | ||
timotimo | xargs has a really, really long synopsis section in its manpage | 12:32 | |
fireartist | I had never before looked at its manpage! :-| | 12:33 | |
timotimo | i use xargs extremely rarely | ||
i should obviously reconsider | |||
fireartist | the number of times I've wished I could use xargs with the piped args not at the end of the arguments list, and ended up writing intermediary scripts... | 12:34 | |
xiaomiao | arnsholt: terabyte is still not big data | 12:35 | |
12:35
cosimo joined
|
|||
xiaomiao | around 1PB I would consider calling it 'big', and even then ... that's easy to store | 12:35 | |
12:41
iH2O joined,
Actualeyes left,
Actualeyes joined
12:42
iH2O left
12:44
kid51 left
12:49
rindolf left
|
|||
nine | xargs is one of the best parallelization tools ever | 12:56 | |
12:58
ab6tract left
|
|||
tweakism | I wish there was some way with xargs -I to not force-imply -n 1, something that might work similar to to find's -exec {} + | 12:58 | |
I dunno if there's some technical reason it can't have that, or it just doesn't happen to have ever been added, or I just don't know how to do it. | 12:59 | ||
13:05
sufrostico joined,
Skarsnik joined
13:07
tmch joined
13:08
zakharyas left
13:09
zakharyas joined
|
|||
fireartist | looks like you can pipe 2 xargs to get the same affect: | xargs -n 2 | xargs -I {} ... | 13:11 | |
13:11
donaldh joined
|
|||
tweakism | that combines pairs of input files into single arguments | 13:18 | |
printf 'one\ntwo\nthree\nfour\n' | xargs -n 2 | xargs -I {} printf '[%s]\n' {} | 13:19 | ||
[one two] | |||
[three four] | |||
13:19
rindolf joined
13:30
perlawhirl joined
|
|||
perlawhirl | hi perlers | 13:31 | |
ummm... how do i turn a unicode codepoint into a char? | |||
in perl | |||
tweakism | chr() ? | 13:32 | |
perlawhirl | umm... what format should the code point be in | 13:33 | |
tweakism | a number. | ||
nine is on a train :) | |||
perlawhirl | lets use pi as an example... how would one turn 03C0 into the pi symbol | ||
m: say chr(03C0); say chr('03C0') | 13:34 | ||
camelia | rakudo-moar 4a0ba7: OUTPUT«5===SORRY!5===Unable to parse expression in argument list; couldn't find final ')' at /tmp/wKyz1NutiG:1------> 3say chr(037⏏5C0); say chr('03C0') expecting any of: whitespaceOther potential difficulties: Leading …» | ||
tweakism | m: say chr(0x03c0) | ||
camelia | rakudo-moar 4a0ba7: OUTPUT«π» | ||
perlawhirl | ahhhh | ||
ok 0x | |||
tweakism | for hex | ||
perlawhirl | that's what i need to know | ||
thanks | |||
riiight | |||
i'm just a caveman... your unicode frightens and confuses me | 13:35 | ||
nine | m: say chr 0x3c0 | ||
camelia | rakudo-moar 4a0ba7: OUTPUT«π» | ||
tweakism | m: say chr(960) | ||
camelia | rakudo-moar 4a0ba7: OUTPUT«π» | ||
13:35
nowan_ joined
|
|||
tweakism | m: say ord('π') | 13:35 | |
camelia | rakudo-moar 4a0ba7: OUTPUT«960» | ||
perlawhirl | ta, lads | ||
tweakism | perlawhirl: I'm sure there's an escape sequence (probs \u or \U) for use in strings, too. | 13:36 | |
13:38
nowan left
|
|||
perlawhirl | i tried \U, i think | 13:39 | |
jnthn | m: say "\x3c0" | ||
camelia | rakudo-moar 4a0ba7: OUTPUT«π» | ||
perlawhirl | yeah, unrecognised | ||
all good, the chars are in 'U03C0' format... so i'm just doing chr $foo.subst(/U/,'0x') | 13:40 | ||
m: my $foo = 'U03C0'; say chr( $foo.subst('U', '0x') ); | 13:42 | ||
camelia | rakudo-moar 4a0ba7: OUTPUT«π» | ||
13:47
Util joined
13:49
pmurias joined
13:50
kaare_ joined
|
|||
dalek | osystem: 61f0f36 | donaldh++ | META.list: Add RPi::GpioDirect to ecosystem See github.com/donaldh/Perl6-RPi-GpioDirect |
13:51 | |
13:51
Psyche^ joined
|
|||
pmurias | hi | 13:52 | |
13:53
perlawhirl left
|
|||
donaldh is using NativeCall CArray for GPIO bit twiddling :) ^^^ | 13:53 | ||
13:55
Psyche^_ left
|
|||
donaldh | Is there any way to uninstall precompiled modules? | 13:57 | |
donaldh is guessing that cleaning out install/share/perl6/site is the brute-force way | 14:00 | ||
14:01
broquaint joined
14:02
salv00 joined
14:05
molaf joined
14:08
skids joined
14:30
perlpilot left
14:33
[ptc] left
14:37
psch joined
14:38
FROGGS left
14:40
perlpilot joined
|
|||
hoelzro | o/ #perl6 | 14:43 | |
pmurias | hoelzro: \o | 14:44 | |
the rakudo-js grant has been approved :) | 14:46 | ||
donaldh | pmurias++ | ||
jnthn | pmurias++ | ||
llfourn | \o/ # pmurias++ | 14:47 | |
14:49
cdg joined
|
|||
rudi_s | I have a simple class which contains a few instance variables which are all read-only. How can I create a copy of it with a few modified values? Foo.new( <- all variables here + the ones I want to update). | 14:49 | |
sjn | pmurias++ # sweet JSus, what have you done? :D | ||
pmurias | sjn: the grant work still needs to be done ;) | 14:50 | |
sjn | rudi_s: you can add an "is copy" trait to the variables, iirc | ||
moritz | rudi_s: $instnance.clone(newattr => 1, newattr2 => 2) | ||
14:50
musiKk_ joined
|
|||
donaldh | how often does the ecosystem modules.json update? | 14:50 | |
moritz | donaldh: at least hourly | ||
sjn | rudi_s: or just listen to moritz :) | ||
hoelzro | o/ pmurias | 14:51 | |
\o/ | |||
that's great news! | |||
pmurias++ | |||
donaldh | moritz: thanks, it just updated as I asked the question :) | 14:52 | |
jnthn | m: class A { has $.x; has $.y; }; my $a = A.new(x => 1, y => 2); my $b = $a.clone(x => 4); say $a; say $b | ||
camelia | rakudo-moar 4a0ba7: OUTPUT«A.new(x => 1, y => 2)A.new(x => 4, y => 2)» | ||
jnthn | rudi_s: ^^ | ||
hoelzro | m: if False { my $ln = require Linenoise; } # is this a rakudobug? | ||
camelia | rakudo-moar 4a0ba7: OUTPUT«5===SORRY!5=== Error while compiling /tmp/yCykytdxbTUndeclared name: Linenoise used at line 1Undeclared routine: require used at line 1» | ||
hoelzro | that shouldn't error out, should it? | 14:53 | |
jnthn | m: if False { my $ln = do require Linenoise; } | ||
camelia | ( no output ) | ||
jnthn | hoelzro: It's a statement | ||
hoelzro | ahhh | ||
so why does `my $ln = require Linenoise` parse? | |||
14:54
sufrostico left
|
|||
hoelzro | oh, I think I know the answer to my own question | 14:54 | |
14:54
tadzik joined
|
|||
tadzik | anyone planning on a pre-conf beer at GPW? | 14:55 | |
rudi_s | sjn: moritz: jnthn: Thank you! | ||
hoelzro | is that an error message we can improve? The initial approach I can think of is naïve and would probably considerably slow down the compiler, which is even LTA than the error message | ||
sjn is just next to the GPW pre-conf pub right now, actually | |||
tadzik: if you're around, I'm at a cafe called "Black Bean" just sround the corner from Barfuß | 14:56 | ||
tadzik | sjn: I'll arrive around 18-ish to NUE | 14:57 | |
to it'll be a while prolly | |||
15:06
khw joined
|
|||
japhb | Congrats, pmurias++ ! | 15:10 | |
15:10
Ven joined
|
|||
Ven | jnthn++ # nice thread memory size savings | 15:11 | |
15:11
RabidGravy joined
15:15
sufrostico joined
|
|||
RabidGravy | boom | 15:16 | |
15:20
domidumont joined
15:29
[ptc] joined
15:30
domidumont left
|
|||
llfourn | has anyone else been experiencing race conditions with locks in precomp recently? | 15:31 | |
15:32
domidumont joined
15:36
fireartist left
15:37
donaldh left
|
|||
perlpilot reads scrollback to find out why japhb is congratulating pmurias | 15:48 | ||
ah rakudo-js ... Good luck pmurias :) | |||
(and congrats of course) | 15:49 | ||
15:56
nakiro left
|
|||
Hotkeys | Is there any support for STM in p6? Or is it planned? | 16:10 | |
I was considering taking on the task of attempting to implement it | |||
pmurias | there was STM support in pugs | 16:15 | |
RabidGravy | I take it you mean "software transactional memory" and none of the other billion possible expansions | 16:16 | |
Ven | pmurias: ooooh, did your grant get accepted? | 16:18 | |
RabidGravy: yes :P | |||
RabidGravy | I actually wanted object level transactions the other day | ||
16:20
dwarring left
|
|||
perlpilot | Hotkeys: see 6guts.wordpress.com/2014/04/17/rac...ess-leads/ | 16:20 | |
(that's the only rakudo reference to STM that I remember. Perl 6 has bounced around STM for 10 years or so, but I don't know that anyone is doing anything about it now) | 16:22 | ||
pmurias | Ven: yes | 16:23 | |
Anyone wants to be suggested as grant manager for the rakudo-js grant? | 16:24 | ||
Ven is very excited | |||
this is an astounding news, I'm gonna share it to a few people :D. | |||
pmurias | there should be an official TPF blog post in a couple days | 16:26 | |
DrForr | I'm working with Tom Hukins. | ||
timotimo | pmurias++ | 16:27 | |
dalek | p: 66d0ca2 | (Pawel Murias)++ | src/vm/js/ (4 files): [js] Implement nqp::setmessage, nqp::setpayload, nqp::getpayload, nqp::throw and VMException REPR. |
16:28 | |
p: 431361b | (Pawel Murias)++ | src/vm/js/ (3 files): [js] Implement nqp::newexception. Needs to be integrated with HLL support. |
|||
p: d8953b6 | (Pawel Murias)++ | t/nqp/44-try-catch.t: Test nqp::newexception, nqp::throw, nqp::setpayload, nqp::getpayload, nqp::setmessage, nqp::getmessage. |
|||
ugexe | pmurias++ # great news | 16:42 | |
16:44
idiosyncrat_ joined
|
|||
[Coke] | pmurias++ | 16:50 | |
16:51
FROGGS joined
|
|||
[Coke] | I can be a GM if you need. | 16:51 | |
timotimo | coke the dungeon master | ||
pmurias | [Coke]: thank you, I'll suggest you then ;) | 16:52 | |
Skarsnik | ++ for perl6 in js :) | 16:53 | |
16:54
domidumont left
|
|||
[Coke] | pmurias: so, start planning your first blog post. :) | 16:54 | |
16:55
sufrostico left
17:04
pmurias left
17:08
zakharyas left
|
|||
[Coke] | ingy++ # vroom | 17:14 | |
[Coke] puts together a slide deck at a company that is known for powerpoint presentations about git using vroom. whee. | |||
17:15
SCHAAP137 joined
17:18
sortiz left
17:21
domidumont joined
17:29
wamba joined
17:33
musiKk_ left
17:34
sivoais left
17:35
Ven left
17:36
sufrostico joined
|
|||
Skarsnik | How do I skip a whenever block? I mean to say "do nothing/skip" like | 17:42 | |
timotimo | you can just "next" it | ||
17:44
dakkar left
|
|||
Skarsnik | thx :) | 17:46 | |
timotimo | and when you're done with the whenever's job, you can "last" out of it | 17:50 | |
17:51
espadrine_ left
17:54
Actualeyes left
17:57
abraxxa left
|
|||
ingy | [Coke]: :) | 17:59 | |
18:01
firstdayonthejob joined
18:05
lostinfog joined
18:14
Laurent_R joined
|
|||
kaare_ | How would you define a native call where the argument is a pointer to "a fixed size buffer"? | 18:14 | |
arnsholt | CArray[int8], or similar | 18:17 | |
kaare_ | OK? But the buffer size is system defined, I think. | 18:19 | |
timotimo | CPointer would also do it, and you can always NativeCast. though if the buffer is supposedly a "buffer of bytes", CArray[int8] is likely a better choice | ||
kaare_ | OK, I'll try. Thankx | 18:20 | |
timotimo | you have to get the size of the buffer somehow in any case | ||
the C ABI doesn't have anything standardized for sized buffers | |||
18:22
sufrostico left
18:29
sufrostico joined
18:33
zakharyas joined,
vendethiel joined
18:50
spider-mario joined
18:54
jack_rabbit joined
18:56
yqt joined
18:57
telex left
18:58
telex joined
19:12
pyrimidi_ is now known as pyrimidine
19:17
idiosyncrat_ left
19:18
CIAvash left,
jack_rabbit left
19:26
abaugher left,
abaugher joined
19:28
bitmap left
|
|||
DrForr | Something recently (haven't updated rakudobrew for a few days) just sent performance through the floor. | 19:47 | |
19:48
hacst joined
|
|||
[Coke] | DrForr: you going to bisect? | 19:48 | |
And/Or do you have a small benchmark that shows it? | |||
and how are you running rakudobrew? | 19:49 | ||
DrForr | No, because I'm afraid I wouldn't be able to run a single test. | 19:50 | |
[Coke] | What are you seeing a performance problem on? | 19:51 | |
DrForr | 'use Test' pretty much kills the VM. I'll completely delete .rakudobrew and reinstall. | 19:54 | |
80% drive usage, load average hit about 5 when trying to run a test script.. | 19:55 | ||
[Coke] | so just perl6 -e 'use Test;' is causing you trouble? | 19:56 | |
(first run, or future runs?) | |||
"make test" which uses Test, seems like it's about the same. (fast on everythign but nativecall) | 19:57 | ||
DrForr | It could be something odd in Crust, but its internal tests seemed to rn, I didn't take notice of the actual time because I don't expect much of VM performance. | ||
[Coke] | you said VM - you have a small CPU/mem limit on the VM, OOC? | 19:58 | |
DrForr | 2GiB, I haven't changed the setup in about 6 months, so that shouldn't be a factor. | ||
Running internally on MoarVM, I just blew away .rakudobrew and recloned. | 20:00 | ||
20:01
darutoko left
20:02
zpmorgan left
|
|||
dalek | osystem: a55512d | RabidGravy++ | META.list: Add Audio::Hydrogen see github.com/jonathanstowe/Audio-Hydrogen |
20:02 | |
RabidGravy | who was it that said they'd be interested in that? | 20:04 | |
DrForr | Also, should I still be doing 'rakudobrew build panda' to get Panda running, or is there a more recommended method? | 20:07 | |
pyrimidine . o O ( realized I need to set up some NativeCall bindings for bioinformatics ) | 20:08 | ||
RabidGravy | anyway another one off the yak listing | 20:14 | |
20:16
domidumont left
|
|||
DrForr | Chromium may also have been partially at fault, I'll see in a moment. | 20:21 | |
20:22
zakharyas left
|
|||
DrForr | Sigh. It appears actually to be a recursive loop when a module attempts to 'use' itself. Admittedly a boneheaded move on my part, but I'll confirm ad file a bug. | 20:24 | |
RabidGravy | I thought that went away ages ago | 20:26 | |
DrForr | So did I, which was probaby partially why I overlooked it. | 20:27 | |
Actually this isn't 'unit class Foo; use Foo;' but just 'use Foo;' in file Foo.pm6. | |||
20:29
kaare_ left
|
|||
ugexe | are any other processes running that would try to be using the precomp'd Foo.pm6? | 20:31 | |
20:32
jjido joined
|
|||
DrForr | Only perl6 and that's not running. | 20:32 | |
20:43
sufrostico left
20:44
sufrostico joined
20:50
musiKk_ joined
21:02
pyrimidine left
21:05
prammer joined
21:06
tmch left
21:07
pyrimidine joined
21:08
ptolemarch joined
21:10
dwarring joined,
SCHAAP137 left
21:19
rindolf left
21:20
molaf left,
molaf joined
21:22
sergot joined
21:23
adhoc joined
21:30
sivoais joined
21:40
labster joined,
adhoc left
21:41
jjido left
21:42
fireartist joined
21:54
sno left
21:56
tmch joined,
skids left
21:57
labster left,
labster joined
22:02
donaldh joined,
araujo left
|
|||
dalek | p: 24db816 | (Pawel Murias)++ | src/vm/js/nqp-runtime/core.js: [js] Fix stuff found by "make js-lint". |
22:02 | |
22:03
araujo joined
22:04
musiKk_ left
22:10
ptolemarch left
22:12
nowan_ left
|
|||
timotimo | hmm | 22:14 | |
Skarsnik | timotimo, I get a next without loop construct for next in a whenever block | 22:15 | |
timotimo | oh? :o | ||
Skarsnik | m: react { whenever Supply.Interval(2) { next ; } }; | 22:17 | |
camelia | rakudo-moar 4a0ba7: OUTPUT«No such method 'Interval' for invocant of type 'Supply' in block <unit> at /tmp/1Aw0ihenjE line 1» | ||
Skarsnik | m: react { whenever Supply.interval(2) { next ; } }; | ||
camelia | rakudo-moar 4a0ba7: OUTPUT«===SORRY!===next without loop construct» | ||
Skarsnik | m: react { whenever Supply.interval(2) { return ; say "hello"} }; | 22:18 | |
camelia | rakudo-moar 4a0ba7: OUTPUT«Attempt to return outside of any Routine in block <unit> at /tmp/CLiyML6Zfj line 1» | ||
timotimo | is that just an oversight? | ||
i mean, you can still justt put your stuff into a n if statement to get what you want, but i'd really have expected next to work | 22:19 | ||
Skarsnik | Yes, I put a if False {} around the code inside | ||
but meh | |||
RabidGravy | I'm not sure 'next' makes sense, 'next' what? | 22:20 | |
22:20
sno joined
|
|||
tweakism | Does anyone here have (purchased) PragmataPro 0.821 ? I need to confirm their md5sums. | 22:20 | |
timotimo | RabidGravy: "continue whenever the next thing appears" | 22:21 | |
RabidGravy | but it does anyway | ||
timotimo | what does what anyway? | 22:22 | |
donaldh | doc.perl6.org/language/control#next | ||
RabidGravy | the whenever block is just a fancy tap some default done/quit things not a loop | 22:24 | |
timotimo | but it is very much like a loop | ||
dalek | c: 77a45e6 | coke++ | doc/Language/control.pod: add whitespace to code sample |
||
perlpilot | a whenever block is quite like a loop that iterates the supply. | ||
timotimo | and you can already "last" inside a whatever loop to close your tap on the supply | ||
so why wouldn't it allow to skip the rest of the current iteration with "next"? | 22:25 | ||
for what it's worth, a "for" loop is just a map call, not a loop. | |||
RabidGravy | if that makes sense to you | ||
timotimo | it absolutely makes sense to me | ||
perlpilot | That's pretty much how we're going to explain it to people so ... ;) | 22:27 | |
RabidGravy | y'see it doesn't make sense to me | 22:29 | |
perlpilot | for iterates things that come from a list; whenever iterates things that come from a supply. What doesn't make sense? | 22:35 | |
timotimo | i don't understand why it doesn't make sense to you :) | 22:37 | |
22:38
nowan joined
22:40
wamba left
|
|||
RabidGravy | because I don't see the iteration | 22:41 | |
it could be thought of as doing that sure, but you could think of a subroutine as iterating over its callers too | 22:42 | ||
22:47
cpage_ left
|
|||
timotimo | that's true | 22:50 | |
but subroutine calls don't get invoked with a word starting in "wh", like "while" or "whenever" :) | |||
Skarsnik | But having a word to skip this execution could be nice x) | 22:51 | |
ugexe | m: sub foo { supply { emit($_) for 1..10; }; }; react { whenever foo() { next if $_ > 3; say $_; }; }; | 22:57 | |
camelia | rakudo-moar 4a0ba7: OUTPUT«123» | ||
timotimo | i think that only works "by accident" :) | ||
ugexe | we call those happy accidents | 22:59 | |
23:00
vendethiel left
|
|||
RabidGravy | well possibly the next straight in there is afflicted similarly to done not work under the same circumstance | 23:00 | |
23:00
cdg left
23:01
cdg joined
23:02
cdg_ joined,
kid51 joined
|
|||
timotimo | i'd even say that the next in that example ugexe put is a bug | 23:03 | |
because anything after the emit would also be skipped (if it were still in that for loop) | 23:04 | ||
23:05
cdg left
23:06
donaldh left,
ridthyself joined
23:07
fireartist left
23:08
tmch left
|
|||
ugexe | m: sub foo { supply { for 1..10 { emit($_); say "HONK"; }; }; }; react { whenever foo() { next if $_ > 3; say $_; }; }; # this? | 23:09 | |
camelia | rakudo-moar 4a0ba7: OUTPUT«1HONK2HONK3HONK» | ||
ridthyself | Greetings! I've installed rakudo and am playing around with the REPL. How do I import a .p6 file? | 23:10 | |
timotimo | with "use lib '.'" (or -I. as a commandline switch) you can tell rakudo to look in the current folder for things, and then you can "use TheThing" | 23:11 | |
23:12
cpage_ joined
|
|||
ridthyself | Wonderful! thanks! | 23:12 | |
23:13
ridthyself left
|
|||
ugexe | -I doesnt work with the REPL though | 23:13 | |
hoelzro | it doesn't? | ||
interesting | 23:14 | ||
23:14
RabidGravy left
23:15
DarthGandalf left,
vendethiel joined
23:16
lostinfog left
|
|||
timotimo | damn | 23:16 | |
but at least it'll be visibly absent in the list of things looked at | |||
23:17
cdg_ left,
spider-mario left,
skids joined
23:21
salv00 left
23:23
Skarsnik left
23:24
DarthGandalf joined
23:29
Kabanoid joined
23:36
bpmedley joined
23:37
vendethiel left
23:51
prammer left
23:55
vendethiel joined,
Kabanoid left
23:56
cpage_ left
23:59
cdg joined
|