Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2008-03-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:26 mncharity pmurias: re 'why metaprogram', a better answer might be that if "I've a node named Foo with fields bar and hee" uniquely determines a class definition with assorted methods, then it should. :)   anything else is repeating ourselves.   redundancy and maintenance headaches.  "I've a node" could be a macro.   not having macros, "Foo bar hee\n" is input for a node code writer.
00:27 mncharity sigh.  is it 4 lines or 5 which get clipped?
00:27 mncharity repeat: "could be a macro.   not having macros, "Foo bar hee\n" is input for a node code writer."
00:28 mncharity ruby community places great emphasis on "DRY" - Don't Repeat Yourself.  with p6, we can too. :)
00:30 mncharity and in the not-big picture what-do-we-do-on-Thursday, it just makes life easier and development more rapid.
00:33 mncharity with 100 nodes, well, 60?, lots of little edits which would be easy to do once, get to be a pain if you have do them n times.  with metaprogramming, you trade the cost of writing the metaprogram against the cost of having to do all those edits by hand.
00:34 mncharity &
00:38 eternaleye joined #perl6
00:49 Lunchy_ joined #perl6
00:55 thoughtpolice joined #perl6
00:59 meppl good night
00:59 lichtkind good night
01:00 meppl licht aus
01:00 meppl ;)
01:05 Lunchy joined #perl6
01:17 alester joined #perl6
01:23 Crickley joined #perl6
01:26 Crickley left #perl6
01:36 mncharity sigh.  re http://www.rakudo.org/2008/03/perl-6-design-minutes-for-12-m.html and Mitchell:, "(Pugs doesn't really have one)", err, so no.  I think the key missing word is a _usable_ one.  Lacking oo info.  Other than that, it's great.  In fact, there are several.
01:36 lambdabot Title: Perl 6 Design Minutes for 12 March 2008 - Rakudo.org
01:39 mncharity sigh.  if not for the missing oo, it's 2005, and elf_on_STD_red is called PILRun.  though the work since will make the subsequent steps much more rapid.
01:40 mncharity well, PILRun would be an elf_on_pugs.
01:59 Juerd TimToady: Exodus, IIRC, not Exodos
02:00 mncharity Request for correction sent to chromatic.  sorry audreyt.  the two "sometimes trying" don't make sense do to another missing word, but ah well.
02:00 Zygo joined #perl6
02:00 * mncharity wonders where the minutes get broadcast to. :/
02:02 mncharity for the record, pugs has a almost usable parse tree, which it's willing to share in several trying-to-be-friendly formats.
02:05 mncharity err, "PIL-Run", not PILRun.
02:07 mncharity apropos introductions to p6, another: http://www.szabgab.com/talks/perl6/
02:14 mncharity good night all &
03:07 alester joined #perl6
03:24 jrockway_ joined #perl6
03:44 cathya joined #perl6
04:04 alester joined #perl6
05:00 jrockway_ joined #perl6
05:03 jrockway joined #perl6
05:10 jrockway_ joined #perl6
05:24 jrockway joined #perl6
05:26 thoughtp1lice joined #perl6
05:27 Caelum joined #perl6
05:28 xinming joined #perl6
05:29 nothingmuch_ joined #perl6
05:29 eternaleye_ joined #perl6
05:29 eternaleye joined #perl6
05:29 gbacon joined #perl6
05:29 simcop2387 joined #perl6
05:29 nipotaway joined #perl6
05:29 nothingmuch joined #perl6
05:29 gbarr_ joined #perl6
05:29 silug joined #perl6
05:29 ead joined #perl6
05:29 dmq joined #perl6
05:30 buu joined #perl6
05:30 lumi joined #perl6
05:30 buu_ joined #perl6
05:30 buu joined #perl6
05:30 hcchien joined #perl6
05:30 Helios- joined #perl6
05:30 lisppaste3 joined #perl6
05:30 pjcj joined #perl6
05:30 smtms joined #perl6
05:30 lambdabot joined #perl6
05:30 pugs_svnbot joined #perl6
05:30 SamB joined #perl6
05:30 jnthn joined #perl6
05:30 PerlJam joined #perl6
05:30 rafl joined #perl6
05:31 smtms joined #perl6
07:03 DemonScrypt left #perl6
07:18 alc joined #perl6
07:47 Aankhen`` joined #perl6
08:19 Aankhen`` joined #perl6
08:22 penk joined #perl6
09:29 ycheng joined #perl6
09:39 masak joined #perl6
09:48 chris2 joined #perl6
09:50 IllvilJa joined #perl6
10:06 lumi joined #perl6
11:00 ruoso joined #perl6
11:44 ikeda joined #perl6
11:46 Lorn joined #perl6
11:53 peepsalot joined #perl6
12:14 thoughtpolice joined #perl6
12:15 ruoso TimToady++ # :samespace
12:17 masak joined #perl6
12:20 LazyJim joined #perl6
12:36 caicc joined #perl6
12:39 caicc left #perl6
12:42 b_jonas joined #perl6
12:47 BinGOs_ joined #perl6
12:53 BinGOs_ joined #perl6
12:57 elmex joined #perl6
13:27 fridim_ joined #perl6
13:32 Lorn_ joined #perl6
13:38 Lorn joined #perl6
13:42 LazyJim joined #perl6
13:44 ikeda joined #perl6
13:52 cmarcelo joined #perl6
13:59 ikeda joined #perl6
14:17 integral joined #perl6
14:31 allbery_b fwiw I still like the notion of scoped operator overloading e.g. qpath[ foo / bar . ext ] that someone suggested a couple weeks ago
14:33 Juerd Just make qpath a quoting operator, and parse the " foo / bar . ext " string.
14:35 allbery_b yep.  (the original suggestion was momble { frotz } but I think it makes better conceptual sense if seen as a quote-like operator)
14:50 alester joined #perl6
14:57 b_jonas by "scoped operator overloading", do you mean lexically scoped or dynamically scoped?
14:59 araujo joined #perl6
15:02 Daveman joined #perl6
15:02 turrepurre joined #perl6
15:05 allbery_b hm, not actually sure, since I don't have the details of how perl parses stuff in front of me.  but scope[] feels lexical to me
15:05 * allbery_b is not at all awake
15:17 pbuetow joined #perl6
15:24 TimToady Perl 6 already has scoped operator overloading if you want it.  I don't know what all the fuss is about...
15:24 b_jonas that's what I was wondering too. operators are just functions.
15:24 b_jonas syntactic sugar for functions that is
15:25 b_jonas (causes semicolon cancer)
15:30 mncharity joined #perl6
15:34 mncharity Yipes.  Only 12 hr left until spring.  Hack hack...
15:37 [particle] joined #perl6
15:37 b_jonas I did the hacking yesterday
15:37 b_jonas Took only a day to make my evalbot work with the new version of the j interpreters
15:37 b_jonas despite the lots of effort they made to make it difficult
15:38 b_jonas they removed the interface my bot used -- it would have been trivial for them nothing to maintain
15:38 b_jonas and they don't provide documentation or good examples either
15:39 b_jonas I was really angry
15:43 elmex joined #perl6
15:43 [particle1 joined #perl6
15:54 [particle2 joined #perl6
15:56 mncharity b_jonas: Implement J in p6, and fork?  ;)
15:59 elmex joined #perl6
16:02 mncharity hmm... single big file or multifile-in-dedicated-directory... "small files are easier to see" vs "easier forking and avoid slippery slope away from simple whole program compilation and towards modules and 'can different versions be mixed?'".
16:04 mncharity easier to freeze a bootstrap stage with multi.
16:05 mncharity pmurias: thanks for asking the question.  I likely wouldn't have stopped to reflect on "is one-big-file still the right tradeoff?" without it.
16:16 justatheory joined #perl6
16:34 veritos joined #perl6
16:34 veritos TimToady: When in CamelV3 you referred to "industrial-strength" programming languages that make it equally hard to do almost anything, were you perchance referring to Java?
16:35 veritos I just got out of a CS exam where literally 60% of my code consisted of null checks.
16:37 IllvilJa joined #perl6
16:43 b_jonas mncharity: I want to reimplement J (though not in P6), yep
16:43 b_jonas but that would take much more time than this
16:45 LazyJim joined #perl6
17:08 eternaleye joined #perl6
17:11 barney joined #perl6
17:14 TimToady just realized I left something major out of EXPR
17:15 TimToady nounphrase successfully interleaves pre/post operators of mixed precedence
17:15 TimToady but a corresponding operation has to happen within EXPR to interleave pre/post with infix precedence
17:18 TimToady can't just call down into subterm with a precedence limiter, because we haven't even *seen* the postfixes yet at that point, and a postfix could govern some or all of the preceding expression, much as in -$x**$y the - governs the **
17:18 TimToady not something you see in standard perl (or C) because all the builtin postfixes are very tight
17:19 TimToady bbl &
17:21 TimToady correct approach is probably discard nounphrase entirely and fake up nullterms so all operators look like infix to EXPR
17:24 TimToady & # really
17:26 b_jonas wait, how is -$x**$y parsed?
17:26 pugs_svnbot r20135 | putter++ | [STD_red] Added -q quiet option.  --yaml output is now p5 compatible (YAML::Syck, but not YAML).  But currently tickling a ruby 1.9.0 yaml bug.  1.8 works.
17:26 pugs_svnbot diff: http://dev.pugscode.org/changeset/20135
17:27 lambdabot Title: Changeset 20135 - Pugs - Trac
17:27 b_jonas I seem to remember there's some complicated logic for just that kind of expression
17:28 b_jonas or something
17:29 b_jonas in the ruby parser
17:29 b_jonas ah, I think I know what it was
17:30 b_jonas the normal precedence rules parse -x**y as -(x**y)
17:30 b_jonas but negated number literals like -5 are parsed specially as a single literal
17:30 b_jonas but there's an exception from the negative literal rule so that -5**y would parse as -(5**y)
17:32 b_jonas yep, found it. the code for that are in the pure yacc part of parse.y, in rules for numeric and arg
17:44 meppl joined #perl6
17:52 TimToady don't really need nullterms, just operators that know their own arity (which they do already)
17:52 pugs_svnbot r20136 | putter++ | [STD_red] Dealing with a ruby 1.9.0 yaml bug.  STD_red_run now defaults to whichever ruby is in your path, rather than seeking out ruby1.9.  And README has a patch for lib/ruby/1.9.0/yaml.rb which works around the bug.
17:52 pugs_svnbot diff: http://dev.pugscode.org/changeset/20136
17:52 lambdabot Title: Changeset 20136 - Pugs - Trac
17:52 TimToady EXPR only cares about operators really, the operands are just along for the ride
17:53 TimToady b_jonas: if our p6 story is correct, it shouldn't have to be an exception, but just fall out of the way things work
17:54 mncharity TimToady: ah, ok.  then I won't sweat nounphrase.  thanks.
17:54 mncharity re approach, there's always the redsix approach of breaking tokens down into lexemes... ;)
17:54 b_jonas TimToady: yep, if you don't consider -5 a single literal there's no problem
17:54 b_jonas that's what C and all languages do
17:54 TimToady that's just constant folding
17:54 b_jonas only ruby doesn't really have constant folding, which is why I think it does this
17:55 b_jonas it does have _some_ constant folding, but not much
17:55 b_jonas I think it folds numeric ranges like 0..8
17:55 TimToady it's natural to view that as a Range object
17:55 TimToady (in an OO language)
17:55 b_jonas and of course compiles regex literals in compile-time which can count as compile time
17:55 b_jonas it is a Range object, but .. is like any other operator
17:56 TimToady are you saing that in ruby 0..8 turns directly into 0,1,2,3,4,5,6,7,8?
17:56 b_jonas s/count as compile time/count as constant folding/
17:56 b_jonas no
17:56 mncharity b_jonas: re special ruby parse rules, yes, ruby's relationship with bison is interesting.  eg, ->(){} being created specifically to deal with not being able to stuff parameter lists in {|...|...}.
17:56 b_jonas x..y is calling the .. method on x with y
17:56 b_jonas at runtime
17:56 b_jonas which returns a range object
17:56 b_jonas not an array
17:56 TimToady *nod*
17:57 b_jonas but that method is ran at compile time in 0..8
17:57 b_jonas just like perl calls * at compile time in 1*8
17:57 b_jonas I should look up now how much constant folding ruby does
17:57 b_jonas it might do it with arithmetic too
17:57 b_jonas probably it's just eluded me because it's hidden in some macro
17:58 TimToady anyway, proper thing is for it to fall out naturally from knowing which methods have no side effects
17:59 b_jonas mncharity: I don't get the point of the new ->(){} syntax in 1.9. what can that do that lambda{|...|...} can't?
17:59 b_jonas TimToady: the problem is, those methods can be overridden at runtime in ruby
17:59 b_jonas wait, I'm stupid
17:59 b_jonas I messed up
17:59 b_jonas there's no .. method
17:59 b_jonas .. is special syntax
18:00 b_jonas just like the array syntax [a] or [a,b] or [a,b,c] etc isn't a method either
18:00 b_jonas (though there are methods that do the same)
18:00 b_jonas so that's why it gets constant folded
18:00 b_jonas argh
18:00 mncharity someone needs to create a "save us from broken tools" prayer.  if it hasn't already been done.
18:01 b_jonas I view ruby as a brilliant hack, but only as a hack
18:01 b_jonas it shows how to create an interpreter that's usable in practice the most simply
18:01 b_jonas but it doesn't really have any system in it
18:02 TimToady indeed, you really want to do constant folding at the last moment when you know you have the complete candidate lists
18:02 mncharity b_jonas: re 'what can it do', my fuzzy recollection is parameter defaults caused a grammar conflict.
18:03 b_jonas mncharity: so it can have defaults?
18:03 TimToady on the other hand, certain optimizations would really like to know they would be handed, say, a simple integer
18:03 mncharity b_jonas: yes
18:03 TimToady this is where proto declarations come it
18:03 b_jonas I see
18:03 TimToady *in
18:05 b_jonas irb(main):001:0> class Fixnum; def -@; 42; end; end; [-5, -(5)]
18:05 b_jonas => [-5, 42]
18:05 b_jonas negated literals is an unsafe constant folding in this sense
18:06 TimToady to some extend this can be swept under the carpet of "Doctor it hurts when I do this"
18:07 TimToady but it's better to find a cure
18:07 b_jonas yep
18:08 mncharity ah well.  elf after lunch.  &
18:14 Psyche^ joined #perl6
18:23 ting joined #perl6
18:46 jrockway joined #perl6
19:25 IllvilJa joined #perl6
19:27 lichtkind joined #perl6
19:42 mncharity amazing how much time answering email can take.
19:48 * TimToady nods vigorously
19:53 gugod joined #perl6
19:55 lichtkind mncharity: true
19:56 b_jonas joined #perl6
19:57 rindolf joined #perl6
19:57 lichtkind i  released today p6doc 0.36
19:58 lichtkind now i have most parts together i planned for when i took over the  module
19:58 mncharity /me stares and futzes about for ~1 minute.  Wondering why p5 doesn't like A.new().foo().   Sigh.
20:03 mncharity re email, I've seen people who spend there lives doing it become very... streamlined about it.  seems a useful skill to acquire.
20:03 Iskr joined #perl6
20:03 Iskr left #perl6
20:06 b_jonas joined #perl6
20:13 sh0cked joined #perl6
20:16 tobeya joined #perl6
20:20 TJCRI joined #perl6
20:28 jferrero joined #perl6
20:29 pmurias joined #perl6
20:29 pmurias mncharity: forking a directory isn't much more difficult than a file sv(n|k) copy
20:33 mncharity right.  I'm trying multifile.  hope to check in (very little) rsn.  elf_a ended up in p5 rather than rb, so hacking help welcome. :)
20:38 justatheory_ joined #perl6
20:54 rindolf joined #perl6
20:54 literal left #perl6
20:55 lisppaste3 joined #perl6
20:56 pugs_svnbot r20137 | putter++ | misc/winter_jig/elf_on_STD_red: Created.  A largely empty project framework.
20:56 pugs_svnbot diff: http://dev.pugscode.org/changeset/20137
20:56 lambdabot Title: Changeset 20137 - Pugs - Trac
21:06 mncharity So what's the closest thing we have to a spec Match class?  kp6's Match.pm in p6?
21:09 pmurias mncharity: likely
21:11 mncharity And does anyone know _why_ kp6 used inside-out objects for Match?  Did it help with the huge performance hit yare saw ith the heavily overloaded class?  (thus it's use without overloads, then rebless before handing off).
21:11 mncharity pmurias:  thanks
21:13 pmurias mncharity: dunno
21:13 pmurias i thought you meant src/KindaPerl6/Runtime/Perl6/Match.pm
21:14 Chillance joined #perl6
21:15 mncharity yes, sorry, two separate questions.
21:16 mncharity for elf_a, in p5, I thought it might save some effort to snarf the p5 v6/v6-KindaPerl6/src/KindaPerl6/Runtime/Perl5/Match.pm, rather than translating Perl6/Match.pm.  But for elf_b, in p6, Perl6/Match.pm.
21:19 pmurias use Moose if you want to save time ;)
21:20 mncharity re P6/Match.pm... or maybe not (for elf_b).  might not want "Match is Capture" for elf_b.
21:21 mncharity re Moose, yes, I expect the elf_b emitter will use Moose and autobox.
21:21 mncharity s/will use/will emit/
21:21 pmurias mncharity: autobox is great, but using moose won't get much
21:22 kyrbe joined #perl6
21:23 mncharity re "won't get much", means we can just emit has() decls as is, without having to worry about making objects with them.
21:26 wknight8111 joined #perl6
21:26 pmurias what is elf_b exactly?
21:26 mncharity re autobox, awesome.  not sure whether i've ever used it.  advice welcome
21:26 mncharity re elf_b,
21:28 mncharity elb_b is a p6 version of the p5 elf_a.  it gets compiled by elf_a.  when elf_a and elf_b are both happily compiling elf_b, and perhaps a Test.pm and t/sanity, they freeze and we start on elf_c.
21:31 mncharity I'm picturing the freeze with no external dependencies.  So they get their own copy of STD_red before being frozen.  The only bitrot will be p5 and ruby 1.9 language drift.  Easy enough to do, and avoids it's not working anymore problem.
21:31 pmurias will you work on both a and b simultaneously?
21:31 mncharity yes
21:32 pmurias why?
21:33 mncharity elf_b needs elf_a to compile and test it.  elf_a has elf_b as its main client and defining requirement.
21:33 wknight8111 what is elf_a?
21:34 mncharity so not doing them simultaneously either leaves one without the ability to be tested as it's worked on, or the other without the focus of knowing "you need to compile X, but Y can be punted for now".
21:34 peeps[work] joined #perl6
21:34 mncharity elf_a is a limited p6 compiler written in p5.
21:35 mncharity it invokes STD_red_run on the p6, getting a yaml parse tree, grovels over the tree creating an IR node tree, and then emits simple p5 from that IR.
21:36 mncharity re simple, so  "class A { has $.x; method m(){42} }"  becomes "{package A;use Moose; has...<hmm, forgot the Moose has format..>;  sub m { 42 } }"
21:37 mncharity elf_a's job in life is to compile elf_b, and otherwise help get elf_b to the point of compiling itself and otherwise being usable.
21:39 mncharity elf_a is the equivalent of last week's elf_on_rakudo's elf_zero, and elf_b of elf_one.
21:40 gbacon svn add elf_infinity # yay, a working perl 6!
21:40 gbacon who knew it would be so easy?
21:42 mncharity :)
21:43 mncharity I'd be happy with elf_c.  a working elf_b even.
21:43 pmurias mncharity: i think it's more possible to pragmatic to first discover what can be easily implemented and then use that stuff to write elf_b
21:47 mncharity indeed.  but there's also the concept that
21:49 mncharity elf_a is sort of a "safe place" to be.  because one has complete and direct control of the code.  so there's an element of "write elf_b the way you would be comfortable doing further development (eg, elf_c), and advance STD_red and elf_a to support that, because once
21:49 mncharity you push off onto elf_b, you loose that safety net".
21:50 mncharity though actually, it would make sense to keep writing the elf_? with an elf_a dialect for a while, if not too painful.
21:50 mncharity ha, besides,
21:52 mncharity with metaprogramming, just about the only handwritten code will be main(), and the guts of the ast->ir and ir->p5 emitters.
21:52 mncharity :)
21:54 mncharity but I suppose the real answer would be yes, 'discover with elf_a' would be a good approach, which elf_zero took.  and having done that, there's the confidence to do them in parallel now, which wouldn't have existed without that.
21:56 pmurias i propably shouldn't distract you from coding ;)
21:57 b_jonas elf what?
21:57 b_jonas are those elves or elf format binaries/objects?
21:57 PerlJam b_jonas: You know ... like Legolas
21:57 b_jonas so real elves
21:59 mncharity pmurias: re distract, no, it's nice to know someone is interested.  :)  and the conversation serves some of the same role as "chat in front of a white board before coding".  if not for yesterday's chat, elf_a would still be in elf_zero's "one really big file" mode.
22:02 mncharity b_jonas: well, they were originally envisioned as red elves, ruby ones actually.  but it seemed that making them look like an ... what's the p6 creature again? ... would make them more attractive.  but they're still using STD_red, so they are sort of red-nosed <whatever that creature is>.
22:02 PerlJam reindeer?
22:02 mncharity all endeavoring to build toys for Christmas.
22:03 mncharity the mutant one on the cover of the fake O'R book.
22:05 mncharity http://www.bleaklow.com/blog/2003/08/new_perl_6_book_announced.html
22:05 lambdabot Title: Alan's Ramblings: New Perl 6 book announced, http://tinyurl.com/3db9hq
22:05 mncharity http://www.bleaklow.com/blog/images/p6_cover.html
22:05 lambdabot Title:
22:06 mncharity ah well, the "animal which is a composite of parts from assorted animals" has a name.  don't remember what.
22:08 spinclad well, a different one was the chimaera
22:09 spinclad and some people figured a platypus was one
22:09 Zygo joined #perl6
22:24 n0mad_origin joined #perl6
22:27 pugs_svnbot r20138 | putter++ | [elf_a] Get Match tree from STD_red into elf_a.
22:27 pugs_svnbot diff: http://dev.pugscode.org/changeset/20138
22:27 lambdabot Title: Changeset 20138 - Pugs - Trac
22:45 penk left #perl6
22:46 FurnaceBoy joined #perl6
22:49 mncharity ah, that's it.  chimera.  thanks spinclad. :)
22:52 mncharity I never remember it in historical "composite animal" context anymore - its use in genetics broke my index.  But the genetic definition applies too... hmm, or maybe p6 is more of a mosaic.  or both - some code on the germline, some not.
22:53 mncharity "mosaic chimera"?
22:54 justatheory joined #perl6
22:57 mncharity brain mush.  dinner.  more elf later, or tomorrow.  we'll see how far it gets before hitting walls.
22:58 mncharity &
23:06 b_jonas joined #perl6
23:10 peepsalot joined #perl6
23:41 simcop2387 joined #perl6

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

Perl 6 | Reference Documentation | Rakudo