Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2013-11-14

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:12 Psyche^ joined #perl6
00:15 timotimo i may have been losing the last line due to not manually closing the file handler
00:27 timotimo should i have to declare my own $/ locally in order for parallel matchings to not explode?
00:28 timotimo bleeeeeeh
00:28 timotimo nominal type check failed for parameter null? really? :(
00:32 timotimo jnthn: i'm getting some weirdness when doing m/.../ in multiple parallelly executed blocks, even if i manually define a $/, or if i $foo ~~ m/.../ -> $match instead
00:32 dalek specs: 135ce6e | larry++ | S17-concurrency.pod:
00:32 dalek specs: to iterate a channel, just use list context, duh
00:32 dalek specs: review: https://github.com/perl6/specs/commit/135ce6e864
00:33 timotimo actually, i have two different matchings going on in there, maybe they overlap in a bad way?
00:37 timotimo finely locking around the ~~ invocations with regexes, i can seem to get around the exceptions
00:37 timotimo and get each of my 4 cores to 90% usage
00:39 jeff_s1 joined #perl6
00:49 timotimo i'm losing the last line and don't know why
00:49 timotimo maybe because it doesn't have a newline at the end?
00:51 timotimo yeah, i don't actually see any code to handle the last line if it doesn't end in a newline
00:53 timotimo i think i'll have to get some rest before i tackle this code.
00:53 BenGoldberg joined #perl6
00:56 stevan_ joined #perl6
01:04 prevost joined #perl6
01:15 nnunley joined #perl6
01:20 btyler joined #perl6
01:36 cooper joined #perl6
01:40 davecc joined #perl6
01:42 davecc joined #perl6
01:48 mtk joined #perl6
01:54 xinming joined #perl6
02:02 amkrankruleuen joined #perl6
02:02 amkrankruleuen joined #perl6
02:08 dalek perl6-roast-data: 1b5a5ef | coke++ | / (5 files):
02:08 dalek perl6-roast-data: today (automated commit)
02:08 dalek perl6-roast-data: review: https://github.com/coke/perl6​-roast-data/commit/1b5a5ef7b3
02:08 dalek specs: 3490ccd | larry++ | S17-concurrency.pod:
02:08 dalek specs: missed some s/Publish/Supply/
02:08 dalek specs: review: https://github.com/perl6/specs/commit/3490ccd8da
02:11 mtk joined #perl6
02:24 telex joined #perl6
02:37 dalek roast: 6d5ee70 | coke++ | S32-exceptions/misc.t:
02:37 dalek roast: Add test for RT #86880
02:37 dalek roast: review: https://github.com/perl6/roast/commit/6d5ee705b1
02:37 synopsebot Link: https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=86880
02:45 tgt joined #perl6
02:46 slavik joined #perl6
03:07 dalek roast: 2aa5824 | coke++ | S02-types/range.t:
03:07 dalek roast: Add test for RT #116014
03:07 dalek roast: review: https://github.com/perl6/roast/commit/2aa5824e66
03:07 synopsebot Link: https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=116014
03:27 logie joined #perl6
03:29 colomon joined #perl6
03:37 [Coke] lizmat: here's a deprecation ticket for you to attack: https://rt.perl.org/Ticket/Display.html?id=114012
03:43 stevan_ joined #perl6
03:51 ssutch joined #perl6
03:52 dalek roast: 0c1a416 | coke++ | S03-metaops/hyper.t:
03:52 dalek roast: note test that satisfies RT #74890
03:52 dalek roast: review: https://github.com/perl6/roast/commit/0c1a416002
03:52 synopsebot Link: https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=74890
04:09 * lue finds the line "my $EDGE_FATE            := 0;" surprisingly disturbing :)
04:19 preflex joined #perl6
04:34 bbkr joined #perl6
04:48 lowpro30 joined #perl6
04:56 davecc joined #perl6
04:59 dalek nqp: 53f5382 | dwarring++ | examples/rubyish/ (8 files):
04:59 dalek nqp: rubyish tweaks
04:59 dalek nqp: review: https://github.com/perl6/nqp/commit/53f5382a96
05:08 SamuraiJack_ joined #perl6
05:45 logie joined #perl6
05:54 logie joined #perl6
05:59 xinming joined #perl6
06:10 dalek nqp: 75a03f2 | dwarring++ | examples/rubyish/examples-​rubyish/fractal-tree.rbi:
06:10 dalek nqp: fixed rubyish fractal example
06:10 dalek nqp: review: https://github.com/perl6/nqp/commit/75a03f240f
06:19 denis_boyun joined #perl6
06:27 kaleem joined #perl6
06:27 [Sno] joined #perl6
06:30 dmol joined #perl6
06:32 sftp joined #perl6
07:21 brrt joined #perl6
07:22 logie joined #perl6
07:24 FROGGS joined #perl6
07:35 ssutch joined #perl6
07:45 iSlug joined #perl6
08:09 zakharyas joined #perl6
08:34 frdmn left #perl6
08:40 retupmoc1 joined #perl6
08:40 b^_^d joined #perl6
08:40 genehack joined #perl6
08:41 smash_ joined #perl6
08:41 sivoais_ joined #perl6
08:44 kurahaupo joined #perl6
08:44 daxim joined #perl6
08:44 mls joined #perl6
08:44 perigrin joined #perl6
08:44 BinGOs joined #perl6
08:44 gfldex joined #perl6
08:46 odoacre_ joined #perl6
08:47 telex joined #perl6
08:47 c1sung_ joined #perl6
08:47 LordVorp joined #perl6
08:47 p5eval joined #perl6
08:47 bakedb joined #perl6
08:47 revdiablo joined #perl6
08:47 GlitchMr joined #perl6
08:48 sftp joined #perl6
08:52 Khisanth joined #perl6
09:24 * lizmat drops a pin
09:25 daxim
09:26 lizmat you're it
09:35 timotimo :)
09:36 hoelzro ahoy #perl6
09:37 * timotimo should fix some of the tests he b0rked
09:37 FROGGS o/
09:37 dakkar joined #perl6
09:43 moritz \o
09:55 SamuraiJack joined #perl6
09:58 baest joined #perl6
10:00 * timotimo has a prototype fix for lines() working on no-end-of-line-at-end files
10:00 timotimo IO::Async::File.lines to be precise
10:10 iSlug joined #perl6
10:11 nwc10 good UGT, #perl6
10:11 nwc10 who is it? (in the sense of doing the next release)
10:11 nwc10 which I think is next Thursday for the compiler
10:11 timotimo i thought it was going to be moritz
10:11 timotimo yes, 6 days
10:14 timotimo there is no function to rename/move a file?
10:17 moritz isn't masak++ traditionally doing the November release?
10:17 moritz ah no, lizmat++ does, according to docs/release_guide.pod
10:18 moritz I'll just do the star release
10:18 timotimo oh, are you the star releaser then?
10:18 timotimo good to know
10:18 hoelzro have people started coming up with cool advent calendar ideas? =)
10:18 FROGGS hoelzro: still thinking
10:27 timotimo jnthn: is there a good reason to keep the initial read attempt size at 32 kbytes? it would seem like with an async lines() it would be cool to get the first line ASAP, so maybe reduce the initial read amount to 1kbyte or so?
10:28 moritz timotimo: a read that's smaller than the system buffer size won't be much faster
10:29 timotimo oh, ok
10:29 timotimo i didn't lose the last line this time \o/
10:32 kivutar joined #perl6
10:33 timotimo er, i was wrong.
10:33 FROGGS :/
10:38 tgt joined #perl6
10:40 pecastro_ joined #perl6
10:40 nwc10 however, system buffer size more likely to be 4K than 32K. But, careful benchmarking for the win here
10:40 moritz how big are the chunks typically in which stuff is read from disc?
10:40 nwc10 and this is subtle optimisation, so maybe not as much of a win as dropping the memory use
10:40 nwc10 moritz: yes. :-)
10:41 nwc10 moritz: possibly not the same as the buffer size
10:41 nwc10 moritz: and will vary between everything.
10:41 timotimo right. i should get back to bigger memory wastages :P
10:43 timotimo huh, apparently i didn't rebuild enough of ... everything
10:43 timotimo to get my code changes to apply
10:43 timotimo moritz: can you assist me with figuring this out properly?
10:44 moritz timotimo: is that concurrent stuff?
10:44 timotimo i was editing a .java file in src/vm/jvm/runtime/org/perl6/.../io/ and doing make j-install in nqp, then in rakudo
10:44 timotimo it's makefile stuff :)
10:44 moritz ok
10:44 timotimo some missing dependency, but where?
10:45 moritz wait wait wait, what happened?
10:45 timotimo well, first i'll verify with a j-clean j-install that my changes are actually in the right place
10:45 moritz so far you have described what you did, but not what's wrong?
10:45 timotimo oh. my changes didn't cause any change in the behavior. i added some debug prints that really should have been hit
10:46 moritz did the 'make j-install' in nqp recompile anything?
10:46 timotimo jes
10:46 timotimo javac -source 1.7 -cp 3rdparty/asm/asm-4.1.jar:3rdparty/a​sm/asm-tree-4.1.jar:3rdparty/jline/​jline-1.0.jar:3rdparty/jna/jna.jar -g -d bin src/vm/jvm/runtime/org/perl6/nqp/io/*.java src/vm/jvm/runtime/org/perl6/nqp/jast2bc/*.java src/vm/jvm/runtime/org/perl6/nqp/runtime/*.java src/vm/jvm/runtime/org/perl6/nqp/sixmodel/*.java src/vm/jvm/runtime/org/perl​6/nqp/sixmodel/reprs/*.java src/vm/jvm/runtime/org/perl6/nqp/tools/*.java
10:47 timotimo so it was in there
10:47 moritz and then, did rakudo's make recompile anything?
10:48 moritz (it does for me)
10:48 timotimo no, it did not
10:48 timotimo i may need to run configure.pl again?
10:49 moritz no
10:49 timotimo er ... huh?!
10:49 timotimo i did a full rebuild and my debug print is still not getting executed?
10:49 timotimo i must be doing something horribly wrong
10:51 moritz wut.
10:51 moritz I just did a  touch src/vm/jvm/runtime/org/perl​6/nqp/io/SocketHandle.java; make j-install
10:51 moritz and then in rakudo, 'make j-all'
10:51 moritz and it recompiled lots of stuff
10:52 timotimo OK, it may not be build system trouble, it may be ... me missing something blindingly obvious i guess
10:52 moritz quite possible :-)
10:53 timotimo System.out.println("test") should give some output, right?
10:53 moritz one might think so :-)
10:56 timotimo no rebuilding is taking place in rakudo's j-all :(
10:59 timotimo herp...?! a debug say in the lines method of the nqp-level object gets executed, it then calls Ops.linesasync, which starts with a debug System.out.println that *does not* get called ... what?!?
11:00 timotimo okay, i added a die_s to the beginning and that doesn't get hit either :o
11:01 timotimo i'll have to do this with jdb i fear. but first i have some errands to run
11:01 brrt left #perl6
11:06 Celelibi joined #perl6
11:06 timotimo it annoys me that i can't just replace "java" with "jdb" in the commandline >:(
11:33 Celelibi joined #perl6
11:40 rindolf joined #perl6
11:59 iSlug joined #perl6
12:08 xinming joined #perl6
12:35 kaleem joined #perl6
12:36 kaleem joined #perl6
12:41 lizmat moritz: it's going to be a bit difficult for me to release Rakudo on the 21st, as I'll be on route to Kopenhagen that day
12:41 lizmat so it may become the 22nd
12:41 lizmat *Kobenhavn
12:42 * moritz understood Kopenhagen just fine :-)
12:42 lizmat it was the Dutch spelling, and maybe the German ?
12:42 moritz ja :-)
12:42 lizmat :-)
12:43 kaleem joined #perl6
12:45 atroxaper joined #perl6
12:45 atroxaper left #perl6
12:46 kaleem joined #perl6
12:47 pernatiy joined #perl6
12:56 kaleem joined #perl6
13:11 kaare_ joined #perl6
13:15 atroxaper joined #perl6
13:15 atroxaper Hello #perl6
13:15 jercos hi atroxaper!
13:16 atroxaper jercos: hi!
13:17 jercos How goes? :)
13:17 atroxaper Fine. Thank you. :)
13:19 lizmat moritz: so who's in charge of commit bits for the Perl6 queue on RT ?
13:20 lizmat I have at least 5 tickets I can close
13:21 logie joined #perl6
13:23 moritz lizmat: iirc [Coke] can hand them out
13:24 lizmat preflex: tell [Coke] could you please give me a "commit" bit for the Perl 6 queue on RT ?
13:24 preflex Consider it noted.
13:30 [Coke] I haven't tried to do this since the RT upgrade...
13:30 preflex [Coke]: you have 1 new message. '/msg preflex messages' to read it.
13:31 [Coke] lizmat: done. Probably.
13:31 [Coke] lizmat++ !
13:32 moritz [Coke]++ # our tireless meta committer
13:32 lizmat [Coke] if fixed, then I should change status to "Resolved" right ?
13:32 colomon [Coke]++
13:33 moritz lizmat: fixed + tested => resolved
13:34 [Coke] if just fixed, change basic -> tag to add "testneeded"
13:35 [Coke] when responding to tickets, be sure to enable "cc to perl6-compiler@perl.org" if you want anyone to see the message (I try to do this for every update)
13:36 [Coke] ... though I see the new one has a bcc to the mailing list pre checked, at least for this one ticket. nifty.
13:59 lizmat away&
14:01 [Coke] r: say "We have { 346 + 369 } tickets left for rakudo."
14:01 camelia rakudo-parrot 9f0609, rakudo-jvm 9f0609: OUTPUT«We have 715 tickets left for rakudo.␤»
14:02 [Coke] ... plus a lot more todo/skips in the test suite that don't have named tickets.
14:05 colomon BTW, the modules ADT, File::Spec, File::Spec::Case, Inline, JSON::RPC, LWP::Simple, Questhub, Sitemap::XML::Parser, and XML all broke sometime between Oct 25 and Nov 2, and are still broken, according to my smoke tester.
14:05 [Coke] there's some LHF that doesn't require much programming or perl6 knowledge. look for rakudo skips/todos that don't reference a ticket number, create a ticket, referring to the test file, copy in the failing code (run it to show how it fails), then update the file in roast to refer to the newly created ticket number.
14:06 FROGGS colomon: I'll fix Inline then...
14:06 moritz colomon++ # smoke testing
14:09 colomon colomon-- # not having time to keep better on top of things
14:10 * colomon at least got a very interesting bug from a $customer overnight.
14:14 [Coke] #120480 should be an easy update.
14:14 synopsebot Link: https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=120480
14:17 rindolf joined #perl6
14:24 logie joined #perl6
14:32 lowpro30 joined #perl6
14:33 spider-mario joined #perl6
14:35 lowpro30_ joined #perl6
14:40 sivoais joined #perl6
14:44 jnap joined #perl6
14:45 btyler joined #perl6
14:46 moritz r: my @words = <wantarray warranty>; say [eq] @words.map: *.comb.sort.join
14:46 camelia rakudo-parrot 9f0609, rakudo-jvm 9f0609: OUTPUT«False␤»
14:46 moritz right, 'wantarray' has an 'a' more
14:54 pmichaud (14) Disclaimer of Wantarray:  THE PACKAGE IS PROVIDED WITHOUT ANY EXPRESS OR IMPLIED WANTARRAYS.
14:54 preflex pmichaud: you have 1 new message. '/msg preflex messages' to read it.
14:55 pmichaud ...preflex?
14:55 moritz phenny is dead, long live preflex+yoleaux
14:55 moritz where yoleaux appears to be dead now too
14:55 FROGGS yeah :/
14:55 FROGGS hi pmichaud
14:56 pmichaud somehow a Duran Duran theme is bubbling to the surface of my brane now  :-/
14:56 FROGGS which one?
14:56 pmichaud http://en.wikipedia.org/wiki/The_Reflex
14:57 * FROGGS .oO( (Duran Duran)++, ohh that is re-duran-t )
14:57 pmichaud not far from "reflex" to "preflex".  Some sort of knee-jerk reaction on my part.  :)
14:59 moritz .oO( some sort of knee-jerk preflex on your part )
14:59 pmichaud do we end up with a preyacc or prebison, too?
15:00 nwc10 where perl 6 is the postyacc?
15:00 nwc10 (in the sense of grammars are first class, so who needs a specialised tool)
15:01 moritz and postyapc!
15:02 zakharyas joined #perl6
15:13 * timotimo is back
15:14 timotimo we are building a pneumatic delivery system \o/
15:15 FROGGS for beer?
15:15 FROGGS ahh, wait
15:15 FROGGS pneumatic?
15:15 FROGGS where?
15:16 moritz and can I have it connected to my home? :-)
15:16 * timotimo looks into the ADT test failure
15:17 timotimo in our hackspace :)
15:17 timotimo we only have 20 meters of tube
15:17 timotimo but we successfully transported a 550g bottle of banana milk
15:17 FROGGS *g*
15:19 timotimo http://events.ccc.de/congress/2​013/wiki/Projects:SeidenStrasse - belongs to this specification
15:19 timotimo https://twitter.com/loltimo/sta​tus/401006314819964928/photo/1 - tube
15:19 logie joined #perl6
15:20 moritz for those who don't get the joke: the project name "seidenstrasse" is the German translation of "silk road"
15:21 moritz (and now you only need to know about the tor-powered underground site of that name which used to sell drugs in the US)
15:21 timotimo drugs and murder.
15:21 moritz I'm not sure that last part was actually true, it sounded a bit untrustworthy
15:21 timotimo no idea
15:21 moritz (and the police couldn't find the alleged victim)
15:22 timotimo that's a relief
15:22 timotimo wow, my car looks so big on that picture
15:23 kaleem joined #perl6
15:28 FROGGS anonymous transport? hehe
15:33 jnthn evening, #perl6
15:35 nwc10 what is this "evening" concept. Particularly, what is it doing at 16:30 local time? :-)
15:35 nwc10 or is it merely signalling a shift from coffee to beer?
15:35 nnunley joined #perl6
15:35 FROGGS nqp: my @a; my @b := [1, 2, 3]; @a.push( |@b ); say(+@a)
15:36 camelia nqp-jvm: OUTPUT«Wrong number of arguments passed; expected 2..2, but got 4␤  in push (gen/jvm/stage2/NQPCORE.setting)␤  in  (/tmp/MdXSHdNK6R:1)␤  in  (gen/jvm/stage2/NQPHLL.nqp:1100)␤  in eval (gen/jvm/stage2/NQPHLL.nqp:1086)␤  in evalfiles (gen/jvm/stage2/NQPHLL.nqp:1292)…»
15:36 camelia ..nqp-moarvm: OUTPUT«Too many positional arguments; max 2, got 4␤push␤»
15:36 camelia ..nqp-parrot: OUTPUT«too many positional arguments: 4 passed, 2 expected␤current instr.: '' pc 83 ((file unknown):53) (/tmp/hMppHkGoz5:1)␤»
15:36 FROGGS hi jnthn
15:36 jnthn nwc10: End of Norwegian working day ;)
15:39 cosimo_ jnthn: it's winter, so that is 15:30 :-)
15:40 jnthn ;-)
15:40 jnthn Yeah, it's dark already
15:40 jnthn I'd complain about it hampering my Bergen exploration but it's raining, which is a more serious problem. :)
15:40 * jnthn has been managing to just avoid catching a cold for a while...
15:45 FROGGS I am well for almost a week now :o)
15:45 timotimo Unrecognized regex metacharacter | (must be quoted to match literally) -what have i done to deserve this? :|
15:46 jnthn timotimo: Screwed up your regex? :P
15:46 timotimo yeah, apparently
15:46 fhelmberger joined #perl6
15:46 moritz timotimo: you manage to get the most obscure errors :-)
15:46 jnthn Try feeding it to STD to see if it feels the same way abou tit.
15:46 FROGGS abou tit?
15:46 jnthn about it :P
15:47 moritz fwiw an unpatched rakudo should never emit that error message, IMHO
15:47 moritz because | is a recognized meta character for alternations
15:47 jnthn Yeah
15:47 jnthn Thus why I'm curious what STD makes of it
15:47 jnthn I guess timotimo may have local patches... :)
15:47 * moritz hopes so
15:47 timotimo std: grammar Test { rule params {
15:47 camelia std b469b42: OUTPUT«[31m===[0mSORRY![31m===[0m�Regex not terminated at /tmp/cOVjot9aMQ line 1 (EOF):�------> [32mgrammar Test { rule params {[33m�[31m<EOL>[0m�Parse failed�FAILED 00:01 122m�»
15:47 timotimo ...
15:48 timotimo std: grammar Test { rule params {
15:48 camelia std b469b42: OUTPUT«[31m===[0mSORRY![31m===[0m�Regex not terminated at /tmp/7WizX63QMr line 1 (EOF):�------> [32mgrammar Test { rule params {[33m�[31m<EOL>[0m�Parse failed�FAILED 00:01 122m�»
15:48 timotimo oi!
15:48 FROGGS sure he has local patches :o)
15:48 timotimo std: grammar Test { rule params { '[' ~ ']' [ '::' $<typevar>=<.ident> { @.typevars.push($<typevar>.Str) }]+ % ',' | } }
15:48 camelia std b469b42: OUTPUT«[31m===[0mSORRY![31m===[0m�Null pattern not allowed at /tmp/JjDyuuBbhQ line 1:�------> [32mpevars.push($<typevar>.Str) }]+ % ',' | [33m�[31m} }[0m�Parse failed�FAILED 00:01 128m�»
15:48 timotimo std: grammar Test { rule params { '[' ~ ']' [ '::' $<typevar>=<.ident> { @.typevars.push($<typevar>.Str) }]+ % ',' | <?> } }
15:48 camelia std b469b42: OUTPUT«ok 00:01 128m␤»
15:48 timotimo r: grammar Test { rule params { '[' ~ ']' [ '::' $<typevar>=<.ident> { @.typevars.push($<typevar>.Str) }]+ % ',' | <?> } }
15:49 camelia rakudo-parrot 9f0609, rakudo-jvm 9f0609: ( no output )
15:49 timotimo er, huh?
15:49 timotimo that doesn't work locally, i'm afraid
15:51 timotimo jnthn: can you help me fix asynclines? if the file you're reading ends in a non-newline, the last line gets discarded
15:51 timotimo i've changed code inside, but my changes are not getting picked up by rakudo-jvm :(
15:52 jnthn What's the patch you tried?
15:52 timotimo i tried putting a die_s at the very beginning of Ops.linesasync
15:52 thou joined #perl6
15:54 * jnthn will have to get a build...
15:54 jnthn actually, bbi15...
15:57 dalek nqp/fix_async_lines: bd6d36b | (Timo Paulssen)++ | src/vm/jvm/runtime/org/perl6/​nqp/io/AsyncFileHandle.java:
15:57 dalek nqp/fix_async_lines: asynclines: make sure the last line gets passed on
15:57 dalek nqp/fix_async_lines: review: https://github.com/perl6/nqp/commit/bd6d36bcff
15:57 timotimo jnthn: here's a patch for you to try
16:02 zakharyas joined #perl6
16:20 TimToady I usually use '' rather than <?> when I really mean "match nothing" :)
16:24 thou joined #perl6
16:34 japhb___ Whoever it was that introduced the typo suggestion code, can you do it for multilevel names too, pretty please?  I just spent 10 minutes tracking down MetaModel::ClassHOW <-> Metamodel::ClassHOW.
16:34 FROGGS r: MetaModel::ClassHOW
16:34 camelia rakudo-jvm 9f0609: OUTPUT«Could not find symbol '&ClassHOW'␤  in any find_method_fallback at gen/jvm/Metamodel.nqp:2607␤  in any find_method at gen/jvm/Metamodel.nqp:945␤  in any  at gen/jvm/BOOTSTRAP.nqp:1658␤  in block  at /tmp/s7YJXTOIh7:1␤  in any eval at gen/jvm/stage…»
16:34 camelia ..rakudo-parrot 9f0609: OUTPUT«Could not find symbol '&ClassHOW'␤  in method <anon> at gen/parrot/CORE.setting:12006␤  in any  at gen/parrot/Metamodel.nqp:2691␤  in any find_method_fallback at gen/parrot/Metamodel.nqp:2679␤  in any find_method at gen/parrot/Metamodel.nqp:946…»
16:36 TimToady jnthn: Glo and I got drenched when we were in Bergen this summer :)
16:38 jnthn TimToady: Yes, from the folks I was teaching today I gathered that rain here is the common case. :)
16:39 lucas_ joined #perl6
16:40 fhelmberger joined #perl6
16:41 japhb___ "Cannot create rw-accessors for natively typed attribute '$!foo'" -- OK, so what's the right way to set up an RW native attr using the metamodel?  I did "my $attr  := Attribute.new(:name<$!foo>, :type(str), :package($class), :has_accessor); $attr.set_rw;" then added it to my class-in-progress and composed.
16:41 jnthn japhb___: It doesn't work any way yet
16:42 jnthn r: class A { has int $.x is rw } # same
16:42 camelia rakudo-parrot 9f0609, rakudo-jvm 9f0609: OUTPUT«===SORRY!===␤Cannot create rw-accessors for natively typed attribute '$!x'␤»
16:42 japhb___ Huh.  It never occurred to me that I'd never tried that.
16:42 jnthn timotimo: Um. So that branch fixes things to me.
16:42 japhb___ Well, snto.
16:42 jnthn timotimo: It does some debug output and then prints the last line correctly.
16:42 japhb___ *snot
16:42 * japhb___ wanders off to reconsider his plan of attack
16:43 jnthn heh, was trying to work out what snto was short for :)
16:43 timotimo jnthn: i can't even get it to do the debug output, what the hell am i doing wrong?!
16:44 jnthn timotimo: I have no idea. I just did the make nqp-runtime.jar and then copied the thing in the right place, which is my usual trick to avoid the compilation cycle when testing...
16:44 timotimo %)
16:44 jnthn But it should work out exactly the same with a make install and then a clean/make in Rakudo.
16:44 timotimo well, if it fixes things, i'll remove the debug stuff and push an amended commit to nom, okay?
16:44 jnthn ok
16:44 jnthn uh, master, no?
16:44 jnthn It's in NQP
16:44 jnthn Also, nice catch :)
16:45 timotimo thanks
16:45 timotimo it was terrorizing me ;)
16:45 timotimo oh, it's in nqp! of course!
16:46 dalek nqp: 45cc981 | (Timo Paulssen)++ | src/vm/jvm/runtime/org/perl6/​nqp/io/AsyncFileHandle.java:
16:46 dalek nqp: asynclines: make sure the last line gets passed on
16:46 dalek nqp: review: https://github.com/perl6/nqp/commit/45cc9818b0
16:47 sqirrel joined #perl6
16:47 btyler joined #perl6
16:47 timotimo oh, it may be i had rakudo/nqp/install and rakudo/install
16:47 timotimo perhaps i've been installing the jvm stuff into the former and trying to use the stuff from the latter
16:57 timotimo i wonder if i'll be able to build nqp-moar
17:02 colomon joined #perl6
17:05 timotimo now i can build moar again :)
17:05 dalek nqp: ab172ab | (Timo Paulssen)++ | src/vm/moar/QAST/QASTOperationsMAST.nqp:
17:05 dalek nqp: teach moarvm that only QAST::Block has arity.
17:05 dalek nqp: review: https://github.com/perl6/nqp/commit/ab172ab198
17:09 fhelmberger joined #perl6
17:09 dmol joined #perl6
17:10 xenoterracide joined #perl6
17:15 cognominal joined #perl6
17:20 timotimo jnthn: does the stage jast lend itself to being parallelised?
17:32 timotimo jnthn: and do you know any reason why regex matches cause mayhem if they are being run in parallel? something must be shared, be it the $/ variable or something internal to the regexes that doesn't get cloned (perhaps i should have used a sub instead of a simple block?
17:35 diakopter timotimo: any two regexes? or the same regex?
17:39 kurahaupo_ joined #perl6
17:41 [Sno] joined #perl6
17:43 timotimo diakopter: two different ones in my test case
17:43 timotimo i had to put a lock around each invocation of ~~
17:44 fhelmberger joined #perl6
17:46 timotimo gah, i committed the debug outputs by accident
17:49 diakopter timotimo: wtf.
17:49 diakopter timotimo: that's kinda strange.. which backend?
17:49 [Coke] timotimo: did you install a version and that's taking precedence over the build-in-situ?
17:49 timotimo diakopter: the only one where we can have things in parallel
17:51 jnthn timotimo: My first guess is that it's 'cus the work to toss prior invocation hasn't been done on the JVM yet, and that creates some interesting issues
17:51 timotimo ah, possibly
17:53 Suhosin joined #perl6
17:55 diakopter timotimo: oh, right. :)
17:56 * japhb just got a message from someone at $dayjob whose last name is Perl.
17:56 diakopter *MIND BLOWN*
17:57 timotimo :)
17:58 TimToady a lot folks shortened their name to "Perl" when they immigrated to north america
17:58 TimToady *lot of
17:59 jnap well, Perl is now old enough that some programmer could have had kids old enough to be working now….
17:59 timotimo :)
17:59 jnap my grandmother's first name was Pearl, so its not so terribly off the mark
18:00 geekosaur "Perlman"
18:01 diakopter I knew some Perlmutters
18:02 rurban1 joined #perl6
18:05 [Coke] went to college with a perlmutter.
18:05 [Coke] my last name was changed a few generations ago, stupid lack of cyrillic.
18:07 * japhb wonders just how many generations you'd have to go back before my last name wouldn't be spelled with a Latin alphabet.
18:07 kurahaupo_ joined #perl6
18:08 japhb I'm guessing at least 50.
18:10 kurahaupo__ joined #perl6
18:12 jnthn dinner &
18:14 lizmat TimToady: re https://github.com/perl6/specs/commit/3​490ccd8dae021226b09ece04ac249e22616adf9 , how can something be a role *and* a class ?
18:17 lizmat r: role Foo {}; class Foo {} # most definitely LTA error message
18:18 camelia rakudo-parrot 9f0609, rakudo-jvm 9f0609: OUTPUT«===SORRY!===␤No such method 'is_composed' for invocant of type 'Perl6::Metamodel::ParametricRoleGroupHOW'␤»
18:19 Rotwang joined #perl6
18:19 TimToady lizmat: only by putting everything you need for the punned class into the role
18:20 lizmat so "class Supply" and "role Supply" should work in the same lexical namespace ?
18:20 TimToady no
18:21 TimToady you only get to declare the role, and a punned class comes for free
18:22 TimToady r: role A { method foo { say 42 }}; say A.new.foo
18:22 camelia rakudo-parrot 9f0609, rakudo-jvm 9f0609: OUTPUT«42␤True␤»
18:22 lizmat aha... hmmm...
18:22 TimToady A is both a role and a punned class (or .new wouldn't work)
18:23 iSlug joined #perl6
18:23 TimToady just trying to avoid multiplying names for things that aren't used as heavily as, say Positional/Array
18:23 * lizmat finally understands what a punned class is
18:24 TimToady a punned class is roughly equivalent (or maybe exactly equivalent) to a role mixed into the empty class
18:24 dalek specs: 0ddcd00 | duff++ | S17-concurrency.pod:
18:24 dalek specs: tiny typo
18:24 dalek specs: review: https://github.com/perl6/specs/commit/0ddcd00e57
18:27 lizmat I would say the role is cat-licensed into a class
18:27 TimToady speaking of S17, I have three or four gripes about the current formulation of "on", so expect some changes there yet
18:28 TimToady lizmat: did you see the change from Thread.join to Thread.finish?
18:28 lizmat yes, I will take care of that later tonight
18:28 lizmat :-)
18:28 TimToady that seems to be in your field of endeavor
18:28 TimToady thanks!
18:28 lizmat about to go and see Thor in 3D  :-)
18:28 TimToady we put that off till tomorrow :)
18:32 TimToady re: 'on', 1) too moosey, 2) too hashy, 3) too much boilerplate, 4) 'on' is huffmanly rather short, 5) 'on' doesn't express the single-file protection going on
18:33 TimToady to me the one-at-a-time-ness is more important than the event-handler-ness
18:33 TimToady though it would be nice to express both somehow
18:33 TimToady but from a smelliness point of view, it's all the boilerplate that bothers me most
18:34 Juerd after?
18:34 lizmat atatime
18:35 TimToady the metaphor probably wants to be something like working a todo list off one thing at a time, if there's a short word for that
18:35 Juerd Next :P
18:35 TimToady :P indeed :)
18:36 * japhb___ successfully generates source code for a class definition by building the class up in the Metamodel and then serializing from the class metamodel definition.  o/
18:36 japhb___ Sometimes it's the little wins that feel the best.
18:36 lizmat chain?
18:37 lizmat flow?
18:37 Juerd issue
18:37 TimToady but if you look at the examples in S17, the different cases are very neary entirely duplicated, which bothers me more than the name-that-verb bikeshed
18:37 TimToady *nearly
18:37 lizmat neatly { }
18:38 TimToady japhb___: \o/
18:39 * lizmat will be back later
18:39 TimToady also, note the difference between .tap that has a positional interface, and 'on' that does the same thing with named entries
18:39 TimToady (more,done,fail)
18:39 ssutch joined #perl6
18:40 TimToady I guess that falls under 2)
18:42 TimToady also, all the $a/$b stuff smacks of the sort { $a <=> $b } notion, so I feel like there ought to be a more concise way to express the switchery without actually writing a switch
18:43 TimToady needs to be some kind of HOP inversion somehow
18:52 Shellcat joined #perl6
18:55 japhb What would you call a ClassHOW subclass that knows how to serialize classes it has created into source code?
18:55 japhb Hmmm, or maybe it deserves to be a role that's composed into the ClassHOW subclass.
18:55 sqirrel joined #perl6
18:56 japhb Still, my question is about naming.
18:56 TimToady Perlable?
18:56 japhb hmmm, that does make sense
18:57 PerlJam he didn't say source code of which language ;)
18:57 TimToady hence the ?
18:57 japhb Well, in this case, Perl is in fact what I'm generating.  :-)
18:58 * TimToady was assuming the same mental shortcircuit that causes Python to have .repr rather than .python  :)
18:58 TimToady but was uncomfortable making that assumption, and added the ? Just In Case
18:59 TimToady but in my mind it was more about the "Perl" part than the "able" part
18:59 japhb If our minds didn't occasionally short-circuit, they'd be very slow indeed.
19:00 japhb .oO( Deep Thought )
19:01 * TimToady tries to think of a game where Deep Thought and Watson would be equally matched :)
19:01 logie joined #perl6
19:02 TimToady well, probably any game that isn't "chess" or "Jeopardy"
19:04 timotimo 11M Nov 14 19:01 original_big_diff
19:04 timotimo 9,5M Nov 14 20:03 shiny_small_diff
19:04 timotimo >_<
19:08 timotimo i did not do this well.
19:12 * colomon imagines a game of chess where you have to defeat each piece in a trivia battle...
19:13 PerlJam .oO( Isn't that just wizard's chess? )
19:16 TimToady "Hey, Rook, I can't evaluate your move fitness until I know the Final Jeopardy Category on that Bishop over there."
19:18 TimToady "It's Biblical Grandfathers."
19:18 TimToady "Okay, maybe you'd better hold off on attacking a Bishop then..."
19:26 timotimo hum. what to do now?
19:30 FROGGS[mobile] joined #perl6
19:30 raiph joined #perl6
19:35 timotimo oh, there was some bug i said i would look at
19:35 timotimo hm, what was that again :|
19:35 raiph timotimo: ADT?
19:35 raiph timotimo: ADHD?
19:36 timotimo ADT is something else entirely! ;)
19:36 timotimo no, i was going to try to turn postfix:<++> into prefix:<++> in sink context
19:43 timotimo r: my $start = 0; my $time = nqp::time_n(); while $start < 100_000 { $start++ }; say nqp::time_n() - $time;
19:43 camelia rakudo-jvm 9f0609: OUTPUT«0.8990001678466797␤»
19:43 camelia ..rakudo-parrot 9f0609: OUTPUT«2.70193910598755␤»
19:43 timotimo r: my $start = 0; my $time = nqp::time_n(); while $start < 100_000 { ++$start }; say nqp::time_n() - $time;
19:43 camelia rakudo-parrot 9f0609: OUTPUT«2.38896989822388␤»
19:43 camelia ..rakudo-jvm 9f0609: OUTPUT«0.7319998741149902␤»
19:43 timotimo r: my $start = 0; my $time = nqp::time_n(); while $start < 100_000 { $start++ }; say nqp::time_n() - $time;
19:43 camelia rakudo-jvm 9f0609: OUTPUT«1.6119999885559082␤»
19:43 camelia ..rakudo-parrot 9f0609: OUTPUT«2.65007400512695␤»
19:43 timotimo r: my $start = 0; my $time = nqp::time_n(); while $start < 100_000 { ++$start }; say nqp::time_n() - $time;
19:43 camelia rakudo-jvm 9f0609: OUTPUT«0.6499998569488525␤»
19:44 camelia ..rakudo-parrot 9f0609: OUTPUT«2.50400900840759␤»
19:44 timotimo ah, a very unstable measurement
19:44 thou joined #perl6
19:44 FROGGS[mobile] You should make it to switch to JVM instead of the prefix
19:45 timotimo that's a good idea :)
19:45 timotimo on my local machine it's about 10% difference
19:46 timotimo since the optimisation is pretty trivial to implement, i can just plop it in.
19:54 japhb___ OK, the metamodel?  Officially awesome now.  (As if it wasn't before ....)
19:55 timotimo :D
19:57 logie joined #perl6
19:59 Rotwang joined #perl6
20:03 lue hello world o/
20:04 logie joined #perl6
20:06 timotimo hey lue :)
20:06 jnthn japhb___: What made it official? :)
20:07 japhb___ Give me a sec, I'll gist.
20:07 tadzik good morning #perl6
20:08 timotimo hey tadzik, how are you?
20:08 tadzik pretty good :)
20:08 tadzik vacations are nice, I should do more of those
20:09 jnthn morning? :)
20:09 tadzik ymmv :P
20:10 timotimo ytzmv? ;)
20:10 tadzik that too :)
20:11 japhb jnthn: https://gist.github.com/japhb/7473529
20:13 jnthn ooh :)
20:14 japhb Yeah, cool, huh?  This makes me happy.
20:15 * timotimo is kinda sad he probably won't be breaking the 100 seconds barrier for parrot setting parse time before the release
20:15 tadzik very cool
20:15 lue jnthn: I have two quick questions: 1) I can make my own nqp:: ops for use with the <O()> rule, right? 2) How would I deal with an operator that has multiple forms (e.g. + for integers and + for lists)? (Rakudo's grammar isn't too helpful there.) Would I need to move beyond simple actions/grammar, or...?
20:16 timotimo do you already know at parse-time if you have a list or an integer?
20:16 iSlug joined #perl6
20:16 timotimo of course you do if it's a literal, but what about variables?
20:17 TimToady and why would you want to do that?
20:17 lue timotimo: at the moment I'm not implementing variables, so yes I would know. (But not forever, admittedly.)
20:20 jnthn lue: You can register custom ops for your language but it's often easier just to give your language a "setting" or similar and leave the code-gen to produce a call to the op.
20:21 lue I get the feeling it would be better implemented going beyond O() and friends. (There's only one precedence level and parens, so it wouldn't be too bad :P)
20:21 jnthn lue: For multi-form operators, you'll probably need to code-gen a call that dispatches by type, either using multi-dispatch or just nqp::istype to decide. Really depends on the langauge.
20:21 lue jnthn: it's APLish :)
20:21 jnthn lue: You still use O, you just don't do :op<...?
20:21 jnthn lue: Instead you leave it alone and it code-gens a call to e.g. &infix:<foo> automatically
20:22 jnthn Taking the name from the <sym>
20:22 jnthn Or something along those lines. :)
20:22 lue jnthn: yeah, I noticed rakudo does that towards the end of Grammar.nqp, but I couldn't tell what was supposed to happen after the Grammar
20:22 jnthn Or you can write an action method and make it do just what you want.
20:22 * lue thinks APL has function definition stuff suitable for a setting. He checks
20:25 lue yeah. So I think what I have to do is implement ∇ (function definition) so I can get started on a setting as soon as possible. (Setting seems the natural way to go anyway) :)
20:25 raiph joined #perl6
20:26 lue jnthn: so IIUC, using <O()> without :op<> generates a call to a sub which I've defined in NQP, correct? So the definition of &infix:<foo> would occur elsewhere in the NQP code of the compiler in that case.
20:28 jnthn lue: It just needs to be somehow in the lexical scope of the thing that calls it
20:28 jnthn lue: Which you can arrange setting-style or import-style.
20:31 lue import-style would be 'use' statements or something?
20:32 jnthn yeah
20:34 lue .oO(and here I thought APL would just be a couple dozen operator parse rules. Now I accidentally a setting :) . I'll go look at how NQP and Rakudo and the like get that working before doing it. )
20:45 cooper joined #perl6
20:47 dalek specs: 4fa5b48 | larry++ | S17-concurrency.pod:
20:47 dalek specs: clarify that @$channel is not a combinator
20:47 dalek specs: review: https://github.com/perl6/specs/commit/4fa5b487bb
20:56 diakopter TimToady: *transfering
20:56 diakopter (quick, forcepush correction)
20:57 logie joined #perl6
20:58 * jnthn ponders how to implement @$channel )))
20:58 jnthn oh...I think I know...
21:00 timotimo jnthn: where's all the remaining performance wins? :(
21:01 lue is @$ supposed to be a new sigil, or @-sigil+$-trigil, or @($channel) ?
21:01 timotimo no, it's just @($....)
21:01 japhb___ timotimo: On a positive note, every time you shave away at the non-bottleneck, it means that when someone (maybe you) *does* find and fix the bottleneck, it will be a huge win.
21:02 timotimo percentage-wise, yeah
21:02 japhb___ And sometimes you have to scrape away the small problems before you can uncover the big ones.
21:03 timotimo mhm
21:03 Vlavv` joined #perl6
21:03 japhb___ (For instance, I have the damnedest time reviewing code for bugs when it is formatted poorly in a thousand small ways.)
21:03 timotimo my code is always pretty :P
21:05 timotimo i think my postfix-to-prefix optimisation works
21:06 jnthn timotimo: Which language?
21:06 timotimo jnthn: nqp and rakudo both
21:07 timotimo (was that re: where's all the remaining performance wins? or the optimisation?)
21:08 * timotimo runs a full spectest
21:10 dalek specs: 9941758 | larry++ | S17-concurrency.pod:
21:10 dalek specs: speculate 'on' changes
21:10 dalek specs: review: https://github.com/perl6/specs/commit/99417586c6
21:13 jnthn *groan* :P
21:13 jnthn (at the pun commit message, not the contents...)
21:16 * PerlJam is going to have to read S17 (probably a few times) because that commit is a tad indecipherable
21:17 timotimo yeah, S17 is a bit opaque. you have to leave all your preconceptions at the door
21:19 jnthn TimToady: Something feels a bit off with that, but I'm not quite sure what...
21:19 TimToady yeah, just meant to be closer
21:19 jnthn combine is a better name.
21:19 TimToady needs different topicalization or something
21:20 TimToady at one point was passing in the instantiable data as $a => @as but that didn't feel even righter
21:20 japhb I read that as "insatiable data"
21:20 TimToady but the basic idea that it's a bit of generic code to be instantiated over two (or more) supplies (or channels?)
21:21 timotimo TimToady: did i have your blessing to compare signatures in the spectests by strings, or should i implement :(Mu *@) to work as a special case?
21:21 jnthn japhb: Hah, I want to give a talk with that title now :P
21:21 TimToady wanted to be able to zip list-associatives
21:21 japhb jnthn, YES. DO THAT, PLEASE.  ;-)
21:21 jnthn TimToady: I *think* the construct only makes sense on supplies.
21:21 TimToady could be
21:24 diakopter "thread-safely problems"
21:26 jnthn The main point of combine is its actor-ish semantics.
21:26 jnthn .oO( The main point of most of what I shoved in S17 is actor-ish semantics... )
21:28 iSlug joined #perl6
21:37 TimToady timotimo: I'm fine with testing via strings
21:41 Ember joined #perl6
21:42 TimToady most languages just throw up their hands at the notion of comparing signatures deeply
21:43 TimToady you'd need a fairly circumscribed call syntax and type system to get around that; something you could do in Prolog but not in Perl
21:43 TimToady (and it's probably too hard to do right in Prolog too :)
21:44 TimToady doubtless there's some theory here that I'm glossing over because I'm unaware of it :)
21:46 davecv joined #perl6
21:46 bbkr joined #perl6
21:50 dalek rakudo/nom: ce1def9 | (Timo Paulssen)++ | src/Perl6/Optimizer.nqp:
21:50 dalek rakudo/nom: in sink context, ++foo is faster than foo++ by 10%
21:50 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/ce1def97a3
21:53 dalek specs: c1710c1 | larry++ | S17-concurrency.pod:
21:53 dalek specs: conjecture multi-way merge as well
21:53 dalek specs: review: https://github.com/perl6/specs/commit/c1710c1509
21:54 dalek nqp: 22f47f8 | dwarring++ | examples/rubyish/examples-rubyish/pi.rbi:
21:54 dalek nqp: tidied rubyish PI example
21:54 dalek nqp: review: https://github.com/perl6/nqp/commit/22f47f8eeb
21:58 timotimo jnthn: can you explain to me why the pir generator builds lots of "get_sc_object $P5001, "uaidtrenuiadtren", 1234" and directly afterwards "set $P100, 5001"? i made an 'optimisation' that directly puts the second register into the first instruction and it b0rked with NPMCA :(
22:00 diakopter timotimo: I guess it wanted to use P5001 later also?
22:00 timotimo but i set :returns to the same register, too, and that's the only mechanism how the caller could have figure dout what register that was supposed to be
22:00 diakopter timotimo: also, be sure to change the "result register" of the expression
22:01 diakopter ok
22:01 timotimo i don't think i really looked at the resulting code, though
22:01 * diakopter throws you a look
22:01 timotimo thanks, i'll use that
22:01 timotimo bleh, the commit dropped off my log, i'll have to find it in the reflog
22:02 timotimo it's gone :|
22:04 timotimo i can reconstruct it quickly, though
22:06 jnthn timotimo: Are you sure that the $P100 isn't actually a lexical-holding register?
22:06 timotimo it is
22:06 timotimo can only set put things into lexical-holding registers?
22:06 jnthn No, should be fine to directly put them in too...
22:07 timotimo that's what i thought :(
22:07 timotimo well, i'll see what the code looks like exactly and then i'll see
22:07 BenGoldberg joined #perl6
22:10 timotimo i think i may actually have implemented it subtly differently this time
22:10 timotimo because now it compiles much further than last time
22:10 jnthn :)
22:10 jnthn You did it subtly righter this time...
22:11 timotimo yeah, i bet i accidentally forgot to push the op that created the get_sc_object
22:11 raiph joined #perl6
22:11 timotimo er ... too many named arguments: 'instance_of' not used
22:11 timotimo wow
22:12 jnthn gonna get an early night
22:12 jnthn &
22:12 timotimo gnite jnthn!
22:14 timotimo jnthn: https://gist.github.com/timo/d223a4d09d602091e5af - you just missed it ;)
22:16 timotimo it doesn't seem to fill _lex_param_1 at all :o
22:17 timotimo though it says .param pmc _lex_param_1, so maybe it passes on the parameter from the caller down to that call?
22:23 timotimo i may be looking at the wrong stack frame ...
22:30 pmichaud I left a comment on the ++ optimization -- could someone verify that it's actually safe to make that change?
22:30 denisboyun joined #perl6
22:32 pmichaud I guess that's what ".is_from_core" is supposed to handle?
22:33 pmichaud (added comment.)
22:33 pmichaud I'm afk for a while.
22:35 amkrankruleuen joined #perl6
22:35 amkrankruleuen joined #perl6
22:35 lowpro30 joined #perl6
22:36 lowpro30__ joined #perl6
22:53 dalek nqp: 9564ed6 | dwarring++ | examples/rubyish/ (2 files):
22:53 dalek nqp: wrap nqp::sprintf - demo rubyish slurpy args
22:53 dalek nqp: review: https://github.com/perl6/nqp/commit/9564ed613b
23:04 BenGoldberg Can anyone here either identify this quote, or at least guess what language the speaker was talking about: "It is the language of the future for the programming techniques of the past"
23:04 BenGoldberg :)
23:08 lue BenGoldberg: I want to say C or C++, but it's likely Lisp or, less likely, Go.
23:08 perigrin http://www.brainyquote.com/quote​s/quotes/e/edsgerdijk201169.html
23:08 perigrin Go is too new.
23:09 perigrin but I thought of Go pretty much immediately too :)
23:09 timotimo a friend told me "go is a better pythonic language than python"
23:09 perigrin unless that friend was Guido ... I'm not sure I'd believe them.
23:10 BenGoldberg "APL is a mistake, carried through to perfection. It is the language of the future for the programming techniques of the past: it creates a new generation of coding bums." —Edsger Dijkstra, 1968
23:10 timotimo or a "more pythonic language"
23:11 geekosaur go might, however, be python in google's image...
23:15 perigrin Go is Python as if it were written by Rob Pike.
23:39 japhb rj: class Foo { has str $.str; }; my $foo = Foo.new; say $foo.str;
23:39 camelia rakudo-jvm 9f0609: OUTPUT«java.lang.NullPointerException␤  in method print at gen/jvm/CORE.setting:13035␤  in block  at /tmp/SK1aduPw2H:1␤  in any eval at gen/jvm/stage2/NQPHLL.nqp:1086␤  in any evalfiles at gen/jvm/stage2/NQPHLL.nqp:1292␤  in any command_eval at gen/jvm/s…»
23:39 japhb Am I correct that's a bug?
23:39 japhb (Well, any NPE is, I meant, that it says anything other than an empty string? )
23:40 japhb rj: class Foo { has int $.int; }; my $foo = Foo.new; say $foo.int;
23:40 camelia rakudo-jvm 9f0609: OUTPUT«0␤»
23:40 japhb rj: class Foo { has num $.num; }; my $foo = Foo.new; say $foo.num;
23:40 camelia rakudo-jvm 9f0609: OUTPUT«0␤»
23:41 japhb So yeah, just a str problem.
23:41 TimToady what is this 'str' type of which you speak?  The specs claim there is no str type, in fact...
23:42 lue native str ≈ buf methinks
23:42 lue japhb: try s:g/str/Str/
23:44 TimToady rj: class Foo { has Str $.str; }; my $foo = Foo.new; say $foo.str;
23:44 camelia rakudo-jvm 9f0609: OUTPUT«(Str)␤»
23:45 TimToady S02:878 btw
23:45 synopsebot Link: http://perlcabal.org/syn/S02.html#line_878
23:45 TimToady though some of the surrounding prose is...speculative...
23:50 japhb I'm just trying to support serializing any class definition that can be specified in Rakudo.
23:50 japhb Unfortunately, just that one case fails in r-j, but works in r-p.  So far, everything else works in both.
23:51 japhb rj: class Foo { has str $.str = ""; }; my $foo = Foo.new; say $foo.str;
23:51 camelia rakudo-jvm 9f0609: OUTPUT«java.lang.NullPointerException␤  in method print at gen/jvm/CORE.setting:13035␤  in block  at /tmp/heRDJOqZ7y:1␤  in any eval at gen/jvm/stage2/NQPHLL.nqp:1086␤  in any evalfiles at gen/jvm/stage2/NQPHLL.nqp:1292␤  in any command_eval at gen/jvm/s…»
23:51 japhb rj: class Foo { has str $.str = "foo"; }; my $foo = Foo.new; say $foo.str;
23:51 camelia rakudo-jvm 9f0609: OUTPUT«java.lang.NullPointerException␤  in method print at gen/jvm/CORE.setting:13035␤  in block  at /tmp/1ZwBAAOhlZ:1␤  in any eval at gen/jvm/stage2/NQPHLL.nqp:1086␤  in any evalfiles at gen/jvm/stage2/NQPHLL.nqp:1292␤  in any command_eval at gen/jvm/s…»
23:51 japhb rj: class Foo { has str $.str; }; my $foo = Foo.new(str => "foo"); say $foo.str;
23:51 camelia rakudo-jvm 9f0609: OUTPUT«foo␤»
23:52 japhb So perhaps str native attrs don't get built properly ....
23:53 japhb TimToady, what is the native of a Str supposed to be, if not a str?
23:53 * TimToady still thinks the concept "native" is overly generic and leads to things like "str" types that mean different things in different lands
23:54 * TimToady has no clue what a "str" is supposed to be
23:54 japhb Which is to say, if you're creating the Str class itself, how do you specify the underlying VM thing that's holding the string contents?
23:54 TimToady nor what "native" means in that context
23:55 TimToady everywhere else, "native" is currently meaning "like in C", but C has no string types
23:55 japhb For me, "native" means "the form that the VM ops work on"
23:55 TimToady so a completely non-portable concept that should probably have different names on different platforms
23:55 japhb I can see "like in C" for *sized* natives, but the generic natives surely are VM-specific, no?
23:56 japhb TimToady, that answer is a bit negative when it comes to writing the non-VM-specific parts of Rakudo
23:56 TimToady and what do you mean by "native" if C and the VM are in disagreement on a particular matchine?
23:56 japhb Perhaps we're talking past each other.
23:57 japhb For me, I see num64 == C double, num32 == C float.  But num == whatever the VM wants it to be.
23:57 japhb And I apply the same logic to int and str.
23:57 TimToady I'm just saying that "native" is a nebulous concept that causes people to apply the same logic where it doesn't make sense :)
23:58 japhb I concede that point.
23:58 japhb And now I want to find a practical solution.
23:58 TimToady to a nebulous type defined by rakudo but not by Perl 6?  :P
23:59 * TimToady has not opinion on that subject :)
23:59 TimToady *no
23:59 diakopter TimToady: native just means .. oh nm :)

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

Perl 6 | Reference Documentation | Rakudo