Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2008-11-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:12 bacek_ joined #perl6
00:15 xinming joined #perl6
00:24 TimToady @tell masak yes, p6 macros are hygienic, as long as they return AST and not text.  quasiquoting provides a convenient way to return AST.
00:24 lambdabot Consider it noted.
00:26 literal @tell lambdabot you're useful
00:26 lambdabot Nice try ;)
00:54 mberends left #perl6
01:02 Limbic_Region joined #perl6
01:18 mtrimpe joined #perl6
01:26 mtrimpe joined #perl6
01:28 araujo joined #perl6
01:34 mtrimpe joined #perl6
01:35 kst joined #perl6
01:49 pugs_svn r24110 | hinrik++ | [util/perl6.vim] vim compatability fix
02:05 ChrisDavaz joined #perl6
02:05 meppl good night
02:07 mtrimpe joined #perl6
02:13 alester joined #perl6
02:17 mtrimpe joined #perl6
02:19 mberends joined #perl6
02:28 mtrimpe joined #perl6
02:38 mtrimpe joined #perl6
02:53 alester joined #perl6
03:06 hercynium joined #perl6
03:09 kst joined #perl6
03:29 Psyche^ joined #perl6
04:02 elmex_ joined #perl6
04:04 ihrd joined #perl6
04:05 ihrd hi there
04:06 ihrd I tring to implement HTML::Template using {*}
04:45 kst joined #perl6
04:58 ihrd left #perl6
05:19 apeiron joined #perl6
05:20 apeiron joined #perl6
05:41 alester joined #perl6
06:24 kst` joined #perl6
06:37 adc_penner joined #perl6
06:42 goog joined #perl6
06:54 iblechbot joined #perl6
06:58 justatheory joined #perl6
07:04 xuser joined #perl6
08:20 kst` joined #perl6
08:21 iblechbot joined #perl6
08:25 schmalbe joined #perl6
08:30 moxmet joined #perl6
08:30 moxmet left #perl6
08:33 IRSeekBot joined #perl6
08:39 eternaleye joined #perl6
09:30 rakudo_svn r33329 | bernhard++ | [codingstd] remove trailing space
09:36 ejs joined #perl6
09:52 kst` joined #perl6
09:57 DemoFreak joined #perl6
10:43 meppl joined #perl6
10:50 smg joined #perl6
11:01 ejs joined #perl6
11:31 alech joined #perl6
11:52 DemoPhreak joined #perl6
12:16 kst` joined #perl6
12:19 vixey joined #Perl6
12:55 DemoFreak joined #perl6
13:08 pjcj joined #perl6
13:12 pmurias joined #perl6
13:27 cognominal joined #perl6
14:00 kst` joined #perl6
14:05 dr_df0 joined #perl6
14:10 dr_df0 hi all
14:11 smg joined #perl6
14:16 xinming_ joined #perl6
14:18 pmurias dr_df0: hi
14:18 dr_df0 pmurias: hi, is there a problem with rakudo in SVN?
14:19 dr_df0 pmurias: *I've* tried to compile the latest build and compiles ok, but fails to run on MacOSX 10.5
14:21 pmurias dr_df0: i have limited knowledge about rakudo and am totally ignorant about MacOSX
14:42 mberends joined #perl6
15:13 mtrimpe joined #perl6
15:24 kst` joined #perl6
15:28 sri_kraih joined #perl6
15:34 sri_kraih joined #perl6
15:37 rindolf joined #perl6
15:52 wolverian hmm, why is S07 not in the draft section of spec.pugscode.org?
15:54 smtms joined #perl6
16:01 xinming joined #perl6
16:16 simcop2387 joined #perl6
16:17 iblechbot joined #perl6
16:30 rakudo_svn r33345 | pmichaud++ | [rakudo]: spectest-progress.csv update: 227 files, 4653 passing, 48 failing
16:30 rakudo_svn r33345 | pmichaud++ | * Also a date correction reported by mj41++
16:30 sri_kraih_ joined #perl6
16:53 kst` joined #perl6
18:02 ab5tract joined #perl6
18:46 kst` joined #perl6
19:15 explorer joined #perl6
19:21 smg joined #perl6
19:30 adc_penner joined #perl6
20:02 preflex joined #perl6
20:26 araujo joined #perl6
20:27 kst` joined #perl6
20:58 slavik rakudo: eval("say 'hello'");
20:58 p6eval rakudo 33350: OUTPUT[hello␤]
21:09 adc_penner2 joined #perl6
21:21 masak joined #perl6
21:24 literal what does xx= do?
21:24 literal it's mentioned in S03 but not documented
21:25 masak literal: $a xx= $n does $a = $a xx $n
21:25 lambdabot masak: You have 1 new message. '/msg lambdabot @messages' to read it.
21:26 literal ok
21:26 masak TimToady: thanks.
21:48 slavik what is op xx ???
21:50 masak slavik: repeat something $n times as list elements.
21:51 masak see S03.
21:51 slavik so $a xx 5 will return a list of 5 $a?
21:52 masak aye.
21:54 slavik k
21:58 spx2 joined #perl6
22:16 kst` joined #perl6
22:18 hercynium_ joined #perl6
22:24 mncharity joined #perl6
22:28 masak I just want to say that I wrote a test module in Perl 6 today that does factory methods, closure parameters and passing arrays as arguments.
22:28 masak and it worked on the first try in Rakudo!
22:29 masak things like that make a developer very happy, you know.
22:30 masak rakudo: say ("a" xx 5).perl # for slavik
22:30 p6eval rakudo 33352: OUTPUT[["a", "a", "a", "a", "a"]␤]
22:31 slavik nice
22:35 mncharity http://perl.net.au/wiki/Elf updated.
22:35 lambdabot Title: Elf - PerlNet
22:36 masak mncharity++
22:36 alech joined #perl6
22:36 mncharity "and it worked on the first try in Rakudo", huzzah!
22:37 masak mncharity: if you were to summarize the current status of Elf in three words, what would you say?
22:39 pugs_svn r24111 | putter++ | [STD_blue] Makefile targets for selecting a working STD version (head is broken).
22:41 slavik not ready yet :P
22:41 slavik so, what is elf's story?
22:41 slavik what is it built on top of and such?
22:42 mncharity masak: 3 words?  "mncharity labors alone"?  Not true - STD and gimme5 is TimToady.  "two person hobby"?  plus pmurias.  lack of dev resources being the primary characteristic of anything p6.
22:43 masak aye.
22:44 masak mncharity: if you had a magic wand that produced a third person working on the project, what would you advice that person to do?
22:44 mncharity project wise, STD_blue self compiling may actually be an inflection point.  if STD also proves to generate a valid parse of STD.pm, then at this point, the elf critical path is all me - parsing may now be working sufficiently well to bootstrap.
22:45 masak sounds cool.
22:45 mncharity s/STD also/gimme5 also/
22:45 mncharity "only regexs left".  "small matter'o parsing".  "regexs easy, ha!".
22:46 mncharity slavik: :)  re story,
22:46 masak rakudo: grammar G { token TOP { ^ <foo>+ $ }; token foo { ':' <bar>?  }; token bar { \w } }; ":a:b" ~~ G::TOP; say ~$/<foo><bar> # is this a bug? shouldn't ~$/<foo><bar> be just 'a' ?
22:46 p6eval rakudo 33354: OUTPUT[:a␤]
22:46 slavik masak: ~~ G works ;)
22:47 masak rakudo: grammar G { token TOP { ^ <foo>+ $ }; token foo { ':' <bar>?  }; token bar { \w } }; ":a:b" ~~ G; say ~$/<foo><bar> # is this a bug? shouldn't ~$/<foo><bar> be just 'a' ?
22:47 p6eval rakudo 33354: OUTPUT[:a␤]
22:47 masak slavik: indeed.
22:47 mncharity it's a self-compiling p6 implementation which has emphasized being usable for a large p6 project (itself).
22:47 slavik masak: it has worked for a while now
22:47 slavik mncharity: like kp6?
22:47 masak slavik: aye. but that code is not originally mine, I copied it from an email.
22:48 slavik masak: see my blog :P
22:48 masak slavik: I am reading it :)
22:48 mncharity like kp6 in emphasizing self-compilation, not like kp6 in being designed for performance which makes that practical.
22:48 slavik here's another one ... using subst, how would one replace a multiple occurences of a char with like char-count
22:49 mncharity takes just a couple of seconds to self compile.
22:49 pmichaud rakudo:  grammar G { token TOP { ^ <foo>+ $ }; token foo { ':' <bar>? }; token bar { \w } };  my $m = G::TOP(':a:b');  say $m<foo><bar>;
22:49 p6eval rakudo 33354: OUTPUT[:a␤]
22:49 pmichaud rakudo:  grammar G { token TOP { ^ <foo>+ $ }; token foo { ':' <bar>? }; token bar { \w } };  my $m = G::TOP(':a:b');  say $m<foo>;
22:49 p6eval rakudo 33354: OUTPUT[:a:b␤]
22:49 pmichaud rakudo:  grammar G { token TOP { ^ <foo>+ $ }; token foo { ':' <bar>? }; token bar { \w } };  my $m = G::TOP(':a:b');  say $m<foo><bar>[0];
22:49 p6eval rakudo 33354: OUTPUT[Use of uninitialized value␤␤]
22:49 pmichaud rakudo:  grammar G { token TOP { ^ <foo>+ $ }; token foo { ':' <bar>? }; token bar { \w } };  my $m = G::TOP(':a:b');  say $m<foo>[0]<bar>[0];
22:49 p6eval rakudo 33354: OUTPUT[a␤]
22:50 * mncharity wonders if rakudo can run elf...  experiment for another time.
22:50 pmichaud masak:  the problem is that Parrot doesn't distinguish hash access from array access
22:51 pmichaud so $/<foo><bar>   is actually the same as $/<foo>[0]
22:51 pmichaud because $/<foo> is an array.
22:52 masak pmichaud: so, is it a bug or not?
22:52 masak slavik: something like this?
22:52 pmichaud yes, but I'm not sure where yet.
22:52 masak my $regex = / b+ /; my $str = "abbbbbc"; $str ~~ $regex; say $str.subst( / b+ /, { "[" ~ $/.chars ~ " b's]" } )
22:52 masak rakudo: my $regex = / b+ /; my $str = "abbbbbc"; $str ~~ $regex; say $str.subst( / b+ /, { "[" ~ $/.chars ~ " b's]" } )
22:52 p6eval rakudo 33354: OUTPUT[a[5 b's]c␤]
22:52 masak pmichaud: I'll report it, then.
22:52 mncharity slavik: so the main elf parser is a hand-written one based on an old version of STD.pm.  there's now also one (STD_blue) based on the current STD.pm and the p5 gimme5.  Next step is to teach elf to run STD.pm directly.  Internals are p6.  Main backend is p5, with a working but not yet really practical one on SBCL.
22:52 pmichaud I'll reply to the november email and explain it.
22:53 masak pmichaud: oki. it was a p6u email, though.
22:55 mncharity masak: re extra person, if they did lisp, perhaps "make elfish/on_sbcl (the CL backend) also run on CLISP, in hope the pragmatics (eg, compilation noise) are better".  If p5,
22:56 mncharity "make a better multi-method dispatch module than Class::MultiMethod, folding in Luke's work, etc".  Or, "add named arguments by...", hmm, maybe not, not sure I want destabilize the code base like that just now.
22:57 pmichaud now answered on p6u.
22:58 mncharity If really wizzy, help me fold STD.pm, elf, and rx_on_re together, which is my next/current task.
22:59 mncharity A low-tech task is "grovel through the Snn gathering prelude _signatures_".  We have a file'o names, but don't even have a list of prelude functions and their signatures yet.  :/  Unless someone has gotten to it and I've not noticed.
23:00 masak mncharity: ah, so S29 would have a lot of ready signatures for you?
23:01 * mncharity goes to look at S29...
23:01 slavik ASSERTIONS!!!! :P
23:02 masak excuse me?
23:02 slavik pmichaud: since there are SDL and OpenGL bindings for rakudo, do you know if SDL will open an OpenGL context for OpenGL? I would assume so, because nothing really depends on rakudo for that
23:02 slavik masak: I ma waiting for assertions in grammars :)
23:02 masak slavik: in Elf?
23:02 slavik masak: in rakudo
23:03 pmichaud at the moment assertions is a fair distance from the top of my priority list, alas.
23:03 slavik :(
23:03 pmichaud gonna need some PGE refactors first.
23:03 slavik pmichaud: any idea when parrot will have a nicer bignum?
23:03 slavik rakudo: say 2**65
23:03 pmichaud slavik: no.
23:03 p6eval rakudo 33354: OUTPUT[3.68934881474191e+19␤]
23:03 slavik something that doesn't output that
23:03 masak slavik: you can always fake assertions by putting code in subs and methods instead :)
23:03 slavik masak: but <> in grammars don't work at all :(
23:04 masak slavik: well, yes it does.
23:04 masak I used <!before xxx> yesterday.
23:04 slavik it does?
23:04 masak sure!
23:04 masak slavik: you _really_ should check out November.
23:04 slavik what about <say "matched"> or something?
23:04 pmichaud if <> didn't work, then we wouldn't be parsing anything in Rakudo.
23:04 pmichaud <say> isn't a subrule.
23:04 slavik oh
23:04 masak slavik: you might want to read S05 again.
23:05 pmichaud you could try:    method say($/) { say 'hello'; }    in the grammar.  That might work.
23:05 pmichaud as in, that might get <say>  to work.
23:06 slavik I see, so <> isn't just some code to run?
23:06 pmichaud no, there's a whole syntax for it.
23:06 mncharity masak: re S29, basically when the elf hypothesis was "get prelude, pass tests, then people will care", the bottleneck was "there is no prelude, have to write one working backwards from tests".  Now the elf hypothesis is "people will care when elf is bootstrapped", but after bootstrap, it's back to needing prelude code.
23:06 pmichaud <foo>   - invoke a subrule, capture as $<foo>
23:06 pmichaud <?foo>  - invoke a subrule zero-width match
23:06 pmichaud <!foo>  - invoke a subrule, negated zero-width match
23:06 pmichaud <[abc]>  - match any of 'a', 'b', or 'c'
23:06 slavik I see
23:06 pmichaud <.foo> -- invoke a subrule, don't capture.
23:07 pmichaud etc.
23:07 masak mncharity: I see. yes, that sounds reasonable. furthermore, writing a prelude sounds like lots of fun! :)
23:07 slavik I mean like: token blah { 'glah' } <function()>
23:07 slavik wait
23:07 slavik rather the closing brace should be at the end of that
23:08 jferrero joined #perl6
23:09 masak slavik: it's easier if you use the syntax described in S05 rather than making up your own. :P
23:09 slavik :(
23:10 slavik this is perl6, I should be able to invent my own!!!
23:10 mncharity masak: :)  could indeed be fun.  been fighting to get to the point where it's possible for 3 years now.  modulo the limits of elf, it can be done right now.  that's another thing the hypothetical person could work on.  just not critical path to bootstrap, so no fun for me. ;)
23:10 masak slavik: don't be sad, you're like this close to reading it again, and then all will be well.
23:10 slavik eventually, it will be "*" that will link up with my brain and do whatever it is I want at the moment
23:10 slavik it will be a new language ... called STAR
23:10 slavik ^^
23:10 masak yeah, whatever.
23:10 mncharity s/so no fun for me/so I have to work on other things/
23:11 slavik :(
23:11 mncharity but if anyone wanted to pour out prelude, in elf dialect or full p6, that would be nifty.
23:11 masak mncharity: I'll keep that in mind.
23:12 masak Elf looks like something worth helping along.
23:13 mncharity really?  neat.  I sometimes wonder.  The "it seems important, but if so, why am I dangling out here by myself" problem. :)
23:14 masak mncharity: you're not alone in having such thoughts. :)
23:14 masak I mean, November has a few people, but it could use a lot more.
23:14 nnunley joined #perl6
23:14 masak there's simply not enough people crowding around our cool Perl 6 projects :)
23:15 mncharity Had a conversation with a haskell person on the subway a few days back (gotta love the Boston Red Line, great techy conversations with strangers:).  Reminded me that much of what makes p6 valuable is not only non-obvious, but also hard to explain.
23:16 masak indeed.
23:16 masak the grammars thing, for example, has simply Never Been Done Before.
23:17 masak using grammars in a program still feels a bit like coding on top of a humming jet engine :)
23:18 mncharity re Never Been Done Before, actually, my understanding is there was quite a bit of it back in the 60's.  but the engines weren't powerful enough to get back up to the "real" languages of the day (eg, FORTRAN).  so you per-application "language" divergence, with no obvious way to reduce entropy.
23:19 masak Tour de Babel.
23:21 mncharity yes.  my current line is "yes, there's the potential for great divergence.  but the infrastructure is strong enough both to support current real languages (so divergence isn't unavoidable), and to do Java-like 'you must use language subset/dialect X' code analysis/policy enforcement tools".
23:22 masak mm
23:24 mncharity the haskell conversation was sort of like that.  question was "does p6 have a haskell-like type system".  I was trying to run an argument of "the flexible parser lets you write haskell.  the culture and infrastructure will let you compile it to an embedded ghc.  so p6 is a superset of hs.  and you can degrade gracefully, in a engineering-wise useful way."  but we kept getting stuck on "p6 language lacks limits X, so you can do hs-s
23:25 masak well, there probably are real roadblocks to emulating Haskell...
23:25 mncharity need to build an argument that p6 is a... metalanguage?, not a language family, but... hmm, not sure what to call it.
23:25 masak at least on top of Parrot.
23:26 smg joined #perl6
23:26 mncharity sort of like, a prolog engine is lousy for solving any but toy problems, but great for implementing engines to solve your real problems.
23:26 masak mncharity: I think I will not be using the language remolding functionality very much myself, because I think that it might be one of those easy but easy-to-shoot-yourself-in-the-foot things. I will probably mostly be a consumer of modules that change the grammar for me. :)
23:27 masak mncharity: did you just imply that Perl 6 is lousy for solving anything but toy problems? :P
23:29 mncharity re toy problems, more like "the full p6 language has many undesirable features, including being very big.  that's why you won't in general use the full p6 language in any particular module or application.  the p6 compiler story permits the graceful engineering choice of what subset to use."
23:30 masak doesn't p5 also permit a choice of what subset to use?
23:30 mncharity yes, but I can't choose the "haskell subset" or the "C subset" or ...
23:31 masak no?
23:31 mncharity "C subset" perhaps, though the existing inline stuff is rather a kludge.
23:32 masak I've heard about people writing in a C-like way in Perl 5. but maybe that's not what you mean here.
23:33 mncharity hmm, what do I mean.  "I can write a p6 which has exactly the semantics and runtime performance of language X".
23:33 mncharity therefore there is little cost, and much benefit, to write p6 rather than language X.
23:34 mncharity for example, if I want to write javascript, I may still wish to write it as p6, because then I get macros, etc.
23:35 masak I'm not sure your dream will come true, at least not that clearly.
23:36 masak even considering that Perl 6 will have macros and a mutable grammar.
23:36 masak syntax is easy to change in a language; semantics, not so much.
23:38 ab5tract i can't think of a single undesirable feature of p6
23:41 mncharity masak: if p6 becomes real, it will undoubtably get compile and runtime mops.  and on different runtimes get different semantic "extras".
23:42 masak uh oh, now you're starting to sound like ruoso and pmurias when they talk about complicated things. :P
23:42 mncharity and while p6 is a large language, it's also a great language to do language implementation in.  I suspect, once we finally have a working p6 impl, it will turn out to not be intractable to play with the language.  even if STD has several hundred productions. :)
23:42 mncharity ^.^
23:43 masak mncharity: define 'working p6 impl'.
23:43 masak Rakudo works.
23:43 masak fsvo 'works'.
23:46 vixey which value of works?
23:46 mncharity masak: re define 'working p6 impl', unless things have changed recently, rakudo works in the same sense that pugs works.  passes lots of test but can't write non-small p6 applications in it.  unless rakudo is now running ext/* ?
23:47 masak vixey: the value "I'm writing code in it" of 'works'.
23:47 mncharity pugs could run ext/*.  still couldn't handle writing p6 prelude, or something the size of elf (or even half that).
23:47 ZuLuuuuuu joined #perl6
23:48 masak mncharity: re ext/*, I don't know. haven't checked recently.
23:48 masak doing that sounds like an interesting idea.
23:48 mncharity :)
23:48 masak mncharity: would you consider the November wiki non-small?
23:48 mncharity "if it isn't tested, it doesn't work.  qed"
23:49 mncharity sorry, i've not looked at November :/
23:49 masak mncharity: all the .pm files in November total 47KiB right now.
23:50 mncharity if you didn't have to do a lot of "well, that didn't work, tickled an implementation bug, let's try another approach" whi  oops...
23:50 masak mncharity: yes, but less and less.
23:50 masak the summer was worst :)
23:52 mncharity still alive.  yay.  [...] which characterized non-small pugs (and elf too) work, then rakudo's an improvement (or you have internalized it's current limitations;)
23:52 masak according to xargs wc, we have 5482 lines of text in out .pm files. that's not LOC, of course, but that's at least 3kLOC.
23:52 mncharity "out .pm files"?
23:53 masak sorry, "our .pm files".
23:53 masak i.e. our modules.
23:56 masak yep, removing empty lines, lines w/ comments or closing curlies, we still have 3823 LOC.
23:57 masak I don't know if I've internalized its current limitations. to some degree, sure. we're simply using whatever is available right now.
23:57 pugs_svn r24112 | putter++ | [elfish/STD_green] Created.  Project to run STD.pm on p6/elf.

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

Perl 6 | Reference Documentation | Rakudo