»ö« | perl6.org/ | nopaste: paste.lisp.org/new/perl6 | evalbot usage: 'perl6: say 3;' or rakudo:, alpha:, pugs:, std:, or /msg p6eval perl6: ... | irclog: irc.pugscode.org/ | UTF-8 is our friend!
Set by lichtkind on 5 March 2010.
00:03 [Coke] left 00:07 jrtayloriv left 00:12 xinming left
dalek meta: r343 | stefa...@cox.net++ | trunk/vicil/ (2 files):
[vicil] Invent a model for variables and binding
00:15
sorear sprixel is going to support methods with an 'rw' invocant
it just falls out of my model naturally
I wonder what the spec's stand on this is 00:16
00:18 lestrrat is now known as lest_away 00:19 lest_away is now known as lestrrat
quietfanatic rw invocants would sure be nice for what I'm trying to do. 00:23
I used to be able to say "undefine self" in a method
Now I basically can't do anything like that. 00:24
sorear What are good editors and/or editor configurations for Perl 6? 00:25
I've been using PetDance's perl6.vim, but it gets rather slow when a file is over 500 lines or so 00:26
00:28 pmichaud_ joined, shade_ joined, pmichaud left, shade\ left 00:32 zakame_ joined 00:33 lest_away joined 00:34 solarion_ joined, cosimo_ joined, eiro_ joined, eiro left, cosimo left, p6eval left, solarion left, hugme left, constant left, lestrrat left, zakame left, krakan left, lest_away is now known as lestrrat 00:37 p6eval joined 00:41 masonkramer left, masonkramer joined, [Coke] joined 00:44 constant joined, constant left, constant joined 00:49 meppl left 00:50 masonkramer left, rgrau_ left, whiteknight left, araujo left, perlygatekeeper left, ajs left, PacoLinux left, eternaleye left, yahooooo left, knewt2 left 00:51 masonkramer joined, rgrau_ joined, whiteknight joined, araujo joined, perlygatekeeper joined, ajs joined, PacoLinux joined, eternaleye joined, yahooooo joined, knewt2 joined 00:52 lichtkind left 00:55 jrtayloriv joined 00:56 plobsing joined 00:58 [Coke] left
quietfanatic sorear: I frequently just use Perl 5 syntax highlighting out of laziness. 01:01
01:02 whiteknight left 01:06 quietfanatic left 01:07 xinming joined
ash_ sorear: have you tried padre? i don't know how good it is but it has perl6 syntax highlighting 01:07
01:08 justatheory left 01:13 Guest5815 left 01:16 tylercurtis joined
sorear ash_: the padre syntax highlighting is great. I know; I maintain it. It's also even slower than vim. 01:19
tylercurtis Is there a syntax for multi-dimensional array literals other than [1, 2, 3], [4, 5, 6]? 01:20
sorear I beleive [(1, 2, 3), (4, 5, 6)] is preferred
ash_ tylercurtis: for nqp or perl6? 01:21
tylercurtis ash_: perl6 01:23
01:25 zakame_ is now known as zakame
tylercurtis rakudo: [(1, 2, 3), (4, 5, 6)][0].say 01:26
p6eval rakudo 7e3ddc: OUTPUT«1␤»
tylercurtis sorear: that doesn't appear to create a multi-dimensional array, at least not in Rakudo. 01:27
ash_ that array flattened i think 01:31
sorear rakudo skips the multidim array tests
ash_ rakudo: say (1, 2, (3, 4)).perl; #say flattens 01:32
p6eval rakudo 7e3ddc: OUTPUT«(1, 2, (3, 4))␤»
ash_ rakudo: [(1, 2, 3), (4, 5, 6)][0].perl.say
p6eval rakudo 7e3ddc: OUTPUT«1␤» 01:33
ash_ hmm
rakudo: ((1, 2, 3), (4, 5, 6))[0].say
p6eval rakudo 7e3ddc: OUTPUT«1␤»
sorear [0] uses .list, which flattens
ash_ ah, thats probably it then
sorear so I guess this won't work
the multi-d stuff is poorly understood at the moment 01:34
ash_ rakudo: say ((3,2),(4,1))[0;0]; # just curious
p6eval rakudo 7e3ddc: OUTPUT«3␤»
ash_ rakudo: say ((3,2),(4,1))[1;0]; # just curious
p6eval rakudo 7e3ddc: OUTPUT«3␤»
ash_ yeah, i don't know what that is doing
std: rakudo: say ((3,2),(4,1))[1;0]; 01:35
p6eval std 31442: OUTPUT«ok 00:01 113m␤»
ash_ pugs: say ((3,2),(4,1))[1;0];
p6eval pugs: OUTPUT«*** ␤ Unexpected ";"␤ expecting "_", fraction, exponent, term postfix, operator or "]"␤ at /tmp/JCgi2hrT9z line 1, column 20␤»
tylercurtis I guess I'll stick with ([1, 2, 3], [4, 5, 6]), then. 01:36
rakudo: ([1,2,3],[4,5,6])[0].say
p6eval rakudo 7e3ddc: OUTPUT«123␤»
sorear std: rakudo: parses, neat 01:38
p6eval std 31442: OUTPUT«===SORRY!===␤Undeclared routines:␤ 'neat' used at line 1␤ 'parses' used at line 1␤Check failed␤FAILED 00:01 109m␤»
sorear (it is just a statement label)
02:00 felliott joined 02:07 lestrrat is now known as lest_away
tylercurtis Is there anything in Perl 6 equivalent to APL's scan operator? Other than writing a function to do it myself. 02:17
02:18 [Coke] joined
sorear rakudo: ([\+] 1..10).perl.say 02:20
p6eval rakudo 7e3ddc: OUTPUT«(1, 3, 6, 10, 15, 21, 28, 36, 45, 55)␤»
sorear is that what you mean?
ash_ tylercurtis: how does scan work?
sorear I guessed it works like scanl in haskell
tylercurtis sorear: yes.
02:21 arnsholt left
tylercurtis Thanks. 02:21
sorear wonders what cool bit of technology tylercurtis is working on now
02:29 [Coke] left
tylercurtis sorear: no cool bit of technology. I just saw www.vector.org.uk/archive/v101/whitney101_74.htm on HN and decided to translate it into Perl 6. Although some of it looks tricky to do due to many of K's functions being able to work on scalars or vectors. 02:29
02:30 redicaps joined 02:42 agentzh joined 02:51 cdarroch left 02:56 TiMBuS joined 03:01 jrtayloriv left 03:04 [Coke] joined 03:11 jaldhar joined 03:13 lest_away is now known as lestrrat 03:18 xinming left 03:22 [Coke] left 03:23 xinming joined 03:27 jakk joined 03:34 colomon joined 03:39 jakk left 03:43 jakk joined, jakk left 03:50 Saul_Goodman joined 03:51 SET_Ssor_MD joined, SecurityC3I joined
SecurityC3I www.klulz.com/listen.pls | FREE WEEV STOP BEIN A HO ABOUT IT TELETHON | SKYPE: rev_g0sp | irc.hardchats.com #gnaa 03:51
03:51 SecurityC3I was kicked by diakopter (SecurityC3I))
SET_Ssor_MD www.klulz.com/listen.pls | FREE WEEV STOP BEIN A HO ABOUT IT TELETHON | SKYPE: rev_g0sp | irc.hardchats.com #gnaa 03:51
03:51 SET_Ssor_MD was kicked by diakopter (SET_Ssor_MD)) 03:53 ContactsZipOC-12 joined, MIRFernspahASIC joined, NSAN5P6 joined
MIRFernspahASIC www.klulz.com/listen.pls | FREE WEEV STOP BEIN A HO ABOUT IT TELETHON | SKYPE: rev_g0sp | irc.hardchats.com #gnaa 03:53
NSAN5P6 www.klulz.com/listen.pls | FREE WEEV STOP BEIN A HO ABOUT IT TELETHON | SKYPE: rev_g0sp | irc.hardchats.com #gnaa
03:53 MIRFernspahASIC was kicked by diakopter (MIRFernspahASIC)), NSAN5P6 was kicked by diakopter (NSAN5P6)), ContactsZipOC-12 was kicked by diakopter (ContactsZipOC-12)) 03:54 DCSS_MI651 joined, DCSS_MI651 was kicked by diakopter (DCSS_MI651))
diakopter sigh 03:55
03:55 SCCN_Quiche joined, WQCChan joined, SCCN_Quiche was kicked by diakopter (WQCChan ))
WQCChan www.klulz.com/listen.pls | FREE WEEV STOP BEIN A HO ABOUT IT TELETHON | SKYPE: rev_g0sp | irc.hardchats.com #gnaa 03:55
03:55 WQCChan was kicked by diakopter (WQCChan)), diakopter sets mode: +q $~a 04:04 lestrrat is now known as lest_away 04:08 Saul_Goodman left
dalek kudo: f34e780 | pmichaud++ | src/binder/bind.c:
Refactor "is copy" binding to avoid extra objectrefs and VTABLE_clone.
04:09
04:10 diakopter sets mode: -q $~a 04:15 redicaps left
diakopter to channel operators (regular and infrequent): /mode #perl6 +q $-a to temporarily ban unregistereds 04:16
04:22 rv2733 joined 04:33 rsf joined 04:34 rsf left 04:37 gfx joined
sorear diakopter: How does $~a parse? 04:41
diakopter dunno; see freenode.net/using_the_network.shtml 04:42
sorear I see 04:43
04:43 felliott left 04:46 xinming left
sorear is thinking that maybe protosubs shouldn't have the same type as subs 04:48
where a protosub is a sub without the OUTER:: 04:49
I think I can bend S06 to this 04:50
04:57 xinming joined
sorear How do type annotations enable optimization? 05:06
ingy hi 05:12
diakopter oy
sorear: they may not ;)
ingy I want to say that patch and I ported this pseudocode grammar ( testml.org/specification/language/ ) to PEG last night: github.com/ingydotnet/testml-pm6/bl...Grammar.pm 05:13
rule for rule with minimal change
and it just worked 05:14
perl6++
Soon p6 will have testml
and I plan to port PEG back to P5 Python Ruby etc
it's great 05:15
p6 can has acmeism 05:16
cxreg zavolaj fails to find Test.pm (?)
ingy cxreg: you were in my yapc talk
cxreg i was in your spug talk 05:17
ingy cxreg: no, I mean you were a subject in my yapc talk 05:18
cxreg: ingydotnet.github.com/acmeism-yapcn...k/007.html
hint: <SPACEBAR> :)
cxreg :-)
05:18 simcop2387 left
cxreg ingy: hey, that's no fair :) 05:19
ingy cxreg: logs don't lie
cxreg i still don't know how I feel about it ;) 05:23
but it's certainly neat
ingy :) 05:24
damian was present
cxreg awesome
ingy sleeps 05:25
05:26 kaare joined, kaare is now known as Guest52732 05:27 rv2733 left
cxreg any hints on getting C header constants for NCI use? 05:30
05:37 orafu left, orafu joined 05:38 [Coke] joined 05:39 simcop2387 joined 05:43 simcop2387 left 05:45 macdaddy joined 05:46 macdaddy is now known as Guest72425 05:54 [Coke] left 05:57 simcop2387 joined
cxreg heh 06:03
$ time perl6 -e 'use FakeDBI'
real0m22.854s
06:04 simcop2387 left
diakopter rakudo: use FakeDBI; 06:05
p6eval rakudo f34e78: OUTPUT«===SORRY!===␤Unable to find module 'FakeDBI' in the @*INC directories.␤(@*INC contains:␤ lib␤ /home/p6eval/.perl6/lib␤ /home/p6eval//p1/lib/parrot/2.5.0-devel/languages/perl6/lib␤ .)␤»
sorear cxreg: I am not suprised
[particle] cxreg: you giving me grief tonight? :P 06:06
cxreg [particle]: why, what'd you do?
06:07 Su-Shee joined
[particle] nothing. so... i deserve it. 06:07
cxreg lol
i have a possibly working FakeDBD::Pg, but it's hard to test when program startup is half a minute :)
06:13 tylercurtis left 06:17 simcop2387 joined 06:18 jrtayloriv joined
moritz_ cxreg: you can precompile the other modules (like FakeDBI) to reduce startup time 06:19
cxreg ah, that'd be helpful 06:20
moritz_ the manual instruction is perl6 --target=pir --output=foo.pir foo.pm 06:21
you can also get 'ufo' from github.com/masak/ufo/ to write a makefile for you 06:22
then it's just
ufo && make
cxreg it looks like a FakeDBI.pir is already built
i wonder if it's preferring the .pm6 anyway, for some reason?
06:22 jrtayloriv left
moritz_ cxreg: it did in the past. mberends patched it a few days ago 06:23
so if your rakudo is too old, it might still do that
cxreg hrm
moritz_ commit f9943a285ad7ff416c8eef0fe98414fe649ee96a 06:25
Author: Martin Berends [email@hidden.address]
Date: Sun Jun 20 01:59:07 2010 +0100
[Perl6/Module/Loader.pm] correctly derive pre-compiled .pir filename from both .pm and .pm6 source names
cxreg yeah, i definitely didnt have that yet 06:26
06:31 snearch joined 06:33 snearch left, snearch joined 06:37 _ilbot2 left, _ilbot2 joined, tylercurtis joined 06:38 _ilbot2 left, _ilbot2 joined 06:39 synth joined 06:55 Zapelius joined 06:57 eternaleye left 07:09 eternaleye joined 07:11 agentzh left 07:16 arnsholt joined, snearch left 07:19 eiro_ is now known as eiro 07:23 tylercurtis left 07:28 arnsholt left 07:36 redicaps joined 07:37 Zapelius left 07:49 Ross joined 07:59 arnsholt joined 08:09 arnsholt left 08:18 JimmyZ joined, thebird joined 08:23 rgrau_ left 08:40 arnsholt joined 08:45 simcop2387 left 08:59 simcop2387 joined 09:02 cygx joined
cygx good localtime(), #perl6 09:04
09:11 JimmyZ left 09:13 azert0x joined
bbkr morning :) 09:18
09:19 Guest72425 left 09:20 agentzh joined
bbkr how can i achieve something like typeglobs in P6? "*new_sub_name = \&old_sub_name" 09:22
sorear my &new_sub_name = &old_sub_name; 09:25
09:26 plobsing left
bbkr rakudo: my &new_time = &pir::time__n(); say new_time(); 09:27
p6eval rakudo f34e78: OUTPUT«Null PMC access in invoke()␤ in main program body at line 11:/tmp/LuI8CQ2cou␤»
bbkr hmm
moritz_ bkeeler: in general binding
erm, meant bkkr
09:29 pnp6noob joined
bbkr thanks. i was wondering why this kind of binding (as above) is not used in Rakudo as faster than intermediate sub calling parrot. 09:29
moritz_ pir::stuff is special - there's no &pir::time__n entry in any symbol table or lexical scope 09:31
also it has no Perl 6 level signatures
bbkr but that may be stupid question, as i still do not understand huge parts of connection between parrot and rakudo code
moritz_ rakudo: say (sub ($x) { }).signature.perl
p6eval rakudo f34e78: OUTPUT«:(Any $x)␤»
bbkr oh, that explains :) huge thanks. 09:32
moritz_ calling &pir::time__n.signature would horribly fail
you're welcome
bbkr then lack of protection against "reglobbing" pir code like above is a bug, since it will always fail with Null PMC access due to lack of signature? 09:34
09:34 makkksimal joined
moritz_ well... "bug" usually means "behaves different than the spec says" 09:34
bbkr or did i just found "enough rope to hang myself"?
moritz_ but pir::stuff is not spec
so I'd say if you use pir::stuff, you are on your own, no safety nets involved 09:35
rakudo: say pir::null__p 09:36
p6eval rakudo f34e78: OUTPUT«Null PMC access in type()␤ in main program body at line 11:/tmp/qk4pUNFRxc␤»
bbkr clear now
moritz_ "whoa there, a Null PMC Access" - "yes, you asked for it!"
09:37 avar left
pnp6noob rakudo: say 1 + 1 09:39
p6eval rakudo f34e78: OUTPUT«2␤»
pnp6noob rakudo: say (1+1) 09:41
p6eval rakudo f34e78: OUTPUT«2␤»
pnp6noob rakudo: say [1+1] 09:42
p6eval rakudo f34e78: OUTPUT«2␤»
pnp6noob rakudo: [+] (1,2, 3,4,5) 09:43
p6eval rakudo f34e78: ( no output )
09:45 gfx left
moritz_ autoprinting only works in the interactive environment 09:49
cono rakudo: ([+] 1,2, 3,4,5).say 09:50
p6eval rakudo f34e78: OUTPUT«15␤»
moritz_ I've once tried to add it to p6eval, but it was too confusing
pnp6noob I was expecting (1,2, 3) to be a list 09:51
moritz_ well, it is
pnp6noob is it not?
moritz_ rakudo: say (1, 2, 3).WHAT
p6eval rakudo f34e78: OUTPUT«Parcel()␤»
moritz_ ok, not quite
but you can use a Parcel ("Parenthesis Cell") quite in the same way as a list 09:52
pnp6noob Parcel() :)
what is syntax for literal list
moritz_ list(1, 2, 3) 09:53
but you usually don't need to explicitly create lists
pnp6noob sorry for asking but I will next ask place to find it :)
moritz_ because everywhere a list is expected, a Parcel works too
pnp6noob [+] expects what list/Parcel? 09:54
moritz_ yes
or even a single values works
rakudo: say [+] 1
p6eval rakudo f34e78: OUTPUT«1␤»
moritz_ rakudo: say [+] "1 42 23".split(" ")
pnp6noob how? :)
p6eval rakudo f34e78: OUTPUT«66␤»
pnp6noob does it convert 1 to list context?
moritz_ pnp6noob: imagine [+] being a function with a weird name 09:55
in perl 5, you'd just iterate over @_
and if you supply a singla value, @_ just holds one item
in Perl 6 signatures, you can achieve the same effect with (*@args)
rakudo: sub f(*@a) { say @a.perl }; f(1); f(1, 2, 3); 09:56
p6eval rakudo f34e78: OUTPUT«[1]␤[1, 2, 3]␤»
moritz_ that's a function that expects an arbitrary number of arguments, and a list is automatically flattened into the argument list
bbkr rakudo: try {say pir::null__p; CATCH { say (.ord-4).chr for $!.comb(/./)[0,12,19,2] }} # yay! 10:03
p6eval rakudo f34e78: OUTPUT«J␤a␤p␤h␤»
10:05 cygx left 10:12 agentzh left 10:19 jaldhar left
moritz_ funny, I've just submitted a talk "Perl 6 and The Real World", and later noticed that a talk named " 10:19
funny, I've just submitted a talk "Perl 6 and The Real World", and later noticed that a talk named " @idx = ();
sorry
that a talk named "Perl in the Real World" was already submitted by somebody else 10:20
though with a quite different topic
10:23 redicaps left 10:27 Sanitoeter left, Sanitoeter joined 10:30 Mowah joined
pnp6noob ah, I see it now 10:35
10:35 ciphertext left
pnp6noob moritz_: thanks 10:35
10:36 cygx joined
pnp6noob moritz_: where can I start learning perl6? I am docs, tutorial code snippets 10:37
s/am/mean/
10:40 mberends joined 10:42 mberends left, envi^home joined 10:44 skangas joined
colomon rakudo: say 342424252432452524354342 10:56
p6eval rakudo f34e78: OUTPUT«-2657807817882293466␤»
colomon oh.
poop./
10:58 pmurias joined
colomon pmichaud_: ping 11:15
oooo, optimizations branch! 11:17
bbkr speaking of optimizations, is there any Benchmark module available now? 11:24
11:24 makkksimal left
moritz_ pnp6noob: github.com/perl6/book 11:24
pnp6noob: either read the .pod files in an editor (not directly on github, it mis-renders too much of it), or got the download section and grab the latest release 11:25
bbkr: PerlJam (aka perlpilot on github) has a Benchmark module, not sure how well it works yet 11:26
bbkr moritz_: thanks
11:29 [Coke] joined 11:36 pmurias left 11:40 rgrau_ joined 11:42 skangas left
moritz_ is there a YAPC::EU IRC channel somewhere? 11:52
12:01 globalmixmaster_ joined
globalmixmaster_ oh look guys, i created an article on perl6: uncyclopedia.wikia.com/wiki/Perl6 12:02
moritz_ likes 12:03
12:03 synth left
pnp6noob moritz_: thanks 12:04
moritz_ ponders putting that in the Fun section of perl6.org... opinions? 12:05
globalmixmaster_ omg, is there a fun section on perl6.org?
moritz_ perl6.org/fun/
12:06 synth joined
pnp6noob "Perl6 or literally translated as the language of the gods ..." I like that 12:06
moritz_ it's not very full yet
globalmixmaster_ oh and its a wiki, so you can improve it 12:08
moritz_ (the Parrot quotes link has some real gems, if you like developer's humor)
12:09 aCiD2 joined
pugssvn r31443 | moritz++ | [perl6.org] link to Perl 6 uncyclopedia entry 12:09
12:10 proller left, globalmixmaster_ left 12:11 colomon left 12:15 rv2733 joined 12:16 colomon joined
colomon bluederm 12:16
dang it
moritz_ good morning colomon
colomon stupid misfeatures
o/
12:17 rv2733 left
colomon moritz_: so the good news is that I think I've figured out how to fix numeric constants in Rakudo without slowing them to a crawl. 12:21
cygx moritz_: how should the ports for the communication frontend <-> backend be allocated?
colomon the bad news is that after four days of YAPC, I really need to do some $work.
moritz_ cygx: 1024 + random number
cygx: I'd say
rakudo: say Date.new(2010, 7, 22) - Date.today 12:22
p6eval rakudo f34e78: OUTPUT«27␤»
moritz_ colomon: look at it this way: you still have 27 days until the compiler release that will be used for Rakudo Star :-)
oh wait, 20 days
still enough 12:23
cygx moritz_: we could also possible pre-fill a db-table; <64k ports 􏿽xE0 2 bytes + DB overhead isn't that much...
colomon eight of which I'm spending in the wilds of northern Ontario
moritz_ cygx: also works for me
colomon moritz_: bigger problem is this is blocking me on finishing the trig test overhaul
which I'd like to have done soonest, both to speed up the spectest for all developers and to get my grant done. 12:24
12:25 hugme joined
moritz_ hugme: tweet rakudoperl maybe we'll see a perlmonks rewrite in #perl6? www.perlmonks.org/?node_id=846326 12:25
hugme hugs moritz_; tweet delivered
12:30 Ross left 12:33 bphillips joined
takadonet morning all 12:33
12:36 proller joined
cognominal moritz_, perlmonks is not slow enough? 12:39
moritz_ cognominal: :-)
hugme: add ajs to book
hugme hugs ajs. Welcome to book!
12:40 pmurias joined
moritz_ ajs: I saw you have a github fork of the book - feel free to integrate your stuff directly 12:40
pugssvn r31444 | pmurias++ | [smop]
r31444 | the boilerplate is stored in SMOP::Boilerplate
r31444 | the smop .so are installed
12:41 felliott joined, masonkramer left 12:54 bluescreen joined, bluescreen is now known as Guest1208, pmurias left 12:56 tadzik joined 12:58 tadzik left 12:59 perlygatekeeper left, pnp6noob left 13:14 cygx left 13:16 masonkramer joined 13:21 JimmyZ joined 13:24 JimmyZ left
cognominal rakudo: > $_=1; { $_=2; say $_ }; say $_ 13:28
p6eval rakudo f34e78: OUTPUT«===SORRY!===␤Confused at line 11, near "> $_=1; "␤»
cognominal rakudo: $_=1; { $_=2; say $_ }; say $_
p6eval rakudo f34e78: OUTPUT«2␤2␤»
cognominal S02 says $_ is lexically scoped. Is that an exception? 13:29
moritz_ rakudo: my $x = 1; { $x = 2; say $x }; say $x 13:30
p6eval rakudo f34e78: OUTPUT«2␤2␤»
moritz_ any surprises here?
it doesn't say there's an implicit declaration of $_ in every scope 13:31
cognominal rakudo: $_=1; if 1 { $_=2; say $_ }; say $_ # it is in some scopes. 13:32
p6eval rakudo f34e78: OUTPUT«2␤1␤»
cognominal I just don't see where it is specified if it is. 13:33
moritz_ it's not the scope that's different, but rather the 'if'
if I understand correctly
afaict intermediate blocks don't have a separate $_, unless declared explicitly 13:34
whereas the block to the 'if' has the $_ as a formal paramter
much like
perl6: my $x = 1; if 2 -> $x { say $x }; $x;
p6eval pugs, rakudo f34e78: OUTPUT«2␤» 13:35
..elf 31444: OUTPUT«Useless use of reference constructor in void context at (eval 122) line 9.␤»
moritz_ perl6: my $x = 1; if 2 -> $x { say $x }; say $x;
p6eval pugs: OUTPUT«2␤2␤»
..rakudo f34e78: OUTPUT«2␤1␤»
..elf 31444: OUTPUT«Useless use of reference constructor in void context at (eval 123) line 9.␤1␤»
moritz_ I'm certain that pugs is wrong here, and rakudo is right
cognominal rakudo: my $x = 1; for 2 -> $x { say $x }; say $x;
moritz_ and elf is confusing
p6eval rakudo f34e78: OUTPUT«2␤1␤»
cognominal rakudo: my $_ = 1; for 2 -> { say $_ }; say $_; 13:36
p6eval rakudo f34e78: OUTPUT«===SORRY!===␤Redeclaration of symbol $_ at line 11, near " = 1; for "␤»
cognominal oops
rakudo: my $_ = 1; for 2 -> $_ { say $_ }; say $_;
p6eval rakudo f34e78: OUTPUT«===SORRY!===␤Redeclaration of symbol $_ at line 11, near " = 1; for "␤»
cognominal rakudo: my $_ = 1; for 2 { say $_ }; say $_;
p6eval rakudo f34e78: OUTPUT«===SORRY!===␤Redeclaration of symbol $_ at line 11, near " = 1; for "␤»
moritz_ it's the 'my $_' that rakudo carps about
at the very beginning
cognominal rakudo: my $_ = 1;
p6eval rakudo f34e78: OUTPUT«===SORRY!===␤Redeclaration of symbol $_ at line 11, near " = 1;"␤»
cognominal hum 13:37
moritz_ std: my $_ = 1
p6eval std 31444: OUTPUT«Potential difficulties:␤ Useless redeclaration of variable $_ (see line 1) at /tmp/jjBSPTYdYO line 1:␤------> my $_⏏ = 1␤ok 00:01 113m␤»
moritz_ rakudo++
13:37 mjk joined 13:38 plobsing joined, aCiD2 left 13:41 tadzik joined 13:53 tadzik left 13:55 tadzik joined 13:57 mjk left 14:05 rgrau_ left 14:08 Guest52732 left 14:09 gbacon joined, bphillips left
bbkr what should i do while testing so there will be "This is an automatically generated mail to inform you that tests are now available..." message in RT ? 14:15
moritz_ bbkr: structure the commit message like this: [t/spec] tests for RT #12345: doing Foo.bar dies violently 14:16
14:16 [Coke] left
moritz_ with "test" instead of "tests" it also works 14:16
bbkr thanks, useful tip :) 14:17
moritz_ maybe somebody should add that to the README
14:29 meppl joined 14:31 estrabd_afk is now known as estrabd
bbkr rakudo: [+] 14:34
p6eval rakudo f34e78: OUTPUT«===SORRY!===␤Confused at line 11, near "[+]"␤»
moritz_ that's the evil cheating operator 14:35
it's supposed to be a prefix, term or infix
14:35 perlygatekeeper joined
TimToady rakudo: say [+]; 14:36
p6eval rakudo f34e78: OUTPUT«===SORRY!===␤Unable to parse postcircumfix:sym<[ ]>, couldn't find final ']' at line 11␤»
TimToady rakudo: say [+]();
p6eval rakudo f34e78: OUTPUT«0␤»
TimToady std: say [+];
p6eval std 31444: OUTPUT«ok 00:01 112m␤»
14:37 macdaddy joined
bbkr rakudo: my $str = "a\nbc\nd"; say $str.subst(/^^/, '# ', :g); 14:37
p6eval rakudo f34e78: OUTPUT«# a␤# bc␤# d␤»
TimToady std: 1 ~~~~~~~ 2
p6eval std 31444: OUTPUT«===SORRY!===␤Expecting a term, but found either infix ~~ or redundant prefix ~␤ (to suppress this message, please use space between ~ ~) at /tmp/rPwP938jhR line 1:␤------> 1 ~~~~⏏~~~ 2␤Parse failed␤FAILED 00:01 109m␤»
moritz_ std: [+] [+] [+]
p6eval std 31444: OUTPUT«===SORRY!===␤Prefix requires an argument at /tmp/Ie9VfHWrYZ line 1 (EOF):␤------> [+] [+] [+]⏏<EOL>␤Parse failed␤FAILED 00:01 108m␤»
14:37 macdaddy is now known as Guest38525
TimToady that's a buglet 14:37
std: [+] [+] [+]; 14:38
p6eval std 31444: OUTPUT«===SORRY!===␤Prefix requires an argument at /tmp/7A9jV5YUBq line 1:␤------> [+] [+] [+]⏏;␤Parse failed␤FAILED 00:01 108m␤»
TimToady std: [+] [+] [+]();
p6eval std 31444: OUTPUT«ok 00:01 108m␤»
TimToady std: [+] [+] [+] ;
p6eval std 31444: OUTPUT«===SORRY!===␤Prefix requires an argument at /tmp/LZVdw2m6MO line 1:␤------> [+] [+] [+] ⏏;␤Parse failed␤FAILED 00:01 108m␤»
moritz_ TimToady: are there plans to expose the OPP to user level Perl 6 code?
TimToady: I'd really welcome that, and I know others do too 14:39
bbkr standalone [+] is reported here, rt.perl.org/rt3/Ticket/Display.html?id=66948 not fixed yet
TimToady there are a few P6isms in it, that need to be generalized; started doing that, but haven't quite finished
moritz_ that's good news
14:41 [Coke] joined 14:44 plobsing left
pugssvn r31445 | bbkr++ | [t/spec/S05-substitution/subst.t] tests for RT #66816 Zero-width substitution makes the GC recurse 14:47
bbkr rakudo: module M; grammar G {}; say "foo" ~~ /<M::G>/ 14:51
p6eval rakudo f34e78: OUTPUT«===SORRY!===␤regex assertion not terminated by angle bracket at line 11, near "::G>/"␤»
bbkr std: module M; grammar G {}; say "foo" ~~ /<M::G>/ 14:52
p6eval std 31444: OUTPUT«ok 00:01 112m␤»
bbkr assertion?? 14:53
14:53 Ross joined 14:54 rv2733 joined 14:56 patrickas joined
pmichaud_ good morning, #perl6 14:56
TimToady \o
patrickas o/
ingy TimToady: hi 14:57
how do I specify a callback for a rule match in PEG? 14:58
or do I?
TimToady, pmichaud_: also... look at the TestML grammar(testml.org/specification/language/), and the <<working!!!>> PEG grammar (github.com/ingydotnet/testml-pm6/bl...rammar.pm) 14:59
totally amazing
15:00 skids joined
ingy patch++ and I hacked it on Weds night in the dorms 15:00
bbkr rakudo: try { die "foo" }; try { die; CATCH { say $!} } 15:02
ingy I need to leave in a couple mins to catch a flight. I'd really like more info than I see in S05 for parsing with PEG. If one of you could send me info to [email@hidden.address] I could probably get it before my flight.
p6eval rakudo f34e78: OUTPUT«Died␤␤»
bbkr is this expected, or eval on die without params should passthrough previously set $!?
ingy TimToady: the grammar completely parses my TestML docs but I don't grok how to effectively use the parse results 15:03
I know that I have a huge match tree
pmichaud_ colomon: pong
ingy but I'd like to get info as the parse is taking place 15:04
pmichaud_: me first!!
;)
[particle] ingy: regex NON_BREAK { . } is probably better written as { \N }
since you mean anything but newline
ingy [particle]: fine. :) 15:05
[particle]: can you answer my q-s above?
15:05 rgrau_ joined
ingy [particle]: patch applied and pushed. thanks 15:06
[particle] ingy: github.com/perl6/nqp-rx/tree/master/src/NQP/ 15:07
see Actions.pm?
that's where the methods live, named the same as the regexes in the Grammar.pm
ingy looking.. 15:08
[particle] once you get your parse tree from the grammar, apply the actions to emit whatever it is you want (usually i'm emitting Parrot AST)
colomon pmichaud_: wanted to ask you about the decint grammar rule. I take it it is from NQP?
[particle] ...and that's what nqp-rx does.
ingy [particle]: ok 15:09
[particle]: is there a streaming way to do it?
just askin
[particle] the ast is built in parallel, as the parse is done
pmichaud_ colomon: yes, and that came from STD
ingy [particle]: is there a test that drives what you are talking about 15:10
pmichaud_ ingy: when each rule successfully matches, its corresponding action method is automatically invoked (passing the current match object as a parameter)
colomon pmichaud_: I was mostly wondering about the action for it -- trying to figure if I can use its ast or if I need to start from scratch with the stringification of the decint match.
pmichaud_ colomon: the action for decint comes from HLL::Actions, I think. 15:11
looking
[particle] ingy: you mean some kind of example to show how to use the api?
ingy yah
pmichaud_ ingy: example coming up 15:12
ingy also where does HLL::Grammar defined
colomon pmichaud_: danke
ingy waits for pmichaud_
pmichaud_ a compiler-specific example is at www.pmichaud.com/2010/pres/yapcna-n...ide15.html
but I can create a perl 6 one
[particle] HLL::Grammar is defined in src/HLL/Grammar.pm in the nqp-rx repo
ingy spork, ftw!
[particle] you should clone it
pmichaud_ s/clone/derive from/ 15:13
ingy nod
I need to get on the road
pmichaud_ colomon: the decint action is at github.com/perl6/nqp-rx/blob/master...ctions.pm. It expects the .ast to be the value of the integer
[particle] i meant clone the repo so he'd have it on the plane :P
ingy any last thoughts?
pmichaud_ ah, clone the repo, yes.
[particle] don't die yet.
ingy [particle]: cloned 15:14
bbkr rakudo: class AtestOfSay { ... }; my AtestOfSay $t; say $t;
p6eval rakudo f34e78: OUTPUT«Null PMC access in type()␤ in main program body at line 11:/tmp/ATDzL_3KZX␤»
ingy if you guys think of anything more, email [email@hidden.address]
[Coke] 2
ingy thanks for all the fish
15:15 JimmyZ joined
bbkr rakudo: subset Person of Hash where { 1 } 15:16
[particle] hands [Coke] a /win
p6eval rakudo f34e78: ( no output )
15:20 ciphertext joined
bbkr rakudo: say ('r' ~& 's').PARROT 15:20
p6eval rakudo f34e78: OUTPUT«String␤»
bbkr rakudo: say 's'.PARROT 15:21
p6eval rakudo f34e78: OUTPUT«Str␤»
pmichaud_ ingy: (if you see this) example of grammar and actions in rakudo: gist.github.com/452999 15:23
bbkr rakudo: grammar A { token a { a } }; A.a() 15:24
p6eval rakudo f34e78: OUTPUT«Type objects are abstract and have no attributes, but you tried to access $!pos␤ in 'A::a' at line 11:/tmp/7ojDf6mDve␤ in main program body at line 11:/tmp/7ojDf6mDve␤»
pmichaud_ note: use PARROT(expr) instead of expr.PARROT 15:25
(the later causes any references to be lost)
*latter
bbkr pmichaud_: thanks. i was just copy-pasting examples from RT to check what is already fixed 15:26
[particle] pmichaud_: did you mail that to ingy, too? if not, i can
bbkr std: grammar A { token a { a } }; A.a()
p6eval std 31445: OUTPUT«ok 00:01 112m␤»
pmichaud_ [particle]: well, he didn't actually leave the chan, so I suspect/hope he'll see it. Anyway, please feel free to mail it to him also :) 15:27
[particle] sent
pmichaud_ (yes, I have several things happening at once here this morning)
[particle] i have a feeling he'll only have his phone to look at for a bit
15:45 ilogger2 joined, pyrimidine joined
pmichaud_ we should probably change the topic to provide a new nopaste address 15:45
lots of us are using gist these days
[particle] maximum recursion depth exceeded 15:46
sweet.
15:52 moritz_ sets mode: +oo pmichaud_ [particle]
[particle] o/ moritz_++ 15:52
15:53 JimmyZ_ joined
moritz_ »ö« | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, alpha:, pugs:, std:, or /msg p6eval perl6: ... | irclog: irc.pugscode.org/ | UTF-8 is our friend!
moritz_ \o 15:53
moritz_ just got rather wet on his bike during a thunderstorm
[particle] sahadev: i'm building latest rakudo/parrot now 15:55
15:57 JimmyZ_ is now known as JimmyZ 16:01 tadzik joined
lue ohai 16:01
colomon o/
[particle] make -j 5 # joy 16:04
pmichaud_ wonders if the lue+colomon sequence is in honor of yapc::na. lue: "ohai". colomon: "o!"
colomon high in the middle, round on the ends! 16:05
pmichaud_ :-)
[particle] :)
16:10 patspam joined 16:11 justatheory joined 16:14 Trashlord joined 16:18 JimmyZ left
ingy PGH CAN HAS INTERTUBEZ!! 16:22
moritz_ PGH?
moritz_ only knows PGE
[particle] pittsburgh airport
ingy :)
[particle] misses pittsburgh 16:23
ingy [particle]: we should hack more in SEA 16:30
now that I'm all P6
[particle] agreed :) 16:31
ingy [particle]: Thanks for the gist. I think I get it but let me ask a few Qs... 16:38
$ looks like a hash
16:38 pyrimidine left
ingy maybe the topic hash 16:38
what does $/ do?
[particle] $/ is the match object
patrickas rakudo: say 1/2 ~~ Num 16:39
16:39 pyrimidine joined
p6eval rakudo f34e78: OUTPUT«0␤» 16:39
patrickas rakudo: say 1/2 ~~ Real
p6eval rakudo f34e78: OUTPUT«1␤»
patrickas rakudo: say 1/2 ~~ Rat
p6eval rakudo f34e78: OUTPUT«1␤»
ingy so $so $/->{xxx} is $<xxx> ? 16:40
moritz_ $/{'xxx'} is $<xxx>
forget that ->
ingy I meant ~ P5
pmichaud_ $<xxx> is the same as $/{'xxx'}
ingy right 16:41
[particle] < ... > is the same as qw { ... }
pmichaud ohp6issocool
> our sub whiten(@rgb, $x) { (256 <<-<< @rgb) >>*>> $x >>+<< @rgb };
whiten
> whiten((142,69,133), 0.5)
199 162.5 194.5
ingy is the TOP action called at the start or completion of the match?
pmichaud (I'm needing to desaturate some rgb colors)
moritz_ ingy: start
pmichaud actions occur at the completion of each rule
ingy nod
moritz_ oh
pmichaud so the top action occurs at the completion of the TOP rule
which is the end of the match 16:42
moritz_ right
I thought about the TOP rule, not action
my bad
pmichaud > whiten((142,69,133), 0.5)>>.fmt("%02x")
c7 a2 c2
waaay too cool 16:43
ingy what is `make`
[particle] make is return, effectively
pmichaud ingy: it's described in S05, but it sets the .ast value for the current match object in $/
ingy so ast is a method of the match object? 16:44
pmichaud yes
basically it's a public attribute
ingy nod
cxreg >>Z>> and the like doesn't seem to work (yet?), is it supposed to eventually or am i crazy?
pmichaud rakudo: '124' ~~ / (\d+) { make $0 * 2 } /; say $_.ast;
p6eval rakudo f34e78: OUTPUT«Method 'ast' not found for invocant of class ''␤ in main program body at line 11:/tmp/vka3iYIhlH␤»
cxreg (for Z specifically, i mean)
pmichaud hmmm
ingy I have a copy of S05 for the flight... 16:45
moritz_ rakudo: say (<a b c> »Z» 1).perl
p6eval rakudo f34e78: OUTPUT«["a", 1, "b", 1, "c", 1]␤»
ingy but I skimmed it and it was lacking of a real example like this
pmichaud that looks funny to me
moritz_ kinda what I expected
pmichaud I mean, Z already operates on lists
rakudo: say (<a b c> Z 1).perl
p6eval rakudo f34e78: OUTPUT«("a", 1)␤»
moritz_ pmichaud: that's what the Z» 1 part avoids 16:46
pmichaud rakudo: say (<a b c> Z 1 x *).perl
p6eval rakudo f34e78: OUTPUT«("a", { ... })␤»
moritz_ rakudo: say (<a b c> »Z» (1, 2)).perl
p6eval rakudo f34e78: OUTPUT«["a", 1, "b", 2, "c", 1]␤»
moritz_ pmichaud: try xx *
pmichaud moritz_: okay, works for me.
cxreg moritz_: moritz_ hrm. maybe it works with the real symbol but not the longhand >>
pmichaud rakudo: say (<a b c> Z 1 xx *).perl
p6eval rakudo f34e78: OUTPUT«("a", 1, "b", 1, "c", 1)␤»
cxreg oops, double moritz_
pmichaud rakudo: say (<a b c> >>Z>> 1).perl
p6eval rakudo f34e78: OUTPUT«===SORRY!===␤Unsupported use of >> to do right shift; in Perl 6 please use +> or ~> at line 11, near "1).perl"␤»
moritz_ oh 16:47
16:47 pyrimidine_ joined
moritz_ std: say (<a b c> >>Z>> 1).perl 16:47
p6eval std 31445: OUTPUT«===SORRY!===␤Unsupported use of >> to do right shift; in Perl 6 please use +> or ~> at /tmp/ec6cegS8B8 line 1:␤------> say (<a b c> >>Z>>⏏ 1).perl␤Missing << or >> at /tmp/ec6cegS8B8 line 1:␤------> say (<a b c> >>Z>>⏏
..1).perl…
[particle] texas bug.
pmichaud at least rakudo matches STD here :-)
cxreg :)
moritz_ pmichaud, [particle]: if you have some few minutes, I've pushed a branch called 'optimizations' to rakudo's github repo... 16:50
cxreg i need to fix my utf8+irssi setup
moritz_ I plan to play a bit with tcurtis' optimiatzioin framework
16:50 macdaddy joined
moritz_ but I can't get inheritance in NQP from HLL::Compiler working 16:50
16:50 macdaddy is now known as Guest2485 16:51 pyrimidine left, pyrimidine_ is now known as pyrimidine
moritz_ if you try to build that branch with the parrot from svn.parrot.org/parrot/branches/gso...timization there's a compilation error 16:51
"Parent is not a class"
which I don't know how to get rid of
would be great if somebody could help me a bit
(currently I don't really plan optimizations, but rather detect simple type clashes at compile time)
pmichaud "Parent is not a class" generally occurs when p6object gets confused about class/type objects 16:52
looking
16:53 gbacon joined
pmichaud you probably don't need to be loading any special .pbc's. Or, if you do, then the Optimizer is being included way too early in the process. 16:53
(you'll need to load PAST/Pattern.pbc, yes)
the other two get loaded automagically already in rakudo
16:54 pyrimidine left
moritz_ without loading P6Metaclass.pbc I get 'can't call method new_class on non-object' or so 16:54
might be too early, yes
16:54 pyrimidine joined
pmichaud how/where is the perl6-optimizer.pir being included ? 16:55
[particle] moritz_: in 'very basic type checking', on p6u, you forgot that 'my' could be overridden, too
pmichaud ah, it's being included from Compiler.pir
moritz_ [particle]: I omitted it deliberatly :-)
[particle] :)
pmichaud yes, this is correct, but it's waaaaaay to early in the sequence.
moritz_ pmichaud: suggestions for a better point?
[particle] has a failing nqp-rx test 16:56
pmichaud where gen-actions and gen-grammar get loaded
around line 122
moritz_ (and can I make a stage that's not a subclass of HLL::Compiler?)
[particle] oh, nm, i need libicu-dev installed
TimToady sorear: 1 >>Z>> 2 is a bug of some kind; it should not pass the <?before \s> to get the the error, and it should not even call that rule because the ltm should be '>>\s'
[particle] interesting that nqp-rx requires icu and rakudo doesn't
pmichaud nqp requires icu to build? or just for the tests?
[particle] for the tests 16:57
pmichaud [particle]: right -- you're the first person apparently to run the tests w/o icu present (or at least the first to mention it :)
[particle] in particular, t/nqp/46-charspec.t
pmichaud we might be able to do a skip or something
[particle] i started with a bare kubuntu 10.04
pmichaud moritz_: there's nothing that says that stages need to be subclasses 16:58
[particle] had to install git, subversion, gcc-4.4 so far
now icu
pmichaud stages are just methods on the compiler object (at least as PCT::HLLCompiler currently implements them)
I'm still not comfortable with the linear nature of the staging.
TimToady and even if it did have an ltm of only '>>', it should be picking the earlier metaoperator from [ '<<' | '>>' ]
moritz_ pmichaud: so how could I implement a stage for example as a sub? or as a class completely on its own? 16:59
pmichaud it's just a method
so just add a method to the Perl 6 compiler object, and then put that method into the list of stages
moritz_ so, monkey patching instead of subclassing?
pmichaud if you want to subclass you can do that
but it's effectively the same thing :) 17:00
moritz_ ok
pmichaud subclass the compiler, add a stage method, put the method into the list of stages :)
moritz_ yes, that kinda was my plan
pmichaud there might be some places in the code base that explicitly use Perl6::Compiler, though.
we might have to pick that out of the current braid somehow.
this past week I've finally moved beyond "building a Perl 6 compiler" to "using Perl 6" and I have to say.... I like it a lot. 17:04
17:06 cdarroch joined, cdarroch left, cdarroch joined
moritz_ moving the .include 'src/gen/perl6-optimizer.pir' down to line 122 didn't help, same error 17:06
17:06 cygx joined
patrickas btw moritz_ I fixed a new issue in series after I sent you the pull request, should I send a new one? or do you automatically see the current master with all the changes including the ones done after the request? 17:07
moritz_ patrickas: I automatically get all of them 17:13
patrickas: so far I've hesitated to apply the changes because I know that colomon++ also has uncommitted changes to the series code
patrickas: so I'd rather have him review the patches
colomon moritz_: actually, everything I've got is committed. 17:14
17:14 skids joined
moritz_ colomon: oh, that's good 17:14
colomon however, we seem to be getting dueling series patches at the moment...
moritz_ seems to be quite a popular topic these days 17:15
pmichaud moritz_: I'll have to look at it a bit later. But the problem is nearly always related to something to do with class initialization. 17:17
moritz_ pmichaud: ok
pmichaud I haven't seen that error in a long time, so I don't remember exactly what it means. :)
patrickas colomon: I pull request you then for the series patches ? 17:18
moritz_ patrickas: could you please try to merge/rebase your changes with current rakudo master? there are some merge conflicts right now :/ 17:19
colomon patrickas: you can, but I'm likely to be slower than moritz_ at the moment -- I've got four days of missed $work (being at YAPC this week) to catch up on asap. 17:20
pmichaud afk, commuting
TimToady there is some sentiment here that the sequence 2,3,5...* should be recognized specially as returning prime numbers 17:21
moritz_ where is "here"?
colomon table of the insane at YAPC, I presume. ;)
TimToady the p6 tutorial that TheDamian++ is teaching
moritz_ well, back when we introduced the series operator, there were some discussions about the level of magic that it should perform 17:23
and there seemed to be two general opinions
TimToady yes, but that particular one is hard to write
and commonly useful 17:24
moritz_ one was "use the $database_of_discrete_series"
and the other was "make it as siimple as possible"
TimToady so one extreme or the other must be correct, eh? :)
moritz_ no 17:30
I just think that one of the extremes will be less surprising than the rest
patrickas moritz_: I am a total git noob! I pulled from rakudo/rakudo.git master right before doing the patches, and now I get "Already up to date". I don't know what I should do! 17:31
moritz_ patrickas: ok, I'll investigate
patrickas: maybe it was a local problem here
std: for 0 { when ARRAY {} }
p6eval std 31445: OUTPUT«===SORRY!===␤Function 'ARRAY' needs parens to avoid gobbling block at /tmp/uyIFbm_fZH line 1:␤------> for 0 { when ARRAY⏏ {} }␤Missing block (apparently gobbled by 'ARRAY') at /tmp/uyIFbm_fZH line 1:␤------> for 0 { when ARRAY 17:32
..{}⏏[3…
TimToady ARRAY is unrecognized, and so taken as as listop 17:33
moritz_ yes, I understand that
it's a ticket by cognominal++ complaining about a LTA error message in Rakudo
TimToady ah 17:34
ashleydev why use make instead of return in gist.github.com/452999 17:35
moritz_ ashleydev: make() sets $/.ast
return doesn't
ashleydev thx 17:36
moritz_ patrickas: it was a local problem here indeed... I've applied your patches locally, squashed them all into one, and I'm testing it now 17:37
patrickas oh ok good ... thanks :-)
you should be able to unfudge 5 tests + 1 TODO
moritz_ that's good news 17:38
but first I have to buy some nom before the shops close (they do that at 8pm here, by law) 17:40
17:41 Lorn joined 17:42 saaki joined 17:52 gbacon left 17:57 gbacon joined 18:11 mantovani joined
dalek kudo: 4e6cce6 | (Patrick Abi Salloum)++ | src/core/operators.pm:
Various series fixes:

  * generators that involve geometric sign change work (we pass an extra TODO)
  * use Numeric instead of Num so that Rats also work
Signed-off-by: Moritz Lenz [email@hidden.address]
18:22
18:24 jrtayloriv joined, Mowah joined
moritz_ phenny: tell pmurias that I'm working on my yearly "Getting involved with Perl 6" post for perlmonks. Is there anything I should say about contributing to mildew, and if yes, what? 18:29
phenny moritz_: I'll pass that on when pmurias is around.
moritz_ phenny: tell pmurias also if you want to have any links to mildew that you would like to see included, please let me know 18:32
phenny moritz_: I'll pass that on when pmurias is around.
moritz_ diakopter: ping 18:35
pugssvn r31446 | patrickas++ | un-fudge a few tests that should pass now. 18:36
ash_ can you call the repl from within a perl6 script?
like &interactive() starts it? (or something?)
moritz_ ash_: run('perl6')
ash_ ah, cool 18:37
moritz_ that just starts a new process though
ash_ so it won't have all of the stuff from the current process?
moritz_ right
ash_ :-(
moritz_ there might be some way to grab the current Perl6::Compiler object, and call the appropriate methods on it
but it's not something standard
and probably requires some poking into internals 18:38
ash_ i don't mind doing that if i know its rakudo, but it would be cool to be able to do that, so if you had a script you wanted to test for instance you could just put in whatever you need to start the REPL at that point and run the script 18:39
18:39 masak joined
masak oh hai, #perl6! 18:39
moritz_ ash_: agreed
lolitsmasak!
masak lol! 18:40
colomon \o
masak happy midsummer's eve!
moritz_ there's something's I'd like to have your opinions on (where "you" is "everybody in the channel who feels like answering" :-) ... 18:41
in the announcement of the weekly contribution challenges I've announced that some t-shirts will be given to contributors
so I thought I'd write a Perl 6 script that randomly .pick()s some of the contributors 18:42
now, there are two possible modes:
18:42 tadzik left
moritz_ 1) throw all of them into a big pot, and draw from that 18:42
or
[particle] i wish we had a site like stackoverflow where we could give badges for p6 challenge contributors
moritz_ 2) for each week, list the contributors, and randomly chose one from each week 18:43
I kinda prefer 2), because it honors those who picked up challenges that nobody else took up
masak +1
18:44 tadzik joined
[particle] +2 for me. 18:44
moritz_ I kinda plan to continue the challenges, but I don't know how regular they'll be, and I might not promise t-shirts :-) 18:45
patrickas moritz_: I suppose that depends on the number of t-shirts you have :-)
moritz_ patrickas: well, it roughly amounts to 5..8, and we had 7 weeks so far
depends on shipment costs 18:46
and how much [particle]++ wants to organize from the rakudoconsulting group
Juerd Are they perl6 specific shirts?
+1 for mode 2 btw
moritz_ Juerd: yes, though if anybody wants to contribute non-perl 6 shirts I'd welcome those too 18:47
does anybody want to speak up for option 1)? 18:48
patrickas die option 1 die in a great blaze of glory :-) 18:50
moritz_ I'll also make sure that everybody gets at most one t-shirt 18:53
(two people have contributed to two challenges each)
patrickas :-) 18:54
at least one got totally hooked! :-) 18:55
moritz_ aye. That alone was worth it.
masak patrickas++ 18:56
patrickas actually moritz_++ and masak++ for helping us rakudonoobs contribute! 18:59
moritz_ any objections against nopaste.snit.ch/21583 ?
s/against/to/
seems like a fair algorithm to me, but I'd like some review first 19:00
masak patrickas: I'm glad my utterly random actions on this channel were perceived as helpful. :P
patrickas damn you David Green! I will hunt and destroy you :-)
moritz_ lol
patrickas masak :-P
moritz_ patrickas: David Green also contributed a Str.trans implementation... so your chances of winning a t-short for week 3 are actually > 50% 19:01
sorear hello #perl6 19:02
masak patrickas: you probably meant "I will hunt and hug you" :-P
colomon sorear: o/
patrickas masak: Yes that's how I destroy people ...
masak ah, the "crushing gambit"...
moritz_ sorear: hi. I'm writing a perlmonks node about how to contribute to Perl 6... is here anything I should write about viv and/or sprixel/csmeta? 19:03
patrickas moritz_: actually I think that means "Chris Fields", "rgrau" have higher chances ...
moritz_ if yes, what?
patrickas: it means that if day 5 is picked before day 3, and David Green is picked, you'll win for sure at day 3
cygx moritz_: I think I have the backend figured out with regard to race-conditions/action at a distance: nopaste.snit.ch/21584
sorear moritz_: doubtful. 19:04
patrickas Oh ... I did not notice that the weeks were also random!
moritz_ patrickas: the scenario I've described above (which also works the other way round of course) are the reason for the @contribs.pairs.pick(*) 19:05
19:06 cono joined
moritz_ cygx: looks good 19:06
moritz_ doesn't want to wait anymore
cygx moritz_: also, ash_ has volunteered to work on the tutor part/client side magic; we're thinking about inplementing that in Perl6, which can basically call JavaScript to change the UI 19:07
eh... basically remotely call
moritz_ cygx: I don't quite understand which part is going to be in Perl 6 19:08
and the winners are... nopaste.snit.ch/21585
winner => week 19:09
{"Hongwn Qiu" => 4, "patrickas" => 3, "bubaflub" => 2, "David Green" => 5, "cygx" => 7, "sahadev" => 6, "shawjef3\@msu.edu" => 1}
pmichaud back again
ash_ the tutorial, so if you wanted to start say chapter 1 of the tutorial (i plan on stealing the chapters from the rakudo book), you could just say "chapter 1;
"
patrickas first fame ... now fortune for patrickas \o/
cygx moritz_: the tutor is just a Perl6 function you can call and which produces output which, instead of writing to the consoles, triggers changes in the UI
sahadev awesome :) 19:10
moritz_ cygx, ash_: ah, that's a good idea
sahadev: please /msg or email me your snail mail address
patrickas: same goes for you
ash_ if your lost, you just say; "help; " and we print a helpful message, etc.
moritz_ +1 19:11
cygx basically, we'll write a server-side Perl6 <-> client-side JS RPC interface 19:13
ash_ (i am not that original btw, tryruby.org/ is what I am being inspired by)
moritz_ ash_: I think tryruby just regex-matches input and output, and then advances 19:14
cygx from the difference in execution speed of code execution and UI changes, I'd guess so, tooo 19:15
pmichaud is there a place for filing future challenges of the week? or is that going to be a limited time thingy? 19:16
sahadev rakudo: my @a = 1, 2, 3 ... *; say @a.shift for 1..5
p6eval rakudo 4e6cce: ( no output )
moritz_ pmichaud: it's in the pugs repo, misc/helpnow/README
sahadev rakudo: my @a = 1, 2, 3 .. *; say @a.shift for 1..5
moritz_ pmichaud: or just talk to me here :-)
p6eval rakudo 4e6cce: ( no output )
pmichaud I'm wondering if $*ARGFILES would be a good challenge.
moritz_ is that the new <> magical file handle? 19:17
pmichaud yes.
moritz_ it might be
future challenges might not be t-shirt motivated though :-) 19:18
pmichaud so, that idea would go into the README directly?
moritz_ pmichaud: right
pugssvn r31447 | pmichaud++ | [helpnow] Add another possible challenge to README. 19:19
ash_ i just said i was inspired by, i didn't say we have to do it the way they did it, i think having parts of the tutorial actually in rakudo would be kinda nice
moritz_ right
pmichaud ash_: I think you can get to the interactive REPL with Perl6::Compiler.interactive(); 19:20
sahadev rakudo: my @a = 1, 2, 3 .. *; say @a.munch(5)
pmichaud (testing)
cygx I agree; it might hurt resposiveness, though
p6eval rakudo 4e6cce: ( no output )
sorear std: 1 <<+>> 2
p6eval std 31446: OUTPUT«ok 00:01 112m␤»
pmichaud sahadev: array assignment is eager (and rakudo doesn't yet know how to halt on infinite eagerness)
19:21 jrtayloriv left
sorear TimToady: it's not the hyper, it's the Z being greedy and parsing <<[Z[>>] ... 19:21
ash_ rakudo: my @a = (1 .. *).munch(5); say @a;
p6eval rakudo 4e6cce: OUTPUT«Method 'munch' not found for invocant of class 'Range'␤ in main program body at line 11:/tmp/iRoU7J1A11␤»
ash_ rakudo: my @a = (1 ... *).munch(5); say @a; 19:22
p6eval rakudo 4e6cce: OUTPUT«12345␤»
pmichaud rakudo: my @a = (1 .. *).list.munch(5); say @a; 19:25
p6eval rakudo 4e6cce: OUTPUT«12345␤»
pmichaud hmmm
probably need to move munch
well, not move it, but define Iterable.munch as forwarding.
or maybe it's even Any.munch
pmichaud guesses Any. 19:26
19:31 cdarroch left 19:36 cdarroch joined, cdarroch left, cdarroch joined, pyrimidine left
sahadev pmichaud: ah. i have been wondering why my little script wasn't terminating. 19:42
diakopter moritz_: pong? 19:53
19:53 jferrero joined
cygx moritz_, ash_: I added design docs to github.com/moritz/try.rakudo.org/ ; I don't know how much time I'll have available for coding during the next few days, but I call dibs on the server-side frontend; the client-side UI libs and the backend are up for grabs, though 19:55
20:00 tadzik left 20:05 RAT joined
moritz_ diakopter: I'm writing my yearly perlmonks post about how to contribute to Perl 6... 20:16
diakopter: is there any document or web page I could point people to regarding sprixel/csmeta?
something that tells people what needs doing, where to ask for help etc. 20:17
20:18 Guest1208 joined
ash_ cygx: i can work on the client ui or the backend, either way is fine by me, or i can make a prototype of both then we can move forward from there (by prototype i mean get a minimal part of it working to make sure everything alright) 20:19
20:19 RAT left
moritz_ +1 to first prototyping (but those who implement decide in the end) 20:20
cygx: by participating in the contribution challenge you've won a cool perl 6 or rakudo t-shirt
cygx: please /msg me your postal address, t-shirt since and whether you want a Perl 6/camelia or a Rakudo t-shirt 20:21
rakudo.spreadshirt.de/rakudo-perl-A...ze/color/1 vs. rakudo.spreadshirt.de/second-system...ze/color/1
20:24 stepnem joined
masak rakudo: sub foo($x where 1 --> Int) {} 20:31
p6eval rakudo 4e6cce: OUTPUT«===SORRY!===␤Missing block at line 11, near "-> Int) {}"␤»
masak std: sub foo($x where 1 --> Int) {}
p6eval std 31447: OUTPUT«ok 00:01 113m␤»
masak submits rakudobug
seems 'where' and '-->' in signatures don't play well together in Rakudo.
cygx ash_: whatever you decide is fine with me; im not really keen on the ui stuff, but I also would only start on the backend after the frontend is in a somewhat reasonable state 20:32
moritz_ masak: what about where { block } + --> ? 20:33
masak moritz_: same ordeal.
moritz_ rakudo: sub foo($x where { $_ ~~ 1} --> Int) { }
p6eval rakudo 4e6cce: OUTPUT«===SORRY!===␤Missing block at line 11, near "-> Int) { "␤»
masak std: sub foo($x where { $_ ~~ 1} --> Int) { }
p6eval std 31447: OUTPUT«ok 00:01 112m␤»
masak moritz_: good you pointed that out. adding that to the ticket.
the block form was the way I discovered it. the 1 was the golfed variant :) 20:34
[particle] notice the rakudo error message
it references ->, not -->
20:34 Guest1208 left
moritz_ LTM trouble? 20:35
moritz_ -> bed
20:37 Guest1208 joined
cygx (Perl Foundation)++ # thanks for augmenting my wardrobe 20:46
[particle] cygx++ # thank you for your support 20:50
20:56 Trashlord left 21:00 whiteknight joined
masak rakudo: subset H of Hash; role R { method x(H $project) {} }; class A does R { multi method x($project) {} }; A.new.x({ a => "b" }) 21:07
p6eval rakudo 4e6cce: OUTPUT«Null PMC access in invoke()␤ in 'ACCEPTS' at line 1␤ in main program body at line 1:/tmp/or4cFvI7Gu␤»
masak submits rakudobug
"multi method killed in tragic Null PMC accident involving a role and a subtype".
rakudo: subset H of Int; role R { method x(H $project) {} }; class A does R { multi method x(H $project) { say "OH HAI" } }; A.new.x(42) 21:09
p6eval rakudo 4e6cce: OUTPUT«OH HAI␤»
masak and the Hash type seems to be involved in the collision as well.
might simply be another manifestation of "you can't see anything from within a role". 21:10
but, hm, then there shouldn't be any difference between subtype of Hash and subtype of Int...
21:13 supernovus joined, cygx left 21:14 gbacon left
supernovus I have two bugs, but I can't find related tickets for them in RT, although I'm sure they are known about. 21:16
masak rakudo: say "supernovus: show them with p6eval! :)"
p6eval rakudo 4e6cce: OUTPUT«supernovus: show them with p6eval! :)␤» 21:17
supernovus rakudo: for %*ENV.kv -> $k, $v { say $k~"="~$v; }
p6eval rakudo 4e6cce: OUTPUT«Method 'key' not found for invocant of class 'String'␤ in main program body at line 4319:CORE.setting␤»
supernovus That's the "%*ENV doesn't act like a normal hash when trying to use .kv on it" bug.
And here's the "cannot augment Hash" bug: 21:18
rakudo: use MONKEY_TYPING; augment class Hash { method hi { say 'hi' } }; my %h; %h.hi;
p6eval rakudo 4e6cce: OUTPUT«Method 'hi' not found for invocant of class ''␤ in main program body at line 11:/tmp/AayQsvcfGd␤»
masak I'll have a look around RT for you.
supernovus: there's this old classic: rt.perl.org/rt3/Ticket/Display.html?id=57400 21:19
we might re-open it for your .kv woes :)
supernovus: as for the other bug, I think it's new, and you should file it. :) 21:20
the closest I get is rt.perl.org/rt3/Ticket/Display.html?id=75718
and that's not the same.
however, it's the same as the one I just filed, so I'll go and merge those now. :) 21:21
21:22 ashleydev joined 21:23 xinming_ joined
supernovus I think the old classic %*ENV bug has re-emerged in the new master. It had been fixed in 'alpha'. As for the new bug, I guess I'll just submit one for "use of augmented Hash methods fails" or something to that effect. It may be related to rt.perl.org/rt3/Ticket/Display.html?id=75114 which seems to hint that several core classes have had issues with the augment functionality. 21:25
masak aye. 21:27
supernovus bug submitted 21:36
masak supernovus++
supernovus I'm going to continue digging through the code for some of my projects and testing things that worked in 'alpha' and see what I can find that doesn't work in 'master'. I know PSpec and ww6 are both good candidates for finding bugs :-) 21:38
21:39 jferrero left
supernovus be back later :-) 21:40
21:40 supernovus left 21:54 jferrero joined
jnthn masak: Problem with subtype of hash sounds a bit familiar...I'm sure I looked at (but didn't fix...) a realted ticket recently. Was perhaps a different issue htough. 21:59
masak jnthn: I also think it rings familiar. 22:02
jnthn ah welll, if it's a dupe it'll get found :-) 22:03
Plus I know we're not running all the subtype tests alpha did.
22:03 tedv joined
jnthn Will catch 'em in my ongoing S12/S14 test triage. :-) 22:03
masak \o/ 22:04
jnthn has made it to Brussels. Belgian Perl Workshop tomorrow. 22:05
uh, oday ;-) 22:07
*today
lue ohai 22:13
masak greets lue 22:17
22:19 LionMadeOfLions joined
lue
.oO(I wonder how pmichaud is doing with variable refactor)
22:22
pugssvn r31448 | lwall++ | [STD] scope parameters' "of" types correctlier 22:26
masak "[...] even lolcats are known to use Perl6" :) uncyclopedia.wikia.com/wiki/Perl6 22:29
generally, I'm very hopeful after reading that article. I didn't realize Perl 6 was that powerful. 22:30
lue runs to uncyclopedia 22:31
22:32 patspam left
lue I started reading that and thought .oO(Nice, but I could do better) . Now, the notice at the bottom is begging me :) 22:33
masak lue: go for it. 22:34
lue rakudo: our $heads; object.explode($heads);
p6eval rakudo 4e6cce: OUTPUT«Could not find sub &object␤ in main program body at line 11:/tmp/vJzS1rZnGi␤»
lue :) 22:35
22:35 LionMadeOfLions left
jnthn gets some rest 22:36
22:36 kfo_ joined
lue good rest, jnthn o/ 22:37
masak 'night, jnthn! 22:38
22:40 kfo_ is now known as kfo
cxreg is taking bets on which actually ships first, R* or Pg9.0 22:40
lue I bet on the Rakudo Death Star :) 22:41
rakudo: die(*)
p6eval rakudo 4e6cce: OUTPUT«!whatever_dispatch_helper␤ in main program body at line 11:/tmp/jvn4w3TwRt␤»
masak cxreg: well, there's a date for Rakudo Star now, so you can base your predictions on that... :) 22:42
cxreg masak: sure, but pg is up in the air, and r* /could/ go early 22:43
lue
.oO(It's almost a fully operatorial death star!!)
22:44 mjk joined
masak looks into adding backtracking-into-subrules to GGE 22:44
sorear How does GGE differ from the old Cursor.pm6? 22:46
masak GGE isn't based on cursors at all, it's based on the design PGE used, where grammars are matches. 22:47
everything is matches in that model, basically.
even regex expression nodes are matches.
22:50 LionMadeOfLions joined
masak alpha: regex foo { a+ }; say ?("aaa" ~~ /<foo> a/) # alpha has backtracking into subrules 22:50
p6eval alpha 30e0ed: OUTPUT«1␤»
masak rakudo: our regex foo { a+ }; say ?("aaa" ~~ /<&foo> a/) # rakudo master doesn't
p6eval rakudo 4e6cce: OUTPUT«0␤» 22:51
cxreg sorear: its interesting that Z eats >> when it doesn't eat the guillemet
masak of course, the tricky thing is that <foo> can't just succeed and then be done with it; it has to leave enough state info around for a match to resume.
PGE solves it with coroutines. but I don't have coroutines in Perl 6. so I'll have to fake it. :) 22:52
TimToady it's easy to fake it with lazy lists 22:54
masak not sure it's easy with this design. 22:55
TimToady yes, well, that's where immutable cursors come in
backtracking is braindead easy when it just involves throwing away a cursor from the front of the list 22:56
masak that does sound attractive right now :)
ash_ can gather/take make a coroutine? 22:57
TimToady supposed to
masak hm, I just realized I can only attach a fake-continuation object to a compiled regex if it's a named regex in a grammar. but that's the only time I have to, so it's OK.
pugssvn r31449 | lwall++ | [STD] don't check for P5ish >> or << in any metaop 23:01
r31449 | don't recognized infix < or > if next char is dup
TimToady cxreg: the reason is that Z> is a valid operator, and Z>> is (before the last checkin) a valid "invalid" sequence 23:04
cxreg right, ok
TimToady likewise for X>
after this checking <<X>> will always be taken as <<[X]>> 23:05
23:05 ashleydev left
TimToady (assuming I didn't screw up) 23:05
masak time to go home and pretend to sleep. 23:07
g'night, #perl6.
TimToady o/
23:07 masak left
TimToady and if you really mean <<[X>]>>, that's how you have to write it 23:07
23:10 mjk left 23:15 jaldhar joined 23:17 ashleydev joined
sorear cxreg: the guillemet doesn't match <infix> 23:20
TimToady rakudo: .say if /ing$/ for slurp.words
p6eval rakudo 4e6cce: OUTPUT«Not enough positional parameters passed; got 0 but expected 1␤ in 'slurp' at line 4655:CORE.setting␤ in main program body at line 11:/tmp/OcREuJovyB␤»
sorear std: sub infix:<»>() {}; 1 «X» 2 23:21
p6eval std 31449: OUTPUT«===SORRY!===␤Missing « or » at /tmp/WNZTEi_B_S line 1:␤------> sub infix:<»>() {}; 1 «X»⏏ 2␤ expecting any of:␤ bracketed infix␤ infix or meta-infix␤ infix_circumfix_meta_operator␤Parse failed␤FAILED 00:01 114m␤»
cxreg sorear: ah
TimToady sub infix:<»>() {}; 1 «[X»]» 2 # seems like a sufficient workaround
sorear given that disambiguating ««««««««X»»»»»»»» from ««««««««X»»»»»»»»» requires unlimited lookahead, I'm willing to forgive STD's current behavior 23:22
although I might put in a .worry for if infix matches anything that could close the current metaop
TimToady doubless always putting the [op] will become some kind of PBP 23:23
rakudo: say slurp 23:24
p6eval rakudo 4e6cce: OUTPUT«Not enough positional parameters passed; got 0 but expected 1␤ in 'slurp' at line 4655:CORE.setting␤ in main program body at line 11:/tmp/37BS5HOCzI␤»
TimToady seems like LHF to default slurp to argfiles 23:25
colomon does argfiles work already? 23:26
TimToady it could at least default to $*IN for now 23:27
colomon TimToady: sorry I didn't get to say goodbye to you yesterday.
TimToady it's not the end of the world :)
cxreg wonders if STD.pm6 will live in pugs' svn forever 23:28
it seems particularly unique
colomon TimToady: should lines default as well? 23:31
23:33 nimiezko joined
sorear cxreg: "pugs" is a really bad name 23:33
23:33 cdarroch left
sorear cxreg: it's actually "random perl6 stuff that doesn't live anywhere else" 23:33
important things which do not live there: pugs 23:34
cxreg LOL
TimToady colomon: yes 23:35
it is tempting to make words default too :)
then it'd just be: .say if /ing$/ for words 23:36
colomon hmmm.... would that do *ARGFILES.lines.words? 23:37
(at least until we have Cat?) 23:38
TimToady well, .lines.words is a bit silly, since words already splits on line breaks 23:40
sorear TimToady: Do you have any thoughts on the notion of tool-specific extensions to Perl 6? 23:41
23:44 sorear sets mode: +o colomon
sorear What happens when you ask a grapheme for its Unicode properties? 23:45
dalek p-rx: caa5ba5 | bacek++ | (3 files):
Implement expression for modifier
23:49
23:50 ashleydev left
TimToady are those questions supposed to be related? o_O 23:53
23:53 Psyche^ joined
TimToady (in any case, no, and I dunno.) 23:54
23:55 Psyche^ is now known as Patterner
TimToady ((in the former case, because I have no idea what tool-specific extensions means, and in the latter, because we haven't really thought much about individual characters as objects yet)) 23:55
sorear Right now I'm thinking about making viv laziness-aware, so that the cursor primitives could maybe me moved back up to Cursor.pm6 23:56
thinking that I might need to pass more information into viv as a result 23:57
but I don't think that anymore
TimToady well, Cursor's laziness requires explicit action on the part of the recipient to iterate, so viv would have to make sure the context of any lazy evaluation supplies that 23:59
alternately, if you want to hack lazy lists into Perl 5 at a lower level, I'd be fine with that :)