»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, std:, or /msg camelia p6: ... | irclog: irc.perl6.org | UTF-8 is our friend!
Set by moritz on 25 December 2014.
00:03 baest left
dalek kudo/nom: 0cb22e8 | hoelzro++ | src/core/Str.pm:
Simplify easter egg for Str.WHY
00:04
00:04 colomon joined
Util timotimo: uniq is deprecated in Rakudo in favor of unique. 00:06
timotimo yes, i was using a quite old rakudo
00:07 clkao joined 00:08 baest joined 00:09 vendethiel left 00:10 vendethiel joined 00:21 Possum left 00:24 Possum joined
lumimies m: class A { class B is A { } } 00:28
camelia rakudo-moar 7b39da: OUTPUT«===SORRY!=== Error while compiling /tmp/2DxvyXuavR␤'B' cannot inherit from 'A' because 'A' isn't compose yet (maybe it is stubbed)␤at /tmp/2DxvyXuavR:1␤------> ␤»
lumimies Shouldn't that say "composed", and not "compose"? 00:29
skids Yeah probably. 00:31
00:31 Spot__ joined
timotimo right 00:31
00:31 vendethiel left
timotimo gnite #perl6 00:32
00:32 vendethiel joined
raydiak g'night timotimo 00:33
00:33 Possum left 00:40 Possum joined 00:43 dayangkun joined
dalek p/js: 0df6ef3 | hoelzro++ | tools/build/Makefile-JS.in:
Add a dummy install rule for JS backend
00:44
p/js: f9660d0 | hoelzro++ | tools/build/Makefile-JS.in:
Make sure nqp-m is built before trying to build MoarVM files

This allows us to build nqp-js in parallel via the -j option
00:46 baest left 00:48 jack_rabbit joined
masak 'night, #perl6 00:50
raydiak good night masak 00:52
00:58 baest joined 01:02 dayangkun left
japhb Am I correctly interpreting that we're in the process of merging nqp-js back to the main nqp repo? 01:08
(from the commits dalek posted ~25 min ago) 01:09
01:10 colomon left 01:12 colomon joined 01:15 vendethiel left 01:17 vendethiel joined
TimToady well, insofar as a branch is considered part of the repo, yes 01:21
even got mentioned in the weekly
01:25 DarthGandalf joined, adu joined
raydiak m: my $a; BEGIN { $a := 1; say $a; }; say $a; # binding at BEGIN time doesn't seem to stick around for runtime...is this a bug? 01:25
camelia rakudo-moar 0cb22e: OUTPUT«1␤(Any)␤»
raydiak m: my $a; BEGIN { $a = 1; say $a; }; say $a; # works with assignment 01:26
camelia rakudo-moar 0cb22e: OUTPUT«1␤1␤»
japhb Oh, weekly out? Cool, didn't expect it this early in the week! 01:27
TimToady raydiak: seems like a bug to me, but someone might come up with a reason not to fix it 01:28
raydiak thanks TimToady, I'll report it then 01:29
m: my @a; BEGIN { @a = 1; say @a; }; say @a; # I didn't get any feedback on this similar one earlier today, but I've decided it's also a (separate) bug, should work, and will report it too 01:30
camelia rakudo-moar 0cb22e: OUTPUT«1␤1␤»
raydiak it works?
m: my @a; BEGIN { @a = 1; }; say @a;
camelia rakudo-moar 0cb22e: OUTPUT«This type does not support elems␤ in method REIFY at src/gen/m-CORE.setting:9891␤ in method REIFY at src/gen/m-CORE.setting:10357␤ in method reify at src/gen/m-CORE.setting:8942␤ in block at src/gen/m-CORE.setting:8967␤ in method reify at s…»
raydiak yeah that...heisenbug I guess, something about the lazyness and the phaser
*laziness
01:33 rurban left 01:39 vendethiel left
raydiak r: my $a; BEGIN { $a := 1; say $a; }; say $a; 01:41
camelia rakudo-{parrot,moar} 0cb22e: OUTPUT«1␤(Any)␤»
raydiak r-j: my $a; BEGIN { $a := 1; say $a; }; say $a;
camelia rakudo-jvm 0cb22e: OUTPUT«Can't open perl script "/home/camelia/jvm-rakudo/eval-client.pl": No such file or directory␤»
01:41 vendethiel joined
raydiak r: my $a; BEGIN { $a = 1; say $a; }; say $a; 01:42
camelia rakudo-{parrot,moar} 0cb22e: OUTPUT«1␤1␤»
raydiak r: my @a; BEGIN { @a = 1; say @a; }; say @a;
camelia rakudo-{parrot,moar} 0cb22e: OUTPUT«1␤1␤»
raydiak r: my @a; BEGIN { @a = 1; }; say @a;
camelia rakudo-moar 0cb22e: OUTPUT«This type does not support elems␤ in method REIFY at src/gen/m-CORE.setting:9891␤ in method REIFY at src/gen/m-CORE.setting:10357␤ in method reify at src/gen/m-CORE.setting:8942␤ in block at src/gen/m-CORE.setting:8967␤ in method reify at s…»
..rakudo-parrot 0cb22e: OUTPUT«This type does not support elems␤ in method REIFY at gen/parrot/CORE.setting:9828␤ in method REIFY at gen/parrot/CORE.setting:10301␤ in method reify at gen/parrot/CORE.setting:8940␤ in block at gen/parrot/CORE.setting:8927␤ in method reif…»
01:46 yeahnoob joined 01:47 kaleem joined
raydiak r: my @a; BEGIN { @a = 1; @a.reify; }; say @a; 01:47
camelia rakudo-{parrot,moar} 0cb22e: OUTPUT«===SORRY!===␤No such method 'reify' for invocant of type 'Array'␤»
raydiak r: my @a; BEGIN { @a = 1; @a.REIFY; }; say @a; 01:48
camelia rakudo-parrot 0cb22e: OUTPUT«===SORRY!===␤Not enough positional parameters passed; got 1 but expected 3␤»
..rakudo-moar 0cb22e: OUTPUT«===SORRY!===␤Too few positionals passed; expected 3 arguments but got 1␤»
raydiak r: my @a; BEGIN { @a = 1; @a.REIFY(1); }; say @a; 01:49
camelia rakudo-moar 0cb22e: OUTPUT«===SORRY!===␤Too few positionals passed; expected 3 arguments but got 2␤»
..rakudo-parrot 0cb22e: OUTPUT«===SORRY!===␤Type check failed in binding parcel; expected 'Parcel' but got 'Int'␤»
raydiak r: my @a; BEGIN { @a = 1; @a.REIFY(1,1); }; say @a;
camelia rakudo-{parrot,moar} 0cb22e: OUTPUT«===SORRY!===␤Type check failed in binding parcel; expected 'Parcel' but got 'Int'␤»
raydiak r: my %a; BEGIN { %a = 1 => 1 }; say %a; 01:51
camelia rakudo-{parrot,moar} 0cb22e: OUTPUT«1 => 1␤»
01:57 baest left 01:59 gr33n7007h left 02:02 baest joined 02:21 eternaleye left 02:24 vendethiel left
dalek c: ccc9213 | util++ | lib/Language/5to6.pod:
Initial version of Perl 5 to Perl 6 translation index.
02:25
c: 0514cd2 | util++ | lib/Language/5to6.pod:
Add "Other sources of translation knowledge" to Language/5to6
c: b3e5709 | util++ | lib/Perl6/TypeGraph/Viz.pm:
Change Viz to work with Rakudo Star 2014.12
02:27 eternaleye joined
dalek osystem: a62f748 | (Andrew Egeler)++ | META.list:
Add SOAP::Client
02:28
02:29 vendethiel joined 02:31 kaleem left 02:33 fhelmberger joined 02:35 baest left 02:36 novice123 joined 02:37 eternaleye left, fhelmberger left 02:38 novice123 left, eternaleye joined 02:45 baest joined 02:49 eternaleye_ joined 02:51 eternaleye left, eternaleye_ is now known as eternaleye 02:59 colomon left, colomon joined 03:11 amaliapomian joined 03:12 noganex_ joined 03:15 noganex left 03:18 Psyche^ joined 03:22 Patterner left
dalek rl6-most-wanted: 1392c27 | Adrian++ | most-wanted/bindings.md:
Mention some WIPs
03:49
03:58 vendethiel left
dalek p/js: d50cf6d | hoelzro++ | src/vm/js/QAST/Compiler.nqp:
Actually use setup array in callmethod
03:58
rl6-most-wanted: f12ee35 | Adrian++ | most-wanted/modules.md:
Update modules.md

