Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2010-08-01

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 Ken-Guru i don't like installs ...
00:00 Ken-Guru :D
00:00 jnthn Ken-Guru: huh...
00:00 jnthn Well, uninstall is just in Add/Remove programs.
00:01 pmichaud exodist: if there is one, it'd be on perl6.org somewhere.
00:01 gfldex exodist: http://www.perlfoundation.org/per​l6/index.cgi?perl_6_index_tablet
00:01 sorear Why is it called Add/Remove programs if removing is the more important thing it does?
00:01 jnthn sorear: Why do I have to click the "Start" button to shut down? :-)
00:02 Ken-Guru 2(jnthn2): jupp. the linux way its ok. but having only used windows all life long its annoying ;-) ... you know this damn little thing called registry. uargh....
00:02 gfldex little? :->
00:02 Ken-Guru japp, thats the problem.
00:03 exodist gfldex, well there goes my plan to make one :-P thanks
00:03 gfldex exodist: you might want to extend it
00:04 Ken-Guru never the less i'm a little win adict. don't ask me why, i don't know.
00:04 pmichaud exodist: we can always use more guides or improvements to existing ones.
00:07 exodist What I really want to write is a perl5 equivilent in perl6 topic guide, example topic: *Other::Package = sub { ... }, then how to do it in perl 6.
00:09 sorear exodist: that's the hard way.  The easy way, in perl 5 and perl 6, is our sub Other::Package { ... }
00:09 sorear the hard way in p6 is &Other::Package := sub { ... } btw
00:10 exodist sorear, our sub Other::Package { ... }, does that really work in  perl5? I have never seen it done..
00:11 exodist sorear, that specific topic is because I want to write a module that exports subs from other modules into the module that usus it, like a bunile if you will.
00:11 exodist use A; # like use B; use C; use D;
00:11 exodist *budle
00:12 exodist *bundle damnit
00:12 exodist *and uses
00:18 masak listen up, #perl6 -- I haz a challenge for you.
00:18 masak I just pushed http://github.com/masak/yapsi/b​lob/master/doc/announce/2010.08
00:18 waste sorear: thank you
00:19 masak please help fill in the blanks for tomorrow's realease. it's not hard. anyone can help.
00:19 masak if you're unsure about the desired tone, look at previous announcements.
00:19 jnthn masak: lol!!
00:19 masak large amounts of silliness are encouraged. thank you.
00:19 jnthn I never suspected there was a template!
00:19 masak there wasn't until just now :)
00:20 Axord joined #perl6
00:20 masak I reserve the right to push things around a bit to keep people like jnthn on edge :P
00:21 jnthn Damm...only slightly inappropriate? I can only think of wildly inappropriate things.
00:22 dalek yapsi: 4051102 | masak++ | doc/announce/2010.08:
00:22 dalek yapsi: [doc/announce/2010.08] added
00:22 dalek yapsi: This is but a template, with several blanks needing to be filled in. You
00:22 dalek yapsi: can help!
00:22 dalek yapsi: review: http://github.com/masak/yapsi/commit/40​5110206806db4c13e77a1bfb54b9c041c3f3b2
00:22 masak it should be somewhere between "nodnod, he's happy about announcing stuff" and "eeh, can you really say that... in a release announcement?" :)
00:27 jnthn ooh, I wonder what satisfaction will be at those URLs!
00:27 masak nono, it's "Get Satisfied!". Mr Satisfied has escaped from the local prison, you see.
00:28 jnthn Oh noes!
00:28 dalek yapsi: 2c149f4 | masak++ | doc/announce/2010.08:
00:28 dalek yapsi: [doc/announce/2010.08] fixed petty typo
00:28 dalek yapsi: review: http://github.com/masak/yapsi/commit/2c​149f45125f05296c6557624becea47a1112277
00:29 pmichaud masak: are you giving a talk on yapsi?
00:29 waste rakudo: $:a; say "alive";
00:29 p6eval rakudo 9b6189: OUTPUT«Lexical '$a' not found␤  in main program body at line 2:/tmp/jfcE3Mi3Tt␤»
00:30 jnthn At YAPC?
00:30 masak pmichaud: no. maybe I should lightning-mention it.
00:30 pmichaud yes, of course :)
00:30 pmichaud I was thinking it deserves a lightning talk :)
00:30 jnthn masak: I think you should dedicate these release to Europe.
00:30 masak (because it's so blazingly fast)
00:31 jnthn *this
00:31 masak jnthn: "this release is dedicated to Europe, because it was written, well, inside it"
00:31 pmichaud I really should see if I can come up with a good hack talk for rakudo/nqp
00:32 masak jnthn: "you're free to call this release 'Europe' if you want. of course, you're free to call this release 'Johann Sebastian Bach' too, if that floats your boat"
00:32 pmichaud can I call it "The Village People"?
00:32 jnthn Not until it can run...the ASCII dance code...
00:32 pmichaud "Culture Club"?
00:32 masak you can call it "The Village People With a Pope Hat"...
00:33 pmichaud "Wham!"?
00:33 pmichaud "The release formerly known as Yapsi"?
00:33 masak "Wham Sebastian Bach"
00:34 masak jnthn: just for you, I can introduce a special SIC opcode that does the ASCII dance... :P
00:34 jnthn "Run-time DMC"
00:35 avuserow We can ASCII Dance if we want to.
00:36 masak It's my party and I ASCII Dance if I want to.
00:37 masak jnthn: "this release is dedicated to Europa, the famous Jupiter moon, for its unyielding support of Perl 6"
00:41 masak see you at YAPC::Europa!
00:42 * masak waves a translucent tentacle
00:42 * masak decides to regenerate for a while
00:42 masak 'night, #perl6
00:51 linz joined #perl6
00:53 kthakore moritz_: ping?
01:01 Axord joined #perl6
01:17 xinming joined #perl6
01:17 sorear exodist: I don't think rakudo implements this yet, but you shound use be able to do use Other::Module :EXPORT<:ALL>;
01:20 LaVolta joined #perl6
01:22 jnthn nqp: loop { }
01:22 p6eval nqp: OUTPUT«Confused at line 1, near "loop { }"␤current instr.: 'parrot;HLL;Grammar;panic' pc 552 (src/cheats/hll-grammar.pir:205)␤»
01:32 sorear I guess the binder overhaul needs to be a priority. :(
01:44 hugme joined #perl6
01:47 orafu joined #perl6
01:57 flup joined #perl6
02:09 edgar joined #perl6
02:09 edgar hi, is anybody still awake?
02:09 sorear "still"?
02:09 jnthn Depends on your definition of awake. :-)
02:09 sorear this is a global channel.
02:09 edgar in the netherlands it is 4 o'clock in the morning
02:10 edgar but you are probably in the VS.
02:10 jnthn Yay stroopwafelland!
02:10 sorear I'm in the US, jnthn is in Iceland
02:10 jnthn sorear: Sweden!
02:10 jnthn :-)
02:10 sorear well you move every two weeks
02:10 jnthn Slight exaggeration. :P
02:10 edgar Yeah, we have them here. The same timezone in Sweden probably.
02:10 jnthn But you ahve a point. :-)
02:11 jnthn edgar: Yes. :-)
02:11 jnthn edgar: I visit NL now and then. :-)
02:12 edgar It is a good country Sweden. Not too warm. I will move to there at one day. It is 27 degrees here.
02:12 TiMBuS joined #perl6
02:12 jnthn Uff, that's too hot.
02:13 edgar I had a question about perl6. I try to implement some monads. I think Roles are suitable to replace typeclasses. But how do I access a simple attribute?
02:14 edgar It is too hot for this place. But we have a heat wave at the moment.
02:14 jnthn As in, if you declare role Foo { has $!bar }, how do get at $!bar?
02:14 jnthn *to
02:14 jnthn Or maybe show me an example of what you're trying to do and how it's not working...
02:15 edgar No, more like if you declare class Just is Maybe (which has role Monad) { has $.a ... }
02:16 edgar Maybe is a role too. Just is a class, and Nothing is a class
02:16 jnthn If you're adding a role to a class, you'd normally use "does" rather than "is"
02:17 jnthn "is" is for inheritance rather than role composition.
02:17 flup A thanks. I didn't know that.
02:18 edgar The webclient didn't work very well, so I switched to irssi. But it seems to work.
02:19 jnthn You can do "is" with a role but really it means "I want to generate a class that does the role and inherit from that class". So it gives you rather different semantics (especially with regard to attribute visibility).
02:23 Italian_Plumber joined #perl6
02:24 flup That sounds strange: I want to generate a class that does the role and inherit from that class. It is certainly not what I mean. Is there a good book on perl6 yet?
02:25 jnthn flup: Various of us are working on one, at http://github.com/perl6/book/
02:25 jnthn flup: The roles coverage ain't great yet though. :-(
02:26 jnthn flup: http://svn.pugscode.org/pugs/docs/Perl6/​Spec/S14-roles-and-parametric-types.pod is the spec on roles
02:26 jnthn It's a little terse in places, but has many of the details on how stuff works.
02:26 flup Oh that is ok. I will figure it out. I am reading the apocolyps on that one.
02:27 flup tnx. I am from haskell, are Roles a bit similiar to type classes?
02:28 jnthn I'm not familiar enough with Haskell to really know, sorry.
02:28 jnthn I've heard people talk about them as having some similarities.
02:28 jnthn But I'm not sure how deep they go.
02:29 flup They are. A typeclass is sort of a interface.
02:30 jnthn A role is sort of an interface too, but can carry a default implementation.
02:30 jnthn But if those are all stubs, then they become requirements, so it degenerates to an interface (in the Java-y sense of interface)
02:31 flup A typeclass can have a default implementation too, so I think they are quite similiar.
02:32 flup One of the first implementations of perl6 was written in haskell, I think they used some of the ideas there
02:33 flup But haskell doesn't have the hyper oprators
02:33 flup I like those
02:34 flup Too drunk to program, time too sleep. Thanks for the links. I will be able to produce something now.
02:35 flup goodnight
02:35 cxreg hvae you considered reading about Moose?
02:35 flup Moose>
02:35 flup ?
02:35 cxreg there's more docs on that, and the concepts are very similar
02:35 cxreg Moose is a project that implemented a good bit of perl 6's object model on perl 5
02:35 jnthn flup: Goodnight, and do return and let us know how you get on. :-)
02:35 jnthn flup: Oh, and hope you were drinking something good. :P
02:37 flup I will look at it, i am using perl5 at work sometimes. So it maybe useful. I will post something, if I get somewhere.  Lol, just beer. But not the alcoholic type of beer. So it was good.
02:38 jnthn :-)
02:39 flup bye, and have a nice night/day, where ever you are.
02:40 jnthn night o/
03:00 mmmpork joined #perl6
03:11 * jnthn -> sleep
03:26 isBEKaml joined #perl6
03:26 isBEKaml hi #perl6! :)
03:27 whee hola
03:30 Guest46026 joined #perl6
03:33 sorear Hello!
03:34 isBEKaml (backlogging) offerkaye was probably confused by my message. I merely pointed him to another location for u4x docs (link is not shown on perl6.org, though)
03:51 araujo_ joined #perl6
03:52 jaldhar joined #perl6
03:52 frooh hey guys, for some reason a coderef is saying I passed it too many arguments;
03:52 frooh I'm passing it a single string
03:52 frooh but it says I passed it *two* things
03:53 frooh I'm not even really sure how to debug this
03:53 araujo joined #perl6
03:53 frooh I'll nopaste the code to see if anyone has any ideas
03:53 snarkyboojum joined #perl6
03:53 snarkyboojum left #perl6
03:54 frooh http://paste.scsys.co.uk/47435
03:55 snarkyboojum joined #perl6
03:59 snarkyboojum joined #perl6
04:00 gfx joined #perl6
04:02 snarkyboojum left #perl6
04:02 snarkyboojum joined #perl6
04:05 snarkyboojum left #perl6
04:05 sorear frooh: the error is occuring at $.coderef("...")
04:05 sorear frooh: this is short for self.coderef("...")
04:06 snarkyboojum joined #perl6
04:06 sorear frooh: which is short for (self.^!GET-METHOD("coderef"))(self, "...")
04:06 sorear frooh: the coderef method only wants one argument.  you passed it two.
04:06 sorear frooh: the correct code is $.coderef.("...")
04:07 TiMBuS which causes another problem
04:07 TiMBuS invoke() not implemented in class 'Any'
04:07 frooh huh
04:07 frooh ok then :-)
04:07 frooh and yeah
04:07 frooh TiMBuS: got the next error
04:08 frooh sooo... is there soemthing else I can do?
04:08 TiMBuS $.coderef.WHAT is Any. I have no idea
04:10 frooh star: class Foo { has Code $.bar; method callbar { $.bar.() } }; my $x = Foo.new( bar => sub { say "lolz" } ); $x.callbar;
04:10 p6eval star 2010.07: OUTPUT«lolz␤»
04:10 frooh fjdkls;a
04:10 TiMBuS :|
04:10 frooh star: class Foo { has Code $.bar; method callbar { $.bar.() } }; my $x = Foo.new( bar => sub { say "$^a" } ); $x.callbar('shucks howdy');
04:11 p6eval star 2010.07: OUTPUT«Too many positional parameters passed; got 2 but expected 1␤  in 'Foo::callbar' at line 22:/tmp/PTbpFFa8y_␤  in main program body at line 22:/tmp/PTbpFFa8y_␤»
04:11 frooh star: class Foo { has Code $.bar; method callbar($x) { $.bar.($x) } }; my $x = Foo.new( bar => sub { say "$^a" } ); $x.callbar('shucks howdy');
04:11 p6eval star 2010.07: OUTPUT«shucks howdy␤»
04:11 masonkramer joined #perl6
04:11 frooh well then.
04:11 frooh and I can't seem to be able to .perl.say coderefs
04:12 frooh and I can't seem to be able to .perl.say coderefs
04:12 frooh woops, sorry
04:16 waste Any is not a coderef;
04:17 frooh waste: agreed.  but sub {...} should be
04:17 frooh and that's what I passed in
04:17 waste the assignment does not work for some reason
04:17 TiMBuS passing in anything makes it an Any
04:17 TiMBuS setting it to a sub in BUILD does not set it
04:17 frooh so I need to set it... after construction?
04:17 frooh it worked above in the chat right?
04:18 TiMBuS i guess so
04:18 TiMBuS strange bug
04:18 frooh now it says it's readonly
04:18 frooh did I unknowingly make it ro?
04:19 TiMBuS i think they're ro by default
04:19 frooh well then
04:19 frooh bizarre
04:19 frooh that fixes it indeed
04:20 TiMBuS yep yep
04:20 TiMBuS the bug might be triggered by your add_method use..
04:21 frooh I wonder..
04:22 frooh ok
04:22 frooh so it looks like it's my BUILD
04:22 frooh when I leave coderef out of the signature, it doesn't get passed in
04:22 frooh I thought that if you left something out it would automaticaly handle it
04:25 TiMBuS but i set $.coderef inside BUILD and it still didnt work
04:25 TiMBuS plus the default should still be set?
04:27 frooh TiMBuS: no, I set it and it wroks
04:27 frooh well, yeah, something's wrong there for sure
04:28 frooh but if I add :$coderef to BUILD and do $.coderef = $coderef it works
04:28 waste rakudo: class X { has Code &.c = sub (*@_) { @_ }; submethod BUILD () {nextsame} }; say X.new.c.(1)
04:28 p6eval rakudo 9b6189: OUTPUT«1␤»
04:28 frooh so I neext to nextsame in build?
04:29 TiMBuS .. oohhh
04:29 waste for the automatic behavior
04:29 frooh hm.
04:30 frooh I'm too used to Moose I guess
04:30 frooh so now I am getting an arror about .is-debug not being a method on invocant Str
04:31 frooh but when I do .perl.say to the object
04:31 frooh it's clearly not a Str
04:34 araujo joined #perl6
04:39 araujo joined #perl6
04:39 frooh dangit
04:39 frooh invoke not implemented on resizable pmcarray
04:41 frooh *facepalm*
04:43 * frooh wonders why rakudo thinks that his object is a Str
04:44 plobsing joined #perl6
04:47 frooh man, I don't know what I changed, but now it works
04:47 frooh it's like those times when your pc won't work and you take it apart and put it back together and it works again
04:53 waste for the record; S12:"Whether you write your own BUILD or not, at the end of the BUILD, any default attribute values are implicitly copied into any attributes that haven't otherwise been initialized."
04:54 adhoc left #perl6
04:56 frooh so it *should* have worked then
04:56 waste frooh: i agree
04:56 frooh I thought I read that
04:57 alester joined #perl6
04:58 alester My rakudo won't build and I am sad.
04:59 alester the make wants to "cd rakudo" and there is no rakudo dir
05:20 araujo joined #perl6
05:25 wooden joined #perl6
05:25 wooden joined #perl6
05:37 sorear Given: sub foo($x, $y) { ... }
05:37 sorear Is this legal? : foo(:y(42), 24)
05:43 pmichaud sorear: yes, it's legal.
05:43 pmichaud star:  sub foo($x, $y) { say "$x, $y"; };   foo(:y(42), 24);
05:43 p6eval star 2010.07: OUTPUT«24, 42␤»
05:52 plol joined #perl6
05:52 snarkyboojum joined #perl6
05:53 kevinspacey joined #perl6
05:54 snarkyboojum left #perl6
05:55 sawyer_ joined #perl6
05:55 sorear star: sub foo($x, $y) { say "$x, $y"; };   foo(:y(42), 24, 12);
05:55 p6eval star 2010.07: OUTPUT«Too many positional parameters passed; got 2 but expected 2␤  in 'foo' at line 22:/tmp/y1CyhO3Lur␤  in main program body at line 22:/tmp/y1CyhO3Lur␤»
05:55 frooh star: sub foo($x, $y, $z) { say $z }; foo(1,2,3); my @bar = <a b c>; foo(@bar);
05:55 isBEKaml rakudo: my $num = 2000; my $foo = ($num ~~ /^(\d{2}+)/); $foo.say;
05:56 sorear that is a lovely error message.
05:56 p6eval star 2010.07: OUTPUT«3␤Not enough positional parameters passed; got 1 but expected 3␤  in 'foo' at line 22:/tmp/VNveUUMpQJ␤  in main program body at line 22:/tmp/VNveUUMpQJ␤»
05:56 p6eval rakudo 9b6189:  ( no output )
05:56 frooh star: sub foo($x, $y, $z) { say $z }; my @bar = <a b c>; foo(*@bar);
05:56 p6eval star 2010.07: OUTPUT«===SORRY!===␤Unable to parse postcircumfix:sym<( )>, couldn't find final ')' at line 22␤»
05:56 frooh how do I make @bar "explode" (as a rubyist would say) into three params?
05:56 sorear isBEKaml: \d{2}+ is a pretty useless pattern
05:56 sorear frooh: |@bar
05:56 isBEKaml gee, that went into  a loop in my machine. :D
05:57 frooh star: sub foo($x, $y, $z) { say $z }; my @bar = <a b c>; foo(|@bar);
05:57 p6eval star 2010.07: OUTPUT«c␤»
05:57 isBEKaml sorear: I just wanted to see what happens when I throw it out to rakudo. :)
05:57 frooh excallent
05:57 frooh excellent*
05:57 sorear isBEKaml: {2} is an embedded block, it matches the null string while evaluating 2 in void context
05:57 snarkyboojum joined #perl6
05:57 sorear isBEKaml: {2}+ matches the null string infinitely many times
05:58 sorear you know what
05:58 isBEKaml sorear: right, yes.
05:58 sorear this would be trivial to add a warning for
05:58 * frooh thinks that this module is going to be less useful than it was in perl 5, due to the complexity of subroutine signatures
05:58 * sorear does so
05:59 isBEKaml sorear++
05:59 isBEKaml exactly what I wanted to see.
06:00 snarkyboojum left #perl6
06:01 frooh star: say 1 if <foo bar baz> ~~ <foo bar biff>; say 2 if <foo bar baz> ~~ <foo bar baz>;
06:01 p6eval star 2010.07: OUTPUT«2␤»
06:02 frooh is there a more succinct way to do:
06:02 frooh oh wait
06:03 frooh star: $f = sub { say @_[1] }; $f.(1,2,3);
06:03 p6eval star 2010.07: OUTPUT«===SORRY!===␤Symbol '$f' not predeclared in <anonymous> (/tmp/bbMCfz3_Si:22)␤»
06:03 frooh star: my $f = sub { say @_[1] }; $f.(1,2,3);
06:03 p6eval star 2010.07: OUTPUT«2␤»
06:03 frooh perfect
06:04 Khisanth joined #perl6
06:09 snarkyboojum joined #perl6
06:09 frooh star: my @foo = (sub { say wantarray })();
06:09 p6eval star 2010.07: OUTPUT«Could not find sub &wantarray␤  in <anon> at line 22:/tmp/YyBEPB9nms␤  in main program body at line 22:/tmp/YyBEPB9nms␤»
06:10 frooh is there a wantarray distinction in perl 6?
06:11 sorear no
06:11 sorear in Perl 6, functions are not context sensitive; the values themselves are
06:14 frooh interesting..
06:15 frooh but that means that *somewhere* down the line it has to get decided
06:15 isBEKaml frooh: you can have a look at S08
06:15 * frooh pulls that up
06:15 finanalyst joined #perl6
06:15 Alias_ joined #perl6
06:17 * frooh needs to just re-read all the Synopses
06:18 finanalyst if I create a class XX, is there a way to associate a constant (eg 'a') with that class? eg., XX('a') or XX::'a', though neither of these seem to be right.
06:19 kevinspacey left #perl6
06:21 sorear it's not working...
06:21 finanalyst or say I want a constant (eg. 1) to be explicitly Rat rather than Int?
06:21 sorear <1/1>
06:21 sorear I don't think there's a general mechanism
06:21 sorear 1.Rat may work
06:23 pmichaud eventually, Rat(1)
06:23 pmichaud 1.Rat ought to work
06:23 pmichaud star:  say 1.Rat.perl
06:23 p6eval star 2010.07: OUTPUT«1/1␤»
06:24 pmichaud 1.0 also produces a Rat, iirc
06:24 pmichaud star:  say 1.0.WHAT
06:24 p6eval star 2010.07: OUTPUT«Rat()␤»
06:24 melte why is it called Rat
06:26 LaVolta rational?
06:26 pmichaud rational, yes.
06:26 melte ...that would make sense
06:27 pmichaud and trying to preserve the 3-character names for many of the scalar builtins
06:27 pmichaud i.e.,   Any  Int Str Num    etc.
06:37 goksie joined #perl6
06:39 finanalyst can this be extended to subtypes, eg. odd integers?
06:39 snearch joined #perl6
06:46 avuserow star: say 1.can(0)
06:46 p6eval star 2010.07: OUTPUT«␤»
06:46 Guest23195 joined #perl6
07:01 goksie joined #perl6
07:02 drrho joined #perl6
07:07 redicaps joined #perl6
07:07 goksie joined #perl6
07:21 Su-Shee joined #perl6
07:22 snarkyboojum left #perl6
07:22 isBEKaml is there an equivalent of rounding to Int here?
07:23 isBEKaml rakudo: (82/4).say
07:23 p6eval rakudo 9b6189: OUTPUT«20.5␤»
07:23 isBEKaml rakudo: (82/4).Int.say
07:23 snarkyboojum joined #perl6
07:23 p6eval rakudo 9b6189: OUTPUT«20␤»
07:27 sorear isBEKaml: your warning is in.
07:27 sorear std: /x{2}+/ # I wonder if p6eval has updated yet
07:27 p6eval std 31883: OUTPUT«ok 00:01 115m␤»
07:31 isBEKaml sorear: great! p6eval in the middle of build?
07:32 isBEKaml rakudo: (200 ~~ /^\d{2}+/).say
07:33 p6eval rakudo 9b6189:  ( no output )
07:33 isBEKaml std: /\d{2}+/
07:33 p6eval std 31883: OUTPUT«ok 00:01 115m␤»
07:33 sorear isBEKaml: p6eval doesn't actually pay attention to pushes.  It rebuilds once an hour regardless of activity.
07:33 isBEKaml sorear: ok.
07:35 jfried joined #perl6
07:36 Ross joined #perl6
07:38 isBEKaml Can anyone tell me how I can speed this up ? http://gist.github.com/503068
07:43 sorear lose the my Int
07:44 sorear type constraints require a run-time type check
07:44 sorear on second thought, so does my == my Any
07:44 sorear nevermind
07:45 sorear lines 44 and 46 should use := to avoid duplicating the hash
07:46 sorear 56 is quite ugly,  Just do it incrementally
07:46 isBEKaml I'm initialising the hash everytime in the block
07:46 isBEKaml incrementally as in?
07:47 sorear $count++ if $days-so-far %% 7;  $days-so-far += $days-this-month;
07:48 wamba joined #perl6
07:49 isBEKaml we are just getting the first of every month in a given year. so I don't think the second statement is necessary.
07:49 isBEKaml yeah,  I could do include the first one. :)
07:50 finanalyst left #perl6
07:51 sorear isBEKaml: if you do the second one, then almost all of the rest of your code becomes unneccessary.
07:53 isBEKaml sorear: oh, boy... I was simply replicating the algorithm shown here: http://en.wikipedia.org/wiki/C​alculating_the_day_of_the_week
07:53 isBEKaml :/
07:54 isBEKaml sorear: I think you're doing it based on every 7th day. in 100 years, there will be around 25 leap years. It doesn't seem to factor leap years.
07:55 isBEKaml sorear: if Sunday is taken to be 0, then every 7th day is a Sunday. On that cound, we could simply do 1200/7 and strike gold. :)
07:56 isBEKaml sorear: the above is because, this is exactly in the same century. if the 100 years were in different centuries, like say: 1905 - 2004, this would not work.
07:56 kjeldahl joined #perl6
07:56 kjeldahl_ joined #perl6
07:57 Mowah joined #perl6
07:58 sorear http://pastie.org/1069380 is my solution
07:58 sorear outputs 170 after ~30 seconds
07:59 isBEKaml sorear: mine shows 171 which is taken as the right answer.
07:59 sorear 18 seconds by time
08:01 isBEKaml Infix !% is deprecated in favor of infix %% at line 9, near " 7) && ($y"
08:01 isBEKaml this is what I get here when I run yours..
08:02 sorear I'm running a rakudo from before the spec change
08:02 isBEKaml oh..
08:04 molaf joined #perl6
08:06 tommyd joined #perl6
08:09 isBEKaml std: /\d{2}+/
08:09 p6eval std 31884: OUTPUT«[31m===[0mSORRY![31m===[0m␤Unsupported use of {2} as general quantifier; in Perl 6 please use X**2 at /tmp/nNrb9w8G7c line 1:␤------> [32m/\d{2}[33m⏏[31m+/[0m␤Check failed␤FAILED 00:01 115m␤»
08:09 isBEKaml sorear++ :)
08:12 [1]Casan joined #perl6
08:15 avuserow joined #perl6
08:20 wamba left #perl6
08:21 wamba joined #perl6
08:21 wamba left #perl6
08:21 isBEKaml joined #perl6
08:24 wamba joined #perl6
08:28 envi^home joined #perl6
08:28 isBEKaml sorear: I found an off-by-one error in your code: my $sofar = 0; # a Monday in Jan 1900
08:28 isBEKaml this works in producing 171 which is taken as the right answer on projecteuler.
08:31 isBEKaml sorear: thank you and I really need to go back to books to prevent myself from writing bloated code. :)
08:32 Tom__ joined #perl6
08:35 maasj joined #perl6
08:37 maasj left #perl6
08:37 masak joined #perl6
08:37 masak oh hai, #perl6!
08:38 isBEKaml masak! :)
08:38 isBEKaml masak: aren't you at yapc yet?
08:39 masak isBEKaml: will be flying down there tomorrow.
08:39 masak isBEKaml: I'm only at Yapsi so far :P
08:39 isBEKaml masak: xD. So how's that coming through?
08:40 masak well, I once again extend my challenge from yesterday; help me fill in the release announcement for today \o/
08:41 isBEKaml I just found that I can't  write code. :|
08:41 masak http://github.com/masak/yapsi/b​lob/master/doc/announce/2010.08
08:41 masak I haven't backlogged, so I don't know how many submissions I've reveived.
08:42 masak I got one via email so far. :)
08:42 isBEKaml :)
08:43 masak from someone I can't map to a nick -- exciting!
08:43 isBEKaml no pull requests.
08:44 isBEKaml_ joined #perl6
08:48 avuserow joined #perl6
08:50 masak re how it's going with the Yapsi refactor: the runtime is Mostly Done. I need to equip it with binding so we don't need to regress on a feature. I think I might be able to do binding better than last time.
08:50 masak then I basically need to write a new parser. I should be able to take the old parser and write new action methods for it.
08:51 isBEKaml_ are we still going through the lex scopes in a tree like pattern? [parent->child]
08:51 masak yes.
08:51 masak but the new runtime has a direct link to a scope and the correct variable in that scope.
08:52 masak so the lookup part has been pushed back to compile-time, which is a win.
08:52 isBEKaml_ I see.
08:54 avuserow joined #perl6
08:58 sorear isBEKaml: um, what?  0 is sunday, how can 0 possibly be right
08:58 meppl joined #perl6
08:59 isBEKaml_ sorear: that's what we want. count of all sundays.
08:59 sorear isBEKaml_: $sofar % 7 is the "current" day of the week.  Before the big loop, it's 1 Jan 1900; didn't the comment say it was Monday?
09:01 isBEKaml joined #perl6
09:02 sorear isBEKaml_: $sofar % 7 is the "current" day of the week.  Before the big loop, it's 1 Jan 1900; didn't the comment say it was Monday?
09:02 sorear hello masak!
09:02 masak sorear: hi!
09:02 masak sorear: today is release day. :)
09:02 sorear Anything new happen to yapsi?
09:03 masak well, I wrote this new runtime in the beginning of July.
09:04 masak its chief trait is that it handles `my $a = 2; while --$a { say my $b; $b = 42 }` correctly.
09:04 LaVolta rakudo: my Int @nums = 1 .. 10;
09:04 masak (the current runtime doesn't)
09:04 p6eval rakudo 9b6189:  ( no output )
09:06 LaVolta rakudo: my @nums = 1 .. 10;
09:06 p6eval rakudo 9b6189:  ( no output )
09:06 LaVolta rakudo: my @nums = 1 .. 10; @nums.perl.say
09:06 p6eval rakudo 9b6189: OUTPUT«[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]␤»
09:07 sorear LaVolta: why do you torment our poor p6eval so
09:07 LaVolta sorear:  sorry if I did something wrong
09:08 LaVolta i got "maximum recursion depth exceeded" for my first paste
09:08 avuserow joined #perl6
09:09 sorear LaVolta: right.  it's listed as the 3rd not working item in the rakudo star "don't even bother to try this" list
09:10 LaVolta oh my my my ... it's all my fault, my bad
09:10 sorear I know p6eval has resource limiters installed, but I'd still like to steer people away from running infinite loops on it
09:10 sorear maybe this is pointless and it really does no harm.
09:10 LaVolta sorry, I will stop doing those things...
09:11 masak I'm more worried about people who try to get into the file system of the host computer.
09:11 masak breakfast nom &
09:11 sorear oops.  I'm not *trying* to scare you
09:12 alinbsp joined #perl6
09:12 rurban joined #perl6
09:12 rhebus joined #perl6
09:12 LaVolta let's do that to our local copy...
09:12 LaVolta instead
09:12 rurban The rakudo-star tests do nothing. prove -e ./perl6 -r modules/<name>/t eh? "for d in modules/*; do cd $d; test -d t && test -d lib && (cd lib; prove -e perl6 -r ../t); cd ${B}; done" comes close. How to add -Ilib to perl6?
09:12 isBEKaml sorear: well, yeah. I have modified your code - the problem asked for number of sundays that fall on the first of the month in years 1901 to 2000. So...
09:12 rurban @*INC is ~/.perl6/lib /usr/lib/parrot/2.6.0/languages/perl6/lib and ., but we need lib to be able to test a module before installing it...
09:13 Ross joined #perl6
09:13 sorear isBEKaml: yes, but the problem description doesn't give us the weekday for 1 Jan 1901
09:13 sorear it gives us the weekday for 1 Jan 1900
09:13 sorear so I do the first year, but without updating $sundays
09:16 isBEKaml sorear: right. so, I modified days-so-far to point to 1 Jan 1901 and iterated from 1901 to 2000.
09:17 * isBEKaml can't code.. :(
09:18 sorear pugssvn, where art thou
09:19 isBEKaml lying dormant on feather. :D
09:19 isBEKaml .oO(sleeping under the feather)
09:21 ReiniUrban joined #perl6
09:24 rurban rakudo-star test results http://nopaste.snit.ch/22503
09:27 szabgab is there any %*ENV or similar in Rakudo?
09:28 rurban Well I would need a PERL6LIB env
09:36 tadzik joined #perl6
09:39 tadzik morning #perl6
09:40 masak szabgab: yes. it's spelled like you guessed -- %*ENV
09:40 masak far as I know, it works.
09:41 rurban Ok, PERL6LIB works okay, patch coming in my github star fork
09:41 tadzik hmm, what's so awesome about rakudo alpha that some thing still need it?
09:43 masak tadzik: hardly anything nowadays. but that's changed in the last month or so.
09:44 masak tadzik: two things are holding me back with certain projects: (a) inertia. (b) it's kinda nice to code against something that doesn't change all the time :)
09:44 tadzik I see that YAPSI needs alpha, IIRC november too.
09:44 masak correct.
09:44 tadzik inertia?
09:44 masak fixing the former omission today. :)
09:44 tadzik oh, ok
09:45 masak inertia is the property of large objects not to be easily moved.
09:45 isBEKaml masak: technically correct, but useless answer. :P
09:45 rurban For pmichaud: http://github.com/rurban/star/commit/cd​af08224062da632bbb66434a159233eac97ea5
09:45 masak isBEKaml: no, it carries over as a metaphor for software, too :)
09:46 isBEKaml masak: that's applicable only to MOP. ;)
09:46 masak moving a large-ish code base from alpha to ng/star is a mostly mechanical, but time-consuming task.
09:46 gfldex masak: does that mean you can't stop perl6?
09:46 isBEKaml (don't ask me what MOP is ;)
09:47 tadzik meta-object protocol?
09:47 Ross joined #perl6
09:47 isBEKaml tadzik: right. :)
09:47 masak gfldex: I was talking about code running Perl 6, but sure. you can't stop Perl 6. :)
09:47 gfldex \o/
09:47 * sorear out.
09:49 hanekomu joined #perl6
09:50 masak hanekomu! \o/
09:50 hanekomu hi
09:50 goksie joined #perl6
09:50 masak std: my $a = 0; loop while $a < 10 { say $a++ }
09:50 p6eval std 31885: OUTPUT«[31m===[0mSORRY![31m===[0m␤Missing block at /tmp/daks7PYql3 line 1:␤------> [32mmy $a = 0; loop [33m⏏[31mwhile $a < 10 { say $a++ }[0m␤Parse failed␤FAILED 00:01 117m␤»
09:51 masak I kinda wish STD'd say "no, it's 'repeat while'" or something.
09:53 isBEKaml std: /x{3}+/
09:53 p6eval std 31885: OUTPUT«[31m===[0mSORRY![31m===[0m␤Unsupported use of {3} as general quantifier; in Perl 6 please use X**3 at /tmp/H9Mf4GgMog line 1:␤------> [32m/x{3}[33m⏏[31m+/[0m␤Check failed␤FAILED 00:01 115m␤»
09:53 isBEKaml std: /x{0,3}+/
09:53 p6eval std 31885: OUTPUT«[31m===[0mSORRY![31m===[0m␤Unsupported use of {0,3} as general quantifier; in Perl 6 please use X**0..3 at /tmp/VKMdXIsBJZ line 1:␤------> [32m/x{0,3}[33m⏏[31m+/[0m␤Check failed␤FAILED 00:01 115m␤»
09:53 isBEKaml std: /x**3{2}+/
09:53 p6eval std 31885: OUTPUT«[31m===[0mSORRY![31m===[0m␤Unsupported use of {2} as general quantifier; in Perl 6 please use X**2 at /tmp/fZe5MAFj8y line 1:␤------> [32m/x**3{2}[33m⏏[31m+/[0m␤Check failed␤FAILED 00:01 117m␤»
09:53 isBEKaml sorear++ :)
09:54 isBEKaml std: /x{0,3)/
09:54 p6eval std 31885: OUTPUT«[31m===[0mSORRY![31m===[0m␤Unable to parse statement list; couldn't find right brace at /tmp/0zwMjhRGgu line 1:␤------> [32m/x{0,3[33m⏏[31m)/[0m␤    expecting any of:␤        POST␤   infix or meta-infix␤        null term␤      postfix␤  postfix_prefix_meta_operator␤
09:54 p6eval ..statement modifier loop␤Parse…
09:54 frettled hanekomu: o/
09:54 isBEKaml uhh
09:54 hanekomu hm?
09:54 rurban Am I the first who packages rakudo-star? http://fedoraproject.org/wiki/Features/Rakudo_Star but nothing concrete
09:55 isBEKaml rurban: me and tadzik++ have been at it, but stalled due to DESTDIR issue. :)
09:55 rurban Ok, DESTDIR is solved (and easy)
09:55 tadzik rurban: I was trying to packagage it half an hour before it was released :)
09:55 tadzik rurban: is it?
09:56 rurban testing is partially solved, see my github fork
09:56 frettled rurban++
09:56 tadzik rurban: got tarball?
09:56 frettled std: /x{0,3}/
09:56 rurban Not yet, still testing
09:56 p6eval std 31885: OUTPUT«[31m===[0mSORRY![31m===[0m␤Unsupported use of {0,3} as general quantifier; in Perl 6 please use X**0..3 at /tmp/SbwTxXyIZk line 1:␤------> [32m/x{0,3}[33m⏏[31m/[0m␤Check failed␤FAILED 00:01 115m␤»
09:56 isBEKaml rurban: the dist was tarballed? with all modules?
09:56 rurban Just ufo and blizkost were misbehaving
09:57 rurban I package as star just dependencies to an updated rakudo 2010.07-47 and the extras (libs, docs, tools)
09:57 isBEKaml that reminds me. I still have to submit packages to slackbuilds.org. Su-Shee++ for raising this.
09:58 isBEKaml bbiab
09:58 rurban my descr is "rakudo-star is parrot plus rakudo (a perl6 implemention on parrot)
09:58 rurban plus some perl6 libraries, docs and libraries and blitzkost, a parrot
09:58 rurban language which targets perl5. Contrary to the upstream rakudo-star release
09:58 rurban for the masses, this does not include the external parrot or rakudo
09:58 rurban releases. The external rakudo release matches the rakudo star release,
09:58 rurban that's why it has the version 201007_47, not just 201007."
10:00 cxreg blizkost (not blitzkost) is not a "parrot language"
10:01 cxreg it's a perl 6 module which embeds libperl
10:01 rurban it's in parrot languages, so its just another parrot language, just as perl6
10:01 hanekomu where does the name "blizkost" come from? It does indeed sound like "blitzkost", which would be a new German word for something like "lightning-fast food"
10:01 rurban solvak
10:01 rurban slovak,sorry
10:02 hanekomu so it might have the same connotations
10:02 rurban "closeness", "contiguity" and "familiar"
10:02 hanekomu oh
10:02 rurban README - Oh, and why the name?
10:02 masak hanekomu: it's Slovak, IIRC.
10:03 masak rurban: jnthn++ tends to give his projects unpronouncible Slavic names :P
10:03 rurban isBEKaml: I'm just preparing a star distro for cygwin
10:03 cxreg rurban: i guess technically it is implemented that way, but the way it's written it sounds more like Ponie than what it really is
10:03 cxreg (and i was wrong, it doesn't appear to depend on rakudo)
10:04 szabgab rakudo: say %ENV.perl
10:04 szabgab rakudo: say %*ENV.perl
10:04 p6eval rakudo 9b6189: OUTPUT«===SORRY!===␤Symbol '%ENV' not predeclared in <anonymous> (/tmp/CSQ5kpJvxp:22)␤»
10:04 p6eval rakudo 9b6189: OUTPUT«Method 'key' not found for invocant of class 'String'␤  in <anon> at line 4669:CORE.setting␤  in 'Any::join' at line 1␤  in 'EnumMap::perl' at line 4675:CORE.setting␤  in main program body at line 22:/tmp/apQGkcYZsb␤»
10:04 briang joined #perl6
10:04 szabgab masak: I was also hoping for that but it does not like me :-(
10:05 masak szabgab: small example?
10:05 rurban Ok. I wrote now "blizkost, a perl5 parrot language which embeds libperl5"
10:05 szabgab rakudo: say %*ENV{HOME}
10:05 p6eval rakudo 9b6189: OUTPUT«Could not find sub &HOME␤  in main program body at line 22:/tmp/2QUMQvKuMZ␤»
10:05 szabgab rakudo: say %*ENV.perl
10:05 p6eval rakudo 9b6189: OUTPUT«Method 'key' not found for invocant of class 'String'␤  in <anon> at line 4669:CORE.setting␤  in 'Any::join' at line 1␤  in 'EnumMap::perl' at line 4675:CORE.setting␤  in main program body at line 22:/tmp/C6nZQsbS5h␤»
10:05 masak szabgab: .{HOME} is a p6ism.
10:05 masak szabgab: read the error message.
10:06 szabgab rakudo: say .{HOME}
10:06 p6eval rakudo 9b6189: OUTPUT«Could not find sub &HOME␤  in main program body at line 22:/tmp/XFtRAQc1_J␤»
10:06 masak szabgab: I watched your hashes screencast. you know this! :)
10:06 szabgab rakudo: say %*ENV{"HOME"}
10:06 p6eval rakudo 9b6189: OUTPUT«/home/p6eval␤»
10:06 masak right.
10:06 szabgab crap
10:06 szabgab but still
10:06 szabgab rakudo: say %*ENV.perl
10:06 masak no, just a literal string :)
10:07 p6eval rakudo 9b6189: OUTPUT«Method 'key' not found for invocant of class 'String'␤  in <anon> at line 4669:CORE.setting␤  in 'Any::join' at line 1␤  in 'EnumMap::perl' at line 4675:CORE.setting␤  in main program body at line 22:/tmp/VPjUwQ3k5M␤»
10:07 masak that looks like Parrot things leaking through.
10:07 rurban http://code.google.com/p/cygw​in-rurban/source/detail?r=114 contains my star packaging (spec and patches)
10:07 * masak submits rakudobug
10:07 * szabgab hides
10:08 redicaps joined #perl6
10:10 rurban isBEKaml: are the slackware builds already accepted?
10:10 masak another small challenge to people here on the channel: if someone would go through Yapsi and list all of the Perl 6 features it uses, we make a roadmap for bootstrapping Yapsi out of that list.
10:11 masak I think if I were to give a lightning talk, I would show such a list, too. so this is a chance for fame and glory.
10:11 masak s/we/we can/
10:11 rurban I need some more rakudo-star distros so that it will be easier to get accepted at cygwin. Otherwise I need to go through voting
10:12 cxreg cygwin depends on it being in other distros?
10:13 masak rakudo: say "a", "c" ... "m"
10:13 p6eval rakudo 9b6189: OUTPUT«acdefghijklm␤»
10:13 rurban It is just faster
10:13 rurban I was the first anyway who packaged parrot
10:13 rurban (in an installable way)
10:14 cxreg debian's rakudo is ancient
10:15 * cxreg wonders what Ryan Niebur is up to
10:15 cxreg that appears to be Ryan52 on irc
10:16 cxreg rurban: maybe bug him tomorrow :)
10:21 isBEKaml rurban: not yet. I have yet to submit them. I'm currently running them through on my machine. (My own custom version works, though)
10:23 masak does an array my @a[100] somehow link to 100 scalar containers?
10:25 isBEKaml rurban: you can find my custom version here: http://github.com/svatsan/RakudoStar-Slackbuilds
10:27 isBEKaml rurban: Note, when I submit them to slackbuilds, it won't be an R* dist version. It will be separate builds for parrot and rakudo each.
10:31 rurban I'll have 3 seperate packages: parrot (plus parrot-devel), rakudo, and now rakudo-star where -star just has the additional files
10:31 whiteknight joined #perl6
10:32 isBEKaml rurban: right. rakudo-star is just a custom version I'm making. It's currently unviable pushing for an install when they are actually two different packages/dependencies(however you see it) due to how slackware treats installs.
10:33 isBEKaml has anyone noticed this is a trending repo on github today: http://github.com/kartick18/inception ?
10:33 isBEKaml due to the awesomely popular inception! :D
10:35 snarkyboojum isBEKaml: linky no worky
10:35 masak snarkyboojum! \o/
10:36 masak isBEKaml: it's been trending for a few days at least.
10:36 snarkyboojum masak: \o/
10:36 cxreg rurban: maybe rakudo should be rakudo-compiler
10:36 masak snarkyboojum: release day today!
10:36 snarkyboojum masak: w00t!
10:36 cxreg and rakudo could be a meta-package that does both?
10:36 isBEKaml snarkyboojum: sorry, http://github.com/karthick18/inception
10:36 masak snarkyboojum: I'm hard at work getting the new runtime to do all that the old one does.
10:36 rurban nono, it's okay like that. It's a language interpreter
10:37 snarkyboojum masak: sweet - ready for tardis soon I take it :)
10:37 rurban I need stable names downstream
10:37 masak snarkyboojum: yes. there should be time (no pun intended) for that today as well.
10:38 snarkyboojum masak: oh wow - productivity ahoy!
10:38 masak :)
10:38 isBEKaml masak: :)
10:38 cxreg isBEKaml: /kick Fischer
10:38 isBEKaml cxreg: he never wakes up. :(
10:39 * masak tries to make scalar containers invisible to '=' but visible to ':='
10:40 snarkyboojum isBEKaml: wow, the whole concept behind that project is way over my head. Looks like I'll have to do some googling :)
10:42 cxreg needs more ascii art
10:42 isBEKaml snarkyboojum: I found the code easier to understand than the movie. :P
10:42 * isBEKaml hides
10:43 * snarkyboojum hasn't seen it
10:43 cxreg isBEKaml: i thought they were too forthcoming with explanation in the movie
10:44 snarkyboojum would reading the code/running it count as a spoiler for the film? :)
10:44 cxreg probably
10:44 isBEKaml cxreg: the talk about levels of sleep and drugs kept me thinking about how deep they were and how close they are to their goal. This was the first movie I found engaging. :)
10:45 masak TimToady: it's too bad that $obj.?nosuchmethod returns Nil and that Nil is defined. it would be very convenient to do $obj.?nosuchmethod // $some-default
10:45 rurban I've not seen it yet, so please don'r spoiler!
10:45 isBEKaml snarkyboojum: No, don't read it! Contains too many spoilers! :)
10:45 snarkyboojum isBEKaml: I'll park it for another day then ;)
10:45 isBEKaml snarkyboojum: :)
10:46 masak snarkyboojum: good movie. I enjoyed it.
10:46 masak definitely a movie for programmers. I can see why they created that github repo.
10:47 cxreg masak: it's no Primer, but it was decent
10:47 snarkyboojum masak: excellent :) might go see it this week
10:47 masak cxreg: oh, then I have to watch Primer, too :)
10:47 molaf joined #perl6
10:47 cxreg yes, do!
10:47 isBEKaml cxreg: I haven't seen Primer. Might watch it sometime.
10:47 masak I think I just got binding to work again in the new runtime.
10:48 cxreg primer is on netflix streaming, if you have that
10:48 masak yes, I did! \o/
10:49 masak rakudo: say 42.?nosuchmethod // "default never reached :("
10:49 p6eval rakudo 9b6189: OUTPUT«␤»
10:49 rurban I see the rakudo-star package *MUCH* smaller than perl5 (where I already include a lot of vendor_modules)
10:49 rurban rakudo: 2.1MB star: 387KB parrot 1.1MB perl5 10MB
10:49 p6eval rakudo 9b6189: OUTPUT«===SORRY!===␤Confused at line 22, near "2.1MB star"␤»
10:49 masak p6eval: :)
10:51 isBEKaml rurban: star's just 387kB ? You're not packaging rakudo/parrot along with it but just the docs/extras?
10:53 avuserow joined #perl6
10:54 rurban yes
10:55 rurban and the modules
10:55 rurban and blizkost
10:55 rurban using shared libs to libparrot
10:55 rurban really tiny
10:57 masak rakudo: my $a = "fool!"; $a ~~ / (foo) /; say $0
10:57 p6eval rakudo 9b6189: OUTPUT«foo␤»
10:57 masak rakudo: my $a = "fool!"; $a !~~ / (foo) /; say $0
10:57 p6eval rakudo 9b6189: OUTPUT«Any()␤»
10:58 * masak submits rakudobug
10:58 masak just because I want it not to match doesn't mean I don't want it to capture. :)
10:58 Italian_Plumber joined #perl6
10:58 masak oh well, easy/obvious workaround.
10:59 masak rakudo: my $a = "fool!"; $a ~~ / (foo) { say "OH HAI" } /
10:59 p6eval rakudo 9b6189: OUTPUT«OH HAI␤»
10:59 masak rakudo: my $a = "fool!"; $a !~~ / (foo) { say "OH HAI" } /
10:59 p6eval rakudo 9b6189: OUTPUT«OH HAI␤»
11:00 masak interesting. so the error seems to be in !~~
11:00 masak the lack of assigning to $/, that is.
11:02 masak rakudo: my $a = "fool!"; $a ~~ / (foo) { say $0 } /
11:02 p6eval rakudo 9b6189: OUTPUT«foo␤»
11:03 masak rakudo: my $a = "fool!"; $a !~~ / (foo) { say $0 } /
11:03 isBEKaml rurban: nice. packaging it everytime is why I kept star dist custom to my own version.
11:03 p6eval rakudo 9b6189: OUTPUT«foo␤»
11:03 isBEKaml masak: Interesting...
11:03 masak interestinger and interestinger...
11:04 isBEKaml rakudo: my $a = "boo FAAA"; $a !~~ / (FAA) { say $0 } /
11:04 p6eval rakudo 9b6189: OUTPUT«FAA␤»
11:04 isBEKaml blah!
11:05 isBEKaml rakudo: my $a = "boo FAAA"; $a !~~ / (boo) (FAA) { say $1 } /
11:05 p6eval rakudo 9b6189:  ( no output )
11:05 masak that shouldn't match :)
11:05 masak (no matching on the space)
11:05 isBEKaml $0 seems to be the default match for everything.
11:05 redicaps joined #perl6
11:05 isBEKaml rakudo: my $a = "boo FAAA"; $a !~~ / (boo) \s (FAA) { say $1 } /
11:06 p6eval rakudo 9b6189: OUTPUT«FAA␤»
11:06 isBEKaml :)
11:06 masak isBEKaml: 'default match for everything'. I didn't understand what you meant there.
11:06 isBEKaml masak: never mind.
11:07 isBEKaml masak: I was thinking along the lines of awk's $0
11:07 * isBEKaml blinks.
11:07 masak ah.
11:07 masak no, $0 desugars to $/[0]
11:08 colomon joined #perl6
11:08 isBEKaml masak: sometimes, I forget what I'm doing and see totally unrelated things. ;)
11:08 colomon o/
11:08 masak colomon: \o
11:09 isBEKaml masak: can you explain the last p6eval output. !~~ doesn't work right there..
11:09 masak isBEKaml: the more you do Perl 6, the less that'll happen :)
11:09 masak isBEKaml: the last p6eval output looks right to me.
11:09 masak isBEKaml: what did you expect?
11:09 isBEKaml masak: I didn't ask it to match. !~~ should  not match what I ask to match, right?
11:10 masak isBEKaml: there's a confusion of levels in that question.
11:10 isBEKaml masak: IOW, if $a doesn't match <this pattern> do this <blocK>
11:10 masak isBEKaml: start by thinking of !~~ as 'not ~~'
11:10 masak isBEKaml: that is, do '~~' and then negate it.
11:10 masak isBEKaml: we still do exactly the same things inside the regex.
11:11 masak including binding to $0, $1 etc.
11:11 masak which was the point of my rakudobug submission.
11:11 isBEKaml 16:38 < isBEKaml> masak: IOW, if $a doesn't match <this pattern> do this <blocK>
11:11 isBEKaml so this is wrong?
11:11 masak yes.
11:11 masak it's a confusion of levels.
11:12 colomon masak: did I miss any excitement yesterday?
11:12 masak the regex is like a subroutine. the insides of it are not negated, only the eventual result.
11:12 isBEKaml masak: I see you speaking of Inception. ;)
11:12 isBEKaml "confusion of levels"
11:12 masak isBEKaml: confusions of levels aren't restricted to Inception :P
11:13 isBEKaml masak: so are they not restricted to dreams. :P
11:13 masak colomon: one always misses excitement by being absent from #perl6 :)
11:13 masak levels? dear me, no.
11:13 snearch joined #perl6
11:14 isBEKaml masak: I think I understand what you're trying to say, but I'll have to code some what better than the bloated piece I came up with this morning. :D
11:14 isBEKaml to really understand it.
11:15 masak isBEKaml: think of it like this: infix:<~~> means "match on this regex, return whether it matched". infix:<!~~> means "match on this regex, return whether it failed". apart from the return value, everything else remains the same.
11:17 isBEKaml rakudo: my $a = "Boo FAA"; if $a !~~ / (Boo)\s(FA) { say $1 } / { say "I'm dead!"; };
11:17 p6eval rakudo 9b6189: OUTPUT«FA␤»
11:17 isBEKaml riiight!
11:18 isBEKaml masak++
11:19 colomon rakudo: say ("hello" ~~ /e/).WHAT
11:19 masak pmichaud: we don't have <?after ...> yet in nqp-rx? o.O
11:19 p6eval rakudo 9b6189: OUTPUT«Match()␤»
11:20 isBEKaml masak: I now see what you meant by "confusion of levels" - I'd say "confusion of blocks" :)
11:20 masak fair enuf.
11:21 colomon can one of you try that last snippwt of mine with !~~
11:21 colomon tt
11:22 isBEKaml akudo: say ("hello" ~~ /e/).WHAT
11:22 isBEKaml rakudo: say ("hello" !~~ /e/).WHAT
11:22 p6eval rakudo 9b6189: OUTPUT«Bool()␤»
11:22 colomon typing p6 on my phone is very hard
11:22 colomon isBEKaml++
11:22 masak colomon: ah!
11:23 masak colomon++
11:23 masak still doesn't explain why $/ doesn't get set.
11:23 hudnix joined #perl6
11:23 avuserow joined #perl6
11:24 colomon when you use !~~   ?
11:24 colomon scope?
11:24 colomon is !~~ using standard !op metaop?
11:25 masak colomon: I just submitted a Rakudobug about it. http://rt.perl.org/rt3/Tic​ket/Display.html?id=76892
11:26 masak colomon: I don't know. 我不知到
11:27 masak gah, wrong DAO. 道
11:27 colomon masak++
11:27 rurban This was my star packaging proposal for cygwin http://cygwin.com/ml/cygwin​-apps/2010-08/msg00002.html
11:28 isBEKaml DAO ?
11:29 masak isBEKaml: I'm typing phonetically. both 到 and 道 are pronounced 'dao'.
11:29 masak isBEKaml: but it's the former that's used in the idiom "I don't know". it's the same character as the one in 'daoism', by the way. very fitting.
11:30 masak literally, 我不知道 translates to "I do not know the way".
11:30 masak but due to the way verb-object pairs work in Mandarin, no-one thinks "know the way" when they read that, only "know".
11:31 isBEKaml masak: I don't know chinese/japanese. All I see are four ????
11:31 gbacon joined #perl6
11:32 masak isBEKaml: then you need more fonts. :)
11:32 isBEKaml mimo no comprende. :)
11:32 isBEKaml masak: Switching between X and console. ;)
11:33 avuserow joined #perl6
11:37 masak rakudo: my $s = "foo\{foo\}"; $s ~~ / <?{ $/.CURSOR.pos > 1 && $s.substr($/.CURSOR.pos - 1, 1) eq "\{" }> foo /; say $/.from
11:37 isBEKaml masak: I'm not good with languages at all.
11:37 p6eval rakudo 9b6189: OUTPUT«4␤»
11:37 masak workaround for lack of <?after ...> :)
11:40 masak too bad the Cursor won't tell me what target string it's matching on. then I wouldn't have to save it into $s before.
11:42 cognominal hum how I can get  a     MyGrammar.parse( "...", :target<parse>) to get the same effect (dumping parse tree) as perl6 --target=parse ?
11:44 rurban joined #perl6
11:44 masak cognominal: augment the appropriate class with a new parse multi that requires :$target! = "parse"
11:44 masak I guess that'd work, at least.
11:44 barika joined #perl6
11:45 masak hm, :$target! where "parse"
11:45 cognominal say (A.parse('ab', :target<parse> )).perl;  # dumps but in a different format.
11:46 masak rakudo: "foo" ~~ /<?after o> o/; say $/.from # should say 2
11:46 p6eval rakudo 9b6189: OUTPUT«Method 'after' not found for invocant of class 'Cursor'␤  in <anon> at line 22:/tmp/r91PDvy9VJ␤  in 'Cool::match' at line 2377:CORE.setting␤  in 'Regex::ACCEPTS' at line 5635:CORE.setting␤  in main program body at line 10:/tmp/r91PDvy9VJ␤»
11:55 azert0x joined #perl6
11:56 masak ah, it's good to be back to coding again.
12:09 x3nU joined #perl6
12:09 x3nU hi
12:11 masak x3nU: hi!
12:26 x3nU i've got problem with perl6 and/or SCGI module
12:26 x3nU i'm trying to run script from SCGI readme
12:26 x3nU (http://github.com/supernovu​s/SCGI/blob/master/README)
12:27 x3nU and that's what i get:
12:27 x3nU Unable to parse postcircumfix:sym<( )>, couldn't find final ')' at line 3
12:27 x3nU i'm using latest rakudo perl version on win32
12:27 masak sounds like there's a ')' missing.
12:27 * masak looks at the code in the README
12:28 redicaps1 joined #perl6
12:29 masak x3nU: example looks fine to me. did you type it in or copy it in?
12:29 x3nU i copied
12:31 masak x3nU: what does line 3 contain in your script?
12:31 masak oh!
12:31 masak there's a comma missing in the README script.
12:31 masak should be one right after :addr<localhost>
12:32 masak (not necessary by spec IIRC, but by current Rakudo)
12:34 x3nU thanks, additionaly there was "return $return" and i changed this to "return $response"
12:34 x3nU and it started working
12:36 masak x3nU++
12:37 masak phenny: tell supernovus that in http://github.com/supernov​us/SCGI/blob/master/README, you need a comma on line 3 and 'return $response' last. x3nU++ discovered this.
12:37 phenny masak: I'll pass that on when supernovus is around.
12:39 snarkyboojum rakudo: package A {}; say A.WHAT
12:39 p6eval rakudo 9b6189: OUTPUT«Method 'WHAT' not found for non-object␤  in main program body at line 22:/tmp/QBY5vDgnzO␤»
12:39 snarkyboojum rakudo: module A {}; say A.WHAT
12:39 p6eval rakudo 9b6189: OUTPUT«Method 'WHAT' not found for non-object␤  in main program body at line 22:/tmp/tfSUuUY7RF␤»
12:40 masak snarkyboojum: that one is known and reported, IIRC.
12:40 snarkyboojum masak: ah cool - just trying to work it out - way over my head though :)
12:40 isBEKaml joined #perl6
12:41 umphy joined #perl6
12:41 masak snarkyboojum: well, the cause seems clear even if the fix isn't.
12:41 masak snarkyboojum: modules and packages are probably Parrot-y things, so they're too different from ordinary Perl 6 objects.
12:41 masak rakudo: say Module.WHAT; say Package.WHAT
12:41 p6eval rakudo 9b6189: OUTPUT«Could not find sub &Module␤  in main program body at line 22:/tmp/dDgx8iRMBG␤»
12:42 masak huh.
12:42 masak std: Module; Package;
12:42 p6eval std 31885: OUTPUT«ok 00:01 114m␤»
12:43 snarkyboojum rakudo: say Perl6::Compiler::Module.WHAT
12:43 p6eval rakudo 9b6189: OUTPUT«Perl6::Compiler::Module()␤»
12:43 masak snarkyboojum++
12:45 isBEKaml rakudo: module Foo; Foo.WHAT.say;
12:45 p6eval rakudo 9b6189: OUTPUT«Method 'WHAT' not found for non-object␤  in main program body at line 22:/tmp/RaCKtT4B4h␤»
12:45 isBEKaml rakudo: module Foo { ... }; Foo.WHAT.say;
12:46 p6eval rakudo 9b6189: OUTPUT«Failure()␤»
12:46 isBEKaml uhh, Failure() ?
12:48 isBEKaml rakudo: module Foo { module Bar { } }; (Foo::Bar).WHAT.say;
12:48 p6eval rakudo 9b6189: OUTPUT«Can not find sub Foo::Bar␤  in main program body at line 1␤»
12:49 colomon_ joined #perl6
12:50 isBEKaml rakudo: module Foo {}; Foo.WHAT.say;
12:50 p6eval rakudo 9b6189: OUTPUT«Method 'WHAT' not found for non-object␤  in main program body at line 22:/tmp/xmMm7ZJqLk␤»
12:54 isBEKaml rurban: why does the fedora project wiki state Rakudo Star as the first production release of Rakudo?
12:55 isBEKaml http://fedoraproject.org/wiki/Features/Rakudo_Star
12:58 masak is S05:3939 inaccurate? should it say .parsefile instead of just .parse?
12:58 masak by the way, what's so great about .parsefile that .IO.slurp.parse doesn't do?
12:59 masak oh well, maybe it's a reasonable shortcut.
12:59 Ross joined #perl6
12:59 Kodi joined #perl6
13:01 Kodi Should numeric types have a .Duration method to cast them to a Duration? If not, what would be the right way to create an arbitrary Duration, short of DateTime.new(...).Instant - DateTime.new(...).Instant?
13:03 masak maybe one could also create a Duration from a DateTime::Duration (not spec'd yet)
13:04 Kodi masak: DateTime::Duration? I've never even heard of that. What's it supposed to do?
13:04 masak Kodi: it's supposed to be a port of the corresponding CPAN module.
13:04 masak Kodi: would allow adding and subtracting DateTimes.
13:05 masak feel free to author that part of the Temporal spec :)
13:05 Kodi masak: Oh, yes, I've seen that module. I'm not sure that kind of thing belongs in the core.
13:05 Kodi masak: Then again, we didn't think leap seconds belonged in the core. :)
13:06 masak I think people might miss it, since adding and subtracting Date objects already work.
13:06 masak but yes, it's a slippery slope.
13:06 HarryS joined #perl6
13:07 Kodi We *could* get useful DateTime arithmetic much more easily by just making $dt - $dt equivalent to $dt.Instant - $dt.Instant, and so on.
13:07 masak I think autarch's CPAN module makes good arguments for why one doesn't want that.
13:09 masak specifically, when I say "one month later", I mean something context-dependent,, not a fixed time difference.
13:09 kid51 joined #perl6
13:10 Kodi masak: Yeah, there'll always be a place for fuzzy DateTime arithmetic like that. I guess the question is whether the built-in arithmetic should do that, or it should be provided in temporal-utils.
13:11 masak I'm fine with the latter.
13:11 m6locks omg i just noticed the OFFICIAL Rakudo Star release, building it now
13:12 Kodi masak: Good. I like it better, I think. It means it can be developed independently of Rakudo, for one thing.
13:12 m6locks with all the delicious treats and modules and stuff that didn't work sometime ago
13:12 m6locks okay
13:12 m6locks some error
13:12 m6locks find rakudo-star-2010.07 -name '.*' -prune -o -type f -printf '%P\n' >rakudo-star-2010.07/MANIFEST
13:13 masak m6locks: yeah, it's pretty rad.
13:13 m6locks find: -printf: unknown option
13:13 m6locks make: *** [rakudo-star-2010.07/MANIFEST] Error 1
13:13 m6locks wuts dat
13:13 masak m6locks: you're on... Unix?
13:13 snarkyboojum m6locks: ah yeah.. on OS X?
13:13 m6locks mac os x
13:13 masak m6locks: I think ingy got that one too.
13:13 m6locks aye
13:13 snarkyboojum -printf isn't understood by find on OS X
13:13 snarkyboojum i.e. not an option
13:13 m6locks its 10.6.4
13:14 snarkyboojum it's a GNUism or Linuxism I think
13:14 m6locks ok, so like can i hack that
13:14 m6locks edit it out
13:14 isBEKaml aye, printf works on linux
13:14 Kodi masak: Would you object to my adding Duration.new() to S02?
13:14 snarkyboojum I was going to, but didn't get around to it - it just strips off the first directory in the listing I think
13:15 m6locks MANIFEST as a file is zero lines, so can't do much about it :PP :PP
13:15 masak Kodi: insufficient data. a patch would help.
13:15 frettled snarkyboojum: GNUism, yes.
13:15 masak I probably won't object, though.
13:16 m6locks so does this mean that I don't get to play with it >:/
13:16 isBEKaml it gets all filenames and writes to MANIFEST
13:16 m6locks hmph
13:16 masak m6locks: not without manually tinkering a bit, at least.
13:16 snarkyboojum m6locks: well not the star distro which *creates* star releases :), but shouldn't be too hard to work around :)
13:17 snarkyboojum m6locks: you can still install and play with Star :)
13:17 frettled m6locks: -printf '%P\n' removes the initial ./ from the results of find
13:17 frettled m6locks: that is, it removes the pathspec
13:17 Kodi masak: A patch to the spec, you mean? It would be easy as adding the sentence "A C<Duration> can also be constructed with C<Duration.new>, which takes a number of seconds as its only argument." or so.
13:17 snarkyboojum I think it removes 'rakudo-star-2010.07' doesn't it?
13:18 m6locks thanks guys
13:20 m6locks it's fetching it now, i'll see if it works by just removing the -fprint ''  part
13:20 colomon_ joined #perl6
13:21 masak Kodi: doesn't sound like it belongs in S02, actually. more like S32.
13:22 masak Kodi: and it's almost, but not quite, self-evident that it does have such a .new constructor.
13:22 Kodi masak: In fact, probably most of the stuff about Instants and Durations belongs in S32.
13:22 masak aye.
13:22 Kodi masak: The reason it didn't strike me as anywhere near self-evident is that it's really just supposed to be a kind of number, and we don't have, e.g., Int.new.
13:22 snarkyboojum m6locks: it'll create a manifest if you remove the -printf option, but the path to the files in the manifest will contain the name of the release directory, i.e. rakudo-star-2010.07/
13:23 snarkyboojum m6locks: so that's all that needs to be worked around on OS X :)
13:23 Kodi (Or do we? It doesn't work in an obvious way in Rakudo, at least.)
13:24 m6locks snarkyboojum: aye, it'd be nice to mention that one in the README file I guess for all the OS X users
13:24 LaVolta joined #perl6
13:24 snarkyboojum m6locks: yeah - and/or find a command that works on all envs :)
13:24 m6locks aye ;P
13:25 isBEKaml I think -print would work.
13:25 am0c joined #perl6
13:26 isBEKaml but it doesn't remove the rakudo-star part, it would just write to MANIFEST along with it
13:26 * Kodi gets a phone call.
13:26 snarkyboojum isBEKaml: works without -print as well, the problem is removing the release dir
13:26 snarkyboojum "problem"
13:27 tommyd joined #perl6
13:27 m6locks hmm not working, getting lots of tar errors
13:27 m6locks tar: rakudo-star-2010.07/rakudo​-star-2010.07/skel/README: Cannot stat: No such file or directory
13:27 isBEKaml snarkyboojum: yes, -print is _not_ needed in most cases.
13:27 mjk joined #perl6
13:27 snarkyboojum isBEKaml: yep
13:27 isBEKaml rakudo-star/rakudo-star? that doesn't seem right. what did you do?
13:28 frettled run it on an untested system ;)
13:28 frettled (non-GNU)
13:28 isBEKaml yeah, mac :)
13:28 m6locks i removed the -fprint 'blah' part from the makefile
13:28 isBEKaml :q
13:28 * hugme hugs isBEKaml, good vi(m) user!
13:28 frettled Wherever that find-line is, shoot the -printf '%P\n' bit horribly, and pipe it through sed instead:
13:28 isBEKaml blah!
13:29 m6locks well that one above frettled just said
13:29 frettled | sed -e 's,^[^/]*/,,'
13:29 frettled That ought to remove the first part of the path, up to and including the first slash
13:30 m6locks hmm I'll add it
13:30 colomon_ joined #perl6
13:31 m6locks bbl to report results, gotta run now
13:31 snarkyboojum I just piped it through perl and got it going, but yeah, sed or awk would be better :)
13:31 amkrankruleuen joined #perl6
13:32 Ross joined #perl6
13:33 frettled but you have to avoid gawking on a Mac ;)
13:34 isBEKaml macgawkin'
13:34 isBEKaml :D
13:41 colomon__ joined #perl6
13:43 snarkyboojum find $(DISTDIR) -name '.*' -prune -o -type f | sed -e 's|^[^/]*/||' >$(DISTDIR)/MANIFEST seems to work a treat
13:43 snarkyboojum frettled++ # nicer than my perl incantation :)
13:43 snarkyboojum err.. invocation ;)
13:49 frettled You're very welcome!
13:50 * frettled prefers using commas rather than pipes, because a misplaced single quote can lead to, ahem, interesting side effects :)
13:54 * isBEKaml prefers using + than , cos they aren't in english! ;)
13:55 tadzik joined #perl6
13:56 amkrankr1leuen joined #perl6
13:57 * moritz_ is at the YAPC::EU venue
14:00 frettled moritz_: oooh.  How is it?
14:01 moritz_ hm
14:01 moritz_ odd
14:01 moritz_ expensive :-)
14:02 moritz_ not enough perl programmers around yet
14:02 masak moritz_: will the hackathon on Tuesday be at the venue somewhere?
14:02 moritz_ masak: I suspect in the lobby
14:03 moritz_ masak: there's free wifi here
14:03 masak \o/
14:03 moritz_ it's slow, and high ping times
14:03 moritz_ but it works
14:03 masak excellent.
14:03 masak I'm not sure when I'll show up in Pisa tomorrow. probably late.
14:04 masak I suspect we won't meet until on Tuesday.
14:08 snarkyboojum potential patch for the rakudo star Makefile on OS X - http://gist.github.com/503392 (unless there is a better way of doing it) - I haven't tested it on linux ;)
14:10 isBEKaml snarkyboojum: that should work on linux. I haven't had the time to build it as I'm now looking to package for slackware. :)
14:11 isBEKaml but yeah, I could just run a sample command. :)
14:11 snarkyboojum isBEKaml: cheers - that's what I thought ;) but should be tested eh
14:11 snarkyboojum isBEKaml++ :)
14:11 x3nU if i create perl 6 module where should i submit it? (just asking, currently i'm learning perl6 ;))
14:12 tadzik x3nU: publish them on github
14:12 isBEKaml x3nU: github is the unofficial source repo for p6 (even rakudo is hosted on github) :)
14:13 isBEKaml x3nU: it's fine if you host it elsewhere too, just let us know! :)
14:13 slavik joined #perl6
14:14 slavik there is no more pugs?
14:15 masak slavik: it's there, as always.
14:15 slavik ahh
14:15 slavik it's not mentioned in the subject :(
14:15 masak pugs: say "OH HAI"
14:15 x3nU well too bad that github uses git ;/
14:15 p6eval pugs: OUTPUT«OH HAI␤»
14:16 masak x3nU: too bad? why? we think it's too good! :)
14:16 masak 太好了!
14:16 isBEKaml x3nU: what do you want to use? svn?
14:17 isBEKaml snarkyboojum: as said, the command works.
14:17 isBEKaml snarkyboojum++
14:17 snarkyboojum w00t!
14:17 tadzik x3nU: github supports svn too ;)
14:17 snarkyboojum :)
14:18 tadzik (if you are a masochist)
14:19 isBEKaml tadzik: no, tell that to cvs folks. ;)
14:19 x3nU i was thinking about mercurial ;f
14:20 tadzik isBEKaml: but they are extinct, aren't they? :)
14:21 isBEKaml tadzik: yes, folks are still around to use it. :D
14:21 Axius joined #perl6
14:22 Axius hi
14:22 masak Axius: hi!
14:23 masak bye...
14:23 Axius joined #perl6
14:23 isBEKaml masak: no, wait. No Yapsi release today?
14:24 masak isBEKaml: yes Yapsi release today. I'm coding full speed here. :)
14:24 isBEKaml productivity++
14:24 masak isBEKaml: finishing up the refactor by providing the new runtime with a new compiler :)
14:24 masak essentially, Yapsi will get a whole new Yapsi this month.
14:25 Axius rakudo: say 53 **2
14:25 isBEKaml masak: great! happy hackin' :)
14:25 p6eval rakudo 9b6189: OUTPUT«2809␤»
14:25 * masak is very happy
14:25 clintongormley joined #perl6
14:28 slavik btw, will/does rakudo allow dynamic loading of modules? or would that have to be part of parrot?
14:28 synth joined #perl6
14:28 masak it's the third time or so that I write a Match tree traverser. this time I'm really, really happy about it: http://gist.github.com/503417
14:29 masak I use it in the new Yapsi to find all the variable declarations in a given block.
14:29 slavik pmichaud: if you're around. where can I read about benchmarks of parrot?
14:29 pmichaud good morning, #perl6
14:29 slavik sweet :D
14:29 frettled good moaning!
14:29 slavik morning :)
14:29 masak morning, pm!
14:30 pmichaud ...benchmarks of parrot?
14:30 slavik pmichaud: http://www.pmichaud.com/2008/pres/​oscon-pct/slides/slide66b.html#end
14:30 slavik pmichaud: looking for some numbers or something :) (out of interest)
14:31 pmichaud those were all hand generated pir versus p5 equivalents
14:31 pmichaud we didn't store them anywhere
14:31 frettled ooh, nice comment on my blog: https://www.blogger.com/comment.g?blogID=7536​68960778118906&amp;postID=5931074280528415524
14:32 slavik pmichaud: I see. :(
14:33 dual joined #perl6
14:34 slavik pmichaud: http://www.mail-archive.com/pe​rl6-all@perl.org/msg27196.html
14:35 jnthn o/ (briefly)
14:35 pmichaud slavik: yeah, that's an example of one of the benchmarks that was used
14:35 masak jnthn! \o/
14:35 slavik pmichaud: do those numbers look fine to you?
14:35 pmichaud jnthn: o/
14:35 pmichaud slavik: depends on what you're looking for.
14:35 pmichaud 2003 was a long time ago.
14:36 slavik pmichaud: just wondeirng about parrot's performance relative to C/python :P
14:36 jnthn masak: Don't panic! :-)
14:36 slavik pmichaud: would you say parrot got faster?
14:36 * masak panics a bit less
14:36 pmichaud slavik: I wouldn't say much of anything regarding parrot's performance anymore.  (more)
14:36 pmichaud beyond that, the parrot of 2003 looks nothing like the parrot of today
14:37 masak jnthn: actually, I'm having quite a good time with Yapsi today. for a little moment I've forgotten about GSoC and my slides...
14:37 slavik how come?
14:37 * masak panics again
14:37 pmichaud slavik: because a lot has changed since that early version (more)
14:37 frettled Relax, everything is under full panic.
14:37 pmichaud I suspect that the PIR versions that were benchmarked then were doing everything in I registers
14:38 pmichaud and there probably wasn't any subroutine call overhead
14:38 pmichaud or, if there was, it would've been using the old parrot calling conventions, which didn't involve any PMC creation for parameters or contexts
14:38 jnthn masak: GSoC tormentor is tormented.
14:38 slavik pmichaud: would you say that it's worth doing some benchmarks now?
14:39 pmichaud slavik: sure, one could some benchmarks now.
14:39 masak jnthn: I'll make sure to get a bit of hacking and blogging in later today, when the Yapsi stuff feels stable.
14:39 slavik pmichaud: I am kind of interested in how Perl6 can perform at the moment compared with Perl5
14:39 jnthn masak: :-)
14:40 slavik pmichaud: according to that page, even though it is from 2003, parrot performance is very good for 'general' code
14:40 jnthn masak: I'm here for 5-10 mins more now, will be back later on though and around until I go to the airport, if you need any GSoC mentorization. :-)
14:40 slavik anyone here ever program with MPI?
14:40 pmichaud slavik: based on my experiences since then, I don't think I would agree with the 'general code' comment, at least not for Parrot of today
14:40 masak jnthn: our latest privmsg session still sustains me, so I'm fine for now.
14:41 jnthn masak: \o/
14:41 pmichaud at the time I think the parrot designers were making some extreme assumptions about the kind of code that could be produced from a dynamic language
14:41 slavik pmichaud: how come? are you saying that parrot has gotten slower?
14:41 Khisanth sounds more like assumptions have changed :)
14:41 jnthn slavik: The issue was more that the things they were saying "oh hey, Parrot can do this real fast" were not the kind of things we needed to do to run Perl 6 code.
14:42 slavik I see
14:42 pmichaud need an example?
14:42 slavik jnthn: but parrot is not primarily built for rakudo, was it?
14:42 slavik pmichaud: yes please. :)
14:42 pmichaud okay
14:42 pmichaud in a benchmark like the primes example, they likely make use of the 'mod' opcode
14:42 pmichaud i.e., they can do    $I0 = $I1 mod $I2
14:42 slavik right
14:43 pmichaud which does a modulo operation between $I1 and $I2, storing the result into $I0
14:43 pmichaud in Perl 6, the equivalent statement would be
14:43 pmichaud my $remainder = $v % $div
14:43 slavik remainder?
14:44 slavik oh right
14:44 pmichaud well, whatever
14:44 slavik sorry
14:44 pmichaud anyway, that code translates to the following
14:44 slavik right
14:44 slavik same as C
14:44 pmichaud $P0 = find_lex '$v'
14:44 pmichaud $P1 = find_lex '$div'
14:44 pmichaud $P2 = '&infix:<%>'($P0, $P1)
14:44 pmichaud $P3 = find_lex '$remainder'
14:45 pmichaud '&infix:<=>'($P3, $P2)
14:45 slavik even x86 is more efficient in modulo
14:45 slavik what exactly is find_lex? (variable lookup?)
14:45 pmichaud i.e., it involves three lexical lookups and two subroutine calls
14:46 slavik should the 2 subroutine calls simply be assignments?
14:46 slavik or is it for overloading ...
14:46 slavik it seems that parrot is more like writing java than writing the jvm
14:46 pmichaud only if your compiler is smart enough to detect that overloading won't occur, and that type checking isn't in play, and that $remainder isn't readonly, and ...
14:47 slavik pmichaud: is it safe to assume that rakudo will be able to figure such things out?
14:47 pmichaud slavik: no.
14:47 slavik optimizer?
14:47 jnthn Depends.
14:47 jnthn On how much info is available.
14:47 pmichaud slavik: let's suppose that rakudo could figure it out
14:47 jnthn (at compile time)
14:47 pmichaud then we'd be down to
14:48 pascal__ joined #perl6
14:48 pmichaud and let's suppose that rakudo could avoid the extra fetches
14:48 pmichaud then at best we would be down to
14:48 slavik my int $a = 5; my int $b = 3; my int $c = $a % $b;
14:48 slavik that gives it more ifo
14:48 slavik info*
14:48 jnthn Gotta run - back later
14:49 pmichaud in that limited case, rakudo might be able to optimize down
14:50 pmichaud but your original question was about 'general code'
14:51 pmichaud 14:40 <slavik> pmichaud: according to that page, even though it is from 2003, parrot performance is very good for 'general' code
14:51 slavik which would involve arithmetic operations :)
14:52 pmichaud no, in this case it involves arithmethic operations of explicitly declared native types that aren't being passed or used in loops or subroutines
14:52 pmichaud I don't think that's "general code"
14:53 slavik pmichaud: but from Larry's apocalypses, Perl6 allows specification of types for vars which should allow the compiler to optimize the code a bit.
14:53 pmichaud a bit, yes.
14:53 masak phew -- I thought I had discovered another case of blocks not being cloned properly, but it was just me not cloning an array properly :)
14:53 pmichaud all the way down to the primse.pasm example.... I'm doubtful.
14:53 pmichaud *primes.pasm
14:54 masak pmichaud: I missed <?after ...> today. filed a rakudobug about it.
14:54 pmichaud masak: okay.
14:54 masak pmichaud: I found a workaround using $/.CURSOR.pos and the sacrifice of a chicken, though :)
14:56 slavik pmichaud: there is always a trade off when using a higher level language.
14:56 pmichaud slavik: no argument there.  :)
14:56 slavik pmichaud: my next question. :) when rakudo compiled Perl6 code, does it go straight to parrot bytecode or to parrot assembly?
14:56 slavik pmichaud: if Perl6 is 10% slower than parrot, then I'll take it :D
14:57 pmichaud currently to PIR, then to bytecode.  Parrot doesn't have a mechanism to go directly to bytecode for anything except PIR.
14:58 masak rakudo: my &foo = { next }; for 1..3 -> $n { foo if $n == 2; say $n }
14:58 p6eval rakudo 9b6189: OUTPUT«1␤3␤»
14:58 masak \o/
14:58 masak next from within a closure :)
14:59 masak sadly, I think I just found a legitimate use case for that...
15:03 aCiD2 joined #perl6
15:03 aCiD2 I'm hacking on adding "getprotobyname" to rakudo. I've added it to parrot as a dynop library, how do I get this into a perl 6 subroutine?
15:04 aCiD2 (I've got src/core/socket.pm which is like src/core/system.pm)
15:04 pmichaud pir::getprotobyname__<args>   would seem to be easiest
15:04 aCiD2 what is the args bit? I've seen "time__n" but I don't know what that means
15:04 aCiD2 and how do I load the library? In pir I'd have to do .loadlib "socket_ops" first
15:05 pmichaud example:    pir::xyz__PsPi
15:05 pmichaud the first character is the type of register to store the result in
15:05 pmichaud the remaining characters are the types of values to use as arguments
15:05 pmichaud P = PMC register, S = string register, I = int register, N = num register
15:05 aCiD2 ah, that makes sense
15:06 pmichaud s = string value or string register,  i = int value or int register, n = num value or num register
15:06 aCiD2 So my op takes a single string, so I'd use getprotobyname__is (returns an int, takes a string)
15:06 pmichaud uppercase I
15:06 aCiD2 ok
15:06 pmichaud because the result has to go into a register
15:07 aCiD2 makse sense. lets see if this compiles
15:07 pmichaud you may be better off starting out by creating a separate module for sockets than trying to bundle it into rakudo
15:07 aCiD2 why's that?
15:08 pmichaud because I'm not sure what part of sockets will end up being 'core'
15:08 aCiD2 Hm, this was core perl 5, so I assumed it would be core perl 6
15:08 aCiD2 it's also part of core python. but of course, maybe bad assumptions
15:09 pmichaud at one time would've totally agreed with that, but enough things have changed between p5 and p6 that I'm no longer sure such assumptions are valid
15:09 cognominal joined #perl6
15:09 * aCiD2 nods
15:09 pmichaud anyway, if done as a module, it's easier to prototype and experiment
15:09 pmichaud because you aren't constantly recompiling rakudo :)
15:09 aCiD2 I implemented the getprotobyname as part of core parrot - do you think that was the right choice?
15:10 pmichaud that'd have to be a question for the parrot folks (more)
15:10 pmichaud in general, they've been moving away from specialized opcodes and towards methods on objects
15:10 aCiD2 yea, I've given patches for both :)
15:10 pmichaud so they might want to see it as a PMC method instead of an opcode
15:10 aCiD2 I did it once as a pmc method, and once as a dynamic op code
15:10 pmichaud I'd think the PMC method would be more likely
15:11 aCiD2 it seems wasteful as a pmc method though, because you end up creating a socket object then throwing it away straight away
15:11 aCiD2 (well, that's how I'm assuming the generated perl 6 pir would look)
15:14 snarkyboojum pmichaud: this gets star distribution building working on OS X http://gist.github.com/503392 - not sure if you want to use it or do something different for OS X
15:15 kiffin joined #perl6
15:16 pmichaud snarkyboojum: that looks.... wrong.
15:16 snarkyboojum pmichaud: ok :)
15:16 pmichaud is the 'sed' command stripping all of the leading path information?
15:16 kiffin joined #perl6
15:16 snarkyboojum yeah
15:17 pmichaud yeah, that's wrong.  %P simply strips the leading directory prefix of whatever was passed to find
15:17 pmichaud not all paths
15:17 pmichaud in this case, it simply removes the leading $(DISTDIR) from each filename
15:17 snarkyboojum %P strips say 'rakudo-star-2010.07/' for example
15:18 pmichaud right
15:18 snarkyboojum because it's used as the path to find
15:18 pmichaud oh, wait, I misread
15:18 pmichaud okay, that sed command might work
15:18 snarkyboojum so using sed doesn't relate to two as nicely, but has the same effect
15:18 snarkyboojum the*
15:18 pmichaud it doesn't strip "all of the leading path information", it simply strips the first directory
15:18 snarkyboojum sorry, yep
15:19 snarkyboojum either way, that's the problem on OS X, which doesn't support the -printf option for it's find
15:19 pmichaud right
15:20 pmichaud patch looks good to me, I can apply it
15:20 snarkyboojum sweet
15:23 Axius joined #perl6
15:25 pmichaud oh, I'll need a better patch or pull request -- what's in the gist is malformed (whitespaces/tabs)
15:25 kiffin left #perl6
15:26 pmichaud afk for a bit
15:29 clintongormley joined #perl6
15:29 snarkyboojum pmichaud: really? seems to apply cleanly here
15:31 snarkyboojum or perhaps not :|
15:32 pmichaud snarkyboojum: the gist paste has characters like » in it
15:32 snarkyboojum yeah.. just fixing that :O
15:33 pmichaud you can just email me the patch if you want     <pmichaud at pobox.com>
15:37 snarkyboojum pmichaud: well I've updated the gist with the correct one, and it applies cleanly now
15:49 pmichaud snarkyboojum: Applied, thanks
15:50 snarkyboojum pmichaud: cheers
16:11 masonkramer joined #perl6
16:22 jaldhar joined #perl6
16:25 frettled pmichaud: the bonus of fixing it that way, is that it will work with Solaris, AIX, HP-UX, FreeBSD, NetBSD and OpenBSD ;)
16:26 frettled well, it is more likely to, anyway
16:26 isBEKaml frettled: GNUism doesn't work with *BSDs?
16:26 isBEKaml pardon my ignorance, I have never used any of the BSDs.
16:27 frettled isBEKaml: if it did, it would have worked with MacOS X, which uses BSD tools.
16:27 frettled In general, you can assume that GNUisms work with Linux, period.
16:28 isBEKaml frettled: yes, sure. But then, MacOSX forked BSD long ago and are into a separate stream with their own versions.The BSDs have changed a lot since, so I thought MacOSX were a different treat.
16:28 aCiD2 Is there a defined way in Perl 6 to have modules export constants? I'm hacking on my Sockets module and it'd be nice to be able to export things like PROTO_UDP and PROTO_TCP
16:29 isBEKaml well, no issues. I'm just curious.
16:29 frettled isBEKaml: Apple is, if anything, rather slow on taking up new NIH-features, just like most large companies.
16:29 aCiD2 I can get the constants through parrot, this just seems a little unfriendly
16:30 frettled isBEKaml: besides, Unix ecology wise, the fork from BSD isn't that long ago.  :)
16:30 isBEKaml frettled: that was my point. They don't seem to take in any new features in the *BSD lines.
16:30 isBEKaml s:2nd/in/from/
16:30 Kodi left #perl6
16:30 frettled isBEKaml: and BSD folks are rather unhappy with the GNU license, so they don't seem to take in many new features from the GNU ecology.
16:31 isBEKaml well, they are an unhappy lot. :)
16:31 frettled Nah, not really.
16:32 isBEKaml I got a question for ya all, I'm about to submit the slackbuild scripts to slackbuilds.org. What should I tell them so they can accept it?
16:32 frettled Assumption is the mother of all ...., but who's the father?
16:32 isBEKaml vengeance? :P
16:32 frettled heh
16:33 frettled Well, enough OT babbling from me, I have to run.  *idle*
16:33 isBEKaml o/
16:33 isBEKaml EDIT:the slackbuild scripts of Rakudo and parrot.
16:35 tommyd joined #perl6
16:39 tylercurtis joined #perl6
16:39 tylercurtis Good morning, #perl6.
16:41 aCiD2 GOOD MORRRRNNNNNNNING TYLERCURTISS!! </radio-voice>
16:41 Revolve_ mornin
16:41 Revolve_ wait, where are you, for it to be morning?
16:42 Revolve_ if ya dont mind me asking
16:42 tylercurtis Tennessee, though 'tis only barely morning.
16:42 aCiD2 west coast?
16:42 Revolve_ cool
16:42 Revolve_ <-- manc, uk
16:42 Revolve_ 19:42
16:43 tadzik joined #perl6
16:43 aCiD2 Revolve_: then why aren't you going to nw.pm meetups!
16:43 snarkyboojum 2:43 the next day here :)
16:43 aCiD2 at least I never saw you there when I was in lancaster
16:43 Revolve_ they have those here?
16:43 Revolve_ I was looking just the other day for stuff like linux user groups and perl users meetups in the area
16:43 aCiD2 Revolve_: yes, nw.pm is fantastic in my opinion
16:44 Revolve_ okay. that's in lancaster?
16:44 aCiD2 it's the north, i'll give you the link
16:44 Revolve_ I don't drive but I've no problem using trains
16:44 Revolve_ thanks :D
16:44 aCiD2 http://northwestengland.pm.org/
16:44 Revolve_ yeah man
16:44 aCiD2 We had socials in Manchester, Lancaster and Liverpool while I was at uni there
16:44 Revolve_ this is the one I was looking at
16:44 Revolve_ cool
16:44 Revolve_ can get to liverpool for a fiver, not including bus far to the station
16:44 pheuter joined #perl6
16:45 Revolve_ fare*
16:45 aCiD2 cool, well manchester seems to be most popular, so you're in luck there :)
16:45 aCiD2 are you at uni or working there?
16:46 Revolve_ neither. 18, getting into college after my first placement ended up being too far. looking for work in the meantime :)
16:46 aCiD2 oh cool, would have been nice having someone my age there :P mst goes sometimes who is probably closest to my age, I think
16:46 * aCiD2 needs to get his ass down to some birmingham meetups now
16:46 Revolve_ how old are you guys?
16:46 Revolve_ lol
16:47 aCiD2 well I'm 21 and 5 days :P the rest are between 25-40 I think
16:48 justatheory joined #perl6
16:48 aCiD2 (if you meant nw.pm, i have no idea about this channel)
16:49 Revolve_ yeah, nw.pm
16:49 Revolve_ ohwait
16:50 Revolve_ it's not 19:42. it is where my shell provider is. but that's two hours ahead of where I am.
16:51 squeeky ooh. nobody has made a brew formula for rakudo? I might have a crack at this.
16:52 macroron joined #perl6
16:53 aCiD2 squeeky++
16:53 isBEKaml joined #perl6
16:53 squeeky It'll be utter irony - writing Ruby that runs Perl 5 to install Perl 6.
17:00 isBEKaml http://slackbuilds.org/pending/ #slackbuild scripts submitted \o/. Will have to wait until they(admins) come back.
17:00 isBEKaml Su-Shee: ^^
17:02 squeeky could someone confirm the md5 of the tar.gz on github is 3be6d0f4f9d8d1143b6c25768e8a7342 ?
17:02 isBEKaml which one?
17:02 squeeky http://cloud.github.com/downloads/ra​kudo/star/rakudo-star-2010.07.tar.gz
17:03 pmichaud pmichaud@orange:~$ md5sum rakudo-star-2010.07.tar.gz
17:03 pmichaud 3be6d0f4f9d8d1143b6c25768e8a7342  rakudo-star-2010.07.tar.gz
17:03 squeeky thanks.
17:11 pheuter joined #perl6
17:12 pascal__ left #perl6
17:12 wamba joined #perl6
17:19 drrho g'arvo #perl6 !
17:19 kid51 joined #perl6
17:19 drrho quick question Re: blizkost: is there a list of things which work and which don't ?
17:20 Ross joined #perl6
17:20 drrho amazingly enough, a large package of mine works out of the box with blizkost.
17:21 drrho these things make me always nervous ;-)
17:21 edgar Hi all, I translated the state monad to perl6. But it is not very handy without do notation. Has anyone an idea how to implement such thing?
17:22 edgar just a hint is fine. I am relative new to perl6
17:22 edgar so I haven't got a clue where to look.
17:24 edgar Oh, this will help probably: http://en.wikibooks.org/wiki/Haskell/do_Notation
17:26 supernovus joined #perl6
17:26 Axius joined #perl6
17:27 supernovus Is there a way to make Hashes interpolate in regexes?
17:27 phenny supernovus: 12:37Z <masak> tell supernovus that in http://github.com/supernov​us/SCGI/blob/master/README, you need a comma on line 3 and 'return $response' last. x3nU++ discovered this.
17:31 supernovus x3nU: Thanks for reporting the typos! Now fixed.
17:33 ingy greetings
17:33 tadzik drrho: I don't think so. Maybe it's time to create one? :)
17:33 tadzik ingy: o/
17:34 tadzik drrho: is there any thing that you know that doesn't work with Blizkost?
17:34 lue hello o/
17:34 isBEKaml hello, ingy!
17:34 drrho tadzik: no, everything I tried seemed to work!
17:35 tadzik drrho: so we can maybe assume that everything works, and anything that fails is considered a bug and must be vaporized :)\
17:35 tylercurtis tadzik: I know that "use Data::Dumper:from<perl5>; Dumper(1.5);" doesn't work. Same for arrays and hashes. Didn't try with non-builtin classes.
17:35 drrho of course, I consider to move stuff into Perl6, so I am also looking for a migration path.
17:35 drrho ;-)
17:36 tadzik tylercurtis: maybe. But .perl is the way, Data::Dumper is obsolete I'd say
17:36 tadzik we also have YAML::Dumper
17:37 ingy star: use YAML; say dump [1..5]
17:37 p6eval star 2010.07: OUTPUT«---␤- 1␤- 2␤- 3␤- 4␤- 5␤...␤␤»
17:37 tadzik :
17:37 tadzik :)
17:37 tylercurtis tadzik: I know. That was just the most obvious Perl 5 core module I knew of to test marshalling to Perl 5.
17:37 x3nU supernovus: np :)
17:39 drrho From my first experiments, I have to say that this Rakudo thingie rocks.
17:40 drrho is there also a way to integrate C code?
17:40 gfldex yes, but it's rather indirect
17:41 drrho is it via parrot?
17:41 supernovus x3nU: I don't think anyone had noticed as prior to Rakudo Star, I don't think many people looked at the SCGI library. But if you're doing web apps with Perl 6, SCGI is much much faster than CGI.
17:41 pheuter_ joined #perl6
17:42 gfldex drrho: yes
17:42 tylercurtis drrho: check out Zavolaj.
17:43 * drrho googling
17:43 tylercurtis drrho: http://github.com/jnthn/zavolaj/
17:43 tylercurtis drrho: it's included in Rakudo * iirc.
17:43 drrho just found it, yes.
17:45 x3nU supernovus: i wished to play with SCGI but mod_scgi doesn't work properly for me
17:45 x3nU ;(
17:48 supernovus x3nU: Hmm, that's not cool. There is also a proxy_scgi module that comes with Apache 2.2.  I haven't tried that one yet, but plan to try it out shortly (once I get my CMS working under the latest Rakudo, which may take some time.)
17:48 supernovus mod_proxy_scgi
17:48 eternaleye joined #perl6
17:49 supernovus http://httpd.apache.org/docs​/2.2/mod/mod_proxy_scgi.html
17:51 * drrho looking at NativeCall.pm: do I understand it correctly, that I can write PIR code inside Perl6?
17:52 tylercurtis drrho: in Rakudo, yes, but please don't unless you really absolutely need to. Otherwise, your code will never be portable to other implementations. Also, PIR is ugly. :)
17:53 drrho I see.
17:55 drrho Still sexy :-)
17:56 am0c joined #perl6
18:08 jedai joined #perl6
18:13 ambs joined #perl6
18:13 * ambs bow
18:25 justatheory joined #perl6
18:26 supernovus So, anyone interested in a FastCGI library for Perl 6? It's a lot more complex than SCGI, but I was thinking of making it my next pet project.
18:27 Su-Shee WHAT QUESTION IS THAT? OF COURSE MAN. :)
18:27 Su-Shee how else is going any web framework going to work?
18:28 supernovus Su-Shee: Well, you could try using plain old CGI... but I'll tell ya, it's horrifically painful (which is why I wrote the SCGI library in the first place...)
18:28 m6locks ummm
18:28 Su-Shee scgi and fastcgi are the way to go. web server like nginx doesn't even support cgi anymore.
18:28 sekimura1 joined #perl6
18:28 m6locks is that buildall.pl supposed to build the whole thing?
18:29 jfried supernovus, a fastcgi library would be very cool :)
18:29 m6locks it says
18:29 m6locks Installing to '/Users/thebbo/star/build/build'
18:29 m6locks Can't chdir to rakudo: No such file or directory at buildall.pl line 15.
18:29 cbk joined #perl6
18:30 m6locks so it's not working, but I think I got the makefile
18:30 sorear good * #perl6
18:32 tadzik o/
18:35 Axius joined #perl6
18:35 pheuter_ left #perl6
18:36 supernovus Well, FCGI is officially my next personal project. After that, maybe PSGI support in masak++'s Web framework (yeah, I'm in a webish mood lately.)
18:38 perigrin you know if you did PSGI support first you could in theory get FCGI support for free
18:41 am0c joined #perl6
18:42 kiffin joined #perl6
18:44 tylercurtis If I make a subset of OpaquePointer to make the signature of the functions clearer to read, will Zavolaj still generate the correct NCI signatures?
18:45 tylercurtis e.g., "subset Foo of OpaquePointer; sub Something() returns Foo is native('libsomething') {...}"?
18:47 japhb Who picks the content for the Rakudo CafePress store?
18:50 squeeky ..... cafepress? argh.
18:50 x3nU supernovus: ok i tested and it seems that mod_proxy_scgi works fine althrough i had to compile itself because there's no win32 version
18:50 x3nU it myself*
18:51 x3nU thanks for help
18:51 Tene pmichaud: the can_handle method of an exception handler is what is used to determine if the EH wants to handle a given exception or not.
18:51 x3nU hmm... i think that i should publish mod_proxy_scgi binaries on my site
18:52 supernovus x3nU: Great to hear! I may change the README to suggest mod_proxy_scgi instead of mod_scgi.
18:55 KenGuru joined #perl6
18:56 kiffin left #perl6
18:58 snearch joined #perl6
19:03 Casan supernovus: FCGI or indeed PSGI for Rakudo/Parrot/Perl6 would be xmas all over again.
19:06 cono joined #perl6
19:06 supernovus Casan: Well, I'm going to work on FCGI first. Then if it works well, it can be one of the available backends for masak++'s Web framework, which intends to include a PSGI/Plack compatible interface (hopefully with CGI, SCGI, FCGI, mod_perl6 and HTTP::Daemon backends.)
19:08 Casan supernovus: bravo. will follow your work with great interest.
19:09 jaldhar joined #perl6
19:10 supernovus Casan: If you're doing any web stuff with Perl 6 at the moment, I'd recommend trying the SCGI library available in proto/pls. It's WAY faster than standard CGI (mostly because your not loading a new rakudo on every page request...)
19:11 Ross joined #perl6
19:11 melte joined #perl6
19:15 alanstorm joined #perl6
19:16 tadzik supernovus: mberends++ is writing http::server::simple::psgi on github, you might be interested
19:18 alanstorm Hello all, I'm not sure if this is the right venue for this. I'm not involved in the perl6/raduko project.  I'm just trying to download the recent raduko-star release and monkey around with perl6.  I'm having trouble getting it to compile/install on my OS X 10.6 laptop.
19:18 alanstorm When I run "perl Configure.pl --gen-parrot", it chugs along for a bit, but then fails with
19:19 alanstorm Reading configuration information from install/bin/parrot_config ... ===SORRY!=== Parrot revision r48225 required (currently r0)
19:19 alanstorm Is there anyone here who could help me figure out what's going on, or point me towards somewhere where I could help myself?
19:19 moritz_ alanstorm: want to come to the lobby?
19:19 alanstorm moritz_: sure, which channel is that?
19:20 moritz_ alanstorm: sorry, I misread - thought you meant the YAPC venue
19:20 * moritz_ confused
19:20 supernovus tadzik: Awesome, I'm sure that will integrate with Web well. Perl 6 will make Web applications Fun again! :-)
19:20 moritz_ alanstorm: do you have any parrot installed?
19:20 whee moritz_: I want what you're on ;D
19:21 alanstorm moritz_: I'm not sure?  I downloaded the rakudo-star-2010.07-0-gac1dc94.tar.gz tar ball that was recently released
19:22 moritz_ alanstorm: did you ever install a parrot before?
19:22 gfldex :D
19:22 supernovus --gen-parrot should install parrot automatically...
19:22 alanstorm used that to make a distribution with make VERSION=2010.07
19:22 alanstorm and then tried to Configure.pl that distribution, and that's when I got teh above Sorry
19:23 alanstorm moritz_: no, I've never installed "a parrot" before
19:23 whee alanstorm: do you have svn?
19:23 alanstorm I'm a little unclear on the terminology, my apologies for that
19:23 alanstorm whee: yes, I have svn
19:23 m6locks can't build the whole thing with buildall.pl, i was gonna ask if there was some sort of build all those modules and stuff type of command or script
19:23 gfldex alanstorm: the error you get means that parrot wasnt build correctly
19:24 gfldex parrot is the runtime environment rakudo needs to do anything
19:24 alanstorm gfldex: ok, that makes sense
19:24 gfldex so that has to be build before
19:24 gfldex the real error message from the failed parrot build should be a few lines about the sorry
19:25 moritz_ my internet connection is too slow to reasonably chat
19:25 gfldex o.0
19:25 alanstorm there's no error message above the sorry, just a
19:26 alanstorm Finished install_dev_files.pl
19:26 offerkaye joined #perl6
19:26 alanstorm Reading configuration information from parrot-2.6.0/parrot_config ...
19:26 alanstorm ===SORRY!===
19:27 alanstorm and above that a listing of files
19:27 gfldex are you afraid of git?
19:27 alanstorm heh, not afraid, but a little wary.
19:27 offerkaye Hi
19:28 moritz_ hm, looks like the version compaarisn code is a bit fragile
19:28 m6locks can't build the whole thing with buildall.pl, i was gonna ask if there was some sort of build all those modules and stuff type of command or script
19:28 gfldex lets put git aside for a bit then
19:28 gfldex have a look if you can find a parrot_install dir
19:29 gfldex and check if you can find the binary parrot_install/bin/parrot
19:29 gfldex if you dont, you aint got no parrot
19:29 moritz_ not quite
19:30 moritz_ R* installs parrot into build/ and not parrot_install
19:30 alanstorm I've got a
19:30 alanstorm ./install/bin/parrot
19:30 moritz_ what do you get when you run ./install/bin/parrot_config revision ?
19:31 alanstorm $ ./install/bin/parrot_config revision
19:31 alanstorm 0
19:31 moritz_ and if you query it for 'versino' instead of 'revision'?
19:32 moritz_ sorry, version
19:32 alanstorm moritz_: liks this?
19:32 alanstorm ./install/bin/parrot_config version
19:32 alanstorm no such key: 'version'
19:32 moritz_ hm
19:33 moritz_ try VERSIION please
19:33 * moritz_ a bit unconcentrated, sorry
19:33 alanstorm ah, that's better
19:33 alanstorm ./install/bin/parrot_config VERSION 2.6.0
19:33 alanstorm ./install/bin/parrot_config VERSION
19:33 alanstorm 2.6.0
19:33 moritz_ seems like your parrot built just fine
19:33 alanstorm heh, no sorries mortiz_, I'm the newbie forcing myself on all of you
19:34 alanstorm sorries=worries
19:34 alanstorm if it's any help, I found this IRC log
19:34 alanstorm http://irclog.perlgeek.de/parrot/2009-05-11
19:34 alanstorm around 13:51 someone seems to have a similar problem
19:34 gfldex there where osx build problems discussed a few hours back
19:35 gfldex 2009-05-11 is quite some time ago
19:35 alanstorm yeah, quite a long time ago, but it's one of the few things that came up
19:36 alanstorm are there IRC logs I can checkout to review the discussion from a few hours ago you mentioned?
19:36 tylercurtis alanstorm: did you download the rakudo-star-2010.07.tar.gz tarball from http://github.com/rakudo/star/downloads or the tgz under the 2010.07 tag on that page? If the latter, that may be causing you some problems, since, iiuc, that git repo holds the scripts used to create the distribution rather than the distribution itself.
19:38 m`` joined #perl6
19:38 m`` hello perlers
19:38 offerkaye Hi m``
19:38 pmichaud I'm thinking of getting rid of that tag.
19:38 alanstorm tylercurtis: I downloaded a file from that gitrepo, I can't remember which link, but the file was named
19:38 alanstorm rakudo-star-2010.07-0-gac1dc94.tar.gz
19:39 pmichaud that's the wrong file.
19:39 gfldex alanstorm: if you dont get happy with the (all time first, not so well tested) R* release you can try to fetch rakudo via git, as described on http://www.rakudo.org/how-to-get-rakudo
19:39 alanstorm then from that folder ran make VERSION=2010.07
19:39 alanstorm which made a distribution
19:39 pmichaud right.  that's not the star tarball.
19:40 alanstorm ah ha, got it
19:40 m`` http://github.com/downloads/rakud​o/star/rakudo-star-2010.07.tar.gz
19:40 pmichaud I'm going to delete that tag, it's just too confusing.
19:41 alanstorm pmichaud: thanks, I'll give that a try
19:41 alanstorm gfldex: and thanks for the how to link, that should prove equally useful
19:42 alanstorm one last question: Is there a document/resource that covers "Perl 6 for people who haven't been paying attention, but wrote perl programs five to six years ago and want to write perl6 programs"
19:42 m`` five to six years ago?...
19:43 moritz_ btw I think I found a specbug wrt smart matching
19:43 m`` I really dont think so
19:43 alanstorm I get a little confused by what parrot, perl, raduko, etc. all are, which makes researching problems on my own difficult
19:43 m`` alanstorm: but you might look at "Perl6 for perl5 programmer"
19:43 gfldex alanstorm: http://perlgeek.de/en/article/5-to-6
19:43 gfldex alanstorm: http://www.perl6.org/documentation/
19:43 moritz_ alanstorm: http://perlgeek.de/en/article/5-to-6 for the language
19:43 m`` Parrot - virtual machinve build for perl6 but can run other languages
19:43 m`` Rakudo - perl6 for parrot vm
19:44 m`` "Perl 6 is anything that passes the official test suite."
19:44 tylercurtis alanstorm: the book included in Rakudo * as doc/UsingPerl6-draft.pdf looks helpful, although I haven't gotten around to reading all of it yet.
19:44 gfldex i have one too: Perl6 != Perl5+1
19:44 m`` So there is not "official" perl6 version
19:44 m`` gfldex: same
19:44 m`` unlike Perl5/Python/Ruby etc
19:45 gfldex is UsingPerl6-draft.pdf somewhere on the interwebs?
19:46 alanstorm that all looks like a good starting point
19:46 alanstorm thanks again for all your help
19:46 gfldex yw
19:46 m`` http://github.com/rakudo/star/blob/m​aster/skel/docs/UsingPerl6-draft.pdf
19:46 moritz_ http://github.com/perl6/book/downloads the latest download is basically the same
19:47 pmichaud tag deleted
19:47 moritz_ what should   say 'foo' ~~ .uc   print?
19:47 moritz_ FOO  or False?
19:48 tylercurtis moritz_: what's in $_?
19:48 offerkaye star: say ('foo' ~~ .uc)
19:48 p6eval star 2010.07: OUTPUT«0␤»
19:48 tylercurtis or does ~~ topicalize?
19:48 m`` perl6: say 'foo' ~~ .uc
19:48 pmichaud ~~ topicalizes
19:48 moritz_ it topicalizes
19:48 p6eval pugs: OUTPUT«1␤»
19:48 p6eval ..rakudo 9b6189: OUTPUT«0␤»
19:49 moritz_ let's extend the question
19:49 moritz_ what should  say ('foo' ~~ /o/)   print?
19:49 moritz_ sorry
19:50 moritz_ what should  say ('foo' ~~ m/o/)   print?
19:50 pmichaud 'o' followed by a newline.
19:50 offerkaye pmichaud: I just sent an email to perl6-lang about Perl6 user documentation. I mentioned you, hope you don't mind ;)
19:50 pmichaud offerkaye: no problem
19:50 moritz_ pmichaud: it can't, by current spec
19:51 pmichaud moritz_: ....because?
19:51 moritz_ because m/o/ is an immediate call
19:51 moritz_ so there's a Match object on the RHS
19:51 pmichaud at one time, smart match overrode that particular item.
19:51 szabgab rakudo: say %*{PATH}
19:51 p6eval rakudo 9b6189: OUTPUT«===SORRY!===␤Non-declarative sigil is missing its name at line 22, near "%*{PATH}"␤»
19:51 moritz_ on which we call .ACCEPTS
19:51 szabgab rakudo: say %*ENV{PATH}
19:51 moritz_ (by spec, if I interpret it correctly)
19:51 p6eval rakudo 9b6189: OUTPUT«Could not find sub &PATH␤  in main program body at line 22:/tmp/dgotIgadbY␤»
19:51 pmichaud i.e., there was a time when smart match would change the way that the rhs was interpreted.
19:51 pmichaud still is, afaik.
19:52 szabgab this thing tripped me in the morning to my emberassment
19:52 moritz_ it just topicalices
19:52 avuserow rakudo: say %*ENV<PATH>
19:52 p6eval rakudo 9b6189: OUTPUT«/bin:/usr/bin:/usr/local/bin␤»
19:52 szabgab but I wonder if that case could have a better error message for the pure perl 5 programmers?
19:52 moritz_ the syntactic cases seem to be gone
19:52 pmichaud moritz_: it topicalizes before the immediate match occurs.
19:52 moritz_ from the smart-match table
19:52 szabgab so recognize when bare-word is used as a %hash{subscript}
19:53 moritz_ pmichaud: yes, and then calls .ACCEPTS on the result
19:53 szabgab and tell the user s/he is not on perl 5
19:53 pmichaud moritz_: ah, I see.
19:53 pmichaud moritz_: that's a question TimToady will have to answer.
19:53 moritz_ there's no rule that preveneents that call
19:53 moritz_ aye
19:54 pmichaud at one point, it was very syntactic
19:54 moritz_ maybe "if $_ is used on the RHS" or so
19:54 moritz_ I'm writing this up as an e-mail
19:54 pmichaud fair enough
19:54 szabgab pmichaud: pls look at my  question above, about the error message
19:55 moritz_ I discovered it when I implemented it correctly
19:55 moritz_ :-)
19:55 moritz_ ie according to current spec
19:55 pmichaud std:  say %*ENV{PATH}
19:55 p6eval std 31886: OUTPUT«[31m===[0mSORRY![31m===[0m␤Undeclared name:␤ 'PATH' used at line 1␤Check failed␤FAILED 00:01 116m␤»
19:55 pmichaud szabgab: that's about the best we'd ever be able to do.... in order to do that, we'll have to have a way at compile-time to know all of the lexically defined subs
19:56 pmichaud (which we don't have in Rakudo yet)
19:56 pmichaud I suppose we could say that barewords aren't allowed in {...}
19:56 tylercurtis moritz_: I don't think "$foo ~~ m/o/" is your best example. After all, it's trivial to do that as "$foo ~~ /o/". "$foo ~~ .uc" is a much more interesting example.
19:57 szabgab can't you catch that exception and then look at the code to see if came from such a contruct?
19:57 pmichaud szabgab: we don't have quite that much introspection available, no.
19:57 pmichaud we might be able to do that someday.
19:57 moritz_ tylercurtis: it's the one example that makes it obvious that, no matter how much bike-shedding you do it, it's not what we want
19:57 szabgab ok, I was just hoping :)
19:58 moritz_ even the spec uses $wtr ~~ m/.../ in quite many places all over S05
19:58 pmichaud moritz_: at one point, the philosophy was that special cases were part of what made smart matching 'smart'
19:58 pmichaud i.e., it didn't all involve .ACCEPTS
19:59 tylercurtis moritz_: ah, true.
19:59 pmichaud I don't know what TimToady's current leanings are about ~~
19:59 tadzik star: say %*ENV<PATH>
19:59 p6eval star 2010.07: OUTPUT«/bin:/usr/bin:/usr/local/bin␤»
20:00 pmichaud szabgab: fwiw, I think it might be entirely reasonable to say that  .{bareword}   should always produce at least a compile-time warning, if not be an error outright.  There are other ways to express the meaning of .{bareword}  if that's what is intended
20:00 pmichaud one possible exception might be constants, however.
20:00 pmichaud i.e.,   .{pi}   probably should be allowed.
20:01 moritz_ I think it's reasonable for .{not-a-symbol-in-scope} to eventually produce a customized error messages
20:01 moritz_ OTOH I don't want to clutter Perl 6
20:01 moritz_ with p5 backcompat error messages
20:02 moritz_ for perfectly reasonable code
20:02 moritz_ like sub a { 'x' }; %h{a}
20:03 pmichaud yes, but %h<a> and %h{a}  are so visually similar that I think it's reasonable to say the latter should be written as  %h{a()}
20:03 pmichaud regardless of the p5 history
20:03 * moritz_ finds the difference between <> and {} quite striking
20:04 moritz_ much more than '...' and "..."
20:04 moritz_ or () and {}, for that matter
20:04 gfldex rakudo: say "foo {call_a_sub}"; say %h{call_a_sub()};
20:04 p6eval rakudo 9b6189: OUTPUT«===SORRY!===␤Symbol '%h' not predeclared in <anonymous> (/tmp/1iS_Yjl4TS:22)␤»
20:05 gfldex i would prefere to have call_a_sub the same in both cases
20:05 pmichaud gfldex: fair point
20:06 pmichaud afk for a bit
20:06 pmichaud btw, I really wish I could figure out how to get the book.pdf to build on my system.  it'd be nice to work on it on the plane.
20:07 ashleydev joined #perl6
20:08 pmichaud afk
20:09 moritz_ pmichaud: try to build the a4 version
20:09 szabgab moritz_: http://stackoverflow.com/questions/​3383339/writing-perl6-programs-usin​g-raduko-star-cant-install-on-os-x       < typo "raduko"
20:12 moritz_ szabgab: corrected (though not my typo)
20:13 m6locks hmm gotta read that one
20:13 m6locks i've had some problems too
20:15 masonkramer joined #perl6
20:16 * jnthn back
20:16 szabgab moritz_: I know, thanks
20:17 moritz_ jnthn: when will you arrive in Pisa?
20:17 jnthn moritz_: You travelling to YAPC tomorrow too? :-)
20:17 moritz_ no, I'm already there
20:17 szabgab where it the perl 6 hackathon in pisa?
20:17 jnthn moritz_: Oh!
20:17 jnthn moritz_: You at the hotel?
20:17 jnthn moritz_: er, the conference hotel?
20:17 szabgab I'll arrive tomorrow night and would like to come by
20:17 jnthn Or staying elsewhere?
20:18 moritz_ jnthn: yes, at the venue
20:18 szabgab on tuesday
20:18 jnthn moritz_: OK, I'm staying there too.
20:18 moritz_ and tehre's free wifi in he lobby, so that's where you can find me most of the time :-)
20:18 jnthn moritz_: Depending on how well I can do in terms of airport -> train, I hope to get to Pisa railway station at either 14:30 or 15:00
20:19 jnthn moritz_: But before I move on from there, I want to buy my train tickets for leaving Italy on the Saturday (I'm going back home on train, via Switzerland)
20:19 moritz_ jnthn: ah, i might be downtown with some other German pm folks at that time, but should be back in the evening, and available on the day after
20:20 jnthn moritz_: OK
20:20 jnthn moritz_: I think Pm expects to get to the hotel at 8pm on Mon
20:20 moritz_ \o/
20:20 jnthn moritz_: I plan to meet him there and then nom.
20:21 jnthn moritz_: Good to know there is free wifi in the lobby.
20:21 jnthn moritz_: Is it a hackathonable area, or do you think getting some meeting room would be better?
20:21 moritz_ jnthn: should work
20:22 jnthn moritz_: OK
20:24 * moritz_ -> gone
20:24 pmichaud moritz_: I did try to build the A4 version -- same error.
20:24 pmichaud phenny: tell moritz_ I did try to build the A4 version -- same error.
20:24 phenny pmichaud: I'll pass that on when moritz_ is around.
20:25 pmichaud (well, same error except with .A4 instead of .Letter)
20:25 moritz_ pmichaud: I fear I can't help much, I can build it only on my home computer, on my laptop the texlive installation is too old
20:25 phenny moritz_: 20:24Z <pmichaud> tell moritz_ I did try to build the A4 version -- same error.
20:25 pmichaud moritz_: okay.  Maybe PerlJam++ can help out -- he's been able to get it to build on his systems.
20:25 pmichaud wow, my flight to LHR tonight looks rather empty
20:26 pmichaud I count about 35 empty seats at the moment
20:26 pmichaud (based on the online checkin)
20:26 pmichaud at least 6 rows with nobody in them
20:26 jnthn Wow
20:26 jnthn Plenty of room to space out. :-)
20:27 pmichaud well, they may get taken before then
20:27 jnthn Troo
20:27 Ken-Guru joined #perl6
20:27 jnthn No idea how mine will be
20:27 jnthn But it's < 2 hour flight.
20:27 pmichaud so far I'm not giving up my aisle seat.  I'll check it again when I'm ready to check in (at the airpot)
20:27 pmichaud *airport
20:27 pmichaud been watching it since yesterday -- lots of seats moving around
20:28 jnthn Probably about 7 - 7.5 horus until I leave for the airport from here. :-)
20:28 * Tene debates between working on exceptions and gaming.
20:28 pmichaud work on exceptional gaming
20:29 jnthn work on gaming exceptions
20:29 gfldex what game would it be?
20:29 jnthn It's one where you throw stuff and people die.
20:29 eternaleye joined #perl6
20:31 pmichaud unless one of the people catch whatever is thrown.  in that case, they can't die, or else we get a segmentation fault and the universe halts.
20:32 cxreg jnthn: would that be horseshoes, or handgrenades?
20:33 gfldex i think we lost Tene to the game already :)
20:33 jnthn cxreg: In the Perl 6 version, it's mugs.
20:33 gfldex and the enemies are walls :->
20:34 gfldex whereby the walls are tempted to throw some mugs too
20:34 Tene rakudo: die Mug.new() for 1..20;
20:34 p6eval rakudo 9b6189: OUTPUT«Could not find sub &Mug␤  in main program body at line 22:/tmp/2mHmB483_j␤»
20:35 cxreg heh
20:36 cxreg class Mug does Motivation
20:37 eternaleye_ joined #perl6
20:50 tommyd joined #perl6
21:05 x3nU w/in 3
21:05 x3nU oops
21:09 Italian_Plumber joined #perl6
21:10 synth joined #perl6
21:15 PhatEddy joined #perl6
21:17 KenGuru joined #perl6
21:19 PhatEddy rakudo: class fee { has $.fie is rw; method fie { return $!fie ~ "x" } }; my $a = fee.new; $a.fie = "fum"; say $a.fie
21:19 p6eval rakudo 9b6189: OUTPUT«===SORRY!===␤A method named 'fie' already exists in class 'fee'. It may have been supplied by a role.␤»
21:19 PhatEddy Can you override a method supplied by a role without subclassing/inheritance?
21:21 plobsing joined #perl6
21:22 tylercurtis PhatEddy: your issue there is that you declare an accessor fie for $!fie and then a method named fie.
21:22 masak joined #perl6
21:23 jnthn panicitsmasak!
21:23 masak ahoy, #pe...
21:23 * masak panics
21:23 tylercurtis Although it seems like you should be able to override the accessor...
21:23 masak actually, the Yapsi refactor is going well. I probably won't make it before midnight, but I expect to be finished not long after.
21:24 masak the new code is smaller, cuter, and generally more p6ish. :)
21:25 PhatEddy From S12: You may write your own accessors to override any or all of the autogenerated ones.  ??
21:25 masak I think I've finally figured out how to profitably traverse the $/ structure.
21:26 jnthn You figured out step 2?!
21:26 tylercurtis rakudo: class fee { has $.fie; method fie { $!fie ~ "x" } }; my $a = fee.new(:fie<fum>); say $a.fie;
21:26 jnthn PhatEddy: For now, if you want to write your own accessor, declare just the attr, not an attr and an accessor.
21:27 p6eval rakudo 9b6189: OUTPUT«===SORRY!===␤A method named 'fie' already exists in class 'fee'. It may have been supplied by a role.␤»
21:27 jnthn has in, has $!fie; method fie
21:29 tylercurtis jnthn: If $.fie is rw, should one be able to the reading accessor but not the writing accessor when overriding accessors is implemented?
21:31 jnthn tylercurtis: I'm not sure how that'd work. How would the dispatcher differentiate between them?
21:34 tylercurtis jnthn: that's what I thought, but I wasn't sure. It would make sense with a attribute trait that generated chainable writers, but not with is rw.
21:35 jnthn tylercurtis: That'll be do-able in a module (soonish).
21:37 tylercurtis jnthn: ooh. custom attribute traits?
21:39 jnthn Yes. :-)
21:39 tylercurtis jnthn: on an unrelated note, does Zavolaj's signature introspection work properly if I use a subset of OpaquePointer/Int/Str/etc. in the signature. For example, "subset Foo of OpaquePointer; sub DoSomething(Foo $f) returns Int is native('libb') { ... }"?
21:40 jnthn Probably not.
21:40 jnthn Why'd you want to do that, ooc?
21:40 jnthn Oh, actually
21:40 jnthn Maybe it should
21:40 jnthn I think it smart-matches
21:40 jnthn And Foo ~~ OpaquePointer
21:40 tadzik oh, by the way
21:40 tylercurtis jnthn: to make it look prettier.
21:40 jnthn So probably it does work.
21:40 jnthn Ah. :-)
21:40 tadzik jnthn: in Zavolaj, the void* or struct pointers are represented by OpaquePointer, right?
21:40 jnthn Right.
21:41 jnthn For now.
21:41 tadzik any way to get some fields out of these structs
21:41 tadzik ?
21:41 tylercurtis jnthn: although "subset Void of Mu;" wouldn't work since you have to use === for that. :)
21:41 jnthn tadzik: No
21:41 tadzik I was planning to write some nice OO interface to loudmouth, but I'll have to look into those GError structs for proper error handling
21:41 jnthn tadzik: OpaquePointer will go away in the future.
21:41 jnthn tadzik: Well, it might not
21:41 tadzik jnthn: being replaced by?
21:42 jnthn tadzik: But most uses of it will be mappable to a compact struct.
21:42 jnthn (as per S09)
21:42 PhatEddy Sorry wasn't sure it was an issue but it's known - http://rt.perl.org/rt3/Tic​ket/Display.html?id=68996 - rakudo seems to behave better now though ...
21:43 masak jnthn: step 2 isn't anything complicated. it's actually term:<...>, not something elided as people usually thing. as you execute the step, you get a warning, but it's catchable. :P
21:43 jnthn tadzik: And that will let you get at the various fields.
21:43 tadzik cute
21:43 jnthn masak: :P :P
21:43 jnthn Cute is what we aim for.
21:44 tylercurtis jnthn: another couple of Zavolaj questions. Is there a way to tell if an OpaquePointer is NULL? As well, if I do "sub Something(Str $s) is native('blabla') {...}" is there a way to pass NULL as the C string?
21:45 cxreg pir::null__P() will give you a C null
21:45 xinming joined #perl6
21:46 masak / 'if' <expression> <block> [ 'else' <else=block> ]? /; will $<block> contain a Match or an Array of Match?
21:46 jnthn tylercurtis: I think it just maps it to an undef
21:46 jnthn tylercurtis: Or an undef will do the right thing
21:46 jnthn tylercurtis: I'd have to check the code to be sure.
21:46 cxreg (undef?  Mu?)
21:47 jnthn masak: Match
21:47 masak jnthn: then I have a rakudobug.
21:47 jnthn masak: Oh, wait
21:47 jnthn cxreg: Maybe Mu yeah
21:47 jnthn masak: <else=block> is not the same as <else=.block> now
21:47 jnthn masak: Used to be. :-)
21:47 masak which is which?
21:47 masak oh!
21:47 jnthn masak: <else=.block> would not capture
21:48 masak right.
21:48 jnthn well, it'd capture into else
21:48 jnthn not block
21:48 masak so I should add the dot and then $<block> should contain a Match?
21:48 jnthn That'd make sense to me. :-)
21:48 jnthn What the grammar engine thinks is another matter. :-)
21:48 masak :)
21:48 jnthn I'd pipe it through pmichaud to be sure. :-)
21:49 masak no time...
21:49 cxreg it's odd asking questions about a programming language, for which nobody actually knows or has an answer
21:49 cxreg this truly is Perl Trek
21:49 tylercurtis jnthn: I'll try that at some point. I've been diverted from the project that inspired these questions by realizing that even with Zavolaj, wrapping sizable libraries is tedious. So I need to write a C parser with which to parse header files and generate Zavolaj-based wrapper modules for the functions in the headers. :)
21:49 jnthn cxreg: It's not that nobody has one, just nobody here right now. :-)
21:49 cxreg :)
21:49 PhatEddy left #perl6
21:49 masak cxreg: what jnthn said. I'm not sure I'm too fond of the term 'Perl Trek'...
21:50 jnthn Keep in mind that when it comes to people knowledgable about grammars, I'm a little way down the list. :-)
21:50 cxreg masak: it's healthy to be able to laugh at onesself
21:51 cxreg Perl 6 Is Srs Bsns
21:51 gfldex tylercurtis: it would be nice if you could shout if you got that working
21:51 pmichaud 21:46 <masak> / 'if' <expression> <block> [ 'else' <else=block> ]? /; will $<block> contain a Match or an Array of Match?
21:51 masak cxreg: sure, it's not that. I'm just not sure I agree that what we're doing is a 'trek'.
21:51 pmichaud array of match
21:51 masak pmichaud: and <else=.block> fixes it?
21:51 jnthn pmichaud: and if it was <else=.block> ?
21:51 pmichaud it'd be just a single match
21:51 jnthn Answers! We all want them!
21:51 masak \o/
21:51 jnthn \o/
21:52 cxreg this channel cracks me up
21:53 pmichaud it's a lot more cracked up than it used to be
21:53 jnthn <innocent look>
21:53 masak keep cracking up, lurkers!
21:54 jnthn heh heh
21:54 jnthn From p6l: "I would like for what Carl said to be true, but TSa seems to be contradicting it."
21:54 gfldex tylercurtis: http://trac.parrot.org/language​s/browser/c99/trunk/src/c99.pg might be helpful
21:54 jnthn Can I reply, "I'd trust the guy who's writing Perl 6 code every day." :-)
21:55 pmichaud I hate to say it, but I tend to simply skip TSa's messages.
21:56 pmichaud oops, forgot the :)
21:56 jnthn I tend to simply skip much of p6l. :/
21:56 jnthn I almost might as well unsubscribe for the distraction/information factor I get from it.
21:56 pmichaud yes, I've been skipping p6l a fair bit also
21:56 jnthn Apart from every so often there's something interesting.
21:56 masak thanks for the vote of confidence. I'll read the messages after the Yapsi release. :P
22:05 tylercurtis gfldex: thanks. I'd forgotten about that.
22:07 nimiezko joined #perl6
22:09 masak while I finish up the last things, recall the challenge I posed last night: filling in the blanks of http://github.com/masak/yapsi/b​lob/master/doc/announce/2010.08 :)
22:17 masak the problems I run into at this late hour of refactoring are exquisite. I only have time to glance at them quickly and then move on.
22:18 masak need to change location. will be back shortly.
22:18 shirtless Are there any UI bindings for rakudo?
22:19 tadzik blizkost has tk example :)
22:19 tadzik maybe Gtk will work too
22:19 lue hello o/
22:19 tadzik o/
22:20 lue .oO(For some reason, I feel like fixing broken dwimmery without knowing if there is any.)
22:20 shirtless thats kinda cool
22:20 shirtless for now I guess i'll stick to HTML
22:21 tadzik what are you writing?
22:21 am0c joined #perl6
22:22 lue once (rakudo|parrot) allows using foreign code, you can use GTK, Qt, etc.
22:24 lue rakudo: use libc:from<C>;
22:25 p6eval rakudo 9b6189: OUTPUT«===SORRY!===␤"load_language" couldn't find a compiler module for the language 'C'␤»
22:25 lue not yet :/
22:26 tylercurtis lue: there's some support for this already. Go look at Zavolaj. And smile. Then try to actually manually wrap any sizable library with it and realize that no matter how pretty an individual native function declaration is in, wrapping a whole library by hand is monstrous. Then help me write a C parser in order to generate wrappers for native libraries. :)
22:29 masak joined #perl6
22:29 lue "How hard could that C parser possibly be?"
22:29 masak hard as diamond.
22:29 lue .oO(cue jinx)
22:31 * lue ponders a C -> P6 converter, but keeps these crazy thoughts to himself.        Dang it.
22:32 tylercurtis lue: http://trac.parrot.org/languages/browser/c99/trunk
22:32 tylercurtis lue: not quite the same, but it is C99 on top of Parrot, though I don't know how complete it is.
22:32 avuserow int main(int argc, char* argv<::>) <% printf("Yeah, how hard could it be?\n"); %>
22:33 avuserow though I'd argue that any library using digraphs is not worth wrapping directly :)
22:34 jnthn masak: http://gist.github.com/503838
22:34 lue .oO(How hard can it be to turn your GameBoy Advance into an oscilloscope?)
22:35 avuserow well, considering the distance between me and my GBA is bigger than walking distance, pretty difficult
22:35 masak jnthn: wow, cool. :)
22:35 jnthn masak: ETOOSIC ;-)
22:35 masak jnthn: bit of a wonky sentence close to 'a manure heap that I want to announce'... :)
22:35 jnthn Oops. :-)
22:36 jnthn Maybe use a comma. :-)
22:36 masak it's "Kama Sutra" without the 'r' :)
22:36 jnthn I don't know about these things. :P
22:36 masak 'ancient' -- heh :)
22:36 jnthn Oh yeah, you didn't offer that para up for editing, did you... :P
22:36 masak you'll be glad to know that this release will run under Rakudo Star :)
22:36 jnthn Oh!
22:37 masak I hadn't made up my mind when I drafter the announcement.
22:37 jnthn .oO( the announcements get drafter and drafter )
22:37 lue Karma Sutra? .oO(Very wacky announcement)
22:38 masak jnthn: you win my total appreciation of the official/complete paragraph. congratulations. :)
22:38 masak I find that paragraph increasingly difficult to write. this strikes the right tone.
22:39 masak I... I won't have puke in my release announcement. sorry. :P
22:39 jnthn lue: Yapsi gets increasingly well positioned to penetrate the Perl 6 compiler market.
22:39 jnthn masak: Aww!
22:39 jnthn :P
22:40 jnthn masak: spew?
22:40 lue .oO[ positive temperatures on which temperature scale? Hopefully you're not talking about Kelvin :) ]
22:40 masak jnthn: you make me realize I'm a tad more conservative in my humour than I thought :)
22:41 jnthn Bwahaha!
22:41 jnthn masak: You called it SIC. :P
22:41 lue .oO(can't…stop…pun…)    Sounds like one sic compiler.
22:41 masak jnthn: true. though until now I haven't related that to puking.
22:41 masak jnthn: I'm not a native. :)
22:41 jnthn masak: Oh. I did the first time I saw it.
22:42 jnthn Lucky you. :P
22:42 jnthn .oO( No SIC in .Net, it just gets IL )
22:42 masak I have three failing tests and a strange heisenbug left. I say ship it.
22:43 masak during the refactor, Yapsi lots the ability to detect when variables are used before they're declared.
22:43 jnthn I'm truely sorry for your lots.
22:43 masak it's probably not difficult to add it back in. I just don't see it now.
22:43 masak jnthn: :)
22:44 jnthn masak: skip is fine - the dugong is hungry again anyway.
22:45 sekimura1 joined #perl6
22:46 tylercurtis Is there a magically concise way to say "I want to match this thing, that thing, and this other thing, but you can leave off either the first or last thing, but not both?"
22:46 * tylercurtis hopes no.
22:46 tylercurtis In regexes, rather.
22:46 masak tylercurtis: match and then <?{ ...
22:46 masak }>
22:46 kthakore wow
22:46 kthakore I thought perl6 was quite
22:46 kthakore then I scrolled down
22:46 kthakore hehe
22:46 kthakore doh'
22:47 rbaumer joined #perl6
22:47 kthakore How can I call a parrot pmc (SDL.pir) from perl6
22:47 jnthn <first_thing> <middley> [<last_thing> || <?{ $<first_thing> }>]
22:47 kthakore err rakudo
22:47 lue I am continually amazed at all the little things P6 has easy support for.
22:47 kthakore lue: me too!
22:47 jnthn tylercurtis: ^^ something like that
22:47 jnthn There may be a neater way but I think that'll work
22:47 kthakore can't wait till it gets optimized
22:48 lue rakudo: say 0 nand 0; # just a hunch
22:48 p6eval rakudo 9b6189: OUTPUT«===SORRY!===␤Confused at line 22, near "say 0 nand"␤»
22:48 tylercurtis jnthn: how would that get to "|| <?{ $<first_thing> }>" if <first_thing> didn't match?
22:48 lue rakudo: say 0 !and 0;
22:48 jnthn tylercurtis: oh
22:48 p6eval rakudo 9b6189: OUTPUT«0␤»
22:48 jnthn tylercurtis: sorry, meant a ? after <frist_thing>
22:49 tylercurtis lue: rakudo: multi infix:<nand> (Mu $a, Mu $b) { $a !and $b }; say 0 nand 0; # lue
22:50 tylercurtis rakudo: multi infix:<nand> (Mu $a, Mu $b) { $a !and $b }; say 0 nand 0; # lue
22:50 p6eval rakudo 9b6189: OUTPUT«1␤»
22:50 kthakore rbaumer: say 0.33333333333333 = 1/3
22:50 kthakore ops
22:50 kthakore rakudo: say 0.33333333333333 = 1/3
22:50 p6eval rakudo 9b6189: OUTPUT«0.33333333333333␤Cannot modify readonly value␤  in '&infix:<=>' at line 1␤  in main program body at line 22:/tmp/D2XFVcDwOp␤»
22:50 jnthn Cannot assign to readonly variable
22:50 kthakore rakudo: say 0.33333333333333 == 1/3
22:50 p6eval rakudo 9b6189: OUTPUT«0␤»
22:50 jnthn damm, I was close!
22:50 kthakore but why/
22:50 kthakore oh ok
22:50 kthakore yayay! Floating point is super awesome!
22:51 jnthn kthakore: Because they're not quite the same ;-)
22:51 kthakore I know
22:51 kthakore that is why I love you guys
22:51 kthakore first lang that did it that right
22:51 kthakore :D
22:51 tylercurtis jnthn, masak: thanks. I think I'll just stick with the more obvious but slightly more repetitive explicit way, though.
22:52 tylercurtis kthakore: Common Lisp beat us to rationals by quite a while.
22:52 kthakore tylercurtis: really?
22:52 * kthakore has to try lisp
22:52 masak tylercurtis: I probably would, too.
22:52 kthakore tylercurtis: is it just common lisp?
22:53 kthakore tylercurtis: how does it compare in arithmetic calcs to C?
22:53 tylercurtis kthakore: I'm not sure. Some other Lisps might, but I just know for sure that CL has rationals.
22:53 kthakore cool
22:54 kthakore tylercurtis: but perl5 gets it wrong for sure
22:54 tylercurtis Although they call them ratios(with rational being the supertype of ratio and integer).
22:54 kthakore so does C if you are not careful
22:54 kthakore java too
22:54 kthakore This is the most sense ever made in a sentence"rational being the  supertype of ratio and integer"
22:54 kthakore I really have to see common lisp
22:55 kthakore btw ... will perl6 have web REPL like learnhaskell.com or learnruby.com ?
22:55 kthakore that would be sweet
22:55 kthakore is anyone doing it?
22:55 kthakore I can try to halp
22:55 kthakore masak: jnthn ??
22:56 masak kthakore: people are on it, yes.
22:56 tylercurtis kthakore: http://github.com/moritz/try.rakudo.org
22:56 masak it would indeed be sweet.
22:56 tylercurtis kthakore: it's not complete yet, though, I don't think.
22:56 kthakore moritz_++
22:56 tylercurtis kthakore: ash_++, he's done a significant chunk of the work.
22:56 kthakore tylercurtis: I will go give it a shot and drop code where I can
22:56 kthakore tylercurtis: ah ok
22:56 masak moritz_ has been instrumental in the project. other people have written the actual HTML/CSS/code.
22:57 robjmj joined #perl6
22:57 lue joined #perl6
22:57 kthakore masak: ah ok
22:57 kthakore masak: I will talk to one of them to see where to help
22:58 kthakore they have no tickets
22:58 lue rakudo: my $a = 3*(1/3); my $b = 3/3; say "$a, $b,  {$a == $b}"
22:58 p6eval rakudo 9b6189: OUTPUT«1, 1,  1␤»
22:59 kthakore back to SDL perl lair
22:59 kthakore tylercurtis: masak jnthn thanks be back soon
22:59 kthakore we have release comming soo
22:59 kthakore soon
22:59 lue $a should _technically_ be 0.999999…, but at least it equals $b :)
23:00 kthakore lue: true!
23:00 kthakore a != b
23:00 kthakore well in mathematical proofs
23:00 tylercurtis lue: 0.9999... is also equivalent to 1.
23:01 kthakore lue: actually 3 * 1/3 = 1
23:02 kthakore it is like 3/3 * 1
23:02 cxreg right, that's exactly why .999 repeating == 1.  it's a number base issue.
23:02 masak lue: http://en.wikipedia.org/wiki/0.999...
23:03 lue 1/3 = 0.3…;  0.3… * 3 = 0.9…; there's why 3*(1/3) == 0.9…
23:03 kthakore what would be interesting to see is this: 3 * (1/3 - 1/10**10000 )
23:03 kthakore masak: how do I do power in perl6 ^ or **
23:03 kthakore rakudo: say 2**3
23:03 p6eval rakudo 9b6189: OUTPUT«8␤»
23:03 kthakore cool
23:03 tylercurtis kthakore: 1 / 10**10000 probably overflows to Num.
23:03 masak rakudo: say 2 ^ 3
23:04 p6eval rakudo 9b6189: OUTPUT«one(2, 3)␤»
23:04 kthakore rakudo: say ( 3 * ( 1/3 - 1/10*100 ) )
23:04 p6eval rakudo 9b6189: OUTPUT«-29␤»
23:04 kthakore rakudo: say ( 3 * ( 1/3 - 1/(10*100) ) )
23:04 p6eval rakudo 9b6189: OUTPUT«0.997␤»
23:04 kthakore hehe
23:04 kthakore rakudo: say ( 3 * ( 1/3 - 1/(10**100) ) )
23:04 p6eval rakudo 9b6189: OUTPUT«1␤»
23:04 kthakore there!
23:05 kthakore is that a bug or ... just too picky?
23:05 lue .oO(It was just a test! I know this already)
23:05 kthakore rakudo: my $a = ( 3 * ( 1/3 - 1/(10**100) ) ); say $a == 1
23:05 jnthn rakudo: sub postfix:<...>($n) { $n.ceiling }; say 0.999...
23:05 p6eval rakudo 9b6189: OUTPUT«1␤»
23:05 p6eval rakudo 9b6189: OUTPUT«1␤»
23:05 lue .oO[ I actually hope to someday prove the number  0.0…1 (point zero recurring one) exists and is equal to 0 ]
23:06 kthakore rakudo: my $a = 1; say $a.ceiling;
23:06 p6eval rakudo 9b6189: OUTPUT«1␤»
23:06 kthakore whut?
23:06 kthakore jnthn: what is limit of a number
23:07 lue rakudo: say (1/3).fmt('%x')
23:07 p6eval rakudo 9b6189: OUTPUT«0␤»
23:07 lue O.o
23:07 kthakore lol what?
23:07 kthakore no way
23:08 kthakore rakudo: printf( "%x", (1/3) );
23:08 p6eval rakudo 9b6189: OUTPUT«0»
23:08 kthakore rakudo: printf( "%x", (1/2) );
23:08 p6eval rakudo 9b6189: OUTPUT«0»
23:08 tylercurtis lue: "Let 0.0...1 refer to the result of subtracting the real number represented as 0.999.. with the "9" repeating infinitely from 1. Since 0.999... is equivalent to 1, 0.0...1 is equivalent to 0. Q.E.D".
23:08 lue rakudo: say (22).fmt('%x') # let's see if it's even working
23:08 p6eval rakudo 9b6189: OUTPUT«16␤»
23:08 kthakore rakudo: printf( "%x", (8) );
23:08 p6eval rakudo 9b6189: OUTPUT«8»
23:09 kthakore let me see perl5
23:09 jnthn kthakore: of the Num type?
23:09 jnthn Guess it's a double
23:09 kthakore jnthn: yea
23:09 tylercurtis "x   an unsigned integer, in hexadecimal"
23:09 kthakore tylercurtis: right! oops
23:09 kthakore hehe
23:09 kthakore 1/3 is 0 int
23:09 lue Integers Only? that's lame :/
23:09 kthakore lue no that is how format is set
23:10 lue rakudo: say :16<0.8>
23:10 p6eval rakudo 9b6189: OUTPUT«0.5␤»
23:10 kthakore rakudo: printf( "%g", (8) );
23:10 p6eval rakudo 9b6189: OUTPUT«8»
23:10 kthakore rakudo: printf( "%g", (1/3) );
23:10 p6eval rakudo 9b6189: OUTPUT«0.333333»
23:10 kthakore cool
23:11 kthakore bah ... this is too much fun
23:11 tylercurtis lue: wouldn't it be weird if sprintf had a totally different meaning for the same exact inputs in C, Perl 5, and Perl 6?
23:11 * jnthn goes to cook some noms to keep him going until it's airport time.
23:11 kthakore tylercurtis: that would be insanity ... please never ever change printf
23:11 cognominal joined #perl6
23:12 tylercurtis I'm not saying it wouldn't be worthwhile. Just that it would trip people up all the time.
23:12 lue tylercurtis: I know, that doesn't mean I have to like how it is :)
23:14 lue grr. "Just like Perl 5" doesn't mean you can !explain it.
23:15 lue rakudo: printf("%x", (16)); printf("%x", (22));
23:15 p6eval rakudo 9b6189: OUTPUT«1016»
23:15 dalek yapsi: 62ff73d | masak++ |  (4 files):
23:15 dalek yapsi: [Yapsi] big compiler/runtime refactor
23:15 dalek yapsi: Basically switched out everything. Yapsi now has a new Yapsi. It runs under
23:15 dalek yapsi: Rakudo master for the first time.
23:15 dalek yapsi: Three tests fail in t/compiler.t. Some odd effect cause t/runtime.t to fail
23:15 dalek yapsi: when nothing is printed from Yapsi.pm.
23:15 dalek yapsi: review: http://github.com/masak/yapsi/commit/62​ff73d804541505edd65adb3cced9f9255bfdd2
23:15 dalek yapsi: e8bd9d2 | masak++ | doc/ChangeLog:
23:15 dalek yapsi: [doc/ChangeLog] updated
23:15 dalek yapsi: review: http://github.com/masak/yapsi/commit/e8​bd9d29043aa8f3fdc3ef5b70875d6ffff58d8c
23:15 kthakore lue: the format for printf has been around for ages man
23:15 masak \o/
23:15 kthakore masak: \o/
23:16 lue Now that printf does what I thought it did, why not implement a sayf ?
23:16 lue masak++ \o/
23:16 kthakore lue: make a module then and use format any which way you want to
23:16 tylercurtis rakudo: sayf "%x", 16;
23:16 p6eval rakudo 9b6189: OUTPUT«Could not find sub &sayf␤  in main program body at line 22:/tmp/Q7BBOHtjJ2␤»
23:16 tylercurtis .u frowning face
23:16 phenny U+2639 WHITE FROWNING FACE (☹)
23:17 masak I will now take comments on http://github.com/masak/yapsi/b​lob/master/doc/announce/2010.08 for a while.
23:17 masak after that, I will go into release mode.
23:18 lue I can't help but wonder why there's no easy way to convert from decimal like we can convert to decimal. (printf, as we found, is not good enough)
23:19 masak lue: the truth is probably that there's not a terribly big need.
23:21 dalek yapsi: e4c7930 | masak++ | doc/announce/2010.08:
23:21 dalek yapsi: [doc/announce/2010.08] de-draftified
23:21 dalek yapsi: review: http://github.com/masak/yapsi/commit/e4​c79308fbf0e45ce3d27261a5194100df488911
23:21 dalek yapsi: 895382b | masak++ | doc/announce/2010.08:
23:21 dalek yapsi: [doc/announce/2010.08] commas comment
23:21 dalek yapsi: review: http://github.com/masak/yapsi/commit/89​5382be9e702156b6fefa14ca5a3fcd77c0deef
23:22 HarryS joined #perl6
23:22 lue yeah, the dissymmetry is annoying me though :D
23:22 masak lue: any comments on the release announcement before it goes out? :)
23:26 lue masak: good job, I, being me, happen to, of course, like it :)
23:27 jnthn masak: lol, the dugong made it in. :)
23:27 masak jnthn: twice!
23:28 jnthn doublegong
23:29 lue .oO(darn. All our special ink was made from the diamonds of Midnight, and no-one will go there anymore.)
23:30 masak jnthn: I added it in a third time in lieu of being serious. :)
23:31 tylercurtis masak: please leave the comma comment in the announcment.
23:31 tylercurtis announcement, rather.
23:31 masak tylercurtis: I plan to. :)
23:32 tylercurtis Is a negated character class in Perl 6 "<![abdkl r245]>"?
23:32 masak tylercurtis: or <-[...]>
23:33 masak tylercurtis: former is zero-width.
23:33 tylercurtis masak++ yay! I don't want zero-width.
23:33 masak that's what the pet dugong said!
23:33 dalek yapsi: fa5237a | masak++ | doc/announce/2010.08:
23:33 dalek yapsi: [doc/announce/2010.08] more dugong
23:33 dalek yapsi: review: http://github.com/masak/yapsi/commit/fa​5237a70762ce73e3d22ecdd200c5311e087638
23:34 masak jnthn++ # dugong!
23:34 * masak switches into release mode
23:34 * lue steps back
23:36 * shirtless gasps
23:36 shirtless interesting list comprehension behavior
23:37 shirtless should I file this as a bug? say 'A'..'z';
23:37 masak shirtless: not before you've read S03 at least once. :)
23:37 shirtless I will have to take alook
23:37 shirtless in the meanwhile try it, it might be good for generating entropy
23:37 tylercurtis non integer Ranges make me do this
23:37 masak shirtless: http://perlcabal.org/syn/
23:37 tylercurtis .u frowning face
23:37 phenny U+2639 WHITE FROWNING FACE (☹)
23:38 shirtless masak: thanks for th elink
23:38 masak you're quite welcome.
23:38 jnthn dug\o/ng!
23:42 masak yes! I got the date 2010-08-01 at http://github.com/masak/yapsi/downloads \o/
23:42 lue rakudo: say 256 * .125
23:42 p6eval rakudo 9b6189: OUTPUT«32␤»
23:45 masak mail sent to p6c. blog post coming up.
23:49 frooh if I want to add a method to a package, how do I do that exactly?
23:50 frooh I tried my &{"foo"} = sub (...) is export { ... };
23:50 frooh also our
23:50 frooh but neither of them exported (and maybe they didn't get defined?)
23:51 masak frooh: packages don't have methods. classes and roles do.
23:52 frooh sorry, I know
23:52 frooh I mean a sub anyway
23:52 frooh and still used the sub keyword
23:52 masak oh, ok.
23:53 masak the syntax you use looks p5-inspired. it doesn't work (and won't ever work) in p6.
23:53 frooh yeah...
23:53 frooh I thought patrick told me to try this
23:53 frooh becuase I'd tried *"foo" = ...
23:53 frooh because *that's* the p5 syntax
23:53 masak but doing 'our &method-name = sub (...) { ... }' should work.
23:54 masak thing is, I suspect you want 'method-name' to vary with the contents of some string.
23:54 frooh exactly
23:54 frooh hence the &{"..."} :-)
23:55 masak frooh: may I suggest eval?
23:55 frooh :-(
23:55 frooh srsly?
23:55 masak what you're trying to do is evil hackery anyway, so might as well :P
23:55 frooh no it isn't
23:55 frooh access to the symbol table?
23:55 frooh that's like... perl
23:56 masak I won't argue there.
23:56 frooh lemme try again with the our
23:56 frooh I didn't get an error
23:57 masak frooh: I have written a grammar engine in Perl 6, which extensively uses the "add a sub with some name only known at runtime" pattern, just like you do. I ended up using eval. I didn't regret it.
23:58 frooh masak: is that due to missing features or extra power?
23:58 Psyche^ joined #perl6
23:59 masak I see it this way. the 'sub somename (...) { ... }' idiom is for when you know the name of your sub at authoring-time, which is like 99% of the cases.

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

Perl 6 | Reference Documentation | Rakudo