Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2013-08-26

Perl 6 | Reference Documentation | Rakudo

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:02 Mouq rnp: "OH HAI"\ \ .say
00:02 camelia rakudo 38a0f9: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/64g7cmsuNJâ�¤Confusedâ�¤at /tmp/64g7cmsuNJ:1â�¤------> [32m"OH HAI"\ [33mâ��[31m\ .say[0mâ�¤    expecting any of:â�¤        unspaceâ�¤        horizontal whitespaceâ�¤        postfixâ�¤Â»
00:02 camelia ..pugs: OUTPUT«*** ␤    Unexpected "\\"␤    expecting "."␤    at /tmp/O8zRvlBRZI line 1, column 11␤»
00:02 camelia ..niecza v24-88-g1f87209: OUTPUT«[31m===[0mSORRY![31m===[0m��Method call found where infix expected (change whitespace?) at /tmp/vBWA6fJ56r line 1:�------> [32m"OH HAI"\ \ [33m�[31m.say[0m��Parse failed��»
00:02 Mouq std: "OH HAI"\ \ .say
00:02 camelia std 06636e4: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Method call found where infix expected (change whitespace?) at /tmp/4FxeumuiTx line 1:â�¤------> [32m"OH HAI"\ \ [33mâ��[31m.say[0mâ�¤    expecting any of:â�¤   horizontal whitespaceâ�¤  infix or meta-infixâ�¤    infixed functionâ�¤       postcircumfixâ�¤
00:02 camelia ..post…
00:03 Mouq Making that ( RT #117465 ) work in rakudo was pretty easy
00:03 Mouq Just change <.unsp>? to <.unsp>* and <.unsp> to <.unsp>+
00:04 Mouq ...(in src/Perl6/Grammar.pm). However, it isn't in std...
00:05 dayangkun joined #perl6
00:06 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 Mouq (err, <.unsp>+)
00:09 Mouq running&
00:29 dayangkun joined #perl6
00:29 abnorman joined #perl6
00:34 dalek std/multiunsp: d699c5f | Mouq++ | STD.pm6:
00:34 dalek std/multiunsp: Allow multiple unspaces in sequence
00:34 dalek std/multiunsp: review: https://github.com/perl6/std/commit/d699c5faf7
00:41 sftp joined #perl6
00:47 _jaldhar joined #perl6
00:48 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:49 Mouq s/I have// perhaps I miss my English class a bit
00:50 TimToady we'd probably say "my school is starting tomorrow"
00:50 TimToady we tend to avoid "present tense" in favor of "present progressive"
00:51 Mouq Well, I'm a naïve speaker—*ahem* native
00:51 diakopter *we are tending
00:52 TimToady I am standing corrected :)
00:54 TimToady actually it'll be interesting to see if the trend toward progressive reverses, what with everyone becoming a writer in their texting
00:55 TimToady and "starts" is easier to type than "is starting" :)
00:56 TimToady So, am I predicting this?  Or do I predict this?  :)
00:57 geekosaur you might coould be predicting it...
00:57 Mouq You previously will predict it.
00:57 jercos You will have predicted that when it does or does not occur.
00:58 jercos 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: https://github.com/perl6/std/pull/5
01:01 drbean joined #perl6
01:07 TimToady Mouq: yes, still thinking about that
01:10 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:16 Mouq r: say "\c[LATIN CAPITAL LETTER A, COMBINING DOT ABOVE]".ord;
01:16 camelia rakudo 38a0f9: OUTPUT«65␤»
01:16 Mouq r: say "\c[LATIN CAPITAL LETTER A WITH DOT ABOVE]".ord;
01:16 camelia rakudo 38a0f9: OUTPUT«550␤»
01:16 TimToady that will fix itself when we switch to NFG mode
01:17 TimToady since it will default to grapheme mode
01:18 TimToady our current string semantics based on codepoints will probably be renamed to Uni/NFD/NFC and such
01:20 Mouq Cool
01:20 TimToady mostly people don't want to care about how many codepoints are in their graphemes
01:23 TimToady 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:24 TimToady for instance, we currently allow 42\i to be an unspace without space, as it were; what happens with 42\ \i then?
01:24 TimToady or if we allow that, what about if you want to start the next term with a \ for some reason (a capture?)
01:24 TimToady so it's not entirely a simple decision
01:30 Mouq Hm
01:32 Mouq Okay. Interesting
01:32 TimToady std: 42\i
01:32 camelia std 06636e4: OUTPUT«ok 00:00 41m␤»
01:32 TimToady std: 42\ i
01:32 camelia std 06636e4: OUTPUT«ok 00:00 41m␤»
01:33 TimToady std: 42\ \i
01:33 camelia std 06636e4: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Two terms in a row at /tmp/2UI2xm_ZRj line 1:â�¤------> [32m42\ [33mâ��[31m\i[0mâ�¤    expecting any of:â�¤      feed_separatorâ�¤ horizontal whitespaceâ�¤  infix or meta-infixâ�¤    infixed functionâ�¤       postcircumfixâ�¤  postfixâ�¤
01:33 camelia ..postfix_prefix_meta_operator␤   …
01:33 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 \
01:33 TimToady up till now, it has just seemed like more clutter
01:34 TimToady 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 TimToady and want a blank line in the middle for some reason
01:35 colomon joined #perl6
01:35 TimToady but that's different from the stuff\ \stuff problem
01:36 Mouq Well, that's just a matter of changing the quantifier for <.unsp> at that particular place
01:40 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:42 Mouq Probably a good tendency
01:42 Mouq r: .++()
01:42 camelia rakudo 38a0f9: OUTPUT«===SORRY!===␤No such method 'unshift' for invocant of type 'NQPMu'␤»
01:49 TimToady afk for a couple hours &
01:54 Mouq std: .++()
01:54 camelia std 06636e4: OUTPUT«ok 00:00 41m␤»
01:57 Mouq std: .i # ?
01:57 camelia std 06636e4: OUTPUT«ok 00:00 41m␤»
01:57 Mouq r: .i
01:57 camelia rakudo 38a0f9: OUTPUT«No such method 'i' for invocant of type 'Nil'␤  in block  at /tmp/uVnqXORnWE:1␤␤»
01:59 Mouq r: .i()
01:59 camelia rakudo 38a0f9: OUTPUT«No such method 'i' for invocant of type 'Nil'␤  in block  at /tmp/va6R0KAYlz:1␤␤»
02:01 Mouq r: sub postfix:<¡> { $^a }; "thing"¡; "thing".¡;
02:01 camelia rakudo 38a0f9: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&postfix:<.>' called (lines 1, 1)␤»
02:04 Mouq :?
02:04 Mouq r: my @a = ^10; @a.».++ # strange error
02:04 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␤␤»
02:05 Mouq r: .:<++>
02:05 camelia rakudo 38a0f9: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/_Dm6r538tu�Unsupported use of . to concatenate strings; in Perl 6 please use ~�at /tmp/_Dm6r538tu:1�------> [32m.:[33m�[31m<++>[0m�»
02:06 Mouq r: $_.:<++>
02:06 camelia rakudo 38a0f9: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/BuInZymics�Unsupported use of . to concatenate strings; in Perl 6 please use ~�at /tmp/BuInZymics:1�------> [32m$_.:[33m�[31m<++>[0m�»
02:11 Mouq std: .:<++>
02:11 camelia std 06636e4: OUTPUT«ok 00:00 41m␤»
02:18 benabik joined #perl6
03:18 preflex_ joined #perl6
03:42 Mouq std: .:<nonpre>
03:42 camelia std 06636e4: OUTPUT«ok 00:00 41m␤»
03:42 Mouq std: $_.:<nonpre>
03:42 camelia std 06636e4: OUTPUT«ok 00:00 42m␤»
03:50 Mouq std: $_.-+
03:50 camelia std 06636e4: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Confused at /tmp/5ZddGzXE_j line 1:â�¤------> [32m$_.[33mâ��[31m-+[0mâ�¤    expecting any of:â�¤ dotty method or postfixâ�¤        postcircumfixâ�¤  postfix_prefix_meta_operatorâ�¤   postopâ�¤Parse failedâ�¤FAILED 00:00 42mâ�¤Â»
03:52 iravan joined #perl6
03:59 * Mouq
03:59 Mouq Oop. Yup. /me
04:00 iravan left #perl6
04:39 Mouq Really close to fixing rakudo's «.++»/«.:<++>» problem, but I must to bed! ciao #perl6
04:39 hummeleBop joined #perl6
04:40 TimToady night
05:01 berekuk joined #perl6
05:09 berekuk joined #perl6
05:12 SamuraiJack joined #perl6
05:26 dayangkun joined #perl6
05:38 fhelmberger joined #perl6
06:07 daxim joined #perl6
06:25 kaleem joined #perl6
06:34 FROGGS joined #perl6
06:37 dayangkun joined #perl6
06:38 FROGGS morning
06:38 dayangkun joined #perl6
06:38 kaleem joined #perl6
06:39 kaleem joined #perl6
06:49 dayangkun joined #perl6
06:51 fhelmberger_ joined #perl6
06:52 moritz \o
06:53 fh joined #perl6
07:19 domidumont joined #perl6
07:24 domidumont joined #perl6
07:31 salv0 joined #perl6
07:37 sqirrel joined #perl6
07:46 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.
07:46 FROGGS .tell TimToady 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 TimToady.
08:06 dalek joined #perl6
08:07 benabik joined #perl6
08:08 nwc10 yoleaux: .tell [Coke] that FRA is about 15 minutes from central Frankfurt by train, and HNH is 124km away by road.
08:08 nwc10 on, that wasn't the magic
08:08 nwc10 .tell [Coke] that FRA is about 15 minutes from central Frankfurt by train, and HNH is 124km away by road.
08:08 yoleaux nwc10: I'll pass your message to [Coke].
08:09 nwc10 oh, sweet
08:10 nwc10 Hahn is nearer to Perl than to Frankfurt.
08:10 moritz https://t.co/RqfXT3A2XG # one of the YAPC::EU talks by masak++
08:11 masak good o/, #perl6
08:12 FROGGS ohh, awesome!
08:12 FROGGS hi all
08:15 timotimo good day
08:18 dmol joined #perl6
08:18 denis_boyun joined #perl6
08:21 timotimo i think i'm going to merge the nqp-optimizer today. don't forget to run Configure*.pl before re-building
08:24 FROGGS k
08:25 timotimo currently running all the tests
08:27 timotimo oh woops, there seems to be a debug output left somewhere
08:30 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 #perl6
08:33 timotimo JimmyZ: yes, hold on
08:33 timotimo http://t.h8.lv/p6bench/nqp-optimization.html
08:34 timotimo 215ac4c is the optimized one
08:34 timotimo fortunately it has the same color in all graphs
08:34 timotimo pro tip: you can click on the checkouts in the annotaion on the right to show/hide the lines
08:35 timotimo the optimization only does something for integer arithmetics, so it doesn't do anything to most benchmarks
08:36 timotimo but a rakudo translated with the optimized&optimizing nqp binary will run the spectest suite in about 1.5% less cpu time
08:40 JimmyZ oh
08:40 JimmyZ I care about compiling time, it's a pain :P
08:41 timotimo the optimizer is blazing fast :)
08:41 timotimo didn't measure it. should i?
08:41 JimmyZ I mean the rakudo cpmpiling time :P
08:41 timotimo yes, i know :)
08:41 JimmyZ not the optimizer itself
08:42 timotimo ah!
08:42 timotimo of course
08:42 timotimo last time i checked there was no noticable difference
08:42 JimmyZ please measure it, that's a good benchmark
08:43 JimmyZ a real life benchmark
08:43 timotimo why are there so many spectest failures? =o
08:43 timotimo oh, it's rakudo-jvm
08:53 GlitchMr std: "OH HAI"\.               say
08:53 camelia std 06636e4: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Confused at /tmp/ZNF_x0ZWGC line 1:â�¤------> [32m"OH HAI"\.[33mâ��[31m               say[0mâ�¤    expecting any of:â�¤  dotty method or postfixâ�¤        postcircumfixâ�¤  postfix_prefix_meta_operatorâ�¤   postopâ�¤Parse failedâ�¤FAILED 00:00 42mâ�¤Â»â€¦
08:54 GlitchMr std: "OH HAI"\. say
08:54 camelia std 06636e4: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Confused at /tmp/fGtCvQWNPr line 1:â�¤------> [32m"OH HAI"\.[33mâ��[31m say[0mâ�¤    expecting any of:â�¤        dotty method or postfixâ�¤        postcircumfixâ�¤  postfix_prefix_meta_operatorâ�¤   postopâ�¤Parse failedâ�¤FAILED 00:00 42mâ�¤Â»
08:54 timotimo that's not how you do it :)
08:54 GlitchMr oh, right
08:54 GlitchMr std: "OH HAI".\ say
08:54 camelia std 06636e4: OUTPUT«ok 00:00 41m␤»
08:54 GlitchMr std: "OH HAI".\                    say
08:54 camelia std 06636e4: OUTPUT«ok 00:00 41m␤»
08:54 GlitchMr std: "OH HAI".\              \      say
08:54 camelia std 06636e4: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Confused at /tmp/YzVs926gmK line 1:â�¤------> [32m"OH HAI".\              [33mâ��[31m\      say[0mâ�¤    expecting any of:â�¤    dotty method or postfixâ�¤        horizontal whitespaceâ�¤  postcircumfixâ�¤  postfix_prefix_meta_operatorâ�¤   postopâ�¤
08:54 camelia ..unspace␤Parse…
08:56 GlitchMr rakudo: "OH HAI".\              \      say
08:56 camelia rakudo 38a0f9: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/UrcNYQI06lâ�¤Confusedâ�¤at /tmp/UrcNYQI06l:1â�¤------> [32m"OH HAI".\              [33mâ��[31m\      say[0mâ�¤    expecting any of:â�¤        unspaceâ�¤        horizontal whitespaceâ�¤Â»
08:56 GlitchMr niecza: "OH HAI".\              \      say
08:56 camelia niecza v24-88-g1f87209: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Confused at /tmp/M6slbo8V0S line 1:â�¤------> [32m"OH HAI"[33mâ��[31m.\              \      say[0mâ�¤â�¤Parse failedâ�¤â�¤Â»
08:56 donaldh joined #perl6
09:03 amkrankruleuen joined #perl6
09:03 amkrankruleuen joined #perl6
09:12 denisboyun joined #perl6
09:15 * timotimo measures core setting compile times
09:17 grondilu_ joined #perl6
09:22 hoelzro morning #perl6
09:22 timotimo sup rob :)
09:22 timotimo the new vim release features a faster regexp engine. i wonder if the perl6 syntax rules can make use of that?
09:25 hoelzro timotimo: for the perl5 files, the new engine really messed things up
09:25 hoelzro but that was a while ago, so it might work better now
09:25 timotimo oh?
09:25 hoelzro any and all contributions to the perl6 file would be most welcome =)
09:26 hoelzro I have so much I want to do for it
09:26 hoelzro but such little time =/
09:26 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 :(
09:26 * moritz throws a round tuit to hoelzro
09:26 timotimo but only in gvim
09:26 timotimo and only on my desktop
09:26 * hoelzro catches it, and gives it a small bite to verify its authenticity
09:27 berekuk joined #perl6
09:32 dmol joined #perl6
09:37 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:40 dmol joined #perl6
09:41 timotimo what's the shortest way between "a list of floating point numbers" to "average and standard deviation"?
09:41 timotimo maybe even a box plot? :)
09:41 tadzik hmm, I thought we have a statistics module
09:41 tadzik must've got lost
09:42 moritz timotimo: iterate over all values, keep a total of the values and the squares
09:42 moritz and then you can use those two to calculate mean and standard deviation (first and second momentum, really)
09:42 timotimo better answer: wolframalpha ;)
09:42 berekuk joined #perl6
09:42 moritz oh
09:42 tadzik :P
09:43 moritz I thought you wanted to write Perl 6 code
09:43 moritz locally I use octave (open source matlab clone) for this stuff
09:43 timotimo hehe
09:43 moritz v = [1.3, 1, 0.7]
09:43 hoelzro so...what's the schedule for this upcoming workshop?
09:44 moritz mean(v)
09:44 moritz std(v)
09:44 hoelzro I'm looking into flights and wondering when I should arrive at/leave Frankfurt
09:44 tadzik hoelzro: https://gist.github.com/lizmat/6177720
09:44 tadzik oops
09:44 tadzik it's gone :)
09:44 hoelzro =(
09:44 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?"
09:44 camelia rakudo 38a0f9: OUTPUT«667.868␤111537.007348␤and now?␤»
09:45 moritz the mail to p6c has the details, but I'm not sure if there's a schedule
09:45 timotimo i have to sum up the difference between the average and the squares at each point, right?
09:46 timotimo 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.967␤25.090992␤and now?␤»
09:46 moritz http://en.wikipedia.org/wiki/Standard_deviation#Rapid_calculation_methods
09:47 moritz uhm, that looks more complicated than necessary
09:49 Kiralexis joined #perl6
09:49 moritz timotimo: the standard deviation is just sqrt($sqdiffsum / @samples)
09:49 timotimo ah
09:50 fhelmberger joined #perl6
09:51 timotimo the results so far have been inconclusive (i had a b0rked data point in my first measurement)
09:52 grondilu_ there is an entry about std dev in RC:  http://rosettacode.org/wiki/Standard_Deviation#Perl_6
09:53 nyuszika7h joined #perl6
09:54 colomon joined #perl6
09:55 JimmyZ timotimo: so you got a result? how much faster?
09:55 timotimo hold on just a few more minutes
09:55 timotimo it won't be much
09:56 timotimo perhaps 1%
09:56 * masak .oO( calculating the arithmetic average of something is pretty mean )
09:56 timotimo masak: do you have an answer for "gather-based processes are hard to resume without manual effort"?
09:57 timotimo resume as in: the ircbot has to restart and keep its state
09:57 iSlug joined #perl6
09:58 masak timotimo: no idea. I sense I should backlog to know better what you're talking about.
09:59 timotimo i didn't really say much more about that before
10:01 timotimo JimmyZ: with 4 data points each i get:
10:02 timotimo optimized: mean 167, std: 1.676
10:02 JimmyZ oh
10:02 timotimo unoptimiz: mean 168.9, std: 0.941
10:02 timotimo so a little bit more than 1% for compiling the CORE.setting
10:02 timotimo faster, i mean.
10:03 FROGGS 100 of these patches and we can compile in *no time*! whoohoo! *g*
10:03 timotimo :D
10:03 timotimo i try my best, but it's so hard :(
10:03 * Guest93334 tries to think of a smart way to write a momentum function
10:04 FROGGS timotimo: I know what you mean :o)
10:04 timotimo env.parrot.rakudo is known to fail, right?
10:04 FROGGS timotimo: yes
10:05 Guest93334 r: sub momentum(@a) { gather take ([\*] 1, $_ xx *).item for @a }
10:05 camelia rakudo 38a0f9:  ( no output )
10:05 timotimo that works? •_•
10:06 nyuszika7h joined #perl6
10:08 grondilu joined #perl6
10:10 grondilu please ignore what I wrote as Guest93334
10:11 grondilu 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:23 sergot joined #perl6
10:23 synopsebot joined #perl6
10:24 fhelmberger joined #perl6
10:24 timotimo measurements for rakudo.jvm optimized is mean 72.85, std 0.938
10:25 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␤»
10:27 grondilu r: say [+] ^10 »**»3
10:27 camelia rakudo 38a0f9: OUTPUT«0␤»
10:27 grondilu r: say ^10 »**»3
10:27 camelia rakudo 38a0f9: OUTPUT«0..^1␤»
10:28 grondilu r: say [^10] »**»3
10:28 camelia rakudo 38a0f9: OUTPUT«0 1 8 27 64 125 216 343 512 729␤»
10:28 grondilu r: say [+] [^10] »**»3
10:28 camelia rakudo 38a0f9: OUTPUT«2025␤»
10:29 colomon n: say ^10 »**»3
10:29 camelia niecza v24-88-g1f87209: OUTPUT«0..^1000␤»
10:29 colomon that at least sort of makes sense....
10:29 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␤»
10:32 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 joined #perl6
10:37 Ulti timotimo I'd do a http://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:40 timotimo i don't even ...
10:41 locsmif joined #perl6
10:41 timotimo noooo, the unoptimized version is not slow enough! must start more background processes ...
10:43 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
10:44 * 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
10:45 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␤»
10:45 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:45 camelia rakudo 38a0f9: OUTPUT«2.87228132326901␤»
10:45 grondilu here you go
10:47 grondilu or shorter:
10:47 grondilu 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
10:47 camelia rakudo 38a0f9: OUTPUT«2.87228132326901␤»
10:48 Ulti timotimo: 162% cpu ? there is some threading happening?
10:50 fhelmberger joined #perl6
10:50 timotimo yes
10:50 berekuk joined #perl6
10:50 timotimo the jvm has a concurrent GC
10:51 Ulti ahh right
10:51 * moritz has a rakudo-jvm startup time of 3.7s
10:52 Ulti I'll have to get myself a fresh copy then
10:53 timotimo perl6 -e 'say [+] lines', so nice and short to have a little terminal to paste stuff into and get a sum out
10:56 * grondilu wonders how could we have intermediates sums in "real time"
10:57 moritz with [\+] of course
10:57 grondilu .say for [\+] lines
10:57 masak flight &
10:57 timotimo hm, lines is eager, isn't it? :(
10:57 grondilu but it only shows up at the end
10:57 moritz timotimo: it shouldn't be
10:57 moritz I think that for-loops are too eager
10:57 timotimo yes, but it is ;(
10:57 timotimo that may be it, yeah
10:57 timotimo using map instead should help, right?
10:57 Ulti perl -E 'say $sum += $_ for <>' isn't too long either, but a lot harder to read
10:58 timotimo it doesn't.
10:59 timotimo hm. how do i read a single line from stdin?
10:59 timotimo r: say $?STDIN.^methods
10:59 camelia rakudo 38a0f9: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/du0EIHtJ1yâ�¤Variable '$?STDIN' is not declaredâ�¤at /tmp/du0EIHtJ1y:1â�¤------> [32msay $?STDIN.^methods[33mâ��[31m<EOL>[0mâ�¤    expecting any of:â�¤        method argumentsâ�¤Â»
10:59 timotimo r: say $*STDIN.^methods
10:59 camelia rakudo 38a0f9: OUTPUT«new BUILD defined Int Num Numeric sink postcircumfix:<{ }> Bool Str gist <anon>␤»
10:59 timotimo ... oh?
10:59 moritz timotimo: $*IN.get
10:59 timotimo ah
10:59 timotimo thanks :)
11:00 timotimo perl6 -e 'my $s; map { when /\d+/ { $s += $_; }; default { say $s; $s = 0 } }, ({ $*IN.get } ... *)' # improvements welcome
11:02 berekuk joined #perl6
11:02 grondilu don't we have a -n option in perl6, as in perl5?
11:02 timotimo dunno
11:02 * grondilu tries
11:02 moritz I'm pretty sure we have.
11:03 timotimo if all that does is wrap for lines() around it, it won't work the way i want it to
11:03 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
11:03 grondilu ^got this
11:03 grondilu pelr6 -ne '.say'
11:04 grondilu *perl6
11:04 timotimo r: my $s; for ({ $*IN.get } ... *) { $s += 1; }; say $s;
11:04 camelia rakudo 38a0f9: OUTPUT«(timeout)»
11:04 timotimo r: my $s; for ({ $*IN.get } ... $*IN.eof) { $s += 1; }; say $s;
11:04 camelia rakudo 38a0f9: OUTPUT«(timeout)»
11:04 timotimo r: say $*IN.^methods
11:04 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>␤»
11:04 moritz I'm pretty sure $*IN.eof is evaluated only once
11:04 timotimo oh
11:04 grondilu timotimo: you don't have to use $*IN explicitely
11:04 timotimo r: my $s; for ({ $*IN.get } ... { $*IN.eof }) { $s += 1; }; say $s;
11:04 camelia rakudo 38a0f9: OUTPUT«24␤»
11:05 timotimo yes that's better
11:06 timotimo hm, well, lines uses a gather/take that really should be lazy.
11:07 timotimo and map should be lazy, too! weird.
11:08 moritz well
11:08 moritz map is lazy
11:09 moritz 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'?
11:10 moritz maybe
11:10 timotimo all in all, that's very unhelpful.
11:10 dmol1 joined #perl6
11:10 timotimo however, why does it work when i do the { $*IN.get } ... { $*IN.eof } hack?
11:13 * grondilu guess it's because of the sequence operator with a closure at the end
11:14 timotimo i don't understand.
11:14 * grondilu thinks it forces the laziness of the for
11:14 grondilu kind of the same reason why for 1, 2 ... * { ... } works
11:16 timotimo it can't be buffering in the input buffer, can it?
11:16 timotimo using gather while True { take $*IN.get } has the same problem lines() does, it seems
11:16 timotimo have gather blocks suddenly become eager? >_>
11:17 grondilu you mean gather while True { take get; last if eof }
11:18 timotimo yeah.
11:18 grondilu or gather until eof { take get }
11:18 timotimo eof doesn't seem to be built
11:18 * grondilu can try that right now as he's recompiling rakudo
11:18 flussence r: gather take get until eof
11:18 camelia rakudo 38a0f9: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/FaqOU8ura4â�¤Undeclared routine:â�¤    eof used at line 1â�¤â�¤Â»
11:19 moritz $*ARGS.eof or so
11:20 grondilu sub eof { $*IN.eof }  # just had that in you .perl6rc  :)
11:21 * grondilu knows there is no such thing as .perl6rc, but you know what I mean
11:21 grondilu .-2s/had/add/
11:22 grondilu .-3s/you/&r/
11:24 daxim ewww, is that viml?
11:26 dalek nqp: 459e172 | (Timo Paulssen)++ | / (6 files):
11:26 dalek nqp: initial draft of optimizer, inactive ATM.
11:26 dalek nqp: review: https://github.com/perl6/nqp/commit/459e1726ef
11:26 dalek nqp: ba977c2 | (Timo Paulssen)++ | src/NQP/Optimizer.nqp:
11:26 dalek nqp: working build, lots of debug output, more intelligence.
11:26 dalek nqp: review: https://github.com/perl6/nqp/commit/ba977c23bf
11:26 dalek nqp: 8bea225 | (Timo Paulssen)++ | src/NQP/Optimizer.nqp:
11:26 dalek nqp: nqp-jvm doesn't like negative nums in substr
11:26 dalek nqp: review: https://github.com/perl6/nqp/commit/8bea225f8b
11:26 dalek nqp: e63cc6f | (Timo Paulssen)++ | src/NQP/Optimizer.nqp:
11:26 dalek nqp: this should have been gone already.
11:26 dalek nqp: review: https://github.com/perl6/nqp/commit/e63cc6f7b0
11:26 dalek nqp: 60e9b7e | (Timo Paulssen)++ | src/NQP/Optimizer.nqp:
11:26 dalek nqp: little improvements. actually finds symbols now.
11:26 dalek nqp: review: https://github.com/perl6/nqp/commit/60e9b7ed48
11:26 dalek nqp: 3e45f29 | (Timo Paulssen)++ | src/NQP/Optimizer.nqp:
11:26 dalek nqp: removed debug output
11:26 timotimo ^ seemed good enough to be merged
11:26 dalek nqp: review: https://github.com/perl6/nqp/commit/3e45f29869
11:26 dalek nqp: f1d040d | (Timo Paulssen)++ | / (6 files):
11:26 dalek nqp: Merge branch 'origin/nqp-optimizer'
11:26 dalek nqp:
11:26 dalek nqp: This gives us an optimizer for NQP that removes some int to num and
11:26 dalek nqp: num to int coercions if they are superfluous.
11:26 dalek nqp: review: https://github.com/perl6/nqp/commit/f1d040dc4c
11:34 dalek Perlito: 3158ca6 | (Flavio S. Glock)++ | / (2 files):
11:34 dalek Perlito: Perlito5 - perl5 - tweak the perl5 pretty-printer
11:34 dalek Perlito: review: https://github.com/fglock/Perlito/commit/3158ca6760
11:35 donaldh joined #perl6
11:36 donaldh testing binary IO ops on JVM, I guess there are encoding differences I cannot see visually: https://gist.github.com/donaldh/b66e23a436daed71cdcd
11:37 timotimo you can always pipe it through xxd
11:37 timotimo also, maybe on the way "out" it gets mangled?
11:37 moritz tests pass here
11:38 moritz donaldh: what's your locale?
11:38 donaldh moritz: en_GB.UTF-8
11:39 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.
11:39 donaldh :)
11:39 moritz try printing out the Buf/Blob objects directly
11:51 woolfy joined #perl6
11:55 dalek Perlito: 5b1c58c | (Flavio S. Glock)++ | / (2 files):
11:55 dalek Perlito: Perlito5 - perl5 - tweak the perl5 pretty-printer
11:55 dalek Perlito: review: https://github.com/fglock/Perlito/commit/5b1c58c5df
11:57 kbaker joined #perl6
12:03 JimmyZ_ joined #perl6
12:07 dalek Perlito: 819f0a3 | (Flavio S. Glock)++ | / (2 files):
12:07 dalek Perlito: Perlito5 - perl5 - tweak the perl5 pretty-printer
12:07 dalek Perlito: review: https://github.com/fglock/Perlito/commit/819f0a3455
12:19 fhelmberger_ joined #perl6
12:20 jnap joined #perl6
12:28 dalek Perlito: 17e8217 | (Flavio S. Glock)++ | / (2 files):
12:28 dalek Perlito: Perlito5 - perl5 - tweak the perl5 pretty-printer
12:28 dalek Perlito: review: https://github.com/fglock/Perlito/commit/17e82172f2
12:34 census joined #perl6
12:37 dalek Perlito: 22db30e | (Flavio S. Glock)++ | / (3 files):
12:37 dalek Perlito: Perlito5 - grammar compiler - tweak the perl5 pretty-printer
12:37 dalek Perlito: review: https://github.com/fglock/Perlito/commit/22db30e1b6
12:42 pmichaud FROGGS: ping
12:42 dalek Perlito: d6aeb0d | (Flavio S. Glock)++ | / (3 files):
12:42 dalek Perlito: Perlito5 - grammar compiler - tweak the perl5 pretty-printer
12:42 dalek Perlito: review: https://github.com/fglock/Perlito/commit/d6aeb0de3a
12:42 FROGGS pmichaud: pong
12:42 pmichaud did you really mean  <[\s+\r\n]>  in your comment on https://github.com/perl6/std/pull/5#issuecomment-23252504 ?
12:43 ajr joined #perl6
12:43 FROGGS pmichaud: I think so, yes
12:43 pmichaud \s already includes \r and \n
12:43 pmichaud and we probably don't want to match +
12:43 FROGGS ahh
12:43 FROGGS yes
12:44 FROGGS but I posted " <[\s\r\n]>+ ", see :P
12:44 FROGGS (I edited my comment right now)
12:44 pmichaud which is shorter as  \s+  :-)
12:44 FROGGS and edited again -.-
12:45 FROGGS yeah, I recognized it after writing here
12:45 FROGGS I just can blame that and me having a cold
12:45 FROGGS s/and/on/
12:45 FROGGS -.-
12:45 pmichaud colds can do that, definitely.
12:45 pmichaud I think a lot of the synopses may be to TimToady++ colds.  :-P :-P
12:45 FROGGS my brain is a bit slow these days
12:45 FROGGS *g*
12:46 pmichaud *be due to
12:46 FROGGS pssssst, this channel is logged
12:46 FROGGS we tend to rant about TimToady in #rant-a-toady
12:46 ggoebel joined #perl6
12:46 FROGGS TimToady++ even
12:47 Ulti left #perl6
12:49 pmichaud I tend to be more public in my rants.  :)
12:50 FROGGS yeah, this might bring up more well-considered rants
12:51 not_gerd joined #perl6
12:51 kaleem joined #perl6
12:51 not_gerd o/
12:51 FROGGS hi not_gerd
12:52 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 not_gerd *that's
12:52 FROGGS nr: say substr("abc", -5, 1)
12:52 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…
12:52 camelia ..niecza v24-88-g1f87209: OUTPUT«(Str)␤»
12:53 FROGGS not_gerd: you meant offset?
12:53 FROGGS nr: say substr("abc", *-5, 1)
12:53 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 …
12:53 camelia ..niecza v24-88-g1f87209: OUTPUT«(Str)␤»
12:53 not_gerd I was looking at the JVM ops
12:54 not_gerd it checks `if (offset < 0) offset += val.length();`
12:54 not_gerd logically, argument could be made that it should be `while (offset < 0) offset += val.length();`
12:54 FROGGS hold on
12:54 pmurias joined #perl6
12:55 dalek Perlito: 53222da | (Flavio S. Glock)++ | / (4 files):
12:55 dalek Perlito: Perlito5 - grammar compiler - tweak the perl5 pretty-printer
12:55 dalek Perlito: review: https://github.com/fglock/Perlito/commit/53222da5a8
12:55 moritz not_gerd: I don't see what that would mean
12:55 moritz not_gerd: the current thing means "if it's negative, index from the end"
12:55 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?
12:56 moritz not_gerd: an error is reported to the user
12:56 clkao win2 4
12:56 dayangkun joined #perl6
12:56 FROGGS I can't find the spec about this
12:57 not_gerd nqp/jvm dies with StringIndexOutOfBoundsException
12:59 not_gerd also, if we overflow at the end, we just return an empty string
12:59 FROGGS true
13:00 FROGGS that speaks for the current impl
13:00 not_gerd (the current impl being throwing a VM error?!)
13:01 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
13:02 not_gerd (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?
13:02 FROGGS because substr("abc", *-17) is clearly a thinko, and shouldn't be hidden
13:02 FROGGS not_gerd: sure, we need to raise a X::
13:02 not_gerd FROGGS: and substr("abc", 42) isn't?
13:02 moritz nr: say substr('abc', 42)
13:02 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:02 camelia ..niecza v24-88-g1f87209: OUTPUT«(Str)␤»
13:03 FROGGS sanity++
13:03 moritz nwc10: we never wrap implicitly in the Perl 6-level substr
13:03 not_gerd r: nqp::substr("abc", 42)
13:03 camelia rakudo 38a0f9: OUTPUT«Cannot take substr outside string␤  in block  at /tmp/XsZs31YsMj:1␤␤»
13:03 not_gerd nqp: nqp::say(nqp::substr('abc', 42))
13:03 camelia nqp: OUTPUT«Cannot take substr outside string␤current instr.: '' pc 40 ((file unknown):39) (/tmp/5PTBCxr0sk:5)␤»
13:03 moritz nwc10: we wrap explicitly if the argument is a callable (e.g. *-42)
13:03 FROGGS nqp-jvm: nqp::substr("abc", 42)
13:04 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
13:04 moritz r: substr('abc', *-42)
13:04 FROGGS nqp-jvm: say(nqp::substr("abc", 42))
13:04 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 end␤current 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…
13:04 camelia nqp-jvm: OUTPUT«␤»
13:04 FROGGS LTA
13:04 nwc10 and I'm not even sure whether NQP should be stricter, and not take negative indexes
13:04 moritz nwc10: then we are in violent agreement
13:05 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
13:05 not_gerd I'd just like to have some consistency - either throw errors at both ends, or return empty strings
13:06 not_gerd I agree that wrapping around is probably not a good idea
13:06 not_gerd nqp-jvm: nqp::say(nqp::substr('abc', 1, 42))
13:06 camelia nqp-jvm: OUTPUT«bc␤»
13:07 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))
13:07 camelia nqp: OUTPUT«bc␤»
13:09 moritz nqp: nqp::say(nqp::substr('abc', 42))
13:09 camelia nqp: OUTPUT«Cannot take substr outside string␤current instr.: '' pc 40 ((file unknown):39) (/tmp/WONygss6Oe:8)␤»
13:10 moritz nqp: nqp::say(nqp::substr('abc', -1))
13:10 camelia nqp: OUTPUT«c␤»
13:10 moritz nqp: nqp::say(nqp::substr('abc', -2, -1))
13:10 camelia nqp: OUTPUT«␤»
13:10 moritz nqp: nqp::say(nqp::substr('abc', -2, 1))
13:10 camelia nqp: OUTPUT«b␤»
13:10 moritz nqp: nqp::say(nqp::substr('abc', 0, -1))
13:10 camelia nqp: OUTPUT«␤»
13:10 not_gerd note that Parrot and JVM don't agree in all of these cases
13:10 colomon joined #perl6
13:10 not_gerd (and MoarVM potentially just returns garbage ;))
13:10 timotimo maybe an evalbot for "the nqps" would be nice to have
13:11 timotimo since it automatically points out differences
13:11 moritz returning garbage isn't a good idea
13:11 not_gerd that's what I'm currently fixing
13:11 not_gerd the question is, what should I aim for?
13:11 timotimo moritz: getting at the allocation data of a string with sufficiently negative substr offsets, what's not to like?
13:12 not_gerd proposal: translate offset + length to start-index + end-index
13:12 not_gerd if either is out of range, adjust to fit string size
13:12 JimmyZ_ throw exception :)
13:13 moritz nqp-jvm: say(nqp::substr('abc', 0, 42))
13:13 camelia nqp-jvm: OUTPUT«abc␤»
13:13 not_gerd I'd only like to thro if boch indices are out of range
13:13 not_gerd ie if the window doesn't cover a substring at all
13:14 dalek nqp/shell3: 3adbc0a | (Pawel Murias)++ | src/vm/parrot/ops/nqp.ops:
13:14 dalek nqp/shell3: Make nqp::shell respect the 3 argument on linux.
13:14 dalek nqp/shell3: review: https://github.com/perl6/nqp/commit/3adbc0a494
13:14 pmurias FROGGS: could you check if the above commit compiles on windows?
13:16 FROGGS pmurias: will do
13:17 PacoAir joined #perl6
13:17 colomon pmichaud: nok exists and is used 587 times already in roast.  dunno about isnt, though
13:17 colomon errr, isnt is there too.
13:17 colomon much more rarely used, though.
13:20 * 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:21 FROGGS *g*
13:24 FROGGS pmurias: is there a test I can run afterwards?
13:25 btyler joined #perl6
13:26 pmurias FROGGS: currently things work the same under windows, I just want to check things build correctly after moving code
13:27 * [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.
13:27 FROGGS pmurias: k, nqp still compiles
13:27 FROGGS pmurias: do you want me do build rakudo too?
13:27 pmurias not yet
13:27 FROGGS k
13:27 pmurias test 78 passes?
13:28 markov joined #perl6
13:28 kaare_ joined #perl6
13:29 FROGGS pmurias: yes, nqp builds and 78 passes
13:30 dalek nqp/shell3: 6cbe2ef | (Pawel Murias)++ | src/vm/parrot/ops/nqp.ops:
13:30 dalek nqp/shell3: Pass the env variables on windows.
13:30 dalek nqp/shell3: review: https://github.com/perl6/nqp/commit/6cbe2ef83b
13:32 pmurias FROGGS: what's the output of http://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.
13:33 nwc10 [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:34 FROGGS pmurias: https://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.
13:35 nwc10 http://www.kdrhine.com/rhineschedule.htm )
13:36 notjack joined #perl6
13:36 pmurias FROGGS: that's after my last commit?
13:37 FROGGS pmurias: yes, revision is 2013.08-22-g3adbc0a
13:37 fhelmberger joined #perl6
13:38 pmurias where did you get the revision from?
13:39 FROGGS pmurias: git describe and nqp --version
13:40 xinming joined #perl6
13:40 pmurias commit 6cbe2ef83b7257ce958c1f4cc93c204ea6bc0955, and the results were after running make?
13:41 FROGGS brb
13:42 [Coke] nwc10: if FRA is a good option, that's fine.
13:44 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:45 xinming joined #perl6
13:45 virtualsue joined #perl6
13:47 pmurias rakudo: say $^OS;
13:47 camelia rakudo 38a0f9: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/l9rGMlmXFA�Cannot use placeholder parameter $^OS in the mainline�at /tmp/l9rGMlmXFA:1�------> [32msay $^OS[33m�[31m;[0m�»
13:47 pmurias rakudo: say $*OS;
13:47 camelia rakudo 38a0f9: OUTPUT«linux␤»
13:48 nwc10 oh boy. I would not want to be the owner of a business 94% dependent on RyanAir
13:48 nwc10 http://www.hahn-airport.de/Default.aspx?menu=departures&amp;cc=en
13:55 moritz :-)
13:56 rindolf joined #perl6
14:00 * FROGGS pulls and rebuilds
14:03 berekuk joined #perl6
14:07 FROGGS pmurias: https://gist.github.com/FROGGS/393b2db32957ba103f97
14:07 FROGGS https://gist.github.com/FROGGS/393b2db32957ba103f97/revisions
14:14 pmurias ah, I'm passing the env variable incorrectly on windows
14:17 daxim_ joined #perl6
14:18 donaldh joined #perl6
14:27 dalek Perlito: ae790ba | (Flavio S. Glock)++ | / (2 files):
14:27 dalek Perlito: Perlito5 - perl5 - tweak the perl5 pretty-printer
14:27 dalek Perlito: review: https://github.com/fglock/Perlito/commit/ae790ba30f
14:32 masak oh hai from an aeroplane! \o/
14:34 not_gerd https://github.com/MoarVM/MoarVM/blob/HEAD/src/strings/ops.c#L342
14:34 FROGGS masak: \o/
14:34 not_gerd ^ if someone want to see how nqp::substr() on MoarVM anded up behaving
14:34 not_gerd *ended
14:35 benabik joined #perl6
14:38 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;
14:39 FROGGS do I read that right that in case I want to read from end it always reads to the end?
14:39 FROGGS r: say nqp::substr("abcdef", -4, 2)
14:39 camelia rakudo 38a0f9: OUTPUT«cd␤»
14:40 Psyche^ joined #perl6
14:42 not_gerd FROGGS: length is the 3rd argument
14:42 not_gerd if you eant to read from the end, the 2nd needs to be negative
14:42 not_gerd *want
14:42 FROGGS r: say nqp::substr("abcdef", -4, 2) # <--- second is negative
14:42 camelia rakudo 38a0f9: OUTPUT«cd␤»
14:43 not_gerd but length is 2, which is != -1
14:43 FROGGS right
14:43 not_gerd so I'm not seeing what you're getting at
14:43 FROGGS ahh, hold on
14:44 FROGGS length = -1 does mean Inf
14:44 ajr joined #perl6
14:45 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
14:45 FROGGS I'd guess it should read up to strlen-offset
14:46 not_gerd length != strlen
14:46 not_gerd agraphs == strlen
14:46 lizmat joined #perl6
14:46 FROGGS length is number of graphemes to read... nvm then :o)
14:47 FROGGS I'm a bit dumb today
14:47 dalek Perlito: eb84bd7 | (Flavio S. Glock)++ | / (2 files):
14:47 dalek Perlito: Perlito5 - perl5 - tweak the perl5 pretty-printer - fix eval-block
14:47 dalek Perlito: review: https://github.com/fglock/Perlito/commit/eb84bd75d3
14:47 not_gerd basically, the substring is bounded by offset and offset+length
14:48 not_gerd we grab any parts of the string at lies in that interval
14:48 not_gerd then come the small compications that offset can count from the and and length == -1 signifies Inf
14:48 berekuk joined #perl6
14:49 not_gerd we only throw an error if the upper bound is < 0 or the lower bound > strlen
14:49 not_gerd neither Parrot nor JVM do it that way ;)
14:55 nwc10 JVM presumably copies Parrot.
14:55 not_gerd nwc10: it doesn't
14:55 nwc10 oh?
14:56 not_gerd nqp-jvm: nqp::say(nqp::substr('abc', 5))
14:56 camelia nqp-jvm: OUTPUT«␤»
14:56 not_gerd nqp: nqp::say(nqp::substr('abc', 5))
14:56 camelia nqp: OUTPUT«Cannot take substr outside string␤current instr.: '' pc 40 ((file unknown):39) (/tmp/NKEQ3mtRQ4:7)␤»
14:57 not_gerd nqp: nqp::say(nqp::substr('abc', -1))
14:57 camelia nqp: OUTPUT«c␤»
14:57 not_gerd nqp-jvm: nqp::say(nqp::substr('abc', -1))
14:57 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
14:57 camelia ..org.perl6.nqp.runtime.Ops.in…
14:59 not_gerd totally unbiased that I am, I like MoarVM's behaviour best ;)
14:59 FROGGS *g*
15:01 not_gerd oops
15:02 not_gerd I pushed more than I wanted to push :(
15:02 not_gerd there's some boying missing
15:04 bluescreen10 joined #perl6
15:09 not_gerd *boxing
15:24 pecastro joined #perl6
15:26 celesta joined #perl6
15:26 celesta ahoi #perl6
15:27 moritz \o celesta
15:27 [Coke] .seen tene
15:27 yoleaux I saw Tene 21 Aug 2013 19:55Z in #perl6: <Tene> pmichaud: My condolences for your loss.
15:28 lizmat .tell [Coke] FRA and yes
15:28 yoleaux 25 Aug 2013 21:54Z <[Coke]> lizmat: Which airport to fly to, FRA or HHN?, and also, any rooms left at the hotel?
15:28 yoleaux lizmat: I'll pass your message to [Coke].
15:29 lizmat .tell [Coke] no need to worry about accommodation
15:29 yoleaux lizmat: I'll pass your message to [Coke].
15:29 lizmat also: only 2 places left for the Rakudo and NQP Internals Workshop, 14/15 Sep in Frankfurt, Germany
15:30 btyler joined #perl6
15:30 lizmat If you want to get into supporting Perl 6 / Rakudo development with a flying start
15:30 lizmat this is the place to be!
15:30 [Coke] lizmat - when are accomodations available? (e.g. when should I book flights around?)
15:30 yoleaux 15:28Z <lizmat> [Coke]: FRA and yes
15:30 yoleaux 15:29Z <lizmat> [Coke]: no need to worry about accommodation
15:30 lizmat </and of promotional message>
15:30 [Coke] hugme: hug lizmat
15:30 * hugme hugs lizmat
15:31 lizmat accommodation has been booked with checkin on Fri and checkout on Mon
15:31 [Coke] Roger that.
15:32 lizmat if you're arriving earlier / leaving later, let me know
15:32 colomon lizmat++
15:34 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.
15:34 * timotimo is pretty new to traveling by car
15:35 * [Coke] is squee-excited.
15:35 lizmat the hotel policies of the reservation states: Guest parking:
15:35 lizmat Free public parking is possible at a location nearby (reservation is not possible).
15:36 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?
15:36 FROGGS hmmmm
15:36 dalek rakudo/nom: 283f763 | (Elizabeth Mattijsen)++ | src/core/ (2 files):
15:36 dalek rakudo/nom: Make @a.VAR.name and %h.VAR.name work
15:36 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/283f763a5e
15:36 TimToady std: 42\      i
15:36 camelia std 06636e4: OUTPUT«ok 00:00 41m␤»
15:37 FROGGS TimToady: then it is really just about a blank line
15:37 TimToady std: 42\ \ i
15:37 camelia std 06636e4: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Postfix found where infix expected (change whitespace?) at /tmp/MTXcim2yp8 line 1:â�¤------> [32m42\ \ [33mâ��[31mi[0mâ�¤    expecting any of:â�¤        horizontal whitespaceâ�¤  infix or meta-infixâ�¤    infixed functionâ�¤       postcircumfixâ�¤  postfixâ�¤
15:37 camelia ..    postfix_…
15:37 TimToady unless we decide 42\   \i should work too
15:37 pecastro_ joined #perl6
15:38 TimToady but I'm not convinced about that part
15:38 FROGGS 42\
15:38 FROGGS \
15:38 FROGGS \ i
15:38 TimToady the blank line part seems harmless-ish
15:38 TimToady that would also work, though lacks a kind of visual symmetry...
15:39 PerlJam almost looks like a C++-ism comment block
15:39 PerlJam s/ism/ish/
15:44 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:46 FROGGS[mobile] joined #perl6
15:47 TimToady and Uni, and NFD, and NFC...
15:48 timotimo indeed.
15:49 * timotimo is a tiny bit more fond of replacing strings of infix:<~> with a join with "" during optimization :|
15:56 colomon joined #perl6
15:59 zakharyas joined #perl6
16:00 pmurias can the sh be located somewhere else then /bin/sh on a unixy system?
16:01 pmurias that is can I change execl(...) to execlp(...)?
16:02 lizmat r: my &a; say &a; my Int &b; say &b  # somehow expected Any,Int
16:02 camelia rakudo 38a0f9: OUTPUT«(Any)␤(Any)␤»
16:04 dalek roast: a6a46c3 | (Elizabeth Mattijsen)++ | S02-names/name.t:
16:04 dalek roast: Tests for .VAR.name
16:04 dalek roast: review: https://github.com/perl6/roast/commit/a6a46c3ae7
16:05 dalek rakudo/nom: efc4efd | (Elizabeth Mattijsen)++ | t/spectest.data:
16:05 dalek rakudo/nom: Make sure .VAR.name tests are run
16:05 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/efc4efdd1b
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.)
16:06 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:08 btyler_ joined #perl6
16:11 FROGGS joined #perl6
16:14 JimmyZ_ joined #perl6
16:23 TimToady timotimo: join '' still doesn't help with the string types though
16:23 TimToady and it's not like we've figured out how to enforce types on slurpies yet either...
16:25 TimToady and how much coercion we allow between related string types is also underspecced
16:27 fhelmberger joined #perl6
16:29 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 :|
16:30 lizmat but NFG would only be internal, no ?
16:30 TimToady yes
16:30 lizmat so opaque to the user, I would think ?
16:30 TimToady presumably an IO handle has the ability to specify the downcasting
16:31 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
16:32 TimToady 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 TimToady 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 #perl6
16:32 lizmat why not always do everything internally in NFG ?
16:32 lizmat and decode on the way out ?
16:32 TimToady we could have a named arg to infix:<~> etc. that specifies desired result type, if not NFG
16:33 TimToady well, that's the default, but some code will want to work intentionally in lower abstraction levels
16:33 TimToady another approach is to coerce everthing to the type of the first argument
16:34 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 jnthn Then we fixed it to always make an Int :)
16:34 TimToady nodnod
16:34 jnthn Where we was probably moritz++ :)
16:35 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:36 TimToady 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)
16:36 TimToady NFG is our Int, while Uni/NFD/NFC/utf8 etc are more like native types
16:36 timotimo nqp only deals with str and things that would be str-ified
16:36 timotimo afaict
16:37 jnthn gonna go for nomz
16:37 jnthn bbl
16:37 lowpro30 joined #perl6
16:37 jnthn &
16:37 timotimo gonna go for groceries :)
16:39 diakopter NF* is lossy
16:39 diakopter b/c it reorders things
16:39 diakopter so you can't use it when you need to output exactly what was inputted bit for bit
16:41 rindolf joined #perl6
16:43 lizmat diakopter: why would NFG be lossy ?
16:43 lizmat or are you referring to *valid* unicode combinations not coming back uncombined ?
16:44 diakopter b/c it's the same as NFC
16:44 diakopter they reorder combining codepoints
16:45 diakopter 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
16:45 lizmat so that it can restore it on output ?
16:45 benabik O.o
16:46 benabik 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
16:46 diakopter yeah
16:46 TimToady if you want round tripping, you must work in a lower abstraction level
16:47 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 timotimo round trippin' with my two favorite languages / fully loaded we got codes and graphemes
16:47 lizmat diakopter: that is clear
16:48 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
16:48 diakopter right. can't use strings
16:48 Pleiades` joined #perl6
16:48 lizmat because of normalization
16:49 lizmat otoh, that will only happen once, any subsequent processing of the same file would not change anything
16:50 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..
16:50 diakopter other programs may re-corrupt it
16:50 lizmat diakopter: yes, that was the assumption
16:50 benabik And Bufs are there for the other 10%.
16:51 diakopter benabik: but binary data will have "codepoints" outside unicode
16:51 diakopter [if you try to decode it as such]
16:51 * lizmat is reminded of a system in which *each* codepoint would be remapped to a BER encoded integer
16:51 benabik diakopter: Treating binary data as Unicode is a mistake?
16:52 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 dmol joined #perl6
16:52 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
16:52 diakopter if you want a Str
16:52 lizmat in practice, that meant bytes for most text files, as they would have fewer than 256 different codepoints in them
16:53 diakopter lizmat: but that's exactly what nfg does.. :P
16:53 lizmat hmmm.. BER would mean 127, but yes, you get the idea
16:53 lizmat I thought it only did that for codepoints that could not combine ?
16:53 benabik Why do you want a Str for binary data?
16:54 diakopter no, also codepoints >127
16:54 colomon joined #perl6
16:54 diakopter benabik: it's just that most of the io "ops" return strings
16:55 lizmat but why not go all the way then?
16:55 TimToady all the way where?
16:55 diakopter map every used codepoint?
16:55 lizmat well, not treat ASCII specially,
16:55 lizmat map every codepoint?
16:56 benabik S32-IO has write(Buf), but not read( --> Buf)
16:56 lizmat every *used* codepoint, that is
16:56 benabik Although slurp can return a Buf apparently.
16:57 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
16:57 FROGGS so, a read( :bin ) would be needed
16:57 benabik FROGGS: slurp returns Str|Buf depending on your desired encoding.
16:57 diakopter well you could pass a scalar ref. <hide>
16:58 TimToady we will have to be more particular in cases where we want a particular type to be read
16:58 SamuraiJack_ joined #perl6
16:58 woolfy1 joined #perl6
17:00 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 Perlito: 0cbac5f | (Flavio S. Glock)++ | / (2 files):
17:00 dalek Perlito: Perlito5 - perl5 - emit subroutine signature
17:00 dalek Perlito: review: https://github.com/fglock/Perlito/commit/0cbac5f1af
17:01 TimToady Str vs Buf is an oversimplification
17:02 TimToady maybe it defaults to NFG, but you can requrest NFD, NFC, or Uni (raw codepoints, unnormalized)
17:02 TimToady Buf defaults to Buf8, but there are other buf sizes, as well as blobs of utf8, utf16, etc.
17:03 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
17:04 TimToady 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 TimToady *hide
17:04 TimToady that was the Perl 5 mistake, and we're making different mistakes this time
17:05 TimToady "binary" is underspecified, so it's kind of a bad word, like "length"
17:06 TimToady "string" is also underspecified, so it's also kind of a bad word
17:07 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:08 spider-mario joined #perl6
17:08 TimToady well, unless they return Blob[type]
17:09 benabik Although IO with anything other than 8 bit types also has to worry about endian-ness, etc.  :-/
17:09 * masak waves from Oslo
17:09 * lizmat waves back from Echt
17:10 lizmat r: my &a; say &a; my Int &b; say &b  # somehow expected Any,Int
17:10 camelia rakudo efc4ef: OUTPUT«(Any)␤(Any)␤»
17:10 lizmat is this a rakudobug ?
17:10 berekuk joined #perl6
17:10 benabik What's `my Int &b` supposed to be?  A function that returns Int?
17:10 lizmat yes
17:10 lizmat that's how I read it
17:10 masak lizmat: don't think it's a bug.
17:11 masak 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
17:11 dalek Perlito: 3958e2f | (Flavio S. Glock)++ | / (2 files):
17:11 dalek Perlito: Perlito5 - perl5 - emit shift left/right
17:11 dalek Perlito: review: https://github.com/fglock/Perlito/commit/3958e2f6bd
17:11 lizmat which would be indistinguishable from Int, no?
17:12 masak I'm not sure Any qualifies as a function that returns an Int, so maybe that's the bug.
17:12 masak dinner &
17:12 benabik r: say Int()
17:12 camelia rakudo efc4ef: OUTPUT«0␤»
17:13 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 xinming joined #perl6
17:14 ajr joined #perl6
17:22 woolfy joined #perl6
17:23 Pleiades` joined #perl6
17:29 donaldh Debugging the slurp test faiures on JVM. Looks like a JVM bug to me: https://gist.github.com/donaldh/6344106
17:30 denis_boyun joined #perl6
17:30 FROGGS what do you mean?
17:30 timotimo what does the limit mean?
17:31 FROGGS the chars/elems I guess
17:31 FROGGS 29 chars but 39 bytes
17:31 benabik I don't see a bug there.  The UTF-8 encoding of that string is 39 bytes.
17:32 benabik Although Vim saves it as 40 bytes.  :-/
17:33 moritz benabik: trailing newline?
17:33 TimToady or inserted a CR?
17:33 benabik moritz: There's a trailing newline in the string.
17:33 Faxmachinen joined #perl6
17:33 Faxmachinen Hi!
17:34 Faxmachinen Anyone know of a clever way to transform a two-dimensional list?
17:34 TimToady o/
17:34 benabik Oh.  Yes, there is a newline after the newline.  moritz++
17:34 moritz Faxmachinen: depends on the transformation
17:34 FROGGS 39 bytes on my box (and 29 chars)
17:35 Faxmachinen Sorry, I meant transpose
17:36 moritz http://rosettacode.org/wiki/Matrix_transposition#Perl_6
17:36 donaldh hmmm.
17:36 donaldh When I look at the written file, it has nulls.
17:36 donaldh Or something.
17:37 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
17:37 Faxmachinen Or something like that
17:37 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
17:39 FROGGS **
17:39 danaj joined #perl6
17:39 FROGGS *g*
17:39 FROGGS no, should be *i*
17:39 TimToady ii, captain
17:40 TimToady ^bold on some printers
17:40 donaldh okay, barking up wrong tree. Asymmetry creeping in elsewhere.
17:40 * FROGGS .oO( a 2nd captain? )
17:40 geekosaur just zaphod
17:40 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
17:40 TimToady captains are supposed to be bold
17:40 TimToady except for your airplane captain
17:40 Faxmachinen Hmm. Well, the zip operator kinda does it
17:41 FROGGS Picard was never bold, though Kirk was around the middle
17:41 lizmat some captains are even bald
17:41 * [Coke] hurls http://mathwithbaddrawings.com/2013/08/13/the-kaufman-decimals/ and shivers.
17:43 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␤»
17:43 TimToady r: say [Z]([1,2,3],[4,5,6],[7,8,9]).tree.perl
17:43 camelia rakudo efc4ef: OUTPUT«([1, 4, 7], [2, 5, 8], [3, 6, 9]).list␤»
17:43 Faxmachinen Then I just gotta figure out an elegant way to split a flat array into n parts of equal size
17:44 timotimo it's not flat :)
17:44 TimToady this one should work with .tree
17:44 TimToady well, the Xxx should work too, but doesn't...
17:44 Faxmachinen Or that, yes :)
17:44 Faxmachinen You're right, it's not flat
17:45 Faxmachinen Genius!
17:46 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())␤»
17:46 TimToady .perl should not give up on a list like that
17:47 TimToady r: say [Z]([1,2,3],[4,5,6],[7,8,9]).lol.[0]
17:47 camelia rakudo efc4ef: OUTPUT«ListIter.new()␤»
17:47 TimToady bleah
17:48 TimToady r: say [Z]([1,2,3],[4,5,6],[7,8,9]).lol.[0][0]
17:48 camelia rakudo efc4ef: OUTPUT«ListIter.new()␤»
17:48 TimToady !lol
17:49 [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␤»
17:49 TimToady lol is post-pugs
17:49 [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:52 dalek Perlito: a1b4639 | (Flavio S. Glock)++ | / (2 files):
17:52 dalek Perlito: Perlito5 - perl5 - emit function deref
17:52 dalek Perlito: review: https://github.com/fglock/Perlito/commit/a1b4639ba2
17:56 notjack r: say.WHAT
17:56 camelia rakudo efc4ef: OUTPUT«␤»
17:56 timotimo r: say.WHAT.say
17:56 camelia rakudo efc4ef: OUTPUT«␤(Bool)␤»
17:56 notjack r: say.WHAT? 'no':'he di-int';
17:56 camelia rakudo efc4ef: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/SdemB7xier�Unsupported use of ?: for the conditional operator; in Perl 6 please use ??!!�at /tmp/SdemB7xier:1�------> [32msay.WHAT?[33m�[31m 'no':'he di-int';[0m�»
17:57 [Coke] r: $^u.WHAT.say
17:57 camelia rakudo efc4ef: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/Tsrslnjce1�Cannot use placeholder parameter $^u in the mainline�at /tmp/Tsrslnjce1:1�------> [32m$^u[33m�[31m.WHAT.say[0m�»
17:57 FROGGS r: say.WHAT?? 'no'!!'he di-int';
17:57 camelia rakudo efc4ef: OUTPUT«␤»
17:57 notjack r: say.WHAT?? 'no' !! 'he di-int';
17:57 camelia rakudo efc4ef: OUTPUT«␤»
17:57 TimToady std: r: say.WHAT?? 'no' !! 'he di-int';
17:57 camelia std 06636e4: OUTPUT«[31m===[0mSORRY![31m===[0m�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:�------> [32mr: say[33m�[31m.WHAT?? 'no' !! 'he di-int';[0m�Check failed�FAILED 00:00 42m�»…
17:58 donaldh <-fail. aaaaaargh.
17:59 sftp_ joined #perl6
17:59 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 donaldh They contained extra garbage. After the fix, they still contained extra garbage. They don't get truncated.
18:00 donaldh So the tests kept failing.
18:00 timotimo ooooh
18:01 anocelot_ joined #perl6
18:01 donaldh I'm guessing that the behaviour we want from nqp file open for "w" is WRITE, CREATE, TRUNCATE_EXISTING
18:02 donaldh not just WRITE, CREATE
18:02 BooK_ joined #perl6
18:02 FROGGS true, wa does not truncate of course
18:03 donaldh wa does WRITE, CREATE, APPEND
18:03 zby_home_ joined #perl6
18:03 FROGGS right
18:04 dagurval_ joined #perl6
18:04 dylanwh_ joined #perl6
18:05 gdey joined #perl6
18:06 japhb__ joined #perl6
18:07 donaldh yay, unfledged the binary slurp tests
18:07 donaldh *unfudged
18:09 btyler joined #perl6
18:10 timotimo very cool! :D
18:12 timotimo donaldh++
18:14 lizamae joined #perl6
18:15 lizamae Hi
18:15 lizamae Helo
18:15 timotimo that was a short visit
18:16 sjohnson he's a busy guy.
18:19 felher joined #perl6
18:23 dalek rakudo/nom: fe289bf | (Elizabeth Mattijsen)++ | src/core/Str.pm:
18:23 dalek rakudo/nom: Naive implementation of Str.tc and tc(Str)
18:23 dalek rakudo/nom:
18:23 dalek rakudo/nom: Waiting for RaNIW to implement nqp::tc as an exercise
18:23 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/fe289bf2dc
18:24 tadzik :)
18:25 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)␤»
18:25 * grondilu has no idea what Str.tc is
18:25 PerlJam grondilu: tc == titlecase
18:25 lizmat method "tc" on a Str
18:25 grondilu oh yeah.
18:26 grondilu I thought this was implemented already.
18:26 PerlJam me too
18:26 * lizmat was going through spectest to see whether any rakudo skip's could be removed, or changed into todo's
18:26 lizmat and found that .tc wasn't implemented
18:26 PerlJam lizmat++
18:27 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␤␤»
18:27 lizmat you will have to wait for a bit before camelia has caught up
18:27 grondilu would it turn "heLLo" into "Hello" or "HeLLo"?
18:28 lizmat HeLLo
18:28 lizmat you want tclc for Hello
18:28 grondilu ok
18:31 abnorman joined #perl6
18:32 ssutch joined #perl6
18:37 lizmat r: my $?OS = BEGIN $*OS  # wouldn't this be the way to implement $?OS in settings ?
18:37 camelia rakudo efc4ef:  ( no output )
18:38 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␤␤»
18:43 lizmat hmmm… seems $*OS is unspecced ?
18:44 tadzik I think so
18:44 lizmat r: say $*OS  # should this be $*DISTRO ?
18:44 camelia rakudo efc4ef: OUTPUT«linux␤»
18:45 lizmat r: say $*OSVER
18:45 camelia rakudo efc4ef: OUTPUT«2.6.32-5-amd64␤»
18:46 lizmat also not specced
18:46 lizmat TimToady: is this an implementation problem, or a spec problem?
18:47 spider-mario joined #perl6
18:49 diakopter camelia needs auto-complete
18:50 diakopter *giggle*
18:50 lizmat is there a way to freeze a compile time value into serialized code ?
18:51 diakopter if you put it into a begin block and compile it to a .pbc then it's there
18:53 lizmat but wouldn't that compile the *code* to get at the value ?
18:53 lizmat in other words: would "my $?OS = BEGIN $*OS" serialize the value of $*OS, or the opcode to get the value of $*OS ?
18:54 lizmat you're saying the former ?
18:54 diakopter no, it compiles the resulting value; it runs the begin block at compile time
18:54 lizmat ok, cool, so it *would* be the way to implement *?OS
18:54 diakopter then during its "fake compile time" (loading the module) it loads it
18:55 lizmat *and* it would be a reason for an "is readonly" variable attribute after all as well
18:55 lizmat no, of course not
18:55 lizmat my $?OS ::= BEGIN $*OS
18:56 lizmat 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 #perl6
18:56 diakopter or exception-throwing STORE
18:59 TimToady you probably want: constant $?foo = stuff
18:59 lizmat indeed
18:59 TimToady since $?foo is supposed to be compile-time constants, generally
19:00 lizmat just finding the tests for that  :-)
19:00 TimToady and ::= is only readonly, and can change meaning on the next invocation
19:00 lizmat ok, clear
19:00 lizmat TimToady: wrt $*OS and $*OSVER, are the not specced
19:01 lizmat or are they prematurely implemented ?
19:01 diakopter r: constant $a ::= END { 4 }; say $a; END { say $a };
19:01 camelia rakudo efc4ef: OUTPUT«Nil␤Nil␤»
19:01 TimToady premature
19:03 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
19:03 TimToady nobody's really implemented the spec yet
19:04 lizmat the mythical Application object, I gather from the spec
19:04 TimToady Application?
19:05 TimToady "OS" is another one of those underspecified concepts
19:06 TimToady conducive to sloppy thinking
19:06 sjn joined #perl6
19:06 TimToady probably just about as bad as "length"
19:07 lizmat S28:86
19:07 synopsebot Link: http://perlcabal.org/syn/S28.html#line_86
19:07 lizmat wrt Application
19:08 lizmat Variable          Spec  Type         Description
19:08 cognominal joined #perl6
19:08 lizmat $?DISTRO          S02   Application  # Which OS distribution am I compiling under
19:09 skyheights joined #perl6
19:09 TimToady I don't remember naming them that, and certainly the name is negotiable
19:10 lizmat seems masak was responsible for that lnie
19:10 lizmat line
19:11 FROGGS a masakbug! finally!
19:13 spider-mario joined #perl6
19:15 Faxmachinen Is there any way to X+ lazily?
19:15 FROGGS Faxmachinen: use binding
19:15 TimToady those are all, on one level or other, the "Operating System", so maybe OS or System is the type
19:16 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 #perl6
19:16 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"
19:16 camelia rakudo fe289b: OUTPUT«alive␤»
19:16 FROGGS r: my @result := ^Inf X+ ^Inf; say "alive"; say @result[0]
19:16 camelia rakudo fe289b: OUTPUT«alive␤0␤»
19:16 FROGGS r: my @result := ^Inf X+ ^Inf; say "alive"; say @result[42]
19:16 camelia rakudo fe289b: OUTPUT«alive␤42␤»
19:16 skyheights joined #perl6
19:17 FROGGS hmmm
19:17 TimToady S03:4754
19:17 synopsebot Link: http://perlcabal.org/syn/S03.html#line_4754
19:17 Faxmachinen I tried "my @foo := ^Inf X+ ^3", but it hangs
19:18 Rotwang1 joined #perl6
19:18 FROGGS r: my @foo := ^Inf X+ ^3
19:18 camelia rakudo fe289b: OUTPUT«(timeout)»
19:18 FROGGS maybe because one side is finite
19:18 FROGGS :/
19:19 Faxmachinen That can be fixed
19:19 Faxmachinen r: my @foo := ^Inf X+ (^3 xx *)
19:19 camelia rakudo fe289b: OUTPUT«(timeout)»
19:19 Faxmachinen Hmm
19:21 TimToady r: (my @foo) := ^Inf X+ ^3; say @foo[5]
19:21 camelia rakudo fe289b: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/XuOJMBRu0Nâ�¤Cannot use bind operator with this left-hand sideâ�¤at /tmp/XuOJMBRu0N:1â�¤------> [32m(my @foo) := ^Inf X+ ^3[33mâ��[31m; say @foo[5][0mâ�¤    expecting any of:â�¤        postfixâ�¤Â»
19:21 Faxmachinen Now that I think about it, that wouldn't make any sense anyway
19:22 TimToady r: constant x = ^Inf X+ ^3; say x[5]
19:22 camelia rakudo fe289b: OUTPUT«3␤»
19:22 diakopter TimToady: now you done it :)
19:22 Faxmachinen Hehe
19:23 TimToady n: my @foo := ^Inf X+ ^3; say @foo[5]
19:23 camelia niecza v24-88-g1f87209: OUTPUT«3␤»
19:23 TimToady rakudobug on the := being eager
19:24 diakopter r: my @foo := BEGIN { ^Inf X+ ^3 }; say @foo[5]
19:24 camelia rakudo fe289b: OUTPUT«3␤»
19:24 diakopter r: say 'alive'; my @foo := BEGIN { ^Inf X+ ^5000000 }; say @foo[5]
19:24 camelia rakudo fe289b: OUTPUT«(timeout)alive␤»
19:25 diakopter wat.
19:25 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.
19:26 TimToady by not reifying ^5000000 yet
19:26 benabik It reifies at the binding?
19:26 TimToady shouldn't
19:27 TimToady r: say 'alive'; my @foo := BEGIN { ^Inf X+ ^5000000 };
19:27 camelia rakudo fe289b: OUTPUT«(timeout)alive␤»
19:27 TimToady r: say 'alive'; my @foo := BEGIN { ^Inf X+ ^5 };
19:27 diakopter r: say 'alive'; my @foo; BEGIN { @foo := ^Inf X+ ^5000000 }; say @foo[5]
19:27 camelia rakudo fe289b: OUTPUT«(timeout)alive␤»
19:27 camelia rakudo fe289b: OUTPUT«alive␤(Any)␤»
19:27 diakopter O_O
19:28 jnap joined #perl6
19:28 TimToady r: my @foo := ^50000000;
19:28 camelia rakudo fe289b:  ( no output )
19:28 grondilu I don't know what you did guys but today compilation of rakudo takes its sweet time
19:29 panchiniak joined #perl6
19:29 FROGGS grondilu: what do you mean?
19:29 TimToady we sneakily started some other processes on your machine
19:29 diakopter we slowed the rotation of the earth
19:29 diakopter also, its revolution.
19:29 grondilu FROGGS: I don't know, but I have had a compilation running for more than twenty minutes now.
19:29 FROGGS diakopter: that would be cool actually
19:30 FROGGS grondilu: ohh
19:30 FROGGS timotimo++ merged a optimization in :/
19:30 grondilu (and I had a segfault just before that.  Don't know why)
19:32 diakopter grondilu: it's your segment's fault
19:32 diakopter blame the segment
19:32 FROGGS *g*
19:33 * TimToady blames the mentation of the seg
19:34 grondilu not related:  can a multi method dispatch depend on the invocant?  If so, what's the syntax?
19:35 grondilu std: class { multi method foo($me: where $me ~~ /bar/) {...} }
19:35 camelia std 06636e4: OUTPUT«ok 00:00 47m␤»
19:35 grondilu r: class Foo is Str { multi method foo($me: where $me ~~ /bar/) {...} }; my Foo $b = "bar"; $b.foo;
19:35 camelia rakudo fe289b: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/KUvBCQXrczâ�¤Cannot do non-typename cases of type_constraint yetâ�¤at /tmp/KUvBCQXrcz:1â�¤------> [32mmulti method foo($me: where $me ~~ /bar/[33mâ��[31m) {...} }; my Foo $b = "bar"; $b.foo;[0mâ�¤    expecting any…
19:36 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␤␤»
19:36 FROGGS r: multi sub foo($me where $me ~~ /bar/) {...}; foo("bar")
19:36 camelia rakudo fe289b: OUTPUT«Stub code executed␤current 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)…
19:36 lizmat TimToady: I just realized that :exists on [] is not implemented
19:37 lizmat 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;
19:37 camelia rakudo fe289b: OUTPUT«Type check failed in assignment to '$b'; expected 'Foo' but got 'Str'␤  in block  at /tmp/ekpnwYMkKy:1␤␤»
19:37 lizmat *isn't either
19:38 kivutar joined #perl6
19:40 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«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/6w9yTbp8msâ�¤Unable to parse expression in quote words; couldn't find final '>'â�¤at /tmp/6w9yTbp8ms:1â�¤------> [32m; <--- that is your problem, not the mmd[33mâ��[31m<EOL>[0mâ�¤    expecting any of:â�¤        post…
19:40 timotimo FROGGS: why the :/ ?
19:41 timotimo oh, you think maybe i broke the build?
19:41 FROGGS timotimo: because grondilu mentioned that his rakudo build took ages
19:41 FROGGS I've not tested it btw
19:41 timotimo that's weird. it got a bit faster for me for parrot and the same speed for jvm
19:42 lizmat grondilu: when testing timotimo's changes, I had to get rid of my install dir
19:42 lizmat before it worked
19:43 timotimo oh yes, you need to re-run configure*.pl in your nqp
19:47 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)␤»
19:49 dalek nqp: 89894b0 | (Donald Hunter)++ | src/vm/jvm/ (7 files):
19:49 dalek nqp: Added nqp::readfh on JVM. Fixes / cleanup of nqp::writefh impl.
19:49 dalek nqp: review: https://github.com/perl6/nqp/commit/89894b0a40
19:51 Faxmachinen n: say (^Inf X+ ^3).perl
19:51 camelia niecza v24-88-g1f87209: OUTPUT«(timeout)»
19:51 Faxmachinen n: say (^Inf X+ ^3)[^5].perl
19:51 camelia niecza v24-88-g1f87209: OUTPUT«(0, 1, 2, 1, 2)␤»
19:55 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)␤»
19:56 diakopter r: say (^Inf XXX+ ^3 XXX+ ^3 XXX+ ^3)[^5].perl
19:56 camelia rakudo fe289b: OUTPUT«(0, 1, 2, 1, 2)␤»
19:56 diakopter o_O
19:57 flussence /<[XZ]>+/ is usually a no-op when dealing with auto-flattening lists
19:58 flussence r: say (^Inf XXX+ [^3] XXX+ [^3] XXX+ [^3])[^5].perl
19:58 camelia rakudo fe289b: OUTPUT«(0, 1, 2, 1, 2)␤»
19:58 flussence hm
19:58 flussence r: say (^Inf XXX+ [^3] XXX+ [^3] XXX+ [^3])[^15].perl
19:58 camelia rakudo fe289b: OUTPUT«(0, 1, 2, 1, 2, 3, 2, 3, 4, 1, 2, 3, 2, 3, 4)␤»
19:59 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_ joined #perl6
20:03 xenoterracide joined #perl6
20:11 Faxmachinen How would one make whatever the default argument value?
20:12 FROGGS r: sub a ( $p = * ) { say $p.WHAT }; a()
20:12 camelia rakudo fe289b: OUTPUT«(Whatever)␤»
20:12 d4l3k_ joined #perl6
20:12 diakopter dalek: wb?
20:13 Faxmachinen Hmm, you're right
20:13 eternaleye joined #perl6
20:16 Faxmachinen No idea how I got it to become WhateverCode
20:17 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␤␤»
20:18 Faxmachinen Oh, probably the test against whatever within the sub
20:18 Faxmachinen I suppose smartmatch against ::Whatever would be the right way?
20:18 btyler_ joined #perl6
20:18 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␤␤»
20:19 FROGGS r: sub a ( $p = * ) { say $p ~~ Whatever }; a()
20:19 camelia rakudo fe289b: OUTPUT«True␤»
20:20 FROGGS Faxmachinen: sometimes it is easier if you paste your one-liner here so we can see what you are trying
20:20 Faxmachinen I must be getting tired or something
20:20 Faxmachinen Also yes
20:20 _sri http://developers.slashdot.org/firehose.pl?op=view&amp;type=story&amp;sid=13/08/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. :-)"
20:21 Faxmachinen And you hit the nail on the head anyway
20:22 FROGGS me is tired too fwiw :o)
20:22 FROGGS but PIR got me :/
20:22 Faxmachinen r: say (2 ~~ Whatever), (2 === Whatever); # This is sort of surprising though
20:22 camelia rakudo fe289b: OUTPUT«FalseWhateverCode.new()␤»
20:23 btyler joined #perl6
20:23 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 #perl6
20:24 Faxmachinen It would be ~~ doing something special with whatever, since the default is to make a whatevercode, right?
20:24 benabik r: sub a ( $p = * ) { say $p ~~ Whatever }; a(); a(1)
20:24 FROGGS ~~ asks the RHS if it accepts the LHF, so yes
20:24 camelia rakudo fe289b: OUTPUT«True␤False␤»
20:25 benabik r: sub a ( $p = * ) { say $p ~~ * }; a(); a(1)
20:25 camelia rakudo fe289b: OUTPUT«True␤True␤»
20:25 benabik Ah.  Whatever accepts only *, * accepts whatever.
20:26 Faxmachinen r: say 2 ~~ Any; say 2 ~~ Whatever;
20:26 camelia rakudo fe289b: OUTPUT«True␤False␤»
20:26 Faxmachinen I probably confused those and assumed it wouldn't work
20:26 lizmat r: say Whatever.^mro
20:26 camelia rakudo fe289b: OUTPUT«WhateverCode.new()␤»
20:27 lizmat r: say WhateverCode.^mro
20:27 camelia rakudo fe289b: OUTPUT«WhateverCode.new()␤»
20:27 benabik It feels wrong that Whatever is turning into WhateverCodes.
20:27 lizmat r: say Whatever.WHAT.^mro
20:27 camelia rakudo fe289b: OUTPUT«(Whatever) (Any) (Mu)␤»
20:31 dalek perl6-roast-data: 593a487 | coke++ | / (5 files):
20:31 dalek perl6-roast-data: today (automated commit)
20:31 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/593a487ad2
20:33 * [Coke] will get that CSV thing working tonight, unless $DAYJOB becomes $NIGHTJOB
20:34 [Coke] (the nice csv rendering on github, that is)
20:34 Faxmachinen r: say (2 ~~ Whatever, 2 ~~ *, Whatever ~~ *, * ~~ Whatever);
20:34 camelia rakudo fe289b: OUTPUT«False True True True␤»
20:37 john____ joined #perl6
20:42 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␤»
20:42 Faxmachinen Indeed
20:47 TimToady note that [^3] should *not* be flattening in a list context
20:48 Guillaume2 joined #perl6
20:48 Guillaume2 hello from Montréal
20:49 stevan_ joined #perl6
20:49 sjohnson hi
20:49 FROGGS hi
20:49 sjohnson salut mon ami
20:49 Faxmachinen r: my @n = 1..10; my @even := @n.grep: * %% 2; say @n; @even[3] = 412; say @n;  # Also this
20:49 camelia rakudo fe289b: OUTPUT«1 2 3 4 5 6 7 8 9 10␤1 2 3 4 5 6 7 412 9 10␤»
20:49 Faxmachinen Hi
20:50 Guillaume2 I only know Perl5
20:50 Guillaume2 it was my glue language
20:50 lizmat that's a start  :-)
20:51 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
20:51 Guillaume2 I think I wanna write bible softwares using Perl
20:52 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
20:52 Guillaume2 yes and i wanna output documents in latex
20:52 sjohnson it supports snowman bracket technology
20:52 Guillaume2 perl + latex i need
20:53 Guillaume2 what's the GUI defacto for Perl6 ?
20:53 TimToady well, latex is just text--how hard can it be? :)
20:53 TimToady don't have any yet, and probably won't bless any particular GUI to the exclusion of any other
20:54 TimToady plus it's rather platform dependent
20:54 TimToady and we're trying to be platform independent
20:54 TimToady so the right GUI on the JVM might be different than the right one on MoarVM
20:54 TimToady or on Node.js
20:55 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
20:55 Faxmachinen Does Perl6 have a .Net compiler yet?
20:56 Guillaume2 oh Perl6 runs on a Java VM?
20:56 TimToady niecza runs on .Net
20:56 TimToady rakudo/jvm still has some rough edges, but passes 99% of the tests rakudo/parrot does already
20:57 TimToady 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 :(
20:57 TimToady n: say "hello from .Net-land"
20:57 camelia niecza v24-88-g1f87209: OUTPUT«hello from .Net-land␤»
20:57 TimToady rakudo does
20:57 TimToady but only on the JVM so far
20:57 slava oooooh
20:58 slava awwwwwwwww
20:58 Faxmachinen r: (1..5)>>.say
20:58 camelia rakudo fe289b: OUTPUT«5␤3␤1␤4␤2␤»
20:58 slava nice
20:58 TimToady that's...faking it
20:58 Guillaume2 do you absolutely need a Java VM to run Perl6 ?
20:58 slava oh :(
20:58 slava no
20:58 Guillaume2 ok
20:58 TimToady you just need JVM for threads currently
20:58 slava Guillaume2: there are two rakudos, rakudo-parrot, and rakudo-jvm
20:59 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
20:59 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
20:59 TimToady well, and speed
21:00 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
21:00 slava FROGGS: do tell. :)
21:00 slava diakopter: is that in response to what major things are missing?
21:00 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
21:00 FROGGS slava: you can create os threads, but these are not allowed to write to lexical variables
21:01 diakopter or object members
21:01 Guillaume2 ok Parrot is not Java. I understand now,
21:01 Faxmachinen Did Quantum::Superpositions actually fork?
21:01 TimToady don't think so
21:01 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
21:02 FROGGS 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:03 slava FROGGS: parrot threads are not pthreads? would it make sense to have pthreads?
21:05 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
21:06 diakopter 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?
21:06 FROGGS timotimo: I dunno
21:06 FROGGS timotimo: but I'll test now
21:06 timotimo thanks
21:06 diakopter Guillaume2: what do you mean by target?
21:06 Guillaume2 well build apps
21:06 Guillaume2 for iOS and android
21:06 Guillaume2 using Perl6 :)
21:06 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
21:07 lizmat Guillaume2: in the case of android, that would require a more modern JVM on there then most have
21:08 lizmat wrt iOS: Apple does not allow apps not made with XCode
21:08 Guillaume2 thats lame from Apple
21:08 Guillaume2 I dont know why bought a mac
21:08 lizmat that's how it is
21:08 Guillaume2 * I bought
21:09 FROGGS timotimo: I know that :o)
21:09 Guillaume2 anyone here using weechat ?
21:09 diakopter lizmat: well, you can write apps in C# using Xamarin
21:09 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
21:10 FROGGS (but some sort of fear is always with me, and that is not limited to a group of devs)
21:10 FROGGS hehe
21:10 FROGGS DisplayPort3000
21:10 FROGGS but it will be thin, ultra thin
21:11 FROGGS and all the cables will be made of glass
21:11 timotimo and it will no longer conflate unicode and bytes types!
21:13 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
21:13 slava jnthn: is the thread example as simple as the example in your blog?
21:14 slava FROGGS: I am not very concerned with start-up time atm :)
21:14 FROGGS k, just wanted to prevent disappointment :o9
21:14 FROGGS :o)
21:14 FROGGS timotimo: Stage parse      : 132.725
21:15 FROGGS that feels about 1% faster :o)
21:17 dayangkun joined #perl6
21:18 slava FROGGS: I see jvm as more of continued use if anythists :)
21:20 timotimo FROGGS: i'm glad ;)
21:25 dalek rakudo/nom: 789db4f | (Elizabeth Mattijsen)++ | src/core/Any.pm:
21:25 dalek rakudo/nom: Add Any.exists($key) and Any.delete($key)
21:25 dalek rakudo/nom:
21:25 dalek rakudo/nom: This feels like a hack, but it seems the best way to handle cases such as
21:25 dalek rakudo/nom:
21:25 dalek rakudo/nom:   my %h; say %h<a><b>:exists; say %h<a><b>:!k   # False, "b"
21:25 dalek rakudo/nom:
21:25 dalek rakudo/nom: without having to add a large number of candidates for Any:U: in combination
21:25 dalek rakudo/nom: with all possible adverbial pairs and combination of adverbial pairs.
21:25 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/789db4ff6e
21:26 celesta r: state $foo;
21:26 camelia rakudo fe289b:  ( no output )
21:26 celesta where can i read about the state declaration?
21:29 lizmat S03:4947
21:29 synopsebot Link: http://perlcabal.org/syn/S03.html#line_4947
21:29 celesta thank you
21:30 jnthn slava: See my recent talk for a lot more examples (slides linked from latest pot on my blog)
21:30 jnthn um, post :)
21:31 lizmat .oO( jnthn been doing too many hashes lately )
21:32 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
21:32 camelia rakudo fe289b: OUTPUT«().hash␤»
21:33 jnthn hmm :)
21:33 jnthn r: my %h; my $b=\%h<a><b>; say $b.WHAT
21:33 camelia rakudo fe289b: OUTPUT«(Capture)␤»
21:33 jnthn Apparently Capture gists interestingly...
21:33 lizmat aha!
21:34 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
21:34 lizmat :-)
21:35 jnthn :)
21:35 berekuk joined #perl6
21:36 donaldh r: qp{foo}
21:36 camelia rakudo fe289b: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/OO2r9cZpqnâ�¤Undeclared routines:â�¤    foo used at line 1â�¤    qp used at line 1â�¤â�¤Â»
21:37 donaldh r: qp{/foo}
21:37 camelia rakudo fe289b: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/eoj99V4tslâ�¤Unable to parse regex; couldn't find final '/'â�¤at /tmp/eoj99V4tsl:1â�¤------> [32mqp{/foo[33mâ��[31m}[0mâ�¤    expecting any of:â�¤        argument listâ�¤        postfixâ�¤        subscriptâ�¤        semic…
21:37 slava jnthn: ty :D
21:37 FROGGS NYI
21:38 dalek roast: 9442ea7 | (David Warring)++ | S05-capture/caps.t:
21:38 dalek roast: a little testing of conjunctive regex captures (&&)
21:38 dalek roast: review: https://github.com/perl6/roast/commit/9442ea7e6b
21:38 jnthn slava: Welcome :)
21:39 Faxmachinen Hmm. Must all ==> be on the same line?
21:39 berekuk joined #perl6
21:39 Faxmachinen r: (1..3) ==> map { $^a+1 } ==> map { $^a+1 } ==> say;
21:39 camelia rakudo fe289b: OUTPUT«3 4 5␤»
21:39 jnthn Faxmachinen: No, but maybe you are hitting the fact that } terminates a statement.
21:40 BenGoldberg joined #perl6
21:40 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 #perl6
21:42 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
21:42 dalek roast: cb5beb6 | (Elizabeth Mattijsen)++ | S02-types/autovivification.t:
21:42 dalek roast: Some more test passing now that we have Any.exists
21:42 dalek roast: review: https://github.com/perl6/roast/commit/cb5beb619c
21:42 dalek roast: ae3f5f8 | (Elizabeth Mattijsen)++ | S02-lexical-conventions/unicode.t:
21:42 dalek roast: Unfudge tc() tests, now that we have tc()
21:42 dalek roast: review: https://github.com/perl6/roast/commit/ae3f5f8d4f
21:42 dalek roast: 81aeb68 | (Elizabeth Mattijsen)++ | / (4 files):
21:42 dalek roast: Unfudge tests / marked as todo that seem not to blow up anymore
21:42 dalek roast: review: https://github.com/perl6/roast/commit/81aeb682e0
21:42 donaldh fix that and it could be ready to merge.
21:43 lizmat gnight #perl6!
21:43 Faxmachinen Good night
21:43 celesta night
21:44 celesta good bye #perl6
21:44 masak 'night, cel.
21:44 abnorman joined #perl6
21:44 BenGoldberg rn: sub postfix:<!>(Int $a) { [*] 1..$a }; say 5!; say 5.!
21:44 camelia niecza v24-88-g1f87209: OUTPUT«120␤120␤»
21:44 camelia ..rakudo fe289b: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&postfix:<.>' called (lines 1, 1)␤»
21:45 lowpro30__ joined #perl6
21:45 * masak submits rakudobug
21:45 masak std: sub postfix:<!>(Int $a) { [*] 1..$a }; say 5!; say 5.!
21:45 camelia std 06636e4: OUTPUT«ok 00:00 48m␤»
21:46 Faxmachinen r: eval("(1..3)\n\t==> map \{ \$^a+1 \}\n\t==> map \{ \$^a+1 \}\n\t==> say;");
21:46 camelia rakudo fe289b: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling eval_0â�¤Bogus statementâ�¤at eval_0:3â�¤------> [32m     [33mâ��[31m==> map { $^a+1 }[0mâ�¤    expecting any of:â�¤        postfixâ�¤        statement endâ�¤        statement modifierâ�¤        statement modifier loopâ�¤        pre…
21:46 Mouq joined #perl6
21:46 Faxmachinen r: eval("(1..3) ==> map \{ \$^a+1 \} ==> map \{ \$^a+1 \} ==> say;");
21:46 camelia rakudo fe289b: OUTPUT«3 4 5␤»
21:47 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)␤»
21:47 camelia ..niecza v24-88-g1f87209: OUTPUT«HELLO!!!!␤HELLO!!!!␤»
21:47 flussence (just making sure niecza wasn't reading "5." as a number)
21:47 BenGoldberg rn: sub postfix:<!>(Int $a) { [*] 1..$a }; sub postfix:<!>(Str $a) { uc $a ~ "!!!!" }; say 5!, 'hello'!;
21:47 camelia rakudo fe289b: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/WqYL4op97Kâ�¤Redeclaration of routine postfix:<!>â�¤at /tmp/WqYL4op97K:1â�¤------> [32mb postfix:<!>(Str $a) { uc $a ~ "!!!!" }[33mâ��[31m; say 5!, 'hello'!;[0mâ�¤    expecting any of:â�¤        postfixâ�¤        stat…
21:47 camelia ..niecza v24-88-g1f87209: OUTPUT«[31m===[0mSORRY![31m===[0m��Illegal redeclaration of routine 'postfix:<!>' (see line 1) at /tmp/s3oKhK4wss line 1:�------> [32m>(Int $a) { [*] 1..$a }; sub postfix:<!>[33m�[31m(Str $a) { uc $a ~ "!!!!" }; say 5!, 'he[0m��Unhandled exception: Check …
21:48 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 mainline�Useless declaration of a has-scoped method in mainline�[31m===[0mSORRY![31m===[0m Error while compiling /tmp/BKiDqai5aM�Cannot negate , because it is not iffy enough�at /tmp/BKiDqai5aM:1�------> [32m:<!>(S…
21:48 camelia ..niecza v24-88-g1f87209: OUTPUT«[31m===[0mSORRY![31m===[0m��Methods must be used in some kind of package at /tmp/jYkfHhATYv line 1:�------> [32mmethod postfix:<!>[33m�[31m(Int $a) { [*] 1..$a }; method postfix:<[0m��Methods must be used in some kind of package at /tmp/jYkfHhATYv …
21:49 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!!!!␤»
21:49 donaldh code reviews welcome: https://github.com/donaldh/rakudo/compare/chdir-emu
21:49 Faxmachinen jnthn: Yeah, it works when ==> is last on the previous line, rather than the map block
21:49 Mouq ding
21:49 yoleaux 07:46Z <FROGGS> Mouq: What if <unsp> unspaces more than one char? It could unspace \s+, wouldn't that be better?
21:51 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.
21:51 jnthn Faxmachinen: If it did, Rakudo didn't catch up yet.
21:51 Mouq :) kk
21:52 donaldh 'night #perl6
21:54 SmokeMachine joined #perl6
21:57 notjack /quit
21:59 colomon joined #perl6
22:00 bruges_ joined #perl6
22:04 Faxmachinen r: ("foo bar baz".split(/ /)>>.comb(/./)).perl.say
22:04 camelia rakudo fe289b: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/vV4gHu77up�Null regex not allowed�at /tmp/vV4gHu77up:1�------> [32m("foo bar baz".split(/ /[33m�[31m)>>.comb(/./)).perl.say[0m�»
22:05 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)␤»
22:05 Faxmachinen r: ("foo bar baz".split(/\s/)>>.comb(/./)).tree.perl.say
22:05 camelia rakudo fe289b: OUTPUT«LoL.new(("f", "o", "o").list.item, ("b", "a", "r").list.item, ("b", "a", "z").list.item)␤»
22:05 Faxmachinen Why does that make a LoL instead of a tree?
22:06 jnthn There's no tree type; .tree is for making a LoL
22:06 diakopter you're a tree
22:07 jnthn so's your mom
22:07 masak 'night, #perl6
22:07 jnthn OK, teaching tomorrow, I should sleep too
22:08 jnthn &
22:10 Faxmachinen r: ("foo bar baz".split(/\s/).map({ [$^a.comb(/./)] })).perl;
22:10 camelia rakudo fe289b:  ( no output )
22:10 Faxmachinen r: ("foo bar baz".split(/\s/).map({ [$^a.comb(/./)] })).perl.say;
22:10 camelia rakudo fe289b: OUTPUT«(["f", "o", "o"], ["b", "a", "r"], ["b", "a", "z"]).list␤»
22:10 Faxmachinen That makes a different thingy
22:10 Faxmachinen This is so confusing
22:11 Faxmachinen So is that a LoA?
22:13 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␤»
22:14 Faxmachinen Oh well, bedtime
22:18 Rotwang1 joined #perl6
22:32 abnorman joined #perl6
22:45 _jaldhar joined #perl6
22:46 berekuk joined #perl6
22:46 abnorman joined #perl6
23:07 skids joined #perl6
23:08 btyler joined #perl6
23:10 colomon joined #perl6
23:23 FROGGS joined #perl6
23:36 virtualsue joined #perl6
23:37 Teratogen joined #perl6
23:37 Teratogen howdy howdy howdy
23:42 berekuk joined #perl6
23:45 cosimo joined #perl6
23:48 Util joined #perl6
23:51 Mouq joined #perl6
23:59 FROGGS joined #perl6

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

Perl 6 | Reference Documentation | Rakudo