Add a few wanted modules, mention a few WIPs.
04:00
04:00 panchiniak joined
raiph .tell timotimo: nbviewer.ipython.org/github/zmughal...demo.ipynb 04:02
yoleaux raiph: What kind of a name is "timotimo:"?!
raiph .tell timotimo nbviewer.ipython.org/github/zmughal...demo.ipynb
yoleaux raiph: I'll pass your message to timotimo.
04:06 vendethiel joined
dj_goku so I am trying to use NativeCall. how can I represent a null pointer? 04:13
tony-o probably an undefined instance of "is repr('CPointer')" 04:16
skids Yes use the type of the pointer. 04:18
e.g. CArray[int] or buf8 or your CPointer class's name or whatnot. 04:19
dj_goku so class ANull is repr('CPointer') {} 04:22
sub test(ANull()) is native('lib') { * } 04:23
?
skids I think you can just jam OpaquePointer in there, but I generally try to match the type.
04:25 BenGoldberg left
dj_goku well the docs just says NULL so. 04:25
method(NULL)
not sure why you would just pass in NULL.
skids dj_goku: github.com/skids/perl6sum/blob/mas...bmhash.pm6 see lines 182 and 239 04:26
04:28 vendethiel left 04:31 telex left
tony-o you could also just try passing an int32 in 04:31
TimToady what if it's a 64-bit pointer? 04:32
04:32 telex joined
tony-o int64 04:32
skids What if it's a 32 bit pointer?
04:32 vendethiel joined
tony-o just do an array of int8s of guesstimated size 04:33
TimToady not that pointers are guaranteed to match integer sizes under C anyway
void* isn't even guarangeed to match int*
*teed
modern machines mostly let us cheat on that, of course, but it was not always so 04:34
but on the old word-based machines, a word pointer could be smaller than something that has to point into a word 04:36
skids C is indeed a "swordfight on a greased floor" 04:37
dj_goku I am trying to start here: gearman_client_st *client= gearman_client_create(NULL); 04:38
lol
I have no idea what I am doing.
skids First you need the prototype of gearman_client_create. 04:39
Appears to be 'gearman_client_st *gearman_client_create(gearman_client_st *client)' 04:40
dj_goku my sub client(CArray[int8]) returns Instance is native('libgearman') is symbol('gearman_client_create') { * }
skids my sub client(Instance) returns Instance is native('libgearman') is symbol('gearman_client_create') { * } 04:42
and class Instance is REPR('Cpointer') { stuff }
You can choose another name other than "Instance" if you like.
But then you'd e.g. my Instance $i = client(Instance); 04:43
Then check $i.defined to make sure you got something.
dj_goku hmm
m: class Instance is repr('CPointer') { my sub client(Instance) returns Instance is native('libgearman') is symbol('gearman_client_create') { * } } 04:47
camelia rakudo-moar 0cb22e: OUTPUT«===SORRY!=== Error while compiling /tmp/pk3pihuJhN␤Can't use unknown trait 'is native' in a sub declaration.␤at /tmp/pk3pihuJhN:1␤------> ␤ expecting any of:␤ rw parcel hidden_from_backtrace hidden_from_USAGE␤ …»
skids star: use NativeCall; class Instance is repr('CPointer') { my sub client(Instance) returns Instance is native('libgearman') is symbol('gearman_client_create') { * } } 04:48
camelia ( no output )
dj_goku whoops
use NativeCall; :D
skids (Actually surprised that did not die by not finding libgearman.) 04:49
avuserow_ it won't die until first use
skids It does in some scenarios IIRC, like if you use the file that uses NativeCall. 04:50
avuserow_ star-m: use NativeCall; class Instance is repr('CPointer') { }; my sub client(Instance) returns Instance is native('libgearman') is symbol('gearman_client_create') { * }; client(Instance)
camelia star-m 2015.01: OUTPUT«Cannot locate native library 'libgearman.so'␤ in method postcircumfix:<( )> at /home/camelia/rakudo-star-2015.01/install/languages/perl6/lib/NativeCall.pm6:130␤ in block <unit> at /tmp/E7NxWAzias:1␤␤»
dj_goku so $i.defined is true. 04:54
!
skids \o/
dj_goku so that means if found the method in the library libgearman right? 04:58
skids Most probably, yes. Next find a sub that takes a gearman_client_st and returns something recognizeable, and you can be sure. 05:00
e.g. see if you can set and then get the gearman_client_timeout 05:01
05:04 chenryn joined 05:14 raiph left
dj_goku skids: thanks, still kind of lost. 05:20
05:41 kaleem joined 05:45 kaleem left
dj_goku so the return of gearman_client_add_server() is an enum: github.com/jeffreyhorner/gearman/b...turn.h#L44 how would I represent that in NativeCall int? 05:50
avuserow_ dj_goku: so there, GEARMAN_SUCCESS would be 0, and 1 additional for each enum item until you get to the ones with = 05:58
I've had success with copy/pasting those enum lists and reworking it to be P6 syntax 05:59
05:59 vendethiel left
avuserow_ let me take a stab at this one for an example 06:00
06:01 diana_olhovik_ joined 06:04 mr-foobar left
jdv79 Gearman can be a pain because it uses blocking sockets. It does not appreciate network instability. And i do not appreciate babysitting it during those times. 06:06
06:08 vendethiel joined
avuserow_ dj_goku: gist.github.com/avuserow/d015dd9a34891880de37 # one way of doing it 06:09
if you didn't want to keep the comments, then you can use a qw-style list which is a lot easier to convert
06:10 xfix joined 06:11 wicope joined
avuserow_ not sure if there's a way to add in the aliased ones, haven't had to deal with that one before 06:12
06:22 diana_olhovik_ left 06:26 bjz joined 06:30 crux left 06:31 bjz left 06:42 Rounin joined 06:45 jack_rabbit left 06:54 kaleem joined 06:55 jack_rabbit joined 06:59 Akagi201 left 07:00 Akagi201 joined 07:01 crux joined 07:06 dayangkun joined 07:11 jack_rabbit left 07:13 darutoko joined 07:15 rindolf joined, diana_olhovik joined 07:20 Akagi201_ joined, dayangkun left 07:22 Akagi201 left 07:31 bjz joined 07:36 _mg_ joined 07:39 espadrine joined
_mg_ homebrew is updated to Rakudo Star 2015.01 07:42
07:47 FROGGS joined 07:51 vendethiel left 07:53 _mg_ left 07:55 _dolmen_ joined
[Tux] gist.github.com/Tux/79249758ad2a5ae78984 <= I think this is a new segv 07:57
07:57 vendethiel joined
FROGGS [Tux]: no, it is the same 07:58
[Tux] ok
FROGGS see github.com/MoarVM/MoarVM/issues/175
m: use Test; class Foo { method bar { } }; my $foo = Foo.new; my @a = <a b c d>; sub baz(|) { ok $foo.bar, "bar" }; for @a { for @a { baz @a } }
camelia rakudo-moar 0cb22e: OUTPUT«(signal SEGV)not ok 1 - bar␤␤# Failed test 'bar'␤# at /tmp/7H6x0jeroR line 1␤not ok 2 - bar␤␤# Failed test 'bar'␤# at /tmp/7H6x0jeroR line 1␤not ok 3 - bar␤␤# Failed test 'bar'␤# at /tmp/7H6x0jeroR line 1␤not ok 4 - bar␤␤# Faile…»
FROGGS this is the golfed version 07:59
08:00 _dolmen_ left 08:02 prime- joined 08:04 prime left 08:05 Ven_ joined 08:09 xfix left
FROGGS [Tux]: can you check that this also "solves" the problem for you? gist.github.com/FROGGS/1effa794a059e6e4eddd 08:11
[Tux] $ locate spesh/log.c 08:12
/pro/3gl/CPAN/rakudobrew/moar-nom/nqp/MoarVM/src/spesh/log.c
/pro/3gl/CPAN/rakudobrew/git_reference/MoarVM/src/spesh/log.c
which of the two?
FROGGS the former I guess 08:14
the latter is the cloned repo, not your build root for moarvm
after patching you'd have to: cd /pro/3gl/CPAN/rakudobrew/moar-nom/nqp/MoarVM && make install 08:15
and leave nqp and rakudo untouched
08:16 abraxxa joined
[Tux] unless I did something wrong, it doesn't fix the issue 08:16
gist.github.com/Tux/e398c043a80ecf498a05
FROGGS strange 08:18
but possible, given that my "patch" is more then weird also
08:19 _mg_ joined, vendethiel left 08:20 zakharyas joined 08:22 vendethiel joined
avuserow_ m: sub foo(*%h) {say %h.perl}; foo(a => 1); my $a = "foo"; foo($a => 1); # is it possible to make the latter call work? 08:24
camelia rakudo-moar 0cb22e: OUTPUT«("a" => 1).hash␤Too many positionals passed; expected 0 arguments but got 1␤ in sub foo at /tmp/Zeym0JsAkS:1␤ in block <unit> at /tmp/Zeym0JsAkS:1␤␤»
Ven_ hoelzro: are you interested in racket :)? 08:25
avuserow_ m: sub foo(*%h) {say %h.perl}; foo(a => 1); my $a = "foo"; foo(|{$a => 1}); # this works, is there a better way? 08:26
camelia rakudo-moar 0cb22e: OUTPUT«("a" => 1).hash␤("foo" => 1).hash␤»
moritz good morning 08:27
ftr, I now know why ilbot and me disappeared yesterday night 08:28
the VM had to be shut down and restarted because the hypervisor on which it ran was broken
Ven_
.oO( I certainly missed ilbot )
08:29
moritz such a good, silent companion 08:30
[Tux] I asked in Brussel: is the method that shows perl6 errors in full color with the eject character also available to scripts?
show_colored_error("Message", $position); 08:31
moritz [Tux]: it's in X::Comp.gist
[Tux]: I geuess it could be factored out a bit better 08:32
08:37 xinming joined 08:39 pdcawley joined 08:41 Ven_ left 08:45 espadrine left, Alina-malina left 08:49 Alina-malina joined
sergot morning :) 09:00
09:04 baest left, vendethiel left 09:07 vendethiel joined, panchiniak left 09:08 _mg_ left 09:12 yeahnoob left
moritz serg\ot 09:13
jnthn o/
09:19 araujo joined
tadzik hello hello 09:19
09:23 lue is now known as ShimmerFairy 09:25 Ven_ joined 09:27 yoleaux left 09:30 Ven_ left 09:35 andreoss joined, [Sno] left 09:38 rurban joined 09:40 espadrine joined
dalek c: 6d0c745 | paultcochrane++ | lib/Language/regexes.pod:
Typographical etc. corrections in regexes.pod
09:40
c: d06a7a5 | paultcochrane++ | lib/Language/regexes.pod:
Unicode categories now group with parens in Rakudo
c: 116cefa | paultcochrane++ | lib/Language/regexes.pod:
Wrap paragraphs more consistently in regexes.pod
09:46 f3ew left, dakkar joined
JimmyZ paultcochrane++ 09:48
09:49 vendethiel left 09:53 vendethiel joined
masak good anteno\on, #perl6 09:54
09:56 pdcawley left 09:57 f3ew joined 09:59 stux|RC-only left 10:03 stux|RC-only joined
masak colomon++ # justrakudoit.wordpress.com/2015/02...o-do-list/ 10:03
jnthn First two are high on my list too, though want to get through the natives stuff and dig into NFG first. 10:05
I'll leave the third one for the mathematically inclined to ponder. :) 10:06
10:16 sqirrel_ joined 10:19 coffee` joined 10:24 adu left 10:25 [Sno] joined 10:29 pdcawley joined 10:33 chenryn left, Ven_ joined 10:34 _mg_ joined 10:35 myp joined, fhelmberger joined 10:37 adu joined 10:39 fhelmberger left 10:41 mvuets joined
masak the third one is workaroundable. 10:41
(though of course all these would be nice to have in core) 10:43
10:46 kaleem left 10:55 fhelmberger joined 10:56 alini joined 10:58 vendethiel left 11:00 vendethiel joined 11:02 sqirrel_ left
Ven_ hoelzro introduced the :) smiley... 11:05
m: sub ('hey':){}
camelia ( no output )
11:13 chenryn joined
tadzik :D 11:13
masak I just realized something I want before 6.0.0^W6-day.
I want us to dogfood parsing, and make something like PPI moot/core. 11:14
(a) allow github.com/moritz/perl6-all-modules to perform searches on the AST level
(b) same, but with all the spectests 11:15
11:16 _mg_ left
masak granted, colomon++'s list is more important because it's about stability. and this is a feature request. 11:16
but it's one I feel isn't frivolous -- it's within our grasp, and it's *sorely lacking*. people come in and ask for it on a regular basis.
it feels like a loop that we ought to close this year.
jnthn masak: That ties in strongly with the AST stuff we need for macros, which as we've pondered will want compiler changes (to build the higher level tree in actions instead). 11:18
It's at least as much work as the NSA/NFG/GLR things, and we'll do well to address those 3 and deal with the key stability issues we still have this year. 11:20
Not to mention a lot of polishing.
masak *nod* 11:21
I'm not claiming this has priority over NSA/NFG/GLR.
FROGGS yeah, I also dont expect that we will have time to grok macros this year too
masak let me revise my stance to this: just as I want us to have worked out a way forward with macros in 2015, I want us to have worked out a way forward with self-parsing. 11:22
jnthn Me either. I'm fine with it being worked out, but we don't have the time/resources to do it as well as it wants doing this year.
masak and yes, Qtrees are the common feature of these two.
11:23 jack_rabbit joined
jnthn masak: I think "self parsing" should really end up being "pass the compiler source, get back a QTree" 11:25
masak right. 11:26
masak is searching for the right word 11:27
"get back a Qtree" doesn't completely cover it.
because the Qtree is attached to a World.
I think "messy" or "organic" or something like that is what I'm grasping for. 11:28
jnthn Surely a QTree contains references to objects representing declarations
Just as QAST::WVal does
masak yes, that's what I mean.
hm, so maybe the Qtree stands in for the World, actually. 11:29
masak .oO( Qtree, you mean the World to me )
jnthn Dunno
What I *do* know is that to really do this will need substantial changes in Perl6::[Actions&World]
masak nodnodnod 11:30
this is so much an experimental branch, it's silly
I see it as a "two sides of the same coin" kind of thing. it makes sense both to ask "what's the method object for thie method Qtree?" *and* "what's the method Qtree for this method object?"
11:32 chenryn left
jnthn Yes, experimental branch indeed 11:32
masak nice, one of my favorite programming books is on HN: www.vintage-basic.net/games.html -- news.ycombinator.com/item?id=9026063
11:33 chenryn joined
jnthn I'm fine with "work out a way forward" 11:34
masak I think even that work could be quite exciting.
and it might inform some of the work that needs to be done this year, too.
11:34 tardisx joined
jnthn But I'm against significant architectural changes to the heart of the compiler this year. It's too much risk/distraction. 11:34
masak agree completely. 11:35
but I think, taking a step back, that Perl 6 needs to have these kinds of concrete but lofty goals that push the envelope a little.
jnthn For something that I'm confident, with time and care, we can do in a non-breaking way later.
El_Che don't take away Christmas ;)
masak I'm not proposing delaying Christmas, don't worry :P
El_Che :) 11:36
jnthn masak: Yes, it's important to keep the lofty goals, but also keep our eye on the more immediate prize too. :)
masak I think the dream of self-parsing was sown early in me, and I consider it part of my mission in the Perl 6 community to bring it to fruition.
that primarily means implementing macros, but there's other stuff involved too.
itz_ "of course we meant orthodox xmas using another way of counting years" 11:37
El_Che "we meant the original Christmas, so come again when you've constructed a time machine" 11:38
11:40 pmurias joined 11:41 jack_rabbit left 11:45 jack_rabbit joined
masak actually I care much more about Perl 6 being able to *parse* Perl 6 than Perl 6 being implemented purely in Perl 6. 11:45
arnsholt Agreed. Although arguably, Perl 6 parsing Perl 6 is sort of a prerequisite for Perl 6 in Perl 6 11:48
colomon +6 11:54
11:56 chenryn left, Ven_ left, chenryn joined 12:01 alini left 12:02 alini joined
timotimo .botsnack 12:05
12:07 jack_rabbit left 12:16 raiph joined 12:18 andreoss left
dalek rl6-most-wanted: c00881d | timo++ | most-wanted/bindings.md:
add cairo and sdl2 bindings to the WIP parade
12:18
12:25 Kristien joined
Kristien good morning 12:25
12:29 telex left, Kristien left 12:30 telex joined 12:31 vendethiel left 12:32 vendethiel joined 12:35 dayangkun joined
|Tux| Text::CSV just passes an extra 17000 tests and does not dump core anymore 12:36
12:39 rmgk_ joined, rmgk left, rmgk_ is now known as rmgk, xfix joined 12:42 rurban left 12:43 sqirrel_ joined
hoelzro o/ #perl6 12:45
masak \o
|Tux|: wow. 12:46
|Tux|: I don't have enough context for that, but it sounds rather big.
|Tux| what it does is checking all allowed (and not allowed) combinations of sep, quo, esc and options
pmurias hoelzro: hi
|Tux| sep *must* be defined, but e.g. cannot be '\t' if allow-whitespace is true 12:47
hoelzro morning masak, pmurias
pmurias masak: re Qtree macros one sensible approach would be to prototype things out using 007
|Tux| I think I now need lizmat for new ideas about how to deal with streams and incomplete lines
masak pmurias: that's what 007 is there for, yes. 12:48
pmurias: it runs directly on Qtrees.
pmurias masak: and re performing searches on the ast level can't we do in with the existing stuff (by using the existing parse tree/QAST) 12:50
12:56 [Sno] left 12:57 chenryn left
pmurias findmethod is inconsistent across nqp-j and nqp-m 12:58
it returns null on nqp-j
and raises an exception on nqp-m
nwc10 pmurias: sorry if I'm asking a daft or obviosu question - nqp-js hasn't yet closed the bootstrap loop has it? And that's a big chunk of work? 13:00
13:00 raiph left
pmurias nwc10: the pre-rewrite nqp-js could compile itself and pass the tests, the current one can't 13:03
nwc10 ah OK. 13:04
I'm very impressed with it all, but really not in a position to help, other than to bounce around enthusiastically and say "Well done" 13:05
pmurias it's still a fair amount of stuff left for a bootstrap
13:05 sqirrel_ left 13:07 Ven_ joined, adu left 13:11 skids left
FROGGS |Tux|: how did you work around the segfault? 13:15
|Tux| by not causing an error
FROGGS hmmmm 13:16
13:16 vendethiel left
|Tux| the error was caused by a stupid mistake: the parser is not allowed to start parsing when the attribute combination is not valid 13:16
remember why I need BUILD? 13:17
FROGGS no, I dont
|Tux| I forgot to check $sep being whitespace on whitespace allowed
dalek p/js: d653ba7 | hoelzro++ | src/vm/js/nqp-runtime/runtime.js:
Handle undefined when to-stringing
FROGGS ahh
|Tux| short summary: «my $csv = Text::CSV.new (sep => "\t", allow-whitespace => True);» should fail 13:18
new assigns *directly* to the attributes, so I need a check after all attributes have been set
FROGGS aye
|Tux| combine that with the fact that I want (sep =>? ",") to be exactly the same as (sep_char => ",") and (sep-char => ",") 13:19
you'll probably see my need for BUILD
I need new (sep => ",") to be exactly the same as new().sep(","); 13:20
Ven_ .tell masak www.theerlangelist.com/2014/07/unde...art-6.html more insight on elixir's macros with macro-at-compile-time..."stuff"
|Tux| every attribute has a setter and a getter, so every access can be checked for validity 13:21
FROGGS m: class Foo { has $.sep; has $.allow-ws where { $_ && $!sep !~~ /^\s+$/ } }; Foo.new( :sep<\t>, :allow-ws ) # sad that this is NYI :o)
camelia rakudo-moar 0cb22e: OUTPUT«===SORRY!=== Error while compiling /tmp/o2VFR1hUR7␤Post-constraints on variables not yet implemented. Sorry. ␤at /tmp/o2VFR1hUR7:1␤------> ow-ws where { $_ && $!sep !~~ /^\s+$/ } ⏏}; Foo.new( :sep<\t>, :allow-ws ) #…»
|Tux| the where clauses will be a new temptation :)
Ven_ no bot? 13:22
no tell..
FROGGS once it is implemented, aye
13:22 vendethiel joined
|Tux| github.com/Tux/CSV/blob/master/test-t.pl#L229 13:22
FROGGS |Tux|: the good thing about attribute where conditions is that even when you expose an attribute via different names, the check will happen at a single place 13:23
jnthn away for l'afternoon &
timotimo have a good one, jnthn :)
|Tux| additional conditions apply
13:25 dayangkun left 13:31 kaleem joined, kaleem left 13:38 _mg_ joined 13:41 Kristien joined
Kristien do non-webdev jobs still exist? 13:41
timotimo plumbers have died out completely 13:42
and all bakeries have closed down as well
economic experts have concluded that humanity can sustain its existence solely on building more web sites and web apps 13:43
FROGGS :D
Kristien TIL web apps aren't websites.
timotimo .o( i'd read a short story about that concept )
dalek p/js: 17944b7 | hoelzro++ | src/vm/js/ (4 files):
Implement nqp::reprname
timotimo well, economic experts aren't really good at the technical things 13:44
Kristien A non-webdev job would be nice but I can't find any.
hoelzro pmurias: I noticed something in nqp-js yesterday; callmethod just uses regular JS property lookup to find the method 13:45
(ex. github.com/perl6/nqp/blob/js/src/v....nqp#L605)
should it be using something like findmethod?
masak pmurias: re irclog.perlgeek.de/perl6/2015-02-10#i_10091073 -- could you create (or indicate how to go about creating) a proof of concept of that? I'd be really interested in what's possible today, and I don't quite see it myself.
13:45 [Sno] joined, [particle]1 joined 13:46 Kristien left, [particle] left
pmurias hoelzro: it currently doesn't work for objects that don't have a set method cache 13:46
hoelzro ah ha
ok, just making sure that wasn't a bug! 13:47
pmurias findmethod does't work on ones without a method cache too :/
hoelzro =( 13:48
pmurias I still haven't fully figured out how to implement calling methods on objects without method caches without a performance penalty 13:49
we should be able to bootstrap nqp and run most of Perl 6 without that ability 13:51
moritz why would you not want method caches?
13:53 _mg_ left
dalek p/js: 01e9dae | hoelzro++ | src/vm/js/nqp-runtime/runtime.js:
Handle nulls in stringification too
13:54
pmurias moritz: CANDO 13:55
13:56 Mouq joined
moritz pmurias: if that means what I think it does, it's only an argument against caches that are authoritative for the absense of methods 13:56
pmurias moritz: nqp-js assumes that caches always exists and are authorative 14:02
moritz pmurias: and I think that's fine
14:05 tardisx left
moritz pmurias: at least for bootstrapping 14:07
pmurias: for rakudo, it probably needs other cache authorativity levels, but it's fine if they are slower 14:08
jnthn pmurias: For a JS method cache, I suggest building a JS object with the methods put in the cache on it 14:11
And then just doing the call like an object call on that, with a "is it there" check first
I would imagine that' the kinda thing a JS impl can do well on today
14:12 Kristien joined
jnthn turned out to be not so away yet :) 14:12
hoelzro pmurias: is there a reason that P6Opaque doesn't have basic_type_object_for? 14:14
14:14 Kristien left
masak .oO( Less Than Away ) 14:14
FROGGS hehe 14:15
Ven_ .tell masak www.theerlangelist.com/2014/07/unde...art-6.html more insight on elixir's macros with macro-at-compile-time..."stuff" 14:20
Ven_ didnt want to tell, but was too lazy to remove it...
masak Ven++
masak .oO( .show, don't .tell )
14:22 kaare_ left
dalek p/js: 63f9212 | hoelzro++ | src/vm/js/nqp-runtime/core.js:
Fix indent
14:23
masak Ven_: I take it that `unquote(action)` takes the symbol `action` and inserts it as an identifier in that part of the code.
...intriguing.
14:26 vendethiel left
dalek p/js: 14a7fb9 | hoelzro++ | src/vm/js/ (3 files):
Implement nqp::newtype
14:28
masak I think having such an `unquote()` primitive in the language might carry us quite far. 14:29
14:29 vendethiel joined
Ven_ well, that's {{{ }}}/ 14:29
masak yes.
Ven_ and quote is obviously :quasi 14:30
quasi*
and then we can think of modifiers for bindings and/or auto-unquoting
masak we'd still need to marry it to the notion of grammatical category, though.
dalek kudo-star-daily: 2977ff6 | coke++ | log/ (14 files):
today (automated commit)
14:31
masak "When it comes to macro execution, it's important to distinguish between the macro context and the caller's context" -- ayup. 14:32
Mouq Hey, masak, on that topic, I have a proposal for an alternative to "macro swap($a, $b)" in that post from December
masak oh, the substitution one?
this one? strangelyconsistent.org/blog/macros...eholdeeers 14:33
Mouq macro swap($a, $b) { Q.codeToNode(-> $x, $y { ($x, $y) = $x, $y })($a, $b) }
masak: Yup
masak thinks
Ven_ has just been throwing stuff at the poor masak about macros for quite some time now... :P
masak you need to revise your swap implementation, but let's ignore that... :)
Mouq oop, well I never said it was a bug-free alternative :9 14:34
14:34 rurban joined
Ven_ masak: elixir uses var!() to have you refer to a.. "variable name" 14:35
14:35 Ven_ left 14:36 chenryn joined 14:38 chenryn left
Mouq masak: If you want, I'll try to write up more about that and why I think it's a good step later… I've been meaning to set up a blog (which would include stuff like the Q issue proposal) (though right now I need to do homework and get ready for class) 14:42
14:42 Ven_ joined 14:43 chenryn joined
masak ++Mouq # I would very much like that 14:49
14:51 skids joined 14:52 vendethiel left, darutoko left
pmurias hoelzro: no there isn't, I have added it in my working copy 14:53
hoelzro: I should have commited partially done stuff before going out for lunch ;) 14:55
merge conflicts :( 14:56
[Coke] TimToady++ # interview with miyagawa
14:57 darutoko joined, chenryn left 14:59 vendethiel joined
[Coke] .seen miyagawa 15:00
15:00 Rounin left
Mouq [Coke]: Bot's not up :( 15:00
dalek p/js: b6e301f | (Pawel Murias)++ | / (3 files):
Implement nqp::can.
15:03
p/js: cf09917 | (Pawel Murias)++ | / (4 files):
Implement nqp::setcodename/nqp::getcodename.
p/js: aaa2166 | (Pawel Murias)++ | src/vm/js/QAST/Compiler.nqp:
Implement nqp::setwho.
pmurias jnthn: my current idea is to have an object "class" that implements all the method names used (without the ones constructed at runtime) and wrap the objects without method caches in it 15:07
[Coke] wow, I was going to say nice outro music on the interview.... until I realized that it was itunes going to the next track. whoops. 15:08
pmurias++ 15:09
hoelzro++
alright, I added a blocking ticket for the release. That's one. :)
pmurias hoelzro: I'm now working on nqp::where 15:14
15:15 chenryn joined
jnthn [Coke]: Tag, or ticket that we'll add dependencies to? 15:19
FROGGS rt.perl.org/Ticket/Display.html?id=123766 - [META] Tickets blocking the 2015 release of Perl 6 15:20
15:20 Mouq left
jnthn Cool 15:21
[Coke]++
FROGGS m: (6;)
camelia rakudo-moar 0cb22e: OUTPUT«===SORRY!===␤Cannot find method 'returns'␤»
FROGGS interesting one
15:22 mr-foobar joined
jnthn Do we have an idea of the criteria for adding things as blockers? 15:22
FROGGS gut feeling?
so, "no"
[Coke] well, I figure if you, pmichaud, or TimToady say so, that's one. 15:23
Anything that is only broken on "not moar" isn't eligible. 15:24
FROGGS I'd say that all perl6-m segfaults should be on that list
jnthn [Coke]: Yes, thta sounds like a centralized democracy approach :)
[Coke] segfaults are always bad.
jnthn FROGGS: +1
[Coke] heh, I typed that before scrolling down to see FROGGS's note. :)
FROGGS :o)
consensus 15:25
[Coke] but it's always possible to tag first and we can disagree later.
dalek p/js: 8f91ff9 | (Pawel Murias)++ | src/vm/js/ (3 files):
Implement nqp::where for object that have an STable.
FROGGS sure
PerlJam [Coke]++
[Coke]++ (Again, because I'm just catching up :)
jnthn True :)
dalek p/js: c636caf | (Pawel Murias)++ | src/vm/js/nqp-runtime/core.js:
Remove leftover console.log.
15:26
p/js: f938fc6 | (Pawel Murias)++ | src/vm/js/bin/run_tests:
Add test 91 to run_tests.
PerlJam "Anything that makes everyday mistakes surprising"? (The LTA error on non-existent role for instance) 15:27
(and the one FROGGS just showed)
15:27 kaleem joined
timotimo as i expected, that error message comes from the optimizer, FROGGS 15:27
jnthn PerlJam: LTA is, well, what it says. 15:28
FROGGS timotimo: look: rt.perl.org/Ticket/Display.html?id=123696
jnthn Not as good as it should be isn't equal to blocker.
pmurias IMHO getting automatic precompilation seems like something that shoulld be done before the big release
FROGGS timotimo: it is possible that the optimizer sneaks in that NQPMu here, but I would bet that the actions are to blame 15:29
pmurias: that sounds more like a nice to have feature
timotimo what m)
jnthn I'd consider pre-comp bugs as worthy of blocking. Automatic management of that is certainly nice to have.
PerlJam jnthn: then maybe we need another meta-ticket for "nice to haves" as well.
jnthn PerlJam: Perhaps so. 15:30
pmurias It's more "embarassing not to have"
but not a bug in a strict sense
FROGGS *g*
lizmat is too knackered to read the backlog and goes back to bed 15:32
15:32 colomon left
FROGGS waves at lizmat 15:33
jnthn lizmat: Aww...get well soon!
15:33 colomon joined
timotimo sorry to hear that, liz 15:34
best of luck :)
hoelzro pmurias: ooc, how are you going to implement that?
pmurias hoelzro: that? 15:35
hoelzro: the object wrapping?
hoelzro sorry, nqp::where
15:36 kaleem left
hoelzro ah, I see 15:36
15:36 Ven_ left
pmurias hoelzro: WeakMaps would be a cleaner way to implement that 15:37
unfortunately they are hidden being a flag in node
hoelzro =(
[Coke] of course, nothing stoping folks from fixing bugs that bug them in time for the release. :)
masak get well soon, lizmat 15:39
jnthn [Coke]: Absolutely, fixing just about anything is encouraged. Blockers are more about "what do we absolutely not want to knowingly let slip out" 15:40
[Coke] There are currently 936 fudge lines that match a generic rakudo or rakudo.moar in roast. 15:44
sivoais timotimo: if you want to work on the iperl6kernel more, let me know. I've got it working with Perl5. 15:47
timotimo i don't really know how exactly to progress with my version 15:48
i may want to start over, or maybe implement the protocol first and then see what's next
15:49 Kristien joined, Kristien left 15:51 Kristien joined
Kristien m: 0..* Z+> 1 xx * 15:51
camelia rakudo-moar 0cb22e: OUTPUT«(timeout)»
15:51 Ven_ joined
Kristien m: (0..* Z+> 1 xx *)[^10].say 15:51
camelia rakudo-moar 0cb22e: OUTPUT«0 0 1 1 2 2 3 3 4 4␤»
Kristien most interesting 15:52
15:52 chenryn left
masak sink context, I guess. 15:52
TimToady m: say 0..* Z+> 1 xx *
camelia rakudo-moar 0cb22e: OUTPUT«0 0 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 32 33 33 34 34 35 35 36 36 37 37 38 38 39 39 40 40 41 41 42 42 43 43 44 44 45 45 …»
sivoais timotimo: I'll take a look later this week. It'll give me a chance to rethink my design in Perl5 too.
TimToady say will automatically stop at 100
timotimo cool
TimToady well, .gist
timotimo do you have perl6 experience? i'm not sure i've seen your nick here before
sivoais timotimo: a little. I've been lurking here for years and reading all the Perl6 blogs. Just haven't done any major contribs yet. 15:53
Kristien masak: I mean the output is interesting
timotimo a good point to work on would probabl ybe making Net::ZMQ more complete and much more tested
OK :)
Kristien the timeout was a failure on my end
sivoais ah, that sounds fun! I've wanted to play with the native call functionality 15:54
especially since FFI is getting better in Perl5 land too
timotimo ah? did something kind of like zavolaj appear in perl5 land? 15:55
sivoais timotimo: <metacpan.org/pod/FFI::Platypus>. Don't know enough to compare it with zavolaj 15:56
hoelzro not #perl6, but I know others here like human languages, and someone did a great writeup on Norwegian: www.reddit.com/r/languagelearning/c...f_the_week
FROGGS sivoais / timotimo: that is using libffi and it supports C, C++, FORTRAN and what not 15:57
sivoais: though, having a proper type system pays of here... 15:58
sivoais yeah, I can imagine :-P
Kristien libffi is good
FROGGS sivoais: using Platypus you deal with strings a lot, and in Perl 6 you declare a class with uint8 attributes for example and then you just instanciate or return that 15:59
15:59 Kristien left
sivoais I'm reading through <github.com/perl6/specs/blob/master...de.pod> and liking what I see 16:00
FROGGS sivoais: this one is up-to-date: github.com/jnthn/zavolaj
(because it is the working implementation) 16:01
16:01 mr-foobar left
FROGGS for example, the last paragraph mentions a hypothetical reinterpret() sub... that implemented nowadays and called nativecast() 16:01
arnsholt Yeah, the tests give a better view of the available functionality than the docs 16:02
FROGGS ... or the synopsis
16:03 vendethiel left
timotimo and global variables ... 16:03
abraxxa what i'm missing is a pass-by-reference string type 16:04
FROGGS buffers should do I think
16:04 vendethiel joined
abraxxa FROGGS: was that at me? 16:04
FROGGS abraxxa: aye 16:05
abraxxa FROGGS: we discovered a bug some days ago that .bytes doesn't return what it should
i'm waiting on the next release to continue with DBDish::Oracle
FROGGS hmmm, do you have it at hand?
m: say "fööö".encode.bytes 16:06
camelia rakudo-moar 0cb22e: OUTPUT«7␤»
abraxxa this dance is annoying if you have to do it for almost each parameter: github.com/abraxxa/DBIish/blob/mas...e.pm6#L459
retupmoca FROGGS: the bug has been fixed and tested, it's just not in a release yet 16:07
abraxxa m: say "fööö".encode('utf-16').bytes
camelia rakudo-moar 0cb22e: OUTPUT«8␤»
abraxxa i guess the bot runs the fixed version
FROGGS yes, camelia here is up-to-date
star-m: say "fööö".encode('utf-16').bytes
camelia star-m 2015.01: OUTPUT«4␤»
abraxxa it outputs 4 here
FROGGS ohh, I see :o) 16:08
abraxxa i often need a pointer to something and like a one-line construct in NativeCall for it
FROGGS abraxxa: yes, I also thought about allowing OpaquePointer[Int] for example 16:09
16:09 Kristien joined, mr-foobar joined
jnthn I think with the native references work I'm going we may be able to get "int $x is rw" to work out 16:09
(and similar) 16:10
FROGGS and that will pass a pointer to int?
jnthn Yes
timotimo jnthn: how about "my int $x is native('libfoobar')"?
abraxxa jnthn: that would be AWESOME
jnthn timotimo: That one is...trickier.
*trickier
FROGGS timotimo: you are talking about C globals?
Kristien "my int $x is mine and only mine stay off it"
timotimo yes 16:11
jnthn m: my int $x is mine and only mine stay off it
camelia rakudo-moar 0cb22e: OUTPUT«===SORRY!=== Error while compiling /tmp/vw2wKJH_UA␤Can't use unknown trait 'is mine' in a variable declaration.␤at /tmp/vw2wKJH_UA:1␤------> my int $x is mine ⏏and only mine stay off it␤ expecting any of:…»
jnthn :P
OK, gotta go :)
FROGGS timotimo: I tried that :o)
jnthn &
Kristien goodby jonathan
timotimo well, you tried it back then, but nowadays we have native refs. well, we almost have them
FROGGS timotimo: one problem is that you only get a QAST::Var or so in the trait to mess with
timotimo oh 16:12
hmm 16:13
perhaps my int $x := cglobal('abc') instead?
better than having a proxy, IMO
16:14 Kristien left 16:18 zakharyas left
japhb So I've got a couple files with essentially email addresses in them, one domain per file and one address per line (1e5 to 1e6 lines), and I want to load them both into memory with a view to relatively quick lookup in the future (O(log N) is good enough). How do I use the least amount of memory to do this using current Rakudo? 16:21
16:22 araujo left
japhb (Note: they're not actually email addresses, and no, I'm not sending people emails. It's actually ACL lists.) 16:22
moritz least amount of memory sounds like it should be an Array[str] (and sorted for faster lookup) 16:23
japhb I discovered to my chagrin that 'my @users = "users.txt".IO.lines.map(*.split("@")[0]);' is fairly memory hungry, and 'my @users = "users.txt".IO.lines>>.split("@")>>[0];' even more so. And that only gets me O(N) lookup. 16:24
Hmmm, I guess I could implement binary search on the arrays ....
PerlJam It's a tad odd that there isn't a binary search built-in in some way.
16:25 _mg_ joined, _mg_ left
japhb PerlJam: Makes me wonder if we need a module of just basic algorithms on simple data structures. 16:26
In Rakudo Star, I mean.
moritz maybe colomon++'s List::Util (iirc) has one? 16:27
16:27 vendethiel left
PerlJam Sounds like a good idea to me. 16:27
16:27 diana_olhovik left
PerlJam github.com/colomon/List-Utils/blob...ls.pm#L108 16:27
skids The core will need such things when implementation gets past naiveity about certain things, so it may rise to that level, but maybe the more APIish stuff in a module. 16:28
moritz fwiw p5 managed just fine without a binary search in core
timotimo one of the things that's not very optimal is that we're always storing string data 4x as big as they need to be if you have pure-ascii data
in moarvm, that is 16:29
PerlJam colomon++ (sliding window and binary search are probably all I'd every use in that module, but they would make it worth it :)
timotimo sliding window ... is that kind of what rotor does nowadays?
PerlJam moritz: and junctions and uniq and ... :)
japhb notices line 137 of List::Utils, and makes an Ewww face 16:30
timotimo: Yes, I'd forgotten about the 4x blowup.
Though it's annoying that the idioms I came up with to just save the usernames, instead of the entire address line, actually ate a lot *more* memory. 16:31
16:31 vendethiel joined
nwc10 why would one want O(log n) search on an array (and I forget what O() on insert to keep it sorted) when a hash is amortised O(1) ? 16:31
moritz idly wonders if utf8 blobs take up less memory
16:31 Ven_ left, fhelmberger left
moritz nwc10: to save the memory overhead from a hash 16:32
japhb nwc10: I'm willing to go O(1) -> O(log N) in order to save RAM.
PerlJam moritz: I was just thinking that Blob + an index would probably be smaller, but I'm not sure that blobs are really smaller
nwc10 moritz: OK. I suspect that that is not common enough to justify being in core core
japhb nwc10: That's why I suggested having it be a Star module. 16:33
dalek rl6-roast-data: aa488d8 | coke++ | / (5 files):
today (automated commit)
japhb Is List::Utils in Star?
nwc10 japhb: I totally missed that bit. Sorry
japhb forgets where to look.
nwc10 somewhere blantantly visible in the ecosystem seems cool
s/cool/useful and appropriate/; # do it once, and do it well 16:34
japhb Right
moritz japhb: nope
nwc10 shuts up and goes back to "eeww, what are these 200 unversioned files on the live work server"?
moritz japhb: and IMHO List::Utils would need a bit of cleaning before going into star
like, it offers permutations and other stuff that's been in core for quite some time now 16:35
japhb nwc10: eeww is right
moritz: Yeah, agreed.
PerlJam nwc10: they're the ones generated by the versioned stuff :) 16:36
Are permutations more "core worthy" than binary search? 16:37
japhb I'd really love sub-bufs, so I could just read in the file raw and make an array of sub-bufs from it.
dalek p/js: b437293 | (Pawel Murias)++ | t/nqp/91-codename.t:
Remove debugging say.
p/js: 95efca0 | (Pawel Murias)++ | / (2 files):
Make P6opaque have their attributes set to null when they are created.
p/js: 9dcb959 | (Pawel Murias)++ | src/vm/js/QAST/Compiler.nqp:
Implement nqp::isconcrete.
16:38 spider-mario joined
moritz japhb: you could store the Buf once, and offsets into it as integers 16:38
japhb moritz: True. I was thinking about something that would be transparent to the caller (meaning, they just see a normal array of sub-bufs (or sub-strs)) without having to write a whole class around it. 16:40
But *shrug*, I'm just dreaming at the moment.
japhb is happy to see pmurias++ able to work in-repo 16:41
[Coke] pmurias++ indeed. 16:44
16:45 eternaleye left, literal joined
japhb Why does IO::Path.slurp(:bin) use a loop and nqp::readfh, but IO::Path.slurp(:$enc) use nqp::readallfh? 16:46
pmurias hoelzro++
dalek p/js: 1a5eeb9 | (Pawel Murias)++ | / (5 files):
Implement nqp::istype.
16:47
16:48 davido_ joined
moritz japhb: but imagine the great comments you could write :-) 16:48
literal can anything be done to speed up these subroutines? why is the gather/take one so much slower than the rest? gist.github.com/hinrik/7cf05941c6b32d667c39
moritz japhb: class MemoryEfficientBufSet { # dear future self, you are not going to like this, but I *had* to save memory here
japhb: # once that needs goes away, replace this whole thing with a simple Set. Apologies. 16:49
japhb: # your truely, past self.
japhb moritz: :-D
SO TRUE
16:52 grondilu joined
grondilu literal: consider using for 1 ..^ 1000 {...} 16:52
16:53 dj_goku left, dj_goku joined
japhb This all comes from needing some rapid lookups where the backend systems are very slow, but the data sets aren't gigantic, so I can just cache in-memory -- but I've got a lot of data sets to look at, so memory is constrained. 16:54
grondilu m: my @p; for 1 ..^ 1000 -> $a { for 1 ..^ 1000 -> $b { push @p, $a*$b } }; say @p[*-1]; say now - BEGIN now
japhb considers the wisdom of just binding a memcached client, and exporting the problem
camelia rakudo-moar 0cb22e: OUTPUT«998001␤3.4862511␤»
moritz japhb: the problem is that memcached assumes it can throw away things when memory gets sparse 16:55
japhb: I'd rather throw it into a sqlite3 db
japhb: or a berkeleydb or so
japhb Oh, hmmm, good point. 16:56
Is the sqlite binding pretty stable these days? 16:57
moritz japhb: ask masak++, he has been using it, I hear
literal grondilu: I'm not sure I understand your suggestion. You're suggesting "100 ..^ 1000" instead of "100..999" ? I tried that and there's no difference in execution time.
grondilu literal: I thought there would be. My bad.
oops.
I meant as opposed to the C-style loop, not the ..^ vs .. 16:58
literal yeah, you can see I tried 3 versions in Perl 6, and one of them uses a range 16:59
japhb .ask masak How stable is the sqlite binding? And what do I need to panda install to get it?
No yoleaux?
awwww
moritz japhb: I can answer the latter, 'panda install DBIish'
japhb: though you need your own libsqlite3-dev (that's the debian package name) 17:00
japhb moritz: Ah, so sqlite is one of teh bindings included with DBIish, cool.
moritz japhb: yes
japhb moritz: Right, I figured as much. Thankfully I still get to use Debian derivatives. :-)
grondilu m: my @p; for ^1_000_000 { push @p, ($_ div 1000)*($_ mod 1000) }; say now - BEGIN now 17:01
camelia rakudo-moar 0cb22e: OUTPUT«5.523003␤»
moritz m: my @p; loop (my int $i = 0; $i < 1_000_000; $i = $i + 1) { push @p, ($_ div 1000)*($_ mod 1000) }; say now - BEGIN now 17:02
camelia rakudo-moar 0cb22e: OUTPUT«Cannot call 'infix:<div>'; none of these signatures match:␤:(Int:D \a, Int:D \b)␤:(int $a, int $b --> int)␤ in block <unit> at /tmp/zl_4b0ci8W:1␤␤»
moritz m: my @p; loop (my int $i = 0; $i < 1_000_000; $i = $i + 1) { push @p, ($i div 1000)*($i mod 1000) }; say now - BEGIN now
camelia rakudo-moar 0cb22e: OUTPUT«5.2385717␤»
17:02 PZt left
moritz m: my @p; loop (my int $i = 0; $i < 1_000_000; $i = $i + 1) { my $dummy = ($i div 1000)*($i mod 1000) }; say now - BEGIN now 17:02
camelia rakudo-moar 0cb22e: OUTPUT«2.2391307␤»
moritz half of the time is spent pushing to that array 17:03
grondilu indeed
japhb chuckles that sqlite3-doc depends on sqlite3. Because of course, right? Why would you ever want the docs without the CLI?
TimToady why do people use "now - BEGIN" now when it's shorter and more accurate to say "now - INIT now"?
moritz japhb: it's not about wanting. It needs sqlite3 to.... show the docs! 17:04
japhb Heh
moritz TimToady: old habits die hard
japhb So do old hobbits, I hear
masak TimToady: I can only speak for myself. I'm very well aware of BEGIN, and haven't thought much at all about INIT.
TimToady INIT is older than some of the people on this channel
hahainternet oh no japhb, that old story died extremely hard
masak will try to use INIT from now on :)
PerlJam BEGIN is better understood than INIT I'd wager 17:05
TimToady it'll work better with delayed execution too
masak the "Die Hard" franchaise dies hard.
japhb No better time to break a habit than now.
geekosaur I thought it was just people saw the BEGIN one being used (for a specific purpose) and adopted it for the general one?
TimToady yes, INIT?
japhb masak: It just got renamed RED, added a few heroes, and got more fun. :-)
TimToady geekosaur: probably 17:06
grondilu TimToady: I wrote 'now - BEGIN now' because that's what I've read once here. I thought it was a P6 idiom.
17:06 diana_olhovik_ joined
moritz geekosaur: that's what they call cargo cult programming :-) 17:06
geekosaur yep
grondilu :/
geekosaur welcome to the real world
japhb grondilu: the concept is idiomatic, but the choice of phaser is incorrect.
geekosaur monkey see, monkey do --- we're still primates at heart
japhb ook ok ok 17:07
PerlJam
.oO( and brain too )
TimToady it's not really incorrect, just...not quite optimal
PerlJam TimToady: it is incorrect wrt delated execution.
er, delayed even
japhb TimToady: With your point about delayed execution ... what PerlJam++ said
TimToady then it's only potentially incorrect :) 17:08
japhb heh
TimToady unless you actually want to measure the time since compilation, then it's correct :)
geekosaur that was in fact what was being checked originally
TimToady mostly I was appealing to laziness though :) 17:09
17:10 FROGGS left
TimToady m: say now - BEGIN now; say now - CHECK now; say now - INIT now; 17:10
camelia rakudo-moar 0cb22e: OUTPUT«0.0657528␤0.02904647␤0.0144280␤»
grondilu also, I just forgot about INIT. I don't know all phasers at all.
PerlJam m: say INIT now - BEGIN now;
camelia rakudo-moar 0cb22e: OUTPUT«0.0211896␤»
japhb TimToady: Try those in reverse order. :-)
[Coke] "how does this phaser interact with precomp" might be a nice paragraph somewhere.
TimToady japhb: I did them in that order to get a conservative number 17:11
17:11 noganex_ left
TimToady m: say now - INIT now; say now - CHECK now; say now - BEGIN now; 17:11
camelia rakudo-moar 0cb22e: OUTPUT«0.0043353␤0.03064941␤0.07359549␤»
moritz [Coke]: github.com/perl6/doc/issues/47 we have a TODO for that for doc.perl6.org
pmurias it seems a lot of people haven't yet got used to our new precomp reality
the fact that precomp doesn't work properly doesn't help ;) 17:12
raydiak did not know until yesterday that wrapping stuff in BEGIN can fix precomp failures
PerlJam m: say BEGIN now - INIT now; # might be surprising :)
camelia rakudo-moar 0cb22e: OUTPUT«===SORRY!===␤Cannot call 'infix:<->'; none of these signatures match:␤:(Any $x = { ... })␤:(Any \a, Any \b)␤:(Real \a, Real \b)␤:(Int:D \a, Int:D \b --> Int)␤:(int $a, int $b --> int)␤:(Num:D \a, Num:D \b)␤:(num $a, num $b)␤:(Rational \a,…»
grondilu makes sense 17:13
INIT now can not run at compile time, can it?
TimToady it just schedules it for later
17:13 Kristien joined
grondilu m: BEGIN INIT say "hi" 17:14
camelia rakudo-moar 0cb22e: OUTPUT«hi␤»
flussence m: say (BEGIN now) - (INIT now)
camelia rakudo-moar 0cb22e: OUTPUT«-0.0228491␤»
TimToady m: say INIT now - BEGIN now
camelia rakudo-moar 0cb22e: OUTPUT«0.0202317␤»
TimToady works that dirction
dalek p/js: aeb83b2 | (Pawel Murias)++ | src/vm/js/ (3 files):
Implement nqp::rebless.
p/js: 577220d | (Pawel Murias)++ | / (2 files):
Add a test for various OO related ops.
p/js: c7bf3d2 | (Pawel Murias)++ | t/nqp/61-mixin.t:
Test what the test description describes.
PerlJam I figured it was a precedence problem. 17:15
dalek p/js: 9cd6a34 | (Pawel Murias)++ | t/nqp/92-where.t:
Add missing file.
TimToady well, they parse identically
japhb TimToady: That makes me curious where those 20ms go between BEGIN and INIT in that darn-near minimal case 17:16
timotimo must be the optimizer! :P 17:17
flussence garbage collection maybe?
japhb timotimo: Ewww. :-D
timotimo flussence: shouldn't even have a single gc cycle on that example
[Coke] m: STAT CHECK BEGIN LEAVE INIT now;
camelia rakudo-moar 0cb22e: OUTPUT«===SORRY!=== Error while compiling /tmp/J4mHmsSenv␤Undeclared name:␤ STAT used at line 1␤␤»
[Coke] m: START CHECK BEGIN LEAVE INIT now;
camelia rakudo-moar 0cb22e: OUTPUT«===SORRY!=== Error while compiling /tmp/HDjnIAuPGJ␤Undeclared name:␤ START used at line 1␤␤» 17:18
TimToady START got demoted
it's not a phaser
timotimo oh, interesting
[Coke] awww.
timotimo in that example, 50% of the run time is actually dynamic optimization
[Coke] m: LEAVE now!;
camelia rakudo-moar 0cb22e: OUTPUT«===SORRY!=== Error while compiling /tmp/qddZ7klWG8␤Negation metaoperator not followed by valid infix␤at /tmp/qddZ7klWG8:1␤------> LEAVE now!⏏;␤ expecting any of:␤ infix stopper␤ infix or m…»
TimToady it's now just "once"
timotimo it does over a thousand jitted frame invocations in that time 17:19
[Coke] gives up on poetry and goes for a walk.
TimToady m: so LEAVE now
camelia ( no output )
Kristien hi
TimToady m: KEEP Cool
camelia ( no output )
17:19 abraxxa left
TimToady Kristien: o/ 17:19
timotimo about half the run time is spent somewhere inside or under from-posix 17:20
flussence
.oO( gettimeofday considered harmful )
17:21
17:21 alini left
japhb chuckles at the first query arg in his github search URL: github.com/search?utf8=%E2%9C%93&q=DBIish ... it shows up in Chrome's URL bar as a Unicode checkmark. :-) 17:21
timotimo m: say time 17:22
camelia rakudo-moar 0cb22e: OUTPUT«1423588930␤»
timotimo m: say (INIT nqp::time_n) - BEGIN nqp::time_n
camelia rakudo-moar 0cb22e: OUTPUT«0.0133426189422607␤»
PerlJam TimToady: btw, something I noticed the other day ... the section of S04 that talks about gather, once, do, etc. says "Constructs marked with a C<*> have a run-time value", yet ... they're *all* marked with a * Is that some kind of editing accident? (i.e. some were, some weren't but now they all are?)
timotimo m: say (INIT time) - BEGIN time
camelia rakudo-moar 0cb22e: OUTPUT«0␤»
timotimo m: say (INIT now) - BEGIN now
camelia rakudo-moar 0cb22e: OUTPUT«0.0190897␤»
TimToady END doesn't have a * 17:23
timotimo wait, i've been measuring the wrong thing
PerlJam TimToady: no, the phasers have a separate statement about * marking from the not-quite-phasers
or maybe I'm just mis-reading 17:24
timotimo i should have done --profile-compile instead
PerlJam S04:1395 and S04:1434 seem to be saying different things about the *-marking 17:25
synopsebot Link: design.perl6.org/S04.html#line_1395
TimToady it's the same *
PerlJam ok
TimToady it is, admittedly, misleading
17:26 dakkar left
flussence r: eager for ^1_000_000 { Nil }; say 1 / (now - INIT now) # bogoMIPS 17:27
camelia rakudo-parrot 0cb22e: OUTPUT«(timeout)»
..rakudo-moar 0cb22e: OUTPUT«0.676328731465798␤»
raydiak has been reviewing literal's question and notes that even an empty p6 loop(;;) over 1e7 elems w/a native int counter, timing from INIT, takes about as long as the entire execution time of the equivalent p5 running over 2e8 elems 17:28
(though maybe we don't optimize for the empty case so much) 17:29
pmurias we should have the optimizer detect silly benchmarks 17:30
moritz raydiak: that's a factor 20 off. That's not too bad, actually 17:31
raydiak: two years ago, the factor was > 200 regularly
raydiak moritz: no, not bad at all considering where we've come from...I just hope literal has the same contextual attitude :)
17:33 slavik joined
timotimo raydiak: seems like a good case for rakudo-jvm perhaps? 17:33
raydiak timotimo: last time I tried it, jvm wasn't faster at anything any more
since moar got better and got jit and etc
moritz TBH, moar's JIT isn't too great 17:34
TimToady yes, in my infoworld interview I said we still have a lot of "headroom" :) 17:35
17:35 Kristien left
raydiak has no idea where the performance improvements actually come from internally 17:36
only that moar has gotten very much faster over the past year 17:37
17:37 vendethiel left
timotimo something's going wrong with the for benchmark up there 17:40
it seems to allocate an Int for each iteration
17:40 vendethiel joined
japhb raydiak: Some from spesh/JIT/etc., but also some from just being less naive and from putting moderate tuning effort into really common stuff 17:41
timotimo it should have done the for-to-loop optimization
TimToady but maybe it needs to notice that it can do it in int64 rather than Int, or maybe it's comparing int64 < Int and promoting every time 17:42
timotimo it's not doing the optimization, i have a clue why it might not be doing it, but i'm not 100% sure 17:47
and it already does the int vs Int check :)
17:48 noganex joined
moritz seems those optimizer writers aren't too dumb after all :-) 17:48
17:48 Sqirrel left 17:50 espadrine left 17:53 pmurias left 17:54 mvuets left 17:55 Kristien joined
Kristien hi 17:55
timotimo haha
oh that's silly
the optimization is looking for "sink", here it gets "eager" 17:56
leaving out the "eager" part makes it more than 2x faster
raydiak heh, that's...less than optimal
timotimo and saves about 70 megabytes of ram used 17:57
18:07 Mouq joined
dalek kudo/nom: 08941a3 | timotimo++ | src/Perl6/Optimizer.nqp:
not only sink, but also eager triggers for->loop opt
18:08
timotimo is AFK for a bit 18:11
18:11 raiph joined
japhb Does 'eager for' save values still? Or do you need 'eager do for' to get that? 18:12
18:12 adu joined 18:13 alini joined 18:14 _mg_ joined
Mouq japhb: I believe so; as I understand that opt just transforms for + a range into something faster 18:14
raydiak m: say eager for ^3 {$_}
camelia rakudo-moar 0cb22e: OUTPUT«0 1 2␤»
vendethiel wow :o) timotimo++ 18:16
Kristien is there a tool that converts perl5 regex into perl6 regex? 18:19
Mouq Kristien: You could always use the :Perl5 mod, though I don't think that'll work inside grammars. I'm not sure if "Perlito" ever made it to doing regexes 18:21
6to5: 1 + 1
Kristien I can't find documentation on how to negate a char class
Mouq 5to6: 1 + 1
hm
PerlJam Kristien: <-[...]>
Kristien ah thanks
Mouq This came up a few weeks ago, I'm not sure how to make it more visible. Maybe changing the title here: doc.perl6.org/language/regexes#Enum...and_ranges ? 18:22
raydiak m: 1 18:25
camelia ( no output )
Kristien Yay, I wrote a parser for my programming language in 6 LOC!
raydiak \o/
timotimo oh, lait 18:27
wait
loops return their values, too, right?
PerlJam Mouq: um ... is it true that you can use |, &, and ^ to combine character classes?
raydiak timotimo: yes I tried it its broken if the eager isn't in sink context :) 18:28
timotimo damn
yeah, i'm going to revert that comment
dalek kudo/nom: f73c3f2 | timotimo++ | src/Perl6/Optimizer.nqp:
Revert "not only sink, but also eager triggers for->loop opt"

This reverts commit 08941a36e289fc1209e919cdffd5effcebbde043.
a loop doesn't return its values, so this breaks "do for ^..." and friends
18:29
18:31 FROGGS joined
Mouq PerlJam: NYI. I'm writing more about regexes in 5to6.pod right now, btw 18:34
timotimo: No way we can salvage that opt? 18:35
raydiak was wondering how hard it'd be to check if the eager is in sink context
18:36 adu left
timotimo Mouq: we'd have to create an array locally and have the "value of the block" push'd into that and then give that back to the caller of "eager" 18:36
the GLR will make this workh better, though ... i'm hoping
18:37 eternaleye joined
raydiak is still wondering how hard it'd be to still do the opt for eager, just only if the eager is in sink context 18:39
18:40 KCL_ joined 18:43 diana_olhovik_ left
timotimo if the eager is in sink context, it actually loses the "eager" and it gets replaced by "sink" 18:47
but the optimizer only goes into one of the two branches of the Want node
timotimo wishes for boxed data tracking :\ 18:49
18:49 Rounin joined
raydiak ah, so it'll already optimize a sunken eager... 18:50
or.../me goes to figure out what QAST::Want is 18:51
timotimo the code in slow.p6 will inline <, which boxes its result into a Bool object, then the code that gets the result will guard against the value being concrete (first WTF), then unbox the value as an int and if based on that 18:52
Kristien if I have rule <term> { <identifier> | <stirng> } and I want the AST do I really have to say method term($/) { make ($<identifier> | $<string>).ast }?
timotimo t.h8.lv/slow.p6.svg - check this out 18:54
block 15 is the inlined < block
FROGGS Kristien: method term($/) { make ($<identifier> || $<string>).ast } 18:55
Kristien yeah that's what I mean
FROGGS that should work, yes
Kristien having to repeat the alternation in the action is devious
FROGGS but you could also do: rule <term> { <TERM=.identifier> | <TERM=.string> }; method term($/) { make $<TERM>.ast } 18:56
Kristien nope 19:00
FROGGS nope?
Kristien hmm yeah it works
but that's also devious
Mouq rule term { ( <identifier> | <string> ) }; method term($/) { make $0.keys[0].ast } has worked for me in cases where I have a big alternation with very similar rules, though it's not optimal
Kristien there must be a better way
Mouq Err, I guess just rule term { ( <identifier> | <string> ) }; method term($/) { make $0.keys[0].ast } 19:01
Dam
FROGGS rule term { ( <.identifier> | <.string> ) }; method term($/) { make $0.ast }
Mouq * rule term { <identifier> | <string> }; method term($/) { make $/{*}[0].ast }
vendethiel Kristien: also, { $<alter>=[ <identifier> | ...
ah, too spooky..
Mouq FROGGS: I don't think that'll work, will it? 19:02
19:02 ninjazach joined
FROGGS let's see 19:02
Kristien vendethiel: nope
19:02 ninjazach left
Kristien Mouq: that works 19:03
vendethiel $/{*}?
Mouq Oh wait 19:04
timotimo t.h8.lv/slow_native.p6.svg ← this is the same slow function but with natives and += instead of ++, but it seems to be about 50% slower 19:05
raydiak timotimo: I have been looking at it, but...it's a lot to take in if you aren't already familiar with those bits :)
vendethiel Mouq: what $/{*} :P? a slice?
masak probably wrong... 19:06
m: my %h = foo => 1, bar => 2; say %h{*}
camelia rakudo-moar 0cb22e: OUTPUT«1 2␤»
masak m: my %h = foo => 1, bar => 2; say %h{}
camelia rakudo-moar 0cb22e: OUTPUT«bar => 2, foo => 1␤»
masak hm.
TimToady can't use .values
Mouq m: grammar T { token TOP { <ident> | <str> }; token str { \"~\" <-["]>* }}; class TActions { method TOP { make %() }; method ident { make "foo" }; method str { make "bar" }}; say T.parse("abcd",:actions(TActions)).ast
camelia rakudo-moar 0cb22e: OUTPUT«Too many positionals passed; expected 1 argument but got 2␤ in method TOP at /tmp/eJXgGXdA1w:1␤ in regex TOP at /tmp/eJXgGXdA1w:1␤ in method parse at src/gen/m-CORE.setting:15062␤ in block <unit> at /tmp/eJXgGXdA1w:1␤␤»
Mouq m: grammar T { token TOP { <ident> | <str> }; token str { \"~\" <-["]>* }}; class TActions { method TOP($/) { make %() }; method ident($/) { make "foo" }; method str($/) { make "bar" }}; say T.parse("abcd",:actions(TActions)).ast 19:07
camelia rakudo-moar 0cb22e: OUTPUT«EnumMap.new("ident" => Match.new(orig => "abcd", from => 0, to => 4, ast => Any, list => ().list, hash => EnumMap.new()))␤»
Mouq Isn't that supposed to call .ast or am I missing something? I'm guessing that's NYI
(Talking about %() )
FROGGS %() is meant to be $/.hash.ast // $/.hash.Str IIRC 19:08
m: grammar G { token TOP { <top=.foo> | <foo=.bar> }; token foo { foo }; token bar { bar } }; class A { method TOP($/) { make $<foo>.made }; method bar($/) { make 42 } }; say G.parse('bar', :actions(A)).made
camelia rakudo-moar 0cb22e: OUTPUT«42␤»
FROGGS I prefer that one 19:09
timotimo i think i have a suspicion what makes that version slower
actually calling the innermost block requires more Int objects to be allocated
Mouq FROGGS: I do too, but it depends on your needs
FROGGS as usual :o) 19:10
timotimo same amount of Scalar allocations, but the _native version i made allocates 1218104 Int objects, whereas the original just allocates 811800
m: say (1218104 / 811800)
camelia rakudo-moar 0cb22e: OUTPUT«1.5004977␤»
timotimo 50% more, eh?
Mouq O.o 19:11
19:12 wicope left
timotimo AFK again 19:15
19:15 telex left 19:16 telex joined 19:27 diana_olhovik joined 19:29 gfldex joined 19:36 Possum left
Kristien m: say [+] ['1', '2', '3', '4'] 19:36
camelia rakudo-moar f73c3f: OUTPUT«4␤»
Kristien :|
m: say '1' + '2' + '3' + '4'
camelia rakudo-moar f73c3f: OUTPUT«10␤»
TimToady [] itemizes
Kristien m: say [+] ['1', '2', '3', '4'].list 19:37
camelia rakudo-moar f73c3f: OUTPUT«10␤»
Kristien ah right
FROGGS m: say [+] '1', '2', '3', '4'
camelia rakudo-moar f73c3f: OUTPUT«10␤»
TimToady m: say [+] [<1 2 3 4>][]
camelia rakudo-moar f73c3f: OUTPUT«10␤»
TimToady Perl tends to take it's singular/plural distinctions very seriously 19:38
Kristien interpreter in Perl 6: gist.github.com/rightfold/a1df69c68cfb7f18a94e
TimToady it's a little odd that .[] as a subscript turns a singular [] into a plural
but that's a tradeoff we made when we ditched the P5 idea of slice contexts 19:39
19:39 molaf joined
Kristien concatenative programming is great 19:42
TimToady reverse(@$code) can probably be just $code.reverse 19:45
dalek c: 516704d | Mouq++ | lib/Language/5to6.pod:
Add a little more about regex translation
19:46
19:46 molaf_ joined
nine_ marvels at the power of modern computing. Installing > 3GB of updates while doing a system backup while playing a 3D action game on the same machine. 19:47
Mouq m: say [+](|[<1 2 3 4>]) 19:48
camelia rakudo-moar f73c3f: OUTPUT«10␤»
Mouq m: say [+] |[<1 2 3 4>]
camelia rakudo-moar f73c3f: OUTPUT«10␤»
TimToady Kristien: also, your constructors will be more inheritable if instead of PushString.bless(:$value) you say self.bless(:$value) 19:49
Kristien shiny
TimToady since self should contains something that has the virtual class
19:49 molaf left
Kristien I like how things like def and if can just be normal functions. 19:51
TimToady wonders whether it would be worth having a default single-arg constructor for single-attribute classes
colomon TimToady: seems like it might be pretty easy to do that as a trait or something? 19:52
TimToady wouldn't even need that if it were there by default 19:53
masak TimToady: as long as it can be turned off :)
TimToady it's not like it's ambiguous with named args
colomon TimToady: understood, I’m just looking for an easy solution that doesn’t require changing the spec. ;)
TimToady well, one could even make the argument that a class with N attributes should have an N-arg positional constructor, and it's the user's responsibility if they try to compose badly
that's kinda the approach most languages take, after all :) 19:54
19:54 brrt joined
TimToady forcing named args always is just a wee bit nanny-state-ish 19:54
19:55 wicope joined
TimToady but then one would have to think about how to splice off a base class's positional args, I suppose, and thinking is hard 19:56
nine_ TimToady: classes tend to grow and soon single-attribute classes have two and then all callers of the constructor would have to change. 19:57
TimToady otoh, having a default positional constructor capability would make it easier to construct something like class IntStr is Int is Str {}; IntStr.new(42,"forty two")
nine_: yes, there are certainly downsides 19:58
19:59 KCL_ left
TimToady but currently we have to write IntStr.new(Int{:value(42)},Str{:value("forty two")}) and that's not even implemented yet 19:59
assuming "value" is the key there for both
you can't just use the same key for different parent classes when they need different values 20:00
Kristien time to shower, bye!
20:00 Kristien left
flussence I agree that constructors do feel pretty awkward right now 20:00
I don't have any great ideas of my own though :) 20:01
nine_ It's only default constructers though, isn't it?
TimToady that was what I was proposing
adding a default behavior for positional args as well as for named args 20:02
nine_ oh missed the line about N-arg constructors
Mouq m: say :Int{:value(42)}.perl
camelia rakudo-moar f73c3f: OUTPUT«"Int" => {"value" => 42}␤»
TimToady after noting all the single-arg constructors in Kristien's gist 20:03
m: say Int{:value(42)}.perl
camelia rakudo-moar f73c3f: OUTPUT«Any␤»
TimToady that's supposed to be a WHENCE thingie
colomon throwing out a random thought I had today: should we be working on a perl 6 “cookbook”, perhaps in the form of a group blog?
masak currently we don't have anything which assumes an ordering of the attributes, I think.
colomon afk # picking up son from school
TimToady and we don't use the :Int syntax because that would be ambiguous if there were an :$Int parameter 20:04
masak colomon: sounds interesting. what would distinguish the cookbook from, say, the advent calendar?
colomon masak: focus on small practical things, not occurring in December.
nine_ masak: presumably that it's all year round :)
moritz colomon: fwiw there's room for cookbook-style contents on doc.perl6.org 20:05
*shameless plug*
20:09 jakesyl left
moritz and I've been meaning to blog about doc highlights for a while 20:09
dalek c: aa2c225 | moritz++ | type-graph.txt:
Add some more exception types to type-graph.txt

also sort some entries in there
20:10
moritz [ptc], Mouq: if you find any pages on doc.perl6.org with particularly good coverage, or better-than-usual examples, alert me to them, and I'll hilight them on my blog 20:11
same goes for others here, of course :-) 20:12
20:14 Possum joined
masak you'll highlight others on your blog? :P 20:16
20:17 grondilu left
ab5tract there's a fair amount of interesting perl 6 material which has been published on other blogs 20:17
including yours, moritz :) 20:18
moritz jnthn, lizmat, TimToady: why are channels .close()d and Supplies .done()? 20:19
dalek c: 806a373 | paultcochrane++ | lib/Language/setbagmix.pod:
Correct unicode codepoint value for ∉
c: 170f2b9 | paultcochrane++ | / (2 files):
Merge branch 'master' of github.com:perl6/doc
[ptc] moritz: will do
20:19 Sqirrel joined
ab5tract i wonder if it makes sense to re-publish as many of them on doc.perl6.org as we can attain permission for (within the given set of articles which are still correct/relevant) 20:21
dalek volaj/cpp: fe9b6ff | FROGGS++ | / (3 files):
add support for C++ structures and their methods

The name mangling routine only works for clang and g++ so far, and only for a subset of parameter and return types. Though it is enough to pass our first test.
volaj/cpp: a575495 | FROGGS++ | lib/NativeCall.pm6:
Merge branch 'master' of github.com:jnthn/zavolaj into cpp
itz_ colomon: there is the start of a PLEAC like cookbook in perl6-examples
ab5tract for instance, the advent calendar articles could be re-published and categorized by topic as first class documentation 20:22
moritz ab5tract: the problem is that blog posts often aim more for effect than for technical depth/completeness
ab5tract: but where the technical depth is there, I'm all in favor of doing that
ab5tract moritz: yes, re-publishing would be based on a curatorial choice 20:23
masak I think a concerted cookbook effort might want to start with a thorough enumeration of the topics to write about.
ab5tract but links to blogs should definitely be there
masak basically setting the scope and goals of the project up front.
itz_ PLEAC is based on the 2nd edition Perl (5) Cookboox 20:24
ab5tract moritz: even as a way to document/explain the perl 6 search results. we should probably explain that much of the wiki efforts are outdated 20:25
itz_ ^ Cookbook
ab5tract this kind of thing
20:25 Kristien joined
dalek ecs: 72242eb | moritz++ | S17-concurrency.pod:
Fix example for $s.tap, mentioned in #77
20:25
20:26 Mouq left
ab5tract it's been 15 years, for people who haven't been paying much attention it could be really useful to have a sort of "surfer's guide" to the perl 6 online resources 20:26
itz_ github.com/perl6/perl6-examples/tr...r/cookbook 20:27
moritz that's what perl6.org is supposed to be
ab5tract moritz: but that's the problem
it's not
TimToady moritz: on the one hand, channels need both a .close and a .done method because .done returns a promise; the real issue I think is that supplies have a .done method that means something else entirely
moritz except that we don't give negative advice ("don't go there") on perl6.org
ab5tract tons of other things come up in google search results
so if perl6.org had a page that could explain exactly the contexts of some of these things
TimToady maybe we should rename the channel's method .whendone or such
moritz TimToady: rakudo's Channel.closed gives the promise
ab5tract i can even browse a book from apress about perl 6 via google books 20:28
TimToady and then we could close a channel with .done as well
ab5tract from about 10 years ago
Kristien Stack-based languages are interesting.
ab5tract it's not about "don't go there". "considered outdated", though, could save some heart break
TimToady moritz: there is no .closed documented in S17 20:29
moritz TimToady: so .closed should be renamed to .done?
TimToady: but then .done in Supply does something quite different than Supply.done 20:30
TimToady S17:276 indicates that is named .done
synopsebot Link: design.perl6.org/S17.html#line_276
ab5tract but even if you would prefer to keep the negative out, i think there is still a place for a "these resources are great" page :)
TimToady lunch &
moritz TimToady: X::Channel::SendOnDone after it's .close()d. Another done/closed confusion 20:31
20:31 darutoko left
jnthn evening, #perl6 20:32
moritz it should be SendAfterClose and ReceiveAfterDone, no?
20:33 ninjazach joined
jnthn moritz: I think Supplies got a lot of attention design wise, and Channel has had rather less. 20:34
[ptc] moritz: re: good docs: maybe grammars.pod and regexes.pod? I liked the idea that a complete JSON parser could be implemented in 100 lines :-) 20:36
moritz jnthn: also it seems like Supply.done is suposed to shut down the supply in any way 20:38
jnthn moritz: .done tells the receiver "That's the last thing you're getting"
moritz but it's not, is it?
dalek c: a20bdc5 | paultcochrane++ | lib/Language/setbagmix.pod:
Correct minor typographical issues in setbagmix.pod
c: 7cc2fcf | paultcochrane++ | lib/Language/setbagmix.pod:
Wrap paragraphs consistently in setbagmix.pod
jnthn moritz: Only if the sender breaks protocol.
moritz m: my $s = Supply.new; my $t = $s.tap(&say, :done({ say "done" })); $s.done; $s.emit(42) 20:39
camelia rakudo-moar f73c3f: OUTPUT«done␤42␤»
jnthn You broke protocol.
moritz jnthn: Channel enforces the protocol, why not Supply?
jnthn: also if neither .close($tap) nor .done actually shut down the supply, why do we have both? 20:40
jnthn .done and .close flow in opposite directions
.done is the senders way of saying "end of iteration" 20:41
.close is the receiver saying "I'm finished"
moritz jnthn: then .close should only be on the tap, not on Supply
20:41 Mouq joined
jnthn Correct 20:41
moritz that's not how it's implemented right now 20:42
jnthn I'm sure I only implemented .close on a Tap.
20:43 beastd joined
moritz ok, but then Channels should also be shut down with .done 20:43
jnthn Hm, there is a method close on Supply. Did I *really* do that?
moritz because it's the sender who signals it
jnthn :S
moritz: Yes, that'd be consistent.
moritz jnthn: seem it was lizmat++ 20:44
jnthn moritz: Well, git blame assigns lizmat++ blame for much in that file, but I think she did a lot of moving/refactoring.
Anyway, guess I should put having a review of this stuff on my todo list... 20:45
I think in Rx they've gone in the direction of enforcing protocol in some places where the user has a chance to break it, but allowing the built-ins to not require sanity checks all the way down the chain. 20:46
Which is probably a sane way to go.
[ptc] how does one work out if something is a Parcel? 20:47
.WHAT doesn't help and I'm not sure what to use 20:48
masak m: say (1, 2, 3) ~~ Parcel
camelia rakudo-moar f73c3f: OUTPUT«True␤»
masak m: say "OH HAI" ~~ Parcel
camelia rakudo-moar f73c3f: OUTPUT«False␤»
[ptc] masak: sweet, thanks!
ab5tract smart match is so great :D 20:49
masak smart match is a very laid-back form of conformance checking. 20:50
20:50 Akagi201 joined
ab5tract indeed. in a way it sort of crystallizes some of (what i see in) the "spirit of perl" (perlus spiritus?) 20:51
moritz jnthn: and the :closing callback on Tap isn't needed either, right?
masak ab5tract: yes, exactly. 20:52
jnthn moritz: Uh...yeah, I think that matters.
moritz: That's the way that things that need to free up resources on close do so
moritz jnthn: because if it's the receiver who closes down, he doesn't need a callback for an action he himself initiated
20:52 Akagi201_ left, bjz left
jnthn moritz: .close cascades up the chain. 20:52
moritz jnthn: uhm, which chain? 20:53
ab5tract "this is almost always what you want, and if it's not, well learn infix:<this-other-op>"
no, it will actually take many words to try and describe how ~~ makes me feel :) 20:54
jnthn my $t = Supply.interval(1).map(...).grep(...).tap(...); $t.close; # We tap the grep, which taps the map, which taps the Interval, which starts the flow of ticks. When we .close $t, it will .close its sources, etc., up to the interval supply whose closing cancels the timer.
20:55 diana_olhovik left
moritz jnthn: my $s = Supply.interval(1).map(...).grep(...); $s.tap(...); my $t = $s.tap(...); $t.close; # does the first .tap still live? 20:56
jnthn moritz: Yes
[Coke] "My Patronus is a Camel" 20:57
ab5tract [Coke]: lol
FROGGS [Coke]++ 20:58
20:58 mohij joined, _mg_ left
masak 's patronus is a giant pastel-colored butterfly 20:59
PerlJam My patronus is Larry Wall ;)
dalek ast: 7e89188 | usev6++ | S12-class/stubs.t:
Add tests for RT #81060
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...l?id=81060
skids A drooling Camel?
hahainternet i gotta say i don't understand how the first tap would live, but i don't know what the hell i'm talking about so ignore me
TimToady masak: funny that you think those colors are pastel 21:00
moritz hahainternet: a supply has a list of taps, so it can know whether the last one closed down
masak TimToady: "pastel" is probably the wrong word, on second thought.
hahainternet oh right i see
moritz ... but I don't see that logic in Supply.pm
21:00 bluescreen joined
masak the colors in camelia are far too saturated to be pastel. 21:01
21:01 Guest45 joined
TimToady they were picked to be primary colors, basically 21:01
masak the hues are all over the place, and contrast-y.
TimToady: ah. I've noticed the same trend in children's toys.
PerlJam maybe masak's patronus is camelia's little-known sister :) 21:02
masak .oO( Perl 7 ) o.O
TimToady maybe camelia just needed a few vitimins that day
21:02 bluescreen left
timotimo hues all over the place 21:02
TimToady cries
PerlJam wonders what crime was committed. 21:03
21:04 pmurias joined
TimToady crime and pun-ishment 21:04
moritz PerlJam: I dunno, but we can always revert it :-) 21:05
21:05 ninjazach left
masak if you didn't push, you can even reset the crime. 21:06
21:06 bluescreen joined
moritz but thre reflog never forgets! (unless when it does, actually) 21:06
21:07 bluescreen left, ninjazach joined 21:09 _dolmen_ joined
Kristien I hope my book arrives tomorrow. 21:10
Amazon's prediction was wrong.
TimToady it's cause we announced Christmas, it's distorting all the delivery dates 21:11
Kristien that takes about 10.6 months :( 21:13
moritz another mismatch between S17 and rakudo: S17 say Supply.delayed, rakudo says .delay
I'm assume S17 is correct here
*correcter
21:13 Demerzel joined 21:20 xfix left
[ptc] is 'time' an identifier term in the same way that 'now' is? 21:21
moritz [ptc]: yes
m: say &term:<time>
camelia rakudo-moar f73c3f: OUTPUT«sub term:<time> () { #`(Sub|53959824) ... }␤»
TimToady m: say time time
camelia rakudo-moar f73c3f: OUTPUT«===SORRY!=== Error while compiling /tmp/ELR6EbIjrW␤Two terms in a row␤at /tmp/ELR6EbIjrW:1␤------> say time ⏏time␤ expecting any of:␤ infix stopper␤ infix or meta-infix␤ postfix…»
[ptc] ah, that's how one works that out!
moritz: cool, thanks. Now I can add that to terms.pod 21:22
TimToady m: say rand 42
camelia rakudo-moar f73c3f: OUTPUT«===SORRY!=== Error while compiling /tmp/V3Vg5A3l0s␤Unsupported use of rand(N); in Perl 6 please use N.rand or (1..N).pick␤at /tmp/V3Vg5A3l0s:1␤------> say rand⏏ 42␤»
TimToady that should probably say (^N).pick
dalek c: 4fd0ef0 | paultcochrane++ | lib/Language/terms.pod:
Correct typographical etc. issues in terms.pod
21:24
c: 2cef029 | paultcochrane++ | lib/Language/terms.pod:
Wrap paragraphs consistently in terms.pod
c: 37c4b74 | paultcochrane++ | lib/Language/terms.pod:
Document the identifier term 'time'
21:24 Rounin left 21:27 vendethiel left 21:29 alini left, adu joined, Guest45 left
dalek ast: 0830070 | moritz++ | S17-supply/delay (2 files):
Supply.delay -> .delayed
21:30
kudo/nom: 4eac7e0 | moritz++ | / (3 files):
Deprecate Supply.delay in favor of Supply.delayed

