Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2009-08-08

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 mberends The audience response to pmichaud++'s lightning talk to announce Rakudo * was the highlight of the conference. The first mention of the name got a huge ovation :) It was a total surprise to everyone, and immediately was so right. Just imagine crowd elation.
00:02 colomon :)
00:10 mberends hmm, feather's security certificate expired 2009-06-25: https://feather.perl6.nl/irc/
00:18 diakopter sho nuff
00:20 nErVe joined #perl6
00:23 sjohnson sup d00dz
00:24 japhb We down with OPP (Other Perl Projects)
00:29 KyleHa Dude.  Your NBN reference has left me dumbfounded.
00:30 japhb KyleHa: whyso?
00:32 KyleHa I don't doubt that it's in no small part due to my current mental state.  That is, I'm relying pretty heavily on the lizard brain right now, and that's kind of outside its scope.
00:33 japhb heh
00:46 meppl good night
00:47 __ash__ joined #perl6
00:51 Jedai joined #perl6
01:43 pugs_svn r27896 | kyle++ | [t/spec] Test for RT #67790
01:43 pugs_svn r27897 | kyle++ | [t/spec] tests for RT #67786
02:28 colomon rakudo: my @a = gather loop (my $i = 1; $i < 10; $i++) { take $i }; @a.perl.say;
02:28 p6eval rakudo 7717c4: OUTPUT«[10, 10, 10, 10, 10, 10, 10, 10, 10]␤»
02:28 colomon rakudo: my @a = gather loop (my $i = 1; $i < 10; $i++) { take +$i }; @a.perl.say;
02:28 p6eval rakudo 7717c4: OUTPUT«[1, 2, 3, 4, 5, 6, 7, 8, 9]␤»
02:32 wayland76 Morning all :)
02:33 colomon morning.  don't suppose you understand gather?  :)
02:37 colomon I think what I don't understand has something to do with take returning a Capture.  But I don't see how the examples in S04 are different than my first gather statement above, yet the results they return correspond to my second example...
02:39 KyleHa If there are tests for it, that might be instructive.
02:39 KyleHa In that case, you can see how it should work and check to see whether it does work that way.
02:40 colomon S04-statements/gather.t
02:41 colomon Huh.  That just leaves me more confused, actually.
02:42 colomon rakudo: my @a = gather for 1..10 -> $i { take $i }; @a.perl.say;
02:42 p6eval rakudo 7717c4: OUTPUT«[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]␤»
02:42 colomon Yup, I totally do not get why this is different than the first loop statement version.
02:43 colomon Ah, looks like RT #63634 is gather doesn't work with while -- wonder if loop is the same bug?
02:44 KyleHa I was just about to say that.
02:45 KyleHa rakudo: my @a = gather { loop ( my $i = 1; $i < 10; $i++ ) { take $i } }; say @a.perl;
02:45 p6eval rakudo 7717c4: OUTPUT«[10, 10, 10, 10, 10, 10, 10, 10, 10]␤»
02:46 KyleHa rakudo my @a = gather loop ( my $i = 1; $i < 10; $i++ ) { my $x = $i; take $x; }; @a.perl.say;
02:46 KyleHa rakudo: my @a = gather loop ( my $i = 1; $i < 10; $i++ ) { my $x = $i; take $x; }; @a.perl.say;
02:46 p6eval rakudo 7717c4: OUTPUT«[1, 2, 3, 4, 5, 6, 7, 8, 9]␤»
02:47 KyleHa Yep.  It's a bug.
02:47 colomon Also RT #62178?
02:47 colomon I'm not good at searching RT yet.
02:47 KyleHa Well, that one was merged with the other one you found, so yes.
02:48 KyleHa It would be good to note that the bug also affects 'loop'.  I suspect the patch to fix it will fix them both, but I'm hardly learned enough to know.
02:49 colomon Is noting that as simple as sending an e-mail to rakudobug with 63634 in the subject line?
02:49 colomon I can add a test for it.
02:50 KyleHa That would be awesome.  testing++
02:50 KyleHa It is as easy as sending an email, but I think the subject has to be a little more specific, and I'm not sure it's to rakudobug.
02:50 KyleHa I can find out for sure in just a moment...
02:52 KyleHa It's perl6-bugs-followup@perl.org with a subject that has "[perl #62178]" in it.
02:56 pugs_svn r27898 | colomon++ | Added "todo" test for gather/take with loop.
02:56 colomon KyleHa++
02:56 colomon I'll take care of the e-mail, too, then go to bed.
02:57 PZt joined #perl6
02:58 colomon Actually, wait -- is the current number 63634 or 62178?  Which was merged into the other?
02:58 KyleHa We usually merge later tickets into earlier ones.  That's true with these two also.  The 63k was merged into the 62k.
03:00 colomon Okay, done.
03:00 pugs_svn r27899 | colomon++ | RT #63634 was merged into RT #62178, change the "todo" comments to reflect this.
03:01 KyleHa I looked at the test and didn't even notice that.  8-)
03:01 colomon Good night!
03:02 KyleHa Good night!
03:05 nihiliad joined #perl6
03:07 ginkgo joined #perl6
03:07 ginkgo ?eval say "hi"
03:20 donaldh joined #perl6
03:36 sri_kraih_ joined #perl6
03:59 alester joined #perl6
04:01 pmichaud good morning, #perl6
04:11 wayland76 Good localtime() :)
04:11 wayland76 Have you recovered yet?
04:16 pmichaud no.
04:16 pmichaud well, yes.
04:16 pmichaud well, it depends.
04:16 pmichaud I just got home about an hour ago.  Probably will have a messed up sleep schedule for a few days.  But then I always have a messed up sleep schedule, so....
04:34 zol joined #perl6
04:34 Aisling_ joined #perl6
04:34 mofino joined #perl6
04:38 pmichaud (sigh)  we're getting lots of spectest fails on my machine
04:39 jiing joined #perl6
04:42 pmichaud in lives_ok { $test6 = Quux.^bar}, 'class attribute accessible via ^name';
04:42 pmichaud argg
04:42 pmichaud in t/spec/S12-attributes/class.t we have
04:42 pmichaud lives_ok { $test6 = Quux.^bar}, 'class attribute accessible via ^name';
04:42 pmichaud ....huh?
04:46 pmichaud (reading spec)
04:47 pmichaud okay, I can see that.
04:47 pmichaud In general it looks to me like we're getting far too many "lives_ok" and "eval_dies_ok" tests in the suite.
04:48 pmichaud I'd prefer to just #?rakudo skip things that don't work.
05:01 pugs_svn r27900 | pmichaud++ | [t/spec]:  Fudge a couple of failing .HOW-related tests in meta-class.t.
05:04 pugs_svn r27901 | pmichaud++ | [t/spec]  Rakudo fudge (regress) some tests in S12-enums/basic.t
05:04 pugs_svn r27901 | pmichaud++ | that have been failing for a few weeks.
05:10 SmokeMachine joined #perl6
05:39 missingthepoint joined #perl6
05:40 missingthepoint howdy all
05:41 missingthepoint i've a question... how can one do a use_ok()-type call currently?
05:42 missingthepoint (i'm trying to bend Test.pm to my will and not having much success ;)
05:51 orafu joined #perl6
06:10 wayland76 I was wondering the same thing as missingthepoint the other day, but never did find out
06:19 missingthepoint wayland76: it seems use errors aren't caught by try blocks. i don't know if this is according to spec.
06:20 missingthepoint (in rakudo)
06:36 missingthepoint ah, eval 'use ...' or die "caught: $!" does what I want.
06:36 wayland76 Thanks!  I'll keep that in mind
06:37 missingthepoint no problem... i think try {} not handling use exceptions is a rakudobug, will submit unless you can tell me otherwise :)
06:40 dduncan joined #perl6
06:40 dduncan left #perl6
07:02 wayland76 missingthepoint: it's probably a rakudobug, but just check whether it's a control exception or not -- try/catch doesn't work on control exceptions
07:21 donaldh joined #perl6
07:22 nperez joined #perl6
07:23 nperez ping
07:23 mberends nperez: pong
07:24 japhb joined #perl6
07:24 nperez so I was curious about select() in rakudo
07:25 mberends not yet implemented, unfortunately, otherwise people would be busy porting POE and stuff already
07:25 nperez I'd like to work on a naive port of POE to rakudo but I am not finding select, heh
07:25 mberends hah
07:25 nperez so what is the level of effort required
07:25 nperez I'd like to work on it
07:26 nperez does select() exist in parrot land and it merely needs to be abstracted up in rakudo?
07:27 mberends nperez: it's probably quite tough, because the IO classes are tricky. Yep, it's Parrot work that may be incomplete. You'd have to confirm first whether Parrot has a select()-ish feature. I dunno.
07:28 nperez acknowledged
07:31 mberends well select() is not where you expect to find it in http://docs.parrot.org/parrot/latest/html/do​cs/book/draft/ch10_opcode_reference.pod.html
07:32 abra joined #perl6
07:39 Su-Shee joined #perl6
07:39 Su-Shee good mornings stars and starlets. :)
07:41 mberends gute morgen :)
07:44 Su-Shee mberends: is this actual german? :) if so - read the rakudo announcement on heise.de?
07:45 huf_ isnt that "guten"?
07:45 huf_ or... wait
07:45 mberends I hack german, because I'm dutch. I helped lichtkind++ with some de->en translation of his Perl 6 Tablets. We met in Lisbon too.
07:46 Su-Shee mberends: ah. I've placed your name at the coast anyway. :)
07:47 * mberends reads the 'Fr�hjahr 2010' article :)
07:51 wayland76 Früh = ???
07:51 mberends early, (Spring)
07:52 Su-Shee wayland76: german spring is literally "early in the year" ;)
07:52 wayland76 Ok
07:53 missingthepoint I think the German was kind to Pm... he wanted it somewhat imprecise :)
07:53 wayland76 Yeah, I figured :).  I figured out the "jahr" part somehow (no idea how), but the rest was beyond me :)
07:53 molaf joined #perl6
07:54 missingthepoint wayland76: force-fed German in primary school like me?
07:55 wayland76 No, never studied any German at all :)
07:55 missingthepoint your loss ;)
07:55 wayland76 But have picked up little bits of Old English, and other bits and pieces along the way :)
07:55 Su-Shee yes! all this nice grammar and inflection! ;)
07:55 wayland76 Well, I got French instead (although only in secondary school)
07:56 wayland76 Anyway, I'm being called for food.  afk&
07:56 huf Su-Shee: dont forget nouns with genders.. that part pissed me off always
07:57 Su-Shee huf: weren't you hungarian?
07:57 huf yeah
07:57 huf we have even less gender in the language than english
07:57 huf no he/she distinction
07:57 Su-Shee huf: yeah, because after doing your inflection style, there wasn't much left for other parts of grammar. ;)
07:58 huf oh, believe me we could put a lot of shit in :) but not genders. that is insane.
07:58 Su-Shee I had hungarian lessons for a few weeks.
07:58 huf how is a table or some cheese more male than not? does this make any sense to you?
07:59 huf this was a large part of my problem with hebrew too
07:59 Su-Shee huf: ask the greek and romans, we have more or less adopted their gender roles.
07:59 mberends the heise.de article has 110 comments, too much to quickly peruse, there are supporters and detractors there.
08:00 Su-Shee mberends: ah, yes. I see. I usally avoid reading comments - better for my health. ;)
08:01 Su-Shee mberends: half of it is stupid crap anyway. grr.
08:02 mberends yes, the backlogs on perlgeek.de are enough. it was just some curiosity about the wider public perception, that Rakudo * also aims to address.
08:02 Su-Shee yeah, under that impression it's interesting indeed.
08:03 Su-Shee "who needs this old crap" "perl is garbage anyway" "programming language x is cleaner/faster/better" ;)
08:04 moritz_ 'morning
08:04 Su-Shee hi moritz. :)
08:05 mberends hi moritz_, have you seen http://www.heise.de/developer/news/for​en/S-Perl-6-kommt-im-Fruehjahr-2010-zu​mindest-teilweise/forum-163655/list/ ?
08:07 Su-Shee Now I'm angry again. :) "Perl 6 isn't Perl"
08:07 moritz_ mberends: not the comments, no
08:07 Su-Shee moritz_: if you care for your blood pressure: don't. ;)
08:08 charsbar joined #perl6
08:09 moritz_ Su-Shee: I'm youg enough not to care too much for my blood pressure
08:10 Su-Shee reading comments will change that fast. ;)
08:12 mberends We must be realistic and acknowledge the valid points other people make. Kool-Aid will not sustain us. Good working code is the best weapon, and that's what we'll have by April.
08:15 Su-Shee I've started to ask friends and fellow developers what would convince them to give perl 6 a try. interestingly, they all "somehow" liked perl5 and seemed to be very open minded for a more modern perl version. so, that's something to emphasize.
08:18 mberends you can try a lot of Perl 6 on a Perl 5 system: http://search.cpan.org/search​?query=perl6&amp;mode=module
08:21 Su-Shee mberends: yeah, but rakudo works really well for quite some time and is no problem under Linux, so I usally recommend rakudo.
08:23 mberends agreed. the Perl 6->5 efforts are for certain scenarios: 1. company policy 2. existing code 3. functionality (DB etc) 4. speed
08:24 Su-Shee the speed thing is sadly the first thing you notice.
08:26 mberends Moose is also doing an excellent job of providing a semantically compatible object system.
08:27 araujo joined #perl6
08:27 Su-Shee Moose is really nice, I've just started to read up with Dave Rolsky's documentation and to experiment a little.
08:28 Su-Shee on the other hand.. I can have Rakudo now.. :)
08:31 Jedai joined #perl6
08:35 zamolxes joined #perl6
08:48 colomon I've kept on bumping into the speed thing all week.  Seems like Rakudo is routinely at least 100x slower than you'd like it to be.
08:49 kane_ joined #perl6
08:49 colomon One script I wrote was 5000x times slower than the Perl 5 version.  :(
08:50 Su-Shee "oh yeah." :)
08:53 mberends Improving speed is also on the roadmap for Rakudo * and there are known bottlenecks due to be fixed soon according to pmichaud++ and jnthn++, and they always deliver what they promise :)
08:53 missingthepoint something interesting i read recently re: the speed issue: http://awarth.blogspot.com/2009/01/u​se-of-prolog-for-developing-new.html
08:53 missingthepoint (meta, links to another paper but has insightful commentary)
08:55 tann joined #perl6
08:55 Su-Shee mberends: I wasn't really complaining, I'm sure it'll be fixed in time.
08:55 missingthepoint 404, sorry... http://www.sics.se/~joe/pubs/prac_appl_prolog.ps seems to work :)
08:55 fridim_ joined #perl6
08:58 colomon mberends: I understand there are plans to deal with it.  It's just that from my perspective playing around with Rakudo, the biggest thing stopping it from feeling like a "real" tool today is the speed.
08:59 colomon That's actually an amazing testament to all the work done in the last six months!
08:59 missingthepoint colomon: true
09:02 missingthepoint pleasant remainder-of-day to you all :)
09:05 eMaX joined #perl6
09:06 mberends Not only the (lack of) speed hurts, also the amount of memory used bothers me. It seems to be a consequence of continuation passing style, and not using stacks. The heap is used instead, and that is expensive. The consolation will be that while very simple algorithms will take longer, we get far more powerful algorithms (eg hypers, laziness) that boost our more complex applications. Much of that is not yet implemented, unfortunately.
09:08 moritz_ mberends: I think it's more that everything is boxed
09:10 mberends moritz_: also that, yes.
09:13 hanekomu joined #perl6
09:20 wayland76 The thing that makes it not feel like a real tool to me is the Null PMC errors :).  But those will be fixed in time :)
09:21 hanekomu joined #perl6
09:28 eMaX joined #perl6
09:29 hah joined #perl6
09:33 hanekomu joined #perl6
09:51 zamolxes joined #perl6
10:05 pugs_svn r27902 | mberends++ | slides for "Perl 6 for Perl 5 Programmers" from YAPC:EU 2009, Lisbon
10:25 Whiteknight joined #perl6
10:54 morenel joined #perl6
11:20 donaldh joined #perl6
11:30 meppl joined #perl6
12:00 colomon wayland76: But that's kind of what I'm getting at -- for me, I'm only getting occasional Null PMC errors, and only when I try something "out there".  The speed stuff is every time I try a program with a good-sized loop.
12:01 wayland76 Hmm.  Well, I'm working on maybe 5 programs, and at least 3 of those are stuck on null PMCs
12:02 wayland76 I suspect a difference in programming styles
12:02 wayland76 (Which is fine, of course :) )
12:08 KyleHa joined #perl6
12:17 KyleHa I've always had the spectest fail on S12-attributes/class.t and S14-roles/basic.t, and I'm wondering if there's something my system is missing.  They pass everything fine and then barf on exit.
12:18 Front_slash joined #perl6
12:19 moritz_ KyleHa: it fails for everybody
12:19 KyleHa Oh.  Well, that explains it.
12:19 moritz_ it's the so-called "inferior run-loop" problem
12:20 KyleHa Too many croaking evals.  Ribbit.
12:23 KyleHa Is there a way to tell 'make spectest' how many jobs to run?
12:24 moritz_ in the TEST_JOBS env variable, iirc
12:24 moritz_ yes
12:25 KyleHa Yep, that seems to work.
12:26 moritz_ KyleHa: do you have your commit bit yet?
12:26 KyleHa Not that I know of.
12:27 moritz_ when you go to http://github.com/rakudo/rakudo/ and see a "Your Clone URL", you have it ;-)
12:28 KyleHa That's good to know; I was wondering how I could tell that.
12:29 KyleHa It says "Clone URL", but not 'Your'.
12:29 lisppaste3 joined #perl6
12:29 moritz_ then pmichaud++ hasn't added you
12:30 KyleHa He's a busy man.
12:30 moritz_ right; let's remind him when he's back online ;-)
12:31 KyleHa *nod*
12:31 colomon wayland76: Crazy!
12:32 colomon wayland76:  I haven't had a Null PMC that I couldn't work around in five minutes or so.  Usually they just make me do something elegantly rather than extremely elegantly.  :)
12:32 wayland76 phenny: tell pmichaud KyleHa needs a commit bit on github
12:32 phenny wayland76: I'll pass that on when pmichaud is around.
12:32 wayland76 lambdabot: @tell pmichaud KyleHa needs a commit bit on github
12:32 lambdabot Consider it noted.
12:32 wayland76 Thaqt should cover it :)
12:32 moritz_ wayland76: he, don't spam him ;-)
12:33 moritz_ phenny: tell pmichaud github id is 'kyleha'
12:33 phenny moritz_: I'll pass that on when pmichaud is around.
12:33 moritz_ .o( let me do that ;-)
12:33 wayland76 lambdabot: @tell phenny Do bots talk to bots?
12:33 lambdabot Consider it noted.
12:33 wayland76 phenny: tell lambdabot do bots talk to bots?
12:33 phenny wayland76: I'll pass that on when lambdabot is around.
12:33 lambdabot phenny: You have 1 new message. '/msg lambdabot @messages' to read it.
12:33 phenny lambdabot: 12:33Z <wayland76> tell lambdabot do bots talk to bots?
12:34 wayland76 Ok, they do :)
12:34 * wayland76 refrains from setting up infinite loops and things
12:34 moritz_ wayland76: since lambdabot doesn't deliver the message directly, it's a bit hard
12:35 wayland76 phenny: tell lambdabot @messages
12:35 phenny wayland76: I'll pass that on when lambdabot is around.
12:35 moritz_ oh.
12:35 wayland76 FSVO "hard" :)
12:37 moritz_ FSVO of "moritz stupid" ;-)
12:38 moritz_ rakudo: my $a = any({ .say }, { say $_ x 2}); $a('foo')
12:38 p6eval rakudo 7717c4: OUTPUT«foo␤foofoo␤»
12:38 moritz_ rakudo++
12:40 pugs_svn r27903 | kyle++ | [t/spec] mark some infinite loop skip fudges as "noauto" for autounfudge.pl
12:41 moritz_ KyleHa: ah, I didn't bother with that, because I use the autounfudge.pl from the autounfudge-with-limits branch
12:41 moritz_ which has a CPU time limit
12:42 KyleHa Will that ever be merged into master?
12:42 moritz_ that's a good question
12:42 moritz_ it's a rather crude hack
12:42 moritz_ something of which I'm not proud at all
12:43 KyleHa Sounds useful anyway.  8-)
12:45 KyleHa I tried autounfudge just to get to know it, and it had about 4G of memory when I gave up on it.
12:45 moritz_ yes, memory limit is also done in that branch ;-)
12:45 moritz_ t/spec/S06-operator-overloading/method.t looks rather broken
12:46 moritz_ I can't find the spec that says that prefix operators can be methods
12:48 moritz_ rakudo: for 1..10 { .say; last }
12:48 p6eval rakudo 93f2fc: OUTPUT«1␤»
12:50 KyleHa rakudo: my List $x = <1 2 3>; say $x.WHAT;
12:50 p6eval rakudo 93f2fc: OUTPUT«Array()␤»
12:50 KyleHa That surprises me.
12:50 moritz_ Array ~~ List
12:50 moritz_ rakudo: say Array ~~ List
12:50 p6eval rakudo 93f2fc: OUTPUT«1␤»
12:51 KyleHa rakudo: say List ~~ Array
12:51 p6eval rakudo 93f2fc: OUTPUT«0␤»
12:51 KyleHa Fair enough.
12:52 colomon Does that mean an Array is a kind of List?
12:52 KyleHa Other way.  A list is a kind of Array.
12:53 moritz_ no, colomon was correct
12:53 moritz_ an Array is a List that is also mutable
12:53 moritz_ it adds behaviour to the List
12:53 KyleHa I'm surprised again!
12:54 KyleHa I guess I expect the Array to 'be' the List just by forbidding the operations the List does not support.
12:55 moritz_ actually it's a bit more complicated even
12:55 moritz_ List is a (parametric) role
12:55 moritz_ I think that Array is also a role
12:56 moritz_ and Array does List
12:56 moritz_ and List does Positional
12:56 moritz_ and Everybody is Surprised
12:56 colomon I don't know how much Perl 6 follows the Lyskov Substitution Principle, but that's what makes sense here.   Any function that expects a List should work just fine on an Array.  But vice versa wouldn't work.
12:57 moritz_ colomon: we do know about Liskov, and try not to surprise her ;-)
12:57 colomon (Not sure how well these definitions fit with my intuitive non-Perl sense of what those terms mean, mind you.)
12:57 colomon Yeah, not following Liskov is one of the things that makes me want to smack programmers whose code I have to work with.
12:58 colomon Ugh horrible syntax.  I mean, I try to follow it strictly.  But I have to use code which doesn't, and I hate it.
12:58 pancake joined #perl6
13:00 JimmyZ joined #perl6
13:00 pugs_svn r27904 | moritz++ | [t/spec] remove eval from last.t; vim modelines
13:02 pugs_svn r27905 | kyle++ | [t/spec] More types tests from moritz++ on IRC
13:02 KyleHa Moritz, could you confirm that my test descriptions are correct?
13:03 moritz_ KyleHa: they are fine
13:03 KyleHa Thanks!
13:04 moritz_ git-rebase -i kinda surprises me
13:04 moritz_ I have to tell it the last revision that I leave unchanged
13:04 moritz_ not the first I want to change
13:04 moritz_ that feels... odd
13:05 moritz_ how do you rebase the first commit, then?
13:07 xinming joined #perl6
13:10 KyleHa I think { $p ?? $t !! $f } makes more sense anyway, whether one wanted to steal the colon for something else or not.
13:10 moritz_ ah, you read the presentation ;-)
13:10 moritz_ I agree; but it took me quite some time to get used to it
13:11 moritz_ and many still do it wrong
13:11 KyleHa I'm part way through it...
13:12 moritz_ std: 1 ~~ Seq
13:12 p6eval std 27903: OUTPUT«ok 00:02 37m␤»
13:12 fridim_ joined #perl6
13:14 KyleHa This might be improved slightly by references to the Syn whence each frame comes.
13:17 moritz_ well, the presentation is mostly meant for those that were at YAPC
13:17 moritz_ most of them didn't have the synopsis available at that time anyway
13:17 moritz_ if it were a scientific talk I'd agree
13:19 KyleHa Either way, it totally lives up to the hype.
13:19 moritz_ aye
13:19 moritz_ mberends++
13:19 JimmyZ Hello, #perl6
13:20 pugs_svn r27906 | moritz++ | [t/spec] remove a duplicate test and some evals
13:21 moritz_ hi JimmyZ
13:22 KyleHa autounfudge has 4.2G of memory again.  It's nice to have 8G.
13:22 moritz_ ;-)
13:27 M_o_C joined #perl6
13:37 colomon Does that +- operator (in the talk) work currently in Rakudo?!
13:50 maja joined #perl6
14:02 mberends aw, thanks guys :) it's a pity there's no audio. colomon, you can define your own unicode operator to make it work.
14:03 mberends rakudo: sub infix:<�> ($l, $r) { $l-$r | $l+$r }; my $a = 5 � 2; if $a == 3 { "HAZ 3".say } if $a == 7 { "HAZ 7".say }
14:03 p6eval rakudo c13df6: OUTPUT«HAZ 3␤HAZ 7␤»
14:03 colomon rakudo++ mberends++
14:04 colomon Every time I see someone diss operator overloading I want to hit them.
14:05 colomon Just saw a big article arguing "How often do you need to define a class that can really justifiably overload operator +?"
14:05 colomon But that's the wrong question -- should be "How often do you use a class that really justifiably should overload operator +?"
14:05 colomon And for me the answer is pretty much every day.
14:06 mberends indeed. btw, your Texas +- is also ok:
14:06 mberends sub infix:<�> ($l, $r) { $l-$r | $l+$r }; my $a = 5 � 2; if $a == 3 { "HAZ 3".say } if $a == 7 { "HAZ 7".say }
14:06 mberends gah
14:06 KyleHa Why's it called "Texas"?
14:06 mberends big and crude
14:07 KyleHa Heh.
14:07 mberends sub infix:<+-> ($l, $r) { $l-$r | $l+$r }; my $a = 7 +- 2; if $a == 5 { "HAZ 5".say } if $a == 9 { "HAZ 9".say }
14:07 colomon Thought it might.  Sweet!
14:07 mberends rakudo: sub infix:<+-> ($l, $r) { $l-$r | $l+$r }; my $a = 7 +- 2; if $a == 5 { "HAZ 5".say } if $a == 9 { "HAZ 9".say }
14:07 p6eval rakudo c13df6: OUTPUT«HAZ 5␤HAZ 9␤»
14:08 colomon Somehow I was under the impression that neither operator overloading nor unicode functions really worked yet.  Apparently I was wrong!
14:09 mberends more than in almost every other language, Perl 6 operators are just syntactic sugar for subroutines :)
14:09 KyleHa Defining one's own operators has worked for quite a while.  I recall it being demonstrated at YAPC::NA a year ago.
14:09 colomon (Now contemplating defining a 3D vector class just to do cross and dot products with the proper symbols...)
14:10 mberends colomon++: it should be no problem, just a small matter of programming the algorithm ;)
14:10 cogno joined #perl6
14:11 colomon And figuring out how to do Unicode in my editor.  (Which should also be simple, admittedly.)
14:11 mberends colomon: what OS do you use?
14:12 colomon OS X on this machine.  Well, and Windows XP on this machine as well.
14:12 colomon Also have 64-bit VIsta and three different Linuxes running in the house.
14:13 colomon I'm sure TextMate can do Unicode, I just don't know the magic invocations to get it.
14:13 KyleHa Sometimes there's a "character map".
14:14 cogno colomon, I tought texmate did Unicode by default
14:15 mberends oh wow. my ubuntu has character map tool, also right-alt + anotherkey does a few (aka AltGr). � is AltGr+z and � is AltGr+x.
14:16 KyleHa I think I'd just as soon use Texas style as figure out how to type Unicode.
14:17 nihiliad joined #perl6
14:18 mberends AltGr+qwertyuiop gives @łe¶ŧ←↓→øþ
14:18 KyleHa The "cartoon cursing" operator?
14:18 mberends heh :)
14:19 cogno With texmate that should not be difficult to add macros to generate appropriate Unicode chars
14:19 colomon rakudoL:+
14:19 colomon whoops.
14:20 colomon rakudo: sub infix:<⋅>($a, $b) { return [+]($a <<*>> $b); }; say (1,2,3)⋅(3,4,5);
14:20 moritz_ on the german keyboard AltGr+y -> «
14:20 p6eval rakudo c13df6: OUTPUT«26␤»
14:20 moritz_ on the german keyboard AltGr+x -> »
14:20 colomon rakudo++
14:20 colomon That's pasted from TextMate (don't know how to enter Unicode in my IRC client, either!).
14:20 moritz_ maybe it's AltGr + any< z x > on the US keyboard
14:21 colomon Edit / Special Characters brings up a tool for entering funky characters.  And apparently Unicode is on by default.
14:21 reppie there's no AltGr on US keyboard :)
14:22 moritz_ well, on linux you can always use compose + < + <
14:29 colomon Cross product works as well, though it's a bit long to enter as a one-liner here.
14:29 mberends colomon++
14:29 colomon I need to get to real work, but I was serious about working on a vector class -- worth it just for the fun of finally having the proper notation available.
14:30 M_o_C <@moritz_> on the german keyboard AltGr+y -> «: On Linux that is?
14:30 moritz_ M_o_C: yes
14:32 M_o_C Btw, is unicode character support specced as required or optional?
14:32 mberends colomon: a vector class would be very handy, there are already some svg tools to render output to a browser.
14:32 moritz_ required.
14:33 * moritz_ wonders if how sensible it would be to port a C++ linear algebra library with expression templates to Perl 6
14:34 moritz_ s/if//
14:34 mberends moritz_ it may not be sensible, but do it anyway ;)
14:35 mberends http://en.wikipedia.org/wiki/Compose_key
14:35 colomon mberends: Can you point me where I'd need to look?  I was thinking 3D math because that's my day job, but if I can help product something useful and teach myself more Perl 6 at the same time, that would be pretty worthwhile IMO.
14:35 colomon moritz_: What C++ library?
14:37 moritz_ colomon: I was thinking of eigen2
14:37 colomon moritz_: I'm not familiar with that, looks interesting.
14:38 Su-Shee vector classes? wrap cairo.
14:38 mberends colomon: http://github.com/perl6/perl6-examples/tree/97​20129dd09936b026ed1f539c2fa25dde316104/lib/SVG and http://github.com/masak/svg/tree/master
14:40 colomon mberends: are those two forks of the same package or two different packages?
14:41 mberends masak++ is drawing 3D perspective in his Druid game as well, you may be able to collaborate with him. Those are all separate projects.
14:42 mberends afk &
14:52 Psyche^ joined #perl6
14:56 Chillance joined #perl6
15:13 JimmyZ joined #perl6
15:18 Khisanth joined #perl6
15:21 donaldh joined #perl6
15:27 whoisthatgoksie joined #perl6
15:31 whoisthatgoksie hi
15:32 whoisthatgoksie join perl6
15:37 Khisanth joined #perl6
15:56 Khisanth joined #perl6
16:11 pmurias joined #perl6
16:13 Khisanth joined #perl6
16:13 codeacrobat joined #perl6
16:15 codeacrobat hi can anyone update the tutorial links on perl6.org, they all point to nirvana e.g. http://perl6.org/doc//books/​tutorial/ch01_overview.html
16:20 kane_ joined #perl6
16:29 JimmyZ see http://perl6-projects.org/
16:29 pugs_svn r27907 | pmichaud++ | [t/spec]:  Fudge out some tests that have regressed for a while
16:30 moritz_ RT #68318 looks invalid to me
16:34 aindilis joined #perl6
16:36 Khisanth joined #perl6
16:38 moritz_ replied, rejected.
16:39 moritz_ ENODALEK
16:46 alester joined #perl6
16:50 codeacrobat @JimmyZ what has http://perl6-projects.org/ to do with perl6.org link errors?
16:50 lambdabot Unknown command, try @list
16:50 phenny lambdabot: 12:35Z <wayland76> tell lambdabot @messages
16:51 codeacrobat @JimmyZ what has http://perl6-projects.org/ to do with perl6.org link errors?
16:51 Guest14327 joined #perl6
16:52 pugs_svn r27908 | moritz++ | [t/spec] remove some incorrect tests from unicode.t
16:52 pugs_svn r27909 | moritz++ | [t/spec] removed useless eval
16:53 JimmyZ codeacrobat: http://perlcabal.org/svn/pugs/browse/docs/tutorial
16:55 codeacrobat JimmyZ:I know about the tutorials. I just think it is bad pr if you google for perl6 and tutorial and end up with dead links...
16:55 JimmyZ ahh
16:55 codeacrobat at least a link to the proper location should be placed on perl6.org
16:57 moritz_ I don't know who maintains perl.org, but it doesn't seem to be a community project
16:57 moritz_ I'd really like to establish perl6-projects.org as *the* central website for Perl 6 stuff
16:57 moritz_ and also replace dev.perl.org/perl6/ which is mostly out of date
16:57 Su-Shee moritz_: already planned for that.
16:58 JimmyZ perl6.org is out of date.
16:58 cognominal we should learrn from haskell.org
16:58 moritz_ Su-Shee: one step closer to world domination? ;-)
16:58 Su-Shee moritz_: already have half of a design, better suited for extensability.
16:58 Su-Shee moritz_: I want the success of Perl 6. :)
16:59 JimmyZ Su-Shee: Everyone here does.
17:00 Su-Shee JimmyZ: well that's no surprise :)
17:00 JimmyZ Su-Shee: ;)
17:01 * JimmyZ must sleop
17:01 JimmyZ good night
17:01 Su-Shee moritz_: I've planned a very plain and easy/fast to read startpage and a better separation of interesting subjects and a dedicated list of business reasons to use perl 6.
17:02 Su-Shee moritz_: think of the demans "show me - real examples" "tell me - how to do business" - "give me - the source" "read me - some documentation" and so on.
17:02 Su-Shee demands.
17:03 dukeleto joined #perl6
17:03 dukeleto howdy
17:04 pugs_svn r27910 | kyle++ | [t/spec] Convert todo+lives_ok to skip
17:07 KyleHa joined #perl6
17:09 Guest14327 joined #perl6
17:13 kane_ joined #perl6
17:29 KyleHa I have a commit to add a "# vim: ft=perl6" line to every t/spec .t file that doesn't have one.  It changes some 400 files.  Any reason I should hold it?
17:37 goksie joined #perl6
17:40 frew joined #perl6
17:42 mberends KyleHa: you can count on my forgiveness ;)
17:45 frew joined #perl6
18:33 KyleHa May revision control have mercy on my soul.
18:35 pugs_svn r27911 | kyle++ | [t/spec] Add vim: lines everywhere.
18:35 pugs_svn r27911 | kyle++ |
18:35 pugs_svn r27911 | kyle++ | perl -e 'my %h;@h{`grep -rl "use v6" t/spec`}=();delete @h{`grep -rl "vim:" t/spec`};print keys %h'
18:35 pugs_svn r27911 | kyle++ |     | grep '\.t$'
18:35 pugs_svn r27911 | kyle++ |     | xargs perl -pi -e 'if (eof) {print "$_\n# vim: ft=perl6\n";$_=""}'
18:36 fredrecsky joined #perl6
18:44 Su-Shee left #perl6
18:46 masak joined #perl6
18:47 pmichaud moritz_: At YAPC::EU I asked TimToady++ about replacing dev.perl.org/perl6/ with a link to perl6-projects.org, and he thought it was a good idea.
18:47 phenny pmichaud: 12:32Z <wayland76> tell pmichaud KyleHa needs a commit bit on github
18:47 lambdabot pmichaud: You have 4 new messages. '/msg lambdabot @messages' to read them.
18:47 phenny pmichaud: 12:33Z <moritz_> tell pmichaud github id is 'kyleha'
18:47 pmichaud I'll see if I can do that this weekend.
18:47 Khisanth joined #perl6
18:48 pmichaud 'kyleha' added as committer to rakudo github repo
18:52 KyleHa Woohoo!!  Thank you pmichaud++
18:55 KyleHa It works!
19:03 Guest17110 joined #perl6
19:03 maja_ joined #perl6
19:11 nperez to reiterate from last evening, I'd like to help on the implementation of something select-like. The current IO spec had select() (both forms) removed. What is the plan for doing synchronous I/O multiplexing?
19:11 nperez currently, parrot has an implementation to poll a socket
19:20 donaldh joined #perl6
19:28 kane_ joined #perl6
19:29 Guest82420 joined #perl6
19:31 mberends nperez: glad to see you continuing :)
19:31 moritz_ nperez: I think wayland76 and ruoso did some of the IO design - maybe ask them
19:32 nperez Acknowledged
19:32 nperez is there a message bot?
19:33 moritz_ nperez: yes. 'phenny, tell $nick $message'
19:34 nperez phenny, tell wayland76 I am interested what the plan is for polling io handles (ie. select(2)) and am willing to be guided/mentored to do the work
19:34 phenny nperez: I'll pass that on when wayland76 is around.
19:35 mberends nperez: you could try to make a proof-of-concept code example that exercises the Parrot code inside a Rakudo Q:PIR{ } block, and nopaste it at a time when many potential helpers are around. Search the Rakudo source files (eg in the setting) for Q:PIR examples.
19:36 nperez right. just not sure where the function should live since the spec explicitly says it was removed
19:37 mberends nperez: that's why an unspecced implementation helps to explore what a future spec might say about it.
19:37 pmichaud nperez: I'd go ahead and build something that meets your expectations about what you want things to look like
19:38 pmichaud you'll then get feedback from people who say what they don't like about it :)
19:38 nperez heh
19:38 pmichaud but we'll at least have something working to start with (more)
19:38 nperez well, I'd like to start with the reason select() was removed from the spec in the first place
19:38 pmichaud and since you've had a lot of experience dealing with polling io things, you can somewhat bend the design to your will
19:39 pmichaud I suspect the reason for removing select() was something to do with event loop management as a whole
19:39 nperez hrm.
19:39 mberends nperez: did you imagine that you'd come in here and start *designing* part of Perl 6 ;-)
19:39 nperez mberends, no. I just wanted my trusty old perl5 select :)
19:39 pmichaud but whatever the reason, the truth is that there will be a lot of folks coming into Perl 6 who are familiar with select(), so we probably want something that makes at least a bit of sense to them
19:40 nperez pmichaud, understood
19:40 pmichaud even if it doesn't turn out to be core, it may be a useful intermediate module
19:40 pmichaud (keeping in mind that we're trying to keep the core small anyway)
19:40 nperez Which is doable considering parrot sockets have a poll method
19:40 pmichaud exactly.
19:40 pmichaud we may discover that the spec ultimately ends up doing something radically different (more)
19:41 pmichaud we may discover that the spec ends up being silent on async IO, leaving it up to modules to flesh out the details (more)
19:42 pmichaud but if the spec does ultimately take on the async-IO issues, then it will either be very close to what you design, in which case refactoring will not be too much of an issue, or it will be radically different from what you design, in which case having another way of doing it would be a bonus
19:42 pmichaud regardless, I think the effort will be helpful and worthwhile.
19:42 nperez Okay, that gives me some wiggle room then. I'll start with a class that mimics perl5 IO::Select
19:42 pmichaud (especially for someone with your background)
19:42 pmichaud s/for/coming from/
19:43 nperez and you give me too much credit. I'm used to working ontop of the abstraction layers, not writing them :)
19:43 nperez but something simple like IO::Select is doable
19:44 pmichaud yes, you're used to working on top of abstraction layers, which means you likely know what you wish the abstraction layer did differently :)
19:44 pmichaud and here's your chance to make it be different :)
19:45 pmichaud or "right".
19:45 pmichaud but yes, IO::Select should be doable
19:46 nperez Okay, let me work on that and I'll let that be the conversation piece. All I really need is select for POE. It can manage the rest (at least the simple parts)
19:47 nperez that's the driver by the way. I'd like to get a naive port of POE on rakudo
19:47 pmichaud that sounds perfect.
19:48 Tene nperez: I've been working on and thinking about a POE port.
19:48 nperez Tene, great, I'd like to see what you've been thinking
19:49 * pmichaud wishes Perl 5 had .comb about now.
19:49 SmokeMachine joined #perl6
19:49 Tene I was just recently looking at the lack of select() in Parrot, and I'm planning to work with WhiteKnight to get that in really soon now.
19:50 Whiteknight Tene: I'm around to hack most of the day tomorrow if you want to get started
19:50 pmichaud ooh, nperez++ and Tene++ both working on POE would be an awesome combo
19:50 pmichaud Tene can clearly take care of the parrot bits.
19:51 nperez Yeah, what I saw in the parrot source of the poll method on the socket, it should probably be a bit more generic than that and work on any handle like the C version
19:51 nperez I'll be upfront, I am a complete noob on both projects
19:51 nperez so educate me when possible :)
19:51 pmichaud we will certainly do so
19:52 Tene Yeah, also need a way to select() on many handles.
19:52 pmichaud you're much less of a noob on POE than I am, though :-)
19:52 mberends I'd like to join this party, as I was interested in porting POE as well ;)
19:52 Tene Whiteknight: That might be very possible.  I'll need to work it out.  i have a visitor at my house right now.
19:53 Tene http://github.com/tene/Doten/tree/master was my first draft
19:53 Tene Doten is the name of an author who imitated Poe
19:53 nperez I have some other code I need to do today (clean the MooseX::Method::Signature integration into MooseX::Declare), but after that I be a free set of hands
19:55 nperez From my Moose+POE dealings, I have consider that most of the POE concepts should instead be Roles
19:55 nperez considered*
19:55 nperez So instead of a proper class for Session, a Role gives you much more flexibility
19:55 pmichaud that seems sensible.
19:55 pmichaud (at least to this noob it does :-)
19:56 nperez You can see this in action @ http://github.com/nperez/psm/tree/master
19:56 nperez From there all sorts of POE roles become possible like TCPServer/Client, etc
19:57 * Tene nods...
19:57 nperez Then for all of the methods you want exposed to the dispatching, you decorate them with traits
19:57 Tene That was my plan too.
20:01 nperez Okay, gotta run. I'll be back later, no doubt, attempting to write IO::Select and needing guidance
20:02 Guest82420 joined #perl6
20:02 pmichaud rakudo:  my $a = ({ say 'foo'});  say $a.perl;
20:03 p6eval rakudo 5667dc: OUTPUT«foo␤Bool::True␤»
20:03 pmichaud hmmmm.
20:04 Guest82420 joined #perl6
20:08 pmichaud rakudo: { say 'foo' };  { say 'bar' };
20:08 p6eval rakudo 5667dc: OUTPUT«foo␤bar␤»
20:08 pmichaud rakudo: ({ say 'foo' };  { say 'bar' })
20:08 p6eval rakudo 5667dc: OUTPUT«foo␤bar␤»
20:08 pmichaud rakudo: ({ say 'foo' }, { say 'bar' })
20:08 p6eval rakudo 5667dc:  ( no output )
20:08 pmichaud Interesting.
20:11 pmichaud Not quite sure what to do about that one.
20:11 Tene rakudo: (1;1;1)
20:11 p6eval rakudo 5667dc:  ( no output )
20:12 __ash__ joined #perl6
20:12 dukeleto_ joined #perl6
20:12 dukeleto_ joined #perl6
20:13 pmichaud I guess blocks in a semilist should never be marked as immediate.
20:14 zamolxes joined #perl6
20:20 Guest64806 joined #perl6
20:21 __ash__ is there a way to call a role's method inside a function if you over ride it? http://gist.github.com/164492 has an example if you want to see what i am referring too
20:31 nacho__ joined #perl6
20:32 TimToady hey, charlotte airport has free wifi
20:33 trexy joined #perl6
20:53 dukelet0 TimToady: good to know
20:58 TimToady well, better go find our gate...
20:58 TimToady bbl &
20:58 stdisease joined #perl6
21:00 stdisease HI
21:01 whoisthatgoksie_ joined #perl6
21:01 stdisease Is the llama6 book still being worked on? I can't check out a draft.
21:01 frew joined #perl6
21:04 stdisease It says  svn.lohutok.net host not found.
21:05 colomon I've not actually heard it mentioned at all.
21:05 colomon No sign of it in the pugs SVN tree, which is where I would expect it to live these days...
21:05 colomon But that may just be a sign of my ignorance.  :)
21:15 stdisease colomon, hm, why do you expect it to live in pugs's svn?
21:15 colomon That's where the majority of the Perl 6 documentation type things live these days.
21:17 colomon The specs live there, the spectests live there, and lots of other documentation and some examples.
21:17 stdisease ah, do I sense Pugs is currently the defacto implementation? I was just about to try the one in parrot instead
21:19 colomon No, rakudo is the current default implementation (if such a thing exists).
21:19 stdisease the lack of a recommendation is kind of confusing to a newcomer such as myself
21:20 colomon You should try rakudo, for sure.
21:21 colomon Though come to think of it, it's written using parrot, but it's not actually in the parrot distribution any more, is it?
21:21 stdisease Now all is left is to find me some decent documentation/introduction material
21:21 stdisease It's not?
21:22 stdisease well this page http://www.parrot.org/languages lists is
21:22 colomon It's written in Parrot, yes.
21:23 colomon But it lives at the web page you get when you click on the Rakudo link on that page, which is its own repository on github.
21:23 stdisease ah so this parrot 'thing' is not centralized
21:24 colomon If you scroll down on the Rakudo github page, it explains how to get rakudo and how to build it (fetching and building Parrot automatically).
21:25 colomon But yeah, there are three main places for this at the moment:
21:25 colomon The parrot repository
21:25 colomon The rakudo repository
21:25 colomon The pugs repository
21:25 colomon Each with its own piece of the puzzle.
21:26 colomon Specs and such are at pugs, as well as some miscellaneous Perl 6 implementations.
21:26 colomon Rakudo is the most complete implementation at this time, at its own site.
21:26 colomon Unless you're interested in hacking Parrot, you can probably ignore that repository and just have Rakudo build what it needs of Parrot.
21:26 morenel left #perl6
21:27 stdisease Hmm, hopefully I have a better overview now, thanks
21:27 colomon BTW, I use http://perlcabal.org/syn/ for documentation -- but it is very much a spec, not a beginner's guide.
21:27 colomon When I can't figure out things there, I ask here.
21:28 colomon :0
21:28 colomon :)
21:28 stdisease :D
21:29 colomon The perlcabal copy of the spec is rebuilt from an updated copy every hour, so is as up-to-date as anything out there.
21:33 stdisease colomon, have you used perl5 before 6?
21:34 __ash__ joined #perl6
21:34 colomon Yes.  I'm not hardcore like lots of the people here, but I've been using Perl since 1995.
21:34 __ash__ is there a way to call a role's method inside a function if you over ride it? http://gist.github.com/164492 has an example if you want to see what i am referring too
21:40 stdisease heh, that's longer than the time I've been using computers. I just hope it's possible to directly pick up p6 without having any prior experience with p5, caus' I'd really hate to have to expend energy on that. See I'm also trying to evaluate my options here.
21:44 colomon stdisease: I don't think you particularly need to know p5 to learn p6.
21:44 colomon But a lot of the current materials are focused on that direction, on the assumption that they're trying to "convert" p5 programmers.
21:45 stdisease Huh - that could be a bit problematic.
21:45 colomon Give me a sec to poke around the pugs repo.
21:47 mikehh joined #perl6
21:47 stdisease I can't help but compare in this case (havens know how much I'm not into holy wars), but in the case of Python 3.x I can see a `clear road' towards that should I choose that language and stick with it, can't say the same for perl6, perhaps because it isn't official released yet (actually it's not clear to me if that's true or not ATM).
21:48 stdisease Keeping in mind I know them both (and other alternatives) equally well = pretty much not at all
21:48 colomon perl6 is not officially released yet.  There are plans for a rakudo release in Q2 next year, but even that will not be the full p6.
21:49 colomon A big release, that is, there are development releases every month.
21:49 Whiteknight joined #perl6
21:49 stdisease colomon, will not be full as in doesn't entire implement the spec?
21:49 stdisease *entirely
21:49 colomon Yes.
21:49 stdisease Oh, sort of like C++0x
21:50 stdisease and gcc
21:50 colomon It probably won't have full threading at that point, for instance.
21:50 whoisthatgoksie joined #perl6
21:50 stdisease But the spec itself is finalized?
21:51 colomon Certainly not finalized yet, and I think they're planning on using feedback from the big Q2 Rakudo release to fine tune the spec.
21:52 colomon On the other hand, for lots of stuff Rakudo currently works reasonably well, though slowly.
21:54 RonOreck joined #perl6
21:55 whoisthatgoksie joined #perl6
21:58 colomon stdisease: I don't want to sugar coat things.  I think p6 is a fantastic language, and I'm deeply enjoying working with it on very small projects right now.
21:58 colomon But if probably won't really be ready for significant projects until sometime next year.
22:01 stdisease I'll poke around a bit for now, see how far I can get.
22:03 colomon BTW, the pugs repo does continue a tutorial which is intended for anyone, not just p5 programmers.
22:03 colomon pugs/docs/tutorial
22:04 colomon svn co http://svn.pugscode.org/pugs/docs/tutorial should get it for you.
22:04 stdisease yeah
22:10 braceta joined #perl6
22:11 braceta joined #perl6
22:13 akl joined #perl6
22:23 colomon So, does anyone out there have an example of overloading "say"?
22:23 colomon For a class, I mean.
22:23 colomon Hmmm... or should I overload stringify instead?
22:29 arnsholt joined #perl6
22:39 tann joined #perl6
22:44 colomon I think it's overload stringify, but while I can say that, I'm not sure how to do it.
22:46 carlin joined #perl6
22:52 tann rakudo: caller.perl; # :)
22:52 p6eval rakudo 5667dc: OUTPUT«Could not find non-existent sub caller␤»
22:53 colomon rakudo: 1..10.say;
22:53 p6eval rakudo 5667dc: OUTPUT«10␤»
22:53 colomon rakudo: (1..10).say;
22:53 p6eval rakudo 5667dc: OUTPUT«12345678910␤»
22:54 colomon Hmm... is that calling Range's ~ method internally?
22:55 colomon Str, I mean, looking at the setting file again.
22:58 colomon Sweet!  That does it.  If I overload method Str on my class, "say" calls it when I try to print out an object of that class.
23:07 colomon rakudo: class A { has $.a }; sub infix<+>(A $x, A $y) { return $x.a + $y.a; }; say A.new(:a(1.0)) + A.new(:a(2.0));
23:08 p6eval rakudo 5667dc: OUTPUT«Malformed routine definition at line 2, near "infix<+>(A"␤in Main (src/gen_setting.pm:3366)␤»
23:08 colomon rakudo: class A { has $.a }; sub infix:<+>(A $x, A $y) { return $x.a + $y.a; }; say A.new(:a(1.0)) + A.new(:a(2.0))
23:08 p6eval rakudo 5667dc: OUTPUT«Parameter type check failed; expected A, but got Num for $x in call to infix:+␤in sub infix:+ (/tmp/XRDot9wc7c:2)␤called from sub infix:+ (/tmp/XRDot9wc7c:2)␤called from Main (/tmp/XRDot9wc7c:2)␤»
23:15 jnthn hi - just to let folks know I'm safe and well after my flight away form YAPC. Visiting UK friends at the moment and will be back to Perl 6 stuff on Wed. :-)
23:15 jnthn (For a definition of well that involes me actually being quite sick at the moment...but with folks who will care for me, so don't worry :-))
23:17 jnthn colomon: You probably wanted multi to add a candidate. You just replaced all candidates with that declaration...
23:17 Limbic_Region joined #perl6
23:19 colomon rakudo: class A { has $.a }; multi sub  infix:<+>(A $x, A $y) { return $x.a + $y.a; }; say A.new(:a(1.0)) + A.new(:a(2.0))
23:20 p6eval rakudo 5667dc: OUTPUT«Null PMC access in find_method()␤in Main (/tmp/DKvWmCN4jN:2)␤»
23:21 donaldh joined #perl6
23:21 colomon rakudo: class A { has $.a }; sub multi   infix:<+>(A $x, A $y) { return $x.a + $y.a; }; say A.new(:a(1.0)) + A.new(:a(2.0))
23:21 p6eval rakudo 5667dc: OUTPUT«Malformed routine definition at line 2, near "multi   in"␤in Main (src/gen_setting.pm:3366)␤»
23:22 colomon jnthn++   You said that just in the nick of time to stop me submitting an incorrect bug report.  :)
23:23 stdisease joined #perl6
23:37 jnthn colomon: The fact it doesn't work even as a multi is a (known and already reported) Rakudo bug though. :-(
23:38 * jnthn is tired and flu-ish...sleep
23:39 Whiteknight joined #perl6
23:51 __ash__ joined #perl6

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

Perl 6 | Reference Documentation | Rakudo