Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2010-08-02

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 masak when you want something more advanced than that, you can use (a) macros, (b) a sublanguage, or (c) eval.
00:00 masak there is very limited support for the former two, so I use eval at present.
00:00 jnthn masak: I suspect you should be able to stick stuff into namespaces too.
00:00 Alias_ joined #perl6
00:01 masak jnthn: could you give me and frooh a proof-of-concept?
00:01 masak jnthn: does it involve pir:: calls?
00:01 frooh well, I can use eval as a shim, but if that's really the recommendation....that's totaly gross
00:01 frooh like, long term I mean
00:02 masak eval isn't that gross.
00:02 jnthn masak: I meant in ideal Perl 6 rather than what's in Rakudo today.
00:02 frooh masak: to me it is :-)
00:02 masak what's gross is if you connect user input to eval somehow.
00:02 frooh I'm not talking about security
00:02 masak but as for the rest, it's just a really powerful tool with a bad rep, just like recursion.
00:02 frooh right
00:02 frooh which is fine
00:03 jnthn masak: Can you go a bit deeper with that point?
00:03 frooh but why would you take access to the symbol table away in p6?
00:03 masak jnthn: are you genuinely curious, or just being punny?
00:03 jnthn frooh: I suspect it should be along the lines of SomePackage::<&name> := sub { ... }
00:03 jnthn masak: I thought you'd know me well enough by now. :P
00:03 frooh http://paste.scsys.co.uk/47459
00:04 frooh jnthn: the former is what I *thought* would work
00:04 masak jnthn: good, because I don't really have more to say on the issue. :)
00:04 frooh jnthn: any idea if that's supported?
00:04 masak g'night, #perl6.
00:04 jnthn night, masak
00:04 jnthn safe travles
00:04 jnthn :-)
00:04 jnthn *travels
00:04 masak likewise.
00:06 frooh jnthn: yeah, doesn't seem to be supported
00:06 jnthn No, we don't implement any of the interpolated package stuff yet.
00:06 frooh I'm fine leaving it out as this isn't that big of a deal
00:06 frooh but I don't think that eval is really a good long term solution
00:06 jnthn Something *like* that (but I think not exactly looking that way) should work.
00:06 jnthn Yeah
00:06 frooh it's kindav a giant hammer you know?
00:06 jnthn Aye
00:06 jnthn I agree
00:07 jnthn We just don't have a good way yet to avoid it.
00:07 frooh sure, and that's fine
00:07 frooh and even if you never did
00:07 frooh giving us that hammer means we can wrap tools around it
00:08 jnthn *nod*
00:13 shirtless Is twigil to make a variable immutable?
00:13 shirtless Is there a*
00:21 frooh star: eval { die 1 }; say 2;
00:21 p6eval star 2010.07: OUTPUT«Nominal type check failed for parameter '$code'; expected Str but got Block instead␤  in 'eval' at line 1128:CORE.setting␤  in main program body at line 22:/tmp/S8BxE8IkJN␤»
00:21 frooh star: try { die 1 }; say 2;
00:21 p6eval star 2010.07: OUTPUT«2␤»
00:22 tylercurtis shirtless: I think you want "my $foo is readonly;"
00:22 shirtless tylercurtis, how would it look if I had a has %commands =
00:24 tylercurtis shirtless: oh. I see. You want an immutable hash.
00:24 shirtless I guess for now it's safe to let it be mutable
00:24 tylercurtis Presumably there's  a way to do that.
00:24 shirtless I'll figure out out eventually when i have some time
00:24 tylercurtis I don't know that it is.
00:24 shirtless going through the source or what not
00:25 tylercurtis shirtless: EnumMap appears to be what you want. http://perlcabal.org/syn/S​32/Containers.html#EnumMap
00:26 tylercurtis rakudo: my EnumMap $foo .= new(a => 5); $foo.perl.say; $foo<a> = 6; $foo<a>.say;
00:26 p6eval rakudo 9b6189: OUTPUT«{"a" => 5}␤Cannot modify readonly value␤  in '&infix:<=>' at line 1␤  in main program body at line 22:/tmp/OigwFODmdv␤»
00:27 shirtless cool
00:27 shirtless I need more time :-O
00:36 tylercurtis Whoa. C99 supports escape sequences in identifiers?
00:37 [Coke] joined #perl6
00:47 melte hm. okay, related to the above, how would I call an anonymous sub that's in a hash? e.g. in perl5: &{$table{$item}}
00:48 quietfanatic joined #perl6
00:49 quietfanatic That'd just be $table{$item}()
00:49 quietfanatic It's the () at the end that calls subs
00:49 quietfanatic not the &
00:50 ruscoekm joined #perl6
00:51 melte star: my %table = ('a' => sub { say "hello world" }); $table{'a'}();
00:51 p6eval star 2010.07: OUTPUT«===SORRY!===␤Symbol '$table' not predeclared in <anonymous> (/tmp/dOxWBbXjzo:22)␤»
00:51 melte star: my %table = ('a' => sub { say "hello world" }); %table{'a'}();
00:51 p6eval star 2010.07: OUTPUT«hello world␤»
00:51 melte :)
00:54 tylercurtis quietfanatic: are you some sort of ninja or clairvoyant or IRC-log-reader?
00:58 tylercurtis Oh my... apparently, the C99 preprocessor considers 12324.34023_afbjkej43e+342p​-234..............342342345 to be a number.
01:02 melte star: my %table = ('a' => sub { 1 }); %table{'a'}()
01:02 p6eval star 2010.07:  ( no output )
01:03 melte weird. I get an error "Could not find sub &a  in main program body at line 1"
01:04 melte blah, my typo
01:05 pmichaud good evening, #perl6
01:07 pmichaud ...was it something I typed?
01:07 quietfanatic tylercurtis: The latter, I'm afraid.
01:07 tylercurtis Good evening, pmichaud.
01:08 sorear hello pmichaud
01:08 ashleydev joined #perl6
01:09 jnthn o/ pmichaud
01:09 jnthn No, just packing ;-)
01:10 pmichaud yeah, I did that earlier.  I'm at the airport now.
01:10 jnthn :-)
01:10 jnthn Leaving in 2 and a bit hours
01:11 pmichaud scheduled to board in 19 mins
01:11 pmichaud trying to get last-minute updates via wifi before boarding :)
01:13 phenicsl joined #perl6
01:18 jnthn :)
01:19 jnthn Have a safe flight.
01:19 pmichaud you also :)
01:19 jnthn Thanks. :)
01:19 jnthn Hopefully see you in 16.5 :-)
01:20 tylercurtis std: 5++
01:20 p6eval std 31886: OUTPUT«ok 00:01 114m␤»
01:25 melte perl6 -e 'my $a = getc($*IN); $a.perl.say' # gives me "\x[0]" everytime
01:26 pmichaud getc NYI, I think.
01:26 melte sheeet
01:27 pmichaud I'm surprised you don't get an error, tbh
01:27 pmichaud rakudo:  my $a = getc($*IN);  $a.perl.say
01:27 p6eval rakudo 9b6189: OUTPUT«src/gc/gc_ms.c:1256: failed assertion 'PObj_is_movable_TESTALL(str)'␤Backtrace - Obtained 20 stack frames (max trace depth is 32).␤/home/p6eval//p2/lib/libparrot.so.2.6.0 [0x2ab0b900f203]␤/home/p6eval//p2/lib/l​ibparrot.so.2.6.0(Parrot_confess+0x87)
01:27 p6eval ..[0x2ab0b900f337]␤/home/p6eval//p2…
01:27 pmichaud well, that's not helpful.
01:27 melte heh
01:27 pmichaud star:  my $a = getc($*IN);  $a.perl.say
01:27 p6eval star 2010.07: OUTPUT«"\x[0]"␤»
01:27 pmichaud that's.... surprising.
01:28 melte glad I'm not the only one :)
01:28 ingy greetings
01:28 melte easier question then: how do I read from $*IN in general? =$*IN, <$*IN>, I haven't hit upon the working syntax yet
01:28 pmichaud $*IN.get   # read a line
01:28 pmichaud $*IN.lines   # read all of the lines
01:29 tylercurtis pmichaud: getc appears to be implemented: "my $c = $!PIO.read(1); fail if $c eq ''; $c;".
01:29 pmichaud I see it there.... but obviously it's failing.
01:29 tylercurtis Whether it works, may be a different question.
01:29 melte thanks. I googled and searched synopses, didn't find the relevant spec. I'm still bad at finding perl6 stuff :(
01:29 pmichaud anyway, boarding now -- bbl.
01:30 tylercurtis melte: for IO stuff, try S32 IO
01:30 pmichaud melte: yes, I'm not sure getc() is documented for perl6 yet, or that it's even "for real"
01:30 pmichaud anyway, bbl.
01:30 ingy \o
01:30 tylercurtis melte: and assume that much of it may be inaccurate or NYI.
01:31 * cxreg ponders how to instrument callbacks with zavolaj
01:32 tylercurtis cxreg: last time I looked at Gtk (assuming that's still what you're working on), I don't think Parrot had the right callback signature available. Not certain, though.
01:32 molaf joined #perl6
01:33 cxreg tylercurtis: it is.  the callback is a GClosure*
01:34 cxreg tylercurtis: obviously it will take some magic :)
01:35 tylercurtis cxreg: good luck. :)
01:37 ingy is masak nini?
01:38 cxreg tylercurtis: i'm thinking there might be a way of standardizing function pointers and callbacks for C librarys to call HLL code
01:38 cxreg although in this case, the fp is buried in another struct :/
01:40 colomon joined #perl6
01:41 cxreg (maybe such a thing already exists, actually)
01:41 jnthn ingy: nini?
01:41 ingy nigh nigh
01:41 jnthn oh
01:41 jnthn yes
01:41 jnthn It's like, 3:40am here in Sweden. :-)
01:42 ingy jnthn: why are you in Sweden?
01:42 ingy teh grrlz?
01:43 ingy I just spent the last 24 hours updating the TestML specification: http://testml.org/specification/language/
01:43 jnthn ingy: :P
01:43 ingy now the grammar is in completely in Pegex
01:44 ingy and looks 90% like p6rulez
01:44 jnthn ingy: No, came to join some startup company here that a friend was creating
01:44 ingy now I need to write the Pegex syntax grammar in Pegex
01:45 jnthn ingy: I kinda work there some of the time, and Rakudo rest of the time :-)
01:45 ingy and once a p5regexp/pcre engine is in rakudo
01:45 ingy I can implement a YAML parser once
01:46 ingy for p5 and p6
01:46 ingy and every other language I port pegex to
01:46 ingy life is about to get really good for ingy and his mini languages
01:46 jnthn :-)
01:47 cxreg and i wonder if parrot -> nci -> C -> ??? -> parrot -> hll would cause reentrancy issues
01:48 ingy right now the pegex engine is working for TestML parsing, but the grammar is in a funky YAML+Pegex syntax
01:48 ingy bootstrapping is teh awesome
01:48 cxreg Pegex?
01:48 orafu joined #perl6
01:48 tylercurtis cxreg: Parrot has builtin NCI support for some callbacks. So, maybe not, though I don't know how much they've been tested.
01:49 ingy jnthn: that's cool. did you pick up all your stuff and move there?
01:49 jnthn ingy: Yes
01:49 cxreg tylercurtis: any pointers where to look for those?
01:49 jnthn ingy: I move to furnished appartments
01:49 jnthn ingy: So I can keep my amount of stuff quite low :-)
01:49 ingy jnthn++
01:49 ingy jnthn: I need to follow you
01:49 tylercurtis cxreg: http://docs.parrot.org/parrot/latest/html/​docs/pdds/draft/pdd16_native_call.pod.html is the PDD, though, I don't know how accurate it is.
01:50 cxreg tylercurtis++
01:50 ingy cxreg: Pegex is like 90% of p6rules built over a standard regex engine
01:50 ingy cxreg: ie an Acmeist p6rules
01:51 cxreg o_O
01:51 ingy cxreg: this is a (the only existing) Pegex grammar for now
01:51 ingy http://testml.org/specification/language/
01:52 ingy but it uses most of the features and totally works with a minimum of code
01:52 ingy it's so I can have the same parser technology for projects like TestML in a dozen languages
01:52 cxreg is this the bastard love child of your epiphany about parsing plus p6rules?
01:53 ingy perl6++ for creating p6rules
01:53 ingy perl6-- for keeping it to itself
01:53 * cxreg needs a "p6rules" t-shirt
01:53 ingy cxreg: yes :)
01:53 cxreg rock on
01:54 ingy http://www.pegex.org/
01:54 ingy needs a little content :)
01:54 ingy I have enough to write a spec now I think
01:54 colomon joined #perl6
01:56 colomon_ joined #perl6
02:00 kid51 joined #perl6
02:01 fridim joined #perl6
02:03 colomon joined #perl6
02:06 exodist ingy: I have spent all day pondering writing a prl6 grammars implementation in c or c++, then I check here and see your messages. what are you planning?
02:07 ingy exodist: join #pegex
02:25 schobes joined #perl6
02:27 shirtless I feel stupid asking this but I can't figure out how to create a ticket in RT
02:29 ingy left #perl6
02:29 ingy joined #perl6
02:31 shirtless Looks like I have to email it.
02:31 jnthn shirtless: yes, email
02:31 jnthn (there's no web interface to submit)
02:31 mrsaturns joined #perl6
02:32 samlh joined #perl6
02:32 mrsaturns Good evening everybody
02:33 lue and as far as I can tell, you have to be signed up to submit a ticket (jnthn: am I right here?)
02:33 samlh lue: no
02:33 jnthn lue: no
02:34 lue that's weird. Before I signed up for the RT, I tried once and it didn't work.
02:34 jnthn lue: YOu can submit
02:34 jnthn lue: But not manage the tickets.
02:36 LaVolta joined #perl6
02:44 shirtless rakudo: my @array; @array.^methods.sort();
02:44 p6eval rakudo 9b6189:  ( no output )
02:44 shirtless rakudo: @array.^methods.sort();
02:44 p6eval rakudo 9b6189: OUTPUT«===SORRY!===␤Symbol '@array' not predeclared in <anonymous> (/tmp/WQd_d0Roge:22)␤»
02:44 shirtless try it. On windows it produces duplicate elements after calling sort
02:44 shirtless Don't know about linux yet.
02:46 jnthn rakudo: Array.^methods>>.name>>.sort>>.say
02:46 p6eval rakudo 9b6189:
02:46 p6eval ..OUTPUT«new␤splice␤delete␤perl␤at_pos␤new␤rotate​␤pop␤Capture␤elems␤Str␤list␤push␤exists␤unshift␤b​atch␤ACCEPTS␤eager␤at_pos␤sort␤iterator␤Bool␤Num␤​perl␤of␤munch␤shift␤map␤hash␤flat␤fmt␤Str␤Int␤lis​t␤item␤Num␤elems␤fmt␤flip␤lc␤p5chop␤to-radians␤Nu​meric␤asinh␤acotan␤chr␤cotanh␤acotanh␤comb␤flo…
02:46 diakopter heh
02:46 jnthn fail
02:46 shirtless Is that the exact equivalent of my code?
02:46 jnthn rakudo: Array.^methods>>.name.sort>>.say
02:46 p6eval rakudo 9b6189:
02:46 p6eval ..OUTPUT«␤ACCEPTS␤ACCEPTS␤BUILD␤BUILDALL␤Bool␤Boo​l␤CREATE␤Capture␤Capture␤IO␤Int␤Num␤Num␤Numeric␤N​umeric␤PARROT␤Seq␤Str␤Str␤Str␤WALK␤WHENCE␤WHERE␤W​HICH␤abs␤acos␤acosec␤acosech␤acosh␤acotan␤acotanh​␤all␤any␤asec␤asech␤asin␤asinh␤at_key␤at_pos␤at_p​os␤at_pos␤atan␤atan2␤atanh␤batch␤bless␤bytes␤c…
02:47 jnthn shirtless: Well, it's doing it to the type objects rather than an instance
02:47 jnthn shirtless: Anyway, it's not surprising.
02:47 shirtless perhaps it could be a windows IO issue
02:47 jnthn shirtless: Consider class A { method m { } }; class B is A { method m { } }; B.^methods # two methods called m in the list
02:47 jnthn And it's just the same here
02:47 jnthn Some are overrides.
02:48 shirtless So dupes could be caused by overrides?
02:48 shirtless The problem is that if I do @array.^methods; before the sort, and pipe through unix sort, there are no dupes
02:48 jnthn They very likely are
02:48 shirtless that's how I know sort() is the culprit
02:49 schobes left #perl6
02:50 tylercurtis rakudo: Array.^methods>>.name>>.say
02:50 p6eval rakudo 9b6189:
02:50 p6eval ..OUTPUT«at_pos␤new␤splice␤delete␤perl␤at_pos␤sor​t␤iterator␤Bool␤Num␤perl␤of␤munch␤shift␤map␤hash␤​flat␤fmt␤new␤pop␤rotate␤Capture␤elems␤Str␤list␤pu​sh␤exists␤unshift␤batch␤ACCEPTS␤eager␤elems␤fmt␤S​tr␤Int␤list␤item␤Num␤acos␤eval␤round␤chop␤tanh␤sp​lit␤match␤exp␤acosh␤words␤cotan␤atan2␤lcfirst␤…
02:51 jnthn rakudo: Array.^parents>>.say
02:51 p6eval rakudo 9b6189: OUTPUT«List()␤Iterable()␤Cool()␤Any()␤Mu()␤»
02:51 tylercurtis Sure about that? Looks as though at least a few duplicates are there.
02:51 diakopter rakudo: Array.^methods>>.name>>.sort>>.say
02:51 p6eval rakudo 9b6189:
02:51 p6eval ..OUTPUT«splice␤perl␤delete␤at_pos␤new␤Num␤perl␤o​f␤munch␤shift␤map␤hash␤fmt␤flat␤new␤pop␤rotate␤Ca​pture␤elems␤Str␤list␤push␤exists␤unshift␤batch␤AC​CEPTS␤eager␤at_pos␤sort␤iterator␤Bool␤item␤Num␤el​ems␤fmt␤Str␤Int␤list␤match␤exp␤acosh␤words␤cotan␤​atan2␤lcfirst␤uc␤sec␤cis␤log␤substr␤from-radia…
02:51 lue could it be listing multis more than once?
02:52 jnthn No, it's just inheritance.
02:52 shirtless How so
02:52 diakopter perl of munch shift map
02:52 jnthn diakopter: Getting to eager with the >> considered harmful. :-)
02:52 shirtless when you don't run the .sort() you see no duplicates
02:52 shirtless does it interpolate something?
02:53 jnthn shirtless: Can you nopaste what you're running and the output you're getting?
02:53 shirtless yeah
02:54 rcfox Hey guys, I want to read a binary file, but it keep complaining about malformed UTF-8 strings.
02:56 sorear google is paying masak to implement binary file support
02:56 sorear you can help if you want
02:56 jnthn rcfox: Needs :bin option passed to open
02:56 tylercurtis shirtless: There are duplicates even without sort.
02:57 shirtless tylercurtis, I didn't get them
02:57 shirtless I'm doing it again anyway
02:57 rcfox jnthn: It didn't help...
02:58 lue I can't help but wonder what this binary file is.
02:58 shirtless tylercurtis, oh, yeah there are.
02:58 shirtless tylercurtis, disregard that bug.
02:58 shirtless I must have lost the dupes some how the first time I did it when I copied it into an ssh session.
02:59 jnthn rcfox: masak++ is working on binary IO at the moment - I know there are some tests in http://svn.pugscode.org/pugs​/t/spec/S16-filehandles/io.t but also that there's some more work to go.
02:59 rcfox lue: It's a PNG file, but that shouldn't matter.
02:59 rcfox (I don't actually want to open it as an image.)
02:59 Thomas_ joined #perl6
02:59 Thomas_ Hello
03:00 rcfox jnthn: I see... Thanks.
03:00 jaldhar joined #perl6
03:00 lue rcfox: you're right, it shouldn't. Just curious :)
03:01 Thomas_ I just started programming in perl this week. Is there anything a newbie can do to help the community?
03:01 rcfox I just wanted to see if I could parse a image file with these new-fangled rules.
03:02 rcfox Gah, my typing sucks tonight.
03:04 jnthn rcfox: They're not really been aimed at binary files, tbh, more strings, though I guess it may be workable.
03:05 rcfox jnthn: I know, but it was just a crazy idea that I wanted to play with.
03:05 jnthn Thomas_: hi! Yes, probably. :-) You interested in Perl 5 or Perl 6 or both? :-)
03:07 TiMBuS joined #perl6
03:08 rcfox Is there anything like perldoc for Perl 6?
03:08 jnthn rcfox: I think the closest thing is "grok"
03:08 jnthn OK, I should go get ready to head off to the airport. :-)
03:09 masonkramer_ joined #perl6
03:09 jnthn afk for some hours (train, flight, train, another train, trying to find hotel... :-))
03:09 jnthn o/
03:10 tylercurtis o\
03:10 tylercurtis o/
03:24 rcfox Hm.
03:24 rcfox Can you use map in a for loop?
03:25 rcfox rakudo: my @test = 1,2,3; for map { $_+1 } @test { say; }
03:25 p6eval rakudo 9b6189: OUTPUT«===SORRY!===␤Missing block at line 22, near "@test { sa"␤»
03:25 rcfox Yeah, that's what I get too.
03:27 rcfox Oh, I'm using map wrong.
03:27 rcfox And apparently, say.
03:29 tylercurtis rakudo: my @test = 1, 2, 3; for map(@test, { $_ + 1 }) { .say; }
03:29 p6eval rakudo 9b6189: OUTPUT«No candidates found to invoke for method 'map' on object of type 'Array'; available candidates have signatures:␤:(Mu : &block;; *%_)␤␤  in 'map' at line 1715:CORE.setting␤  in main program body at line 22:/tmp/de6D1IMPhY␤»
03:30 tylercurtis rakudo: my @test = 1, 2, 3; for map({ $_ + 1 }, @test) { .say; }
03:30 p6eval rakudo 9b6189: OUTPUT«2␤3␤4␤»
03:30 rcfox .say?
03:30 rcfox Ah, neat.
03:30 tylercurtis rcfox: Perl 6 doesn't really do implicit use of the topic like Perl 5 does. Instead you do things like ".foo" which is equivalent to "$_.foo".
03:33 kthakore rcfox: oh hai!
03:33 rcfox kthakore: Hi.
03:33 kthakore rcfox: what up?
03:33 kthakore rcfox: how is your project?
03:34 rcfox Procrastinating from studying. :P
03:34 kthakore rakudo: $a = 'foo'; $a.say();
03:34 p6eval rakudo 9b6189: OUTPUT«===SORRY!===␤Symbol '$a' not predeclared in <anonymous> (/tmp/k0gnR11xqq:22)␤»
03:34 kthakore rcfox: cool
03:34 kthakore rakudo: my $a = 'foo'; $a.say();
03:34 p6eval rakudo 9b6189: OUTPUT«foo␤»
03:34 rcfox My project is good. We demoed it, and did very well.
03:34 kthakore rcfox: video?
03:34 rcfox Ah, we should have made a video...
03:34 rcfox No, there's no video.
03:35 rcfox I'll probably do a write up after my exams are done.
03:38 kthakore cool
03:42 shirtless ooh:
03:42 shirtless rakudo: 1..3.say();
03:42 p6eval rakudo 9b6189: OUTPUT«3␤»
03:42 shirtless rakudo: (1..3).say();
03:42 p6eval rakudo 9b6189: OUTPUT«123␤»
03:44 shirtless So which is further along in implementing perl6 pugs or rakudo?
03:45 drbean joined #perl6
03:46 LaVolta rakudo: @*INC.perl.say
03:46 p6eval rakudo 9b6189: OUTPUT«["lib", "/home/p6eval/.perl6/lib", "/home/p6eval//p2/lib/parrot/2.​6.0-devel/languages/perl6/lib", "."]␤»
03:52 Italian_Plumber joined #perl6
03:56 frooh 5/3
03:56 rcfox So what's up with the postcircumfix operator?
03:56 allbery_b pugs is no longer under active development
03:57 rcfox I tried to have it take 2 arguments, and then it tells me it's expecting 3.
03:59 rcfox rakudo: class foo { method postcircumfix:<[ ]>($a,$b) { say $a*$b; }}; my $bar = foo.new; $bar[1,2];
03:59 p6eval rakudo 9b6189: OUTPUT«Not enough positional parameters passed; got 2 but expected 3␤  in 'foo::postcircumfix:<[ ]>' at line 22:/tmp/ThBeJnOXv9␤  in main program body at line 1␤»
04:00 rcfox It works with one argument...
04:00 avuserow rakudo: class foo { method postcircumfix:<[ ]>($a,$b) { say $a*$b; }}; my $bar = foo.new; $bar[(1, 2)];
04:00 p6eval rakudo 9b6189: OUTPUT«Not enough positional parameters passed; got 2 but expected 3␤  in 'foo::postcircumfix:<[ ]>' at line 22:/tmp/e2cqsBDFIN␤  in main program body at line 1␤»
04:00 avuserow rakudo: class foo { method postcircumfix:<[ ]>($a) { say $a.perl; }}; my $bar = foo.new; $bar[1, 2];
04:00 p6eval rakudo 9b6189: OUTPUT«(1, 2)␤»
04:01 avuserow rakudo: class foo { method postcircumfix:<[ ]>(@a) { say @a.perl; }}; my $bar = foo.new; $bar[1, 2];
04:01 rcfox Oh, it treats everything as an array?
04:01 p6eval rakudo 9b6189: OUTPUT«(1, 2)␤»
04:01 avuserow not sure if it's supposed to or not, but it's passing them as one value, from what I can tell
04:02 avuserow rakudo: class foo { method postcircumfix:<[ ]>($a) { say $a.perl; }}; my $bar = foo.new; $bar.[1, 2];
04:02 p6eval rakudo 9b6189: OUTPUT«(1, 2)␤»
04:04 avuserow rakudo: class foo { method postcircumfix:<[ ]>(($a, $b)) { say $a*$b; }}; my $bar = foo.new; $bar.[1, 2];
04:04 p6eval rakudo 9b6189: OUTPUT«2␤»
04:04 avuserow rakudo: class foo { method postcircumfix:<[ ]>(($a, $b)) { say $a*$b; }}; my $bar = foo.new; $bar.[3, 2];
04:04 p6eval rakudo 9b6189: OUTPUT«6␤»
04:04 avuserow whoa, Perl 6 is DWIMmier than I recalled
04:05 avuserow rakudo: class foo { method postcircumfix:<[ ]>(($a, $b)) { say $a*$b; }}; my $bar = foo.new; $bar.[3, 2, 5];
04:05 p6eval rakudo 9b6189: OUTPUT«Too many positional parameters passed; got 3 but expected 2 in sub-signature␤  in 'foo::postcircumfix:<[ ]>' at line 22:/tmp/EXcSi6yB__␤  in main program body at line 1␤»
04:05 avuserow rcfox: doe sthat make sense?
04:06 rcfox Oh, hm.
04:06 rcfox Yeah.
04:06 rcfox Unintuitive syntax though...
04:07 avuserow not really. it's kind of unpacking it
04:07 rcfox I guess so.
04:07 avuserow rakudo: my @a = 1, 2; my ($a, $b) = @a; say $a; say $b;
04:07 p6eval rakudo 9b6189: OUTPUT«1␤2␤»
04:07 avuserow many functional languages let you do this with pattern matching in assignments.
04:08 avuserow (note that my terminology is not quite perfect)
04:08 rcfox Hm, is there a way to assign values with this operator?
04:09 rcfox Or just take in another argument...
04:09 rcfox $bar[2,3] = 5
04:10 avuserow I imagine there is, but I don't know how
04:15 rcfox Oh, I'm just dumb.
04:22 shirtless which is more popular amongst perl6 devs, undescores or camel case?
04:22 tylercurtis shirtless: for class names, CamelCase, for method/function/variable names, hypenated-names
04:23 shirtless tylercurtis, cool thanks
04:23 shirtless tylercurtis, i don't want my code to be disliked because it doesn't follow popular convention
04:23 shirtless :D
04:38 LaVolta joined #perl6
04:39 s1n joined #perl6
04:43 rcfox Hm, does Perl 5 have the xx operator?
04:45 rcfox I'm thinking no.
04:45 rcfox So I tried to use it in Perl 6, but it doesn't quite behave as I expect it to.
04:45 tylercurtis rcfox: Perl 5's "x" operator is both Perl 6's "x" and "xx", I think.
04:46 tylercurtis rcfox: what did you expect it to do?
04:46 rcfox Well, I did this, to initialize a 2D array: @.data = [0 xx $width] xx $height;
04:47 rcfox And it seems to have only evaluated [0 xx $width] once, and then reused that for each xx $height.
04:47 melte isn't that what you want
04:47 rcfox So now, if I modify @.data[0][0], it also modifies @.data[1][0]
04:48 phenicsl left #perl6
04:49 rcfox melte: Is there a better way to do it?
04:49 tylercurtis rcfox: I think xx is supposed to only evaluate its arguments once. maybe ([0 xx $width] for ^$height).
04:50 rcfox What is ^?
04:50 tylercurtis rakudo: (^5).perl.say
04:50 p6eval rakudo 9b6189: OUTPUT«0..^5␤»
04:51 rcfox Oh...
04:51 rcfox Hm.
04:51 tylercurtis rakudo: .say for ^5
04:51 p6eval rakudo 9b6189: OUTPUT«0␤1␤2␤3␤4␤»
04:52 shirtless How do I call a method defined inside a class from within that same class? I tried .foo() but had no luck
04:52 tylercurtis shirtless: on self?
04:52 shirtless I tried self.foo()
04:52 shirtless didn't work either
04:53 shirtless tylercurtis, i just want to invoke a member of the class from inside the constructor
04:53 tylercurtis shirtless: inside the constructor? new or BUILD?
04:53 shirtless new
04:53 tylercurtis self in new is the class usually.
04:54 shirtless self doesn't work
04:54 rcfox Should you play with new?
04:54 rcfox Try using BUILD.
04:54 shirtless I have no idea how. Is it covered in the guide?
04:55 rcfox http://perlcabal.org/~azawawi/html/spec/S12​-construction/named-params-in-BUILD.t.html
04:55 tylercurtis shirtless: why are you using new, by the way? Unless you're doing something really weird(like a singleton or some such), you should probably either just override BUILD or override new to just call bless with some argument-munging.
04:55 rcfox http://perlcabal.org/syn/S12.html​#Construction_and_Initialization
04:55 shirtless tylercurtis, I just want to call some functions that initialize the state of the calss
04:55 shirtless ok cool
04:56 tylercurtis shirtless: then you want BUILD.
04:56 shirtless I guess the real docs are the standard
04:56 rcfox These Synopses are not easy to read though...
04:56 rcfox I found the code much more useful.
04:56 shirtless I want to avoid swimming in the code at least for the next 2 hours
04:56 shirtless I'll try my luck with the synopses
04:56 shirtless thanks
04:57 rcfox shirtless: I mean the code that's included in the synopses.
04:57 shirtless oh
04:57 melte the good thing is that as the years go on there will be actual other sources out there
04:57 shirtless this is a bit difficult for me probably because I don't know perl5
04:57 shirtless I am hoping that I won't have to learn it too.
04:58 shirtless maybe I'll learn a bit, but I'm not diving into it.
04:58 tylercurtis shirtless: I don't know Perl 5 either. :) Perl 6 is definitely learnable without Perl 5 knowledge.
05:00 rcfox Hm, I had to end up doing push @.data, [0 xx $width] for ^$height;
05:00 rcfox But it worked.
05:00 Mowah joined #perl6
05:06 rcfox cperl-mode really does not like unparenthesized if statements...
05:11 shirtless anyone mind clearing this up for me? http://nopaste.info/830c3c16e2.html
05:11 kaare joined #perl6
05:11 shirtless I tried to call BUILD like I saw in the doc, and got that.
05:18 tylercurtis shirtless: 'foo.new(arg => "bar")' would be to correct way to do that.
05:18 * shirtless facepalms
05:18 shirtless thanks
05:18 shirtless I must have read that and it went in one eye and out my nose
05:23 tylercurtis shirtless: If you want to take positional parameters, you need to override new and do some munging in what you pass to bless.
05:23 shirtless yeah
05:23 TiMBuS i get the feeling it's going to be very common for people to trip up on perl6's constructors
05:25 drbean joined #perl6
05:27 Su-Shee joined #perl6
05:28 rcfox rakudo: class foo { method infix:<+>($left,$right) { say "$left, $right"; } }; my $bar = foo.new; $bar+$bar;
05:29 p6eval rakudo 9b6189: OUTPUT«Can't take numeric value for object of type foo␤  in 'Any::Numeric' at line 1348:CORE.setting␤  in 'infix:<+>' at line 6544:CORE.setting␤  in main program body at line 22:/tmp/eGk6eo4xRq␤»
05:29 phenicsl joined #perl6
05:29 rcfox ^ What's going on there?
05:31 PZt joined #perl6
05:31 rcfox I looked at the synopses, and it looks like I'm doing the same thing...
05:33 TiMBuS can methods be infix?
05:33 rcfox Changing it to sub has the same effect.
05:34 rcfox Or do you mean that it has to be outside of the class?
05:34 TiMBuS take the sub out of the class and it works
05:35 tylercurtis rcfox: also, it should be a multi to avoid clobbering normal infix:<+>
05:35 tylercurtis rcfox: and assuming it's in a module, you'll probably want to export it.
05:36 shirtless I am getting a type check error expected Int but got Any instead, and I declared my member to be Int
05:36 shirtless what could be wrong?
05:37 TiMBuS it's Any if it hasn't been initialized
05:37 rcfox Thanks guys.
05:37 shirtless TiMBuS, I initialized it at the top of my class like this: has Int $!response-limit = 1024;
05:37 shirtless did it not actually get initialized because I did it wrong?
05:37 TiMBuS are you getting the error in BUILD
05:37 TiMBuS or new
05:37 shirtless from a function that is invoked from BUILD
05:37 shirtless yeah
05:38 TiMBuS or any place before that default would be called
05:38 TiMBuS yeah thats why
05:38 shirtless oh ok
05:38 shirtless so I will be to initialize it in BUILD instead
05:38 rcfox tylercurtis: Hrm, how do I export it?
05:38 TiMBuS it's initialized last, so that you can do things like.. has $.init;    has $.thing = $.init*5;
05:39 TiMBuS then you can set $.init in BUILD
05:39 tylercurtis shirtless: if you don't touch $!response-limit in BUILD, it should be initializzed to teh default, but I don't think it is in Rakudo at the moment.
05:39 tylercurtis rcfox: multi infix:<+> (Foo $a, Foo $b) is export {...}
05:39 shirtless ok, so as a workaround I will have to set it in BUILD
05:47 drbean joined #perl6
05:54 justatheory joined #perl6
05:58 lmistura exit
05:59 uniejo joined #perl6
06:00 tadzik joined #perl6
06:32 tylercurtis http://github.com/ekiru/nativecallgen is the very early beginnings of my Zavolaj-based bindings generator. And now to sleep!
06:32 tylercurtis Good night, #perl6.
06:41 tadzik phenny: tell masak the yapsi README says about running 'make', but there is no Makefile. Also big kudos for it, reading the code is an awesome experience
06:41 phenny tadzik: I'll pass that on when masak is around.
07:01 rcfox Is it possible to use a monkey-typed method only in the context of a certain class?
07:04 rcfox Or maybe just add a method to a specific object?
07:05 wayland76 joined #perl6
07:10 eternaleye joined #perl6
07:18 rcfox Ah-ha, I was able to do it with a role.
07:20 ingy greetings
07:21 rcfox Hi.
07:27 ingy hi rcfox
07:27 rcfox How's it going?
07:33 ingy rcfox: well! I just figured out how to do some insanity in p5
07:33 ingy it took me a week, but it's so simple
07:33 ingy \o/
07:38 rcfox Heh.
07:40 kiffin joined #perl6
07:48 meppl joined #perl6
07:50 araujo joined #perl6
08:00 Alias_ joined #perl6
08:04 asakra joined #perl6
08:07 rhebus joined #perl6
08:07 asakra hi, can you please point me to a blog/article/text that describes the point behind "star"? are this going to be a Rakudo budles? will it we *, **, *3, etc in the future?
08:09 snarkyboojum asakra: http://rakudo.org/announce/rakudo-star/2010.07 http://use.perl.org/~pmichaud/journal/39411
08:16 rcfox Woo, I just implemented (naive) matrix multiplication with coderefs (er, I guess they're called Blocks now?) as the matrix elements.
08:17 rcfox And the blocks aren't evaluated until you actually print the matrix.
08:18 rcfox I had to give the blocks a Num() function so that math wouldn't break. ;)
08:19 asakra snarkyboojum: I've read the first one alredy and now the second one. still the future or "stars" is unclear to me. at some point in the future there will have to be some numbers, or?
08:19 timbunce joined #perl6
08:20 thebird joined #perl6
08:21 snarkyboojum asakra: as I understand it, there will definitely be more than one, probably monthly to start, and then perhaps every three months once thing settle down. Currently the releases seem to be of the form yyyy.mm - not sure how they'll be named.
08:22 snarkyboojum asakra: that's just my understanding from what I've gleaned reading the IRC logs etc
08:25 snarkyboojum asakra: is that as clear as mud now? :D
08:27 asakra snarkyboojum: exactly :) this will be a mess once you start asking users what star they use...
08:28 snarkyboojum asakra: well it seems that Rakudo Star is billed as a "distribution", i.e. compiler bundled with docs/book, useful modules etc, so that's how I look at it, "Rakudo Star" is the name of the distro, and the version numbers are whatever they're decided to be.. doesn't really worry me a great deal, as long as it's obvious which is earlier than another :)
08:29 snarkyboojum asakra: I think there are plans to improve --version to show that it is a "Rakudo Star" or not, so it'll be fairly obvious from that imo
08:31 drbean joined #perl6
08:33 asakra snarkyboojum: i wanted to write a message to our pm group about rakudo *, then i stoped so that i make it clear what the star actually means. so it is a bundle with an installer and some useful stuff, ready to use, right?
08:34 moritz_ right
08:34 moritz_ it's compiler + modules + docs
08:45 daxim joined #perl6
08:50 Trashlord joined #perl6
08:51 darkop joined #perl6
08:51 jfried joined #perl6
09:09 clintongormley joined #perl6
09:12 snarkyboojum asakra: yep - remembering that it's for early adopters who want to use an early but "usable" distribution which implements large chunks of the Perl 6 spec :)
09:12 snarkyboojum or something :)
09:12 tadzik joined #perl6
09:18 err_or joined #perl6
09:21 err_or left #perl6
09:23 muru joined #perl6
09:23 walfisch joined #perl6
09:33 d4rt joined #perl6
09:36 [1]Casan joined #perl6
09:45 bbkr good morning #perl6
09:45 plol joined #perl6
09:45 moritz_ good localtime to you too
09:46 szbalint splendid, indeed :)
09:53 wayland76 Does anyone know if there are plans for a gtk-rakudo?
09:53 * moritz_ hasn't heard of any
09:55 frettled What would a gtk-rakudo do, come with annoying pop-ups for each error message?  ;)
09:56 moritz_ lol
09:56 wayland76 I was thinking more along the lines of allow you to write Rakudo programs that display things in windows
09:56 * szbalint can attest that moritz_ did laugh out loud :)
09:56 vpm joined #perl6
09:57 frettled :)
09:57 moritz_ wayland76: should be possible with Zavolaj
09:57 ruoso wayland76, gtk would be a very interesting bind to make
09:57 ruoso because it implements its own object orientation
09:57 frettled Hmm, "Zavolaj", that has to be one of jnthn's projects.  ;)
09:57 * wayland76 googles zavolaj
09:57 moritz_ otoh it doesn't support callbacks yet, afaict
09:58 moritz_ which is kinda its biggest limitation
09:58 ruoso so the "only" thing you need is to properly implement the metaclass (a variant of ClassHOW)
09:58 frettled Maybe GTK requires support in Parrot?
09:58 ruoso frettled, it certainly do...
09:58 bbkr std: my $foo = "foo"; say $foo R~= "foo"
09:58 p6eval std 31886: OUTPUT«ok 00:01 118m␤»
09:58 frettled It's definitively both interesting and useful, though.
09:59 timbunce joined #perl6
09:59 jferrero joined #perl6
09:59 wayland76 jnthn++ for Zavolaj :)
10:00 tadzik frettled: why should it require Parrot suppoer?
10:00 tadzik *support
10:00 Italian_Plumber joined #perl6
10:00 bbkr rakudo: my $foo = "foo"; say $foo R~= "foo"
10:00 p6eval rakudo 9b6189: OUTPUT«Cannot modify readonly value␤  in '&infix:<=>' at line 1␤  in 'reverseargs' at line 130:CORE.setting␤  in main program body at line 1␤»
10:00 ruoso frettled, moritz_, wayland76, but gtk support probably needs something more specific...
10:00 bbkr above behavior is correct and expected?
10:00 tadzik why should it?
10:01 moritz_ ruoso: you mean some kind of OO wraping/morphing
10:01 tadzik It's just a C library, zavolaj may even handle it right now
10:01 tadzik to some extend
10:01 ruoso moritz_, yes... you just need to implement the metaclass translating glib oo to perl 6 oo
10:01 moritz_ rakudo:  my $foo = "foo"; say $foo [R~]= "foo"
10:01 dalek rakudo: f8b73df | moritz++ | src/core/Match.pm:
10:01 dalek rakudo: Match.new() (no subcaptures yet)
10:01 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/f​8b73df893066ae15b788e116baa52dbf13b463e
10:01 ruoso in gtk2-perl (perl5) you can extend a gtk class in perl and use its objects as an argument to a c call
10:01 gbacon joined #perl6
10:01 p6eval rakudo 9b6189: OUTPUT«===SORRY!===␤Confused at line 22, near "say $foo ["␤»
10:01 moritz_ ruoso: why? you can just call methods on it
10:02 ruoso moritz_, it won't give you "subclassing a gtk class and sending an instance of your subclass to a gtk method"
10:02 moritz_ bbkr: I think it's correct.
10:02 moritz_ bbkr: 'abc' ~= $x also fails
10:02 moritz_ ruoso: yes, but I don't think a basic wrapper needs that
10:02 moritz_ a more complete one, yes
10:03 ruoso but doing a basic wrapper will probably be harder then doing the OO one
10:03 ruoso gtk is OO
10:03 ruoso it's just glib OO
10:03 bbkr moritz_: so what should i do with http://rt.perl.org/rt3/Tic​ket/Display.html?id=64818 ? reject, because second case atempt is incorrect (it modifies read-only value)
10:04 moritz_ bbkr: test if it works with a variable on the $HS
10:04 bbkr $HS ?
10:04 moritz_ sorry, RHS
10:05 moritz_ >./perl6 -e 'my $x = "a"; my $y = "b"; $x R~= $y; say $y'
10:05 moritz_ a
10:05 moritz_ ./perl6 -e 'my $x = "a"; my $y = "b"; $x R~= $y; say $x'
10:05 moritz_ a
10:05 moritz_ not good
10:05 moritz_ the ticket is valid, even if the test case provided isn't
10:05 bbkr moritz_: thanks, leaving unchanged
10:06 moritz_ bbkr: I'll comment on it
10:06 bbkr moritz_++
10:06 moritz_ rakudo: my ($x, $y) = <a b>; $x R~= $y; say "$x $y"
10:06 p6eval rakudo 9b6189: OUTPUT«a a␤»
10:07 briang joined #perl6
10:08 vpm joined #perl6
10:09 amkrankruleuen joined #perl6
10:11 moritz_ what's the difference between 'require' and 'need'?
10:12 moritz_ is 'require' run-time?
10:15 moritz_ ah yes, it is
10:20 Alias joined #perl6
10:21 azert0x joined #perl6
10:23 bbkr std: constant ($a, $b) = 1,2;
10:23 p6eval std 31886: OUTPUT«[31m===[0mSORRY![31m===[0m␤Malformed constant at /tmp/xCgHKZ1I4w line 1:␤------> [32mconstant [33m⏏[31m($a, $b) = 1,2;[0m␤    expecting any of:␤       trait␤  type_declarator␤Parse failed␤FAILED 00:01 113m␤»
10:24 wamba joined #perl6
10:24 bbkr that constant definition has changed since http://rt.perl.org/rt3/Tic​ket/Display.html?id=69740 , is there any new syntax now for compact constant declaration?
10:24 moritz_ constant a = 3;
10:25 moritz_ my constant $x = 5;
10:25 moritz_ iirc
10:25 moritz_ std: constant a = 5; a
10:25 p6eval std 31886: OUTPUT«ok 00:01 116m␤»
10:25 moritz_ std: my constant $x = 5; $x
10:25 p6eval std 31886: OUTPUT«ok 00:01 117m␤»
10:26 bbkr moritz_: ticket refers to declaring multiple constants in one line. which was valid then, but it is not now.
10:26 barika joined #perl6
10:26 moritz_ std: my contant ($x, $y) = (1, 2); say $x
10:26 p6eval std 31886: OUTPUT«[31m===[0mSORRY![31m===[0m␤Malformed my at /tmp/hcnyL11DxB line 1:␤------> [32mmy [33m⏏[31mcontant ($x, $y) = (1, 2); say $x[0m␤    expecting any of:␤ scoped declarator␤        typename␤Parse failed␤FAILED 00:01 114m␤»
10:26 moritz_ std: my constant ($x, $y) = (1, 2); say $x
10:26 p6eval std 31886: OUTPUT«[31m===[0mSORRY![31m===[0m␤Malformed constant at /tmp/6XjhLVJODB line 1:␤------> [32mmy constant [33m⏏[31m($x, $y) = (1, 2); say $x[0m␤    expecting any of:␤  trait␤  type_declarator␤Parse failed␤FAILED 00:01 114m␤»
10:26 Su-Shee *hihi* "
10:26 Su-Shee
10:26 Su-Shee Reading #perl6 documentation is like reading a fiction novel. Reading #python3 documentation is like reading the newspaper."
10:27 bbkr so what status should ticket have? rejected, because STD has changed?
10:27 moritz_ yes
10:27 wayland76 Hey all.  I asked the gtk-rakudo question on the gtk-perl channel on the Gnome IRC server, and I'll paste the answer below.
10:27 moritz_ bbkr: and please make sure the tests are gone
10:27 bbkr moritz_: thanks. i'll also remove fudged test
10:27 bbkr reading my mind ;)
10:28 wayland76 I asked: Does anyone know if there are plans to do a gtk-rakudo, possibly using Zavolaj?
10:28 wayland76 They answered: I doubt it.   We need a C API to create bindings for gobject-introspection.  We might have to go down to parrot to implement callables :-/
10:29 wayland76 That might be what ruoso was saying
10:32 bbkr star: constant a = 5; # this breaks S04-declarations/constant.t, i'll create another ticket for it and fudge test in test suite
10:32 p6eval star 2010.07: OUTPUT«===SORRY!===␤Constant type declarator not yet implemented at line 22, near "= 5; # thi"␤»
10:33 moritz_ yes, constant mostly NYI
10:42 gfldex i happen to think about a perl6shell last night
10:42 gfldex it even made me start a blog! http://gfldex.wordpress.com/2010/0​8/02/thinking-about-a-perl6shell/
10:45 tadzik oh, you reminded me of size parameter for File::Find
10:48 moritz_ what should
10:48 moritz_ require foo;
10:48 moritz_ do?
10:50 sorear according to S11, it's an error
10:50 sorear require needs an explicit import list, so that the symbols to be stubbed are known at compile time before the pads are frozen
10:51 sorear if you want to get really fancy, :OUR<:DEFAULT> should be legal (but not the default)
10:51 * sorear out
10:51 moritz_ sorear++ # thanks
10:53 PacoLinux joined #perl6
10:55 moritz_ rakudo: use Foo <a b c>;
10:55 p6eval rakudo f8b73d: OUTPUT«===SORRY!===␤Unable to find module 'Foo' in the @*INC directories.␤(@*INC contains:␤  lib␤  /home/p6eval/.perl6/lib␤  /home/p6eval//p1/lib/parrot/2.​6.0-devel/languages/perl6/lib␤  .)␤»
10:55 PhatEddy joined #perl6
10:57 PhatEddy rakudo: class T {has $!a; method a {return $!a}}; my $x = T.new; $x.a = 'abc'; say $x.a
10:57 p6eval rakudo f8b73d: OUTPUT«abc␤»
10:57 PhatEddy If I wanted to prevent the assignment to the private attribute - how would I do it?
10:58 PhatEddy Sorry - not doing much p6 lately
10:58 moritz_ rakudo: class T {has $.a; method a {return $!a}}; my $x = T.new; $x.a = 'abc'; say $x.a
10:58 p6eval rakudo f8b73d: OUTPUT«===SORRY!===␤A method named 'a' already exists in class 'T'. It may have been supplied by a role.␤»
10:59 synth joined #perl6
10:59 moritz_ it's a bug that rakudo allows assignment to the return value by default
10:59 moritz_ rakudo: class T {has $.a}; my $x = T.new; $x.a = 'abc'; say $x.a
10:59 p6eval rakudo f8b73d: OUTPUT«Cannot modify readonly value␤  in '&infix:<=>' at line 1␤  in main program body at line 22:/tmp/sPR6zXR4Yi␤»
11:00 PhatEddy moritz: we looked at the 'method already exists' issue with overriding the accessor yesterday ...
11:00 moritz_ do you want/need a custom accessor that also does other stuff?
11:01 PhatEddy If possible ... yes - trying to do some work on URI module.  Thx.
11:14 szabgab I wonder if HTML::Template works?
11:14 szabgab I tried o load it into memory and it blows up
11:15 szabgab and masak is not around I think
11:16 szabgab anyone knows if there is a working templating system for perl 6?
11:16 tadzik tried this one from Web.pm, szabgab?
11:17 szabgab is there a templating system within the Web project?
11:17 tadzik I think so
11:17 * szabgab looking
11:18 am0c joined #perl6
11:19 szabgab hmm, I can't find it
11:20 tadzik let me see
11:20 zby I there - I am trying out the HTTP daemon example - but I get "Method 'method' not found for invocant of class 'HTTP;Request'"
11:21 baest szabgab: there is this one, was this the one you've tried: http://github.com/masak/ht​ml-template/tree/master/t/
11:21 baest -/t/
11:21 tadzik zby: oh hi :)
11:21 zby tadzik: czesc
11:22 tadzik zby: if you're working on WebNano you might want to try HTTP::Server:Simple::PSGI
11:22 tadzik not in proto, but it's on Github
11:22 szabgab baest: I was trying to use that one but it is broken now
11:22 zby thanks - but not yet, just trying out
11:22 jhuni joined #perl6
11:24 zby this is for both the examples in HTTP::Daemon
11:25 tadzik HTTP::Daemon is in Star, no?
11:26 bbkr std: say "foo" ~~ /<[d..b]>? foo/
11:26 p6eval std 31887: OUTPUT«ok 00:01 119m␤»
11:26 bbkr rakudo: say "foo" ~~ /<[d..b]>? foo/
11:26 p6eval rakudo f8b73d: OUTPUT«foo␤»
11:27 bbkr are reversed ranges officially allowed in spec?
11:27 tadzik The last commits are from 2009, not even Configure.pl runs for me, maybe it's just outdated and incompatibile now.
11:27 zby tadzik - yes
11:28 tadzik I wonder how it got into Star
11:28 zby I just cut and pasted the examples from modules/mainline/lib/HTTP/Daemon.pm
11:29 tadzik zby: try HTTP::Server::Simple maybe, looks like HTTP::Daemon is a bit outdated now
11:29 tadzik Rakudo is changing, some things written in the past tend to not work now
11:31 zby OK - I will - but was that enough of a bug report?
11:31 zby can you recreated the problem?\
11:32 tadzik looks so, HTTP::Daemon does not work for me at all
11:32 tadzik sounds reasonable for a Star bug, imho it should be removed before it's working again
11:33 tadzik hmm. use File::Find; find(dir => '.') gives me "Not enough positional parameters passed; got 0 but expected at least 1" -- what can cause this?
11:35 tadzik oh ok, it's just REPL not printing backtraces
11:36 snarkyboojum what is modules/mainline/* ?
11:36 colomon joined #perl6
11:36 bbkr std: say 1.++(
11:36 p6eval std 31888: OUTPUT«[31m===[0mSORRY![31m===[0m␤Unable to parse argument list at /tmp/4KPoL3z6Bx line 1:␤------> [32msay 1.++[33m⏏[31m([0m␤Couldn't find final ')'; gave up at /tmp/4KPoL3z6Bx line 1 (EOF):␤------> [32msay 1.++([33m⏏[31m<EOL>[0m␤    expecting argument list␤Parse
11:36 p6eval ..failed␤FAILED…
11:36 bbkr std: say 1.++()
11:36 p6eval std 31888: OUTPUT«ok 00:01 115m␤»
11:36 tadzik snarkyboojum: HTTP::Daemon
11:37 snarkyboojum tadzik: right, and Test::Harness and Test::Differences
11:37 snarkyboojum but why under mainline.. i.e. what does it mean? :)
11:37 tadzik No idea :)
11:38 snarkyboojum I'm betting mberends knows :)
11:38 asakra left #perl6
11:40 spacebat joined #perl6
11:40 barika joined #perl6
11:40 pnu joined #perl6
11:40 rcfox joined #perl6
11:41 au|zzz joined #perl6
11:41 molaf joined #perl6
11:41 tadzik http://nopaste.snit.ch/22518 -- why a different result?
11:42 cognominal rakudo:  sub a( %h?, *%h1) { say "{%h.defined}" }; a( :b )
11:42 p6eval rakudo f8b73d: OUTPUT«Method 'defined' not found for invocant of class 'Hash'␤  in 'a' at line 22:/tmp/fxjlHLAAea␤  in main program body at line 22:/tmp/fxjlHLAAea␤»
11:43 tadzik star: say [1, 2, 3] == [2, 1, 3]
11:43 p6eval star 2010.07: OUTPUT«1␤»
11:43 tadzik is it ok?
11:44 cognominal rakudo:  sub a( %h?, *%h1) {  say  {%h, %h1}.keys };  a( :b )  # I would have expected this code to behave
11:44 p6eval rakudo f8b73d: OUTPUT«Method 'HOW' not found for invocant of class 'Hash'␤  in '!STORE' at line 1␤  in 'circumfix:<{ }>' at line 598:CORE.setting␤  in 'a' at line 22:/tmp/mc0TDvBevx␤  in main program body at line 22:/tmp/mc0TDvBevx␤»
11:51 daxim I want to package rakudo-star-2010.07 and noticed that building against an external parrot fails because parrot-config item revision == 0
11:51 daxim is this known already?
11:53 daxim here's a delicious pasta: http://paste.scsys.co.uk/47478
11:54 tadzik same without --parrot-config?
11:54 szabgab jnthn: I wonder if on windows when using PERL6LIB, if I should separate the entries using : as on linux or with ; as I think is done on windoows
11:55 szabgab right now it seems rakudo is splitting on :  while at leastthe PATH in my computer uses ; for separators
11:55 daxim yes, same without --parrot-config
11:55 bbkr tadzik: looks OK. it forces num context on arrays, same as +[1,2,3]. so [1, 2, 3] == [2, 1, 3] checks if both arrays have the same number of elements
11:55 tadzik oh, right
11:55 bbkr tadzik: are you from Poland ?
11:55 tadzik so how do I check elements equality?
11:55 tadzik bbkr: yep
11:57 tadzik oh, eq works fin
12:00 beejeebus joined #perl6
12:00 bbkr tadzik: if you want to check equality with order use smartmatch: [1,2,3] ~~ [1,3,2]
12:00 tadzik bbkr: looks like eq works too. But smart matching looks more elegant indeed
12:01 bbkr tadzik: smartmatch does not stringify. so it's faster
12:01 tadzik star: use Test; is [1, 2, 3], [1, 2, 3], 'foobar';
12:01 p6eval star 2010.07: OUTPUT«ok 1 - foobar␤»
12:01 tadzik star: use Test; is [1, 2, 3], [2,1, 3], 'foobar';
12:01 p6eval star 2010.07: OUTPUT«not ok 1 - foobar␤#      got: '1 2 3'␤# expected: '2 1 3'␤»
12:01 tadzik bbkr: even better, thanks
12:02 ruoso joined #perl6
12:03 envi^home joined #perl6
12:03 bbkr and if you want to check that array contains only specific values then junctions are useful: [1,3,2,3,2] ~~ any(1,2,3)
12:04 tadzik yeah, I know about Junctions
12:05 tadzik hmm, assigning lazy list to an array stringifies the whole list into just one array element. Weird
12:06 bbkr tadzik: example please
12:06 snarkyboojum star: say [1,2,3] == [1,'2',3]
12:06 p6eval star 2010.07: OUTPUT«1␤»
12:07 snarkyboojum star: say [1,2,3] eqv [1,'2',3]
12:07 p6eval star 2010.07: OUTPUT«0␤»
12:07 snarkyboojum star: say [1,2,3] ~~ [1,'2',3]
12:07 p6eval star 2010.07: OUTPUT«0␤»
12:07 tadzik hmm, or maybe not
12:07 colomon star: say [1,2,3] == [1,'blueberry',3]
12:07 p6eval star 2010.07: OUTPUT«1␤»
12:07 snarkyboojum best not to use ==
12:07 bluescreen joined #perl6
12:08 bbkr == is OK. as far as you remember it forces numeric context on array and thus means 'compare number of elements'
12:08 bbkr star: say +[1,2,3]
12:08 p6eval star 2010.07: OUTPUT«3␤»
12:09 tadzik hmm, this is strange anyway
12:09 snarkyboojum oh didn't read the history properly
12:09 tadzik oh, it just created an array with the only element being the lazy list
12:09 bbkr tadzik: please paste your example
12:09 * snarkyboojum goes back into his hole :)
12:10 tadzik bbkr: http://wklej.org/id/371733/
12:10 amkrankruleuen joined #perl6
12:15 colomon joined #perl6
12:15 timbunce joined #perl6
12:16 bbkr tadzik: use my @t = @(find :dir<tools>); so List is not flattened into one element.
12:17 tadzik oh right, thanks bbkr
12:18 snarkyboojum I just realised the point I was trying to make was about eq not == ;)
12:18 snarkyboojum star: [1,2,3] eq [1,'2',3]
12:18 p6eval star 2010.07:  ( no output )
12:19 snarkyboojum star: say [1,2,3] eq [1,'2',3]
12:19 p6eval star 2010.07: OUTPUT«1␤»
12:19 * snarkyboojum goes back into his hole again
12:20 drbean joined #perl6
12:20 szabgab phenny: tell masak I am trying to fix HTML::Tempolate that seems to be totally broken, see you in Pisa
12:20 phenny szabgab: I'll pass that on when masak is around.
12:20 * moritz_ has proper internetz!
12:21 moritz_ szabgab: when are you coming?
12:21 bbkr star: say ~[1, "2", 3] # snarkyboojum - eq compares stringified values. and stringified [1, "2", 3] is the same as [1, 2, 3]
12:21 p6eval star 2010.07: OUTPUT«1 2 3␤»
12:21 moritz_ sorry, I always forget the times
12:21 szabgab I am at LV Airport
12:21 szabgab shoudl arrive at midnight
12:21 szabgab TLV airport
12:21 moritz_ will you stay at the venue hotel?
12:21 szabgab nope
12:21 moritz_ pity
12:22 colomon joined #perl6
12:22 szabgab yes
12:22 moritz_ (not beccause it's so great, but because I won't see you for breakfeast)
12:22 dolmen joined #perl6
12:22 szabgab will you have a hackathon tomorrow?
12:23 tadzik moritz_: any idea who included HTTP::Daemon in Star?
12:26 moritz_ don't know.. maybe it was me :-)
12:26 moritz_ szabgab: yes
12:27 PhatEddy left #perl6
12:28 tadzik moritz_: does it work for you?
12:28 moritz_ tadzik: haven't tried it
12:28 tadzik moritz_: looks like it does not work at all :?
12:28 tadzik :/
12:29 moritz_ tadzik: maybe mberends knows, he's been working on HTTP server stuff
12:29 beejeebus left #perl6
12:34 envi^home joined #perl6
12:35 szabgab moritz_: is the hackathon in your hotel or at the venue?
12:35 moritz_ szabgab: they are the same
12:36 szabgab wow, 5 test are already passing in HTML::Template!
12:36 szabgab so I'll try to come by and join you guys
12:36 moritz_ \o/
12:37 szabgab lovely, I get an error  "
12:37 moritz_ std: use Test <plan ok>;
12:37 p6eval std 31888: OUTPUT«Compiled ./lib/Test.pm6␤ok 00:01 115m␤»
12:37 szabgab Could not find sub &escape
12:37 szabgab and the comment in the code is "Rakudo segfaults here"
12:37 moritz_ used to be "could not find non-existant sub &escape" :-)
12:38 szabgab I think it is just natural that it will segfault if the sub is not implemented yet :)
12:38 moritz_ szabgab: some of the web stuff is pretty old, when rakudo was *very* immature
12:38 szabgab anyway, I am hungry now
12:38 szabgab moritz_: is there any working templating system you know about?
12:39 szabgab to generate some static html files
12:39 moritz_ szabgab: say()
12:39 moritz_ aka "no"
12:40 szabgab say "no"
12:40 szabgab now boarding
12:40 moritz_ have a safe and pleasant flight
12:40 szabgab I hope I get food and then I can hack some more on this :)
12:40 moritz_ where this = ?
12:40 szabgab HTML::Template
12:40 szabgab and then my slide generator
12:41 moritz_ ah
12:41 snarkyboojum bbkr: yep - that's what I was pointing out
12:41 * snarkyboojum sleeps
12:45 cosimo String::CRC32 ported to Perl 6. \o/
12:46 cosimo http://github.com/cosimo/perl6-string-crc32
12:46 Guest93426 Rakudo mentioned in http://www.h-online.com/security/new​s/item/The-H-Week-Linux-2-6-35-appro​aches-GNOME-3-delayed-1048464.html
12:46 Guest93426 Whatever The H Week is...
12:46 moritz_ it's the English offspring of heise.de
12:46 moritz_ cosimo++
12:47 cosimo would be cool to move it to PIR though
12:47 cosimo cache::memcached uses string::crc32, so I needed it :)
12:48 cosimo i learned quite a few operators +>, +&, +^, and friends
12:48 tadzik hmm. Separating .pm and .pod seems like a good idea to me
12:48 tadzik not in all cases probably
12:49 cosimo i have tons of questions on perl6 pod
12:49 moritz_ cosimo: discuss them with masak++ when he's online
12:49 frettled cosimo: I'm sure someone will weigh in with their answers ;)
12:49 moritz_ cosimo: are you coming to YAPC::EU?
12:50 cosimo moritz_: unfortunately, no
12:50 moritz_ :(
12:50 cosimo would have been nice to meet a few perl6 hackers...
12:50 moritz_ indeed
12:51 moritz_ pmichaud, jnthn, masak, szabgab and a few others are coming
12:51 moritz_ and I'm already there :-)
12:52 cosimo nice and warm, I guess
12:55 moritz_ we have air condition :-)
12:57 Su-Shee don't forget to get icecream while you're in italy ;)
12:58 szbalint Su-Shee: are you coming to YAPC::EU?
13:00 drbean joined #perl6
13:01 drbean_ joined #perl6
13:02 sjn cosimo, frettled: Oslo.pm meeting tomorrow is about Rakudo. Wanna come and do a Show & Tell? :)
13:02 moritz_ you can have live IRC stream from the Rakudo hackathon in Pisa :-)
13:03 cosimo sjn: i guess we need a specific topic, otherwise it would be a bit "dispersive" (if that's english)
13:03 [Coke] http://twitter.com/ssutch/status/20098567855
13:03 [Coke] (from #perl)
13:04 [Coke] cosimo: "scattered" is probably more idiomatic.
13:04 frettled disentangled
13:04 frettled ;)
13:04 tadzik well, at least it's a science fiction. And not as boring as a newspaper
13:05 frettled (actually, I'd use "disjointed" or something like that, I think)
13:05 sjn cosimo: "Show and Tell" is a good topic, isn't it? :)
13:05 bbkr what does using token name with dot before mean? like <.tag_start> in http://github.com/masak/html-template/b​lob/master/lib/HTML/Template/Grammar.pm ?
13:05 [Coke] frettled: +1
13:06 moritz_ bbkr: it surpresses capturing
13:06 bbkr moritz++
13:07 kthakore morning moritz_
13:07 moritz_ oh hai
13:07 kthakore moritz_: I had a few questions for ya
13:07 kthakore moritz_: Are there any bug reports for learn.perl6.org thing?
13:08 moritz_ kthakore: I don't know of any learn.perl6.org thing
13:08 kthakore erm ... hold on looking for http://github.com/moritz/try.rakudo.org
13:08 kthakore moritz_: sorry just woke up
13:08 frettled sjn: I think I would be a poor presenter right now, I'm way too scatter-brained these days.
13:09 moritz_ kthakore: you mean besides "it's not running yet"?
13:09 kthakore moritz_: :P
13:09 kthakore moritz_: ok
13:10 kthakore but I don't even know how to ... install this stuff
13:10 * kthakore sucks at web stuff
13:10 sjn frettled: too scattered to point at something and tell "this is cool"? :)
13:10 tadzik kthakore: it's not to install
13:10 tadzik kthakore: this is about to be working one day, on the web
13:10 moritz_ right; the idea is that there will be a central installation
13:10 kthakore I know
13:10 moritz_ it's too hard to automate the install
13:10 kthakore hmm?
13:10 moritz_ because it requires actions under different user names
13:11 kthakore so how can I help?
13:11 moritz_ for security reason
13:11 kthakore I see
13:11 moritz_ kthakore: talk to ash_ when he's online, he was the one last working on it
13:11 kthakore will do! o\
13:11 frettled sjn: I suspect it includes a bit more than drawing the Rakudo logo on a blackboard/whiteboard, saying «this is cool», and stepping down :)
13:12 tadzik frettled: this might actually be tempting. Stepping up, saying "sorry, I'm too busy hacking Perl 6 to talk about it, but you're welcome to join me" and step down :)
13:12 frettled hee-hee
13:12 frettled That's a cool one.
13:12 kthakore moritz_: ok. Another thing
13:13 Axius joined #perl6
13:13 kthakore moritz_: I wanted to get your permission to use perl6 book to make SDL::Manual
13:13 kthakore moritz_: http://sdlperl.ath.cx/SDL_Manual.letter.pdf
13:13 kthakore moritz_: chromatic already said ok
13:14 moritz_ kthakore: it were pronik and lucs on #perl6book who did most of the layout stuff... if you need another license than the one from the p6 book, talk to those two folks
13:15 kthakore ok
13:15 moritz_ (it's currently a CC share-alike non-commerical, but we want to drop the non-commercial at some point)
13:15 kthakore ok
13:16 frettled sjn: I'll think a bit about it.  I hope cosimo will think a bit about it, too, maybe we can find a nice way to segway out of it ;)
13:17 sjn hehe
13:17 macroron joined #perl6
13:18 timbunce_ joined #perl6
13:24 [Coke] std: barf() ?? 1 :: 3
13:24 p6eval std 31888: OUTPUT«[31m===[0mSORRY![31m===[0m␤Please use !! rather than :: at /tmp/O3sVxpM7qm line 1:␤------> [32mbarf() ?? 1 :[33m⏏[31m: 3[0m␤    expecting any of:␤     coloncircumfix␤   signature␤Undeclared routine:␤      'barf' used at line 1␤Parse failed␤FAILED 00:01 116m␤»
13:25 ashleydev joined #perl6
13:27 cosimo sjn: where's the meeting?
13:28 sjn cosimo: at Nordaaker
13:28 sjn cosimo: check your Oslo.pm inbox :)
13:28 [Coke] http://rt.perl.org/rt3/Tic​ket/Display.html?id=76856 - can someone claim/apply that patch?
13:28 moritz_ is that the cygwin Makefile.in thing?
13:28 [Coke] cjm++
13:28 [Coke] moritz_: no, it fixes up unicode during file gen.
13:29 [Coke] (we're assuming utf8 instead of being explicit in at least one case.)
13:29 moritz_ ok, will test that after the Makefile.in patch
13:32 wtw joined #perl6
13:32 drbean joined #perl6
13:33 Holy_Cow joined #perl6
13:33 wtw hi :) i just played around a bit with rakudo star. am i right in guessing that "custom meta operators" don't work (yet?)?
13:34 wtw i tried:
13:34 wtw multi sub infix:<!>($x, $y) { return $x + $y;
13:34 wtw }
13:34 wtw say [!] 1,2,3,4,5;
13:34 wtw but get
13:34 wtw ===SORRY!===
13:34 wtw Could not find sub &infix:<!>
13:34 moritz_ rakudo: our multi sub infix:<!>($x, $y) { return $x + $y;  }; say [!] 1, 2, 3, 4, 5
13:35 p6eval rakudo f8b73d: OUTPUT«15␤»
13:35 moritz_ wtw: yes, it's a well-known issue with visibility - by default subs are only stored in the lexical scopes
13:35 moritz_ wtw: so the routine that handles [!] can't look it up yet
13:35 wtw ah ok :)
13:35 moritz_ wtw: with 'our multi sub ...' you can work around it
13:36 wtw cool, i love the kind of flexiblity this provides :)
13:36 * moritz_ too
13:36 wtw yep works, thx a lot :)
13:36 moritz_ there's a build-in which should do the lexical lookup in the caller, but it's not yet implemented
13:36 moritz_ it's called 'lift'
13:36 REPLeffect joined #perl6
13:38 wtw i already love p6 even if it's not fully there yet :D
13:38 * moritz_ too
13:38 dolmen cosimo?
13:39 [Coke] do we want a Perl6 Bug Summary email like p5p gets?
13:39 [Coke] parrot was getting one for a while when we were on RT.
13:40 dolmen rakudo: my $x ::= 3; $x = 5;
13:40 p6eval rakudo f8b73d: OUTPUT«Cannot modify readonly value␤  in '&infix:<=>' at line 1␤  in main program body at line 22:/tmp/FnLJUy8Syz␤»
13:41 dolmen cosimo: in String::CRC32, you @CRC_TABLE should be defined as readonly with ::=
13:41 snarkyboojum moritz_: lastest change to the star README says "If you just want to use Rakudo Star, please download a pre-built tar.gz from http://github.com/perl6/book/downloads ***" should that perhaps refer to http://github.com/rakudo/star/downloads?
13:41 dalek rakudo: 65eb876 | moritz++ | src/core/Any-list.pm:
13:41 dalek rakudo: attempt to produce more awesme error message when you do map { hash => 1}
13:41 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/6​5eb876cb4284a3d96c5910e21a2153ce55c5535
13:41 dalek rakudo: 8f8c519 | rurban++ | build/Makefile.in:
13:41 dalek rakudo: Fix installation on cygwin
13:41 dalek rakudo: Signed-off-by: Moritz Lenz <moritz@faui2k3.org>
13:41 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/8​f8c5195b1fc04fab17799825bcea54e860a8c1b
13:41 dalek rakudo: 1a5d4a3 | (Christopher J. Madsen)++ | build/gen_core_pm.pl:
13:41 dalek rakudo: Explicitly request :utf8 layer in gen_core_pm.pl to fix RT #76856
13:41 dalek rakudo: Signed-off-by: Moritz Lenz <moritz@faui2k3.org>
13:41 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/1​a5d4a38470a07dbaaaf2d9a5042a8f97637d6a1
13:42 d4rt joined #perl6
13:46 LaVolta joined #perl6
13:47 proller joined #perl6
13:54 mjk joined #perl6
13:54 mjk joined #perl6
13:55 _jaldhar joined #perl6
13:55 mjk I execute a demo in <UsingPel6-draft.pdf>
13:55 dolmen cosimo: I've submitted a review on GitHub for String::CRC32
13:55 dolmen cosimo: http://github.com/cosimo/perl6-string-crc32/co​mmit/38aa945c8b8e436cb5882c75231d5ed65d18665d
13:56 mjk In pages 33, the sub is "order-steak", but is say ERROR!
13:56 mjk sub order-steak($how = 'msg'){
13:56 mjk say "$how";
13:56 mjk }
13:57 mjk and then execute:order-steak()
13:57 mjk will raise a ERROR
13:57 mjk if execute &order-steak(),it is OK
13:58 plobsing joined #perl6
13:59 mjk or rename the name of sub , ie aorder-steak(), it's ok
13:59 mjk or delete 'o' (rder-steak()), it's ok
14:00 dolmen rakudo: my $x-3 = 2;
14:00 p6eval rakudo f8b73d: OUTPUT«Use of uninitialized value in numeric context␤Cannot modify readonly value␤  in '&infix:<=>' at line 1␤  in main program body at line 22:/tmp/r2znVFk992␤»
14:00 redicaps joined #perl6
14:00 dolmen rakudo: sub x-3 { };
14:00 p6eval rakudo f8b73d: OUTPUT«===SORRY!===␤Confused at line 22, near "sub x-3 { "␤»
14:00 dolmen rakudo: sub x-3 { 5 };
14:00 p6eval rakudo f8b73d: OUTPUT«===SORRY!===␤Confused at line 22, near "sub x-3 { "␤»
14:01 dolmen std: sub x-3 { 5 };
14:01 p6eval std 31888: OUTPUT«[31m===[0mSORRY![31m===[0m␤Malformed block at /tmp/MDwN4F7SZx line 1:␤------> [32msub x[33m⏏[31m-3 { 5 };[0m␤    expecting any of:␤    new name to be defined␤   routine_def␤      trait␤Parse failed␤FAILED 00:01 114m␤»
14:02 dolmen std: sub x-a3 { 5 };
14:02 p6eval std 31888: OUTPUT«ok 00:01 114m␤»
14:02 dolmen rakudo: sub x-a3 { 5 };
14:02 p6eval rakudo f8b73d:  ( no output )
14:02 [particle] less than awesome error messages there
14:02 [particle] x-3 is not a valid identifier
14:02 _jaldhar joined #perl6
14:03 [particle] std: sub x-3 {};
14:03 p6eval std 31888: OUTPUT«[31m===[0mSORRY![31m===[0m␤Malformed block at /tmp/d3_rU0Avjh line 1:␤------> [32msub x[33m⏏[31m-3 {};[0m␤    expecting any of:␤       new name to be defined␤   routine_def␤      trait␤Parse failed␤FAILED 00:01 114m␤»
14:03 mjk Can anyone point out why?
14:03 [particle] oh, missed that one....
14:03 dolmen std: sub order-anything { }; my $x = order-anything();
14:03 [particle] yes, hang on...
14:03 p6eval std 31888: OUTPUT«ok 00:01 117m␤»
14:03 dolmen rakudo: sub order-anything { }; my $x = order-anything();
14:03 p6eval rakudo f8b73d:  ( no output )
14:03 cosimo dolmen: saw your comments, thanks!
14:04 [particle] from STD.pm6: token ident {     <.alpha> \w* }  token apostrophe {     <[ ' \- ]> }  token identifier {     <.ident> [ <.apostrophe> <.ident> ]* }
14:04 [particle] apostrophe must be followed by alpha
14:05 mjk dolmen:is ok! but  why after renamed, the sub is OK?
14:05 irclogbot_backup joined #perl6
14:06 mjk dolmen: and this sub isn't return value
14:06 dolmen mjk: this looks like a bug. Maybe 'order' is special token in the grammar.
14:06 dolmen mjk: can you reproduce it here?
14:06 [particle] it's likely a rakudo parser bug
14:06 snarkyboojum star: sub ord {}; ord();
14:06 p6eval star 2010.07:  ( no output )
14:07 kthakore moritz_: the bot works now
14:07 kthakore moritz_: :P
14:07 [particle] rakudo: sub order-steak ($how = 'msg') { say $how; }; order-steak()
14:07 mjk dolmen: ?
14:07 p6eval rakudo f8b73d: OUTPUT«msg␤»
14:07 [particle] star: sub order-steak ($how = 'msg') { say $how; }; order-steak()
14:07 p6eval star 2010.07: OUTPUT«msg␤»
14:08 [particle] i don't see an error
14:08 mjk dolmen: do you need me to do some thing?
14:08 snarkyboojum for some reason it's reproducable in a file with sub ord {} on the first line and ord(); on the second
14:08 [particle] mjk what is your rakudo version?
14:09 cosimo dolmen: both your suggestions are fine, but the test suite fails if I apply them...
14:09 mjk dolmen: rakudo-star.2010.07.msi
14:11 dolmen cosimo: the problem is probably that Buf doesn't have a split() method...
14:12 Mowah joined #perl6
14:14 mjk [particle]: use your code is OK, but if use:sub order-steak($how='medium'){say $how;};order-steak() ,not OK
14:14 snarkyboojum [particle]: the issue doesn't manifest if the sub and the calls to the sub are on the same line
14:14 dolmen star: my $buf1 = "This is the test string".encode("UTF-8");
14:14 p6eval star 2010.07:  ( no output )
14:14 mjk [particle]: you can test it
14:15 [particle] aha
14:15 snarkyboojum [particle]: seems to have something to with new lines after the defintion of a sub starting with ord
14:15 [particle] if you put a semi-colon after the sub definition, it works, too
14:15 snarkyboojum http://gist.github.com/504699 # golfed
14:16 mjk [particle]: yes
14:16 dolmen cosimo: added comments
14:16 snarkyboojum [particle]: can confirm that adding a ; to the end of the sub definition in that gist fixes the problem too :)
14:16 mjk is strange!
14:17 isBEKaml joined #perl6
14:17 isBEKaml hi, Star6! :)
14:17 snarkyboojum isBEKaml: o/
14:18 [particle] works in nqp
14:19 isBEKaml From what pmichaud++ said in the announce, R* release will be monthly. Does that mean there won't be dev releases of rakudo like we did pre-star?
14:21 [particle] no
14:21 [particle] the compiler releases will continue monthly
14:21 [particle] R* distros will likely be based on the compiler releases
14:21 isBEKaml right. I was wondering since I already submitted a slackbuild script for rakudo compiler to SBo. :)
14:22 [particle] mjk: definitely a parser error:
14:23 cosimo dolmen: Buf.split missing yes
14:23 slavik joined #perl6
14:23 mjk [particle]: aha
14:24 [particle] http://gist.github.com/504714
14:31 x3nU is there any perl6 module for md5 or sha1?
14:31 tadzik md5, yes
14:31 tadzik digest-md5
14:31 x3nU Digest::MD5 doesn't work for me: "load_bytecode" couldn't find file 'Digest/MD5.pir'
14:32 tadzik x3nU: poke cosimo then, iirc he's the author
14:32 snarkyboojum [particle] fwiw, it's not ord that is special, it's any sub name starting with a token infix symbol and having one more chars appended to it.. i.e. or. and. xor. err. leg. but. etc
14:33 snarkyboojum one or* more
14:33 [particle] snarkyboojum: aye, and i believe this is a known bug, but i haven't searched the queue
14:34 snarkyboojum [particle]: ah ok
14:34 [particle] it looks quite familiar...
14:35 x3nU tadzik: i've leaved message for him on priv
14:38 dolmen star: Buf.^methods().perl.say
14:38 p6eval star 2010.07: OUTPUT«Method 'perl' not found for invocant of class 'ResizablePMCArray'␤  in main program body at line 22:/tmp/GeFw3FNSML␤»
14:39 dolmen cosimo: Buf implementation is incomplete (and not even specified): see above
14:39 tadzik dolmen: nah, it's just a Role
14:39 tadzik like Hash
14:39 GeneralMaximus joined #perl6
14:39 tadzik star: Hash.^methods
14:39 p6eval star 2010.07:  ( no output )
14:40 tadzik star: Hash.^methods.perl
14:40 p6eval star 2010.07: OUTPUT«Method 'perl' not found for invocant of class 'ResizablePMCArray'␤  in main program body at line 22:/tmp/m59tt5n9g1␤»
14:40 tadzik at least that's what moritz_ told me :)
14:40 Guest23195 joined #perl6
14:42 dolmen cosimo: http://perlcabal.org/syn/S32/Containers.html#Buf
14:42 snarkyboojum yeah, can't introspect those types :|
14:44 dolmen star: buf.new([65, 66, 67]).HOW.methods().say
14:44 p6eval star 2010.07: OUTPUT«Could not find sub &buf␤  in main program body at line 22:/tmp/WsyJoyUPkI␤»
14:44 dolmen star: Buf.new([65, 66, 67]).HOW.methods().perl.say
14:44 p6eval star 2010.07: OUTPUT«too few positional arguments: 1 passed, 2 (or more) expected␤  in main program body at line 22:/tmp/bDMhJkr_ZD␤»
14:44 dolmen star: Buf.new([65, 66, 67]).^methods().perl.say
14:44 p6eval star 2010.07: OUTPUT«[{ ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ...
14:44 p6eval ..}, { …
14:45 skangas joined #perl6
14:47 snarkyboojum oh cool
14:48 snarkyboojum star: Buf.new().^methods(:local).say
14:48 p6eval star 2010.07: OUTPUT«postcircumfix:<[ ]>contentsdecodeofat_poselemsnew␤»
14:48 snarkyboojum star: Buf.^methods(:local).say
14:48 p6eval star 2010.07: OUTPUT«Method 'say' not found for invocant of class 'ResizablePMCArray'␤  in main program body at line 22:/tmp/TIFgxOeeHe␤»
14:48 snarkyboojum star: Int.^methods(:local).say
14:48 p6eval star 2010.07:
14:48 p6eval ..OUTPUT«asinhNumericcosechrealsStrasecacotanhflo​orsechACCEPTSasechrandtruncateroundsqrtasinBoolco​shexpacoshsuccsigncotanatan2ComplexseccislogsinIn​tBridgeto-radiansacosechabsacotanlnceilingcotanhu​npolaratanRealacosRattanhatanhcosecNumperlWHICHro​otsisNaNtanfrom-radianslog10cospredacosecsinh␤»
14:48 snarkyboojum so some quirks
14:49 dolmen star: (map { $_ } Buf.new([65, 66, 67])).perl.say
14:49 p6eval star 2010.07: OUTPUT«===SORRY!===␤Confused at line 22, near "(map { $_ "␤»
14:49 dolmen star: (map { $_ }, Buf.new([65, 66, 67])).perl.say
14:49 p6eval star 2010.07: OUTPUT«(.new(contents => [65, 66, 67]))␤»
14:50 dolmen star: for Buf.new([65, 66, 67]) { $_.perl.say }
14:50 p6eval star 2010.07: OUTPUT«.new(contents => [65, 66, 67])␤»
14:50 dolmen star: for @{Buf.new([65, 66, 67])} { $_.perl.say }
14:50 p6eval star 2010.07: OUTPUT«===SORRY!===␤Non-declarative sigil is missing its name at line 22, near "@{Buf.new("␤»
14:51 dolmen star: for @(Buf.new([65, 66, 67])) { $_.perl.say }
14:51 p6eval star 2010.07: OUTPUT«.new(contents => [65, 66, 67])␤»
14:51 dolmen cosimo: don't know how to iterate the elements of a Buf
14:51 alester joined #perl6
14:51 sekon joined #perl6
14:52 sekon left #perl6
14:53 ispeak_ joined #perl6
14:53 cosimo dolmen: i'll leave the Str version for now
14:55 dolmen cosimo: it only works on ASCII: code points above 128 will corrupt the CRC
14:57 snarkyboojum star: my $buf = Buf.new([65, 66, 67]); for ^$buf.elems -> $i { say $buf[$i] }
14:57 p6eval star 2010.07: OUTPUT«65␤66␤67␤»
14:59 redicaps left #perl6
14:59 serged joined #perl6
14:59 timbunce joined #perl6
14:59 jdv79 joined #perl6
15:01 snarkyboojum star: for ^Buf.new([65, 66, 67]).elems -> $i { say $buf[$i] }
15:01 p6eval star 2010.07: OUTPUT«===SORRY!===␤Symbol '$buf' not predeclared in <anonymous> (/tmp/_vfd5rhclV:22)␤»
15:01 snarkyboojum heh
15:07 pyrimidine joined #perl6
15:10 avuserow joined #perl6
15:13 perlygatekeeper joined #perl6
15:16 ashleydev joined #perl6
15:20 bluescreen joined #perl6
15:21 cosimo dolmen: so, how do I go on adding a crc32 to buf8 ?
15:25 dolmen cosimo: http://github.com/cosimo/perl6-string-​crc32/commit/38aa945c8b8e436cb5882c752​31d5ed65d18665d#commitcomment-121233
15:25 gbacon joined #perl6
15:26 dolmen star: my $x = Buf.new([65, 66, 67]); $x[0].perl.say;
15:26 p6eval star 2010.07: OUTPUT«65␤»
15:30 dolmen star: my $x = Buf.new([65, 66, 67]); for map { $x[$_] },  0..($x.elems-1) { $_.say }
15:30 p6eval star 2010.07: OUTPUT«65␤66␤67␤»
15:33 PerlJam dolmen: you know you can say 0..$x.end instead of $x.elems-1
15:34 dolmen PerlJam: thanks
15:34 PerlJam or even ^$x.elems instead of 0..$x.end
15:34 dolmen star: my $x = Buf.new([65, 66, 67]); for map { $x[$_] },  0..($x.end) { .say }
15:34 snarkyboojum you can also do ^$x.elems to give you the same range :)
15:34 p6eval star 2010.07: OUTPUT«65␤66␤67␤»
15:34 PerlJam you don't need the extra parens
15:34 dolmen star: my $x = Buf.new([65, 66, 67]); for map { $x[$_] },  ^$x.elems { .say }
15:34 p6eval star 2010.07: OUTPUT«65␤66␤67␤»
15:34 snarkyboojum as per, my $buf = Buf.new([65, 66, 67]); for ^$buf.elems -> $i { say $buf[$i] }
15:34 snarkyboojum :)
15:35 darkop joined #perl6
15:36 tylercurtis joined #perl6
15:36 PerlJam if someone added support for .values to Buf, you wouldn't need the map or array indexing either :)
15:37 dolmen I agree. In fact, Buf should be Iterable.
15:38 PerlJam oh, Buf already has values,  but it's not quite useful enough.
15:38 PerlJam star: my $x = Buf.new([65, 66, 67]); for $x.values.values { .say }
15:38 p6eval star 2010.07: OUTPUT«Buf()<0x702d8a0>␤»
15:38 PerlJam oops
15:38 PerlJam star: my $x = Buf.new([65, 66, 67]); for $x.values { .say }
15:38 p6eval star 2010.07: OUTPUT«Buf()<0x6fdb640>␤»
15:49 d4rt star: my $x = Buf.new([65,66,67]) for $x.values {.values.say }
15:49 p6eval star 2010.07: OUTPUT«===SORRY!===␤Confused at line 22, near "my $x = Bu"␤»
15:49 snarkyboojum star: say Buf.new([65, 66, 67]).contents.join(" ")
15:49 p6eval star 2010.07: OUTPUT«65 66 67␤»
15:49 snarkyboojum star: say Buf.new([65, 66, 67]).contents.WHAT
15:49 p6eval star 2010.07: OUTPUT«Array()␤»
15:49 d4rt star: my $x = Buf.new([65,66,67]); for $x.contents {.say }
15:49 p6eval star 2010.07: OUTPUT«65␤66␤67␤»
15:50 snarkyboojum naughty - no idea why contents is available
15:50 d4rt :(
15:50 Guest40089 joined #perl6
15:50 snarkyboojum oh sorry... no it's fine :)
15:50 risou joined #perl6
15:51 d4rt star: my $x = Buf.new([65,66,67]); for $x.values { .WHAT }
15:51 p6eval star 2010.07:  ( no output )
15:52 d4rt ?
15:52 snarkyboojum there is no .values implemented for Buf
15:52 d4rt i thought PerlJam said it did?
15:53 snarkyboojum oh ok
15:53 d4rt also
15:54 d4rt star: my $x = Buf.new([65,66,67]); for $x.values { .say }
15:54 p6eval star 2010.07: OUTPUT«Buf()<0x7007220>␤»
15:54 d4rt what up with that then?
15:54 snarkyboojum maybe from Any-list
15:54 PerlJam d4rt: Buf may have .values accidentally through its inheritance heiarchy or it may have a stub implementation that does what you see
15:55 d4rt i see
15:55 pyrimidine re: lives_ok() in Test, shouldn't "lives_ok {warn('foo')}" work?
15:55 d4rt thanks
15:55 snarkyboojum looks like it comes from Any-list
15:56 pyrimidine nopaste?
15:57 eric1599 joined #perl6
15:58 snarkyboojum which just does .list on the Buf, which doesn't do what is intended :)
16:00 pyrimidine lives_ok() problem: http://gist.github.com/504846
16:06 tadzik joined #perl6
16:06 timbunce joined #perl6
16:06 uniejo joined #perl6
16:06 Pyramide joined #perl6
16:15 jaldhar joined #perl6
16:28 daxim zomg, rakudo's build system sucks.
16:28 colomon joined #perl6
16:29 PerlJam daxim: patches welcome  :)
16:30 cdarroch joined #perl6
16:30 cdarroch joined #perl6
16:31 [Coke] daxim: rakudo's in particular, or just the underlying parrot one?
16:31 Trashlord joined #perl6
16:32 daxim just rakudo, I am in great need of --build-root, that would make packaging much easier.
16:32 [Coke] ah, yes. parrot could use that particular option too.
16:32 [Coke] someone's working on it on the parrot side, not that that helps you
16:32 tadzik packaging Rakudo is ok, Rakudo Star isn't
16:34 daxim okay, I'm actually on rakudo-star
16:34 tadzik well, that's broken, it's a fact
16:34 daxim what an insight
16:34 tadzik but the other fact is, it's hardly possible to fix
16:34 daxim I have already resigned to work around it
16:35 tadzik The only sensemaking way is to package Rakudo+Parrot+Blizkost and Modules separately
16:35 [Coke] I am still confused by people packaging star.
16:35 PerlJam I think pmichaud committed some changes to R*'s repo to help in that area.  Maybe wait for the next R* release or build a new one from the current contents of the repo?
16:35 PerlJam (I could be wrong though)
16:35 tadzik [Coke]: what OS are you running?
16:36 [Coke] tadzik: xp, os x, and ubuntu.
16:36 tadzik [Coke]: so the point is to have R* available via package management, like packages in Ubuntu
16:36 justatheory joined #perl6
16:36 [Coke] the windows installer justworked for xp, and doing the build from the R* tarball worked fine on ubuntu. I've been doing parrot & rakudo separately on osx for some time, not sure I did * there.
16:37 [Coke] tadzik: but don't do *, do "parrot", and "rakudo compiler", and "the modules" . no?
16:37 tadzik [Coke]: what do you mean?
16:38 aCiD2 joined #perl6
16:38 aCiD2 evening perl6
16:38 tadzik [Coke]: the point is to have a package, e.g. in Ubuntu, which users can install w/o compilation. Like a .deb package, or even available in the repos
16:38 [Coke] I mean create a a parrot package. and a rakudo compiler package. and a "rakudo modules" package (perhaps not going all the way on this last one as the p5 module packages do.)
16:39 tadzik g'afternoon aCiD2
16:39 [Coke] tadzik: yes. why do this from R* and not from the component parts that R* is built from?
16:40 tadzik [Coke]: well, I packaged the components (not all of them) on CRUX. But I think it'd be nice to have not-broken build system in Star, so one could package it without mangling numerous things together
16:41 * [Coke] assumes that his point makes no sense and gives up. ;)
16:41 PerlJam tadzik: that would have made an excellent grant proposal to TPF I think.
16:41 tadzik by the way, I think Fedora wanted to have Star in their repos
16:41 tadzik PerlJam: what, fixing R* build system?
16:41 PerlJam yes
16:42 tadzik I can try to do this w/o a grant :) But as pmichaud said yesterday, or was it 2 days ago? It's difficult, for compiling modules needs installed Rakudo, and installed Rakudo needs installed Parrot
16:43 tadzik [Coke]: I think the point is that the Star is the collection of Perl6 stuff itself. Making a package which is not using Star, but rather combining the separate components is reinventing Star imho
16:43 PerlJam well, by the time the next grant period rolls around we may have had enough experience with R* releases that it's not a problem anymore :)
16:44 [particle] R* didn't use Rakudo 2010.07, it was too buggy
16:44 tadzik I fixed Blizkost Makefile, so I can stand broken R* ;)
16:45 jarek joined #perl6
16:49 [Coke] tadzik: yes, but if you're packaging things, you're now bundling things which are, in fact, separate items, into a single monster package. R* is, IMO, more a bundle for people who are wish to try things out. Let's say I'm using another language on top of parrot. if I'm getting my packaged parrot as a subset of rakudo, how do I upgrade parrot now?
16:49 [Coke] shouldn't the R* package just have the appropriate parrot package as a dependency?
16:49 tommyd joined #perl6
16:51 [particle] [Coke]: when possible, yes, however R* won't always be based on a parrot compiler release or a rakudo compiler release
16:52 PerlJam [particle]: I think Coke is suggesting that the particular parrot release be packaged separately too
16:52 [particle] does ubuntu have the linux core packages as a dependency? i don't know the answer.
16:52 [particle] eew.
16:52 tadzik [Coke]: in fact you rarely package many things into monster package, they're more often small fix bonded by zilions of dependencies, as in the Parrot example. But R* is imho more of a condensed thing than a bunch of small parts
16:52 tadzik [particle]: define 'core linux packages'
16:53 [particle] linux core 2.6.35
16:53 tadzik yes, kernel is a separate package
16:53 [particle] ok.
16:54 [particle] and if ubuntu patches that kernel, does it bundle the patches separately and include them as dependencies?
16:54 tadzik nope
16:54 tadzik this is their kernel, with their patches and their config
16:54 [particle] ok, that's as i thought, too.
16:55 [particle] looking at it that way, R* could include a parrot-core source pkg as a dependency, and have required patches to that inside the R* pkg, applied after the parrot-core pkg is downloaded and untarred
16:56 PerlJam true
16:56 tadzik nope
16:56 PerlJam nope?
16:56 tadzik in fact, in this approach, with parrot as a dependency, it would be alredy installed to the fs
16:56 risou_ joined #perl6
16:56 tadzik what is more, it would more proabaly be binary, compiled alredy
16:56 tadzik so no patching and recompiling
16:57 [particle] i said source pkg specifically, it'd have to be that way.
16:57 PerlJam tadzik: you can't have a source dep that could be patched/recompiled?
16:57 jarek-s joined #perl6
16:57 [particle] i don't know if parrot provides source packages, though
16:58 tadzik PerlJam: not always, e.g. in Ubuntu everything is binary, compiling is not happening when you install a package
17:02 gfldex tadzik: until you install emacs, that starts to compile lots of stuff
17:03 gfldex or latex that builds lots of font info
17:03 tadzik hmm
17:03 huf or any lisp vm basically ;)
17:03 tadzik so maybe that's the way. Installing Rakudo, Parrot, Blizkost, and compile modules after that, in this post-install stage?
17:03 gfldex but we shouldn't generalise from lisp :D
17:03 huf true.
17:04 tadzik why? We can write functional stuff to :)
17:04 tadzik too
17:04 huf yes, but much better.
17:04 huf ;)
17:04 tadzik :)
17:04 gfldex you should compile modules when they are first used or when the user is requesting it like with prelinking
17:05 gfldex if you insist to precompile stuff when you install the package, we will make you work with a netbook :)
17:06 timbunce_ joined #perl6
17:07 tadzik gfldex: look at R* build process then
17:07 tadzik it actually _is_ compiling modules :)
17:09 daxim in the install target, no less.
17:09 gfldex R* is a source tarball
17:09 itz joined #perl6
17:10 daxim holy shit, it finished compiling
17:10 itz proto is looking for projects.state and not finding it .. any ideas?
17:10 tylercurtis gfldex: how would you implement only compiling modules when first used?
17:11 tadzik daxim: but doing it in 'make install' step is wrong
17:11 daxim I agree
17:11 tadzik ok
17:11 tadzik so after make install, the modules are to be compiled
17:12 tadzik so when we come to the conclusion it's time to nag pmichaud :)
17:12 tadzik bbs
17:12 daxim no, that should happen in "make"
17:13 Pyramide left #perl6
17:14 radu_ joined #perl6
17:14 gfldex tylercurtis: i would not do that at all. you have to provide precompiled modules in the .deb because the user might not have write access to the place you have store those modules or might not have room in $HOME nor /tmp to store them there
17:15 tylercurtis gfldex: "you should compile modules when they are first used or when the user is requesting it like with prelinking".... so, only when explicitly requesting it? That doesn't seem wise with Rakudo's current performance. Unless I misunderstand you.
17:16 gfldex it was mentioned to compile them when the package is installed
17:16 gfldex and that's a bad idea
17:16 gfldex some ppl run linux on their linksys router
17:16 gfldex it's a tricky question
17:17 gfldex but parrot bytecode is portable, so shipping it with the .deb is possible
17:17 gfldex i'm quite sure debian will provide 2 variants in the end
17:17 gfldex one with precompiled and one without precompiled modules
17:18 tommyd joined #perl6
17:18 gfldex or stick the precompiled modules into another package
17:19 tylercurtis gfldex: but Parrot bytecode isn't portable between versions of Parrot, which means that every precompiled PBC package will have to be updated every time the Parrot package is, even if otherwise unnecessary. Not necessarily too problematic, but still suboptimal.
17:19 pmurias joined #perl6
17:20 d4rt joined #perl6
17:21 slavik tylercurtis: could it be because parrot is not 'final' ?
17:21 dolmen gfldex: usually you install binary package, and do not build from source
17:22 dolmen gfldex: the distributor is the one that build the binary package from the source
17:22 daxim build/module-install.pl is an evil hack and must die:  it recompiles the pir files every single time
17:22 [particle] parrot bytecode is not yet guaranteed portable.
17:22 ggoebel joined #perl6
17:23 KenGuru joined #perl6
17:25 dolmen AFAIK R* is a whole package and should be a single package (.deb/rpm) that includes parrot+rakudo+modules. Installing the package should not alter an existing parrot: everything (Rakudo, Parrot, modules) should be installed into /usr/lib/rakudo-star-2010.07
17:27 mirrage joined #perl6
17:29 smash joined #perl6
17:29 smash hello everyone
17:30 daxim dolmen, if compiled with an external parrot, it mostly goes to %{_libdir}/parrot/*/languages/perl6 + subdirectories
17:32 x3nU is it possible to create array of bytes in perl6?
17:32 dolmen daxim: the question is: is an external parrot reliable?
17:33 dolmen x3nU: this called a Buf
17:33 dolmen s/this/this is/
17:33 daxim that's not the packager's concern.  if I used the internal one, the end users would bite off my head for creating a shoddy package that conflicts for no good reason
17:34 x3nU dolmen: thanks
17:34 dolmen daxim: if R* embeds an internal parrot, it must not be installed as /usr/bin/parrot but instead as /usr/lib/rakudo-star-2010.07/bin/parrot
17:35 dolmen x3nU: http://perlcabal.org/syn/S32/Containers.html#Buf
17:35 daxim that's against FHS, won't do.
17:36 x3nU also is it possible that function require for example array of Ints (and only ints!) as argument?
17:37 dolmen daxim: that is not against FHS: in this case the parrot binary is private for rakudo, so it doen't have to be exposed to the whole world in /usr/bin.
17:37 dolmen x3nU: yes
17:38 x3nU how?
17:38 gfldex x3nU: not implemented yet
17:38 dolmen star: sub only-ints(Int @ints) { };
17:38 p6eval star 2010.07:  ( no output )
17:39 ambs joined #perl6
17:40 dolmen ambs: already at YAPC::eu?
17:40 * ambs nods
17:40 dolmen ambs: so see you on wednesday as flesh :)
17:41 ambs hehehe :D
17:43 dolmen ambs: you were one of the 2009 organizers, isn't it?
17:43 ambs indeed
17:44 dolmen that was my first YAPC. thanks for the great experience
17:44 ambs hehehe
17:44 ambs thanks for coming and making it a great conference :)
17:46 desertm4x joined #perl6
17:48 dolmen daxim: http://www.pathname.com/fhs/2.2/fhs-4.7.html
17:48 dolmen daxim: "/usr/lib includes object files, libraries, and internal binaries that are not intended to be executed directly by users or shell scripts."
17:48 dolmen daxim: R*'s parrot would be an "internal binary"
17:54 x3nU can i specify required size of buf for function?
17:56 tadzik sub foo ($buf where { $buf.size > 50 }) or something?
18:00 x3nU well there's no size method
18:00 x3nU (and when i say 'size' i'm thinking about size of byte)
18:01 tadzik oh
18:01 tadzik no idea then
18:01 x3nU well
18:02 x3nU i will check if all elements of buf are smaller than 256
18:02 x3nU it's ugly but what else can i do ;d
18:03 tadzik and what do You want to achieve?
18:03 * tadzik has never worked with Buffers
18:03 x3nU i'm writing script that works on bytes
18:03 tadzik binary, huh?
18:03 x3nU and i want be sure that buf contains bytes in classical meaning of 'byte' (8 bits)
18:04 x3nU in c it would be a lot simpler ;d
18:04 tadzik probably
18:04 tadzik you can write a lib in C and use it via Zavolaj
18:05 x3nU that would be overkill imho
18:05 tadzik yep
18:05 tadzik but no binary files support in Rakudo, afaik
18:06 rokoteko joined #perl6
18:06 tylercurtis x3nU: Eventually, (i.e., when Rakudo supports native types), buf will be Buf[uint8], and you could use it.
18:08 timbunce_ joined #perl6
18:15 ambs_ joined #perl6
18:16 jaldhar joined #perl6
18:20 [Coke] dolmen - if the binary is a private binary, I withdraw any kibbitzing I already put out there. =-)
18:21 * dolmen have to leave
18:21 [Coke] ~~
18:21 tommyd joined #perl6
18:40 kst joined #perl6
18:46 xinming joined #perl6
18:52 tadzik remind me, what was this syntax with passing a variable to a block?
18:52 tadzik star: { foo => "bar" } -> $var { say $var<foo> }
18:52 p6eval star 2010.07: OUTPUT«===SORRY!===␤Confused at line 22, near "{ foo => \""␤»
18:52 tadzik like in for, I don't remember how do I use it w/o  loop
18:53 tylercurtis star: (-> $var { say $var<foo> })({foo => "bar"})
18:53 p6eval star 2010.07: OUTPUT«bar␤»
18:53 tylercurtis star: (-> $var { say $var<foo> }).({foo => "bar"}) #or with .()
18:53 p6eval star 2010.07: OUTPUT«bar␤»
18:53 tylercurtis star: -> $var { say $var<foo> }.({foo => "bar"}) # probably doesn't work
18:53 p6eval star 2010.07: OUTPUT«bar␤»
18:54 tylercurtis Well, I guess it does.
18:54 tylercurtis star: -> $var { say $var<foo> }({foo => "bar"}) # probably doesn't work
18:54 p6eval star 2010.07: OUTPUT«bar␤»
18:54 tylercurtis tadzik: any of those...
18:54 tylercurtis std: -> $var { say $var<foo> }({foo => "bar"})
18:54 p6eval std 31888: OUTPUT«ok 00:01 118m␤»
18:54 * tylercurtis didn't expect the last two to work.
18:55 Maddingue star: my @primes = gather { grep { take is_prime($_) } 0 .. Inf }  # is lazyness implemented in Rakudo* ?
18:55 p6eval star 2010.07: OUTPUT«===SORRY!===␤Unable to parse blockoid, couldn't find final '}' at line 22␤»
18:56 tylercurtis Maddingue: I think Rakudo's list assignment is lazy. Use binding.
18:56 tylercurtis std: my @primes = gather { grep { take is_prime($_) } 0 .. Inf }
18:56 p6eval std 31888: OUTPUT«[31m===[0mSORRY![31m===[0m␤Strange text after block (missing comma, semicolon, comment marker?) at /tmp/653T1KB1yx line 1:␤------> [32mes = gather { grep { take is_prime($_) }[33m⏏[31m 0 .. Inf }[0m␤    expecting any of:␤  bracketed infix␤  infix or meta-infix␤
18:56 p6eval ..statement modi…
18:56 tylercurtis Your grep syntax is wrong, though, Maddingue.
18:57 Maddingue maybe. not used yet to Perl 6 :)
18:57 Maddingue well, I wanted a short yet funny Perl 6 code to paste to http://www.hetemeel.com/einsteinform.php
18:57 tommyd evening all
18:57 tadzik oh, this way
18:58 tylercurtis Maddingue: also, grep is lazy, so you don't need gather/take there anyway.
18:58 tommyd I've noticed the terms "token", "regex" and "rule" within a Perl 6 grammar - are these terms interchangable (i.e. do all basically mean the same) or are there differences between them?
18:58 Maddingue could make a good update on µblogs with a text like: "ok, Perl 6 was a bit long, but we're coming to an end"
18:58 tadzik tommyd: there are differences
18:58 tadzik e.g. rule is whitespace-senvisite
18:59 tylercurtis Maddingue: my @primes := grep &is_prime, 1..Inf;
18:59 tadzik but don't believe me too much, I only use token because I never know the differences
18:59 tadzik :)
18:59 tylercurtis Or my @primes := 1..Inf ==> grep &is_prime
18:59 tylercurtis Maddingue: 1..* is also the more idiomatic way of doing 1..Inf.
19:00 jfried joined #perl6
19:00 Maddingue tylercurtis: thanks!
19:00 Maddingue dear, I really need to start learning Perl 6
19:02 tadzik I'm glad to hear that :)
19:02 tylercurtis Maddingue: welcome. List assignment is supposed to be mostly lazy(it eagerly evaluates the finite beginning of the list( e.g. the 1,2,3,4 in 1, 2, 3, 4, 6..*), but doesn't touch the rest), but I think Rakudo's is still eager.
19:02 Su-Shee it
19:02 Su-Shee it's nice that everybody starts at the same level :)
19:03 gbacon joined #perl6
19:04 Trashlord joined #perl6
19:04 jaldhar joined #perl6
19:07 cono joined #perl6
19:08 jferrero joined #perl6
19:13 dalek rakudo: 9667975 | moritz++ | src/core/Any-list.pm:
19:13 dalek rakudo: fix typo, noticed by madsen++
19:13 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/9​667975fceefcb601fe55d52baf4bd562f178b36
19:17 tylercurtis tommyd, tadzik: token is regex :ratchet, rule is regex :ratchet :sigspace. In other words, rules and tokens turn off backtracking and rules turn on significant whitespace.
19:17 Maddingue tylercurtis++ thanks for the help: http://twitter.com/maddingue/status/20161383662
19:18 tommyd tylercurtis: ok, thanks
19:19 hercynium joined #perl6
19:19 tylercurtis Maddingue++ cool! I hope he wasn't expecting it too eagerly, though. :)
19:21 Maddingue ;)
19:21 tommyd is there a way to print the AST of a matching grammar?
19:21 tylercurtis tommyd: Foo::Grammar.parse($str).perl.say;
19:22 tylercurtis tommyd: If I understand you correctly.
19:22 tommyd tylercurtis: you did - great - this is it what I'm looking for
19:22 moritz_ parse tree != AST
19:23 moritz_ in perl 6 speak, an AST is what you attach to a parse tree by calling make($thing) in the action method
19:23 tylercurtis Oh, right, AST.
19:23 moritz_ you can access that with .ast on the match object
19:23 moritz_ (just for the record, not what tommyd++ wants)
19:24 tylercurtis moritz_: technically, .ast != AST. .ast is an "abstract object" that is "normally used to build up an abstract syntax tree."
19:26 PerlJam I've now got a new-to-me MacBook.  Any words of wisdom for building rakudo/parrot on it?
19:26 moritz_ PerlJam: install a Perl 5 from source, into a sseparate directory
19:26 moritz_ PerlJam: add it as the first option to PATH
19:26 slavik PerlJam: put Linux on it
19:27 moritz_ then follow the "how to build rakudo" instructions
19:27 PerlJam apparently I've no make or C compiler.
19:27 Holy_Cow joined #perl6
19:27 tylercurtis moritz_: not really necessary unless it has a pretty old OS X. 10.5, at least, ships with 5.8.
19:27 PerlJam (note: I'm not normally a mac person)
19:27 tommyd PerlJam: use MacPorts to get the current parrot
19:27 PerlJam OSX 10.5.2
19:27 nimiezko joined #perl6
19:27 PerlJam :-)
19:27 tylercurtis PerlJam: oh, right, need to install Xcode to get that.
19:27 tommyd (I packaged that recently)
19:28 PerlJam tommyd: I've no idea what that means.
19:28 tylercurtis You can get it from somewhere on Apple's website.
19:28 tommyd www.macports.org
19:28 PerlJam thanks
19:28 tommyd parrot is the VM for rakudo, ie. perl6
19:28 tommyd because of the (unfortunately unresolved) #344 there is no working rakudo port right now
19:29 [Coke] PerlJam: you want to install xcode from the install dvd.
19:30 * [Coke] catches up.
19:31 PerlJam heh, apparently this macbook ran windows at one time ... there's a XP disk in the with the Mac disks
19:34 ggoebel joined #perl6
19:35 javs joined #perl6
19:36 estrabd joined #perl6
19:37 wamba joined #perl6
19:37 wamba left #perl6
19:37 wamba joined #perl6
19:39 ggoebel Can anyone recommend a module with tests which I could use as an example to shamelessly steal\b\b\b\b\b\b learn how people are currently testing their perl6 modules?
19:40 moritz_ ggoebel: my json module has pretty decent test coverage
19:40 moritz_ http://github.com/moritz/json/
19:40 ggoebel moritz_: thanks!
19:41 justatheory joined #perl6
19:43 itz moritz_: I'm trying to use proto/plz with star .. is there a recommended version for that?
19:43 itz s/plz/pls
19:44 moritz_ itz: don't think so, just the 'pls' branch of proto
19:44 KenGuru joined #perl6
19:44 moritz_ I'm kinda surprised that star doesn't come with it bundled
19:45 tylercurtis moritz_: it has proto, though.
19:45 PerlJam There's always the next star release
19:46 tylercurtis moritz_: or at least, it has proto in modules/, but it doesn't seem to be installed.
19:48 itz tylercurtis: I don't see it
19:49 moritz_ in the build directory, not in the install location :(
19:53 moritz_ rakudo: say ?try { warn "foo"; 1 }
19:53 p6eval rakudo 1a5d4a: OUTPUT«Null PMC access in type()␤  in main program body at line 22:/tmp/dEZc1dHWNA␤»
19:53 moritz_ rakudo: try { warn "foo"; say "alive" }
19:53 p6eval rakudo 1a5d4a:  ( no output )
19:56 m`` left #perl6
19:58 tri1 joined #perl6
19:59 TSa joined #perl6
19:59 tommyd I can see a lot of syntax niceties like $<value>>> or $/.hash.values.[]
19:59 tommyd here: http://github.com/moritz/json/blo​b/master/lib/JSON/Tiny/Actions.pm
20:00 tommyd where can I read up on these? Only in the 5th Synopses or is there a shorter overview somewhere?
20:01 moritz_ actually $<values>».thing is nicer
20:01 tylercurtis tommyd: S05 isn't the place to look for most of those.
20:01 tylercurtis http://perlcabal.org/syn/S03.html#Hyper_operators for >>.
20:02 tommyd ah ok, thanks
20:02 tylercurtis tommyd: what part of $/.hash.values.[0] do you want to know more about?
20:02 moritz_ tommyd: $<value> is accessign the 'value' capture from the current match object, $/
20:02 offerkaye joined #perl6
20:02 moritz_ and @list>>.method calls the .method on all items in list
20:02 moritz_ tommyd: the book also talks about the JSON parser, in the "grammars" chapter
20:02 tommyd tylercurtis: basically I'm starting with writing a small grammar and I wonder how I can access and iterate over the parsed contents
20:02 offerkaye Hi
20:03 moritz_ tommyd: then do read the grammar chapter, and probably the regex chapter too
20:03 moritz_ offerkaye: hi
20:04 tylercurtis http://perl6advent.wordpress.com/200​9/12/21/day-21-grammars-and-actions/ is a pretty good article about grammars and actions. Tene++
20:06 tadzik star: my @arr = 1, 2, 3; @arr>>.say: 'A $_' # how should it work?
20:07 p6eval star 2010.07: OUTPUT«Too many positional parameters passed; got 2 but expected 1␤  in 'Mu::say' at line 1220:CORE.setting␤  in main program body at line 22:/tmp/daev3P1UTB␤»
20:07 ashleydev joined #perl6
20:07 rbaumer joined #perl6
20:08 Tene tadzik: use the fmt method
20:08 ashleydev joined #perl6
20:08 Tene something like...
20:08 Tene star: my @a = 1..3; @a>>.fmt("A %s")>>.say
20:08 p6eval star 2010.07: OUTPUT«A 1␤A 2␤A 3␤»
20:10 tadzik hmm
20:10 tadzik star: my @a = 1..3; @a>>.fmt("A %s\n") # why the spaces on lines 2-3?
20:10 p6eval star 2010.07:  ( no output )
20:10 tadzik oh you
20:10 tadzik star: my @a = 1..3; say @a>>.fmt("A %s\n") # why the spaces on lines 2-3?
20:10 p6eval star 2010.07: OUTPUT«A 1␤A 2␤A 3␤␤»
20:10 desertm4x joined #perl6
20:10 tadzik hrm, nevermind
20:14 moritz_ can anybody still commit to the pugs repo? I get an error here
20:14 Tene tadzik: I see no extra spaces anywhere.  Are you referring to the newlines?
20:15 tadzik Tene: nah, was just REPL-effect
20:15 Tene the only spaces are between A and the item, as asked for in the fmt.
20:15 Tene ah, okay.
20:15 moritz_ I guess there was a reason for the "nevermind" :-)
20:17 [Coke] moritz_: I just had to rekey my auth and got a big ole warning about storing it plaintext, but yes, I was able to commit.
20:18 moritz_ [Coke]: rekey your auth? what did you do, exactly?
20:18 [Coke] "svn commit TODO". got prompted for my password. entered it. svn complained that I'm an insecure idiot, really do that? (yes). committed.
20:19 [Coke] (since I'm just using user/pass and it has to store the password in plaintext in ~/.svn/<mumble>
20:20 moritz_ ah
20:20 moritz_ my git-svn doesn't ask me, just complains
20:21 moritz_ *mumble*
20:21 [Coke] ah, probably because I have 3 different (valid?) pugs urls. 2 on port 80, one on 443, each with a slightly different hostname.
20:21 [Coke] I just never committed from this particular repo before. =-)
20:21 [Coke] s/repo/checkout/
20:21 [Coke] ah, git-svn is even more evil than svn. good luck!
20:24 x3nU my first perl 6 module, totally useless hash algorithm implementation, 9 lines of code ;D
20:24 x3nU http://github.com/xenu/Digest--djb2
20:26 cosimo x3nU: cool
20:27 tylercurtis x3nU: can you not do for $input?
20:28 tadzik x3nU: why a class?
20:28 cosimo added String::CRC32 to modules.perl.org just now
20:28 cosimo \o/
20:28 cosimo prereq for Cache::Memcached :)
20:28 tylercurtis rakudo: say ^5 eqv (0..5-1)
20:28 p6eval rakudo 1a5d4a: OUTPUT«1␤»
20:28 x3nU tylercurtis: why?
20:28 x3nU tadzik: dunno, i saw this in many simple modules done like this
20:29 x3nU (yeah, i know i'm lame programmer, my second day with perl 6)
20:29 tylercurtis x3nU: well, you're not using the index, and manual indexing is kinda error-prone.
20:29 tadzik x3nU: come on, stop insulting yourself :)
20:30 tadzik x3nU: http://gist.github.com/505260
20:30 tylercurtis tadzik: s/method/sub/
20:30 tadzik oh, sure
20:31 tadzik fixed-faxed
20:31 avar Who's responsible for http://perlcabal.org
20:31 [particle] x3nU: where do you use 33?
20:31 moritz_ I can fix stuff there
20:31 [particle] i just see it in a comment
20:31 moritz_ (to avar )
20:31 avar hrm, it's just feather now
20:32 moritz_ avar: anything wrong with it?
20:32 avar moritz_: old links like "http://perlcabal.org/syn/S26.html" are broken now, should probably redirect to the canonical synopsis
20:32 _macdaddy joined #perl6
20:32 perlygatekeeper joined #perl6
20:32 avar just noticed it in my own sites (I test outgoing links now), but it might be worthwhile to go through the error log on the server to see if more stuff is broken
20:32 moritz_ avar: yes, I know. I have a local commit that fixes it, currently fighting with pugs svn
20:32 avar whee, cool
20:33 x3nU [particle]: bitwise left shift gives 33
20:33 x3nU tadzik: thanks
20:33 [particle] ah, right-o
20:33 tadzik x3nU: yw
20:38 itz I have to touch "projects.state" but otherwise the proto in star works fine
20:39 smash joined #perl6
20:40 x3nU but what can i do to move subroutine to other namespace
20:40 x3nU Digest::djb2
20:41 x3nU becase i think hash() is common name and can cause problems
20:41 tadzik x3nU: remove is export
20:41 x3nU k
20:41 tadzik oh, but…
20:41 x3nU what?
20:41 tadzik I think Digest::djb2::hash won't work yet
20:41 * szbalint just heard moritz_ swear for the first time!
20:41 tadzik and the workaround is… using class, as You did  :)
20:42 x3nU ;D
20:42 tadzik but check, maybe it works :)
20:42 moritz_ svn: Commit failed (details follow):
20:42 moritz_ svn: Server sent unexpected return value (403 Forbidden) in response to MKACTIVITY request for '/pugs/!svn/act/c5292047-bc​f3-4dce-8001-0878cc47dae1'
20:44 moritz_ has svn over http been disabled?
20:44 DeathAnchor joined #perl6
20:44 smash any news on the YAPC::EU Perl 6 Hackathon ?
20:44 x3nU Can not find sub Digest::djb2::hash in main program body at line 1
20:44 x3nU ;)
20:44 smash (time and place)
20:45 tadzik :(
20:45 moritz_ smash: like, tomorrow after breakfeast
20:45 moritz_ smash: at the venue, either lobby of first floor
20:45 tadzik x3nU: commit revert time then :)
20:46 tadzik but but, haven't you ran your tests before pushing? :P
20:46 smash moritz_: sure, sounds sane
20:46 DeathAnchor hey all, I just dl'ed rakudo, I often use perldoc -f <func> or perldoc <keyword> to read up on things. is there an equivilent resource for perl6/rakudo? even an online wiki/doc location would work for me.
20:46 tadzik DeathAnchor: grok
20:46 tadzik from CPAN, for Perl 6
20:46 x3nU tadzik: of course not ;d
20:46 tadzik * Perl 5
20:46 x3nU also how do i revert (i'm new at git)
20:47 tadzik x3nU: then you deserved this! ahahahaha
20:47 Guest23195 left #perl6
20:47 tadzik x3nU: http://www.kernel.org/pub/softwa​re/scm/git/docs/git-revert.html
20:48 smash moritz_: maybe update the wiki or something with the info ?
20:48 moritz_ smash: yes, when i'm done swearing at svn
20:48 DeathAnchor tadzik: I meant if I want to read about open, in perl5 I would do perldoc  -f open, how would I read about perl6 open?
20:49 smash moritz_: hehe, fair enough
20:49 moritz_ DeathAnchor: you grep the specification :(
20:49 moritz_ smash: NOT FAIR, FREAKIN' NOT WORKING; SIR!
20:49 DeathAnchor are the specs online/
20:49 DeathAnchor ?
20:49 moritz_ http://perlcabal.org/syn/
20:50 DeathAnchor thanks moritz_
20:50 DeathAnchor exactly what I was looking for
20:50 smash moritz_: which svn ?
20:51 moritz_ smash: pugs svn. Can't commit a single thing anymore
20:51 DeathAnchor left #perl6
20:51 smash moritz_: want me to try ?
20:51 [Coke] moritz_: what error are you getting?
20:51 moritz_ smash: works for [Coke]
20:52 moritz_ 403 Forbidden
20:52 [Coke] ok. so, bad creds.
20:52 moritz_ [Coke]: it should ask me for creds if they are not accepted
20:52 moritz_ at least svn always did, before
20:52 moritz_ should it work with http? (as opposed to https)
20:53 [Coke] that was my commit a moment ago.
20:53 [Coke] (on http)
20:53 moritz_ [Coke]: thanks
20:53 [Coke] http://kerneltrap.org/maila​rchive/git/2007/1/15/235895
20:54 [Coke] (which looks like merlyn having a similar issue where he didn't /think/ he was being prompted.)
20:55 [Coke] moritz_: does the auth in your ~/.subversion look right?
20:55 moritz_ [Coke]: yes. I even renamed the folder, so it wouldn't find it, and ask me for another password
20:55 [particle] is the pw rot13?
20:55 moritz_ [particle]: no, plain text
20:56 [particle] ah, i thought they did rot13... checking red-bean
20:56 moritz_ they do double rot-13
20:56 [particle] twice as secure!
20:57 x3nU is there repo for perl6 modules or something like that?
20:57 moritz_ x3nU: we just put them on github, and collect them at modules.perl6.org
20:58 x3nU what should i do to get my module published there?
21:00 * [Coke] thinks it would be nice if we agreed on a standard for "perl6-" vs. not.
21:00 [Coke] (on modules.perl6.org)
21:02 moritz_ x3nU: tell us that it exists
21:02 smash [Coke]: agree
21:02 x3nU define 'us' ;)
21:02 x3nU moritz_: ^
21:03 gfldex us ~~ #perl6
21:03 moritz_ x3nU: somebody with commit access to 'proto'
21:03 gfldex just spam the link to github until somebody gives in :)
21:03 x3nU posted one time already ;d
21:03 ambs joined #perl6
21:03 x3nU http://github.com/xenu/Digest--djb2
21:04 x3nU if knew who has acces it would be nice ;d
21:04 moritz_ hugme: add xenu to proto
21:04 hugme moritz_: You need to register with freenode first
21:04 moritz_ hugme: add xenu to proto
21:04 * hugme hugs xenu. Welcome to proto!
21:04 moritz_ x3nU: you now have commit access
21:05 moritz_ x3nU: please add it to poc-projects.list in the 'pls' branch
21:05 x3nU ok
21:05 gfldex even the sun is responding to R* ! http://science.slashdot.org/story/10/08/02/2028228​/The-Sun-Unleashes-Coronal-Mass-Ejection-At-Earth
21:05 gfldex it's waving :)
21:13 * moritz_ -> out
21:13 pugssvn joined #perl6
21:13 pugssvn r31887 | bbkr++ | [t/spec] tests for RT #69548 .push allows freaky action-at-a-distance in Rakudo
21:13 pugssvn r31888 | bbkr++ | [t/spec] tests for RT #69740 Defining several constants with parentheses
21:13 pugssvn r31889 | moritz++ | [t/spec] test for RT #76792, ** and \w interact badly in regexes
21:13 pugssvn r31890 | coke++ | meaningless commit for moritz_++
21:13 pugssvn r31891 | moritz++ | add "Real World Haskell" to reading list
21:16 x3nU so after commit how much time it will take to publication on site?
21:16 tadzik x3nU: it's updated once an hour, iirc
21:18 Casan joined #perl6
21:30 moritz_ right
21:35 szbalint moritz_++ # hard work for that commit
21:47 masak joined #perl6
21:47 masak lolpisa!
21:47 phenny masak: 06:41Z <tadzik> tell masak the yapsi README says about running 'make', but there is no Makefile. Also big kudos for it, reading the code is an awesome experience
21:47 phenny masak: 12:20Z <szabgab> tell masak I am trying to fix HTML::Tempolate that seems to be totally broken, see you in Pisa
21:48 masak tadzik: oops. thanks. will fix in the blog post; mail is too late. :)
21:48 tommyd joined #perl6
21:56 astrojp joined #perl6
21:56 masak oh, not the announcement; the README. excellent.
22:01 masak hm, wonder if it'd be worth implementing 'goto' early in yapsi? :)
22:01 masak s/worth/worth it/
22:02 pyrimidine left #perl6
22:03 cognominal In grammar actions, I would like  an access to an non existing  reduction to blow on me instead of genrating a proxy, later giving rise to cryptic errors. What do you think?
22:04 masak cognominal: $<subrule> // die "blow!"
22:04 dalek yapsi: b55a18e | masak++ | README:
22:04 dalek yapsi: [README] belatedly updated
22:04 dalek yapsi: No longer running alpha; no longer has a Makefile (use ufo); regressed
22:04 dalek yapsi: on the use-before-declaration thing.
22:04 dalek yapsi: review: http://github.com/masak/yapsi/commit/b5​5a18e221f78d96ad8a9a96efa99b890b90d9b2
22:06 tri1 left #perl6
22:07 masak szabgab: yes, HTML::Template is from the alpha days.
22:07 cognominal masak, yes, but a typo happens so easily.
22:07 masak szabgab: we should probably not use it much, but instead focus on projects such as Hitomi.
22:07 masak cognominal: if you typo the 'subrule' key, it'll die too, so that's OK.
22:09 cognominal no, my point is that it does not die immediately but generates a Proxy.
22:09 brennen joined #perl6
22:09 jaldhar joined #perl6
22:13 gbacon joined #perl6
22:14 cognominal good night.
22:16 oha joined #perl6
22:21 masak cognominal: not dying is by spec. that goes for all hash-like things, just like in p5.
22:22 masak cognominal: generating a Proxy object is not spec.
22:23 jhuni joined #perl6
22:25 vpm joined #perl6
22:29 d4rt joined #perl6
22:43 risou joined #perl6
22:49 ruoso joined #perl6
23:13 Casan what is the p6 equivalent to system in p5 ?
23:13 masak Casan: run
23:14 masak 'night
23:23 whiteknight joined #perl6
23:25 avuserow rakudo: print join " 1 ", grep {$_ % 2 == 1}, 1 .. 10;
23:25 p6eval rakudo 966797: OUTPUT«1 1 3 1 5 1 7 1 9»
23:25 avuserow rakudo: (1 .. 10).grep(*%2).join(" 1 ").print;
23:26 p6eval rakudo 966797: OUTPUT«1 1 3 1 5 1 7 1 9»
23:26 avuserow rakudo: ((1 .. 10) Z (1 XX *)).grep(*%2).print;
23:26 p6eval rakudo 966797: OUTPUT«11»
23:26 avuserow rakudo: ((1 .. 10).grep(* % 2) Z (1 XX *)).print;
23:27 p6eval rakudo 966797: OUTPUT«113Whatever()<0x736fcb0>»
23:27 avuserow rakudo: (((1 .. 10).grep(* % 2)) Z (1 XX *))).print;
23:27 p6eval rakudo 966797: OUTPUT«===SORRY!===␤Confused at line 22, near ").print;"␤»
23:27 avuserow I'm confused too.
23:27 rcfox Too many close parens.
23:28 avuserow rakudo: (1 XX *).elems.say
23:28 rcfox rakudo: (((1 .. 10).grep(* % 2)) Z (1 XX *)).print;
23:28 p6eval rakudo 966797: OUTPUT«1␤»
23:28 p6eval rakudo 966797: OUTPUT«113Whatever()<0x73ed000>»
23:28 avuserow rakudo: (1 X *).elems.say
23:28 p6eval rakudo 966797: OUTPUT«1␤»
23:28 avuserow okay, how do I get an infinite list again?
23:29 sorear 1 xx *
23:31 avuserow rakudo: (1 .. 10.grep(*%2) Z 1 xx *).perl.say
23:31 p6eval rakudo 966797: OUTPUT«()␤»
23:32 avuserow rakudo: ((1 .. 10).grep(*%2) Z (1 xx *)).perl.say
23:32 p6eval rakudo 966797: OUTPUT«(1, 1, 3, 1, 5, 1, 7, 1, 9, 1)␤»
23:32 avuserow rakudo: (^10.grep(*%2) Z (1 xx *)).perl.say
23:32 p6eval rakudo 966797: OUTPUT«()␤»
23:32 avuserow rakudo: ((^10).grep(*%2) Z (1 xx *)).perl.say
23:32 p6eval rakudo 966797: OUTPUT«(1, 1, 3, 1, 5, 1, 7, 1, 9, 1)␤»
23:33 avuserow rakudo: (^10).grep(*%2).join(' 1 ').say
23:33 p6eval rakudo 966797: OUTPUT«1 1 3 1 5 1 7 1 9␤»
23:35 avuserow I love the whatever star. :)
23:37 astrojp left #perl6
23:41 dju joined #perl6
23:44 dju joined #perl6
23:58 Psyche^ joined #perl6

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

Perl 6 | Reference Documentation | Rakudo