»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg camelia perl6: ... | irclog: irc.perl6.org | UTF-8 is our friend! Set by sorear on 25 June 2013. |
|||
Mouq | rnp: "OH HAI"\ \ .say | 00:02 | |
camelia | rakudo 38a0f9: OUTPUT«===SORRY!=== Error while compiling /tmp/64g7cmsuNJConfusedat /tmp/64g7cmsuNJ:1------> "OH HAI"\ ⏏\ .say expecting any of: unspace horizontal whitespace postfix» | ||
..pugs: OUTPUT«***  Unexpected "\\" expecting "." at /tmp/O8zRvlBRZI line 1, column 11» | |||
..niecza v24-88-g1f87209: OUTPUT«===SORRY!===Method call found where infix expected (change whitespace?) at /tmp/vBWA6fJ56r line 1:------> "OH HAI"\ \ ⏏.sayParse failed» | |||
Mouq | std: "OH HAI"\ \ .say | ||
camelia | std 06636e4: OUTPUT«===SORRY!===Method call found where infix expected (change whitespace?) at /tmp/4FxeumuiTx line 1:------> "OH HAI"\ \ ⏏.say expecting any of: horizontal whitespace infix or meta-infix infixed function postcircumfix | ||
..post… | |||
Mouq | Making that ( RT #117465 ) work in rakudo was pretty easy | 00:03 | |
Just change <.unsp>? to <.unsp>* and <.unsp> to <.unsp>+ | |||
...(in src/Perl6/Grammar.pm). However, it isn't in std... | 00:04 | ||
00:05
dayangkun joined
|
|||
Mouq | (And of course, I'm sure there's a way to do it, just making <.unsp> be eqv to what is now <.unsp>*) | 00:06 | |
(err, <.unsp>+) | |||
00:08
colomon left
|
|||
Mouq | running& | 00:09 | |
00:28
dayangkun left
00:29
dayangkun joined,
abnorman left,
abnorman joined
|
|||
dalek | d/multiunsp: d699c5f | Mouq++ | STD.pm6: Allow multiple unspaces in sequence |
00:34 | |
00:38
_jaldhar left
00:41
sftp joined
00:47
_jaldhar joined
|
|||
Mouq | You see, #perl6, I have my school starts tomorrow. So clearly the best way to prepare is to play around with Perl6. The first day (highschool) is always a joke anyway | 00:48 | |
s/I have// perhaps I miss my English class a bit | 00:49 | ||
TimToady | we'd probably say "my school is starting tomorrow" | 00:50 | |
we tend to avoid "present tense" in favor of "present progressive" | |||
Mouq | Well, I'm a naïve speaker—*ahem* native | 00:51 | |
diakopter | *we are tending | ||
TimToady | I am standing corrected :) | 00:52 | |
actually it'll be interesting to see if the trend toward progressive reverses, what with everyone becoming a writer in their texting | 00:54 | ||
and "starts" is easier to type than "is starting" :) | 00:55 | ||
So, am I predicting this? Or do I predict this? :) | 00:56 | ||
geekosaur | you might coould be predicting it... | 00:57 | |
Mouq | You previously will predict it. | ||
jercos | You will have predicted that when it does or does not occur. | ||
Your prediction transitioned from unmade to pre-resolution? | 00:58 | ||
Mouq | TimToady: I made PR #5 on STD because I'm cautious to change something not explicitly specced, and it needs review: github.com/perl6/std/pull/5 | ||
01:01
drbean joined
01:02
dayangkun left
|
|||
TimToady | Mouq: yes, still thinking about that | 01:08 | |
Mouq | Okay~, I just wasn't sure if you had seen it... The :dba is inside the []+. I'm not sure if that works... | 01:10 | |
r: say "\c[LATIN CAPITAL LETTER A, COMBINING DOT ABOVE]".ord; | 01:16 | ||
camelia | rakudo 38a0f9: OUTPUT«65» | ||
Mouq | r: say "\c[LATIN CAPITAL LETTER A WITH DOT ABOVE]".ord; | ||
camelia | rakudo 38a0f9: OUTPUT«550» | ||
TimToady | that will fix itself when we switch to NFG mode | ||
since it will default to grapheme mode | 01:17 | ||
our current string semantics based on codepoints will probably be renamed to Uni/NFD/NFC and such | 01:18 | ||
Mouq | Cool | 01:20 | |
TimToady | mostly people don't want to care about how many codepoints are in their graphemes | ||
re <.unsp>* I can see some potential use cases; what I'll have more difficulty seeing is whether it causes surprising results of its own; that'll take playing around with it a bit | 01:23 | ||
for instance, we currently allow 42\i to be an unspace without space, as it were; what happens with 42\ \i then? | 01:24 | ||
or if we allow that, what about if you want to start the next term with a \ for some reason (a capture?) | |||
so it's not entirely a simple decision | 01:25 | ||
01:25
benabik left
|
|||
Mouq | Hm | 01:30 | |
Okay. Interesting | 01:32 | ||
TimToady | std: 42\i | ||
camelia | std 06636e4: OUTPUT«ok 00:00 41m» | ||
TimToady | std: 42\ i | ||
camelia | std 06636e4: OUTPUT«ok 00:00 41m» | ||
TimToady | std: 42\ \i | 01:33 | |
camelia | std 06636e4: OUTPUT«===SORRY!===Two terms in a row at /tmp/2UI2xm_ZRj line 1:------> 42\ ⏏\i expecting any of: feed_separator horizontal whitespace infix or meta-infix infixed function postcircumfix postfix | ||
..postfix_prefix_meta_operator … | |||
TimToady | but that has been proposed before, to have a backslash at the end as well, mostly to put at the beginning of a line to say the previous line ended with a \ | ||
up till now, it has just seemed like more clutter | |||
the use case for \ \ is more about allowing \ on a blank line, if for some reason you're writing a series of \ lines | 01:34 | ||
and want a blank line in the middle for some reason | |||
01:35
colomon joined
|
|||
TimToady | but that's different from the stuff\ \stuff problem | 01:35 | |
Mouq | Well, that's just a matter of changing the quantifier for <.unsp> at that particular place | 01:36 | |
TimToady | nod, I just always tend to view one change in relation to all the nearby things that might get nudged out of place :) | 01:40 | |
Mouq | Probably a good tendency | 01:42 | |
r: .++() | |||
camelia | rakudo 38a0f9: OUTPUT«===SORRY!===No such method 'unshift' for invocant of type 'NQPMu'» | ||
TimToady | afk for a couple hours & | 01:49 | |
Mouq | std: .++() | 01:54 | |
camelia | std 06636e4: OUTPUT«ok 00:00 41m» | ||
Mouq | std: .i # ? | 01:57 | |
camelia | std 06636e4: OUTPUT«ok 00:00 41m» | ||
Mouq | r: .i | ||
camelia | rakudo 38a0f9: OUTPUT«No such method 'i' for invocant of type 'Nil' in block at /tmp/uVnqXORnWE:1» | ||
Mouq | r: .i() | 01:59 | |
camelia | rakudo 38a0f9: OUTPUT«No such method 'i' for invocant of type 'Nil' in block at /tmp/va6R0KAYlz:1» | ||
Mouq | r: sub postfix:<¡> { $^a }; "thing"¡; "thing".¡; | 02:01 | |
camelia | rakudo 38a0f9: OUTPUT«===SORRY!===CHECK FAILED:Undefined routine '&postfix:<.>' called (lines 1, 1)» | ||
Mouq | :? | 02:04 | |
r: my @a = ^10; @a.».++ # strange error | |||
camelia | rakudo 38a0f9: OUTPUT«No such method 'postcircumfix:<( )>' for invocant of type 'Int' in sub METAOP_HYPER_CALL at src/gen/CORE.setting:15607 in block at /tmp/9T1RPAHm0a:1» | ||
Mouq | r: .:<++> | 02:05 | |
camelia | rakudo 38a0f9: OUTPUT«===SORRY!=== Error while compiling /tmp/_Dm6r538tuUnsupported use of . to concatenate strings; in Perl 6 please use ~at /tmp/_Dm6r538tu:1------> .:⏏<++>» | ||
Mouq | r: $_.:<++> | 02:06 | |
camelia | rakudo 38a0f9: OUTPUT«===SORRY!=== Error while compiling /tmp/BuInZymicsUnsupported use of . to concatenate strings; in Perl 6 please use ~at /tmp/BuInZymics:1------> $_.:⏏<++>» | ||
Mouq | std: .:<++> | 02:11 | |
camelia | std 06636e4: OUTPUT«ok 00:00 41m» | ||
02:18
benabik joined
02:53
BenGoldberg left
02:57
colomon left
03:18
preflex_ joined,
ChanServ sets mode: +v preflex_
03:19
preflex left,
preflex_ is now known as preflex
|
|||
Mouq | std: .:<nonpre> | 03:42 | |
camelia | std 06636e4: OUTPUT«ok 00:00 41m» | ||
Mouq | std: $_.:<nonpre> | ||
camelia | std 06636e4: OUTPUT«ok 00:00 42m» | ||
Mouq | std: $_.-+ | 03:50 | |
camelia | std 06636e4: OUTPUT«===SORRY!===Confused at /tmp/5ZddGzXE_j line 1:------> $_.⏏-+ expecting any of: dotty method or postfix postcircumfix postfix_prefix_meta_operator postopParse failedFAILED 00:00 42m» | ||
03:52
iravan joined
|
|||
Mouq | 03:59 | ||
Oop. Yup. /me | |||
04:00
iravan left
04:29
xilo left
|
|||
Mouq | Really close to fixing rakudo's «.++»/«.:<++>» problem, but I must to bed! ciao #perl6 | 04:39 | |
04:39
hummeleBop joined
|
|||
TimToady | night | 04:40 | |
04:44
Mouq left
05:01
berekuk joined
05:08
berekuk left
05:09
berekuk joined,
berekuk left
05:12
SamuraiJack joined
05:26
dayangkun joined
05:38
fhelmberger joined
05:43
dayangkun left
06:07
daxim joined
06:08
benabik left
06:25
kaleem joined
06:34
FROGGS joined
06:36
kaleem left
06:37
dayangkun joined,
dayangkun is now known as dayangkun_715,
dayangkun_715 left
|
|||
FROGGS | morning | 06:38 | |
06:38
dayangkun joined,
dayangkun left,
kaleem joined
06:39
kaleem left,
kaleem joined
06:49
dayangkun joined
06:51
fhelmberger_ joined,
dayangkun left
|
|||
moritz | \o | 06:52 | |
06:53
fh joined,
fhelmberger_ left
06:55
fhelmberger left
07:19
domidumont joined
07:23
domidumont left
07:24
domidumont joined
07:31
salv0 joined
07:37
sqirrel joined
07:39
skulls left
|
|||
FROGGS | .tell Mouq What if <unsp> unspaces more than one char? It could unspace \s+, wouldn't that be better? | 07:46 | |
yoleaux | FROGGS: I'll pass your message to Mouq. | ||
FROGGS | .tell TimToady What if <unsp> unspaces more than one char? It could unspace \s+, wouldn't that be better? | ||
yoleaux | FROGGS: I'll pass your message to TimToady. | ||
07:49
abnorman left
08:05
dalek left
08:06
dalek joined,
ChanServ sets mode: +v dalek
08:07
benabik joined
|
|||
nwc10 | yoleaux: .tell [Coke] that FRA is about 15 minutes from central Frankfurt by train, and HNH is 124km away by road. | 08:08 | |
on, that wasn't the magic | |||
.tell [Coke] that FRA is about 15 minutes from central Frankfurt by train, and HNH is 124km away by road. | |||
yoleaux | nwc10: I'll pass your message to [Coke]. | ||
nwc10 | oh, sweet | 08:09 | |
Hahn is nearer to Perl than to Frankfurt. | 08:10 | ||
moritz | t.co/RqfXT3A2XG # one of the YAPC::EU talks by masak++ | ||
masak | good o/, #perl6 | 08:11 | |
FROGGS | ohh, awesome! | 08:12 | |
hi all | |||
timotimo | good day | 08:15 | |
08:18
dmol joined,
denis_boyun joined
|
|||
timotimo | i think i'm going to merge the nqp-optimizer today. don't forget to run Configure*.pl before re-building | 08:21 | |
FROGGS | k | 08:24 | |
timotimo | currently running all the tests | 08:25 | |
oh woops, there seems to be a debug output left somewhere | 08:28 | ||
JimmyZ | timotimo: Do you have a benchmark to show how faster with nqp-optimizer? | 08:30 | |
FROGGS | good that it isnt at the right, you might havn't spotted it | ||
08:31
SamuraiJack_ joined
|
|||
timotimo | JimmyZ: yes, hold on | 08:33 | |
t.h8.lv/p6bench/nqp-optimization.html | |||
08:34
dmol left
|
|||
timotimo | 215ac4c is the optimized one | 08:34 | |
fortunately it has the same color in all graphs | |||
pro tip: you can click on the checkouts in the annotaion on the right to show/hide the lines | |||
08:35
SamuraiJack left
|
|||
timotimo | the optimization only does something for integer arithmetics, so it doesn't do anything to most benchmarks | 08:35 | |
but a rakudo translated with the optimized&optimizing nqp binary will run the spectest suite in about 1.5% less cpu time | 08:36 | ||
08:37
Kiralexis left
|
|||
JimmyZ | oh | 08:40 | |
I care about compiling time, it's a pain :P | |||
timotimo | the optimizer is blazing fast :) | 08:41 | |
didn't measure it. should i? | |||
JimmyZ | I mean the rakudo cpmpiling time :P | ||
timotimo | yes, i know :) | ||
JimmyZ | not the optimizer itself | ||
timotimo | ah! | 08:42 | |
of course | |||
last time i checked there was no noticable difference | |||
JimmyZ | please measure it, that's a good benchmark | ||
a real life benchmark | 08:43 | ||
timotimo | why are there so many spectest failures? =o | ||
oh, it's rakudo-jvm | |||
GlitchMr | std: "OH HAI"\. say | 08:53 | |
camelia | std 06636e4: OUTPUT«===SORRY!===Confused at /tmp/ZNF_x0ZWGC line 1:------> "OH HAI"\.⏏ say expecting any of: dotty method or postfix postcircumfix postfix_prefix_meta_operator postopParse failedFAILED 00:00 42m»… | 08:54 | |
GlitchMr | std: "OH HAI"\. say | ||
camelia | std 06636e4: OUTPUT«===SORRY!===Confused at /tmp/fGtCvQWNPr line 1:------> "OH HAI"\.⏏ say expecting any of: dotty method or postfix postcircumfix postfix_prefix_meta_operator postopParse failedFAILED 00:00 42m» | ||
timotimo | that's not how you do it :) | ||
GlitchMr | oh, right | ||
std: "OH HAI".\ say | |||
camelia | std 06636e4: OUTPUT«ok 00:00 41m» | ||
GlitchMr | std: "OH HAI".\ say | ||
camelia | std 06636e4: OUTPUT«ok 00:00 41m» | ||
GlitchMr | std: "OH HAI".\ \ say | ||
camelia | std 06636e4: OUTPUT«===SORRY!===Confused at /tmp/YzVs926gmK line 1:------> "OH HAI".\ ⏏\ say expecting any of: dotty method or postfix horizontal whitespace postcircumfix postfix_prefix_meta_operator postop | ||
..unspaceParse… | |||
GlitchMr | rakudo: "OH HAI".\ \ say | 08:56 | |
camelia | rakudo 38a0f9: OUTPUT«===SORRY!=== Error while compiling /tmp/UrcNYQI06lConfusedat /tmp/UrcNYQI06l:1------> "OH HAI".\ ⏏\ say expecting any of: unspace horizontal whitespace» | ||
GlitchMr | niecza: "OH HAI".\ \ say | ||
camelia | niecza v24-88-g1f87209: OUTPUT«===SORRY!===Confused at /tmp/M6slbo8V0S line 1:------> "OH HAI"⏏.\ \ sayParse failed» | ||
08:56
donaldh joined
09:00
odoacre left
09:03
amkrankruleuen joined,
amkrankruleuen left,
amkrankruleuen joined
09:12
denisboyun joined
09:14
denis_boyun left
|
|||
timotimo measures core setting compile times | 09:15 | ||
09:17
grondilu_ joined
09:21
grondilu left
|
|||
hoelzro | morning #perl6 | 09:22 | |
timotimo | sup rob :) | ||
the new vim release features a faster regexp engine. i wonder if the perl6 syntax rules can make use of that? | |||
hoelzro | timotimo: for the perl5 files, the new engine really messed things up | 09:25 | |
but that was a while ago, so it might work better now | |||
timotimo | oh? | ||
hoelzro | any and all contributions to the perl6 file would be most welcome =) | ||
I have so much I want to do for it | 09:26 | ||
but such little time =/ | |||
timotimo | the only mess-up i have with vim at the moment is that sometimes regions of the window get damaged and not re-drawn, so i get large areas of black or duplicated or shifted lines :( | ||
moritz throws a round tuit to hoelzro | |||
timotimo | but only in gvim | ||
and only on my desktop | |||
hoelzro catches it, and gives it a small bite to verify its authenticity | |||
09:27
berekuk joined
09:32
dmol joined
09:36
wtw left
|
|||
timotimo | compilation times are pretty noisy, JimmyZ. i'm getting 4 measurements with and without nqp-optimize each, but only for the CORE.setting | 09:37 | |
09:39
dmol left,
berekuk left
09:40
dmol joined
|
|||
timotimo | what's the shortest way between "a list of floating point numbers" to "average and standard deviation"? | 09:41 | |
maybe even a box plot? :) | |||
tadzik | hmm, I thought we have a statistics module | ||
must've got lost | |||
moritz | timotimo: iterate over all values, keep a total of the values and the squares | 09:42 | |
and then you can use those two to calculate mean and standard deviation (first and second momentum, really) | |||
timotimo | better answer: wolframalpha ;) | ||
09:42
berekuk joined
|
|||
moritz | oh | 09:42 | |
tadzik | :P | 09:43 | |
moritz | I thought you wanted to write Perl 6 code | ||
locally I use octave (open source matlab clone) for this stuff | |||
timotimo | hehe | ||
moritz | v = [1.3, 1, 0.7] | 09:44 | |
hoelzro | so...what's the schedule for this upcoming workshop? | ||
moritz | mean(v) | ||
std(v) | |||
hoelzro | I'm looking into flights and wondering when I should arrive at/leave Frankfurt | ||
09:44
fh left
|
|||
tadzik | hoelzro: gist.github.com/lizmat/6177720 | 09:44 | |
oops | |||
it's gone :) | |||
hoelzro | =( | ||
timotimo | r: my @samples = 171.305, 165.521, 165.521, 165.521; my ($sum, $sqsum) = ([+] @samples), ([+] (@samples >>**>> 2)); say $sum; say $sqsum; say "and now?" | ||
camelia | rakudo 38a0f9: OUTPUT«667.868111537.007348and now?» | ||
moritz | the mail to p6c has the details, but I'm not sure if there's a schedule | 09:45 | |
09:45
berekuk left
|
|||
timotimo | i have to sum up the difference between the average and the squares at each point, right? | 09:45 | |
r: my @samples = 171.305, 165.521, 165.521, 165.521; my $mean = ([+] @samples) / +@samples; my $sqdiffsum = ([+] ((@samples X- $mean) >>**>> 2)); say $mean; say $sqdiffsum; say "and now?" | 09:46 | ||
camelia | rakudo 38a0f9: OUTPUT«166.96725.090992and now?» | ||
moritz | en.wikipedia.org/wiki/Standard_devi...on_methods | ||
uhm, that looks more complicated than necessary | 09:47 | ||
09:49
Kiralexis joined
|
|||
moritz | timotimo: the standard deviation is just sqrt($sqdiffsum / @samples) | 09:49 | |
timotimo | ah | ||
09:50
fhelmberger joined
|
|||
timotimo | the results so far have been inconclusive (i had a b0rked data point in my first measurement) | 09:51 | |
grondilu_ | there is an entry about std dev in RC: rosettacode.org/wiki/Standard_Deviation#Perl_6 | 09:52 | |
09:52
nyuszika7h left
09:53
nyuszika7h joined
09:54
colomon joined
|
|||
JimmyZ | timotimo: so you got a result? how much faster? | 09:55 | |
timotimo | hold on just a few more minutes | ||
it won't be much | |||
perhaps 1% | 09:56 | ||
masak .oO( calculating the arithmetic average of something is pretty mean ) | |||
timotimo | masak: do you have an answer for "gather-based processes are hard to resume without manual effort"? | ||
resume as in: the ircbot has to restart and keep its state | 09:57 | ||
09:57
iSlug joined
|
|||
masak | timotimo: no idea. I sense I should backlog to know better what you're talking about. | 09:58 | |
timotimo | i didn't really say much more about that before | 09:59 | |
09:59
grondilu_ is now known as grondilu,
grondilu is now known as Guest93334
|
|||
timotimo | JimmyZ: with 4 data points each i get: | 10:01 | |
optimized: mean 167, std: 1.676 | 10:02 | ||
JimmyZ | oh | ||
timotimo | unoptimiz: mean 168.9, std: 0.941 | ||
so a little bit more than 1% for compiling the CORE.setting | |||
faster, i mean. | 10:03 | ||
FROGGS | 100 of these patches and we can compile in *no time*! whoohoo! *g* | ||
timotimo | :D | ||
i try my best, but it's so hard :( | |||
Guest93334 tries to think of a smart way to write a momentum function | |||
FROGGS | timotimo: I know what you mean :o) | 10:04 | |
timotimo | env.parrot.rakudo is known to fail, right? | ||
FROGGS | timotimo: yes | ||
Guest93334 | r: sub momentum(@a) { gather take ([\*] 1, $_ xx *).item for @a } | 10:05 | |
camelia | rakudo 38a0f9: ( no output ) | ||
timotimo | that works? •_• | ||
10:05
nyuszika7h left
10:06
nyuszika7h joined
10:07
Guest93334 is now known as grondilu,
grondilu is now known as Guest88156
10:08
Guest88156 is now known as grondilu,
grondilu left,
grondilu joined
10:10
cognominal__ is now known as cognominal
|
|||
grondilu | please ignore what I wrote as Guest93334 | 10:10 | |
I still think there has to be a smart way to write a momentum function, but it's not as easy as I thought. | 10:11 | ||
10:23
sergot joined,
synopsebot joined,
fhelmberger left
10:24
fhelmberger joined
|
|||
timotimo | measurements for rakudo.jvm optimized is mean 72.85, std 0.938 | 10:24 | |
grondilu | r: sub momentum(@a) { my @momentum := (1 xx @a).item, @a.item, {(@^x Z* @a).item} ... *; map { [+] @momentum[$_].list }, 0 .. * }; say momentum(^10)[^4] | 10:25 | |
camelia | rakudo 38a0f9: OUTPUT«10 45 285 2025» | ||
grondilu | r: say [+] ^10 »**»3 | 10:27 | |
camelia | rakudo 38a0f9: OUTPUT«0» | ||
grondilu | r: say ^10 »**»3 | ||
camelia | rakudo 38a0f9: OUTPUT«0..^1» | ||
grondilu | r: say [^10] »**»3 | 10:28 | |
camelia | rakudo 38a0f9: OUTPUT«0 1 8 27 64 125 216 343 512 729» | ||
grondilu | r: say [+] [^10] »**»3 | ||
camelia | rakudo 38a0f9: OUTPUT«2025» | ||
colomon | n: say ^10 »**»3 | 10:29 | |
camelia | niecza v24-88-g1f87209: OUTPUT«0..^1000» | ||
colomon | that at least sort of makes sense.... | ||
grondilu | r: sub momentum(@a) { my @momentum := (1 xx @a).item, {(@^x Z* @a).item} ... *; map { [+] @momentum[$_].list }, 0 .. * }; say momentum(^10)[^5] | 10:30 | |
camelia | rakudo 38a0f9: OUTPUT«10 45 285 2025 15333» | ||
grondilu | r: sub momentum(@a) { my @momentum := (1 xx @a).item, {(@^x Z* @a).item} ... *; map { [+] @momentum[$_].list }, 0 .. * }; sub stddev { sqrt( (.[0]*.[2] - .[1]**2)/.[0] ) given momentum(@^a) }; say stddev ^10 | 10:32 | |
camelia | rakudo 38a0f9: OUTPUT«9.08295106229247» | ||
10:36
donaldh left,
donaldh joined
|
|||
Ulti | timotimo I'd do a en.wikipedia.org/wiki/Kolmogorov–Smirnov_test on that to get a pvalue ;P thats what all the TLDRs want cold hard science >:3 | 10:37 | |
timotimo | i don't even ... | 10:40 | |
10:41
locsmif joined
|
|||
timotimo | noooo, the unoptimized version is not slow enough! must start more background processes ... | 10:41 | |
Ulti | jvm rakudo I think the main thing anyone is going to complain about time wise is the ~10s startup time, at least that's what it was for me quite a while ago a lot has happened since then | 10:43 | |
timotimo | =time ./perl6 -e 'say "hello world"' 5,57s user 0,15s system 162% cpu 3,515 total | ||
moritz does what he should have done all along: two separate directories for the two rakudos | 10:44 | ||
timotimo | i just want to make sure i don't accidentally make it slower by adding my optimization | ||
grondilu | r: my @a = ^10; my $m = @a R/ [+] @a; say sqrt ( @a R/ [+] map (* - $m)**2, @a ); | 10:45 | |
camelia | rakudo 38a0f9: OUTPUT«2.87228132326901» | ||
grondilu | r: sub momentum(@a) { my @momentum := (1 xx @a).item, {(@^x Z* @a).item} ... *; map { [+] @momentum[$_].list }, 0 .. * }; sub stddev { sqrt(.[0]*.[2] - .[1]**2)/.[0] given momentum(@^a) }; say stddev ^10 | ||
camelia | rakudo 38a0f9: OUTPUT«2.87228132326901» | ||
grondilu | here you go | ||
or shorter: | 10:47 | ||
r: sub momentum(@a) { my @momentum := [1 xx @a], {[@^x Z* @a]} ... *; map { [+] @momentum[$_].list }, 0 .. * }; sub stddev { sqrt(.[0]*.[2] - .[1]**2)/.[0] given momentum(@^a) }; say stddev ^10 | |||
camelia | rakudo 38a0f9: OUTPUT«2.87228132326901» | ||
10:48
fhelmberger left
|
|||
Ulti | timotimo: 162% cpu ? there is some threading happening? | 10:48 | |
10:50
fhelmberger joined
|
|||
timotimo | yes | 10:50 | |
10:50
berekuk joined
|
|||
timotimo | the jvm has a concurrent GC | 10:50 | |
Ulti | ahh right | 10:51 | |
moritz has a rakudo-jvm startup time of 3.7s | |||
10:52
berekuk left
|
|||
Ulti | I'll have to get myself a fresh copy then | 10:52 | |
timotimo | perl6 -e 'say [+] lines', so nice and short to have a little terminal to paste stuff into and get a sum out | 10:53 | |
grondilu wonders how could we have intermediates sums in "real time" | 10:57 | ||
moritz | with [\+] of course | ||
grondilu | .say for [\+] lines | ||
masak | flight & | ||
timotimo | hm, lines is eager, isn't it? :( | ||
grondilu | but it only shows up at the end | ||
moritz | timotimo: it shouldn't be | ||
I think that for-loops are too eager | |||
timotimo | yes, but it is ;( | ||
that may be it, yeah | |||
using map instead should help, right? | |||
Ulti | perl -E 'say $sum += $_ for <>' isn't too long either, but a lot harder to read | 10:58 | |
timotimo | it doesn't. | ||
hm. how do i read a single line from stdin? | 10:59 | ||
r: say $?STDIN.^methods | |||
camelia | rakudo 38a0f9: OUTPUT«===SORRY!=== Error while compiling /tmp/du0EIHtJ1yVariable '$?STDIN' is not declaredat /tmp/du0EIHtJ1y:1------> say $?STDIN.^methods⏏<EOL> expecting any of: method arguments» | ||
timotimo | r: say $*STDIN.^methods | ||
camelia | rakudo 38a0f9: OUTPUT«new BUILD defined Int Num Numeric sink postcircumfix:<{ }> Bool Str gist <anon>» | ||
timotimo | ... oh? | ||
moritz | timotimo: $*IN.get | ||
timotimo | ah | ||
thanks :) | |||
perl6 -e 'my $s; map { when /\d+/ { $s += $_; }; default { say $s; $s = 0 } }, ({ $*IN.get } ... *)' # improvements welcome | 11:00 | ||
11:02
berekuk joined
|
|||
grondilu | don't we have a -n option in perl6, as in perl5? | 11:02 | |
timotimo | dunno | ||
grondilu tries | |||
moritz | I'm pretty sure we have. | ||
timotimo | if all that does is wrap for lines() around it, it won't work the way i want it to | 11:03 | |
11:03
locsmif left
|
|||
timotimo | however, i could change that to use ({ $*IN.get } ... *) instead | 11:03 | |
grondilu | Option 'e' in grouped options '-ne' needs a value, but does not have one | ||
^got this | |||
pelr6 -ne '.say' | |||
*perl6 | 11:04 | ||
timotimo | r: my $s; for ({ $*IN.get } ... *) { $s += 1; }; say $s; | ||
camelia | rakudo 38a0f9: OUTPUT«(timeout)» | ||
timotimo | r: my $s; for ({ $*IN.get } ... $*IN.eof) { $s += 1; }; say $s; | ||
camelia | rakudo 38a0f9: OUTPUT«(timeout)» | ||
timotimo | r: say $*IN.^methods | ||
camelia | rakudo 38a0f9: OUTPUT«open close eof get getc lines read seek tell write opened t print slurp spurt copy chmod IO path flush encoding d e f s l r w x z modified accessed changed say Str gist perl <anon> <anon>» | ||
moritz | I'm pretty sure $*IN.eof is evaluated only once | ||
timotimo | oh | ||
grondilu | timotimo: you don't have to use $*IN explicitely | ||
timotimo | r: my $s; for ({ $*IN.get } ... { $*IN.eof }) { $s += 1; }; say $s; | ||
camelia | rakudo 38a0f9: OUTPUT«24» | 11:05 | |
timotimo | yes that's better | ||
hm, well, lines uses a gather/take that really should be lazy. | 11:06 | ||
and map should be lazy, too! weird. | 11:07 | ||
11:08
donaldh left
|
|||
moritz | well | 11:08 | |
map is lazy | |||
but the question is how it is made eager in the end | 11:09 | ||
timotimo | oh? could that be why i don't see lines echoed back at me in perl6 -e 'map { .say }, lines'? | ||
moritz | maybe | 11:10 | |
timotimo | all in all, that's very unhelpful. | ||
11:10
dmol left,
dmol1 joined
|
|||
timotimo | however, why does it work when i do the { $*IN.get } ... { $*IN.eof } hack? | 11:10 | |
grondilu guess it's because of the sequence operator with a closure at the end | 11:13 | ||
timotimo | i don't understand. | 11:14 | |
grondilu thinks it forces the laziness of the for | |||
kind of the same reason why for 1, 2 ... * { ... } works | |||
timotimo | it can't be buffering in the input buffer, can it? | 11:16 | |
using gather while True { take $*IN.get } has the same problem lines() does, it seems | |||
have gather blocks suddenly become eager? >_> | 11:17 | ||
grondilu | you mean gather while True { take get; last if eof } | 11:18 | |
timotimo | yeah. | ||
grondilu | or gather until eof { take get } | ||
timotimo | eof doesn't seem to be built | ||
grondilu can try that right now as he's recompiling rakudo | |||
flussence | r: gather take get until eof | ||
camelia | rakudo 38a0f9: OUTPUT«===SORRY!=== Error while compiling /tmp/FaqOU8ura4Undeclared routine: eof used at line 1» | ||
moritz | $*ARGS.eof or so | 11:19 | |
grondilu | sub eof { $*IN.eof } # just had that in you .perl6rc :) | 11:20 | |
grondilu knows there is no such thing as .perl6rc, but you know what I mean | 11:21 | ||
.-2s/had/add/ | |||
.-3s/you/&r/ | 11:22 | ||
daxim | ewww, is that viml? | 11:24 | |
dalek | p: 459e172 | (Timo Paulssen)++ | / (6 files): initial draft of optimizer, inactive ATM. |
11:26 | |
p: ba977c2 | (Timo Paulssen)++ | src/NQP/Optimizer.nqp: working build, lots of debug output, more intelligence. |
|||
p: 8bea225 | (Timo Paulssen)++ | src/NQP/Optimizer.nqp: nqp-jvm doesn't like negative nums in substr |
|||
p: e63cc6f | (Timo Paulssen)++ | src/NQP/Optimizer.nqp: this should have been gone already. |
|||
p: 60e9b7e | (Timo Paulssen)++ | src/NQP/Optimizer.nqp: little improvements. actually finds symbols now. |
|||
p: 3e45f29 | (Timo Paulssen)++ | src/NQP/Optimizer.nqp: removed debug output |
|||
timotimo | ^ seemed good enough to be merged | ||
p: f1d040d | (Timo Paulssen)++ | / (6 files): Merge branch 'origin/nqp-optimizer' This gives us an optimizer for NQP that removes some int to num and num to int coercions if they are superfluous. |
|||
rlito: 3158ca6 | (Flavio S. Glock)++ | / (2 files): Perlito5 - perl5 - tweak the perl5 pretty-printer |
11:34 | ||
11:35
donaldh joined
|
|||
donaldh | testing binary IO ops on JVM, I guess there are encoding differences I cannot see visually: gist.github.com/donaldh/b66e23a436daed71cdcd | 11:36 | |
timotimo | you can always pipe it through xxd | 11:37 | |
also, maybe on the way "out" it gets mangled? | |||
moritz | tests pass here | 11:38 | |
donaldh: what's your locale? | |||
donaldh | moritz: en_GB.UTF-8 | ||
moritz | ok, that shouldn't be the problem | 11:39 | |
donaldh | I've just written the binary ops so I've probably messed up the encoding steps. | ||
:) | |||
moritz | try printing out the Buf/Blob objects directly | ||
11:51
woolfy joined
|
|||
dalek | rlito: 5b1c58c | (Flavio S. Glock)++ | / (2 files): Perlito5 - perl5 - tweak the perl5 pretty-printer |
11:55 | |
11:57
kbaker joined
12:00
benabik left
12:02
donaldh left
12:03
JimmyZ_ joined
|
|||
dalek | rlito: 819f0a3 | (Flavio S. Glock)++ | / (2 files): Perlito5 - perl5 - tweak the perl5 pretty-printer |
12:07 | |
12:16
xenoterracide left
12:19
fhelmberger_ joined
12:20
jnap joined
12:22
fhelmberger left
12:28
sqirrel left
|
|||
dalek | rlito: 17e8217 | (Flavio S. Glock)++ | / (2 files): Perlito5 - perl5 - tweak the perl5 pretty-printer |
12:28 | |
12:34
census joined
|
|||
dalek | rlito: 22db30e | (Flavio S. Glock)++ | / (3 files): Perlito5 - grammar compiler - tweak the perl5 pretty-printer |
12:37 | |
pmichaud | FROGGS: ping | 12:42 | |
dalek | rlito: d6aeb0d | (Flavio S. Glock)++ | / (3 files): Perlito5 - grammar compiler - tweak the perl5 pretty-printer |
||
FROGGS | pmichaud: pong | ||
pmichaud | did you really mean <[\s+\r\n]> in your comment on github.com/perl6/std/pull/5#issuec...t-23252504 ? | ||
12:43
ajr joined
|
|||
FROGGS | pmichaud: I think so, yes | 12:43 | |
pmichaud | \s already includes \r and \n | ||
and we probably don't want to match + | |||
12:43
ajr is now known as Guest76882
|
|||
FROGGS | ahh | 12:43 | |
yes | |||
but I posted " <[\s\r\n]>+ ", see :P | 12:44 | ||
(I edited my comment right now) | |||
pmichaud | which is shorter as \s+ :-) | ||
FROGGS | and edited again -.- | ||
yeah, I recognized it after writing here | 12:45 | ||
I just can blame that and me having a cold | |||
s/and/on/ | |||
-.- | |||
pmichaud | colds can do that, definitely. | ||
I think a lot of the synopses may be to TimToady++ colds. :-P :-P | |||
FROGGS | my brain is a bit slow these days | ||
*g* | |||
pmichaud | *be due to | 12:46 | |
FROGGS | pssssst, this channel is logged | ||
12:46
ggoebel left
|
|||
FROGGS | we tend to rant about TimToady in #rant-a-toady | 12:46 | |
12:46
ggoebel joined
|
|||
FROGGS | TimToady++ even | 12:46 | |
pmichaud | I tend to be more public in my rants. :) | 12:49 | |
12:50
colomon left,
kaleem left
|
|||
FROGGS | yeah, this might bring up more well-considered rants | 12:50 | |
12:51
not_gerd joined,
kaleem joined
|
|||
not_gerd | o/ | 12:51 | |
FROGGS | hi not_gerd | ||
not_gerd | quick question - if we pass a negative offset to nqp::substr() that greater than the length, should we wrap around or return an empty string? | 12:52 | |
*that's | |||
FROGGS | nr: say substr("abc", -5, 1) | ||
camelia | rakudo 38a0f9: OUTPUT«Start argument to substr out of range. Is: -5, should be in 0..Inf; use *-5 if you want to index relative to the end in method gist at src/gen/CORE.setting:11494 in method gist at src/gen/CORE.setting:990 in sub say at src/gen/CORE.setting:12390 in block a… | ||
..niecza v24-88-g1f87209: OUTPUT«(Str)» | |||
FROGGS | not_gerd: you meant offset? | 12:53 | |
nr: say substr("abc", *-5, 1) | |||
camelia | rakudo 38a0f9: OUTPUT«Start argument to substr out of range. Is: , should be in 0..Inf; use *-2 if you want to index relative to the end in method gist at src/gen/CORE.setting:11494 in method gist at src/gen/CORE.setting:990 in sub say at src/gen/CORE.setting:12390 in block at … | ||
..niecza v24-88-g1f87209: OUTPUT«(Str)» | |||
not_gerd | I was looking at the JVM ops | ||
it checks `if (offset < 0) offset += val.length();` | 12:54 | ||
logically, argument could be made that it should be `while (offset < 0) offset += val.length();` | |||
FROGGS | hold on | ||
12:54
pmurias joined
|
|||
dalek | rlito: 53222da | (Flavio S. Glock)++ | / (4 files): Perlito5 - grammar compiler - tweak the perl5 pretty-printer |
12:55 | |
moritz | not_gerd: I don't see what that would mean | ||
not_gerd: the current thing means "if it's negative, index from the end" | |||
pmurias | how can I detect windows in nqp code? | 12:56 | |
not_gerd | moritz: yes, but what should happen if the offset is greater in magnitude than the string's length? | ||
moritz | not_gerd: an error is reported to the user | ||
clkao | win2 4 | ||
12:56
dayangkun joined
|
|||
FROGGS | I can't find the spec about this | 12:57 | |
not_gerd | nqp/jvm dies with StringIndexOutOfBoundsException | ||
also, if we overflow at the end, we just return an empty string | 12:59 | ||
FROGGS | true | ||
12:59
iSlug left
|
|||
FROGGS | that speaks for the current impl | 13:00 | |
not_gerd | (the current impl being throwing a VM error?!) | ||
FROGGS | no, just doing an if(off<0) and not while(... | 13:01 | |
not_gerd | FROGGS: but that *does* result in the vm error because off will still be negative | ||
(which then gets passed down to Java's substring) | 13:02 | ||
nwc10 | not sure if I'm asking the wrong silly question here, but if the negative index is allowed to wrap multiple times, why isn't the positive index allowed to wrap at all? | ||
FROGGS | because substr("abc", *-17) is clearly a thinko, and shouldn't be hidden | ||
not_gerd: sure, we need to raise a X:: | |||
not_gerd | FROGGS: and substr("abc", 42) isn't? | ||
moritz | nr: say substr('abc', 42) | ||
camelia | rakudo 38a0f9: OUTPUT«Start of substr out of range. Is: 42, should be in 0..3 in method gist at src/gen/CORE.setting:11494 in method gist at src/gen/CORE.setting:990 in sub say at src/gen/CORE.setting:12390 in block at /tmp/_yUdcJIo4_:1» | 13:03 | |
..niecza v24-88-g1f87209: OUTPUT«(Str)» | |||
FROGGS | sanity++ | ||
moritz | nwc10: we never wrap implicitly in the Perl 6-level substr | ||
not_gerd | r: nqp::substr("abc", 42) | ||
camelia | rakudo 38a0f9: OUTPUT«Cannot take substr outside string in block at /tmp/XsZs31YsMj:1» | ||
not_gerd | nqp: nqp::say(nqp::substr('abc', 42)) | ||
camelia | nqp: OUTPUT«Cannot take substr outside stringcurrent instr.: '' pc 40 ((file unknown):39) (/tmp/5PTBCxr0sk:5)» | ||
moritz | nwc10: we wrap explicitly if the argument is a callable (e.g. *-42) | ||
FROGGS | nqp-jvm: nqp::substr("abc", 42) | ||
camelia | nqp-jvm: ( no output ) | 13:04 | |
nwc10 | moritz: ah OK. I should probably be clear - I don't think that a "while" loop to wrap negative indexes is sensible | ||
moritz | r: substr('abc', *-42) | ||
FROGGS | nqp-jvm: say(nqp::substr("abc", 42)) | ||
camelia | rakudo 38a0f9: OUTPUT«Start argument to substr out of range. Is: , should be in 0..Inf; use *-39 if you want to index relative to the endcurrent instr.: 'throw' pc 380147 (src/gen/CORE.setting.pir:161329) (src/gen/CORE.setting:10132)called from Sub 'sink' pc 415708 (src/gen/CORE.setti… | ||
nqp-jvm: OUTPUT«» | |||
FROGGS | LTA | ||
nwc10 | and I'm not even sure whether NQP should be stricter, and not take negative indexes | ||
moritz | nwc10: then we are in violent agreement | ||
13:05
SamuraiJack_ left
|
|||
not_gerd | keep in mind we're talking about nqp:: here - P6 of course should do what's right[tm] | 13:05 | |
moritz could argue both for dying outright, and for wrapping negative numbers once | |||
not_gerd | I'd just like to have some consistency - either throw errors at both ends, or return empty strings | ||
I agree that wrapping around is probably not a good idea | 13:06 | ||
nqp-jvm: nqp::say(nqp::substr('abc', 1, 42)) | |||
camelia | nqp-jvm: OUTPUT«bc» | ||
moritz | not_gerd: it's probably a good idea not to bomb more than nqp-parrot does right now, because the regex engine (might) rely on how it's done | 13:07 | |
not_gerd | nqp: nqp::say(nqp::substr('abc', 1, 42)) | ||
camelia | nqp: OUTPUT«bc» | ||
moritz | nqp: nqp::say(nqp::substr('abc', 42)) | 13:10 | |
camelia | nqp: OUTPUT«Cannot take substr outside stringcurrent instr.: '' pc 40 ((file unknown):39) (/tmp/WONygss6Oe:8)» | ||
moritz | nqp: nqp::say(nqp::substr('abc', -1)) | ||
camelia | nqp: OUTPUT«c» | ||
moritz | nqp: nqp::say(nqp::substr('abc', -2, -1)) | ||
camelia | nqp: OUTPUT«» | ||
moritz | nqp: nqp::say(nqp::substr('abc', -2, 1)) | ||
camelia | nqp: OUTPUT«b» | ||
moritz | nqp: nqp::say(nqp::substr('abc', 0, -1)) | ||
camelia | nqp: OUTPUT«» | ||
not_gerd | note that Parrot and JVM don't agree in all of these cases | ||
13:10
colomon joined,
salv0 left
|
|||
not_gerd | (and MoarVM potentially just returns garbage ;)) | 13:10 | |
timotimo | maybe an evalbot for "the nqps" would be nice to have | ||
since it automatically points out differences | 13:11 | ||
moritz | returning garbage isn't a good idea | ||
not_gerd | that's what I'm currently fixing | ||
the question is, what should I aim for? | |||
timotimo | moritz: getting at the allocation data of a string with sufficiently negative substr offsets, what's not to like? | ||
not_gerd | proposal: translate offset + length to start-index + end-index | 13:12 | |
if either is out of range, adjust to fit string size | |||
JimmyZ_ | throw exception :) | ||
moritz | nqp-jvm: say(nqp::substr('abc', 0, 42)) | 13:13 | |
camelia | nqp-jvm: OUTPUT«abc» | ||
not_gerd | I'd only like to thro if boch indices are out of range | ||
ie if the window doesn't cover a substring at all | |||
dalek | p/shell3: 3adbc0a | (Pawel Murias)++ | src/vm/parrot/ops/nqp.ops: Make nqp::shell respect the 3 argument on linux. |
13:14 | |
pmurias | FROGGS: could you check if the above commit compiles on windows? | ||
FROGGS | pmurias: will do | 13:16 | |
13:17
PacoAir joined
|
|||
colomon | pmichaud: nok exists and is used 587 times already in roast. dunno about isnt, though | 13:17 | |
errr, isnt is there too. | |||
much more rarely used, though. | |||
13:18
fhelmberger_ left
|
|||
colomon will one day learn to actually check on things that can be checked with 9 characters in the shell before spending 24 characters telling the world he hasn't bothered to check on them yet. | 13:20 | ||
FROGGS | *g* | 13:21 | |
pmurias: is there a test I can run afterwards? | 13:24 | ||
13:25
btyler joined
|
|||
pmurias | FROGGS: currently things work the same under windows, I just want to check things build correctly after moving code | 13:26 | |
[Coke] returns from “vacation” | 13:27 | ||
yoleaux | 08:08Z <nwc10> [Coke]: that FRA is about 15 minutes from central Frankfurt by train, and HNH is 124km away by road. | ||
FROGGS | pmurias: k, nqp still compiles | ||
pmurias: do you want me do build rakudo too? | |||
pmurias | not yet | ||
FROGGS | k | ||
pmurias | test 78 passes? | ||
13:28
markov joined,
kaare_ joined
|
|||
FROGGS | pmurias: yes, nqp builds and 78 passes | 13:29 | |
dalek | p/shell3: 6cbe2ef | (Pawel Murias)++ | src/vm/parrot/ops/nqp.ops: Pass the env variables on windows. |
13:30 | |
pmurias | FROGGS: what's the output of pastie.org/8270977? | 13:32 | |
nwc10 | [Coke]: sorry, I typo'd Hahn's airport code. I hope that that information is useful and not too late. | ||
[Coke]: it's probably actaully easier to get to central Frankfurt from Cologne/Bonn airport than from Hahn. But I have not tested this. | 13:33 | ||
FROGGS | pmurias: gist.github.com/FROGGS/393b2db32957ba103f97 | 13:34 | |
nwc10 | (I think that the only time I've actually travelled between Frankfurt-ish and Cologne was by boat down the Rhine. | ||
www.kdrhine.com/rhineschedule.htm ) | 13:35 | ||
13:36
notjack joined
|
|||
pmurias | FROGGS: that's after my last commit? | 13:36 | |
FROGGS | pmurias: yes, revision is 2013.08-22-g3adbc0a | 13:37 | |
13:37
fhelmberger joined
|
|||
pmurias | where did you get the revision from? | 13:38 | |
13:39
xinming left
|
|||
FROGGS | pmurias: git describe and nqp --version | 13:39 | |
13:40
xinming joined
|
|||
pmurias | commit 6cbe2ef83b7257ce958c1f4cc93c204ea6bc0955, and the results were after running make? | 13:40 | |
FROGGS | brb | 13:41 | |
[Coke] | nwc10: if FRA is a good option, that's fine. | 13:42 | |
nwc10 | it's Lufthansa's main hub - it's probably one of the easiest airports in Europe to get to (for a real airline) | 13:44 | |
13:45
xinming left,
xinming joined,
virtualsue joined
|
|||
pmurias | rakudo: say $^OS; | 13:47 | |
camelia | rakudo 38a0f9: OUTPUT«===SORRY!=== Error while compiling /tmp/l9rGMlmXFACannot use placeholder parameter $^OS in the mainlineat /tmp/l9rGMlmXFA:1------> say $^OS⏏;» | ||
pmurias | rakudo: say $*OS; | ||
camelia | rakudo 38a0f9: OUTPUT«linux» | ||
nwc10 | oh boy. I would not want to be the owner of a business 94% dependent on RyanAir | 13:48 | |
www.hahn-airport.de/Default.aspx?me...&cc=en | |||
moritz | :-) | 13:55 | |
13:55
markov left
13:56
rindolf joined
13:59
berekuk left
|
|||
FROGGS pulls and rebuilds | 14:00 | ||
14:03
berekuk joined
|
|||
FROGGS | pmurias: gist.github.com/FROGGS/393b2db32957ba103f97 | 14:07 | |
gist.github.com/FROGGS/393b2db3295.../revisions | |||
pmurias | ah, I'm passing the env variable incorrectly on windows | 14:14 | |
14:17
daxim left,
daxim_ joined
14:18
donaldh joined
|
|||
dalek | rlito: ae790ba | (Flavio S. Glock)++ | / (2 files): Perlito5 - perl5 - tweak the perl5 pretty-printer |
14:27 | |
14:28
kaleem left
|
|||
masak | oh hai from an aeroplane! \o/ | 14:32 | |
not_gerd | github.com/MoarVM/MoarVM/blob/HEAD...ops.c#L342 | 14:34 | |
FROGGS | masak: \o/ | ||
not_gerd | ^ if someone want to see how nqp::substr() on MoarVM anded up behaving | ||
*ended | |||
14:35
benabik joined
|
|||
not_gerd | at least 3 of the NQPs now disagree what nqp::substr() should do ;) | 14:38 | |
FROGGS | end_pos = length == -1 ? agraphs : start_pos + length; | ||
do I read that right that in case I want to read from end it always reads to the end? | 14:39 | ||
r: say nqp::substr("abcdef", -4, 2) | |||
camelia | rakudo 38a0f9: OUTPUT«cd» | ||
14:40
Psyche^ joined
|
|||
not_gerd | FROGGS: length is the 3rd argument | 14:42 | |
if you eant to read from the end, the 2nd needs to be negative | |||
*want | |||
FROGGS | r: say nqp::substr("abcdef", -4, 2) # <--- second is negative | ||
camelia | rakudo 38a0f9: OUTPUT«cd» | ||
not_gerd | but length is 2, which is != -1 | 14:43 | |
FROGGS | right | ||
not_gerd | so I'm not seeing what you're getting at | ||
14:43
Psyche^_ left
|
|||
FROGGS | ahh, hold on | 14:43 | |
length = -1 does mean Inf | 14:44 | ||
14:44
ajr joined,
Guest76882 left,
ajr is now known as ajr_
|
|||
not_gerd | FROGGS: right | 14:45 | |
FROGGS | end_pos = length == -1 ? agraphs : start_pos + length; # another thing: if length==Inf, you read up to strlen, but other wise you read up to offset+strlen | ||
I'd guess it should read up to strlen-offset | |||
not_gerd | length != strlen | 14:46 | |
agraphs == strlen | |||
14:46
lizmat joined,
berekuk left
|
|||
FROGGS | length is number of graphemes to read... nvm then :o) | 14:46 | |
I'm a bit dumb today | 14:47 | ||
dalek | rlito: eb84bd7 | (Flavio S. Glock)++ | / (2 files): Perlito5 - perl5 - tweak the perl5 pretty-printer - fix eval-block |
||
not_gerd | basically, the substring is bounded by offset and offset+length | ||
14:47
pecastro left
|
|||
not_gerd | we grab any parts of the string at lies in that interval | 14:48 | |
then come the small compications that offset can count from the and and length == -1 signifies Inf | |||
14:48
berekuk joined
|
|||
not_gerd | we only throw an error if the upper bound is < 0 or the lower bound > strlen | 14:49 | |
neither Parrot nor JVM do it that way ;) | |||
nwc10 | JVM presumably copies Parrot. | 14:55 | |
not_gerd | nwc10: it doesn't | ||
nwc10 | oh? | ||
not_gerd | nqp-jvm: nqp::say(nqp::substr('abc', 5)) | 14:56 | |
camelia | nqp-jvm: OUTPUT«» | ||
not_gerd | nqp: nqp::say(nqp::substr('abc', 5)) | ||
camelia | nqp: OUTPUT«Cannot take substr outside stringcurrent instr.: '' pc 40 ((file unknown):39) (/tmp/NKEQ3mtRQ4:7)» | ||
not_gerd | nqp: nqp::say(nqp::substr('abc', -1)) | 14:57 | |
camelia | nqp: OUTPUT«c» | ||
not_gerd | nqp-jvm: nqp::say(nqp::substr('abc', -1)) | ||
camelia | nqp-jvm: OUTPUT«java.lang.StringIndexOutOfBoundsException: String index out of range: -1 at java.lang.String.substring(String.java:1871) at org.perl6.nqp.runtime.Ops.substr2(Ops.java:2087) at 849716E0592128BADBA0F494078445F51EDED46B.qb_10(<generated>) at | ||
..org.perl6.nqp.runtime.Ops.in… | |||
not_gerd | totally unbiased that I am, I like MoarVM's behaviour best ;) | 14:59 | |
FROGGS | *g* | ||
not_gerd | oops | 15:01 | |
I pushed more than I wanted to push :( | 15:02 | ||
there's some boying missing | |||
15:04
bluescreen10 joined
|
|||
not_gerd | *boxing | 15:09 | |
15:11
fhelmberger left
15:13
btyler left
15:25
pecastro joined
15:26
celesta joined
|
|||
celesta | ahoi #perl6 | 15:27 | |
moritz | \o celesta | ||
[Coke] | .seen tene | 15:28 | |
yoleaux | I saw Tene 21 Aug 2013 19:55Z in #perl6: <Tene> pmichaud: My condolences for your loss. | ||
lizmat | .tell [Coke] FRA and yes | ||
yoleaux | 25 Aug 2013 21:54Z <[Coke]> lizmat: Which airport to fly to, FRA or HHN?, and also, any rooms left at the hotel? | ||
lizmat: I'll pass your message to [Coke]. | |||
lizmat | .tell [Coke] no need to worry about accommodation | 15:29 | |
yoleaux | lizmat: I'll pass your message to [Coke]. | ||
lizmat | also: only 2 places left for the Rakudo and NQP Internals Workshop, 14/15 Sep in Frankfurt, Germany | ||
15:30
btyler joined
|
|||
lizmat | If you want to get into supporting Perl 6 / Rakudo development with a flying start | 15:30 | |
this is the place to be! | |||
[Coke] | lizmat - when are accomodations available? (e.g. when should I book flights around?) | ||
yoleaux | 15:28Z <lizmat> [Coke]: FRA and yes | ||
15:29Z <lizmat> [Coke]: no need to worry about accommodation | |||
lizmat | </and of promotional message> | ||
[Coke] | hugme: hug lizmat | ||
hugme hugs lizmat | |||
lizmat | accommodation has been booked with checkin on Fri and checkout on Mon | 15:31 | |
[Coke] | Roger that. | ||
15:32
daxim_ left
|
|||
lizmat | if you're arriving earlier / leaving later, let me know | 15:32 | |
colomon | lizmat++ | ||
timotimo | lizmat: do you know if i can park my car for free at that hotel you booked lots of spots in? or perhaps there's a free spot on the venue's parking lot or something? | 15:34 | |
[Coke] | I'm pretty sure those dates work well with minimum-price booking of flight. | ||
timotimo is pretty new to traveling by car | |||
[Coke] is squee-excited. | 15:35 | ||
lizmat | the hotel policies of the reservation states: Guest parking: | ||
Free public parking is possible at a location nearby (reservation is not possible). | |||
TimToady | FROGGS: unsp already allows \s*, the issue is whether to allow another \ in the middle of those spaces | 15:36 | |
yoleaux | 07:46Z <FROGGS> TimToady: What if <unsp> unspaces more than one char? It could unspace \s+, wouldn't that be better? | ||
FROGGS | hmmmm | ||
dalek | kudo/nom: 283f763 | (Elizabeth Mattijsen)++ | src/core/ (2 files): Make @a.VAR.name and %h.VAR.name work |
||
TimToady | std: 42\ i | ||
camelia | std 06636e4: OUTPUT«ok 00:00 41m» | ||
FROGGS | TimToady: then it is really just about a blank line | 15:37 | |
TimToady | std: 42\ \ i | ||
camelia | std 06636e4: OUTPUT«===SORRY!===Postfix found where infix expected (change whitespace?) at /tmp/MTXcim2yp8 line 1:------> 42\ \ ⏏i expecting any of: horizontal whitespace infix or meta-infix infixed function postcircumfix postfix | ||
.. postfix_… | |||
TimToady | unless we decide 42\ \i should work too | ||
15:37
pecastro_ joined
|
|||
TimToady | but I'm not convinced about that part | 15:38 | |
FROGGS | 42\ | ||
\ | |||
\ i | |||
TimToady | the blank line part seems harmless-ish | ||
that would also work, though lacks a kind of visual symmetry... | |||
PerlJam | almost looks like a C++-ism comment block | 15:39 | |
s/ism/ish/ | |||
15:40
pecastro left
|
|||
timotimo | how am i supposed to properly turn infix:<~> into a list-associative if i have to take care of str, Str and Buf? :| | 15:44 | |
15:45
colomon left,
Kiralexis left
15:46
FROGGS[mobile] joined
15:47
FROGGS left
|
|||
TimToady | and Uni, and NFD, and NFC... | 15:47 | |
timotimo | indeed. | 15:48 | |
timotimo is a tiny bit more fond of replacing strings of infix:<~> with a join with "" during optimization :| | 15:49 | ||
15:56
colomon joined
15:58
JimmyZ_ left
15:59
zakharyas joined
|
|||
pmurias | can the sh be located somewhere else then /bin/sh on a unixy system? | 16:00 | |
that is can I change execl(...) to execlp(...)? | 16:01 | ||
lizmat | r: my &a; say &a; my Int &b; say &b # somehow expected Any,Int | 16:02 | |
camelia | rakudo 38a0f9: OUTPUT«(Any)(Any)» | ||
dalek | ast: a6a46c3 | (Elizabeth Mattijsen)++ | S02-names/name.t: Tests for .VAR.name |
16:04 | |
kudo/nom: efc4efd | (Elizabeth Mattijsen)++ | t/spectest.data: Make sure .VAR.name tests are run |
16:05 | ||
japhb | Is --profile supposed to work in rakudo-jvm? (I ask because when I tried it last night, I got a 50 byte file and a java process that sat for hours using only 1% CPU, apparently doing not much at all.) | ||
geekosaur | pretty sure POSIX mandates existence of /bin/sh although how it gets there is open (that is, it could be a symlink somewhere else) | 16:06 | |
16:07
dmol1 left,
domidumont left
16:08
btyler_ joined,
colomon left
16:10
btyler left
16:11
FROGGS joined
16:14
JimmyZ_ joined
16:15
JimmyZ_ left
16:16
pmurias left
|
|||
TimToady | timotimo: join '' still doesn't help with the string types though | 16:23 | |
and it's not like we've figured out how to enforce types on slurpies yet either... | |||
and how much coercion we allow between related string types is also underspecced | 16:25 | ||
16:27
fhelmberger joined
|
|||
TimToady | upgrading any well-typed encoding or normal form to NFG is presumably always safe, but maybe not always what the user wants | 16:29 | |
timotimo | that's true :| | ||
lizmat | but NFG would only be internal, no ? | 16:30 | |
TimToady | yes | ||
lizmat | so opaque to the user, I would think ? | ||
TimToady | presumably an IO handle has the ability to specify the downcasting | ||
lizmat | indeed, pretty much like P5 IO layers, I would think, but then properly implemented | 16:31 | |
TimToady | how much we can propagate that knowledge through type inference to avoid unnecessary casting is an open question | ||
we can have explicit downcasts as functions, then we only have to know the immediate context of a join to know the intended type | 16:32 | ||
we could have a pragma saying that we think we're working in, say, NFD, and then ~ might coerce to that | |||
16:32
domidumont joined
|
|||
lizmat | why not always do everything internally in NFG ? | 16:32 | |
and decode on the way out ? | |||
TimToady | we could have a named arg to infix:<~> etc. that specifies desired result type, if not NFG | ||
well, that's the default, but some code will want to work intentionally in lower abstraction levels | 16:33 | ||
another approach is to coerce everthing to the type of the first argument | |||
jnthn | We did that with integer arithmetic, and if you mixed in to the type of the first arg stuff got fun :P | 16:34 | |
Then we fixed it to always make an Int :) | |||
16:34
fhelmberger left
|
|||
TimToady | nodnod | 16:34 | |
jnthn | Where we was probably moritz++ :) | ||
TimToady | so I'm guessing an explicit function to downcast is okay, and if some type information can someday flow backwards into the optimizer, that's good enough for now | 16:35 | |
yes, much as we put all our numeric intermediate results into the more abstract type | 16:36 | ||
timotimo | how about getting that into nqp, though? having nqp's infix:<~> be a list-assoc? (or, you know, i could just port the tilde-to-strjoin transformation from the rakudo optimizer to the nqp optimizer) | ||
TimToady | NFG is our Int, while Uni/NFD/NFC/utf8 etc are more like native types | ||
timotimo | nqp only deals with str and things that would be str-ified | ||
afaict | |||
jnthn | gonna go for nomz | 16:37 | |
bbl | |||
16:37
lowpro30 joined
|
|||
jnthn | & | 16:37 | |
timotimo | gonna go for groceries :) | ||
diakopter | NF* is lossy | 16:39 | |
b/c it reorders things | |||
so you can't use it when you need to output exactly what was inputted bit for bit | |||
16:41
rindolf left,
rindolf joined
|
|||
lizmat | diakopter: why would NFG be lossy ? | 16:43 | |
or are you referring to *valid* unicode combinations not coming back uncombined ? | |||
16:44
Pleiades` left
|
|||
diakopter | b/c it's the same as NFC | 16:44 | |
they reorder combining codepoints | |||
I'm just pointing out that traditional Perl way of using "strings" for binary data doesn't work if those strings are nfg | 16:45 | ||
lizmat | well, maybe NFG should also create virtual codepoints for *any* combining codepoint | ||
so that it can restore it on output ? | |||
benabik | O.o | ||
I thought the point of NFG was that the many ways of expressing a character resulted in one codepoint. | 16:46 | ||
TimToady | round tripping is explicitly not a goal of NFG | ||
diakopter | yeah | ||
TimToady | if you want round tripping, you must work in a lower abstraction level | ||
diakopter | so anyone coming from p5 must learn not to use strings for binary data | 16:47 | |
lizmat | hmmm… not roundtripping feels a bit like a WAT to me | ||
16:47
ajr_ left
|
|||
timotimo | round trippin' with my two favorite languages / fully loaded we got codes and graphemes | 16:47 | |
lizmat | diakopter: that is clear | ||
16:47
FROGGS[mobile] left
|
|||
diakopter | lizmat: but that's implied by the N[ormalized] - multiple inputs produce one output | 16:48 | |
lizmat | I'm more worried about cases where a text file gets processed, without actually doing anything, but writing out something else | ||
diakopter | right. can't use strings | ||
16:48
Pleiades` joined
|
|||
lizmat | because of normalization | 16:48 | |
otoh, that will only happen once, any subsequent processing of the same file would not change anything | 16:49 | ||
benabik | Does it matter if the bits change if the data doesn't? I'd say that the 90% answer is no. | 16:50 | |
diakopter | by the same program.. | ||
other programs may re-corrupt it | |||
lizmat | diakopter: yes, that was the assumption | ||
benabik | And Bufs are there for the other 10%. | ||
diakopter | benabik: but binary data will have "codepoints" outside unicode | 16:51 | |
[if you try to decode it as such] | |||
lizmat is reminded of a system in which *each* codepoint would be remapped to a BER encoded integer | |||
benabik | diakopter: Treating binary data as Unicode is a mistake? | ||
diakopter | so if you want binary data strings, you have to set your filehandle to decode as if it's ascii or whatever | 16:52 | |
16:52
dmol joined
|
|||
benabik | If you want binary data strings, tell the FH to treat it as binary, no? | 16:52 | |
diakopter | that's at the os layer; at the perl layer it wants to decode to something | ||
if you want a Str | |||
lizmat | in practice, that meant bytes for most text files, as they would have fewer than 256 different codepoints in them | ||
diakopter | lizmat: but that's exactly what nfg does.. :P | 16:53 | |
lizmat | hmmm.. BER would mean 127, but yes, you get the idea | ||
I thought it only did that for codepoints that could not combine ? | |||
benabik | Why do you want a Str for binary data? | ||
diakopter | no, also codepoints >127 | 16:54 | |
16:54
colomon joined
|
|||
diakopter | benabik: it's just that most of the io "ops" return strings | 16:54 | |
lizmat | but why not go all the way then? | 16:55 | |
TimToady | all the way where? | ||
diakopter | map every used codepoint? | ||
lizmat | well, not treat ASCII specially, | ||
map every codepoint? | |||
benabik | S32-IO has write(Buf), but not read( --> Buf) | 16:56 | |
lizmat | every *used* codepoint, that is | ||
benabik | Although slurp can return a Buf apparently. | ||
FROGGS | benabik: well, the mmd can see if you passed a Str of Buf, but it can't see if you want a Str or Buf | 16:57 | |
TimToady | lizmat: most strings will work in NFC most of the time, and then you don't have to do extra work unless there are chars that don't graphemize in NFC | ||
FROGGS | so, a read( :bin ) would be needed | ||
benabik | FROGGS: slurp returns Str|Buf depending on your desired encoding. | ||
diakopter | well you could pass a scalar ref. <hide> | ||
TimToady | we will have to be more particular in cases where we want a particular type to be read | 16:58 | |
16:58
SamuraiJack_ joined,
woolfy1 joined,
woolfy left
|
|||
benabik | Really, I would think that more of the IO::Handle funcs should return Str|Buf and return Buf when the encoding is 'binary'. | 17:00 | |
dalek | rlito: 0cbac5f | (Flavio S. Glock)++ | / (2 files): Perlito5 - perl5 - emit subroutine signature |
||
TimToady | Str vs Buf is an oversimplification | 17:01 | |
17:01
denisboyun left
|
|||
TimToady | maybe it defaults to NFG, but you can requrest NFD, NFC, or Uni (raw codepoints, unnormalized) | 17:02 | |
Buf defaults to Buf8, but there are other buf sizes, as well as blobs of utf8, utf16, etc. | |||
benabik | If you ask for binary data, you should end up with Buf/Blob not Str, no? Or are we going to have Strs with :encoding<binary> ? | 17:03 | |
TimToady | Str will mean NFG, period | ||
we can hid some of these differences from the naive user, but it's imperative that the computer not be confused about what type it's dealing with | 17:04 | ||
*hide | |||
that was the Perl 5 mistake, and we're making different mistakes this time | |||
"binary" is underspecified, so it's kind of a bad word, like "length" | 17:05 | ||
"string" is also underspecified, so it's also kind of a bad word | 17:06 | ||
benabik | Perhaps we need to have encodings like 'uint8', 'int32', etc. Perhaps with 'binary' aliased to 'uint8'. Then IO with these encodings return Buf[type] | 17:07 | |
17:08
spider-mario joined
|
|||
TimToady | well, unless they return Blob[type] | 17:08 | |
17:08
berekuk left
|
|||
benabik | Although IO with anything other than 8 bit types also has to worry about endian-ness, etc. :-/ | 17:09 | |
masak waves from Oslo | |||
lizmat waves back from Echt | |||
r: my &a; say &a; my Int &b; say &b # somehow expected Any,Int | 17:10 | ||
camelia | rakudo efc4ef: OUTPUT«(Any)(Any)» | ||
lizmat | is this a rakudobug ? | ||
17:10
berekuk joined
|
|||
benabik | What's `my Int &b` supposed to be? A function that returns Int? | 17:10 | |
lizmat | yes | ||
that's how I read it | |||
masak | lizmat: don't think it's a bug. | ||
but I'm not sure. | 17:11 | ||
benabik | Then &b shouldn't return Int, it should return a null version of a function that returns Int, no? :-D | ||
dalek | rlito: 3958e2f | (Flavio S. Glock)++ | / (2 files): Perlito5 - perl5 - emit shift left/right |
||
17:11
xinming left
|
|||
lizmat | which would be indistinguishable from Int, no? | 17:11 | |
masak | I'm not sure Any qualifies as a function that returns an Int, so maybe that's the bug. | 17:12 | |
dinner & | |||
benabik | r: say Int() | ||
camelia | rakudo efc4ef: OUTPUT«0» | ||
benabik | r: say Any() | 17:13 | |
camelia | rakudo efc4ef: OUTPUT«No such method 'Any' for invocant of type 'Parcel' in block at /tmp/_OVjj9v3NO:1» | ||
17:13
colomon left,
xinming joined
17:14
ajr joined,
ajr is now known as Guest91190
17:15
Guest91190 is now known as ajr_
17:17
Pleiades` left
17:22
woolfy joined,
woolfy1 left
17:23
Pleiades` joined
17:24
btyler_ left
17:25
virtualsue left
17:26
danaj left
|
|||
donaldh | Debugging the slurp test faiures on JVM. Looks like a JVM bug to me: gist.github.com/donaldh/6344106 | 17:29 | |
17:30
denis_boyun joined
|
|||
FROGGS | what do you mean? | 17:31 | |
timotimo | what does the limit mean? | ||
FROGGS | the chars/elems I guess | ||
29 chars but 39 bytes | |||
benabik | I don't see a bug there. The UTF-8 encoding of that string is 39 bytes. | ||
Although Vim saves it as 40 bytes. :-/ | 17:32 | ||
moritz | benabik: trailing newline? | 17:33 | |
TimToady | or inserted a CR? | ||
benabik | moritz: There's a trailing newline in the string. | ||
17:33
Faxmachinen joined
|
|||
Faxmachinen | Hi! | 17:33 | |
Anyone know of a clever way to transform a two-dimensional list? | 17:34 | ||
TimToady | o/ | ||
benabik | Oh. Yes, there is a newline after the newline. moritz++ | ||
moritz | Faxmachinen: depends on the transformation | ||
FROGGS | 39 bytes on my box (and 29 chars) | ||
Faxmachinen | Sorry, I meant transpose | 17:35 | |
moritz | rosettacode.org/wiki/Matrix_transposition#Perl_6 | 17:36 | |
donaldh | hmmm. | ||
When I look at the written file, it has nulls. | |||
Or something. | |||
TimToady | though the RC entry is more brute force than "clever" | 17:37 | |
Faxmachinen | Thanks moritz. I feel like there should be some way to go @foo.invert though | ||
Or something like that | |||
benabik | Matrix transposition is not a useful operation on most arrays. | 17:38 | |
timotimo | i love how the i in the middle of the matrix is highlighted :D | ||
FROGGS | ** | 17:39 | |
17:39
danaj joined
|
|||
FROGGS | *g* | 17:39 | |
no, should be *i* | |||
TimToady | ii, captain | ||
^bold on some printers | 17:40 | ||
donaldh | okay, barking up wrong tree. Asymmetry creeping in elsewhere. | ||
FROGGS .oO( a 2nd captain? ) | |||
geekosaur | just zaphod | ||
flussence | ha, I couldn't remember whether there was a way to round() to a specific decimal precision so I just tried the first thing that came to mind... and it worked :D | ||
TimToady | captains are supposed to be bold | ||
except for your airplane captain | |||
Faxmachinen | Hmm. Well, the zip operator kinda does it | ||
FROGGS | Picard was never bold, though Kirk was around the middle | 17:41 | |
lizmat | some captains are even bald | ||
[Coke] hurls mathwithbaddrawings.com/2013/08/13/...-decimals/ and shivers. | |||
Faxmachinen | rakudo: say [Z] ([1..3], [4..6], [7..9]) | 17:43 | |
camelia | rakudo efc4ef: OUTPUT«1 4 7 2 5 8 3 6 9» | ||
TimToady | r: say [Z]([1,2,3],[4,5,6],[7,8,9]).tree.perl | ||
camelia | rakudo efc4ef: OUTPUT«([1, 4, 7], [2, 5, 8], [3, 6, 9]).list» | ||
Faxmachinen | Then I just gotta figure out an elegant way to split a flat array into n parts of equal size | ||
timotimo | it's not flat :) | 17:44 | |
TimToady | this one should work with .tree | ||
well, the Xxx should work too, but doesn't... | |||
Faxmachinen | Or that, yes :) | ||
You're right, it's not flat | |||
Genius! | 17:45 | ||
TimToady | r: say [Z]([1,2,3],[4,5,6],[7,8,9]).lol.perl | 17:46 | |
camelia | rakudo efc4ef: OUTPUT«LoL.new(ListIter.new())» | ||
TimToady | .perl should not give up on a list like that | ||
r: say [Z]([1,2,3],[4,5,6],[7,8,9]).lol.[0] | 17:47 | ||
camelia | rakudo efc4ef: OUTPUT«ListIter.new()» | ||
TimToady | bleah | ||
r: say [Z]([1,2,3],[4,5,6],[7,8,9]).lol.[0][0] | 17:48 | ||
camelia | rakudo efc4ef: OUTPUT«ListIter.new()» | ||
TimToady | !lol | ||
[Coke] | pugs: say (1,2,3).lol | 17:49 | |
camelia | pugs: OUTPUT«*** No such method in class Array: "&lol" at /tmp/FfNKGX8ijR line 1, column 5 - line 2, column 1» | ||
TimToady | lol is post-pugs | ||
[Coke] | Anyone seen .au lately? I hate to give up on pugs, but am having issues getting it running on the new roast box. | 17:50 | |
dalek | rlito: a1b4639 | (Flavio S. Glock)++ | / (2 files): Perlito5 - perl5 - emit function deref |
17:52 | |
notjack | r: say.WHAT | 17:56 | |
camelia | rakudo efc4ef: OUTPUT«» | ||
timotimo | r: say.WHAT.say | ||
camelia | rakudo efc4ef: OUTPUT«(Bool)» | ||
notjack | r: say.WHAT? 'no':'he di-int'; | ||
camelia | rakudo efc4ef: OUTPUT«===SORRY!=== Error while compiling /tmp/SdemB7xierUnsupported use of ?: for the conditional operator; in Perl 6 please use ??!!at /tmp/SdemB7xier:1------> say.WHAT?⏏ 'no':'he di-int';» | ||
[Coke] | r: $^u.WHAT.say | 17:57 | |
camelia | rakudo efc4ef: OUTPUT«===SORRY!=== Error while compiling /tmp/Tsrslnjce1Cannot use placeholder parameter $^u in the mainlineat /tmp/Tsrslnjce1:1------> $^u⏏.WHAT.say» | ||
FROGGS | r: say.WHAT?? 'no'!!'he di-int'; | ||
camelia | rakudo efc4ef: OUTPUT«» | ||
notjack | r: say.WHAT?? 'no' !! 'he di-int'; | ||
camelia | rakudo efc4ef: OUTPUT«» | ||
TimToady | std: r: say.WHAT?? 'no' !! 'he di-int'; | ||
camelia | std 06636e4: OUTPUT«===SORRY!===Unsupported use of bare 'say'; in Perl 6 please use .say if you meant $_, or use an explicit invocant or argument at /tmp/laASFVzzuk line 1:------> r: say⏏.WHAT?? 'no' !! 'he di-int';Check failedFAILED 00:00 42m»… | ||
donaldh | <-fail. aaaaaargh. | 17:58 | |
17:59
sftp_ joined
|
|||
donaldh | There was a bug in the file writing code that I did fix. In the process of investigating, I uncommented the clean up of the test files, so that I could read them. | 17:59 | |
They contained extra garbage. After the fix, they still contained extra garbage. They don't get truncated. | |||
So the tests kept failing. | 18:00 | ||
timotimo | ooooh | ||
18:01
anocelot_ joined
|
|||
donaldh | I'm guessing that the behaviour we want from nqp file open for "w" is WRITE, CREATE, TRUNCATE_EXISTING | 18:01 | |
not just WRITE, CREATE | 18:02 | ||
18:02
BooK_ joined
|
|||
FROGGS | true, wa does not truncate of course | 18:02 | |
donaldh | wa does WRITE, CREATE, APPEND | 18:03 | |
18:03
zby_home_ joined
|
|||
FROGGS | right | 18:03 | |
18:04
dagurval_ joined,
sftp left,
anocelot left,
aindilis left,
dylanwh_ joined
18:05
dylanwh_ is now known as dylanwh,
gdey joined
18:06
japhb__ joined
|
|||
donaldh | yay, unfledged the binary slurp tests | 18:07 | |
*unfudged | |||
18:09
btyler joined
18:10
rindolf left
|
|||
timotimo | very cool! :D | 18:10 | |
donaldh++ | 18:12 | ||
18:14
lizamae joined
|
|||
lizamae | Hi | 18:15 | |
Helo | |||
18:15
lizamae left
|
|||
timotimo | that was a short visit | 18:15 | |
sjohnson | he's a busy guy. | 18:16 | |
18:19
felher joined
|
|||
dalek | kudo/nom: fe289bf | (Elizabeth Mattijsen)++ | src/core/Str.pm: Naive implementation of Str.tc and tc(Str) Waiting for RaNIW to implement nqp::tc as an exercise |
18:23 | |
tadzik | :) | 18:24 | |
18:25
not_gerd left
|
|||
grondilu | nqp: say("hello".tc) | 18:25 | |
camelia | nqp: OUTPUT«Method 'tc' not found for invocant of class 'String'current instr.: '' pc 49 ((file unknown):43) (/tmp/L1bpK3j6LW:1)» | ||
grondilu has no idea what Str.tc is | |||
PerlJam | grondilu: tc == titlecase | ||
lizmat | method "tc" on a Str | ||
grondilu | oh yeah. | 18:26 | |
I thought this was implemented already. | |||
PerlJam | me too | ||
lizmat was going through spectest to see whether any rakudo skip's could be removed, or changed into todo's | |||
and found that .tc wasn't implemented | |||
PerlJam | lizmat++ | ||
grondilu | r: say "bonJour tout le monde :)".tc | 18:27 | |
camelia | rakudo efc4ef: OUTPUT«No such method 'tc' for invocant of type 'Str' in block at /tmp/aHrwx5t_IE:1» | ||
lizmat | you will have to wait for a bit before camelia has caught up | ||
grondilu | would it turn "heLLo" into "Hello" or "HeLLo"? | ||
lizmat | HeLLo | 18:28 | |
you want tclc for Hello | |||
grondilu | ok | ||
18:31
ssutch left,
abnorman joined
18:32
cognominal left,
ssutch joined
|
|||
lizmat | r: my $?OS = BEGIN $*OS # wouldn't this be the way to implement $?OS in settings ? | 18:37 | |
camelia | rakudo efc4ef: ( no output ) | ||
diakopter | r: (role WAT { }).WAT.say | 18:38 | |
camelia | rakudo efc4ef: OUTPUT«No such method 'WAT' for invocant of type 'WAT' in block at /tmp/xnr3XMapqk:1» | ||
lizmat | hmmm… seems $*OS is unspecced ? | 18:43 | |
tadzik | I think so | 18:44 | |
lizmat | r: say $*OS # should this be $*DISTRO ? | ||
camelia | rakudo efc4ef: OUTPUT«linux» | ||
lizmat | r: say $*OSVER | 18:45 | |
camelia | rakudo efc4ef: OUTPUT«2.6.32-5-amd64» | ||
lizmat | also not specced | 18:46 | |
TimToady: is this an implementation problem, or a spec problem? | |||
18:46
spider-mario left
18:47
spider-mario joined
|
|||
diakopter | camelia needs auto-complete | 18:49 | |
*giggle* | 18:50 | ||
lizmat | is there a way to freeze a compile time value into serialized code ? | ||
diakopter | if you put it into a begin block and compile it to a .pbc then it's there | 18:51 | |
18:52
bluescreen10 left
|
|||
lizmat | but wouldn't that compile the *code* to get at the value ? | 18:53 | |
in other words: would "my $?OS = BEGIN $*OS" serialize the value of $*OS, or the opcode to get the value of $*OS ? | |||
you're saying the former ? | 18:54 | ||
diakopter | no, it compiles the resulting value; it runs the begin block at compile time | ||
lizmat | ok, cool, so it *would* be the way to implement *?OS | ||
diakopter | then during its "fake compile time" (loading the module) it loads it | ||
lizmat | *and* it would be a reason for an "is readonly" variable attribute after all as well | 18:55 | |
no, of course not | |||
my $?OS ::= BEGIN $*OS | |||
if I remember the spec right :-) | 18:56 | ||
diakopter | I thought readonly was implemented with a scalar with an overridden no-op STORE | ||
18:56
colomon joined
|
|||
diakopter | or exception-throwing STORE | 18:56 | |
TimToady | you probably want: constant $?foo = stuff | 18:59 | |
lizmat | indeed | ||
TimToady | since $?foo is supposed to be compile-time constants, generally | 19:00 | |
lizmat | just finding the tests for that :-) | ||
TimToady | and ::= is only readonly, and can change meaning on the next invocation | ||
lizmat | ok, clear | ||
TimToady: wrt $*OS and $*OSVER, are the not specced | 19:01 | ||
or are they prematurely implemented ? | |||
diakopter | r: constant $a ::= END { 4 }; say $a; END { say $a }; | ||
camelia | rakudo efc4ef: OUTPUT«NilNil» | ||
TimToady | premature | ||
lizmat | does it make sense to keep tests for $*OS and $*OSVER around ? | 19:03 | |
TimToady | $*KERNEL.name == 'Linux'; $*KERNEL.version = '3.8.0-29-generic'; $*DISTRO.name = 'Ubuntu'; $*VM.name = 'JVM', etc | ||
nobody's really implemented the spec yet | 19:04 | ||
lizmat | the mythical Application object, I gather from the spec | ||
TimToady | Application? | ||
"OS" is another one of those underspecified concepts | 19:05 | ||
conducive to sloppy thinking | 19:06 | ||
19:06
sjn joined
|
|||
TimToady | probably just about as bad as "length" | 19:06 | |
19:07
dagurval_ is now known as dagurval
|
|||
lizmat | S28:86 | 19:07 | |
synopsebot | Link: perlcabal.org/syn/S28.html#line_86 | ||
lizmat | wrt Application | ||
Variable Spec Type Description | 19:08 | ||
19:08
cognominal joined
|
|||
lizmat | $?DISTRO S02 Application # Which OS distribution am I compiling under | 19:08 | |
19:09
skyheights joined
|
|||
TimToady | I don't remember naming them that, and certainly the name is negotiable | 19:09 | |
lizmat | seems masak was responsible for that lnie | 19:10 | |
line | |||
FROGGS | a masakbug! finally! | 19:11 | |
19:12
spider-mario left
19:13
spider-mario joined
|
|||
Faxmachinen | Is there any way to X+ lazily? | 19:15 | |
FROGGS | Faxmachinen: use binding | ||
TimToady | those are all, on one level or other, the "Operating System", so maybe OS or System is the type | ||
FROGGS | r: my @result := ^Inf x+ ^Inf; say "alive" | 19:16 | |
TimToady | X is supposed to be lazy in its slower dimension | ||
19:16
skids joined
|
|||
camelia | rakudo fe289b: OUTPUT«Type check failed in binding; expected 'Positional' but got 'Str' in block at /tmp/NNtIWJbR3_:1» | 19:16 | |
FROGGS | r: my @result := ^Inf X+ ^Inf; say "alive" | ||
camelia | rakudo fe289b: OUTPUT«alive» | ||
19:16
skyheights left
|
|||
FROGGS | r: my @result := ^Inf X+ ^Inf; say "alive"; say @result[0] | 19:16 | |
camelia | rakudo fe289b: OUTPUT«alive0» | ||
FROGGS | r: my @result := ^Inf X+ ^Inf; say "alive"; say @result[42] | ||
camelia | rakudo fe289b: OUTPUT«alive42» | ||
19:16
skyheights joined
19:17
SamuraiJack_ left
|
|||
FROGGS | hmmm | 19:17 | |
TimToady | S03:4754 | ||
synopsebot | Link: perlcabal.org/syn/S03.html#line_4754 | ||
Faxmachinen | I tried "my @foo := ^Inf X+ ^3", but it hangs | ||
19:18
Rotwang1 joined
|
|||
FROGGS | r: my @foo := ^Inf X+ ^3 | 19:18 | |
camelia | rakudo fe289b: OUTPUT«(timeout)» | ||
FROGGS | maybe because one side is finite | ||
:/ | |||
Faxmachinen | That can be fixed | 19:19 | |
r: my @foo := ^Inf X+ (^3 xx *) | |||
camelia | rakudo fe289b: OUTPUT«(timeout)» | ||
Faxmachinen | Hmm | ||
TimToady | r: (my @foo) := ^Inf X+ ^3; say @foo[5] | 19:21 | |
camelia | rakudo fe289b: OUTPUT«===SORRY!=== Error while compiling /tmp/XuOJMBRu0NCannot use bind operator with this left-hand sideat /tmp/XuOJMBRu0N:1------> (my @foo) := ^Inf X+ ^3⏏; say @foo[5] expecting any of: postfix» | ||
Faxmachinen | Now that I think about it, that wouldn't make any sense anyway | ||
TimToady | r: constant x = ^Inf X+ ^3; say x[5] | 19:22 | |
19:22
domidumont left
|
|||
camelia | rakudo fe289b: OUTPUT«3» | 19:22 | |
diakopter | TimToady: now you done it :) | ||
Faxmachinen | Hehe | ||
TimToady | n: my @foo := ^Inf X+ ^3; say @foo[5] | 19:23 | |
camelia | niecza v24-88-g1f87209: OUTPUT«3» | ||
TimToady | rakudobug on the := being eager | ||
diakopter | r: my @foo := BEGIN { ^Inf X+ ^3 }; say @foo[5] | 19:24 | |
camelia | rakudo fe289b: OUTPUT«3» | ||
diakopter | r: say 'alive'; my @foo := BEGIN { ^Inf X+ ^5000000 }; say @foo[5] | ||
camelia | rakudo fe289b: OUTPUT«(timeout)alive» | ||
diakopter | wat. | 19:25 | |
19:25
jnap left
|
|||
diakopter | how in the world did it print alive | 19:25 | |
skids wonders if there is a writeup on buf/blob changes somewhere. The spec seems not to be updated yet. | |||
TimToady | by not reifying ^5000000 yet | 19:26 | |
benabik | It reifies at the binding? | ||
TimToady | shouldn't | ||
r: say 'alive'; my @foo := BEGIN { ^Inf X+ ^5000000 }; | 19:27 | ||
camelia | rakudo fe289b: OUTPUT«(timeout)alive» | ||
TimToady | r: say 'alive'; my @foo := BEGIN { ^Inf X+ ^5 }; | ||
diakopter | r: say 'alive'; my @foo; BEGIN { @foo := ^Inf X+ ^5000000 }; say @foo[5] | ||
camelia | rakudo fe289b: OUTPUT«(timeout)alive» | ||
rakudo fe289b: OUTPUT«alive(Any)» | |||
diakopter | O_O | ||
19:28
jnap joined
|
|||
TimToady | r: my @foo := ^50000000; | 19:28 | |
camelia | rakudo fe289b: ( no output ) | ||
grondilu | I don't know what you did guys but today compilation of rakudo takes its sweet time | ||
19:29
panchiniak joined
|
|||
FROGGS | grondilu: what do you mean? | 19:29 | |
TimToady | we sneakily started some other processes on your machine | ||
diakopter | we slowed the rotation of the earth | ||
also, its revolution. | |||
grondilu | FROGGS: I don't know, but I have had a compilation running for more than twenty minutes now. | ||
FROGGS | diakopter: that would be cool actually | ||
grondilu: ohh | 19:30 | ||
timotimo++ merged a optimization in :/ | |||
grondilu | (and I had a segfault just before that. Don't know why) | ||
diakopter | grondilu: it's your segment's fault | 19:32 | |
blame the segment | |||
FROGGS | *g* | ||
TimToady blames the mentation of the seg | 19:33 | ||
grondilu | not related: can a multi method dispatch depend on the invocant? If so, what's the syntax? | 19:34 | |
std: class { multi method foo($me: where $me ~~ /bar/) {...} } | 19:35 | ||
camelia | std 06636e4: OUTPUT«ok 00:00 47m» | ||
grondilu | r: class Foo is Str { multi method foo($me: where $me ~~ /bar/) {...} }; my Foo $b = "bar"; $b.foo; | ||
camelia | rakudo fe289b: OUTPUT«===SORRY!=== Error while compiling /tmp/KUvBCQXrczCannot do non-typename cases of type_constraint yetat /tmp/KUvBCQXrcz:1------> multi method foo($me: where $me ~~ /bar/⏏) {...} }; my Foo $b = "bar"; $b.foo; expecting any… | ||
FROGGS | r: multi sub foo($me where $me ~~ /bar/) {...}; foo("foo") | 19:36 | |
camelia | rakudo fe289b: OUTPUT«Cannot call 'foo'; none of these signatures match::($me) in sub foo at /tmp/Hk7urMvPp5:1 in block at /tmp/Hk7urMvPp5:1» | ||
FROGGS | r: multi sub foo($me where $me ~~ /bar/) {...}; foo("bar") | ||
camelia | rakudo fe289b: OUTPUT«Stub code executedcurrent instr.: 'throw' pc 380675 (src/gen/CORE.setting.pir:161576) (src/gen/CORE.setting:10149)called from Sub 'sink' pc 416236 (src/gen/CORE.setting.pir:174661) (src/gen/CORE.setting:11519)called from Sub 'MAIN' pc 401 (src/gen/perl6.pir:148)… | ||
lizmat | TimToady: I just realized that :exists on [] is not implemented | ||
from the spec it is not entirely clear it should, but fwiw: :delete *is* | 19:37 | ||
FROGGS | r: class Foo is Str { multi method foo(\SELF: $me where SELF ~~ /bar/) {...} }; my Foo $b = "bar"; $b.foo; | ||
camelia | rakudo fe289b: OUTPUT«Type check failed in assignment to '$b'; expected 'Foo' but got 'Str' in block at /tmp/ekpnwYMkKy:1» | ||
lizmat | *isn't either | ||
19:38
kivutar joined
|
|||
FROGGS | r: class Foo is Str { multi method foo($me where ~self ~~ /bar/) {...} }; my Foo $b = "bar"; <--- that is your problem, not the mmd | 19:40 | |
camelia | rakudo fe289b: OUTPUT«===SORRY!=== Error while compiling /tmp/6w9yTbp8msUnable to parse expression in quote words; couldn't find final '>'at /tmp/6w9yTbp8ms:1------> ; <--- that is your problem, not the mmd⏏<EOL> expecting any of: post… | ||
timotimo | FROGGS: why the :/ ? | ||
oh, you think maybe i broke the build? | 19:41 | ||
FROGGS | timotimo: because grondilu mentioned that his rakudo build took ages | ||
I've not tested it btw | |||
timotimo | that's weird. it got a bit faster for me for parrot and the same speed for jvm | ||
lizmat | grondilu: when testing timotimo's changes, I had to get rid of my install dir | 19:42 | |
before it worked | |||
timotimo | oh yes, you need to re-run configure*.pl in your nqp | 19:43 | |
19:44
kivutar left
19:46
zakharyas left
|
|||
diakopter | nqp: my $a := nqp::ctxlexpad(nqp::ctxouter(nqp::ctx)); my $b := nqp::iterator($a); while $b { nqp::deletekey($a, nqp::iterkey_s($b)) } | 19:47 | |
camelia | nqp: OUTPUT«Method 'key' not found for invocant of class 'HashIterator'current instr.: '' pc 89 ((file unknown):165920556) (/tmp/U06KLlp1Hl:1)» | ||
dalek | p: 89894b0 | (Donald Hunter)++ | src/vm/jvm/ (7 files): Added nqp::readfh on JVM. Fixes / cleanup of nqp::writefh impl. |
19:49 | |
Faxmachinen | n: say (^Inf X+ ^3).perl | 19:51 | |
camelia | niecza v24-88-g1f87209: OUTPUT«(timeout)» | ||
Faxmachinen | n: say (^Inf X+ ^3)[^5].perl | ||
camelia | niecza v24-88-g1f87209: OUTPUT«(0, 1, 2, 1, 2)» | ||
diakopter | n: say (^Inf XXX+ ^3)[^5].perl | 19:55 | |
camelia | niecza v24-88-g1f87209: OUTPUT«((0, ).list, (1, ).list, (2, ).list, (1, ).list, (2, ).list)» | ||
diakopter | r: say (^Inf XXX+ ^3 XXX+ ^3 XXX+ ^3)[^5].perl | 19:56 | |
camelia | rakudo fe289b: OUTPUT«(0, 1, 2, 1, 2)» | ||
diakopter | o_O | ||
flussence | /<[XZ]>+/ is usually a no-op when dealing with auto-flattening lists | 19:57 | |
r: say (^Inf XXX+ [^3] XXX+ [^3] XXX+ [^3])[^5].perl | 19:58 | ||
camelia | rakudo fe289b: OUTPUT«(0, 1, 2, 1, 2)» | ||
flussence | hm | ||
r: say (^Inf XXX+ [^3] XXX+ [^3] XXX+ [^3])[^15].perl | |||
camelia | rakudo fe289b: OUTPUT«(0, 1, 2, 1, 2, 3, 2, 3, 4, 1, 2, 3, 2, 3, 4)» | ||
flussence | r: say (^Inf XXX+ [^3] XXX+ [^3] XXX+ [^3])[80..100].perl | 19:59 | |
camelia | rakudo fe289b: OUTPUT«(8, 3, 4, 5, 4, 5, 6, 5, 6, 7, 4, 5, 6, 5, 6, 7, 6, 7, 8, 5, 6)» | ||
20:01
stevan_ left,
stevan_ joined
20:03
xenoterracide joined
20:06
kaare_ left,
stevan_ left
|
|||
Faxmachinen | How would one make whatever the default argument value? | 20:11 | |
FROGGS | r: sub a ( $p = * ) { say $p.WHAT }; a() | 20:12 | |
camelia | rakudo fe289b: OUTPUT«(Whatever)» | ||
20:12
d4l3k_ joined
|
|||
diakopter | dalek: wb? | 20:12 | |
20:13
dalek left
|
|||
Faxmachinen | Hmm, you're right | 20:13 | |
20:13
eternaleye left,
eternaleye joined
20:14
d4l3k_ is now known as dalek
|
|||
Faxmachinen | No idea how I got it to become WhateverCode | 20:16 | |
lizmat | r: say Any.exists # how bad would it be if this would work and return False ? | 20:17 | |
camelia | rakudo fe289b: OUTPUT«No such method 'exists' for invocant of type 'Any' in block at /tmp/szhTn65xzJ:1» | ||
Faxmachinen | Oh, probably the test against whatever within the sub | 20:18 | |
I suppose smartmatch against ::Whatever would be the right way? | |||
20:18
btyler_ joined
|
|||
lizmat | r: my %h; say %h<a><b>:exists # Any.exists would fix this | 20:18 | |
camelia | rakudo fe289b: OUTPUT«No such method 'exists' for invocant of type 'Any' in method postcircumfix:<{ }> at src/gen/CORE.setting:1908 in method postcircumfix:<{ }> at src/gen/CORE.setting:1845 in block at /tmp/fPGlAbCX5x:1» | ||
FROGGS | r: sub a ( $p = * ) { say $p ~~ Whatever }; a() | 20:19 | |
camelia | rakudo fe289b: OUTPUT«True» | ||
FROGGS | Faxmachinen: sometimes it is easier if you paste your one-liner here so we can see what you are trying | 20:20 | |
20:20
btyler left
|
|||
Faxmachinen | I must be getting tired or something | 20:20 | |
Also yes | |||
_sri | developers.slashdot.org/firehose.pl...25/2115204 # "To what degree does language success correlate to beard length? It is absolutely essential. Just look at Perl's fate -- Larry Wall is just too clean-shaven. :-)" | ||
Faxmachinen | And you hit the nail on the head anyway | 20:21 | |
FROGGS | me is tired too fwiw :o) | 20:22 | |
but PIR got me :/ | |||
Faxmachinen | r: say (2 ~~ Whatever), (2 === Whatever); # This is sort of surprising though | ||
camelia | rakudo fe289b: OUTPUT«FalseWhateverCode.new()» | ||
20:23
btyler joined
|
|||
FROGGS | maybe infix === does something special if Whatever is involved? | 20:23 | |
Faxmachinen | I would have expected FalseFalse or WhateverCode.new()WhateverCode.new() | ||
20:24
bluescreen10 joined
|
|||
Faxmachinen | It would be ~~ doing something special with whatever, since the default is to make a whatevercode, right? | 20:24 | |
20:24
skyheights left
|
|||
benabik | r: sub a ( $p = * ) { say $p ~~ Whatever }; a(); a(1) | 20:24 | |
FROGGS | ~~ asks the RHS if it accepts the LHF, so yes | ||
camelia | rakudo fe289b: OUTPUT«TrueFalse» | ||
benabik | r: sub a ( $p = * ) { say $p ~~ * }; a(); a(1) | 20:25 | |
20:25
btyler_ left
|
|||
camelia | rakudo fe289b: OUTPUT«TrueTrue» | 20:25 | |
benabik | Ah. Whatever accepts only *, * accepts whatever. | ||
Faxmachinen | r: say 2 ~~ Any; say 2 ~~ Whatever; | 20:26 | |
camelia | rakudo fe289b: OUTPUT«TrueFalse» | ||
Faxmachinen | I probably confused those and assumed it wouldn't work | ||
lizmat | r: say Whatever.^mro | ||
camelia | rakudo fe289b: OUTPUT«WhateverCode.new()» | ||
lizmat | r: say WhateverCode.^mro | 20:27 | |
camelia | rakudo fe289b: OUTPUT«WhateverCode.new()» | ||
benabik | It feels wrong that Whatever is turning into WhateverCodes. | ||
lizmat | r: say Whatever.WHAT.^mro | ||
camelia | rakudo fe289b: OUTPUT«(Whatever) (Any) (Mu)» | ||
dalek | rl6-roast-data: 593a487 | coke++ | / (5 files): today (automated commit) |
20:31 | |
[Coke] will get that CSV thing working tonight, unless $DAYJOB becomes $NIGHTJOB | 20:33 | ||
20:33
benabik left
20:34
berekuk left
|
|||
[Coke] | (the nice csv rendering on github, that is) | 20:34 | |
Faxmachinen | r: say (2 ~~ Whatever, 2 ~~ *, Whatever ~~ *, * ~~ Whatever); | ||
camelia | rakudo fe289b: OUTPUT«False True True True» | ||
20:37
john____ joined
20:42
panchiniak left
|
|||
lizmat | r: my %h; my $b := %h<a><b>; say %h; $b = 1; say %h # this is so cool | 20:42 | |
camelia | rakudo fe289b: OUTPUT«().hash("a" => {"b" => 1}).hash» | ||
Faxmachinen | Indeed | ||
20:45
zby_home_ left
|
|||
TimToady | note that [^3] should *not* be flattening in a list context | 20:47 | |
20:48
Guillaume2 joined
|
|||
Guillaume2 | hello from Montréal | 20:48 | |
20:48
colomon left
20:49
stevan_ joined
|
|||
sjohnson | hi | 20:49 | |
FROGGS | hi | ||
sjohnson | salut mon ami | ||
Faxmachinen | r: my @n = 1..10; my @even := @n.grep: * %% 2; say @n; @even[3] = 412; say @n; # Also this | ||
camelia | rakudo fe289b: OUTPUT«1 2 3 4 5 6 7 8 9 101 2 3 4 5 6 7 412 9 10» | ||
Faxmachinen | Hi | ||
Guillaume2 | I only know Perl5 | 20:50 | |
it was my glue language | |||
lizmat | that's a start :-) | ||
TimToady | Faxmachinen: if you want that, yeah, that's cool. otherwise, it's not so cool... :) | 20:51 | |
Guillaume2 | I used to be a programmer for 12 years but now I'm studying theology | ||
I think I wanna write bible softwares using Perl | |||
TimToady | well, Perl will definitely handle Unicode better than most languages | 20:52 | |
Faxmachinen | TimToady: True. I figured it was just me who couldn't figure out how to clone an array though | ||
Guillaume2 | yes and i wanna output documents in latex | ||
sjohnson | it supports snowman bracket technology | ||
Guillaume2 | perl + latex i need | ||
what's the GUI defacto for Perl6 ? | 20:53 | ||
TimToady | well, latex is just text--how hard can it be? :) | ||
don't have any yet, and probably won't bless any particular GUI to the exclusion of any other | |||
plus it's rather platform dependent | 20:54 | ||
and we're trying to be platform independent | |||
so the right GUI on the JVM might be different than the right one on MoarVM | |||
or on Node.js | |||
Guillaume2 | I don't wanna write my software in Java | 20:55 | |
TimToady | the whole point of putting Perl 6 on the JVM is so you don't have to | ||
Faxmachinen | Does Perl6 have a .Net compiler yet? | ||
Guillaume2 | oh Perl6 runs on a Java VM? | 20:56 | |
TimToady | niecza runs on .Net | ||
rakudo/jvm still has some rough edges, but passes 99% of the tests rakudo/parrot does already | |||
and the startup time is abysmal, but that's comes standard on the JVM :) | 20:57 | ||
slava | TimToady: are there any implementations that you are aware of that have threading available? rakudo does not :( | ||
TimToady | n: say "hello from .Net-land" | ||
camelia | niecza v24-88-g1f87209: OUTPUT«hello from .Net-land» | ||
TimToady | rakudo does | ||
but only on the JVM so far | |||
slava | oooooh | ||
awwwwwwwww | 20:58 | ||
Faxmachinen | r: (1..5)>>.say | ||
camelia | rakudo fe289b: OUTPUT«53142» | ||
slava | nice | ||
TimToady | that's...faking it | ||
Guillaume2 | do you absolutely need a Java VM to run Perl6 ? | ||
slava | oh :( | ||
no | |||
Guillaume2 | ok | ||
TimToady | you just need JVM for threads currently | ||
slava | Guillaume2: there are two rakudos, rakudo-parrot, and rakudo-jvm | ||
TimToady | soon there will be rakudo/moarvm, and that'll support both threading and P5 interop | 20:59 | |
diakopter | and in a couple months, rakudo-moar | ||
slava | TimToady: are there any 'big' features that are still missing? according to feature comparison, rakudo-parrot is missing threading, everything else seems to be there | ||
TimToady | well, and speed | ||
FROGGS | parrot offers threads too, but these act a bit weird | 21:00 | |
diakopter | well, and a thousand or two spec'd features from the Synopses | ||
slava | FROGGS: do tell. :) | ||
diakopter: is that in response to what major things are missing? | |||
TimToady | speed is really the only thing preventing adoption by the general public; CPAN interop is the only additional thing preventing greater adoption by the P5 community | ||
FROGGS | slava: you can create os threads, but these are not allowed to write to lexical variables | ||
diakopter | or object members | 21:01 | |
Guillaume2 | ok Parrot is not Java. I understand now, | ||
Faxmachinen | Did Quantum::Superpositions actually fork? | ||
TimToady | don't think so | ||
FROGGS | slava: to do that you create a green thread within the os thread, this is the some sort of message that gets send to the main thread which writes then to lexical variables | ||
I am trying to fiddle with the regex engine and parrot threads atm, but it is hairy | 21:02 | ||
Faxmachinen | Still an awesome feature though, in both languages | ||
21:02
dayangkun left
|
|||
slava | FROGGS: parrot threads are not pthreads? would it make sense to have pthreads? | 21:03 | |
Guillaume2 | I'm on Mac OS/X but I would like to target mobile platforms, mainly iOs and Android, do you think Perl6 will provide me tools for this soon or later ? | 21:05 | |
diakopter | slava: they're OS threads like pthreads exposes | ||
it uses pthreads on the platforms it supports I'm sure | 21:06 | ||
timotimo | FROGGS: don't have the concentration to backlog right now. did my nqp optimization thing end up causing the trouble? | ||
FROGGS | timotimo: I dunno | ||
21:06
skids left
|
|||
FROGGS | timotimo: but I'll test now | 21:06 | |
timotimo | thanks | ||
diakopter | Guillaume2: what do you mean by target? | ||
Guillaume2 | well build apps | ||
for iOS and android | |||
using Perl6 :) | |||
timotimo | fwiw, i did intensive testing, i did not just throw it in willy nilly. lizmat tested it successfully some time ago, too, but i rebased it | ||
lizmat | Guillaume2: in the case of android, that would require a more modern JVM on there then most have | 21:07 | |
wrt iOS: Apple does not allow apps not made with XCode | 21:08 | ||
Guillaume2 | thats lame from Apple | ||
I dont know why bought a mac | |||
lizmat | that's how it is | ||
Guillaume2 | * I bought | ||
FROGGS | timotimo: I know that :o) | 21:09 | |
Guillaume2 | anyone here using weechat ? | ||
diakopter | lizmat: well, you can write apps in C# using Xamarin | ||
TimToady | next year it'll be YCode instead, and everyone at the conference will be asking for an adapter because they left theirs at home | ||
FROGGS | (but some sort of fear is always with me, and that is not limited to a group of devs) | 21:10 | |
hehe | |||
DisplayPort3000 | |||
21:10
Guillaume2 left
|
|||
FROGGS | but it will be thin, ultra thin | 21:10 | |
and all the cables will be made of glass | 21:11 | ||
timotimo | and it will no longer conflate unicode and bytes types! | ||
slava | weeee, compiling rakudo star 2013.08 with jvm :D | 21:13 | |
FROGGS | slava: startup time is a mess, but you get payed back when running larger computations since JVM's optimizer is pretty awesome | ||
slava | jnthn: is the thread example as simple as the example in your blog? | ||
FROGGS: I am not very concerned with start-up time atm :) | 21:14 | ||
FROGGS | k, just wanted to prevent disappointment :o9 | ||
:o) | |||
timotimo: Stage parse : 132.725 | |||
that feels about 1% faster :o) | 21:15 | ||
21:17
dayangkun joined
|
|||
slava | FROGGS: I see jvm as more of continued use if anythists :) | 21:18 | |
timotimo | FROGGS: i'm glad ;) | 21:20 | |
dalek | kudo/nom: 789db4f | (Elizabeth Mattijsen)++ | src/core/Any.pm: Add Any.exists($key) and Any.delete($key) This feels like a hack, but it seems the best way to handle cases such as my %h; say %h<a><b>:exists; say %h<a><b>:!k # False, "b" without having to add a large number of candidates for Any:U: in combination with all possible adverbial pairs and combination of adverbial pairs. |
21:25 | |
celesta | r: state $foo; | 21:26 | |
camelia | rakudo fe289b: ( no output ) | ||
celesta | where can i read about the state declaration? | ||
lizmat | S03:4947 | 21:29 | |
synopsebot | Link: perlcabal.org/syn/S03.html#line_4947 | ||
celesta | thank you | ||
jnthn | slava: See my recent talk for a lot more examples (slides linked from latest pot on my blog) | 21:30 | |
um, post :) | |||
lizmat | .oO( jnthn been doing too many hashes lately ) |
21:31 | |
jnthn | Just feeling weedy after a long day... :P | 21:32 | |
lizmat | r: my %h; my $b=\%h<a><b>; say $b # huh? expected Any, or Capture, but not an empty hash | ||
camelia | rakudo fe289b: OUTPUT«().hash» | ||
21:32
abnorman left
|
|||
jnthn | hmm :) | 21:33 | |
r: my %h; my $b=\%h<a><b>; say $b.WHAT | |||
camelia | rakudo fe289b: OUTPUT«(Capture)» | ||
jnthn | Apparently Capture gists interestingly... | ||
lizmat | aha! | ||
jnthn | I don't like it gisting that way, I don't think. It makes people think there's a rakudobug :P | 21:34 | |
lizmat | will look at that tomorrow | ||
:-) | |||
jnthn | :) | 21:35 | |
21:35
berekuk joined
|
|||
donaldh | r: qp{foo} | 21:36 | |
camelia | rakudo fe289b: OUTPUT«===SORRY!=== Error while compiling /tmp/OO2r9cZpqnUndeclared routines: foo used at line 1 qp used at line 1» | ||
donaldh | r: qp{/foo} | 21:37 | |
camelia | rakudo fe289b: OUTPUT«===SORRY!=== Error while compiling /tmp/eoj99V4tslUnable to parse regex; couldn't find final '/'at /tmp/eoj99V4tsl:1------> qp{/foo⏏} expecting any of: argument list postfix subscript semic… | ||
slava | jnthn: ty :D | ||
FROGGS | NYI | ||
dalek | ast: 9442ea7 | (David Warring)++ | S05-capture/caps.t: a little testing of conjunctive regex captures (&&) |
21:38 | |
jnthn | slava: Welcome :) | ||
21:39
berekuk left
|
|||
Faxmachinen | Hmm. Must all ==> be on the same line? | 21:39 | |
21:39
berekuk joined
|
|||
Faxmachinen | r: (1..3) ==> map { $^a+1 } ==> map { $^a+1 } ==> say; | 21:39 | |
camelia | rakudo fe289b: OUTPUT«3 4 5» | ||
jnthn | Faxmachinen: No, but maybe you are hitting the fact that } terminates a statement. | ||
21:40
BenGoldberg joined
|
|||
jnthn | Faxmachinen: BUT TimToady may have rearranged the grammar to make that not an issue. I forget. | 21:40 | |
Faxmachinen | I tried that on multiple lines, then I get bogus statement | ||
21:41
lowpro30_ joined
21:42
kbaker left
|
|||
jnthn | Faxmachinen: Sounds familiar. | 21:42 | |
donaldh | I just have some test regressions for dir with chdir emulation. dir an absolute path, get absolute paths in result | ||
dalek | ast: cb5beb6 | (Elizabeth Mattijsen)++ | S02-types/autovivification.t: Some more test passing now that we have Any.exists |
||
ast: ae3f5f8 | (Elizabeth Mattijsen)++ | S02-lexical-conventions/unicode.t: Unfudge tc() tests, now that we have tc() |
|||
ast: 81aeb68 | (Elizabeth Mattijsen)++ | / (4 files): Unfudge tests / marked as todo that seem not to blow up anymore |
|||
donaldh | fix that and it could be ready to merge. | ||
lizmat | gnight #perl6! | 21:43 | |
Faxmachinen | Good night | ||
celesta | night | ||
good bye #perl6 | 21:44 | ||
masak | 'night, cel. | ||
21:44
celesta left,
abnorman joined
|
|||
BenGoldberg | rn: sub postfix:<!>(Int $a) { [*] 1..$a }; say 5!; say 5.! | 21:44 | |
camelia | niecza v24-88-g1f87209: OUTPUT«120120» | ||
..rakudo fe289b: OUTPUT«===SORRY!===CHECK FAILED:Undefined routine '&postfix:<.>' called (lines 1, 1)» | |||
21:45
lowpro30__ joined
|
|||
masak submits rakudobug | 21:45 | ||
std: sub postfix:<!>(Int $a) { [*] 1..$a }; say 5!; say 5.! | |||
camelia | std 06636e4: OUTPUT«ok 00:00 48m» | ||
21:46
lowpro30 left
|
|||
Faxmachinen | r: eval("(1..3)\n\t==> map \{ \$^a+1 \}\n\t==> map \{ \$^a+1 \}\n\t==> say;"); | 21:46 | |
camelia | rakudo fe289b: OUTPUT«===SORRY!=== Error while compiling eval_0Bogus statementat eval_0:3------> ⏏==> map { $^a+1 } expecting any of: postfix statement end statement modifier statement modifier loop pre… | ||
21:46
Mouq joined
|
|||
Faxmachinen | r: eval("(1..3) ==> map \{ \$^a+1 \} ==> map \{ \$^a+1 \} ==> say;"); | 21:46 | |
camelia | rakudo fe289b: OUTPUT«3 4 5» | ||
flussence | rn: sub postfix:<!>(Str $a) { uc $a ~ "!!!!" }; say 'hello'!; say 'hello'.!; | 21:47 | |
camelia | rakudo fe289b: OUTPUT«===SORRY!===CHECK FAILED:Undefined routine '&postfix:<.>' called (lines 1, 1)» | ||
..niecza v24-88-g1f87209: OUTPUT«HELLO!!!!HELLO!!!!» | |||
flussence | (just making sure niecza wasn't reading "5." as a number) | ||
BenGoldberg | rn: sub postfix:<!>(Int $a) { [*] 1..$a }; sub postfix:<!>(Str $a) { uc $a ~ "!!!!" }; say 5!, 'hello'!; | ||
camelia | rakudo fe289b: OUTPUT«===SORRY!=== Error while compiling /tmp/WqYL4op97KRedeclaration of routine postfix:<!>at /tmp/WqYL4op97K:1------> b postfix:<!>(Str $a) { uc $a ~ "!!!!" }⏏; say 5!, 'hello'!; expecting any of: postfix stat… | ||
..niecza v24-88-g1f87209: OUTPUT«===SORRY!===Illegal redeclaration of routine 'postfix:<!>' (see line 1) at /tmp/s3oKhK4wss line 1:------> >(Int $a) { [*] 1..$a }; sub postfix:<!>⏏(Str $a) { uc $a ~ "!!!!" }; say 5!, 'heUnhandled exception: Check … | |||
BenGoldberg | rn: method postfix:<!>(Int $a) { [*] 1..$a }; method postfix:<!>(Str $a) { uc $a ~ "!!!!" }; say 5!, 'hello'!; | 21:48 | |
camelia | rakudo fe289b: OUTPUT«Useless declaration of a has-scoped method in mainlineUseless declaration of a has-scoped method in mainline===SORRY!=== Error while compiling /tmp/BKiDqai5aMCannot negate , because it is not iffy enoughat /tmp/BKiDqai5aM:1------> :<!>(S… | ||
..niecza v24-88-g1f87209: OUTPUT«===SORRY!===Methods must be used in some kind of package at /tmp/jYkfHhATYv line 1:------> method postfix:<!>⏏(Int $a) { [*] 1..$a }; method postfix:<Methods must be used in some kind of package at /tmp/jYkfHhATYv … | |||
21:48
lowpro30_ left
|
|||
BenGoldberg | rn: multi postfix:<!>(Int $a) { [*] 1..$a }; multi postfix:<!>(Str $a) { uc $a ~ "!!!!" }; say 5!, 'hello'!; | 21:49 | |
camelia | rakudo fe289b, niecza v24-88-g1f87209: OUTPUT«120HELLO!!!!» | ||
donaldh | code reviews welcome: github.com/donaldh/rakudo/compare/chdir-emu | ||
Faxmachinen | jnthn: Yeah, it works when ==> is last on the previous line, rather than the map block | ||
Mouq | ding | ||
yoleaux | 07:46Z <FROGGS> Mouq: What if <unsp> unspaces more than one char? It could unspace \s+, wouldn't that be better? | ||
21:49
berekuk left
21:50
lowpro30__ left
|
|||
FROGGS | Mouq: dont read that message :o) | 21:51 | |
jnthn | Faxmachinen: Yeah, it bugged me too. I vaguely recall the standard grammar may have been tweaked after I last ran into it, I'd have to check the history to be sure. | ||
Faxmachinen: If it did, Rakudo didn't catch up yet. | |||
Mouq | :) kk | ||
donaldh | 'night #perl6 | 21:52 | |
21:53
donaldh left
21:54
SmokeMachine joined
|
|||
notjack | /quit | 21:57 | |
21:57
notjack left
21:59
colomon joined
22:00
bruges_ joined
22:01
_jaldhar left
22:02
bruges left
22:03
Rotwang1 left
|
|||
Faxmachinen | r: ("foo bar baz".split(/ /)>>.comb(/./)).perl.say | 22:04 | |
camelia | rakudo fe289b: OUTPUT«===SORRY!=== Error while compiling /tmp/vV4gHu77upNull regex not allowedat /tmp/vV4gHu77up:1------> ("foo bar baz".split(/ /⏏)>>.comb(/./)).perl.say» | ||
Faxmachinen | r: ("foo bar baz".split(/\s/)>>.comb(/./)).perl.say | 22:05 | |
camelia | rakudo fe289b: OUTPUT«(("f", "o", "o").list, ("b", "a", "r").list, ("b", "a", "z").list)» | ||
Faxmachinen | r: ("foo bar baz".split(/\s/)>>.comb(/./)).tree.perl.say | ||
camelia | rakudo fe289b: OUTPUT«LoL.new(("f", "o", "o").list.item, ("b", "a", "r").list.item, ("b", "a", "z").list.item)» | ||
Faxmachinen | Why does that make a LoL instead of a tree? | ||
jnthn | There's no tree type; .tree is for making a LoL | 22:06 | |
diakopter | you're a tree | ||
jnthn | so's your mom | 22:07 | |
masak | 'night, #perl6 | ||
jnthn | OK, teaching tomorrow, I should sleep too | ||
22:07
spider-mario left
|
|||
jnthn | & | 22:08 | |
Faxmachinen | r: ("foo bar baz".split(/\s/).map({ [$^a.comb(/./)] })).perl; | 22:10 | |
camelia | rakudo fe289b: ( no output ) | ||
Faxmachinen | r: ("foo bar baz".split(/\s/).map({ [$^a.comb(/./)] })).perl.say; | ||
camelia | rakudo fe289b: OUTPUT«(["f", "o", "o"], ["b", "a", "r"], ["b", "a", "z"]).list» | ||
Faxmachinen | That makes a different thingy | ||
This is so confusing | |||
22:10
PacoAir left
|
|||
Faxmachinen | So is that a LoA? | 22:11 | |
22:11
john____ left
|
|||
Faxmachinen | r: say ((1..3) Z, (1..3)).tree.perl; # And this makes a LoA instead of a LoL | 22:13 | |
camelia | rakudo fe289b: OUTPUT«([1, 1], [2, 2], [3, 3]).list» | ||
Faxmachinen | Oh well, bedtime | 22:14 | |
22:14
Faxmachinen left,
bluescreen10 left
22:18
Rotwang1 joined,
Psyche^ left
22:19
abnorman left
22:23
colomon left
22:32
abnorman joined
22:42
abnorman left
22:44
Rotwang1 left
22:45
_jaldhar joined
22:46
berekuk joined,
abnorman joined
22:47
dmol left,
btyler left
22:57
jnap left
23:07
skids joined
23:08
btyler joined
23:10
colomon joined
23:13
FROGGS left
23:23
FROGGS joined
23:32
colomon left
23:35
ajr_ left,
berekuk left
23:36
btyler left,
virtualsue joined
23:37
Teratogen joined
|
|||
Teratogen | howdy howdy howdy | 23:37 | |
23:42
berekuk joined,
Mouq left
23:44
berekuk left
23:45
cosimo left,
cosimo joined
23:47
Ayiko left
23:48
FROGGS left,
Util joined
23:51
Mouq joined
23:59
FROGGS joined
|