pugscode.org/ | nopaste: sial.org/pbot/perl6 | pugs: [~] <m oo se> (or rakudo:, kp6:, smop: etc.) || We do Haskell, too | > reverse . show $ foldl1 (*) [1..4] | irclog: irc.pugscode.org/
Set by TimToady on 25 January 2008.
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
sigh. is it 4 lines or 5 which get clipped?
repeat: "could be a macro. not having macros, "Foo bar hee\n" is input for a node code writer."
ruby community places great emphasis on "DRY" - Don't Repeat Yourself. with p6, we can too. :) 00:29
and in the not-big picture what-do-we-do-on-Thursday, it just makes life easier and development more rapid. 00:31
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
&
00:38 eternaleye joined 00:50 Lunchy_ joined 00:56 thoughtpolice joined
meppl good night 00:59
lichtkind good night 01:00
meppl licht aus
;) 01:01
01:06 Lunchy joined 01:18 alester joined 01:23 Crickley joined
Crickley It says here that Mr. Schulich bought 1.2M shares of Birchcliff Energy on March 14 in the public market. 01:24
But at a price of $8/share.
Nowhere last week or this week was Birchcliff trading as low as $8/share at any time.
So how did he do that?
01:27 Crickley left
mncharity sigh. re www.rakudo.org/2008/03/perl-6-desig...-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:37
lambdabot Title: Perl 6 Design Minutes for 12 March 2008 - Rakudo.org
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
well, PILRun would be an elf_on_pugs. 01:41
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:01
02:01 Zygo joined
mncharity wonders where the minutes get broadcast to. :/ 02:01
for the record, pugs has a almost usable parse tree, which it's willing to share in several trying-to-be-friendly formats. 02:02
err, "PIL-Run", not PILRun. 02:05
apropos introductions to p6, another: www.szabgab.com/talks/perl6/ 02:08
good night all & 02:15
03:08 alester joined 03:25 jrockway_ joined 03:45 cathya joined 04:05 alester joined 05:01 jrockway_ joined 05:04 jrockway joined 05:11 jrockway_ joined 05:25 jrockway joined 05:27 thoughtp1lice joined 05:28 Caelum joined 05:29 xinming joined 05:30 nothingmuch_ joined, eternaleye_ joined, eternaleye joined, gbacon joined, simcop2387 joined, nipotaway joined, nothingmuch joined, gbarr_ joined, silug joined, ead joined, dmq joined 05:31 buu joined, lumi joined, buu_ joined, buu joined, hcchien joined, Helios- joined, lisppaste3 joined, pjcj joined, smtms joined, lambdabot joined, pugs_svnbot joined, SamB joined, jnthn joined, PerlJam joined, rafl joined 05:32 smtms joined 07:04 DemonScrypt left 07:19 alc joined 07:48 Aankhen`` joined 08:20 Aankhen`` joined 08:23 penk joined 09:30 ycheng joined 09:40 masak joined 09:49 chris2 joined 09:51 IllvilJa joined 10:07 lumi joined 11:01 ruoso joined 11:45 ikeda joined 11:47 Lorn joined 11:54 peepsalot joined 12:15 thoughtpolice joined
ruoso TimToady++ # :samespace 12:16
12:18 masak joined 12:20 LazyJim joined 12:37 caicc joined 12:40 caicc left 12:43 b_jonas joined 12:48 BinGOs_ joined 12:54 BinGOs_ joined 12:58 elmex joined 13:28 fridim_ joined 13:33 Lorn_ joined 13:39 Lorn joined 13:43 LazyJim joined 13:45 ikeda joined 13:53 cmarcelo joined 13:59 ikeda joined 14:18 integral joined
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:32
Juerd Just make qpath a quoting operator, and parse the " foo / bar . ext " string. 14:34
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:36
14:51 alester joined
b_jonas by "scoped operator overloading", do you mean lexically scoped or dynamically scoped? 14:58
15:00 araujo joined 15:03 Daveman joined, turrepurre joined
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:06
15:18 pbuetow joined
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:25
syntactic sugar for functions that is
(causes semicolon cancer)
15:31 mncharity joined
mncharity Yipes. Only 12 hr left until spring. Hack hack... 15:35
15:37 [particle] joined
b_jonas I did the hacking yesterday 15:38
Took only a day to make my evalbot work with the new version of the j interpreters
despite the lots of effort they made to make it difficult
they removed the interface my bot used -- it would have been trivial for them nothing to maintain 15:39
and they don't provide documentation or good examples either
I was really angry
15:43 elmex joined 15:44 [particle1 joined 15:55 [particle2 joined
mncharity b_jonas: Implement J in p6, and fork? ;) 15:57
16:00 elmex joined
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:03
easier to freeze a bootstrap stage with multi. 16:05
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:06
16:16 justatheory joined 16:34 veritos joined
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
I just got out of a CS exam where literally 60% of my code consisted of null checks. 16:36
16:38 IllvilJa joined
b_jonas mncharity: I want to reimplement J (though not in P6), yep 16:44
but that would take much more time than this
16:46 LazyJim joined 17:09 eternaleye joined 17:12 barney joined
TimToady just realized I left something major out of EXPR 17:15
nounphrase successfully interleaves pre/post operators of mixed precedence 17:16
but a corresponding operation has to happen within EXPR to interleave pre/post with infix precedence
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
not something you see in standard perl (or C) because all the builtin postfixes are very tight 17:19
bbl & 17:20
correct approach is probably discard nounphrase entirely and fake up nullterms so all operators look like infix to EXPR 17:22
& # really 17:25
b_jonas wait, how is -$x**$y parsed? 17:27
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.
diff: dev.pugscode.org/changeset/20135
lambdabot Title: Changeset 20135 - Pugs - Trac
b_jonas I seem to remember there's some complicated logic for just that kind of expression 17:28
or something 17:29
in the ruby parser 17:30
ah, I think I know what it was
the normal precedence rules parse -x**y as -(x**y)
but negated number literals like -5 are parsed specially as a single literal 17:31
but there's an exception from the negative literal rule so that -5**y would parse as -(5**y)
yep, found it. the code for that are in the pure yacc part of parse.y, in rules for numeric and arg 17:33
17:45 meppl joined
TimToady don't really need nullterms, just operators that know their own arity (which they do already) 17:53
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.
diff: dev.pugscode.org/changeset/20136
lambdabot Title: Changeset 20136 - Pugs - Trac
TimToady EXPR only cares about operators really, the operands are just along for the ride
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.
re approach, there's always the redsix approach of breaking tokens down into lexemes... ;) 17:55
b_jonas TimToady: yep, if you don't consider -5 a single literal there's no problem
that's what C and all languages do
TimToady that's just constant folding
b_jonas only ruby doesn't really have constant folding, which is why I think it does this
it does have _some_ constant folding, but not much
I think it folds numeric ranges like 0..8 17:56
TimToady it's natural to view that as a Range object
(in an OO language)
b_jonas and of course compiles regex literals in compile-time which can count as compile time
it is a Range object, but .. is like any other operator
TimToady are you saing that in ruby 0..8 turns directly into 0,1,2,3,4,5,6,7,8?
b_jonas s/count as compile time/count as constant folding/
no 17:57
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 {|...|...}.
b_jonas x..y is calling the .. method on x with y
at runtime
which returns a range object
not an array
TimToady *nod*
b_jonas but that method is ran at compile time in 0..8
just like perl calls * at compile time in 1*8 17:58
I should look up now how much constant folding ruby does
it might do it with arithmetic too
probably it's just eluded me because it's hidden in some macro
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? 18:00
TimToady: the problem is, those methods can be overridden at runtime in ruby
wait, I'm stupid
I messed up
there's no .. method
.. is special syntax
just like the array syntax [a] or [a,b] or [a,b,c] etc isn't a method either 18:01
(though there are methods that do the same)
so that's why it gets constant folded
argh
mncharity someone needs to create a "save us from broken tools" prayer. if it hasn't already been done.
b_jonas I view ruby as a brilliant hack, but only as a hack
it shows how to create an interpreter that's usable in practice the most simply 18:02
but it doesn't really have any system in it
TimToady indeed, you really want to do constant folding at the last moment when you know you have the complete candidate lists 18:03
mncharity b_jonas: re 'what can it do', my fuzzy recollection is parameter defaults caused a grammar conflict.
b_jonas mncharity: so it can have defaults? 18:04
TimToady on the other hand, certain optimizations would really like to know they would be handed, say, a simple integer
mncharity b_jonas: yes
TimToady this is where proto declarations come it
b_jonas I see
TimToady *in
b_jonas irb(main):001:0> class Fixnum; def -@; 42; end; end; [-5, -(5)] 18:05
=> [-5, 42]
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
but it's better to find a cure
b_jonas yep 18:08
mncharity ah well. elf after lunch. &
18:15 Psyche^ joined 18:24 ting joined 18:47 jrockway joined 19:26 IllvilJa joined 19:28 lichtkind joined
mncharity amazing how much time answering email can take. 19:42
TimToady nods vigorously 19:49
19:54 gugod joined
lichtkind mncharity: true 19:56
19:57 b_jonas joined, rindolf joined
lichtkind i released today p6doc 0.36 19:58
now i have most parts together i planned for when i took over the module 19:59
mncharity /me stares and futzes about for ~1 minute. Wondering why p5 doesn't like A.new().foo(). Sigh.
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
20:03 Iskr joined 20:04 Iskr left 20:07 b_jonas joined 20:14 sh0cked joined 20:17 tobeya joined 20:21 TJCRI joined 20:29 jferrero joined 20:30 pmurias joined
pmurias mncharity: forking a directory isn't much more difficult than a file sv(n|k) copy 20:30
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:34
20:39 justatheory_ joined 20:55 rindolf joined, literal left 20:56 lisppaste3 joined
pugs_svnbot r20137 | putter++ | misc/winter_jig/elf_on_STD_red: Created. A largely empty project framework. 20:57
diff: dev.pugscode.org/changeset/20137
lambdabot Title: Changeset 20137 - Pugs - Trac
mncharity So what's the closest thing we have to a spec Match class? kp6's Match.pm in p6? 21:07
pmurias mncharity: likely 21:10
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:12
pmurias: thanks
pmurias mncharity: dunno 21:14
i thought you meant src/KindaPerl6/Runtime/Perl6/Match.pm
21:15 Chillance joined
mncharity yes, sorry, two separate questions. 21:16
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:17
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
re Moose, yes, I expect the elf_b emitter will use Moose and autobox.
s/will use/will emit/ 21:22
pmurias mncharity: autobox is great, but using moose won't get much
21:23 kyrbe joined
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:23
21:26 wknight8111 joined
pmurias what is elf_b exactly? 21:27
mncharity re autobox, awesome. not sure whether i've ever used it. advice welcome
re elf_b,
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:29
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:32
pmurias will you work on both a and b simultaneously?
mncharity yes
pmurias why?
mncharity elf_b needs elf_a to compile and test it. elf_a has elf_b as its main client and defining requirement. 21:34
wknight8111 what is elf_a?
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:35
21:35 peeps[work] joined
mncharity elf_a is a limited p6 compiler written in p5. 21:35
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
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
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:38
elf_a is the equivalent of last week's elf_on_rakudo's elf_zero, and elf_b of elf_one. 21:39
gbacon svn add elf_infinity # yay, a working perl 6! 21:41
who knew it would be so easy?
mncharity :) 21:43
I'd be happy with elf_c. a working elf_b even.
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:44
mncharity indeed. but there's also the concept that 21:48
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:50
you push off onto elf_b, you loose that safety net".
though actually, it would make sense to keep writing the elf_? with an elf_a dialect for a while, if not too painful. 21:51
ha, besides,
with metaprogramming, just about the only handwritten code will be main(), and the guts of the ast->ir and ir->p5 emitters. 21:52
:)
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:55
pmurias i propably shouldn't distract you from coding ;) 21:57
b_jonas elf what?
are those elves or elf format binaries/objects? 21:58
PerlJam b_jonas: You know ... like Legolas
b_jonas so real elves
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:00
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:03
PerlJam reindeer?
mncharity all endeavoring to build toys for Christmas.
the mutant one on the cover of the fake O'R book. 22:04
www.bleaklow.com/blog/2003/08/new_p...unced.html 22:06
lambdabot Title: Alan's Ramblings: New Perl 6 book announced, tinyurl.com/3db9hq
mncharity www.bleaklow.com/blog/images/p6_cover.html
lambdabot Title:
mncharity ah well, the "animal which is a composite of parts from assorted animals" has a name. don't remember what. 22:07
spinclad well, a different one was the chimaera 22:09
and some people figured a platypus was one 22:10
22:10 Zygo joined 22:24 n0mad_origin joined
pugs_svnbot r20138 | putter++ | [elf_a] Get Match tree from STD_red into elf_a. 22:28
diff: dev.pugscode.org/changeset/20138
lambdabot Title: Changeset 20138 - Pugs - Trac
22:46 penk left 22:47 FurnaceBoy joined
mncharity ah, that's it. chimera. thanks spinclad. :) 22:49
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
"mosaic chimera"? 22:54
22:55 justatheory joined
mncharity brain mush. dinner. more elf later, or tomorrow. we'll see how far it gets before hitting walls. 22:58
& 22:59
23:07 b_jonas joined 23:11 peepsalot joined 23:42 simcop2387 joined