Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2009-06-28

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:00 simcop2387 joined #perl6
00:27 dduncan left #perl6
00:30 pugs_svn r27288 | lwall++ | [STD] add PROCESS::
00:30 pugs_svn r27288 | lwall++ | [STD] catch infinitely recursing OUTER::s
00:30 pugs_svn r27288 | lwall++ | [Cursor] use PERL6LIB to scan for .pm files
00:30 pugs_svn r27288 | lwall++ | [STD,etc.] implement real(er) use and imports
00:30 pugs_svn r27288 | lwall++ | [CORE] remove faked up Test and DEBUG packages
00:30 pugs_svn r27288 | lwall++ | [Makefile] switch to .syml for "symbol yml"; more snapables
00:30 pugs_svn r27288 | lwall++ | [Cursor] arrange .pm.syml filenames so you can't accidentally "use" a setting
00:30 pugs_svn r27288 | lwall++ | [std] new setting/module parser and .syml emitter
00:30 pugs_svn r27288 | lwall++ | [tloop,tlong] replish proggies I used for my talk
00:34 TimToady std: 88
00:34 p6eval std 27287:  ( no output )
00:37 TimToady std: 88
00:37 p6eval std 27287:  ( no output )
00:39 SmokeMachine joined #perl6
00:41 TimToady std: 88
00:41 p6eval std 27288:  ( no output )
00:44 last joined #perl6
00:46 xinming joined #perl6
00:47 PacoLinux joined #perl6
00:52 xinming__ joined #perl6
00:53 bsh joined #perl6
00:56 nbrown joined #perl6
00:56 PacoLinux joined #perl6
01:02 xinming joined #perl6
01:07 xinming_ joined #perl6
01:12 xinming joined #perl6
01:17 obra_ pmichaud: Where do I want to go looking in rakudo code for how @INC and PERL6LIB work?
01:17 s1n obra_: neither of them really work, and it's @*INC now
01:18 obra_ s1n: define "really work"?
01:18 obra_ http://pastie.org/526819 seems ~ok
01:19 s1n obra_: @*INC was hacked together, pmichaud said it's still up in the air with rakudo
01:19 obra_ actually, it's now behaving as expected.
01:19 obra_ I wonfer how I was screwing up before
01:20 s1n obra_: setting should available by default iirc (probably wrong right now)
01:20 xinming__ joined #perl6
01:21 s1n rakudo: use Safe;
01:21 p6eval rakudo 6c43f9:  ( no output )
01:21 s1n sounds okay
01:21 * obra_ nods. I'm messing around with modules and inc paths
01:22 obra_ And attempting to understand what would be involved in building the 'make install' target
01:22 s1n obra_: iirc @*INC is sorta just hacked together so people can actually use rakudo, but pmichaud said it will need work (and may change)
01:23 s1n obra_: i assume you're fixing parrot first
01:23 obra_ Hah. No.
01:23 obra_ :)
01:23 s1n i would start by fixing parrot
01:23 s1n otherwise you'll likely have to redo whatever hack you come up with now
01:24 obra_ I'm not likely to hack parrot ~ever.
01:24 obra_ I've done my time in the parrot mines ;)
01:27 obra_ the compiled perl6 target looks fairly reasonable, but we will need to inject system, vendor and site library directories for @*INC
01:28 xinming_1 joined #perl6
01:33 xinming_ joined #perl6
01:51 xinming joined #perl6
01:53 mjk joined #perl6
01:54 charsbar joined #perl6
01:56 xinming__ joined #perl6
01:58 molaf_xx joined #perl6
02:03 xinming_1 joined #perl6
02:11 xinming_ joined #perl6
02:17 xinming joined #perl6
02:32 xinming joined #perl6
02:38 mikehh_ joined #perl6
02:54 TimToady std: 88
02:54 p6eval std 27288: OUTPUT«ok 00:02 35m␤»
02:57 TimToady std: ok
02:57 p6eval std 27288: OUTPUT«Undeclared routine:␤   ok used at 1 ␤ok 00:02 35m␤»
02:57 TimToady std: use Test; ok
02:57 p6eval std 27288: OUTPUT«ok 00:02 35m␤»
02:58 [particle] joined #perl6
03:01 xinming joined #perl6
03:13 simcop2387-vnc joined #perl6
03:16 obra_ pmichaud: ping. For an installed rakudo, how would you like it to keep track of where the perl6 and site_perl6 directories are?
03:34 justatheory joined #perl6
03:50 Chillance joined #perl6
04:11 amoc joined #perl6
04:19 KyleHa joined #perl6
04:26 s1n pmichaud: still looking for a relman?
04:38 KyleHa rakudo: if 5 > my $a = 4 { say $a }
04:39 p6eval rakudo 6c43f9: OUTPUT«Unable to set lvalue on PAST::Val node␤in Main (src/gen_setting.pm:3225)␤»
04:50 xinming_ joined #perl6
05:00 meppl joined #perl6
05:01 amoc joined #perl6
05:06 breinbaa1 joined #perl6
05:10 shachaf joined #perl6
05:11 frettled joined #perl6
05:13 kcwu joined #perl6
05:15 betterworld joined #perl6
05:15 kane_ joined #perl6
05:17 pugs_svn r27289 | kyle++ | [t/spec] Skip the tests that are said to be skipped
05:30 mikehh_ joined #perl6
05:40 amoc joined #perl6
05:52 amoc__ joined #perl6
06:01 doroboy joined #perl6
06:02 amoc joined #perl6
06:06 amoc__ joined #perl6
06:19 nbrown_ joined #perl6
06:19 meppl joined #perl6
06:26 xinming joined #perl6
06:32 xinming__ joined #perl6
06:33 pmurias joined #perl6
06:37 xinming_1 joined #perl6
06:38 azawawi joined #perl6
06:38 azawawi obra_: ping
06:39 azawawi obra_: are you the one responsible for adding blogs to planetsix?
06:48 xinming joined #perl6
06:53 ejs joined #perl6
07:04 eMaX joined #perl6
07:08 xinming_ joined #perl6
07:14 azawawi joined #perl6
07:14 azawawi moritz_: ping
07:16 amoc joined #perl6
07:18 xinming__ joined #perl6
07:18 pmurias azawawi: if i want to check out the Padre refactoring Perl 6 support what do I have to do?
07:20 azawawi pmurias: it is still just an experimental script
07:21 azawawi pmurias: not in Padre..
07:21 azawawi pmurias: http://gist.github.com/137215
07:21 pmurias not in Padre-Plugin-Perl6?
07:22 azawawi pmurias: yeah i didnt have the time to include it yet... im refactoring S:H:P6 to support viv instead of redspans parsing...
07:23 azawawi pmurias: im actually thinking what the refactoring package name will be..
07:23 azawawi pmurias: maybe Devel::Perl6::Refactor
07:46 mvuets joined #perl6
07:53 amoc joined #perl6
07:58 meteorjay joined #perl6
08:03 Muixirt joined #perl6
08:13 M_o_C joined #perl6
08:16 iblechbot joined #perl6
08:27 REPLeffect joined #perl6
08:32 Khisanth joined #perl6
08:35 snarkyboojum joined #perl6
08:47 DemoFreak joined #perl6
08:54 mvuets left #perl6
08:55 mvuets joined #perl6
08:56 ejs joined #perl6
08:56 last joined #perl6
09:09 payload joined #perl6
09:09 mikehh Wow - I just ran the tests in 9 minutes on my new computer
09:10 mikehh couple of failures though
09:12 mikehh make test + make spectest start 09:56:46 BST - 10:05:01 BST
09:13 mikehh in fact started the build with make realclean + git pull etc at 09:53:18 BST
09:17 dukeleto joined #perl6
09:20 mikehh that's less than 12 minutes, including me typing the commands
09:21 amoc joined #perl6
09:26 mberends mikehh: impressive speed (the human is becoming the bottleneck)
09:27 mikehh It used to take me nealy an hour on my old computer
09:28 mikehh I built , smoked and did a fulltest on parrot in 43 minutes
09:29 mikehh nearly
09:29 mberends spectest now takes an hour on a little eee netbook
09:29 pugs_svn r27290 | azawawi++ | [S:H:P6] more emit_tokens_viv.pl cleanup
09:31 mvuets Is there some 'undef'?
09:32 pugs_svn r27291 | azawawi++ | [S:H:P6] support missing unless
09:35 mberends rakudo: my $a=5; $a = undef; say "gone" unless defined $a; # for mvuets
09:35 p6eval rakudo 6c43f9: OUTPUT«gone␤»
09:36 lichtkind joined #perl6
09:37 mvuets mberends, oh. So next question. I expect the followind to be worked, what's wrong? for 1..10 -> $odd, undef { .say }
09:38 lichtkind mberends: hello
09:38 mberends lichtkind: hello, you were very busy !
09:39 lichtkind mberends: thanks but just starting today
09:39 mberends mvuets: probably undef cannot be assigned to, it seems to work as an rvalue not an lvalue
09:40 lichtkind mberends: i have currently urge to complete appendix a, today will be regex modifier
09:40 lichtkind mberends: just wanted to ask you if you chacked last changes
09:41 mvuets mberends, i'm just thinking in perl5-style where such is possible: (undef, $min, $hour) = localtime
09:41 mberends rakudo: for 1..10 -> $odd, $even { $odd.say } # sorry, a bit hackish
09:41 p6eval rakudo 6c43f9: OUTPUT«1␤3␤5␤7␤9␤»
09:44 mberends lichtkind: after a week offline, the backlogs are too much :( it's nice to see over 360 items in the glossary, and with a bit of persuasion the content can be integrated into grok and u4x, bringing more brains onto the material :)
09:47 amoc rakudo: if 4 ~~ [1,2,3,4] { say 'fourrr!' }
09:47 p6eval rakudo 6c43f9: OUTPUT«sh: ./perl6: No such file or directory␤»
09:47 amoc rakudo: say 'ping'
09:47 p6eval rakudo 6c43f9: OUTPUT«sh: ./perl6: No such file or directory␤»
09:49 mvuets pugs: print 'ok' if 'aóe' ~~ m:a/aoe/;
09:49 p6eval pugs: OUTPUT«Error eval perl5: "if (!$INC{'Pugs/Runtime/Match/HsBridge.pm'}) {␤    unshift @INC, '/home/evalenv/pugs/perl5/​Pugs-Compiler-Rule/lib';␤    unshift @INC, '/home/evalenv/pugs/third-party/Parse-Yapp/lib';␤    eval q[require 'Pugs/Runtime/Match/HsBridge.pm'] or die $@;␤}␤'Pugs::Runtime…
10:03 mvuets mberends, oops, i made a mistake with '.say', should be '$odd.say'. Your variant with two scalars is obvious, but isn't what i want.
10:11 amoc rakudo: say 'ping again'
10:11 p6eval rakudo 6c43f9: OUTPUT«ping again␤»
10:12 BinGOs joined #perl6
10:13 mvuets rakudo: my $s; (undef, $s) = 1..3; say $s;  # mberends, undef can be lvalue as well as in perl 5. So that question is open.
10:13 p6eval rakudo 6c43f9: OUTPUT«2␤»
10:14 jonathan_ joined #perl6
10:15 mvuets Perl 6 behaves like 'use strict' by default?
10:16 mberends mvuets: yes, that much is certain :)
10:18 mvuets Who is responsible for changes of synopseses?
10:21 lichtkind joined #perl6
10:29 Jedai joined #perl6
10:30 mberends mvuets: each Synopsis names Author(s) and Maintainer(s), but technically all Pugs committers may make changes. "It's easier to ask forgiveness than it is to get permission" -- Grace Hopper
10:32 mvuets mberends, i see, thank you. Seems i've found appropriate ML to ask.
10:33 ejs0 joined #perl6
10:34 jnthn hi all
10:36 freeplatypus joined #perl6
10:38 mberends jnthn, \o
10:40 jnthn mberends: hi! :-)
11:00 lichtkind jnthn: cheers
11:16 ejs joined #perl6
11:16 mberends jnthn: if Parrot's freeze() segfaults on bytecode generated by Rakudo, should I pursue that in #parrot or #perl6?
11:17 pmurias it seems a parrot bug
11:18 mberends pmurias, thanks
11:21 jnthn freeze opcode?
11:21 last joined #perl6
11:21 jnthn Yeah, segfault is Parrot bug most likely though.
11:23 snarkyboojum joined #perl6
11:29 mberends jnthn: yes the freeze opcode in PIR, attempting to make a library file for multiple compiled modules. I'll reduce the problem to a small test case.
11:31 Su-Shee joined #perl6
11:31 Su-Shee good morning.
11:31 fridim joined #perl6
11:43 elmex joined #perl6
11:57 xinming joined #perl6
12:02 [particle]1 joined #perl6
12:03 masak joined #perl6
12:03 masak ahoj!
12:04 mberends ahoj masak!
12:04 masak mberends! 好九不见了!
12:05 masak dang, wrong 'jiu'... :)
12:05 mberends uh-oh, font tail :/
12:05 masak should be 久...
12:05 mberends fail even
12:05 masak yes, Chinese and Linux are still a bad match, unfortunately.
12:06 masak there's some .deb package, I think...
12:06 pugs_svn r27292 | azawawi++ | [S:H:P6] Added more keywords...
12:06 Su-Shee right font, correct locale, scim and you're done. :)
12:10 masak hokay, plans for today: a bit of Web.pm/Hitomi work, and making my SVG Druid board rotate.
12:25 Whiteknight joined #perl6
12:27 mvuets pugs: my $s = 'à'; say "{$s.bytes} {$s.codes} {$s.graphs}";
12:27 p6eval pugs: OUTPUT«2 1 1␤»
12:28 masak pugs++
12:28 mvuets masak, sorry?
12:28 masak mvuets: wasn't that the correct answer?
12:29 mvuets masak, according to http://perlgeek.de/blog-en/​perl-5-to-6/17-unicode.html it might be "3 2 1". I guess.
12:29 masak oh.
12:29 masak pugs--, then. :)
12:30 mvuets (= Someone counts scores?
12:30 pochi karma pugs
12:30 masak @karma pugs
12:30 lambdabot pugs has a karma of 3
12:30 masak @karma rakudo
12:30 lambdabot rakudo has a karma of 21
12:31 mvuets I see. Strange hehe.
12:32 pochi what's the correspondence between a string and .bytes?
12:32 masak pochi: in general, a string doesn't even know its .bytes
12:33 mvuets pugs: my $s = "\x61\xcc\x80"; say "$s {$s.bytes} {$s.codes} {$s.graphs}";
12:33 p6eval pugs: OUTPUT«à 5 3 3␤»
12:33 masak pochi: because strings are normally higher-abstraction beasts than byte-level.
12:33 masak admittedly, I don't get all the subtleties around strings and buffer types yet.
12:34 pochi wouldn't the number of bytes for 'à' depend of what encoding was being used?
12:35 masak obra_: there's some real disincentive to perpetuating PERL6LIB in other systems. it's just a throwaway short-term solution in Rakudo.
12:35 mvuets Maybe Perl 6 assumes everything UTF-8?
12:35 masak pochi: yes, it would.
12:35 masak pochi: I'm not even sure the Str type will have a .bytes method.
12:36 masak mvuets: well, it does in many locales, I think.
12:36 masak mvuets: but not everywhere.
12:36 pochi how did you solve the url encoding problem?
12:36 elmex_ joined #perl6
12:37 masak pochi: I nagged pmichaud to create .encode and .decode methods. :)
12:37 pochi ah :)
12:38 masak actually, he volunteered, as a way to resolve the situation.
12:38 pochi pmichaud++
12:39 masak mvuets: script files use strict by default. IIUC, -e scripts will still be unstrict. but no implementation does that currently.
12:40 mvuets masak, aha, thank you. Good news (:
12:41 masak details such as these can often be found in the synopses, by the way. it's a lot of reading, but what sweet rewards!
12:41 mvuets I'm going to read all that.
12:43 mvuets pugs: my $s = "\c[LATIN SMALL LETTER A, COMBINING GRAVE ACCENT]"; print $s.bytes, $s.codes, $s.graphs;
12:43 p6eval pugs: OUTPUT«321»
12:44 mvuets Yahoo.
12:46 meppl joined #perl6
12:48 mvuets How to say "\x{0041}" in Perl 6? (Unicode string literal by code.)
12:52 amoc rakudo: say "\c[0041]"; # test
12:52 p6eval rakudo 6c43f9: OUTPUT«)␤»
12:54 azawawi joined #perl6
12:54 azawawi hi
12:54 azawawi masak: pingo
12:55 masak azawawi: pongo.
12:55 azawawi :)
12:55 masak (leaving briefly in a minute, though.(
12:55 azawawi masak: what's a good cpan package name for Perl 6 refactoring in your opinion?
12:55 masak hm.
12:55 masak Perl6::Refactoring ?
12:55 azawawi masak: i was thinking something like Devel::Perl6::Refactor
12:56 masak that works.
12:56 mvuets amoc, nice. Just is specified as decimal.
12:56 azawawi masak: i heard Perl6::* is for implementing P6 in P5
12:57 masak ah, yes. it often is.
12:57 azawawi hmmm
12:57 masak sushi &
12:57 azawawi nooooo :)
12:57 azawawi masak: have fun :)
13:01 mvuets perl6: 'aaaa' ~~ m/a|aaa|aa/; print $/;
13:01 p6eval pugs: OUTPUT«Error eval perl5: "if (!$INC{'Pugs/Runtime/Match/HsBridge.pm'}) {␤    unshift @INC, '/home/evalenv/pugs/perl5/​Pugs-Compiler-Rule/lib';␤    unshift @INC, '/home/evalenv/pugs/third-party/Parse-Yapp/lib';␤    eval q[require 'Pugs/Runtime/Match/HsBridge.pm'] or die $@;␤}␤'Pugs::Runtime…
13:01 p6eval ..rakudo 6c43f9: OUTPUT«a»
13:01 p6eval ..elf 27292: OUTPUT«Global symbol "$_47" requires explicit package name at (eval 124) line 4.␤ at ./elf_h line 5881␤»
13:02 mvuets Something wrong with Pugs' regex, nothing work at all /: And isn't implemented in Rakudo yet?
13:04 jnthn mvuets: Rakudo doesn't do LTM on | yet, it treats it like it's ||.
13:04 mvuets jnthn, ok. What is LTM?
13:05 jnthn mvuets: Longest Token Matching
13:05 jnthn The thing that makes a|aaa|aa give aaa in this case rather than just the first match.
13:05 mvuets jnthn, oh, thank you. A lot of work as i see (:
13:06 mvuets Aha, just read about | and ||. Understand now. P6 is amazing!
13:20 skids joined #perl6
13:20 last joined #perl6
13:28 finanalyst joined #perl6
13:34 Chillance joined #perl6
13:35 pmurias joined #perl6
13:38 dukeleto joined #perl6
13:42 finanalyst i have written a routine in parrot (.pir), how can I use it in perl6?
13:42 phenny finanalyst: 22 Jun 21:26Z <japhb> tell finanalyst I wrote the OpenGL bindings.  They do work from both PIR and Perl 6 (in Rakudo).  Or at least, WFM.  :-)  The black window problem is a (really long-standing) bug in Parrot NCI when JIT is enabled.  You need to configure parrot with --jitcapable=0.
13:43 finanalyst japhb: ping
13:43 finanalyst @seen japhb
13:43 lambdabot japhb is in #perl6. I last heard japhb speak 1d 16h 50m 10s ago.
13:49 TimToady mvuets: in theory, when working at grapheme level, Str isn't supposed to know .codes either, since that depends on the normalization form
13:49 TimToady but rakudo is really still working at the codes level all the time
13:57 mvuets TimToady, what is a normalization form?
13:57 finanalyst phenny: tell japhb --jitcapable=0 worked but on reviewing opengl.pm noticed createmenu is ignored.
13:57 phenny finanalyst: I'll pass that on when japhb is around.
14:03 TimToady mvuets: short answer, whether c[LATIN SMALL LETTER A, COMBINING GRAVE ACCENT] is represented by one codepoint or two
14:04 TimToady mvuets: would you like a commit bit to the pugs repo so you can work on tests and specs?
14:04 TimToady if so, /msg me your email addr and preferred svn nick
14:10 icwiener joined #perl6
14:13 mvuets TimToady, wow. I'll be greatly appreciated for such ability.
14:14 mvuets /say_to TimToady!perl6%irc.freenode.net@irc.xmpp.org.ru E-mail: maxim.vuets@gmail.com and nick mvuets is ok.
14:14 TimToady I don't think your alias worked :)
14:15 mvuets TimToady, damnit, that was verbose input (:
14:15 TimToady commitbit sent
14:15 TimToady it's customary to add yourself to AUTHORS as your first test commit
14:20 mvuets TimToady, got it. Thank you.
14:21 amoc joined #perl6
14:26 amoc joined #perl6
14:27 TimToady shower &
14:42 hercynium joined #perl6
14:44 jferrero joined #perl6
15:03 pmurias joined #perl6
15:17 kst` joined #perl6
15:23 M_o_C joined #perl6
15:40 viklund joined #perl6
15:41 viklund Good Evening.
15:42 SmokeMachine joined #perl6
15:42 obra_ masak: If the plan is to kill PERL6LIB, what's the right way to specify a search path for modules from %*ENV?
15:44 nihiliad joined #perl6
15:45 viklund Isn't the idea that smth like PERL6LIB will still be for user installed modules but not for things installed by administrators and package-managers
15:50 obra_ the environment variable is traditionally for supplementing the path set up for global and site lib directories
15:52 viklund yes, well, I guess it will be used for that somehow anyway, but since we allow any characer in module names we need to handle filesystems that don't do that
15:54 Muixirt joined #perl6
15:55 viklund and I don't see any reason to only allow certain file-system locations in the module database, so that can still be held separate
15:55 viklund obra_: so basically I think I agree with you ;)
15:57 viklund but after a 'make install' PERL6LIB shouldn't be involved for using that module anymore
15:57 obra_ what?
15:58 obra_ PERL6LIB is the way to, at runtime, say "hey rakudo, look over here for some installed modules"
15:58 viklund ;)
15:58 obra_ so that, say, an app can have a private lib dir.
15:58 viklund ahh
15:58 obra_ at least that's how it works in Perl 5.
15:58 viklund that's what you're talking about
15:59 viklund for that thing I don't know
15:59 obra_ ..and python..and ruby.
15:59 obra_ and I'd presume other languages.
15:59 obra_ If that mechanism is going away, what's the replacement?
16:01 viklund I don't know how it's going to work for doing it at runtime
16:03 obra_ Well, my current change doesn't change the mechanism; It just moves it into the setting. I'll wait for pmichaud to comment - http://github.com/obra/rakudo/commit/38​87db958da3ae34732d0431e132637c2f973060
16:04 pmurias obra_: it think keeping the module data in a database of some sorts is the intended solution
16:05 obra_ pmichaud and I talked some about that at YAPC. It sounded like the database was intended as a cache rather than a canonical source of truth.
16:10 obra_ But now, I'm being pulled off to breakfast.
16:10 obra_ *wave*
16:10 mberends obra_: a module library/database might also be the canonical source of truth, to avoid Unicode name mangling issues and to support :auth and :ver as per S11.
16:12 alester joined #perl6
16:12 mberends there is a project to attempt providing such a database: http://gitorious.org/parrot-module-lib/main
16:13 masak S19 refers to PERL6LIB as "A list of directories in which to look for ad hoc Perl library files.", but it also notes that this is speculative, since library loading is not yet nailed down.
16:13 masak not nailed down, it goes on, "except insofar as S11 mandates various behaviors incompatible with mere directory probing."
16:15 mberends PERL6LIB could supplement directories as a fallback when a database query cannot provide a suitable match.
16:16 masak seems [particle]1 wrote that part of S19, on 2008-12-19.
16:17 masak mberends: possibly. as long as the precendence is obvious to the user.
16:18 masak ever since TimToady told me sternly that PERL6LIB is a short-term measure (this was shortly before I created proto), I've always thought about it as going away entirely. but maybe it's not.
16:18 mberends we should agree on a precedence spec, I would think database first
16:18 viklund yes, otherwise the database seems kind of meaningless
16:19 viklund but of course, the user should be able to add stuff before the system-libs are searched
16:19 viklund hmm, that would be an argument for PERL6LIB (or similar) first
16:20 mberends viklund: hmm ;)
16:20 masak I'm not sure I like the dual nature of database-cum-PERL6LIB.
16:20 masak it seems more confusing than going entirely database.
16:21 mberends but filesystem is nice for ad hoc work, and P5 continuity
16:21 viklund how do you add smth to the database as a normal user?
16:21 mberends viklund: you may not be able to, it should be an admin operation
16:21 masak viklund: with a simple command, I'd hope.
16:22 viklund say I want to play around with stuff in a local directory (or several) first, how is that supposed to be suppored
16:22 masak if we keep PERL6LIB around, some form of the unicode squashing problem is bound to hit us.
16:22 viklund iit is adding a slightly more involved step
16:24 mberends the simplest filesystem default is to search from . (current directory) with or without PERL6LIB
16:24 viklund is this a bug:
16:25 viklund rakudo: for <a b> { say "The loop var: {$^a}" }
16:25 p6eval rakudo 6c43f9: OUTPUT«too few arguments passed (0) - 1 params expected␤in Main (/tmp/QTHb1KcxJI:2)␤»
16:25 mberends afk &
16:25 viklund should the {} in strings be a block that takes params?
16:27 masak viklund: it's not a bug.
16:28 masak it's a strange phenomenon emerging from the fact that {} in qq strings are proper blocks.
16:28 viklund slightly counterintuitive
16:28 masak nod.
16:29 masak but already discussed once.
16:29 masak I'm looking for the RT ticket now.
16:29 viklund I can see how it happens, but I just wanted it too DWIM ;)
16:29 viklund is there anyway of passing args to such a block?
16:30 masak rakudo: for <a b> { $^a; say "The loop var: {$a}" }
16:30 p6eval rakudo 6c43f9: OUTPUT«The loop var: a␤The loop var: b␤»
16:30 masak viklund: that's what I tend to do.
16:31 viklund strange...
16:31 viklund so the ^ isn't part of the name?
16:32 masak what's part of the name of a var is an increasingly philosophical question in Perl 6. :)
16:32 viklund :D
16:33 masak viklund: the concrete answer being that if you have referred to $^a, you can then refer to $a. good when having inner blocks, as here.
16:34 viklund ideed, quite handy
16:34 dukeleto joined #perl6
16:35 masak that part of the spec fell out from my mistreatment of placeholder parameters. :)
16:36 viklund what?
16:36 viklund oh, well
16:37 masak viklund: I submitted the (non-)bug you asked about, and the result was the spec change that allowed $a after $^a.
16:37 masak ah, S06:1533.
16:38 FurnaceBoy joined #perl6
16:39 dmpk2k joined #perl6
16:43 masak using git to dig for specific changes is an interesting endeavour. the line S06:1533 was added by pmichaud, but only because TimToady had made the change to the spec at its previous location after it had been moved to the Pugs repo.
16:43 justatheory joined #perl6
16:46 jan_ joined #perl6
16:47 obra_ win 15
16:47 Psyche^ joined #perl6
16:48 * masak gives up on trying to find the RT ticket
16:50 viklund win 15?
16:52 jnthn fail 18
16:52 jnthn ;-)
17:05 icwiener_ joined #perl6
17:08 eMaX joined #perl6
17:24 Lorn joined #perl6
17:41 lichtkind joined #perl6
17:41 pochi joined #perl6
17:50 Lorn joined #perl6
17:50 Lorn joined #perl6
18:01 moritz_ re
18:01 phenny moritz_: 27 Jun 22:15Z <eternaleye> ask moritz_ Is it known that &infix:<...> fails on //=, but = $a // $b works fine?
18:01 phenny moritz_: 27 Jun 22:16Z <eternaleye> tell moritz_ example: my @seed = 0, 1; my @fibs = @seed ... { state $count //= 0; $count++ < 100 ?? $^a + $^b !! () }; .say for @fibs
18:04 eternaleye Hi moritz_
18:05 Molaf joined #perl6
18:10 moritz_ hey eternaleye
18:11 moritz_ that doesn't look like it's related to infix:<...> at all
18:11 moritz_ rakudo: sub a { state $x //= 3; $x++; say $x }; a(); a()
18:12 p6eval rakudo 6c43f9: OUTPUT«4␤4␤»
18:12 moritz_ rakudo: sub a { state $x = 3; $x++; say $x }; a(); a()
18:12 p6eval rakudo 6c43f9: OUTPUT«4␤5␤»
18:15 japhb finanalyst: yes, there are a number of things that cannot be expressed directly using Parrot's NCI
18:15 phenny japhb: 13:57Z <finanalyst> tell japhb --jitcapable=0 worked but on reviewing opengl.pm noticed createmenu is ignored.
18:15 japhb thanks, phenny
18:15 amoc er...
18:15 amoc rakudo: state $x //= 3; $x.say
18:15 p6eval rakudo 6c43f9: OUTPUT«Null PMC access in find_method()␤in Main (/tmp/0WLeDM7CkS:2)␤»
18:15 amoc rakudo: my $x //= 3; $x.say
18:15 p6eval rakudo 6c43f9: OUTPUT«3␤»
18:16 finanalyst japhb: good evening
18:16 japhb finanalyst: Parrot NCI needs an overhaul, but I believe that is queued behind a bunch of other huge things.  For now, I'm still working through finding out what *can* be done, and how painful it may or may not be.
18:17 finanalyst japhb: i am looking for a way to get (simple) GUI into perl6
18:17 japhb finanalyst: OpenGL 1.0 seems decent so far, but I haven't even gotten to texturing
18:17 finanalyst but GLUT without menus is a bit of a pain
18:18 amoc strange -
18:18 amoc rakudo: { state $x //= 3; $x.say }
18:18 finanalyst i got SDL font working
18:18 p6eval rakudo 6c43f9: OUTPUT«3␤»
18:18 amoc rakudo: state $x //= 3; $x.say
18:18 p6eval rakudo 6c43f9: OUTPUT«Null PMC access in find_method()␤in Main (/tmp/RBMCxrMHbk:2)␤»
18:18 amoc rakudo: state $a = 1; $a.say
18:18 p6eval rakudo 6c43f9: OUTPUT«1␤»
18:18 japhb finanalyst: no argument, but I just don't have a way to express it yet.  Ideas welcome.
18:19 japhb Callbacks are ... very suboptimal right now.
18:19 finanalyst japhb: if i have a sub xxx in mod.pir how do I call it in a perl6 program?
18:20 finanalyst use mod; xxx()    doesnt seem to work
18:21 synth joined #perl6
18:24 japhb finanalyst: Assuming mod.pir is in runtime/parrot/library/ , then 'use mod:from<parrot>;'
18:24 finanalyst suppose it is in the current directory?
18:25 desertm4x joined #perl6
18:26 japhb finanalyst: Then I don't know.  I suppose you could wrap the whole thing in 'Q:PIR{}' and load it as a Perl 6 file ...
18:27 japhb finanalyst: the problem is that when you 'use Foo:from<parrot>' you're asking *parrot* to find and load Foo, not Perl 6.
18:28 justatheory joined #perl6
18:29 finanalyst ok. but when mod.pm is compiled to mod.pir it can be <use>d by a perl6 program and the sub's are visible
18:29 finanalyst i tried looking at the compiled mod.pir but very confusing
18:30 kidd_ joined #perl6
18:30 japhb A .pir that is a conversion from a .pm contains a lot of extra stuff that Rakudo uses to (among other things) make the compile-time environment aware of all the stuff that got loaded, in all the right ways (instantiating types, etc.)
18:32 japhb Plus, .pm -> .pir compile is unoptimized.  It's not that all the individual emitted snippets are particularly bad, there's just no optimization between snippets.  So you have multiple loads of the same variable, no loop constant hoisting, etc.
18:32 finanalyst I just got a sub working from a .pir file, but it broke rakudo
18:33 finanalyst it generated an SDL window though
18:33 japhb Consider that a success.
18:33 japhb Right now, anything you get working with NCI is an unmitigated win.
18:36 finanalyst except i now havent a clue how to go further.
18:46 Tene japhb: the current directory is in the parrot search path
18:46 Tene so you should be able to put a .pir in $CWD just fine
18:54 finanalyst Tene: i got a .sub from a .pir file that was in the current directory working.
18:55 kst joined #perl6
18:57 pugs_svn r27293 | azawawi++ | [S:H:P6] more keywords support...
19:14 Su-Shee left #perl6
19:19 last_ joined #perl6
19:20 DemoFreak joined #perl6
19:22 PacoLinux joined #perl6
19:31 DemoFreak joined #perl6
19:34 lichtkind joined #perl6
19:39 eternaleye phenny: tell masak Why make PERL6LIB be a list of _directories_? Why not have the tools that generate a database have a switch, --global, that only works for UID 0, and everyone else passes, say, --database-location and it builds an unpriviledged database?
19:39 phenny eternaleye: I'll pass that on when masak is around.
19:40 eternaleye phenny: And then PERL6LIB can point at individual _databases_
19:40 eternaleye phenny: tell masak And then PERL6LIB can point at individual _databases_
19:40 phenny eternaleye: I'll pass that on when masak is around.
19:41 eternaleye phenny: tell masak Or even simpler, just have --database-locaton and use filesystem permissions
19:41 phenny eternaleye: I'll pass that on when masak is around.
19:42 eternaleye phenny: tell masak Then, @*INC can be an Array of ModuleLibrary or summat, with introspection and everything
19:42 phenny eternaleye: I'll pass that on when masak is around.
19:48 eternaleye TimToady: ^^^ thoughts?
19:56 TimToady a directory *is* a kind of database :)
19:56 TimToady but yes, that is more or less what I've been thinking
19:58 eternaleye Thanks TimToady
20:00 eternaleye I was thinking of "database" as anything which provides the appropriate interface for module-loading, which could be implemented with directories, but which certainly _wouldn't_ just be a flat namespace-as-directories tree like p5
20:02 eternaleye The nice thing about that is it lets us do stuff like what 'rip' does in Ruby, with virtual environments, etc (although :version and :auth go a long way towards making that unnecessary)
20:04 ejs joined #perl6
20:04 eternaleye Sysadmins would probably appreciate the ability to prepackage/bundle a full database for mirroring to systems, though
20:05 eternaleye As would software distributors
20:07 rfordinal joined #perl6
20:08 jnthn ahoj rfordinal :-)
20:09 rfordinal jnthn : ahoooj :) ako sa mas?
20:10 jnthn rfordinal: Mam sa dobre...isiel som na dovolenku. :-)
20:10 jnthn A ty?
20:10 rfordinal jnthn : ja som odpocival vela cez weekend. tak dobre :-) dovolenka daleko
20:13 jnthn Ah, ja som oddychoval dnes tiez...cestoval som celu vceru vlakom z talianska.
20:14 jnthn Praca zajtra...
20:15 * jnthn suddenly realizes this is #perl6, not #slovakia.pm!
20:17 mberends jnthn: ah, dobro večer!
20:17 mvuets jnthn, a bit familiar with russian (:
20:17 jnthn mberends: dobre :-)
20:18 jnthn mvuets: Да, правда.
20:18 mvuets jnthn, (: отлично!
20:19 TimToady I was raised to think that правда means Soviet propaganda.  :)
20:20 jnthn TimToady: Heh. Actually, I was quite surprised when wandering around some museums in Russia to notice so many of them appeared to say "family". Then I discovered that in Russian, rodina means motherland, not family. :-)
20:20 jnthn erm, so many of the propaganda posters...
20:20 mvuets TimToady, it's just 'truth'.
20:21 TimToady mvuets: yes, was a joke
20:21 mvuets jnthn, rodyna means family but in ukrainian.
20:23 jnthn mvuets: Oh, in Ukrainian too?
20:23 jnthn mvuets: In Slovak rodina is family also.
20:24 jnthn Ukrainian mostly to me felt like a mix of Russian and Slovak. :-)
20:26 mvuets jnthn, aye. The same language family. WP says that Ukrainian is a language of the East Slavic subgroup of the Slavic languages.
20:27 jlmoko left #perl6
20:29 jnthn mvuets: Right. Slovak is west slavic. But the east and west slavic languages seem gramatically close.
20:29 pugs_svn r27294 | lwall++ | [STD] just comments and code rearrangements
20:29 jnthn IIRC, Ukrainian has a vocative case also.
20:30 mvuets jnthn, right.
20:30 jnthn Curiously, so does Czech.
20:31 jnthn Czech is really close to Slovak though.
20:31 mvuets Oh, btw. What is that STD or STD.pm?
20:31 jnthn STD.pm is the official Perl 6 grammar.
20:32 mvuets For PGE?
20:32 jnthn For any Perl 6 implementation.
20:32 jnthn See http://svn.pugscode.org/pugs/src/perl6/STD.pm
20:32 jnthn Rakudo should use this eventually.
20:32 mvuets Does Rakudo use it as is?
20:33 jnthn Not yet
20:33 jnthn But we try and follow it to the extent we can.
20:33 jnthn And are aiming to increasingly converge.
20:34 mvuets So it is taken piece by piece as Rakudo being implemented?
20:34 jnthn Right, but sometimes Rakudo's implementation of the grammar engine does not yet support things as they are written in STD.pm so we have to change it a bit.
20:34 jnthn Some bits we just copy-paste though. :-)
20:35 mvuets I see now. Something else i need to know about Perl 6 except specs, spectests and STD?
20:36 jnthn In terms of the language spec, that's probably most of it.
20:38 mvuets Such things as localtime, open, stat, opendir... will go to S30?
20:38 eMaX joined #perl6
20:39 mberends mvuets: there are enough unknowns that we still often just try to write any application to run on Rakudo, and discuss the problems here.
20:41 mberends mvuets, and in some cases, the discussion even leads to improvements in the language specification and soon thereafter the implementation :)
20:43 mvuets OK. Does Larry appear sometimes here?
20:43 mberends mvuets: who do you think TimToady is ;)
20:43 jnthn mvuets: You already talked to him. :-)
20:44 mvuets omg (:
20:49 PacoLinux joined #perl6
20:56 mvuets What script is used to convert pugs/docs/Perl6/Spec/*.pod to feather.perl6.nl/syn/*.html?
21:01 mberends mvuets: possibly pugs/docs/feather/script/update-syn
21:12 chipdude joined #perl6
21:12 chipdude g'day
21:12 mvuets mberends, tnx.
21:13 mberends chipdude, g'day    mvuets, np :)
21:15 chipdude I visited to find the current spec, and the topic led me to it.  so I'm happy
21:15 chipdude := ::= and =:= were my current items of interest
21:35 eternaleye You know what would be a cool JAPH-ish thing to write in p6? an infix:<ö>( Int $a, Int $b ) operator that creates an $a x $b ascii-art version of Camelia.
21:35 eternaleye Extra points if you use an ImageMagick module and aalib
21:36 eternaleye or caca, for colored asciiart
21:41 pmichaud good afternoon, #perl6
21:41 jnthn hi pmichaud
21:42 eternaleye Hi pmichaud
21:43 eternaleye jnthn: By the way, any insights into where &foo.signature.params is getting flattened?
21:44 jnthn eternaleye: probably when .elems calls !flatten
21:45 eternaleye Hm. Is there a good way around that? It's a problem for getting infix:<...> to support slurpy generators.
21:49 pmichaud much of it will change when we switch to having true captures instead of List/Array
21:49 pmichaud but when is .elems being called?
21:49 chipdude eternaleye: extra credit, rather, for whoever devises a worm to delete all instances of ImageMagick everywhere
21:50 jnthn pmichaud: It isn't there, but .elems gives the wrong answer as does .perl
21:50 pmichaud oh, well .perl should certainly be fixed.
21:50 chipdude that piece of BQS has personally wasted enough of my time that I am willing to give a verbal beatdown, in public, to whowever is responsible
21:51 eternaleye jnthn: as wel as .kv, .values, .keys...
21:51 eternaleye *well
21:51 eternaleye _every_ method gets it wrong
21:51 jnthn pmichaud: Well, for an array of hash normally, should we really make an array of ObjectRef holding the Hash?
21:51 jnthn If so, then it's the construction of that hash that is wrong.
21:51 jnthn Rather than the methods.
21:52 pmichaud normally an array of hash would be an array of ObjectRef, yes.
21:52 pmichaud actually Perl6Scalar
21:52 jnthn ah, that's what is wrong then.
21:52 jnthn ok
21:52 jnthn So it's the signature building that isn't right.
21:53 pmichaud rakudo:  my %b = 1,2;  my @a = %b;  say @a[0].PARROT;
21:53 p6eval rakudo 6c43f9: OUTPUT«Perl6Pair␤»
21:53 pmichaud oops
21:53 pmichaud rakudo:  my %b = 1,2;  my @a = \%b;  say @a[0].PARROT;
21:53 p6eval rakudo 6c43f9: OUTPUT«␤»
21:53 pmichaud hmmmmm
21:53 pmichaud rakudo:  my %b = 1,2;  my @a; @a[0] = %b; say @a[0].PARROT;
21:53 p6eval rakudo 6c43f9: OUTPUT«␤»
21:53 pmichaud that's.... odd
21:54 pmichaud rakudo:  my %b = 1,2;  my @a; @a[0] = %b; say @a[0]<1>;
21:54 p6eval rakudo 6c43f9: OUTPUT«2␤»
21:54 pmichaud maybe parameterized roles are getting in the way?
21:54 pmichaud or perhaps it's the subscript
21:54 pmichaud I'm guessing the subscript might be a little off.
21:55 pmichaud rakudo:  my %b = 1,2;  my @a; @a[0] = %b; say @a[0].WHAT;
21:55 p6eval rakudo 6c43f9: OUTPUT«Hash()␤»
21:55 jnthn Yeah, the parametric roles may well be spoiling the .PARROT output.
21:56 jnthn Since under the hood it's a punned class there.
21:56 pmichaud I would've still expected to see the Perl6Scalar, though.
21:56 jnthn Oh, wait
21:56 jnthn It was an untyped array
21:56 jnthn So it shouldn't be.
21:56 pmichaud rakudo:  my %b = 1,2;  my $a = %b;  say $a.PARROT;
21:56 jnthn Untyped ones don't get any reblessing or anything extra.
21:56 p6eval rakudo 6c43f9: OUTPUT«␤»
21:57 pmichaud maybe .PARROT is hsoed
21:57 pmichaud *hosed
21:57 jnthn Maybe
21:57 pmichaud rakudo:  my %b = 1,2;  my $a = %b;  say $a.WHAT;
21:57 p6eval rakudo 6c43f9: OUTPUT«Hash()␤»
21:57 jnthn rakudo: my %b; say %b.PARROT
21:57 p6eval rakudo 6c43f9: OUTPUT«Perl6Hash␤»
21:57 jnthn rakudo: my %b; my $a = %b; say %b.PARROT; say $a.PARROT;
21:57 p6eval rakudo 6c43f9: OUTPUT«Perl6Hash␤Perl6Hash␤»
21:58 jnthn rakudo: my %b = 1, 2; my $a = %b; say %b.PARROT; say $a.PARROT;
21:58 p6eval rakudo 6c43f9: OUTPUT«␤␤»
21:58 jnthn epic wtf
21:58 pmichaud oh, it's the 1,2
21:58 pmichaud my %b;  my @a;  @a[0] = %b;  say @a[0].PARROT;
21:58 pmichaud rakudo:my %b;  my @a;  @a[0] = %b;  say @a[0].PARROT;
21:58 pmichaud rakudo: my %b;  my @a;  @a[0] = %b;  say @a[0].PARROT;
21:58 p6eval rakudo 6c43f9: OUTPUT«Perl6Hash␤»
21:59 pmichaud ohhhhh, I know what's going on.
21:59 pmichaud the new dispatcher dereferences $a and @a[0] before calling .PARROT
21:59 pmichaud so we never see the Perl6Scalar
21:59 jnthn oh!
21:59 jnthn heh
21:59 eternaleye rakudo: my %foo = a => 1, b => 2; my @bar[0] = %foo, say @bar.kv.perl
21:59 p6eval rakudo 6c43f9: OUTPUT«Statement not terminated properly at line 2, near "[0] = %foo"␤in Main (src/gen_setting.pm:3225)␤»
21:59 eternaleye rakudo: my %foo = a => 1, b => 2; my @bar[0] = %foo; say @bar.kv.perl
21:59 p6eval rakudo 6c43f9: OUTPUT«Statement not terminated properly at line 2, near "[0] = %foo"␤in Main (src/gen_setting.pm:3225)␤»
21:59 pmichaud so perhaps .PARROT needs to become PARROT(...)
22:00 eternaleye rakudo: my %foo = 'a' => 1, 'b' => 2; my @bar[0] = %foo; say @bar.kv.perl
22:00 p6eval rakudo 6c43f9: OUTPUT«Statement not terminated properly at line 2, near "[0] = %foo"␤in Main (src/gen_setting.pm:3225)␤»
22:00 pmichaud eternaleye: rakudo doesn't like "my" before a subscript
22:00 pmichaud eternaleye: rakudo doesn't like  "my @bar[0]"
22:00 eternaleye rakudo: my %foo = a => 1, b => 2; my @bar; @bar[0] = %foo; say @bar.kv.perl
22:00 p6eval rakudo 6c43f9: OUTPUT«[0, {"a" => 1, "b" => 2}]␤»
22:01 eternaleye rakudo: my %foo = a => 1, b => 2; my %baz = c => 3, d => 4; my @bar; @bar = %foo, %baz; say @bar.kv.perl
22:01 p6eval rakudo 6c43f9: OUTPUT«[0, "a" => 1, 1, "b" => 2, 2, "c" => 3, 3, "d" => 4]␤»
22:01 eternaleye AHA
22:01 snarkyboojum joined #perl6
22:02 pmichaud that looks correct to me, fsvo "correct"
22:02 eternaleye _that_ is exactly the structure .params has
22:02 eternaleye And Array of _one-element_ hashes, the result of flattening
22:02 eternaleye *an
22:02 pmichaud uh?
22:02 pmichaud those aren't hashes
22:02 pmichaud those are Pairs
22:02 mvuets left #perl6
22:03 eternaleye rakudo: my %foo = a => 1, b => 2; my %baz = c => 3, d => 4; my @bar; @bar = %foo, %baz; say @bar[0].WHAT
22:03 pmichaud the   @bar = %foo, %baz;   flattens %foo and %baz into lists of Pairs
22:03 p6eval rakudo 6c43f9: OUTPUT«Pair()␤»
22:03 eternaleye Ah
22:03 eternaleye H,m, then that's not ti
22:03 pmichaud because a hash in list context is a list of Pairs
22:03 eternaleye *Hm *it
22:03 eternaleye I thought the issue in .params might be a lack of backslashes, but I guess not
22:04 pmichaud rakudo: sub foo($a) { 1 };   say &foo.params.WHAT;
22:04 p6eval rakudo 6c43f9: OUTPUT«Method 'params' not found for invocant of class 'Perl6Sub'␤»
22:04 eternaleye .signature.params
22:04 pmichaud rakudo: sub foo($a) { 1 };   say &foo.signature.params.WHAT;
22:04 p6eval rakudo 6c43f9: OUTPUT«List()␤»
22:04 pmichaud rakudo: sub foo($a) { 1 };   say &foo.signature.params.perl;
22:05 p6eval rakudo 6c43f9: OUTPUT«["name" => "\$a", "multi_invocant" => 1, "nom_type" => Any, "type" => Any, "cons_type" => undef]␤»
22:05 pmichaud that looks wrong to me.
22:05 eternaleye rakudo: sub foo($a) { 1 };   say &foo.signature.params.kv.perl;
22:05 p6eval rakudo 6c43f9: OUTPUT«[0, "name" => "\$a", 1, "multi_invocant" => 1, 2, "nom_type" => Any, 3, "type" => Any, 4, "cons_type" => undef]␤»
22:05 eternaleye rakudo: sub foo($a) { 1 };   say &foo.signature.params.[0].WHAT
22:05 p6eval rakudo 6c43f9: OUTPUT«Mapping()␤»
22:05 pmichaud whatever is doing .params is setting it up incorrectly.
22:05 eternaleye rakudo: sub foo($a) { 1 };   say &foo.signature.params.[0].PARROT
22:06 p6eval rakudo 6c43f9: OUTPUT«Hash␤»
22:06 eternaleye Improper autoboxing of PIR types?
22:07 eternaleye Since signature-stuff seems to be in PIR-land
22:07 eternaleye And it's giving a pure PIR type, rather than Perl6Hash
22:07 justatheory joined #perl6
22:07 pmichaud well, that's not really a problem in general.
22:08 pmichaud (the pure Parrot type)
22:08 eternaleye rakudo: sub foo($a) { 1 };   say &foo.signature.params.[0].kv.perl
22:08 p6eval rakudo 6c43f9: OUTPUT«["name", "\$a", "multi_invocant", 1, "nom_type", Any, "type", Any, "cons_type", undef]␤»
22:08 eternaleye rakudo: sub foo(*@a) { 1 };   say &foo.signature.params.[0].kv.perl
22:08 p6eval rakudo 6c43f9: OUTPUT«["named", 0, "slurpy", 1, "name", "\@a", "multi_invocant", 1, "nom_type", Any, "type", Any, "cons_type", undef]␤»
22:09 eternaleye Huh. That is odd
22:09 pmichaud those look fine to me.
22:09 eternaleye That's what's odd, it wasn't working that way earlier
22:09 eternaleye rakudo: sub foo(*@a) { 1 };   say &foo.signature.params.>>.keys.grep( *.<slurpy> )
22:09 p6eval rakudo 6c43f9: OUTPUT«Statement not terminated properly at line 2, near ".>>.keys.g"␤in Main (src/gen_setting.pm:3225)␤»
22:09 jnthn >>.
22:10 eternaleye rakudo: sub foo(*@a) { 1 };   say &foo.signature.params>>.keys.grep( *.<slurpy> )
22:10 p6eval rakudo 6c43f9: OUTPUT«Method 'postcircumfix:{ }' not found for invocant of class 'Str'␤»
22:10 pmichaud I wouldn't trust the whatever star too much just yet.
22:10 eternaleye rakudo: sub foo(*@a) { 1 };   say &foo.signature.params>>.keys.grep( * !~~ "slurpy" )
22:10 p6eval rakudo 6c43f9: OUTPUT«named slurpy name multi_invocant nom_type type cons_type␤»
22:10 eternaleye Ek
22:10 eternaleye rakudo: sub foo(*@a) { 1 };   say ?&foo.signature.params>>.keys.grep( * ~~ "slurpy" )
22:10 p6eval rakudo 6c43f9: OUTPUT«0␤»
22:11 eternaleye rakudo: sub foo(*@a) { 1 };   say ?&foo.signature.params>>.keys.grep( * ~~ /slurpy/ )
22:11 p6eval rakudo 6c43f9: OUTPUT«Object must be created by a class.␤in regex PGE::Grammar::_block73 (/tmp/XATdNku0wa:2)␤called from Main (/tmp/XATdNku0wa:2)␤»
22:11 eternaleye Hm. Why is it not matching "slurpy", and why is /slurpy/ giving that error?
22:11 pmichaud rakudo: sub foo(*@a) { 1 };   say ?&foo.signature.params>>.keys.perl
22:11 p6eval rakudo 6c43f9: OUTPUT«1␤»
22:12 eternaleye You frogot to remove prefix:<?>
22:12 pmichaud rakudo: sub foo(*@a) { 1 };   say (&foo.signature.params>>.keys).perl
22:12 eternaleye *forgot
22:12 p6eval rakudo 6c43f9: OUTPUT«[["named", "slurpy", "name", "multi_invocant", "nom_type", "type", "cons_type"]]␤»
22:12 eternaleye Ah
22:12 pmichaud rakudo: sub foo(*@a) { 1 };   say (&foo.signature.params>>.keys.grep(/slurpy/)).perl
22:12 eternaleye rakudo: sub foo(*@a) { 1 };   say ?&foo.signature.params>>.keys>>.grep( * ~~ "slurpy" )
22:12 p6eval rakudo 6c43f9: OUTPUT«[["named", "slurpy", "name", "multi_invocant", "nom_type", "type", "cons_type"]]␤»
22:12 p6eval rakudo 6c43f9: OUTPUT«1␤»
22:12 eternaleye rakudo: sub foo(@a) { 1 };   say ?&foo.signature.params>>.keys>>.grep( * ~~ "slurpy" )
22:12 p6eval rakudo 6c43f9: OUTPUT«1␤»
22:12 eternaleye rakudo: sub foo($a) { 1 };   say ?&foo.signature.params>>.keys>>.grep( * ~~ "slurpy" )
22:12 p6eval rakudo 6c43f9: OUTPUT«1␤»
22:13 eternaleye rakudo: sub foo($a) { 1 };   say ?&foo.signature.params>>.pairs>>.grep( *.key ~~ 'slurpy' && *.value ~~ True )
22:13 p6eval rakudo 6c43f9: OUTPUT«1␤»
22:14 eternaleye rakudo: sub foo($a) { 1 };   say ?&foo.signature.params>>.pairs>>.perl
22:14 p6eval rakudo 6c43f9: OUTPUT«1␤»
22:14 pmichaud *.value ~~ True  probably doesn't dwym
22:14 eternaleye rakudo: sub foo($a) { 1 };   say &foo.signature.params>>.pairs>>.grep( *.key ~~ 'slurpy' && *.value )
22:14 p6eval rakudo 6c43f9: OUTPUT«␤»
22:14 eternaleye rakudo: sub foo($a) { 1 };   say ?&foo.signature.params>>.pairs>>.grep( *.key ~~ 'slurpy' && *.value )
22:14 p6eval rakudo 6c43f9: OUTPUT«1␤»
22:14 eternaleye Eh?
22:15 eternaleye rakudo: sub foo($a) { 1 };   &foo.signature.params>>.pairs>>.grep( say $_.perl )
22:15 p6eval rakudo 6c43f9: OUTPUT«undef␤Method 'Num' not found for invocant of class 'Perl6Pair'␤»
22:15 eternaleye rakudo: sub foo($a) { 1 };   &foo.signature.params>>.pairs>>.grep( say *.perl )
22:15 pmichaud I'd be very suspicious of  using *
22:15 p6eval rakudo 6c43f9: OUTPUT«!whatever_dispatch_helper␤Method 'Num' not found for invocant of class 'Perl6Pair'␤»
22:15 eternaleye rakudo: sub foo($a) { 1 };   &foo.signature.params>>.pairs>>.grep( { say $_.perl } )
22:15 p6eval rakudo 6c43f9: OUTPUT«"name" => "\$a"␤"multi_invocant" => 1␤"nom_type" => Any␤"type" => Any␤"cons_type" => undef␤»
22:15 pmichaud the semantics of * are still being worked out
22:16 eternaleye rakudo: sub foo($a) { 1 };   say &foo.signature.params>>.pairs>>.grep( *.key ~~ 'slurpy' && *.value ).perl
22:16 p6eval rakudo 6c43f9: OUTPUT«[[]]␤»
22:16 eternaleye Ah
22:16 pmichaud note that ".key" and ".perl" are shorter anyway :-)
22:17 eternaleye rakudo: sub foo($a) { 1 };   say &foo.signature.params>>.pairs.grep( *.keys.grep( * ~~ 'slurpy' ).perl
22:17 p6eval rakudo 6c43f9: OUTPUT«Statement not terminated properly at line 2, near "( *.keys.g"␤in Main (src/gen_setting.pm:3225)␤»
22:18 eternaleye rakudo: sub foo($a) { 1 };   say &foo.signature.params>>.pairs.grep( *.keys.grep( * ~~ 'slurpy' ) ).perl
22:18 p6eval rakudo 6c43f9: OUTPUT«[]␤»
22:18 eternaleye rakudo: sub foo($a) { 1 };   say ?&foo.signature.params>>.pairs.grep( *.keys.grep( * ~~ 'slurpy' ) )
22:18 p6eval rakudo 6c43f9: OUTPUT«0␤»
22:18 eternaleye rakudo: sub foo(*@a) { 1 };   say ?&foo.signature.params>>.pairs.grep( *.keys.grep( * ~~ 'slurpy' ) )
22:18 p6eval rakudo 6c43f9: OUTPUT«0␤»
22:19 eternaleye rakudo: sub foo(*@a) { 1 };   say ?&foo.signature.params.[0].perl
22:19 p6eval rakudo 6c43f9: OUTPUT«1␤»
22:19 eternaleye rakudo: sub foo(*@a) { 1 };   say &foo.signature.params.[0].perl
22:19 p6eval rakudo 6c43f9: OUTPUT«{"named" => 0, "slurpy" => 1, "name" => "\@a", "multi_invocant" => 1, "nom_type" => Any, "type" => Any, "cons_type" => undef}␤»
22:19 eternaleye rakudo: sub foo(*@a) { 1 };   say &foo.signature.params>>.<slurpy>.perl
22:20 p6eval rakudo 6c43f9: OUTPUT«[1]␤»
22:20 eternaleye rakudo: sub foo($a) { 1 };   say &foo.signature.params>>.<slurpy>.perl
22:20 p6eval rakudo 6c43f9: OUTPUT«[undef]␤»
22:20 eternaleye rakudo: sub foo($a) { 1 };   say &foo.signature.params>>.<slurpy>.[0]
22:20 p6eval rakudo 6c43f9: OUTPUT«Use of uninitialized value␤␤»
22:20 eternaleye rakudo: sub foo($a) { 1 };   say ?&foo.signature.params>>.<slurpy>.[0]
22:20 p6eval rakudo 6c43f9: OUTPUT«0␤»
22:20 eternaleye rakudo: sub foo(*@a) { 1 };   say ?&foo.signature.params>>.<slurpy>.[0]
22:20 p6eval rakudo 6c43f9: OUTPUT«1␤»
22:20 eternaleye Okay, ugly but it works
22:22 eternaleye rakudo: sub foo(*@a, *%b) { 1 };   say +&foo.signature.params>>.<slurpy>
22:22 sri_kraih joined #perl6
22:22 p6eval rakudo 6c43f9: OUTPUT«2␤»
22:23 eternaleye rakudo: sub foo(*@a, %b) { 1 };   say +&foo.signature.params>>.<slurpy>
22:23 p6eval rakudo 6c43f9: OUTPUT«2␤»
22:23 eternaleye rakudo: sub foo(@a, %b) { 1 };   say +&foo.signature.params>>.<slurpy>
22:23 p6eval rakudo 6c43f9: OUTPUT«2␤»
22:23 eternaleye rakudo: sub foo(@a, %b) { 1 };   say +&foo.signature.params>>.<slurpy>.perl
22:23 p6eval rakudo 6c43f9: OUTPUT«0␤»
22:24 eternaleye rakudo: sub foo(*@a, *%b) { 1 };   say +&foo.signature.params>>.<slurpy>.grep( * > 0 )
22:24 p6eval rakudo 6c43f9: OUTPUT«2␤»
22:24 eternaleye rakudo: sub foo(*@a, *%b) { 1 };   say &foo.signature.params>>.<slurpy>.grep( * > 0 ).perl
22:24 p6eval rakudo 6c43f9: OUTPUT«[1, 1]␤»
22:24 eternaleye rakudo: sub foo(*@a, %b) { 1 };   say &foo.signature.params>>.<slurpy>.grep( * > 0 ).perl
22:24 p6eval rakudo 6c43f9: OUTPUT«Use of uninitialized value␤[1]␤»
22:24 eternaleye rakudo: sub foo(@a, %b) { 1 };   say +&foo.signature.params>>.<slurpy>.grep( * > 0 )
22:24 p6eval rakudo 6c43f9: OUTPUT«Use of uninitialized value␤Use of uninitialized value␤0␤»
22:25 eternaleye rakudo: sub foo(@a, %b) { 1 };   say +&foo.signature.params>>.<slurpy>.grep( * ne undef && * > 0 )
22:25 p6eval rakudo 6c43f9: OUTPUT«Use of uninitialized value␤0␤»
22:25 pmichaud rakudo:  sub foo(@a, %b) { 1 }; say ?any(&foo.signature.params>>.<slurpy>)
22:25 p6eval rakudo 6c43f9: OUTPUT«0␤»
22:25 pmichaud rakudo:  sub foo(*@a, %b) { 1 }; say ?any(&foo.signature.params>>.<slurpy>)
22:25 p6eval rakudo 6c43f9: OUTPUT«1␤»
22:25 eternaleye THat works
22:25 pmichaud rakudo:  sub foo(*@a, *%b) { 1 }; say ?any(&foo.signature.params>>.<slurpy>)
22:25 p6eval rakudo 6c43f9: OUTPUT«1␤»
22:25 pmichaud rakudo:  sub foo(@a, *%b) { 1 }; say ?any(&foo.signature.params>>.<slurpy>)
22:25 p6eval rakudo 6c43f9: OUTPUT«1␤»
22:25 eternaleye pmichaud++ pmichaud++
22:27 eternaleye moritz_: Testing updated version of my slurpies patch
22:28 eternaleye (for infix:<...>
22:28 eternaleye *)
22:28 eternaleye I think I need caffeine. Root beer float &
22:32 pmichaud afk, dinner
22:33 lichtkind joined #perl6
23:15 * jnthn -> sleep
23:19 snarkyboojum joined #perl6
23:34 synth joined #perl6
23:41 eternaleye Infinoid: http://dpaste.com/60976/ passes spectest here, could you test && apply if working? Also, for the tests, http://dpaste.com/60975/ exercises the new functionality
23:44 hercynium joined #perl6
23:54 lichtkind jnthn: good night

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

Perl 6 | Reference Documentation | Rakudo