Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2013-03-27

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:01 cognominal joined #perl6
00:03 cognominal listening Pinker's talk... he is talking of subject and verb. I am hearing invocant and multimethods.
00:05 masak :)
00:17 cognominal joined #perl6
00:24 armitage81 joined #perl6
00:25 armitage81 joined #perl6
00:32 xinming_ joined #perl6
00:34 masak 'night, #perl6
01:00 anuby joined #perl6
01:03 rking joined #perl6
01:10 cognominal__ joined #perl6
01:15 tgt joined #perl6
01:17 Targen joined #perl6
01:19 hypolin joined #perl6
01:28 araujo joined #perl6
01:28 araujo joined #perl6
02:02 cognominal__ joined #perl6
02:15 djvijay joined #perl6
02:22 hoelzro jnthn: are you around? I have a quick question about NativeCall
02:30 cognominal joined #perl6
02:35 lustlife joined #perl6
02:35 * hoelzro needs to figure out how to make a copy of a char * in an OpaquePointer so he can free() it
02:38 dwoldrich joined #perl6
02:38 FROGGS_ joined #perl6
02:45 census joined #perl6
02:52 pecastro joined #perl6
03:04 orafu joined #perl6
03:17 preflex_ joined #perl6
03:29 arlinius joined #perl6
03:40 Targen joined #perl6
04:15 japhb r: say so nqp::iscont(0i); say so nqp::iscont(-0i); say so nqp::iscont(+0i);
04:15 p6eval rakudo b972ca: OUTPUT«True␤False␤False␤»
04:15 japhb Wait, what?
04:16 japhb Anyone have any ideas on this one? ^^
04:16 japhb FWIW, I expect nqp::iscont on any numeric constant to be false.
04:18 sorear hmm
04:19 sorear probably something in the implementation of postfix:<i> is causing it to return a container
04:19 sorear whereas prefix:<-> and prefix:<+> decontainerize anything passed to them
04:20 sorear r: say so nqp::iscont((-0)i)
04:20 p6eval rakudo b972ca: OUTPUT«True␤»
04:26 diakopter /msg japhb help.
04:26 diakopter /msg japhb help.
04:26 diakopter ergh.
04:26 diakopter .oO( try to hit backspace, hit space instead )
04:31 lustlife joined #perl6
04:36 japhb sorear, ah, good analysis, thank you.
05:07 kurahaupo joined #perl6
05:23 SamuraiJack joined #perl6
06:12 kaare_ joined #perl6
06:12 Heather joined #perl6
06:12 Heather good morning #perl6
06:12 Heather nqp --> /usr/include/parrot/5.1.0/parrot/parrot.h:94:19: fatal error: ffi.h: No such file or directory  ?
06:13 sorear good morning Heather
06:13 Heather blogged about perl6 :3
06:13 Heather cynede.net
06:13 sorear sounds like parrot.h *thinks* you have libffi installed
06:14 sorear i have no idea why, but you might be able to work around this by fixing reality to match parrot's preconceptions
06:15 Timbus i did that once. parrot compiles, but now i have crab hands??
06:15 sorear a blog that requires js. fun.
06:16 Heather crab hands?
06:16 Timbus literal crabs for hands. i hover them over the keyboard and they wiggle their tiny feet to kick all the correct keys
06:17 Heather sorear you must be happy it's not using silverlight :D
06:17 Heather o_O
06:18 diakopter Timbus: we're not sure over here whether you actually perceive your hands as crabs
06:19 Heather sorear but I've got libffi installed
06:21 diakopter .oO( Timbus' hand-free must be tired )
06:21 diakopter hand-feet
06:23 census joined #perl6
06:28 Heather ffi is in /usr/lib/libffi-3.0.13/include/ffi.h
06:47 * Heather is building git parrot
07:06 fgomez joined #perl6
07:07 sizz joined #perl6
07:24 wk joined #perl6
07:25 domidumont joined #perl6
07:51 ironcamel joined #perl6
07:55 domidumont joined #perl6
08:14 daxim joined #perl6
08:15 sunnavy joined #perl6
08:30 SamuraiJack_ joined #perl6
08:35 FROGGS joined #perl6
08:54 FROGGS hoelzro: you need to copy something within C or within Perl 6?
08:56 Heather I need parsing help I guess :)
09:04 gcole_ joined #perl6
09:07 Heather How to get run result?
09:09 Heather 2>&1 ?
09:09 gcole joined #perl6
09:11 Heather $*OUT ?
09:12 tadzik result of what?
09:12 Heather tadzik of shell execution (run)
09:12 tadzik qx//
09:13 Heather tadzik ah?
09:14 FROGGS r: say qx/hello/
09:14 p6eval rakudo b972ca: OUTPUT«qx, qqx is disallowed in restricted setting␤  in sub restricted at src/RESTRICTED.setting:2␤  in sub QX at src/RESTRICTED.setting:9␤  in block  at /tmp/FBjqUxouQd:1␤␤»
09:14 FROGGS perl6 -e 'say qx/hello/'
09:14 FROGGS /bin/sh: 1: hello: not found
09:16 Heather r: say qqx { say "qq" }
09:16 p6eval rakudo b972ca: OUTPUT«qx, qqx is disallowed in restricted setting␤  in sub restricted at src/RESTRICTED.setting:2␤  in sub QX at src/RESTRICTED.setting:9␤  in block  at /tmp/Ljtie6YVqQ:1␤␤»
09:16 Heather it works )
09:16 Heather thanks
09:19 sivoais joined #perl6
09:22 Heather how to split by new line )
09:22 Heather .split(\n) ?
09:22 FROGGS right
09:22 FROGGS err, .split("\n")
09:22 kresike joined #perl6
09:22 FROGGS or .split(/\n/)
09:22 kresike hello all you happy or unhappy perl6 people
09:23 Heather hey !
09:23 FROGGS hello all you kresike or not kresike :P
09:24 kresike FROGGS, o/ :P
09:24 Heather FROGGS how to edit and concat what I splitted again ? )
09:26 FROGGS r: my @parts = "first\nsecond\nthird".split("\n"); @parts[1] = "huh?"; say @parts.join("\n")
09:26 p6eval rakudo b972ca: OUTPUT«first␤huh?␤third␤»
09:26 Heather FROGGS maybe less verbose ?
09:27 Heather FROGGS with edit I need add = to all
09:27 FROGGS Heather: what exactly do you wanna change?
09:27 FROGGS ... within the original string
09:28 Heather your example is fine but I need "map" all with cnage $m to "=$m"
09:28 Heather is there some kind of .map ?
09:28 FROGGS ohh yes
09:28 sivoais joined #perl6
09:29 FROGGS yo you want to prepend '=' to all substrings?
09:29 Heather r: my @parts = "first\nsecond\nthird".split("\n").map($m -> "=$m").join("\n"); say @parts
09:29 p6eval rakudo b972ca: OUTPUT«[31m===[0mSORRY![31m===[0m�Variable '$m' is not declared�at /tmp/tjKNGR2JVv:1�------> [32mfirst\nsecond\nthird".split("\n").map($m[33m�[31m -> "=$m").join("\n"); say @parts[0m�    expecting any of:�        postfix�»
09:29 Heather FROGGS yes
09:29 FROGGS Heather: you can't just invent a variable $m out of thin air
09:30 Heather so how map works ? :)
09:30 FROGGS r: my @parts = "first\nsecond\nthird".split("\n").map("=$_").join("\n"); say @parts
09:30 p6eval rakudo b972ca: OUTPUT«use of uninitialized value of type Any in string context  in block  at /tmp/gxkeWFTo4y:1␤␤No such method 'count' for invocant of type 'Str'␤  in method reify at src/gen/CORE.setting:5609␤  in method reify at src/gen/CORE.setting:5532␤  in method reify at src/gen/CO…
09:30 FROGGS r: my @parts = "first\nsecond\nthird".split("\n").map({"=$_"}).join("\n"); say @parts
09:30 p6eval rakudo b972ca: OUTPUT«=first␤=second␤=third␤»
09:30 Heather aha
09:30 Heather cool
09:30 Heather thank you
09:30 FROGGS there you go
09:30 FROGGS np
09:31 FROGGS masak: I guess that's an LTA error msg?
09:33 Heather FROGGS also I need to cut of last element, it's empty string...
09:34 Heather .drop[-1] ? )
09:34 FROGGS no, better do:
09:35 FROGGS r: my @parts = "first\nsecond\nthird".split("\n").map({ $_ ?? "=$_" !! () }).join("\n"); say @parts
09:35 p6eval rakudo b972ca: OUTPUT«=first␤=second␤=third␤»
09:35 FROGGS this will filter all empty elements, even if they are in between
09:35 Heather hm...
09:36 Heather FROGGS yes, it works, cool
09:38 sivoais joined #perl6
09:43 dakkar joined #perl6
09:45 Heather FROGGS I also need remove all the ' synbols :D
09:45 Heather e.g. in begin and end...
09:46 Heather I don't understand where is it added
09:48 FROGGS r: say "'abc'".subst("'", '', :g)
09:48 p6eval rakudo b972ca: OUTPUT«abc␤»
09:48 sivoais joined #perl6
09:48 FROGGS Heather: you can call that (the .subst...) on the "=$_" within the .map
09:48 FROGGS or you do that after the last join
09:48 FROGGS or before split
09:48 FROGGS :o)
09:51 Heather .substr("'","") ?
09:51 FROGGS no, subst
09:51 FROGGS like substitution
09:52 FROGGS method subst( <search patter>, <replacement>, <options> )
09:53 fhelmberger joined #perl6
09:53 Heather doesn't work...
09:53 FROGGS you should add the option :g to replace all occourences, not just the first one found
09:53 FROGGS well, I'm bad at guessing, can't you paste an example?
09:53 Heather same
09:54 Heather ok
09:54 Heather FROGGS https://gist.github.com/Heather/5253103
09:55 Heather FROGGS it adds ' ' to my final string
09:55 Heather I don't understand why
09:55 FROGGS hmmmm
09:56 FROGGS maybe we have to do something else within the map to ignore an element...
09:56 FROGGS r: my @parts = "first\nsecond\nthird\n".split("\n").map({ $_ ?? "=$_" !! () }).join("\n"); say @parts
09:56 p6eval rakudo b972ca: OUTPUT«=first␤=second␤=third␤»
09:57 FROGGS r: my @parts = "first\nsecond\nthird\n".split("\n").map({ $_ ?? "=$_" !! () }).join("#"); say @parts
09:57 p6eval rakudo b972ca: OUTPUT«=first#=second#=third␤»
09:57 FROGGS r: my @parts = "'first\nsecond\nthird\n'".subst("'",'',:g).split("\n").map({ $_ ?? "=$_" !! () }).join("#"); say @parts
09:57 p6eval rakudo b972ca: OUTPUT«=first#=second#=third␤»
09:57 FROGGS I'd say it works well
09:58 sivoais joined #perl6
09:59 Heather FROGGS well it still wants ' '
10:01 Heather or not...
10:01 Heather wiat
10:05 Heather FROGGS I can't understand where ' comes from
10:06 Heather r: say <a b>
10:06 p6eval rakudo b972ca: OUTPUT«a b␤»
10:06 Heather r: say ('a','b')
10:06 p6eval rakudo b972ca: OUTPUT«a b␤»
10:07 sivoais joined #perl6
10:08 Heather if I just use say there is no ' '
10:08 Heather but with run ...
10:09 Heather FROGGS seems like run adds ' ' to it o_O
10:11 Heather why ?
10:15 Heather r: run <ls>
10:15 p6eval rakudo b972ca: OUTPUT«run is disallowed in restricted setting␤  in sub restricted at src/RESTRICTED.setting:2␤  in sub run at src/RESTRICTED.setting:8␤  in block  at /tmp/eCT4nFUHUr:1␤␤»
10:16 Heather seems like bash runs 'ls' as ls..
10:16 Heather maybe in run ' ' is default ...
10:17 sivoais joined #perl6
10:21 sqirrel joined #perl6
10:22 masak top o' the morning to you, #perl6
10:23 masak Heather: I liked your blog post: http://heather.cynede.net/2013/03/perl-6.html -- Heather++
10:24 masak the only thing I reacted to was -- just at the beginning -- "Why the hell you need readable script?"
10:24 masak I tend to value readability quite a lot, even when I code Perl 5/6 and write scripts.
10:25 masak Heather: it's like, I understand what you mean but I think people will misread it when you put it like that.
10:26 sivoais joined #perl6
10:32 Gruu_ joined #perl6
10:32 Heather masak )
10:33 Heather masak it's general point of script
10:33 Heather masak script must be most easier to write then to read
10:33 Heather *than
10:34 masak yes. like I said, I understand what you wanted to say.
10:34 Heather masak well, I also get your point. suggest me something if you get what I wanted to say in mind :P
10:35 masak but "Why the hell you need readable script?" is a bit too strong -- I *do* need a readable script, and not just six months later when I forgot what I was thinking when I wrote it, but five seconds later to see that stuff is correct.
10:35 masak ok, let me think about it.
10:36 Heather people give to much objection to readabilty
10:36 sivoais joined #perl6
10:36 masak "I never liked python and I desired to replace it with Perl because: Why the hell should I put readability ahead of hackability when I'm writing a 30-line script."
10:36 masak er, "...?"
10:36 masak something like that?
10:36 Heather so yes...
10:36 masak it's not either-or, it's a balance of the two.
10:36 Heather imagine you will work in bash
10:36 daxim I give you objection to calling python elegant.  I've only (tribal) python programmers say that about their own language
10:36 Heather and there will be listallthefilesinthisdir instead of ls
10:37 Heather pretty readable huh?
10:37 masak Heather: no :)
10:37 masak especially as "files" and "this dir" are debatable.
10:37 masak and "list" too, I guess :P
10:37 masak and "all".
10:37 masak basically what you have going for you is "the" :P
10:38 masak and "in"
10:38 Heather masak -_-' I suggest you must just replace spaces with  '' in ls man page :D
10:38 Heather and call it that way :D
10:39 Heather thein
10:39 Heather -_-'
10:39 masak hehe.
10:39 masak in other news, I found this newbie story charming: http://blog.michellebu.com/2013/03/21-nested-callbacks/
10:39 Heather pretty logical
10:39 Heather masak help me to run stuff without ''
10:40 Heather r: run "this string wrapped by \'"
10:40 p6eval rakudo b972ca: OUTPUT«run is disallowed in restricted setting␤  in sub restricted at src/RESTRICTED.setting:2␤  in sub run at src/RESTRICTED.setting:8␤  in block  at /tmp/xWLdO1GZcj:1␤␤»
10:41 Heather btw I always lazy to blog :)
10:43 Heather masak updated post :)
10:45 masak \o/
10:45 masak Heather++
10:45 sivoais joined #perl6
10:47 masak Heather: another thing. I like your reason for choosing Perl 6 directly instead of learning Perl 5 first and then moving to Perl 6. I'm willing to put much energy into letting you remain a happy customer. so let me/us know if there is anything you need or if anything is less than optimal.
10:48 masak (because there will be missing features or less-than-optimal situations)
10:51 Heather masak cool
10:51 Heather it sounds ultra friendly -_-'
10:52 Heather masak well, I need run and 3d party tool with argument without ' ' for argument
10:52 Heather run <x b> will run 'x' 'b'
10:52 Heather and for now it fails because 'x' expects b and not 'b'
10:52 * masak doesn't understand
10:53 masak won't a shell simply treat those as quotes and throw them away?
10:53 Heather masak not for arguments
10:55 sivoais joined #perl6
11:00 Heather masak let make failing test
11:04 sivoais joined #perl6
11:05 Heather or ... I think I get where is my trouble...
11:06 Heather masak I need to merge lists instead of concat arguments to string
11:07 cognominal r: my \a = 1; say "a()"
11:07 p6eval rakudo b972ca: OUTPUT«a()␤»
11:07 cognominal r: my \a = 1; say "{a}"
11:07 p6eval rakudo b972ca: OUTPUT«1␤»
11:08 cognominal r: sub a { 1 } ; say "{a()}"
11:08 p6eval rakudo b972ca: OUTPUT«1␤»
11:08 cognominal r: say "{b()}"
11:08 p6eval rakudo b972ca: OUTPUT«[31m===[0mSORRY![31m===[0m�Undeclared routine:�    b used at line 1��»
11:10 Heather masak no, it's still being trouble with ' ' :(
11:10 cognominal r: say "b()"
11:10 p6eval rakudo b972ca: OUTPUT«b()␤»
11:11 Heather I got it
11:11 Heather masak ping
11:11 cognominal sub a { 1 } ; say "a()"
11:11 cognominal r: sub a { 1 } ; say "a()"
11:11 p6eval rakudo b972ca: OUTPUT«a()␤»
11:11 cognominal r: sub a { 1 } ; say "a.()"
11:11 p6eval rakudo b972ca: OUTPUT«a.()␤»
11:12 cognominal r: sub a { 1 } ; say "&a()"
11:12 p6eval rakudo b972ca: OUTPUT«1␤»
11:12 cognominal r: my \a = 1 ; say "&a()"
11:12 p6eval rakudo b972ca: OUTPUT«[31m===[0mSORRY![31m===[0m�Undeclared name:�    &a used at line 1��»
11:14 sivoais joined #perl6
11:14 cognominal Somehow, I wish that a sigiless variable would behave like a function when interpolated in a string. I prefer that than braces.
11:16 cognominal braces break the left to write reading because it somehow refers to the opening brace.
11:17 cognominal *s/write/right/  #  "right" because it's wrong
11:24 sivoais joined #perl6
11:34 sivoais joined #perl6
11:36 masak Heather: pong
11:37 masak Heather: yes, a failing test would be excellent.
11:39 Heather masak I fixed it via removing " "
11:39 Heather masak it's if you run ls "." it will work
11:39 Heather masak but if you run('ls', '\".\"') it will fail
11:39 Heather because it will run ls '"."'
11:40 Heather and bash can't deal with it
11:40 masak Heather: I'm with you so far -- bash can't deal with that -- but I don't see anything wrong on Rakudo's end yet.
11:41 huf bash can deal with that. if the file were literally called ".", it'd list that
11:42 moritz fwiw you can say   shell('ls "."'), and it'd do what Heather exepected
11:43 sivoais joined #perl6
11:44 Heather moritz seems like yes :)
11:49 masak yeah, I think that's why we have both &shell and &run
11:49 masak to be honest, I still haven't gotten used to having both. I don't really know when to use one and when the other.
11:50 moritz you use shell() whenever you want the shell to do something for you (like globbing, redirects, pipes)
11:50 moritz and you use run() when you don't want to escape your arguments (which is usually "in every other case")
11:52 tadzik PLPW status update: http://act.yapc.eu/plpw2013/newsedit?news_id=1006
11:52 tadzik oops, rong link
11:52 tadzik http://act.yapc.eu/plpw2013/news/1006 that's the one :)
11:52 sivoais joined #perl6
11:52 masak moritz: "use &shell when you want the shell to do something" -- gotcha.
11:54 Heather how to check if custom parameter is set ot no
11:55 moritz Heather: example?
11:56 Heather moritz I've got Str :$overlay = '/usr/home/gentoo-perl6' how will I know if user override it?
11:56 masak Heather: compare it to the default?
11:56 Heather masak bad way
11:57 Heather masak I always dislike string comparsion, sql habit
11:57 masak rn: constant overlay_default = '/usr/home/gentoo-perl6'; sub foo(:$overlay = overlay_default) { say $overlay eq overlay_default ?? "not overridden" !! "overridden" }; foo; foo(:overlay</usr/local/bin/mwhahaha/perl6>)
11:58 p6eval rakudo b972ca, niecza v24-35-g5c06e28: OUTPUT«not overridden␤overridden␤»
11:58 cognominal moritz++ # explaining the diff between &run and &shell
11:58 masak Heather: there's no meta-layer by which you can ask "was this parameter passed from the outside?". I sometimes miss that too.
11:59 masak something like a small MOP but for the binding of a capture to a signature, accessible from inside the routine.
12:01 moritz Heather: then apply the default inside the subroutine, not in the signature
12:01 moritz for example
12:01 moritz r: sub f(Str :$overlay) { if $overlay.defined { #`[ was provided by the user ] } else { $overlay = '/usr/home/gentoo-perl6' } }
12:02 Heather moritz and check if !$ ?
12:02 p6eval rakudo b972ca:  ( no output )
12:02 sivoais joined #perl6
12:02 Heather moritz righ, that's more clever
12:04 Heather moritz but it's readon;y
12:04 Heather *readonly
12:04 moritz Heather: then add an 'is copy' to the param
12:05 Heather moritz oh, nice to know thing. Thank you
12:07 masak there's 'is copy' when you want to treat it as a completely new variable.
12:07 masak and there's 'is rw' for when you want a live link between the caller variable and the callee variable.
12:08 masak r: sub crazy-action-at-a-distance($foo is rw) { $foo = 42 }; my $bar = 5; say $bar; crazy-action-at-a-distance $bar; say $bar
12:08 Heather I see
12:08 p6eval rakudo b972ca: OUTPUT«5␤42␤»
12:08 moritz 'is rw' should be used with caution, because it often violates the principle of least surprise
12:08 Heather how to lowercase string?
12:08 masak it's a code smell, because it hinders composability and thus scalability.
12:08 moritz lc
12:08 masak r: say lc "OMG KITTENS"
12:08 p6eval rakudo b972ca: OUTPUT«omg kittens␤»
12:09 Heather oh... that easy
12:09 masak r: say "OMG KITTENS".lc
12:09 p6eval rakudo b972ca: OUTPUT«omg kittens␤»
12:09 masak it's meant to be easy! :)
12:09 masak Heather: there's also .uc and .tc -- the latter gives you title-case
12:09 masak r: say "OMG KITTENS".tc
12:09 p6eval rakudo b972ca: OUTPUT«No such method 'tc' for invocant of type 'Str'␤  in block  at /tmp/4sTM6NalhI:1␤␤»
12:09 masak oh :/
12:09 masak n: say "OMG KITTENS".tc
12:09 p6eval niecza v24-35-g5c06e28: OUTPUT«OMG KITTENS␤»
12:10 masak n: say "omg kittens".tc
12:10 p6eval niecza v24-35-g5c06e28: OUTPUT«Omg kittens␤»
12:10 masak n: say "omg kittens".words>>.tc.join(' ')
12:10 p6eval niecza v24-35-g5c06e28: OUTPUT«Omg Kittens␤»
12:10 pmichaud r: say tc "omg kittens"
12:10 p6eval rakudo b972ca: OUTPUT«[31m===[0mSORRY![31m===[0m�Undeclared routine:�    tc used at line 1. Did you mean '&lc', '&uc'?��»
12:10 pmichaud hmmm.
12:11 sivoais joined #perl6
12:11 * masak submits TODO rakudobug
12:13 moritz r: say tclc 'omg kittens'
12:13 p6eval rakudo b972ca: OUTPUT«Omg kittens␤»
12:13 moritz r: say tclc 'OMG KITTENS'
12:13 p6eval rakudo b972ca: OUTPUT«Omg kittens␤»
12:13 moritz r: say capitalize 'OMG KITTENS'
12:13 p6eval rakudo b972ca: OUTPUT«Omg Kittens␤»
12:13 pmichaud r: 'OMG KITTENS'.tclc.say
12:13 p6eval rakudo b972ca: OUTPUT«Omg kittens␤»
12:13 pmichaud r: 'omg rakudobugs'.uc.say
12:13 p6eval rakudo b972ca: OUTPUT«OMG RAKUDOBUGS␤»
12:16 Heather moritz if !$overlay.defined { is it correct for not defined?
12:16 Heather or.. not
12:18 moritz Heather: yes
12:19 moritz though if you don't have an 'else' block, you can also say
12:19 moritz unless $overlap.defined { }
12:19 Heather ah
12:19 Heather there is unless
12:19 Heather right
12:19 Heather forget it )
12:20 sivoais joined #perl6
12:22 stevan_ joined #perl6
12:24 * masak generally prefers 'if !' (for the statement form), but found to his own surprise that he wanted 'unless' in the Nomic code: https://gist.github.com/masak/5237570
12:24 masak 'unless $vote.was_registered_by($player)' just reads incredibly well.
12:25 masak moritz: my brain is now actively trying to hack the rules, by the way. it keeps running through situations like "what if someone leaves the game during his turn?" :)
12:29 cognominal joined #perl6
12:30 sivoais joined #perl6
12:30 moritz masak: I'm tempted to model it as a state machine :-)
12:30 hoelzro FROGGS: ping
12:30 hoelzro good *, #perl6!
12:32 cognominal good **
12:33 census joined #perl6
12:33 masak moritz: well, it is, in a very real sense. the fun comes from the fact that it's a self-modifying state machine.
12:33 masak states come and go as the machine runs.
12:33 masak and transitions.
12:34 Heather now I do deps trakcing \o/
12:34 Heather so now we need license stuff for META.info
12:35 tadzik uh, I don't think anyone uses it there :)
12:35 Heather tadzik licensing? :)
12:37 masak moritz: though having things end up in an "unexpected state" maked it even more interesting to thing about.
12:37 hoelzro nqp::p6box_s boxes a Parrot string -> Str, right?
12:37 masak moritz: for example, a player could accidentally fall out of the voters queue due to some hastily applied patch. which would be pretty bad, but could be fixed with a one-off patch adding the player back. :)
12:38 tadzik Heather: in META.info
12:38 masak moritz: or a player could end up in the queue several times. which, assuming being the proposer is a good thing in that stage of the game, would be a potentially big advantage.
12:39 moritz Heather: yes
12:39 moritz masak: aye
12:39 sivoais joined #perl6
12:39 Heather tadzik I need additional flag for meta...
12:40 Heather there are not much versions but when there is version I expect I can use static source tarball
12:40 Heather but mostly there are no tags on git for it or tags named wrong
12:40 hoelzro for anyone who's interested: https://github.com/hoelzro/perl6-posix
12:40 hoelzro my first Perl 6 module on GH! \o/
12:40 Heather so that will be good to check if there is tag that satisfy version name
12:41 pmichaud hoelzro++
12:41 pmichaud looks like it needs tests :)
12:41 masak moritz: I just realized I need an API primitive saying "run this code un patch-time, and then never again".
12:41 hoelzro pmichaud: yeah, it's in the TODO =)
12:41 hoelzro testing individual POSIX calls is tricky, though...
12:41 tadzik hoelzro++ :)
12:42 pmichaud certainly worth looking at p5 posix's tests as a guide there, I think
12:42 hoelzro oh, good call!
12:43 hoelzro I have two roadblocks at the moment
12:43 hoelzro one is EXPORT
12:43 hoelzro the other (more urgent) is implementing getcwd
12:43 * masak .oO( I have 99 problems, but roadblocks ain't one )
12:43 hoelzro get_current_dir_name in C returns a malloc'd string
12:44 hoelzro so I need to call it from Perl 6, create a Str copy, and free the original
12:44 hoelzro and I don't know how to do the copying part =/
12:44 Heather hoelzro = hoelzro + 1
12:45 moritz Heather: arnsholt has a proposal to make the memory owner of NCI stuff clearer and controllable
12:45 pmichaud on Parrot at least, there's the OS.cwd method.
12:45 moritz erm, meant hoelzro
12:45 moritz sorry
12:45 moritz r: say cwd
12:45 p6eval rakudo b972ca: OUTPUT«/home/p6eval␤»
12:46 hoelzro pmichaud: right, I'm just adding it to be thorough =)
12:46 tgt joined #perl6
12:46 hoelzro but it will serve as a good testing point!
12:47 arnsholt hoelzro: ATM, just make function return a Str
12:47 hoelzro arnsholt: but then how does NativeCall know how to free() the return value after copying it?
12:47 arnsholt Zavolaj will marshal the char* into a Parrot string, and then promptly not do anything at all with the pointer afterwards =)
12:47 arnsholt It can't know when to free it, so it never frees it =)
12:48 hoelzro so then getcwd has a memory leak =)
12:48 arnsholt Unfortunate, I know. But better than randomly segfaulting because we're overzealous about the free()ing
12:48 hoelzro right
12:48 hoelzro so we need a way to handle this situation
12:49 Heather ok, time to move to another base
12:49 hoelzro it could be getcwd is native('get_current_dir_name) returns Str is free_the_string
12:49 hoelzro it could be a way to create a Perl 6 Str copy
12:49 sivoais joined #perl6
12:51 moritz returns copy(Str)
12:52 hoelzro but get_current_dir_name needs to return an OpaquePointer =)
12:53 pmichaud also, fwiw, get_current_dir_name isn't POSIX.  :-)
12:53 hoelzro hmm
12:53 hoelzro tricky
12:56 arnsholt hoelzro: Yeah, slightly longer term, I'm working on providing the operations needed to handle this kind of thing
12:57 hoelzro ok
12:57 hoelzro is getcwd(Str $buf is rw, int $size) is native possible right now?
12:57 arnsholt Nope
12:57 hoelzro dang
12:58 hoelzro well, I'll skip getcwd for now then
12:58 arnsholt I'm not sure is rw ever will be supported in Zavolaj
12:58 arnsholt For that, you'll need to allocate a CArray[int8] and fill it with the appropriate amount of zeroes
12:59 sivoais joined #perl6
13:01 hoelzro I see
13:02 yeltzooo joined #perl6
13:08 masak moritz: fwiw, I stared at 'return copy(Str)' for several seconds, going "wh..." :)
13:08 masak then I noticed the 's' in 'returns' :P
13:09 sivoais joined #perl6
13:10 bluescreen10 joined #perl6
13:11 [Coke] (raTODObug)
13:14 SmokeMachine joined #perl6
13:18 sivoais joined #perl6
13:23 * hoelzro considers SuShee's list of criteria for modules regarding Perl 6
13:23 masak hoelzro: url?
13:24 hoelzro http://su-shee.tumblr.com/post/46416661551/i-fucking-hate-you-all-all-of-you-equally
13:27 daxim AMEN in 128pt, bold, red, blinking
13:28 * moritz automatically ignores red, bold text
13:28 daxim and since I, too, am an equal opportunity hater:  panda, you hateful software, get a --prefix installer
13:28 sivoais joined #perl6
13:36 sivoais joined #perl6
13:39 hoelzro so yesterday I tried the following: const Int E_ACCES = -1
13:39 hoelzro s/const/constant/
13:40 hoelzro do constant and type constraints not mix?
13:43 masak should do.
13:43 masak rn: constant Int E_ACCES = -1
13:44 p6eval rakudo b972ca: OUTPUT«[31m===[0mSORRY![31m===[0m�Missing initializer on constant declaration�at /tmp/fC0bCEIezv:1�------> [32mconstant Int [33m�[31mE_ACCES = -1[0m�    expecting any of:�        statement list�        prefix or term�        prefix or meta-prefix�»…
13:44 p6eval ..niecza v24-35-g5c06e28: OUTPUT«[31m===[0mSORRY![31m===[0m��Missing initializer on constant declaration at /tmp/d2gqPoC9K1 line 1:�------> [32mconstant Int [33m�[31mE_ACCES = -1[0m��Confused at /tmp/d2gqPoC9K1 line 1:�------> [32mconstant Int [33m�[31mE_ACCES = -1[0m��Parse f…
13:44 masak hm.
13:44 * masak checks le spec
13:46 masak the spec doesn't seem to directly address type constraints.
13:46 masak Because it can declare names in "type" space, the C<constant>
13:46 masak declarator may not declare using the signature, which would be
13:46 masak ambiguous.
13:46 masak that's the closest I find.
13:46 masak S03:4919
13:50 masak but I can kinda see the probelm. you go 'constant', the parser goes "yeah, what's its name", then you go 'Int', the parser goes "uh, ok!", and then you go 'E_ACCES', and the parser goes "eh?"
13:50 skids joined #perl6
13:51 arnsholt I think I managed to get Rakudo to type my constants at some point
13:51 arnsholt nr: my int constant FOO = 1 # Perhaps?
13:51 p6eval niecza v24-35-g5c06e28: OUTPUT«[31m===[0mSORRY![31m===[0m��Malformed my at /tmp/P1VgExYSj1 line 1:�------> [32mmy[33m�[31m int constant FOO = 1 # Perhaps?[0m��Parse failed��»
13:51 p6eval ..rakudo b972ca:  ( no output )
13:51 arnsholt Yup.
13:54 [Coke] r: my Int constant FOO = 4; say FOO;
13:54 p6eval rakudo b972ca: OUTPUT«4␤»
13:54 [Coke] r: my Int constant FOO = "4"; say FOO;
13:54 p6eval rakudo b972ca: OUTPUT«4␤»
13:54 [Coke] r: my Int constant FOO = "d"; say FOO;
13:54 p6eval rakudo b972ca: OUTPUT«d␤»
13:54 [Coke] it may not be doing what you think it's doing. ;)
14:05 drbean joined #perl6
14:16 hoelzro so what's the right way to do it?
14:16 hoelzro according to spec?
14:19 [Coke] Sounds like there isn't a way to do it according to spec.
14:20 hoelzro =(
14:20 hoelzro imo, there should be =)
14:21 * [Coke] looks at RT#117373 and wonders what the bug is.
14:23 Psyche^ joined #perl6
14:23 [Coke] oooh: capitalize isn't spec'd.
14:23 [Coke] is that it? ;)
14:26 philroc joined #perl6
14:26 colomon bug is tc / .tc NYI in rakudo
14:26 colomon rn: say "this is a test".tc
14:26 p6eval niecza v24-35-g5c06e28: OUTPUT«This is a test␤»
14:26 p6eval ..rakudo b972ca: OUTPUT«No such method 'tc' for invocant of type 'Str'␤  in block  at /tmp/hMHNBY6IRx:1␤␤»
14:27 colomon rn: say tc "this is a test"
14:27 p6eval rakudo b972ca: OUTPUT«[31m===[0mSORRY![31m===[0m�Undeclared routine:�    tc used at line 1. Did you mean '&lc', '&uc'?��»
14:27 p6eval ..niecza v24-35-g5c06e28: OUTPUT«This is a test␤»
14:27 colomon (if tc isn't spec'd, that's probably also a bug.)
14:27 [Coke] r: say capitalize "lower" # where is this spec'd?
14:27 p6eval rakudo b972ca: OUTPUT«Lower␤»
14:28 xilo joined #perl6
14:28 [Coke] .tc is spec'd. I don't see where tc() is, though perhaps it's some implicit "because it's a method on Str" thing.
14:30 colomon .... never heard of capitalize before.
14:30 [Coke] If so, perhaps we could make that implicit at the top of the Str spec.
14:30 [Coke] er, explicit.
14:36 philroc left #perl6
14:38 pmichaud [Coke]: tc() exists by virtue of the "is export" clause on the method definition in S32/Str.pod
14:38 pmichaud multi method tc ( Str $string: --> Str ) is export
14:38 cognominal joined #perl6
14:43 hoelzro found a type in Rakudo; pull request submitted!
14:44 jerome joined #perl6
14:44 masak [Coke]: the title of #117373 is "[TODO] &tc and .tc in Rakudo"
14:46 masak [Coke]: I could repeat that information in the body... but I submit a lot of tickets. I tend to streamline away redundancy. generally, if I filed the ticket, the subject line will contain (summarized) information about the observable.
14:47 [Coke] masak - in that case, the subject was fine. the 30 lines of output obfuscated the issue.
14:48 [Coke] hoelzro++
14:48 [Coke] pmichaud: (is export) Thanks. Should we note what that implies in S32*/Str.pod ?
14:49 masak [Coke]: yeah, I couldn've trimmed that down more. it's still edited, mind. this time I went with showing the surrounding context, in order to demonstrate that all of the other subs and methods are in place, in Rakudo and Niecza.
14:50 [Coke] masak: so, another bug: capitalie is either missing from the spec, or not-missing from raudo.
14:50 [Coke] *capitalize
14:50 dalek rakudo/nom: 48447d4 | (Rob Hoelz)++ | src/core/traits.pm:
14:50 dalek rakudo/nom: Fix typo
14:50 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/48447d404f
14:50 dalek rakudo/nom: a23458f | (Tobias Leich)++ | src/core/traits.pm:
14:50 dalek rakudo/nom: Merge pull request #118 from hoelzro/nom
14:50 dalek rakudo/nom:
14:50 dalek rakudo/nom: Fix typo
14:50 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/a23458f708
14:51 masak [Coke]: I'm wary of such bug reports. if you ask me, it's perfectly fine for an implementation to have unspec'd methods and subs.
14:51 masak [Coke]: but I agree it could well be a spec issue in this case. feel free to file one.
14:51 [Coke] ah. method capitalize() is DEPRECATED
14:52 [Coke] (says rakudo) - IWBNI we warned about that.
14:52 [Coke] (perhaps by default in evalbot.)
14:53 shinobicl joined #perl6
14:54 masak ah, that sounds familiar.
14:54 masak yes, we went through a few iterations in that part of the spec.
14:54 masak turned out OK, but the intermediate stages were painful-ish :)
14:56 shinobicl hi... what's the meaning of the '\' sigil?
14:56 masak shinobicl: assign-once variable.
14:57 shinobicl like a constant?
14:57 masak shinobicl: and it also conveys a "raw" context, either item context or list context, depending on where it came from.
14:57 masak yes, like a constant, but at runtime.
14:57 shinobicl oh, ok
15:00 [Coke] do we need to announce the removal of capitalize before we remove it? (I assume we're removing it.)
15:03 masak ISTR a deprecation period or something like that.
15:05 hoelzro callsame from method in a role will call the original method from the class, won't it?
15:06 hoelzro I'm trying to create a routine trait for doing something after the original routine has returned
15:07 masak hoelzro: no, I think methods in classes hide methods in roles.
15:07 hoelzro dang
15:07 hoelzro well, my role's method *is* being called
15:07 hoelzro but the original is not
15:07 masak r: role R { method foo { say "whee!" } }; class C does R { method foo { say "squash'd!" } }; C.new.foo
15:07 p6eval rakudo b972ca: OUTPUT«squash'd!␤»
15:09 PerlJam hoelzro: show us?
15:09 hoelzro incoming gist
15:10 hoelzro https://gist.github.com/hoelzro/5254952
15:11 masak ah, but that's a trait. :) different situation than just a role :)
15:12 hoelzro right
15:12 hoelzro so how do I do this? =)
15:12 masak (because a trait causes the class to subclass anonymously)
15:12 masak looks compeltely right what you're doing.
15:12 hoelzro hmm
15:12 hoelzro well, it doesn't work =(
15:12 * masak runs code locally
15:13 masak huh.
15:13 hoelzro doesn't work for you either?
15:14 masak r: class C { method foo { say "there"; 17 } }; my $x = C.new but role { method foo { my $result = callsame; say "after $result" } }' $x.foo
15:14 p6eval rakudo a23458: OUTPUT«[31m===[0mSORRY![31m===[0m�Two terms in a row�at /tmp/2ueFZr78SF:1�------> [32msult = callsame; say "after $result" } }[33m�[31m' $x.foo[0m�    expecting any of:�        postfix�        statement end�        statement modifier�        statement modifier loo…
15:14 masak r: class C { method foo { say "there"; 17 } }; my $x = C.new but role { method foo { my $result = callsame; say "after $result" } }; $x.foo
15:14 p6eval rakudo a23458: OUTPUT«there␤after 17␤»
15:14 masak I postulate that the trouble is with postcircumfix:<( )> somehow.
15:15 hoelzro I see...
15:15 masak it doesn't seem that 'callsame' in your code even calls the original sub.
15:15 hoelzro it doesn't
15:16 hoelzro that's the issue =/
15:16 PerlJam hoelzro: have you run the rakudo debugger to see if it could help figure out what's going on?
15:16 hoelzro I have not
15:16 hoelzro this will be my first time using it
15:17 timotimo_ you have been missing out :)
15:17 hoelzro heh
15:17 hoelzro it just skips over the line with callsame
15:17 * masak submits rakudobug
15:21 hoelzro so, I saw that my NQP patch made it in, but there was some fuss about installing nqp_const.pir?
15:21 hoelzro is that still outstanding?
15:21 hoelzro if so, I can fix it right now
15:22 PacoAir joined #perl6
15:28 pmichaud hoelzro: I think it was taken care of already.
15:28 pmichaud (nqp_const.pir)
15:28 hoelzro oh, ok
15:28 pmichaud since it broke nqp for people building Rakudo :-)
15:28 pmichaud (imcc complains and stops compiling if it cannot find a .include'd file)
15:29 hoelzro ah ha!
15:32 hoelzro grr
15:32 hoelzro building NQP keeps coredumping =/
15:33 pmichaud [Coke]: (is export) .... well, a lot of the sections of the spec use 'is export' to show methods that get exported as subs, and it's documented in S12, so I'm not sure it needs a special callout in Str.
15:34 pmichaud ack 'is export' S32-setting-library   # gives a list
15:40 hoelzro is anyone else having problems building NQP on parrot 5.1.0?
15:40 hoelzro I can't get it to build all of a sudden
15:41 * PerlJam still uses Parrot 4.10.0
15:42 hoelzro hmm
15:42 hoelzro maybe that's why
15:42 hoelzro that's what I get for using Arch's official parrot package
15:42 moritz hoelzro: fwiw I had lots of trouble with build NQP when old parrot's and NQPs are lying around
15:43 hoelzro oh
15:43 hoelzro interesting
15:43 hoelzro I do have NQP installed
15:46 telex joined #perl6
15:49 moritz my theory is that the changes of include paths in parrot have made NQP more fragile with respect to such problems
15:49 moritz but I haven't tested that theory yet
15:49 cognominal joined #perl6
15:52 hoelzro well, I uninstall nqp, and now it builds =/
15:55 kivutar joined #perl6
16:05 xilo does perl6 have some sort of #typedef or alias or something?
16:06 masak r: constant FunnyInt = Int; say FunnyInt === Int
16:06 p6eval rakudo a23458: OUTPUT«True␤»
16:06 masak r: class Way::Too::Long::Typename::To::Type::Each::Time {}; constant X = Way::Too::Long::Typename::To::Type::Each::Time; say X.new
16:06 p6eval rakudo a23458: OUTPUT«Way::Too::Long::Typename::To::Type::Each::Time.new()␤»
16:09 xilo ah neat
16:09 xilo ty
16:11 kivutar joined #perl6
16:12 masak pzh
16:14 moritz but don't use X for that, it makes exception users unhappy :-)
16:15 masak oops.
16:17 FROGGS should this be an error? because symbol X already exists
16:17 FROGGS r: say X.WHAT
16:17 p6eval rakudo a23458: OUTPUT«(X)␤»
16:17 masak FROGGS: you're free to declare constants in your scope that hide things in the setting.
16:17 FROGGS okay
16:17 masak moritz: how do I see the things that the X package "contains"?
16:18 * masak tried for like 10 seconds and couldn't figure it out
16:18 moritz r: say X.WHO.keys
16:18 p6eval rakudo a23458: OUTPUT«Inheritance Export Composition Import Redeclaration AdHoc OutOfRange Eval Constructor Method Bind Routine Str Range Item Hash Buf IO Numeric Comp ControlFlow OS Syntax Pod NYI Signature Placeholder Undeclared Attribute Phaser Obsolete Parameter Value Does Role Decl…
16:18 FROGGS r: say X::
16:18 p6eval rakudo a23458: OUTPUT«("Inheritance" => Inheritance, "Export" => Export, "Composition" => Composition, "Import" => Import, "Redeclaration" => X::Redeclaration, "AdHoc" => X::AdHoc, "OutOfRange" => X::OutOfRange, "Eval" => Eval, "Constructor" => Constructor, "Method" => Method, "Bind" =>…
16:21 cognominal joined #perl6
16:21 PerlJam that's still only one level deep into X
16:22 FROGGS r: say X::Inheritance::
16:22 p6eval rakudo a23458: OUTPUT«("Unsupported" => X::Inheritance::Unsupported, "UnknownParent" => X::Inheritance::UnknownParent, "SelfInherit" => X::Inheritance::SelfInherit).hash␤»
16:22 FROGGS PerlJam: there is no other way currently
16:22 moritz PerlJam: but you know how to program, no? :-)
16:22 PerlJam :-)
16:23 kresike bye folks
16:23 masak PerlJam: I'm already working on it :)
16:23 PerlJam masak++
16:25 denisboyun_ joined #perl6
16:25 dmol joined #perl6
16:26 moritz it's just like nested hashes, except that you have to call .WHO on all the values
16:28 masak r: sub traverse(Str $name, Stash $s) { say $name; for $s.pairs { traverse $name ~ "::" ~ .key, .value.WHO } }; traverse "X", X::
16:28 p6eval rakudo a23458: OUTPUT«X␤X::Inheritance␤X::Inheritance::Unsupported␤X::Inheritance::UnknownParent␤X::Inheritance::SelfInherit␤X::Export␤X::Export::NameClash␤X::Composition␤X::Composition::NotComposable␤X::Import␤X::Import::MissingSymbols␤X::Import::Redeclaration␤X::Import::OnlystarProto␤…
16:28 masak that does it.
16:28 masak locally, it produces 181 lines of output.
16:32 masak cognominal: I found https://fr.wikipedia.org/wiki/Mort_aux_cons helpful :)
16:33 masak (and I'm also very surprised that I can read that straight off, without any digital augmentation)
16:36 timotimo_ masak: that traverse sub outputs exactly one line locally for me o_O
16:37 masak my rakuodo may be slightly out-of-date.
16:38 dmol joined #perl6
16:40 timotimo_ interestingly, $s.pairs works fine when i use X::. interesting.
16:48 cognominal joined #perl6
16:49 cognominal masak: you mean google glasses that google translate? :)  I will add a link to HLM to https://fr.wikipedia.org/wiki/Habitation_%C3%A0_loyer_mod%C3%A9r%C3%A9
16:50 cognominal masa: At this hour, the connexion of my iPhone hotpoint is even less reliable than average :(
16:50 cognominal I retaliate by loading again and again the irc log.
16:51 masak :)
16:51 masak no, I meant any computerized means by which to understand French.
16:51 masak apparently, I'm slightly better at it than I remember.
16:54 cognominal I am reading esperanto wp pages. Because it uses some common features of common languages, I hope it will help me to learn other languages
16:55 masak in my experience, yes.
16:55 masak it puts grammar into a framework which is easy to understand and easy to reason about.
16:55 masak not just Esperanto, but all well-designed auxlangs.
16:57 cognominal indeed
17:05 Chillance joined #perl6
17:13 denisboyun_ joined #perl6
17:17 FROGGS joined #perl6
17:34 dalek v5: 1c3d8bb | (Tobias Leich)++ | lib/Perl6/P5 (2 files):
17:34 dalek v5: allow list declaration and assignment
17:34 dalek v5: review: https://github.com/rakudo-p5/v5/commit/1c3d8bbb41
17:35 mmcleric joined #perl6
17:38 SamuraiJack_ joined #perl6
17:40 66MAAF604 joined #perl6
17:41 pupoque joined #perl6
17:43 pupoque left #perl6
17:43 pupoque joined #perl6
17:50 japhb S06 has several places that it uses 'sub (|$args)' syntax, but Rakudo reports this:
17:50 japhb r: sub (|$args) { }
17:50 p6eval rakudo a23458: OUTPUT«Obsolete use of | or \ with sigil on param $args␤»
17:50 japhb Is Rakudo correct and the spec out of date, or is Rakudo's behavior a snapshot in the middle of changes?
17:51 moritz japhb: spec needs updating
17:52 japhb moritz, OK, thank you.
17:53 japhb Hmmm.
17:53 japhb moritz, Is that just for use in sub signature?
17:54 japhb What about:  my (|$capture) := $func();
17:54 japhb Actually, I see that both with and without parentheses on the left.
17:56 japhb Sheesh:  -> \$_ = OUTER::<$_> { . mumble }
17:56 japhb Now what the heck is that supposed to turn into?
17:56 japhb er, '.mumble' there, with no space.  Finger fumble
17:59 moukeddar joined #perl6
18:03 moritz probably the now-gone 'is parcel'
18:03 moritz ah, not gone
18:04 moritz so it becomes -> $_ is parcel = OUTER::<$_> { .mumble }
18:04 dalek Perlito: 31d8cd9 | (Flavio S. Glock)++ | src5/lib/Perlito5/X64/Assembler.pm:
18:04 dalek Perlito: Perlito5::X64::Assembler - movq fix
18:04 dalek Perlito: review: https://github.com/fglock/Perlito/commit/31d8cd9b1b
18:07 japhb moritz, OK, gotcha.  So with my declarators, is |$ valid or invalid at this point?  (I would *guess* the latter to remain parallel with sub syntax, but ...)
18:14 SmokeMachine joined #perl6
18:15 SmokeMachine joined #perl6
18:15 SmokeMachine joined #perl6
18:18 dalek Perlito: 217fdd3 | (Flavio S. Glock)++ | / (2 files):
18:18 dalek Perlito: Perlito5::X64::Assembler - add the "Immediate" type
18:18 dalek Perlito: review: https://github.com/fglock/Perlito/commit/217fdd373a
18:25 japhb It looks like Rakudo recognizes but complains about this syntax:
18:25 japhb r: sub foo(|args) { return args }; my (|$cap) := foo(1, 2, :bar, :baz(12)); say $cap;
18:25 p6eval rakudo a23458: OUTPUT«Obsolete use of | or \ with sigil on param $cap␤1 2 "bar" => Bool::True "baz" => 12␤»
18:25 japhb But removing the $ causes trouble:
18:25 japhb r: sub foo(|args) { return args }; my (|cap) := foo(1, 2, :bar, :baz(12)); say cap;
18:25 p6eval rakudo a23458: OUTPUT«===SORRY!===␤Error while compiling block : Error while compiling op call: Error while compiling block : Error while compiling op call: Null PMC access in find_method('handle')␤»
18:25 [Coke] t/spec/S32-temporal/Date.t has a bogus test:
18:26 [Coke] isa_ok Date.new(2010, 01, 01), Date, 'Date.new() returns a Date';  #OK octal
18:26 [Coke] r: say Date.new(2010, 01, 01);
18:26 p6eval rakudo a23458: OUTPUT«Potential difficulties:�    Leading 0 does not indicate octal in Perl 6; please use 0o1 if you mean that�    at /tmp/VbWmf_FOHR:1�    ------> [32msay Date.new(2010, 01[33m�[31m, 01);[0m�    Leading 0 does not indicate octal in Perl 6; please use 0o1 if you mean…
18:27 [Coke] it has an "OK octal" but I'm not sure that's the right way to "fix" that.
18:33 timotimo_ arnsholt: i'd like to add Net::ZMQ to the package list, that okay with you?
18:37 moukeddar_ joined #perl6
18:38 arnsholt timotimo_: Go ahead
18:40 dalek specs: eb862b2 | (Geoffrey Broadwell)++ | S (3 files):
18:40 dalek specs: Banish |$ and \$ in more places
18:40 dalek specs: review: https://github.com/perl6/specs/commit/eb862b2213
18:41 dalek perl6-roast-data: d56a953 | coke++ | / (3 files):
18:41 dalek perl6-roast-data: today (automated commit)
18:41 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/d56a953f3e
18:41 dalek Perlito: bedce48 | (Flavio S. Glock)++ | src5/lib/Perlito5/X64/Assembler.pm:
18:41 dalek Perlito: Perlito5::X64::Assembler - add the "Operand" type
18:41 dalek Perlito: review: https://github.com/fglock/Perlito/commit/bedce48e24
18:43 dalek ecosystem: 991583f | timo++ | META.list:
18:43 dalek ecosystem: Add the Net::ZMQ module to the ecosystem.
18:43 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/991583f865
18:45 rurban joined #perl6
18:47 timotimo_ arnsholt: hm, any low hanging fruit in zmq?
18:50 census joined #perl6
19:01 denisboyun joined #perl6
19:02 fgomez joined #perl6
19:08 arnsholt timotimo_: More tests would be nice, I guess. Or just trying to use it for something
19:09 arnsholt Using it is bound to shake out some bugs, I think
19:10 lue hello world o/
19:11 masak lue! \o/
19:12 pupoque joined #perl6
19:16 lue was  my $*IN  the trick to limit reassignment of a global variable to just that scope? (I realized some example code in my slangs gist may be incorrect)
19:16 pupoque joined #perl6
19:16 masak yes. that dynamic scope.
19:17 masak see https://github.com/sergot/IO-Capture-Simple/
19:18 sorear lue! \o/
19:18 lue I realized the $~MAIN = HappyMAIN; module in my example at the end would've stayed that way outside of the module :)
19:20 arlinius joined #perl6
19:20 dalek Perlito: d3f8972 | (Flavio S. Glock)++ | src5/lib/Perlito5/X64/Assembler.pm:
19:20 dalek Perlito: Perlito5::X64::Assembler - add the "Operand" type - more
19:20 dalek Perlito: review: https://github.com/fglock/Perlito/commit/d3f8972a1a
19:26 dalek perl6-examples: 3518ada | (David Warring)++ | parsers/CSSGrammar.pm:
19:26 dalek perl6-examples: use '||' to indicate parsing preference
19:26 dalek perl6-examples: review: https://github.com/perl6/perl6-examples/commit/3518adaf4e
19:27 lue Added some thoughts on the ~ twigil: https://gist.github.com/lue/5241230
19:27 lue (I'll likely be leaving slangs (mostly) dormant until TimToady's around to help figure out the details)
19:30 tadzik hello hello
19:31 lue hello tadzik o/
19:33 masak tadzik! \o/
19:33 tadzik \o/
19:36 SmokeMac_ joined #perl6
19:45 dalek Perlito: 7029a53 | (Flavio S. Glock)++ | src5/lib/Perlito5/X64/Assembler.pm:
19:45 dalek Perlito: Perlito5::X64::Assembler - add emit_operand
19:45 dalek Perlito: review: https://github.com/fglock/Perlito/commit/7029a531bd
19:48 * [Coke] wonders if he can get access to a new sparc machine for rakudo threading (esp. concurrency testing)
20:11 timotimo_ the test failures from zavolaj unsettle me a bit
20:14 lue masak: ooc, how's the rest of p6cc coming?
20:15 fgomez joined #perl6
20:16 masak lue: meant to dig into t2 reviewing in the weekend that was. got distracted by resting.
20:17 lue ah.
20:17 masak lue: kind of distracted by $work in the week, but going to give it another shot the upcoming weekend.
20:17 masak I'm eager to get to the t2 reviews.
20:17 lue OK. Just wondering where the reviews have been is all :)
20:17 moritz four file found cabin
20:17 moritz a celebrity causality
20:17 moritz engulfed elapsed girl
20:18 masak that's beautiful.
20:19 masak but the second line has 9 syllables by my count :)
20:19 moritz oh well, counting was never my strength :-)
20:20 moritz let's try again
20:20 moritz two glove endorses
20:20 moritz many elects emoted
20:20 moritz bare elapsed fancy
20:20 lue (it goes to 8 if you pronounce causality "causal-ty")
20:21 PerlJam lue++ I was just thinking the exact same thing :)
20:21 lue (then if you remove the "a" at the beginning, you win!)
20:22 moritz meh, ilbot6 died :(
20:22 moritz Connection error. in method run at /home/moritz/p6/prod/Net--IRC/lib/Net/IRC/Bot.pm:86
20:23 ilbot6 joined #perl6
20:25 masak moritz:
20:25 masak these haikus are fine
20:25 masak indescribably we have
20:25 masak done really nice work
20:26 moritz masak++ # though it looks cheated, ie not computer generated
20:26 lue .oO(ilbot6 has died/logging this awesome channel/let's send him wishes)
20:26 masak it wasnät.
20:26 masak wasn't*
20:26 masak though I should have made it this:
20:26 masak these haikus are fine
20:26 masak inexplicably you have
20:26 masak done really nice work
20:26 masak ;)
20:27 moritz now it's inexplicable that i do nice work? :-)
20:27 anocelot explicitly inexplicably is indubidably excellent.
20:27 masak moritz: I was aiming for subtle snarkiness. apparently I succeeded.
20:27 moritz aye :-)
20:28 masak I would love a snarky haiku generator, though.
20:28 * masak is put in mind of the Cyberiad
20:28 moritz you mean it snarks at you when you try to make it generate a haiku? :-)
20:29 mst moritz++
20:29 masak by the way, I order anyone in here who hasn't read the Cyberiad to go read it at the earliest opportunity.
20:30 timotimo_ i still can't get my custom Perl6::Compiler to take a -M argument like the debugger does
20:30 japhb masak:  I tried, years ago.  Then I tried again, years after that.  I couldn't finish it.
20:31 masak huh.
20:31 lue .oO($ snarku --fast\n "Oh, I suppose this is urgent, then?")
20:31 moritz bald frighten canyon
20:31 moritz governor elected cap
20:31 moritz bald dancer daughter
20:31 masak *lol*
20:32 japhb So I've been away from #perl6 for two weeks.  What's new and improved?  :-)
20:33 anocelot japhb: The quantity of snark and haiku have increased significantly in the near past.
20:33 FROGGS japhb: Perl 6 is dead, Perl 5 will be the new upcoming Perl 7 :P
20:34 moritz japhb: say hello to ilbot6 (which currently logs to a test database)
20:34 lue FROGGS: I completely forgot! I guess I should go to #perl7 soon then :P
20:34 FROGGS hehe
20:34 FROGGS yeah >.<
20:34 japhb moritz, awesome!
20:34 anocelot Quick - someone cybersquat that channel.  XD
20:35 japhb anocelot, on which network?  :-)
20:35 lue anocelot: done
20:35 lue (on freenode)
20:35 xilo r: my int8 $num = 65535; say $num;
20:35 p6eval rakudo a23458: OUTPUT«65535␤»
20:35 sorear masak: have not yet located a copy
20:35 xilo why does this work :|
20:36 japhb moritz, am I to assume that the Great Parrot IO Pains of Winter 2012-2013 are now over?
20:36 moritz japhb: I'm not sure yet
20:37 moritz xilo: it seems that sized ints are only available for the purpose of nativecall, and don't do anything else in rakudo yet :(
20:37 xilo ah
20:37 sorear xilo: parrot-rakudo only supports four types - num, int, Str, Mu
20:37 xilo kinda silly not to enforce the limits
20:37 xilo i see
20:37 sorear r: my str $s = 65535; say $s.perl
20:37 p6eval rakudo a23458: OUTPUT«"65535"␤»
20:38 sorear r: my int $p = pi; say $p.perl
20:38 p6eval rakudo a23458: OUTPUT«This type cannot unbox to a native integer␤  in block  at /tmp/w_u0d3k1TX:1␤␤»
20:38 moritz well, it supports four native types, but many more composite types :-)
20:38 xilo yeah
20:46 * [Coke] is sad, his haikuinator would be much better with https://github.com/coke/p6-lingua-en-syllable
20:47 japhb Don't feel bad, [Coke] -- my haikuinator would be much better if it existed.  ;-)
20:48 xilo so use it?
20:49 cognominal joined #perl6
20:49 [Coke] xilo - an early (buggier) version of it was included in my t2 submission which is now locked.
20:49 xilo ah
20:49 xilo i see
20:50 [Coke] in retrospect I should have released it first and then used the released version as part of the submission!
20:51 [Coke] r: https://raw.github.com/coke/p6-lingua-en-syllable/master/t/syllables.t
20:51 p6eval rakudo a23458: OUTPUT«[31m===[0mSORRY![31m===[0m�Two terms in a row�at /tmp/ukwI7h_EYu:1�------> [32mhttps[33m�[31m://raw.github.com/coke/p6-lingua-en-syll[0m�    expecting any of:�        argument list�        postfix�        infix stopper�        infix or meta-infix�        st…
20:53 pupoque joined #perl6
20:56 timotimo_ is there a good reason for not implementinga REPL in pure perl6? rather than overriding Perl6::Compiler for it?
20:57 timotimo_ could i handle variables properly if i just used eval?
20:58 [Coke] I think if you can rewrite a chunk of rakudo in Perl 6, that's probably a good thing. What's it written in now?
20:59 timotimo_ nqp
20:59 timotimo_ the point is doing the ipython-compatible repl
21:01 timotimo_ hm, it's probably very possible with regcomp
21:01 dmol joined #perl6
21:01 dalek ecosystem: f4f5956 | coke++ | META.list:
21:01 dalek ecosystem: add Lingua::EN::Syllable to the ecosystem
21:01 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/f4f59569ad
21:01 [Coke] ah. if it's already in nqp, your returns go down a bit. Certainly worth trying in a branch, though.
21:01 timotimo_ don't know why i should?
21:03 [Coke] use a branch, or rewrite in Perl 6?
21:03 timotimo_ the latter
21:04 [Coke] yah, me either. ;)
21:05 timotimo_ r: my $p6 := pir::compreg__Ps('perl6'); say $p6.^methods;
21:05 p6eval rakudo a23458: OUTPUT«No such method 'dispatch:<.^>' for invocant of type 'Perl6::Compiler'␤  in block  at /tmp/KZDlS2rj6l:1␤␤»
21:05 timotimo_ i guess i have exactly the methods i see in HLL::Compiler and Perl6::Compiler
21:06 [Coke] r: my $p6 := pir::compreg__Ps('perl6'); $p6.compile("say 3");
21:06 p6eval rakudo a23458:  ( no output )
21:06 timotimo_ r: my $p6 := pir::compreg__Ps('perl6'); say $p6.eval("say 3");
21:06 p6eval rakudo a23458: OUTPUT«3␤True␤»
21:06 timotimo_ r: my $p6 := pir::compreg__Ps('perl6'); say $p6.eval("3");
21:06 p6eval rakudo a23458: OUTPUT«3␤»
21:06 timotimo_ well, seems good so far
21:07 rindolf joined #perl6
21:07 [Coke] r: my $p6 := pir::compreg__Ps('perl6'); $p6.barf("!");
21:07 p6eval rakudo a23458: OUTPUT«No such method 'barf' for invocant of type 'Perl6::Compiler'␤  in block  at /tmp/cbdbY07NeA:1␤␤»
21:07 pmichaud "haikuinator" sounds like something Dr. Doofenshmirtz would create.  :-)
21:07 pmichaud and with it I could take over the entire TRI LANGUAGE AREA!
21:08 [Coke] I will conquer all \ of the tristate area \ haikuinator !
21:10 timotimo_ huh. locally in a file i get "Nominal type check failed for parameter '$got'; expected Any but got Perl6::Compiler instead"
21:11 pmichaud timotimo_: using := and not =  ?
21:11 pmichaud r: my $p6 = pir::compreg__Ps('perl6'); say $p6
21:11 p6eval rakudo a23458: OUTPUT«Nominal type check failed for parameter '$got'; expected Any but got Perl6::Compiler instead␤  in block  at /tmp/Pp9a2RJVwB:1␤␤»
21:11 timotimo_ oh, i didn't bind.
21:11 pmichaud the 'perl6' compiler isn't derived from Any.
21:12 lue .oO("Iambic pentameter?" (beat) "Perry the Iambic Pentameter‽")
21:13 pmichaud 20:57 <timotimo_> could i handle variables properly if i just used eval?
21:13 pmichaud it gets tricky, because   eval("my $a = 5"); eval("say $a");   doesn't quite do what you want.
21:13 pupoque joined #perl6
21:14 masak which is a *feature*.
21:15 [Coke] is TPF signed up for GSOC this year?
21:15 masak JavaScript leaks lexicals from eval. in Perl 6, the idea seems almost preposterous.
21:17 timotimo_ r: my $p6 := pir::compreg__Ps('perl6'); $p6.eval('my $var = 3'); $p6.eval('say $var');
21:17 p6eval rakudo a23458: OUTPUT«[31m===[0mSORRY![31m===[0m�Variable '$var' is not declared�at /tmp/eXHhbpPijE:1�------> [32msay $var[33m�[31m<EOL>[0m�    expecting any of:�        postfix�»
21:17 pmichaud JavaScript leaks vars
21:17 pmichaud seems almost preposterous
21:17 timotimo_ so, how do i do it? :(
21:17 pmichaud Perl 6 does not
21:18 cognominal joined #perl6
21:19 pmichaud timotimo_: the nqp repl keeps track of the lexical context created by the previous eval, and uses that as the outer context of the next eval.
21:19 timotimo_ r: my $outer_ctx; my $p6 := pir::compreg__Ps('perl6'); $p6.eval('my $var = 3', :$outer_ctx); $p6.eval('say $var', :$outer_ctx);
21:19 p6eval rakudo a23458: OUTPUT«[31m===[0mSORRY![31m===[0m�Variable '$var' is not declared�at /tmp/clM3sbbI69:1�------> [32msay $var[33m�[31m<EOL>[0m�    expecting any of:�        postfix�»
21:22 timotimo_ r: my $outer_ctx; my $*MAIN_CTX; my $p6 := pir::compreg__Ps('perl6'); $p6.eval('my $var = 3', :$outer_ctx); if $MAIN_CTX { $outer_ctx := $*MAIN_CTX }; $p6.eval('say $var', :$outer_ctx);
21:22 p6eval rakudo a23458: OUTPUT«[31m===[0mSORRY![31m===[0m�Variable '$MAIN_CTX' is not declared. Did you mean '$*MAIN_CTX'?�at /tmp/FlHA_FLxF7:1�------> [32mmy $var = 3', :$outer_ctx); if $MAIN_CTX[33m�[31m { $outer_ctx := $*MAIN_CTX }; $p6.eval([0m�    expecting any of:�        postfix�»…
21:22 timotimo_ r: my $outer_ctx; my $*MAIN_CTX; my $p6 := pir::compreg__Ps('perl6'); $p6.eval('my $var = 3', :$outer_ctx); if $*MAIN_CTX { $outer_ctx := $*MAIN_CTX }; $p6.eval('say $var', :$outer_ctx);
21:22 p6eval rakudo a23458: OUTPUT«[31m===[0mSORRY![31m===[0m�Variable '$var' is not declared�at /tmp/YvuGj1sx45:1�------> [32msay $var[33m�[31m<EOL>[0m�    expecting any of:�        postfix�»
21:22 timotimo_ hm. what?
21:22 pmichaud you have to get the context created by the eval.
21:22 timotimo_ i don't see where the current code does that
21:24 fgomez joined #perl6
21:24 timotimo_ oh, is $*CTXSAVE responsible for that?
21:25 pmichaud seems right.  You'd need to look at CTXSAVE / MAIN_CTX handling in Perl6::Actions to see the rest of the magic.
21:25 pmichaud I have to pick up kids from school... bbl
21:27 timotimo_ ah, ok
21:27 xilo how do you change the starting value of an enum?
21:31 timotimo_ hm. but i can't store nqp::ctxcaller(nqp::ctx()) in a perl6 variable :|
21:32 kaare_ joined #perl6
21:36 pmurias joined #perl6
21:36 pmurias masak: re leaks vars, that is turned of by "use strict"; (yes with quotes ;)
21:38 timotimo_ wat?
21:38 masak pmurias: indeed.
21:38 masak pmurias: introduced in ES5, which is great for developers.
21:38 timotimo_ where do you put that?
21:38 masak timotimo_: you can put it at the top of your program, or at the top of a function.
21:38 masak timotimo_: the quotes are there for backwards compatibility, something that's very important in JavaScript.
21:38 timotimo_ m)
21:39 thou joined #perl6
21:40 timotimo_ masak: an idea how to do the nqp::ctxcaller(nqp::ctx()) thing? or a workaround? i don't even know what that's supposed to do :\
21:41 masak timotimo_: 'fraid not :/
21:42 pupoque_ joined #perl6
21:42 kurahaupo joined #perl6
21:46 spider-mario joined #perl6
21:48 [Coke] woot, I have a module up on the board.
21:53 abth joined #perl6
22:00 BenGoldberg joined #perl6
22:01 BenGoldberg joined #perl6
22:08 cognominal joined #perl6
22:10 cognominal about "use strict". Perl has been good to steal from another language and languages retaliated by doing the same.
22:11 cognominal Somehow, for unknown reason that reminds me of Voltaire who said "Dieu a créé l'homme à son image et l'homme le lui a bien rendu"
22:11 cognominal mask, you get that one?
22:15 cognominal A loaded sentence, difficult to translate.
22:15 arnsholt "God created Man in his image, and Man returned the favour", or something like that?
22:16 cognominal yes
22:16 arnsholt Yay. It's been a while since I was happy with my French =)
22:17 cognominal Indeed, "returned the favour" is often used in a Voltarian ironic way.
22:19 cognominal somehow the way languages stole perl ideas to deface them made me think of that.
22:20 masak cognominal: yes, I get that one :)
22:20 masak cognominal: you can say "render someone a favor" in English too, I believe.
22:20 masak cognominal: I like that quote, by the way.
22:21 cognominal "le lui a bien rendu" is obviously ironic.
22:22 xilo joined #perl6
22:23 cognominal Voltaire was very sarcastic, Candide can be read as a phamplet against the insupportable Leibniz optimist.
22:23 masak yep.
22:24 masak that "bien" sounds like it means "and Man sure returned the favor" or something like that.
22:25 cognominal yup
22:25 masak \o/
22:27 cognominal overemphasis is often some form of sarcastic negation, like "yea, right!"
22:28 masak you can say that again.
22:28 cognominal overemphasis is common in extremist site, which makes them almost indistinguishable from "the onion"` caricature
22:29 cognominal :)
22:29 FROGGS std: use v5; print $OSNAME
22:29 p6eval std 86b102f: OUTPUT«ok 00:01 52m␤»
22:29 FROGGS std: use v5; use strict; print $OSNAME
22:29 p6eval std 86b102f: OUTPUT«ok 00:01 53m␤»
22:34 BenGoldberg perl6: say 'Japh,'
22:34 p6eval rakudo a23458, niecza v24-35-g5c06e28: OUTPUT«Japh,␤»
22:35 pmurias FROGGS: ?
22:37 FROGGS pmurias: ?
22:38 [Coke] Dr. Scott?
22:38 dalek v5: 8368bfa | (Tobias Leich)++ | lib/Perl6/P5 (2 files):
22:38 dalek v5: dispatch $^O to $*OS and tell the boys we are v5.10.0
22:38 dalek v5: review: https://github.com/rakudo-p5/v5/commit/8368bfa318
22:39 hoelzro where are the various dispatchers (ie. like the one for callsame) set up?
22:39 hoelzro I'm trying to debug this callsame issue I'm seeing
22:40 FROGGS hoelzro: well, if this has something todo with the multi dispatcher, this is happening in nqp's C land
22:40 hoelzro I see
22:41 hoelzro well, I have an issue with callsame and sub traits
22:41 hoelzro and I'm trying to fix it myself =)
22:41 hoelzro example code: https://gist.github.com/hoelzro/5254952
22:42 FROGGS ++hoelzro
22:43 skids joined #perl6
22:45 hoelzro I'm just trying to figure out where pir::perl6_find_dispatcher__Ps('callsame'); ends up =)
22:46 FROGGS ya, currently doing the same
22:49 fgomez joined #perl6
22:50 FROGGS hoelzro: maybe here? rakudo/src/ops/perl6.ops:1279
22:51 pmurias FROGGS: I was wandering why do you pass use v5;print $OSNAME to std:
22:51 FROGGS pmurias: because I've not seen that it knows about that variable within the grammar
22:53 FROGGS std: use v5; use strict; say $PMURIAS
22:53 p6eval std 86b102f: OUTPUT«ok 00:00 53m␤»
22:53 FROGGS but it looks like it just ignores uppercase vars
22:54 FROGGS std: use v5; use strict; say $pmurias
22:54 p6eval std 86b102f: OUTPUT«ok 00:01 53m␤»
22:54 hoelzro FROGGS: right, that's where the dispatcher is located
22:54 FROGGS hmmm
22:54 hoelzro but I'm wondering where it's set up
22:55 hoelzro oh, I think I may understand
22:55 hoelzro ok
22:56 hoelzro it just finds $*DISPATCHER or something
22:56 raiph xilo: did you figure out how to set the starting value of an enum?
22:56 FROGGS hoelzro: nqp/src/guts/multi_dispatch.c line 89
22:56 hoelzro \o/
22:56 hoelzro FROGGS++
22:56 xilo raiph: yea, but can you do it without having to specify the value of every enum after?
22:56 raiph xilo: http://feather.perl6.nl/syn/S09.html#User-defined_array_indexing
22:57 FROGGS hoelzro: but no warranty :P
22:58 raiph xilo: but that may be NYI (not yet implemented)
22:58 xilo ah
22:58 xilo if i changed the starting value, i had to do it for every value after
22:58 xilo unlike c/c++, etc where it would auto increment based off previous enum value
22:58 raiph r: my enum Months «:Jan(1) Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec»;
22:58 p6eval rakudo a23458: OUTPUT«===SORRY!===␤Method 'returns' not found for invocant of class 'Parcel'␤»
22:59 raiph hmm
22:59 FROGGS r: my enum Months <:Jan(1) Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec>; say Feb
22:59 p6eval rakudo a23458: OUTPUT«Feb␤»
22:59 FROGGS r: my enum Months <:Jan(1) Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec>; say Jan
22:59 p6eval rakudo a23458: OUTPUT«[31m===[0mSORRY![31m===[0m�Undeclared name:�    Jan used at line 1��»
23:00 FROGGS O.o
23:00 xilo yeah i tried all that lol
23:00 raiph xilo: well, the design is such that you can set up a user defined index, then...
23:00 raiph xilo: set up a positional type that uses that index, then...
23:01 raiph xilo: create arrayish objects that use that type or a subtype
23:01 raiph xilo: or something like that
23:01 xilo lot of complication for something that (should) be relatively simple/standard :|
23:01 masak FROGGS: that does not mean what you think it means. :)
23:01 xilo or maybe because it allows strings as enum values
23:02 raiph and you could presumably have a slang in which @foo always uses that
23:03 raiph xilo: i hear that you think it is complicated; i think it will appear very simple to users
23:03 xilo would need example
23:03 raiph xilo: but only when all the pieces are in place
23:04 xilo gotcha
23:05 raiph i'm thinking that, with all the pieces in place, you would prolly set some slang as the "standard" slang for your org or yourself; then when you write my @foo you'd get *your* preferred sort of array
23:06 xilo did you find that stuff on some NYI list?
23:08 hoelzro ok, found it
23:08 hoelzro rakudo/src/Perl6/Metamodel/Dispatchers.pm
23:10 raiph xilo: no. it's all there in the spec. i have the advantage of having watched it evolve over the last decade.
23:10 xilo ah i see
23:12 raiph xilo: and rereading that bit of the spec (that i linked) i see i forgot a much more immediate path to what you want.
23:12 raiph xilo: do you see the bit that says @dwarves{1}  ------>  @dwarves[0] ?
23:13 xilo yessir
23:14 raiph i think that looks simple
23:15 xilo how does that apply to enums tho
23:15 cognominal joined #perl6
23:16 raiph heh. it doesn't. so back to enums... :)
23:19 Gruber joined #perl6
23:19 baest_ joined #perl6
23:19 bruges_ joined #perl6
23:20 rindolf joined #perl6
23:20 xilo heh
23:21 xilo what i got works
23:21 xilo just could be cleaner
23:22 apejens joined #perl6
23:22 LoRe joined #perl6
23:24 raiph xilo: also, i'm confident that macros will have a big impact this year or next on how clean and sweet code can become
23:24 mtk joined #perl6
23:26 cognominal I agree with raiph
23:26 masak I hope you are right :)
23:27 masak there's some work to get there, espcially spec work.
23:29 rindolf joined #perl6
23:38 raiph joined #perl6
23:41 denisboyun_ joined #perl6
23:44 dalek v5: c0ad07c | (Tobias Leich)++ | lib/Perl6/P5Grammar.pm:
23:44 dalek v5: allow uppercase base markers
23:44 dalek v5: review: https://github.com/rakudo-p5/v5/commit/c0ad07c356
23:45 dalek v5: 09ec2c3 | (Tobias Leich)++ | t/spectest.data:
23:45 dalek v5: we pass num.t even if some tests are skipped
23:45 dalek v5: review: https://github.com/rakudo-p5/v5/commit/09ec2c3e27
23:55 dmol joined #perl6

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

Perl 6 | Reference Documentation | Rakudo