pugscode.org/ | nopaste: sial.org/pbot/perl6 | ?eval [~] <m oo se> | We do Haskell, too | > reverse . show $ foldl1 (*) [1..4] | irclog: irc.pugscode.org/
Set by diakopter on 11 July 2007.
pugs_svn r19677 | lwall++ | [Test.pm] typo 00:11
xinming se noai 01:04
a.:se ai
oops, sorry, I'm testing my keyboard. >_< 01:05
avar does the ruby backend have no runtime files? 01:18
mncharity hi avar :) 02:38
re does the ruby backend have no runtime files?, just...
compiled/ruby-kp6-mp6/kp6_runtime.rb 02:39
avar it would be better to keep it in src/ :)
pugs_svn r19678 | putter++ | [kp6] ruby backend: update todo. 2 more tests pass. 02:41
mncharity indeed. I deferred the task of determining if make would automagically copy it, and if not, of fighting with make. also makes the edit test cycle one step shorter. :) feel free to move it. 02:43
v6-KindaPerl6/docs/ruby_backend.txt is actually pretty much up to date. 02:44
avar mm, does kp6-kp6 even run? 02:46
mncharity kp6-kp6? looking...
avar 'r|runtime=s' => \( $opt{runtime} = 'mp6' ), # or 'kp6' 02:47
re the ruby_backend.txt doc
avar I thought the biggest obstacle to kp6-kp6 was getting kp6-kp6 to bootstrap at all 02:47
mncharity avar: re biggest obstacle, I sure hope not. fglock said it was performance. no? 02:49
avar Yeah, but to be honest I think that's a bit whack:) 02:53
mncharity hmm... do you have a feel for what aspect of the bootstrap isn't quite working? 02:54
:)
avar I mean, -Ofun and all but it was never so bad that it was actually very hard to hack it since you can do small parts at a time, and it's much easier IMO to optimize once you have something slow and working than fast and nonfunctional 02:55
I haven't hacked in a while but part of the runtime is still in p5
so those parts are obviously not bootstrapped:)
mncharity lol
p5 runtime i'm not so worried about. rb gives a much higher floor to stand on, and then is arguably a better language to hack it in. I'm more worried about 02:57
kp6's p6 code being non- or incorrectly parsed/compiled, for subtle reasons that require kp6 debugging. 02:58
avar the p5 runtime is the most complete, and as long as parts of it are in pure-p5 as opposed to p6 that means we don't have bootstrap
mncharity my understanding is the kp6-mp6 applied to the kp6 p6 source, emits p5 code which is unusably glacial. no? 03:00
avar yeah 03:01
or so I've heard, I can't remember the last time I ran it, or if I ever did
mncharity so the hypothesis was that kp6-mp6 applied to the kp6 p6 source might conceivably emit ruby which was non-glacial. 03:02
pugs_svn r19679 | avar++ | use $^X not perl 03:03
mncharity ruby oo being both faster than p5 oo, and hypothetically being close enough to p6 that it can be used somewhat directly, rather than requiring a somewhat heavy additional layer on top of the native oo. 03:04
This exercise is only useful if (1) a replacement of mp6 by the ruby backend is not very difficult, (2) the result is faster than mp6, (3) there are folks pursuing kp6 development whom this would help. 03:07
avar $ perl script/kp6 -r kp6 t/kp6/01-tap.t 03:08
Bareword "DISPATCH" not allowed while "strict subs" in use at compiled/perl5-kp6-kp6/lib/KindaPerl6/Grammar/Regex.pm line 28.
yes but afaikt kp6-kp6 still doesn't work at all and needs some more work so you'll be running nothing very fast:)
mncharity which would be a very great waste of time. :) 03:10
hmm...
s/waste/misallocation/
ok, a key question is, 03:11
how much of any current obstacles to kp6 compiling itself are behind the ast? ie, Emit/Perl5 and the perl5 runtime. 03:12
the ruby backend replaces all that, so it's not an issue. 03:13
if kp6 can create a valid ast for the kp6 p6 code, then the ruby backend is all set.
any idea whether kp6 can create a valid ast for the kp6 p6 code? 03:14
mncharity notes we are still dancing the story of "Once a p6 implementation with oo exists, it will be straightforward to write a p6 implementation in p6. Until then... a world of pain." 03:16
avar: any idea whether kp6 can create a valid ast for the kp6 p6 code? 03:19
avar yes, since kp6-mp6 parser kp6 03:20
mncharity "kp6-mp6 parser kp6"?
avar parses 03:21
But anyway, I'm not saying you can't rewrite everything in ruby, just that things would be easier for all the backends if more stuff was in p6 so we wouldn't have to churn out all the same code for each backend 03:23
Like all the Pad handling et al
mncharity hmm... so why don't I buy that vision... let's see... 03:29
Perhaps the key concept is the following. Given a usable p6 (correct-or-debuggable, generates usably fast code, oo, macros), and a language spec, one can write, a complete fast p6 implementation, from scratch (ie, using nothing from the "usable p6", but certainly snarfing lots of stuff from elsewhere), in a person week or few. 03:39
If you buy that, what makes other backends easy to write now, on non-"usable p6", completely doesn't matter.
s/what/then what/
Basically, if pugs had gotten oo that first summer, I believe we would have had a real p6 by end of year, and official xmas the next. 03:41
But pugs ended up not becoming that "usable p6", so we are still in bootstrap hell. 03:42
avar: I'd be very interested what you thought of: Given a usable p6 (correct-or-debuggable, generates usably fast code, oo, macros), and a language spec, one can write, a complete fast p6 implementation, from scratch (ie, using nothing from the "usable p6", but certainly snarfing lots of stuff from elsewhere), in a person week or few. 03:43
mncharity it seems to suggest a model where one should sacrifice anything to get to a "usable p6"+ language spec. you'll want to throw all the code away once it can be written in real p6 anyway. so it's all a throwaway bootstrap. 03:45
thoughts?
anyone? :)
mncharity just to illustrate that that wasn't intended as a strawman... or insane, i note: If you can compile p6 down to CL or scheme you've won, as they have nice compilers. They, and everyone, have perl-compatible-regular-expression engines. Which mostly don't permit subrules (including apparently perl 5.10). Wrapping a PCRE to get subrules, and thense p6 rx, takes an amount of code proportional to the language's ability to define and grov 04:05
macros or other metaprogramming, and multimethods, help. in a nice language, it's a high-order 100 lines of code. A prolog one is nicely compact. A ruby or p6 one too. A p5 one, those hurt. given a p5 pcre + subrules, it's trivial to do p6 re. The hardest front-end issues have always been getting a p6re engine (or atleast p5re+subrules) for platform X, and having a p6 grammar. Now STD hypotetically takes care of having a gramma 04:11
p6 requires very little compiler wizziness. Except for multimethod dispatch, types can be largely ignored, and the language treated as dynamically typed. That said, there are a lot of details, and those remain largely undocumented. Eg, given a few lines of pseudo code saying "here's how to bootstrap a p6 oo system", one can easily implemented. Now one has to contemplate peering hopefully into Moose. 04:14
mncharity anyway. end of hand-waving. 04:15
More concretely, the hard parts of redsix were () wrapping its pcre (because it's anon subs were slow and didn't compile away, motivating tossing a simple approach for a hairy one), () deriving a p6 grammar from the guts of pugs (because STD didn't exist), () writing the sandwich parser (because it was ill defined at the time, making it a research project), and () signatures and captures (either because the weren't spec'ed or I didn't 04:22
oo came fairly cheaply (redsix was ruby).
Also more concretely, the hard parts of the first perl5 backend were
Tene mncharity: cut off after "or I didn't..." 04:23
Tene also a few other messages got cut off 04:23
mncharity :(
or I didn't understand them). 04:24
define and grovel over ast's.
ingy hi mncharity
mncharity any others?
hi ingy :)
ingy :)
Tene "language's ability to define and grov..." "takes care of having a gramma..." 04:25
mncharity the hard parts of the first perl5 backend were () unpacking the serialized pugs ast, () getting a full ast (no oo - the killer). fglock spent a lot of effort getting laziness working on p5. and () getting oo spec'ed, and () getting p6 oo implemented (with I believe fighting p5 bugs and performance being the defining characteristics). 04:28
language's ability to define and grovel over ast's. 04:29
takes care of having a grammar.
mncharity so to wrap up, note how every one of those obstacles goes away with "a usable p6 (correct-or-debuggable, generates usably fast code, oo, macros), and a language spec". 04:30
pugs + oo + sufficient lambda folk to provide "debuggable", could have been a "usable p6". 04:33
mncharity all of which could be taken as a way of saying "p6 is neat!". :) ruby 2 and python 3000 aren't the right analogies. maybe rubinius and pypy. the p6 implementation exercise is very sensitive to "getting the representation right". repeated instances of 'to do task Y, if the language being used has feature Z, then it's a no-brainer. but if it doesn't... shudder... piles of code and pain'. 04:45
don't have multimethods? - enjoy visitors. can't compile away abstractions? - pretend you are a compiler. 04:46
anyway. 04:47
don't have macros? - enjoy cut and paste. 04:48
mncharity oh, for the redsix difficulty list, also () using an evolving and buggy development version of ruby 1.9 (because ruby 1.8 doesn't have normal lexical scoping, the faking of which would have been even more pain (see "if the language being used has feature Z"...:)). 04:57
pugs_svn r19680 | putter++ | [kp6] ruby backend: instance variables fleshed out. run_tests thru t/kp6/28 pass. 06:03
pmurias avar: you have to have some parts of the runtime in the target language 11:29
mncharity It looks like script/kp6 -Cast fails for the following files: src/KindaPerl6/Grammar.pm src/KindaPerl6/Grammar/Quote.pm src/KindaPerl6/Grammar/Regex.pm src/KindaPerl6/Grammar/Term.pm src/KindaPerl6/Grammar/Token.pm . 12:30
pmurias mncharity: looking 12:34
pmurias they work, it's just perltidy which dosn't like the output 12:39
pugs_svn r19681 | putter++ | [kp6] created compiled/ast-kp6-mp6/, to make it easier to analyze the ast's needed for bootstrap. Created by hand - it would be nice to have a make target for it. 12:43
r19682 | putter++ | [kp6] created empty compiled/ruby-kp6-mp6/lib directory tree. 12:45
r19683 | ruoso++ | [smop] All tests compile... some tests even pass, but most of them segfault for now... 12:49
ruoso Failed 4/7 test scripts, 42.86% okay. 0/13 subtests failed, 100.00% okay. 12:53
cool
:P
and it really seems that the segfaults are related to the fact that sm0p.pl is still not implemented... 12:54
./test/01_smop_lowlevel.t segfaults only when it was supposed to destroy the variable, which is when sm0p code should be executed...
test/01 is ok in 4 of 6... and test/04 is ok in 7 of 9 :P 12:55
pugs_svn r19684 | ruoso++ | [smop] one less segfault... :) 12:58
ruoso SMOP_LOWLEVEL_MEM_TRACE is effectively able to show memory leaks :) :) :) :) 13:00
lunch & 13:03
www.perlfoundation.org/perl6/index....op_hacking has a quick tour on comiling and running the tests... 13:07
lambdabot Title: SMOP Hacking / Perl 6
pugs_svn r19685 | putter++ | [kp6] ruby-kp6-mp6/kp6_runtime.rb: less ghastly (but still ugly) approach to instance variable initialization. 13:33
pugs_svn r19686 | putter++ | [kp6] tweak 19685. 13:35
mncharity pmurias: ah, great. thanks. 13:36
mncharity If anyone would like to set up the infrastructure so one can make mumble, or script/mumble, or whatever is appropriate, to create the compiled/ruby-kp6-mp6/lib/*.rb files, that would be great. And whatever thing one then runs to hand it 'say 3' and watch it explode in ruby errors. And document it in docs/ruby_backend.txt. :) 13:41
that would be most helpful. thanks.
pmurias: re... there was something I wanted to mention or ask you... blank brain. maybe later. 13:44
be back this evening, or over the weekend. cheers. &
rindolf Hi ispy_ 13:46
ispy_ yo 13:56
agentzh howdy! 14:40
cspencer if i define a block like so: my $x = { say "Arg was: " ~ $_ }; 14:40
will "$_" be bound to arguments to the block? 14:41
ie) if i call it as: $x(2)
does $_ get set to 2?
agentzh cspencer: i doubt it. 14:43
cspencer hmmm ok
agentzh ?my $x = { say "Arg was: " ~ $_ }; $x(2); 14:44
lambdabot Maybe you meant: . ? @ bf ft id map msg pl rc v wn
agentzh oh...
forgot the syntax...
cspencer: $func = { .print if $^a eq $^b } 14:45
$^a and $^b are two arguments
*parameters
cspencer: and $func = -> $a, $b { .print if $a eq $b };
cspencer oh, ok. that looks right now. :)
agentzh ie. the pointy block syntax
cspencer: see S04 for more info ;)
cspencer how would that differ from: 14:46
my @result = grep { ($_ % 2) }, @list;
is the block being passed into grep parsed differently?
agentzh cspencer: "A bare closure without placeholder arguments that uses $_ (either explicitly or implicitly) is treated as though $_ were a formal parameter:" 14:47
cspencer: okay, it seems i was wrong ;)
sorry about that ;)
cspencer was that in S04 too?
agentzh yup
cspencer that's alright :)
which section was that in? 14:48
agentzh cspencer: perlcabal.org/syn/S04.html#The_Rela...clarations
lambdabot Title: S04, tinyurl.com/y5beho
cspencer great, thank you!!
agentzh you're welcome ;)
pmurias perl6: ?my $x = { say "Arg was: " ~ $_ }; $x(2); 15:05
exp_evalbot kp6: OUTPUT[syntax error at position 0, line 1 column 0:␤?my $x = { say "Arg was: " ~ $_ }; $x(2)␤^ HERE␤]
..pugs: OUTPUT[Arg was: 2␤]
..p6: No output (you need to produce output to STDOUT)
mofino Are we there yet? 15:51
mofino goes back to watching Dora 15:52
moritz_ mofino: where? 15:53
mofino The road to perl6
moritz_ yes, we're there (on the road) 15:54
mofino but are we there yet?
(no)
heh
you ruined my joke, you know
but it's ok, it was bad to begin with
moritz_ it's a question we read too often here 15:56
mofino haha
I bet
mofino perhaps the answer is to make perl6 less exciting 15:57
that way people won't anticipate it so much
moritz_ but that's not -Ofun 15:58
mofino i think it's impossible, perl6's awesome comes from the core 15:59
moritz_ we work on Perl 6 because it is exicting, and we want it to be exciting
mofino hehe i know
I just can
I just can't wait
going to be fantastic
ruoso mofino, do you program C? 16:47
(even if with very little experience) 16:48
mofino yeah I do
well, I can
with much rust, of course 16:49
ruoso mofino, want to help in smop? 17:05
www.perlfoundation.org/perl6/index.cgi?smop
lambdabot Title: SMOP / Perl 6
mofino hmm
looks complex! 17:07
ruoso it's as simple as I could get it :)
mofino then we have a bit of problem...
;)
pugs_svn r19687 | ruoso++ | [smop] adding a proper format to the "leaking variable" message in smop_lowlevel. 17:09
mofino I'll check this out though 17:12
pugs_svn r19688 | ruoso++ | [smop] give a compilation warning in sm0p, while it still does not generate C code... 17:20
moritz_ @tell fglock I finally fixed the "Can't locate Text/Table.pm in @INC" bug in the irclogs, thanks for reporting 17:21
lambdabot Consider it noted.
pugs_svn r19689 | moritz++ | [irclog] fix search link on channel index page 17:25
pugs_svn r19690 | moritz++ | [irclog] previous commit broke everything else, fixed that 17:26
r19691 | moritz++ | [irclog] another template knit 17:27
moritz_ three commits needed for one small fix - d'oh 17:28
CookieDingler hello 17:29
moritz_ hi CookieDingler 17:30
CookieDingler hi Moritz
pugs_svn r19692 | ruoso++ | [smop] sm0p.pl now has a placeholder method with the code to be translated as argument. 17:31
CookieDingler it's the first time i come on this chan, so first i'd like to say thanks to everybody for the work made on perl6 17:32
moritz_ whoa, somebody who's first question is _not_ "when will it be ready?" ;-)
CookieDingler++
CookieDingler heh, well i've read the various FAQs and i consider it will be ready when it will be ready 17:33
moritz_ aye
CookieDingler i'm quite impatient though
but i LOVE perl, so let it takes whatever time it takes 17:34
moritz_ you can help if you want
ruoso CookieDingler, we can always use some help
:)
CookieDingler i'm no good with programming i mainly use perl or assembly language (various CPU), it's not the time for optimisations 17:35
moritz_ TimToady: could you please update /topic to new evalbot syntax (s/\?eval/pugs: /)? you're the only channel op atm ;) 17:36
Tene ?eval [~] <m oo se> 17:40
HAY IT DOESNT WORK
Hm. Do we still "do Haskell, too"? 17:41
moritz_ pugs: [~] <m oo se> 17:42
exp_evalbot RESULT["moose"]
moritz_ Tene: depends on your notion of "we"
rakudo: say "hi"
exp_evalbot OUTPUT[hi␤]
CookieDingler ruoso, i just tried parrot 0.5.2 today, and it's a really an interesting platform. i've looked at the compiled sources a little. i think i can remove a BUNCH ("un troupeau", a lot of, in french) of branches for the cpu. Sadly i don't think it's the time to implement that kind of stuff. Perhaps later, and i'll be around ;-) i know quite well the x86 32/64 architecture and the main OSes (win/lin) and i'd be happy to help on corn 17:45
er cases.
Tene moritz_: enough "we"s for it to stay in the channel topic? I haven't seen haskell mentioned in quite a while.
ruoso CookieDingler, considering your processor lowlevel background... could you please take a look at smop architecture to spot future rooms for optimizations? 17:48
moritz_ Tene: not enough, probably :/
PerlJam starts a campaign for gratutious mention of haskell on #perl6
Botje [+] (1..5) 17:58
argh
pugs: [+] (1..5)
exp_evalbot RESULT[15]
Botje pugs: (5,10,42) >>+ 1 17:59
exp_evalbot OUTPUT[*** ␤ Unexpected ">>+"␤ expecting operator␤ at /tmp/s0rqrQeFP3 line 1, column 11␤]
Botje pugs: (5,10,42) >>+<< 1
exp_evalbot RESULT[(6, 11, 43)]
CookieDingler ruoso, SMOP? 18:00
ruoso, optimizations are relative to one processor 18:02
ruoso, are you talking about "Small Matter of Programming" (SMOP) from wikipedia? 18:03
ruoso CookieDingler, www.perlfoundation.org/perl6/index.cgi?smop 18:09
lambdabot Title: SMOP / Perl 6
ruoso CookieDingler, I mean "room for optimization" in general... not specific optimizations... 18:10
TimToady pugscode.org | nopaste: sial.org/pbot/perl6 | pugs: [ 18:28
TimToady oops, finger slipped 18:28
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/ 18:29
TimToady I think /topic should have a way of just replacing one bit of it... 18:30
a bot with oper privs could handle s/foo/bar/ maybe, if it's not insecure... 18:31
ruoso TimToady, #p5p and #moose have an op bot that "trusts" certain people... 18:33
it's quite smart...
TimToady and if a p6 bot, could say s:2nd/\|.*?\|/xxx/
ruoso www.perlfoundation.org/perl6/index....p_language updated... now it explains some rules on the preprocessing... 18:34
lambdabot Title: SMOP sm0p Language / Perl 6
TimToady 'course, could define my own irssi script to do that maybe... 18:36
in my Copious Free Time (where Copious is taken as an absolute value :/ )
CookieDingler ruoso, if i understand well, SMOP is just a quick way to talk about pointers? for what i know about compilers, you've got 3 phases: parsing, type casting, and translation to another language on reguard to the cpu architecture and the OS (let it be asm for a particular cpu). 18:40
ruoso CookieDingler, in a sense SMOP is just an architecture for anything... 18:41
which basically means that the type casting is not needed...
CookieDingler i'm curious to see how a vm like perl could relate to a cpu?
ruoso well... you can watch it with perl5 18:42
CookieDingler well, you've got probably more knowledge than me about vm, and of course if the programmer is good type casting isn't necessary... yet someone have to show me that aptitude.... 18:43
after all type casting is the same as "use warnings"... (or i'm missing something?) 18:44
ruoso not really... 18:45
type casting means to know the layout of a value 18:46
and smop is all about delaying that knowledge by using the "Responder Interface" concept...
CookieDingler TimToady: i'm really happy to see you are online. I'd like to say a "BIG" thanks for perl, i hope you are well, and i hope you'll help us to get perl6 be the next-gen language 18:47
ruoso Perl 6 already is the next-gen language... at least until it's released... then it'll be this-gen's language :P
CookieDingler ruoso, i'd like to help perl6 18:48
i'm not quite sure it's the next gen language, but it's one i like 18:49
i learned assembly programming 20 years ago
and perl is the only thing/jewel that let me do that quickly 18:50
ruoso CookieDingler, well... you you program haskel, you can help pugs... if you program Perl 5 you can help kp6, if you program ruby you can help kp6-ruby, if you program lisp you can help kp6-lisp, if you program C you can help smop and parrot (did I forgot to mention anything?) :) 18:50
s/you you/if you/ 18:51
ludan hi
ruoso ludan, hi
mofino CookieDingler, p6 seems to be pretty "next gen" 18:57
ruoso home & 19:01
pugs_svn r19693 | lwall++ | s/eval/skip/ because rakudo doesn't do eval yet 22:07
pugs_svn r19694 | lwall++ | radix conversions of numbers should use decimal string representation 22:37
pugs_svn r19695 | lwall++ | remove unnecessary rakudo tries 22:44
r19696 | lwall++ | [fudge] use block syntax of try rather than function call syntax 22:57