Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2013-03-07

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:05 LlamaRider Hm, there is an error message I can't figure out: " Method 'STORE' not found for invocant of class 'Any' "
00:10 raiph joined #perl6
00:16 tadzik what did you do?
00:16 LlamaRider r: module example { my @a=<a>; our @b=<b>; }
00:16 p6eval rakudo 11157e: OUTPUT«No such method 'STORE' for invocant of type 'Any'␤  in block  at /tmp/QfTutj8a5s:1␤␤»
00:17 LlamaRider the my works, but the our doesn't. I don't seem to understand how "our" should function in p6.
00:17 LlamaRider r: module example { my @a=<a>; our @b; }
00:17 p6eval rakudo 11157e:  ( no output )
00:17 LlamaRider this is also interesting
00:17 lue r: my @a=<a>; our @b=<b>;
00:18 p6eval rakudo 11157e: OUTPUT«No such method 'STORE' for invocant of type 'Any'␤  in block  at /tmp/ptpjBQIlDJ:1␤␤»
00:21 lue r: my @a; our @b; say @a.WHAT; say @b.WHAT
00:21 p6eval rakudo 11157e: OUTPUT«(Array)␤(Any)␤»
00:21 LlamaRider O_O
00:22 LlamaRider well that explains the problem...
00:22 lue r: my @a; our @b is Array; say @a.WHAT; say @b.WHAT
00:22 p6eval rakudo 11157e: OUTPUT«(Array)␤(Any)␤»
00:22 lue n: my @a; our @b is Array; say @a.WHAT; say @b.WHAT
00:22 p6eval niecza v24-31-g7d73dd1: OUTPUT«[31m===[0mSORRY![3​1m===[0m��Trait name not available on variables at /tmp/gnM61h5oAI line 1:�------> [32mmy @a; our @b is Array[33m�[31m; say @a.WHAT; say @b.WHAT[0m��Unhandled exception: Check failed��  at /home/p6eval/niecza/boot/lib/CORE.setting…
00:23 LlamaRider r: our %b; say %b.WHAT;
00:23 p6eval rakudo 11157e: OUTPUT«(Any)␤»
00:24 LlamaRider r: our $b; say $b.WHAT;
00:24 p6eval rakudo 11157e: OUTPUT«(Any)␤»
00:24 LlamaRider hey, at least it's consistent
00:24 LlamaRider n: our $s; our @a; our %h; say $s.WHAT; say @a.WHAT; say %h.WHAT;
00:24 p6eval niecza v24-31-g7d73dd1: OUTPUT«(Any)␤(Array)␤(Hash)␤»
00:25 LlamaRider rakudo bug ?
00:25 lue I would think so, unless there's some weird thing about our scope I haven't heard of.
00:26 LlamaRider Time for me to learn where to file rakudo bugs then...
00:27 lue email to rakudobug@perl.org
00:27 lue LlamaRider: ^^^
00:28 LlamaRider fair enough. I thought there would be a public bug tracker. But email is just fine.
00:28 LlamaRider thanks!
00:29 LlamaRider r: our $s; our @a; our %h; say $s.WHAT; say @a.WHAT; say %h.WHAT;
00:29 p6eval rakudo 11157e: OUTPUT«(Any)␤(Any)␤(Any)␤»
00:30 lue LlamaRider: It is public, (at https://rt.perl.org/rt3), but email is the only way to file the bug
00:30 LlamaRider oh. I see.
00:30 lue r: our &c; say &c.WHAT;
00:31 p6eval rakudo 11157e: OUTPUT«(Any)␤»
00:32 LlamaRider filed :) Now I feel useful.
00:32 dayangkun joined #perl6
00:33 lue :)
00:33 LlamaRider curious that there are no "our" examples in the test suite, adding a few might be useful.
00:38 colomon LlamaRider: please do!
00:41 LlamaRider oh, I can also suggest test cases?
00:43 colomon you can create test cases.
00:47 LlamaRider By fork-ing https://github.com/perl6/roast and making pull request to the master?
00:47 colomon yes
00:48 LlamaRider got it. Will cook something up then, thanks.
01:00 anuby joined #perl6
01:00 araujo joined #perl6
01:10 am0c joined #perl6
01:16 hypolin joined #perl6
01:18 dalek ecosystem: 86b7137 | mrhdias++ | META.list:
01:18 dalek ecosystem: Adding Imlib2
01:18 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/86b713790c
01:18 dalek ecosystem: 4522fa1 | (Matthew Wilson)++ | META.list:
01:18 dalek ecosystem: Merge pull request #21 from mrhdias/master
01:18 dalek ecosystem:
01:18 dalek ecosystem: Adding Imlib2
01:18 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/4522fa1f5c
01:18 colomon woah, beat me to it!  ;)
01:18 diakopter :)
01:24 ozmq joined #perl6
01:33 zby_home_ joined #perl6
01:39 diakopter ...YAWN
01:40 tadzik but the META.info is rong :)
01:40 diakopter oh..
01:41 tadzik I've already sent the pull request
01:41 tadzik that's plenty of good code over there
01:41 tadzik mrhdias++ indeed
01:51 tokuhiro_ joined #perl6
01:57 fgomez joined #perl6
02:18 lustlife joined #perl6
02:24 ozmq joined #perl6
02:40 nebuchadnezzar joined #perl6
03:13 orafu joined #perl6
03:19 gdey joined #perl6
03:41 Uakh joined #perl6
03:53 xilo_ joined #perl6
04:19 bonsaikitten joined #perl6
04:21 _sri joined #perl6
04:32 rafl joined #perl6
04:35 SamuraiJack joined #perl6
04:37 nothing_ joined #perl6
04:37 hulu joined #perl6
04:44 isomorphisms joined #perl6
04:50 dayangkun joined #perl6
04:50 daniel-s joined #perl6
04:56 preflex_ joined #perl6
05:04 Gwyxx joined #perl6
05:13 jaldhar_ joined #perl6
05:14 kbenson joined #perl6
05:16 kbenson Can someone help me figure out what the correct build environment is for Rakudo on Parrot for windows?
05:17 quester joined #perl6
05:21 kbenson I always get an error or two during the configure stage of a perl Configure.pl --gen-parrot, and it eventually errors out
05:22 xilo_ joined #perl6
05:23 kbenson Specifically, this test always seems to cause a "test_####.exe has failed" window to pop up:
05:23 kbenson auto::isreg -         Does your C library have a working S_ISREG...........no.
05:27 lorn joined #perl6
05:38 lorn joined #perl6
05:46 thou joined #perl6
05:48 diakopter kbenson: still around?
05:48 kbenson yeah, and I think I figured it out
05:48 diakopter cool. what compiler/perl ended up working?
05:49 kbenson Looks like mingw doesn't like parens in the %path% environ, and since I'm on a 64 bit machine, my path is littered with C:\Program Files (x86) entries
05:49 kbenson I'm looking to manually set a pared down path to see if that fixes it, but this stackoverflow entry seems to fit my error perfectly: http://stackoverflow.com/questions/12090114​/libqxt-compilation-mingw32-make-exception
05:52 ozmq joined #perl6
05:59 dayangkun joined #perl6
06:04 rindolf joined #perl6
06:11 kbenson yeah, that was it
06:11 kbenson Unfortunately it's a pain to work around since git is in a path with parens...
06:14 kbenson so I had to manually track down the build command to rakudo/nqp, and then manually run perl Configure.pl --with-parrot=..\install\bin\parrot.exe to generate the make file, then used perl to negative grep path entries with a paren, writ ethe set command to a batch file to run, and run it (since windows has horrible copy/paste semantics in the command prompt)
06:14 kbenson but it's building. :)
06:19 kbenson err, now that's an odd bug:
06:20 kbenson C:\Users\kbenson\rakudo>make
06:20 kbenson NQP  is too old (2013.02.1-65-g2694596 required), run something like ...
06:20 kbenson but I built nqp.  And if I check NQP's version:
06:20 kbenson C:\Users\kbenson\rakudo>install\bin\nqp.exe -v
06:20 kbenson This is nqp version  built on parrot 4.10.0 revision RELEASE_4_10_0
06:20 kbenson somehow it doesn't know it's own version number
06:40 raiph kbenson: fwiw i googled for site:irclog.perlgeek.de/perl6 "This is nqp version built" -> http://irclog.perlgeek.de/​perl6/2011-07-20#i_4143599
06:41 kbenson d'oh
06:41 raiph kbenson: does it shed any light on your situation?
06:41 kbenson It's using the git tag in the version number.  Since git is in one of the bad paths I removed so gmake was happy, it's not available, and thus the portion that generates the version fails.
06:42 kbenson Thanks!  That saves me some time.  So now I either need to get a better make, or put git in a path that doesn't have parens.
06:45 xinming_ joined #perl6
06:50 moritz maybe just having a 'git' shell script in PATH earlier helps
06:50 moritz and that one just execs the one in the path with parens
06:50 kbenson probably
06:52 hulu joined #perl6
06:52 hulu helo
06:53 hulu say ~<abstract Concrete>.sort:-> $a, $b { uc($a) leg uc($b) };
06:53 kbenson I'll try that, but I have a feeling that there may be complications.  I believe git likes to call out to a lot of other shell utils (which is one reason msysgit comes with a LOT of unix utils)
06:53 sqirrel joined #perl6
06:53 hulu what's means of say ~<abstract Concrete>.sort:-> $a, $b { uc($a) leg uc($b) };
06:53 kbenson Depending on what git's actually used for, thay may also be expected to be in the path...
06:54 hulu who can help me
06:56 * moritz has a deja-vu
06:56 diakopter :D
06:57 hulu i need help
06:57 kbenson looks like the new improved mklink in windows vista and later may be my savior
06:58 raiph r: say ~<abstract Concrete>.sort: -> $a, $b { uc($a) leg uc($b) };
06:58 p6eval rakudo 11157e: OUTPUT«abstract Concrete␤»
06:59 raiph r: say <foo bar>.sort
06:59 p6eval rakudo 11157e: OUTPUT«bar foo␤»
06:59 hulu raiph, what diff between "say ~<abstract Concrete>.sort:-> $a, $b { uc($a) leg uc($b) };" "say ~<abstract Concrete>.sort;
06:59 hulu "
07:02 raiph hulu: not much. shorter version uses default sorting logic. with the longer version you are providing the sort function.
07:02 tokuhiro_ joined #perl6
07:03 FROGGS joined #perl6
07:05 quester left #perl6
07:05 hulu raiph, thx
07:06 hulu raiph, what's means sort :-> $a
07:06 raiph sort is a method
07:07 hulu :-> what's means
07:07 raiph following a method with : says you want to pass some args
07:07 raiph note how the : follows the method name, and then there is a space
07:08 raiph so it:->
07:09 hulu { uc($a) leg uc($b) } is args?
07:09 raiph it's part of one arg
07:10 hulu what's one arg
07:11 raiph in this case the arg is     -> $a, $b { uc($a) leg uc($b) }
07:12 hulu r: say ~<abstract Concrete kkk>.sort:-> $a, $b { uc($a) leg uc($b) };
07:12 p6eval rakudo 11157e: OUTPUT«[31m===[0mSORRY![31m===[0m�Two terms in a row�at /tmp/TQ6hKEaymk:1�------> [32msay ~<abstract Concrete kkk>.sort[33m�[31m:-> $a, $b { uc($a) leg uc($b) };[0m�    expecting any of:�        method arguments�        postfix�        infix or meta-infix�        Ã¢â‚¬Â¦
07:13 hulu r: say ~<abstract Concrete kkk>.sort:-> $a, $b, $c { uc($a) leg uc($b) };
07:13 p6eval rakudo 11157e: OUTPUT«[31m===[0mSORRY![31m===[0m�Two terms in a row�at /tmp/BBj2jjKJob:1�------> [32msay ~<abstract Concrete kkk>.sort[33m�[31m:-> $a, $b, $c { uc($a) leg uc($b) };[0m�    expecting any of:�        method arguments�        postfix�        infix or meta-infix�    Ã¢â‚¬Â¦
07:13 hulu r: say ~<abstract Concrete kkk>.sort:-> $a, $b, $c { uc($a) leg uc($b) leg uc($c)};
07:13 raiph hulu: you must put a space between the : and the arg (which starts with "->" )
07:13 p6eval rakudo 11157e: OUTPUT«[31m===[0mSORRY![31m===[0m�Two terms in a row�at /tmp/UsddXWh_a_:1�------> [32msay ~<abstract Concrete kkk>.sort[33m�[31m:-> $a, $b, $c { uc($a) leg uc($b) leg u[0m�    expecting any of:�        method arguments�        postfix�        infix or meta-infix� …
07:13 hulu r: say ~<abstract Concrete kkk>.sort : -> $a, $b, $c { uc($a) leg uc($b) leg uc($c)};
07:13 p6eval rakudo 11157e: OUTPUT«[31m===[0mSORRY![31m===[0m�Two terms in a row�at /tmp/KJCwKrAwVV:1�------> [32msay ~<abstract Concrete kkk>.sort [33m�[31m: -> $a, $b, $c { uc($a) leg uc($b) leg [0m�    expecting any of:�        method arguments�        postfix�        infix or meta-infix�…
07:13 hulu raiph, not run
07:14 hulu r: say ~<abstract Concrete kkk>.sort : -> $a, $b, $c { uc($a) leg uc($b)};
07:14 p6eval rakudo 11157e: OUTPUT«[31m===[0mSORRY![31m===[0m�Two terms in a row�at /tmp/3d4nyJEyNt:1�------> [32msay ~<abstract Concrete kkk>.sort [33m�[31m: -> $a, $b, $c { uc($a) leg uc($b)};[0m�    expecting any of:�        method arguments�        postfix�        infix or meta-infix�   …
07:14 raiph hulu: and none between the method and the :
07:14 hulu r: say ~<abstract Concrete kkk>.sort : -> $a, $b, $c { uc($a) leg uc($b)};
07:14 p6eval rakudo 11157e: OUTPUT«[31m===[0mSORRY![31m===[0m�Two terms in a row�at /tmp/_ldbFEBLEw:1�------> [32msay ~<abstract Concrete kkk>.sort [33m�[31m: -> $a, $b, $c { uc($a) leg uc($b)};[0m�    expecting any of:�        method arguments�        postfix�        infix or meta-infix�   …
07:14 hulu raiph, not run
07:14 FROGGS r: say ~<abstract Concrete kkk>.sort: -> $a, $b, $c { uc($a) leg uc($b)};
07:14 p6eval rakudo 11157e: OUTPUT«Not enough positional parameters passed; got 2 but expected 3␤  in block  at /tmp/NiKgu4WETi:1␤␤»
07:15 hulu r: say ~<abstract Concrete kkk>.sort : -> $a, $b, $c { uc($a) leg uc($b) };
07:15 p6eval rakudo 11157e: OUTPUT«[31m===[0mSORRY![31m===[0m�Two terms in a row�at /tmp/cYlDA_daJV:1�------> [32msay ~<abstract Concrete kkk>.sort [33m�[31m: -> $a, $b, $c { uc($a) leg uc($b) };[0m�    expecting any of:�        method arguments�        postfix�        infix or meta-infix�  Ã¢â‚¬Â¦
07:15 hulu not run
07:15 FROGGS r: say ~<abstract Concrete kkk>.sort: -> $a, $b { uc($a) leg uc($b) };
07:15 p6eval rakudo 11157e: OUTPUT«abstract Concrete kkk␤»
07:15 raiph hulu: sort:   not sort :    # no space between sort and :
07:15 hulu r: say ~<abstract Concrete kkk>.sort: -> $a, $b, $c { uc($a) leg uc($b) leg uc($c)};
07:15 p6eval rakudo 11157e: OUTPUT«[31m===[0mSORRY!​[31m===[0m�Operators 'leg' and 'leg' are non-associtiave and require parenthesis�at /tmp/zW8jTvROhx:1�------> [32msort: -> $a, $b, $c { uc($a) leg uc($b) [33m�[31mleg uc($c)};[0m�    expecting any of:�        postfix�        infix or meta-in…
07:15 hulu raiph, not run
07:16 FROGGS hulu: read the error message
07:16 cognominal joined #perl6
07:16 FROGGS r: say ~<abstract Concrete kkk>.sort: -> $a, $b, $c { (uc($a) leg uc($b)) leg uc($c)};
07:16 p6eval rakudo 11157e: OUTPUT«Not enough positional parameters passed; got 2 but expected 3␤  in block  at /tmp/4JwA3DOBBj:1␤␤»
07:17 FROGGS sort only gives two args
07:19 raiph hulu: http://doc.perl6.org/routine/sort # if you pass a function to the sort method, that function must accept either one or two args (the one you started with used two)
07:20 hulu joined #perl6
07:22 FROGGS <raiph> hulu: http://doc.perl6.org/routine/sort # if you pass a function to the sort method, that function must accept either one or two args (the one you started with used two)
07:23 hulu r: say ~<abstract Concrete kkk>.sort: -> $a, $b { (uc($a) leg uc($b)) leg uc($c)};
07:23 p6eval rakudo 11157e: OUTPUT«[31m===[0mSORRY!​[31m===[0m�Variable '$c' is not declared�at /tmp/VxKC7dzvOm:1�------> [32m> $a, $b { (uc($a) leg uc($b)) leg uc($c[33m�[31m)};[0m�    expecting any of:�        postfix�»
07:23 hulu r: say ~<abstract Concrete kkk>.sort: -> $a, $b { (uc($a) leg uc($b))};
07:23 p6eval rakudo 11157e: OUTPUT«abstract Concrete kkk␤»
07:23 hulu r: say ~<abstract Concrete kkk TGGG>.sort: -> $a, $b { (uc($a) leg uc($b))};
07:23 p6eval rakudo 11157e: OUTPUT«abstract Concrete kkk TGGG␤»
07:24 hulu FROGGS, how to pass function to sort
07:24 hulu r: say ~<abstract kkk Concrete TGGG>.sort: -> $a, $b { (uc($a) leg uc($b))};
07:24 p6eval rakudo 11157e: OUTPUT«abstract Concrete kkk TGGG␤»
07:26 raiph hulu: do you see a private msg window i started with you?
07:26 hulu rafl, no
07:26 hulu raiph, not
07:26 raiph type the following: /msg raiph hi
07:52 ObseLeTe joined #perl6
07:53 kbenson left #perl6
07:56 SamuraiJack joined #perl6
07:57 moritz r: say <abstract kkk Concrete TGGG>.sort: &uc
07:57 p6eval rakudo 11157e: OUTPUT«abstract Concrete kkk TGGG␤»
07:58 FROGGS r: say <abstract kkk Concrete TGGG>.sort: &chars
07:58 p6eval rakudo 11157e: OUTPUT«kkk TGGG abstract Concrete␤»
07:58 FROGGS morning moritz
07:58 moritz \o FROGGS
08:02 hulu r: say <abstract kkk Concrete TGGG>.sort: *.uc
08:02 p6eval rakudo 11157e: OUTPUT«abstract Concrete kkk TGGG␤»
08:03 hulu r: say <abstract kkk Concrete TGGG>.sort: *.chars
08:03 p6eval rakudo 11157e: OUTPUT«kkk TGGG abstract Concrete␤»
08:04 hulu moritz, what diff between &uc or *.uc
08:05 moritz hulu: &uc is a function, *.uc creates a function that calls a method on its argument
08:05 moritz but in this case, in the end both do the same
08:05 cognominal joined #perl6
08:06 hulu what means calls a method on its argument
08:06 moritz which part are you having trouble with?
08:08 moritz do you know what a method call is?
08:08 moritz do you know the argument of a function is?
08:08 hulu moritz, no
08:09 moritz r: say sqrt(9)
08:09 p6eval rakudo 11157e: OUTPUT«3␤»
08:09 moritz the 9 is an argument that I pass to the function sqrt
08:09 moritz ok?
08:10 hulu ok
08:11 hulu who can say chinese
08:11 moritz if you need it said in chinese, it's not ok
08:12 hulu moritz, what's means "calls a method on its argument"
08:12 moritz hulu: did you understand what the argument is?
08:12 hulu i c
08:13 moritz a "yes" or "no" would be more helpful to me
08:13 hulu yes
08:13 moritz ok
08:14 moritz https://en.wikipedia.org/wiki/Me​thod_%28computer_programming%29 explains what a method is
08:14 hulu moritz, i c method
08:15 moritz then you have it all together now
08:16 hulu i don't know 'a function that calls a method on its argument'
08:17 moritz which part are you having trouble with?
08:17 moritz you know what what an argument is
08:17 hulu what's on its argument
08:17 moritz a method is always called "on" something
08:17 moritz in Perl 6, we call it its invocant
08:18 moritz r: say "abc".uc
08:18 p6eval rakudo 11157e: OUTPUT«ABC␤»
08:18 moritz here "abc" is the invocant
08:18 moritz and I call the method uc on the string "abc"
08:18 moritz clear now?
08:18 hulu ic
08:19 hulu *.uc creates a function that calls a method on its argument
08:19 hulu * is invocant
08:19 moritz *.uc is like  sub ($x) { $x.uc }
08:20 moritz so * is the argument of the function, and the invocant for .uc
08:20 sorear Why don't we curry listops?
08:21 sorear uc(*)
08:21 moritz because there are legitimate cases of passing * to listops
08:21 moritz pick *, 1..10;
08:21 moritz also uc(*) is just &uc
08:21 sorear $x = *;
08:22 sorear 1..*;
08:22 sorear currying is already type-aware enough to make pick *, 1..10 work
08:22 hulu so * is the argument of the function, and the invocant for .uc --- why invocant for .uc
08:22 moritz because you call the method .uc on it
08:23 * moritz feels his patience thinning out, and decides to leave the topic before becoming rude
08:23 sorear it just seems inconsistent and wrong that we don't allow substr("0123456789abcdef",*,1)
08:23 moritz sorear: currying is only type-aware for infixes, and only by name
08:24 moritz sorear: it would be possible to do that if we dropped some of the specialness of * where it's not a curryier
08:26 moritz sorear: I just think that as is, we are at the limit of how magic * can be without being totally confusing
08:26 moritz or maybe we are a bit beyond that limit already
08:31 raiph moritz: p6eval works in channel; /msg p6eval gets me a private p6eval; /msg foo gets me a msg tab shared between me and foo; is there a way i can have a msg tab i share AND use p6eval?
08:31 moritz raiph: you'd have to open a channel for that
08:32 moritz raiph: I can make p6eval join other channels for you
08:34 raiph i'm thinking about the likes of hulu where it would be good to be able to jump away from #perl6 and do some messages and evals in private
08:36 moritz I thought so
08:36 moritz but IRC offers only private discussion and channels
08:36 moritz there's not much I can do
08:36 moritz one thing I could do is to make p6eval follow /invite's
08:36 FROGGS #perl6-qa
08:36 FROGGS or #perl6-help
08:37 FROGGS or so
08:37 FROGGS or #perl6-n00b :o)
08:38 FROGGS moritz: this can be closed, right? https://rt.perl.org/rt3/Publ​ic/Bug/Display.html?id=76744
08:39 moritz FROGGS: when it's tested, yes
08:40 daxim joined #perl6
08:40 FROGGS how to test it?
08:40 moritz r: my token a { :dba('fancy name') '(' ~ ')' .* }; '(abc' ~~ /<&a>/
08:40 p6eval rakudo 11157e:  ( no output )
08:41 moritz huh, I thought that one would die
08:41 moritz r: '(abc' ~~ /'(' ~ ')' .*/
08:41 p6eval rakudo 11157e: OUTPUT«Unable to parse expression in ; couldn't find final ')'␤  in any FAILGOAL at src/stage2/QRegex.nqp:1084␤  in regex  at /tmp/xlSE26SbHW:1␤  in method ACCEPTS at src/gen/CORE.setting:10799␤  in block  at /tmp/xlSE26SbHW:1␤␤»
08:41 FROGGS r: my token a { :dba('fancy name') '(' ~ ')' .* }; say '(abc' ~~ /<&a>/
08:41 p6eval rakudo 11157e: OUTPUT«#<failed match>␤»
08:41 moritz r: '(abc' ~~ /:dba('foo') '(' ~ ')' .*/
08:41 p6eval rakudo 11157e:  ( no output )
08:41 moritz oi
08:41 moritz the presence of :dba causes the failure to be silent
08:41 moritz that's bad
08:41 moritz so no, cannot be closed :-)
08:41 FROGGS hehe
08:41 FROGGS i c
08:42 moritz but a comment about the new failure mode in the ticket would be helpful
08:42 FROGGS I'll add it
08:42 moritz FROGGS++
08:46 raiph moritz: thx
08:46 raiph goodnight #perl6
08:47 fhelmberger joined #perl6
08:49 FROGGS btw, within a month rakudo got about 90 more planned tests, 40 less skipped, 30 less todo, and 156 more passed tests
08:49 FROGGS still 644 TODOs to go ó.ò
08:49 FROGGS left #perl6
08:49 FROGGS joined #perl6
08:51 marloshouse joined #perl6
08:56 curtispoe joined #perl6
09:01 xinming joined #perl6
09:05 marloshouse left #perl6
09:10 felipe joined #perl6
09:15 not_gerd joined #perl6
09:15 not_gerd o/
09:16 not_gerd phenny: tell jnth I stumbled upon a compilation bug - see https://gist.github.com/gerdr/5106672
09:16 phenny not_gerd: I'll pass that on when jnth is around.
09:17 not_gerd phenny: tell jnthn I stumbled upon a compilation bug - see https://gist.github.com/gerdr/5106672
09:17 phenny not_gerd: I'll pass that on when jnthn is around.
09:17 not_gerd seen jnth
09:23 nwc10 is it known that t/spec/S32-num/rat.rakudo fails 4 tests on HEAD?
09:23 nwc10 not ok 7 - eval Rat.new(1, 3).perl is Rat
09:23 nwc10 # Actual type: Str
09:23 nwc10 not ok 8 - eval Rat.new(1, 3).perl is 1/3
09:23 nwc10 #      got: '1/3'
09:23 nwc10 # expected: '0.333333'
09:23 nwc10 and something similar for the next pair which test 1/3
09:24 * moritz suspect pmichaud's hand
09:26 nwc10 it is not obvious to me whether the test or the code is more confused.
09:27 moritz it looks like the the first test is right, and the second is wrong
09:27 kaleem joined #perl6
09:27 moritz eval $something.perl should round-trip the type
09:28 moritz but doing a string comparison on rats looks misguided to me
09:33 ObseLeTe joined #perl6
09:38 fgomez joined #perl6
09:55 not_gerd left #perl6
09:58 dakkar joined #perl6
09:58 kivutar joined #perl6
09:59 Heather joined #perl6
09:59 Heather tadzik hi
09:59 Heather for [\~] $name.split('/').map({"$_/"}) <- what is it :)
09:59 tadzik hello Heather
09:59 tadzik hm, let's see
10:00 tadzik we split $name by '/', getting a list
10:00 Heather snippet from panda mkdir
10:00 Heather wait a minute... I'll back to it :)
10:00 tadzik then we add '/' after each part
10:00 tadzik and join it all into one big string
10:00 tadzik ...or so I think :P
10:01 tadzik ...I wrote that? :)
10:01 sorear mkdir -p ?
10:01 FROGGS this basically just adds a slash at the end if there is none
10:02 tadzik yeah, it would seem so
10:02 FROGGS one could write that cleaner I guess :o)
10:02 tadzik I don't see it in panda code though
10:03 tadzik yeah, that's a part of mkdir -p
10:04 tadzik I think I borrowed that code from moritz++ actually
10:04 tadzik it was shorter and more clever than my original solution
10:05 tadzik I have to admit I don't fully understand it though :)
10:06 tadzik r: say ([\~] <a b c d>).perl
10:06 p6eval rakudo 11157e: OUTPUT«("a", "ab", "abc", "abcd").list␤»
10:06 tadzik a-ha!
10:06 tadzik now that makes sense
10:10 Heather here.
10:11 Heather tadzik can I have a beer?
10:11 tadzik Heather: sure
10:11 Heather \o/
10:11 tadzik you got me there :)
10:11 moritz .u beverage
10:11 phenny U+2615 HOT BEVERAGE (☕)
10:11 moritz what about cold beverage? :-)
10:11 tadzik and now we need another Unicode Character Sheet
10:12 tadzik A PINT OF STOUT, A PINT OF LAGER, A PINT OF PORTER
10:12 Heather mmmm -_-' sweet virtual beer for my imagination o_O my favorite stuff
10:12 tadzik Heather: are you coming to Polish Perl Workshop?
10:13 Heather tadzik what is that :)
10:13 tadzik http://act.yapc.eu/plpw2013
10:13 tadzik a small conference we organize
10:13 Heather tadzik today is my first day I use perl
10:13 tadzik really? Wow
10:13 Heather yes )
10:14 tadzik well, no better way to start learning than to contribute to one of the central ecosystem modules :)
10:14 Heather tadzik I had found some masak 's gift on github and it was just cool and I desired to drop python and pick perl )
10:15 Heather -_-'
10:15 tadzik welcome aboard :)
10:16 Heather I'm happy to
10:16 tadzik beware, this is Perl 6, still in development, not yet there in its final form
10:16 Heather tadzik I will start from it... Don't want to learn perl 5 then learn perl 6 >_<
10:17 Heather bonsaikitten you see I'm flawless o_O
10:19 Heather tadzik but I just wanted to write small tool to fill .gitignore or .ignore by using "ignore hello" :)
10:19 tadzik Heather: oh, it's definitely ready enough for that :)
10:20 Heather I wonder why there is still no something alike git ignore but I feel that someone already done this job I want to reinvent :) anyways, I think I need regex dir/fname to get $dir and $fname :)
10:20 tadzik when you do, don't hesitate to add it to the module ecosystem
10:21 Heather tadzik so util is not module :S
10:21 Heather afk ~ minute
10:21 tadzik Heather: doesn't matter, we have plenty of those already
10:22 tadzik ufo, for example
10:22 tadzik it's a good place for applications as well
10:23 Heather tadzik yes I already use it -_-' and wrote an gentoo ebuild for it
10:24 tadzik awesome
10:24 Heather tadzik next I need to make ebuild for your panda and some other stuff
10:24 tadzik Heather: are you familiar with Rakudo Star?
10:24 Heather tadzik then I need to write some stuff to automate other stuff but it's later
10:25 Heather tadzik no :) just yesterday bonsaikitten said me that I should use rakudo if I want perl6 because I were looking for perl-6 package
10:25 Heather tadzik what is rakudo-star?
10:26 Heather tadzik I saw it in gh organization
10:26 tadzik Heather: it's the distribution of Perl 6 containing the compiler plus some useful modules and utils
10:26 tadzik ufo, panda and more
10:26 Heather tadzik so it's alike haskell-platform or ocalm on steroids or .... I get it
10:26 Heather *ocaml
10:27 Heather tadzik I'm not sure about what panda can. Does it make most of stuff that cabal do for haskell?
10:29 tadzik Heather: I'm not too familiar with haskell, sadly. It makes it easy to install perl6 modules (and tools)
10:29 tadzik like 'panda install ufo', for example
10:29 tadzik it should be capable of installing them to a specified location too
10:29 Heather tadzik if so it should be correct to follow gentoo-haskell manner and make a project (later) for automate writing another to-ebuild porter
10:29 tadzik it resolves dependencies, runs tests etc
10:30 Heather I see then that's it
10:37 kresike joined #perl6
10:37 kresike hello all you happy perl6 people
10:37 tadzik hello kresike
10:37 kresike tadzik, o/
10:42 FROGGS hi kresike
10:43 kresike FROGGS, o/
10:48 Uakh I'm not a happy perl6 person, but hello nonetheless o/
10:52 Heather tadzik does unlink remove files? :S
10:53 sorear it _should_
10:54 tadzik unlink() deletes a name from the file system, says the unix manualu
10:54 tadzik I'll trust that :)
10:54 Heather why command is called "unlink"
10:55 Heather I mean it sounds not alike rm :) just wonder
10:56 sorear dunno, but it's ancient
10:57 Heather sorear I'll try to google history of this
10:58 tadzik Heather: well, why is print called print even though it displays stuff on a screen instead of printing it on a printer? :)
10:58 mberends joined #perl6
10:58 sorear as far as I know, the system call has been called unlink but the command has been rm since the beginning of time
10:58 sorear (1970-01-01 :P)
10:58 sorear tadzik: because originally it *did* print it on a printer.
10:59 Heather I see.
10:59 sorear unix predates video monitors
10:59 tadzik sorear: that's it. Hystorical reasons
10:59 sorear they used to use teletypes instead
10:59 Heather may I ask if understand it correct: find(dir => $path).map({ .Str }).reverse -> $f
11:00 Heather I think I understand what it does but not sure if I understand how
11:00 sorear then again, https://en.wikiquote.org/wiki​/Kenneth_Thompson#Attributed  nr 2
11:00 Heather we provide dir as path and then map to extract filename?
11:01 tadzik Heather: find() returns objects. If you want them to be strings, you map
11:01 tadzik like "turn all those objects into strings"
11:02 Heather so map just makes ToString
11:03 tadzik well, in this case it calles the Str() method on all elements
11:03 Heather I see but it ends / in the end of dir
11:03 Heather puts /
11:03 Heather $.dir ~ '/' ~ $.name
11:04 Heather if we use only dir for find then we have no name
11:04 tadzik yes
11:04 Heather and we put / to the end of regular file?
11:04 tadzik um, no
11:04 tadzik every file has a name
11:04 Heather I mean when I call rm_rf(hello/notfolder)
11:05 Heather then hello/notfolder will be passed as dir?
11:05 Heather https://github.com/tadzik/perl6-File-Too​ls/blob/master/lib/Shell/Command.pm#L27
11:05 tadzik nono
11:06 tadzik thing is, rm_rf can work equally well on plain strings as well as any other objects with .Str method
11:06 grondilu joined #perl6
11:06 tadzik for example File::Find::Result
11:06 tadzik or whatsitsname
11:06 tadzik .Str() on a string is a no-op
11:07 Heather tadzik then I don't understand how it should make it...
11:07 tadzik how it should make what?
11:08 tadzik it gets strings, and if not, it turns them into strings
11:08 Heather we make file from dir only, right?
11:08 tadzik it doesn't care for slashes, names or whatnot
11:08 tadzik it checks if it's a directory, with .IO.d
11:08 tadzik then decides what to do
11:09 Heather I see but when it creates result object (file) it's using only dir as constructor
11:09 Heather tadzik isn't it?
11:10 tadzik are you talking about find() now, or rm_rf()?
11:10 not_gerd joined #perl6
11:11 Heather about find(dir => $path).map({ .Str }).reverse
11:11 tadzik also, I have to get some work done at $dayjob, so I may be a bit unavailable
11:11 Heather I understand :)
11:11 tadzik oh, find() is not a constructor itself
11:11 tadzik it gets a dir paramater, then scans the dir inside and produces complete objecs
11:12 tadzik you can peek into it, try find(...).perl.say
11:12 Heather tadzik what if I use long path to file?
11:12 tadzik I dunno, try :)
11:13 not_gerd on Rakudo's production-readiness: https://gist.github.com/gerdr/5107342
11:13 not_gerd my personal take on it, that is
11:13 FROGGS r: $| = 1
11:13 p6eval rakudo 11157e: OUTPUT«[31m===[0mSORRY![​31m===[0m�Unsupported use of $| variable; in Perl 6 please use :autoflush on open�at /tmp/7gK14oNGNJ:1�------> [32m$|[33m�[31m = 1[0m�»
11:13 FROGGS I love these hints
11:14 Heather unicode?
11:15 grondilu yeah but what if I actually want to use a variable named '$|'
11:15 grondilu ?
11:15 grondilu r: my $| = 1;
11:16 p6eval rakudo 11157e: OUTPUT«[31m===[0mSORRY![​31m===[0m�Unsupported use of $| variable; in Perl 6 please use :autoflush on open�at /tmp/nZgMuxvVVg:1�------> [32mmy $|[33m�[31m = 1;[0m�»
11:16 FROGGS grondilu: you dont have to want that :P
11:17 grondilu well, on second thought I doubt '|' is a valid variable name anyway.
11:17 FROGGS I believe variables are like / <ident>+ % <['-]> /
11:19 mtk joined #perl6
11:28 rindolf joined #perl6
11:34 SamuraiJack joined #perl6
11:42 Heather why m/[^\/]+$/ doesn't work :(
11:44 felher Heather: I didn't read the backlog so I might be just wrong about what you are trying to achieve, but in Perl 6, the notiation for character classes is '<-[\/]>'
11:44 not_gerd r: say "foo/bar/baz" ~~ /<-[\/]>+$/
11:44 p6eval rakudo 11157e: OUTPUT«「baz」␤␤»
11:44 Heather felipe I just want separate filename and path
11:45 Heather ^ should get last thing if I understand correct...
11:46 moritz regex syntax has changed
11:46 moritz but why not use $path.split('/')[*-1]
11:46 felher Heather: it works as not_gerd++ showed: The '-' in front of the '[\/]' means to negate the character class '[\/
11:47 felher yeah, an what moritz said ^^ :)
11:47 moritz also I don't think you need to escape / in a char class
11:47 Heather what is [*-1]
11:48 Heather -1 from end?
11:48 Heather e.g. last
11:48 felher The first from the end, yes :)
11:48 moritz r: say IO::Path('/home/moritz/README.txt').basename
11:48 p6eval rakudo 11157e: OUTPUT«Could not find symbol '&Path'␤  in method <anon> at src/gen/CORE.setting:10517␤  in  at src/gen/Metamodel.pm:2488␤  in any find_method_fallback at src/gen/Metamodel.pm:2476␤  in any find_method at src/gen/Metamodel.pm:925␤  in  at src/gen/BOOTSTRAP.pm:895␤  in any …
11:48 moritz eeks, that doesn't work with the bot
11:48 moritz because the bot removes all IO stuff
11:49 Heather moritz ah... there is .basename?
11:49 moritz but locally
11:49 moritz > say IO::Path.new('/home/moritz/README.txt').basename
11:49 moritz README.txt
11:49 moritz Heather: in IO::Path, yes
11:49 Heather moritz that's what I miss :)
11:50 moritz (you don't need to load any modules to use it)
11:50 Heather now I understand more but still feel some confusion
11:51 Heather moritz https://github.com/tadzik/perl6-File-T​ools/blob/master/lib/File/Find.pm#L49
11:51 Heather moritz may you explain where .basename cuts from $dir?
11:52 Heather does .basename itself performs $dir change?
11:52 tadzik oh gods, my code written with tabs /o\
11:53 moritz Heather: no
11:53 moritz Heather: IO::Path objects are stored as path + basename
11:53 moritz Heather: and if you call   IO::Path.new($file), then the method new splits $file, and stores them path and basename
11:54 Heather tadzik it's mixed tabs in one file and spaces in another file -_-'
11:54 tadzik even worse :|
11:54 moritz but dir() already returns IO::Path objects, so you don't have to care about that
11:54 Heather tadzik yep
11:55 Heather moritz so dir cuts basename from dir?
11:55 Heather moritz finally I get it :D
11:56 Heather I hope...
11:57 Heather but it's not looking very clear where filename goes from dir string :P
12:00 Heather No, it fails : Failed to get the directory contents of 'ignore': readdir failed: Not a directory
12:01 Heather tadzik seems like filename doesn't separate itself from directory with find(dir => $path)
12:02 felher Whats bad about tabs? I still prefer them over spaces. I don't see any problems with that, as long as you don't mix 'em :)
12:02 chee joined #perl6
12:02 Heather there are some problems with tabs...
12:02 wk joined #perl6
12:03 Heather felher general tabs trouble is they are the same lengh
12:03 * kresike is curious about the problems with tabs too
12:03 arnsholt felher: I prefer spaces. That's what wrong with 'em =)
12:03 Heather felher with spaces I have much more freedom and safety
12:06 felher arnsholt: I don't like spaces because they tend to look the same in everybody's editor. But I like indention to be 8 spaces wide. Most other people use 4-spaces. If the code is indented via tabs, I can display tabs as 8 spaces, they can display tabs as 4 spaces. If they are real spaces, I'm stuck with 4 spaces wether I want or not :)
12:06 felher arnsholt: true, this isn't such a big deal. It's not that I just HATE spaces. I just prefer tabs when I can use them :)
12:06 arnsholt True. I like four spaces; eight is too much for me, but two (I'm looking at you lispers!) is way too narrow
12:07 arnsholt Yeah, I'm not terribly dogmatic about it either
12:07 arnsholt But mixed tabs and spaces are an abomination =)
12:07 felher arnsholt: yeah, indeed :)
12:08 Heather I will try to understand how IO Path works in evening :) For now, see you.
12:08 felher o/ Heather
12:09 Heather o/
12:13 SmokeMachine joined #perl6
12:18 araujo joined #perl6
12:18 araujo joined #perl6
12:21 erkan joined #perl6
12:25 dayangkun joined #perl6
12:27 woolfy joined #perl6
12:35 xinming joined #perl6
12:36 FROGGS jnthn / moritz / pmichaud: how do I profile rakudo itself?
12:37 robinsmidsrod joined #perl6
12:37 * moritz has no idea
12:37 FROGGS :/
12:40 not_gerd FROGGS: there's --profile for P6-level profiling
12:40 not_gerd for C-level profiling, you can use callgrind
12:40 FROGGS hmmm
12:40 FROGGS and the levels between? *g*
12:40 not_gerd afaik both can be visualized with KCachegrind
12:40 * not_gerd has never done so himself
12:40 FROGGS okay, callgrind might be an option then
12:41 FROGGS thanks not_gerd
12:56 robinsmidsrod joined #perl6
13:05 gdey joined #perl6
13:25 stevan_ joined #perl6
13:42 Pompel joined #perl6
13:51 wtw joined #perl6
13:57 daxim joined #perl6
13:58 * colomon is pondering how much work it would be to port Python's matplotlib to p6....
13:59 brrt joined #perl6
13:59 moritz quite some
14:03 kaare__ joined #perl6
14:08 Targen joined #perl6
14:10 colomon pugs: say 1.75.perl
14:10 p6eval pugs: OUTPUT«7/4␤»
14:11 colomon r: say 1.75.perl
14:11 p6eval rakudo 11157e: OUTPUT«1.75␤»
14:11 colomon r: say 1.752.perl
14:11 p6eval rakudo 11157e: OUTPUT«1.752␤»
14:12 colomon rn: say pi.Rat(1e-10).perl
14:12 p6eval rakudo 11157e, niecza v24-31-g7d73dd1: OUTPUT«<312689/99532>␤»
14:13 colomon rn: say 3.14.Rat.perl
14:13 p6eval rakudo 11157e, niecza v24-31-g7d73dd1: OUTPUT«3.14␤»
14:13 colomon rn: say pi.Rat.perl
14:13 p6eval rakudo 11157e, niecza v24-31-g7d73dd1: OUTPUT«<355/113>␤»
14:14 not_gerd r: https://gist.github.com/gerdr/2659460
14:14 p6eval rakudo 11157e: OUTPUT«42/1 = 42.0␤1/5 = 0.2␤-4/3 = -1.(3)␤19/12 = 1.58(3)␤1/97 = 0.(01030927835051546391752577319587​62886597938144329896907216494845360​82474226804123711340206185567)␤»
14:15 PacoAir joined #perl6
14:17 bluescreen10 joined #perl6
14:18 dalek roast: 64b9d5f | (Solomon Foster)++ | integration/advent2009-day14.t:
14:18 dalek roast: Change tests to match current spec, unfudge Rakudo tests that now work (I think).
14:18 dalek roast: review: https://github.com/perl6/roast/commit/64b9d5f683
14:18 grondilu rn:  say pi.Rat.perl #  how does perl decide which rational approximation it should take?
14:18 p6eval rakudo 11157e, niecza v24-31-g7d73dd1: OUTPUT«<355/113>␤»
14:19 grondilu say pi, 355/113
14:19 grondilu rn:say (pi - 355/113)/pi
14:19 grondilu rn: say (pi - 355/113)/pi
14:19 Uakh joined #perl6
14:19 p6eval niecza v24-31-g7d73dd1: OUTPUT«-8.49136787674061E-08␤»
14:19 p6eval ..rakudo 11157e: OUTPUT«-8.49136787674061e-08␤»
14:20 FROGGS rn: say pi
14:20 p6eval rakudo 11157e: OUTPUT«3.14159265358979␤»
14:20 p6eval ..niecza v24-31-g7d73dd1: OUTPUT«3.1415926535897931␤»
14:20 FROGGS rn: say 355/113
14:20 p6eval rakudo 11157e, niecza v24-31-g7d73dd1: OUTPUT«3.141593␤»
14:20 grondilu I know 355/113 is a pretty good approximation of pi, but how does P6 knows it?
14:21 grondilu is it hard coded or something?
14:21 colomon grondilu: not in the least
14:21 colomon rn: say pi
14:21 p6eval rakudo 11157e: OUTPUT«3.14159265358979␤»
14:21 p6eval ..niecza v24-31-g7d73dd1: OUTPUT«3.1415926535897931␤»
14:21 colomon rn: say pi.WHAT
14:21 p6eval niecza v24-31-g7d73dd1: OUTPUT«Num()␤»
14:21 p6eval ..rakudo 11157e: OUTPUT«(Num)␤»
14:22 colomon hey, what?
14:22 Psyche^ joined #perl6
14:22 * grondilu is confused
14:22 colomon hmmm, p6eval's niecza is significantly out of date
14:22 colomon grondilu: p6 defines the constant pi to be a Num (ie floating point)
14:23 colomon If you convert a Num to a Rat, it finds a nearby rational
14:24 colomon rn: my @precs = .1, .01, .001 ... *; for @precs[^10] -> $prec { say pi.Rat($prec); };
14:24 p6eval niecza v24-31-g7d73dd1: OUTPUT«(timeout)»
14:24 p6eval ..rakudo 11157e: OUTPUT«3.142857␤3.142857␤3.141509â​¤3.141509␤3.141593␤3.141593␤3.1415​93␤3.141593␤3.141593␤3.141593␤»
14:24 colomon forgot the .perl
14:24 colomon rn: my @precs = .1, .01, .001 ... *; for @precs[^10] -> $prec { say pi.Rat($prec).perl; };
14:25 colomon rn: my @precs := .1, .01, .001 ... *; for @precs[^10] -> $prec { say pi.Rat($prec).perl; };
14:25 p6eval niecza v24-31-g7d73dd1: OUTPUT«(timeout)»
14:25 p6eval ..rakudo 11157e: OUTPUT«<22/7>␤<22/7>␤<333/106>␤<333/106>â​¤<355/113>␤<355/113>␤<103993/33102>␤<1039​93/33102>␤<103993/33102>␤<312689/99532>␤»
14:25 p6eval rakudo 11157e: OUTPUT«<22/7>␤<22/7>␤<333/106>␤<333/106>â​¤<355/113>␤<355/113>␤<103993/33102>␤<1039​93/33102>␤<103993/33102>␤<312689/99532>␤»
14:25 p6eval ..niecza v24-31-g7d73dd1: OUTPUT«3.2␤<22/7>␤3.140625␤<333/106>␤<​355/113>␤<355/113>␤<75948/24175>␤<100798/​32085>␤<103993/33102>␤<312689/99532>␤»
14:25 colomon there we go
14:25 colomon ever tighter rational approximations to pi
14:26 colomon note that Niecza and Rakudo do not necessarily choose the same approximation
14:26 xinming joined #perl6
14:26 colomon rn say pi - pi.Rat(0.1)
14:26 colomon rn: say pi - pi.Rat(0.1)
14:26 p6eval rakudo 11157e: OUTPUT«-0.00126448926734968␤»
14:26 p6eval ..niecza v24-31-g7d73dd1: OUTPUT«-0.058407346410207062␤»
14:27 colomon rn: say pi - pi.Rat(1e-10)
14:27 p6eval rakudo 11157e: OUTPUT«-2.91433543964104e-11␤»
14:27 p6eval ..niecza v24-31-g7d73dd1: OUTPUT«-2.9143354396410359E-11␤»
14:32 grondilu ok
14:40 dayangkun joined #perl6
14:41 dayangkun joined #perl6
14:44 crab2313 joined #perl6
14:46 dalek roast: 5a0824c | (Solomon Foster)++ | S0 (3 files):
14:46 dalek roast: Fudge for Niecza.
14:46 dalek roast: review: https://github.com/perl6/roast/commit/5a0824cf4a
15:00 rjbs "Perl 6: Holy grail or utopia?"
15:01 rjbs Not such a bad choice!
15:01 LlamaRider joined #perl6
15:01 moritz graily utopia!
15:08 n0den1te joined #perl6
15:12 masak rjbs: my thought, too. I went "hm, one of these should be the bad one, right. which one is it?"
15:12 masak I mean, there's nothing about the word "utopia" that says "doesn't exist", right? :P
15:12 n0den1te r: my @ppl = <moritz Heather hulu tadzik>; for @ppl -> $x { say "$x++"; }; # learning adventures++
15:12 p6eval rakudo 11157e: OUTPUT«moritz++␤Heather+​+␤hulu++␤tadzik++␤»
15:13 masak ooh, karma by evalbot.
15:13 n0den1te masak: that's not quite true - karma tracker still tracks it. :)
15:14 alester joined #perl6
15:15 masak sure. didn't want to imply it didn't.
15:15 * moritz feels hilighted
15:16 * isBEKaml felt happy watching the exchange on backlog today.
15:17 rjbs masak: I almost don't want to read the piece, because I like not knowing which is the bad one.
15:17 isBEKaml I still follow channel happenings on perl6 land, even as other stuff keeps me away. IR clogs are awesome. :)
15:17 isBEKaml heh. IR Clogs.
15:17 rjbs We'll have to switch to UV.
15:17 isBEKaml can't see a thing.
15:18 moritz you can switch to UV by prefixing your lines with [off]
15:18 geekosaur ir flipflops?
15:18 isBEKaml paddle - paddle
15:18 rjbs "Does Perl 6 support UV??"
15:19 isBEKaml we should have a bot like Lambdabot that does: "Does Perl6..." YES!
15:19 moritz no, we aren't ultra violent
15:19 isBEKaml ultra valent? :P
15:20 masak wow, heated newbie explanations in the backlog.
15:20 masak rjbs: the piece was surprisingly ok. tl;dr: author's hopeful.
15:20 isBEKaml masak: exactly. I don't see those often these days. :)
15:21 moritz which blog/article are you talking about?
15:21 moritz (rjbs and masak)
15:21 rjbs https://twitter.com/perlbuz​z/status/309679738631368706
15:21 masak http://kresimirbojcic.com/2013/02/24/​perl-6-the-holy-grail-or-utopia.html
15:22 masak moritz: if you are already tired of hulu, may I suggest not encouraging him by helping him? it seems to upset you. :)
15:23 isBEKaml I can't speak for moritz, I was thinking he was frustrated by the language barrier more than anything else.
15:23 moritz masak: well, I stopped when I tired, so I kinda followed your advise already
15:23 masak yeah. I mean sooner than that.
15:24 moritz probably, yes
15:24 xilo joined #perl6
15:25 isBEKaml wow, that article reads like the author intended to make some curry but wound up with something that looks vaguely like curry but tastes real bad! :P
15:25 masak <Heather> tadzik I had found some masak 's gift on github and it was just cool and I desired to drop python and pick perl )
15:25 masak wait what what? :)
15:25 isBEKaml (profuse apologies for the bad analogy)
15:25 masak my gift?
15:26 isBEKaml masak: s & f are so close. :P
15:26 masak isBEKaml: I kinda liked the article ;)
15:26 masak isBEKaml: sure, it wasn't a masterpiece, but...
15:29 isBEKaml masak: well, I kinda get irritated when everyone feels like they have their authority to write opinion pieces but end up with fluff. :)
15:30 isomorphisms joined #perl6
15:30 masak isBEKaml: Yeah, well, you know, that's just, like, your opinion, man.
15:30 masak ;)
15:31 isBEKaml o.O(where did that Lebowski come from? )
15:31 Targen joined #perl6
15:31 masak (apparently "The Big Lebowsky" turned 15 yesterday!)
15:31 masak that movie really tied the room together.
15:31 isBEKaml masak: that rug really tied the room together. I still don't know why I sat through that movie. :P
15:32 masak it's a hidden gem.
15:33 masak and probably an acquired taste, too.
15:33 isBEKaml milk dreams. :)
15:38 LlamaRider I am wondering if porting P5 to P6 regexps that are not my own wasn't a huge mistake... I can still stop and use the compatibility mode...
15:39 LlamaRider and it's hard to tell if I am improving them, since the new regexps are my own now, so clearly I understand them better
15:40 masak LlamaRider: you sound exactly like me back in 2005, porting my first CPAN module to p6.
15:41 LlamaRider masak: It's been THAT long?
15:41 masak en kol chadásh táchat hashámesh :)
15:42 masak heh, that phrase itself is thousands of years old... ;)
15:43 isBEKaml masak: millions :)
15:44 isBEKaml if you count the sun - he/she'd be weary by now. :)
15:44 isBEKaml masak: btw, was that hungarian or hebrew?
15:44 masak Hebrew, unfashionably rendered into Latin script.
15:44 masak no, the *phrase* isn't millions of years old.
15:45 isBEKaml masak: thought so, "hashamesh" didn't sound like hungarian, but google was confused between the two.
15:46 * geekosaur doesn't think he's seen accents used for stress in hebrew transliteration before...
15:47 masak it was from wiktionary.
15:47 isBEKaml masak: (I know this gets old...) are you reviving WTOP? :)
15:49 * isBEKaml should get to packaging an R* build for slackware. put on weekend task...
15:50 isBEKaml update parrot's and add rakudo too on SBo.
15:52 cognominal joined #perl6
15:54 masak isBEKaml: haven't thought about WTOP in a long time. I'm not sure it's so relevant any more.
15:55 masak isBEKaml: moritz has/had a project that got further, IIRC.
15:55 moritz perl6/wtop on github, iirc
15:56 isBEKaml I remember reading about it long time back and letting out an evil laugh. :)
15:56 masak moritz: nope.
15:57 moritz oh, moritz/perl6-wtop
15:57 isBEKaml r: sub circumfix:<begin end>($x) { say "$x - yay!"; }; begin"Hello"end;
15:57 p6eval rakudo 11157e: OUTPUT«Hello - yay!␤»
15:57 cognominal__ joined #perl6
15:57 isBEKaml masak: have you seen this? It blows up when you add a space.
15:57 isBEKaml r: sub circumfix:<begin end>($x) { say "$x - yay!"; }; begin "Hello" end;
15:57 p6eval rakudo 11157e: OUTPUT«[31m===[0mSORRY![31m===[0m�Two terms in a row�at /tmp/jMCPH4Pqm2:1�------> [32m$x) { say "$x - yay!"; }; begin "Hello" [33m�[31mend;[0m�    expecting any of:�        postfix�        infix or meta-infix�        infix stopper�        statement end�        sta…
15:58 moritz long known, afacit
15:58 isBEKaml moritz: it was a recent bug filed #116739
15:58 kivutar joined #perl6
15:59 moritz where "long" is O(weeks)
16:00 isBEKaml moritz: :D # telling on my disappearances.
16:01 isBEKaml moritz: Okay, how do I go about fixing this?
16:02 moritz isBEKaml: 1) find out why it's misparsing it 2) fix it
16:02 kresike bye folks
16:02 dalek nqp: cb38e50 | (Arne Skjærholt)++ | src/6model/reprs/VMArray.c:
16:02 dalek nqp: Clean up VMArray a bit.
16:02 dalek nqp: review: https://github.com/perl6/nqp/commit/cb38e5059b
16:02 moritz n: sub circumfix:<begin end>($x) { say "$x - yay!"; }; begin "Hello" end;
16:02 p6eval niecza v24-31-g7d73dd1: OUTPUT«Hello - yay!␤»
16:02 moritz isBEKaml: look at niecza for inspiration :-)
16:02 isBEKaml moritz: so nobody knows? :)
16:03 moritz isBEKaml: well, most bugs require some debugging before fixing them
16:03 isBEKaml moritz: I tried to do it the day I sent out that mail - but my give-up-threshold was quite low. :(
16:03 masak "I don't want to understand the problem, I just want to fix it!"
16:03 FROGGS[mobile] joined #perl6
16:04 TimToady .oO(cargo cult debugging...)
16:06 spider-mario joined #perl6
16:07 colomon cargo cult++
16:07 FROGGS[mobile] btw, callgrind is pretty cool
16:07 isBEKaml wait, what? we espouse blind coding? :P
16:07 arnsholt Callgrind is flat-out fantastic
16:07 hoelzro what's the proper way to have a "dummy" argument in Perl 6?
16:07 hoelzro in Haskell, one would use _
16:08 TimToady you mean a dummy formal parameter?
16:08 arnsholt std: sub($a, $, $b) { ... } # I think
16:08 p6eval std 692eb4f: OUTPUT«[31m===[0mSORRY!​[31m===[0m�Variable $a is not predeclared at /tmp/cTKArEMWWm line 1:�------> [32msub([33m�[31m$a, $, $b) { ... } # I think[0m�Unsupported use of $, variable; in Perl 6 please use .join() method at /tmp/cTKArEMWWm line 1:�------> [32msub($a, $…
16:08 TimToady we usually reserve "argument" for the real values coming it
16:08 TimToady *n
16:08 arnsholt std: sub foo($a, $, $b) { ... } # I think
16:08 p6eval std 692eb4f: OUTPUT«Potential difficulties:�  $b is declared but not used at /tmp/8TdFeKMWR4 line 1:�------> [32msub foo($a, $, [33m�[31m$b) { ... } # I think[0m�  $a is declared but not used at /tmp/8TdFeKMWR4 line 1:�------> [32msub foo([33m�[31m$a, $, $b) { ... } # I think[0m…
16:09 arnsholt Apparently not
16:09 hoelzro yes
16:09 TimToady std: sub foo ($, @, %) {...}
16:09 p6eval std 692eb4f: OUTPUT«ok 00:00 43m␤»
16:09 arnsholt Oh, right. Those were unused variable warnings, not errors
16:09 TimToady it's not complaining about the...yeah
16:09 arnsholt That settles it. Time for me to go home =)
16:09 arnsholt See you all later =)
16:09 * TimToady is already home, having just got out of bed...
16:09 hoelzro also, I can have proto method manage-window(Window $w, Str $class, Str $name) { * } and multi method manage-window(Window $w, 'Firefox', Str $name) { ... }
16:10 stevan_ joined #perl6
16:10 hoelzro how would I define the equivalent multi method for proto method manage-window(Window $w, Str :$class, Str :$name) { * }?
16:10 hoelzro there was a discussion in #perl on how no one writes window managers anymore, so I thought it might be a neat exercise =)
16:10 arnsholt multi method manage-window(:class<Firefox>) I think
16:10 arnsholt But, going home
16:11 arnsholt o/
16:12 TimToady o/
16:12 TimToady you'd need the $w arg too
16:12 TimToady since it's not optional in the prototype
16:12 moritz \o TimToady
16:13 * TimToady 's half brane that is awake waves back
16:13 TimToady the other side hit the snooze button
16:14 TimToady lesse, I waved with my left hand, so it must be my right brane that is awake
16:15 masak a yoga teacher I once had said that the half branes take turn being active in ~2 h periods during the day.
16:15 masak [citation needed]
16:15 TimToady was your yoga teach a porpoise?
16:16 TimToady *er
16:16 * masak .oO( a question entirely without porpoise )
16:17 hoelzro multi method manage-window(Window $w ( $class )) # this should automatically alias $class to $w.class, right?
16:17 hoelzro or am I doing it wrong?
16:17 masak TimToady: no. though he was a mammal.
16:17 TimToady was he finnish?
16:17 TimToady hoelzro: yer doin' in rwong
16:18 hoelzro I figured =(
16:18 TimToady multi method manage-window(Window $w, :class($class)) {...}   # belike
16:18 hoelzro I'm trying to accomplish what this example does: sub traverse ( BinTree $top ( $left, $right ) )
16:19 hoelzro I know I just switching the method signature, but I'm thinking that having $w and $class is redundant
16:19 TimToady multi method manage-window(Window $w, :$class) {...}   # shorter, same thing
16:19 hoelzro and I'd like to see if I can use the signature binding stuff to work against just a window argument
16:20 * TimToady doesn't know what's in $w
16:20 FROGGS[mobile] "uu"?
16:20 hoelzro so, I'm musing about a Perl 6 window manager
16:20 hoelzro I thought it would be cool to define the config file as a role that implements certain hooks
16:20 TimToady certainly if $w contains something that can look like a capture, then you can unpack it with a subsignature
16:21 hoelzro one of which would be manage-window
16:21 TimToady but then I wouldn't use that proto, if the :$class is redundant
16:21 hoelzro ok, lemme paste what I have
16:21 TimToady most protos these days just use (|) to allow anything
16:22 TimToady the BinTree works because something inside $bin is Positional
16:23 hoelzro https://gist.github.com/hoelzro/5109267
16:23 hoelzro o_O
16:23 hoelzro maybe that gist will clarify what I'm trying to do...
16:23 TimToady okay, then you want something more like (Window $w ( :$class ))
16:24 TimToady a method can be subsigged, but it takes a named parameter, not a positional like BinTree
16:24 stevan__ joined #perl6
16:24 hoelzro ahhhh
16:25 Targen joined #perl6
16:25 TimToady I don't think we've specced literals there in a named arg (probably oughta)
16:25 LlamaRider Does anyone have a quick idea of the P6 equivalent of the regexp  ['"]  (in P5) ?
16:25 TimToady so (Window $w ( :$class where 'Firefox' ) ) might be as close as you can get currently
16:25 hoelzro ok, that's good enough
16:25 TimToady LlamaRider: in general, just add <> around it
16:25 TimToady so <['"]>
16:26 LlamaRider thanks!
16:26 TimToady if it's complemented, you hav emore work
16:26 TimToady so [^'
16:26 TimToady [^'"] turns into <-['"]>
16:26 hoelzro TimToady: do I have to make Window 'also does Positional' for that binding to work?
16:26 gdey joined #perl6
16:26 TimToady no
16:26 TimToady not unless you are implementing Array semantics
16:26 hoelzro hmm
16:27 hoelzro this signature isn't cutting it: multi method manage-window(Window $w ( :$class )) {
16:27 TimToady maybe you've found a bug then
16:27 hoelzro =)
16:28 cognominal__ masak:  http://en.wikipedia.org/wiki/Nasal_cycle
16:29 masak cognominal__: yep. the nostrils were involved, too, I recall.
16:29 cognominal__ irrelevant to me due to my chronic rhinitis
16:30 masak :/
16:37 hoelzro whence comes perl6.c?
16:37 hoelzro is it part of the PIR -> exe?
16:37 TimToady looks to me like it's not successfully converting a Window to a Capture so it can bind the subsig
16:39 Gwyxx joined #perl6
16:39 TimToady either that, or something is busted in the subsig end of it; if I force the second sig to not match by adding a param, I get:
16:39 TimToady Cannot call 'manage-window'; none of these signatures match:
16:39 TimToady :(WindowManager : Window $w :(:class(:$class)), Mu *%_)
16:39 TimToady :(WindowManager : Window $w, Int , Mu *%_)
16:39 TimToady that subsig looks a little odd
16:40 TimToady btw, with that same code, niecza reports "Unable to resolve method Capture in type Window"
16:41 hoelzro interesting
16:43 TimToady huh, if I bind the subsig as |subsig and print it out, it gives:
16:43 TimToady Capture.new( list => ().list, hash => EnumMap.new("name", "Firefox", "class", "Firefox", ))
16:43 TimToady which seems about right
16:44 not_gerd joined #perl6
16:44 not_gerd hoelzro: try multi method manage-window(Window $w ( :$class where 'Firefox', *% ))
16:44 TimToady that doesn't work either here
16:44 hoelzro not_gerd: that did it!
16:45 hoelzro I wish that were implied
16:45 not_gerd it's implied in the top signature, but not in sub sigs
16:45 hoelzro hmm
16:45 hoelzro why not? =)
16:46 not_gerd no idea
16:46 not_gerd you end up writing things like ( $ (:$foo!, *%), *% where !*)
16:47 LlamaRider Ok, now I need to port (?!\d) to P6. That's a negative zero-width lookahead. Is that to become  <?!before \d>    ?
16:47 hoelzro I wish *% were implied for sub signatures
16:48 hoelzro I have a feeling you can make it be implied, though =)
16:48 hoelzro (at least for a subset of methods)
16:48 Targen joined #perl6
16:49 FROGGS[mobile] LlamaRider: <!before \d>
16:50 LlamaRider Hm... both <?!before \d> and <!before \d> work
16:50 TimToady got it; it wants :$name too
16:50 TimToady multi method manage-window(Window $w ( :$class where 'Firefox', :$name ) )
16:50 hoelzro ah
16:50 TimToady or a *% inside the ()
16:50 hoelzro so you *must* capture all of the fields
16:51 not_gerd hoelzro: in sub-sigs, yes
16:51 TimToady it doesn't automatically add the *% like it does at the top level
16:51 hoelzro damn
16:51 hoelzro next step: figure out how to make Perl 6 add *%
16:51 hoelzro ;)
16:52 gdey joined #perl6
16:52 not_gerd does (Window $w (:$class where 'Firefox', |) work as well?
16:53 not_gerd saves a char ;)
16:53 TimToady yes
16:54 TimToady so does making $!name private :)
16:54 LlamaRider Is there a simple difference between <?before> , <!before> and <?!before> ? I am reading S05 but I need to stare at it some more.
16:54 TimToady | also has the advantage of maybe doing less owrk
16:55 TimToady work, even
16:55 TimToady ? contributes to (and terminates) LTM
16:55 TimToady ! is transparent to LTM
16:56 TimToady so !! is like ? but transparent
16:56 skids joined #perl6
16:56 * TimToady hasn't seen ?! in real life
16:56 * TimToady doesn't see it in S05 either
16:57 LlamaRider ?! was a fruit of rewriting (?!\d) into something that still has ?! -- but it seems to behave just like <!before> although I don't have enough tests to claim that
16:57 FROGGS[mobile] write it down then :o)
16:57 TimToady sure, the ? is a no-op in that case
16:57 TimToady except for maybe terminating LTM
16:58 TimToady oh wait, you're meaning (?! from p5
16:58 TimToady duh
16:58 TimToady that's just <!before...>, yeah
16:59 LlamaRider I think I understood enough of that to be useful :> thanks.
16:59 TimToady in general the ? of (?...) goes away
16:59 TimToady it's just the p5 equivalent of the extensible <...> p6 syntax
16:59 SunilJoshi joined #perl6
16:59 * TimToady needs more coffee...
17:00 stevan_ joined #perl6
17:01 TimToady either that, or breakfast, so I stop believing impossible things...
17:06 TimToady I think a good case can be made for always compiling in an implicit *% into a subsig match
17:07 TimToady otherwise you code becomes extremely prejudiced against derived classes that add members
17:08 * not_gerd agrees
17:08 not_gerd but I'd also like to see a shortcut for *% where !*
17:08 not_gerd sometimes, I *don't* want the implicit *%
17:09 TimToady I can see that; not sure what to do about it though, offhand
17:12 LlamaRider Another gotcha for porting regexps is to -1 on each $1,$2 variable... hadn't noticed it until now.
17:12 TimToady std: $1;
17:12 p6eval std 692eb4f: OUTPUT«ok 00:00 41m␤»
17:13 Chillance joined #perl6
17:13 TimToady std: /()$1/
17:13 p6eval std 692eb4f: OUTPUT«[31m===[0mSORRY![31m===[0m�Null pattern not allowed at /tmp/sYfm_b5Sg5 line 1:�------> [32m/([33m�[31m)$1/[0m�    expecting any of:�        regex atom�     statement end�  statement list�Parse failed�FAILED 00:00 41m�»
17:13 TimToady std: /(x)$1/
17:13 FROGGS[mobile] LlamaRider: right
17:13 p6eval std 692eb4f: OUTPUT«ok 00:00 43m␤»
17:13 FROGGS[mobile] hmmm, this could warn
17:14 SmokeMachine joined #perl6
17:14 TimToady it's a bit hard, since, /(x)(y)$1/ i sfine
17:14 TimToady *is fine
17:15 lestrrat joined #perl6
17:15 FROGGS[mobile] well, you have to check how many () are there
17:15 TimToady should we spec a .permutations method to go with .combinations?
17:16 FROGGS[mobile] whats that?
17:16 colomon TimToady: +1
17:16 colomon TimToady: have you looked at List::Utils::combinations yet?
17:16 TimToady nope
17:16 TimToady feel free to look at it for me :)
17:17 * TimToady is still backlogging, y'see
17:17 TimToady (and not succeeding :)
17:18 * TimToady already distracted himself with the backlog on RC...where he noticed 'permutations'
17:20 * not_gerd ponders allowing prefix ? and ! on parameters as shorthand for `where ?*`/`where !*`
17:20 not_gerd probably too confusing
17:21 colomon TimToady: err, I sort of wrote it, so my looking at it would not be particularly helpful.  ;)
17:21 TimToady probably
17:21 TimToady colomon: :)
17:21 not_gerd .oO( !$:foo? )
17:22 TimToady or worse, !$!foo!
17:22 colomon TimToady: I believe it's to spec (except for being a sub rather than a method).  But I was hoping to get some feedback before I went and plopped it into a p6 compiler (or two?) and roast.
17:22 TimToady or worse, !:$!foo!
17:24 TimToady colomon: well, if you plop it first, you're probably a bit likelier to get feed back from #perl6 :P
17:24 not_gerd .oO( more bang for the buck )
17:24 colomon TimToady: you're probably right.
17:25 * TimToady is probably right by definition, probably...
17:25 pmurias joined #perl6
17:25 colomon TimToady: also my tests are probably too thorough for roast.  need more smarts to figure out how to quickly check for correctness.
17:25 TimToady well, better too many tests than too few...
17:26 colomon TimToady: Also the code is slow in some cases.  I got the appropriate Knuth after I wrote it, haven't had a chance to properly digest it.
17:26 colomon are you implying I can get the best feedback results if I insert it into both niecza and rakudo at the same time, forcing everyone to live with my implementation or find something better?
17:27 TimToady part of the reason for defining these as builtins is so that the appropriate Optimization Hammer can be whacked upon them
17:27 TimToady nr: say [1,2,3].combinations
17:27 p6eval rakudo 11157e: OUTPUT«No such method 'combinations' for invocant of type 'Array'␤  in block  at /tmp/MZpOHgl4Mt:1␤␤»
17:27 p6eval ..niecza v24-31-g7d73dd1: OUTPUT«Unhandled exception: Unable to resolve method combinations in type Array␤  at /tmp/_1ag_6Udd8 line 1 (mainline @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4284 (ANON @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4285 (module-CORE @ 581) ␤  â€¦
17:27 TimToady I don't see how it's any worse than the current situation :)
17:28 TimToady also, my motivation is to make RC entries look snazzier, so it doesn't really matter if they're fast, for that purpose :)
17:29 TimToady the whole P6 store right now is 'lovely programmer API, and maybe fast someday too!'
17:29 TimToady *story
17:29 LlamaRider r: my token foo { 'foo' } 'bar' ~~ /<-foo>/ ?? say "YES" !! say "NO" ;
17:29 p6eval rakudo 11157e: OUTPUT«[31m===[0mSORRY![31m===[0m�Two terms in a row�at /tmp/jmYsqOjxpR:1�------> [32mmy token foo { 'foo' } [33m�[31m'bar' ~~ /<-foo>/ ?? say "YES" !! say "N[0m�    expecting any of:�        scoped declarator�        new name to be defined�        single quotes� …
17:29 LlamaRider r: my token foo { 'foo' };  'bar' ~~ /<-foo>/ ?? say "YES" !! say "NO" ;
17:29 p6eval rakudo 11157e: OUTPUT«No such method 'foo' for invocant of type 'Cursor'␤  in regex  at /tmp/Eqse9bk6v5:1␤  in method ACCEPTS at src/gen/CORE.setting:10799␤  in block  at /tmp/Eqse9bk6v5:1␤␤»
17:30 LlamaRider I am not supposed to negate tokens?
17:30 TimToady r: my token foo { 'foo' } 'bar' ~~ /<-&foo>/ ?? say "YES" !! say "NO" ;
17:30 p6eval rakudo 11157e: OUTPUT«[31m===[0mSORRY![31m===[0m�Two terms in a row�at /tmp/zkaUOI_HWh:1�------> [32mmy token foo { 'foo' } [33m�[31m'bar' ~~ /<-&foo>/ ?? say "YES" !! say "[0m�    expecting any of:�        scoped declarator�        new name to be defined�        single quotes� …
17:30 TimToady r: my token foo { 'foo' }; 'bar' ~~ /<-&foo>/ ?? say "YES" !! say "NO" ;
17:30 p6eval rakudo 11157e: OUTPUT«[31m===[0mSORRY![3​1m===[0m�Unrecognized regex metacharacter < (must be quoted to match literally)�at /tmp/cicnoyugQV:1�------> [32mmy token foo { 'foo' }; 'bar' ~~ /<-[33m�[31m&foo>/ ?? say "YES" !! say "NO" ;[0m�Unrecognized regex metacharacter - (must be …
17:31 TimToady you might have to put it into a grammar to get it to recognize <-foo>
17:31 TimToady I don't think the <-...> syntax admits &foo currently
17:32 LlamaRider Ok, I will try with a grammar then. Would be cool if modules had implicit grammars in their namespace :)
17:32 TimToady r: my token foo { 'foo' }; 'bar' ~~ /<!&foo>./ ?? say "YES" !! say "NO" ;
17:32 p6eval rakudo 11157e: OUTPUT«YES␤»
17:32 TimToady that works though
17:32 LlamaRider o_O
17:32 TimToady well <-...> is equivalent to <!...> with a . after
17:32 n0den1te joined #perl6
17:33 TimToady match one char that is not ...
17:33 chonky joined #perl6
17:33 TimToady and <&foo> is how you call a token that is defined as a 'sub' rather than a method in a grammar
17:34 * LlamaRider just had an "aaahaaa" moment
17:34 LlamaRider cool!
17:34 LlamaRider I guess the next question is whether I should file a rakudobug, for <-foo>
17:35 TimToady <-foo> might work in a grammar
17:35 TimToady I wouldn't expect it to work where <foo> wouldn't work
17:35 TimToady which it shouldn't here
17:35 TimToady r: my token foo { 'foo' }; 'bar' ~~ /<foo>/ ?? say "YES" !! say "NO" ;
17:35 p6eval rakudo 11157e: OUTPUT«NO␤»
17:36 TimToady hmm
17:36 TimToady was expecting it to blow up
17:36 TimToady r: my token foo { 'foo' }; 'foo' ~~ /<foo>/ ?? say "YES" !! say "NO" ;
17:36 p6eval rakudo 11157e: OUTPUT«YES␤»
17:36 TimToady it's a bug that that works :)
17:36 LlamaRider :>
17:37 LlamaRider I thought the idea was that you can match against tokens wherever, not only in a grammar
17:37 n0den1te joined #perl6
17:37 TimToady n: my token foo { 'foo' }; 'foo' ~~ /<foo>/ ?? say "YES" !! say "NO" ;
17:37 p6eval niecza v24-31-g7d73dd1: OUTPUT«[31m===[0mSORRY![31​m===[0m��Ternary !! seems to be missing its ?? at /tmp/HteXRVM0Y8 line 1:�------> [32mfoo' }; 'foo' ~~ /<foo>/ ?? say "YES" !![33m�[31m say "NO" ;[0m��Parse failed��»
17:37 LlamaRider otherwise why would they be allowed to be declared outside of one?
17:38 thou joined #perl6
17:38 TimToady because maybe you want to define them as a sub and then poke them into a metaclass somewhere, I suppose
17:38 TimToady or you want to call them with <&foo> like a subroutine
17:38 Uakh_ joined #perl6
17:38 LlamaRider I see. I guess the <&foo> vs <foo> distinction isn't really implemented right now
17:38 Shozan joined #perl6
17:39 LlamaRider or at least not too strictly enforced
17:39 TimToady ooh, and rakudo seems to be botching the parse of ??!!
17:39 TimToady n: my token foo { 'foo' }; 'foo' ~~ /<foo>/ ?? say("YES") !! say("NO");
17:39 p6eval niecza v24-31-g7d73dd1: OUTPUT«YES␤»
17:40 TimToady say is a listop, so eats the !!
17:40 LlamaRider haha, so I took 2 bugs and made a feature :)))
17:40 SmokeMac_ joined #perl6
17:40 TimToady ??!! is not supposed to allow looser precedence ops inside, and say is looser on the right side
17:41 awwaiid joined #perl6
17:41 diakopte1 joined #perl6
17:41 TimToady nr: 42 ?? 43 or 44 !! 45
17:41 p6eval rakudo 11157e: OUTPUT«[31m===[0mSORRY![31m===[0m�Found ?? but no !!�at /tmp/EvLj7cv4Of:1�------> [32m42 ?? 43 [33m�[31mor 44 !! 45[0m�Confused�at /tmp/EvLj7cv4Of:1�------> [32m42 ?? 43 [33m�[31mor 44 !! 45[0m�    expecting any of:�        postfix�        infix or meta-infix�…
17:41 p6eval ..niecza v24-31-g7d73dd1: OUTPUT«[31m===[0mSORRY![31m​===[0m��Precedence of or is too loose to use between ?? and !!; please use parens around inner expression at /tmp/YBIMkqgvhT line 1:�------> [32m42 ?? 43 or[33m�[31m 44 !! 45[0m��Parse failed��»
17:43 TimToady r: my token foo { 'foo' }; 'foo' ~~ /<foo>/ ?? say("YES") !! say("NO");
17:43 p6eval rakudo 11157e: OUTPUT«YES␤»
17:43 TimToady nr: 'foo' ~~ /<foo>/ ?? say("YES") !! say("NO"); my token foo { 'foo' };
17:43 p6eval niecza v24-31-g7d73dd1: OUTPUT«Potential difficulties:�  &foo is declared but not used at /tmp/R045q8IClL line 1:�------> [32m? say("YES") !! say("NO"); my token foo [33m�[31m{ 'foo' };[0m��Unhandled exception: Unable to resolve method foo in type Cursor�  at /tmp/R045q8IClL line 1 …
17:43 p6eval ..rakudo 11157e: OUTPUT«No such method 'foo' for invocant of type 'Cursor'␤  in regex  at /tmp/qE3YLv6zqU:1␤  in method ACCEPTS at src/gen/CORE.setting:10799␤  in block  at /tmp/qE3YLv6zqU:1␤␤»
17:44 TimToady maybe we changed how that worked; brane fuzzy
17:44 * TimToady checks the spec
17:47 TimToady yes, S05:1476 gives preference to the lexically scoped name
17:47 TimToady in that case, it's a bug that <-foo> doesn't work
17:48 TimToady r: my token foo { 'foo' }; say 'bar' ~~ /<foo>/ ?? "YES" !! "NO" ;
17:48 p6eval rakudo 11157e: OUTPUT«NO␤»
17:48 TimToady r: my token foo { 'foo' }; say 'bar' ~~ /<-foo>/ ?? "YES" !! "NO" ;
17:48 p6eval rakudo 11157e: OUTPUT«No such method 'foo' for invocant of type 'Cursor'␤  in regex  at /tmp/UeQxU9CDCL:1␤  in method ACCEPTS at src/gen/CORE.setting:10799␤  in block  at /tmp/UeQxU9CDCL:1␤␤»
17:48 TimToady n: my token foo { 'foo' }; say 'bar' ~~ /<-foo>/ ?? "YES" !! "NO" ;
17:48 p6eval niecza v24-31-g7d73dd1: OUTPUT«Potential difficulties:�  &foo is declared but not used at /tmp/thi3DlXG1d line 1:�------> [32mmy token foo [33m�[31m{ 'foo' }; say 'bar' ~~ /<-foo>/ ?? "YES[0m��Unhandled exception: Unable to resolve method foo in type Cursor�  at /tmp/thi3DlXG1d line…
17:48 TimToady yeah, I'd call that a buglet in both n and r
17:49 TimToady nr: my token foo { 'foo' }; say 'bar' ~~ /<!foo>./ ?? "YES" !! "NO" ;
17:49 p6eval rakudo 11157e, niecza v24-31-g7d73dd1: OUTPUT«YES␤»
17:49 TimToady ? and ! are defined recursively back to <assertion>, but + and - apparently are not
17:50 TimToady nr: my token foo { 'foo' }; say 'bar' ~~ /<+foo>/ ?? "YES" !! "NO" ;
17:50 p6eval niecza v24-31-g7d73dd1: OUTPUT«Potential difficulties:�  &foo is declared but not used at /tmp/mW5IPVYsCe line 1:�------> [32mmy token foo [33m�[31m{ 'foo' }; say 'bar' ~~ /<+foo>/ ?? "YES[0m��Unhandled exception: Unable to resolve method foo in type Cursor�  at /tmp/mW5IPVYsCe line…
17:50 p6eval ..rakudo 11157e: OUTPUT«No such method 'foo' for invocant of type 'Cursor'␤  in regex  at /tmp/s5BgtWuOWS:1␤  in method ACCEPTS at src/gen/CORE.setting:10799␤  in block  at /tmp/s5BgtWuOWS:1␤␤»
17:50 PacoAir joined #perl6
17:50 TimToady they can't be recursively defined, since they have different terminators
17:51 TimToady but foo should act more like it does for a bare <foo>
17:51 sergot joined #perl6
17:51 mattp_ joined #perl6
17:51 TimToady especially since <-&foo> doesn't parse currently
17:53 [Coke] Speaking of different terminators, we'll be getting another one with arnold, I think. ;)
17:53 TimToady he said he'd be back
17:53 FROGGS[mobile] hehe
18:04 not_gerd is `?$!list || ?$!hash` the right thing to do in Rakudo's setting?
18:04 not_gerd should I write that as `$!list || $!hash ?? True !! False`
18:06 LlamaRider ok, I have a P6 port of Lingua::EN::Sentence with 1 almost-working test case :>
18:06 LlamaRider \o/
18:06 LlamaRider not something anyone terribly needs, but it was a very nice warm-up module.
18:09 LlamaRider off to $dayjob, thanks for all the support
18:10 * not_gerd https://github.com/rakudo/rakudo/pull/110 courtesy of the guthub web interface
18:12 wk joined #perl6
18:12 nwc10 jnthn: NQP-JVM still works (apart from the ICU test under parrot) on "my" machine at nqp HEAD (cb38e5059b9e2dba75b49ef23f5351857bcd53fe)
18:15 cognominal joined #perl6
18:17 lichtkind__ joined #perl6
18:19 pmichaud (lexical scope regexes)    we never actually resolved that issue, iirc.
18:19 pmichaud I'll recheck the spec, though.
18:23 pmichaud last I heard there was speculation of a braid for grammars, and that "my token ..." would derive a new grammar containing the lexically scoped token declarations... or something like that.
18:24 pmichaud as written, S05 would mean that:   my token foo { ... };   grammar G { token foo { ... };   token bar { <foo> } };   would have bar prefer the lexically-scoped rule to the one inside the grammar.
18:27 pmichaud TimToady: ^^^
18:27 PacoAir joined #perl6
18:28 FROGGS[mobile] joined #perl6
18:31 TimToady pmichaud: in such a case you'd have to use <.foo> to disambiguate, I suppose
18:31 pmichaud or  <foo=.foo> to do a capture?
18:32 TimToady yes, but it feels a lot like a DIHWIDT to me
18:32 TimToady one is supposed to have a certain amount of control over one's lexical environment :)
18:33 TimToady I suppose it could be argued that people will write crap like this and then expect it to read their minds...
18:33 diakopter nqp: sub fib($n) { $n < 2 ?? $n !! fib($n-1) + fib($n - 2) }; my $N := 29; my $t0 := nqp::time_n(); my $z := fib($N); my $t1 := nqp::time_n(); nqp::say("fib($N) = " ~ fib($N)); nqp::say("time    = " ~ ($t1-$t0));
18:33 p6eval nqp: OUTPUT«fib(29) = 514229␤time    = 2.62717294692993␤»
18:33 diakopter nqp-jvm: sub fib($n) { $n < 2 ?? $n !! fib($n-1) + fib($n - 2) }; my $N := 29; my $t0 := nqp::time_n(); my $z := fib($N); my $t1 := nqp::time_n(); nqp::say("fib($N) = " ~ fib($N)); nqp::say("time    = " ~ ($t1-$t0));
18:33 p6eval nqp-jvm: OUTPUT«fib(29) = 514229␤time    = 0.7400000095367432␤»
18:34 pmichaud I wonder if there's any surprise coming from importing a token declaration into the lexical scope and having subrules change as a result.
18:34 pmichaud again, might be DIHWIDT for that too
18:35 TimToady well, exporting a token is probably right up there with moving your arm the wrong way
18:36 pmichaud any lexical sub in scope, or just those explicitly declared regex/token/rule?
18:36 TimToady at least importing a token into a grammar won't leak into the grammar's methods
18:36 TimToady so people won't be tempted to use importation over derivation etc
18:36 TimToady or delegation
18:37 TimToady well, it won't work if the signature is wrong in any case
18:37 TimToady so I'm inclined to say it's by name, not by ruleness
18:37 pmichaud my sub alpha() { ... };   grammar XYZ { token foo { <alpha> } };
18:37 TimToady kaboom, presumably
18:38 pmichaud that simplifies things a bit on the implementation side, then.
18:39 TimToady nr: my sub alpha() { ... }; grammar XYZ { token TOP { <alpha> } }; XYZ.parse("abc").perl.say
18:39 p6eval niecza v24-31-g7d73dd1: OUTPUT«Potential difficulties:�  &alpha is declared but not used at /tmp/tTQVzuhPQC line 1:�------> [32mmy sub alpha[33m�[31m() { ... }; grammar XYZ { token TOP { <a[0m��Match�»
18:39 p6eval ..rakudo 11157e: OUTPUT«Match.new(orig => "abc", from => 0, to => 1, ast => Any, list => ().list, hash => EnumMap.new("alpha", Match.new(orig => "abc", from => 0, to => 1, ast => Any, list => ().list, hash => EnumMap.new()), ))␤»
18:39 pmichaud at the moment rakudo doesn't make any attempt to connect <alpha> to &alpha, iirc.
18:40 TimToady nr: my token alpha() { ... }; grammar XYZ { token TOP { <alpha> } }; XYZ.parse("abc").perl.say
18:40 p6eval niecza v24-31-g7d73dd1: OUTPUT«#<match from(0) to(3) text(abc) pos([].list) named({"alpha" => #<match from(0) to(3) text(abc) pos([].list) named({}.hash)>}.hash)>␤»
18:40 p6eval ..rakudo 11157e: OUTPUT«Match.new(orig => "abc", from => 0, to => 3, ast => Any, list => ().list, hash => EnumMap.new("alpha", Match.new(orig => "abc", from => 0, to => 3, ast => Any, list => ().list, hash => EnumMap.new()), ))␤»
18:40 TimToady nr: my token foo() { ... }; grammar XYZ { token TOP { <foo> } }; XYZ.parse("abc").perl.say
18:40 p6eval niecza v24-31-g7d73dd1: OUTPUT«#<match from(0) to(3) text(abc) pos([].list) named({"foo" => #<match from(0) to(3) text(abc) pos([].list) named({}.hash)>}.hash)>␤»
18:40 p6eval ..rakudo 11157e: OUTPUT«Match.new(orig => "abc", from => 0, to => 3, ast => Any, list => ().list, hash => EnumMap.new("foo", Match.new(orig => "abc", from => 0, to => 3, ast => Any, list => ().list, hash => EnumMap.new()), ))␤»
18:40 pmichaud oh, perhaps I'm wrong then :)
18:40 TimToady nr: my token foo() { ... }; /<foo>/
18:40 p6eval rakudo 11157e, niecza v24-31-g7d73dd1:  ( no output )
18:41 TimToady nr: my sub foo() { ... }; /<foo>/
18:41 p6eval niecza v24-31-g7d73dd1: OUTPUT«Potential difficulties:�  &foo is declared but not used at /tmp/DjZQuyjoha line 1:�------> [32mmy sub foo[33m�[31m() { ... }; /<foo>/[0m��»
18:41 p6eval ..rakudo 11157e:  ( no output )
18:41 TimToady nr: my sub foo() { ... }; say 'abc' ~~ /<foo>/
18:41 p6eval rakudo 11157e: OUTPUT«No such method 'foo' for invocant of type 'Cursor'␤  in regex  at /tmp/2tra_028r7:1␤  in method ACCEPTS at src/gen/CORE.setting:10799␤  in block  at /tmp/2tra_028r7:1␤␤»
18:41 p6eval ..niecza v24-31-g7d73dd1: OUTPUT«Potential difficulties:�  &foo is declared but not used at /tmp/z896n1uxkE line 1:�------> [32mmy sub foo[33m�[31m() { ... }; say 'abc' ~~ /<foo>/[0m��Unhandled exception: Unable to resolve method foo in type Cursor�  at /tmp/z896n1uxkE line 1 (ANON @ …
18:41 TimToady it does there
18:42 TimToady oh wait
18:42 pmichaud no, it's doing it for the grammar but not for the bare regex
18:42 TimToady nr: my token foo() { ... }; say 'abc' ~~ /<foo>/
18:42 p6eval rakudo 11157e, niecza v24-31-g7d73dd1: OUTPUT«「abc」␤ foo => 「abc」␤␤»
18:42 pmichaud oh, hmm.
18:43 TimToady nr: my token foo() { xxx }; say 'abc' ~~ /<foo>/
18:43 p6eval rakudo 11157e, niecza v24-31-g7d73dd1: OUTPUT«#<failed match>␤»
18:43 pmichaud okay, someone must've added that mapping in while I wasn't looking :)
18:43 TimToady nr: my token foo() { xxx }; grammar XYZ { token TOP { <foo> } }; XYZ.parse("abc").perl.say
18:43 p6eval rakudo 11157e: OUTPUT«Match.new(orig => "abc", from => 0, to => -3, ast => Any, list => ().list, hash => EnumMap.new())␤»
18:43 p6eval ..niecza v24-31-g7d73dd1: OUTPUT«Match␤»
18:43 pmichaud ummmmmmmmmmm
18:44 pmichaud I have no clue what's going on, then.
18:44 TimToady it did call the lexical there
18:44 TimToady which is why it didn't match
18:44 pmichaud oh
18:44 pmichaud it returned a failed Match object.  got it.
18:45 pmichaud I'm used to seeing #<failed match>  for some reason.
18:45 TimToady yes, and that's why we're changing it to return Nil instead of Match
18:45 pmichaud okay, I'm just behind on current implementation status, then.  Not too surprising.
18:46 TimToady no problem, I was behind on spec status earlier today, and I *wrote* it
18:46 pmichaud I agree that <-foo> is a buglet, then.
18:46 pmichaud is   <.foo> always the method form?
18:47 TimToady yes, so maybe <-.foo> should also be allowed
18:47 pmichaud what's the non-capturing form of the lexical regex, then?
18:47 TimToady along with <-&foo>
18:47 pmichaud is it   <&foo> ?
18:48 TimToady yes
18:48 pmichaud <.foo>   # always method call
18:48 TimToady nodnod
18:48 pmichaud I should write up a table
18:48 pmichaud writing.
18:49 TimToady yes, just rewrite the rest of S05 while you're there, if you don't mind :)
18:50 * TimToady suspects pmichaud++ won't mind me at all :)
18:50 pmichaud https://gist.github.com/pmichaud/5110668   # first start
18:51 * colomon meant to write another blog post on parse, match, etc, but didn't get it done this morning, and is now engaged in a discussion of the finer points of the Battle of Hoth with a 4-year-old
18:51 diakopter Han shot first
18:52 colomon not in the Battle of Hoth!
18:53 TimToady He certainly shot first in the Raiders of the Lost Ark, where he was playing Harrison Ford
18:53 pmichaud no, I don't plan to rewrite the rest of S05.  I'm still on the hook for S07.
18:56 colomon pmichaud: back above, it would have returned failed match, but there was a .perl in there.
18:56 pmichaud colomon: thanks
18:56 pmichaud colomon++
18:56 pmichaud I'm definitely way behind on some of the spec changes.  Of course, that's always been true, but it's moreso than usual for me these days.
18:56 pmichaud I'm still hoping for a tuit supply in the relatively near future
18:57 colomon rn: say "hello" ~~ /a/
18:57 p6eval rakudo 11157e, niecza v24-31-g7d73dd1: OUTPUT«#<failed match>␤»
18:57 colomon rn: say ("hello" ~~ /a/).perl
18:57 p6eval rakudo 11157e: OUTPUT«Match.new(orig => "hello", from => 5, to => -3, ast => Any, list => ().list, hash => EnumMap.new())␤»
18:57 p6eval ..niecza v24-31-g7d73dd1: OUTPUT«Match␤»
18:58 pmichaud maybe Match.perl should be adjusted there :)
18:59 pmichaud time for me to depart again... bbl
18:59 TimToady o/
19:00 LlamaRider joined #perl6
19:02 arnsholt masak: You around?
19:05 masak arnsholt: yesish.
19:07 masak arnsholt: how may I serve you?
19:08 arnsholt Just a tiny Esperanto question =)
19:08 arnsholt I'd like to put "eighth lecture" on the front of my lecture slides. Could you translate for me?
19:08 FROGGS[mobile] joined #perl6
19:09 masak arnsholt: "Oka prelego"
19:09 arnsholt Brilliant. Cheers!
19:09 arnsholt masak++ # .eo
19:10 masak arnsholt: ('ok'='eight', '-a' makes ordinals out of numerals, 'preleg-'='lecture', '-o'=noun ending)
19:11 arnsholt That makes sense (which is the point, I believe =)
19:11 masak Esperanto is occasionally non-insane ;)
19:11 arnsholt Can preleg be decomposed into pre-leg as well?
19:11 stevan_ joined #perl6
19:12 arnsholt (The Indo-Europeanist in me wants that to be the case)
19:12 fgomez joined #perl6
19:13 masak not intrinsically, no. 'preleg-' is the root.
19:13 masak but 'legi' means 'to read', so clearly there's a relation, even though it's not through a prefix ;)
19:14 n0den1te arnsholt: there are eight *lectures* to go through? :)
19:15 n0den1te gah...
19:15 masak I'm not sure what 'pre-' would mean here if t'were a prefix.
19:15 masak isBEKaml: and not until the eighth do they get to Esperanto... :P
19:16 isBEKaml masak: It'd be pointless if they were never exposed to .eo. :P
19:17 masak speaking of points, what's with the '.' before 'eo'? it's not a TLD :P
19:18 isBEKaml masak: I'm lazy.
19:19 arnsholt isBEKaml: Well, I went through the first seven the seven previous fridays =)
19:19 arnsholt masak: Good point. Because reasons, I suppose =D
19:20 masak ;)
19:20 masak arnsholt: suddenly I want to see your lextures :D
19:20 * isBEKaml first seven seven previous... lextures. hmmmm
19:20 isBEKaml arnsholt: I had to read that several times to understand. :P
19:21 isBEKaml arnsholt: talk of lectures, what would I know? :)
19:23 arnsholt masak: The lectures themselves aren't taped, but the slides are on http://www.uio.no/studier/emner/matn​at/ifi/INF1820/v13/tid-og-sted.html =)
19:24 masak \o/
19:26 isBEKaml arnsholt: NLTK & python? nice.. :)
19:26 arnsholt Yeah, it's not too bad
19:27 arnsholt Although I ran into a pile of annoyances when I wanted to deal with Unicode text
19:27 isBEKaml arnsholt: are you stuck on python 2.x? I have heard those mentioned only on 2.x versions.
19:28 isBEKaml arnsholt: looks like python folks have cleaned up their act in py 3.x versions.
19:28 arnsholt My students are in their first-year and mostly very new to programming, so any additional hurdles to cope with are kind of significant
19:28 arnsholt Yeah, the University IT department hasn't moved over to Python 3, so none of that for me
19:29 fgomez joined #perl6
19:29 arnsholt Particularly annoying was \b in regexes applied to a Unicode string still having ASCII semantics
19:29 not_gerd TimToady: re signatures again, I can't really think of anything better besides using + and - as prefix instead of ? and !
19:29 not_gerd forcing exact signature matches then would look like (..., -|)
19:29 isBEKaml arnsholt: new to programming and NLTK already? do they have any prior background in linguistics or anything like that?
19:29 TimToady how 'bout :| for a grim face :)
19:30 arnsholt New to programming (one semester of Java is all we can count on) and completely new to linguistics for the most part
19:30 arnsholt Some students will have more experience with programming and/or linguistics, but for most of them we can't assume much
19:31 * isBEKaml imagines arnsholt running after kids...
19:32 arnsholt I must admit that when I talk about my students with my colleagues, I do occasionally refer to them as "the kids" =)
19:34 isBEKaml arnsholt: :) - that they are
19:34 arnsholt You teach as well?
19:36 isBEKaml I never taught.
19:37 TimToady isBEKaml: the begin/end thing is probably a difference in tie-breaking between two different rules that match an identifier at the same length
19:37 TimToady the tiebreaking is supposed to pick a literal 'begin' over a \w+ thing, but maybe that's busted in rakudo
19:38 dalek perl6-roast-data: 2858d28 | coke++ | / (4 files):
19:38 dalek perl6-roast-data: today (automated commit)
19:38 dalek perl6-roast-data: review: https://github.com/coke/perl6​-roast-data/commit/2858d28fa1
19:39 isBEKaml TimToady: I'll check, thanks.
19:39 [Coke] niecza ticked up another failure.
19:39 [Coke] rakudo clean, 4 days running.
19:40 isBEKaml [Coke]: do you run counts of how many days of 'cleanliness' we maintain? :P
19:44 arnsholt isBEKaml: It's interesting, but very challenging as well
19:45 isBEKaml arnsholt: NLTK or teaching?
19:45 arnsholt Especially introductory-level teaching I find is challenging in that you have to drop a lot of assumptions you can rely on when talking to more experienced people
19:46 arnsholt Teaching. I don't really use NLTK in my work =)
19:47 isBEKaml arnsholt: Ah, teaching is always hard. Though I never taught, I occasionally held one-to-one sessions and found myself wishing I can see how much stuff they understood so I can calibrate what I give them. :)
19:48 arnsholt Oh, definitely that!
19:48 arnsholt After a lecture, I really don't have any clue if they understood nothing at all or everything or something in between >.<
19:49 isBEKaml arnsholt: unfortunately, people are never straightforward with that stuff - so first attempts are always massive failures. :)
19:50 isBEKaml arnsholt: (even as I ask them "how much do you know/understand" - "I understand a fair bit" - "Vague")
19:51 arnsholt Yeah. And sometimes things need a bit of time to develop in your brain before you start to get it
19:51 arnsholt And lectures are a bit crap for instilling knowledge anyways...
19:52 isBEKaml arnsholt: knowledge is an intensely inward process - how would it help if you just watched a video and suddenly you're an expert? :P
19:54 colomon rn: say %*ENV.gist
19:54 p6eval rakudo 11157e: OUTPUT«("PERLBREW_VERSION" => "0.42", "MAIL" => "/var/mail/p6eval", "USER" => "p6eval", "SHLVL" => "1", "HOME" => "/home/p6eval", "OLDPWD" => "/home/p6eval", "PERLBREW_ROOT" => "/home/p6eval/perl5/perlbrew", "PERLBREW_MANPATH" => "/home/p6eval/perl5/perlbrew/perls/perl-5.…
19:54 p6eval ..niecza v24-31-g7d73dd1: OUTPUT«{"HOME" => "/home/p6eval", "LANG" => "en_US.UTF-8", "LD_LIBRARY_PATH" => "/usr/local/mono-2.10.1/lib", "LOGNAME" => "p6eval", "LS_COLORS" => "rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:s​o=01;35:do=01;35:bd=40;33;01:cd=40;33;01​:or=40;31;01:su=37;41:sg=30;43:ca=3…
19:54 colomon rn: say %*ENV.perl
19:55 p6eval rakudo 11157e: OUTPUT«("PERLBREW_VERSION" => "0.42", "MAIL" => "/var/mail/p6eval", "USER" => "p6eval", "SHLVL" => "1", "HOME" => "/home/p6eval", "OLDPWD" => "/home/p6eval", "PERLBREW_ROOT" => "/home/p6eval/perl5/perlbrew", "PERLBREW_MANPATH" => "/home/p6eval/perl5/perlbrew/perls/perl-5.…
19:55 p6eval ..niecza v24-31-g7d73dd1: OUTPUT«{"HOME" => "/home/p6eval", "LANG" => "en_US.UTF-8", "LD_LIBRARY_PATH" => "/usr/local/mono-2.10.1/lib", "LOGNAME" => "p6eval", "LS_COLORS" => "rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:s​o=01;35:do=01;35:bd=40;33;01:cd=40;33;01​:or=40;31;01:su=37;41:sg=30;43:ca=3…
19:55 masak wow, that was pretty noisy.
19:56 LlamaRider Hm, can I do cool things like add methods to default types, such as Str? I want to do $s.sentences just like $s.words
19:56 masak LlamaRider: 'augment class Str { method sentences { ... } }'
19:56 * jnthn home
19:56 masak jnthn! \o/
19:56 jnthn masak! \o/
19:57 jnthn Gee, it's a little windy here :)
19:58 masak here too.
19:58 masak LlamaRider: requires 'use MONKEY_PATCHING' first though. just so you know you're doing something bad.
19:59 isBEKaml what does this line mean:  <?[<]>  <quote_EXPR: ':q', ':w'>
19:59 isBEKaml what exactly does quote_EXPR stand for?
19:59 LlamaRider bad? But it's really cool! :> Also, how do I grab the actual string from within Str? Where can I expect the source of the Str class?
19:59 arnsholt jnthn: Given that VMArray supports native types, d'you think there's the potential for speed gains by using it in NQP/Rakudo?
19:59 LlamaRider inspect* not expect
20:00 jnthn arnsholt: Well, part of the goal of having it is to support native arrays... :)
20:00 jnthn isBEKaml: quote expression
20:00 jnthn isBEKaml: Rakudo doesn't use it, afaik, but NQP does.
20:00 isBEKaml jnthn: elaborate please? :)
20:00 masak LlamaRider: 'this'
20:00 isBEKaml jnthn: I'm actually looking at NQP.
20:01 moritz LlamaRider: nqp::unbox_s($StrObject) gives you the native string
20:01 masak (but why would you need that for .sentences ?)
20:01 arnsholt jnthn: Good point, good point =)
20:01 moritz LlamaRider: and the Str class is set up in src/Perl6/Metamodel/BOOTSTRAP.pm and in src/core/Str.pm
20:02 jnthn isBEKaml: Well, it's the thing that parses quotations.
20:02 arnsholt jnthn: Oh, and 'nother question: Do we need QRPA, once we have VMArray in place?
20:02 jnthn isBEKaml: 'foo', etc.
20:02 jnthn arnsholt: Once it's used widely enough, no
20:02 jnthn LlamaRider: Note that if you write such a method, the string itself is the invocant, that is, self.
20:03 isBEKaml jnthn: the ?< are regex lookaheads? and what do :q and :w play?
20:03 isBEKaml jnthn: where can I look these up/
20:03 isBEKaml (sorry, I'm asking too many questions today - 0130 hrs here :)
20:03 jnthn isBEKaml: HLL::Grammar implements these
20:03 jnthn src/HLL/Grammar.pm
20:03 LlamaRider jnthn: aha! 'self' worked, 'this' didn't
20:04 jnthn LlamaRider: this is not C#/Java ;)
20:04 LlamaRider jnthn: hey, it was masak's suggestion :)
20:04 jnthn oh! wat, masak? ;-)
20:04 LlamaRider also \o/ yay, I actually have a $s.sentences that works! awesome
20:04 arnsholt jnthn: Yeah, that's what I thought. Then I think I'll try to replace some uses of QRPA with VMArray in NQP to iron out most of the kinks in the implementation before I move on with using it in Rakudo =)
20:05 jnthn isBEKaml: The meanings of the letters are the same as in Perl 6 quotations.
20:05 jnthn isBEKaml: e.g. q:w
20:05 jnthn arnsholt: Well, thing is that we'll need an NQPArray type for that.
20:06 isBEKaml jnthn: great
20:06 jnthn arnsholt: Luckly, nqp-jvm has one, already :D
20:06 arnsholt Oh, great. Then I can steal that! =D
20:08 masak jnthn: this coder must be tired ;)
20:08 masak LlamaRider: sorry ;)
20:09 TimToady obviously you aren't selfish enough
20:09 LlamaRider masak: no worries, this is awesome :) my first test file works perfectly too. Who do I poke to ask for panda to index my module?
20:11 jnthn LlamaRider: There's a how to ecosystem page linekd from modules.perl6.org
20:12 gdey joined #perl6
20:12 dalek roast: 1816add | (Solomon Foster)++ | S02-magicals/env.t:
20:12 dalek roast: Change test to not rely on the direct form of the string generated by .gist or .perl.
20:12 dalek roast: review: https://github.com/perl6/roast/commit/1816add594
20:13 LlamaRider jnthn: step 6 in that guide is "ping someone on IRC"
20:13 tadzik LlamaRider: where's the META.info?
20:14 LlamaRider tadzik: sec, let me order things
20:23 * masak .oO( "waiter!" )
20:28 not_gerd bye, #perl6
20:28 not_gerd left #perl6
20:31 lue [backlogging] oh, so it's changed from use MONKEY_TYPING ?
20:32 dalek roast: 72aff83 | (Solomon Foster)++ | S05-substitution/subst.t:
20:32 dalek roast: Fudge for niecza.
20:32 dalek roast: review: https://github.com/perl6/roast/commit/72aff83564
20:33 masak lue: no, I got that wrong too.
20:33 masak it used to be 'MONKEY_PATCHING', before it was 'MONKEY_TYPING'.
20:34 lue r: use MONKEY_TYPING; supersede class Str { method foo() { 42; }; }; say Str.foo
20:34 p6eval rakudo 11157e: OUTPUT«[31m===[0mSORRY![31m===[0m�Cannot use 'supersede' with class declaration�at /tmp/oUau4JksmV:1�------> [32muse MONKEY_TYPING; supersede class Str [33m�[31m{ method foo() { 42; }; }; say Str.foo[0m�    expecting any of:�        scoped declarator�        gener…
20:36 lue I forgot if there was an explanation for why one can't supersede classes.
20:37 masak something to do with bounded serialization, I think.
20:39 LlamaRider masak: Can I sanely compare two arrays using Test? with is_deeply or something of the sort? I am getting a huge dump of the array and I would like to see a diff of only the elements that don't match up.
20:40 masak LlamaRider: is_deeply will just give you match/not match.
20:40 masak LlamaRider: if you want to diff, maybe create your own subroutine that creates the diff, and then test for an empty diff?
20:41 masak (using 'is', which will output expected/actual if it flunks)
20:41 LlamaRider masak: fair enough, I'll do that
20:42 isBEKaml g'night, #perl6
20:42 LlamaRider I remember there was a neat trick to simultaneously step through 2 arrays in Perl6. Could anyone remind me of it?
20:42 LlamaRider I think it was one of the combinators
20:42 cognominal joined #perl6
20:42 jnthn LlamaRider: zip
20:42 jnthn for @a Z @b -> $a, $b { }
20:43 LlamaRider jnthn: exactly! thanks for the reminder
20:47 census joined #perl6
20:58 thou joined #perl6
21:05 woolfy left #perl6
21:06 kst joined #perl6
21:06 bimbo_ joined #perl6
21:07 cognominal__ joined #perl6
21:14 moca joined #perl6
21:14 bruges_ joined #perl6
21:18 [Coke] phenny: tell isBEKaml that the data is there, and I'm half done with a script that will report "X days of rakudo hacking with no accidents"
21:22 colomon [Coke]: no errors testing niecza locally now, btw
21:29 [Coke] colomon - is that with a bunch of changes that weren't in by noon EST?
21:30 colomon with a few, anyway
21:30 [Coke] If not, we may have a mono version mismatch, or need an env var set...
21:31 [Coke] https://github.com/coke/perl6-roa​st-data/blob/master/bin/niecza.sh has my "get a fresh copy of niecza and test it" script.
21:31 census joined #perl6
21:31 colomon how many errors did you get?
21:32 [Coke] https://github.com/coke/perl6-roast-​data/blob/master/perl6_pass_rates#L3 - 155 errors.
21:32 [Coke] listed here: https://github.com/coke/perl6-roast-​data/blob/master/niecza_summary.out at the end.
21:34 japhb Two angles on the same question: 1) Is there an easy way to get a recursive dump of a Perl 6 object? (not .perl, an actual recursive dump of all attributes), or 2) how do you get the *value* of an attribute from an Attribute object gotten from $obj.^attributes ?
21:34 colomon [Coke]: oh, that's weird.
21:35 jnthn 2 - get_value method
21:36 colomon japhb: .perl should be an actual recursive dump...
21:36 LlamaRider tadzik: My META.info is at https://github.com/dginev/perl6-Ling​ua-EN-Sentence/blob/master/META.info
21:36 colomon [Coke]: S32-num/stringify.t has worked for days, so something is wrong here.
21:36 japhb jnthn, OOC, why .get_value rather than just .value?
21:37 jnthn japhb: Because there's a corresponding bind_value
21:37 [Coke] colomon: every day I blow away roast and niecza and check them both out fresh, so it should be a botched git pull/rebase.
21:37 [Coke] Can you try running the spec tests with the command I pointed at earlier? see if it fails when you do that way instead of "make spectest".
21:38 colomon maybe?
21:39 colomon https://github.com/sorear/niecza is getting me a "this tree took too long to generate" error on github
21:40 colomon yeah, something is hosed
21:40 colomon TimToady's got a commit on there (according to github) that I don't have on either of my machines.
21:40 colomon wait, maybe that's just a pull issue?
21:42 tadzik LlamaRider: looks good, adding
21:42 [Coke] 7d73dd1 ? that's my last commit in the roast-data checkout
21:42 * colomon is confused
21:42 japhb colomon, Mu.perl specifically skips private attributes, but I need to dump them.  Annoyingly, Mu.DUMP is just { self.perl }.  I'm thinking DUMP should show private attributes as well.
21:42 dalek ecosystem: c1f89c3 | tadzik++ | META.list:
21:42 dalek ecosystem: Add Lingua::EN::Sentence
21:42 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/c1f89c37db
21:43 tadzik LlamaRider++
21:43 tadzik LlamaRider: please remove backup files from the repo (Foo.pm6~)
21:46 LlamaRider tadzik: oops, sorry about that, they're gone now.
21:50 kst joined #perl6
21:51 tadzik awesome, thanks :)
21:53 colomon [Coke]: yeah, 7d73dd1,  Huh. I've downloaded it and am spectesting now.
21:55 colomon now I get the stringify failures.  TimToady, what have you done?!
21:56 masak this is why we can't have nice things!
21:56 colomon rn: say 179701029991443121041317982950960503973​1475627537851106401/1152921504606846976
21:56 p6eval rakudo 11157e: OUTPUT«15586579769168433608320620174​00788597510.05883495394563551060␤»
21:56 p6eval ..niecza v24-31-g7d73dd1: OUTPUT«155865797691684336083206201740​0788597510.058834953945635510598466400​011830046423710882663726806640625␤»
21:56 colomon that's the problem.  TimToady made it more precise in Niecza.
21:57 labster joined #perl6
22:02 japhb Is there any reason that MapIter has a single 'method DUMP()' instead of a 'multi method DUMP(MapIter:D:)' like the other listy types?
22:03 japhb And why do the listy types all have DUMP (multi-)methods that show hidden attributes, but Mu just falls to .perl?  Why not introspect and dump attributes in the same style as the listy types' DUMP methods do?
22:05 jnthn Is DUMP actually spec?
22:06 jnthn Or is it just there to help those of us working on Rakudo get a more guts-y view?
22:06 japhb Certainly feels like that functionality ought to be available; it's huge for debugging.
22:06 japhb You really want it for user-defined classes.
22:07 japhb (I actually looked for that functionality in Rakudo::Debugger, because I expected that of all things would be sure to have it, but if it was there, I didn't see it.)
22:09 jnthn You can certainly introspect attributes that are in scope, though
22:09 jnthn Even if they're private.
22:09 * masak is beginning to think that Perl 5 had it right, and private attributes are a kind of premature encapsulation
22:10 jnthn Lack of them removes confidene when it comes to refactoring.
22:10 jnthn Unless you're lucky enough to have a really good bunch of unit tests.
22:10 jnthn Which sure, folks like us tend to. But the world is a scary place.
22:11 jnthn I *like* languages where I can fearlessly refactor the insides of my class, renaming attributes as I desire.
22:12 japhb I don't mind private attributes (still kinda like them, actually, for reasons that include jnthn's), but I really want an easy way to show them when I need to ... which is to say, when debugging (whether with the interactive debugger, or well-placed logging, or what have you).
22:12 jnthn Or, more important, eliminating them for different data structures...
22:12 jnthn japhb: I agree the debugger should have the ability to do it for sure.
22:13 jnthn japhb: And we need something for those who don't like having an interactive debugger too
22:13 japhb right
22:13 jnthn I'm fine if you have to use a use statement to get it though...
22:13 jnthn .oO( MONEKY_SEE ;) )
22:13 jnthn *monkey
22:14 japhb And I think DUMP is a decent way to address that.  It just needs a couple tiny tweaks to DWIM.
22:14 jnthn nqp: say(1 +| 2)
22:14 p6eval nqp: OUTPUT«3␤»
22:15 japhb I'd accept having to MONKEY things to see the private attributes, especially if that's necessary for pessimizing optimizations that might alter or delete some private attributes.
22:17 japhb (I don't particularly *want* to have to say that, mind you, but I understand the possible need there.)
22:18 autark joined #perl6
22:19 japhb In the mean time, does anyone object if I make the 'multi method DUMP' fix to MapIter, and change 'multi method DUMP(Mu:D:)' to do the non-hiding version of the algorithm used in perl(), with the formatting that the listy types use?
22:20 japhb Also, did anyone work on a pretty-printing/indenting version of .perl?
22:22 jnthn japhb: I don't object but I think it's worth pondering the specness of it
22:23 japhb jnthn, you mean, whether it should be specced?  A quick 'git grep' showed it wasn't specced as such right now ....
22:23 jnthn japhb: yes, that.
22:26 japhb It kinda feels like it should be, but then perhaps more care needs to be taken about picking formatting rules that can apply to all implementations, as well as intentionally *not* specced bits that allow an implementation to e.g. DUMP VM-native data structures.
22:26 japhb (As how currently RPA is handled in a special way by 'sub DUMP(|)')
22:27 jnthn Well, .perl's exact format isn't spec'd
22:27 jnthn So there's certainly precedent for that part
22:28 japhb jnthn, I thought the spec for .perl basically came down to "evaluatable Perl code that will recreate (a clone of) the data structure, assuming all the .perl methods play nice"
22:29 japhb (That last bit being something that is proving more commonly absent than present.)
22:30 jnthn That's the goal. Thing with private attrs is that there ain't a way to set them from outside of the object short of .bindvalue
22:30 japhb nodnod
22:31 arlinius joined #perl6
22:31 sorear Data::Dumper in p5 handles circular data structures.  is anything like that planned for p6?
22:34 lestrrat joined #perl6
22:36 lestrrat joined #perl6
22:37 isomorphisms joined #perl6
22:43 LlamaRider tadzik: does panda have an "update" command? Or is running install again sufficient?
22:47 lestrrat joined #perl6
22:51 masak 'night, #perl6
22:51 colomon \O
22:51 * colomon has apparently developed a big head
22:59 dalek roast: 3f1b3ee | (Solomon Foster)++ | S32-num/stringify.t:
22:59 dalek roast: Tweak to follow latest change to spec.  (Grumble.)
22:59 dalek roast: review: https://github.com/perl6/roast/commit/3f1b3ee664
23:00 colomon TimToady++ # for changing Niecza along with the spec.
23:02 fgomez joined #perl6
23:02 Celelibi joined #perl6
23:06 sjohnson joined #perl6
23:29 yoleaux joined #perl6
23:35 dalek rakudo/md-nqp: e4cd4da | jnthn++ | src/Perl6/Metamodel/BOOTSTRAP.pm:
23:35 dalek rakudo/md-nqp: Start translating multi-dispatch to NQP.
23:35 dalek rakudo/md-nqp:
23:35 dalek rakudo/md-nqp: Add an NQP version of the candidate narrowness comparator function.
23:35 dalek rakudo/md-nqp: review: https://github.com/rakudo/rakudo/commit/e4cd4dac9a
23:35 dalek rakudo/md-nqp: 1018f7e | jnthn++ | src/Perl6/Metamodel/BOOTSTRAP.pm:
23:35 dalek rakudo/md-nqp: Port multi candidate sort algorithm to NQP.
23:35 dalek rakudo/md-nqp:
23:35 dalek rakudo/md-nqp: Not used yet.
23:35 dalek rakudo/md-nqp: review: https://github.com/rakudo/rakudo/commit/1018f7eb49
23:39 jnthn sleep &
23:43 LlamaRider joined #perl6
23:50 thou joined #perl6
23:59 Targen joined #perl6

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

Perl 6 | Reference Documentation | Rakudo