that is what S17 says, and it sounds cleaner for a method that returns a modified copy instead of modifying in-place
c: 3697772 | moritz++ | lib/Type/Supply.pod:
Supply.delayed
21:31
21:31 vendethiel joined
dalek kudo/nom: f53a94d | TimToady++ | src/Perl6/Grammar.nqp:
fix rand(N) redirect to precise replacement
21:32
moritz oh, and btw, I find 'earliest' to be very confusing 21:33
TimToady maybe we should change to something like, oh, winner...
moritz in earliest $something { ... }, what exactly is that $something? 21:34
21:35 _dolmen_ left
dalek kudo/native-ref: 05d8627 | jnthn++ | src/Perl6/Metamodel/BOOTSTRAP.nqp:
Further work on multi-dispatch on native refs.
21:36
moritz there are two examples with 'earliest $channel { ... }' and the rest is 'earliest * { }'
21:36 jakesyl joined
TimToady it's meant to be a list of contestants over which * matches if you wildcard the cases 21:36
moritz so if I write 'earliest * { ... }' then the potential sources are the channels listed inside 21:37
vendethiel moritz: the earlier value?
oh, the opposite
TimToady moritz: yes
moritz but that's just a degenerate (but very common) case of stating the sources first, and matching inside? 21:38
TimToady you can see it as a kind of given when, sorta 21:39
moritz except that it inverts itself when you give it a *
TimToady not really 21:40
it just broadens the constraint at that point
moritz uhm, which constraint?
TimToady the constraint of which channels it has to check
"you only have to check $ch1"
moritz m: earliest * { more * { say 42 } } 21:42
camelia rakudo-moar f73c3f: OUTPUT«Nothing todo for earliest␤ in sub EARLIEST at src/gen/m-CORE.setting:23305␤ in block <unit> at /tmp/mK333znhts:1␤␤»
TimToady with implicit ORing on the lists of channels, and an implicit ANDing between the outer constrant and the inner
maybe it's looking for all the channels and finding none
not sure we want to be tracking all the channels globally like that though 21:43
so probably we make that illegal
moritz uhm 21:44
I thought the * in "earliest * { more $c1 { ... }; more $c2 { ... } };" meant $ch1, $ch2, not "all the channels globally" 21:45
m: earliest * { more Channel.new() { }; more * { say 42 } }
yeah, that'll hang
camelia rakudo-moar f73c3f: OUTPUT«(timeout)»
TimToady as an ANDed constraint, there's no conflict there 21:46
* admits anything that was selected elsewhere
the only question is how we determine the universe of discourse
moritz and how we explain that sometimes the sources are afterh the 'earliest', and sometimes they are in the 'more' clauses 21:47
*after
TimToady better designs welcome :) 21:48
but only if they're better...
FROGGS TimToady: there should be more than one way to design 21:49
21:49 espadrine joined
moritz Supply.earliest($channel1, $channel2, ...) # thinking out loud 21:50
and if you only want one value, Promise.anyof(@channels) 21:51
maybe I should start by asking what use cases 'earliest' is supposed to cover 21:53
dalek p/js: 0abed2d | (Pawel Murias)++ | / (3 files):
Implement nqp::settypecache.
moritz polling over $N source?
*sources
21:54 _dolmen_ joined
moritz if you want to act in response to new values being available, Supply seems to be a much easier approach than Channel + earliest 21:59
jnthn Indeed
Channel is more useful when you're building a SEDA-style thing and you *want* to have threads blocking. 22:00
And you have threads doing different stages of the pipeline
dalek p/js: 2a199d1 | (Pawel Murias)++ | / (3 files):
Implement nqp::setmethcache.
22:01
jnthn Which is quite different from the thread-affinity of supplies
22:01 Kristien left
Demerzel nqp::setmethcache heh 22:02
timotimo m) 22:03
moritz looks up en.wikipedia.org/wiki/Staged_event...chitecture 22:04
22:04 FROGGS_ joined 22:05 skids left
moritz not much there :( 22:05
japhb did the same, with the same assessment
moritz goes to sleep now 22:06
22:06 Sqirrel left
japhb o/ 22:07
22:08 FROGGS left 22:09 adu left
brrt sleep well moritz 22:11
SEDA seems like what people do with goroutines
masak and Unix pipes. 22:12
pmurias masak: by AST based search you meant: typing say(* ~ "World") and finding say("Hello" ~ "World")?
with * being replace by a suitable placeholder 22:13
masak pmurias: that's one example, I guess.
pmurias: also things like "find all occurrences of this variable" (in order to rename it safely)
pmurias: or "give me the declaration site for this class/sub/method/enum"
22:15 Sqirrel joined
brrt yeah, unix pipes are another really good example 22:16
this was the counterpoint to my last GC rant
22:16 kaare_ joined
brrt rather than build big systems that use lots of moving parts, best build your tools small and your algorithms online, so that they may fit in a pipeline 22:17
(i.e. if your tools are small there is no need to build advanced garbage collectors and similar things) 22:18
masak the seems to be the gist both of microservices and the recent surge in promises/futures libraries.
22:20 spider-mario left
brrt one of the wondrous things of IT is that you can simply move the same task - e.g. garbage collection - from one space to the other (userspace or kernel) and that it then makes a difference 22:20
dalek c: 2c674a9 | paultcochrane++ | lib/Language/traps.pod:
Correct minor typographical issues in traps.pod
22:21
c: fa8f12f | paultcochrane++ | lib/Language/traps.pod:
Wrap paragraphs consistently in traps.pod
c: c3ae3ca | paultcochrane++ | lib/Language/traps.pod:
Separate output by a comma in containers versus values gotcha

This makes the output a little clearer and thus hopefully the point which is being made clearer.
c: e8b7d41 | paultcochrane++ | lib/Type/Supply.pod:
Merge branch 'master' of github.com:perl6/doc
22:22 Demerzel left
pmurias brrt: I would prefer to have a decent garbage collector rather then restructure my apps to work around crappy ones 22:24
masak pmurias: do you consider Perl 5's "decent"?
22:24 beastd left
pmurias masak: it doesn't annoy me much 22:25
brrt yes, but my point was not that current GC's are crappy, just that work seems to have ceased in making them better; better typically meaning more complex 22:26
at least if i consider the recent work on the JVM
22:27 raiph left
brrt and i personally don't know anybody who really *likes* working with the JVM 22:27
pmurias has very little JVM experience 22:28
22:29 pdcawley left
pmurias brrt: the recentish graal stuff makes be interested in the JVM, but getting Perl 6 on JS seems more important 22:31
brrt well, it has it's nice points; it has all sorts of debugging and monitoring and logging hooks
masak pmurias: getting Perl 6 on JS is important. ++pmurias
brrt yes indeed ++pmurias 22:32
anyway, i have a really nice compliment: one of my colleagues recently said that 'the first page of (Ovid++)s slide already contained more interesting things than alll of swift' 22:33
hahainternet got a link?
pmurias wasn't the interesting part of swift that it's not objective-c? 22:39
brrt yeah, pretty much, and they also had some ruby-isms
but believe it or not the possible introduction of swift is causing pretty great consternation among @colleagues 22:40
22:41 ninjazach left
raydiak hahainternet: I think this one www.slideshare.net/Ovid/perl-6-for-mere-mortals 22:45
22:46 Kristien joined
raydiak was fond of the mechanical fuel injection pic :) 22:46
hahainternet raydiak: ah, i've read that one and is excellent
read a bunch of fosdem stuff too, wondered what i missed
22:47 locsmif joined
ab5tract i've created a PR. the description is pretty descriptive, but the tl;dr is "what do you think of this approach" and "something pretty weird is happening when declaring an infix:<(^+)> in core" 22:49
github.com/rakudo/rakudo/pull/362
brrt afk 22:50
22:50 brrt left
ab5tract "description is pretty descriptive" ... indication that i need $sleep 22:50
22:52 rindolf left, raiph joined 22:53 dustinm` left, rurban left 22:55 adu joined
japhb Oh man, I just got a request from a friend to teach him "object-oriented Perl" ... he writes a lot of Perl 5 code, but it's not far from "Perl 4 with references and lexical variables" ... completely procedural. 22:55
I gave him a whirlwind tour of Perl 6, but I think I might have overwhelmed him a bit. 22:56
masak :)
japhb Need to figure out how to take it down a notch and get him on a gentle ramp. :-)
masak japhb: I feel I know a fair bit of OOP at this point, but I'd be hard-pressed to summarize that knowledge. it's all a bit ineffable.
Kristien japhb: teach him FP in Perl instead
then tell him objects are just tuples of functions
masak japhb: perhaps find a suitable domain and model it out, to make it all very concrete? 22:57
22:57 dustinm` joined
japhb masak: Hmmm, that might work. 22:57
raydiak was originally introduced to P5 like that too, by some guy who regarded OO as a bunch of needless complexity
masak japhb: and make sure to hit important keywords like "responsibility", "pre/postconditions", "invariants", "delegation" and "hiding". 22:58
japhb He knows C++ pretty well, so at least the OO concept in general is there.
Hmmm, yes.
raydiak (and I concur with masak++'s suggestion, is how I learned my way out of that hole too)
japhb But he's used to doing things really long-hand (because C++), so I'm hoping to show him the value of concision.
masak japhb: I've come to hate most OOP introductions, which basically give a tour of how the language of the day (mis)understands OOP. 22:59
japhb Nodnod
masak and don't get me started on dogs inheriting from mammals and car has_a engine.
japhb Heh
Kristien Nobody knows C++ pretty well.
japhb Kristien: There is at least one person within 50 feet of me who is on the C++ spec committee. :-) 23:00
masak in fact, I think 99% of the OOP tutorials out there are the blind leading the blind.
Kristien Committee members tend to not know C++ pretty well. :)
japhb (It's not him, mind you, but I'm arguing your point. ;-)
Heh
Kristien cue std::dynarray 23:01
hahainternet i'd love to see a take on perl6 from a hardcore haskell programmer or similar
be interested to see what the thoughts are from that side of the aisle
japhb hahainternet: It's called Pugs. ;-)
There was even a name for that particular group: lambdacamels 23:02
hahainternet japhb: I mean more a review of the spec as it stands, but yeah
haha nice
Kristien hahainternet: I know one.
hahainternet Kristien: yeah i know a few but it's not easy to ask someone to do a detailed review of an unfamiliar language :)
Kristien He dismisses Perl 6 based on what he heard about Perl 5 code being line noise and unmaintainable. 23:03
japhb Says a *Haskell* programmer? Sheesh.
Kristien (he knows absolutely nothing about Perl)
hahainternet well i was asking a friend his thoughts, and one of his rules for example was 'immutability by default'
which starts to get real hard real quick
Kristien He once said "perl is fucking terrible" and "Java > C > Perl > PHP" 23:04
japhb In any case, I'll have to think of a good domain for him to look at and learn on. Some of my code would be easily in his domain, but I'm using too much idiom for a beginner, methinks. 23:05
Kristien japhb: compiler construction
japhb Kristien: That's sortof like learning chemistry by studying cellular biology 23:06
geekosaur anyone who thinks C is better than perl has a rather skewed view of the world
C's a *horrible* language
Kristien C is definitely better than Perl in domains where C is better than Perl. 23:07
japhb Kristien: Like writing Perl VMs ...
Kristien For example, when the target platform has only a C implementation and no Perl implementation.
japhb: we desperately need PePe a la PyPy
japhb masak, jnthn: Do you guys teach OO courses amongst your many? If so, what problem domain do you bootstrap the class with? 23:08
Kristien I wrote a VM in Perl today! 23:09
masak japhb: it varies. we have a couple of them.
japhb Oh, and masak, I was going to ask you earlier, on a separate note: Is SQLite support in DBIish pretty stable at this point? If not, what are the gotchas? 23:10
TimToady yawns after a sudden nap
Kristien thinks about rewriting VM in C++ using LLVM
masak japhb: one domain that comes to mind is a company that arranges tour guides. some nice interesting problems can arise with pairing up tourists, tours, vehicles, and drivers.
japhb: my only pain point was that error messages were crappy and not reflected well back in Perl 6 land. but moritz++ fixed that. 23:11
23:12 vendethiel left
japhb masak: Hmmm, interesting idea, that. 23:14
masak: Oh, good. My early tests were working, so that seemed promising. Good to hear it's pretty stable now.
masak in fact, anything that involves scheduling of some kind seems to be a domain ripe for OOP explanations. 23:15
such domains are also naturally "collaborative" and OOP tends to shine there.
23:16 _dolmen_ left, vendethiel joined
b2gills japhb: I would recommend anyone trying to learn about Perl5 objects read the recently revised/replaced perldoc.perl.org/perlootut.html and perldoc.perl.org/perlobj.html pages 23:20
perlootut now mentions Moose/Moo Class::Tiny and Role::Tiny
23:21 mohij left
masak \o/ 23:21
japhb b2gills: Very good to hear that they're modernizing that. 23:22
A quick scan shows a somewhat confusing mix of different levels though (raw v. Moose-style) 23:23
b2gills Actually perlootut was removed, then Tom Christiansen complained 23:24
masak .oO( <tchrist> oo! tut! ) 23:25
b2gills The point for the new perlootut was to be an onramp to further information, namely the docs for Moose etc 23:26
dalek kudo-star-daily: 0041e9d | coke++ | log/ (14 files):
today (automated commit)
raydiak Kristien: I noticed a "reverse($@result)" in there, which won't in fact reverse anything :) 23:27
Kristien oh
raydiak: here's the uptodate version: github.com/rightfold/stok/blob/master/stok 23:28
23:28 ahamilton joined
raydiak on nice 23:28
*oh 23:29
Kristien code examples are also in the repo
interesting: say "hello" say "world" -- prints "world hello" 23:31
masak m: say "hello" say "world"
camelia rakudo-moar f53a94: OUTPUT«===SORRY!=== Error while compiling /tmp/mWQpFcH0_u␤Two terms in a row␤at /tmp/mWQpFcH0_u:1␤------> say "hello" ⏏say "world"␤ expecting any of:␤ infix stopper␤ infix or meta-infix␤ …»
masak ...nope.
geekosaur makes sense... parse as say("hello", say("world"))
if you write it as parseable in p6 at least 23:32
(2 terms in a row rule)
Kristien no I mean in the tool I linked raydiak :P
it evaluates code backwards
masak innermost-first. 23:33
Mouq masak: I believe it's stack based, so innermost may not be the right term :P
b2gills I just noticed 'yas' is the reverse of 'say'
Kristien I made it that way so you can say def "foo" [ … ] instead of [ … ] "foo" def XD 23:34
raydiak heh "for reverse(@$code) { ... }" 23:35
maybe I'll understand better if I read the interpreter's source from the bottom to the top :)
Kristien It should be Turing-complete so you can write a stok interpreter in stok :P 23:36
raydiak that'd be a cool example... 23:37
Mouq
.oO( Lazy stack-based language )
23:37 vendethiel left 23:40 _dolmen_ joined 23:42 vendethiel joined, ahamilton left
Kristien { and } for constructing lists are actually just functions! 23:50
23:51 _dolmen_ left
[Coke] pmurias, hoelzro: should "make js-test" be clean? 23:52
23:52 gfldex left 23:56 Kristien left 23:59 pmurias left