Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2015-04-09

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:04 tony-o m: my class H { has Int $.y = 5; method succ { H.new(y => $.y+1); method pred { H.new(y => $.y -1); }; method gist { $.y; }; }; say H.new ... *.y > 10;
00:04 camelia rakudo-moar 322d01: OUTPUT«5===SORRY!5=== Error while compiling /tmp/mZzLgtNLCA␤Missing block␤at /tmp/mZzLgtNLCA:1␤------> 3ist { $.y; }; }; say H.new ... *.y > 10;7⏏5<EOL>␤»
00:04 tony-o m: my class H { has Int $.y = 5; method succ { H.new(y => $.y+1); }; method pred { H.new(y => $.y -1); }; method gist { $.y; }; }; say H.new ... *.y > 10;
00:04 camelia rakudo-moar 322d01: OUTPUT«Code object coerced to string (please use .gist or .perl to do that)  in block <unit> at /tmp/fX6DhFYPZq:1␤␤5 4 3 2 1 0 -1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19 -20 -21 -22 -23 -24 -25 -26 -27 -28 -29 -30 -31 -32 -33 -34 -35 -…»
00:14 telex joined #perl6
00:15 erdic joined #perl6
00:16 mephinet joined #perl6
00:22 aborazmeh joined #perl6
00:22 aborazmeh joined #perl6
00:26 vendethiel joined #perl6
00:27 TimToady m: my class H { has $.y = 5; method succ { H.new(y => $.y + 1) }; method pred { H.new(y => $.y - 1) }; method gist { " $.y " } }; .say for H.new ... *.y > 10;
00:27 camelia rakudo-moar e81f47: OUTPUT« 5 ␤ 6 ␤ 7 ␤ 8 ␤ 9 ␤ 10 ␤ 11 ␤»
00:38 yogan joined #perl6
00:44 Sqirrel joined #perl6
00:48 laouji joined #perl6
01:02 muraiki joined #perl6
01:02 awwaiid .elems, really? not .length, .size, .count, .len, .howmanydamnit?
01:04 vendethiel joined #perl6
01:07 muraiki :n
01:18 awwaiid what's that?
01:21 dalek rakudo-star-daily: c6f2937 | coke++ | log/ (2 files):
01:21 dalek rakudo-star-daily: today (automated commit)
01:21 dalek rakudo-star-daily: review: https://github.com/coke/rakudo-star-daily/commit/c6f2937bd0
01:21 jack_rabbit joined #perl6
01:28 Zoffix joined #perl6
01:30 vendethiel joined #perl6
01:32 tony-o m: my class H { has Int $.y = 5; method succ { H.new(y => $.y+1); }; method pred { H.new(y => $.y -1); }; method gist { "$.y"; }; }; say H.new ... *.y > 10;
01:32 camelia rakudo-moar e81f47: OUTPUT«5 6 7 8 9 10 11␤»
01:32 tony-o m: my class H { has Int $.y = 5; method succ { H.new(y => $.y+1); }; method pred { H.new(y => $.y -1); }; method gist { "$.y"; }; }; say (H.new ... *.y > 10):n;
01:32 camelia rakudo-moar e81f47: OUTPUT«5===SORRY!5=== Error while compiling /tmp/dvHOoQAqdK␤You can't adverb that␤at /tmp/dvHOoQAqdK:1␤------> 3 "$.y"; }; }; say (H.new ... *.y > 10):n7⏏5;␤    expecting any of:␤        pair value␤»
01:32 tony-o m: my class H { has Int $.y = 5; method succ { H.new(y => $.y+1); }; method pred { H.new(y => $.y -1); }; method gist { "$.y"; }; }; say (H.new ... *.y > 10).elems;
01:32 camelia rakudo-moar e81f47: OUTPUT«7␤»
01:32 aborazmeh joined #perl6
01:32 aborazmeh joined #perl6
01:33 tony-o shouldn't that just go on forever?
01:46 TimToady no, it's an inequality
01:47 ilbot3 joined #perl6
01:47 Topic for #perl6 is now »ö« Welcome to Perl 6! | http://perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, std:, or /msg camelia p6: ... | irclog: http://irc.perl6.org | UTF-8 is our friend! | feather will shut down permanently on 2015-03-31
01:48 TimToady for intuited sequences with an endpoint of the same type, we can rewrite the end matcher to avoid all these accidental infinite sequences, I think
01:50 Sqirrel joined #perl6
01:50 * rjbs is now officially soliciting questions with which to ambush $Larry at YAPC.  Nobody tell him, okay? -- https://github.com/rjbs/QA-LarryWall/
01:50 rjbs TimToady: and that goes double for you
01:52 Zoffix :)
01:57 awwaiid signal(Signal::SIGINT).tap: {...} # this is handled async somehow? (using moarvm) . I'm porting my command line music player. I want it so that one ^C goes to the next song, and a double-^C exits.
01:58 [Coke] ... but after a small delay it resets?
01:59 yeahnoob joined #perl6
01:59 awwaiid https://gist.github.com/awwaiid/fc6e88ff1ecd846bc438
01:59 awwaiid I'm trying to force it to work the way I want with a global var -- but like the sleep itself doesn't seem to happen (the next song immediately starts playing)
02:00 awwaiid I can provide the whole script if you like
02:00 rjbs i/win 33
02:02 awwaiid https://gist.github.com/awwaiid/c56db01c9deb24d1a8ed # whole polly6 script
02:04 awwaiid perl6 is a difficult language, in that it is almost, but not quite, entirely unlike all the others in subtle and profound ways
02:07 awwaiid @songs .= pick(*) if $shuffle; # I find this amusing for example
02:10 awwaiid oh well, I'm off for the night. Happy holidays (I say, since Christmas clearly approaches)
02:11 uvb joined #perl6
02:21 timotimo I couldn't fall asleep, so I hacked up a litle present for y'all
02:21 timotimo nqp-m -e 'say(nqp::querycodeinfo(&say)<filename>); say(nqp::querycodeinfo(&say)<line_number>)'
02:21 timotimo gen/moar/stage2/NQPCORE.setting
02:21 timotimo 687
02:21 timotimo what do the people think?
02:22 timotimo this is something i've been desiring for at least a year
02:24 timotimo now i just don't know exactly how to get at the MVMCode underneath a Routine etc
02:25 timotimo timo@schmetterling ~/p/rakudo (nom) [1]> perl6 -e 'say nqp::querycodeinfo(nqp::getattr(&say, Code, \'$!do\'))'
02:25 timotimo filename => src/gen/m-CORE.setting, line_number => 18802
02:28 timotimo i'd like to also find the very last line number, too. and the code needs to be refactored a bit more, too
02:29 timotimo now ... how do we find line numbers corresponding to a whole class definition body ...
02:32 noganex joined #perl6
02:40 Guest56551 joined #perl6
02:43 Guest56551 left #perl6
02:45 Guest73598 joined #perl6
02:46 jack_rabbit_ joined #perl6
02:47 jack_rabbit_ joined #perl6
02:47 TimToady timotimo++
03:00 adu timotimo++
03:01 adu timotimo: is that like C's __FILE__ and __LINE__?
03:02 adu you'd have to get the parent stack frame, how would that work cross-vm?
03:06 colomon joined #perl6
03:06 adu I'm starting to think that knowing C and assembly might actually be a disadvantage in solving this
03:19 BenGoldberg joined #perl6
03:44 Sqirrel joined #perl6
03:46 labster ls
03:47 labster oh, not a terminal :o)
03:47 TimToady well, not at a shell prompt, anyway...
03:48 petercommand joined #perl6
03:49 labster Oddly I actually am doing Perl 6 right now.  I was just curious how much would break if I compiled rakudo when "0".Bool ~~ False
03:50 adu lol
03:51 * TimToady guesses, not much
03:51 labster I mean "0".Bool ~~ True
03:51 * TimToady still guesses not much :)
03:51 TimToady a spec test, we would hope :)
03:51 labster One would hope.
03:52 labster Probably not.  There's the specs issue open about making "0" truthy, which I have mixed feelings about.
03:54 labster I've hit the issue on both sides, though I suspect it will always be a tricky issue.  And I've had someone ask for a new behavior for it at a YAPC.
03:54 davido_ joined #perl6
04:01 labster of course, if moar isn't going to build...
04:01 laouji joined #perl6
04:04 BenGoldberg m: say so 0
04:04 camelia rakudo-moar e81f47: OUTPUT«False␤»
04:04 BenGoldberg m: say so "0"
04:04 camelia rakudo-moar e81f47: OUTPUT«False␤»
04:04 BenGoldberg m: say so "0 but true"
04:04 camelia rakudo-moar e81f47: OUTPUT«True␤»
04:04 BenGoldberg m: say so "0e0"
04:04 camelia rakudo-moar e81f47: OUTPUT«True␤»
04:04 BenGoldberg m: say so 0e0
04:04 camelia rakudo-moar e81f47: OUTPUT«False␤»
04:05 labster m: say so "0.0"
04:05 camelia rakudo-moar e81f47: OUTPUT«True␤»
04:05 labster m: say so 0.0
04:05 camelia rakudo-moar e81f47: OUTPUT«False␤»
04:05 BenGoldberg Personally, when I want a truthy value which is numeric zero, I'll use the string "0e0"
04:05 BenGoldberg (It works in perl5, too)
04:07 BenGoldberg The string "0.0" also is truthy in perl5, though it did not previously occur to me to use it.
04:07 labster multi method Bool(Str:D:) {  nqp::p6bool(nqp::chars($!value) && nqp::isne_s($!value,"0")); }  # the results here weren't too surprising.
04:16 ab5tract joined #perl6
04:25 spider-mario joined #perl6
04:54 kaare_ joined #perl6
05:36 dalek specs: e0d1718 | TimToady++ | S03-operators.pod:
05:36 dalek specs: deduced iterators can be smarter about endpoints
05:36 dalek specs: review: https://github.com/perl6/specs/commit/e0d17180fe
05:37 dalek rakudo/nom: f8a9af6 | TimToady++ | src/core/operators.pm:
05:37 dalek rakudo/nom: make deduced iterators smart re crossing endpoint
05:37 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/f8a9af637b
05:38 dalek roast: e0041dd | TimToady++ | / (4 files):
05:38 dalek roast: revised tests for new sequence iterators
05:38 dalek roast: review: https://github.com/perl6/roast/commit/e0041dd25f
05:44 adu joined #perl6
05:45 bartolin good moring, #perl6
05:45 rindolf joined #perl6
05:45 Patterner joined #perl6
05:45 bartolin m: sub f (Int $n) { $n > 3 ?? "liftoff!" !! $n + 1 }; say 1, &f ... *
05:45 camelia rakudo-moar e81f47: OUTPUT«===SORRY!===␤Type check failed in binding $n; expected 'Int' but got 'Str'␤»
05:47 bartolin TimToady: while you are at it: do I understand S03 correctly, that this sequence should terminate and not throw?
05:49 TimToady looks like an error to me
05:49 bartolin .oO( from me or from rakudo? )
05:50 TimToady I would expect the binding to fail just as it did
05:50 bartolin ahh :-)
05:50 TimToady m: sub f (Int $n) { $n > 3 ?? "liftoff!" !! $n + 1 }; say 1, &f ... Str
05:50 camelia rakudo-moar f8a9af: OUTPUT«1 2 3 4 liftoff!␤»
05:51 bartolin I read http://design.perl6.org/S03.html#line_1932 otherwise
05:52 TimToady well, it *does* terminate :)
05:52 bartolin oh, that sort of termination ...
05:54 TimToady m: say 1,2,4 ... 100
05:54 camelia rakudo-moar f8a9af: OUTPUT«1 2 4 8 16 32 64␤»
05:55 bartolin there is a (skipped) test for the above in S03-sequence/misc.t. I'm going to change it to throws_like or something.
05:56 TimToady m: say 8,-4,2 ... 0.1
05:56 camelia rakudo-moar f8a9af: OUTPUT«8 -4 2 -1 0.5 -0.25 0.125␤»
06:12 diana_olhovik_ joined #perl6
06:21 dalek roast: 4e72128 | usev6++ | S03-sequence/misc.t:
06:21 dalek roast: Fix test for termination of sequence by signature mismatch of generator function
06:21 dalek roast: review: https://github.com/perl6/roast/commit/4e7212863e
07:02 jnthn morning o/
07:02 yoleaux 8 Apr 2015 21:46Z <FROGGS> jnthn: why dont we use assign_X at all? this makes RT124083 pass and I wonder why we just do not use assign_X... https://gist.github.com/FROGGS/c98f455874e50d39ff75
07:02 moritz \o
07:02 zakharyas joined #perl6
07:03 _mg_ joined #perl6
07:04 jnthn FROGGS[mobile]: add_assign_op *does* have a code path where it emits assign_X. But you shouldn't just got emitting it whenever; it forces a taking of a native ref - that is, an allocation - where none is needed.
07:04 Ven joined #perl6
07:04 jnthn *go
07:05 jnthn Anyway, it's the wrong fix.
07:06 RabidGravy joined #perl6
07:10 FROGGS joined #perl6
07:11 darutoko joined #perl6
07:14 brrt joined #perl6
07:18 Timbus m: say so "00"
07:18 camelia rakudo-moar f8a9af: OUTPUT«True␤»
07:18 ribasushi joined #perl6
07:19 moritz m: say so "OO"
07:19 camelia rakudo-moar f8a9af: OUTPUT«True␤»
07:20 Timbus :0
07:20 FROGGS I think is is just weird that "0" is false...
07:20 Timbus same
07:21 FROGGS I mean, now we have working coercers one can do: MAIN(Int() $bar)... because I want to think that Perl6 should be explicit about these things and not wishy-washy
07:22 FROGGS jnthn: yes, I expected so... thing is, the assign_n path is not taken for the examples I tried
07:34 pdcawley joined #perl6
07:37 timotimo o/
07:37 timotimo i'm on the pro "make '0' True" side
07:42 timotimo also, no clue how to build nqp::querycodeinfo on JVM :\
07:42 aborazmeh joined #perl6
07:42 aborazmeh joined #perl6
07:43 jnthn timotimo: Reflection API maybe hsa something
07:45 timotimo .tell adu __FILE__ and __LINE__ don't quite compare to querycodeinfo, because we already have $?FILE and $?LINE, and also it doesn't go via the stack at all, so you don't need a stack frame and you don't need to invoke the thing you want info about
07:45 yoleaux timotimo: I'll pass your message to adu.
07:46 jnthn querycodeinfo may be better as getcodelocation
07:46 jnthn To fit better with the existing op set.
07:47 abraxxa joined #perl6
07:47 jnthn Also please check what nqp::backtrace calls things; I think it's line there, not line_number; either way, consistency would be good.
07:48 jnthn Provided we get those tweaks and it can be made to work on JVM, I think I'm good with it going in.
07:48 abraxxa good morning!
07:49 timotimo no problem; but i also want to add some more info in there
07:50 cschwenz joined #perl6
07:51 jnthn timotimo: Such as?
07:51 timotimo obviously, having a Buf of the bytecode itself will be a massive help for ... er ...
07:51 timotimo :P
07:51 bjz joined #perl6
07:52 timotimo i've been thinking a lot about how to get a sensible "last line of the function" value from the annotations in the bytecode ... instead of sleeping
07:52 timotimo i was worried that inlining will give line number annotations all over the map, so i can't just take the lowest and highest line number i find
07:52 anaeem1_ joined #perl6
07:53 brrt timotimo: you're going to write the JIT in p6? :-P
07:53 brrt that could be totally feasible if you wished it though
07:53 timotimo but now i remember there's also annotations for "start inline" and "end of inline"
07:54 timotimo it would be interesting for experimentation purposes to be able to have some kind of API - perhaps only meant to be visible via gdb - that'd let you drop in assembly made by gcc for example
07:55 timotimo or even hand-tuned assembly
07:55 timotimo to get a good estimation of how performance would be if the jit was better in some way
07:55 jnthn timotimo: But you can never reach inlined things from the outside of the VM
07:55 jnthn And here you're querying code objects
07:56 jnthn Which are...just there.
07:56 timotimo i think i've miscommunicated
07:56 timotimo how would you go about making querycodeinfo (or getcodelocation) return not only the first source line of a function, but also the last?
07:57 timotimo to get a reasonably good estimation of the beginning and end of a function in the source code
07:57 timotimo i'm expecting the line number annotations in the bytecode aren't perfectly linear
07:58 jnthn In Moar?
07:59 jnthn The MVMStaticFrame points to the start of the annotations for the code and the number of them
07:59 jnthn So just go through them
07:59 jnthn Looking for a maximum.
08:00 timotimo that was my first thought; my worry is that the QAST may have contained an inlined small sub
08:01 jnthn ah, true
08:02 jnthn Those ain't annotated.
08:02 timotimo not as inlines anyway
08:02 timotimo but they do have line numbers :)
08:02 jnthn At all by the time we hit the VM
08:02 jnthn Right, they have that
08:02 timotimo if they have a different filename, that's no problem
08:02 timotimo otherwise ... yeah
08:02 tadzik good morning #perl6!
08:02 jnthn What do you want it for, ooc?
08:03 timotimo &say.sourcecode.say for example
08:06 timotimo it's not an absolute must
08:06 timotimo it'd probably be fine to just have "nqp::getcodelocation" and only return filename + line number
08:08 jnthn Yeah, I was thinking it was more going to be used for error reporting
08:08 timotimo nah, i think our stack traces are already good enough for that
08:09 jnthn I wasn't thinking of that so much as multi-dispatch failures
08:09 jnthn Or explaining where a failing subset type constraint was
08:09 timotimo oh
08:09 timotimo that'd also be interesting
08:09 dalek roast: 422f77b | lizmat++ | S32-str/ (2 files):
08:09 dalek roast: Add basic starts/ends-with tests
08:09 dalek roast: review: https://github.com/perl6/roast/commit/422f77bdce
08:09 jnthn When you're not actually in the code that you want to point at
08:09 timotimo right
08:10 timotimo i can see how that'd be useful
08:10 timotimo i'll clean up the code and push it, but it might be in ~three hours at the earliest, depending on if i can make it work in the next 10 minutes :)
08:12 brrt hmmm interesting thought timotimo
08:12 brrt is MVMCode a REPR?
08:12 timotimo yes
08:12 timotimo brrt: i already have the code working, btw
08:12 timotimo just need to make it prettier
08:13 timotimo MVMROOT can do multiple to-root things, right?
08:13 brrt otherwise i could see how you could use atkey / bindkey or something like that to ... drop in new jit code as you go along
08:13 brrt although.... that has highly tricky properties
08:14 * brrt is not terribly sure about that
08:14 brrt i have seen nested MVMROOT's
08:15 jnthn You can nest them, but each one roots one thing.
08:15 dalek rakudo/nom: 4cdcaf2 | lizmat++ | t/spectest.data:
08:15 dalek rakudo/nom: Add basic starts/ends-with tests
08:15 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/4cdcaf2721
08:16 timotimo OK
08:16 jnthn I normally put a sequence of them at the same indentation level to avoid le clutter
08:16 nwc10 I have seen a HP-UX compiler get upset about the textual size that one or two of the MVMROOTs expand to
08:16 nwc10 however, there's other stuff that currently gets in the way of us building on HP-UX
08:16 itz apple's new clang seems a lot faster on interp.c
08:17 RabidGravy yeah to be fair HP-UX compilers seem to get upset if you look at them funny
08:17 nwc10 but, given that I have found a better way to deliver freshly baked patches to @jnthn (although mostly it seems to be $jnthn)
08:17 nwc10 maybe I should locate various things
08:17 lizmat itz: is that 10.10.3 ?
08:17 itz yes some 2G update last night
08:18 lizmat aha!  seems I will need to update soonish (like right after the NLPW)
08:18 timotimo https://gist.github.com/timo/c4f0a662957771347a31 brrt, jnthn, does the rooting look correct?
08:19 RabidGravy while we're talking compiler is anyone actively building on FreeBSD?  I had problems last time I tried but might go back to it later today
08:19 timotimo in this context i may even want to have the blocks be bigger
08:19 itz we are flying out to AMS this evening!
08:19 timotimo actually
08:19 itz RabidGravy: I've had no probs with FreeBSD 10.1/clang or gcc (from pkg)
08:19 lizmat itz: looking forward to seeing you in Utrecht!
08:19 itz yay
08:19 brrt timotimo: what is the e on line 7
08:19 timotimo gist updated, brrt, jnthn
08:20 lizmat so I implemented substr-eq-at, used it in the core setting
08:20 timotimo brrt: i don't see an e on line 7 ...
08:20 lizmat and found myself having switched the parameters around
08:20 brrt it is not REPR(code)->name
08:20 brrt *now
08:20 lizmat so I wonder what that means: maybe the "at" should be removed from the name, or the position should be the first parameter ?
08:21 timotimo oh, hah
08:21 timotimo hard line breaks in the terminal
08:21 timotimo copy-pasted out of less
08:21 brrt bad timo :-)
08:21 timotimo why i didn't copy it out of vim, i have no idea
08:21 RabidGravy I'm getting "probing whether your compiler thinks that it is gcc  clang: not found
08:21 RabidGravy Can't compile simple gcc probe, so something is badly wrong at build/probe.pm line 93."
08:22 timotimo updated again
08:22 RabidGravy which is weird
08:22 itz which version of FreeBSD?
08:22 RabidGravy 8.4-RELEASE-p4
08:22 jnthn lizmat: Hm, I thought we were going with substr-eq all along... :)
08:22 lizmat well, yeah, maybe that would be best  :-)
08:23 brrt ok, i don't get why the result hash is allocated at line 9, then the strings are allocated someway down, and the filename_key is allocated before the result
08:23 brrt eh *rooted*
08:23 itz hmm guess that's gcc than .. maybe force cc=gcc to MoarVM
08:23 jnthn timotimo: no, it's rong
08:23 jnthn MVMObject * result = REPR(BOOTHash)->allocate(tc, STABLE(BOOTHash));
08:24 jnthn That can be GC'd by
08:24 brrt i'd think you'd want to move the allocation someway down, then root the result, then allocate the strings and rooted
08:24 jnthn MVM_string_ascii_decode_nt(tc, tc->instance->VMString, "file");
08:24 jnthn Which allocates
08:24 brrt jnthn - idea for a non-allocating mvmstring decode?
08:24 jnthn uh?
08:24 brrt or maybe a mvmstring-constant-making thingy
08:25 timotimo ah, of course
08:25 jnthn That makes no sense, the thing that's allocated *is* the MVMString *
08:25 jnthn Unless you're asking for a constant/intern pool
08:25 brrt right.... but... what you could do (IF AND ONLY IF IT WOULD BE SAFE) is MVMString lineStr, MVMString keyStr; MVMString_decode_const_to(tc, &keyStr, "line");
08:26 brrt or something like that
08:26 brrt that would probably be a pretty lousy idea now that i say it
08:26 timotimo gist updated yet again
08:27 JimmyZ timotimo: s/MVMCode_query_information/MVM_Code_query_information/?
08:27 timotimo fwiw, i've wished for a "preprocessor" like thing already that'd create a constant expression that properly describes the whole MVMString at compile-time and only has to put in the right Collectable information
08:27 timotimo JimmyZ: can do
08:27 JimmyZ or MVM_MVMCode_query_information ? :P
08:27 jnthn JimmyZ: Welll, the REPR name *is MVMCode.
08:27 Sqirrel joined #perl6
08:28 brrt can we set collectables as noncollectable
08:28 JimmyZ anyway, needs prefix MVM_ :)
08:28 jnthn But yeah, the convention is MVM_code_* really
08:29 jnthn and just call it MVM_code_location
08:29 jnthn To match the op being getcodelocation
08:29 diana_olhovik_ joined #perl6
08:30 timotimo OK
08:30 dalek rakudo/nom: 1a09d24 | lizmat++ | src/core/ (3 files):
08:30 dalek rakudo/nom: substr-eq-at -> substr-eq
08:30 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/1a09d2433a
08:31 dalek roast: 78780ee | usev6++ | S05-substitution/subst.t:
08:31 dalek roast: Add tests for RT #114388
08:31 dalek roast: review: https://github.com/perl6/roast/commit/78780eee60
08:32 timotimo OK, i think i'm about ready to push
08:32 timotimo also, i'm going to be way late
08:32 timotimo TTYL
08:32 timotimo (damn, again)
08:34 dakkar joined #perl6
08:39 timotimo damn you, clock
08:41 RabidGravy itz++ # yep that worked (after I figured out the appropriate incantation to get that flag to the moar configure)
08:42 jnthn itz, RabidGravy: moar configure patches welcome, if either of you have time :)
08:42 FROGGS joined #perl6
08:43 [ptc] I know it's possible to extract the pod from a source code file, however is it possible to extract non-pod text from a source code file?
08:44 itz RSN :)
08:45 Rounin joined #perl6
08:45 [ptc] I guess the question is a dumb one (and maybe it's still too early in the morning), however I couldn't work it out...
08:46 RabidGravy jnthn, maybe, my problem (in the first instance) was getting rakudobrew to pass the option on to the right thing
08:46 RabidGravy also I may look at:
08:46 RabidGravy > say $*KERNEL;
08:46 RabidGravy uname: illegal option -- K
08:46 RabidGravy usage: uname [-aimnprsv]
08:46 RabidGravy freebsd ()
08:47 RabidGravy I suspected that may happen when I looked at the Kernel.pm yesterday
08:49 itz I suspect the root cause is that the configure doesn't tell gcc from clang properly
08:49 dalek roast: 3c982d5 | usev6++ | S32-exceptions/misc.t:
08:49 dalek roast: Add test for RT #115276
08:49 dalek roast: review: https://github.com/perl6/roast/commit/3c982d5b9e
08:50 itz I guess clang lies about being gcc :)
08:50 RabidGravy yeah "rakudobrew build moar --configure-opts='--moar-option='--cc=gcc''" is a bout of a mouthful
08:51 RabidGravy bit, bit of a mouthful
08:54 pecastro joined #perl6
08:57 FROGGS m: sub MAIN ($, \foo) { } # is that already ticketed?
08:57 camelia rakudo-moar 1a09d2: OUTPUT«Usage:␤  /tmp/_heQGgNUFE <Any> <oo> ␤»
08:58 jnthn oo-ps...
08:59 FROGGS originally I searched for something funny when the first char is chopped off... but did not find anything :o(
09:01 dalek roast: 14608e6 | TimToady++ | S03-sequence/basic.t:
09:01 dalek roast: new sequence rules should apply to left values too
09:01 dalek roast: review: https://github.com/perl6/roast/commit/14608e6562
09:02 telex joined #perl6
09:02 rurban_ joined #perl6
09:03 dalek rakudo/nom: 3c94e32 | TimToady++ | src/core/operators.pm:
09:03 dalek rakudo/nom: apply endtest skipping intuition to left args too
09:03 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/3c94e32758
09:03 jnthn .oO( Timsomnia )
09:04 TimToady been sleeping too much 'cuz I'm sick :)
09:04 jnthn Aww
09:04 jnthn Hope the plague leaves you soon.
09:04 TimToady so I'm kinda on hawaiian time
09:05 TimToady m: say 1,2,3 ... 1.5
09:05 camelia rakudo-moar 1a09d2: OUTPUT«1 2 3␤»
09:05 TimToady that's what I'm fixing here
09:05 TimToady will now just return 1
09:09 FROGGS jnthn: so, "my num32 $a; say ++$a" does assign_n, while "my num32 $a = 42e0; say $a" does not
09:09 FROGGS jnthn: can you push me in the right direction?
09:10 yvan1 joined #perl6
09:10 jnthn FROGGS: Well, first of all I think we're code-generating things wrongly and the VM bytecode validator isn't puking when it sees us store a full-width num64 local into a num32 lexical, and vice versa.
09:11 jnthn FROGGS: I was going to tweak that first.
09:11 jnthn FROGGS: Then we need to make the small-width registers work, implement the extend/truncate ops already in oplist, and teach the QAST -> MAST compiler to track this stuff and emit them as needed.
09:12 FROGGS ahh, I see
09:12 jnthn FROGGS: It's a non-small amount of work, which is why I've sorta punted it. Also 'cus it touches many of the same places we need to touch to unscrew unsigned.
09:13 FROGGS aye
09:13 jnthn So I'm thinking we may want to tackle them together.
09:13 jnthn No reason it has to be me who does it all, of course.
09:13 FROGGS yeah
09:13 RabidGravy itz, you still here?
09:13 jnthn Just that it's not a trivial fix somewhere, but rather we need to sort our story out on a few things better.
09:14 FROGGS I think I try to get my hands dirty to understand the problem/fix better
09:14 jnthn *nod*
09:14 espadrine joined #perl6
09:14 jnthn I'd probably start out by fixing the MoarVM code validator in a branch.
09:15 jnthn It'll reject stuff that we sorta-get-away-wiht today.
09:15 jnthn Unfortunately, we get away with a lot of the int cases because LE.
09:15 FROGGS exactly
09:15 jnthn So while it's bust in some way, it's only num32 that really shows us up.
09:16 FROGGS yeah, that's what I realized yesterday
09:16 jnthn (The answer to "why is it bust" is really "I put off doing this stuff")
09:16 jnthn (Because it wasn't blocking anything)
09:16 jnthn But now natives are getting more usable generally, with us having native arrays coming together, it's probably about time. :)
09:17 itz RabidGravy: yes I'm schiving off work :)
09:17 RabidGravy yay!
09:18 RabidGravy are you logged in to a FreeBSD 10.* machine?
09:18 itz I can be easily
09:18 RabidGravy if so what is the difference between uname -r and uname -K ?
09:18 RabidGravy -K appeared in 10.0 but is used in Kernel.pm
09:19 RabidGravy so no worky on <10.0
09:20 eli-se joined #perl6
09:24 masak good antenoon, #perl6
09:24 Ven \o, masak
09:25 jnthn o/ masak
09:28 dalek roast: 48f616e | TimToady++ | S03-sequence/nonnumeric.t:
09:28 dalek roast: slight preference to include endpoint in direction
09:28 dalek roast:
09:28 dalek roast: (when there are arbitrary strings on the left and a matching endpoint type)
09:28 dalek roast: review: https://github.com/perl6/roast/commit/48f616e643
09:29 dalek rakudo/nom: 790d0ba | TimToady++ | src/core/operators.pm:
09:29 dalek rakudo/nom: arbitrary strings on left of seq are arbitrary
09:29 dalek rakudo/nom:
09:29 dalek rakudo/nom: So don't retest them, or prefer their ordering to endpoint's.
09:29 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/790d0ba774
09:30 SHODAN joined #perl6
09:39 dalek rakudo/nom: cfb8972 | TimToady++ | src/core/operators.pm:
09:39 dalek rakudo/nom: typo in last patch
09:39 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/cfb8972bb0
09:41 aborazmeh joined #perl6
09:41 aborazmeh joined #perl6
09:43 nwc10 does NQP's testing support TODO tests?
09:43 RabidGravy just PR'd fix for Kernel.pm on FreeBSD < 10.0
09:44 FROGGS nwc10: no :o(
09:45 FROGGS RabidGravy: and -r is identical to -K?
09:46 tinyblak joined #perl6
09:46 RabidGravy no, -K is always numeric -r is a "string" but that is the same as what other platforms get for version
09:47 FROGGS so -K would just give 10.0 where -r gives 10.0-RELEASE?
09:47 jnthn nqp: todo()
09:47 jnthn uh...
09:47 FROGGS :S
09:47 FROGGS jnthn: you killed camelia!
09:48 * jnthn questions parentage
09:48 camelia joined #perl6
09:48 RabidGravy FROGGS, yeah
09:48 jnthn Anyway, there is a todo sub in NQP
09:48 FROGGS $ nqp-m -e 'todo("what", 1); ok(2 == 2, "foo")'
09:48 FROGGS ok 1 - foo# TODO what
09:49 FROGGS ahh, I just grepped wrongish
09:49 FROGGS nwc10: ^^
09:49 camelia nqp-jvm: OUTPUT«(signal ABRT)*** Error in `java': double free or corruption (!prev): 0x00007ff8c401a8c0 ***␤»
09:50 camelia ..nqp-moarvm: OUTPUT«Too few positionals passed; expected 2 arguments but got 0␤   at gen/moar/stage2/NQPCORE.setting:798  (/home/camelia/rakudo-inst-1/share/nqp/lib/NQPCORE.setting.moarvm:todo:0)␤ from /tmp/tmpfile:1  (<ephemeral file>:<mainline>:23)␤ from gen/moar/stage2/NQPHL…»
09:50 camelia ..nqp-parrot: OUTPUT«Can't exec "./rakudo-inst/bin/nqp-p": No such file or directory at lib/EvalbotExecuter.pm line 188.␤exec (./rakudo-inst/bin/nqp-p /tmp/tmpfile) failed: No such file or directory␤Server error occurred! Closing Link: static.231.60.47.78.clients.your-server.de (Q…»
09:50 FROGGS uff
09:51 dalek rakudo/nom: e295748 | (Jonathan Stowe)++ | src/core/Kernel.pm:
09:51 dalek rakudo/nom: The -K flag to uname wasn't introduced until FreeBSD 10.0
09:51 dalek rakudo/nom: use -r as next best thing
09:51 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/e295748aab
09:51 dalek rakudo/nom: c0278ac | FROGGS++ | src/core/Kernel.pm:
09:51 dalek rakudo/nom: Merge pull request #404 from jonathanstowe/nom
09:51 dalek rakudo/nom:
09:51 dalek rakudo/nom: The -K flag to uname wasn't introduced until FreeBSD 10.0
09:51 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/c0278ac41d
09:51 FROGGS RabidGravy++
09:52 brrt with regards to the small-width-regs some time back
09:52 brrt that requires JIT work too
09:53 brrt simpler work than all the rest, but still
10:10 lizmat m: say nqp::eqat("foo","foo",-42)   # jnthn, is this correct nqp::eqat behaviour, or should we attempt to catch negative indexes at the P6 level?
10:10 camelia rakudo-moar 790d0b: OUTPUT«1␤»
10:10 nwc10 FROGGS: thanks
10:10 lizmat afk again
10:19 nwc10 next "Stupid" question. I can do this:
10:19 nwc10 $ ./nqp-p -V | grep parrot::intvalsize
10:19 nwc10 parrot::intvalsize=4
10:19 nwc10 does anyone happen to know how to do that in NQP code - ie get that size value
10:19 nwc10 (which will be 4 or 8)
10:20 moritz nwc10: maybe nqp::nativecallsizeof(int)?
10:20 moritz nqp-m: say nqp::nativecallsizeof(int)
10:20 camelia nqp-moarvm: OUTPUT«Confused at line 2, near "say nqp::n"␤   at gen/moar/stage2/NQPHLL.nqp:493  (/home/camelia/rakudo-inst-1/share/nqp/lib/NQPHLL.moarvm:panic:105)␤ from gen/moar/stage2/NQP.nqp:921  (/home/camelia/rakudo-inst-1/share/nqp/lib/nqp.moarvm:comp_unit:872)␤ from gen/…»
10:21 nwc10 no, not that
10:21 moritz nqp-m: say(nqp::nativecallsizeof(int))
10:21 camelia nqp-moarvm: OUTPUT«8␤»
10:21 moritz not that?
10:21 nwc10 no, the parrot config value
10:21 nwc10 I know that sizeof(int) is 4 on both 32 and 64 bit systems (for all that we support)
10:21 moritz oh
10:21 RabidGravy FROGGS cheers buddy
10:21 nwc10 and, in theory it's possible to configure parrot to use long long for its intval
10:22 nwc10 it looks to be nqp::backendconfig()
10:22 dalek doc: 561d1c6 | paultcochrane++ | lib/Type/Str.pod:
10:22 dalek doc: Add docs for subst-mutate
10:22 dalek doc: review: https://github.com/perl6/doc/commit/561d1c67c4
10:22 nwc10 now I just have to work out which key...
10:22 psch eh
10:22 cschwenz joined #perl6
10:22 nwc10 aha
10:22 nwc10 ./nqp-p -e 'say(nqp::backendconfig(){"intvalsize"})'
10:22 psch nqp-p doesnt work on camelia :/
10:23 psch nwc10: right, backendconfig.  i tried here with vmconfig
10:23 * psch did remeber it was {$something}config...
10:23 camelia joined #perl6
10:25 grondilu joined #perl6
10:28 aborazmeh joined #perl6
10:28 aborazmeh joined #perl6
10:33 RabidGravy I suspect Kernel would best be done using the OS native uname rather than repeatedly shelling out to the uname command, but I guess that is better done elsewhere
10:37 bjz joined #perl6
10:39 Ven joined #perl6
10:41 arnsholt Wow. I think this is the first time in my life I've actually needed octal numbers in my code
10:44 moritz arnsholt: never wrote a 'chmod 0755 $file' ?
10:45 * Ven has only ever done "chmod()" in php code, which accepts 777 and such
10:46 * itz ignored PBP telling him not to use 0755
10:47 eli-se A guy I once had the misfortune of working with didn't understand file permissions. He was unable to write to a file, so instead he read it into memory, deleted it and then created a new file with the same contents.
10:48 nwc10 that's silly. obviously you copy the contents to a new name, then delete the old file, then rename it :-)
10:48 Juerd eli-se: In many cases that might even be a good thing, if you delete by moving a newly created file over it.
10:49 moritz well, we have folks in the ops teams that think the solution to hanging processes is to write a cron job that kills processes (without investigating the cause of the hang at all)
10:49 eli-se No, just get the permissions right in the first place.
10:49 eli-se Don't create non-writable files.
10:49 nwc10 no, everyone should just log in as root
10:49 nwc10 moritz: but hopefully not *all* the folks in the ops team are like that?
10:49 Juerd rename is atomic, so it helps avoid file corruption to create a new temporary file and then rename it.
10:50 Juerd eli-se: No, removing write permission can be seen as documentation that an atomic write through rename is preferred.
10:51 eli-se Juerd: which is what every API that opens a file, writes a buffer to it and closes it (i.e. the opposite of slurp) should default to.
10:51 aborazmeh joined #perl6
10:51 aborazmeh joined #perl6
10:51 Juerd eli-se: I disagree that APIs should take care of this by default because it's very inefficient for large files.
10:52 eli-se I disagree.
10:52 larion joined #perl6
10:53 moritz nwc10: most are not, thankfully
10:54 bjz joined #perl6
10:56 pdcawley joined #perl6
10:59 arnsholt moritz: Not until today =)
11:00 arnsholt And it was checking the permissions on a file, rather than chmod, but y'know. Same-same
11:02 dalek nqp: b5a947f | timotimo++ | / (2 files):
11:02 dalek nqp: bump Moar andthen map the "getcodelocation" op from MoarVM
11:02 dalek nqp: review: https://github.com/perl6/nqp/commit/b5a947fb1f
11:03 timotimo i expect somebody will take this and run with it :)
11:04 moritz but where?
11:08 7YUAAA5WE joined #perl6
11:13 cschwenz what changed in camelia between yesterday and today?
11:13 cschwenz Wednesday, 8 April 2015
11:13 cschwenz ========================================
11:13 cschwenz cschwenz 13:46
11:13 cschwenz p6: say (2..10,<J Q K A> X~ <♡ ♢ ♣ ♠>).pick(5)
11:13 cschwenz camelia 13:46
11:13 cschwenz rakudo-moar b05c2c: OUTPUT«K♢ A♡ J♡ J♢ 9♣␤»
11:13 camelia rakudo-moar c0278a: OUTPUT«3♡ ♢ ♣ ♠ 10♡ ♢ ♣ ♠ 5♡ ♢ ♣ ♠ 8♡ ♢ ♣ ♠ 6♡ ♢ ♣ ♠␤»
11:13 cschwenz Thursday, 9 April 2015
11:13 cschwenz ========================================
11:13 cschwenz cschwenz 12:09
11:13 cschwenz p6: say (2..10,<J Q K A> X~ <♡ ♢ ♣ ♠>).pick(5)
11:13 camelia rakudo-moar c0278a: OUTPUT«2♡ ♢ ♣ ♠ J♡ ♢ ♣ ♠ K♡ ♢ ♣ ♠ A♡ ♢ ♣ ♠ 7♡ ♢ ♣ ♠␤»
11:13 cschwenz camelia 12:09
11:13 cschwenz rakudo-moar c0278a: OUTPUT«Q♡ ♢ ♣ ♠ 4♡ ♢ ♣ ♠ 3♡ ♢ ♣ ♠ K♡ ♢ ♣ ♠ 7♡ ♢ ♣ ♠␤»
11:15 FROGGS range endpoints are treated differently now
11:15 psch start points too
11:16 psch although neither makes sense to give the new output, in my understanding
11:16 cschwenz for what it's worth a new build (today) via rakudobrew gives the same result as camelia did on 8-April
11:17 moritz didn't the precedence of X~ change to that of ~ ?
11:17 Ven moritz: think so
11:17 moritz m: say ((2..10,<J Q K A>) X~ <♡ ♢ ♣ ♠>).pick(5)
11:17 camelia rakudo-moar c0278a: OUTPUT«Q♡ ♢ ♣ ♠ 5♡ ♢ ♣ ♠ K♡ ♢ ♣ ♠ 10♡ ♢ ♣ ♠ 4♡ ♢ ♣ ♠␤»
11:17 moritz m: say ((2..10,<J Q K A>) X~ <♡ ♢ ♣ ♠>)
11:17 camelia rakudo-moar c0278a: OUTPUT«2♡ ♢ ♣ ♠ 3♡ ♢ ♣ ♠ 4♡ ♢ ♣ ♠ 5♡ ♢ ♣ ♠ 6♡ ♢ ♣ ♠ 7♡ ♢ ♣ ♠ 8♡ ♢ ♣ ♠ 9♡ ♢ ♣ ♠ 10♡ ♢ ♣ ♠ J♡ ♢ ♣ ♠ Q♡ ♢ ♣ ♠ K♡ ♢ ♣ ♠ A♡ ♢ ♣…»
11:17 moritz uhm
11:18 psch m: say ^3 X~ 'a'..'d'
11:18 camelia rakudo-moar c0278a: OUTPUT«0a 0b 0c 0d 1a 1b 1c 1d 2a 2b 2c 2d␤»
11:18 psch m: say ^3 X~ <a b c d>
11:18 camelia rakudo-moar c0278a: OUTPUT«0a 0b 0c 0d 1a 1b 1c 1d 2a 2b 2c 2d␤»
11:18 masak X~ changed precedence to ~ ?
11:18 moritz it looks like X~ doesn't descend into the RHS here?
11:18 FROGGS seems so
11:18 psch m: say ^3 X~ <♡ ♢ ♣ ♠>
11:18 tinyblak joined #perl6
11:18 camelia rakudo-moar c0278a: OUTPUT«0♡ ♢ ♣ ♠ 1♡ ♢ ♣ ♠ 2♡ ♢ ♣ ♠␤»
11:18 moritz m: say <♡ ♢ ♣ ♠>.elems
11:18 camelia rakudo-moar c0278a: OUTPUT«1␤»
11:18 moritz oh
11:18 psch well that's kinda magic
11:18 moritz m: say <♡ ♢ ♣ ♠>.elems
11:18 camelia rakudo-moar c0278a: OUTPUT«4␤»
11:18 masak I'd expect X~ to have the precedence of X, not ~
11:18 moritz weird whitespace
11:18 psch funky spaces?
11:18 masak aha
11:18 FROGGS ?
11:18 moritz m: say ((2..10,<J Q K A>) X~ <♡ ♢ ♣ ♠>)
11:18 camelia rakudo-moar c0278a: OUTPUT«2♡ 2♢ 2♣ 2♠ 3♡ 3♢ 3♣ 3♠ 4♡ 4♢ 4♣ 4♠ 5♡ 5♢ 5♣ 5♠ 6♡ 6♢ 6♣ 6♠ 7♡ 7♢ 7♣ 7♠ 8♡ 8♢ 8♣ 8♠ 9♡ 9♢ 9♣ 9♠ 10♡ 10♢ 10♣ 10♠ J♡ J♢ J♣ J♠ Q♡ Q♢ Q♣ Q♠ K♡ K♢ K♣ K♠ A♡ A♢ A…»
11:19 moritz m: say ((2..10,<J Q K A>) X~ <♡ ♢ ♣ ♠>).pick(5)
11:19 camelia rakudo-moar c0278a: OUTPUT«4♠ K♢ 5♢ 5♠ Q♢␤»
11:19 masak \o/
11:19 masak all is well
11:19 psch m: say " ".ord
11:19 muraiki joined #perl6
11:19 camelia rakudo-moar c0278a: OUTPUT«160␤»
11:19 masak it was just funky spaces
11:19 FROGGS ahh
11:19 masak nbsp, right?
11:19 cschwenz ah, thanks.  :-)
11:19 masak cschwenz: good one ;)
11:19 psch m: say uniname " "
11:19 camelia rakudo-moar c0278a: OUTPUT«NO-BREAK SPACE␤»
11:19 masak cschwenz: almost had us there :P
11:19 psch j: say uniname " "
11:19 camelia rakudo-jvm c0278a: OUTPUT«cannot connect to eval server: Connection refused␤»
11:19 psch aw
11:20 grondilu talking about X, in S03 it is written about it that when the RHS is infinite, only the first element of the LHS will be seen.  Couldn't we change that?
11:20 cschwenz sorry, next time i'll be more careful when i paste whitespace.  :-(
11:20 * masak .oO( "I know! Let's invent several code points that look not just exactly the same, but all *blank*, but with different behaviors!" )
11:20 masak cschwenz: no worries -- it was interesting
11:20 masak ENOHUGME
11:20 * masak hugs cschwenz for this vital lesson in whitespace handling
11:21 cschwenz :-)
11:22 rurban_ joined #perl6
11:23 * grondilu would like to write something like for ^Inf X ^Inf -> $a, $b {...} and have $a and $b cover all the space.
11:24 psch "all the space"?
11:24 grondilu all possible couples ($a, $b)
11:24 psch oh, in contrast to "only the first quadrant"?
11:25 masak grondilu: a custom `diag-for(^Inf, ^Inf, -> $a, $b { ... });` gets you quite close
11:25 masak grondilu: barring that, have to wait for Real Macros.
11:25 grondilu maybe but eventually I would need to write ^Inf X ^Inf X ^Inf and so on
11:26 grondilu not to mention using it as a metoperator (eg X~)
11:26 grondilu so what I would like is a special semantics when the RHS is infinite.
11:26 bjz joined #perl6
11:27 grondilu the current one is quite useless anyway.
11:27 masak I guess you could define your own multi sub infix:<X> variant with an adverb...
11:27 masak that almost feels like the cleanest solution
11:27 psch :alternate ?
11:28 * psch isn't quite sure he's following
11:28 masak :diag
11:28 psch oh
11:28 psch from diagonal
11:28 psch not diagnostic
11:28 masak :diagonally, then :)
11:28 grondilu writing a metaoperator seems hard, but I can try.
11:29 grondilu I don't think I'd need an adverb though.  Can't I just override the default candidate?
11:29 grondilu I mean create a multi 'where @LHS.elems == Inf' or something.
11:29 grondilu *@RHS
11:29 masak oh right, it's a metaop
11:30 masak I'm not sure we've ever talked properly about user-defining those
11:30 masak should be totally possible, of course
11:30 nwc10 should I expect t/spec/S03-sequence/nonnumeric.rakudo.moar to take forever?
11:30 masak even with the optional/default operator like X has
11:31 timotimo nqp-m: say(nqp::getcodelocation(&say)<line>); say(nqp::getcodelocation(&say)<file>);
11:31 camelia nqp-moarvm: OUTPUT«No registered operation handler for 'getcodelocation'␤   at gen/moar/stage2/QAST.nqp:1406  (/home/camelia/rakudo-inst-2/share/nqp/lib/QAST.moarvm:compile_op:64)␤ from gen/moar/stage2/QAST.nqp:5208  (/home/camelia/rakudo-inst-2/share/nqp/lib/QAST.moarvm:compile…»
11:33 timotimo i should stub that op for JVM so that we don't have to #?if, right?
11:35 FROGGS timotimo: for the uni ops we #if'd them... makes it more clear that it is NYI
11:36 FROGGS (to me, anyway)
11:36 FROGGS but... if the stubbed op throws a NYI message would be the same
11:36 FROGGS it would*
11:37 timotimo hm
11:37 timotimo i was about to implement it as desugaring to nqp::hash("file", "unknown", "line", "unknown")
11:39 timotimo or perhaps give -1
11:40 dalek nqp: 1bb9a04 | timotimo++ | src/vm/jvm/QAST/Compiler.nqp:
11:40 dalek nqp: stub getcodelocation on jvm, giving unknown data for now
11:40 dalek nqp: review: https://github.com/perl6/nqp/commit/1bb9a04d1a
11:40 dalek rakudo/nom: 68c0009 | timotimo++ | tools/build/NQP_REVISION:
11:40 dalek rakudo/nom: bump NQP for getcodelocation ops on Moar and stubbed on JVM
11:40 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/68c0009941
11:43 dalek rakudo/nom: b6bc4ec | lizmat++ | src/core/Cool.pm:
11:43 dalek rakudo/nom: Handle negative index values (return False always)
11:43 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/b6bc4ecd08
11:45 dalek roast: f0e49aa | lizmat++ | S32-str/substr-eq.t:
11:45 dalek roast: Add basic Cool.substr-eq tests
11:45 dalek roast: review: https://github.com/perl6/roast/commit/f0e49aa7a4
11:50 * grondilu used the REPL and was a bit confused by the '*' showing up when not ending a line with ';'.  Supposes he'll get used to it.
11:51 psch grondilu: hitting enter twice should work too, instead of ending on ;
11:52 psch grondilu: but it's admittedly a bit unintuitive as-is, TimToady++ had a few ideas how to make it more obvious, but i'm first trying to get the parsing actually-right
11:53 timotimo python's ">>>" and "..." are a bit more obvious, but that may just be "being used to it"
11:53 psch timotimo: i like having ";?" as continuation prompt, and replacing the whole line on enter-on-empty-line
11:54 timotimo ;?, interesting
11:54 timotimo i don't know what that smiley represents :P
11:54 timotimo but perl6 is already full of smileys, so it fits :D
11:54 osfameron quirky smile with adorable dimple
11:54 dalek rakudo/nom: 49ba4bf | lizmat++ | t/spectest.data:
11:54 dalek rakudo/nom: Add basic Cool.substr-eq tests
11:54 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/49ba4bf9c8
11:55 psch replacing with the output that is
11:55 lizmat onwards to Utrecht for NLPW preparations&
11:55 psch and maybe with some other continuation prompt on enter-after-not-empty-line
12:06 lolisa joined #perl6
12:07 * nwc10 now has 3 patches for NQP at https://gitlab.com/nwc10/nqp.git
12:07 nwc10 (All to do with tests)
12:07 nwc10 (including getting 1 test working again on 32 bit parrot)
12:08 itz is that the hipster or stallman github? :)
12:08 masak I think one should get a continuation prompt only if the parser is in term position. both ';' and Enter-twice seem to be hoops the user has to jump through rather than the REPL.
12:10 nwc10 itz: it's Dutch. It bought gitorious
12:10 nwc10 Actually, I think that it's Dutch
12:10 nwc10 it's somewhere in the EU
12:11 psch masak: in terms of Perl6/Grammar.nqp that means only calling moreinput in EXPR?
12:11 _mg_ joined #perl6
12:18 egrep joined #perl6
12:22 aborazmeh joined #perl6
12:22 aborazmeh joined #perl6
12:26 nwc10 itz: it's written in Ruby not Guile, so presumably that makes it more hipster than Stallman
12:28 masak psch: I'm not sure, I don't have a good grasp of those bits of the parser.
12:28 masak psch: but it's mean that `2 + 2` is a finished statement whereas `2 + 2 *` isn't.
12:29 masak psch: basically "can I insert EOF here and it's still a valid program?"
12:29 psch masak: that'd mean «if 0 { 0 }\nelse { 1 }» doesn't work
12:29 raiph joined #perl6
12:29 psch masak: some for «say 1\nif True»
12:30 masak I see what you're saying. but that's not a concern to me.
12:30 masak or rather, it's a much much smaller concern than not breaking the intuitive behavior of the Enter key
12:30 masak if someone wants to continue on the next line, they can Shift+Enter or something
12:31 masak that's the way the Chrome Dev Console does it.
12:31 psch i hadn't thought of that approach at all
12:31 psch but it sounds noticably easier
12:31 masak glad I could contribute something to the discussion ;)
12:31 psch i'm wondering if "paste stuff into the REPL" is a useful use-case
12:32 masak also secondary to just typing an expression and hitting Enter
12:32 timotimo fwiw, in many terminals you can ask the terminal emulator to signal copy-pasting to you
12:32 timotimo by bracketing pasted text in two escape sequences
12:34 psch actually, i think having a smart and a dumb REPL might be even more sensible
12:34 psch the first is what we had before my moreinput changes
12:35 psch the latter is with tab completion and moreinput
12:35 psch err
12:35 psch the other way around :)
12:35 psch eh, no
12:35 psch that'd maybe be in a module then
12:35 psch this stuff is hard :P
12:40 timotimo for a smart repl, i can't stop recommending finally making a IPython backend for perl6 :P
12:40 timotimo but it's kind of something that people might expect me to finally finish working on that
12:41 lolisa joined #perl6
12:42 koo5 joined #perl6
12:44 psch timotimo: i can shift my efforts towards that, if it helps
12:44 psch timotimo: i'd pull the moreinput stuff again, though, because the current state isn't really that useful
12:44 psch and eventually stuff it in a module instead
12:45 psch and impose "you have to end single statements with a ; if you don't want the continuation prompt" :P
12:45 Ulti +1 for IPython but more specifically Jupyter integration
12:45 timotimo what would help me the most would be hints for how the actual code should be structured to make the whole thing work
12:45 timotimo that includes things like making sure stdout/stderr get passed via the zmq socket
12:46 timotimo Ulti: that's exactly what i mean with "ipython backend"
12:46 Ulti timotimo there is a perl 5 implementation somewhere but I think it's a bit out of date
12:46 Ulti I tried looking at the Julia implementation but it does a lot more than the most basic integration
12:46 timotimo aye
12:46 xinming joined #perl6
12:47 timotimo https://github.com/timo/iperl6kernel/blob/master/wrapper.py - here's a python implementation of a part of the protocol
12:48 eli-se I wish I were a python.
12:49 Ulti timotimo Perl 6 has everything we need to do it without any Python though right?
12:49 eli-se I'd have a worriless life.
12:49 Ulti eli-se until you try to swallow a hippo
12:49 eli-se Or a camel. :3
12:52 PerlJam psch: What about making the repl a little smarter about statements ending in } too ?
12:53 RabidGravy joined #perl6
12:54 psch PerlJam: it's hard to distinguish cases.  a <blockoid> doesn't know if it's from statement_control:sym<if> or routine_def
12:55 psch if it is from statement_control:sym<if> we might want an else on the next line, if it's not we don't
12:55 psch (except i do it with masak++'s approach, which i'm not really sure i like)
12:55 psch even though i understand it's probably for the better for a stock REPL
12:56 PerlJam I guess an extra ; isn't so bad then  :)
13:01 jnthn .tell lizmat well, nqp::eqat is inconsistent with substr, it seems... Probably VM-level ops shouldn't be doing negatives magic with string offsets...
13:01 yoleaux jnthn: I'll pass your message to lizmat.
13:01 jnthn .tell lizmat otoh, we often like to throw typed exceptions for these things which probably means doing the check in Perl 6 code anyway.
13:01 yoleaux jnthn: I'll pass your message to lizmat.
13:01 FROGGS m: if 1 { } else
13:01 camelia rakudo-moar 49ba4b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/4F65Bkq2rX␤Missing block␤at /tmp/4F65Bkq2rX:1␤------> 3if 1 { } else7⏏5<EOL>␤    expecting any of:␤        parameterized block␤»
13:02 FROGGS psch: can't we use the "expecting any of:" for judging?
13:02 FROGGS like, if we don't expect anything or just expect statement end, then we run the code
13:03 rararara joined #perl6
13:04 slavik joined #perl6
13:04 _mg_ joined #perl6
13:08 virtualsue joined #perl6
13:08 psch FROGGS: i'm not sure.  i think that'd mean checking $/.'!highexpect' for elems > 1 && [0] != "statement end"?
13:09 psch FROGGS: i don't know if highexpect is available in place where we wouldn't throw normally though
13:10 FROGGS I'm not sure either
13:11 diana_olhovik joined #perl6
13:12 dj_goku joined #perl6
13:14 timotimo if you "just try to run the code and see if it explodes", you'll run into trouble with BEGIN time things
13:14 cschwenz is there an equivalent to Time::HiRes::time() in perl6?  or, from a slightly higher level, how do you time how long a section of code takes to run in perl6?
13:15 jnthn If it's not a hugeamount of code
13:15 jnthn perl6-m --profile foo.p6
13:16 PerlJam cschwenz: you can use the profiler or Benchmark.pm
13:16 cschwenz awesome, thanks jnthn and PerlJam  :-)
13:17 fhelmberger joined #perl6
13:17 PerlJam cschwenz: why are you interested in timing your code?
13:18 cschwenz i ran into a perl6 snippet which runs fine when perl6 is compiled with moar but takes crazy large amounts of time when perl6 is compiled with parrot.
13:19 cschwenz and i want to find out why
13:19 tadzik hah, well...
13:19 tadzik your answer is in your question
13:19 tadzik moar is crazy fast compared to parrot
13:19 timotimo that's very true, and kinda sad
13:21 cschwenz in that case, who has control of the homebrew "brew install rakudo-star"?  because it compiles a perl6 with parrot and that is the *first* thing a newbie to the language will likely try as it is listed as the first way to get Perl6 on http://rakudo.org/how-to-get-rakudo/
13:21 PerlJam cschwenz: Are you insterested in working on Parrot such that Rakudo can target it again?  Or you were just curious?  (btw, you do realize that rakudo-on-parrot has been suspended?)
13:21 timotimo [Coke] (iirc) is working on getting rakudo-on-moarvm into homebrew
13:21 jnthn Hm, brew is the OSX thingy?
13:21 timotimo yes, it is
13:21 PerlJam ah
13:21 jnthn Ah, then I think [Coke]++
13:22 timotimo moarvm itself is already in homebrew, if i understand it correctly
13:23 cschwenz it it, however "brew install rakudo-star" installs a parrot perl6 *not* a moarVM perl6
13:24 timotimo yes
13:24 timotimo as i said, [Coke]++ is working on getting the pieces in
13:24 cschwenz ah
13:24 timotimo next up is nqp, then comes rakudo and finally rakudo star
13:24 timotimo i'm sure there's more than enough little tweaks necessary to make nqp and rakudo feel welcome and at home in brew's infrastructure
13:25 leedo timotimo: i seem to remember it was macports that [Coke] was working on, could be wrong though
13:26 timotimo oh!
13:26 timotimo damn, i think you're right
13:26 leedo homebrew is a bit more popular these days
13:26 PerlJam who did the extant rakudo homebrew?
13:26 timotimo https://trac.macports.org/browser/trunk/dports/lang/MoarVM/Portfile
13:27 awwaiid in addition to iPython (er... jupiter or whatever), nrepl would be a good idea
13:27 awwaiid and YES, copy-paste into the REPL is a HUGE use-case
13:27 timotimo https://github.com/Homebrew/homebrew/blob/master/Library/Formula/rakudo-star.rb - doesn't say :\
13:28 rmgk_ joined #perl6
13:28 awwaiid but a smart-repl can likely detect a paste (based on an event or timing) and slurp it all in as one command if needed
13:28 timotimo it seems like github user "squeeks" initially built the rakudo star homebrew recipe
13:28 timotimo formula*
13:29 timotimo ashgti, who was also nice enough to do some highlighting work, also has a few lines touched (as early as 2012)
13:29 leedo timotimo: looking at that homebrew file looks like it should be using moar
13:30 timotimo yes, it looks like it should
13:30 timotimo can you paste some build output or debug logs or something?
13:30 cschwenz hmm, maybe i pulled an old cached copy..  :-/
13:31 cschwenz it was, yesterday evening, it was late and i said screw it i'm going to bed :-(  so, i've got nothing now
13:31 cschwenz i'll try again this evening when i get home
13:33 timotimo thank you!
13:33 cschwenz np :-)
13:34 ilogger2 joined #perl6
13:47 skids joined #perl6
13:54 aborazmeh joined #perl6
13:54 aborazmeh joined #perl6
13:55 anaeem1 joined #perl6
14:04 tinyblak joined #perl6
14:10 Sqirrel joined #perl6
14:19 anaeem1 joined #perl6
14:19 n0vacane Good afternoon gentle perl monks
14:22 moritz hi n0vacane. This is not perlmonks :-)
14:22 anaeem1 joined #perl6
14:23 Ven .u ℍ
14:23 yoleaux U+210D DOUBLE-STRUCK CAPITAL H [Lu] (ℍ)
14:25 n0vacane Sure it may not be perlmonks.org, and I guess the definition 'monk' does not really fit you guys.
14:26 moritz I do have an account on perlmonks
14:26 moritz but it feels a bit different than in here :-)
14:27 n0vacane maybe cenobite is a more fitting noun
14:27 moritz http://www.perlmonks.org/?node=Saints+in+our+book seems I'm no. 8 by XP in there
14:28 n0vacane Cardinal, huh.
14:28 nine .tell lizmat just to let you know: I currently have a real world use case where I need the same module (Crypt::RSA) in two different versions by two different authors in the same process. Too bad, that it's Perl 5 code :)
14:28 yoleaux nine: I'll pass your message to lizmat.
14:28 n0vacane and it only took eight years!
14:29 moritz that's, like, a quarter of my life :-)
14:30 n0vacane moritz, there are some guys that have only be mere priests for 15 years
14:30 PerlJam that's me. (sorta)
14:30 n0vacane be=been
14:30 PerlJam I'be been on perlmonks since March of 2000 ... and I'm # 258 on that list
14:31 moritz n0vacane: well, XP is mostly a sum over activity, not about total time since joining
14:31 PerlJam Clearly I don't have enough free time on my hands :)
14:31 moritz well, these days I don't either
14:32 n0vacane :) well i guess you need to go on more crusades and missionary work
14:32 Perl6_newbee joined #perl6
14:33 PerlJam aside from today, I was apparently on 4 weeks ago (I don't remember it though)
14:33 eli-se joined #perl6
14:34 n0vacane So, that site is like stackoverflow for perl
14:34 eli-se omg Stack Overflow
14:34 PerlJam n0vacane: but about a decade earlier
14:34 moritz the big difference is that that perlmonks encourages discussions, whereas stackoverflow encourages The One True Answer
14:35 moritz (and the second big difference is that SO loads much faster)
14:35 n0vacane :) i like this place
14:36 PerlJam perlmonks also still uses technology from about a decade before SO  ;)
14:36 n0vacane also, it probably only needs a 64mb vps, whereas SO probably needs 64gb of ram to run the site
14:37 moritz not quite
14:37 n0vacane if i wanted to take up the cause of perl and become a perlmonk, do i have to become celibate?
14:38 n0vacane moritz, yeah that was probably a stretch
14:38 PerlJam n0vacane: no, but you must celebrate
14:39 n0vacane ok :)
14:40 n0vacane well, have a good afternoon gentle(wo)men !!
14:42 grondilu .oO( "gentlehuman" would probably do as a gender-neutral word for that)
14:42 jdv79 [Coke]: are you commuting to the nyc thing on 5/2?
14:44 tinyblak joined #perl6
14:44 flussence last time I heard about SO's servers (I think it *was* almost a decade ago, jeez) it was already needing at least a dozen gigabytes of RAM to handle load...
14:45 PerlJam grondilu: are we all human? ;)
14:48 jdv79 huh.  i first logged into PM 2001-7 and last 2009-7.  i think that's when irc took over for me.
14:52 molaf__ joined #perl6
14:59 muraiki SO actually has a pretty interesting architecture: http://highscalability.com/blog/2014/7/21/stackoverflow-update-560m-pageviews-a-month-25-servers-and-i.html
15:00 muraiki apparently they could run on only 5 servers
15:01 moritz which is rather impressive, given their number of requests
15:01 moritz (whereas iirc perlmonks runs on two web servers and one DB server, serving only a tiny fraction of the requests that SO does)
15:01 jdv79 560M/month seems a bit low, no?  i think across all the hearst magazine sites (20 or so) we had 30M/day...maybe.  my memory isn't great.
15:01 mst although perlmonks uses the everything engine which is meta-dynamic to the power N
15:02 jdv79 and that all ran on one cluster of super lame mod_perl/mason/HT boxes
15:06 muraiki jdv79: it does seem low, but it someone from SO clarified in a comment: "Page views only account for a fraction of our load. We serve many AJAX/JSON routes and API requests which total over 130 million requests on any given weekday. For example yesterday we handled 150,091,472 requests which is about 1730 RPS on average."
15:06 muraiki "At peak we're usually seeing 2600-3000 RPS at about 15% load on each of the 9 primary web servers. For reference: we handled 3,710,241,322 (3.7 billion) requests in the last 30 days."
15:08 jdv79 ah
15:09 rindolf joined #perl6
15:19 dalek perl6.org: af7c131 | (Zoffix Znet)++ | source/ (594 files):
15:19 dalek perl6.org: Make it more obvious we're reading an archive
15:19 dalek perl6.org:
15:19 dalek perl6.org: Closes #11
15:19 dalek perl6.org: review: https://github.com/perl6/perl6.org/commit/af7c13179a
15:21 ZoffixWork joined #perl6
15:21 timotimo now i'd love to see some examples where we're still lacking line numbers and filenames in error messages where they would be helpful
15:21 timotimo so that i can find places to put my nqp::getcodelocation
15:22 ZoffixWork Hey all. I need help. I made a boo-boo in the above commit. What's a safe way to fix it (or undo it and commit a new one)? I know there's git rebase -i HEAD~2; git push --force; but AFAIK it isn't safe to do because others have access to the repo or something.
15:22 btyler just write a new commit. you can't rebase a public repo (without making others angry :)
15:22 flussence do a revert commit, then a new fixed one
15:22 btyler roll on forwards
15:23 ZoffixWork btyler, OK, that sounds like a plan.
15:23 timotimo you can "git revert" and it'll make the anticommit of the latest commit
15:23 timotimo and put it "on top"
15:23 timotimo if you haven't pushed it yet, you can "git commit --amend" other changes into that revert commit
15:24 dalek nqp: c4044af | timotimo++ | tools/build/MOAR_REVISION:
15:24 dalek nqp: bump for MoarVM's fixed nqp::getcodelocation
15:24 dalek nqp: review: https://github.com/perl6/nqp/commit/c4044affbd
15:24 jdv79 timotimo: how are errors missing location info?  isn't that always around and captured already?
15:25 timotimo sometimes it may not be
15:25 timotimo like when we hit a where block in a signature, does it give the right location then?
15:25 timotimo we could also offer line numbers for the candidate list of multiple dispatch errors
15:27 jdv79 i can see that last one but seems weird there would be multiple ways to get it in the standard exception cases but ok.
15:27 dalek rakudo/nom: 5b70da4 | timotimo++ | tools/build/NQP_REVISION:
15:27 dalek rakudo/nom: bump NQP for fixed nqp::getcodelocation
15:27 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/5b70da4797
15:28 timotimo in regular exceptions it already works fine
15:31 timotimo m: say nqp::getcodelocation(nqp::getattr(&[<], Code, '$!do'))
15:31 camelia rakudo-moar 49ba4b: OUTPUT«file => src/gen/m-CORE.setting, line => 5400␤»
15:31 timotimo i think this is pretty cool.
15:31 dalek perl6.org: d4479f9 | (Zoffix Znet)++ | source/archive/ (17 files):
15:31 dalek perl6.org: Fixes duplicate wrappers on archive notices
15:31 dalek perl6.org:
15:31 dalek perl6.org: Bad Zoffix! No cookie! (Zoffix Znet)--
15:31 dalek perl6.org: review: https://github.com/perl6/perl6.org/commit/d4479f9f67
15:32 masak m: say "a", "c" ... "i"
15:32 camelia rakudo-moar 49ba4b: OUTPUT«a c d e f g h i␤»
15:32 timotimo :o
15:32 timotimo that's terrible
15:33 masak I'm of two minds about it.
15:33 ZoffixWork I love it
15:33 PerlJam interesting
15:33 jdv79 what 2 minds?
15:33 ZoffixWork m: say "a", "c" ... "i", "k" ... "n", 1 ... 4
15:33 camelia rakudo-moar 49ba4b: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '⏏n' (indicated by ⏏)␤  in method Numeric at src/gen/m-CORE.setting:15981␤  in sub infix:<==> at src/gen/m-CORE.setting:5394␤  in sub infix:<==> at src/gen/m-C…»
15:33 ZoffixWork :(
15:34 PerlJam ZoffixWork: precedence
15:34 ZoffixWork Ah
15:34 Ven masak: seems to also make no sense to me
15:34 masak jdv79: (a) it's consistent, although not in the way I expected (b) it's not an arithmetic sequence for chars, like 1, 3 ... 9
15:34 timotimo oh, is it just precedence?
15:35 ZoffixWork m: say "a", "c" ... "i", "k" ... "n", (1 ... 4)
15:35 camelia rakudo-moar 49ba4b: OUTPUT«a c d e f g h i k l m n 1 2 3 4␤»
15:35 masak timotimo: no.
15:35 ZoffixWork That's weird.
15:35 RabidGravy woah, speaking of PerlMonks (from an hour ago) apparently I have the 124th highest XP and I haven't logged in for six years :-\
15:35 masak timotimo: `...` is very loose
15:35 masak looser than comma
15:35 timotimo right
15:37 timotimo what's a good name for an accessor on Code (and Block and Routine and stuff) that'd give file name and line number information?
15:37 masak timotimo: .location ?
15:37 RabidGravy just what I was going to say
15:37 timotimo good
15:38 RabidGravy which can also be conveniently abbreviated to loc (which people will take as line of code)
15:39 PerlJam RabidGravy++
15:39 masak I think loc is a bit short
15:39 PerlJam Are you worried about improper huffmanization?
15:39 masak yes.
15:39 PerlJam Or just that you think it should stand out more?
15:40 masak I agree that 'loc' is cute, but I'm not sure it deserves to be that short
15:40 masak 'location' is longer, but a lot clearer
15:40 RabidGravy also "save the short ones for the most used ones" :)
15:40 btyler or even 'source-location', since .location and .WHERE are a bit ambiguous
15:40 masak 'line-and-file' would also work, I guess, but the dashes are unfortunate
15:40 PerlJam I like .loc, but I don't like it enough to argue about it :)
15:41 * FROGGS .oO( line'n'file )
15:41 timotimo m: say nqp::getcodelocation(nqp::getattr(&[<], Code, '$!do')).WHAT
15:41 camelia rakudo-moar 49ba4b: OUTPUT«␤»
15:41 timotimo ENOWHAT
15:41 timotimo m: say (nqp::hllize(nqp::getcodelocation(nqp::getattr(&[<], Code, '$!do'))).WHAT
15:41 camelia rakudo-moar 49ba4b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/kScrjTWVaw␤Unable to parse expression in parenthesized expression; couldn't find final ')' ␤at /tmp/kScrjTWVaw:1␤------> 3(nqp::getattr(&[<], Code, '$!do'))).WHAT7⏏5<EOL>␤    expecting any of:␤ …»
15:41 timotimo m: say (nqp::hllize(nqp::getcodelocation(nqp::getattr(&[<], Code, '$!do')))).WHAT
15:41 camelia rakudo-moar 49ba4b: OUTPUT«(Hash)␤»
15:41 timotimo that's probably what i have to do
15:43 dalek perl6.org: 701bcc2 | (Zoffix Znet)++ | source/compilers/index.html:
15:43 dalek perl6.org: Add Zavolaj to Compilers->Supplementals section
15:43 dalek perl6.org:
15:43 dalek perl6.org: Closes #6
15:43 dalek perl6.org: review: https://github.com/perl6/perl6.org/commit/701bcc22df
15:45 timotimo hmm, i probably also have to hllize the contents of the hash?
15:45 timotimo m: say nqp::hllize(nqp::getcodelocation(nqp::getattr(&[<], Code, '$!do'))).<file>.WHAT
15:45 camelia rakudo-moar 49ba4b: OUTPUT«(Str)␤»
15:45 timotimo m: say nqp::hllize(nqp::getcodelocation(nqp::getattr(&[<], Code, '$!do'))).<line>.WHAT
15:45 camelia rakudo-moar 49ba4b: OUTPUT«(Int)␤»
15:45 timotimo apparently not needed, cool.
15:50 FROGGS timotimo: it might work out on moar better then on jvm
15:51 timotimo https://gist.github.com/timo/2d01cb18abba25e44462 - if you ask me, this is pretty cool.
15:53 eli-se joined #perl6
15:58 telex joined #perl6
16:01 flussence oh wow, that is nice.
16:05 flussence "only perl can parse Perl" stops being a problem when the language has awesome introspection stuff like that
16:07 mr-foobar joined #perl6
16:08 timotimo still a problem, as you have to execute code and you may have untrusted code you want to inspect
16:08 timotimo like when you fire up your IDE to analyze your way through a foreign code base
16:08 timotimo the least thing you would like to see is some malicious BEGIN block not properly being ... blocked
16:08 timotimo and rm -rf ing your home directory ...
16:09 pullphinger joined #perl6
16:10 PZt joined #perl6
16:19 koo5 joined #perl6
16:25 psch timotimo: it occurs to me that we still need moreinput for jupyter, don't we?
16:26 timotimo maybe, maybe not
16:27 timotimo depends, really; the console/interpreter parts would like moreinput
16:29 timotimo normally, you input multiple lines in a row in the notebook (which is the far more interesting piece of technology they have IMO) and execute it en block
16:31 mr-fooba_ joined #perl6
16:40 dalek rakudo/nom: 20e95b6 | peschwa++ | .gitignore:
16:40 dalek rakudo/nom: Ignore fudged Rakudo test files and the new debug runners.
16:40 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/20e95b6239
16:41 psch timotimo: i'll admit i don't quite understand what the notebook does
16:41 psch timotimo: it looks like a browser based editor to me that can build websites?
16:42 psch although that's probably not the cool bit, the export-to-html
16:44 timotimo it's an executable document format, so to say
16:52 tinyblak joined #perl6
16:57 mohij joined #perl6
17:02 yvan1 joined #perl6
17:03 RabidGravy there that's better:
17:03 timotimo m: my Str $foo = "hi"; $foo = Nil; say $foo.perl;
17:03 camelia rakudo-moar 5b70da: OUTPUT«Str␤»
17:03 RabidGravy [jns@jail0133 ~/.rakudobrew]$ perl6
17:03 RabidGravy > say $*KERNEL;
17:03 RabidGravy freebsd (8.4.RELEASE.p.4)
17:09 dalek specs: f752ddb | TimToady++ | S03-operators.pod:
17:09 dalek specs: some clarifications on sequence semantics
17:09 dalek specs: review: https://github.com/perl6/specs/commit/f752ddb51c
17:16 lucasb joined #perl6
17:17 timotimo While looking for '/home/timo/perl6/install/share/perl6/site//home/timo/perl6/moarvm/../install/share/perl6/site/2': no such file or directory
17:17 timotimo well, that's helpful!
17:17 timotimo ... not
17:23 timotimo use of uninitialized value %!metainfo of type Any in string context  in method bundle at lib/Panda/Bundler.pm:120
17:23 timotimo what exactly did i wrongs? :(
17:26 dalek specs: befb20c | TimToady++ | S02-bits.pod:
17:26 dalek specs: "0" is true
17:26 dalek specs:
17:26 dalek specs: Why do people keep thinking I'm not in favor of this change?
17:26 dalek specs: Oh, because I never specced it, duh.
17:26 dalek specs: review: https://github.com/perl6/specs/commit/befb20c3bf
17:26 timotimo hehehe
17:35 andreoss joined #perl6
17:38 caymanboy joined #perl6
17:39 beastd joined #perl6
17:40 gfldex joined #perl6
17:43 lucasb I was trying some examples about subscript adverbs:
17:44 lucasb m: my @a; say so @a[666] :exists :!p
17:44 camelia rakudo-moar 20e95b: OUTPUT«True␤»
17:47 lucasb I just thought it was a little funny exists with other adverbs be true
17:48 lucasb I mean, I associate "exists" with boolean, and while most objects are true, there is a limited number of objects that are false.
17:51 * timotimo is whipping his json parser into shape so that it can read the MANIFEST for speed comparison purposes
17:52 FROGGS joined #perl6
17:52 Sqirrel joined #perl6
17:54 timotimo we fail pretty hard at non-existing files: perl6 -e 'say "WHATISTHIS".IO.slurp.perl'
17:54 timotimo Malformed UTF-8 at line 1 col 21
17:55 andreoss how can i embed something in <> backets in order to make a Rat?
17:55 andreoss m: my $l = 1; say (<1/$l>).WHAT
17:55 camelia rakudo-moar 20e95b: OUTPUT«(Str)␤»
17:55 ugexe i was getting that error yesterday myself for something i was working on
17:55 timotimo < > doesn't interpolate, andreoss
17:56 timotimo you can just use / to make a Rat, too
17:56 andreoss m: my $l = 1; say (1/3).WHAT
17:56 camelia rakudo-moar 20e95b: OUTPUT«(Rat)␤»
17:57 timotimo JSON::Fast is only 7 times slower than JSON::Tiny!
17:57 timotimo hooray!
17:57 andreoss <> force Rat or what? 1/2*1/3 is not the same as <1/2> * <1/3> in the repl
17:57 ugexe would a json parser by any other name parse as fast?
17:58 TimToady m: say <1i>.WHAT
17:58 camelia rakudo-moar 20e95b: OUTPUT«(Str)␤»
17:58 TimToady that's supposed to be Complex
17:58 timotimo m: say 1/2*1/3
17:58 camelia rakudo-moar 20e95b: OUTPUT«0.166667␤»
17:58 timotimo m: say (1/2)*(1/3)
17:58 camelia rakudo-moar 20e95b: OUTPUT«0.166667␤»
17:58 timotimo m: say <1/2>*<1/3>
17:58 camelia rakudo-moar 20e95b: OUTPUT«0.166667␤»
17:58 TimToady rakudo is cheating
17:59 TimToady it's relying on Str.Numeric to fix it
17:59 TimToady or maybe it's just Complex it's still cheating on
17:59 TimToady m: say <1/3>.WHAT
17:59 camelia rakudo-moar 20e95b: OUTPUT«(Rat)␤»
17:59 TimToady yeah, Rat got fixed, but Complex didn't yet
18:01 timotimo it sort of seems like our junction unfolding optimization is gone :(
18:02 timotimo hooray!
18:02 timotimo JSON::Fast is *actually* faster than JSON::Tiny now
18:02 TimToady I take it you were using junctions...
18:03 timotimo yeah
18:03 timotimo JSON::Tiny: 1.05user 0.02system 0:01.07elapsed 100%CPU (0avgtext+0avgdata 102260maxresident)k
18:04 timotimo JSON::Fast: 0.73user 0.02system 0:00.75elapsed 99%CPU (0avgtext+0avgdata 94860maxresident)k
18:05 PerlJam timotimo: what's that parsing?
18:06 timotimo my MANIFEST
18:08 * FROGGS will work now on getting rid of json parsing/generating for CUR::Installation
18:08 timotimo damn
18:08 timotimo just as i was building a fast json parser for this task
18:08 FROGGS timotimo: the JSON blob was always meant as a temporary thing
18:09 FROGGS timotimo: and we discussed here often that I'd do that
18:09 timotimo right
18:09 FROGGS well, "often"
18:09 timotimo well, we can use a faster json parser anyway
18:09 FROGGS very very true
18:09 PerlJam indeed
18:09 FROGGS for panda for example
18:10 timotimo wow
18:10 timotimo 5th on my list in the profiler is &return
18:15 cschwenz_ joined #perl6
18:15 cschwenz_ greetings!
18:16 FROGGS hi cschwenz
18:16 cschwenz_ as promised, i've re-run "brew install rakudo-star"
18:16 PerlJam cschwenz_: did it work?
18:16 timotimo ah, good
18:16 cschwenz_ and, well, see for yourself...
18:16 cschwenz_ MacBook-Pro:~ cschwenz$ brew info rakudo-star rakudo-star: stable 2014.04 http://rakudo.org/ Conflicts with: parrot Not installed From: https://github.com/Homebrew/homebrew/blob/master/Library/Formula/rakudo-star.rb ==> Dependencies Required: libffi ✔ Optional: gmp ✔, icu4c ✔, pcre ✘ ==> Options --with-gmp Build with gmp support --with-icu4c Build with icu4c support --with-jvm Build also for jvm as an alternate backend.
18:17 cschwenz_ argh
18:17 flussence meant to paste a pastebin link? :)
18:17 cschwenz_ the tl;dr is brew info is showing "From: https://github.com/Homebrew/homebrew/blob/master/Library/Formula/rakudo-star.rb"
18:18 cschwenz_ one sec, paste bin coming up
18:19 FROGGS 2014.04?
18:19 cschwenz_ http://pastebin.com/XPEXi23e
18:20 cschwenz_ so it is pointing at the correct .rb file (and that file shows it should be using moarVM) but when it comes time to install, it uses parrot
18:20 timotimo got down to about 0.71 elapsed
18:20 flussence stale local cache?
18:21 timotimo huh.
18:22 cschwenz_ flussence:  do you happen to know where homebrew keeps its cache?
18:22 flussence not a clue, I'm using gentoo :)
18:23 FROGGS I'd try: brew help
18:24 PerlJam cschwenz_: does "brew update
18:24 PerlJam " do anything?
18:24 cschwenz_ one sec, checking...   also found brew --cache tells you where the cache is
18:25 Rounin joined #perl6
18:26 cschwenz_ its not a stale cache as i cleared that and it is still using parrot
18:26 PerlJam cschwenz_: maybe try "brew upgrade rakudo-star" ?
18:26 PerlJam caveat lector, I'm just grasping at straws from ubuntu-land :)
18:26 cschwenz_ :-)
18:26 cschwenz_ doing brew upgrade now
18:27 oetiker joined #perl6
18:27 cschwenz_ the brew upgrade said it added/updated a whole slew of formulas and deleted a few others
18:28 cschwenz_ \o/ the brew upgrade was the trick
18:29 cschwenz_ ==> Downloading http://rakudo.org/downloads/star/rakudo-star-2015.03.tar.gz
18:29 cschwenz_ ==> perl Configure.pl --prefix=/usr/local/Cellar/rakudo-star/2015.03 --backends=moar --gen-moar
18:29 FROGGS yay!
18:29 cschwenz_ it's now off building perl6 with moarVM
18:29 FROGGS that does not take that long :o)
18:29 cschwenz_ thanks PerlJam!
18:30 PerlJam cschwenz_: you're welcome
18:30 timotimo 0.66user 0.01system 0:00.67elapsed 100%CPU (0avgtext+0avgdata 94948maxresident)k
18:30 timotimo i want your json documents, but they must not contain numbers with exponential notation, negative numbers or decimal points :P
18:30 PerlJam now we can start answering your Perl 6 programming questions whenever you have some  :-)
18:30 PerlJam timotimo: can't you write a program to generate json docs?  :)
18:31 timotimo that'd be too easy
18:31 cschwenz_ heh, yeah :-)
18:31 timotimo JSON::Tiny: 1.05user 0.02system 0:01.08elapsed 99%CPU (0avgtext+0avgdata 102252maxresident)k
18:31 timotimo i think that's a neat win. not 10x as i would have hoped, though
18:31 PerlJam JSON::Fast uses C or something else?
18:31 timotimo hm, actually
18:31 timotimo 0.55user 0.02system 0:00.57elapsed 99%CPU (0avgtext+0avgdata 91960maxresident)k
18:31 timotimo this is what only slurping the data takes
18:31 timotimo no, it's pure perl6 with nqp ops
18:31 PerlJam ah
18:33 vendethiel joined #perl6
18:33 flussence timotimo: here's a script that downloads 150KB of json input, is that big enough? ;) https://github.com/flussence/HTML5-Entities/blob/master/tools/rebuild-html5-entity-data.p6
18:35 flussence (JSON::Tiny::from-json is 80% of the runtime there)
18:36 timotimo okay, i have a bigger file now
18:37 timotimo 12.73user 0.05system 0:12.79elapsed 99%CPU (0avgtext+0avgdata 226960maxresident)k
18:37 timotimo 1.59user 0.02system 0:01.62elapsed 99%CPU (0avgtext+0avgdata 102064maxresident)k
18:37 timotimo guess which is which
18:37 larion joined #perl6
18:38 * timotimo is slightly pleased
18:38 flussence whoa
18:39 flussence (and it's easy to get a ginormous json file - just run --profile and snip it out of the html :)
18:39 FROGGS timotimo: did you check the result?
18:39 timotimo FROGGS: why would i? :P
18:39 FROGGS :P
18:40 dalek roast: 5a9c4e2 | usev6++ | S24-testing/3-output.t:
18:40 dalek roast: Add test for RT #115024
18:40 dalek roast: review: https://github.com/perl6/roast/commit/5a9c4e27ab
18:40 timotimo that could only show i'm doing things wrong
18:41 timotimo damn, things are wrong here :(
18:42 timotimo ah, yeah
18:42 timotimo when i removed return statements, all my strings turned into "1" :)
18:42 zakharyas joined #perl6
18:43 FROGGS ohh, so you parse JSON *and* do compression :o)
18:44 timotimo hahaha
18:46 dalek roast: f513cec | usev6++ | S24-testing/ (3 files):
18:46 dalek roast: Rewrite test for output of passer
18:46 dalek roast: review: https://github.com/perl6/roast/commit/f513cecd0c
18:46 timotimo how do i properly diff two files that consist of a single hugely long line
18:46 andreoss joined #perl6
18:47 flussence find a reasonable delimiter you can s:g/$foo/\n/ on :)
18:49 timotimo right, ","
18:52 timotimo oh
18:52 timotimo no difference between the two files
18:52 FROGGS Probable version skew in pre-compiled 'EVAL_0' (cause: no object at index 26)
18:52 FROGGS :o(
18:52 timotimo :o
18:53 Sqirrel joined #perl6
18:55 timotimo here's another comparison
18:55 timotimo 61.02user 0.22system 1:01.28elapsed 99%CPU (0avgtext+0avgdata 748364maxresident)k
18:55 FROGGS timotimo: that's impressing: https://gist.github.com/timo/2d01cb18abba25e44462
18:55 timotimo 5.86user 0.05system 0:05.92elapsed 99%CPU (0avgtext+0avgdata 171204maxresident)k
18:55 FROGGS impressive*
18:55 timotimo thank you :)
18:56 timotimo m: say 748364 / 171204
18:56 camelia rakudo-moar 20e95b: OUTPUT«4.371183␤»
18:56 timotimo takes only a 4th of the ram
18:56 FROGGS timotimo: I would not mind if you'd replace the json parser in rakudo...
18:57 timotimo well, first i'll have to also handle backslash sequences and numbers other than positive integers :P
18:57 FROGGS changing the MANIFEST to perl does not seem to be that easy
19:04 baest joined #perl6
19:13 _mg_ joined #perl6
19:19 timotimo and true and false and nan and both inf and... not sure what else
19:20 timotimo I will use the test suite of json::tiny for it,  too
19:28 tony-o timotimo: should i open an rt for the io::socket gist?
19:40 yvan1 joined #perl6
19:41 dalek rakudo/nom: 0b7c5ba | TimToady++ | src/core/operators.pm:
19:41 dalek rakudo/nom: implement '000'...'077' and such correctly
19:41 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/0b7c5bae40
19:41 dalek roast: 8be2a7a | TimToady++ | S03-sequence/nonnumeric.t:
19:41 dalek roast: test '000'...'077' and friends
19:41 dalek roast: review: https://github.com/perl6/roast/commit/8be2a7a0ba
19:47 Sqirrel joined #perl6
19:57 diana_olhovik joined #perl6
20:00 _mg_ joined #perl6
20:02 larion joined #perl6
20:03 bartolin timotimo: I didn't follow closely what you implemented wrt line numbers. but maybe RT #120443 can benefit from your work?
20:05 timotimo synopsebot ... ;(
20:05 timotimo hm, oof
20:05 timotimo dunno
20:06 bartolin ah, yes, he's missing. https://rt.perl.org/Ticket/Display.html?id=120443
20:06 timotimo i don't think we can do much better there with what i made
20:07 bartolin :-(
20:08 timotimo what i made gives you the ability to go from any Code object to the line and filename where its implementation begins
20:09 bartolin aha. I'll (try to) keep that in mind
20:09 bartolin timotimo++
20:11 timotimo thanks :)
20:14 RabidGravy for reference how much memory does that use compared to e.g sub foo {};  I tend to write code with hundreds of small methods rather than fewer long ones
20:22 TimToady m: say '000'...'077'
20:22 camelia rakudo-moar 0b7c5b: OUTPUT«000 001 002 003 004 005 006 007 010 011 012 013 014 015 016 017 020 021 022 023 024 025 026 027 030 031 032 033 034 035 036 037 040 041 042 043 044 045 046 047 050 051 052 053 054 055 056 057 060 061 062 063 064 065 066 067 070 071 072 073 074 075 076 077␤»
20:22 TimToady m: say '$a'...'&c'
20:22 camelia rakudo-moar 0b7c5b: OUTPUT«$a $b $c %a %b %c &a &b &c␤»
20:22 eli-se m: say '007' .. 'bond'
20:22 camelia rakudo-moar 0b7c5b: OUTPUT«"007".."bond"␤»
20:22 eli-se :O
20:23 larion joined #perl6
20:23 TimToady the strings have to be equal length to get those semantics
20:23 eli-se m: say '007' ... 'bond'
20:23 camelia rakudo-moar 0b7c5b: OUTPUT«007 008 009 010 011 012 013 014 015 016 017 018 019 020 021 022 023 024 025 026 027 028 029 030 031 032 033 034 035 036 037 038 039 040 041 042 043 044 045 046 047 048 049 050 051 052 053 054 055 056 057 058 059 060 061 062 063 064 065 066 067 068 069 070 …»
20:24 TimToady m: say 'a0' ... 'f9'
20:24 camelia rakudo-moar 0b7c5b: OUTPUT«a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 b0 b1 b2 b3 b4 b5 b6 b7 b8 b9 c0 c1 c2 c3 c4 c5 c6 c7 c8 c9 d0 d1 d2 d3 d4 d5 d6 d7 d8 d9 e0 e1 e2 e3 e4 e5 e6 e7 e8 e9 f0 f1 f2 f3 f4 f5 f6 f7 f8 f9␤»
20:24 TimToady m: say '❶❶' ... '➓➓'
20:24 camelia rakudo-moar 0b7c5b: OUTPUT«❶❶ ❶❷ ❶❸ ❶❹ ❶❺ ❶❻ ❶❼ ❶❽ ❶❾ ❶❿ ❶➀ ❶➁ ❶➂ ❶➃ ❶➄ ❶➅ ❶➆ ❶➇ ❶➈ ❶➉ ❶➊ ❶➋ ❶➌ ❶➍ ❶➎ ❶➏ ❶➐ ❶➑ ❶➒ ❶➓ ❷❶ ❷❷ ❷❸ ❷❹ ❷❺ ❷❻ ❷…»
20:25 eli-se nice
20:25 TimToady hmm, something not right there
20:26 eli-se m: L: for 1..2 { }; next L
20:26 camelia rakudo-moar 0b7c5b: ( no output )
20:26 RabidGravy are they actual little numbered balls or is xchat messing around?
20:26 eli-se m: sub f { L: for 1..2 { }; L }; next f
20:26 camelia rakudo-moar 0b7c5b: ( no output )
20:26 TimToady m: say '❶' ... '➓'
20:26 camelia rakudo-moar 0b7c5b: OUTPUT«❶ ❷ ❸ ❹ ❺ ❻ ❼ ❽ ❾ ❿ ➀ ➁ ➂ ➃ ➄ ➅ ➆ ➇ ➈ ➉ ➊ ➋ ➌ ➍ ➎ ➏ ➐ ➑ ➒ ➓␤»
20:26 TimToady ah, I see what I did
20:27 eli-se m: sub f(&g) { L: for 1..2 { &g(L); .say } }; f({ next $^a })
20:27 camelia rakudo-moar 0b7c5b: ( no output )
20:27 eli-se lol
20:27 eli-se crazy control flow
20:27 nwc10 RabidGravy: they are little numbered balls. My terminal is squidging them rather badly. It's easier to see on the web log: http://irclog.perlgeek.de/perl6/2015-04-09#i_10418138
20:27 TimToady m: say '➊ ➊ ' ... '➓➓'
20:27 camelia rakudo-moar 0b7c5b: OUTPUT«➊ ➊ ␤»
20:27 skids m: say '₂₂'...'₄₀'
20:27 camelia rakudo-moar 0b7c5b: OUTPUT«₂₂ ₂₁ ₂₀ ₃₂ ₃₁ ₃₀ ₄₂ ₄₁ ₄₀␤»
20:28 RabidGravy yeah the black ones with white numbers I can't read at all
20:29 TimToady m: say '❶❶' ... '❿❿'
20:29 camelia rakudo-moar 0b7c5b: OUTPUT«❶❶ ❶❷ ❶❸ ❶❹ ❶❺ ❶❻ ❶❼ ❶❽ ❶❾ ❶❿ ❷❶ ❷❷ ❷❸ ❷❹ ❷❺ ❷❻ ❷❼ ❷❽ ❷❾ ❷❿ ❸❶ ❸❷ ❸❸ ❸❹ ❸❺ ❸❻ ❸❼ ❸❽ ❸❾ ❸❿ ❹❶ ❹❷ ❹❸ ❹❹ ❹❺ ❹❻ ❹…»
20:29 eli-se m: say '❶' * 2
20:29 camelia rakudo-moar 0b7c5b: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '⏏❶' (indicated by ⏏)␤  in method Numeric at src/gen/m-CORE.setting:15981␤  in sub infix:<*> at src/gen/m-CORE.setting:5352␤  in sub infix:<*> at src/gen/m-C…»
20:29 TimToady you need unival for that
20:29 eli-se m: say '⏏' * 2
20:29 camelia rakudo-moar 0b7c5b: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '⏏⏏' (indicated by ⏏)␤  in method Numeric at src/gen/m-CORE.setting:15981␤  in sub infix:<*> at src/gen/m-CORE.setting:5352␤  in sub infix:<*> at src/gen/m-C…»
20:29 eli-se Now I'm confused by the error message! Help!
20:30 TimToady that's not a dig
20:30 TimToady *digit
20:30 TimToady it's just a unicode with a numeric value
20:30 TimToady m: say unival('❿')
20:30 camelia rakudo-moar 0b7c5b: OUTPUT«10␤»
20:30 eli-se nice
20:31 TimToady m: say unival('⅔')
20:31 camelia rakudo-moar 0b7c5b: OUTPUT«0.666667␤»
20:31 RabidGravy whoah
20:31 skids m: say 'ⅤⅤ'...'ⅧⅧ'
20:31 camelia rakudo-moar 0b7c5b: OUTPUT«ⅤⅤ ⅤⅥ ⅤⅦ ⅤⅧ ⅥⅤ ⅥⅥ ⅥⅦ ⅥⅧ ⅦⅤ ⅦⅥ ⅦⅦ ⅦⅧ ⅧⅤ ⅧⅥ ⅧⅦ ⅧⅧ␤»
20:31 TimToady m: say uniprop('⅔','denominator')
20:31 camelia rakudo-moar 0b7c5b: OUTPUT«0␤»
20:31 TimToady hmm
20:31 RabidGravy I foresee some crack parties
20:34 RabidGravy so those things would match \d ?
20:34 TimToady no
20:34 TimToady \d only matches digits, not numbers
20:34 RabidGravy ah okay,
20:35 RabidGravy but, er, <:Nd> or something
20:35 TimToady m: say "????" ~~ /\d/
20:35 camelia rakudo-moar 0b7c5b: OUTPUT«「????」␤»
20:35 TimToady .u ????
20:35 yoleaux U+1D7E0 MATHEMATICAL DOUBLE-STRUCK DIGIT EIGHT [Nd] (????)
20:35 TimToady m: say "Ⅷ" ~~ /\d/
20:35 camelia rakudo-moar 0b7c5b: OUTPUT«Nil␤»
20:36 RabidGravy but
20:36 RabidGravy m: say "Ⅷ" ~~ /<:Nd>/
20:36 camelia rakudo-moar 0b7c5b: OUTPUT«Nil␤»
20:36 TimToady m: say uniprop "Ⅷ"
20:36 camelia rakudo-moar 0b7c5b: OUTPUT«Nl␤»
20:37 RabidGravy so
20:38 TimToady m: say "Ⅷ" ~~ /<:N>/
20:38 camelia rakudo-moar 0b7c5b: OUTPUT«「Ⅷ」␤»
20:38 diana_olhovik_ joined #perl6
20:39 timotimo yo moritz
20:39 RabidGravy nothing to fear when attempting to match digits then :)
20:39 skids .oO(Is "Nil" a legal uniprop code? Could be confusing.)
20:40 timotimo in JSON::Tiny there's a BEGIN { @*INC.push('lib') }
20:41 RabidGravy skids Nl rather than Nil I think
20:42 larion joined #perl6
20:43 skids No I'm saying if "Nil" is a valid unicode propset, and someone prints perl6 Nil as a failure as above, they may think it meant unicode "Nil"
20:43 skids But I guess that's what they get for improper error handling :-)
20:44 TimToady but it doesn't print the property there, it prints the match
20:45 TimToady people don't confuse oil with øl, or at least we hope they don't
20:45 skids Oh, I misread the backlog.
20:45 TimToady I'll leave it up to the Dutch whether nil should be confused with nl
20:47 RabidGravy they can argue among themselves about that :)
20:47 TimToady I'd rather earn my first mil than my first ml
20:48 espadrine joined #perl6
20:50 tony-o nice
20:54 timotimo i cannot find any indication in the json standard or website that a json document must be, at the outermost level, a list or an object
20:56 RabidGravy I think it falls among "truisms"  most parsers seem to handle atoms at the top level but suggest this is not compliant with the stanard :)
20:58 TimToady m: say unival("⅞").perl
20:58 camelia rakudo-moar 0b7c5b: OUTPUT«0.875␤»
20:58 TimToady m: say unival("⅔").perl
20:58 camelia rakudo-moar 0b7c5b: OUTPUT«<2/3>␤»
20:59 TimToady cool, already figures out if it's a rational
21:00 TimToady m: say unival("????").perl
21:01 camelia rakudo-moar 0b7c5b: OUTPUT«<2/3>␤»
21:01 RabidGravy I'll cry if you implement ⅞ + 0.5 to work
21:02 TimToady m: say (unival('⅐') * 0.5).base-repeating
21:02 camelia rakudo-moar 0b7c5b: OUTPUT«0.0 714285␤»
21:03 RabidGravy cheater
21:03 TimToady well, modules will happen
21:03 TimToady use vulgar;  :)
21:03 RabidGravy I fucking do already matey ;-)
21:06 TimToady now the tricky ones would be things like 33⅓
21:08 TimToady m: sub postfix:<⅓>($n) { $n + 1/3 }; say 33⅓
21:08 camelia rakudo-moar 0b7c5b: OUTPUT«33.333333␤»
21:08 TimToady I guess it's not that hard
21:08 RabidGravy bad larry, BAD BAD!
21:08 TimToady m: sub prefix:<⅓>($n) { 1/3 * $n }; say ⅓33
21:08 camelia rakudo-moar 0b7c5b: OUTPUT«11␤»
21:08 dalek perl6-examples: 177116f | paultcochrane++ | categories/99-problems/P01-scottp.pl:
21:08 dalek perl6-examples: Remove superfluous newlines
21:08 dalek perl6-examples: review: https://github.com/perl6/perl6-examples/commit/177116f6f5
21:08 dalek perl6-examples: e3cf9a2 | paultcochrane++ | lib/Pod/ (2 files):
21:08 dalek perl6-examples: Append source code text (without pod) to example page
21:09 TimToady m: sub prefix:<⅓>($n) { 1/3 * $n }; say ⅓pi
21:09 camelia rakudo-moar 0b7c5b: OUTPUT«1.0471975511966␤»
21:09 dalek joined #perl6
21:09 TimToady m: sub prefix:<⅓>($n) { 1/3 * $n }; say ⅓π
21:09 camelia rakudo-moar 0b7c5b: OUTPUT«1.0471975511966␤»
21:12 timotimo i expect the more exact i make my parser the slower it'll end up being ...
21:12 RabidGravy you know that thing we don't like about people saying perl is a write only language :)
21:13 TimToady m: sub prefix:<½>($n) { 1/2 * $n }; sub postfix:<²>($n) { $n * $n }; say { ½π * $^r² }(10)
21:13 camelia rakudo-moar 0b7c5b: OUTPUT«157.07963267949␤»
21:14 TimToady m: sub prefix:<½>($n) { 1/2 * $n }; sub postfix:<²>($n) { $n * $n }; say -> \r { ½π * r² }(10)
21:14 camelia rakudo-moar 0b7c5b: OUTPUT«157.07963267949␤»
21:14 TimToady closer
21:15 ugexe MIME::Base64 failing on jvm sometime in the last couple weeks :(
21:15 colomon joined #perl6
21:19 RabidGravy but e.g yeah I was goin in with
21:19 RabidGravy m: sub prefix:<√>($n) { $n**0.5 } ; say √2;
21:19 camelia rakudo-moar 0b7c5b: OUTPUT«1.4142135623731␤»
21:19 RabidGravy which is nice
21:20 TimToady well, we're all irrational here...
21:22 timotimo https://gist.github.com/timo/ef1fa0ecf43f8ec0e3c8
21:22 timotimo making progress :)
21:25 xdg joined #perl6
21:27 RabidGravy is there any other language that lets you define completely arbitrary operator like this?
21:27 timotimo Haskell
21:27 RabidGravy ah
21:28 geekosaur haskell is not entirely arbitrary; it limits the operator character set to the Unicode "symbol" category (ies?)
21:28 timotimo m: 187456 / 800276
21:28 camelia rakudo-moar 0b7c5b: ( no output )
21:28 timotimo m: say 187456 / 800276
21:28 camelia rakudo-moar 0b7c5b: OUTPUT«0.2342392␤»
21:28 geekosaur so you can't e.g. use a Greek letter as an operator, because it's a Unicode letter category
21:28 timotimo m: say 187456 R/ 800276
21:28 camelia rakudo-moar 0b7c5b: OUTPUT«4.269140␤»
21:29 masak RabidGravy: Fortress also lets you define Unicode operators
21:31 lucasb m: say (1,2,3).map: { $_.WHAT }
21:31 camelia rakudo-moar 0b7c5b: OUTPUT«(Int) (Int) (Int)␤»
21:31 lucasb m: say (1,2,3).map: *.WHAT
21:31 camelia rakudo-moar 0b7c5b: OUTPUT«1 2 3␤»
21:31 lucasb m: (1,2,3).map: *.WHAT.say
21:31 camelia rakudo-moar 0b7c5b: OUTPUT«(Whatever)␤Unhandled exception: Method 'count' not found for invocant of class 'Bool'␤   at <unknown>:1  (/home/camelia/rakudo-inst-2/share/nqp/lib/Perl6/BOOTSTRAP.moarvm::4294967295)␤ from src/gen/m-CORE.setting:9634  (/home/camelia/rakudo-inst-2/sh…»
21:31 lucasb ^^ I keep finding this bug :)
21:32 TimToady WHAT is not really a method
21:32 lucasb Oh
21:34 RabidGravy y'see I have a fear that in ten years, I'm beginning to get $a  $b in some code and not have aclue what is going on
21:35 TimToady well, then you'll contribute to the social feedback loop by shooting someone
21:35 * geekosaur would second that, given experience with <+> in xmonad (and defined in a different way in some other libraries, and when people look for those they find xmnonad's)
21:35 RabidGravy TimToady++ # true
21:35 masak RabidGravy: operators are just subroutines with special parsing rules. I don't see a similar widespread fear about proliferating subroutines. :)
21:36 * geekosaur eyes typos, sigh
21:36 geekosaur you would if they were all limited to 1-3 characters
21:36 geekosaur which is about the limit you tend to see for operators
21:36 geekosaur and it's hard to make such self-descriptive
21:37 TimToady that's what the mouseover is for
21:37 masak FROGGS: I can't seem to be able to reply on RT right now. but re https://rt.perl.org/Public/Bug/Display.html?id=78200
21:37 RabidGravy masak, you may have a different sort of brain than mine, but I'd kill someone who call a sub  as well
21:38 TimToady obviously it's a mutator of some sort, since it replaces the object
21:38 masak RabidGravy: I don't mind custom operators as long as they're elegant and motivated.
21:38 masak FROGGS: (a) that's not how "instantiated" is spelled
21:38 * TimToady fully expects that Sturgeon's Law will continue to hold true.
21:39 ugexe my @encoding-chars = 'A'..'Z','a'..'z','0'..'9','+','/'; <-- exception on jvm... reason for MIME::Base64 failing on jvm
21:39 masak FROGGS: (b) I want to detract my code example, which does not highlight the OP's complaint (that the variable holding the type object is important yet does not figure in the error message)
21:39 masak retract*
21:39 masak TimToady: custom operators are fine, as long as they are the remaining 10% :)
21:41 masak 'night, #perl6
21:41 TimToady o/
21:41 * TimToady --> ꆆ
21:45 dalek rakudo-star-daily: 8ec165d | coke++ | log/ (2 files):
21:45 dalek rakudo-star-daily: today (automated commit)
21:45 dalek rakudo-star-daily: review: https://github.com/coke/rakudo-star-daily/commit/8ec165d444
21:45 dalek perl6-roast-data: 578f6b4 | coke++ | / (9 files):
21:45 dalek perl6-roast-data: today (automated commit)
21:45 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/578f6b416b
21:45 dalek perl6-roast-data: bfcb510 | coke++ | / (4 files):
21:45 dalek perl6-roast-data: today (automated commit)
21:45 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/bfcb510eab
21:45 dalek perl6-roast-data: eff8d72 | coke++ | / (2 files):
21:45 dalek perl6-roast-data: today (automated commit)
21:45 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/eff8d723e5
21:47 bjz joined #perl6
21:51 RabidGravy nighty night
21:53 eli-se joined #perl6
22:00 lizmat joined #perl6
22:01 [Coke] I am belatedly on the side that "0" should be true. if you want ?+"0", instead of ?"0", that's a simple thing.
22:03 Sqirrel joined #perl6
22:03 larion joined #perl6
22:05 eli-se I think pack should default to middle endian.
22:05 eli-se To be a reasonable compromise between big and little endian.
22:05 timotimo # Looks like you failed 2 tests of 90
22:06 jercos unspec endianness could be an error as far as I'm concerned :|
22:06 jercos If someone *wants* native-endian, they can specify that :p
22:10 lizmat .botsnack
22:10 yoleaux :D
22:10 yoleaux 13:01Z <jnthn> lizmat: well, nqp::eqat is inconsistent with substr, it seems... Probably VM-level ops shouldn't be doing negatives magic with string offsets...
22:10 yoleaux 13:01Z <jnthn> lizmat: otoh, we often like to throw typed exceptions for these things which probably means doing the check in Perl 6 code anyway.
22:10 yoleaux 14:28Z <nine> lizmat: just to let you know: I currently have a real world use case where I need the same module (Crypt::RSA) in two different versions by two different authors in the same process. Too bad, that it's Perl 5 code :)
22:11 lizmat .tell nine the solution is simple: Inline::Perl6 -> Inline::Perl5 -> other version  :-)
22:11 yoleaux lizmat: I'll pass your message to nine.
22:12 lizmat .tell jnthn that's what b6bc4ecd08b4792d73ab0ee9da01edac60a909c0 did (well, checking, not throwing, not sure what would be best in this case)
22:12 yoleaux lizmat: I'll pass your message to jnthn.
22:13 lizmat .tell jnthn perhaps an X::OutOfRange exception would be best, to stay in line with .substr
22:13 yoleaux lizmat: I'll pass your message to jnthn.
22:16 timotimo hell yeah!
22:16 timotimo the only test i'm not passing any more is "error out if numbers start with a 0"
22:17 [Coke] jdv79: yes, I'm taking the train down on the 2nd.
22:20 telex joined #perl6
22:21 vendethiel joined #perl6
22:23 timotimo 9.80user 0.05system 0:09.86elapsed 99%CPU (0avgtext+0avgdata 195788maxresident)k
22:23 timotimo 67.11user 0.23system 1:07.39elapsed 99%CPU (0avgtext+0avgdata 800028maxresident)k
22:23 timotimo example_data.json ← 5.3M
22:31 lizmat m: "foobar".substr-eq("bar",*-3)  # it appears .substr-eq needs a little work still
22:31 camelia rakudo-moar 0b7c5b: OUTPUT«Cannot call substr-eq(Str: Str, WhateverCode); none of these signatures match:␤    (Str:D: Cool $needle, Cool $pos, *%_)␤    (Cool:D: Cool $needle, Cool $pos, *%_)␤  in block <unit> at /tmp/P3zhJdsZsf:1␤␤»
22:31 * lizmat is going to sleep on that
22:33 timotimo good night, lizmat!
22:33 timotimo did you see i made a fast json parser?
22:33 [particle] joined #perl6
22:44 Zoffix \o/
22:45 nbdsp joined #perl6
22:47 nbdsp Greetings! Could someone advise please is there a way to get the textual name of a function within that function?
22:48 sorear joined #perl6
22:48 timotimo m: sub foobar { say $?ROUTINE.name }; foobar()
22:48 camelia rakudo-moar 0b7c5b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/uOjc5l4oi7␤Variable '$?ROUTINE' is not declared␤at /tmp/uOjc5l4oi7:1␤------> 3sub foobar { say $?ROUTINE.name7⏏5 }; foobar()␤    expecting any of:␤        method arguments␤        postfix␤»
22:48 timotimo m: sub foobar { say $?BLOCK.name }; foobar()
22:48 camelia rakudo-moar 0b7c5b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/W6_HqMRZDc␤Variable '$?BLOCK' is not declared␤at /tmp/W6_HqMRZDc:1␤------> 3sub foobar { say $?BLOCK.name7⏏5 }; foobar()␤    expecting any of:␤        method arguments␤        postfix␤»
22:48 timotimo hmm
22:49 timotimo m: sub foobar { say callframe(0) }; foobar()
22:49 camelia rakudo-moar 0b7c5b: OUTPUT«CallFrame.new(level => 2, annotations => {:file("/tmp/QUv00qVBdM"), :line("1")}<>, my => EnumMap.new("\&?ROUTINE" => Mu, :RETURN(Mu), "\$!" => Mu, "\$/" => Mu, "\$_" => Mu, "\$*DISPATCHER" => Mu))␤»
22:49 timotimo :\
22:53 geekosaur m: sub foobar { say &?ROUTINE.name }; foobar();
22:53 camelia rakudo-moar 0b7c5b: OUTPUT«foobar␤»
22:54 timotimo ooooh
22:54 timotimo d'oh :)
22:54 timotimo thank you
22:54 nbdsp geekosaur: thanks!
22:54 geekosaur might be nice if there were sigil typo checks,...
22:54 geekosaur ("did you mean &?ROUTINE?")
22:56 timotimo yeah
22:56 timotimo well, $? variables are "special"
23:04 BenGoldberg joined #perl6
23:09 xdg left #perl6
23:12 virtualsue joined #perl6
23:16 ugexe sent a PR for MIME::Base64 to work on jvm again and rip out the parrot stuff. if someone could ok it thatd be great https://github.com/perl6/Perl6-MIME-Base64/pull/4 I dont want to just merge it in because .new($backend) won't work anymore (its not needed, as moar and jvm can use the same backend) so someone else should probably give their opinion on that
23:16 ugexe s/merge it in/merge it in myself/
23:20 dalek ecosystem: 10bc913 | timotimo++ | META.list:
23:20 dalek ecosystem: add JSON::Fast, drop-in replacement for JSON::Tiny
23:20 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/10bc9134f8
23:28 dalek rakudo/nom: 5a3f388 | Coke++ | t/spectest.data:
23:28 dalek rakudo/nom: add passing test file
23:28 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/5a3f3882f5
23:37 [Coke] ... why is that an upper case coke?
23:38 Zoffix ... why is that not 'Will Coleda'?
23:38 Zoffix It uses my full name on mines...
23:38 [Coke] there's a mapping somewhere.
23:39 [Coke] but the last commit in this channel from me was coke, not Coke
23:39 Zoffix weird
23:40 Zoffix Maybe the mapping is repo-dependant?

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

Perl 6 | Reference Documentation | Rakudo