»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg camelia perl6: ... | irclog: irc.perl6.org/ | UTF-8 is our friend!
Set by moritz on 3 May 2013.
timotimo huh. 00:00
the line that makes it asplode is apparently get-local-timezone-offset ... ?! 00:03
that makes no sense to me at all now. 00:07
00:08 tgt left, tgt joined
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
like %=pod<table>?
oh, huh! 00:20
reify has a / in it that apparently div's by 0!
dalek p: 668a79f | sorear++ | src/vm/jvm/ (9 files):
Give Lexotic a proper REPR and STable so that &fail can manipulate them without crashing
00:23
timotimo sorear: you make it feel like rakudo-jvm is advancing at a very nice pace :) 00:24
00:28 risou is now known as risou_awy
timotimo commute& 00:30
00:30 Chillance left
timotimo entirely baffled by the division by zero in reify 00:35
in reify of MapIter 00:37
00:37 potatogim left
timotimo i tried adding a check for $argc to equal zero but that did not seem to help 00:37
00:38 potatogim joined
timotimo i should perhaps let it tell me what exactly argc is 00:40
it may be something entirely out there 00:41
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:42
timotimo you can wrote multi infix:<eq>(Mine $a, $b) 00:43
ssutch cool 00:44
does Mine point to the current class, then? does it apply to both arguments? 00:45
timotimo no
Mine was metasyntactic like Foo and bar
00:45 potatogim is now known as potatogim_
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
ssutch thanks 00:46
timotimo i am typing this on my phone :)
00:46 potatogim_ is now known as potatogim
ssutch aha 00:46
timotimo so i am slow and imprecise 00:47
normally you can use $?CLASS, but that syntax is not allowed there 00:48
$foo where $?CLASS might work. but you should define the operator outside of the class
sorear is t/02-rakudo/dump.t ... supposed to have a plan? 00:49
timotimo walk&
sorear gist.github.com/sorear/5804522/revisions 00:50
other stuff& 00:51
timotimo hells yeah :) 00:52
holy..... what 00:58
Wi-Fi reception like 200 meters away from my home 00:59
ssutch r: gist.github.com/samuraisam/5810892
camelia rakudo b2072f: OUTPUT«===SORRY!===␤Type 'PB::SubMsg' is not declared␤at /tmp/wS6sy3DLHK:4␤------> has PB::SubMsg⏏ $.sub-message;␤Malformed has␤at /tmp/wS6sy3DLHK:4␤------> has PB::⏏SubMsg $.sub-message;␤ expecting any of…
00:59 jaldhar joined
ssutch r: gist.github.com/samuraisam/5810892 01:00
camelia rakudo b2072f: OUTPUT«(Any)␤»
ssutch hrm, i must be misunderstanding something here (about the eq operator, and the custom implementations thereof)
shouldn't $o and $oo in this case be considered the same 01:01
timotimo r: gist.github.com/timo/5810910 01:03
camelia rakudo b2072f: OUTPUT«my custom eq is being used␤(Any)␤»
timotimo not sure about the precedence of eq and &&
r: gist.github.com/timo/5810910
camelia rakudo b2072f: OUTPUT«my custom eq is being used␤(Any)␤»
sorear eq is tighter 01:04
it's the same precence as ==
and == is tighter than && in C
timotimo r: my $foo; my $bar; say $foo eq $bar;
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␤»
timotimo oh 01:05
ssutch: it's simple. your .constant will return an undefined Any, which is falsy
r: gist.github.com/timo/5810910
camelia rakudo b2072f: OUTPUT«my custom eq is being used␤True␤»
timotimo maybe this is closer to your intended logic? 01:06
ssutch yes i think you're right
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
hold on.
r: gist.github.com/timo/5810910
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␤»
timotimo er, whoopsie
here i dorked up the precedences i'm sure. 01:08
r: gist.github.com/timo/5810910
camelia rakudo b2072f: OUTPUT«my custom eq is being used␤True␤»
01:08 cooper joined
timotimo r: 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 - ␤»
timotimo r: gist.github.com/timo/5810910 01:10
camelia rakudo b2072f: OUTPUT«1..3␤ok 1 - ␤ok 2 - ␤ok 3 - ␤»
sorear merges his jvm changes with the last week's rakudo changes and starts a Parrot spectest run before pushing
gfldex you could has Bool $.constant;# and (maybe) default it to false
timotimo if that's what $.constant means, sure
but look at the gist method, it seems like constant can be a value
ssutch constant is a string, num, PB::Ident, etc. 01:11
what does $a.constant // "" do?
coerce an empty value to an empty string?
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
ssutch ah, ok
that is a little bit prettier
timotimo sorear: not sure what you mean? 01:13
you can just git clone the parrot and nqp folder
and it will hardlink
could even bindmount for the parrot folder :P
01:14 jaldhar left
ssutch is there a benefit to using // over || 01:15
gfldex r: my $constant but False; say ?$constant; $constant = "SomeText"; say ?$constant;
camelia rakudo b2072f: OUTPUT«False␤True␤»
gfldex || is a boolean question, // returns a value 01:16
ssutch ah ok
timotimo right, you may have a constant that evaluates to False for some reason?
like ... False :)
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
gfldex to have something false they may not should be 01:17
good night
ssutch haha, 'night
timotimo ;) 01:18
01:18 xilo_ joined 01:22 dayangkun joined
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:26
01:27 xenoterracide left
sorear nope, it finished 01:28
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
it's spectesting...:D 01:30
timotimo yays :)
something's repeatedly giving me 602 and 803 in DIVIDE_NUMBERS 01:31
did i somehow get an infinite loop!? 01:32
sorear a long vertical column of "ok" is so pretty. 01:33
timotimo :D
ssutch indeed 01:34
colomon sorear: the setting takes at least three times longer to build on parrot, last time I compared.
o/
01:37 ssutch left 01:39 fgomez left
sorear o/ colomon 01:41
colomon: yeah. if I can just do something about the startup, rakudo-jvm will be great 01:42
colomon +1 01:43
01:48 fgomez joined
sorear the IO-Socket-INET test takes a while 01:55
01:55 twigel left
timotimo yes, it does :( 01:55
i've had it with trying to make DIVIDE_NUMBERS give division by zero errors
i just don't get it.
sometimes $t2 is 0 01:56
01:56 census left
perigrin it's not a bug ... it's a feature "Perl 6 is so advanced you can divide by 0!" 01:57
Also it makes your whitespace whiter!
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:58
yeah, i think i am. 01:59
02:00 SamuraiJack joined
timotimo i think i need a shower before i attempt to go to bed 02:00
sorear Result: PASS
timotimo great! 02:01
PR away :)
dalek kudo/nom: ec48e79 | sorear++ | src/ (2 files):
First working gather/take for Rakudo/JVM
rakudo/nom: 583ca10 | sorear++ | src/vm/jvm/runtime/org/perl6/rakudo/Ops.java:
rakudo/nom: Implement p6routinereturn for the JVM
02:01 dalek left
timotimo hah, great! :) 02:02
02:02 dalek joined, ChanServ sets mode: +v dalek
sorear #parrot got the full dose 02:02
timotimo spectests as well 02:03
do you have anything specific in mind for tomorrow and the last minutes before the compiler release? 02:04
02:04 xenoterracide joined
timotimo i don't have an overview over what stuff works now 02:04
sorear a surprisingly large and yet surprisingly small amount of stuff 02:06
timotimo that's what i thought :)
sorear t/01-sanity works, t/02-rakudo works except for a missing plan(?), still some failures in t/00-parrot
timotimo i get a totally weird division by 0 in t/spec/S02-magicals/dollar_bang.rakudo 02:07
sorear use v6 works :)
timotimo and use Test, too, right?
sorear you're trying to spectest on JVM!?
yeah, use Test works
timotimo no, i'm not ;)
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
colomon sorear: you got a commitbit?
02:08 xilo_ left, xilo_ joined
timotimo r: say (3/0).Num 02:09
camelia rakudo b2072f: OUTPUT«Inf␤»
timotimo er, huh? 02:10
lee_ oh cool! now [+] 0..10 works on jvm :D
wasn't working this afternoon
colomon Rats can had 0 denominator
r: say (3/0).nude
camelia rakudo b2072f: OUTPUT«1 0␤»
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
should i fudge these tests and go on with the changes?
sorear colomon: yeah, pmichaud++ gave me one a couple hours ago 02:13
colomon \o/
sorear colomon: see I just pushed ^_^
lee_: yep, RangeIter was broken
02:13 xilo_ left
colomon has the Hallelujah Chorus running through his head 02:14
02:14 xilo_ joined
timotimo ah, interesting. that's why it fails with DivisionByZero 02:14
r: sub a { fail X::AdHoc.new() }; try { a }; say $!.defined;
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/…
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␤␤»
timotimo the $!.defined sinks it
can that be right?
02:15 xilo_ left
timotimo i suppose with the new changes, try { 1 div 0 }; ok $!.defined; is no longer a good test. 02:16
02:16 xilo_ joined 02:18 xilo_ left
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
flussence yeah but... all of those at once
sorear I suppose if someone is motivated there's no reason we couldn't start collecting spectest data for rakudo.jvm 02:19
02:19 xilo_ joined
colomon just grabbed a spectest file to see what happens 02:19
colomon@melissa:~/tools/rakudo-jvm$ ./perl6 -Ilib t/spec/S02-types/array.t
===SORRY!===
P6opaque representation does not implement cloning
flussence ooh, maybe I can dust off that graph thing I had around the beginning of nom
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.
*rakudo JVM
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.
sorear timotimo: rakudo-jvm can automatically use more than one core!
timotimo that's indeed a good thing
probably only for GC'ing, though?
sorear probablu
ly
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
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
(designing nice p6y abstractions will take longer) 02:24
02:24 raiph joined
dalek ast: 0b05489 | (Timo Paulssen)++ | S03-sequence/nonnumeric.t:
unfudge some sequence with single-codepoint tests
02:24
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
colomon: you'll want to use --ll-exception a lot
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)
timotimo github.com/rakudo/rakudo/pull/169 - would like a bit of discussion on the parenthesized remark on the first point there
colomon *tips 02:29
02:31 potatogim left
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
I've been using jdb quite a bit
colomon there's a command line debugger for JVM? sweet. 02:32
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…
..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␤␤»
colomon does set difference even make sense on three sets? 02:34
02:35 xilo_ left 02:36 xilo_ joined 02:39 xilo_ left, xilo_ joined
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?
sorear Yeah 02:43
Left assoc, not list
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
djanatyn show me how to set up rakudo-jvm <3
(and potentially contribute)
I love using clojure and leiningen is one of my favorite tools 02:45
if there was something like that for perl6, I would pretty much melt
and I care about that enough to be willing to donate a lot of my time
but right now I wanna play with rakudo-jvm if that's possible :)
sorear 1. get a very recent JVM (we're using invokedynamic, which means 1.7)
java -version
diakopter recommends oracle jvm (package oracle-java7-installer on ubuntu) 02:46
sorear actually, just read this: github.com/rakudo/rakudo/blob/nom/README#L32
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
I'm a tiny bit paranoid about minecraft not working
lue has successfully used icedtea with Rakudo JVM
colomon .u ∖
yoleaux U+2216 SET MINUS [Sm] (∖)
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!
sorear colomon: let me know if/when you want to play with jdb in rakudo 02:50
colomon sorear: will do
sorear i've got some stuff I need to polish and commit
colomon sorear: I've gotten distracted by set ops at the moment.
diakopter djanatyn: minecraft runs on my simulated pc inside minecraft
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..
timotimo haha, a frame of minecraft being rendered in minecraft would be like the pitch drop experiment? :)
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
colomon jnthn++ 02:53
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?
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?
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
I should be able to go into the nqp branch after cloning a fresh copy from git with "git checkout nqp", correct?
sorear djanatyn: there is no nqp branch 02:57
djanatyn: nqp is a dependency of rakudo
djanatyn oh
sorear djanatyn: cd $rakudo; git clone git://github.com/perl6/nqp.git
timotimo perl ConfigureJVM.pm doesn't fetch nqp for you? 02:58
sorear timotimo: correct
timotimo OK
02:58 atroxaper joined
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)
make: *** [nqp-runtime.jar] Error 1
(yay!)
colomon afk # bedtime
sorear rt.perl.org/rt3/Public/Bug/Display...?id=118285 03:00
djanatyn: it works for me
timotimo: rt link is for you
timotimo hehe 03:01
i wouldn't touch Makefiles with a ten-foot-pole
(especially since i wouldn't want to cut off the feet of approximately five people) 03:02
03:03 twigel joined
sorear who has rt close powers? 03:04
rt.perl.org/rt3/Ticket/Display.html?id=118313 can be closed
timotimo i'll write "sorear made it work" 03:07
03:07 tgt left
timotimo pmichaud: i'm not sure i understand your comment on my PR :| 03:08
sorear r: say RETURN 03:11
camelia rakudo b2072f: OUTPUT«===SORRY!===␤Undeclared name:␤ RETURN used at line 1␤␤»
sorear r: (sub () { say RETURN })()
camelia rakudo b2072f: OUTPUT«===SORRY!===␤Undeclared name:␤ RETURN used at line 1␤␤»
sorear r: my \RETURN = 5; (sub () { say RETURN })()
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␤␤»
diakopter sorear: !!! 03:12
sorear diakopter: rakudo seems to not isolate user variables from internal names 03:13
diakopter r: my \RETURN = 5; (sub () { print RETURN })()
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 …
diakopter r: my \RETURN = 5; (sub () { print RETURN.WHAT })()
camelia rakudo b2072f: OUTPUT«Can only use get_what on a SixModelObject␤ in sub at /tmp/jAkKLmlI9w:1␤ in block at /tmp/jAkKLmlI9w:1␤␤»
sorear diakopter: RETURN is a parrot;Continuation object
used to implement lexotic return semantics 03:14
r: my \sink_4 = 0; 1; 2; 3; 4; 5; 6; 7; say sink_4
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…
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␤»
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␤»
sorear the last time p5eval's rakudo updated was the day before yapc::na 03:19
timotimo oh, it's severely out of date?
i didn't even notice! =o
er, p5eval? not camelia?
sorear timotimo: not as out of date as the nqp-jvm, which isfrom Feb
camelia, sorry
typo for p6eval 03:20
timotimo :) 03:21
do we know what's going wrong?
sorear the p6eval box doesn't have enough memory to build rakudo or nqp-jvm
I think they're supposed to be compiled by cronjob on a different box and rsynced over 03:22
timotimo oh, yikes
i heard that some time ago, ye
sorear but there are a lot of moving parts in that system
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:50 tomaw left, atroxaper left, araujo left, Patterner left, Juerd left, nyuszika7h left, amoe left, silug_ left, [Coke] left, xilo left, avuserow1 left, fgomez left, cooper left, DarthGandalf left, hypolin left, imarcusthis- left, FOAD left, yoleaux left, drbean left, dpk left, xilo_ left, dalek left, woolfy left, yves left, diakopter left, Ulti left, odoacre left, sivoais left, Nom- left, sciurius left, rafl left, stevan_ left, cosimo left, bruges left, jercos left, broquaint left, Hor|zon left, mtk left, lee_ left, snarkyboojum_ left, skids left, avar left, Rix left, patspam left, masak left, BooK left, __sri left, PerlJam left, prammer left, szbalint left, bakedb left, dagurval left, kshannon_ left, ingy left, wtw left, twigel left, pjcj left, kst left, chayin_ left, huf left, sergot left, danaj left, sjn left, awwaiid_ left, shachaf left, baest left, PacoAir left, zakalwe left, Teratogen left, jtpalmer left, geekosaur left, autumn left, lue left, sorear left, mattp__ left, felipe left, charsbar_______2 left, telex left, scottp left, pmichaud left, itz left, GlitchMr left, amkrankruleuen left, yeltzooo left, cxreg left, LordVorp left, markov left, Exodist left, `patch` left, sitaktif left, larks left, jerome__ left, risou_awy left, djanatyn left, Tene left, SamuraiJack left, dayangkun left, jaldhar left, pochi left, simcop2387 left, diederich left, p5eval left, gabriel__ left, cognominal left, lizmat left, sftp left, colomon left, rhr left, SHODAN left, Gothmog_ left, hoelzro left, ponbiki left, zamolxes left, genehack left, xenoterracide left, pecastro left, Kelder left, groky left, tadzik left, logie left, SmokeMac_ left, Grrrr left, ugexe left, perigrin left, renormalist left, mls left, bonsaikitten left, betterworld left, Util left, _ilbot left, konundra left, MrMeek left, Woodi left, [particle] left, eternaleye left, mikemol left, berekuk left, Lorn left, cotto left, breinbaas left, Maddingue left, BinGOs left, japhb left, moritz left, rjbs left, cibs left, Timbus left, robinsmidsrod left, Khisanth left, sunnavy left, Vlavv left, takesako______ left, pnu_ left, Bucciarati left, TimToady left, jlaire left, frdmn left, ivan``_ left, dylanwh left, Celelibi left, atrodo left, daniel-s left, labster left, apejens left, nwc10 left, felher left, rom1504 left, hugme left, gfldex left, anocelot left, lestrrat left, Yappo_________ left, revdiablo left 03:53 avar joined, twigel joined, atroxaper joined, xilo_ joined, xenoterracide joined, dalek joined, SamuraiJack joined, fgomez joined, dayangkun joined, jaldhar joined, cooper joined, konundra joined, pjcj joined, pecastro joined, woolfy joined, araujo joined, DarthGandalf joined, pochi joined, simcop2387 joined, kst joined, logie joined, MrMeek joined, Woodi joined, diederich joined, p5eval joined, gabriel__ joined, PacoAir joined, Timbus joined, Kelder joined, yves joined, Patterner joined, bonsaikitten joined, betterworld joined, robinsmidsrod joined, jlaire joined, skids joined, Juerd joined, diakopter joined, groky joined, nyuszika7h joined, Gothmog_ joined, cognominal joined, lizmat joined, Ulti joined, SmokeMac_ joined, zakalwe joined, odoacre joined, barjavel.freenode.net sets mode: +v dalek, chayin_ joined, amoe joined, Khisanth joined, hypolin joined, Rix joined, frdmn joined, sunnavy joined, [particle] joined, telex joined, sftp joined, scottp joined, imarcusthis- joined, sivoais joined, huf joined, silug_ joined, ivan``_ joined, dylanwh joined, Teratogen joined, sergot joined, danaj joined, jtpalmer joined, sjn joined, Celelibi joined, GlitchMr joined, atrodo joined, daniel-s joined, eternaleye joined, Nom- joined, tadzik joined, [Coke] joined, pmichaud joined, colomon joined, mikemol joined, FOAD joined, xilo joined, labster joined, itz joined, yoleaux joined, geekosaur joined, awwaiid_ joined, hoelzro joined, Vlavv joined, cibs joined, shachaf joined, sciurius joined, rhr joined, SHODAN joined, barjavel.freenode.net sets mode: +v yoleaux, mls joined, drbean joined, dpk joined, amkrankruleuen joined, autumn joined, patspam joined, lue joined, masak joined, baest joined, Util joined, BooK joined, ponbiki joined, takesako______ joined, jerome__ joined, ugexe joined, berekuk joined, avuserow1 joined, risou_awy joined, Lorn joined, yeltzooo joined, djanatyn joined, Tene joined, __sri joined, cxreg joined, LordVorp joined, apejens joined, rafl joined, PerlJam joined, prammer joined, nwc10 joined, _ilbot joined, sorear joined, szbalint joined, bakedb joined, dagurval joined, kshannon_ joined, felher joined, ingy joined, rom1504 joined, tomaw joined, wtw joined, Grrrr joined, mattp__ joined, felipe joined, markov joined, genehack joined, zamolxes joined, Exodist joined, `patch` joined, charsbar_______2 joined, cotto joined, breinbaas joined, Maddingue joined, BinGOs joined, japhb joined, moritz joined, rjbs joined, larks joined, sitaktif joined, hugme joined, gfldex joined, anocelot joined, perigrin joined, pnu_ joined, renormalist joined, lestrrat joined, Yappo_________ joined, revdiablo joined, flussence joined, mathw joined, nebuchadnezzar joined, smash joined, Bucciarati joined, TimToady joined, stevan_ joined, cosimo joined, bruges joined, jercos joined, broquaint joined, Hor|zon joined, mtk joined, lee_ joined, snarkyboojum_ joined, tomaw left 03:54 stevan_ left, cosimo left, bruges left, jercos left, broquaint left, Hor|zon left, mtk left, lee_ left, snarkyboojum_ left, atroxaper left, araujo left, Patterner left, Juerd left, nyuszika7h left, amoe left, silug_ left, [Coke] left, xilo left, avuserow1 left, fgomez left, cooper left, DarthGandalf left, hypolin left, imarcusthis- left, FOAD left, yoleaux left, drbean left, dpk left, xilo_ left, dalek left, woolfy left, yves left, diakopter left, Ulti left, odoacre left, sivoais left, Nom- left, sciurius left, rafl left, skids left, Rix left, patspam left, masak left, BooK left, __sri left, PerlJam left, prammer left, szbalint left, bakedb left, dagurval left, kshannon_ left, ingy left, wtw left, twigel left, pjcj left, kst left, chayin_ left, huf left, sergot left, danaj left, sjn left, awwaiid_ left, shachaf left, baest left, PacoAir left, zakalwe left, Teratogen left, jtpalmer left, geekosaur left, autumn left, lue left, sorear left, mattp__ left, felipe left, charsbar_______2 left, telex left, scottp left, pmichaud left, itz left, GlitchMr left, amkrankruleuen left, yeltzooo left, cxreg left, LordVorp left, markov left, Exodist left, `patch` left, sitaktif left, larks left, jerome__ left, risou_awy left, djanatyn left, Tene left, SamuraiJack left, dayangkun left, jaldhar left, pochi left, simcop2387 left, diederich left, p5eval left, gabriel__ left, cognominal left, lizmat left, sftp left, colomon left, rhr left, SHODAN left, Gothmog_ left, hoelzro left, ponbiki left, zamolxes left, genehack left, xenoterracide left, pecastro left, Kelder left, groky left, tadzik left, logie left, SmokeMac_ left, Grrrr left, ugexe left, perigrin left, renormalist left, mls left, bonsaikitten left, betterworld left, Util left, _ilbot left, avar left, konundra left, MrMeek left, Woodi left, [particle] left, eternaleye left, mikemol left, berekuk left, Lorn left, cotto left, breinbaas left, Maddingue left, BinGOs left, japhb left, moritz left, rjbs left, cibs left, Timbus left, robinsmidsrod left, Khisanth left, sunnavy left, Vlavv left, takesako______ left, mathw left, nebuchadnezzar left, smash left, pnu_ left, Bucciarati left, TimToady left, jlaire left, frdmn left, ivan``_ left, dylanwh left, Celelibi left, atrodo left, daniel-s left, labster left, apejens left, nwc10 left, felher left, rom1504 left, hugme left, gfldex left, anocelot left, lestrrat left, Yappo_________ left, revdiablo left, flussence left 03:56 xenoterracide|2 joined, snarkyboojum_ joined, lee_ joined, mtk joined, Hor|zon joined, broquaint joined, jercos joined, bruges joined, cosimo joined, stevan_ joined, avar joined, twigel joined, atroxaper joined, xilo_ joined, dalek joined, SamuraiJack joined, fgomez joined, dayangkun joined, jaldhar joined, cooper joined, konundra joined, pjcj joined, pecastro joined, woolfy joined, araujo joined, DarthGandalf joined, pochi joined, simcop2387 joined, kst joined, logie joined, MrMeek joined, Woodi joined, diederich joined, p5eval joined, gabriel__ joined, PacoAir joined, Timbus joined, Kelder joined, yves joined, Patterner joined, bonsaikitten joined, betterworld joined, robinsmidsrod joined, jlaire joined, skids joined, Juerd joined, diakopter joined, barjavel.freenode.net sets mode: +v dalek, groky joined, nyuszika7h joined, Gothmog_ joined, cognominal joined, lizmat joined, Ulti joined, SmokeMac_ joined, zakalwe joined, odoacre joined, chayin_ joined, amoe joined, Khisanth joined, hypolin joined, Rix joined, frdmn joined, sunnavy joined, [particle] joined, telex joined, sftp joined, scottp joined, imarcusthis- joined, sivoais joined, huf joined, silug_ joined, ivan``_ joined, dylanwh joined, Teratogen joined, sergot joined, danaj joined, jtpalmer joined, sjn joined, Celelibi joined, GlitchMr joined, atrodo joined, daniel-s joined, eternaleye joined, Nom- joined, tadzik joined, [Coke] joined, pmichaud joined, colomon joined, mikemol joined, FOAD joined, xilo joined, labster joined, itz joined, yoleaux joined, barjavel.freenode.net sets mode: +v yoleaux, geekosaur joined, awwaiid_ joined, hoelzro joined, Vlavv joined, cibs joined, shachaf joined, sciurius joined, rhr joined, SHODAN joined, mls joined, drbean joined, dpk joined, amkrankruleuen joined, autumn joined, patspam joined, lue joined, masak joined, baest joined, Util joined, BooK joined, ponbiki joined, takesako______ joined, jerome__ joined, ugexe joined, berekuk joined, avuserow1 joined, risou_awy joined, Lorn joined, yeltzooo joined, djanatyn joined, Tene joined, __sri joined, cxreg joined, LordVorp joined, apejens joined, rafl joined, PerlJam joined, prammer joined, nwc10 joined, _ilbot joined, sorear joined, szbalint joined, bakedb joined, dagurval joined, kshannon_ joined, felher joined, ingy joined, rom1504 joined, tomaw joined, wtw joined, Grrrr joined, mattp__ joined, felipe joined, markov joined, genehack joined, zamolxes joined, Exodist joined, `patch` joined, charsbar_______2 joined, cotto joined, breinbaas joined, Maddingue joined, BinGOs joined, japhb joined, moritz joined, rjbs joined, larks joined, sitaktif joined, hugme joined, gfldex joined, anocelot joined, perigrin joined, pnu_ joined, renormalist joined, lestrrat joined, Yappo_________ joined, revdiablo joined, flussence joined, mathw joined, nebuchadnezzar joined, smash joined, Bucciarati joined, TimToady joined, xilo_ left 03:57 xilo_ joined 04:08 xilo_ left, xilo_ joined 04:10 xilo_ left, xilo_ joined 04:15 xilo_ left
lue r: say Int.HOW.WHAT 04:17
camelia rakudo b2072f: OUTPUT«(Perl6::Metamodel::ClassHOW)␤»
lue r: say Int.^WHAT
camelia rakudo b2072f: OUTPUT«===SORRY!===␤Cannot use .^ on a non-identifier method call␤at /tmp/9Fl5kJWo6b:1␤------> say Int.^WHAT⏏<EOL>␤ expecting any of:␤ method arguments␤»
04:19 xilo_ joined 04:20 ztt_ joined 04:27 Psyche^ joined, silug_ left 04:28 silug_ joined 04:30 Patterner left, Psyche^ is now known as Patterner 04:31 zby_home_ joined 04:58 birdwindupbird joined 04:59 potatogim joined 05:04 xilo_ left 05:05 xilo_ joined 05:06 Stigmergy joined 05:11 xilo_ left 05:32 Stigmergy left 05:36 xenoterracide|2 left 05:40 raiph left 05:55 ztt_ left 05:59 dmol joined 06:00 FROGGS[mobile] joined
FROGGS[mobile] morning 06:00
labster morning FROGGS 06:01
sorear morning FROGGS[mobile] 06:04
good evening labster
labster I want to ride in the FROGGSmobile
evening, sorear
06:08 hoelzro_ joined 06:09 hoelzro left, ponbiki left, genehack left 06:10 Gothmog_ left, genehack joined, Gothmog_ joined
dagurval morning o/ 06:11
06:13 ponbiki joined, ponbiki is now known as Guest56859 06:16 FROGGS joined 06:20 FROGGS[mobile] left
FROGGS labster: sad there is none :/ 06:21
labster We need grant money for that.
FROGGS hehe, yeah
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
06:26 xinming joined
sorear so that we can do better testing, and an evalbot 06:26
FROGGS that would be very sweet (and helpful)
I'm a bit afraid of upgrading nqp to do some jvm/moarvm testing though, since this might still break on my machine: github.com/perl6/nqp/commit/609c1f...255a3ef06e 06:27
I guess I should just try to build current HEAD 06:28
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 dmol left
FROGGS sorear: it frees mem which should not, according to the bt 06:30
sorear FROGGS: well, that code is not used on jvm in any case 06:31
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
FROGGS will do, but I think it might be worth knowing if the bug still exist 06:34
so I'll upgrade in a few minutes
06:35 Celelibi left 06:38 domidumont joined
FROGGS nqp: say(0 || 1 ~ 2 || 3) 06:39
camelia nqp: OUTPUT«12␤»
FROGGS nqp: say(0 || 1 ~ 0 || 3) 06:40
camelia nqp: OUTPUT«10␤»
FROGGS ohh 06:41
sorear ~ is tighter than or
FROGGS yepp
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
so you can do good = a > b && a < 2 * b
within each level, multiplication-like operations have higher precedence than addition-like operations
exclusive or is addition on a field of characteristic 2; AND and OR are the multiplication and addition on a Boolean semiring 06:43
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
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
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:45 domidumont left 06:46 domidumont joined 06:53 kaleem joined 07:00 zby_home_ left 07:11 ecocode joined
__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:18
07:20 xinming left 07:22 xinming joined 07:25 sqirrel joined 07:27 twigel left
labster r: say so('foo' eq any<foo bar>) 07:48
camelia rakudo b2072f: OUTPUT«False␤»
moritz : say so('foo' eq any <foo bar>)
r: say so('foo' eq any <foo bar>)
camelia rakudo b2072f: OUTPUT«True␤»
sorear it would appear that now that I'm a rakudo committer I get cc'd on every rakudo bug report 07:54
s/bug report/pull request/
07:56 cognominal left 07:57 cognominal joined
labster enjoy your full inbox, sorear 07:58
moritz sorear: yes, but you can manually unsubscribe if you want
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. 07:59
moritz labster: it's very handy in some situations 08:00
if you have a function that returns an array, you can say func[0]
and likewise if you have a function that returns a hash, you can say func<foo>
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>
camelia std d4cc5ab: OUTPUT«===SORRY!===␤The 'any' listop may not be called without arguments (please use () or whitespace to clarify) at /tmp/wuhp2GKgJz line 1:␤------> any⏏<foo bar>␤Potential difficulties:␤ Use of non-subscript <...> where postfix is expe…
sorear std: die<foo bar> 08:02
camelia std d4cc5ab: OUTPUT«ok 00:00 41m␤»
labster std: none<foo>
camelia std d4cc5ab: OUTPUT«===SORRY!===␤The 'none' listop may not be called without arguments (please use () or whitespace to clarify) at /tmp/2ziKAt_7uA line 1:␤------> none⏏<foo>␤Potential difficulties:␤ Use of non-subscript <...> where postfix is expect… 08:03
labster n: IO::Path.new("foo") 08:07
camelia niecza v24-78-g9f58f84: ( no output )
labster n: say IO::Path.new("foo")
camelia niecza v24-78-g9f58f84: OUTPUT«Path<foo>␤»
labster n: say (IO::Path.new("foo") ~~ IO::Path) 08:08
camelia niecza v24-78-g9f58f84: OUTPUT«True␤»
labster n: say IO::Path ~~ Path
camelia niecza v24-78-g9f58f84: OUTPUT«===SORRY!===␤␤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…
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…
labster n: "
camelia niecza v24-78-g9f58f84: OUTPUT«===SORRY!===␤␤Bogus statement at /tmp/igjFH0XG12 line 1:␤------> <BOL>⏏"␤␤Parse failed␤␤»
labster n: say "foo".path
camelia niecza v24-78-g9f58f84: OUTPUT«Path<foo>␤»
labster n: say "foo".path.IO
camelia niecza v24-78-g9f58f84: OUTPUT«"foo".IO␤»
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…
sorear n: any<foo bar> 08:15
camelia niecza v24-78-g9f58f84: OUTPUT«===SORRY!===␤␤The 'any' listop may not be called without arguments (please use () or whitespace to clarify) at /tmp/hmhjJ0LfQa line 1:␤------> any⏏<foo bar>␤␤Unhandled exception: Check failed␤␤ at /home/p6eval/niecza/b…
labster n: say IO::Path.gist 08:16
camelia niecza v24-78-g9f58f84: OUTPUT«(IO::Path)␤»
moritz n: sub any() { say 'I like it argumentless' }; any 08:22
camelia niecza v24-78-g9f58f84: OUTPUT«===SORRY!===␤␤The 'any' listop may not be called without arguments (please use () or whitespace to clarify) at /tmp/hoNsPil3zQ line 1 (EOF):␤------> () { say 'I like it argumentless' }; any⏏<EOL>␤␤Unhandled exception: C…
moritz wonders if that's a bug 08:23
08:26 ssutch joined
labster oh, sorry about the niecza noise, I thought I was private messaging camelia 08:32
moritz no problem 08:33
sorear and I made more noise than you :-)
dalek ast: f3b450b | (Brent Laabs)++ | S32-io/io-path (4 files):
io-path.t is platform aware now, path tests for .succ and .pred
08:38
08:38 dakkar joined
labster that was the noise of me working, anyway 08:38
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 :-)
sorear so I think the multicoreness is mostly due to background compilation
19.715 wall 20.119 user 08:40
versus 7.211 / 12.862 with the JIT enabled
less than 5% of time is spent in the GC, so I'm not optimizing that 08:43
-Xbatch is also interesting, 9.684 / 10.085 08:44
nwc10 this is "when you have eliminated the impossible, whatever remains, however improbable, must be the truth?" 08:45
FROGGS .\\// 08:46
sorear nwc10: nah, still at a very preliminary stage of research 08:48
I want to get a handle on how the 12.86 seconds of startup time are being spent
so I can cut that down to something a little more reasonable
08:49 fhelmberger joined
nwc10 which would be very useful. And I totally agree with how you're ruling things out. 08:50
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) 08:53
09:02 konundra left 09:04 ssutch left
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:25
FROGGS >.< 09:26
sorear who's Prima?
TimToady the first one, before Secundus, Tertia, and Quartus :) 09:27
Secundus is currently at a physics conference in France
sorear Which one has problems when they call flights? 09:28
TimToady Tertia
and you usually know Q by a different Q name :)
sorear yeah
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
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:34
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? :-)
TimToady got six hours 09:36
didn't wanna knock myself all the way back to US time though...
09:37 silug_ left 09:38 daxim joined
sorear so there's one qast sub that spans the entire length of CORE.setting and compiles to 38kb of bytecode 09:41
this might be a problem
nwc10 JVM size limits? 09:42
Or just that's what's slowing stuff down?
TimToady you should use a language without arbitrary limits ;)
moritz would love to have a machine without arbitrary limits
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
nwc10 took forever for the optimiser to decide what to with them 09:48
(ran just fine)
09:53 [particle]1 joined, [particle] left
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
the serialized object data for the setting is stored as several megabytes of base64ed, utf8ed, string literals
in order to be used it has to be utf8 decoded and the base64 decoded 09:55
and the class file parser has to load it as string literals
moritz then is that PIR makes it very hard to include blobs
I'm sure nobody objects if you do it diffrently from the JVM
s/then/the reason/
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
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:57
moritz any other ways, like byte strings, or compact byte arrays? 09:58
sorear no byte literals
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 ?
sorear really, I prefer the container solution, but I'd want to talk to jnthn++ about that 10:00
lizmat github.com/Sereal/Sereal
sorear since if the output is not a raw class file, --target=classfile should be renamed, and that breaks all the downstream build scripts
lizmat Sereal already has a decoder in Java 10:01
</serial>
10:01 pr_ joined
sorear lizmat: yeah, orthogonal problem 10:01
we can already turn data structures into byte strings 10:02
the question is how do we keep the byte strings and the executable code
lizmat ok, sometimes thinking outside of the box turns things 90 degrees around :-)
nwc10 sorear: so porting Rakudo to .NET would mean solving the same problem as here on the JVM?
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
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"
sorear nwc10: No
nwc10 bother
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
but the VM itself throws a ClassFormatError
pr_ sorear: thx. perl6 -e "if (['a','b'] ~~ (*, 'x', *)) { say 'matches'; } else { say 'not' };" displays an error. 10:07
sorear nwc10: .net's class loading is "fun" in other ways. like you can't really do anonymous code there 10:08
pr_ sorear: but this works. Never mind my question: perl6 -e "if (['a','b'] ~~ <*, 'x', *>) { say 'matches'; } else { say 'not' };" 10:12
sorear um 10:14
I do not think that means what you think it means
10:14 stevan__ joined
sorear r: say <*, 'x', *>.perl 10:14
camelia rakudo b2072f: OUTPUT«("*,", "'x',", "*")␤»
pr_ sorear: I am just trying out the smart matching examples here: en.wikibooks.org/wiki/Perl_6_Progra...Structures 10:16
sorear: the example is as follows: ["a", "b"] ~~ *, "a", *; 10:17
masak rn: say <a b c> ~~ (*, 'b', *)
camelia niecza v24-78-g9f58f84: OUTPUT«False␤»
..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…
masak huh.
good noon, #perl6
10:17 stevan_ left
sorear good noon, masak 10:17
10:18 bruges left, bruges_ joined
TimToady r: say <a b c> 10:18
camelia rakudo b2072f: OUTPUT«a b c␤»
TimToady r: say <a b c> ~~ (*,) 10:19
pr_ neither "if (['a','b'] ~~ <*, 'a', *>)" nor "if (['a','b'] ~~ (*, 'a', *))" seems to work
camelia rakudo b2072f: OUTPUT«True␤»
masak pr_: the former shouldn't work because <> just gives you literal strings.
TimToady pr_: that's what sorear was indicating above 10:20
and it can't work without parens because of precedence
10:23 atroxaper left
pr_ TimToady: understood. You must add parens. But adding parens throws a 'string to number' error. 10:24
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 \ ?
pr_ TimToady: how do you report a bug?
lizmat TimToady: I'm thinking about giving S11:363 "Versioning" a rewrite with the proposed -unit- statement as the main new ingredient
sorear send mail to [email@hidden.address]
pr_ sorear: will do. 10:26
TimToady rn: say <a b c> ~~ [*, 'b', *]
camelia niecza v24-78-g9f58f84: OUTPUT«False␤»
..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…
lizmat TimToady: aka github.com/perl6/specs/issues/54
TimToady dunno if my brane is up to that today... 10:27
dalek p: f11ae97 | sorear++ | src/vm/jvm/runtime/org/perl6/nqp/runtime/ (2 files):
The loaded module list should be in the GlobalContext, not a static variable
lizmat TimToady: well, a revert is easy :-)
maybe a rewrite will help you make your brane up to date :-) 10:28
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...
moritz TimToady++ # consistent interface
lizmat I'll take that as a no then :-) 10:30
10:34 pr_ left
lizmat with keeping in mind that an idiot can ask more questions than a wise person can answer 10:36
what is a "conditional thunk"? Is it the block after an if, like "if $cond { "conditional thunk } " ? 10:37
moritz what's the context?
lizmat S06:36
moritz (but probably not a block, because a thunk is a piece of code that's not a block)
lizmat ah, so it's more like $foo if "conditional thunk" ? 10:38
TimToady $foo ?? I-am-a-thunk() !! so-am-I()
$bar || Mee-too() 10:39
moritz lizmat: a thunk is a piece of code that isn't immediately executed, but is not a block
also has $.x = I-am-a-thunk(); 10:40
and in this context, I'd ss/conditional thunk/thunk/
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␤»
moritz right 10:42
lizmat the synopsis use the word "thunk" in several places, but never actually explains what it is 10:58
11:00 snearch joined
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.
lizmat: my understanding is this: a thunk is anything whose execution is delayed. unlike blocks, it doesn't have its own environment. 11:01
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" ?
masak right.
but 'has $.x = am-one;'
a fairly wacky one, IIUC. because it has to bind 'self', too.
11:03 FROGGS left
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.
TimToady uh, state $x = ...
lizmat I was wondering about it
*that 11:04
TimToady it's more like 'can be executed conditionally or repeatedly', which might imply delay, but might not
I-am-a-thunk xx $count
masak *nod* 11:05
sometimes the delay is very short :)
TimToady as a degenerate view, everything is a thunk, but most thunks are xx 1 :)
masak I haven't thought of it like that, but I guess the '* + 2' syntax creates thunks as well...
TimToady yes indeedy 11:06
masak r: say map * + my $c = 2, <1 2 3>; say $c
camelia rakudo b2072f: OUTPUT«3 4 5␤2␤»
masak yep.
lizmat: I for one welcome our new properly thunk-explaining spec overlords.
TimToady breakfast^Wlunch & 11:07
lizmat bon appetit!
flussence on serializing stuff: can't you just throw the binary pieces in the same jar file as the classes?
11:08 benabik left
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␤»
moritz one
you can't have more than one lexical of the same name in one scope 11:09
11:09 benabik joined
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:11
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:12
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:13
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.
or is the Wikipedia article enough?
masak daniel-s: probably a good start :)
lizmat masak++
masak daniel-s: the basics are very simple, I'd say. it's like '<postal-address> ::= <name-part> <street-address> <zip-part>' 11:15
11:15 FROGGS joined
masak daniel-s: so the thing on the left is defined to have the three things on the right as components. 11:15
daniel-s: and you keep on defining like that, all the way down.
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
daniel-s: but that's possible to handle, and sometimes very useful when expressions are self-similar.
daniel-s: does this make sense?
daniel-s what does self-similar mean?
masak like a fractal :) 11:17
a little bit is like the whole thing.
daniel-s oh, OK.
masak <syntax> ::= <rule> | <rule> <syntax>
like that.
"a syntax is either a single rule, or a single rule followed by more syntax"
like with recursion, the important thing is that you can bottom out somehow. 11:18
lizmat you can bottom out somehow
can bottom out somehow
bottom out somehow
out somehow
somehow
masak :)
lizmat++ lizmat+ lizmat lizma lizm liz li l 11:19
daniel-s: the <syntax> rule above is called "right-recursive", because the recursion happens at the right end of the rule. 11:20
daniel-s: some parsers (such as Rakudo's Perl 6 grammar engine) have a problem when seeing left-recursive rules.
11:21 salv0 left
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
11:22 salv0 joined
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 '!…
masak "PROGRAM HAS DISAPPEARED INTO THE BLACK LAGOON."
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
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
things call EXPR, and EXPR calls things
masak yes, but and so on ad potentially infinitum. 11:25
TimToady it's cake layers all the way up
and icing
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}
sjn has heard that the cake is a lie 11:27
lizmat you mean, there is no cake?
TimToady the lie is a cake
sjn no, that the cake is a lie
it's a lie-cake
TimToady is that like a lie-group? 11:28
lizmat or a lie-chee ?
nwc10 more likely a liar-cake
sjn with layeres of lies that lie on top of eachother
lizmat sounds more and more like statistics to me
masak Lie groups puzzle me continuously. 11:29
TimToady statistically speaking there is a lot of ICing in Silicon Valley
lizmat getting back to thunks: is an eval string a thunk or a special case of compilation unit? 11:31
or both :-)
I guess it's a block that automatically "imports" any lexicals from the scope it is un? 11:32
*in?
11:32 JimmyZ joined
masak lizmat: eval strings are *strings*, not thunks or blocks... :P 11:32
lizmat: but I see what you mean. I think they compile to blocks.
lizmat: because of the static thing. there's no way they can leak lexicals.
lizmat indeed… duh
masak r: eval 'my $a = 5'; say $a
camelia rakudo b2072f: OUTPUT«===SORRY!===␤Variable '$a' is not declared␤at /tmp/mwEMJ42f66:1␤------> eval 'my $a = 5'; say $a⏏<EOL>␤ expecting any of:␤ postfix␤»
masak doesn't even pass compilation. 11:33
nwc10 all the puns have scone away :-(
lizmat r: my $a=2; eval 'my $a = 5'; say $a
camelia rakudo b2072f: OUTPUT«2␤»
masak nwc10: the puns can rise again!
lizmat and no errors
masak r: my $a = 2; { my $a = 5 }; say $a
camelia rakudo b2072f: OUTPUT«2␤»
masak same deal.
lizmat indeed, that was my point :-) 11:34
masak we are in violent agreement, then.
rn: my $a = 2; my $a = 3; say "alive $a"
camelia niecza v24-78-g9f58f84: OUTPUT«Potential difficulties:␤ Useless redeclaration of variable $a (see line 1) at /tmp/hF4Sa0dFXL line 1:␤------> my $a = 2; my $a ⏏= 3; say "alive $a"␤␤alive 3␤»
..rakudo b2072f: OUTPUT«Potential difficulties:␤ Redeclaration of symbol $a␤ at /tmp/lYOVMmD0_p:1␤ ------> my $a = 2; my $a ⏏= 3; say "alive $a"␤alive 3␤»
lizmat ultra-green
11:37 JimmyZ left
masak oh, and '3 < $x < 5' is a thunk. 11:38
that's TimToady++'s insight, which he had to explain several times over to implementors ;)
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:39
sorear it's not really any more of a thunk than the right side of && is 11:40
masak: also, 3 < foo() < bar() < 4 might not call bar at all
TimToady but that's exactly what the right side of && is :)
sallying forth &
masak sorear: oh, great point. 11:41
yes, chained ops are syntactic sugar for '&&', I guess. :) 11:42
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:43
11:44 atroxaper joined
nwc10 does 4 < foo() < bar() < 3 need to call either? 11:45
I think I know the answer
masak yes.
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
camelia rakudo b2072f: OUTPUT«True␤»
masak \o/
dalek p: b497fef | sorear++ | src/vm/jvm/runtime/org/perl6/nqp/runtime/ (3 files):
Add a mechanism for HLLs to cheaply hang data off ThreadContext and GlobalContext
11:47
masak nwc10: but that wasn't my reasoning, actually. my reasoning was "don't rely on the optimizer being sufficiently smart."
I mean, it *can* be, and it's great if it is. but don't rely on it. :)
nwc10 I wonder if there's a test for that with junctions
dalek kudo/jvm-hacking: 98a5e56 | sorear++ | src/vm/jvm/runtime/org/perl6/rakudo/ (2 files):
Use simpler (and threadsafer) reporting of binder errors
kudo/jvm-hacking: 76f8db7 | sorear++ | src/vm/jvm/ (4 files):
Move Rakudo global state into a GlobalContext extension
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
nwc10 will my head hurt afterwards? Is it more fun than perl 5's Makefile.SH ?
masak whoa.
sorear sleep& 11:52
11:52 pr_ joined
lizmat sleep well, sorear! dream of tests passing in great numbers! 11:52
dalek : daeb314 | (Tobias Leich)++ | / (3 files):
support $#array
11:54
11:55 sqirrel left 11:57 pr_ left 11:58 dakkar left
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 WAAV0GC joined
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.
dpk .private-prefix [off]
yoleaux dpk: OK, private-prefix for #perl6 set to '[off]' with paranoid mode off.
12:21 fgomez left
dalek ecs: 4301ccb | (Elizabeth Mattijsen)++ | S06-routines.pod:
An attempt at explaining what a thunk is
12:22
12:22 skids left
FROGGS masak: four hours?? are you sure? 12:24
masak um, no. 12:25
I meant six hours :/
FROGGS puuuh
okay, so I will be there
masak sorry about the confusion. 12:26
FROGGS np
I hope my kids are sleeping early, so I'm not much late 12:27
12:27 snearch left 12:33 jerome__ left
lizmat just realizes that fasers without blocks are also thunks 12:36
*phasers 12:37
masak that's what I said above. though maybe not so clearly. 12:39
12:39 konundra joined
[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.
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
and imagine how heavy-handed some constructs would be if we insisted on doing everything with lambdas.
'foo() && bar()' would have to be written 'foo() && { bar() }'. 12:41
not to mention that thunks give that little extra advantage of being able to leak lexicals.
r: say my @a for @a = 1, 2, 3 12:42
camelia rakudo b2072f: OUTPUT«1 2 3␤1 2 3␤1 2 3␤»
masak :)
[Coke] sorear: what's your RT login? I can make you a bugadmin so you can close tickets.
dalek ecs: 0dbb83c | (Elizabeth Mattijsen)++ | S04-control.pod:
Generalize statement to thunk for phasers
ecs: 70a8dce | (Elizabeth Mattijsen)++ | S06-routines.pod:
Add missing closing ]
masak silly example, but I've seen such constructs being used to great effect. 12:43
some of them are on RC.
timotimo github.com/rakudo/rakudo/pull/169#...t-19660246 - i must admit that i'm not sure i understand pm's last comment :| 12:44
colomon timotimo: I didn't understand it either 12:45
moritz r: say (3/0).perl
masak first off, timotimo++ # taking care of LHF 12:46
timotimo \o/
[Coke] suggests adding a glossary to the syn, and putting the thunk definition there.
camelia rakudo b2072f: OUTPUT«(timeout)»
timotimo perlcabal.org/syn/index_X.html - a little bit like this?
lizmat would be in favour of such a glossary
and wouldn't mind writing it 12:47
timotimo moritz: if that's actually infinite, it isn't an infinite recursion at least
[Coke] timotimo: yes, except functional. (click on the zip link in that file, e.g.) 12:49
parrot release occurred.
timotimo ah, indeed, the C<for> stays in there
[Coke] whoever's doing the release this month for rak-p can do a dry run.
masak [Coke]: thanks. 12:50
I may.
[Coke] masak: I know I waited until the last minute last time and ran it on an underpowered box. :P
[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:51
[Coke] hopes a new compiler chart of who can do what will avoid some of that. 12:52
12:54 ajr joined
[Coke] rakudo: "foo" ~~ / $<foo><bar> = [ foo ] /; say $<foo><bar> #76266 12:54
camelia rakudo b2072f: OUTPUT«===SORRY!===␤Unrecognized regex metacharacter = (must be quoted to match literally)␤at /tmp/e83OQ1Z2oA:1␤------> "foo" ~~ / $<foo><bar> ⏏= [ foo ] /; say $<foo><bar> #76266␤Unable to parse regex; couldn't find final '/'␤at /tmp/…
12:54 ajr is now known as Guest14198
[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
12:55 Guest14198 is now known as ajr_
[Coke] std: "foo" ~~ / $<foo><bar> = [ foo ] /; say $<foo><bar> #76266 12:55
camelia std d4cc5ab: OUTPUT«===SORRY!===␤Unrecognized regex metacharacter = (must be quoted to match literally) at /tmp/WaZTcGIrM8 line 1:␤------> "foo" ~~ / $<foo><bar> =⏏ [ foo ] /; say $<foo><bar> #76266␤Unable to parse regex; couldn't find final '/' at /…
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
[Coke] aye. Closing ticket.
well, testneeding it. 12:57
12:57 cognominal left, kaare_ joined
[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
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.
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.
the point of the ticket is that one should be able to set things in properties several layers down (using that regex syntax). 13:03
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 ecza: cb6f20b | (Solomon Foster)++ | lib/CORE.setting:
Add infix:<∖> for set difference.
masak or, more exactly, nothing.
timotimo [Coke]: the new parrot release doesn't seem to contain many changes :(
moritz timotimo: on the upside it won't break anything 13:05
[Coke] timotimo: you can now build on paths with spaces. :P
(maybe)
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
13:06 JimmyZ joined
masak timotimo: the Parrot release has a record low number of commits. at least looking back a year. 13:08
FROGGS masak: and I guess the next release will even top/drop that 13:09
moritz if the JIT compiler comes in one commit, then I won't object against a parrot release with only two commits :-) 13:10
[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?
well, cannot is wrong; they are just represented verbatim in the $=pod part
13:11 FROGGS left 13:12 cognominal joined
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:14
JimmyZ so... sixparrot is dead 13:15
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.
masak hm, good point.
nwc10 sixparrot doesn't seem to be in anyone's best interest
[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.
basically, moarvm is what that project wanted to be anyway. IMO. 13:20
JimmyZ fib benchmark, moarvm is about 2x of perl 5 :P 13:21
[Coke] JimmyZ: and what about parrot?
13:22 preflex left
JimmyZ [Coke]: gist.github.com/zhuomingliang/5704174 13:22
about 8.3x
memory: parrot 40M; moarvm/perl5: 800k 13:23
masak o.O 13:24
timotimo drools
moritz though note that a moarvm vs. perl 5 comparison is assembler vs. high-level 13:25
timotimo sure
masak r: sub postfix:<M> { $^x * 1_000_000 }; sub postfix:<k> { $^x * 1_000 }; say "{ 40M / 800k } times as much memory"
camelia rakudo b2072f: OUTPUT«50 times as much memory␤»
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 ...)
JimmyZ if I disable cclass init in MoarVM, memory can be reduced to 0.85x 13:26
timotimo where on the roadmap for moarvm is "start work on the JIT", btw? 13:28
13:31 mucker joined
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.
masak also note that with several developers, some things might happen in parallel. 13:36
nwc10 eg "drink coffee" and "drink beer"
masak hm, is that "parallel" or "concurrent"? :) 13:37
JimmyZ after someone thinks it's time to -Ofun to work on the JIT :P
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
JimmyZ doesn't know what's the difference between parallel and concurrent 13:38
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.
mucker how many does perl6 support ? themucker.github.io/ (my favorite syntax bits:) 13:41
[Coke] mucker: what, no tcl? 13:43
mucker never enjoyed tcl :/ 13:44
but I don't hate it :)
timotimo mucker: personally a big fan of .WHY 13:46
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
at least, the rough figures and the ratios
JimmyZ :P 13:49
13:49 skids joined
timotimo the synopsis are rendered with a perl6 pod implementation, Pod::To::HTML, yes? 13:49
moritz no 13:50
JimmyZ timotimo: only S26
moritz only S26 is
what JimmyZ++ said
timotimo: the rest of the synopsis are plain auld perl 5 POD
timotimo ah, ok
moritz and rendered with the create_smartlinks (or so) script in Mu
timotimo how about these pages? perlcabal.org/syn/index_X.html
does that come from the smartlinks script? 13:51
moritz has no idea
JimmyZ timotimo: Pod::To::HTML can't parse S26 completely
moritz it used to work, no? 13:52
timotimo indeed it can't
JimmyZ timotimo: only parse the most things
timotimo "last commit: 3 years ago" vs "# This program is still under active development, and" %)
moritz "under active development" is an euphemism for "not yet feature-complete" 13:53
timotimo :)
there's create_x_file and create_index, i think those are the functions i should be looking at 13:56
moritz probably
[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
moritz fwiw the index.html is static HTML 13:58
and in the mu repo directly
(under a slightly obscure name)
timotimo oh, mhm.
moritz timotimo: what do you want to do?
timotimo is there a function that will strip pod tags from a piece of string?
mucker [Coke]: pod6 can haz feature requests ?
timotimo there are links like S02.html#The_C<<_.._>>_operator 13:59
which don't work
and S05.html#When_C<$/>_is_valid
moritz those are probably generated by the Text::SmartLinks module or so
timotimo yes, they are 14:00
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
lizmat r: sub foo {...}; sub bar { foo }; bar # where did the stub code get executed?
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) …
lizmat the stack trace doesn't tell me really :-(
timotimo github.com/perl6/mu/blob/master/ut...s.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: www.cs.nott.ac.uk/~gmh/domains.html
timotimo r: sub foo { ... }; sub bar { my $v = foo; 1 }; bar()
camelia rakudo b2072f: ( no output )
moritz lizmat: I think I can explain the problem, but I don't have a good solution
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
lizmat: and then there's a thing nqp wrapper around the progrma which calls .sink on the returned Faillure
lizmat aha, so it is just a side-effect of the repl
moritz and at that point the nice backtrace printer isn't in scope anymore 14:04
lizmat I see
moritz r: sub foo { ... }; my $x = foo(); $x.sink;
camelia rakudo b2072f: OUTPUT«Stub code executed␤ in method sink at src/gen/CORE.setting:10169␤ in block at /tmp/HqMVBrq2Pw:1␤␤»
14:04 hoelzro_ is now known as hoelzro
moritz hrm, doesn't report sub foo either 14:04
so it's two problems really
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
camelia rakudo b2072f: ( no output )
moritz $ git grep 'Stub code executed' 14:06
src/Perl6/Actions.nqp: $past.push($*W.add_string_constant('Stub code executed'));
timotimo should i start a new test file S06-signature/slurpy-lol.t? 14:07
oh, that's multidimensional.t 14:08
lizmat moritz++ (note to self: get ack upgraded) 14:15
14:15 stevan__ left
[Coke] lizmat: careful upgrading to 2.x 14:15
hoelzro ack++
;)
[Coke] (some good stuff, but some non-compatible changes)
hoelzro the only thing I've really seen people complain about is -a 14:16
PerlJam hoelzro: complain about?
timotimo hoelzro: hey, have you been working towards getting perl6 into pygments master?
pmichaud good morning, #perl6
hoelzro PerlJam: regarding ack2
timotimo: it's there 14:17
has been for a month or so
=)
pmichaud: ahoy
PerlJam hoelzro: aye, but -a is one of the main reasons I upgrade to ack2 everywhere.
perigrin hoelzro: making it a no-op would have been friendlier.
timotimo cool!
hoelzro timotimo: the next step is pygments.rb, but the maintainer hasn't responded in over a month
timotimo :(
perigrin to everyone but PerlJam apparently 14:18
timotimo responded to what exactly?
hoelzro I would have preferred a warning
moritz likes default -a too
PerlJam oh, I see. people complain about the "option is invalid" message?
hoelzro PerlJam: yes
perigrin yeah the fatalness
[Coke] PerlJam: -a is the reason I downgraded. Easier than retraining my hands. :)
hoelzro -a was a giant antipattern in 1
and people expected it to do crazy things 14:19
so we removed it
PerlJam I was always typing "ack -a", so in the interest of huffman, ack2 is a win :)
hoelzro I think it was the right decision, but I would've preferred a warning
perigrin PerlJam: I haven't heard anyone complain about the new default
everyone has [Coke]'s problem.
[Coke] it's not the default that's the problem, right.
perigrin rarely used -a and *still* got bit by it yesterday.
[Coke] right.
lizmat meanwhile, adapting make_yada to show the sub it was in, is way out of my league 14:20
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
timotimo spectests his new tests for his old slurpy_lol pullrequest
lizmat "Unimplemented stub of sub foo was executed"
timotimo fwiw, i found a spectest that seems to suggest Int *@foo should work ... huh. 14:22
PerlJam timotimo: what does it mean?
timotimo 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
timotimo hehe
is the problem with S26-documentation rendering in the pod parsing inside rakudo or in Pod::To::HTML? 14:25
"the" problem %) 14:26
flussence both
timotimo i feared that :|
14:29 ilogger2 joined, ChanServ sets mode: +v ilogger2
dalek ast: 956f9fc | (Timo Paulssen)++ | S06-signature/multidimensional.t:
do some multidim slurpy tests (fudged for rakudo)
14:33
timotimo github.com/rakudo/rakudo/pull/127 - i'm confident this can be merged now 14:34
lizmat grrr, no autmatic merge anymore :-( 14:37
14:39 xenoterracide|2 joined
pmichaud timotimo: sorry if my reply to #169 is confusing... how can I help de-confuse it? 14:39
dalek kudo/nom: c94a62e | (Timo Paulssen)++ | src/Perl6/Metamodel/BOOTSTRAP.pm:
make **@ available for multi subs.
14:40
kudo/nom: 9768a8d | (Elizabeth Mattijsen)++ | src/Perl6/Metamodel/BOOTSTRAP.nqp:
Merge branch 'slurpy_lol' of github.com/timo/rakudo into timo-slurpy_lol
timotimo yays <3
pmichaud: my interpretation is: "i'm not sure if the spec requires (3/0).nude and similar things to explicitly not blow up."
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"
pmichaud: when you say "allows", that means it is acceptable for it to create a Failure instead? 14:42
r: Rat.new(3,0).perl.say
i'm not sure what such a rat even means?
camelia rakudo b2072f: OUTPUT«(timeout)»
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? :)
pmichaud which I'd interpret to mean "not a Failure"
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:</>
n: Rat.new(3,0).perl.say 14:45
camelia niecza v24-79-gcb6f20b: OUTPUT«Inf␤»
timotimo r: Rat.new(3, 0).nude.say
camelia rakudo b2072f: OUTPUT«1 0␤»
timotimo well, that's curious.
pmichaud in particular, I suspect there's a bug with Rat.Str and zero denominators
timotimo oh 14:46
yeah, haha
$d div= 5 while $d %% 5;
r: say 0 %% 5
camelia rakudo b2072f: OUTPUT«True␤»
timotimo r: say 0 div 5 == 0
camelia rakudo b2072f: OUTPUT«True␤»
pmichaud since niecza++ seems to work, maybe look at its code for stringifying Rats
timotimo r: say True...* ~~ False
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␤ ------> say True...* ~~⏏ False␤True␤»
timotimo hah, right 14:47
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
this is sounding overly complexified
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
maybe i should place zero-checks there instead.
pmichaud it should generate Failures for div by zero when one of the arguments is a Num
colomon infix:</>(Int, Int) should not divide, right?
timotimo OK, so i will move the div by zero check from DIVIDE_NUMBERS to the / subs
thanks for clearing all that up, now it makes more sense 14:50
masak .oO( it's not overly complexified until it checks .imag )
timotimo Int and Rational arguments should not create div by zero then?
and rat and rat
pmichaud what in the world is the purpose of DIVIDE_NUMBERS, anyway? 14:51
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
pmichaud it looks like it also makes Rat arithmetic really slow :-( 14:53
the checks for FatRats should probably be multicandidates
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:54
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
moritz divide by gcd 14:56
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.
colomon that's actually very important
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)
timotimo colom 14:59
no, that's not the tab key
pmichaud we should come up with a test that checks the FatRat issue
timotimo colomon: 3/2 rather than 6/4, i guess
pmichaud looks to me like DIVIDE_NUMBERS doesn't promote to FatRats 15:01
unless there's already a FatRat argument
timotimo looks again
pmichaud still, this looks like a very convoluted way of handling rats.
timotimo ah, yes, you're right
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
lizmat maybe this is also such a place? 15:03
pmichaud multi infix:</>(\a, \b) { a.Numeric / b.Numeric }
timotimo oh, right
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
timotimo (except for the comments on the right side)
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.
pmichaud the $c example looks wrong to me.
colomon benabik: right
pmichaud oh, wait, it's right
sorry, forgot my num rules.
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"
pmichaud yes, I agree.
timotimo not sure if i should put these tests into the actual spectest suite; if so: where would they go?
pmichaud .WHAT === Failure isn't the best way to test type-ness.
tests for division by zero definitely belong in roast
there might already be some somewhere :) 15:08
timotimo i'll look. 15:09
15:09 stevan_ joined
colomon S32-num/rat.t has a note about needing these tests. :) 15:09
pmichaud weird. S32-num has tests called "int.t" and "rat.t" and "fatrat.t", but there's no "num.t" :-) 15:11
this should probably go into num.t
timotimo i can certainly place that there. the tests that check for the result to be a rat should go there, too? 15:12
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"
pmichaud or, if you're wanting to test div specifically, then they can go in S03-operators
S03-operators/arith.t might make more sense. 15:14
for div-by-zero checks.
or you can just create a S03-operators/div.t
colomon +1 15:15
timotimo okay 15:16
what about is (3/0).Num, Inf, "(3/0).Num = +Inf";?
should i try to make that kind of thing work now, too?
pmichaud isa_ok
timotimo (not my code ;) )
pmichaud r: say (3/0).Num
camelia rakudo b2072f: OUTPUT«Inf␤» 15:17
pmichaud seems to me like it works already.
moritz 3/0 can't be both a Failure and Inf
timotimo oh, it already works? that's fine then
15:17 birdwindupbird joined
lizmat r: class Failure Is Inf {} 15:19
camelia rakudo b2072f: OUTPUT«===SORRY!===␤Unable to parse class definition␤at /tmp/CZ8_HqkWrP:1␤------> class Failure ⏏Is Inf {}␤ expecting any of:␤ statement list␤ prefix or term␤ prefix or meta-prefix␤ generic role␤»…
lizmat r: class Failure is Inf {}
camelia rakudo b2072f: OUTPUT«===SORRY!===␤'Failure' cannot inherit from 'Inf' because it is unknown.␤Did you mean 'Int'?␤␤at /tmp/5KP1J9kTMU:1␤------> ␤»
pmichaud what doesn't currently work according to spec is
r: say (3 / 0e0).Num
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 15:23 FROGGS joined
timotimo should i just push my spectest changes? 15:23
dalek ecs: 081817f | (Elizabeth Mattijsen)++ | S06-routines.pod:
Removed superfluous "a"
moritz hopes those changes won't happen before the compiler release tomorrow 15:24
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␤␤»
timotimo gist.github.com/timo/173b1696cbecf4c28500 - these are the suggested spectest changes, github.com/rakudo/rakudo/pull/169/files - these are the rakudo changes
colomon lizmat: surely that should be class Inf is Failure ? 15:26
15:26 skids joined
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 {}
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…
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
pmichaud timotimo: why nqp::if instead of ?? !!
lizmat pmichaud: speed ?
pmichaud lizmat: ?? !! desugars to an nqp::if -- at least it should.
timotimo pmichaud: someone told me to, i didn't question the decision 15:28
i can of course rewrite it as ?? !!
pmichaud there are places where nqp::if() is definitely better... but I don't think this is one of them.
15:28 pmurias joined
pmurias hi 15:28
timotimo very well
colomon moritz: I still kind of like the idea of Inf / -Inf as Real types of their own
pmichaud also, it can be written somewhat cleanly as 15:30
fail X::Numeric::DivideByZero.new() unless b;
nqp::div_I(....)
pmurias pmichaud: we have to decide on a communication medium for GSoC 15:31
pmichaud pmurias: email or irc works for me.
I can look at other medium if you like also.
pmurias irc or email is fine for me 15:32
pmichaud let's go for irc to begin with; if you have something lengthy or non-public to discuss, send an email 15:33
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?
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
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?
division by 0e0 now soft fails instead of hard?
timotimo yes 15:36
pmichaud I'm okay with it going in for this month.
I'm assuming there aren't any other spectest regressions :) 15:37
timotimo the patch currently isn't good, though
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.
moritz please don't; replace it with something else that dies 15:38
pmichaud ...blowing up how?
moritz it's a real test for a real regression we had in rakudo
timotimo do you have a suggestion?
moritz die
die 'blerg'
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␤␤»
moritz the "nice" thing about Failures is that they are sunk outside the try block, if the try block is in sink context
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
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
so you _could_ potentially do try { say 1 div 0 }
moritz or just use (1 div 0).Str
timotimo will do 15:42
pmichaud yes, that also.
moritz is somewhat weary of say() in tests, because it can confuse the TAP parser
15:45 potatogim_ joined 15:47 potatogim_ is now known as potatogim, Guest36317 joined 15:48 potatogim left, potatogim_ joined, potatogim_ is now known as potatogim 15:49 ajr joined, ajr is now known as Guest44890, btyler joined 15:50 Guest44890 is now known as ajr_
lizmat wonders what the "* namespace" is (S06:639) 15:50
"Operators other than the standard ones should not be installed into the C<*> namespace."
so * is a synonym for GLOBAL:: ?
in this context? 15:51
15:52 xilo_ joined
masak lizmat: I think you just found a fossil. 15:53
moritz too
masak used to be global things were declared as 'sub *foo() {}'
lizmat s/*/GLOBAL::/ ?
moritz * is already used for enough or more-than-enough things without it
masak lizmat: yah. 15:54
lizmat will do
moritz but declaring stuff in GLOBAL:: is pretty pointless
s/stuff/subs/
timotimo if that's all right with you i'll push the spectest changes i made for div-by-zeroness
15:54 xilo_ left
moritz because subs are only looked up in lexical scopes by default 15:54
timotimo and then the pull request is ready to be merged 15:55
(it does pass all tests without regressions)
lizmat 2008-11-27 07:46:29, so that reeks of fossil indeed
15:55 xilo_ joined
diakopter moritz: isn't GLOBAL also the outermost lexical scope? 15:55
dalek ast: dea51d0 | (Timo Paulssen)++ | S (3 files):
div by 0 soft-failure tests for Rat, Num.
15:56
ast: 73878e8 | (Timo Paulssen)++ | S02-magicals/dollar_bang.t:
reinstate $!.defined test with div by 0.
ecs: aff4e89 | (Elizabeth Mattijsen)++ | S06-routines.pod:
s/an/a/
15:57
ecs: 0849660 | (Elizabeth Mattijsen)++ | S06-routines.pod:
The * namespace is now called GLOBAL::
timotimo yays :) 15:58
ready to deal with any fallout that may happen
15:59 potatogim left
lizmat runs spectest on OSX 16:00
16:00 potatogim joined 16:01 potatogim left
lizmat ETA result: 18:27 16:01
aka 27 mins from now
moritz diakopter: if yes, then our "lexical scopes are immutable at runtime" assumption for 99% of our optimizations is moot 16:02
diakopter: (unless there's some snapshotting going on
)
16:02 pmurias left 16:03 dmol joined
lizmat r: sub GLOBAL::a { say "foo" }; a 16:04
camelia rakudo b2072f: OUTPUT«foo␤»
moritz r: sub WhateverNamespace::a { say 'foo' }; a
camelia rakudo b2072f: OUTPUT«===SORRY!===␤Undeclared routine:␤ a used at line 1␤␤»
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«===SORRY!===␤Undeclared routine:␤ a used at line 1␤␤»
moritz huh.
diakopter shrugs in complete ignorance
lizmat r: sub Foo::a { say "foo" }; a # I guess GLOBAL:: in that sense is special 16:07
camelia rakudo b2072f: OUTPUT«===SORRY!===␤Undeclared routine:␤ a used at line 1␤␤»
diakopter r: sub GLOBAL::a { say "foo" }; (sub { a }).() 16:08
camelia rakudo b2072f: OUTPUT«foo␤»
timotimo turns out i won't be ready to deal with lots of fallout this evening
16:10 MrMeek-afk joined 16:11 raiph left, MrMeek-afk left
timotimo i'm wondering now where the @ sign for arrays came from. i guess it kind of looks like a curled up string? 16:11
16:12 MrMeek joined
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
diakopter so are ampersand and array. also, # is spoken hash by many people 16:13
(also pound)
PerlJam @ looks like an a with long tail. 16:15
well, tail-in-the-front
huf my mnemonic seems to be "it's round like an array" 16:16
which makes zero sense. but yes.
my @x = (...) # see how round flows into round? and my $x = [ ... ] ; # pointy into pointy? :)
16:17 vk joined
PerlJam I think Camel1 had some text on why $, @, and % 16:17
16:17 th_ left
huf % is due to the two circles, key and value # i think 16:17
16:19 stevan_ left, ajr_ left
geekosaur "key/value store" 16:20
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«===SORRY!===␤Missing block␤at /tmp/69JxhFMfVw:1␤------> sub a ( $a --> ⏏$r = 2 ) { say $a; say $r }; a("foo") #␤ expecting any of:␤ statement list␤ prefix or term␤ prefix or meta-prefix␤ new name …
lizmat "If the return specification is definite but not an immutable value, then it must be a mutable container (variable) of some sort." 16:26
PerlJam looks like it to me. 16:30
I'd imagine that anything other than a type on a returns is NYI 16:32
moritz it is
PerlJam r: sub foo returns 5 { } 16:33
camelia rakudo b2072f: OUTPUT«===SORRY!===␤Missing block␤at /tmp/CNrA6M_2Du:1␤------> sub foo returns ⏏5 { }␤ expecting any of:␤ statement list␤ prefix or term␤ prefix or meta-prefix␤ new name to be defined␤»
benabik r: sub foo( --> 5 ) {}; say foo 16:34
camelia rakudo b2072f: OUTPUT«===SORRY!===␤Missing block␤at /tmp/5jZpW4iXJw:1␤------> sub foo( --> ⏏5 ) {}; say foo␤ expecting any of:␤ statement list␤ prefix or term␤ prefix or meta-prefix␤ new name to be defined␤»…
16:35 Chillance joined
lizmat so a case of NYI, check :-) 16:35
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␤␤»
PerlJam std: sub foo( --> 5 ) { } 16:39
camelia std d4cc5ab: OUTPUT«ok 00:00 44m␤»
PerlJam std: sub foo returns 5 { }
camelia std d4cc5ab: OUTPUT«===SORRY!===␤Invalid type name at /tmp/itGXiMFPrl line 1:␤------> sub foo returns ⏏5 { }␤ expecting typename␤Parse failed␤FAILED 00:00 41m␤»
PerlJam Are returns and --> asymmetric on purpose? I've always thought them interchangeable
masak PerlJam: I leafed throught S06. I think they're interchangeable. 16:48
16:50 birdwindupbird left 16:51 dmol left 16:52 ajr joined, ajr is now known as Guest4144 16:53 Guest4144 is now known as ajr_ 16:54 silug_ joined 16:57 dmol joined
timotimo lizmat: have the spectests gone through? 16:57
lizmat timotimo: yes, no problems
and thanks for reminding me :-) 16:58
timotimo yays :)
17:05 stevan_ joined
masak less than 1 hour to the #masakism workshop. 17:11
17:13 konundra joined 17:14 spider-mario joined
moritz decides spontaneously to lurk 17:18
though I don't know if I'll have IRC access during the workshop :-)
masak if you don't, you'll be an exemplary lurker :P
17:21 kaleem joined
dalek ecs: 93a7eb5 | (Elizabeth Mattijsen)++ | S06-routines.pod:
Some elaboration on possible name collisions in signatures
17:26
17:29 athomason joined 17:34 btyler left 17:35 athomason left 17:36 athomason joined
dalek rl6-roast-data: e364428 | coke++ | / (4 files):
today (automated commit)
17:37
17:37 athomason left
[Coke] rakudo is clean again (spectests) 17:37
timotimo i thought i removed those skips for multi dimensional slurpy arglists 17:40
turns out i did not 17:41
but those do succeed 17:42
lizmat too bad "skip" really skips the code, unlike "todo" 17:48
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:49
maybe "todo" should encapsulate the test in a try {} block 17:50
17:53 bluescreen10 joined
[Coke] lizmat: that's why we have autounfudge. 17:53
lizmat autounfudge? 17:54
17:54 djanatyn1 joined 17:55 Tene_ joined, Tene_ left, Tene_ joined
sorear nwc10: (arrays of bytes) do you mean 'new byte[] { 1, 2, 3, 4, 5 }' ? 17:56
[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
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.
masak tadzik: #masakism! 17:59
18:00 kaleem left, Chillance left, athomason joined
masak #masakism is now live. 18:00
FROGGS (and in color) 18:02
18:03 btyler joined 18:06 kaleem joined 18:07 Chillance joined 18:08 rindolf joined 18:09 risou_awy joined
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 :(
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
or at least, *usefully* make arrays
sorear you can make arrays of them...you just can't statically initialize them 18:14
nwc10 pants.
Thanks for the explanation
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:29
18:30 stevan_ left
diakopter sorear: well, it's quite conceivable the JIT pre-allocates them inline somewhere 18:31
nwc10 sorear: thanks. That's useful to know. Sigh 18:32
18:33 kaleem left
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:35
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 :)
but I repeat myself 18:37
nwc10 DRY violation!
TimToady people repeat DRY too often
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. :-/
sorear benabik: that's what's done now 18:42
benabik: with Base64, and a concat function because JVM string literals are limited to 64k and we have multiple megs of data
nwc10 bother bother bother. This would be (fairly) easy in C 18:43
18:44 ssutch joined
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:44
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
so it's already the machine's native layout
sorear benabik: maximum of 7.1646 bits of data per utf8-encoded byte 18:46
it's not obvious to me how to achieve this maximum 18:47
nor is it obvious that I want to try
diakopter sorear: see what I mean?
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
benabik May be relatively simple to define a base128 to at least gain that 7th bit of data. 18:48
18:49 arlinius joined
lizmat "Rakudo Perl. has had 12,646 commits made by 157 contributors representing -5,096 lines of code" OHLOH gets its wrong! www.ohloh.net/p/rakudo 18:58
I mean, a negative number of lines of code???
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!
lizmat nqp is mostly written in Java ?
masak and of course, if there's anything you'd want to write negative codes of, it's C.
lines*
flussence apparently it's 116% code and -21% comments with -208 blank lines 19:02
I guess that says something about our code density and self-documenting code :) 19:03
masak for a grand total of 95%.
PerlJam Perl is magic, as usual :)
masak blames inflation
sorear :D 19:06
nwc10 has ohloh been told that some subdirectories are private, and got confused? 19:07
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:08
moritz &s.?() maybe 19:09
PerlJam moritz: would that worked, it would be perfect :)
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␤␤»
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"
camelia rakudo b2072f: OUTPUT«OH HAI␤alive␤»
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:11
masak I don't know about anything built-in. 19:12
some 75 minutes in, #masakism is finally picking up some speed. a nice discussion going on. 19:15
flussence r: sub do-stuff(&h?) { try &h() }; do-stuff({ say 'blah' }); do-stuff(); 19:16
camelia rakudo b2072f: OUTPUT«blah␤»
PerlJam oh! 19:17
flussence++
ssutch try is an operator? or does it create an anonymous closure? 19:18
lizmat I was thinking something with postcircumfix:<?( )>
so you could do &h?(params) 19:19
masak lizmat: yes, me too.
moritz std: my &a; &a.?()
camelia std d4cc5ab: OUTPUT«ok 00:00 44m␤»
masak o.O
moritz: I honestly thought you were making the syntax up! 19:20
lizmat std: my &a; &a?()
camelia std d4cc5ab: OUTPUT«===SORRY!===␤Confused at /tmp/ExdIFgQVcr line 1:␤------> my &a; &a⏏?()␤ expecting any of:␤ POST␤ feed_separator␤ infix␤ infix or meta-infix␤ infixed function␤ postcircumfix␤ postfix␤ postfix_prefix_meta_operator␤
..postop␤ statem…
lizmat too bad
masak r: my &foo; &foo.?() 19:21
camelia rakudo b2072f: OUTPUT«===SORRY!===␤Cannot use .? on a non-identifier method call␤at /tmp/o3hjDt5GG1:1␤------> my &foo; &foo.?()⏏<EOL>␤»
PerlJam another related weird want I have is a way to say @array.push($foo) if ?$foo; without mentioning $foo twice.
masak PerlJam: sounds like you keep wanting the Maybe monad!
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
flussence wait, should probably just be "or" there 19:22
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"
lizmat the way I understand it
PerlJam s/other/otherwise/
lizmat: yep
flussence hm
.oO( isn't that what andthen/orelse are supposedly for? )
19:24
19:24 rindolf left
masak lizmat: but .() is (sugar for) a method! :) 19:24
[Coke] rakudo: no and then; 19:25
camelia rakudo b2072f: OUTPUT«===SORRY!===␤Undeclared routines:␤ and used at line 1. Did you mean '&rand', '&end', '&any'?␤ no used at line 1␤ then used at line 1␤␤»
19:26 Tene_ is now known as Tene 19:27 tomyan joined, domidumont left
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␤␤»
lizmat with some syntactic sugar :-) 19:33
dalek kudo-star-daily: c8c82f3 | coke++ | log/ (5 files):
today (automated commit)
19:41
19:42 jaldhar joined
[Coke] r: sub a (&c?) { say &c; c() } ; sub b {say "b"}; a(&b) 19:49
camelia rakudo b2072f: OUTPUT«sub b() { ... }␤b␤»
[Coke] I think your example should fail. just maybe not with that particular error message.
(you're not passing in a c, so you're getting, what, a class ?) 19:50
r: sub a (&c:D) { say &c; c() } ; a()
camelia rakudo b2072f: OUTPUT«===SORRY!===␤invoke() not implemented in class 'QAST::Op'␤»
[Coke] there, that's a fun one. 19:51
:)
19:52 Rotwang joined
diakopter r: sub (&c:c) { } 19:52
camelia rakudo b2072f: OUTPUT«===SORRY!===␤invoke() not implemented in class 'QAST::Op'␤»
pmichaud r: sub a (&c?) { say &c.WHAT; }; a() 19:53
camelia rakudo b2072f: OUTPUT«(Callable)␤»
pmichaud it's an undefined Callable.
r: say Callable.();
camelia rakudo b2072f: OUTPUT«invoke() not implemented in class 'Callable'␤ in block at /tmp/eM9nQDuBqW:1␤␤»
diakopter pmichaud: the bug just above is compile-time, it seems 19:54
pmichaud not sure which bug 19:55
diakopter pmichaud: the one I was golfing for [Coke] 19:56
lizmat r: sub (&c:c) { } # I think diakopter meant this one
camelia rakudo b2072f: OUTPUT«===SORRY!===␤invoke() not implemented in class 'QAST::Op'␤»
pmichaud is :c even implemented?
lizmat of :D, doesn't make a difference in the error
pmichaud r: sub a (&c:D) { say &c.WHAT }; 19:57
camelia rakudo b2072f: OUTPUT«===SORRY!===␤invoke() not implemented in class 'QAST::Op'␤»
pmichaud yeah, that looks like a compile-time bug.
lizmat r: sub a (&c:D) {} # golfed down even more
camelia rakudo b2072f: OUTPUT«===SORRY!===␤invoke() not implemented in class 'QAST::Op'␤»
pmichaud r: sub a($x:D) { say $x.WHAT } 19:58
camelia rakudo b2072f: OUTPUT«===SORRY!===␤invoke() not implemented in class 'QAST::Op'␤»
pmichaud but it doesn't seem to be limited to callables
r: multi sub a($x:D) { say $x.WHAT }
camelia rakudo b2072f: OUTPUT«===SORRY!===␤invoke() not implemented in class 'QAST::Op'␤»
[Coke] .to pmichaud "did anyone know this syntax worked?"
yoleaux [Coke]: I'll pass your message to pmichaud.
pmichaud oh, yeah... that's not really the syntax, is it? 19:59
yoleaux 19:58Z <[Coke]> pmichaud: "did anyone know this syntax worked?"
pmichaud r: multi sub a(Callable:D \c) { say c.WHAT; } 20:00
camelia rakudo b2072f: ( no output )
pmichaud r: sub a(Callable:D \c) { say c.WHAT; }
camelia rakudo b2072f: ( no output )
pmichaud oops, gotta run.. bbl
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
I thought that idea was abandoned?
[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␤␤»
lizmat seem to recall asking something like this here, and moritz/masak claiming it was not going to happen
[Coke] I think that's where he was headed. Sorry about my confused syntax. ;)
lue hello world o/ 20:13
lizmat hello lue!
20:14 tomyan left 20:16 xilo_ left 20:17 xilo_ joined 20:18 djanatyn1 is now known as djanatyn
sorear hello lue! 20:19
masak hellue!
lue: there's a #masakism going on if you're interested :)
1h40m left of it. 20:20
lue I thought there was. :)
20:22 xilo_ left, xilo_ joined
sorear what's #masakism? 20:24
sorear is all antsy for jnthn to get back soon
masak sorear: it's a workshop.
people learn Perl 5 and Perl 6, solve a given set of task, win prizes, and talk about programming.
see strangelyconsistent.org/blog/after-...m-workshop 20:25
20:30 SmokeMachine joined
colomon o/ # back from the Flint Children's Museum 20:31
lizmat r: my %a=a=>1; my $b=1; say %a<b> ~~ $b # wonders whether this should warn (from #masakism) 20:32
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
lizmat r: my %a=a=>1; my $b; say %a<b> ~~ $b # doesn't warn
camelia rakudo b2072f: OUTPUT«True␤»
colomon huh 20:34
20:34 konundra left
TimToady in general, using $variable.ACCEPTS is a recipe for pain; this is just an instance of that 20:34
smartmatching is most for letting constants do .ACCEPTS 20:35
*mostly 20:36
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?
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 )␤»
colomon \o sorear 20:39
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«===SORRY!===␤Missing block␤at /tmp/QSOxuarRp3:1␤------> multi a (0)⏏;(1);(2) { say "0 or 1 or 2" }; a(1) # o␤ expecting any of:␤ statement list␤ prefix or term␤ prefix or meta-prefix␤ new name to b…
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:42
lizmat ok, but still not clear on which syntax is being reserved here :-) 20:43
(0;1;2) or (0);(1);(2) ?
PerlJam lizmat: multi a (0;1;2) { ... } # this one
(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:54 xilo_ left 20:55 xilo_ joined
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
lizmat is confused, as nothing like #OK is specced, it seems 20:57
sorear jnthn! :D 20:58
20:58 xilo_ left
jnthn o/ 20:58
20:58 xilo_ joined
sorear jnthn: gist.github.com/sorear/5804522 20:58
jnthn o.O 21:00
sorear++
Nice work!
t/01-sanity/99-test-basic.t ........ ok
That one is nice. :)
huh, the more basic tests are failing and the more complicated ones are passing :P
21:01 skids left 21:02 Rotwang left
FROGGS hi jnthn 21:03
jnthn o/ FROGGS
FROGGS r: say 10 ~~ /(\d+)/
camelia rakudo b2072f: OUTPUT«「10」␤ 0 => 「10」␤␤»
FROGGS r: say 10 ~~ m:P5/(\d+)/
camelia rakudo b2072f: OUTPUT«「10」␤ 0 => 「10」␤␤»
FROGGS hmmm
jnthn: how was RL? 21:04
jnthn FROGGS: Um, surprisingly like work :P
Also I spent a bunch of it sick.
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...
sorear Only one ++ for those passing tests? :( :P
21:05 xilo_ left
FROGGS sorear++ # :o) 21:05
masak sorear++ sorear++ sorear++
21:05 xilo_ joined
masak greedy bastard :P 21:05
FROGGS sorear++? <-- would that be non-greedy karma? 21:06
jnthn sorear: Does the "use v6" thing Just Work now?
jnthn is gonna have to see the commit logs :)
sorear jnthn: Yes
jnthn \o/
Which means gather/take must be working nicely. \o/
sorear++ for that :) 21:07
sorear gather/take is working nicely
also I had to fix a bug in the multi cache
I ran into a lot of bugs, really
jnthn Not surprised; I did cheat plenty here and there :) 21:08
Lemme guess...the multi cache one was missing decont stuff?
jnthn knows that this was missing in various places...
sorear jnthn: Yeah, decont
masak sorear: I would just like to tell you that you are awesome.
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 :)
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
jnthn Yes, that would be interesting ;)
sorear 1..N was pretty deeply broken, too
jnthn I was aware of that one. iirc, 'cus postcircumfix:<( )> was broken and cmp depends on it. 21:11
sorear I fixed postcircumfix:<( )>
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?
Ah
sorear so Order.(1) was sort of acting like 1()
jnthn yeah
sorear once I had postcircumfix:<( )> working, I had to add subsignatures to the binder
jnthn Seems you've discovered and dealt with lots of my "oh, I'll do that later"
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 :)
jnthn pulls/builds :D 21:14
pmichaud wants more tuits.
jnthn I'm hoping to be useful for Perl 6 stuff again soon. It may be as soon as tomorrow. We'll see.
lizmat pmichaud: just tell woolfy where to send them 21:15
[Coke] jnthn: good luck catching up with sorear. :)
lizmat++
pmichaud lizmat: I mean tuits as in "able to make commits" kind of tuits. :)
I have plenty of the wooden kind at the moment. :)
sorear jnthn: pmichaud++ gave me a commit bit, so everything you need is in the main rakudo repo
woolfy pmichaud: but, but, I want to send hundreds more to you!
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 p: 8527f8b | sorear++ | src/vm/jvm/ (2 files):
Add a bit of metadata to query the entry-point block for a compunit at runtime
p: 64ea085 | sorear++ | src/vm/jvm/runtime/org/perl6/nqp/runtime/ContextKey.java:
Fix comment thinko
p: 1406a72 | sorear++ | src/vm/jvm/ (4 files):
Encapsulate stdio and System.exit into the GlobalContext
lizmat actually, if anybody wants the wooden ones to give away, please let woolfy know
pmichaud woolfy: btw, thanks to your information the robotics teams are planning to have wooden nickels to give out at contests :)
we're already working on the designs :) :)
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?"
woolfy I am sure the people at the Old Time Wooden Nickel Co are pleased with your business.
pmichaud I suspect they're more pleased with yours. :) :) 21:18
I wonder if you can get a referral credit.
woolfy The biggest problem they have is finding staff to fulfill all the orders.
pmichaud I'll have to check.
anyway, I have to run off again -- bbl
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
woolfy pmichaud++
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...
jnthn sorear: Well, if we do that we can get rid of the base64-ness of the blob too
sorear: I think it'd be nice if we could still produce classfiles 21:19
sorear: But it doesn't have to be the *only* way.
jnthn ponders
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
jnthn But if it's the thing that is mostly to blame for startup time...well...may not be a lot of choice...
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"
jnthn ah, ok
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:23 Chillance left
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.
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
sorear: One thought though: a JAR file is really just a ZIP, and a JVM knows how to run one of those directly.
sorear jnthn: nqp.class and perl6.class can stay as pure classfiles, everything else is loaded by nqp::loadbytecode
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.
benabik Yes, although I don't recall how to access them.
sorear getClass().getResourceAsStream(...)
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
sorear: So it'd be rather undisruptive, I suspect.
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
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
ssutch PerlJam what is !!! ?
sorear I'd also like to design the system so that you can combine everything into one jar and it will work sanely
[Coke] placeholder code that explodes if you run it.
jnthn sorear: +1 21:29
[Coke] r: class C { has $.a = !!!; };
camelia rakudo b2072f: ( no output )
[Coke] r: class C { has $.a = !!!; }; C.new.perl.say
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…
jnthn sorear: I'd had that as a medium term goal, but if we get it short term, that's great :)
PerlJam ssutch: see S06:450
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…
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
jnthn Aww, seems stage parse got slower somewhere along the way.
benabik ssutch: You can even provide messages like !!! 'needed a foo'
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 vk left
jnthn 33s last time I remember, 38s now. Not a huge deal, though curious which change did it. :) 21:31
*changes
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
camelia niecza v24-79-gcb6f20b: OUTPUT«Potential difficulties:␤ $a is declared but not used at /tmp/zxcxouKZHs line 1:␤------> class C { has $.a; multi method new(:⏏$a!, *%_) { !!! }; multi method new(*%_)␤␤Unhandled exception: Excess arguments to Mu.bless, used 2 of 3 posit…
..rakudo b2072f: OUTPUT«C.new(a => Any)␤»
flussence n: class C { has $.a; multi method new(:$a!, *%_) { !!! "be quiet, $a." }; multi method new(*%_) { self.bless(*, %_) } }; C.new().say
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…
flussence I would've expected that to hit the !!! at some point 21:33
sorear jnthn: also, something I discovered while profile
jnthn: you know how startup uses nearly two cores, and you blamed it on parallel/concurrent GC?
21:33 fgomez joined
jnthn sorear: That was my first guess 21:33
sorear It's actually background "JIT" compilation. 21:34
jnthn sorear: What is it really?
Oh!
sorear If you use -Xint or -Xbatch user ~= wall
jnthn Well, that's a reasonable enough use of another core :)
davidagain r: !!! or die; 21:35
camelia rakudo b2072f: OUTPUT«===SORRY!===␤Undeclared routine:␤ or used at line 1␤␤»
benabik star: use JSON::Tiny; say from-json('1') # bug, or are bare numbers invalid JSON?
camelia star 2013.02: OUTPUT«Any()␤»
geekosaur bare numbers are technically invalid 21:36
ssutch bare numbers are invalid
geekosaur the top level thing must be a container (array or record)
ssutch a lot of json parsers will be quiet
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.
geekosaur although in that case it probably ought to return some kind of delayed? exception 21:37
[Coke] sorear: I would appreciate it the runner that lives in t/spec still worked. 21:39
(that's what I use for the daily runs.()
(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:40
sorear [Coke]: t/harness ? 21:43
I was going to add JVM support to t/harness
21:43 twigel joined
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:44
(semantically, todo $foo becomes $impl =~ /^\Q$foo\E(?:$|\.)/) 21:45
21:45 spider-mario left
[Coke] roast's test_summary 21:47
as long as that still works.
21:48 FROGGS left
sorear ok. 21:49
dalek p: e983565 | jnthn++ | src/vm/jvm/runtime/org/perl6/nqp/runtime/Ops.java:
Fix nqp::pow_I argument order.

Unbusts 02-math.t for Rakudo JVM.
21:50
ssutch how do i call the base constructor from new? is it just self.bless(param => $val, pram2 => $val2)
jnthn ssutch: You probably want to be calling .bless 21:51
ssutch: But if you do want to call the base constructor, use callwith(...)
or callsame to pass exactly the same args
21:51 ajr_ left
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")␤»
ssutch is that right?
lue r: say (41.0).round(5)
camelia rakudo b2072f: OUTPUT«40␤»
lue r: say (41).round(5) # round doesn't like Ints
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␤␤»
masak r: say 41.round 22:02
camelia rakudo b2072f: OUTPUT«41␤»
masak lue: seems the Rat version takes an optional parameter, but the Int version doesn't. 22:03
lue: plz file a rakudobug :)
lue does so
22:03 xilo_ left
masak lue++ 22:04
was that a #masakism-induced rakudobug? I suppose it was.
dalek p: 99437d4 | jnthn++ | src/vm/jvm/QAST/Compiler.nqp:
Fix nqp::xor code-gen thinko.

Fixes 03-op-logic.t in Rakudo JVM sanity tests.
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
22:05 bruges joined
[Coke] ... that didn't take long. :) 22:06
(jnthn commiting again)
jnthn sorear: Seems I fixed 06-op-inplace.t by accident too
sorear: So, 3 more down...
22:07 arlinius left 22:08 risou_awy left, ponbiki joined 22:09 ponbiki is now known as Guest33284 22:10 risou_awy joined, xilo_ joined, tomyan joined
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_ left, xilo_ joined
sorear jnthn: yay! jnthn++ 22:16
dalek p: 675a069 | jnthn++ | src/vm/jvm/runtime/org/perl6/nqp/runtime/Ops.java:
Implement nqp::getlex* ops.

Gets first test of Rakudo JVM 10-regex.t passing.
22:20
22:22 bluescreen10 left 22:24 skids joined 22:25 rindolf joined 22:26 davidagain left
dalek kudo/nom: cd1b750 | jnthn++ | t/00-parrot/10-regex.t:
Fix test to emit ~$/, not $/, into TAP.

The .gist meant the perfect quotes got emitted into the TAP output, which for some reasons seems not to have confused things, but was not intentional.
22:26
22:29 tomyan left, jaldhar left, jaldhar joined
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:35
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?
jnthn lemme check
sorear: yes, that looks just right 22:38
timotimo ssutch: .defined will work
jnthn ssutch: Checking definedness rather than truthiness is usually enough
22:39 arlinius joined
ssutch if (!$constant.defined && !$sub-message.defined) || ($constant.defined && $sub-message.defined) { die "either constant OR sub-message must be provided"; } 22:40
seems good enough, if not pretty :) 22:42
thanks!
22:43 cognominal joined 22:44 xenoterracide|2 left
sorear bah, I must've missed a global 22:44
22:44 xenoterracide|2 joined
sorear eval server only works properly the first time :| 22:44
22:45 btyler left
jnthn tried to keep the number of those pretty close to zero... 22:45
You already fixed the leak in the Rakudo binder that I was aware of 22:46
There's the statics in Rakudo.Ops. I wonder if theu are to blame.
*they
sorear jnthn: I got rid of those already, and the current testing is with nqp
something in nqp itself is being global when it shouldn't be
jnthn ah, ok
sorear ohhhh I think I know
we can't share classes between globalcontexts because each indy site is a global 22:47
ModuleLoader takes some care to separate classes by globalcontext
but nqp.class is being loaded by Class.forName because I wasn't thiniking straight
jnthn ah 22:48
sorear s/ModuleLoader/LibraryLoader/
timotimo jnthn: welcome back :) 22:49
jnthn o/ timotimo :)
jnthn wasn't planning to hack on anything tonight, but is finding it somewhat theraputic.
sorear jnthn: which tests are left? 22:50
22:50 dmol left
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:51
oh, and I think 99-test-basic.t doesn't pass here 22:52
Didn't look into that yet
masak jnthn++ sorear++ # dynamic duo
jnthn Just having to build a Rakudo Parrot to cross-check something in Cursor
timotimo error:imcc:loadlib directive could not find library `perl6_group' - nooooooooooooooooo
on my other machine as well ;_;
how do i cope without a debugger? :/ 22:53
jnthn Apart from...the Rakudo on Parrot hangs o.O 22:54
timotimo: What's giving you that error? 22:55
timotimo panda install Rakudo::Debugger
jnthn hmm
timotimo gist.github.com/timo/ae01090a2fb84dc47fc0
jnthn Could it be picking up a wrong nqp in the path?
I'm not sure what the panda build looks like...
sorear after changing from Class.forName to bytecode magic, I uh... 22:57
tried to load a shell script as a class
the JVM was not amused
jnthn hehe
Hm, the Rakudo on Parrot still hangs :( 22:58
jnthn tries building a latest NQP Parrot too
22:59 stevan_ joined, cooper joined, cooper left, cooper joined
sorear gist.github.com/sorear/5818880 22:59
masak oh, you got a MacBook Air. good for you. :) 23:00
23:00 jaldhar left
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?
jnthn That's faster :)
sorear++
dalek p: 44e8b94 | sorear++ | / (3 files):
Preliminary eval server stuff. Load the JVM once and then run your program several times, isolated in a globalcontext.
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 :)
*thing
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
masak sorear: I must've, but I didn't really connect the dots, I guess.
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
it'll be enabled in the eval server, disabled in CompilationUnit.enterFromMain, and other hosts can do whatever they want
jnthn +1 23:04
darn. Rakudo Parrot still hangs on startup. Is anybody else seeing this on current nom HEAD?
sorear I spectested yesterday before pushing my jvm changes 23:05
it's either very new or specific to your setup
with --gen-nqp; I didn't test rakudo parrot on HEAD nqp
btw, this is "token": 23:06
Stefans-MacBook-Air:nqp-jvm sorear$ cat token
54550 ggTKqSth5JE+Apwd2hcZbQ==
23:07 xilo_ left
jnthn aha 23:07
jnthn wondered what the token thing was :)
sorear the sanest way to do IPC is local TCP, but that's insecure without additional measures 23:08
eval-client.pl connects to the port and passes the cookie
and the file is created mode 600 so other users on a unix system can't read it
I'm not 100% sure Windows Java will do something sane with the permission-set request
I think Windows defaults files to readable-by-owner-only, so it's fine if it's just ignored 23:09
(the unix default is writable-owner readable-everyone)
geekosaur strictly speaking, the unix default is writable-all, but most login setups force a umask that isn't 0 23:11
sorear jnthn: I count 11 callsites in IndyBootstrap, of which 6 are used currently. Should the others be culled? 23:13
sorear is about to add another version of wval_noa that takes a CompilationUnit and an int 23:14
jnthn sorear: I think I kept them around because stage0 still used them. 23:16
sorear: But a rebootstrap may have already changed that by now
23:19 cooper left 23:21 xilo_ joined, snearch left 23:22 xilo_ left
jnthn Well, it appears the line that hangs is my $CWD = nqp::p6box_s(pir::new__PS('OS').cwd).path; 23:22
sorear nqp::wval? what's that used for 23:23
23:26 stevan_ left
jnthn sorear: I'm not convinced it actually is used... 23:26
23:27 stevan_ joined
sorear is diving into the SC code with only a foggy idea how it works 23:28
jnthn r: IO::Spec::Win32.split('C:\consulting\rakudo') 23:29
camelia rakudo b2072f: ( no output )
jnthn r: say IO::Spec::Win32.split('C:\consulting\rakudo')
camelia rakudo b2072f: OUTPUT«"volume" => "C:" "directory" => "\\consulting" "basename" => "rakudo"␤»
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
or, hmm.
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
Otherwise you couldn't reference objects from other modules
sorear Oh
jnthn Note that wval indy thing, iirc, gets passed the tc
From which you can find the gc
sorear I thought that added a reference into the current SC
jnthn Maybe that helps separate things out?
No
That's why wval takes two things: an SC handle and an index. 23:31
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?
That maps those to the actual handles? 23:33
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
hanging off the runtime CompilationUnit
lue blag toast (after a long time)! rdstar.wordpress.com/2013/06/19/a-...-progress/ 23:35
masak heh, lue++ 23:36
sorear What triggers the addition of objects to a SC being built?
23:37 benabik joined
jnthn HLL::World has an add_object method 23:38
Anything to be referenced by a QAST::WVal will have had that called on it at some point
Tracked down the hang, sort of
It's in IO::Spec::Win32.path
uh
It's in IO::Spec::Win32.split
masak jnthn: at runtime? 23:39
23:40 xilo_ joined
jnthn masak: At startup, in terms.pm, we end up hitting that 23:40
And it hangs
Which means Rakudo hangs at startup on Windows at present :(
masak jnthn: my bet is on the second regex match in that method, the m// one that spans a few lines. 23:41
it has enough quantifiers and stuff to make it suspect. 23:42
jnthn Will know which line it is soon
masak: appears so 23:45
r: say IO::Spec::Win32 23:48
camelia rakudo b2072f: OUTPUT«(IO::Spec::Win32)␤»
jnthn r: say IO::Spec::Win32.split(q[C:\consulting\rakudo])
camelia rakudo b2072f: OUTPUT«"volume" => "C:" "directory" => "\\consulting" "basename" => "rakudo"␤»
jnthn But...it gets it instantly there. 23:49
23:50 btyler joined
masak jnthn: I was right? heh. 23:51
jnthn masak: about the line, yeah. But...I'm not sure what's going on :/ 23:52
masak hm, it's on Parrot, so it's not likely to be a regex engine bug... 23:53
and yeah, it's weird that the above p6eval^Wcamelia oneliner doesn't similarly hang.
what's different?
jnthn No idea 23:55
23:57 [particle]1 joined 23:58 btyler left