Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2005-05-20

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:04 rafl has quit IRC (zelazny.freenode.net irc.freenode.net)
00:04 SB9 has quit IRC (zelazny.freenode.net irc.freenode.net)
00:04 Chewie[] has quit IRC (zelazny.freenode.net irc.freenode.net)
00:04 Gruber has quit IRC (zelazny.freenode.net irc.freenode.net)
00:04 wilx has quit IRC (zelazny.freenode.net irc.freenode.net)
00:04 PerlJam has quit IRC (zelazny.freenode.net irc.freenode.net)
00:04 AtnNn has quit IRC (zelazny.freenode.net irc.freenode.net)
00:04 pjcj has quit IRC (zelazny.freenode.net irc.freenode.net)
00:04 q[acme] has quit IRC (zelazny.freenode.net irc.freenode.net)
00:04 mugwump has quit IRC (zelazny.freenode.net irc.freenode.net)
00:04 clkao has quit IRC (zelazny.freenode.net irc.freenode.net)
00:04 pasteling has quit IRC (zelazny.freenode.net irc.freenode.net)
00:04 scw has quit IRC (zelazny.freenode.net irc.freenode.net)
00:04 knotty has quit IRC (zelazny.freenode.net irc.freenode.net)
00:04 erg255 has quit IRC (zelazny.freenode.net irc.freenode.net)
00:04 decay__ has quit IRC (zelazny.freenode.net irc.freenode.net)
00:04 stevan has quit IRC ("Leaving")
00:05 stevan has joined #perl6
00:05 mugwump has joined #perl6
00:05 pjcj has joined #perl6
00:05 AtnNn has joined #perl6
00:05 Chewie[] has joined #perl6
00:05 Gruber has joined #perl6
00:05 scw has joined #perl6
00:05 decay_ has joined #perl6
00:05 q[acme] has joined #perl6
00:05 clkao has joined #perl6
00:09 osfameron has quit IRC ("Leaving")
00:09 SB9 has joined #perl6
00:09 svnbot6 r3483, eric256++ | Changed random number choices to ().pick and worked on some more object method calls
00:09 wilx has joined #perl6
00:10 ninereasons when Pugs uses Parrot to evaluate a statement, I'm confused about the order in which things are done.
00:10 ninereasons ./pugs -BParrot -e ' say "a:{ my $s = 10; } a^:$s | b:{ $s=$s+1 ; $s;} b^:$s"'
00:10 ninereasons a:11 a^:10 | b:11 b^:11
00:10 vcv has joined #perl6
00:10 ninereasons does that surprise anyone ?
00:11 ninereasons how about this:
00:11 ninereasons ./pugs -BParrot -e ' say "a:{ my $s = 10; $s; } a^:$s | b:{ $s=$s+1 ; $s;} b^:$s"'
00:11 ninereasons a:10 a^:10 | b:11 b^:11
00:11 pasteling has joined #perl6
00:12 wolverian that certainly looks broken.
00:12 rafl has joined #perl6
00:12 wolverian (the first case.)
00:12 ninereasons I think I agree
00:12 ninereasons (if I knew enough to agree)
00:12 wolverian although frankly, I don't know when interpolated closures are run wrt the interpolated variables
00:13 PerlJam has joined #perl6
00:13 wolverian it could as well be meant to output a:10 a^:11 | b:11 b^:11 for all I know :)
00:14 vcv i wouldnt call it broken as much as not considered
00:14 knotty has joined #perl6
00:17 ninereasons the thing is, vcv , I can't even imagine how the first case happens.
00:17 larsen has quit IRC ("later")
00:17 revdiablo did you guys see Limbic_Region's perl6 code contest at perlmonks? it really could use some loving attention: http://www.perlmonks.org/index.pl?node_id=458728 :)
00:18 iblechbot has quit IRC (Read error: 110 (Connection timed out))
00:18 broquaint Seen. Already.
00:30 * mugwump laughs heartily at http://bleaklow.com/blog/images/p6_cover.gif
00:34 elmex has quit IRC ("leaving")
00:36 Khisanth mugwump: note the lack of dog body parts
00:38 mugwump or trees
01:06 ninereasons I might be the only person ever who's had occasion to want this :
01:06 ninereasons sub infix:<=~>($lhs is rw,$rhs){ $lhs = $rhs ~ $lhs  }
01:06 svnbot6 r3484, Stevan++ | Perl::MetaModel - Moved method invokation to the Meta::Method; eventually this will handle parameters too; also changed some Perl::* properties to use hierarchal types
01:07 ninereasons my $bab = 'a'; say $bab; $bab =~'b'; say $bab; $bab ~= 'b'; say $bab;
01:07 ninereasons a
01:07 ninereasons ba
01:07 ninereasons bab
01:08 TreyHarris has left
01:15 meppl guten nacht
01:15 meppl good night
01:15 vcv has quit IRC (Read error: 145 (Connection timed out))
01:15 castaway_ has joined #perl6
01:23 meppl has quit IRC (Remote closed the connection)
01:27 castaway has quit IRC (Read error: 110 (Connection timed out))
01:27 theorbtwo has quit IRC (Read error: 110 (Connection timed out))
01:30 ninereasons has quit IRC ("g'night")
01:51 mugwump autrijus: can it be said that a package is a type?
01:52 mugwump I would have thought that a package is a namespace, a class is a type and a namespace, and a role can be used like a type and is also a namespace.
01:56 mugwump ingy++ # use pugs; pragma
02:01 broquaint What's a type if not a namespace?
02:03 mugwump what type is a namespace?
02:05 mugwump I see a namespace as more akin to a symbol, not a type
02:07 mugwump a convenient place to put symbols to refer to them, but nothing to do with the underlying type system
02:09 broquaint A namespace is where things live, which in perl6, is a package/module, right? A package/module name is also the type for associated objects, so the namespace also doubles as the type. I'm just saying that 'namespaces' can act like types.
02:10 mugwump yes.  a namespace DOES type.  ! ( namespace IS type )
02:10 mugwump but, that namespace only DOES type if it is a Role or a Class.
02:38 vcv has joined #perl6
02:50 broquaint has quit IRC ("Switch::Perlish - coming to a CPAN mirror near you soon")
03:03 putter has joined #perl6
03:03 mugwump hi putter
03:03 putter hi mugwump
03:08 putter re what is a type, some Snn says class, role, and subtype.  but there are oddities.  are hierarchical types a kind of subtype?  dunno - have not looked closely.
03:08 wilx has quit IRC (Read error: 104 (Connection reset by peer))
03:08 wilx` has joined #perl6
03:12 pasteling "putter" at 66.30.119.55 pasted "Draft quickrefy thing on packages" (73 lines, 2K) at http://sial.org/pbot/10262
03:12 vcv has quit IRC (Read error: 145 (Connection timed out))
03:15 b00t has joined #perl6
03:23 mugwump ah, yes, sub-type
03:23 mugwump subtypes are interesting because I don't think they're also namespaces..
03:28 putter yeah.  each of the 3(4?) kinds has things it can participate in, and things which it cant.  i started on the "terse description of everything" path because I didn't have a clear picture of it all.   dont yet know what i dont know.  (can enums inherit?  can types be mutated at runtime? ...)
03:31 putter mugwump, have you seen any sign that types can be passed by reference?
03:32 mugwump I've seen the leading :: used
03:32 putter k
03:32 mugwump the answers are all to be found in the Haskell source, at least for the parts that pugs already implements.
03:33 mugwump esp. for the enum and type methods
03:33 putter ;)  good thought.  
03:33 mugwump eg, from the Set test suite
03:33 mugwump my $set = set(0, 1, 2, 3, $bob);
03:33 mugwump is($set.ref, ::Set, "set()");
03:35 mauke has quit IRC (Remote closed the connection)
03:36 putter ok, i suspect my plan is to do a "unified picture of how names are sucked in from other namespaces" (eg, import export is does mumble), and
03:38 putter then try to do a table of "all the things types participate in" vs "all the flavors of types".  i may have to grok dispatch before doing the table.
03:39 putter but not tonight i think.
03:40 putter sound vaguely plausible?
03:42 mugwump I don't quite understand.  Maybe I'll grok your meaning when I see the first parts of the picture
03:43 putter ok.  yeah, this is the phase of things where descriptions of intent is indeciferable. ;)  hopefully have a doc tomorrow.
03:44 putter s/where/where my/
03:44 putter s/is/are/
03:44 putter sigh.  good night.
03:44 mugwump 'night!
03:44 putter has quit IRC ("sleep...")
03:52 f0rth can I use next in while loop? seems not working
04:01 mugwump hmm, yes, how exactly do you write an enum type in Perl 6?
04:01 mugwump in Haskell it's, eg:
04:02 mugwump data Cxt = cxtItemAny | cxtSlurpyAny | CxtItem Type
04:14 mugwump type DayOfWeek ::= int enum
04:14 mugwump        Â«Sunday Monday Tuesday Wednesday Thursday Friday Saturday»;
04:14 mugwump yay!
04:21 * mugwump wonders why A12 is more prescriptive than S12 in this respect
04:25 Shachaf has quit IRC ("So long, and thanks for all the fish!")
04:43 eric256 has joined #perl6
04:50 vcv has joined #perl6
04:51 vcv freenode does not like me
04:51 * eric256 wonders if freenode is a person, program, or other. lol
04:52 mugwump eric256, you're soaking in it!
04:58 vcv network maybe? ;)
04:58 eric256 and i still have no idea. lol
04:58 eric256 ohh the server. lol
05:02 Khisanth an irc network with an AI :)
05:07 eric256 @x -> $head,@list;  would be cool. lol. ;) although almost completly uneeded. ;)
05:07 Limbic_Region has quit IRC ("CGI:IRC (EOF)")
05:13 Aankhen`` has joined #perl6
05:16 eric256 can i make my own @array.method?
05:18 mugwump eventually, you'll just be able to add it to the Array class
05:18 svnbot6 r3485, mugwump++ | Coërsion operators?
05:18 mugwump or via @array.ref.meta.addmethod()
05:19 eric256 extend class Array { ... }   something like that?
05:19 mugwump I remember seeing such syntax
05:19 mugwump don't know what the details are like atm tho
05:19 eric256 hmmm just curious.
05:22 eric256 did error messages in pugs just recently start sucking more?
05:22 eric256 errors inside subs are like impossible to figure out
05:23 mugwump no, that is normal :)
05:23 eric256 and god help you if you are in a method inside a class ;)
05:23 eric256 not that i should whine since i don't know haskel and can't help ;(
05:23 svnbot6 r3486, mugwump++ | Rename Code to VCode, use enums types, use 'does' for 'derives'
05:23 svnbot6 r3487, mugwump++ | missed remove part of rename
05:28 eric256 isn't there an array method to get the length of the array?
05:28 Aankhen`` .elems?
05:29 Aankhen`` +@array?
05:29 svnbot6 r3488, mugwump++ | Explorative Junctive type translation for Cxt type
05:29 eric256 thanks. +@array doesn't work... at least not as in 1.. +@array
05:29 Aankhen`` Ah.
05:31 eric256 hmmm
05:31 eric256 sub combinations (@list) { my $first = shift @list; }
05:31 eric256 gives me an error " Can't modify constant item: VUndef:"
05:35 kelan sub params are read-only by default
05:35 svnbot6 r3489, mugwump++ | More exploration of conversion of the Haskell pugs classes to Perl 6.
05:35 svnbot6 r3489, mugwump++ | Junctive Types do look like a promising way of converting Haskell code
05:35 svnbot6 r3489, mugwump++ | to Perl 6.
05:35 kelan you need to copy @list before shifting or mark it "is rw" (if pugs supports that yet)
05:35 eric256 sub (@list is rw)  .... works yea!
05:36 kelan wow pugs rules
05:36 kelan so many things implemented already
05:36 eric256 instead of bitching about error messages is there anyway for me to help improve them ?
05:37 kelan i don't have *any* pugs knowledge, so i can't help with that question
05:37 eric256 it was more a general question for anyone around not you specificaly ;
05:37 eric256 0\
05:37 eric256 :)
05:37 kelan ok:) well i'm out for tonight. later!
05:39 eric256 later and thanks
05:43 SM_ax has joined #perl6
05:45 iblechbot has joined #perl6
05:59 eric256 any math people out there? is there a way to tell if a certain bit is on in a number easily? i want to count by binary through and array and i just can't get my head around picking which array elements are on and which are off.
06:00 eric256 $num % ($i**2)  seems like it might be right
06:04 mugwump $num & (1<<$i) is the normal idiom
06:05 mugwump bitwise & is ^& or +& in perl6 iirc
06:06 mugwump (1<<$i) is like (2**$i), give or take an off-by-one error
06:07 eric256 pugs -e"print (5 +& (2**$_)) for (1..4)"
06:07 eric256 prints 0400 .....
06:08 vcv has quit IRC (Read error: 145 (Connection timed out))
06:09 obra has quit IRC (zelazny.freenode.net irc.freenode.net)
06:09 eric256 hmm never mind. i should have been doing 0.. not 1..
06:12 obra has joined #perl6
06:23 b00t has quit IRC (Remote closed the connection)
06:23 svnbot6 r3490, mugwump++ | Added the usual properties to save iblech++ the hassle
06:27 eric256 svn bot seems a bit slow to pickup on updates lately
06:28 eric256 thanks for the help mugwump... it would appear that << isn't setup yet.
06:30 eric256 now if i could just make it @array.combinations i would be happy...oh and .pick_and_pop (splice randomly picked element out of array.) or maybe .shuffle.pop
06:30 svnbot6 r3491, eric256++ | Combinations based on binary counting example.
06:31 ramzi has left
06:32 mugwump << might be called something else now ... check the bible
06:32 mugwump maybe +<<
06:32 eric256 i checked the quick ref... let me check the online docs
06:33 * Aankhen`` goes out to eat lunch and then watch Episode III.
06:33 Aankhen`` Late.r
06:33 Aankhen`` s/\.r/r./
06:33 eric256 good movie. have a good lunch
06:34 * mugwump & # weekend!
06:34 Khisanth +<< would be a bit confusing with the hyperops
06:34 eric256 +< apparently
06:34 mugwump ah
06:35 eric256 i wonder if 1+<$_ is better than 2**$i in some way? faster?
06:35 mugwump much :)
06:35 * mugwump waves
06:35 castaway_ is now known as castaway
06:38 chady_ is now known as chady
06:39 eric256 hmm my combination sub takes forever on a 10 element array.../me is still looking for a parrot binary for windows ;(
06:47 eric256 i get
06:47 eric256 *** Cannot parse PGE:
06:47 eric256 *** Error: end of file
06:47 eric256 i'm not even sure what that is telling me
06:54 eric256 later
07:01 eric256 has quit IRC ("Trillian (http://www.ceruleanstudios.com")
07:13 larsen has joined #perl6
07:26 Southen[a] has joined #perl6
07:29 elmex has joined #perl6
07:40 Gruber hmm
07:40 Gruber tobez@hrum src/pugs> ./pugs -e 'my $a = [=>] 1..10; say $a.perl'
07:40 Gruber pugs: src/Pugs/Prim.hs:977:16-36: Irrefutable pattern failed for pattern (Pugs.AST.Internals.VList [ks, vs])
07:41 svnbot6 r3492, autrijus++ | * add namespace quickref from putter
07:42 castaway whats [=>] ?
07:42 f0rth is this reasonable that the loop never stop? http://irc.csie.org:8888/103
07:43 Gruber castaway: a reduce version of =>
07:43 castaway looks like scary voodoo :)
07:45 vcv-- has joined #perl6
07:46 Southen has quit IRC (Connection timed out)
08:11 G2 has joined #perl6
08:11 svnbot6 r3493, autrijus++ | * `next` now re-evaluates condition in `loop` constructs;
08:11 svnbot6 r3493, autrijus++ |   forth++ for pointing out the bug.
08:14 osfameron has joined #perl6
08:19 TSa has quit IRC ("ChatZilla 0.9.61 [Mozilla rv:1.7.5/20050210]")
08:19 svnbot6 r3494, autrijus++ | * Gruber reported that scalar refs to pairs was not
08:19 svnbot6 r3494, autrijus++ |   pretty-printed correctly.  Fixed.
08:27 f0rth found that problem because I am writing a stupid script http://zbwei.net/~forth/simple_template_engine.p6
08:38 Aankh|Clone has joined #perl6
08:46 Aankhen`` has quit IRC (Read error: 145 (Connection timed out))
08:48 rgs has joined #perl6
08:54 elmex has quit IRC ("leaving")
08:58 TheBigBear has joined #perl6
09:00 rgs [rafael@grubert pugs]$ ./pugs -e 'say for qw(foo bar) x 3'
09:00 rgs foo barfoo barfoo bar
09:00 rgs that's probably a bug, no ?
09:00 G2 has quit IRC ("oops")
09:00 Juerd No.
09:00 Juerd qw(foo bar) x 3 is one string: "foo barfoo barfoo bar"
09:00 _integral has quit IRC (Read error: 110 (Connection timed out))
09:00 castaway looks ok to me
09:00 Juerd For list element repetition, use xx, not x.
09:01 rgs aah.
09:01 Juerd rgs: With these things, something like say "[$_]" provides very valuable insight.
09:02 rgs I figured that out :p
09:36 f0rth will it be possible to have annotation(metadata?) for class?
09:44 vcv-- has quit IRC (Read error: 145 (Connection timed out))
10:00 iblech has joined #perl6
10:08 svnbot6 r3495, iblech++ | Implemented min() and max() (work with and without a userspecified comparision
10:08 svnbot6 r3495, iblech++ | sub) and added more (successful! :)) tests for them.
10:08 svnbot6 r3496, iblech++ | EOLs at EOFs.
10:08 svnbot6 r3497, iblech++ | Unbreak p6explain and add some more ops to p6explain.dat.
10:39 nothingmuch has joined #perl6
10:39 svnbot6 r3498, iblech++ | Fixed a test of operator_overloading.t and added two more.
10:39 svnbot6 r3499, iblech++ | Made overload.t finish again (lives_ok {...}).
10:44 chady is now known as chady_
10:44 svnbot6 r3500, iblech++ | Added more tests to uniq.t. Damian's junction semantics are commented.
10:44 iblech r3500! :)
11:02 vcv-- has joined #perl6
11:06 elmex has joined #perl6
11:13 * nothingmuch goes biking
11:13 nothingmuch or wait, that means motorcycle, right? in that case make that cycling, maybe?
11:14 nothingmuch has quit IRC ()
11:35 lumi has quit IRC (Remote closed the connection)
11:38 lumi has joined #perl6
11:43 vcv-- has quit IRC (Read error: 145 (Connection timed out))
11:49 meppl has joined #perl6
11:52 madhouse has quit IRC ()
11:57 rgs has quit IRC (Read error: 113 (No route to host))
11:59 rgs has joined #perl6
12:03 Limbic_Region has joined #perl6
12:03 svnbot6 r3501, iblech++ | uniq() implemented (with inplace syntax too), tests pass :)
12:03 lumi has quit IRC (Read error: 104 (Connection reset by peer))
12:07 sekimura has quit IRC ("zzz...")
12:07 TheBigBear has quit IRC ("Chatzilla 0.9.68a [Firefox 1.0.2/20050321]")
12:08 kolibrie has joined #perl6
12:09 lumi has joined #perl6
12:11 theorbtwo has joined #perl6
12:15 larsen has quit IRC ("later")
12:15 lumi has quit IRC ()
12:16 Limbic_Region has quit IRC ("CGI:IRC 0.5.4 (2004/01/29)")
12:16 lumi has joined #perl6
12:25 Limbic_Region has joined #perl6
12:26 meppl has quit IRC (Remote closed the connection)
12:46 Limbic_Region if someone wouldn't mind telling autrijus the bug he wanted me to write a minimal test case for was apparently magically fixed overnight
12:46 Limbic_Region I can still write the test but likely whomever fixed the bug also wrote a test
12:50 iblech Do you refer to this while bug?
12:51 iblech ...or some other bug
12:53 Limbic_Region right
12:53 Limbic_Region the while sort thingy
12:53 Limbic_Region it apparently works now
12:54 Limbic_Region I didn't have a chance to test it in the full application - but my minimal test case didn't exhibit the bug
12:54 Limbic_Region I assume that means it is fixed
12:54 Limbic_Region but I have a 4hr long marathon meeting in 5 minutes and have no time to do further testing
12:54 Juerd assumption is one of the greatest dangers to programming
12:56 Limbic_Region right - which is why I didn't let it go but made mention of it here
12:58 nnunley has joined #perl6
12:58 * Limbic_Region wanders off to the meeting
12:58 Juerd nnunley: And that's why 'router' makes a bad hostname :)
12:59 Juerd (on the internet site)
12:59 Juerd (on the internet side)
12:59 Juerd argh.
13:03 nnunley Juerd: Heh.
13:03 svnbot6 r3502, Stevan++ | adding the Type Tree from Context.hs translated to perl6 using Tree.pm
13:03 svnbot6 r3503, Stevan++ | Perl::MetaModel - adding some Type signatures to Meta::Method
13:03 svnbot6 r3504, Stevan++ | Tree - adding Makefile.PL and better type sig for method
13:03 nnunley Juerd:  Just NAT aliasing problems.
13:11 * clkao giggles at nnunley
13:14 vcv-- has joined #perl6
13:15 Drim has quit IRC (No route to host)
13:20 nnunley clkao: grins.
13:23 jhorwitz has joined #perl6
13:43 Limbic_Region has quit IRC ("CGI:IRC (Ping timeout)")
13:45 Aankh|Clone autrijus, you around?
13:45 Aankh|Clone is now known as Aankhen``
13:52 vcv-- has quit IRC (Read error: 145 (Connection timed out))
14:01 lightstep has joined #perl6
14:07 SM_ax has quit IRC ("ChatZilla 0.9.61 [Mozilla rv:1.7.7/20050420]")
14:12 broquaint has joined #perl6
14:16 Shachaf has joined #perl6
14:16 lumi has quit IRC (Read error: 104 (Connection reset by peer))
14:17 lightstep has quit IRC ("there's nobody there")
14:21 osfameron_ has joined #perl6
14:22 lumi has joined #perl6
14:29 osfameron has quit IRC (Read error: 113 (No route to host))
14:36 elmex has quit IRC ("leaving")
14:37 broquaint has quit IRC ("&")
14:42 zuulvin_ has joined #perl6
14:48 ihb has joined #perl6
14:53 TheBigBear has joined #perl6
14:56 zuulvin_ has quit IRC (Read error: 145 (Connection timed out))
14:57 zuulvin_ has joined #perl6
15:01 autrijus greetings!
15:01 Aankhen`` Hi autrijus. :-)
15:01 autrijus for some reason, I accidentally implemented this:
15:01 autrijus coro flipflop { my $i = 0; while 1 { yield ($i = 1-$i) } }
15:01 autrijus say flipflop(); # 1
15:01 autrijus say flipflop(); # 2
15:01 autrijus say flipflop(); # 1
15:01 autrijus say flipflop(); # 2
15:01 integral eww
15:02 autrijus now, do I commit or not :)
15:02 * integral is in the group that hates hiding the coroutine state
15:02 autrijus integral: you can't return() from coro
15:02 autrijus and you can't yield from normal sub
15:02 integral oh, It's a cooperative thread?
15:02 autrijus so they are categorically different
15:02 integral ok, that's less evil :-)
15:02 autrijus you can think of it this way, yes
15:02 autrijus I think it's quite less evil :)
15:02 integral what happens when control gets to the end of the coro?
15:03 autrijus it resumes from the top
15:03 Aankhen`` autrijus >> Was there any progress on linking Parrot into Pugs on Windows?
15:03 autrijus Aankhen``: no, I had not investigated
15:03 integral ah, so why the loop?   just s/my/state/ surely?
15:03 Aankhen`` Hrm.
15:03 autrijus integral: good point, surely
15:03 autrijus a sec
15:03 Aankhen`` There was one thing I think I realised last night right after I went off...
15:03 Odin- autrijus: Hmm. Isn't that a question for p6l? :>
15:03 Aankhen`` It seems to be looking for *.lib in the current directory, if I understand the command line correctly.
15:03 lumi has quit IRC (Read error: 104 (Connection reset by peer))
15:04 autrijus Odin-: it is :)
15:05 * autrijus tries state()
15:05 autrijus Odin-: I just want something concrete to experiment with
15:05 autrijus all its tests should go to t/unspecced/ surely
15:05 x86 hmm
15:05 autrijus integral:
15:05 autrijus coro flipflop { state $i; yield ($i = 1-$i) }
15:05 autrijus it works!
15:05 autrijus integral++
15:05 Odin- autrijus: Hm. I get what you mean ... but putting it there is essentially an invitation to use...
15:06 autrijus Odin-: surely so
15:06 autrijus same as with ./method and friends
15:06 Odin- Hm. True.
15:06 iblech autrijus: But you could s/coro/sub/ and s/yield/return/ on your last example :)
15:06 autrijus iblech: this is an excellent excellent point :)
15:06 integral :-)
15:06 autrijus iblech: better suggestions?
15:06 autrijus fibonacci generator?
15:07 x86 is it possible to write an entire OS in Perl6 and compile it into Parrot bytecode, then bootstrap a machine to the Parrot VM and run your Parrot bytecode OS?
15:07 x86 that would be sweet
15:07 autrijus x86: surely yes. then you'll want a Parrot Chip
15:07 Odin- x86: Kinda like a lisp machine?
15:07 Odin- ;>
15:07 autrijus "if you want a Parrot Chip, ask Parrot's Chip"
15:07 * integral just discovered that Xen abstracted the hardware, getting around the not-enough-drivers problem for hobby-OSes
15:08 PerlJam autrijus: he could just use a saved JITed version of the OS
15:09 iblech Hm... one could transcribe fib() using state and sub, too -- sth. along the lines of state ($cur_num, $last_num) etc.
15:09 integral you need something which has two states,  ie two entry points
15:09 lumi has joined #perl6
15:09 integral coro flip_flop { yield 1; yield 0 }
15:11 pasteling "Aankhen``" at 203.101.1.146 pasted "Output from `nmake unoptimized` -- is GHC looking for *.lib in .?" (40 lines, 2K) at http://sial.org/pbot/10273
15:11 PerlJam integral: now generalize that to N states :-)
15:12 rafl has quit IRC (Read error: 60 (Operation timed out))
15:12 integral my @coros = map -> $N { coro { map :{ yield $_ } 1..$N } }, 1..inf;
15:12 integral s:P5/\$_/$^n/
15:13 autrijus nice
15:13 lumi has quit IRC (Read error: 104 (Connection reset by peer))
15:13 Aankhen`` Bleh... space before colon...
15:13 autrijus just drop the colon
15:13 integral using yield deeply inside control structures like that is probably the most powerful way to use it :-)
15:13 lumi has joined #perl6
15:13 PerlJam Aankhen``: space before colon will be the common case.
15:13 Aankhen`` PerlJam >> Ewww.
15:13 integral hmm, is that : wrong?
15:13 lumi has quit IRC (Read error: 104 (Connection reset by peer))
15:13 PerlJam integral: no, it's fine.
15:14 integral hmm, why do I need a :?
15:14 autrijus you don't... it's optional
15:14 integral ah, ok
15:14 lumi has joined #perl6
15:14 Aankhen`` PerlJam >> Could you take a look at my first draft of docs/quickref/rules?
15:14 PerlJam you only need the : if you use map thusly:   @foo.map:{...}
15:14 autrijus ok, weird weird coro landed.
15:14 PerlJam Aankhen``: sure, where is it?
15:14 Aankhen`` Can I DCC it to you?
15:15 PerlJam Aankhen``: you don't have commit privs to the pugs repo?
15:15 Aankhen`` Or e-mail or something...
15:15 Aankhen`` I do.
15:15 PerlJam then commit it! :-)
15:15 Aankhen`` Bleh, I'm scared. :-P
15:15 autrijus Aankhen``: just commit...
15:15 Aankhen`` OK.
15:15 Aankhen`` One sec.
15:15 autrijus it gets easier with practice
15:15 PerlJam Aankhen``: If you do something "wrong" then the rest of us can (and will) fix it.
15:15 autrijus ok... now I need to write to... p6l or p6c?
15:16 autrijus p6c probably
15:17 Aankhen`` Whaa?
15:17 svnbot6 r3505, iblech++ | * Added "or", "and", "err", "xor", and "nor" to the list of non-userdefined
15:17 svnbot6 r3505, iblech++ |   "metareducible" ([...]) operators.
15:18 svnbot6 r3505, iblech++ | * unTODOed and unEVALed reduce.t.
15:18 svnbot6 r3505, iblech++ | * Usual svn properties added to ext/Perl-MetaModel/lib/Perl/TypeTree.pm.
15:18 svnbot6 r3506, autrijus++ | * Anonymous and named coro {...} with yield() landed.  Highly experimental!
15:18 svnbot6 r3506, autrijus++ |   (The semantics is burrowed from Coro::Cont from CPAN.)
15:18 Aankhen`` svn: Commit failed (details follow):
15:18 Aankhen`` svn: 'C:/Development/pugs/docs/quickref/rules' is not under version control
15:18 autrijus Aankhen``: svn add docs/quickref/rules
15:18 Aankhen`` Ah, okay.
15:18 * Aankhen`` blushes.
15:18 integral mmm, this coro is much, much nicer than Coro::Cont.
15:18 PerlJam Aankhen``: See?  you needed the practice anyway :-)
15:19 autrijus integral: how so?
15:20 integral it's got syntax! :-)
15:20 autrijus lol
15:20 Aankhen`` Committed.
15:20 autrijus Aankhen++
15:20 Aankhen`` :-D
15:20 wolverian PerlJam: hmm. so, is the adverbial block :{} fine as the first argument to map? I thought the current signature system didn't support that.
15:22 iblech [BUG] my $x = coro {}; $x() hangs
15:22 integral that's not a bug...
15:23 vcv-- has joined #perl6
15:23 iblech Not?
15:23 svnbot6 r3507, Aankhen++ | * First draft of docs/quickref/rules
15:23 integral there's a implicit loop around the coro's body
15:23 iblech Oh yes
15:23 iblech Ok
15:23 integral you have to yield to switch between contexts/threads
15:23 PerlJam wolverian: Sure.  the slurpy *& gets it whether it's the first or the Nth argument as long as it's adverbial.
15:24 wolverian PerlJam: ah, okay.
15:24 wolverian is there an adverbial *@?
15:25 wolverian wait, that's * %, isn't it.
15:25 integral ./pugs -e 'my @coros = map -> $N { coro { map :{ yield $_ } 1..$N } }, 1..10; for (1..10) { say join(" ", map :{ $_.() }, @coros) }' # hmm gives a cryptic error message
15:25 wolverian without the space. damn lag.
15:26 integral hmm, changing that last map to `map -> $c { $c.() }, @coros` fixes what ever the problem was
15:27 autrijus the $_ thing is a known bug
15:27 integral ah, ok
15:28 autrijus and I think I know why
15:28 autrijus fixing
15:28 integral autrijus++
15:28 wolverian (1..10).map:{ (1..$_).map:{ yield $_ } } ==> my @coros; say @coros.map:{ $_() }.join(" ") for 1..10;
15:29 wolverian forgot the 'coro' :)
15:29 integral eww.  and you're mixing . with ==>
15:29 stevan autrijus: hello
15:29 wolverian what's wrong with that? it's consistent with the direction of the data flow
15:30 PerlJam Aankhen``: looks good.  There's a few things I'm unsure about though.
15:30 integral wouldn't 1..10 ==> map:{ 1..$_ ==> map:{ yield $_} } ==> my @coros; be more consisitent?
15:30 autrijus greetings stevan
15:31 wolverian integral: they're equivalent when it comes to direction.
15:31 stevan autrijus: I have a question regarding splatty params, if you are not too busy :)
15:31 autrijus integral: I fixed your bug
15:31 autrijus stevan: sure
15:31 stevan pugs -e 'sub invoke ($f, *@args) { $f(*@args) };  say invoke(sub ($a, $b) { return "a: $a b: $b"}, 1, 2, 3)'
15:31 autrijus it looks weird!
15:31 integral sure, so isn't the argument purely on consistency?
15:31 stevan this prints "a: 1 2 3 b:"
15:31 stevan should it not print "a: 1 b: 2" , or maybe even error?
15:31 stevan Juerd seemed to think it should work
15:32 stevan but I cannot track down anything definitive in the Synopsis
15:32 autrijus the * in caller position is nto well defined.
15:32 autrijus and is even less well implemented
15:32 integral hmm, can you say: join(" ", @coros>>.() ) ?
15:32 stevan autrijus: should I p6l it?
15:32 autrijus integral: eventually yes. but the order of evaluation is undefined
15:32 autrijus stevan: sure, I don't see why not
15:32 autrijus integral: try again with r3508
15:32 stevan ok
15:32 wolverian integral: I only wanted to be consistent about _direction_ :)
15:33 integral that's nice.   Eliminates too much map
15:33 autrijus integral: also you can write $_()
15:34 autrijus integral:
15:34 autrijus my @coros = map -> $N { coro { yield $_ for 1..$N } }, 1..10;
15:34 autrijus for 1..10 { say "{ map { $_() }, @coros }" }
15:34 svnbot6 r3508, autrijus++ | * extract the function slot from App.  This makes `$^c.()`
15:34 svnbot6 r3508, autrijus++ |   work -- thanks for integral's report.
15:34 autrijus that's how I'd write it :)
15:35 autrijus integral++ # looks really nice
15:35 autrijus integral: I'll use yours as an example in my p6l post :)
15:35 autrijus or rather, p6c post.
15:35 integral autrijus++
15:35 integral hmm, I suppose you could do just the same with gather/take too
15:36 autrijus sure yes.
15:36 Aankhen`` PerlJam >> Thanks. :-)
15:36 Aankhen`` Wanna discuss whatever you're unsure about?
15:36 autrijus timtowtdi etc.
15:36 integral but that doesn't allow you to do neat stuff in P6OE
15:36 autrijus P6OE?
15:36 integral POE for p6 presumably
15:36 autrijus ahh.
15:37 PerlJam Aankhen``: It's minor stuff.  You say "POSIX character classes" and I'm not sure that those assertions have anything to do with POSIX.
15:38 Aankhen`` PerlJam >> I looked at `perldoc perlreref` and took the character classes from there.
15:38 PerlJam Aankhen``: and I'm not quite sure about your use of "let" but I'll need to re-read the AES to be sure.
15:38 Aankhen`` S05:
15:38 Aankhen`` # As with temp variables, a hypothetical variable is set with the keyword let followed by binding or assignment of the desired value:
15:38 Aankhen``    my $num;
15:38 Aankhen``    / (\d+) {let $num := $1} (<alpha>+)/
15:38 lumi has quit IRC (Read error: 104 (Connection reset by peer))
15:38 Aankhen`` Hrm, that uses :=.
15:38 Aankhen`` Apocalypse only uses =
15:39 Aankhen`` .
15:39 Aankhen`` (no update)
15:39 PerlJam Aankhen``: re posix, all I'm saying is that they may not correspond to the POSIX defs in perl6.  So I don't think it's quite right to make the association
15:39 Aankhen`` Ah, okay.
15:39 lumi has joined #perl6
15:39 Aankhen`` Should it be changed to just "Character classes" then?
15:39 svnbot6 r3509, iblech++ | Added tests for coro (t/unspecced/coro.t).
15:40 PerlJam Aankhen``: I'd just lose the heading entirely and keep them all under "built-in assertions"
15:40 Aankhen`` Alright.
15:41 PerlJam oh, and modifiers "Must be placed at beginning of rule" isn't quite right either.
15:41 lumi has quit IRC (Read error: 104 (Connection reset by peer))
15:41 autrijus iblech++ # wow, fast.
15:42 PerlJam Aankhen``: hold on a sec, let me just commit my changes and you can update :-)
15:42 Aankhen`` A'right.
15:43 stevan autrijus: actually it looks as if * in the caller pos is speced
15:44 stevan S03/List_flattening
15:44 stevan It is used to "flatten" an array into a list, usually to allow the array's contents to be used as the arguments of a subroutine call. Note that those arguments still must comply with the subroutine's signature, but the presence of * defers that test until run time for that argument (and for any subsequent arguments)
15:44 autrijus stevan: ok, thanks a lot
15:44 stevan the example given is: my @args = (\@foo, @bar); push *@args;
15:44 autrijus please write tests according to that.
15:44 svnbot6 r3510, iblech++ | * Added info about $/[0], $/[1], etc. to Aankhen``++'s docs/quickref/rules.
15:44 svnbot6 r3510, iblech++ | * Added the usual svn properties to docs/quickref/rules.
15:44 stevan I will
15:45 autrijus (and :todo<bug> it for the time being)
15:45 stevan ok
15:45 elmex has joined #perl6
15:45 stevan t/subroutines/sub_arg_errors.t already has some in it
15:45 stevan which I did last night
15:45 stevan I will try to expand upon it though
15:46 autrijus hm, can somebody reply to Colon on p6c? :)
15:46 autrijus Colin, even
15:46 autrijus and point out we are not ponie-dev :)
15:47 lumi has joined #perl6
15:50 autrijus I'll bbiab
15:50 lumi has quit IRC (Read error: 104 (Connection reset by peer))
15:50 svnbot6 r3511, duff++ | added some examples and did a little reformatting of docs/quickref/rules
15:51 lumi has joined #perl6
15:54 rgs has quit IRC ("cd ~")
15:54 autrijus PerlJam: oops, we have conflict. I tried to merge -- see if I missed anything
15:54 PerlJam autrijus: It's probably that bit at the beginning about numeric context
15:54 autrijus (nvm, I handled Colin)
15:55 stevan autrijus: I was just about to hit send :)
15:55 svnbot6 r3512, autrijus++ | * even more format fix for quickref
15:55 svnbot6 r3513, Stevan++ | Tests for *(splatty) in the caller position
15:56 Aankhen`` Heh, there goes the alignment of the character classes.
15:56 Aankhen`` I think you clobbered some of iblech's changes.
15:57 osfameron_ has quit IRC (Read error: 111 (Connection refused))
15:57 Odin- has quit IRC (Read error: 104 (Connection reset by peer))
15:57 Aankhen`` BRB.
15:58 Odin- has joined #perl6
16:03 nnunley has quit IRC ("Leaving")
16:03 lumi has quit IRC (Read error: 131 (Connection reset by peer))
16:03 nnunley has joined #perl6
16:03 svnbot6 r3514, autrijus++ | * Colin reported that "pugs -h" did not suggest which
16:03 svnbot6 r3514, autrijus++ |   backends to try -- added <Pugs Parrot Haskell>.
16:04 lumi has joined #perl6
16:07 elmex_ has joined #perl6
16:07 osfameron has joined #perl6
16:08 nothingmuch has joined #perl6
16:09 elmex__ has joined #perl6
16:09 elmex__ has quit IRC (Remote closed the connection)
16:11 elmex__ has joined #perl6
16:12 elmex has quit IRC (Read error: 148 (No route to host))
16:12 nothingmuch evening
16:13 theorbtwo Allo, nm.
16:13 * nothingmuch does Tired;
16:14 zuulvin_ has quit IRC (Read error: 110 (Connection timed out))
16:14 svnbot6 r3515, iblech++ | Added more functions to fp.pm (with tests), particularly take(Int $n, Code &f).
16:14 svnbot6 r3516, iblech++ | Help.hs -- Add missing paren to the list of valid compiler backends.
16:14 zuulvin_ has joined #perl6
16:17 autrijus iblech: &cdadar too? ;)
16:17 lumi has quit IRC (Read error: 104 (Connection reset by peer))
16:18 lumi has joined #perl6
16:18 iblech *googles* no! ;)
16:18 iblech We have [.[]] \@array, idx1, idx2, idx3, ... :)
16:19 nothingmuch autrijus: want to get that stuff done?
16:20 autrijus nothingmuch: sure!
16:20 lumi has quit IRC (Read error: 131 (Connection reset by peer))
16:20 nothingmuch okay, i'll go take a shower in a few minutes, and when I'm back maybe my brain will cool down to operating tempratures
16:20 lumi has joined #perl6
16:22 autrijus cool
16:24 elmex_ has quit IRC (Read error: 113 (No route to host))
16:25 ingy autrijus: hi
16:25 svnbot6 r3517, Aankhen++ | Regression -- reapplying clobbered changes.
16:25 autrijus hi ingy
16:25 autrijus ingy++ # nice hack, that use pugs thing
16:25 lumi has quit IRC (Read error: 131 (Connection reset by peer))
16:26 ingy thanks
16:26 ingy autrijus++ # nice Inline hack
16:26 autrijus it is particularly nice with coro :)
16:26 ingy let's just say you inspired me
16:26 lumi has joined #perl6
16:27 saorge has joined #perl6
16:27 lumi has quit IRC (Read error: 131 (Connection reset by peer))
16:27 nnunley has quit IRC ("This computer has gone to sleep")
16:27 ingy autrijus: I do worry about a conflict with `man pugs` though
16:27 ingy is there a `man pugs` ?
16:28 lumi has joined #perl6
16:28 ingy if not, I can change the doc to be the official pugs manpage instead of the  doc for the silly pragma
16:29 kolibrie has quit IRC ("leaving")
16:30 autrijus nah. just SEE ALSO Perl6::Pugs
16:30 svnbot6 r3518, autrijus++ | * Inline::Pugs should recognise coro too
16:34 g1powermac has joined #perl6
16:35 nothingmuch hola Justin
16:35 g1powermac hey there you are :-)
16:35 g1powermac was looking for yor nickname ;-)
16:35 nothingmuch anyway, time for that shower
16:35 svnbot6 r3519, Aankhen++ | * small formatting changes, consistency changes, typo fix.
16:35 g1powermac anyway, you are welcome to join #clusterix if you like :-)
16:36 nothingmuch when I return i'll hop over
16:36 Aankhen`` BBL.
16:36 autrijus ingy: there is no pugs.pod installed... I don't think we need it now
16:36 nothingmuch ciao Aankhen``
16:37 g1powermac cya nothingmuch, I'll prolly be afk in a little bit as well
16:37 Limbic_Region has joined #perl6
16:39 castaway Limbic!
16:39 castaway (allo, rest ;)
16:40 Limbic_Region I was apparently disconnected during my 4 hr long (got out 20 minutes early) marathon meeting
16:40 ingy autrijus: ?
16:41 castaway wuzmnt me, honest
16:41 ingy pugs.pm is installing its pod. is that ok?
16:42 castaway whats a pugs.pm?
16:42 ingy btw, i like the idea of 'use xxx' as an Inline for-free thing
16:42 ingy castaway: lib/pugs.pm
16:43 castaway can I have a one-line summary?
16:43 ingy inline pugs in Perl 5
16:43 ingy use pugs;...;no pugs;...
16:43 castaway ah, squifty!
16:43 ingy a wrapper of autrijus Inline::Pugs
16:44 castaway very neat
16:44 revdiablo howdy Limbic_Region
16:45 Limbic_Region salutations revdiablo
16:45 Limbic_Region I am going to try incorporating some of the ideas in the p6 challenge
16:45 revdiablo Limbic_Region: it's a shame your p6 post on pm didn't get very much response...
16:45 * Limbic_Region was disapointed that so few people chimed in
16:45 Limbic_Region yeah
16:45 Limbic_Region but we can't win every battle
16:46 Limbic_Region what is important is winning the war
16:46 revdiablo Limbic_Region: it seems people are still afraid and/or avoiding the perl6 posts
16:46 * castaway thinks most people still dont yet care (much)
16:46 ingy there is a war?
16:46 * castaway hopes not
16:46 * Limbic_Region can't tell if ingy is serious or not
16:46 ingy about?
16:47 * ingy is almost always serious
16:47 Limbic_Region oh
16:47 castaway refreshing
16:47 Limbic_Region well in that case "the war" is a figure of speech
16:48 Limbic_Region I just meant that p6 advocacy in the big picture is what is important - not a single thread at a single forum
16:48 ingy aye
16:50 autrijus ingy: yeah, pugs.pm installing its pod is okay
16:50 ingy ok
16:51 autrijus nothingmuch: ping me when you're back
16:53 ajs_ has joined #perl6
16:53 ninereasons has joined #perl6
16:54 Limbic_Region autrijus - did you get the note about the bug that went away?
16:54 Limbic_Region I developed a minimal test case per our discussion yesterday and it wasn't there
16:54 Limbic_Region I presume someone fixed it (and hopefully added a test)
16:54 autrijus Limbic_Region: oh. so the bug is gone?
16:55 Limbic_Region afaict
16:55 Limbic_Region I haven't had a chance to plug it into the bigger code piece to see if it also works there yet
16:55 Limbic_Region 4 hour long meetings suck
17:01 ajs has quit IRC (Read error: 110 (Connection timed out))
17:02 nothingmuch autrijus: actually, raincheck... I have to cook and get my sister washed up and in bed
17:02 nothingmuch with a story and all that it'll be another hour or so
17:04 autrijus nothingmuch: oh. ok. I'm not sure if I'll still be around. ping me at that time
17:05 nothingmuch okies
17:05 nothingmuch if not i'll start writing up what we've got in some nice format with pretty pictures
17:07 svnbot6 r3520, iblech++ | A bit more PODification of lib/Perl6/Pugs.pm to make it look nicer on
17:07 svnbot6 r3520, iblech++ | search.cpan.org.
17:07 svnbot6 r3521, iblech++ | Implemented &prefix:<[.[]]> and added a test for it (passes! :)).
17:08 autrijus oh wow.
17:08 autrijus iblech is going at great strides
17:08 iblech Yeah, I start to grok Haskell :)
17:08 * iblech food &
17:13 wolverian what does &prefix:<[.[]]> do?
17:13 Limbic_Region autrijus - it is apparently some other problem being masked - it still doesn't work in the bigger application but it doesn't blow up either
17:13 Limbic_Region looks like an infinite loop
17:13 Limbic_Region no output at all
17:13 Limbic_Region will see if I can reduce it
17:14 theorbtwo [.[]] \@array, (1,2,3,4) is equiv to...
17:14 theorbtwo \@array.[1].[2].[3].[4].
17:15 theorbtwo (Or, in p5ish, $array[1][2][3][4].)
17:17 autrijus iblech: hey, you duplicated the Syn "[]" :-/
17:18 osfameron has quit IRC ("Leaving")
17:19 lumi_ has joined #perl6
17:20 * Limbic_Region rather likes @foo.map:{ ... } syntax
17:20 * integral likes @foo ==> map:{ ... }
17:21 Limbic_Region pugs doesn't have any gather/take functionality right?
17:21 theorbtwo Not yet.
17:22 theorbtwo AFAIK, anyway.
17:22 Limbic_Region hmmm - a bug that was supposedly fixed is still breaking for me
17:24 chady has joined #perl6
17:24 svnbot6 r3522, autrijus++ | * reuse Eval's implementation for .[] and .{}
17:26 theorbtwo Somebody point out decent docs on gather/take?
17:26 theorbtwo I don't see them from [google://site:dev.perl.org gather take]
17:26 madhouse has joined #perl6
17:28 revdiablo theorbtwo: there's a mention in S06, I think.
17:29 revdiablo hmm that's not it.
17:29 svnbot6 r3523, autrijus++ | * leo says string_to_cstring shall be used, not peek.
17:31 TheBigBear has quit IRC (SendQ exceeded)
17:32 lumi has quit IRC (Read error: 110 (Connection timed out))
17:32 chady has quit IRC ("leaving")
17:32 revdiablo theorbtwo: http://search.cpan.org/~ingy/Perl6-Bible-0.16/lib/Perl6/Bible/A12.pod#The_gather/take_Construct
17:35 TheBigBear has joined #perl6
17:36 Limbic_Region my brain is not functioning
17:37 Limbic_Region apparently it decided to declare the weekend several hours early
17:37 * Limbic_Region isn't overly optimistic about getting net access at home this weekend either
17:40 autrijus hm.
17:41 autrijus is there tests for gather/take?
17:41 autrijus ah, gather.t
17:42 revdiablo there are some tests in damian's Perl6::Gather module too, that might be appropriated
17:43 Limbic_Region there is also at least 1 example in the coroutine thread I started a while back
17:44 revdiablo the more I use it, even in non-working code, the more I like gather/take. it seems like a nice construct
17:44 autrijus ok then.
17:44 autrijus implementing
17:44 Limbic_Region revdiablo - admit it - you are lazy and being more lazy pleases you
17:44 revdiablo yay! autrijus++
17:44 Limbic_Region autrijus  
17:45 Limbic_Region plus plus even
17:45 revdiablo Limbic_Region: I can't deny it
17:45 nothingmuch is there a way to delazify gather/take?
17:46 autrijus strictify?
17:46 revdiablo @array = gather {}; ? I think it needs to be a binding assignment to be lazy. or maybe not... I dunno
17:46 autrijus I'm not sure if it needs to be lazy or not
17:46 nothingmuch to prompt the user
17:46 nothingmuch although admittedly gather { while(<>){ take($_) } is a pretty cool way
17:47 Limbic_Region I think it may or may not be lazy
17:47 * Juerd doesn't understand how a lazy gather helps.
17:47 vcv-- is now known as vcv-
17:47 nothingmuch Juerd: there was a thread which illustrated that take is much like a yield
17:47 revdiablo A12 says "in a lazy context it might run as a coroutine"
17:47 Juerd Eek
17:47 * Limbic_Region will look for the thread
17:47 Juerd That has serious implications for non-local variable accesses
17:48 nothingmuch Juerd: IMHO it has horrible implications for many things
17:48 nothingmuch but sometimes it can be useful
17:48 autrijus I'm of the opinion that gather is gather and coro is coro.
17:48 Juerd The less common occasion that it is really useful, you can easily write the coro yourself.
17:48 autrijus but it's just mho :)
17:49 nothingmuch true that
17:49 Juerd autrijus: oho, because it's mho too.
17:49 nothingmuch and mine, actually
17:49 iblech autrijus: re. bah :( But I think it was a good exercise nevertheless
17:49 Limbic_Region perlbot nopaste
17:49 perlbot Paste your code here and #<channel> will be able to view it: http://sial.org/pbot/<channel>
17:49 Juerd I do wonder what lho is.
17:49 * nothingmuch doesn't like lazyness at all, unless it's explicit
17:49 nothingmuch and lazyness is tricky on users
17:49 Juerd nothingmuch: Some laziness works well implicitly
17:49 pasteling "Limbic_Region" at 129.33.119.12 pasted "Lazy gather/take by Luke" (14 lines, 354B) at http://sial.org/pbot/10277
17:49 nothingmuch ranges etc are okay
17:49 Juerd nothingmuch: 1..10_000 doesn't depend on any state
17:49 Juerd Right.
17:49 nothingmuch but constructs are evil
17:49 Juerd Yes.
17:50 nothingmuch and assignment to an array from IO
17:50 Limbic_Region that paste was from the coroutine thread I started
17:50 nothingmuch and whatnot
17:50 Juerd Anything that evaluates an arbitrary expression *later* should be recogniseable as such.
17:50 nothingmuch true
17:50 iblech nothingmuch: [delazify gather] my @unlazy_array = **gather {...}
17:50 nothingmuch we'll have a cargo cult of 'assign with ** because it's better'
17:50 nothingmuch heh, =)
17:51 Juerd I'm very unsure about the merits of DEFAULT lazy IO.
17:51 Juerd I think it should be immediate by default
17:51 Juerd And lazy only if marked as such.
17:51 revdiablo as long as the lazy marker is fairly convenient
17:51 nothingmuch i think we should have a 'later { }' which is a type of closure
17:51 Juerd revdiablo: How about "lazy", which is like "list", but enables want.lazy as well.
17:51 nothingmuch that evaluates to the result of itself
17:52 Juerd my @foo = lazy gather { ... };
17:52 nothingmuch and is indistinguishable from the outside
17:52 Juerd my @bar = lazy slurp '/etc/passwd';
17:52 Juerd And make sure lazy context is never the default.
17:53 nothingmuch yep
17:53 Juerd Who wants to bring this to p6l?
17:53 nothingmuch lazy { } in list context could be useful for some things
17:53 Juerd 'cause I don't
17:53 nothingmuch many have already
17:53 nothingmuch what's the point?
17:53 Juerd The introduction of a lazy *context* is new, I think
17:53 nothingmuch anyway, back to taking care of my sister
17:53 nothingmuch if there are no volunteers, i'll bring it up in 20 minutes
17:53 Juerd But I might be wrong.
17:54 iblech Juerd: my $lazy_var := new Proxy: FETCH => {...} is close, I think
17:54 nothingmuch new Proxy: FETCH is hard on newbies
17:54 nothingmuch and it's a hard thing that could be easy
17:54 g1powermac is now known as g1powermac_AFK
17:55 iblech Agreed
17:55 Juerd Laziness should indeed be made trivial to use, but hard to use accidentally.
17:55 nothingmuch okay, i'll write this stuff down and post in a few mins
17:55 Juerd Except in cases that cannot go terribly wrong. I.e. where the entire list does not depend on any outside state.
17:56 iblech Wasn't there a trait which could be used in sub signatures which put implicit curlies around its argument? Then one could easily write a sub lazy(Code &f is ___) { new Proxy: FETCH => { f() } }
17:56 autrijus ...done.
17:56 Juerd And even a gather can even be optimized to do that, IFF it accesses no outside variables.
17:56 autrijus hm, 12 minutes. not bad :)
17:56 * Juerd wonders what autrijus has ...done.
17:56 autrijus Juerd: gather/take
17:57 Juerd autrijus: Oh, neat!
17:57 autrijus r3524
17:57 Limbic_Region laziness factor yet to be determined right?
17:57 autrijus it's strict.
17:57 Juerd autrijus: Then I can un-uglify matrix.p6 a little :)
17:57 revdiablo autrijus++ # again
17:57 autrijus (the way I like it. :))
17:57 autrijus for now, use an explicit coro if you desire laziness
17:57 autrijus the impl can change if there's a ruling :)
17:57 autrijus (as always.)
17:58 ilogger stops logging #perl6 at Fri May 20 17:58:36 2005
17:58 ilogger stops logging #perl6 at Fri May 20 17:58:36 2005
17:58 ilogger starts logging #perl6 at Fri May 20 17:58:42 2005
17:58 ilogger has joined #perl6
17:59 Limbic_Region thanks - plus plus - now off to YAM where the M is for meetings suck really bad on friday afternoons
18:00 autrijus "I must not attend meetings. Meetings are the mind killer. Meetings are the little-death that brings total obliteration. I will face my meeting. I will permit it to pass over me and through me. And when it has gone past I will turn the inner eye to see its path. Where the wasted time has gone there will be nothing. Only I will remain."
18:04 theorbtwo autrijus++
18:04 svnbot6 r3524, autrijus++ | * gather/take.
18:04 svnbot6 r3525, autrijus++ | * fix test.
18:05 autrijus nested gather breaks... anyone wants to write a test to gather.t ?
18:05 autrijus (currently the inner take affects outer gather)
18:05 iblech Will do
18:05 autrijus danke
18:08 autrijus ...fixed.
18:11 autrijus stevan: I think that's all the feature I will hack in for 6.2.3 -- of course iblech may still implement tons of stuff -- but ChangeLog can start now :)
18:11 svnbot6 r3526, autrijus++ | * inner take shall not affect outer gather.
18:12 autrijus iblech: &take clash with fp
18:13 iblech Hm, right. Suggestion for a new name?
18:13 autrijus replicateM ;)
18:13 autrijus (that's its haskell name)
18:13 autrijus j/k
18:13 iblech ok
18:13 Juerd iblech: re inner take test: make sure you test 3 levels as well as 2
18:13 iblech Juerd: Ok
18:14 TheBigBear_ has joined #perl6
18:19 svnbot6 r3527, iblech++ | fp -- fp::take clashes with builtin take -- rename to replicate
18:19 svnbot6 r3528, iblech++ | * Added tests for multi-level gather.
18:19 svnbot6 r3528, iblech++ | * unTODOed a test of reduce.t.
18:19 iblech BTW, we need a different name for Test::fail, too
18:20 autrijus why so?
18:20 iblech There's the builtin fail, too
18:20 nothingmuch because fail is a builtin
18:20 autrijus right.
18:20 autrijus so we define fail in the Test monad as a test failure...
18:20 autrijus ...err, wrong language.
18:21 nothingmuch ok, here's my idea for the semantics
18:21 nothingmuch there are two forms:
18:21 nothingmuch lazy { }, which is like an anonymous sub
18:22 nothingmuch and lazy ...
18:22 Odin- has quit IRC (Read error: 104 (Connection reset by peer))
18:22 nothingmuch which is a context modifier
18:22 nothingmuch they both have the same effect, but different syntax, depending on when it makes more sense
18:22 Odin- has joined #perl6
18:22 nothingmuch what it does is creates a coroutine
18:22 autrijus I think punning is verboten in perl6 :)
18:22 autrijus (eval {} vs eval ..., do {} vs do ..., etc)
18:22 nothingmuch whose value masquerades as it's return
18:23 nothingmuch autrijus: this is not like strings
18:23 nothingmuch lazy gather {} instead of lazy { gather { } }
18:23 nothingmuch anyway
18:23 nothingmuch any access to the return value invokes the coro
18:24 vcv- Will there be any way to define a function/keyboard/op that takes { }? like.. do_something { ... }
18:24 theorbtwo That's easy.
18:24 theorbtwo Just make it's first argument a Code.
18:24 iblech vcv-: Of course, sub do_something(Code &f) { f(...) }
18:24 nothingmuch list context lazy is even funkier
18:24 vcv- sweet
18:24 nothingmuch it's how generators are constructed
18:24 vcv- forgot about that. thanks :)
18:25 nothingmuch the special case is that the coro is reinvoked when an ungotten element is returned
18:26 nothingmuch gather's take exploits that by doing a yield when in lazy context
18:26 nothingmuch the range operator could be implemented as such:
18:27 nothingmuch sub &infix:<..> ($from is copy, $to) { lazy gather { while($from !~ $to) { take ($from++) } } }
18:27 nothingmuch this makes me think:
18:28 nothingmuch sub foo ($x, $y where { $y ~~ ref($x) }){ }; # is that how you accept two params of the same type?
18:28 autrijus I think it's
18:28 nothingmuch and how the hell will error messages look like when subtypes fail?
18:29 autrijus sub foo (::a $x, ::a $y) { ... }
18:29 autrijus but yours should work too
18:29 nothingmuch autrijus: without knowing the type in advance?
18:29 autrijus nothingmuch: right.
18:29 vcv- pardon my ignorance, but what is ::a for exactly?
18:29 TheBigBear has quit IRC (Connection timed out)
18:29 autrijus vcv-: it's a type variable.
18:30 autrijus that part of perl6 is very underdocumented
18:30 vcv- Hm. like a template?
18:30 nothingmuch sub &infix:<..> ($from is copy where { $from.can("postfix:<++>") }, $to where { $to ~~ ref($from }){ ... }
18:30 vcv- or that you pass an actual type?
18:30 nothingmuch vcv-: you can pass an actual type
18:31 nothingmuch and we don't want no stinkin templates
18:31 vcv- heh.. i hate templates
18:31 nothingmuch we can just dispatch methods on the objects later
18:31 vcv- why ::a though
18:31 nothingmuch our type system is polymorphic enough that we don't need to generate methods that know about the types whenever they're used
18:31 vcv- is "a" a keyword?
18:31 nothingmuch and the correct type will be found
18:31 nothingmuch i don't know why '::a' specifically
18:32 nothingmuch but sub foo (Class $a) { } accepts one param named $a of class Class
18:32 autrijus vcv-: :: is like $
18:32 autrijus it's a sigil
18:32 autrijus $ denotes a Scalar
18:32 nothingmuch my $namespace = ::a;
18:32 autrijus @ denotes an Array
18:32 vcv- does it have to be ::a, or is the "a" irrelevant
18:32 autrijus :: denotes a type/namespace
18:32 kelan has quit IRC (Read error: 145 (Connection timed out))
18:32 nothingmuch that's an analogy that could work
18:32 autrijus it's irrelevant
18:32 autrijus you can write ::aoioihiohrehr
18:33 vcv- ok, thanks :)
18:33 nothingmuch anyway, does everyone think my summarized lazy semantics please them? can I post to p6l?
18:33 vcv- i know what $ @ and % mean :p
18:33 nothingmuch well, &foo means the function
18:33 nothingmuch my $function_ref = &foo;
18:33 nothingmuch without invoking it
18:33 nothingmuch and ::foo means a namespace
18:34 autrijus nothingmuch: I think list context is lazy by default, so I'm not sure what such a hinter will be for.
18:34 vcv- ok, namespaces. indeed.
18:34 nothingmuch in p5 strings can be namespaces
18:34 nothingmuch but without any magic
18:34 nothingmuch autrijus: we aim to change that
18:34 autrijus otoh, I can see "list' being strict and "lazy' being lazy.
18:34 vcv- my $function_ref = &foo.assuming(1,2);
18:34 vcv- im looking forward to using that
18:34 autrijus because that's lease surprise
18:34 autrijus (I think.)
18:34 autrijus but anyway go ahead and submit it
18:34 nothingmuch you can say 'my &curried = &foo.assuming(1,2); curried(3)'
18:35 vcv- i still havent figured out currying 100%
18:35 nothingmuch well, it's really simple, actually
18:35 cognominal print keys %::*  # still broken
18:35 nothingmuch lets say foo accepts 3 positional params
18:36 nothingmuch the example above will put inside &curried a function that accepts one param
18:36 vcv- right. but what is the relevance of curried(3)
18:36 nothingmuch sort of like sub curried ($c){ my $a = 1; my $b = 2; foo($a, $b, $c) }
18:36 nothingmuch curried(3) puts 3 in c
18:36 nothingmuch $c
18:36 nothingmuch and calls foo with the 3 params
18:36 vcv- OH.. i totally misread that
18:37 vcv- i thought curried(3) was some sort of modifier and not the function call. oops!
18:37 nothingmuch ah
18:37 autrijus cognominal: is it %::* or %*:: ?
18:37 autrijus (both would be broken right now)
18:37 nothingmuch that was more of an example for sigil consistency
18:37 vcv- gotcha
18:37 nothingmuch my &curried =
18:37 autrijus (sigil invariance)++
18:38 autrijus (@{[$#{}}]})--
18:38 nothingmuch yeah, those are aweful
18:38 vcv- ./ really grows on you.
18:39 cognominal autrijus: I was reading docs/quickref/namespace which speaks of %::*
18:39 autrijus indeed, indeed
18:39 vcv- it reminds me of scripting for irc (mIRC specifically, ick)
18:39 autrijus cognominal: hm. I think it's %*:: and %*P::
18:40 autrijus but I'm not 100% sure and I can't find a ref in Syns yet
18:40 cognominal anyway neither parses right now
18:40 autrijus cognominal: can you help to grep / p6l and write test for whatever the final form? :)
18:40 cognominal yes, if can figure it :)
18:40 autrijus cognominal++
18:41 iblech From S02: $::("*::$foo")      # global $Foo -- although that's not %::
18:42 autrijus iblech: interested in hacking in symbolic deref? :)
18:43 autrijus parse for sigil, "::", verbatimParens ruleExpression, then give it a Syn, that should be call
18:43 autrijus s/call/all/
18:43 Aankhen`` has quit IRC ("Restart [Time wasted online: 9hrs 57mins 9secs]")
18:43 autrijus actually, parens ruleExpression will do too
18:43 cognominal oh btw, can we stack OUTER:: ?
18:44 iblech I'll try :)
18:44 nothingmuch cognominal: in theory yes, as of 2 days ago (says nothing about today) - not yet in pugs
18:45 autrijus er, we can.
18:45 autrijus it looks like it sometimes miscalculates tho
18:45 autrijus pugs> { my $a = 1; { my $a; { my $a; say $OUTER::OUTER::OUTER::a }}}
18:45 autrijus 1
18:45 autrijus tests welcome.
18:46 cognominal you amaze me. we will have a full ghc implementation (whatever that means) by the end of summer at this pace
18:46 TheBigBear_ has quit IRC (Client Quit)
18:46 kelan has joined #perl6
18:46 autrijus full implementation of perl6 in ghc interpreted mode?
18:46 autrijus I doubt it, but that's only because of unspeccedness
18:46 cognominal so the "whatever that means" :)
18:47 autrijus we'll probably reach a point where pugs drives the missing specification, though :)
18:47 autrijus (as is the intention all along)
18:47 theorbtwo We're going to implement a full Glasgow Haskell Compiler?  Nifty, considering I didn't know that was a goal.
18:47 cognominal in perl5, the implementation is the ultimate spec
18:47 autrijus theorbtwo: "in ghc"
18:47 autrijus cognominal: not so in p6... I think independent implementation backed up by acceptance test and shared libraries is Good Thing
18:48 autrijus it keeps people honest :)
18:48 autrijus implementors, inparticular.
18:48 nothingmuch autrijus: want to do internals chat?
18:48 theorbtwo autrijus: It was a joke.
18:48 cognominal yea, but the implementation is the ultimate test
18:48 autrijus nothingmuch: wow, you have time now?
18:48 nothingmuch yep
18:48 theorbtwo NM: Are you pouring these into something?
18:48 nothingmuch Juerd, iblech: sent to p6l
18:49 nothingmuch theorbtwo: not yet, i need a big picture
18:49 autrijus nothingmuch: sure, I can do so for a little while
18:49 autrijus nothingmuch: ask away
18:49 nothingmuch then I'll make it into pugs acropheosomething 02, with pretty diagrams
18:49 nothingmuch okay
18:49 nothingmuch VSubs
18:49 nothingmuch and 'builtins'
18:49 autrijus builtins are known as Prims.
18:49 autrijus short for primitives
18:50 nothingmuch how are they evaluated, from reduce down to apply, bindparams, etc
18:50 nothingmuch as I said, I know most of this already, but others may be interested
18:50 autrijus the definition of a Prim is some code that is not expressed as an Exp (i.e. Perl 6 AST).
18:50 autrijus but rather as something "internal" to the backend
18:50 nothingmuch that guy that asked to sit in isn't here... too bad
18:50 autrijus i.e. native haskell function, native parrot function, etc.
18:50 autrijus scook0? yeah
18:51 nothingmuch yup
18:51 autrijus so, VSub is known as VCode now
18:51 nothingmuch ah
18:51 autrijus to agree with its perl6 type
18:51 nothingmuch goody
18:51 nothingmuch it represents: closure, subroutine, method, block...
18:52 autrijus a VCode represents a closure.
18:52 autrijus its type denotes the flavour of the closure.
18:52 autrijus currently we have Method, Coroutine, Routine, Block, Prim
18:52 autrijus as the five flavours.
18:52 autrijus the subType of VCode affects how it is evaluated
18:52 autrijus subType == flavour
18:53 autrijus I wonder if we should switch to codeType etc.
18:53 autrijus but anyway.
18:53 autrijus keep the nomenclature for now
18:53 nothingmuch . o O ( /me ought to reread perlguts illustrated and steal some presentation ideas )
18:53 autrijus so, a closure closes over its creation environment
18:53 theorbtwo perlguts illustrated is quite nice.
18:53 autrijus that's subEnv
18:53 nothingmuch s/reread/reskim/
18:54 autrijus (it used to be subPad, but it's subEnv now.)
18:54 nothingmuch brb, getting paper + pencil
18:54 theorbtwo I wonder if there's a way to autogenerate, or semiautogenerate, that sort of diagram from the haskell source.
18:54 autrijus so everything is frozen at the time of creation of the closure
18:54 autrijus theorbtwo: there's some dot generators iirc
18:55 autrijus the things frozen including the lexical variable, the outer scope, everything
18:55 nothingmuch also got some olives
18:55 nothingmuch would you guys like a jar or two of wonderful olives at the hackathon?
18:56 theorbtwo (Black olives)++
18:56 autrijus nothingmuch: should I go on?
18:56 nothingmuch theorbtwo: these are syrian ones
18:56 Aankhen`` has joined #perl6
18:56 nothingmuch when are unnamed blocks "created"
18:56 nothingmuch autrijus: ofcourse
18:56 nothingmuch parse time?
18:57 autrijus at parse time they are created
18:57 autrijus but the subEnv and subCont slots are really populated at runtime
18:57 autrijus when they are evaluated
18:57 autrijus so it's a two-step thing
18:57 autrijus Syn "sub" handles the population.
18:58 nothingmuch a sub also has params
18:58 autrijus yes.
18:58 nothingmuch and optionally a binding (for .assuming)
18:58 autrijus Params is just list of Param
18:59 autrijus but that will change
18:59 nothingmuch a Param is either positional, or named, optional, has a type, etc
18:59 cognominal use Test; { my $a = 1; { my $a=2; { my $a=3; ok $a==3 ; ok $OUTER::a ==2; say $OUTER::OUTER::a   } }}
18:59 cognominal ok 1
18:59 cognominal ok 2
18:59 cognominal 2
18:59 nothingmuch to a Map of some sort?
18:59 cognominal weird
18:59 autrijus nothingmuch: right, keyed by zones and/or invocant level
18:59 cognominal that should say 1!!
18:59 autrijus cognominal: yeah.
18:59 autrijus nothingmuch: the simple list is not sufficient to handle
18:59 autrijus sub foo ($a : $b : $c : $d)
19:00 iblech autrijus: Ok, [$%@&]::(...) is parsed now, I think, and I gave it a Syn, so that ". $::('hi')" in interactive Pugs gives "Syn "::()" {'hi'}". What next? :)
19:00 autrijus nor can it detect bad mixed zones
19:00 autrijus iblech: ok. now handle Syn "::()" by evaluating the [exp]
19:00 autrijus iblech: and fromVal it into a str
19:00 theorbtwo Where are Syn "foo" handled?
19:00 autrijus theorbtwo: Eval.hs
19:00 iblech Ok
19:00 autrijus iblech: then look it up using (Var ...) reduction logic
19:00 autrijus presto!
19:01 autrijus I think I may even have a evalVar
19:01 autrijus but don't use that
19:01 autrijus use
19:02 autrijus (evalExp . Var) =<< fromVal =<< evalExp (head exps)
19:02 autrijus or something to that effect.
19:02 Limbic_Region where exps is short for explodes
19:02 autrijus right.
19:02 autrijus and eval is euphemism for evil
19:03 nothingmuch autrijus: how is junctive autothreading handled in sub application?
19:04 autrijus nothingmuch: it's all done in juncApply.
19:04 autrijus defined in Junc.hs
19:04 Limbic_Region should something like @array[ 2..5 ]<some_key> work?
19:04 autrijus where it analyses the inv/args
19:04 autrijus and if they are junctive, then autothread
19:04 autrijus Limbic_Region: highly doubt it
19:05 Limbic_Region me too
19:05 * Limbic_Region wonders where rob (dragonchild) got the idea from
19:05 theorbtwo @array[2..5]<<<some_key> ?
19:06 Limbic_Region $score  = 4 if @hand[0]<suit> ~~ all( @hand[1..3]<suit> ); # is the suggestion in question
19:06 Limbic_Region well - except my client at the plus symbol
19:06 Limbic_Region plusequal 4
19:06 nothingmuch how is autothreading actually implemented?
19:07 autrijus @hand[1..3]>>.<suit>
19:07 autrijus should probably work but doesn't now
19:07 Limbic_Region ok - so probably just an oversight
19:07 nothingmuch juncApply is given a function to call once for each combination of args?
19:07 autrijus nothingmuch: right.
19:07 nothingmuch and then it rewraps the return value as a function?
19:07 nothingmuch tr/f/j/
19:07 autrijus right.
19:07 theorbtwo $score = 4 if [==] @hand[0..4]>>.<suit> looks clearer to me.
19:08 Limbic_Region only it is supposed to be a plusequal theorbtwo ;-)
19:08 theorbtwo OTOH, I'm not sure if [==] @array will DTRT.
19:08 theorbtwo Oh, right.
19:08 Limbic_Region and that won't work either
19:08 nothingmuch ok, what's next?
19:08 autrijus theorbtwo: why not? :)
19:08 nothingmuch perhaps a quick skim of the way different types of Prims are implemented?
19:08 Limbic_Region you are testing the suit of the first card against all the suits of the next 3
19:08 autrijus [==] is valid and happy
19:08 nothingmuch e.g., most math are simple delegation to haskell ops
19:08 theorbtwo And it does 0 == 0 == 0, and not (0 == 0) == 0 ?
19:08 autrijus right.
19:09 Limbic_Region and == is not eqeq
19:09 theorbtwo Cool.
19:09 theorbtwo Oh.
19:09 autrijus [eq] then
19:09 autrijus works too
19:09 Limbic_Region ;-)
19:09 iblech autrijus: Yay! Compiles and works! :) Cleaning it up a bit and then committing...
19:09 Aankhen`` has quit IRC ("Sleep [Time wasted online: 13mins 4secs]")
19:09 autrijus iblech++ # nice
19:09 nothingmuch btw, can you do MMD on the context?
19:09 nothingmuch sub foo returns List { }; sub foo returns Scalar { };
19:10 Limbic_Region theorbtwo - I agree that it does look much nicer
19:10 autrijus iblech++ # demonstrating that the productivity is really not me, it's really Haskell :)
19:10 nothingmuch in theory
19:10 autrijus nothingmuch: you can. and pugs does that.
19:10 autrijus nothingmuch: and it's unspecced, or at least underspecced.
19:10 nothingmuch woot
19:10 Limbic_Region $score plus= 4 if [eq] @hand[0..3]>><suit>
19:10 iblech Haskell++ :)
19:10 * cognominal notes that the log of #perl6 would overflows the disk of its ATARI ST1040 if he still had it
19:10 autrijus nothingmuch: it's line 893 Eval
19:11 nothingmuch nevermind that... skim Prim.hs ;-)
19:11 theorbtwo L_R -- I think there should be a . between the >> and the <.  It might be optional, not sure.
19:11 autrijus probably not
19:11 autrijus the dot is optional only if preceded by quotelike.
19:11 Limbic_Region well - unless I get internet connectivity at home this weekend, I am not going to touch it until Monday anyway
19:12 Limbic_Region hopefully >> will magically work in that case by then
19:12 autrijus nothingmuch: ok.
19:12 autrijus in Prim.hs we use a very crude way to manufacture the initial symbol table
19:12 autrijus that is global functions
19:12 autrijus in the form of initSyms
19:12 autrijus it will all go away at some point
19:12 autrijus replaced by proper perl6 style prototypes
19:13 nothingmuch is that the mess at the bottom?
19:13 autrijus yes.
19:13 metaperl has quit IRC (Read error: 104 (Connection reset by peer))
19:13 autrijus basically, it counts the number of comma to guess at its arity
19:13 autrijus then it dispatch to op0..op4
19:14 autrijus based on that info
19:14 nothingmuch how does that get along with 'sub &infix:<...>' etc?
19:14 autrijus and it assume List always flattens and Array never do
19:14 autrijus it's a big mess.
19:14 misc has quit IRC (Read error: 104 (Connection reset by peer))
19:14 autrijus in that large table there's a column for fixity
19:14 elmex has joined #perl6
19:15 autrijus or rather, associativity
19:15 autrijus line 947 intuits the fixity from assoc.
19:15 nothingmuch okay
19:15 nothingmuch it generates things that look like VSubs that call the correct opN?
19:15 autrijus yup.
19:15 autrijus it does so by using the backdoor in Exp
19:15 autrijus that is the Prim form
19:16 autrijus which is the only form that takes function as its param
19:16 autrijus    | Prim !([Val] -> Eval Val)         -- ^ Primitive
19:16 _metaperl has joined #perl6
19:16 nothingmuch what's !
19:16 autrijus basically, Prim represents a function that takes a list of arguments and eval something back
19:16 nothingmuch that's the first case of apply, right?
19:16 nothingmuch there's a comment in there, I remember very vividly
19:16 autrijus ! is means it's strict.
19:16 autrijus right.
19:17 nothingmuch okay
19:17 nothingmuch what do some typical implementations of Prims look like?
19:17 nothingmuch (please discuss casting to haskell types, implementations of IO prims, etc)
19:17 nothingmuch (more complicated primititives)
19:18 autrijus ok. casting to haskell types is trivial
19:18 autrijus it's fromVal
19:18 autrijus that's all :)
19:18 autrijus whatever type you want to get, just call fromVal.
19:18 nothingmuch and casting back to perl?
19:18 autrijus it's vCast.
19:18 autrijus vCast turns any haskell Value into a perl Val.
19:18 autrijus iblech: also, [,] is now parsed -- you can implement it too :)
19:18 autrijus (it calls &prefix:[,] as you'd expect)
19:18 nothingmuch these are polymorphic for both the context and the param, right?
19:19 autrijus yes.
19:19 autrijus the polymorphism is encapsuated in the type class Value.
19:19 Corion has joined #perl6
19:19 nothingmuch ok, what next?
19:20 misc has joined #perl6
19:20 Corion nothingmuch: If you see this, can you look at http://datenzoo.de/pugs/win2k.html and tell me what I'm doing wrong? The CSS looks all weird (in FireFox), but your page looks good...
19:20 svnbot6 r3529, autrijus++ | * parse for [,] -- not evaluated yet
19:20 nothingmuch OO? Cont's? multiplicity? (async, coros)?
19:20 svnbot6 r3530, autrijus++ | * move comment to where they belong
19:20 Corion Oh - you're here.
19:20 autrijus nothingmuch: well, I can talk a bit about subCont :)
19:20 nothingmuch Corion: update Test::TAP::HTMLMatrix perhaps
19:20 nothingmuch we have proper inline css
19:20 iblech autrijus: Ok :)
19:20 Corion nothingmuch: I did so, and the CSS is inline. I think.
19:20 theorbtwo First, how do you die from a prim.
19:20 autrijus theorbtwo: oh. that.
19:20 Corion theorbtwo: raiseErr
19:21 autrijus fail "foo"
19:21 nothingmuch hmm, it looks good to me, that's odd
19:21 autrijus that's the canonical way now
19:21 Corion Ooops. Listen to autrijus :)
19:21 * theorbtwo knew that, wanted it in the interview.
19:21 autrijus it used to be retError
19:21 autrijus that takes a string and a exp
19:21 autrijus and throw that exp away
19:21 autrijus which makes no sense
19:21 autrijus so it's fail"" now.
19:21 nothingmuch autrijus: whichever you prefer
19:21 * theorbtwo changes an error to a fail in Pugs::Internals::openFile.
19:22 nothingmuch Corion: what exactly doesn't look right?
19:22 autrijus nothingmuch: I think I'd like to look at your draft and fill in the holes
19:22 autrijus meanwhile I need to 1)at least attempt a bit journaling and 2)sleep
19:22 nothingmuch autrijus: i have no draft, it's all on paper
19:22 nothingmuch but i'll start tonight
19:22 nothingmuch however, we have some big things left undiscussed
19:22 autrijus nothingmuch++
19:22 Corion nothingmuch: The borders are left-aligned, and the bars are not aligned anymore
19:22 autrijus right, so just mark them with questions
19:22 autrijus I can answer them in batch
19:22 nothingmuch oi
19:23 nothingmuch autrijus: ok, i'll try
19:23 nothingmuch but there'll be lots where i'll need to ask before I can organize the questions
19:23 Corion Ah - the "test file" column maybe became too small (FireFox 1.04) - but your page looks good ... Weird - maybe I should update T:T:HMx again ...
19:23 autrijus nothingmuch: sure, either mail to p6c or commit somewhere
19:23 nothingmuch okay
19:23 Corion Hmmm. No, is up to date.
19:24 Corion nothingmuch: The file looks OK for you?
19:24 autrijus nothingmuch: eg. docs/02Design.pod
19:24 autrijus or .kwid or .html or .doc
19:24 autrijus whichever you prefer
19:24 nothingmuch autrijus: yeppers
19:24 nothingmuch i'll start with pod, since everyone can view that more easily than kwid
19:24 autrijus oh?
19:24 nothingmuch then i think we'll move to something more capable
19:24 autrijus <- uses Spork to view kwid
19:25 nothingmuch lol
19:25 autrijus but sure
19:25 autrijus either way is fine
19:25 nothingmuch i wish CamelBones' Shux would work
19:25 svnbot6 r3531, iblech++ | [$@%&]::(...) works :)
19:25 nothingmuch or that PerlDoc.app would be a bit more flexible
19:25 autrijus iblech++
19:25 autrijus iblech++
19:25 autrijus iblech++
19:25 autrijus that was quick.
19:25 nothingmuch maybe I should just write my own, with webkit view and a wrapper for Pod::Simple::HTML
19:26 iblech I'm sure you'd have done it faster :)
19:26 autrijus I'm less sure, but you can maintain that useful illusion :)
19:26 nothingmuch perlbot higest karma; # autrijus or iblech? dum dum dum!
19:26 nothingmuch perlbot highest karma
19:26 perlbot The top 5 karma entries: C: 327, autrijus: 304, iblech: 182, stevan: 111, nothingmuch: 68
19:26 nothingmuch holy crap, i'm still up there
19:26 nothingmuch wow
19:27 autrijus but we all know that C is the best.
19:27 nothingmuch =)
19:27 autrijus we need to compile to C-- real soon
19:27 autrijus because C-- is more compact than LLVM
19:27 autrijus and C-- is easier to target anyway
19:27 nothingmuch does C-- compile down to C?
19:27 autrijus yes, sure, C-- is designed to easily transform to C
19:28 autrijus perlbot: karma C
19:28 perlbot Karma for C: 322
19:28 nothingmuch what advantages does C-- give over, say, VMs like Parrot?
19:28 nothingmuch is C-- fast?
19:28 autrijus well, it doesn't require a VM, so it's likely to be faster
19:28 nothingmuch or is C-- just very easy to generate?
19:28 Corion nothingmuch: The CSS link is wrong and broken. Once I fix it, it all Just Works again. You are using a local link via File::URI, which does not work on the remote machine.
19:28 nothingmuch autrijus: s/it/C--/;
19:28 autrijus right
19:28 integral PIR surely doesn't require a VM either?
19:28 nothingmuch Corion: there should be no CSS file
19:29 autrijus integral: PIR assumes much more about its RTS
19:29 Corion nothingmuch: Hmmm...
19:29 autrijus so it's hard to imagine it without a VM
19:29 elmex__ has quit IRC (Read error: 113 (No route to host))
19:29 nothingmuch i wonder what triggerred that
19:29 autrijus unlike C-- which all the maintainence code can be inline
19:29 integral hmm!
19:29 nothingmuch there's a petal cond in there
19:29 Corion nothingmuch: Aaaah - I think what I stupidly did - I'm not using the main smokepugs.pl script ! Sorry !
19:29 Corion (or at least I think I do)
19:29 nothingmuch can i see what you are using?
19:29 nothingmuch it doesn't make sense to emit both a link and a <style>
19:30 nothingmuch i'd like to debug it
19:30 nothingmuch i think we should start a C-- channel
19:30 nothingmuch and invite perlbot into there
19:30 nothingmuch and another bot will monitor karma C
19:30 ingy karma ingy
19:30 nothingmuch and C-- whenever it's out of balance
19:30 autrijus perlbot: karma ingy
19:30 perlbot Karma for ingy: 45
19:31 PerlJam or why not just make perlbot not ever increment the karma of C?  (i.e. C++ will have no effect)
19:32 nothingmuch btw, with &infix:<> and all, is perl6 technically a meta language?
19:32 autrijus PerlJam: that would be too correct.
19:32 nothingmuch PerlJam: I just wanted to say C-- a couple of times
19:32 autrijus nothingmuch: metalanguage?
19:32 PerlJam nothingmuch: Well, what is C--?
19:33 autrijus it's turing-complete, if that's what you mean
19:33 PerlJam nothingmuch: And how can C-- improve my life?
19:33 nothingmuch you can read all about C-- by typing 'C--' in a google search box
19:33 PerlJam nothingmuch: How many more times do you think we should say C-- ?
19:33 nothingmuch or you can go to the C--
19:33 nothingmuch perlbot: karma C
19:33 perlbot Karma for C: 311
19:33 nothingmuch we need to say C-- 310 more times
19:34 nothingmuch http://c2.com/cgi/wiki?MetaLanguage
19:34 nothingmuch afaik a "meta language" is a language usable for creating a new language within itself
19:34 theorbtwo nothingmuch, searching for C-- won't be of much help, since google considers that as /c[^\w]{2}/i
19:34 Corion nothingmuch: No, I'm using the normal smoker script... Weird ...
19:34 nothingmuch http://www.cminusminus.org/
19:35 autrijus nothingmuch: oh, you mean it in an "easily definable DSL" way.
19:35 svnbot6 r3532, iblech++ | Add [,] (only *two lines* of code!).
19:35 autrijus in that sense, sure, you can even say perl6 is optimised to that.
19:35 nothingmuch Corion: hmmm... can you do a Data::Dumper of the visualizer with MaxDepth set to 1 or 2 (depending on how you call it) so that it's attributes are listed?
19:35 autrijus only they call it "adaptability" and "evolvability"
19:36 autrijus op1 "prefix:[,]" = return
19:36 meppl has joined #perl6
19:36 autrijus iblech++ # cute
19:36 iblech :)
19:36 Corion nothingmuch: Where should I put that print Dumper()? In Testgraph.pl, after it loads the yaml ?
19:36 nothingmuch just before it's stringified
19:36 nothingmuch brb, tea
19:37 Limbic_Region revision 3495 - iblech ( Implemented min() and max() ) - where are these defined/spec'd?
19:37 Limbic_Region oh wait
19:37 Limbic_Region there was a reference in the test
19:37 Limbic_Region http://groups.google.com/groups?selm=420DB295.3000902%40conway.org
19:37 iblech Yep, Damian stated they were in
19:38 Limbic_Region it just doesn't go to anything?
19:38 autrijus ajs_: S29 it?
19:38 * autrijus praises the amazing technology that is URL
19:38 Limbic_Region I am more interested in userdefined part since I assume by default it only works in numerical context?
19:38 autrijus or really, anyone can commit to S29draft -- I'm sure ajs_ won't mind :)
19:38 * Limbic_Region assumed that they wouldn't have been added if they weren't "in"
19:40 iblech Limbic_Region: The userdefined sub is the same as with sort(), i.e. returning one of -1,0,1 (I think)
19:40 Limbic_Region ok - so it could be $^a cmp $^b for instance
19:41 iblech Yep -- resulting in the (according to the Unicode codepoint order) lowest or highest string
19:41 Limbic_Region or even %month{ $^a } <=> %month{ $^b }
19:41 iblech Of course :)
19:41 autrijus $^fst $^snd   # works too
19:41 Limbic_Region right
19:42 Limbic_Region I am just questioning why have a max() min() at all then
19:42 pasteling "Corion" at 84.176.40.198 pasted "My Test::TAP::HTMLMatrix dump" (96 lines, 2.8K) at http://sial.org/pbot/10285
19:42 Limbic_Region and not just call it reduce
19:42 * nothingmuch once again advocates $^former and $^latter due to their lexical order
19:42 Limbic_Region since that is what it is really doing
19:42 theorbtwo Using things longer then $^a and $^b really ruins the point, which is that they're short.
19:43 autrijus nothingmuch: $^arthur and $^zaphod
19:43 Limbic_Region $^a.chars <=> $^b.chars
19:43 Corion $^alpha and $^omega !
19:43 * Limbic_Region can't believe no one has suggested $^foo and $^bar
19:44 autrijus because they sort wrong.
19:44 theorbtwo $^qux, $^quux, $^quuux, etc, sort correctly.
19:44 revdiablo $^bar would be the first arg, and $^foo the second, right?
19:44 autrijus $^A and $^𪘀
19:44 nothingmuch revdiablo: yep
19:44 autrijus (first and last unicode isLetter)
19:44 Limbic_Region autrijus - depends on your definition of wrong
19:45 Corion Or maybe $^ά $^ω :-)
19:45 Limbic_Region . o O ( ascending vs descending )
19:45 Khisanth Limbic_Region: wouldn't it have to be $^bar and $^foo?
19:45 autrijus $^begin $^end
19:46 autrijus $^head $^tail
19:46 autrijus $^init $^last
19:46 Corion $^birth $^death
19:47 Limbic_Region $^elvis $^lives
19:47 _metaperl are those auto-vivified scalars?
19:47 autrijus _metaperl: those are implicitly extracted to become the parameters
19:47 revdiablo (implicit parameters)++
19:47 autrijus for the enclosing block which must have no formal parameters
19:47 jhorwitz has quit IRC ("Chatzilla 0.9.67 [Firefox 1.0.4/20050511]")
19:48 _metaperl -> $a, $b { BLOCK }
19:48 autrijus it's a neat linguistics hack.
19:48 _metaperl is not what you mean
19:48 _metaperl that's something else I take it
19:48 autrijus { $^a <=> $^b }
19:48 autrijus -> $a, $b { $a <=> $b }
19:48 autrijus are the same.
19:48 _metaperl oh I see
19:49 nothingmuch does { $^a; for (@list){ warn if
19:49 PerlJam (implicit parameters)++
19:49 nothingmuch $^b ~~ $^a } }; # dwim?
19:49 xinming has joined #perl6
19:49 nothingmuch well, actually i don't know what I mean
19:50 nothingmuch does the outer $^a make it look like for iterates $^b? or does for iterate $^a, $^b?
19:50 PerlJam nothingmuch: Then I'm sure that perl won't either and will tell you so . :)
19:50 autrijus nothingmuch: it iterates all implicit things.
19:50 autrijus nothingmuch: so the inner $^a masks the outer $^a
19:50 autrijus and that needs to be like that
19:50 autrijus otherwise all function calls are broken
19:52 theorbtwo $^foo always applies to the innermost possible set of curlies.
19:52 theorbtwo If you want anything more complicated, just do it explicitly.
19:53 autrijus right. it's intended to replaced the horrible atrocious kluge that is $a and $b
19:53 autrijus and not much more
19:53 autrijus although I suspect if there's no pointy form, people will abuse them.
19:54 autrijus @Larry++ # got this right
19:54 theorbtwo Well, not just the sort block, but any little block that should take params.
19:54 autrijus sure.
19:55 theorbtwo ...though I'm at the moment somewhat hard-pressed to...
19:56 theorbtwo Oh, for %hash.kv -> { say "$^k => $^v\n" }
19:56 theorbtwo ...come up with another example. ;)
19:56 autrijus well, if I'm golfing
19:56 autrijus my @generators = map { $^N; coro { yield $_ for 0..$N } } 0..9;
19:57 autrijus is one char shorter than
19:57 autrijus my @generators = map -> $N { coro { yield $_ for 0..$N } } 0..9;
19:57 g1powermac_AFK is now known as g1powermac
19:57 autrijus ...but only if I can type ^N the perl5 way.
19:57 autrijus (probably not ;))
19:57 autrijus <- taken by the golf reflex
19:58 autrijus (fwiw, the "perl 5 way" means a single Ctrl-N)
19:58 Limbic_Region has quit IRC ("tiuq\")
19:59 nothingmuch wait, that works?
19:59 nothingmuch $^N causes an $N to be made?
20:01 autrijus nothingmuch: sure
20:01 autrijus what else would you expect?
20:01 nothingmuch i thought $^ was a magical sigil
20:01 nothingmuch that creates a var in $^ space
20:01 autrijus no
20:01 autrijus it never do such a thing
20:01 nothingmuch okay, so my example would work
20:02 nothingmuch except that it's just spelt differently:
20:02 autrijus yeah, if you drop the second ^
20:02 nothingmuch yep
20:03 Corion has quit IRC (Read error: 131 (Connection reset by peer))
20:04 PerlJam er ... what is the first mention of $^N supposed to do?
20:04 PerlJam < autrijus> my @generators = map { $^N; coro { yield $_ for 0..$N } } 0..9;
20:04 integral "declare it" as belonging to that block...
20:04 PerlJam oh,  never mind
20:04 PerlJam yeah, I wasn't thinking.
20:05 autrijus it's nicer than the p5 idiom of
20:05 autrijus my $n = $_; ...
20:05 autrijus imho.
20:07 rafl has joined #perl6
20:07 * nothingmuch wonders how the fuck 4 got into has_inline_css
20:08 nothingmuch and why petal isn't an object
20:08 nothingmuch oh, crap
20:08 nothingmuch that's a phash
20:08 * nothingmuch is used to working with blead perl, where that
20:08 nothingmuch '
20:08 nothingmuch s just a restricted hash
20:09 * nothingmuch waits for Corion to return
20:12 ninereasons I remembered reading not long ago that pdcawley's dream app is a Perl 6 version of a method creator similar to Small Talk's "Refactoring Browser"
20:12 ninereasons here's where he talks about that: http://xrl.us/f6jx
20:13 svnbot6 r3533, cognominal++ |  r36@stefp:  stef | 2005-05-20 22:07:16 +0200
20:13 svnbot6 r3533, cognominal++ |  added tests four OUTER. one fails
20:13 ninereasons It seems to me that we're not far at all from being able to do that, in pugs, aren't we?
20:14 autrijus we are very close
20:14 autrijus I looked at HaRe
20:14 autrijus with its native vim support
20:14 autrijus I think we can steal them.
20:14 ninereasons exciting times.  really.
20:14 autrijus =)
20:18 cognominal how come that my patches always come in two lines with svnbot6?
20:18 nothingmuch cognominal: because you need more karma
20:18 clkao because you use svk push
20:19 clkao which means you deserve more karma
20:19 sbkhh has joined #perl6
20:19 Odin- has quit IRC (Read error: 104 (Connection reset by peer))
20:19 nothingmuch clkao++
20:19 cognominal clkao: is there any other way? I am clueless
20:19 sbkhh is now known as Odin-
20:20 clkao cognominal: if you don't like that line, you can use svk sm --verbatim -f .
20:20 nothingmuch darcs ;-)
20:20 clkao why type more and lose karma :p
20:20 cognominal :)
20:20 clkao sm --verbatin -f . -I actually
20:20 cognominal it is not a question of karma but of needless noise
20:20 simcop2387 has joined #perl6
20:21 iblech autrijus: $::(...)::(...) didn't work -- fixed and will add a test in a minute
20:21 clkao i know, we will have customisable per-command hook to adjust all this soon
20:21 autrijus --verbatim actually
20:25 ninereasons purl is really quite brilliant.  I hadn't seen her before, until I joined #parrot
20:25 autrijus journal up. g'nite :)
20:25 ninereasons nite
20:25 nothingmuch ciao
20:25 cognominal purl, be rgs
20:26 cognominal ho, he is not on #perl6...
20:26 iblech nite
20:26 ninereasons no, not here, cognominal
20:27 ninereasons efnet and irc.perl.net, I've heard
20:27 cognominal I always forget we are nor in irc.perl.net...
20:27 cognominal s/nor/not
20:32 svnbot6 r3534, iblech++ | * Fixed $::(...) so it understands $::some::("var")::($bar), too.
20:32 svnbot6 r3534, iblech++ | * Added tests for this (t/var/symbolic_deref.t).
20:32 svnbot6 r3535, ingy++ | pugs.pm 0.02
20:32 svnbot6 r3536, iblech++ | EOL at EOF and the usual svn properties added to
20:32 svnbot6 r3536, iblech++ | t/subroutines/splatty_in_caller_position.t.
20:35 * theorbtwo wonders...
20:35 lumi_ has quit IRC (Read error: 104 (Connection reset by peer))
20:35 theorbtwo It'd be easy to hack some haskell to get pugs to tell me what sort of thing each character position is, and what matching characters are supposed to match where, and munge that, and the original file, back into colored HTML or whatever.
20:37 iblech Yeah! So userdefined ops etc. would be colored correctly! :)
20:37 iblech Or things like use some_weird_grammar
20:37 theorbtwo I'd like to do that without hacking haskell -- be able to fully access the representation from within perl.
20:39 iblech The problem is though (but I'm partly guessing here), that Parsec, our parsing library, doesn't maintain such a representation -- look at the very first function definition of Parser.hs:
20:39 iblech ruleProgram :: RuleParser Env
20:40 iblech So the result is a Env, not some Position => Type hash
20:40 lumi has joined #perl6
20:41 Odin-LAP has joined #perl6
20:43 theorbtwo Hm, but I know we have the locations for error messages.
20:45 iblech Yeah, but as soon as a thing is sucessfully parsed, Parsec forgets about the things it's made up of
20:45 g1powermac nothingmuch: you around? There's been another battery recall for powerbooks: http://apple.slashdot.org/apple/05/05/20/1648233.shtml?tid=180&amp;tid=232&amp;tid=3
20:45 iblech But maybe I'm wrong and there's a simple get_all_chars_and_their_types function :)
20:45 g1powermac nothingmuch: if ya could join #clusterix, that'd be great :_0
20:46 nothingmuch ours are all before that
20:46 nnunley has joined #perl6
20:47 cognominal theorbtwo, iblech, if you are interested, I have the mechanics to do dynamic higligthing
20:47 cognominal http://stefp.dyndns.org/add.html  # click on the +, the *, or any of the operands
20:48 cognominal I am working to be able to edit with mozile too
20:48 theorbtwo Do you parse yourself, or get pugs to do it?
20:49 cognominal this was hand generated
20:49 cognominal just to proof the idea
20:49 lumi has quit IRC (Read error: 104 (Connection reset by peer))
20:50 cognominal but the idea is too generate with some parser
20:50 cognominal s/too/to/
20:51 cognominal http://mozile.mozdev.org/index.html
20:52 cognominal with mozille I could edit, with xmlhttprequest feed it to a parser, and get back the parsed html
20:52 cognominal so far I am stuck with mozile
20:53 cognominal but the author seems willing to help
20:55 cognominal with such dynamic highlighting, deep question about precedence will be a thing of the past
20:55 cognominal you click and you see
20:55 lumi has joined #perl6
20:56 cognominal also getting all our code so highlight with link to the doc would be a great way to promote perl6
20:57 theorbtwo Aye.
20:57 theorbtwo We'd need better docs.
20:57 theorbtwo We need better docs anyway, though.
20:57 cognominal I will keep you posted about the progress on the mozile side
20:58 cognominal ho, I see on my apache logs, that many of you are mac jockeys...
20:58 knewt_ has joined #perl6
21:01 knewt has quit IRC (Read error: 101 (Network is unreachable))
21:07 nothingmuch what's the one day compilers link?
21:10 putter has joined #perl6
21:12 putter eeep!  latenight irc draft lands in quickref/namespace.  somewhat less buggy version uploading...
21:17 g1powermac is now known as g1powermac_AFK
21:17 svnbot6 r3537, putter++ | Edited quickref/namespace.
21:20 putter iblech: if/when you find bugs in it this evening i'd appreciate a ping... ;)  tnx
21:20 iblech ok :)
21:22 putter thanks.
21:22 * putter enjoys today's irc log...
21:24 putter iblech: what are "the usual svn properties"?
21:24 iblech putter:
21:24 iblech svn propset svn:eol-style "native" foo # and
21:24 iblech svn propset svn:mime-type "text/plain; charset=UTF-8" foo
21:25 putter ahh.  is that doced in the source tree somewhere?
21:26 iblech I think not, but you're right, it should be
21:26 iblech t/README maybe?
21:26 putter hmm.  we don't really have a file for developers-but-not-users do we...?
21:27 iblech Not that I know
21:28 revdiablo isn't that usually called HACKING, or some such?
21:31 putter sounds plausible.  "it should be in tree"+"it shouldnt be in README"+"there doesnt seem to be anywere else"./
21:32 putter revdiablo++,  iblech you or me?
21:32 * putter putter says while still catching up on the log... ;)
21:33 iblech you -- I'm working on a hacky example of randomly overloading some operators *evilgrin*
21:33 stevan iblech++ # he's unstoppable :P
21:34 iblech :)
21:34 stevan iblech: I hope you classes are not suffering as bad as my $work :)
21:34 iblech :) Here are holidays currently :)
21:34 stevan ah
21:34 stevan that is good
21:35 stevan iblech: are going to the europe hackathon?
21:36 iblech Unfortunately not, misc reasons
21:36 stevan maybe you can make the Toronto one :)
21:36 putter ok
21:37 larsen has joined #perl6
21:37 putter general reminder (re people missing discussions): the channel log is http://colabti.de/irclogger/irclogger_logs/perl6
21:37 stevan hey putter
21:37 stevan I meant to read s12 more today
21:37 stevan but $work has been suffering, so i needed to do that
21:38 putter hey stevan :)
21:39 putter work, yes.  this is my weekend to get a usable resume draft written.  sigh.
21:39 iblech putter: The colors of these logs suck, you may want to download the raw contents of those logs and run ./pugs examples/irclog2html.p6 log > nice.html :)
21:39 vcv has joined #perl6
21:40 iblech (With nice (dynamic) colors, proper alignment, etc.)
21:40 putter iblech: ooo, nifty.  will try...
21:41 putter stevan: I was thinking I had started to get a handle on types... then I read in todays log that we have type variables (good) which I saw no sign of (oops).  Back to the "library".
21:42 stevan putter: yes, thinks are quite in flux right now
21:42 stevan putter: I am starting to worry that all this "type" business may make MMD difficult
21:46 putter iblech: irclog2html not working for me yet... but I'm still using an ancient (yesterday:) build.  will up and retry.
21:46 putter re Colorizing p6... if only rules and parsetree was working...
21:47 iblech putter: Hm... It did work some days ago, but yes, currently it dies at runtime here, too
21:48 putter stevan: there is some nice theory for precomputing mmd, so hopefully it will just require a bit of work.
21:48 stevan hopefully
21:49 stevan I like typing and I like MMD
21:49 stevan I would not want to give up either :)
21:49 putter mmm, runtime changes to types...  (though traits could require some tweaking to run at runtime...)
21:49 putter agreed.
21:50 theorbtwo We need dynamcisim to deal with "foo(Int $x where $x % 2)"
21:50 putter Is there a Prelude.p6 yet?  There are starting to be things which could just as easily be implemented in p6 as hs...
21:51 stevan putter: not that I know of
21:52 putter theorbtwo: my fuzzy recollection is subtypes are only used to disambiguate candidate multis which otherwise match...
21:52 svnbot6 r3538, theorbtwo++ | More signatures.  If I could fiture out a signature for mainCC in
21:52 svnbot6 r3538, theorbtwo++ | src/Pugs/Compile/Haskell.hs that doesn't make the compiler croak, we could
21:52 svnbot6 r3538, theorbtwo++ | turn off the option to not warn (and thus error, since we -Werror) on
21:52 svnbot6 r3538, theorbtwo++ | missing signatures.
21:52 putter s/match/tie/
21:53 theorbtwo (No, I didn't write the long description there just to karma-whore... with the emphasis on "just".)
21:53 stevan so you karma whoring was an afterthought :)
21:53 putter Ooo good sideeffect - encourages documentation. ;)
21:53 stevan or a fringe benefit :)
21:54 theorbtwo It's somewhat more likely that somebody will see the comment there and figure it out then if I just say it in here.
21:54 stevan more detailed SVN commits only make my ChangeLog job easier
21:55 stevan so i am all for it
21:55 stevan theorbtwo++
21:56 knewt_ has quit IRC ("leaving")
21:57 mrborisguy has joined #perl6
21:57 knewt has joined #perl6
21:59 ninereasons p6l is sure one hoppin' place these days.
22:00 mrborisguy lots oe people here at least
22:00 mrborisguy haven't heard much chatter
22:01 PerlJam it comes and goes
22:01 stevan it is much more active then autrijus is awake
22:01 PerlJam several of the major players are sleeping
22:01 mrborisguy haha, okay, i see
22:02 mrborisguy i just downloaded haskel and got p6 installed today... so i'm new to all of this
22:02 iblech putter: I was to ping you if I found a bug
22:02 iblech putter: so...
22:02 iblech putter: ping
22:02 iblech :)
22:02 svnbot6 r3539, duff++ | * Changed some wording and spacing of docs/quickref/rules
22:02 svnbot6 r3539, duff++ | * Added text about <?assertions> and the <-...> and <+...> forms of character class
22:02 stevan PerlJam: so what are you saying... we are all chumps :P
22:02 PerlJam stevan: no, just you ;-)
22:03 stevan :P
22:03 putter iblech: good!  what is?
22:03 PerlJam mrborisguy: several of the major players *Aren't* sleeping too.  See iblech and stevan.
22:03 PerlJam stevan: better?  :)
22:03 putter how about docs/dev/tips  instead of ~/HACKING?
22:04 putter docs/dev/ would be new...
22:04 stevan putter: I think that is hiding it too much
22:04 putter docs/pugs_development/ ?
22:04 stevan HACKING is good IMO
22:04 revdiablo did something change in perl6 that this shouldn't work how I expect? pugs -e 'say $_ and say $_+1 for 1 .. 5'
22:04 mrborisguy PerlJam: noted.
22:04 iblech putter: Several -- BEGIN { exit } doesn't work, say "abc{ BEGIN { 3 } }def" doesn't either, my &infix:<z> = {...} doesn't. That was it, I think (committing tests for all of those in a minute)
22:04 * PerlJam agrees with stevan FWIW
22:04 * iblech agrees, too
22:05 revdiablo is the precedence of 'and' screwey?
22:05 putter oooh.  bugs in implementation, rather than quickref/namespace still being... spacey.
22:05 stevan putter: was there a reason why HACKING was not okay?
22:05 iblech revdiablo: Seems to. Add parens around the first say $_ and it works...
22:06 iblech revdiablo: Dunny why though
22:06 Shillo has joined #perl6
22:06 putter stevan: it just occured to me that there is nothing in docs/ which is pugs specific, and there might be more stuff (pretty pictures, etc).
22:06 Shillo Hullo, all!
22:07 stevan putter: I think nothingmuch will be putting the Achrophonisnansndhs 02 in there
22:07 stevan hey Shillo
22:07 revdiablo iblech: maybe I should add a pugsbugs/ test?
22:07 revdiablo iblech: or somewhere else better to put it?
22:07 knewt has quit IRC ("Reconnecting")
22:07 iblech revdiablo: pugsbugs is the right location, I think
22:07 putter iblech: oh, but your bug list does invite attention... ;)
22:07 mrborisguy i've tried reading through some of the synopsises, exegesises, etc.  is there a place where i should start to get some of the syntax down?
22:07 iblech ;)
22:07 Shillo Somebody mentioned on the list that he worked on control blocks (FIRST, NEXT, &co). I just made them parse (although I'm not sure what's the rigth thing to return from a stub).
22:08 stevan mrborisguy: there is a quickref somewhere
22:08 knewt has joined #perl6
22:08 revdiablo iblech: ok, writing...
22:08 stevan and tests are also a good place ot start
22:08 stevan mrborisguy: and there are several modules in ext/
22:08 Shillo Wonder who that was, so we coordinate.
22:08 mrborisguy reading through the tests you mean?
22:08 stevan mrborisguy: examples/ is also an excellent place
22:08 mrborisguy i'll try that
22:08 stevan mrborisguy: yes, although reading tests is not that exciting :)
22:08 mrborisguy i looked few a few of the examples, i'll keep mulling around in there then
22:09 stevan but they can be a good reference
22:09 * stevan uses the tests for syntax reference all the time :)
22:09 mrborisguy but the quickref is in the p6 distrobution somewhere?  i'll find it then
22:09 stevan docs/quickref maybe, I am not sure,..
22:09 stevan there is also a perl6 cookbook in there too
22:09 stevan one second lemme open the pugs project :)
22:09 stevan so i can stop guessing :
22:10 mrborisguy haha, don't worry about it
22:10 mrborisguy i'll find them
22:10 putter stevan: re HACKING... README is (from irc) already not being read, and more top level clutter isnt going to help...:(
22:10 stevan mrborisguy: docs/quickref
22:10 putter s/not being/sometimes not being/
22:11 stevan putter: README is boring,.. HACKING is exciting :)
22:11 stevan HACKME
22:11 putter :)
22:11 ninereasons I think that the tests are very educational.
22:11 stevan where is the perl6 cookbook? I cannot seem to find it
22:12 ninereasons examples
22:12 stevan :)
22:12 stevan mrborisguy: examples/cookbook is a first draft of the perl6 cookbook
22:13 mrborisguy thanks!
22:13 ninereasons lots of cookbook work to do, still, mrborisguy
22:13 ninereasons if you get the bug, you can help
22:13 stevan yes that is true ninereasons
22:13 mrborisguy i'll do my best!
22:13 mrborisguy i've still gotta get p6 on my main windows machine though
22:13 mrborisguy i was just playing around, and got it on my debian machine
22:13 knewt_ has joined #perl6
22:15 putter stevan: I went with docs/development/ tips.   i have a thing about top-level namespace clutter...;)
22:15 knewt_ has quit IRC (Client Quit)
22:15 knewt_ has joined #perl6
22:15 knewt has quit IRC (Nick collision from services.)
22:15 knewt_ is now known as knewt
22:15 stevan putter: I can respect that. I am a namespace nazi myself :)
22:15 putter :)
22:16 stevan I am actually thinking that Pugs is in need of some spring cleaning
22:17 theorbtwo So am I, stevan.
22:17 ninereasons fp.pm gets more cool by degrees each day
22:17 svnbot6 r3540, putter++ | Added docs/development/ and docs/development/tips.
22:17 stevan ninereasons: yes it does :)
22:18 stevan I also think it might be time to start moving some ext/ modules to CPAN or something
22:19 * theorbtwo wonders if he wants to hack the haskell to output some sort of description with Poses, or if he wants to hack the reflection to be able to do it from within perl code.
22:20 iblech Agreed, but there're two problems: 1. some examples/ may stop working out of the box (as $user hasn't some module installed) and 2. here and the Pugs svn repo there're much more people than on CPAN/FreePAN
22:21 iblech putter: FYI, tests checked in
22:21 stevan iblech: good points
22:23 revdiablo now I wonder whether it really is and precedence, or something else. but I called the test 'and_precedence.t' ... I guess someone can rename it if they figure out what's really causing it
22:23 svnbot6 r3541, iblech++ | * Added &:: test (symbolic_deref.t) and my &infix:<...> test (operator_overloading.t).
22:23 svnbot6 r3541, iblech++ | * Added example for random operator overloading
22:23 svnbot6 r3541, iblech++ |   (examples/obfu/random_operator_overloading.p6). While doing that, I noticed
22:23 svnbot6 r3541, iblech++ |   several bugs:
22:23 svnbot6 r3541, iblech++ | * BEGIN { exit } doesn't work (tested now in t/pugsbugs/exit_in_begin.t).
22:23 svnbot6 r3541, iblech++ | * say "abc{ BEGIN {...} }def" doesn't work (tested now in
22:23 svnbot6 r3541, iblech++ |   t/pugsbugs/begin_in_strings.t).
22:23 svnbot6 r3541, iblech++ | * my &::("infix:<baz>") doesn't work (added test to operator_overloading.t).
22:23 svnbot6 r3542, iblech++ | Moved operator_overloading.t to t/operators/.
22:23 svnbot6 r3543, revdiablo++ | bug with precedence of and, perhaps?
22:24 stevan now THATS karma whoring :P
22:24 iblech :D
22:25 ninereasons not that it matters, but maybe if the revision number has been seen, the incrementor could be skipped
22:26 stevan ninereasons: nah,... it's karma for writing long descriptions, which help me with my changelog
22:26 ninereasons it's all good then, :-)
22:26 stevan I  *want* to encourage the behavior :)
22:26 iblech Thought that too, and it would be trivial to implement that, *but*: This'd destroy the vertical alignment
22:27 mrborisguy haha
22:27 stevan iblech++ # thinking about the aesthetic impact :)
22:27 theorbtwo iblech: you could put in __ instead of ++.  They probably have the same visual width.
22:27 iblech And even if we s/++/  /, then the alignment is still b0rked on non-fixed fonts (and the webinterface of iblechbot uses proportional fonts, so...)
22:28 ninereasons maybe you could concatenate an incrementor per length($desc)
22:28 stevan ok, time for food,... later all &
22:28 svnbot6 r3544, putter++ | trivial tweak of quickref/rules.
22:28 ninereasons bon apetit
22:28 putter iblech: tnx
22:30 * putter waves to stevan
22:32 iblech gonna sleep, cu :)
22:32 Shachaf has quit IRC ("So long, and thanks for all the fish!")
22:33 iblech has quit IRC ("sleep &")
22:36 putter bye iblech
22:42 putter its time to pause when you typo "typo" "topo".
22:42 svnbot6 r3545, putter++ | comments on quickref/rules.
22:42 svnbot6 r3546, putter++ | topo
22:42 svnbot6 r3547, putter++ | more quickref/rules fiddling
22:42 svnbot6 r3548, iblech++ | Added the type signature theorbtwo++ wanted, I think.
22:50 elmex has quit IRC ("leaving")
22:51 jabbot has joined #perl6
22:52 jabbot has quit IRC (Remote closed the connection)
22:52 jabbot has joined #perl6
22:53 mrborisguy reading through the cookbook, nearly right away the syntax my ( $var1,$var2 ) = <fox dog>; is used right away
22:53 mrborisguy is it just assumed that reader should know the <..> syntax?
22:55 revdiablo is the cookbook supposed to be for beginners?
22:55 mrborisguy (in 01-00introduction.p6)
22:56 revdiablo I always thought it was supposed to be good practices, whether they're friendly to beginners or not.
22:56 mrborisguy yeah, i'm not sure, that's why i'm asking
22:56 mrborisguy what assumptions are made about cookbook readers
22:57 revdiablo well, I could be wrong too. it's just what I thought...
22:58 Odin-LAP Well, what sort of assumptions does the P5 version make?
22:59 mrborisguy well i certainly have no clout around here... just thought i'd throw that out there from the beginner's point of view
23:02 mrborisguy i guess reading through more of it: from the point of view of new to perl in general, alot of this stuff would be awfully hard to understand for a beginner.  coming from perl5, not bad though.  so maybe the assumption is a little bit more than 'reader knows next to nothing'
23:02 svnbot6 r3549, putter++ | a last trivial tweak of quickref/rules
23:03 putter it's not karma whoring, just flakiness.
23:05 putter mrborisguy: fresh eyeballs are a useful resource.  if you write down the parts you found puzzling, we could start a "hints for smoothly getting started" doc.  even better, you could right now put it up on the wiki http://pugs.kwiki.org/
23:05 putter oh, no you cant.  the wiki is down.  rsn though.
23:06 mrborisguy alright, i'll see what i can do
23:10 knewt has quit IRC (Success)
23:11 mrborisguy i'll probably just wait till the wiki is back up, and after i've read through a bunch more
23:20 theorbtwo G'night, all.
23:20 mrborisguy has quit IRC ()
23:21 knewt has joined #perl6
23:24 Shillo G'night, folks.
23:25 Shillo has quit IRC ("Leaving")
23:29 Juerd putter++ autrijus++ iblech++ aankhen++ duff++ kolibrie++  # quickref
23:31 iblechbot has quit IRC (Read error: 110 (Connection timed out))
23:31 eric256 has joined #perl6
23:33 Odin- has quit IRC (Read error: 104 (Connection reset by peer))
23:36 Khisanth revdiablo: cookbook sounds like it should be more for at least moderately experienced people
23:36 revdiablo Khisanth: I agree
23:37 revdiablo I think watering it down would detract from its usefulness
23:39 Odin-LAP has quit IRC (Read error: 104 (Connection reset by peer))
23:39 Odin-LAP has joined #perl6
23:39 Odin- has joined #perl6
23:42 eric256 ++ from me to on that.. .my dumbed down stuff is just examples ;)  cookbook should be working solutions to common problems
23:44 eric256 i thought gather was suppose to be lazy....how can you see that in action?
23:48 revdiablo eric256: it's not lazy yet, afaik, they still want to hash out the semantics on p6l
23:48 putter as of 17:57 it was strict
23:48 revdiablo "they" being the people who actually do stuff around here, as opposed to me. ;)
23:49 putter list is lazy though.  sub *postfix:<...>($n){list $n..3000000000000000000000000}  [3...][0..2]
23:50 * eric256 didn't even know there was a list statment
23:50 revdiablo I like nothingmuch's idea for lazy {}
23:51 Odin-LAP has quit IRC (Read error: 104 (Connection reset by peer))
23:51 Odin- has quit IRC (Read error: 104 (Connection reset by peer))
23:51 Odin- has joined #perl6
23:51 eric256 my @b = list 1...; # parses....
23:51 eric256 @b[5]; # kills interactive pugs...
23:52 putter yeah, assignment to an @array seems to be forcing it.
23:53 eric256 how can you tell it is lazy if you don't assing it to an array?
23:53 putter oh, wait.  your using an unmodified pugs.  yes, ... is busted.
23:53 eric256 you modified your pugs to work?
23:54 putter not really.  just the previous  sub *postfix:<...> kludge.  I wanted to see if something would start working if half bounded ranges did.
23:55 eric256 ohh. gotcha.
23:55 theorbtwo Back.
23:55 sbkhh has joined #perl6
23:55 Odin- has quit IRC (Read error: 104 (Connection reset by peer))
23:55 eric256 so just make sure you never accidentaly    for @inf_lazy_list    something or you will be waiting a long long time. ;)
23:56 theorbtwo Well, unless the body of the loop does something to end the loop early, which it is certianly free to do.
23:56 Odin-LAP has joined #perl6
23:57 * putter hears pugs asking, in a marvin android voice, "are you as bored with this loop as I am?"
23:59 eric256 has left
23:59 putter actually, some languages readily handle the concept of "I expect to be done by foo.  If I'm not, kick me."
23:59 scook0 has joined #perl6

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

Perl 6 | Reference Documentation | Rakudo