Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2013-06-19

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:00 timotimo huh.
00:03 timotimo the line that makes it asplode is apparently get-local-timezone-offset ... ?!
00:07 timotimo that makes no sense to me at all now.
00:08 tgt joined #perl6
00:15 timotimo does it seem sensible to request a %=pod that would give me a by-type list of pod blocks from the current document?
00:15 timotimo like %=pod<table>?
00:20 timotimo oh, huh!
00:20 timotimo reify has a / in it that apparently div's by 0!
00:23 dalek nqp: 668a79f | sorear++ | src/vm/jvm/ (9 files):
00:23 dalek nqp: Give Lexotic a proper REPR and STable so that &fail can manipulate them without crashing
00:23 dalek nqp: review: https://github.com/perl6/nqp/commit/668a79fe68
00:24 timotimo sorear: you make it feel like rakudo-jvm is advancing at a very nice pace :)
00:30 timotimo commute&
00:35 timotimo entirely baffled by the division by zero in reify
00:37 timotimo in reify of MapIter
00:37 timotimo i tried adding a check for $argc to equal zero but that did not seem to help
00:38 potatogim joined #perl6
00:40 timotimo i should perhaps let it tell me what exactly argc is
00:41 timotimo it may be something entirely out there
00:42 ssutch how does one implement eq as a function for their own classes? eg, for PB::option (PB::Option.new eq PB::Option.new)
00:43 timotimo you can wrote multi infix:<eq>(Mine $a, $b)
00:44 ssutch cool
00:45 ssutch does Mine point to the current class, then? does it apply to both arguments?
00:45 timotimo no
00:45 timotimo Mine was metasyntactic like Foo and bar
00:45 ssutch ah ok, and it won't apply to both arguments (ala Go)
00:45 timotimo and it will only apply to the first argument
00:46 ssutch thanks
00:46 timotimo i am typing this on my phone :)
00:46 ssutch aha
00:47 timotimo so i  am slow and imprecise
00:48 timotimo normally you can use $?CLASS, but that syntax is not allowed there
00:48 timotimo $foo where $?CLASS might work. but you should define the operator outside of the class
00:49 sorear is t/02-rakudo/dump.t ... supposed to have a plan?
00:49 timotimo walk&
00:50 sorear https://gist.github.com/sorear/5804522/revisions
00:51 sorear other stuff&
00:52 timotimo hells yeah :)
00:58 timotimo holy..... what
00:59 timotimo Wi-Fi reception like 200 meters away from my home
00:59 ssutch r: https://gist.github.com/samuraisam/5810892
00:59 camelia rakudo b2072f: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Type 'PB::SubMsg' is not declaredâ�¤at /tmp/wS6sy3DLHK:4â�¤------> [32m    has PB::SubMsg[33mâ��[31m $.sub-message;[0mâ�¤Malformed hasâ�¤at /tmp/wS6sy3DLHK:4â�¤------> [32m    has PB::[33mâ��[31mSubMsg $.sub-message;[0mâ�¤    expecting any of…
00:59 jaldhar joined #perl6
01:00 ssutch r: https://gist.github.com/samuraisam/5810892
01:00 camelia rakudo b2072f: OUTPUT«(Any)␤»
01:00 ssutch hrm, i must be misunderstanding something here (about the eq operator, and the custom implementations thereof)
01:01 ssutch shouldn't $o and $oo in this case be considered the same
01:03 timotimo r: https://gist.github.com/timo/5810910
01:03 camelia rakudo b2072f: OUTPUT«my custom eq is being used␤(Any)␤»
01:03 timotimo not sure about the precedence of eq and &&
01:03 timotimo r: https://gist.github.com/timo/5810910
01:03 camelia rakudo b2072f: OUTPUT«my custom eq is being used␤(Any)␤»
01:04 sorear eq is tighter
01:04 sorear it's the same precence as ==
01:04 sorear and == is tighter than && in C
01:04 timotimo r: my $foo; my $bar; say $foo eq $bar;
01:04 camelia rakudo b2072f: OUTPUT«use of uninitialized value of type Any in string context  in block  at /tmp/kc1kQybT7l:1␤␤use of uninitialized value of type Any in string context  in block  at /tmp/kc1kQybT7l:1␤␤True␤»
01:05 timotimo oh
01:05 timotimo ssutch: it's simple. your .constant will return an undefined Any, which is falsy
01:05 timotimo r: https://gist.github.com/timo/5810910
01:05 camelia rakudo b2072f: OUTPUT«my custom eq is being used␤True␤»
01:06 timotimo maybe this is closer to your intended logic?
01:06 ssutch yes i think you're right
01:07 ssutch it is kind of ugly though, dealing with all those Any, is there a more idiomatic way to do this?
01:07 timotimo oh yeah
01:07 timotimo hold on.
01:07 timotimo r: https://gist.github.com/timo/5810910
01:07 camelia rakudo b2072f: OUTPUT«my custom eq is being used␤use of uninitialized value of type Any in string context  in sub infix:<eq> at /tmp/QyN9GB4ElO:19␤␤use of uninitialized value of type PB::SubMsg in string context  in sub infix:<eq> at /tmp/QyN9GB4ElO:20␤␤True␤»
01:07 timotimo er, whoopsie
01:08 timotimo here i dorked up the precedences i'm sure.
01:08 timotimo r: https://gist.github.com/timo/5810910
01:08 camelia rakudo b2072f: OUTPUT«my custom eq is being used␤True␤»
01:08 cooper joined #perl6
01:09 timotimo r: https://gist.github.com/timo/5810910
01:09 camelia rakudo b2072f: OUTPUT«1..3␤my custom eq is being used␤ok 1 - ␤my custom eq is being used␤ok 2 - ␤my custom eq is being used␤ok 3 - ␤»
01:10 timotimo r: https://gist.github.com/timo/5810910
01:10 camelia rakudo b2072f: OUTPUT«1..3␤ok 1 - ␤ok 2 - ␤ok 3 - ␤»
01:10 * sorear merges his jvm changes with the last week's rakudo changes and starts a Parrot spectest run before pushing
01:10 gfldex you could has Bool $.constant;# and (maybe) default it to false
01:10 timotimo if that's what $.constant means, sure
01:10 timotimo but look at the gist method, it seems like constant can be a value
01:11 ssutch constant is a string, num, PB::Ident, etc.
01:11 ssutch what does $a.constant // "" do?
01:11 ssutch coerce an empty value to an empty string?
01:12 sorear Is there anything I can fudge locally so that I have a single "pool" of --mirror clones of Rakudo, NQP, Parrot, etc and have --gen-parrot use that instead of trying to snarf tens of megs anew?
01:12 gfldex // is defined or
01:12 ssutch ah, ok
01:12 ssutch that is a little bit prettier
01:13 timotimo sorear: not sure what you mean?
01:13 timotimo you can just git clone the parrot and nqp folder
01:13 timotimo and it will hardlink
01:13 timotimo could even bindmount for the parrot folder :P
01:15 ssutch is there a benefit to using // over ||
01:15 gfldex r: my $constant but False; say ?$constant; $constant = "SomeText"; say ?$constant;
01:15 camelia rakudo b2072f: OUTPUT«False␤True␤»
01:16 gfldex || is a boolean question, // returns a value
01:16 ssutch ah ok
01:16 timotimo right, you may have a constant that evaluates to False for some reason?
01:16 timotimo like ... False :)
01:17 gfldex it might be a rather strange idea that i just had 3 o'clock in the morning
01:17 timotimo what might?
01:17 jaldhar joined #perl6
01:17 gfldex to have something false they may not should be
01:17 gfldex good night
01:17 ssutch haha, 'night
01:18 timotimo ;)
01:18 xilo_ joined #perl6
01:22 dayangkun joined #perl6
01:26 sorear huh.  the setting takes much longer to build on parrot.  or maybe I broke it and added an infinite loop to the compiler
01:28 sorear nope, it finished
01:29 ssutch to make your operators work in scopes that have imported your package, you have to add `is export` to the multi, correct?
01:29 sorear yes
01:30 sorear it's spectesting...:D
01:30 timotimo yays :)
01:31 timotimo something's repeatedly giving me 602 and 803 in DIVIDE_NUMBERS
01:32 timotimo did i somehow get an infinite loop!?
01:33 sorear a long vertical column of "ok" is so pretty.
01:33 timotimo :D
01:34 ssutch indeed
01:34 colomon sorear: the setting takes at least three times longer to build on parrot, last time I compared.
01:34 colomon o/
01:41 sorear o/ colomon
01:42 sorear colomon: yeah.  if I can just do something about the startup, rakudo-jvm will be great
01:42 colomon +1
01:48 fgomez joined #perl6
01:55 sorear the IO-Socket-INET test takes a while
01:55 timotimo yes, it does :(
01:55 timotimo i've had it with trying to make DIVIDE_NUMBERS give division by zero errors
01:55 timotimo i just don't get it.
01:56 timotimo sometimes $t2 is 0
01:57 perigrin it's not a bug ... it's a feature "Perl 6 is so advanced you can divide by 0!"
01:57 perigrin Also it makes your whitespace whiter!
01:58 timotimo why would it try to call that from infix:<->? with a rat that apparently has a denominator of 0? or maybe i'm misunderstanding the arguments?
01:59 timotimo yeah, i think i am.
02:00 SamuraiJack joined #perl6
02:00 timotimo i think i need a shower before i attempt to go to bed
02:00 sorear Result: PASS
02:01 timotimo great!
02:01 timotimo PR away :)
02:01 dalek rakudo/nom: ec48e79 | sorear++ | src/ (2 files):
02:01 dalek rakudo/nom: First working gather/take for Rakudo/JVM
02:01 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/ec48e7901d
02:01 dalek rakudo/nom: 583ca10 | sorear++ | src/vm/jvm/runtime/org/perl6/rakudo/Ops.java:
02:01 dalek rakudo/nom: Implement p6routinereturn for the JVM
02:02 timotimo hah, great! :)
02:02 dalek joined #perl6
02:02 sorear #parrot got the full dose
02:03 * timotimo spectests as well
02:04 timotimo do you have anything specific in mind for tomorrow and the last minutes before the compiler release?
02:04 xenoterracide joined #perl6
02:04 timotimo i don't have an overview over what stuff works now
02:06 sorear a surprisingly large and yet surprisingly small amount of stuff
02:06 timotimo that's what i thought :)
02:06 sorear t/01-sanity works, t/02-rakudo works except for a missing plan(?), still some failures in t/00-parrot
02:07 timotimo i get a totally weird division by 0 in t/spec/S02-magicals/dollar_bang.rakudo
02:07 sorear use v6 works :)
02:07 timotimo and use Test, too, right?
02:07 sorear you're trying to spectest on JVM!?
02:07 sorear yeah, use Test works
02:07 timotimo no, i'm not ;)
02:08 sorear haven't tested precompilation; likely to fail IMO
02:08 timotimo i'm trying to spectest on my "make division by 0 fail properly" branch
02:08 colomon sorear: you got a commitbit?
02:08 xilo_ joined #perl6
02:09 timotimo r: say (3/0).Num
02:09 camelia rakudo b2072f: OUTPUT«Inf␤»
02:10 timotimo er, huh?
02:10 lee_ oh cool! now [+] 0..10 works on jvm :D
02:10 lee_ wasn't working this afternoon
02:10 colomon Rats can had 0 denominator
02:10 colomon r: say (3/0).nude
02:10 camelia rakudo b2072f: OUTPUT«1 0␤»
02:11 timotimo so, there's a test that tries to compare that to Inf (and another with -Inf). my changes are trying to make that soft-fail with Division By Zero until there are failure-object-y Inf and NaN objects
02:11 timotimo should i fudge these tests and go on with the changes?
02:13 sorear colomon: yeah, pmichaud++ gave me one a couple hours ago
02:13 colomon \o/
02:13 sorear colomon: see I just pushed ^_^
02:13 sorear lee_: yep, RangeIter was broken
02:14 * colomon has the Hallelujah Chorus running through his head
02:14 xilo_ joined #perl6
02:14 timotimo ah, interesting. that's why it fails with DivisionByZero
02:14 timotimo r: sub a { fail X::AdHoc.new() }; try { a }; say $!.defined;
02:14 camelia rakudo b2072f: OUTPUT«use of uninitialized value of type Any in string context  in sub a at /tmp/3xKZvggHEY:1␤␤use of uninitialized value of type Any in string context  in block  at /tmp/3xKZvggHEY:1␤␤use of uninitialized value of type Any in string context␤␤  in method sink at src/gen/…
02:15 timotimo r: sub a { fail X::AdHoc.new(:payload<foo!>) }; try { a }; say $!.defined;
02:15 camelia rakudo b2072f: OUTPUT«foo!␤  in method sink at src/gen/CORE.setting:10169␤  in block  at /tmp/LI2yW9meJM:1␤␤»
02:15 timotimo the $!.defined sinks it
02:15 timotimo can that be right?
02:16 timotimo i suppose with the new changes, try { 1 div 0 }; ok $!.defined; is no longer a good test.
02:16 xilo_ joined #perl6
02:18 flussence .oO( it's almost surreal seeing sorear++ spamming #parrot with Java code commits to nqp :)
02:18 sorear surreal?  I've been an nqp commitbitter since forever
02:18 flussence yeah but... all of those at once
02:19 sorear I suppose if someone is motivated there's no reason we couldn't start collecting spectest data for rakudo.jvm
02:19 xilo_ joined #perl6
02:19 * colomon just grabbed a spectest file to see what happens
02:19 colomon colomon@melissa:~/tools/rakudo-jvm$ ./perl6 -Ilib t/spec/S02-types/array.t
02:19 colomon ===SORRY!===
02:19 colomon P6opaque representation does not implement cloning
02:19 flussence ooh, maybe I can dust off that graph thing I had around the beginning of nom
02:21 sorear I personally am inclined to wait until I have the rest of the coretests passing and the startup time a bit better
02:21 colomon sorear: that's probably sensible.  I'm just trying to see what happens.  I don't have a good handle on JVM yet.
02:21 colomon *rakudo JVM
02:22 sorear it takes 12.2s walltime (21.7s user) to "./perl6 -Ilib -e 'use Test'", and there are 712 test files
02:22 timotimo yikes.
02:22 sorear timotimo: rakudo-jvm can automatically use more than one core!
02:22 timotimo that's indeed a good thing
02:22 timotimo probably only for GC'ing, though?
02:22 sorear probablu
02:22 sorear ly
02:23 colomon sorear: in what context (more than one core)?
02:23 sorear colomon: I think that startup time is GC-dominated and we're seeing the parallel mark+sweep
02:23 sorear colomon: however, the NQP-jvm support code has been carefully designed to be threadsafe, so I can port the niecza Threads.pm6 at some point
02:24 sorear (designing nice p6y abstractions will take longer)
02:24 raiph joined #perl6
02:24 dalek roast: 0b05489 | (Timo Paulssen)++ | S03-sequence/nonnumeric.t:
02:24 dalek roast: unfudge some sequence with single-codepoint tests
02:24 dalek roast: review: https://github.com/perl6/roast/commit/0b0548903c
02:27 sorear colomon: one thing you should be aware of is that the backtrace printer is currently thinking that all exceptions are compile time, and eating all the backtraces
02:27 sorear colomon: you'll want to use --ll-exception a lot
02:28 colomon thanks for the tip
02:28 sorear colomon: also you can se NQP_VERBOSE_EXCEPTIONS=1 to get JVM stacktraces for all p6 exceptions (gets rather noisy, since the compiler likes to throw and catch exceptions)
02:28 timotimo https://github.com/rakudo/rakudo/pull/169 - would like a bit of discussion on the parenthesized remark on the first point there
02:29 colomon *tips
02:31 sorear rakudo-jvm versus niecza: when I was doing the bulk of the niecza development, there was no command-line debugger for C#, and I never could be bothered to fire up MonoDevelop when print statements would suffice
02:31 sorear I've been using jdb quite a bit
02:32 colomon there's a command line debugger for JVM?  sweet.
02:33 colomon rn: say (set <a b c>) (-) (set <1 2 3>) (-) (set <z y x>)
02:33 camelia niecza v24-78-g9f58f84: OUTPUT«Unhandled exception: Cannot call infix:<(-)>; none of these signatures match:␤    Any, Any␤    Set, Set␤  at /tmp/eWJ4eQZ5KK line 1 (mainline @ 6) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4530 (ANON @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting li…
02:33 camelia ..rakudo b2072f: OUTPUT«Too many positional parameters passed; got 3 but expected 2␤  in sub infix:<(-)> at src/gen/CORE.setting:13268␤  in block  at /tmp/fkcsFTX9pr:1␤␤»
02:34 colomon does set difference even make sense on three sets?
02:36 xilo_ joined #perl6
02:39 xilo_ joined #perl6
02:41 sorear colomon: I think it would be least surprising if it had the precedence and associativity of ordinary -.
02:41 colomon and thus would not be a list op, eh?
02:43 sorear Yeah
02:43 sorear Left assoc, not list
02:44 djanatyn sorear: you're a badass!
02:44 colomon though on second thought I'm thinking it wouldn't be too difficult to implement set difference on > 2 sets
02:44 djanatyn show me how to set up rakudo-jvm <3
02:44 djanatyn (and potentially contribute)
02:45 djanatyn I love using clojure and leiningen is one of my favorite tools
02:45 djanatyn if there was something like that for perl6, I would pretty much melt
02:45 djanatyn and I care about that enough to be willing to donate a lot of my time
02:45 djanatyn but right now I wanna play with rakudo-jvm if that's possible :)
02:45 sorear 1. get a very recent JVM (we're using invokedynamic, which means 1.7)
02:45 sorear java -version
02:46 * diakopter recommends oracle jvm  (package oracle-java7-installer on ubuntu)
02:46 sorear actually, just read this: https://github.com/rakudo/rakudo/blob/nom/README#L32
02:47 diakopter djanatyn: (of course you already have jvm.. I'm just helping out generically everyone)
02:47 djanatyn I'm upgrading from openjdk6 to openjdk7
02:47 djanatyn I'm a tiny bit paranoid about minecraft not working
02:47 * lue has successfully used icedtea with Rakudo JVM
02:47 colomon .u ∖
02:47 yoleaux U+2216 SET MINUS [Sm] (∖)
02:49 benabik Ah, Minecraft.  Ensuring everyone will still have the JVM installed even after all the browser-based exploits.
02:49 timotimo minecraft doesn't run in the browser, so it's safe!
02:50 sorear colomon: let me know if/when you want to play with jdb in rakudo
02:50 colomon sorear: will do
02:50 sorear i've got some stuff I need to polish and commit
02:50 colomon sorear: I've gotten distracted by set ops at the moment.
02:50 diakopter djanatyn: minecraft runs on my simulated pc inside minecraft
02:51 timotimo diakopter: is the JIT built by pushing blocks and redstone around with pistons? :)
02:51 diakopter ..it'll finish starting up one of these days..
02:51 timotimo haha, a frame of minecraft being rendered in minecraft would be like the pitch drop experiment? :)
02:51 sorear djanatyn: just for the record, while I may have spent the last two weeks hacking on rakudo-jvm, jnthn++ did most of the work
02:53 colomon jnthn++
02:54 diakopter timotimo: hm, that reminds me to finish my pitch drop experiment simulation using that simulated physics engine in minecraft
02:54 timotimo colomon: should i try to keep (3/0).nude working, though?
02:55 colomon timotimo: well, it's current spec.  but I don't know that any of us have ever been fully happy with it.
02:55 timotimo can you point me to where it's specced?
02:56 timotimo also, it seems like there's either no test for it, or it's fudged for rakudo, which it shouldn't be because it does work in this version we have on camelia here
02:56 djanatyn hmmm
02:56 djanatyn I should be able to go into the nqp branch after cloning a fresh copy from git with "git checkout nqp", correct?
02:57 sorear djanatyn: there is no nqp branch
02:57 sorear djanatyn: nqp is a dependency of rakudo
02:57 djanatyn oh
02:57 sorear djanatyn: cd $rakudo; git clone git://github.com/perl6/nqp.git
02:58 timotimo perl ConfigureJVM.pm doesn't fetch nqp for you?
02:58 sorear timotimo: correct
02:58 timotimo OK
02:58 atroxaper joined #perl6
02:58 colomon timotimo: hmm, I don't see it in the spec, but I know we've had this discussion with TimToady++ multiple times...
02:58 timotimo i've mentioned it in the pullrequest and invited a discussion
02:59 djanatyn thanks.608 problems (552 errors, 56 warnings)
02:59 djanatyn make: *** [nqp-runtime.jar] Error 1
02:59 djanatyn (yay!)
02:59 colomon afk # bedtime
03:00 sorear https://rt.perl.org/rt3/Public/Bug/Display.html?id=118285
03:00 sorear djanatyn: it works for me
03:00 sorear timotimo: rt link is for you
03:01 timotimo hehe
03:01 timotimo i wouldn't touch Makefiles with a ten-foot-pole
03:02 timotimo (especially since i wouldn't want to cut off the feet of approximately five people)
03:03 twigel joined #perl6
03:03 sorear who has rt close powers?
03:04 sorear https://rt.perl.org/rt3/Ticket/Display.html?id=118313 can be closed
03:07 timotimo i'll write "sorear made it work"
03:08 timotimo pmichaud: i'm not sure i understand your comment on my PR :|
03:11 sorear r: say RETURN
03:11 camelia rakudo b2072f: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Undeclared name:â�¤    RETURN used at line 1â�¤â�¤Â»
03:11 sorear r: (sub () { say RETURN })()
03:11 camelia rakudo b2072f: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Undeclared name:â�¤    RETURN used at line 1â�¤â�¤Â»
03:11 sorear r: my \RETURN = 5; (sub () { say RETURN })()
03:11 camelia rakudo b2072f: OUTPUT«No such method 'gist' for invocant of type 'Continuation'␤  in sub say at src/gen/CORE.setting:11047␤  in sub  at /tmp/p8eCYuWHRx:1␤  in block  at /tmp/p8eCYuWHRx:1␤␤»
03:12 diakopter sorear: !!!
03:13 sorear diakopter: rakudo seems to not isolate user variables from internal names
03:13 diakopter r: my \RETURN = 5; (sub () { print RETURN })()
03:13 camelia rakudo b2072f: OUTPUT«Cannot assign a non-Perl 6 value to a Perl 6 container␤  in method REIFY at src/gen/CORE.setting:6705␤  in method reify at src/gen/CORE.setting:5774␤  in method gimme at src/gen/CORE.setting:6192␤  in method print at src/gen/CORE.setting:11231␤  in method print at …
03:13 diakopter r: my \RETURN = 5; (sub () { print RETURN.WHAT })()
03:13 camelia rakudo b2072f: OUTPUT«Can only use get_what on a SixModelObject␤  in sub  at /tmp/jAkKLmlI9w:1␤  in block  at /tmp/jAkKLmlI9w:1␤␤»
03:13 sorear diakopter: RETURN is a parrot;Continuation object
03:14 sorear used to implement lexotic return semantics
03:14 sorear r: my \sink_4 = 0; 1; 2; 3; 4; 5; 6; 7; say sink_4
03:14 camelia rakudo b2072f: OUTPUT«WARNINGS:␤Useless use of constant integer 1 in sink context (line 1)␤Useless use of constant integer 2 in sink context (line 1)␤Useless use of constant integer 3 in sink context (line 1)␤Useless use of constant integer 4 in sink context (line 1)␤Useless use of cons…
03:15 sorear r: sub f($x) { $x }; my \sink_4 = 0; f 1; f 2; f 3; f 4; f 5; f 6; f 7; say sink_4
03:15 camelia rakudo b2072f: OUTPUT«0␤»
03:17 sorear r: sub f($x) { $x }; my \sink_4 = 0; { f 1; f 2; f 3; f 4; f 5; f 6; f 7; say sink_4 }
03:17 camelia rakudo b2072f: OUTPUT«0␤»
03:19 sorear the last time p5eval's rakudo updated was the day before yapc::na
03:19 timotimo oh, it's severely out of date?
03:19 timotimo i didn't even notice! =o
03:19 timotimo er, p5eval? not camelia?
03:19 sorear timotimo: not as out of date as the nqp-jvm, which isfrom Feb
03:19 sorear camelia, sorry
03:20 sorear typo for p6eval
03:21 timotimo :)
03:21 timotimo do we know what's going wrong?
03:21 sorear the p6eval box doesn't have enough memory to build rakudo or nqp-jvm
03:22 sorear I think they're supposed to be compiled by cronjob on a different box and rsynced over
03:22 timotimo oh, yikes
03:22 timotimo i heard that some time ago, ye
03:22 sorear but there are a lot of moving parts in that system
03:31 twigel r: say $*PERL
03:31 camelia rakudo b2072f: OUTPUT«("name" => "rakudo", "compiler" => {"name" => "rakudo", "ver" => "2013.05-30-g9557da2", "release-number" => "", "build-date" => "2013-06-02T17:09:09Z", "codename" => ""}).hash␤»
03:45 avar joined #perl6
03:45 avar joined #perl6
03:52 raiph joined #perl6
03:52 benabik joined #perl6
03:52 preflex joined #perl6
03:52 jferrero joined #perl6
03:52 PZt joined #perl6
03:52 salv0 joined #perl6
03:52 jfried joined #perl6
03:52 bloonix joined #perl6
03:52 ruoso_ joined #perl6
03:52 timotimo joined #perl6
03:52 Pleiades` joined #perl6
03:52 frettled joined #perl6
03:52 ilogger2_ joined #perl6
03:52 tokuhirom joined #perl6
03:52 sjohnson joined #perl6
03:52 integral joined #perl6
03:52 crazedpsyc joined #perl6
03:52 clkao joined #perl6
03:52 jnthn joined #perl6
03:52 mst joined #perl6
03:52 mangala joined #perl6
03:52 mj41 joined #perl6
03:52 eiro joined #perl6
03:52 camelia joined #perl6
03:53 stevan_ joined #perl6
03:53 cosimo joined #perl6
03:53 bruges joined #perl6
03:53 jercos joined #perl6
03:53 broquaint joined #perl6
03:53 Hor|zon joined #perl6
03:53 mtk joined #perl6
03:53 lee_ joined #perl6
03:53 snarkyboojum_ joined #perl6
03:54 xenoterracide|2 joined #perl6
03:55 raiph joined #perl6
03:55 benabik joined #perl6
03:55 preflex joined #perl6
03:55 jferrero joined #perl6
03:55 PZt joined #perl6
03:55 salv0 joined #perl6
03:55 jfried joined #perl6
03:55 bloonix joined #perl6
03:55 ruoso_ joined #perl6
03:55 timotimo joined #perl6
03:55 Pleiades` joined #perl6
03:55 frettled joined #perl6
03:55 ilogger2_ joined #perl6
03:55 tokuhirom joined #perl6
03:55 sjohnson joined #perl6
03:55 integral joined #perl6
03:55 crazedpsyc joined #perl6
03:55 clkao joined #perl6
03:55 jnthn joined #perl6
03:55 mst joined #perl6
03:55 mangala joined #perl6
03:55 mj41 joined #perl6
03:55 eiro joined #perl6
03:55 camelia joined #perl6
03:57 xilo_ joined #perl6
04:08 xilo_ joined #perl6
04:10 xilo_ joined #perl6
04:17 lue r: say Int.HOW.WHAT
04:17 camelia rakudo b2072f: OUTPUT«(Perl6::Metamodel::ClassHOW)␤»
04:17 lue r: say Int.^WHAT
04:17 camelia rakudo b2072f: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Cannot use .^ on a non-identifier method callâ�¤at /tmp/9Fl5kJWo6b:1â�¤------> [32msay Int.^WHAT[33mâ��[31m<EOL>[0mâ�¤    expecting any of:â�¤        method argumentsâ�¤Â»
04:19 xilo_ joined #perl6
04:20 ztt_ joined #perl6
04:27 Psyche^ joined #perl6
04:27 silug_ joined #perl6
04:31 zby_home_ joined #perl6
04:58 birdwindupbird joined #perl6
04:59 potatogim joined #perl6
05:05 xilo_ joined #perl6
05:06 Stigmergy joined #perl6
05:59 dmol joined #perl6
06:00 FROGGS[mobile] joined #perl6
06:00 FROGGS[mobile] morning
06:01 labster morning FROGGS
06:04 sorear morning FROGGS[mobile]
06:04 sorear good evening labster
06:04 labster I want to ride in the FROGGSmobile
06:04 labster evening, sorear
06:08 hoelzro_ joined #perl6
06:10 genehack joined #perl6
06:10 Gothmog_ joined #perl6
06:11 dagurval morning o/
06:12 ponbiki joined #perl6
06:16 FROGGS joined #perl6
06:21 FROGGS labster: sad there is none :/
06:21 labster We need grant money for that.
06:21 FROGGS hehe, yeah
06:26 sorear think I'm going to spend the next couple days working on ways to reduce and/or amortize the rakudo-jvm startup time
06:26 xinming joined #perl6
06:26 sorear so that we can do better testing, and an evalbot
06:26 FROGGS that would be very sweet (and helpful)
06:27 FROGGS I'm a bit afraid of upgrading nqp to do some jvm/moarvm testing though, since this might still break on my machine: https://github.com/perl6/nqp/commit/609c1f707cf1ef0bb708eedc8f735d255a3ef06e
06:28 FROGGS I guess I should just try to build current HEAD
06:29 labster the worst that can happen is a little more entropy and a slightly higher electric bill.
06:29 sorear why might it break?
06:30 FROGGS sorear: it frees mem which should not, according to the bt
06:31 sorear FROGGS: well, that code is not used on jvm in any case
06:32 FROGGS ahh, I see
06:32 sorear you could git fetch --all your nqp (does not affect checked-out files), then duplicate the repository, checkout master and build for JVM
06:34 FROGGS will do, but I think it might be worth knowing if the bug still exist
06:34 FROGGS so I'll upgrade in a few minutes
06:38 domidumont joined #perl6
06:39 FROGGS nqp: say(0 || 1 ~ 2 || 3)
06:39 camelia nqp: OUTPUT«12␤»
06:40 FROGGS nqp: say(0 || 1 ~ 0 || 3)
06:40 camelia nqp: OUTPUT«10␤»
06:41 FROGGS ohh
06:41 sorear ~ is tighter than or
06:41 FROGGS yepp
06:42 sorear at a high level, data operations are higher precedence than comparisons, which are higher precedence than logical ops, which are higher precedence than assignment
06:42 sorear so you can do good = a > b && a < 2 * b
06:42 sorear within each level, multiplication-like operations have higher precedence than addition-like operations
06:43 sorear exclusive or is addition on a field of characteristic 2; AND and OR are the multiplication and addition on a Boolean semiring
06:44 FROGGS ya, makes sense
06:44 sorear people often expect the bitwise operators | & and ^ to have the precedence of data operators, and get surprised when   flags & FOO != 0  doesn't work
06:44 Celelibi joined #perl6
06:45 sorear the reason is that very early versions of C didn't have &&, and so & was used as a logical operator and slotted into the precedence accordingly
06:45 FROGGS yeah, I've read that in perlop yesterday
06:45 sorear Perl copied this bug to avoid surprising C programmers who have been working around the bug for so long that the sane behavior would confuse them
06:46 domidumont joined #perl6
06:53 kaleem joined #perl6
07:11 ecocode joined #perl6
07:18 * __sri wonders if anyone has thought about a perl6tidy and maybe formatting rules for the stdlib yet... go fmt has been a pretty big success for go
07:22 xinming joined #perl6
07:25 sqirrel joined #perl6
07:48 labster r: say so('foo' eq any<foo bar>)
07:48 camelia rakudo b2072f: OUTPUT«False␤»
07:48 moritz : say so('foo' eq any <foo bar>)
07:48 moritz r: say so('foo' eq any <foo bar>)
07:48 camelia rakudo b2072f: OUTPUT«True␤»
07:54 sorear it would appear that now that I'm a rakudo committer I get cc'd on every rakudo bug report
07:54 sorear s/bug report/pull request/
07:57 cognominal joined #perl6
07:58 labster enjoy your full inbox, sorear
07:58 moritz sorear: yes, but you can manually unsubscribe if you want
07:59 labster moritz: is there a reason why the first one doesn't work right and doesn't warn?  It seems like an easy mistake to make.
08:00 moritz labster: it's very handy in some situations
08:00 moritz if you have a function that returns an array, you can say func[0]
08:00 moritz and likewise if you have a function that returns a hash, you can say func<foo>
08:01 labster okay, just making sure we aren't being confusing for no good reason.  We have reason to be confusing.
08:01 sorear std: any<foo bar>
08:01 camelia std d4cc5ab: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤The 'any' listop may not be called without arguments (please use () or whitespace to clarify) at /tmp/wuhp2GKgJz line 1:â�¤------> [32many[33mâ��[31m<foo bar>[0mâ�¤Potential difficulties:â�¤  Use of non-subscript <...> where postfix is expe…
08:02 sorear std: die<foo bar>
08:02 camelia std d4cc5ab: OUTPUT«ok 00:00 41m␤»
08:02 labster std: none<foo>
08:02 camelia std d4cc5ab: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤The 'none' listop may not be called without arguments (please use () or whitespace to clarify) at /tmp/2ziKAt_7uA line 1:â�¤------> [32mnone[33mâ��[31m<foo>[0mâ�¤Potential difficulties:â�¤  Use of non-subscript <...> where postfix is expect…
08:07 labster n: IO::Path.new("foo")
08:07 camelia niecza v24-78-g9f58f84:  ( no output )
08:07 labster n: say IO::Path.new("foo")
08:07 camelia niecza v24-78-g9f58f84: OUTPUT«Path<foo>␤»
08:08 labster n: say (IO::Path.new("foo") ~~ IO::Path)
08:08 camelia niecza v24-78-g9f58f84: OUTPUT«True␤»
08:08 labster n: say IO::Path ~~ Path
08:08 camelia niecza v24-78-g9f58f84: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Undeclared name:â�¤        'Path' used at line 1â�¤â�¤Unhandled exception: Check failedâ�¤â�¤  at /home/p6eval/niecza/boot/lib/CORE.setting line 1502 (die @ 5) â�¤  at /home/p6eval/niecza/src/STD.pm6 line 1147 (P6.comp_unit @ 36) â�¤  at /home/p…
08:12 labster n: say "foo".path.IO ~~ IO::Handle
08:12 camelia niecza v24-78-g9f58f84: OUTPUT«Unhandled exception: Unable to resolve method postcircumfix:<( )> in type Any␤  at /tmp/fA7qhtwvqG line 1 (mainline @ 5) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4530 (ANON @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4531 (module-CORE @ 580…
08:12 labster n: "
08:12 camelia niecza v24-78-g9f58f84: OUTPUT«[31m===[0mSORRY![31m===[0m��Bogus statement at /tmp/igjFH0XG12 line 1:�------> [32m<BOL>[33m�[31m"[0m��Parse failed��»
08:12 labster n: say "foo".path
08:12 camelia niecza v24-78-g9f58f84: OUTPUT«Path<foo>␤»
08:12 labster n: say "foo".path.IO
08:12 camelia niecza v24-78-g9f58f84: OUTPUT«"foo".IO␤»
08:13 labster n: IO::Handle
08:13 camelia niecza v24-78-g9f58f84: OUTPUT«Unhandled exception: Unable to resolve method postcircumfix:<( )> in type Any␤  at /tmp/qa6bpWOakG line 1 (mainline @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4530 (ANON @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4531 (module-CORE @ 580…
08:15 sorear n: any<foo bar>
08:15 camelia niecza v24-78-g9f58f84: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤The 'any' listop may not be called without arguments (please use () or whitespace to clarify) at /tmp/hmhjJ0LfQa line 1:â�¤------> [32many[33mâ��[31m<foo bar>[0mâ�¤â�¤Unhandled exception: Check failedâ�¤â�¤  at /home/p6eval/niecza/b…
08:16 labster n: say IO::Path.gist
08:16 camelia niecza v24-78-g9f58f84: OUTPUT«(IO::Path)␤»
08:22 moritz n: sub any() { say 'I like it argumentless' }; any
08:22 camelia niecza v24-78-g9f58f84: OUTPUT«[31m===[0mSORRY![31m===[0m��The 'any' listop may not be called without arguments (please use () or whitespace to clarify) at /tmp/hoNsPil3zQ line 1 (EOF):�------> [32m() { say 'I like it argumentless' }; any[33m�[31m<EOL>[0m��Unhandled exception: C…
08:22 * moritz wonders if that's a bug
08:26 ssutch joined #perl6
08:32 labster oh, sorry about the niecza noise, I thought I was private messaging camelia
08:33 moritz no problem
08:33 moritz sorear and I made more noise than you :-)
08:38 dalek roast: f3b450b | (Brent Laabs)++ | S32-io/io-path (4 files):
08:38 dalek roast: io-path.t is platform aware now, path tests for .succ and .pred
08:38 dalek roast: review: https://github.com/perl6/roast/commit/f3b450b0e8
08:38 dakkar joined #perl6
08:38 labster that was the noise of me working, anyway
08:39 sorear interesting, if I run perl6 -e '' with -Xint user time and wall time are almost the same
08:39 moritz we happily take commits in exchange for noise :-)
08:39 sorear so I think the multicoreness is mostly due to background compilation
08:40 sorear 19.715 wall 20.119 user
08:40 sorear versus 7.211 / 12.862 with the JIT enabled
08:43 sorear less than 5% of time is spent in the GC, so I'm not optimizing that
08:44 sorear -Xbatch is also interesting, 9.684 / 10.085
08:45 nwc10 this is "when you have eliminated the impossible, whatever remains, however improbable, must be the truth?"
08:46 FROGGS .\\//
08:48 sorear nwc10: nah, still at a very preliminary stage of research
08:48 sorear I want to get a handle on how the 12.86 seconds of startup time are being spent
08:48 sorear so I can cut that down to something a little more reasonable
08:49 fhelmberger joined #perl6
08:50 nwc10 which would be very useful. And I totally agree with how you're ruling things out.
08:53 sorear (for those of you who don't have man java handy: -Xint disables the compiler, -Xbatch forces it to run on the application thread)
09:25 TimToady bleah, went to fetch Prima from her Frankfurt flight, discovered she didn't make the connection, came in at midnight instead, had to drive 3 hours in rain and fog after that to get back "home" 😫
09:26 FROGGS >.<
09:26 sorear who's Prima?
09:27 TimToady the first one, before Secundus, Tertia, and Quartus :)
09:27 TimToady Secundus is currently at a physics conference in France
09:28 sorear Which one has problems when they call flights?
09:28 TimToady Tertia
09:28 TimToady and you usually know Q by a different Q name :)
09:28 sorear yeah
09:29 TimToady we used those names to talk about them when they were young, but eventually they caught on :)
09:29 sorear i've never met the first three, so I find them harder to keep apart
09:34 TimToady anyway, ended up doing about nine hours total of white-knuckled driving yesterday, so if my brane seems to have a low signal-to-noise ratio today, you'll know why :)
09:35 TimToady I mean that almost literally--my visual cortex is complaining bitterly of overstimulation and very jittery internally, almost like you feel when you're running a fever delirium, but without the fever...
09:35 moritz have you tried sleep as a cure? :-)
09:36 TimToady got six hours
09:36 TimToady didn't wanna knock myself all the way back to US time though...
09:38 daxim joined #perl6
09:41 sorear so there's one qast sub that spans the entire length of CORE.setting and compiles to 38kb of bytecode
09:41 sorear this might be a problem
09:42 nwc10 JVM size limits?
09:42 nwc10 Or just that's what's slowing stuff down?
09:42 TimToady you should use a language without arbitrary limits ;)
09:42 * moritz would love to have a machine without arbitrary limits
09:43 sorear nwc10: mostly the former
09:43 nwc10 IIRC lots of C compilers hated some of the very large C switch statments in the code generated from XS
09:48 silug_ joined #perl6
09:48 nwc10 took forever for the optimiser to decide what to with them
09:48 nwc10 (ran just fine)
09:53 [particle]1 joined #perl6
09:54 sorear something nqp-jvm/rakudo-jvm does that really bothers me aesthetically... I don't think it has a huge effect on performance...
09:54 sorear the serialized object data for the setting is stored as several megabytes of base64ed, utf8ed, string literals
09:55 sorear in order to be used it has to be utf8 decoded and the base64 decoded
09:55 sorear and the class file parser has to load it as string literals
09:55 moritz then is that PIR makes it very hard to include blobs
09:55 moritz I'm sure nobody objects if you do it diffrently from the JVM
09:55 moritz s/then/the reason/
09:56 sorear well, class files don't support blobs at all
09:56 nwc10 shame that no-one wanted to tackle PIRC as a GSoC project
09:57 sorear I'd have to either use a two-file approach like niecza which would complicate the build system, or combine the class data and the serialization data into a container file which would complicate attempts to use standard tools
09:58 moritz any other ways, like byte strings, or compact byte arrays?
09:58 sorear no byte literals
09:59 sorear and even if there were I'm generally averse to forcing the classfile parser to see them
09:59 lizmat this is probably totally off the mark, but could Sereal be a solution here ?
10:00 sorear really, I prefer the container solution, but I'd want to talk to jnthn++ about that
10:00 lizmat https://github.com/Sereal/Sereal
10:00 sorear since if the output is not a raw class file, --target=classfile should be renamed, and that breaks all the downstream build scripts
10:01 lizmat Sereal already has a decoder in Java
10:01 lizmat </serial>
10:01 pr_ joined #perl6
10:01 sorear lizmat: yeah, orthogonal problem
10:02 sorear we can already turn data structures into byte strings
10:02 sorear the question is how do we keep the byte strings and the executable code
10:02 lizmat ok, sometimes thinking outside of the box turns things 90 degrees around  :-)
10:02 nwc10 sorear: so porting Rakudo to .NET would mean solving the same problem as here on the JVM?
10:03 pr_ Hello, why does the following line return 'matches'? >perl6 -e "if (['a','b'] ~~ *, 'x', *) {  say 'matches'; } else { say 'not' };"
10:03 sorear nwc10: no, because .net assemblies are a pointer-based format and you can throw large chunks of uninterpreted data in them
10:04 sorear pr_: because ~~ binds tighter than ,
10:04 nwc10 can class files have trailing "garbage"? In that zip files are keyed off the central directory at the end, meaning that you can stick an executable on the front, and everyone is "happy"
10:04 sorear nwc10: No
10:04 nwc10 bother
10:05 sorear interestingly, the class file format *is* self-delimiting, and javap (the disassembler / metadata viewer) is perfectly happy to read a class file with trailing garbage
10:05 sorear but the VM itself throws a ClassFormatError
10:07 pr_ sorear: thx. perl6 -e "if (['a','b'] ~~ (*, 'x', *)) {  say 'matches'; } else { say 'not' };" displays  an error.
10:08 sorear nwc10: .net's class loading is "fun" in other ways.  like you can't really do anonymous code there
10:12 pr_ sorear: but this works. Never mind my question: perl6 -e "if (['a','b'] ~~ <*, 'x', *>) {  say 'matches'; } else { say 'not' };"
10:14 sorear um
10:14 sorear I do not think that means what you think it means
10:14 stevan__ joined #perl6
10:14 sorear r: say <*, 'x', *>.perl
10:14 camelia rakudo b2072f: OUTPUT«("*,", "'x',", "*")␤»
10:16 pr_ sorear: I am just trying out the smart matching examples here: http://en.wikibooks.org/wiki/Perl_6_Programming/Control_Structures
10:16 pr_ sorear: the example is as follows: ["a", "b"] ~~ *, "a", *;
10:17 masak rn: say <a b c> ~~ (*, 'b', *)
10:17 camelia niecza v24-78-g9f58f84: OUTPUT«False␤»
10:17 camelia ..rakudo b2072f: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '⏏a' (indicated by ⏏)␤  in method Numeric at src/gen/CORE.setting:10159␤  in sub infix:<==> at src/gen/CORE.setting:3092␤  in sub infix:<==> at src/gen/CORE.setting:3090␤  in sub…
10:17 masak huh.
10:17 masak good noon, #perl6
10:17 sorear good noon, masak
10:18 bruges_ joined #perl6
10:18 TimToady r: say <a b c>
10:18 camelia rakudo b2072f: OUTPUT«a b c␤»
10:19 TimToady r: say <a b c> ~~ (*,)
10:19 pr_ neither "if (['a','b'] ~~ <*, 'a', *>)" nor "if (['a','b'] ~~ (*, 'a', *))" seems to work
10:19 camelia rakudo b2072f: OUTPUT«True␤»
10:19 masak pr_: the former shouldn't work because <> just gives you literal strings.
10:20 TimToady pr_: that's what sorear was indicating above
10:20 TimToady and it can't work without parens because of precedence
10:23 atroxaper left #perl6
10:24 pr_ TimToady: understood. You must add parens. But adding parens throws a 'string to number' error.
10:25 TimToady that would be a rakudobug, I think
10:25 colomon TimToady: any thoughts on making infix:<∖> the primary form of the set difference operator?  Does it look too much like \  ?
10:25 pr_ TimToady: how do you report a bug?
10:25 lizmat TimToady: I'm thinking about giving S11:363 "Versioning" a rewrite with the proposed -unit- statement as the main new ingredient
10:25 sorear send mail to rakudobug@perl.org
10:26 pr_ sorear: will do.
10:26 TimToady rn: say <a b c> ~~ [*, 'b', *]
10:26 camelia niecza v24-78-g9f58f84: OUTPUT«False␤»
10:26 camelia ..rakudo b2072f: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '⏏a' (indicated by ⏏)␤  in method Numeric at src/gen/CORE.setting:10159␤  in sub infix:<==> at src/gen/CORE.setting:3092␤  in sub infix:<==> at src/gen/CORE.setting:3090␤  in sub…
10:26 lizmat TimToady: aka https://github.com/perl6/specs/issues/54
10:27 TimToady dunno if my brane is up to that today...
10:27 dalek nqp: f11ae97 | sorear++ | src/vm/jvm/runtime/org/perl6/nqp/runtime/ (2 files):
10:27 dalek nqp: The loaded module list should be in the GlobalContext, not a static variable
10:27 dalek nqp: review: https://github.com/perl6/nqp/commit/f11ae97194
10:27 lizmat TimToady: well, a revert is easy  :-)
10:28 lizmat maybe a rewrite will help you make your brane up to date  :-)
10:29 lizmat but I can also take a "no, please don't do that now" for an answer, so just say the word  :-)
10:29 TimToady dunno if my brane is up to that today...
10:29 moritz TimToady++ # consistent interface
10:30 lizmat I'll take that as a no then  :-)
10:36 lizmat with keeping in mind that an idiot can ask more questions than a wise person can answer
10:36 lizmat what is a "conditional thunk"?  Is it the block after an if, like "if $cond {  "conditional thunk  } "  ?
10:37 moritz what's the context?
10:37 lizmat S06:36
10:37 moritz (but probably not a block, because a thunk is a piece of code that's not a block)
10:38 lizmat ah, so it's more like $foo if "conditional thunk" ?
10:38 TimToady $foo ?? I-am-a-thunk() !! so-am-I()
10:39 TimToady $bar || Mee-too()
10:39 moritz lizmat: a thunk is a piece of code that isn't immediately executed, but is not a block
10:39 moritz also   has $.x = I-am-a-thunk();
10:40 moritz and in this context, I'd ss/conditional thunk/thunk/
10:41 lizmat r: my $a; say $a || my $b =2; say $b  # so any my in a thunk leaks out to scope it is in
10:41 camelia rakudo b2072f: OUTPUT«2␤2␤»
10:42 moritz right
10:58 lizmat the synopsis use the word "thunk" in several places, but never actually explains what it is
11:00 snearch joined #perl6
11:00 lizmat except maybe S05:4518: "(You can also think of a thunk as a closure that uses the current lexical scope parasitically.)"
11:00 masak lizmat: that's a good point.
11:01 masak lizmat: my understanding is this: a thunk is anything whose execution is delayed. unlike blocks, it doesn't have its own environment.
11:01 masak which means that if you do something like '$a && my $b = 14', then 'my $b = 14' part doesn't get imprisoned in its own little environment, but shares it with the rest of its surrounding block.
11:02 lizmat so "my $x = am-not-a-thunk" ?
11:02 masak right.
11:02 masak but 'has $.x = am-one;'
11:02 masak a fairly wacky one, IIUC. because it has to bind 'self', too.
11:03 TimToady the distinction is fuzzy: my state = am-I-a-thunk()
11:03 masak basically anything on the form 'CHECK totally-a-thunk;' has to be thunked, since the idea is to delay execution a bit.
11:03 TimToady uh, state $x = ...
11:03 lizmat I was wondering about it
11:03 lizmat *that
11:04 TimToady it's more like 'can be executed conditionally or repeatedly', which might imply delay, but might not
11:04 TimToady I-am-a-thunk xx $count
11:05 masak *nod*
11:05 masak sometimes the delay is very short :)
11:05 TimToady as a degenerate view, everything is a thunk, but most thunks are xx 1  :)
11:05 masak I haven't thought of it like that, but I guess the '* + 2' syntax creates thunks as well...
11:06 TimToady yes indeedy
11:06 masak r: say map * + my $c = 2, <1 2 3>; say $c
11:06 camelia rakudo b2072f: OUTPUT«3 4 5␤2␤»
11:06 masak yep.
11:06 masak lizmat: I for one welcome our new properly thunk-explaining spec overlords.
11:07 TimToady breakfast^Wlunch &
11:07 lizmat bon appetit!
11:07 flussence on serializing stuff: can't you just throw the binary pieces in the same jar file as the classes?
11:08 lizmat r: say (my $a = 1) xx 5; say $a  # wonder how many lexicals this creates
11:08 camelia rakudo b2072f: OUTPUT«1 1 1 1 1␤1␤»
11:08 moritz one
11:09 moritz you can't have more than one lexical of the same name in one scope
11:09 benabik joined #perl6
11:11 masak lizmat: there's a scale from "totally tied to the textual representation of the code" to "totally dynamic/interpreted". lexicals are a fair bit towards the textual end.
11:12 masak lizmat: the only confusing-ish thing is that a lexical environment belongs to its stack frame, and so there can be multiple simultaneous environments per textual block at play during runtime.
11:13 masak lizmat: but even so, the number of *static* blocks (off of which the dynamic ones are incarnated) is finite, fixed, and totally determined at compile time.
11:14 masak static environments are totally textual, and the values of their lexicals are basically constants, determined at parse-time.
11:14 daniel-s Hello, can somebody recommend something to read to understand Backus–Naur Form.
11:14 daniel-s or is the Wikipedia article enough?
11:14 masak daniel-s: probably a good start :)
11:14 lizmat masak++
11:15 masak daniel-s: the basics are very simple, I'd say. it's like '<postal-address> ::= <name-part> <street-address> <zip-part>'
11:15 FROGGS joined #perl6
11:15 masak daniel-s: so the thing on the left is defined to have the three things on the right as components.
11:15 masak daniel-s: and you keep on defining like that, all the way down.
11:16 masak daniel-s: it can get tricky because you can get cycles in the definitions, A is B is C is A, or simply A is A.
11:16 masak daniel-s: but that's possible to handle, and sometimes very useful when expressions are self-similar.
11:16 masak daniel-s: does this make sense?
11:16 daniel-s what does self-similar mean?
11:17 masak like a fractal :)
11:17 masak a little bit is like the whole thing.
11:17 daniel-s oh, OK.
11:17 masak <syntax> ::= <rule> | <rule> <syntax>
11:17 masak like that.
11:17 masak "a syntax is either a single rule, or a single rule followed by more syntax"
11:18 masak like with recursion, the important thing is that you can bottom out somehow.
11:18 lizmat you can bottom out somehow
11:18 lizmat can bottom out somehow
11:18 lizmat bottom out somehow
11:18 lizmat out somehow
11:18 lizmat somehow
11:18 masak :)
11:19 masak lizmat++ lizmat+ lizmat lizma lizm liz li l
11:20 masak daniel-s: the <syntax> rule above is called "right-recursive", because the recursion happens at the right end of the rule.
11:20 masak daniel-s: some parsers (such as Rakudo's Perl 6 grammar engine) have a problem when seeing left-recursive rules.
11:21 masak daniel-s: why? because rules calling each other are very much like routines calling each other. if the very first thing a routine does is call itself, you'sa gotsa problim.
11:21 salv0 joined #perl6
11:22 masak r: grammar G { regex TOP { <selfie> { say "alive!" } }; regex selfie { <selfie> } }; G.parse("")
11:22 camelia rakudo b2072f: OUTPUT«maximum recursion depth exceeded␤current instr.: 'print_exception' pc 102819 (src/gen/CORE.setting.pir:46465) (src/gen/CORE.setting:9044)␤called from Sub 'defined' pc 9702 (src/stage2/gen/NQPCORE.setting.pir:4425) (src/stage2/NQPCORE.setting:575)␤called from Sub '!…
11:22 masak "PROGRAM HAS DISAPPEARED INTO THE BLACK LAGOON."
11:23 lizmat ins Blaue hinein
11:23 TimToady P6's solution is to install a bottom-up parser as the icing between the top-down layers of the layercake
11:24 masak TimToady: I still don't fully understand how it's "between" two top-down things.
11:24 TimToady just have to make sure your bottup-up parser always makes progress
11:24 TimToady things call EXPR, and EXPR calls things
11:25 masak yes, but and so on ad potentially infinitum.
11:25 TimToady it's cake layers all the way up
11:25 TimToady and icing
11:26 masak I SURE HOPE YOU LIKE CAKE
11:26 lizmat .oO{ if it weren't for the lack of peanut butter, banana, cream and chocolate, it would be a Fat Elvis cake}
11:27 * sjn has heard that the cake is a lie
11:27 lizmat you mean, there is no cake?
11:27 TimToady the lie is a cake
11:27 sjn no, that the cake is a lie
11:27 sjn it's a lie-cake
11:28 TimToady is that like a lie-group?
11:28 lizmat or a lie-chee ?
11:28 nwc10 more likely a liar-cake
11:28 sjn with layeres of lies that lie on top of eachother
11:28 lizmat sounds more and more like statistics to me
11:29 masak Lie groups puzzle me continuously.
11:29 TimToady statistically speaking there is a lot of ICing in Silicon Valley
11:31 lizmat getting back to thunks: is an eval string a thunk or a special case of compilation unit?
11:31 lizmat or both  :-)
11:32 lizmat I guess it's a block that automatically "imports" any lexicals from the scope it is un?
11:32 lizmat *in?
11:32 JimmyZ joined #perl6
11:32 masak lizmat: eval strings are *strings*, not thunks or blocks... :P
11:32 masak lizmat: but I see what you mean. I think they compile to blocks.
11:32 masak lizmat: because of the static thing. there's no way they can leak lexicals.
11:32 lizmat indeed…  duh
11:32 masak r: eval 'my $a = 5'; say $a
11:32 camelia rakudo b2072f: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Variable '$a' is not declaredâ�¤at /tmp/mwEMJ42f66:1â�¤------> [32meval 'my $a = 5'; say $a[33mâ��[31m<EOL>[0mâ�¤    expecting any of:â�¤        postfixâ�¤Â»
11:33 masak doesn't even pass compilation.
11:33 nwc10 all the puns have scone away :-(
11:33 lizmat r: my $a=2; eval 'my $a = 5'; say $a
11:33 camelia rakudo b2072f: OUTPUT«2␤»
11:33 masak nwc10: the puns can rise again!
11:33 lizmat and no errors
11:33 masak r: my $a = 2; { my $a = 5 }; say $a
11:33 camelia rakudo b2072f: OUTPUT«2␤»
11:33 masak same deal.
11:34 lizmat indeed, that was my point  :-)
11:34 masak we are in violent agreement, then.
11:34 masak rn: my $a = 2; my $a = 3; say "alive $a"
11:34 camelia niecza v24-78-g9f58f84: OUTPUT«Potential difficulties:â�¤  Useless redeclaration of variable $a (see line 1) at /tmp/hF4Sa0dFXL line 1:â�¤------> [32mmy $a = 2; my $a [33mâ��[31m= 3; say "alive $a"[0mâ�¤â�¤alive 3â�¤Â»
11:34 camelia ..rakudo b2072f: OUTPUT«Potential difficulties:â�¤    Redeclaration of symbol $aâ�¤    at /tmp/lYOVMmD0_p:1â�¤    ------> [32mmy $a = 2; my $a [33mâ��[31m= 3; say "alive $a"[0mâ�¤alive 3â�¤Â»
11:34 lizmat ultra-green
11:37 masak oh, and '3 < $x < 5' is a thunk.
11:38 masak that's TimToady++'s insight, which he had to explain several times over to implementors ;)
11:39 masak it's perhaps clearer if you do '3 < foo($x) < 4', and remind that the requirement is that 'foo($x)' only be called once.
11:40 sorear it's not really any more of a thunk than the right side of && is
11:40 sorear masak: also, 3 < foo() < bar() < 4 might not call bar at all
11:40 TimToady but that's exactly what the right side of && is :)
11:40 TimToady sallying forth &
11:41 masak sorear: oh, great point.
11:42 masak yes, chained ops are syntactic sugar for '&&', I guess. :)
11:43 lizmat getting back to eval: when the string is compiled, it does have its own UNIT::  or is it sharing its UNIT:: with the calling code?
11:44 atroxaper joined #perl6
11:45 nwc10 does 4 < foo() < bar() < 3 need to call either?
11:45 nwc10 I think I know the answer
11:45 masak yes.
11:45 nwc10 :-)
11:46 nwc10 I think "yes, because foo() or bar() might return a junction"
11:46 masak r: sub foo { 5 | 1 }; sub bar { 2 }; say 4 < foo() < bar() < 3
11:46 camelia rakudo b2072f: OUTPUT«True␤»
11:46 masak \o/
11:47 dalek nqp: b497fef | sorear++ | src/vm/jvm/runtime/org/perl6/nqp/runtime/ (3 files):
11:47 dalek nqp: Add a mechanism for HLLs to cheaply hang data off ThreadContext and GlobalContext
11:47 dalek nqp: review: https://github.com/perl6/nqp/commit/b497fefac1
11:47 masak nwc10: but that wasn't my reasoning, actually. my reasoning was "don't rely on the optimizer being sufficiently smart."
11:47 masak I mean, it *can* be, and it's great if it is. but don't rely on it. :)
11:47 nwc10 I wonder if there's a test for that with junctions
11:47 dalek rakudo/jvm-hacking: 98a5e56 | sorear++ | src/vm/jvm/runtime/org/perl6/rakudo/ (2 files):
11:47 dalek rakudo/jvm-hacking: Use simpler (and threadsafer) reporting of binder errors
11:47 dalek rakudo/jvm-hacking: review: https://github.com/rakudo/rakudo/commit/98a5e566e1
11:47 dalek rakudo/jvm-hacking: 76f8db7 | sorear++ | src/vm/jvm/ (4 files):
11:47 dalek rakudo/jvm-hacking: Move Rakudo global state into a GlobalContext extension
11:47 dalek rakudo/jvm-hacking: review: https://github.com/rakudo/rakudo/commit/76f8db7c74
11:48 masak nwc10: I *dare* you to find out!
11:48 sorear it should now be possible to run 2 entirely independant rakudo instances in the same JVM
11:48 nwc10 will my head hurt afterwards? Is it more fun than perl 5's Makefile.SH ?
11:48 masak whoa.
11:52 sorear sleep&
11:52 pr_ joined #perl6
11:52 lizmat sleep well, sorear!  dream of tests passing in great numbers!
11:54 dalek v5: daeb314 | (Tobias Leich)++ | / (3 files):
11:54 dalek v5: support $#array
11:54 dalek v5: review: https://github.com/rakudo-p5/v5/commit/daeb314dd9
11:59 masak four hours to #masakism. come join in the fun! even if you aren't participating. :)
12:00 benabik .oO( Come /join the fun. )
12:06 21WAAV0GC joined #perl6
12:13 dpk .privacy
12:13 yoleaux dpk: This channel is public. When I am asked when I last saw you, I may repeat things you say and what time it was when you said them.
12:13 dpk .private-prefix [off]
12:13 yoleaux dpk: OK, private-prefix for #perl6 set to '[off]' with paranoid mode off.
12:22 dalek specs: 4301ccb | (Elizabeth Mattijsen)++ | S06-routines.pod:
12:22 dalek specs: An attempt at explaining what a thunk is
12:22 dalek specs: review: https://github.com/perl6/specs/commit/4301ccbc4b
12:24 FROGGS masak: four hours?? are you sure?
12:25 masak um, no.
12:25 masak I meant six hours :/
12:25 FROGGS puuuh
12:25 FROGGS okay, so I will be there
12:26 masak sorry about the confusion.
12:26 FROGGS np
12:27 FROGGS I hope my kids are sleeping early, so I'm not much late
12:36 * lizmat just realizes that fasers without blocks are also thunks
12:37 lizmat *phasers
12:39 masak that's what I said above. though maybe not so clearly.
12:39 konundra joined #perl6
12:39 [Coke] sorear: (spectest.data for rakudo-jvm) that's me, I'll have that running in the daily mix as soon as I can find a place to run java (disallowed on feather1)
12:39 masak <masak> basically anything on the form 'CHECK totally-a-thunk;' has to be thunked, since the idea is to delay execution a bit.
12:40 masak in a way, the idea of thunks totally doesn't bother me. of course the runtime must be able to decide when to run stuff ;)
12:40 masak and imagine how heavy-handed some constructs would be if we insisted on doing everything with lambdas.
12:41 masak 'foo() && bar()' would have to be written 'foo() && { bar() }'.
12:41 masak not to mention that thunks give that little extra advantage of being able to leak lexicals.
12:42 masak r: say my @a for @a = 1, 2, 3
12:42 camelia rakudo b2072f: OUTPUT«1 2 3␤1 2 3␤1 2 3␤»
12:42 masak :)
12:42 [Coke] sorear: what's your RT login? I can make you a bugadmin so you can close tickets.
12:42 dalek specs: 0dbb83c | (Elizabeth Mattijsen)++ | S04-control.pod:
12:42 dalek specs: Generalize statement to thunk for phasers
12:42 dalek specs: review: https://github.com/perl6/specs/commit/0dbb83c356
12:42 dalek specs: 70a8dce | (Elizabeth Mattijsen)++ | S06-routines.pod:
12:42 dalek specs: Add missing closing ]
12:42 dalek specs: review: https://github.com/perl6/specs/commit/70a8dce868
12:43 masak silly example, but I've seen such constructs being used to great effect.
12:43 masak some of them are on RC.
12:44 timotimo https://github.com/rakudo/rakudo/pull/169#issuecomment-19660246 - i must admit that i'm not sure i understand pm's last comment :|
12:45 colomon timotimo: I didn't understand it either
12:45 moritz r: say (3/0).perl
12:45 masak first off, timotimo++ # taking care of LHF
12:46 timotimo \o/
12:46 * [Coke] suggests adding a glossary to the syn, and putting the thunk definition there.
12:46 camelia rakudo b2072f: OUTPUT«(timeout)»
12:46 timotimo http://perlcabal.org/syn/index_X.html - a little bit like this?
12:46 * lizmat would be in favour of such a glossary
12:46 lizmat and wouldn't mind writing it
12:47 timotimo moritz: if that's actually infinite, it isn't an infinite recursion at least
12:49 [Coke] timotimo: yes, except functional. (click on the zip link in that file, e.g.)
12:49 [Coke] parrot release occurred.
12:49 timotimo ah, indeed, the C<for> stays in there
12:49 [Coke] whoever's doing the release this month for rak-p can do a dry run.
12:50 masak [Coke]: thanks.
12:50 masak I may.
12:50 [Coke] masak: I know I waited until the last minute last time and ran it on an underpowered box. :P
12:51 * [Coke] does not look forward to the explosion of RTs with "foo doesn't work on moar" and "bar doesn't work on parrot"
12:52 * [Coke] hopes a new compiler chart of who can do what will avoid some of that.
12:54 ajr joined #perl6
12:54 [Coke] rakudo: "foo" ~~ / $<foo><bar> = [ foo ] /; say $<foo><bar> #76266
12:54 camelia rakudo b2072f: OUTPUT«[31m===[0mSORRY![31m===[0m�Unrecognized regex metacharacter = (must be quoted to match literally)�at /tmp/e83OQ1Z2oA:1�------> [32m"foo" ~~ / $<foo><bar> [33m�[31m= [ foo ] /; say $<foo><bar> #76266[0m�Unable to parse regex; couldn't find final '/'�at /tmp/…
12:55 [Coke] masak: ^^ I think your original bug report there might need to be updated to track syntax changes over the last 3 years.
12:55 [Coke] std: "foo" ~~ / $<foo><bar> = [ foo ] /; say $<foo><bar> #76266
12:55 camelia std d4cc5ab: OUTPUT«[31m===[0mSORRY![31m===[0m�Unrecognized regex metacharacter = (must be quoted to match literally) at /tmp/WaZTcGIrM8 line 1:�------> [32m"foo" ~~ / $<foo><bar> =[33m�[31m [ foo ] /; say $<foo><bar> #76266[0m�Unable to parse regex; couldn't find final '/' at /…
12:55 lizmat [Coke]: my new machine is expected to arrive next Tue, so it will be later next week before being able to repurpose it as a smoker
12:55 [Coke] aye. Closing ticket.
12:57 [Coke] well, testneeding it.
12:57 kaare_ joined #perl6
13:00 [Coke] lizmat: excellent. what version of the OS are you running?
13:00 lizmat 10.8.4 by the time it becomes available
13:01 dakkar joined #perl6
13:01 masak [Coke]: I don't think the syntax for that has changed. let me check the ticket to make sure.
13:01 [Coke] ah, excellent, then I should be able to do prep work before then.
13:02 [Coke] masak: in any case we are now matching std when we weren't before.
13:02 masak [Coke]: yes, but I think that's trying to worm out of the issue the ticket is addressing.
13:03 masak the point of the ticket is that one should be able to set things in properties several layers down (using that regex syntax).
13:04 masak if the ticket gets closed because STD doesn't allow it either, that ends up doing the opposite of what it intended.
13:04 dalek niecza: cb6f20b | (Solomon Foster)++ | lib/CORE.setting:
13:04 dalek niecza: Add infix:<∖> for set difference.
13:04 dalek niecza: review: https://github.com/sorear/niecza/commit/cb6f20b616
13:04 masak or, more exactly, nothing.
13:04 timotimo [Coke]: the new parrot release doesn't seem to contain many changes :(
13:05 moritz timotimo: on the upside it won't break anything
13:05 [Coke] timotimo: you can now build on paths with spaces. :P
13:05 [Coke] (maybe)
13:06 [Coke] masak: if there's an std bug too, that's fine. then we need an std ticket and we can reference it from the RT.
13:06 JimmyZ joined #perl6
13:08 masak timotimo: the Parrot release has a record low number of commits. at least looking back a year.
13:09 FROGGS masak: and I guess the next release will even top/drop that
13:10 moritz if the JIT compiler comes in one commit, then I won't object against a parrot release with only two commits :-)
13:11 [Coke] GSOC is consuming what limited resources exist.
13:11 timotimo aside: is it to spec that i cannot use things like C<...> in Pod tables?
13:11 timotimo well, cannot is wrong; they are just represented verbatim in the $=pod part
13:12 cognominal joined #perl6
13:14 timotimo it would seem to me that it's a good idea to put data that would look good in table form into actual pod tables; am i right about that?
13:15 JimmyZ so... sixparrot is dead
13:19 masak JimmyZ: it is? how do you figure?
13:19 [Coke] JimmyZ: I certainly don't see the point in spending very limited resources on it as an experiment at this point.
13:19 masak hm, good point.
13:19 nwc10 sixparrot doesn't seem to be in anyone's best interest
13:19 [Coke] if there was a targeted thing that we knew would be a win for rakudo and others, sure, but then that's not really sixparrot.
13:20 [Coke] basically, moarvm is what that project wanted to be anyway. IMO.
13:21 JimmyZ fib benchmark, moarvm is about 2x of perl 5 :P
13:21 [Coke] JimmyZ: and what about parrot?
13:22 JimmyZ [Coke]: https://gist.github.com/zhuomingliang/5704174
13:22 JimmyZ about 8.3x
13:23 JimmyZ memory: parrot 40M; moarvm/perl5: 800k
13:24 masak o.O
13:24 * timotimo drools
13:24 moritz though note that a moarvm vs. perl 5 comparison is assembler vs. high-level
13:25 timotimo sure
13:25 masak r: sub postfix:<M> { $^x * 1_000_000 }; sub postfix:<k> { $^x * 1_000 }; say "{ 40M / 800k } times as much memory"
13:25 camelia rakudo b2072f: OUTPUT«50 times as much memory␤»
13:25 timotimo .o(it would be cool if nqp/rakudo could throw the compiler out of memory if they can ensure that eval will never be used ...)
13:26 JimmyZ if I disable cclass init in MoarVM, memory can  be reduced to 0.85x
13:28 timotimo where on the roadmap for moarvm is "start work on the JIT", btw?
13:31 mucker joined #perl6
13:35 nwc10 timotimo: I suspect somewhere after "bootstrap NQP", "bootstrap Rakudo", "pass the spectests", "reach parity with Parrot" and "start on Perl 5 interopration". At least on sober priority list. But "fun" might have other ideas
13:35 timotimo hehe, whoa.
13:36 masak also note that with several developers, some things might happen in parallel.
13:36 nwc10 eg "drink coffee" and "drink beer"
13:37 masak hm, is that "parallel" or "concurrent"? :)
13:37 JimmyZ after someone thinks it's time to -Ofun to work on the JIT :P
13:37 nwc10 masak: yes, good point. I don't know. Maybe I should be more careful when making flippant remarks. Just in case a serious discussion starts.
13:38 tgt joined #perl6
13:38 * JimmyZ doesn't know what's the difference between parallel and concurrent
13:39 nwc10 I'm not confident that I can explain it
13:39 masak nwc10: no, in here serious discussions happen through flippant remarks, so it's OK.
13:41 mucker how many does perl6 support ?  http://themucker.github.io/ (my favorite syntax bits:)
13:43 [Coke] mucker: what, no tcl?
13:44 mucker never enjoyed tcl :/
13:44 mucker but I don't hate it :)
13:46 timotimo mucker: personally a big fan of .WHY
13:47 nwc10 JimmyZ: thanks for those benchmarks. I forgot to say that I took the various files around the time you first published them, and could replicate the figures
13:47 nwc10 at least, the rough figures and the ratios
13:49 JimmyZ :P
13:49 skids joined #perl6
13:49 timotimo the synopsis are rendered with a perl6 pod implementation, Pod::To::HTML, yes?
13:50 moritz no
13:50 JimmyZ timotimo: only S26
13:50 moritz only S26 is
13:50 moritz what JimmyZ++ said
13:50 moritz timotimo: the rest of the synopsis are plain auld perl 5 POD
13:50 timotimo ah, ok
13:50 moritz and rendered with the create_smartlinks (or so) script in Mu
13:50 timotimo how about these pages? http://perlcabal.org/syn/index_X.html
13:51 timotimo does that come from the smartlinks script?
13:51 * moritz has no idea
13:51 JimmyZ timotimo: Pod::To::HTML can't parse S26 completely
13:52 moritz it used to work, no?
13:52 timotimo indeed it can't
13:52 JimmyZ timotimo: only parse the most things
13:52 timotimo "last commit: 3 years ago" vs "# This program is still under active development, and" %)
13:53 moritz "under active development" is an euphemism for "not yet feature-complete"
13:53 timotimo :)
13:56 timotimo there's create_x_file and create_index, i think those are the functions i should be looking at
13:56 moritz probably
13:57 * [Coke] was just wondering how long until we redo all the syn in pod6
13:57 timotimo nah, the index is the actual index that lists all syns, apocalypses and exegeses
13:58 moritz fwiw the index.html is static HTML
13:58 moritz and in the mu repo directly
13:58 moritz (under a slightly obscure name)
13:58 timotimo oh, mhm.
13:58 moritz timotimo: what do you want to do?
13:58 timotimo is there a function that will strip pod tags from a piece of string?
13:58 mucker [Coke]: pod6 can haz feature requests ?
13:59 timotimo there are links like S02.html#The_C<<_.._>>_operator
13:59 timotimo which don't work
13:59 timotimo and S05.html#When_C<$/>_is_valid
13:59 moritz those are probably generated by the Text::SmartLinks module or so
14:00 timotimo yes, they are
14:01 timotimo ah, you mean to say they shouldn't be fixed at the create_x_page level
14:01 moritz iirc szabgab turned the old smartlinks script into that module
14:01 lizmat r: sub foo {...}; sub bar { foo }; bar  # where did the stub code get executed?
14:01 camelia rakudo b2072f: OUTPUT«Stub code executed␤current instr.: 'throw' pc 347557 (src/gen/CORE.setting.pir:151689) (src/gen/CORE.setting:8887)␤called from Sub 'sink' pc 379739 (src/gen/CORE.setting.pir:164183) (src/gen/CORE.setting:10169)␤called from Sub 'MAIN' pc 381 (src/gen/perl6.pir:147) …
14:01 lizmat the stack trace doesn't tell me really  :-(
14:02 timotimo https://github.com/perl6/mu/blob/master/util/Text-SmartLinks/lib/Text/SmartLinks.pm#L1151 - i'm looking at this right now
14:02 masak for those interested in programming language semantics: this is a really nice set of lecture notes about domain theory: http://www.cs.nott.ac.uk/~gmh/domains.html
14:02 timotimo r: sub foo { ... }; sub bar { my $v = foo; 1 }; bar()
14:02 camelia rakudo b2072f:  ( no output )
14:02 moritz lizmat: I think I can explain the problem, but I don't have a good solution
14:03 timotimo that's why, it's a failure rather than an immediately thrown exception, and so it doesn't report where it was created
14:03 moritz lizmat: the problem is that term ... returns a Failure, and that is returned from the whole program
14:03 moritz lizmat: and then there's a thing nqp wrapper around the progrma which calls .sink on the returned Faillure
14:03 lizmat aha, so it is just a side-effect of the repl
14:03 moritz and at that point the nice backtrace printer isn't in scope anymore
14:04 lizmat I see
14:04 moritz r: sub foo { ... }; my $x = foo(); $x.sink;
14:04 camelia rakudo b2072f: OUTPUT«Stub code executed␤  in method sink at src/gen/CORE.setting:10169␤  in block  at /tmp/HqMVBrq2Pw:1␤␤»
14:04 moritz hrm, doesn't report sub foo either
14:04 moritz so it's two problems really
14:05 moritz r: sub a { b }; sub b { fail 'foo' }; sink a;
14:05 lizmat I was grepping for "Stub code executed", but it only seems to live in pir
14:05 camelia rakudo b2072f:  ( no output )
14:06 moritz $ git grep 'Stub code executed'
14:06 moritz src/Perl6/Actions.nqp:            $past.push($*W.add_string_constant('Stub code executed'));
14:07 timotimo should i start a new test file S06-signature/slurpy-lol.t?
14:08 timotimo oh, that's multidimensional.t
14:15 lizmat moritz++   (note to self: get ack upgraded)
14:15 [Coke] lizmat: careful upgrading to 2.x
14:15 hoelzro ack++
14:15 hoelzro ;)
14:15 [Coke] (some good stuff, but some non-compatible changes)
14:16 hoelzro the only thing I've really seen people complain about is -a
14:16 PerlJam hoelzro: complain about?
14:16 timotimo hoelzro: hey, have you been working towards getting perl6 into pygments master?
14:16 pmichaud good morning, #perl6
14:16 hoelzro PerlJam: regarding ack2
14:17 hoelzro timotimo: it's there
14:17 hoelzro has been for a month or so
14:17 hoelzro =)
14:17 hoelzro pmichaud: ahoy
14:17 PerlJam hoelzro: aye, but -a is one of the main reasons I upgrade to ack2 everywhere.
14:17 perigrin hoelzro: making it a no-op would have been friendlier.
14:17 timotimo cool!
14:17 hoelzro timotimo: the next step is pygments.rb, but the maintainer hasn't responded in over a month
14:17 timotimo :(
14:18 perigrin to everyone but PerlJam apparently
14:18 timotimo responded to what exactly?
14:18 hoelzro I would have preferred a warning
14:18 * moritz likes default -a too
14:18 PerlJam oh, I see.  people complain about the "option is invalid" message?
14:18 hoelzro PerlJam: yes
14:18 perigrin yeah the fatalness
14:18 [Coke] PerlJam: -a is the reason I downgraded. Easier than retraining my hands. :)
14:18 hoelzro -a was a giant antipattern in 1
14:19 hoelzro and people expected it to do crazy things
14:19 hoelzro so we removed it
14:19 PerlJam I was always typing "ack -a", so in the interest of huffman, ack2 is a win  :)
14:19 hoelzro I think it was the right decision, but I would've preferred a warning
14:19 perigrin PerlJam: I haven't heard anyone complain about the new default
14:19 perigrin everyone has [Coke]'s problem.
14:19 [Coke] it's not the default that's the problem, right.
14:19 * perigrin rarely used -a and *still* got bit by it yesterday.
14:19 [Coke] right.
14:20 lizmat meanwhile, adapting make_yada to show the sub it was in, is way out of my league
14:21 PerlJam Actually ... I have the opposite problem ...   I don't use "ack -a" now because I expect ack2, but on systems that are still ack1, it's an invisible failure.
14:21 lizmat as S06:464 suggests
14:21 * timotimo spectests his new tests for his old slurpy_lol pullrequest
14:21 lizmat "Unimplemented stub of sub foo was executed"
14:22 timotimo fwiw, i found a spectest that seems to suggest Int *@foo should work ... huh.
14:22 PerlJam timotimo: what does it mean?
14:23 timotimo https://github.com/rakudo/rakudo/pull/160 <- relevant bit of discussion
14:23 moritz timotimo: that's not surprising; people were writing spectests when nobody implemented typed arrays, so the test writers had unreasonable expectations
14:23 timotimo hehe
14:25 timotimo is the problem with S26-documentation rendering in the pod parsing inside rakudo or in Pod::To::HTML?
14:26 timotimo "the" problem %)
14:26 flussence both
14:26 timotimo i feared that :|
14:29 jerome joined #perl6
14:29 ilogger2 joined #perl6
14:33 dalek roast: 956f9fc | (Timo Paulssen)++ | S06-signature/multidimensional.t:
14:33 dalek roast: do some multidim slurpy tests (fudged for rakudo)
14:33 dalek roast: review: https://github.com/perl6/roast/commit/956f9fc679
14:34 timotimo https://github.com/rakudo/rakudo/pull/127 - i'm confident this can be merged now
14:37 lizmat grrr, no autmatic merge anymore  :-(
14:39 xenoterracide|2 joined #perl6
14:39 pmichaud timotimo: sorry if my reply to #169 is confusing... how can I help de-confuse it?
14:40 dalek rakudo/nom: c94a62e | (Timo Paulssen)++ | src/Perl6/Metamodel/BOOTSTRAP.pm:
14:40 dalek rakudo/nom: make **@ available for multi subs.
14:40 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/c94a62edce
14:40 dalek rakudo/nom: 9768a8d | (Elizabeth Mattijsen)++ | src/Perl6/Metamodel/BOOTSTRAP.nqp:
14:40 dalek rakudo/nom: Merge branch 'slurpy_lol' of https://github.com/timo/rakudo into timo-slurpy_lol
14:40 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/9768a8d832
14:40 timotimo yays <3
14:40 timotimo pmichaud: my interpretation is: "i'm not sure if the spec requires (3/0).nude and similar things to explicitly not blow up."
14:41 pmichaud I think I'm saying that the spec allows 3/0 to return Rat.new(3,0)
14:41 timotimo aaw, the irclog makes #169 into a RT link. i wonder if a heuristic would be sane that says "one to three digit #foo is probably a pullrequest or github issue"
14:42 timotimo pmichaud: when you say "allows", that means it is acceptable for it to create a Failure instead?
14:42 timotimo r: Rat.new(3,0).perl.say
14:42 timotimo i'm not sure what such a rat even means?
14:42 camelia rakudo b2072f: OUTPUT«(timeout)»
14:43 pmichaud timotimo: the spec says that infix:</> on two Ints should return a Rat.
14:43 timotimo is a "division by zero" preferable over an infinite loop? :)
14:43 pmichaud which I'd interpret to mean "not a Failure"
14:44 * timotimo investigates how to make that work properly
14:44 pmichaud if Rat.new(3,0).perl causes an infinite loop, that's likely a bug in Rat.perl and not in infix:</>
14:45 pmichaud n: Rat.new(3,0).perl.say
14:45 camelia niecza v24-79-gcb6f20b: OUTPUT«Inf␤»
14:45 timotimo r: Rat.new(3, 0).nude.say
14:45 camelia rakudo b2072f: OUTPUT«1 0␤»
14:45 timotimo well, that's curious.
14:45 pmichaud in particular, I suspect there's a bug with Rat.Str and zero denominators
14:46 timotimo oh
14:46 timotimo yeah, haha
14:46 timotimo $d div= 5 while $d %% 5;
14:46 timotimo r: say 0 %% 5
14:46 camelia rakudo b2072f: OUTPUT«True␤»
14:46 timotimo r: say 0 div 5 == 0
14:46 camelia rakudo b2072f: OUTPUT«True␤»
14:46 pmichaud since niecza++ seems to work, maybe look at its code for stringifying Rats
14:46 timotimo r: say True...* ~~ False
14:46 camelia rakudo b2072f: OUTPUT«Potential difficulties:â�¤    Smartmatch against False always fails; if you mean to test the topic for truthiness, use :!so or *.not or !* insteadâ�¤    at /tmp/VNfFxn3ejQ:1â�¤    ------> [32msay True...* ~~[33mâ��[31m False[0mâ�¤Trueâ�¤Â»
14:47 timotimo hah, right
14:48 timotimo would you deem it acceptable if the infix:</>(Int, Int) would first check if the denominator is to be 0 and if it is, bypass DIVIDE_NUMBERS?
14:48 * pmichaud looks
14:48 pmichaud this is sounding overly complexified
14:49 timotimo well, somewhere it should generate Failures for div by zero, and all the / subs do is call DIVIDE_NUMBERS with the resulting num and denom
14:49 timotimo maybe i should place zero-checks there instead.
14:49 pmichaud it should generate Failures for div by zero when one of the arguments is a Num
14:49 colomon infix:</>(Int, Int) should not divide, right?
14:49 timotimo OK, so i will move the div by zero check from DIVIDE_NUMBERS to the / subs
14:49 timotimo thanks for clearing all that up, now it makes more sense
14:50 * masak .oO( it's not overly complexified until it checks .imag )
14:50 timotimo Int and Rational arguments should not create div by zero then?
14:50 timotimo and rat and rat
14:51 pmichaud what in the world is the purpose of DIVIDE_NUMBERS, anyway?
14:52 flussence to distinguish it from DIVIDE_PICTURES_OF_FRUIT, obviously
14:52 timotimo it's supposed to make the rats clean and maybe turn them into fatrats
14:53 pmichaud it looks like it also makes Rat arithmetic really slow :-(
14:53 pmichaud the checks for FatRats should probably be multicandidates
14:54 flussence (huh, my package manager's telling me I should have a libpcre.so.0 and .so.1 but one's not there... maybe that's why I had parrot compiling problems yesterday.)
14:55 moritz flussence: just compile with --without-pcre or whatever that option is called
14:55 colomon timotimo: define clean?  and rats are never supposed to turn into FatRats
14:56 moritz divide by gcd
14:57 flussence moritz: well, I just reinstalled libpcre and... bah. Okay, --without-pcre it is.
14:57 pmichaud I agree with colomon -- Rats don't become FatRats on their own.
14:57 colomon that's actually very important
14:58 colomon If infix:</>(Int | Rat, Int | Rat) cannot make a valid Rat, it's supposed to make a Num
14:58 pmichaud anyway, that issue is orthogonal to what timotimo++ is working on (div by zero soft fails)
14:59 timotimo colom
14:59 timotimo no, that's not the tab key
14:59 pmichaud we should come up with a test that checks the FatRat issue
14:59 timotimo colomon: 3/2 rather than 6/4, i guess
15:01 pmichaud looks to me like DIVIDE_NUMBERS doesn't promote to FatRats
15:01 pmichaud unless there's already a FatRat argument
15:01 * timotimo looks again
15:01 pmichaud still, this looks like a very convoluted way of handling rats.
15:01 timotimo ah, yes, you're right
15:02 lizmat fwiw, there is pretty convoluted code to not completely use MMD because of performance reasons
15:02 timotimo i can't find a candidate that matches rat divided by num
15:03 lizmat maybe this is also such a place?
15:03 pmichaud multi infix:</>(\a, \b)    { a.Numeric / b.Numeric }
15:03 timotimo oh, right
15:05 timotimo https://gist.github.com/timo/6147b62c22b4ac7a6673 - does this seem like a sane test case?
15:05 colomon hmmm?  That's not going to enter in to Rat / Num
15:05 timotimo (except for the comments on the right side)
15:06 colomon timotimo: looks good to me
15:06 benabik If Rat / Num does enter that, there's a problem...  Rat.Numeric returns a Rat, and ditto for Num, so that would just loop.
15:06 pmichaud the $c example looks wrong to me.
15:06 colomon benabik: right
15:06 pmichaud oh, wait, it's right
15:06 pmichaud sorry, forgot my num rules.
15:07 * timotimo updated the test case
15:07 colomon tests are perhaps better written as  isa_ok 10 div 0, Failure, "10 div 0 should fail"
15:07 pmichaud yes, I agree.
15:07 timotimo not sure if i should put these tests into the actual spectest suite; if so: where would they go?
15:07 pmichaud .WHAT === Failure isn't the best way to test type-ness.
15:07 pmichaud tests for division by zero definitely belong in roast
15:08 pmichaud there might already be some somewhere :)
15:09 timotimo i'll look.
15:09 stevan_ joined #perl6
15:09 colomon S32-num/rat.t has a note about needing these tests.  :)
15:11 pmichaud weird.  S32-num has tests called "int.t" and "rat.t" and "fatrat.t", but there's no "num.t"  :-)
15:11 pmichaud this should probably go into num.t
15:12 timotimo i can certainly place that there. the tests that check for the result to be a rat should go there, too?
15:13 pmichaud I'd expect those tests to be in rat.t or int.t
15:13 timotimo i've placed them all in rat.t for now, under the note that says "we need some div by 0 tests"
15:13 pmichaud or, if you're wanting to test div specifically, then they can go in S03-operators
15:14 pmichaud S03-operators/arith.t might make more sense.
15:14 pmichaud for div-by-zero checks.
15:14 pmichaud or you can just create a S03-operators/div.t
15:15 colomon +1
15:16 timotimo okay
15:16 timotimo what about is (3/0).Num, Inf, "(3/0).Num = +Inf";?
15:16 timotimo should i try to make that kind of thing work now, too?
15:16 pmichaud isa_ok
15:16 timotimo (not my code ;) )
15:16 pmichaud r: say (3/0).Num
15:16 camelia rakudo b2072f: OUTPUT«Inf␤»
15:17 pmichaud seems to me like it works already.
15:17 moritz 3/0 can't be both a Failure and Inf
15:17 timotimo oh, it already works? that's fine then
15:17 birdwindupbird joined #perl6
15:19 lizmat r: class Failure Is Inf {}
15:19 camelia rakudo b2072f: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Unable to parse class definitionâ�¤at /tmp/CZ8_HqkWrP:1â�¤------> [32mclass Failure [33mâ��[31mIs Inf {}[0mâ�¤    expecting any of:â�¤        statement listâ�¤        prefix or termâ�¤        prefix or meta-prefixâ�¤        generic roleâ�¤Â»â€¦
15:19 lizmat r: class Failure is Inf {}
15:19 camelia rakudo b2072f: OUTPUT«[31m===[0mSORRY![31m===[0m�'Failure' cannot inherit from 'Inf' because it is unknown.�Did you mean 'Int'?��at /tmp/5KP1J9kTMU:1�------> �»
15:19 pmichaud what doesn't currently work according to spec is
15:19 pmichaud r: say (3 / 0e0).Num
15:19 camelia rakudo b2072f: OUTPUT«Divide by zero␤  in sub infix:</> at src/gen/CORE.setting:3892␤  in sub infix:</> at src/gen/CORE.setting:3054␤  in sub infix:</> at src/gen/CORE.setting:3242␤  in sub infix:</> at src/gen/CORE.setting:3054␤  in block  at /tmp/WGjwDKOLtY:1␤␤»
15:22 raiph joined #perl6
15:23 FROGGS joined #perl6
15:23 timotimo should i just push my spectest changes?
15:23 dalek specs: 081817f | (Elizabeth Mattijsen)++ | S06-routines.pod:
15:23 dalek specs: Removed superfluous "a"
15:23 dalek specs: review: https://github.com/perl6/specs/commit/081817f632
15:24 * moritz hopes those changes won't happen before the compiler release tomorrow
15:25 colomon r: say (3 / 0e0)
15:25 camelia rakudo b2072f: OUTPUT«Divide by zero␤  in sub infix:</> at src/gen/CORE.setting:3892␤  in sub infix:</> at src/gen/CORE.setting:3054␤  in sub infix:</> at src/gen/CORE.setting:3242␤  in sub infix:</> at src/gen/CORE.setting:3054␤  in block  at /tmp/XZcZAjXiLs:1␤␤»
15:25 timotimo https://gist.github.com/timo/173b1696cbecf4c28500 - these are the suggested spectest changes, https://github.com/rakudo/rakudo/pull/169/files - these are the rakudo changes
15:26 colomon lizmat: surely that should be class Inf is Failure ?
15:26 skids joined #perl6
15:26 colomon except now that I think about it, I'm not sure Inf should be a Failure.  It's sort of a valid number
15:26 lizmat r: class Inf is Failure {}
15:26 camelia rakudo b2072f: OUTPUT«Cannot look up attributes in a type object␤current instr.: 'sink' pc 379716 (src/gen/CORE.setting.pir:164179) (src/gen/CORE.setting:10169)␤called from Sub 'MAIN' pc 381 (src/gen/perl6.pir:147) (src/main.nqp src/gen/main-version.nqp:42)␤called from Sub '' pc 77 (src…
15:27 lizmat .oO{ das machine ist nicht fuer das gefingerpoken }
15:27 moritz also there has been talk going on about what to do with Inf ~~ Int
15:27 pmichaud timotimo: why nqp::if instead of ?? !!
15:27 lizmat pmichaud: speed ?
15:27 pmichaud lizmat: ?? !! desugars to an nqp::if -- at least it should.
15:28 timotimo pmichaud: someone told me to, i didn't question the decision
15:28 timotimo i can of course rewrite it as ?? !!
15:28 pmichaud there are places where nqp::if() is definitely better... but I don't think this is one of them.
15:28 pmurias joined #perl6
15:28 pmurias hi
15:28 timotimo very well
15:28 colomon moritz: I still kind of like the idea of Inf / -Inf as Real types of their own
15:30 pmichaud also, it can be written somewhat cleanly as
15:30 pmichaud fail X::Numeric::DivideByZero.new() unless b;
15:30 pmichaud nqp::div_I(....)
15:31 pmurias pmichaud: we have to decide on a communication medium for GSoC
15:31 pmichaud pmurias: email or irc works for me.
15:31 pmichaud I can look at other medium if you like also.
15:32 pmurias irc or email is fine for me
15:33 pmichaud let's go for irc to begin with; if you have something lengthy or non-public to discuss, send an email
15:34 timotimo pmichaud: i'm doing another spectest round. do you feel this should wait until after the compiler release?
15:34 nwc10 sorear: I assume that there's a reason why arrays of bytes aren't a viable way to fake up blobs in class files. Is this because there's a low maximum size for arrays?
15:34 timotimo i thought it would be kind of nice to have the thing you complained about in your yacpna slides be fixed in the very next compiler release
15:35 timotimo but moritz seems uneasy, probably due to the fact that modules may depend on the old behavior?
15:35 pmichaud what behavior has changed, exactly?
15:35 pmichaud division by 0e0 now soft fails instead of hard?
15:36 timotimo yes
15:36 pmichaud I'm okay with it going in for this month.
15:37 pmichaud I'm assuming there aren't any other spectest regressions :)
15:37 timotimo the patch currently isn't good, though
15:37 timotimo there's the one tests that fails due to try { 1 div 0 }; say $!.defined; blowing up from the soft exception; i decided to axe that test.
15:38 moritz please don't; replace it with something else that dies
15:38 pmichaud ...blowing up how?
15:38 moritz it's a real test for a real regression we had in rakudo
15:38 timotimo do you have a suggestion?
15:38 moritz die
15:38 moritz die 'blerg'
15:39 timotimo r: sub a { fail "what am i doing?" }; try a; say $!.defined; say "alive"
15:39 camelia rakudo b2072f: OUTPUT«what am i doing?␤  in method sink at src/gen/CORE.setting:10169␤  in block  at /tmp/JGhU6nCoAD:1␤␤»
15:39 moritz the "nice" thing about Failures is that they are sunk outside the try block, if the try block is in sink context
15:39 pmichaud anywhere that the roast tests are using "div 0" to mean "throw an immediate exception", the test is wrong.
15:40 timotimo moritz: there's a test try { die "foo" }; ok defined($!) that still exists
15:40 pmichaud a couple of the tests appear to use  "say 3 div 0", which is okay because the say() is causing the Failure to throw its exception.
15:41 pmichaud so you _could_ potentially do      try { say 1 div 0 }
15:41 moritz or just use (1 div 0).Str
15:42 timotimo will do
15:42 pmichaud yes, that also.
15:42 * moritz is somewhat weary of say() in tests, because it can confuse the TAP parser
15:45 potatogim_ joined #perl6
15:47 Guest36317 joined #perl6
15:48 potatogim_ joined #perl6
15:49 ajr joined #perl6
15:49 btyler joined #perl6
15:50 * lizmat wonders what the "* namespace" is (S06:639)
15:50 lizmat "Operators other than the standard ones should not be installed into the C<*> namespace."
15:50 lizmat so * is a synonym for GLOBAL:: ?
15:51 lizmat in this context?
15:52 xilo_ joined #perl6
15:53 masak lizmat: I think you just found a fossil.
15:53 * moritz too
15:53 masak used to be global things were declared as 'sub *foo() {}'
15:53 lizmat s/*/GLOBAL::/ ?
15:53 moritz * is already used for enough or more-than-enough things without it
15:54 masak lizmat: yah.
15:54 lizmat will do
15:54 moritz but declaring stuff in GLOBAL:: is pretty pointless
15:54 moritz s/stuff/subs/
15:54 timotimo if that's all right with you i'll push the spectest changes i made for div-by-zeroness
15:54 moritz because subs are only looked up in lexical scopes by default
15:55 timotimo and then the pull request is ready to be merged
15:55 timotimo (it does pass all tests without regressions)
15:55 lizmat 2008-11-27 07:46:29, so that reeks of fossil indeed
15:55 xilo_ joined #perl6
15:55 diakopter moritz: isn't GLOBAL also the outermost lexical scope?
15:56 dalek roast: dea51d0 | (Timo Paulssen)++ | S (3 files):
15:56 dalek roast: div by 0 soft-failure tests for Rat, Num.
15:56 dalek roast: review: https://github.com/perl6/roast/commit/dea51d09b2
15:56 dalek roast: 73878e8 | (Timo Paulssen)++ | S02-magicals/dollar_bang.t:
15:56 dalek roast: reinstate $!.defined test with div by 0.
15:56 dalek roast: review: https://github.com/perl6/roast/commit/73878e89de
15:57 dalek specs: aff4e89 | (Elizabeth Mattijsen)++ | S06-routines.pod:
15:57 dalek specs: s/an/a/
15:57 dalek specs: review: https://github.com/perl6/specs/commit/aff4e89118
15:57 dalek specs: 0849660 | (Elizabeth Mattijsen)++ | S06-routines.pod:
15:57 dalek specs: The * namespace is now called GLOBAL::
15:57 dalek specs: review: https://github.com/perl6/specs/commit/0849660640
15:58 timotimo yays :)
15:58 timotimo ready to deal with any fallout that may happen
16:00 * lizmat runs spectest on OSX
16:00 potatogim joined #perl6
16:01 lizmat ETA result: 18:27
16:01 lizmat aka 27 mins from now
16:02 moritz diakopter: if yes, then our "lexical scopes are immutable at runtime" assumption for 99% of our optimizations is moot
16:02 moritz diakopter: (unless there's some snapshotting going on
16:02 moritz )
16:03 dmol joined #perl6
16:04 lizmat r: sub GLOBAL::a { say "foo" }; a
16:04 camelia rakudo b2072f: OUTPUT«foo␤»
16:04 moritz r: sub WhateverNamespace::a { say 'foo' }; a
16:04 camelia rakudo b2072f: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Undeclared routine:â�¤    a used at line 1â�¤â�¤Â»
16:05 lizmat r: module A { sub GLOBAL::a { say "foo" }}; a  # I guess the above worked because of a lexical alias
16:05 camelia rakudo b2072f: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Undeclared routine:â�¤    a used at line 1â�¤â�¤Â»
16:05 moritz huh.
16:05 * diakopter shrugs in complete ignorance
16:07 lizmat r: sub Foo::a { say "foo" }; a  # I guess GLOBAL:: in that sense is special
16:07 camelia rakudo b2072f: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Undeclared routine:â�¤    a used at line 1â�¤â�¤Â»
16:08 diakopter r: sub GLOBAL::a { say "foo" }; (sub { a }).()
16:08 camelia rakudo b2072f: OUTPUT«foo␤»
16:08 timotimo turns out i won't be ready to deal with lots of fallout this evening
16:10 MrMeek-afk joined #perl6
16:11 timotimo i'm wondering now where the @ sign for arrays came from. i guess it kind of looks like a curled up string?
16:12 MrMeek joined #perl6
16:12 timotimo and the % sign kind of looks like it has two sides, just like a key and a value would
16:12 benabik At and array are alliterative.
16:13 th_ joined #perl6
16:13 diakopter so are ampersand and array. also, # is spoken hash by many people
16:13 diakopter (also pound)
16:15 PerlJam @ looks like an a with long tail.
16:15 PerlJam well, tail-in-the-front
16:16 huf my mnemonic seems to be "it's round like an array"
16:16 huf which makes zero sense. but yes.
16:16 huf my @x = (...) # see how round flows into round? and my $x = [ ... ] ; # pointy into pointy? :)
16:17 vk joined #perl6
16:17 PerlJam I think Camel1 had some text on why $, @, and %
16:17 huf % is due to the two circles, key and value # i think
16:20 geekosaur "key/value store"
16:25 lizmat r: sub a ( $a --> $r = 2 ) { say $a; say $r }; a("foo")  # should this be valid according to S06:693 ?
16:25 camelia rakudo b2072f: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Missing blockâ�¤at /tmp/69JxhFMfVw:1â�¤------> [32msub a ( $a --> [33mâ��[31m$r = 2 ) { say $a; say $r }; a("foo")  #[0mâ�¤    expecting any of:â�¤        statement listâ�¤        prefix or termâ�¤        prefix or meta-prefixâ�¤        new name …
16:26 lizmat "If the return specification is definite but not an immutable value, then it must be a mutable container (variable) of some sort."
16:30 PerlJam looks like it to me.
16:32 PerlJam I'd imagine that anything other than a type on a returns is NYI
16:32 moritz it is
16:33 PerlJam r: sub foo returns 5 { }
16:33 camelia rakudo b2072f: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Missing blockâ�¤at /tmp/CNrA6M_2Du:1â�¤------> [32msub foo returns [33mâ��[31m5 { }[0mâ�¤    expecting any of:â�¤        statement listâ�¤        prefix or termâ�¤        prefix or meta-prefixâ�¤        new name to be definedâ�¤Â»
16:34 benabik r: sub foo( --> 5 ) {}; say foo
16:34 camelia rakudo b2072f: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Missing blockâ�¤at /tmp/5jZpW4iXJw:1â�¤------> [32msub foo( --> [33mâ��[31m5 ) {}; say foo[0mâ�¤    expecting any of:â�¤        statement listâ�¤        prefix or termâ�¤        prefix or meta-prefixâ�¤        new name to be definedâ�¤Â»â€¦
16:35 Chillance joined #perl6
16:35 lizmat so a case of NYI, check  :-)
16:36 lizmat r: sub b ($b is rw ) { say $b; $b="bar" }; sub a ($a) { b($a) }; a("foo")  # shouldn't this be caught at compile time?
16:36 camelia rakudo b2072f: OUTPUT«foo␤Cannot assign to a readonly variable or a value␤  in sub b at /tmp/3Z9pVmvslZ:1␤  in sub a at /tmp/3Z9pVmvslZ:1␤  in block  at /tmp/3Z9pVmvslZ:1␤␤»
16:39 PerlJam std: sub foo( --> 5 ) { }
16:39 camelia std d4cc5ab: OUTPUT«ok 00:00 44m␤»
16:39 PerlJam std: sub foo returns 5 { }
16:39 camelia std d4cc5ab: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Invalid type name at /tmp/itGXiMFPrl line 1:â�¤------> [32msub foo returns [33mâ��[31m5 { }[0mâ�¤    expecting typenameâ�¤Parse failedâ�¤FAILED 00:00 41mâ�¤Â»
16:39 PerlJam Are returns and --> asymmetric on purpose?  I've always thought them interchangeable
16:48 masak PerlJam: I leafed throught S06. I think they're interchangeable.
16:51 atroxaper left #perl6
16:52 ajr joined #perl6
16:54 silug_ joined #perl6
16:56 dmol joined #perl6
16:57 timotimo lizmat: have the spectests gone through?
16:57 lizmat timotimo: yes, no problems
16:58 lizmat and thanks for reminding me  :-)
16:58 timotimo yays :)
17:05 stevan_ joined #perl6
17:11 masak less than 1 hour to the #masakism workshop.
17:13 konundra joined #perl6
17:14 spider-mario joined #perl6
17:18 * moritz decides spontaneously to lurk
17:18 moritz though I don't know if I'll have IRC access during the workshop :-)
17:18 masak if you don't, you'll be an exemplary lurker :P
17:21 kaleem joined #perl6
17:26 dalek specs: 93a7eb5 | (Elizabeth Mattijsen)++ | S06-routines.pod:
17:26 dalek specs: Some elaboration on possible name collisions in signatures
17:26 dalek specs: review: https://github.com/perl6/specs/commit/93a7eb5d02
17:29 athomason joined #perl6
17:36 athomason joined #perl6
17:37 dalek perl6-roast-data: e364428 | coke++ | / (4 files):
17:37 dalek perl6-roast-data: today (automated commit)
17:37 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/e364428b43
17:37 [Coke] rakudo is clean again (spectests)
17:40 timotimo i thought i removed those skips for multi dimensional slurpy arglists
17:41 timotimo turns out i did not
17:42 timotimo but those do succeed
17:48 lizmat too bad "skip" really skips the code, unlike "todo"
17:49 lizmat I can see this being needed if the test causes a segfault, but if the test creates a catchable exception, it should be handled
17:50 lizmat maybe "todo" should encapsulate the test in a try {} block
17:53 bluescreen10 joined #perl6
17:53 [Coke] lizmat: that's why we have autounfudge.
17:54 lizmat autounfudge?
17:54 djanatyn1 joined #perl6
17:55 Tene_ joined #perl6
17:55 Tene_ joined #perl6
17:56 sorear nwc10: (arrays of bytes) do you mean 'new byte[] { 1, 2, 3, 4, 5 }' ?
17:57 [Coke] it takes a (or multiple) roast files, and you can try to un-todo and un-skip all the impl-specific skips/todos
17:57 [Coke] so if you have something that's skipped, e.g., it will unskip that one, try to run the test, see if it passes, then try the next one, etc. builds up a patch file you can then apply manually.
17:59 masak tadzik: #masakism!
18:00 athomason joined #perl6
18:00 masak #masakism is now live.
18:02 FROGGS (and in color)
18:03 btyler joined #perl6
18:06 kaleem joined #perl6
18:07 Chillance joined #perl6
18:08 rindolf joined #perl6
18:09 risou_awy joined #perl6
18:10 nwc10 sorear: I *don't* know. I'm guessing/extrapolating from C, where one can make big arrays of char, which effectively gives a contiguous array of bytes within the object file
18:10 sorear nwc10: no such thing in java :(
18:11 benabik nio.ByteBuffer?
18:11 nwc10 OK. I said that I was guessing. Google suggested that there was a primative byte type. So I (wrongly) assumed that one could make arrays of it
18:11 nwc10 or at least, *usefully* make arrays
18:14 sorear you can make arrays of them...you just can't statically initialize them
18:14 nwc10 pants.
18:14 nwc10 Thanks for the explanation
18:29 sorear FYI, the Java source language syntax new byte[] { 1,2,3,4,5,6....} compiles down into  newarray;  { dup; push; push; store; } xx *
18:31 diakopter sorear: well, it's quite conceivable the JIT pre-allocates them inline somewhere
18:32 nwc10 sorear: thanks. That's useful to know. Sigh
18:35 sorear diakopter: see previous comment about wanting to prevent the class parser and JIT from having to spend time looking at megabytes of serialized data
18:36 nwc10 they aren't making this easy, are they?
18:36 TimToady obviously this can be solved by a level of indirection, which means you have to deal with cache coherency and an off-by-one error :)
18:36 TimToady but I repeat myself
18:37 nwc10 DRY violation!
18:37 TimToady people repeat DRY too often
18:38 masak people are not WET enough.
18:38 benabik THey do store strings, so you could have an init function that converts the string into a byte array.  :-/
18:42 sorear benabik: that's what's done now
18:42 sorear benabik: with Base64, and a concat function because JVM string literals are limited to 64k and we have multiple megs of data
18:43 nwc10 bother bother bother. This would be (fairly) easy in C
18:44 ssutch joined #perl6
18:44 benabik Well, you can probably do better than base64, since strings are unicode.  Although you probably can't use a full 256 because some would get interpreted as multibyte.
18:45 diakopter sorear: in moarvm, a specific set of deserialized compilation units can be cached to disk as a single memory block, with a list of offsets of pointers that would be relatively updated so the block can simply be mmap'd then the pointer offsets fixup'd
18:45 diakopter so it's already the machine's native layout
18:46 sorear benabik: maximum of 7.1646 bits of data per utf8-encoded byte
18:47 sorear it's not obvious to me how to achieve this maximum
18:47 sorear nor is it obvious that I want to try
18:47 diakopter sorear: see what I mean?
18:47 sorear what I'm planning to do is invert control: don't put the byte array in the class, put the class in the byte array
18:48 benabik May be relatively simple to define a base128 to at least gain that 7th bit of data.
18:49 arlinius joined #perl6
18:58 lizmat "Rakudo Perl. has had 12,646 commits made by 157 contributors  representing -5,096 lines of code"   OHLOH gets its wrong!  https://www.ohloh.net/p/rakudo
18:58 lizmat I mean, a negative number of lines of code???
18:58 lizmat mainly written in C ?
18:59 masak Perl 6 is so awesome it gets the work done in a *negative* number of lines of code!
18:59 lizmat nqp is mostly written in Java ?
18:59 masak and of course, if there's anything you'd want to write negative codes of, it's C.
18:59 masak lines*
19:02 flussence apparently it's 116% code and -21% comments with -208 blank lines
19:03 flussence I guess that says something about our code density and self-documenting code :)
19:03 masak for a grand total of 95%.
19:03 PerlJam Perl is magic, as usual  :)
19:03 * masak blames inflation
19:06 sorear :D
19:07 nwc10 has ohloh been told that some subdirectories are private, and got confused?
19:08 PerlJam Is there a way to call an optional sub without using a conditional?   sub foo (&s?) {  &s if ?&s }  # I'd like something that calls it if it's there, otherwise it continues without hiccup.  (Or at least something that doesn't mention &s twice)
19:09 moritz &s.?() maybe
19:09 PerlJam moritz: would that worked, it would be perfect :)
19:10 masak r: sub optionally-call(&f) { -> *@args { f(|@args) if defined &f } }; my &f = { say "OH HAI" }; my &g = Any; optionally-call(&f)(); optionally-call(&g); say "alive"
19:10 camelia rakudo b2072f: OUTPUT«Type check failed in assignment to '&g'; expected 'Callable' but got 'Any'␤  in block  at /tmp/6ssBT2K1NR:1␤␤»
19:10 masak r: sub optionally-call(&f) { -> *@args { f(|@args) if defined &f } }; my &f = { say "OH HAI" }; my &g = Callable; optionally-call(&f)(); optionally-call(&g); say "alive"
19:10 camelia rakudo b2072f: OUTPUT«OH HAI␤alive␤»
19:11 PerlJam yes, I can construct something that does what I want.  I was hoping there would be something built-in similar to the method call syntax like moritz suggested.
19:12 masak I don't know about anything built-in.
19:15 masak some 75 minutes in, #masakism is finally picking up some speed. a nice discussion going on.
19:16 flussence r: sub do-stuff(&h?) { try &h() }; do-stuff({ say 'blah' }); do-stuff();
19:16 camelia rakudo b2072f: OUTPUT«blah␤»
19:17 PerlJam oh!
19:17 PerlJam flussence++
19:18 ssutch try is an operator? or does it create an anonymous closure?
19:18 lizmat I was thinking something with postcircumfix:<?( )>
19:18 lizmat so you could do &h?(params)
19:19 masak lizmat: yes, me too.
19:19 moritz std: my &a; &a.?()
19:19 camelia std d4cc5ab: OUTPUT«ok 00:00 44m␤»
19:19 masak o.O
19:20 masak moritz: I honestly thought you were making the syntax up!
19:20 lizmat std: my &a; &a?()
19:20 camelia std d4cc5ab: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Confused at /tmp/ExdIFgQVcr line 1:â�¤------> [32mmy &a; &a[33mâ��[31m?()[0mâ�¤    expecting any of:â�¤  POSTâ�¤   feed_separatorâ�¤ infixâ�¤  infix or meta-infixâ�¤    infixed functionâ�¤       postcircumfixâ�¤  postfixâ�¤        postfix_prefix_meta_operatorâ�¤
19:20 camelia ..postop␤ statem…
19:20 lizmat too bad
19:21 masak r: my &foo; &foo.?()
19:21 camelia rakudo b2072f: OUTPUT«[31m===[0mSORRY![31m===[0m�Cannot use .? on a non-identifier method call�at /tmp/o3hjDt5GG1:1�------> [32mmy &foo; &foo.?()[33m�[31m<EOL>[0m�»
19:21 PerlJam another related weird want I have is a way to say  @array.push($foo) if ?$foo;  without mentioning $foo twice.
19:21 masak PerlJam: sounds like you keep wanting the Maybe monad!
19:22 flussence @array.push($foo // Nil)
19:22 PerlJam masak: it does, doesn't it.  I hadn't thought about it like that though
19:22 domidumont joined #perl6
19:22 flussence wait, should probably just be "or" there
19:23 lizmat .? is only for methods: S12:925
19:23 PerlJam flussence: I was trying to generalize a bit to  "do nothing if an arg is undefined, but other do whatever with the arg"
19:23 lizmat the way I understand it
19:23 PerlJam s/other/otherwise/
19:23 PerlJam lizmat: yep
19:23 flussence hm
19:24 flussence .oO( isn't that what andthen/orelse are supposedly for? )
19:24 masak lizmat: but .() is (sugar for) a method! :)
19:25 [Coke] rakudo: no and then;
19:25 camelia rakudo b2072f: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Undeclared routines:â�¤    and used at line 1. Did you mean '&rand', '&end', '&any'?â�¤    no used at line 1â�¤    then used at line 1â�¤â�¤Â»
19:27 tomyan joined #perl6
19:31 lizmat r: sub a (&c?) { say &c; &c() }; a()  # maybe we just need to define an "invoke()" in class Callable ?
19:31 camelia rakudo b2072f: OUTPUT«(Callable)␤invoke() not implemented in class 'Callable'␤  in sub a at /tmp/_7ogbbGFk1:1␤  in block  at /tmp/_7ogbbGFk1:1␤␤»
19:33 lizmat with some syntactic sugar  :-)
19:41 dalek rakudo-star-daily: c8c82f3 | coke++ | log/ (5 files):
19:41 dalek rakudo-star-daily: today (automated commit)
19:41 dalek rakudo-star-daily: review: https://github.com/coke/rakudo-star-daily/commit/c8c82f3001
19:42 jaldhar joined #perl6
19:49 [Coke] r: sub a (&c?) { say &c; c() } ; sub b {say "b"}; a(&b)
19:49 camelia rakudo b2072f: OUTPUT«sub b() { ... }␤b␤»
19:49 [Coke] I think your example should fail. just maybe not with that particular error message.
19:50 [Coke] (you're not passing in a c, so you're getting, what, a class ?)
19:50 [Coke] r: sub a (&c:D) { say &c; c() } ;  a()
19:50 camelia rakudo b2072f: OUTPUT«===SORRY!===␤invoke() not implemented in class 'QAST::Op'␤»
19:51 [Coke] there, that's a fun one.
19:51 [Coke] :)
19:52 Rotwang joined #perl6
19:52 diakopter r: sub (&c:c) {  }
19:52 camelia rakudo b2072f: OUTPUT«===SORRY!===␤invoke() not implemented in class 'QAST::Op'␤»
19:53 pmichaud r: sub a (&c?) { say &c.WHAT; };  a()
19:53 camelia rakudo b2072f: OUTPUT«(Callable)␤»
19:53 pmichaud it's an undefined Callable.
19:53 pmichaud r: say Callable.();
19:53 camelia rakudo b2072f: OUTPUT«invoke() not implemented in class 'Callable'␤  in block  at /tmp/eM9nQDuBqW:1␤␤»
19:54 diakopter pmichaud: the bug just above is compile-time, it seems
19:55 pmichaud not sure which bug
19:56 diakopter pmichaud: the one I was golfing for [Coke]
19:56 lizmat r: sub (&c:c) {  }  # I think diakopter meant this one
19:56 camelia rakudo b2072f: OUTPUT«===SORRY!===␤invoke() not implemented in class 'QAST::Op'␤»
19:56 pmichaud is :c even implemented?
19:56 lizmat of :D, doesn't make a difference in the error
19:57 pmichaud r: sub a (&c:D) { say &c.WHAT };
19:57 camelia rakudo b2072f: OUTPUT«===SORRY!===␤invoke() not implemented in class 'QAST::Op'␤»
19:57 pmichaud yeah, that looks like a compile-time bug.
19:57 lizmat r: sub a (&c:D) {} # golfed down even more
19:57 camelia rakudo b2072f: OUTPUT«===SORRY!===␤invoke() not implemented in class 'QAST::Op'␤»
19:57 pmichaud r: sub a($x:D) { say $x.WHAT }
19:57 camelia rakudo b2072f: OUTPUT«===SORRY!===␤invoke() not implemented in class 'QAST::Op'␤»
19:58 pmichaud but it doesn't seem to be limited to callables
19:58 pmichaud r: multi sub a($x:D) { say $x.WHAT }
19:58 camelia rakudo b2072f: OUTPUT«===SORRY!===␤invoke() not implemented in class 'QAST::Op'␤»
19:58 [Coke] .to pmichaud "did anyone know this syntax worked?"
19:58 yoleaux [Coke]: I'll pass your message to pmichaud.
19:59 pmichaud oh, yeah... that's not really the syntax, is it?
19:59 yoleaux 19:58Z <[Coke]> pmichaud: "did anyone know this syntax worked?"
20:00 pmichaud r: multi sub a(Callable:D \c) { say c.WHAT; }
20:00 camelia rakudo b2072f:  ( no output )
20:00 pmichaud r: sub a(Callable:D \c) { say c.WHAT; }
20:00 camelia rakudo b2072f:  ( no output )
20:00 pmichaud oops, gotta run.. bbl
20:04 lizmat S06:951 "[Conjecture: It might be possible for a routine to advertise multiple long names, delimited by single semicolons.  See S12 for details.]
20:04 lizmat I thought that idea was abandoned?
20:05 [Coke] r: sub a(Callable:D \c) { say c.WHAT; }; a(Callable);
20:05 camelia rakudo b2072f: OUTPUT«Parameter 'c' requires an instance, but a type object was passed␤  in sub a at /tmp/ZBn9rddmZd:1␤  in block  at /tmp/ZBn9rddmZd:1␤␤»
20:05 lizmat seem to recall asking something like this here, and moritz/masak claiming it was not going to happen
20:05 [Coke] I think that's where he was headed. Sorry about my confused syntax. ;)
20:13 lue hello world o/
20:13 lizmat hello lue!
20:17 xilo_ joined #perl6
20:19 sorear hello lue!
20:19 masak hellue!
20:19 masak lue: there's a #masakism going on if you're interested :)
20:20 masak 1h40m left of it.
20:20 lue I thought there was. :)
20:22 xilo_ joined #perl6
20:24 sorear what's #masakism?
20:24 * sorear is all antsy for jnthn to get back soon
20:24 masak sorear: it's a workshop.
20:24 masak people learn Perl 5 and Perl 6, solve a given set of task, win prizes, and talk about programming.
20:25 masak see http://strangelyconsistent.org/blog/after-the-masakism-workshop
20:30 SmokeMachine joined #perl6
20:31 colomon o/ # back from the Flint Children's Museum
20:32 lizmat r: my %a=a=>1; my $b=1; say %a<b> ~~ $b  # wonders whether this should warn (from #masakism)
20:33 camelia rakudo b2072f: OUTPUT«use of uninitialized value of type Any in numeric context  in block  at /tmp/hXHD2KUUqe:1␤␤False␤»
20:33 colomon yes it should
20:33 lizmat r: my %a=a=>1; my $b; say %a<b> ~~ $b  # doesn't warn
20:33 camelia rakudo b2072f: OUTPUT«True␤»
20:34 colomon huh
20:34 TimToady in general, using $variable.ACCEPTS is a recipe for pain; this is just an instance of that
20:35 TimToady smartmatching is most for letting constants do .ACCEPTS
20:36 TimToady *mostly
20:38 sorear o/ colomon
20:38 lizmat r: multi a (0;1;2) { say "0 or 1 or 2" }; a(1)  # this should work according to S12:1311, right?
20:38 camelia rakudo b2072f: OUTPUT«===SORRY!===␤CHECK FAILED:␤Calling 'a' will never work with argument types (int) (lines 1, 1)␤    Expected any of:␤    :(Int , Int , Int )␤»
20:39 colomon \o sorear
20:41 lizmat r: multi a (0);(1);(2) { say "0 or 1 or 2" }; a(1) # or should it be like this, or is this all obsolete ?
20:41 camelia rakudo b2072f: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Missing blockâ�¤at /tmp/QSOxuarRp3:1â�¤------> [32mmulti a (0)[33mâ��[31m;(1);(2) { say "0 or 1 or 2" }; a(1) # o[0mâ�¤    expecting any of:â�¤        statement listâ�¤        prefix or termâ�¤        prefix or meta-prefixâ�¤        new name to b…
20:42 colomon lizmat: "Note: This single-semicolon syntax is merely to be considered reserved until we understand the semantics of it, and more importantly, the pragmatics of it (that is, whether it has any valid use case). Until then only the double-semicolon form will be implemented in the standard language.]"
20:43 lizmat ok, but still not clear on which syntax is being reserved here  :-)
20:43 lizmat (0;1;2) or (0);(1);(2)  ?
20:43 PerlJam lizmat: multi a (0;1;2) { ... }  # this one
20:44 PerlJam (as I read it)
20:44 lizmat I guess the main problem with multi a (0;1;2) would be that inside the sub you wouldn't know which value was passed
20:55 xilo_ joined #perl6
20:56 lizmat r: my $a; say $a ~~ 1 #OK  # should the #OK surpress the warnings?
20:56 camelia rakudo b2072f: OUTPUT«use of uninitialized value of type Any in numeric context  in block  at /tmp/trWvQ1PQGa:1␤␤False␤»
20:56 snearch joined #perl6
20:57 * lizmat is confused, as nothing like #OK is specced, it seems
20:58 sorear jnthn! :D
20:58 jnthn o/
20:58 xilo_ joined #perl6
20:58 sorear jnthn: https://gist.github.com/sorear/5804522
21:00 jnthn o.O
21:00 jnthn sorear++
21:00 jnthn Nice work!
21:00 jnthn t/01-sanity/99-test-basic.t ........ ok
21:00 jnthn That one is nice. :)
21:00 jnthn huh, the more basic tests are failing and the more complicated ones are passing :P
21:03 FROGGS hi jnthn
21:03 jnthn o/ FROGGS
21:03 FROGGS r: say 10 ~~ /(\d+)/
21:03 camelia rakudo b2072f: OUTPUT«「10」␤ 0 => 「10」␤␤»
21:03 FROGGS r: say 10 ~~ m:P5/(\d+)/
21:03 camelia rakudo b2072f: OUTPUT«「10」␤ 0 => 「10」␤␤»
21:03 FROGGS hmmm
21:04 FROGGS jnthn: how was RL?
21:04 jnthn FROGGS: Um, surprisingly like work :P
21:04 jnthn Also I spent a bunch of it sick.
21:05 FROGGS ohh, I hope you are well again
21:05 jnthn Turns out teaching in a morning when your stomach ain't up to drinking coffee is...challenging...
21:05 sorear Only one ++ for those passing tests? :( :P
21:05 FROGGS sorear++ # :o)
21:05 masak sorear++ sorear++ sorear++
21:05 xilo_ joined #perl6
21:05 masak greedy bastard :P
21:06 FROGGS sorear++? <-- would that be non-greedy karma?
21:06 jnthn sorear: Does the "use v6" thing Just Work now?
21:06 * jnthn is gonna have to see the commit logs :)
21:06 sorear jnthn: Yes
21:06 jnthn \o/
21:06 jnthn Which means gather/take must be working nicely. \o/
21:07 jnthn sorear++ for that :)
21:07 sorear gather/take is working nicely
21:07 sorear also I had to fix a bug in the multi cache
21:07 sorear I ran into a lot of bugs, really
21:08 jnthn Not surprised; I did cheat plenty here and there :)
21:08 jnthn Lemme guess...the multi cache one was missing decont stuff?
21:08 * jnthn knows that this was missing in various places...
21:08 sorear jnthn: Yeah, decont
21:08 masak sorear: I would just like to tell you that you are awesome.
21:09 masak and that I'm happy to see you being awesome in the vicinity of Rakudo-JVM :)
21:09 jnthn Anyway, happy you ran into bugs rather than deep systemic project-halting fail :)
21:10 jnthn Also, that the NQP JVM / Rakudo JVM code is apparently penetrable. :D
21:10 sorear jnthn: It created a single cache entry for (Scalar,Scalar) -> &something and then I got lots of interesting secondary crashes
21:10 jnthn Yes, that would be interesting ;)
21:10 sorear 1..N was pretty deeply broken, too
21:11 jnthn I was aware of that one. iirc, 'cus postcircumfix:<( )> was broken and cmp depends on it.
21:11 sorear I fixed postcircumfix:<( )>
21:12 sorear actually an nqp bug: the invoke handler was being called without the invokee argument
21:12 jnthn Something funky with invocatin protocol, I'm guessing?
21:12 jnthn Ah
21:12 sorear so Order.(1) was sort of acting like 1()
21:12 jnthn yeah
21:12 sorear once I had postcircumfix:<( )> working, I had to add subsignatures to the binder
21:12 jnthn Seems you've discovered and dealt with lots of my "oh, I'll do that later"
21:13 sorear fail was another bit of fun.  it wants to manipulate Lexotics as values, which was a problem until the other day because they had null STables...
21:13 jnthn yup, that'd be another one of 'em. CodeRef used to be the same :)
21:14 * jnthn pulls/builds :D
21:14 * pmichaud wants more tuits.
21:14 jnthn I'm hoping to be useful for Perl 6 stuff again soon. It may be as soon as tomorrow. We'll see.
21:15 lizmat pmichaud: just tell woolfy where to send them
21:15 [Coke] jnthn: good luck catching up with sorear. :)
21:15 [Coke] lizmat++
21:15 pmichaud lizmat: I mean tuits as in "able to make commits" kind of tuits.  :)
21:15 pmichaud I have plenty of the wooden kind at the moment.  :)
21:15 sorear jnthn: pmichaud++ gave me a commit bit, so everything you need is in the main rakudo repo
21:15 woolfy pmichaud: but, but, I want to send hundreds more to you!
21:16 jnthn [Coke]: I suspect sorear++ has done everything sanely enough that it won't be hard for me to dig back in. :)
21:16 dalek nqp: 8527f8b | sorear++ | src/vm/jvm/ (2 files):
21:16 dalek nqp: Add a bit of metadata to query the entry-point block for a compunit at runtime
21:16 dalek nqp: review: https://github.com/perl6/nqp/commit/8527f8bc9b
21:16 dalek nqp: 64ea085 | sorear++ | src/vm/jvm/runtime/org/perl6/nqp/runtime/ContextKey.java:
21:16 dalek nqp: Fix comment thinko
21:16 dalek nqp: review: https://github.com/perl6/nqp/commit/64ea08500c
21:16 dalek nqp: 1406a72 | sorear++ | src/vm/jvm/ (4 files):
21:16 lizmat actually, if anybody wants the wooden ones to give away, please let woolfy know
21:16 dalek nqp: Encapsulate stdio and System.exit into the GlobalContext
21:16 dalek nqp: review: https://github.com/perl6/nqp/commit/1406a7210b
21:16 pmichaud woolfy: btw, thanks to your information the robotics teams are planning to have wooden nickels to give out at contests :)
21:16 pmichaud we're already working on the designs :) :)
21:17 woolfy nice!!!
21:17 pmichaud I showed the Perl tuits to a couple of the team members and they were like "Cool!  Can we get those for our team?"
21:17 woolfy I am sure the people at the Old Time Wooden Nickel Co are pleased with your business.
21:18 pmichaud I suspect they're more pleased with yours.  :) :)
21:18 pmichaud I wonder if you can get a referral credit.
21:18 woolfy The biggest problem they have is finding staff to fulfill all the orders.
21:18 pmichaud I'll have to check.
21:18 pmichaud anyway, I have to run off again -- bbl
21:18 sorear jnthn: one disruptive thing that I want to bounce off of you... I'd like to change the bytecode format to be a very simple container of [Java bytecode, serialized blob] so that ClassLoader doesn't have to waste any cycles staring at giant string literals
21:18 woolfy pmichaud++
21:18 sorear jnthn: Of course then the --target=classfile output is no longer a classfile, so it probably needs to be renamed... which would break all the downstream build scripts...
21:18 jnthn sorear: Well, if we do that we can get rid of the base64-ness of the blob too
21:19 jnthn sorear: I think it'd be nice if we could still produce classfiles
21:19 jnthn sorear: But it doesn't have to be the *only* way.
21:19 * jnthn ponders
21:20 jnthn I did consider the container file approach and had hoped to not need to do that.
21:20 benabik That's a lot of depreciation warnings from panda.  O.o
21:20 jnthn But if it's the thing that is mostly to blame for startup time...well...may not be a lot of choice...
21:22 jnthn sorear: Do you have some numbers/profile stuff to show that the serialized blob going in as a string is notably expensive?
21:22 sorear I don't know, and I've gotten to the point where the only way to tell if it makes a difference is "try it and see"
21:22 jnthn ah, ok
21:23 sorear jnthn: I have profile stuff that shows that we spend a lot of time in defineClass and getDeclaredConstructors (which is presumably doing some lazy class parsing, because there's no way a reflective instantiation should take one second by itself)
21:23 ssutch is there a trait to make the default constructor of an object puke if a certain attribute is not provided to it?
21:24 jnthn sorear: ah, ok
21:24 sorear jnthn: base64 decoding and list_b construction take enough time to be easily measured, but don't seem to dominate the profile.
21:25 jnthn sorear: Well, we already run nqp and rakudo through wrapper scripts, so I guess it doesn't matter exactly what they do
21:25 jnthn sorear: One thought though: a JAR file is really just a ZIP, and a JVM knows how to run one of those directly.
21:25 sorear jnthn: nqp.class and perl6.class can stay as pure classfiles, everything else is loaded by nqp::loadbytecode
21:26 jnthn sorear: I wonder if a JAR file can have extra "resources" shoved into it
21:26 sorear jnthn: Yes, they can, and that's even the word they use.
21:26 benabik Yes, although I don't recall how to access them.
21:26 sorear getClass().getResourceAsStream(...)
21:26 jnthn sorear: That way we don't have to invent our own container, and we can have --target=jar, and you can run those as java -jar ... or so
21:26 jnthn sorear: So it'd be rather undisruptive, I suspect.
21:27 jnthn sorear: If that's workable, it'd be my preferred approach.
21:27 flussence minecraft already does that, fwiw - all the texture files are in the .jar
21:27 davidagain joined #perl6
21:28 sorear Yeah
21:28 PerlJam ssutch: you could do something like class C { has $.a = !!!; } which will die if a is not supplied to new
21:28 ssutch PerlJam what is !!! ?
21:28 sorear I'd also like to design the system so that you can combine everything into one jar and it will work sanely
21:28 [Coke] placeholder code that explodes if you run it.
21:29 jnthn sorear: +1
21:29 [Coke] r: class C { has $.a = !!!; };
21:29 camelia rakudo b2072f:  ( no output )
21:29 [Coke] r: class C { has $.a = !!!; }; C.new.perl.say
21:29 camelia rakudo b2072f: OUTPUT«Stub code executed␤  in method  at /tmp/JDNeyNA6jj:1␤  in block  at src/gen/CORE.setting:798␤  in method BUILDALL at src/gen/CORE.setting:753␤  in method bless at src/gen/CORE.setting:743␤  in method new at src/gen/CORE.setting:728␤  in method new at src/gen/CORE.s…
21:29 jnthn sorear: I'd had that as a medium term goal, but if we get it short term, that's great :)
21:29 PerlJam ssutch: see S06:450
21:30 benabik r: class C { has $.a = !!! 'no $.a provided'; }; C.new
21:30 camelia rakudo b2072f: OUTPUT«no $.a provided␤  in method  at /tmp/I37rNJMLaz:1␤  in block  at src/gen/CORE.setting:798␤  in method BUILDALL at src/gen/CORE.setting:753␤  in method bless at src/gen/CORE.setting:743␤  in method new at src/gen/CORE.setting:728␤  in method new at src/gen/CORE.sett…
21:30 sorear Much later I'm going to experiment with NQP_NO_INDY=1, because pack200 is really spiff but doesn't much like 1.7-format class files
21:30 jnthn Aww, seems stage parse got slower somewhere along the way.
21:30 benabik ssutch: You can even provide messages like !!! 'needed a foo'
21:31 sorear (there's probably a better way then %*ENV for passing odds and ends into the code generator)
21:31 ssutch interesting, thanks guys
21:31 jnthn 33s last time I remember, 38s now. Not a huge deal, though curious which change did it. :)
21:31 jnthn *changes
21:32 flussence rn: class C { has $.a; multi method new(:$a!, *%_) { !!! }; multi method new(*%_) { self.bless(*, %_) } }; C.new().say
21:32 ssutch is there a way to express dependency, eg "if this parameter is required, this other one doesn't have to be" or should i just override .new
21:32 camelia niecza v24-79-gcb6f20b: OUTPUT«Potential difficulties:â�¤  $a is declared but not used at /tmp/zxcxouKZHs line 1:â�¤------> [32mclass C { has $.a; multi method new(:[33mâ��[31m$a!, *%_) { !!! }; multi method new(*%_)[0mâ�¤â�¤Unhandled exception: Excess arguments to Mu.bless, used 2 of 3 posit…
21:32 camelia ..rakudo b2072f: OUTPUT«C.new(a => Any)␤»
21:32 flussence n: class C { has $.a; multi method new(:$a!, *%_) { !!! "be quiet, $a." }; multi method new(*%_) { self.bless(*, %_) } }; C.new().say
21:32 camelia niecza v24-79-gcb6f20b: OUTPUT«Unhandled exception: Excess arguments to Mu.bless, used 2 of 3 positionals␤  at /home/p6eval/niecza/lib/CORE.setting line 0 (Mu.bless @ 1) ␤  at /tmp/3qO97fT5CK line 1 (C.new @ 4) ␤  at /tmp/3qO97fT5CK line 1 (mainline @ 5) ␤  at /home/p6eval/niecza/lib/CO…
21:33 flussence I would've expected that to hit the !!! at some point
21:33 sorear jnthn: also, something I discovered while profile
21:33 sorear jnthn: you know how startup uses nearly two cores, and you blamed it on parallel/concurrent GC?
21:33 fgomez joined #perl6
21:33 jnthn sorear: That was my first guess
21:34 sorear It's actually background "JIT" compilation.
21:34 jnthn sorear: What is it really?
21:34 jnthn Oh!
21:34 sorear If you use -Xint or -Xbatch user ~= wall
21:34 jnthn Well, that's a reasonable enough use of another core :)
21:35 davidagain r: !!! or die;
21:35 camelia rakudo b2072f: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Undeclared routine:â�¤    or used at line 1â�¤â�¤Â»
21:35 benabik star: use JSON::Tiny; say from-json('1') # bug, or are bare numbers invalid JSON?
21:35 camelia star 2013.02: OUTPUT«Any()␤»
21:36 geekosaur bare numbers are technically invalid
21:36 ssutch bare numbers are invalid
21:36 geekosaur the top level thing must be a container (array or record)
21:36 ssutch a lot of json parsers will be quiet
21:36 sorear jnthn: The uncommitted stuff I'm working on now is an implementation of the "run the test suite in a single JVM" concept we discussed earlier.
21:37 geekosaur although in that case it probably ought to return some kind of delayed? exception
21:39 [Coke] sorear: I would appreciate it the runner that lives in t/spec still worked.
21:39 [Coke] (that's what I use for the daily runs.()
21:40 [Coke] (even if it's a slower to do it that way and it's faster to do an all in one invocation via some other method.)
21:43 sorear [Coke]: t/harness ?
21:43 sorear I was going to add JVM support to t/harness
21:43 twigel joined #perl6
21:44 sorear and make a small extension to fudge to support an implementation name like "rakudo.jvm" and then have both #?todo rakudo and #?todo rakudo.jvm
21:45 sorear (semantically, todo $foo becomes $impl =~ /^\Q$foo\E(?:$|\.)/)
21:47 [Coke] roast's test_summary
21:47 [Coke] as long as that still works.
21:49 sorear ok.
21:50 dalek nqp: e983565 | jnthn++ | src/vm/jvm/runtime/org/perl6/nqp/runtime/Ops.java:
21:50 dalek nqp: Fix nqp::pow_I argument order.
21:50 dalek nqp:
21:50 dalek nqp: Unbusts 02-math.t for Rakudo JVM.
21:50 dalek nqp: review: https://github.com/perl6/nqp/commit/e983565eba
21:50 ssutch how do i call the base constructor from new? is it just self.bless(param => $val, pram2 => $val2)
21:51 jnthn ssutch: You probably want to be calling .bless
21:51 jnthn ssutch: But if you do want to call the base constructor, use callwith(...)
21:51 jnthn or callsame to pass exactly the same args
21:54 ssutch r: class F { has $.val; }; class G is F { method new (:$val) { self.bless(*, val => $val); } }; say G.new(val=>'myval');
21:54 camelia rakudo b2072f: OUTPUT«G.new(val => "myval")␤»
21:54 ssutch is that right?
21:54 lue r: say (41.0).round(5)
21:54 camelia rakudo b2072f: OUTPUT«40␤»
21:54 lue r: say (41).round(5) # round doesn't like Ints
21:54 camelia rakudo b2072f: OUTPUT«Too many positional parameters passed; got 2 but expected 1␤  in method round at src/gen/CORE.setting:3351␤  in block  at /tmp/84eQ6fZ1ka:1␤␤»
22:02 masak r: say 41.round
22:02 camelia rakudo b2072f: OUTPUT«41␤»
22:03 masak lue: seems the Rat version takes an optional parameter, but the Int version doesn't.
22:03 masak lue: plz file a rakudobug :)
22:03 * lue does so
22:04 masak lue++
22:04 masak was that a #masakism-induced rakudobug? I suppose it was.
22:04 dalek nqp: 99437d4 | jnthn++ | src/vm/jvm/QAST/Compiler.nqp:
22:04 dalek nqp: Fix nqp::xor code-gen thinko.
22:04 dalek nqp:
22:04 dalek nqp: Fixes 03-op-logic.t in Rakudo JVM sanity tests.
22:04 dalek nqp: review: https://github.com/perl6/nqp/commit/99437d4bfc
22:05 lue Yes. Yes it was. (I ended up doing something that didn't need to round whole integers to tens or hundreds, but still)
22:05 bruges joined #perl6
22:06 [Coke] ... that didn't take long. :)
22:06 [Coke] (jnthn commiting again)
22:06 jnthn sorear: Seems I fixed 06-op-inplace.t by accident too
22:06 jnthn sorear: So, 3 more down...
22:08 ponbiki joined #perl6
22:10 risou_awy joined #perl6
22:10 xilo_ joined #perl6
22:10 tomyan joined #perl6
22:13 davidagain r: ...
22:13 camelia rakudo b2072f: OUTPUT«Stub code executed␤current instr.: 'throw' pc 347557 (src/gen/CORE.setting.pir:151689) (src/gen/CORE.setting:8887)␤called from Sub 'sink' pc 379739 (src/gen/CORE.setting.pir:164183) (src/gen/CORE.setting:10169)␤called from Sub 'MAIN' pc 381 (src/gen/perl6.pir:147) …
22:14 xilo_ joined #perl6
22:16 sorear jnthn: yay! jnthn++
22:20 dalek nqp: 675a069 | jnthn++ | src/vm/jvm/runtime/org/perl6/nqp/runtime/Ops.java:
22:20 dalek nqp: Implement nqp::getlex* ops.
22:20 dalek nqp:
22:20 dalek nqp: Gets first test of Rakudo JVM 10-regex.t passing.
22:20 dalek nqp: review: https://github.com/perl6/nqp/commit/675a069ed9
22:24 skids joined #perl6
22:25 rindolf joined #perl6
22:26 dalek rakudo/nom: cd1b750 | jnthn++ | t/00-parrot/10-regex.t:
22:26 dalek rakudo/nom: Fix test to emit ~$/, not $/, into TAP.
22:26 dalek rakudo/nom:
22:26 dalek rakudo/nom: The .gist meant the perfect quotes got emitted into the TAP output,
22:26 dalek rakudo/nom: which for some reasons seems not to have confused things, but was not
22:26 dalek rakudo/nom: intentional.
22:26 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/cd1b750678
22:29 jaldhar joined #perl6
22:35 timotimo tadzik: will you add fix-copy into panda for the star release or is there a better approach? (replacing Find::Result with IO::Path?)
22:37 ssutch how do i check a parameter (:$param?) for whether it was provided, rather than its falseyness?
22:37 sorear jnthn: do you agree with what I did to 09-pir.t?
22:37 jnthn lemme check
22:38 jnthn sorear: yes, that looks just right
22:38 timotimo ssutch: .defined will work
22:38 jnthn ssutch: Checking definedness rather than truthiness is usually enough
22:39 arlinius joined #perl6
22:40 ssutch if (!$constant.defined && !$sub-message.defined) || ($constant.defined && $sub-message.defined) { die "either constant OR sub-message must be provided"; }
22:42 ssutch seems good enough, if not pretty :)
22:42 ssutch thanks!
22:43 cognominal joined #perl6
22:44 sorear bah, I must've missed a global
22:44 xenoterracide|2 joined #perl6
22:44 sorear eval server only works properly the first time :|
22:45 * jnthn tried to keep the number of those pretty close to zero...
22:45 jnthn You already fixed the leak in the Rakudo binder that I was aware of
22:46 jnthn There's the statics in Rakudo.Ops. I wonder if theu are to blame.
22:46 jnthn *they
22:46 sorear jnthn: I got rid of those already, and the current testing is with nqp
22:46 sorear something in nqp itself is being global when it shouldn't be
22:46 jnthn ah, ok
22:46 sorear ohhhh I think I know
22:47 sorear we can't share classes between globalcontexts because each indy site is a global
22:47 sorear ModuleLoader takes some care to separate classes by globalcontext
22:47 sorear but nqp.class is being loaded by Class.forName because I wasn't thiniking straight
22:48 jnthn ah
22:48 sorear s/ModuleLoader/LibraryLoader/
22:49 timotimo jnthn: welcome back :)
22:49 jnthn o/ timotimo :)
22:49 * jnthn wasn't planning to hack on anything tonight, but is finding it somewhat theraputic.
22:50 sorear jnthn: which tests are left?
22:51 jnthn 01-literal.t (not looked into that too deeply yet), 10-regex.t (digging on that now, first 2 tests pass) and 07-op-string.t (needs the bitwise string ops implementing)
22:52 jnthn oh, and I think 99-test-basic.t doesn't pass here
22:52 jnthn Didn't look into that yet
22:52 masak jnthn++ sorear++ # dynamic duo
22:52 jnthn Just having to build a Rakudo Parrot to cross-check something in Cursor
22:52 timotimo error:imcc:loadlib directive could not find library `perl6_group' - nooooooooooooooooo
22:52 timotimo on my other machine as well ;_;
22:53 timotimo how do i cope without a debugger? :/
22:54 jnthn Apart from...the Rakudo on Parrot hangs o.O
22:55 jnthn timotimo: What's giving you that error?
22:55 timotimo panda install Rakudo::Debugger
22:55 jnthn hmm
22:55 timotimo https://gist.github.com/timo/ae01090a2fb84dc47fc0
22:55 jnthn Could it be picking up a wrong nqp in the path?
22:55 jnthn I'm not sure what the panda build looks like...
22:57 sorear after changing from Class.forName to bytecode magic, I uh...
22:57 sorear tried to load a shell script as a class
22:57 sorear the JVM was not amused
22:57 jnthn hehe
22:58 jnthn Hm, the Rakudo on Parrot still hangs :(
22:58 * jnthn tries building a latest NQP Parrot too
22:59 stevan_ joined #perl6
22:59 cooper joined #perl6
22:59 cooper joined #perl6
22:59 sorear https://gist.github.com/sorear/5818880
23:00 masak oh, you got a MacBook Air. good for you. :)
23:01 masak I'm guessing it's quite a lot faster than your previous machine. :)
23:01 sorear masak: didn't you see it at the hackathon?
23:01 jnthn That's faster :)
23:01 jnthn sorear++
23:01 dalek nqp: 44e8b94 | sorear++ | / (3 files):
23:01 dalek nqp: Preliminary eval server stuff.  Load the JVM once and then run your program several times, isolated in a globalcontext.
23:01 dalek nqp: review: https://github.com/perl6/nqp/commit/44e8b948a0
23:02 sorear It'll be much more faster after I implement class sharing
23:02 jnthn Now I'm *really* glad I did the GlobalContext thign :)
23:02 jnthn *thing
23:02 sorear Right now we can't reuse JITed method between runs, because the entire class has to be thrown away, because of the indy sites
23:02 masak sorear: I must've, but I didn't really connect the dots, I guess.
23:03 jnthn Moar is designed in the same way, fwiw. Though we shouldn't have the startup time worries there :)
23:03 sorear So I'm going to create a mode where indy stuff is slightly pessimized (WVal becomes a bit of pointer chasing instead of a true constant), but we can reuse classes
23:03 sorear it'll be enabled in the eval server, disabled in CompilationUnit.enterFromMain, and other hosts can do whatever they want
23:04 jnthn +1
23:04 jnthn darn. Rakudo Parrot still hangs on startup. Is anybody else seeing this on current nom HEAD?
23:05 sorear I spectested yesterday before pushing my jvm changes
23:05 sorear it's either very new or specific to your setup
23:05 sorear with --gen-nqp; I didn't test rakudo parrot on HEAD nqp
23:06 sorear btw, this is "token":
23:06 sorear Stefans-MacBook-Air:nqp-jvm sorear$ cat token
23:06 sorear 54550 ggTKqSth5JE+Apwd2hcZbQ==
23:07 jnthn aha
23:07 * jnthn wondered what the token thing was :)
23:07 sorear the sanest way to do IPC is local TCP, but that's insecure without additional measures
23:08 sorear eval-client.pl connects to the port and passes the cookie
23:08 sorear and the file is created mode 600 so other users on a unix system can't read it
23:08 sorear I'm not 100% sure Windows Java will do something sane with the permission-set request
23:09 sorear I think Windows defaults files to readable-by-owner-only, so it's fine if it's just ignored
23:09 sorear (the unix default is writable-owner readable-everyone)
23:11 geekosaur strictly speaking, the unix default is writable-all, but most login setups force a umask that isn't 0
23:13 sorear jnthn: I count 11 callsites in IndyBootstrap, of which 6 are used currently.  Should the others be culled?
23:14 * sorear is about to add another version of wval_noa that takes a CompilationUnit and an int
23:16 jnthn sorear: I think I kept them around because stage0 still used them.
23:16 jnthn sorear: But a rebootstrap may have already changed that by now
23:21 xilo_ joined #perl6
23:22 jnthn Well, it appears the line that hangs is my $CWD = nqp::p6box_s(pir::new__PS('OS').cwd).path;
23:23 sorear nqp::wval?  what's that used for
23:26 jnthn sorear: I'm not convinced it actually is used...
23:27 stevan_ joined #perl6
23:28 * sorear is diving into the SC code with only a foggy idea how it works
23:29 jnthn r: IO::Spec::Win32.split('C:\consulting\rakudo')
23:29 camelia rakudo b2072f:  ( no output )
23:29 jnthn r: say IO::Spec::Win32.split('C:\consulting\rakudo')
23:29 camelia rakudo b2072f: OUTPUT«"volume" => "C:" "directory" => "\\consulting" "basename" => "rakudo"␤»
23:29 sorear I am making an assumption now that there is at most one SC per CompilationUnit and that all QAST::WVal nodes will point at the same SC
23:29 sorear or, hmm.
23:30 jnthn Well, there is one SC per compilation unit, but a QAST::WVal node may point to an object from some other SC
23:30 jnthn Otherwise you couldn't reference objects from other modules
23:30 sorear Oh
23:30 jnthn Note that wval indy thing, iirc, gets passed the tc
23:30 jnthn From which you can find the gc
23:30 jnthn Maybe that helps separate things out?
23:30 sorear I thought that added a reference into the current SC
23:30 jnthn No
23:31 jnthn That's why wval takes two things: an SC handle and an index.
23:32 sorear I'm going to replace the SC handle with a small integer, because strings are no good for runtime pointer chasing
23:32 jnthn I assume you're going to have a lookup table somewhere else?
23:33 jnthn That maps those to the actual handles?
23:34 jnthn The point of the indy stuff here was that it didn't matter it was a string, as we'd only have to resolve it once.
23:34 sorear yeah
23:34 sorear hanging off the runtime CompilationUnit
23:35 lue blag toast (after a long time)!    https://rdstar.wordpress.com/2013/06/19/a-new-perl-6-major-mode-for-emacs-in-progress/
23:36 masak heh, lue++
23:36 sorear What triggers the addition of objects to a SC being built?
23:37 benabik joined #perl6
23:38 jnthn HLL::World has an add_object method
23:38 jnthn Anything to be referenced by a QAST::WVal will have had that called on it at some point
23:38 jnthn Tracked down the hang, sort of
23:38 jnthn It's in IO::Spec::Win32.path
23:38 jnthn uh
23:38 jnthn It's in IO::Spec::Win32.split
23:39 masak jnthn: at runtime?
23:40 xilo_ joined #perl6
23:40 jnthn masak: At startup, in terms.pm, we end up hitting that
23:40 jnthn And it hangs
23:40 jnthn Which means Rakudo hangs at startup on Windows at present :(
23:41 masak jnthn: my bet is on the second regex match in that method, the m// one that spans a few lines.
23:42 masak it has enough quantifiers and stuff to make it suspect.
23:42 jnthn Will know which line it is soon
23:45 jnthn masak: appears so
23:48 jnthn r: say IO::Spec::Win32
23:48 camelia rakudo b2072f: OUTPUT«(IO::Spec::Win32)␤»
23:48 jnthn r: say IO::Spec::Win32.split(q[C:\consulting\rakudo])
23:48 camelia rakudo b2072f: OUTPUT«"volume" => "C:" "directory" => "\\consulting" "basename" => "rakudo"␤»
23:49 jnthn But...it gets it instantly there.
23:50 btyler joined #perl6
23:51 masak jnthn: I was right? heh.
23:52 jnthn masak: about the line, yeah. But...I'm not sure what's going on :/
23:53 masak hm, it's on Parrot, so it's not likely to be a regex engine bug...
23:53 masak and yeah, it's weird that the above p6eval^Wcamelia oneliner doesn't similarly hang.
23:53 masak what's different?
23:55 jnthn No idea
23:57 [particle]1 joined #perl6

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

Perl 6 | Reference Documentation | Rakudo