Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2007-01-27

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:02 dvorak joined perl6
00:08 justatheory joined perl6
00:21 DebolazY joined perl6
00:25 DebolazZ joined perl6
00:41 ofer0 joined perl6
01:16 nipra joined perl6
01:17 weinig|away is now known as weinig
01:38 b00t joined perl6
01:56 nipra joined perl6
01:59 neonse left perl6
02:00 justatheory joined perl6
02:02 rashakil joined perl6
02:12 Khisanth joined perl6
02:17 svnbot6 r15143 | putter++ | redsix now smokable, but with unexamined regressions.
02:29 weinig is now known as weinig|zZz
02:37 araujo joined perl6
02:43 Aankh|Clone joined perl6
02:43 dmq joined perl6
02:49 mbradley joined perl6
02:49 mbradley is now known as mbradley|afk
02:53 Aankh|Clone is now known as Aankhen``
03:18 REPLeffect joined perl6
03:27 buetow joined perl6
03:52 justatheory joined perl6
04:18 perlbot joined perl6
05:18 avarab joined perl6
05:24 wamiks joined perl6
05:28 leed joined perl6
05:29 avarab_ joined perl6
05:33 zev joined perl6
05:35 zev I'm not sure who to report this to, but www.nntp.perl.org seems to be down
05:38 dduncan hey, you're right!
05:38 lambdabot dduncan: You have 1 new message. '/msg lambdabot @messages' to read it.
05:38 dduncan is that so?
05:39 dduncan left perl6
05:39 avar joined perl6
05:49 avarab joined perl6
05:52 ofer0 joined perl6
05:59 avar joined perl6
06:00 rashakil joined perl6
06:09 avarab_ joined perl6
06:12 wamiks left perl6
06:14 BooK joined perl6
06:15 dduncan joined perl6
06:19 avarab joined perl6
06:34 dc3aes joined perl6
06:36 mdiep_ joined perl6
06:41 wamikss joined perl6
06:47 rashakil joined perl6
07:13 szabgab joined perl6
07:45 rfordinal joined perl6
07:46 REPLeffect joined perl6
08:54 elmex joined perl6
08:57 wilx left perl6
09:09 dduncan left perl6
09:14 iblechbot joined perl6
09:21 devogon joined perl6
10:03 VanilleBert joined perl6
10:07 nipra joined perl6
10:16 masak what is the return value of &take?
10:31 pdcawley joined perl6
10:31 VanilleBert ?eval &take
10:31 evalbot_r15142 is now known as evalbot_r15143
10:31 evalbot_r15143 \{Prim ([Pugs.AST.Internals.Val] -> () Pugs.AST.Internals.Val)}
10:45 Yappo joined perl6
10:46 Yappo joined perl6
10:50 Yappo joined perl6
10:55 Yappo joined perl6
11:00 masak is this expected behaviour?
11:00 masak ?eval sub next($a) { return $a + 1 }; my $i = 0; gather { take $i = next($i) while $i < 10 }
11:00 evalbot_r15143 (\10, \10, \10, \10, \10, \10, \10, \10, \10, \10)
11:00 masak O_O
11:00 REPLeffect left perl6
11:01 chris2 joined perl6
11:28 Psyche^ joined perl6
11:33 jferrero joined perl6
11:33 iblechbot joined perl6
11:38 VanilleBert left perl6
11:43 Psyche^ is now known as Patterner
11:44 nipra joined perl6
11:59 bernhard joined perl6
12:06 polettix joined perl6
12:12 nipra_ joined perl6
12:12 nipra_ is now known as nipra
12:18 elmex joined perl6
12:20 rfordinal joined perl6
12:29 reZo_ joined perl6
12:51 SamB joined perl6
13:19 xpika2 joined perl6
13:39 masak do recursive coroutines make any sense?
13:41 Limbic_Region joined perl6
13:46 avar joined perl6
13:47 rashakil joined perl6
13:53 * allbery_b recalls a contrived example of them in the icon book, so they apparently make some sense
13:58 masak allbery_b: because I found myself writing one in pugs-perl6 today, but I didn't get it to work properly
13:58 masak in the end I rewrote it in an iterative version, which did work
13:59 masak but what I failed to find out was whether the recursive version did not work out due to a bug in pugs or a but in me
13:59 masak s/but/bug/
13:59 masak eh, I mean s:2nd/but/bug/
14:05 xpika2 there sounds nothing wrong with recursive coroutines.
14:11 larsen_ joined perl6
14:20 nipra joined perl6
14:27 masak xpika2: what I was thinking, more exactly, was: what are the semantics of &yield when the coroutine has called itself a few times?
14:29 masak does the yielded value end up in the next higher instance of the coroutine itself, or does it percolate all the way up to the last instance of non-co-routine in the callchain?
14:29 masak I guess one could argue both ways
14:29 masak the former seems saner and less complicated, but the latter might also be useful (and would have been in my case)
14:34 xpika2 left perl6
14:48 masak another way of putting it is: does &yield treat recursively called instances of the same function as individual instances, or does it lump them together?
14:50 masak as of now, there seems to me to be no reason that the latter is the case, unless the former is somehow impossible, which I don't think it is
14:56 Schwern joined perl6
14:59 mr_ank joined perl6
15:01 wilx joined perl6
15:02 wilx left perl6
15:17 buetow joined perl6
15:32 reZo joined perl6
15:37 wilx joined perl6
15:44 jferrero joined perl6
15:54 neonse joined perl6
15:56 nipra joined perl6
16:01 szabgab joined perl6
16:07 szabgab I cannot build Pugs again, the error line I get is:
16:07 szabgab Couldn't open "blib/lib/Prelude.js" for writing: No such file or directory
16:09 wilx joined perl6
16:13 svnbot6 r15144 | audreyt++ | * PIL2JS runjs.pl: Create dirname before outputting it.
16:13 svnbot6 r15144 | audreyt++ |   Reported by: szabgab++
16:14 TimToady masak: take $i = ... is returning an lvalue because = returns an lvalue
16:18 szabgab audreyt++ thanks, now it compiles well
16:18 szabgab btw I keep forgetting where is the pastebot?
16:19 allbery_b lisppaste3: url
16:19 lisppaste3 To use the lisppaste bot, visit http://paste.lisp.org/new/perl6 and enter your paste.
16:19 allbery_b there's also
16:19 allbery_b @paste
16:19 lambdabot Haskell pastebin: http://hpaste.org/new
16:20 allbery_b but it's not so perl6-friendly
16:20 allbery_b there may be others hanging out here too :)
16:21 szabgab thanks but there was a much shorter link url somewhere
16:22 TimToady I generally use http://sial.org/pbot/perl6
16:22 lambdabot Title: sial.org Pastebot - pasteling
16:22 TimToady have it as a button in my bookmark bar, in fact...
16:23 * allbery_b actually has a pastes menu in his bookmarks bar, because different channels have different preferred pastebots
16:25 turrepurre joined perl6
16:31 masak TimToady: why does = return an lvalue? in case I need to assign to the variable again?
16:31 masak how I do de-lvalueify it?
16:32 masak s/I do/do I/ # sigh...
16:32 TimToady I think "take item" works, probably
16:32 TimToady that's straight from P5, actually ($x = $y) =~ s/// wouldn't work otherwise
16:32 masak ah
16:33 masak ?eval sub next($a) { return $a + 1 }; my $i = 0; gather { take item ($i = next($i)) while $i < 10 }
16:33 evalbot_r15143 is now known as evalbot_r15144
16:33 evalbot_r15144 (1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
16:33 masak ok. I have no complaints
16:34 TimToady item is $() really, and list is @().
16:34 masak that's nice
16:34 TimToady I just added : forms to go with the () forms
16:34 TimToady they have list infix precedence on the right
16:34 TimToady so you can instruct a zip how you want it contextualized
16:35 TimToady for instance, @@: 1,2 ¥ 3 4
16:35 TimToady equivalent to the "chunky" we've been discussing in p6l
16:36 TimToady and @@:split gets you a chunky split, instead of the default flat one.
16:37 wolverian what does a chunky split return?
16:37 * wolverian is being sow
16:37 wolverian ...er, slow :)
16:38 TimToady "source of wisdom" I was taking it.  :)
16:38 * masak also only almost follows
16:38 TimToady in p5, split just adds extra fields
16:38 wolverian source lacking of wisdom :)
16:38 masak wolverian: :)
16:39 TimToady split(/(delim)/) gets you field,delim,field,delim,field,delim
16:39 TimToady chunky would get you [field,delim],[field,delim], etc
16:39 Limbic_Region joined perl6
16:39 masak ah
16:39 wolverian people capture the delim? the heresy..
16:40 TimToady @@: 1,2 XX 3,4 gets [1,3],[1,4],[2,3],[2,4]
16:40 TimToady by defaults it's just 1,3,1,4,2,3,2,4
16:40 TimToady s/s//
16:41 TimToady so you either write
16:41 TimToady for 1,2 XX 3,4 -> $a, $b {...}
16:41 TimToady or
16:41 TimToady for @@: 1,2 XX 3,4 -> [$a, $b] {...}
16:41 TimToady so the default @: works well with the default signature
16:42 TimToady and zip defaults to not needing [...] in the sig to unpack
16:42 TimToady but you can get a list of array if you want via @@:
16:42 TimToady and we can unify zip and each into just zip
16:43 TimToady and don't have to have two versions of split, map, take, etc
16:43 TimToady @@: automatically takes a list of
16:43 TimToady list of Capture and turns it into list of Array
16:44 TimToady also applies to m:g results
16:44 reZo joined perl6
16:47 rindolf joined perl6
16:47 wolverian I kind of thought of captures as tuples, so you wouldn't need to turn them into arrays, but that's sort of different, I suppose
16:48 TimToady when you say "return 1,2,3" you have no idea what the caller wants to do with the listiness of it.
16:48 TimToady so we do it lazily
16:48 TimToady just like when you call "mumble 1,2,3"
16:48 TimToady it waits till it knows what it's binding to
16:48 TimToady 1 might be in scalar context
16:48 TimToady 2,3 might be list context
16:49 wolverian and it goes through captures?
16:49 TimToady Captures and Match objects are very similar
16:50 TimToady they try to capture the original "syntax" of ordered and unordered things
16:54 VanilleBert joined perl6
16:55 VanilleBert left perl6
16:55 rindolf Hi all.
16:55 rindolf Hi wolverian, TimToady
16:56 TimToady morning | evening
16:56 wolverian hello rindolf
16:58 rindolf TimToady: evening.
16:58 rindolf I mean it's evening here.
16:58 TimToady np, I used an inclusive or
17:01 reZo joined perl6
17:01 rindolf TimToady: what's up?
17:02 rindolf TimToady: have you seen the Pachelbel's Rant yet?
17:03 TimToady er, which rant is that?
17:03 rindolf TimToady: http://shlomif.livejournal​.com/32301.html?mode=reply
17:03 lambdabot Title: Post Comment
17:07 pasteling "szabgab" at 192.117.127.193 pasted "testing pastebot" (75 lines, 1.4K) at http://sial.org/pbot/22664
17:08 rindolf TimToady: I've been having some fun with XML::RSS recently, which is based on XML::Parser.
17:08 svnbot6 r15145 | szabgab++ | pastebot client for those who keep forgetting the url
17:09 rindolf TimToady: one thing I don't understand is why the object given as callback to the handlers is different than the XML::Parser one.
17:09 rindolf Hi szabgab
17:10 wolverian rindolf, heh, that video is awesome. thanks. :) never knew about the canon.
17:11 rindolf wolverian: knew what about the Canon?
17:11 rindolf wolverian: and you're welcome.
17:11 TimToady yes, I've noticed that chord pattern is rather common :)
17:12 rindolf Of course, "Let it be" doesn't sound anything like Pachelbel's Canon.
17:12 wolverian rindolf, how common the chord progression is nowadays.
17:12 rindolf wolverian: I see.
17:15 penk joined perl6
17:21 reZo joined perl6
17:24 szabgab rindolf: rehi
17:24 rindolf szabgab: what's up?
17:37 neonse joined perl6
17:39 svnbot6 r15146 | szabgab++ | more tests for multiline comments
17:39 reZo joined perl6
17:42 svnbot6 r15147 | szabgab++ | add "default" and "slurp" to perl6.vim
17:43 jrigby joined perl6
18:00 xinming_ joined perl6
18:05 reZo joined perl6
18:23 pinskian joined perl6
18:23 pinskian left perl6
18:35 mncharity joined perl6
18:35 mncharity is now known as putter
18:39 putter "This is a big undertaking. Perl 6 is the sort of language that only Perl can parse. But I'll do my best to get vim to."  - perl6.vim  :)
18:42 Schwern I have a new principle of "good ideas that are really bad in language design"!
18:42 Schwern Treat built in types differently!
18:42 lumi Nonsense, it works so well in Java
18:43 Schwern And Javascript which is what I'm beating my head against right now.
18:43 Schwern Pass by reference?  Sure!  As long as you're not a built-in!
18:48 nipra joined perl6
18:51 putter It's fun when folks are unwilling to take a N% performance hit to get architectural clarity... and years later are still unwilling, despite it running M x 100% faster.  Suggests "starved for computes" remains a primary concern.
18:51 cj Schwern!!17!
18:52 cj Schwern: ah, javascript.  what you working on?
18:52 cj or is that classified?
18:53 Schwern cj:  I'm reimplementing this http://www.wium.net/nw/evetool/
18:53 lambdabot Title: EVE Character Tool
18:53 rindolf Hi Schwern
18:53 Schwern Mostly as an excuse to learn Javascript
18:53 Schwern Hi all
18:54 Schwern And have people send me ISK in EVE.
18:54 cj Schwern: eve looks a lot like homeworld... did they buy up the development team and artists?
18:54 Schwern Right now I'm struggling with the fact that in Javascript undefined + 5 == NaN
18:55 cj d'oh.
18:55 Schwern cj:  Its only superficial.
18:55 cj if(foo == undefined){  foo = 0 }
18:55 Schwern And that I can't write something like increment(foo.prop, 5)
18:55 Schwern cj:  But that's VERBOSE
18:55 cj or (foo == undefined ? 0 : foo) + 5
18:55 Schwern But that's BIZARRE
18:55 cj Schwern: yeah, well... not everything can be perl
18:57 Schwern Best I've come up with is...  Object.prototype.increment = function(prop, add) { (this.[prop] = (this.[prop] || 0) + add }
18:57 cj hide it behind something more pretty :)
18:57 cj like that
18:57 Schwern Then  foo.increment(prop, 5)
18:57 Schwern But still... yuck
18:57 rindolf Schwern: holy.
18:58 cj you could also have add + makeSureItsANumber(foo)
18:58 Schwern Its fun to learn new languages... and recoil in horror.
18:58 Schwern cj:  But how do I know what property to look at on foo?
18:58 cj there's no type checking, is there?
18:59 cj yeah, your treatment looks good to me other than it looks nasty.  limitations of the language, I guess
18:59 cj there's no operator override either, is there?
18:59 Schwern Dunno
18:59 * cj googles
19:00 cj
19:00 cj http://binarylord.com/work/js0wood.pdf
19:00 cj is what I meant
19:01 cj type checking
19:01 Schwern That's a language extension proposition
19:01 Schwern ?
19:01 cj http://www.mozilla.org/js/language/js20-20​00-07/libraries/operator-overloading.html
19:01 lambdabot Title: JavaScript 2.0 Operator Overloading, http://tinyurl.com/23rlqy
19:01 cj oh?  well, then nevermind :)
19:01 Schwern Yeah, nobody's using JS 2.0 yet
19:01 cj I didn't *read* it :)
19:01 Schwern Its all 1.5 if you're lucky.
19:02 Schwern The Javascript 2.0 spec was written back in 2000.  Its just now solidifying.  Mozilla is just getting around to implementing it.  It'll be stable in most browsers around, say, 2010.  And people think Perl 6 is taking a long time!
19:03 cj well, I s'pose $we could start pressing the IE and Mozilla folks to push support into their browsers
19:03 shachaf joined perl6
19:03 cj but when you rush miracles...
19:04 Schwern IE hasn't even implmented DOM level 2.
19:06 Schwern Oh bleh.
19:06 Schwern Ok, I'll stop complaining about Javascript here.
19:07 wilx left perl6
19:08 allbery_b joined perl6
19:13 * putter smokes an old pil2js (6.2.13).  bbl
19:16 elmex joined perl6
19:19 TimToady someone with more time than I have should rewrite cbstream.rb in p6...
19:23 stevan__ joined perl6
19:24 rindolf Schwern: what's up besides JavaScripting?
19:24 rindolf Schwern: any progress with TAP::Harness?
19:28 Schwern Ovid has taken that over with TAPx::Parser.  They're talking about gutting Test::Harness and using it as the engine making TH 3.0
19:29 rindolf Schwern: I see.
19:30 lumi TimToady: What's cbstream.rb?
19:31 [particle] timtoady: did the S03 reorg make major changes, or just move text blocks around? does it have any ramifications for existing parsers?
19:31 [particle] ...it's a lot to reread
19:36 wolverian TimToady, is there a %%()?
19:41 TimToady wolverian: not yet.  :)
19:42 Khisanth joined perl6
19:42 TimToady [particle]: two changes.  .accept => .ACCEPT and added @: syntax to be a listop-y kind of @()
19:42 TimToady cbstream.rb is the irc gateway that's feeding PerlMonks' chatterbox to #cbstream on freenode.
19:43 [particle] TimToady: thanks!
19:43 TimToady that's so that we get @@: to mean "chunky".
19:44 [particle] it doesn't look chunky, but it works
19:45 TimToady So @@: means pretend you bound this to a @@ and return what you'd've got if you'd done that...
19:46 TimToady And $: @: %: &: @@: are just $() @() %() &() @@() without needing the trailing paren.
19:48 TimToady basically reusing the meme that ":" turns a method into a listop.
19:48 TimToady except we tweak the precedence slightly so it governs operators like Y and XX as well. (sounds genetic...)
19:49 avar heh, more sugar:)
20:16 graywhite joined perl6
20:43 weinig|zZz is now known as weinig
20:47 TimToady anyway, the implicit cbstream.rb challenge is at http://www.perlmonks.org/?node_id=596867
20:47 lambdabot Title: Re: I prefer to:
20:47 TimToady seems like a good chance to see how async {...} works
20:49 TimToady and, of course, to show how much prettier Perl 6 is... :)
21:13 DebolazX joined perl6
21:16 aufrank joined perl6
21:16 Aankhen`` joined perl6
21:41 stef__ joined perl6
21:41 ludan joined perl6
21:48 jferrero joined perl6
21:50 putter TimToady: re cbstream, add it to project_planning/TASKS or TALK?   though it is entirely unclear whether anyone actually looks at them...
22:02 dduncan joined perl6
22:04 putter smoke of old pil2js is up.   6.2.13 release, r14402, 2006-10-17.
22:04 putter It's rather less green than I had hoped/remembered. :/
22:07 putter eg all of t/builtins/arrays/ failed.
22:14 awwaiid joined perl6
22:14 Grrrr joined perl6
22:15 putter testing 6.2.12 pil2js...
22:15 putter If anyone knows a time with a good working pil2js, I'd love a pointer.  tnx.
22:19 putter looks like 6.2.12 r10930 2006-06-26 doesn't build under ghc 6.6.  :/
22:20 putter definition: computer science, noun - a maze of twisty little passages
22:21 putter stevan: ping?
22:22 putter anyone know the state of Moose and such?
22:23 putter the v6.pm "create a p6 runtime on p5" effort?
22:26 hexmode` joined perl6
22:57 neonse left perl6
22:57 weinig is now known as weinig|away
23:30 miyagawa joined perl6
23:30 devogon joined perl6
23:31 mako132_ joined perl6
23:45 ingy hi putter
23:46 putter hi ingy
23:46 Psyche^ joined perl6
23:47 ingy :)
23:48 ingy putter: I myself would like to know the answer to that question
23:48 putter working pil2js?
23:48 putter oh, Moose/v6?
23:53 ingy yes
23:54 * ingy goes off to write a better Javascript version of Digest-MD5
23:56 * putter , battered by wandering a dark maze of twisty little passages, sits down against a wall to contemplate which way to go next.
23:58 putter I wonder if there is a phrase for that variety of yak shaving in which the yaks can teleport, can grow their hair back instantaneously, ... and have an evil sense of humor.
23:59 putter Pamplonan running of the yaks

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

Perl 6 | Reference Documentation | Rakudo