Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2007-04-29

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:08 zamolxes joined #perl6
00:27 drbean_ joined #perl6
01:12 gregm joined #perl6
01:37 dolmans joined #perl6
02:08 rissy joined #perl6
02:09 dolmans_ joined #perl6
03:01 elmex_ joined #perl6
03:34 deq` joined #perl6
03:36 pasteling "evalbot6_r16147" at 65.89.234.66 pasted "Pugs build failure" (330 lines, 19.9K) at http://sial.org/pbot/24586
03:39 samsm left #perl6
03:41 Aankhen`` ?eval "—"
03:41 Aankhen`` Oh, dang.
03:45 justatheory joined #perl6
04:00 SubStack joined #perl6
05:03 thestarslookdown joined #perl6
05:24 jisom joined #perl6
05:32 root joined #perl6
05:32 chunzi changed the nick to root
05:45 SubStack joined #perl6
05:54 SubStack_ joined #perl6
05:55 SubStack changed the nick to SubStack_
06:01 \amethyst joined #perl6
06:15 thestarslookdown joined #perl6
06:40 mfunebre joined #perl6
06:52 mfunebre left #perl6
06:53 rissy_ joined #perl6
06:54 rissy_ left #perl6
07:31 BooK joined #perl6
07:42 dduncan left #perl6
07:57 iblechbot joined #perl6
08:12 franck__ joined #perl6
08:36 buetow joined #perl6
09:09 pack|pizza joined #perl6
09:21 SubStack joined #perl6
09:24 elmex joined #perl6
09:28 the_dormant joined #perl6
09:31 katlyn- joined #perl6
10:03 thestarslookdown joined #perl6
10:45 kanru joined #perl6
11:06 iblechbot joined #perl6
11:31 bas joined #perl6
11:36 ludan joined #perl6
11:40 rindolf joined #perl6
12:14 marmic joined #perl6
12:50 macroron joined #perl6
12:53 gaal moose
13:00 bonesss joined #perl6
13:05 lumi Elk
13:09 moritz camel
13:09 lumi Salamander
13:28 jerrylee joined #perl6
13:31 sunnavy joined #perl6
14:09 weinig_ changed the nick to weinig
14:16 weinig changed the nick to weinig_
14:17 jisom joined #perl6
14:42 jerrylee_ joined #perl6
14:43 jerrylee_ joined #perl6
14:46 chylli joined #perl6
14:50 kanru joined #perl6
14:57 weinig|away changed the nick to weinig
15:02 chylli left #perl6
15:15 offby1 paramecium
15:23 RHainsworth joined #perl6
15:23 RHainsworth left #perl6
15:28 DarkWolf84 joined #perl6
15:35 pack|pizza joined #perl6
16:04 weinig changed the nick to weinig|away
16:38 crashmatrix joined #perl6
16:48 cmarcelo joined #perl6
16:54 cmarcelo TimToady: ping?
16:54 cmarcelo ?seen TimToady
16:54 lambdabot TimToady is in #perl6. I last heard TimToady speak 17h 7m 19s ago.
16:57 cmarcelo @tell TimToady Just read chromatic meeting minutes. And I'm stuck at understanding Haskell->P5 bridge yet. Maybe I should play directly with PCR... Makes me wonder, Pugs used PGE/PCR instead of Parsec because convenience or because Parsec limitations?
16:57 lambdabot Consider it noted.
16:59 cmarcelo @tell TimToady Also in the minutes you hint about some clear goal/objective for people impl. S05. Could you explain this better?
16:59 lambdabot Consider it noted.
16:59 gaal joined #perl6
16:59 TimToady cmarcelo: pong
16:59 lambdabot TimToady: You have 2 new messages. '/msg lambdabot @messages' to read them.
16:59 cmarcelo moose
17:00 TimToady I'm not sure why pugs doesn't have a native regex yet.  You'd have to ask audreyt.
17:01 TimToady on the goal thing src/perl6/Perl-6.0.0-STD.pm is a P6 grammar written in P6
17:01 TimToady nothing can run it yet
17:01 TimToady though pugs can parse it, if we run it through "cheat" first.
17:01 VanilleBert joined #perl6
17:02 DarkWolf84 parrot backend maybe will do the job
17:02 TimToady I just saw the various P6 parsers going off in various directions, and I wanted to put something out there closer to what we'll end up with.
17:02 cmarcelo @tell audreyt Hi! The PGE/PCR-way to do regexes in Pugs was because convenience (they were being developed already | want to test P5 bridge) or because of Parsec limitations?
17:02 lambdabot Consider it noted.
17:02 DarkWolf84 but it's broken lately
17:02 cmarcelo TimToady: Hmm.. I see..
17:03 TimToady well, all the approaches that involve delegating regex to some other engine are fragile.
17:04 TimToady fglock was just talking about an approach where we take mp6 and make it spit out P6 closures instead of P5 closures.
17:04 TimToady basically a version of PCR that pugs can run.
17:04 cmarcelo Even 'cheating' STD.pm I've got errors here when executing them in pugs..
17:05 TimToady yes, you'll get a lot of errors that way.  we're not sure why it doesn't like <?before <$stop>> yet...
17:05 turrepurre joined #perl6
17:06 TimToady but the advantage of implementing pcr in p6 is that we don't have to worry about the linkage of p6 vars with p5 vars
17:06 TimToady and pugs has continuations
17:07 TimToady so we wouldn't necessarily be limited to :ratchet
17:08 TimToady the other advantage of that approach is that we don't have to write a regex engine in Haskell.
17:08 TimToady 'course, if you want to do that, feel free.  :)
17:09 cmarcelo by implementing 'pcr in p6' you mean using mp6, or no?
17:10 * cmarcelo still fighting to understand some constructions inside Pugs hs code base.. :o)
17:10 TimToady I think fglock was talking about writing a compiler in mp6 that is good enough to parse and run a cheated STD.pm
17:11 TimToady it wouldn't be very efficient, but it's a route to bootstrapping a parser in p6
17:11 TimToady and it might be the most efficient route
17:11 TimToady in terms of programmer time
17:12 cmarcelo gaal: do you picture yourself putting more content into http://dev.pugscode.org/wiki/Overview ? ;)
17:13 TimToady I don't entirely understand the Haskell codebase either...
17:14 gaal cmarcelo: thanks for the nudge. definitely yes
17:14 cmarcelo TimToady: re: compiler in mp6, parse ok, but run means spitting (p5|p6) and run with (perl|pugs) or actually having a runtime written in mp6 too?
17:14 gaal of course, the more other people moose in, the funner it'll be
17:15 TimToady talking about spitting out pure P6 in the subset currently implemented by pugs
17:16 TimToady and with regex implemented in pugs closures rather than P5 closures
17:16 \amethyst joined #perl6
17:16 cmarcelo gaal: (yes I'm guilty too :o) ) I was filling stuff in MO comments (ok not much hehe), maybe lifting to wiki since the concepts are useful for other implementations (fglock recently hacking MOP in kp6)..
17:17 gaal cmarcelo: that's great
17:18 cmarcelo gaal: Today's Pugs is still in that stage between old AST and new AST, right?
17:19 gaal well, newVal is available, but not used everywhere in the core
17:19 gaal strings for example are newVal
17:19 gaal as for Exp, still old
17:20 TimToady is finishing that dependent on MO?
17:20 * gaal channels moosefulness in audreyt's direction
17:20 gaal MO the framework is in good shape; we have to first transition more runtime stuff to actually use it
17:20 TimToady I moose her too.
17:20 gaal for example this is in MO:
17:20 gaal ?eval vv("a moose is a great thing").reverse
17:21 TimToady I don't think evalbot is running
17:21 gaal but for example Num methods aren't in MO yet, though they can be transitioned off from Pugs.Prim.Num by anyone with haskell-fu and some tuits
17:22 gaal (to do this, see Pugs.Meta.Str)
17:22 gaal after that, the next step is to start tweaking the parser to construct newVal objects from literals
17:22 cmarcelo gaal: idea => example on how to translate stuff from oldVal to newVal.. this would be an incentive to @hs_minions to work on that..
17:23 gaal then we can release the coming version, I think -- well probably audreyt has other things to go there too
17:23 gaal after that, the parser should be modified to construct new AST not just new value types
17:23 gaal and then we will have transitioned completely.
17:24 gaal cmarcelo: okay. the focus now is on value type's classes
17:24 cmarcelo she did a "megacommit" and then reverted it with some stuff on MO integration. also in YAPC::Asia talk she hinted that 6.28 was near...
17:24 gaal so for example if we look at Pugs.Meta.Str
17:25 gaal cmarcelo: yes; I think that patch hasn't bitrotted because there've been so few .hs commits
17:25 gaal but it did cause some test breakages
17:25 gaal so it's not 100% complete evidently
17:25 rindolf joined #perl6
17:25 * gaal has the yapc::asia talk in the background, not seeing it but enjoying audreyt's voice
17:26 gaal so p.m.str again...
17:26 cmarcelo gaal: new Values != new AST, right?
17:26 gaal _StrClass = mkPureClass "Str" [a list of modules]
17:26 gaal cmarcelo: right. newVal is just a subset, for which we have a bridge
17:27 gaal newVals have magical MO glue
17:27 cmarcelo TimToady: I'll try to talk with fglock later about pcr in mp6. Thanks :)
17:27 gaal so in pugsland, any $thing_that_is_a_newVal.method is automatically dispatched via MO
17:27 TimToady you're very welcome.
17:27 gaal so e.g.: "reverse"     ... Str.reverse
17:27 Yaakov Howdy, Larry.  Hope your day is going well.
17:28 TimToady so far so good.
17:28 gaal (...) is a clever combinator that constructs a method from a name and a haskell lambda
17:28 \amethyst left #perl6
17:28 cmarcelo (nice quotation from Perl 6 Today talk: "We are pretty much anarchistic, that's to say, 'like Wikipedia' if anarchy scares people") :)
17:28 Yaakov Isn't that what the man who fell off the building said haflway down?
17:29 gaal since our implementation type for strings is just ByteStrings, "Str.reverse" (which is Data.ByteString.OurUtf8Library.reverse) is the entire method needed
17:30 TimToady I hope not to splat before the end of the day, but you never know.
17:30 gaal the (...) combinator takes care of unrapping the value polymorphically from the Val to an implementation type and back
17:30 gaal by which I mean that if you were looking at a newVal string in the AST, you'd see...
17:30 cmarcelo gaal: the MO side of things I think get (like "..." hackery). What I don't get is the bits before. How things end up using this new MO-enabled values, where is this transition happening?
17:30 TimToady bbl &
17:31 gaal Val (VV (PureStr "moose"))
17:31 gaal but obviously the Val . VV is boilerplate in both directions (input and method output)
17:32 gaal cmarcelo: the magical package is Pugs.Class
17:32 cmarcelo old value types have a leak (VV) for getting new value types inside. And PureStr is a "new value" type.. makes sense?
17:32 gaal the Boxable class
17:32 gaal indeed!
17:33 gaal (Pugs.Val is newVal)
17:33 gaal so for ages we had this huuuuuuge Pugs.Prim module
17:33 cmarcelo where's old Val?
17:33 gaal now things like P.M.Str are helping to break that down
17:34 gaal hmm look at data Val in Pugs.AST.Internals
17:34 gaal (another huuuuuge file that will get shorter...)
17:37 gaal perhaps for the coming release we will actually be able to get away with eliding oldVal completely from oldExp, and go through VV for all value nodes
17:37 gaal not crucial though
17:37 cmarcelo ok. and the old AST vs. new AST, would be in 6.28 or is something independent?
17:37 gaal although as you can see, MO isn't heavily used for ptimitives now
17:38 cmarcelo (where are they in code?)
17:38 gaal new AST will happen after the release
17:38 gaal it's a biggish change
17:38 gaal the design of the newAST is, hmm, almost a year old: Pugs.AST.CapInternals, a file that isn't compiled now
17:38 cmarcelo filling P.M.Str P.M.Num P.M.Socket and etc maybe be the way to go right now? or not?
17:39 gaal yes
17:39 gaal if only to start cutting Prim and exercising MO more
17:39 cmarcelo A Perl 6 Num type has a direct match to some Hs numeric type today?
17:40 cmarcelo s/A//
17:40 gaal the new AST is very articulated: there are IIRC four different nodes for conditionals
17:41 gaal cmarcelo: no; Pugs.Val:84
17:41 gaal it's either a hs Double or a hs Rational
17:43 cmarcelo P.M.Num would have the 'Boxable PureNum' instance then. and move Prim that deal with Num to being methods of a PureNum class..
17:44 gaal yes. see Pugs.Prim.Numeric...
17:44 gaal that could perhaps stay as a support library
17:45 gaal because we maybe want to resuse some code across (P6) Int and Num
17:45 gaal but maybe not.. not sure
17:45 gaal the Num class isn's as simple as Str
17:46 gaal but isn't like, much more complex
17:47 Patterner joined #perl6
17:48 cmarcelo you told about having oldExp (from oldAST) using VV for value nodes, where this change would happen? Today literal Strings aren't newVal PureStr, would be very hard to make them? Need to finish moving every Str func from Prim to Meta.Str... but something else besides that?
17:48 gaal one thing to do as Str nears completion is to tweak the parser never to construct oldVals for strings -- and then kill them comlpetely and see what breaks
17:48 gaal very easy to make them
17:48 gaal already possible
17:49 gaal the "vv" function in pugs p6land makes testing/dev possible
17:49 gaal from haskell, just do VV . PureStr instead of VStr
17:50 gaal the ' vv("moose").reverse ' example already fires the MO method
17:52 cmarcelo nice. i'll see what I can do in terms of documenting about or coding this transition.
17:52 gaal there's some work to finish in Str as well; I did spilt-on-string but not split-on-rx just because of techincal reasons
17:53 cmarcelo (also, unrelated question: do you know if Regex was delegated to PGE/PCR because of a Parsec limitation?)
17:53 gaal because the VRule type was hidden in Pugs.AST.Internals, if I remember correcly
17:53 gaal you mean, why didn't use Parsec to create Regex?
17:54 gaal the reason is because PGE had a working implementation :)
17:55 gaal one other thing that I should mention about methods in Meta
17:55 gaal is that they shouldn't bother with fancy argument processing
17:55 gaal for example, I have _split_str, which isn't a standard Perl 6 method
17:55 gaal and should have _split_re
17:55 cmarcelo that difficult means you need to port Regex to VV before having PureStr methods that deal with Regexen..?
17:56 gaal the idea is that Prelude.pm will dispatch to either one according to perlside smarts
17:56 gaal no, just to make that type visible to Pugs.Meta.Str
17:56 gaal it's a module circularity technicality
17:57 cmarcelo so 'Str.split' itself would be defined in Prelude.pm? Prelude would be Pugs dependant or Str._split_str is part of Str spec?
17:57 gaal because data VRule mentions the Val datatype
17:58 gaal _split_str is not part of Perl 6
17:58 gaal it's a primitive
17:59 gaal oh to finish that thought: (...)-constructed methods accept positional args only
17:59 gaal so do the processing perlside on things like options, default values, etc.
18:00 cmarcelo but if Prelude.pm does the dispatch, it will be a 'Pugs-specific Prelude.pm'..
18:01 gaal well... I should direct you to nothingmuch on that topic
18:01 gaal he had some thoughts on circularity
18:02 gaal i think the idea is that the prelude defines notionally *everything*, in principle down to basic arithmetic
18:02 gaal but once it detects the runtime knows how to do something it dispatches to there
18:04 gaal consider that even w/o mention of _split_str, you needed something like a runtime-conscious prelude
18:04 VanilleBert left #perl6
18:04 gaal because e.g. you wanted to exploit hs-side Str.reverse. but who said $new_implementation provides reverse in its core?
18:05 gaal so, I'm just pointing out that this is a separate question, and the concrete Prelude.pm in src/perl6 is pugs-specific already. :-)
18:05 cmarcelo hmm ok :)
18:07 cmarcelo I have to go now. Will try to keep my promise on documenting :) tks for the updates on newVal and such.
18:09 gaal sure! keep nudging if I don't moose the wiki some more this week...
18:11 cmarcelo ok :) &
18:32 the_dormant joined #perl6
18:42 sapir joined #perl6
19:08 andreum joined #perl6
19:37 nothingmuch_ joined #perl6
19:41 weinig|bbl changed the nick to weinig
19:48 marco_ joined #perl6
19:52 benny_ joined #perl6
19:56 mj41_ joined #perl6
20:01 wilx joined #perl6
20:05 justatheory joined #perl6
20:13 weinig changed the nick to weinig|bbl
20:50 pbuetow joined #perl6
20:56 SamB joined #perl6
20:56 Aankhen`` joined #perl6
21:11 offby1 joined #perl6
21:20 benny changed the nick to benny_
21:59 njbartlett joined #perl6
22:41 justatheory joined #perl6
22:42 weinig|away changed the nick to weinig
22:57 takesako__ joined #perl6
23:24 weinig changed the nick to weinig|away
23:29 ozo_ joined #perl6
23:29 bsb joined #perl6
23:33 ruz hi, in perl 5 I often want make slice of a hash, something like %hash{qw(key1 key2)}, however that's not possible
23:34 ruz wonder if that would be possible in p6
23:35 avar @hash{qw(a b c)}
23:35 lambdabot Unknown command, try @list
23:37 ruz avar: it's an array of keys, however I need equivalent of %hash_slice = map { $_ => $h{$_} } qw(a b s);
23:39 avar well that's not a slice at all
23:39 SubStack joined #perl6
23:39 wolverian ruz, note that array slices don't do that either.
23:40 ruz may be I'm weak in terms. Isn't it clear what I want?
23:40 avar It's clear, you're just not going to get it with any sort of slice syntax in perl 5 or perl 6
23:41 avar A slice is a list of values in a hash given keys or values in an array given indexes, you want to get a new hash that has the values *and* their keys
23:42 ruz yep
23:42 ruz I even think it makes sense as left value
23:43 ruz %h{qw(Key1 Key2)} = %h{qw(PrefixKey1 PrefixKey2)}l
23:43 ruz s/l$/;/
23:44 ruz or something like that
23:47 avar yes, you can do that
23:48 avar If you want ^Key to have the value of ^PrefixKey that is
23:49 dduncan joined #perl6
23:54 Daveman joined #perl6
23:54 [particle] joined #perl6
23:56 ruz that was wrong example, however, I must go to sleep

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

Perl 6 | Reference Documentation | Rakudo