Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2008-01-11

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:23 pugs_svn r19423 | cosimo++ | Testing commit bit
00:23 justatheory joined #perl6
00:45 pugs_svn r19424 | lwall++ | Defined .bytes, .codes, .graphs, and .chars
00:45 pugs_svn r19424 | lwall++ | Defined samecase and samebase
00:46 rdice joined #perl6
00:55 pugs_svn r19425 | cosimo++ | Refactored substr.t tests into S29-functions\str\substr.t
01:00 polettix joined #perl6
01:00 arxc_ joined #perl6
01:03 cnhackTNT joined #perl6
01:05 pugs_svn r19426 | lwall++ | Add svn props to substr.t
01:06 pugs_svn r19427 | lwall++ | [STD] added ugly p5=> operator
01:07 arxc__ joined #perl6
01:09 lyokato_ joined #perl6
01:20 lunatic joined #perl6
01:24 pugs_svn r19428 | rhr++ | [Unicode.pm] implement samebase
01:28 arxc joined #perl6
01:35 Southen_ joined #perl6
01:41 TimToady 'course, samebase is rather misnamed, should really be sameaccent...
01:44 rhr transfer_grapheme_extenders hey nobody will ever use it anyway :)
02:18 Psyche^ joined #perl6
02:21 Limbic_Region joined #perl6
02:37 LimbicRegion joined #perl6
02:42 [1]Limbic_Region joined #perl6
03:09 alester joined #perl6
03:11 penk joined #perl6
03:16 pen1 joined #perl6
03:17 pen1 joined #perl6
03:28 py77 left #perl6
03:52 Schwern joined #perl6
04:12 Schwern joined #perl6
04:31 alc joined #perl6
04:41 _mjk_ joined #perl6
06:38 araujo hello
06:38 araujo what the '|' does inside a subroutine call subcall(|arg) ?
06:47 TimToady it binds the entire Capture to the variable
06:59 araujo thanks TimToady
07:11 araujo TimToady, so, it's a way to say ... pack all these variable into this one variable?
07:11 araujo er, values
07:14 devogon joined #perl6
07:15 TimToady it's a way to defer deciding which of the arguments bind to scalar parameters and which to list parameters
07:16 araujo I see
07:16 TimToady for instance, if you want to pass the exact same arguments off to some other function, but you don't know what the exact signature of the other function is.
07:17 TimToady it's kinda like call-by-name but on the whole argument list rather than the individual arguments
07:17 araujo ah, get it
07:18 araujo I was checking some functional-like code, so now it makes sense
07:50 cognominal_ joined #perl6
07:55 riffraff joined #perl6
08:11 asprillia joined #perl6
08:28 iblechbot joined #perl6
09:15 frodo72 joined #perl6
09:29 mattz joined #perl6
09:40 Alias_ joined #perl6
09:58 njbartlett_ joined #perl6
10:02 ebassi joined #perl6
10:15 chris2 joined #perl6
10:19 jisom joined #perl6
10:40 masak joined #perl6
10:40 chacha_chaudhry joined #perl6
10:49 Alias_ joined #perl6
10:53 pugs_svn r19429 | ruoso++ | [smop] Updating the roadmap. The Stage 1 Language for SMOP will be called S1P, readed as "swamp".
10:55 moritz_ ruoso: is the plan to emit C code from kp6 that uses smop as a runtime lib?
10:57 ruoso moritz_, S1P is that...
10:58 moritz_ ruoso: ok
10:58 ruoso but I expect it to be used as a interpreter in the full Perl6-on-SMOP
10:59 ruoso actually, s1p will be used to write the built-in types
10:59 ruoso because the built-in types will have to be stack friendly already
11:00 ruoso after that, the best will be to make KP6 to generate a SMOP-Compatible C AST Dump of the parse
11:00 ruoso moritz_, if you take a look at the roadmap you'll see what I mean
11:00 moritz_ ruoso: ok
11:15 qmole_ joined #perl6
11:40 ruoso I've been wondering, SMOP will require each "code block" to build the stack nodes when calling it... how much will it cost in performance terms?
11:41 ruoso is there something that can be simplified or changed to create more room for optimizations?
11:41 asprillia left #perl6
11:47 ofer joined #perl6
11:54 njbartlett_ joined #perl6
12:11 nothingmuch joined #perl6
12:32 ruoso are lvalue subroutines return values always evaluated as Scalar?
12:32 ruoso S06 seems to imply that
12:33 ruoso by saying that a tied return would have to implement STORE and FETCH
12:33 ruoso and actually... thinking better... it's the only thing that makes sense...
13:00 pugs_svn r19430 | ruoso++ | [smop] As every operator in Perl 6 is a multi sub, lets put multi earlier on the ROADMAP...
13:07 Aankhen`` joined #perl6
13:09 dmast joined #perl6
13:10 pugs_svn r19431 | ruoso++ | [smop] Detailing a little more the ROADMAP, effectivelly, multi sub is a very important feature for the bootrap
13:11 ruoso lunch &
13:23 cmarcelo joined #perl6
13:45 root____1 joined #perl6
13:46 meppuru joined #perl6
13:54 ispy_ joined #perl6
14:01 ixolit joined #perl6
14:01 dmaster joined #perl6
14:03 root____1 so quiet...
14:05 ixolit left #perl6
14:07 pbuetow root____1: yes
14:28 polettix joined #perl6
14:37 silug joined #perl6
14:38 xyxu joined #perl6
14:39 xyxu left #perl6
14:40 jhorwitz joined #perl6
14:44 rindolf joined #perl6
14:47 xinming joined #perl6
14:54 cognominal_ joined #perl6
14:55 njbartlett_ joined #perl6
14:59 jferrero joined #perl6
15:07 alester joined #perl6
15:20 devogon joined #perl6
15:20 meppuru joined #perl6
15:34 marmic joined #perl6
15:51 cognominal__ joined #perl6
15:53 pugs_svn r19432 | ruoso++ | [smop] smop_lowlevel.h is an optional API (not included by smop.h) for ResponderInterface implementations that wish to use the same lowlevel management (libc malloc, refcount gc and pthread_rwlock) as the default smop objects. smop_lowlevel will use Continuation-Passing-Style for
15:53 pugs_svn ..the DESTROY phase of the objects.
15:57 * ruoso keeps getting happier and happier on how things are fitting together in SMOP
15:58 ruoso CPS for DESTROYALL made me smile :)
15:59 IllvilJa joined #perl6
16:01 [particle] me too :)
16:02 * ruoso feels that he may be able to learn lisp now ;)
16:02 [particle] sure, while porting it to your new shiny vm :)
16:02 ruoso heh
16:09 meppuru joined #perl6
16:21 cognominal_ joined #perl6
16:26 cognominal__ joined #perl6
16:32 pmurias joined #perl6
16:33 devogon joined #perl6
16:41 lisppaste3 joined #perl6
16:41 Psyche^ joined #perl6
16:45 meppuru joined #perl6
16:49 pugs_svn r19433 | ruoso++ | [smop] moving src to old_src, in order to have a fresh start...
16:50 Ashizawa joined #perl6
16:58 ahmadz joined #perl6
16:58 ahmadz left #perl6
16:58 mncharity joined #perl6
17:06 barney joined #perl6
17:07 dmaster left #perl6
17:07 mncharity I'm going to attempt to quickly create a ruby-based backend for kp6, in the hope of its giving us a bootstrapped kp6 which is usably fast.  Basically by using ruby oo directly, rather than the p5 backend's much heavier approach.  Your questions, comments, and assistance would be most welcome.
17:07 pugs_svn r19434 | ruoso++ | [smop] Starting to port YAP6__CORE__Value* to SMOP__Object*, lowlevel management ported... tests missing...
17:07 lambdabot mncharity: You have 2 new messages. '/msg lambdabot @messages' to read them.
17:08 ruoso mncharity, I wouldn't expect to be able to implement Perl 6 semantics on ruby oo
17:11 avar He can probably use ruby dispatch, no?
17:11 TJCRI joined #perl6
17:11 mncharity ruoso: is there some specific aspect you expect to be problematic?  it's my hope that it might be 'good enough' for the bootstrapped kp6, and then for supporting the next kp6 task of working on the grammar.  no?
17:11 avar mncharity: Just implement add_method and the rest of the MOP early:)
17:12 mncharity lol
17:12 ruoso avar, yeah... and end up with another runtime on top of ruby's runtime
17:12 ruoso just like kp6 does
17:12 ruoso does ruby support prototype objects? or anon-classes?
17:13 rdice joined #perl6
17:13 ruoso doing it without anon-classes will be very hard
17:13 TimToady you get an anon-class in Ruby every time you do a mixin
17:14 TimToady though I don't know if there's a way to declare one from scratch
17:14 pmurias multi-inheritance?
17:15 avar yes
17:15 pmurias mncharity: why do you prefare ruby to perl5?
17:15 mncharity an anon-class is automagically created when you do something which requires it.  like  some_object.instance_eval("def new_method()...end")
17:16 pmurias * prefere
17:16 pmurias argh, prefer
17:16 mncharity no multiple inheritance unfortunately, but there is enough introspection to fake it dynamically at runtime (eg, when a method gets added, scurry around adding it to derived classes as needed)
17:16 * ruoso today really believes that any attempt to implement the Perl6 object system in some non-p6-oriented already existing object system will end up with too much emulation and probably being as slow as kp6
17:17 mncharity an alternate approach is there's a hack to be able to mixin classes rather than modules, but it's a reach-down-into-the-C and noone-really-uses-it-in-production kludge.
17:18 pmurias ruoso: if you do caching you pay the price only when you add a method
17:18 mncharity ruoso: so re, does ruby support prototype objects? or anon-classes? yes
17:20 ruoso I mean... I'm really not stopping you from doing it, but what I'm saying is that from what I've seen so far, you'll end up building a very complex emulation at some point that will give you very poor performance...
17:20 ruoso like, do ruby support continuations and coroutines?
17:20 mncharity re MOP and runtime, I was thinking of doing one level of indirection to handle namespaces - eg, method c_foo() returns the &foo Code object.  Similarly for methods, etc.  ruby oo is faster than p5 oo, so it's not much of a hit.
17:21 ruoso multi dispatch?
17:21 ruoso lazy evaluation of context?
17:21 pmurias ruoso: ruby does continuations
17:21 pmurias (even GNU C does them ;)
17:22 mncharity one might be able to take the MOP approach, and that's something to explore, but the other I know works and gives acceptable performance (from redsix), and I'm afraid I don't really understand the mop yet, so... something for version 2. :)
17:24 mncharity re why ruby instead of p5, ruby oo is faster than p5 oo, and I hope close enough to p6 oo to allow it to be used more or less directly, rather than p5's using it to implement an additional layer.
17:24 ruoso mncharity, as en exercise, take some codes from the kp6 tests
17:24 ruoso and try to figure out which ruby code would execute it
17:25 ruoso but without cheating differently for each test
17:25 ruoso if you cheat, the cheat must be there for every case
17:26 mncharity re multi dispatch, no, there are libraries, but not quite the right thing, but they are small, because the dynamic flavor of ruby makes it easy to implement.  my feeling is the risk there is low.  i'm not sure kp6 even needs multi to bootstrap?  nor for grammar.  but it would be nice to have for the prelude.
17:26 [particle] sounds like test-driven development to me
17:26 ruoso [particle], I mean, exercising the code before trying to write a full kp6 backend
17:27 mncharity not sure if kp6 bootstrap uses multiple inheritance either.
17:27 ruoso s/the code/the ruby code/
17:27 ruoso mncharity, does ruby have roles? if not, you must do it with MI...
17:28 mncharity re lazy, they're libraries.  not sure how critical for kp6 bootstrap.  ruby continuations, while my fuzzy impression is they are not up to smalltalk/scheme standards, are real continuations, not exceptions, like C's.
17:29 mncharity (it would be very very nifty if gnu c did continuations... and there are (or have been) spagetti stack hacks using it... but nothing very widely used... no?)
17:30 mncharity ruoso: redsix used the approach described, and was passing... some not large but non-trivial percent of the pugs t/ tests.
17:30 cognominal_ joined #perl6
17:31 ruoso well, I'm just playing devil's advocate here
17:32 mncharity so the project risks don't seem all that great, given the limited objectives of fast bootstrapped kp6, and supporting just the next step using it (grammars).
17:32 mncharity ruoso: very much appreciated :)
17:33 skids joined #perl6
17:34 mncharity re risks...  redsix didn't do signature/capture.  so getting enough of them for kp6, both in development pain and performance impact, seems a biggy.
17:34 ruoso mncharity, one thing that might help would be to bootstrap mp6 in ruby before...
17:34 ruoso as a great part of kp6 is compiled by mp6
17:35 pmurias ruoso: i don't think that would help
17:35 ruoso I think if you're planning to bootstrap kp6 it will...
17:35 mncharity ruoso: ooo, please go on.   my understanding of mp6 is minimal.  what would doing that buy?
17:35 pmurias s/would help/be a good idea/
17:36 ruoso the kp6 grammar is compiled by mp6, at least a big part of it...
17:36 avar 1/w 25
17:37 ruoso mncharity, and also, mp6 doesn't implement a runtime on top of p5 as kp6 does... which is closer to what you want
17:37 pmurias ruoso: kp6 can also compile it
17:37 ruoso pmurias, yeah... but it is still compatible with mp6...
17:38 ruoso and if mncharity is planning to use the ruby runtime as is, mp6 is closer
17:38 ruoso while kp6 enforces the "kp6" runtime
17:39 pmurias but he will need to port it over to kp6 for the compiler to bootstraped
17:39 pmurias * bootstrap
17:40 mncharity i'm not sure the closeness is an issue.  kp6 provides an ast, and the backend-specific emitter can do what it pleases.  though it may have to add an ast munging pass if it needs any non-local information which can't be gathered as part of the emit.
17:41 pmurias mp6 is less pleasant to work on
17:41 mncharity re 'kp6 can also compile it', hmm, there's a point.  so we know mp6 can compile the grammar, because it gets used all the time for that, yes?  are we sure kp6 can compile its grammar?
17:42 pmurias the bootstraped version sort of parsed stuff
17:43 mncharity "sort of"?
17:43 pmurias mncharity: there was one bug
17:43 pmurias in the bootstraped parser
17:43 ruoso pmurias, it doesn't seem to be compiling right now
17:43 ruoso or the makefile is broken
17:45 pmurias mncharity: do you know how to translate := into ruby
17:45 pmurias ?
17:45 mncharity are mp6's requirements from a backend a subset of kp6's?  wrt supported p6 language features
17:46 pmurias mncharity: yes
17:47 ruoso pmurias, kp6-kp6 seems to be completely broken right now
17:47 ruoso it doesn't even starts compiling anything
17:47 pmurias mncharity: but a mp6 ruby backend won't give us anything
17:49 pmurias ruoso: perl Makefile.PL --target=KP6-BOOT?
17:49 ruoso ah... ok... I was trying KP6-KP6
17:49 ruoso as the Makefile.PL says
17:51 mncharity re :=, maybe = (s_x = whatever  vs s_x.assign(whatever)), maybe s_x.bind(whatever).  not sure.  don't remember if redsix's Cell (box? - Container-like-thing) did :=.
17:54 mncharity ok, redsix did = for := and ::=, s_x.assign(whatever) (actually (s_x)._(whatever)) for =
17:55 ruoso pmurias, perl script/kp6 -Cperl5rx --noperltidy -o compiled/perl5-kp6-kp6/lib/KindaPerl6/Ast.pm src/KindaPerl6/Ast.pm
17:55 ruoso this is failing
17:56 mncharity well, xS rather than s_x.  new cleaner encoding for the backend, as being pretty for hand writing the code doesn't matter anymore.
17:56 pmurias mncharity: i use $lvalue = $rvalue for assignment in perl5v6 and bind_op("$lvalue",\$rvalue) (from Data::Bind) for :=
17:56 mncharity right, so that's identical.
17:57 mncharity re failing, :(
17:59 mncharity ok, so that's a risk I didn't take seriously enough.  that bootstrapped kp6 might not be working at the moment.
18:00 pmurias mncharity: i don't think it's broken by anything serious
18:00 pmurias just minor bitrot
18:01 pmurias ruoso: it worked here
18:02 pugs_svn r19435 | pmurias++ | [perl5rx] fixed DISPATCH.new into ::DISPATCH
18:02 pmurias no,it's still compiling here :(
18:02 mncharity :) ^H :(
18:02 ruoso mm... in fact it worked now
18:02 mncharity ^H :)
18:03 ruoso I think I had something borked in my working dir
18:04 ruoso but if you try to recompile it it faile
18:05 ruoso anyway... I'm away from kp6 for too much time to understand it :)
18:06 mncharity re 'but if you try to recompile it it faile', so the 'perl script/kp6 -Cperl5rx --noperltidy -o compiled/perl5-kp6-kp6/lib/KindaPerl6/Ast.pm src/KindaPerl6/Ast.pm' runs, but the resulting compiled Ast.pm breaks kp6?
18:06 ruoso no.... I've tried cleaning the kp6-kp6 files and calling make again
18:06 ruoso it failed somewhere else
18:06 ruoso but it seems like a Makefile issue
18:07 pmurias ruoso: doing make forcerecompile;make
18:08 pmurias mncharity: i think someone fill will have fixed when you have the backend complete enough
18:09 ruoso pmurias, I think the makefile depends on files that are in the compiled dir
18:09 ruoso i mean
18:09 ruoso I understand that kp6-kp6 depends on the kp6-mp6 files for the bootstrap
18:09 ruoso but if I remove the compiled/ ... kp6-kp6... it should rebuild correctly
18:10 mncharity hmm, ok.  so kp6-on-mp6 can compile kp6, and the result is known to run small bits of code.  has the result done more?  compiled any of the kp6 files?  passed the kp6 test suite?
18:10 mncharity re 'someone will have fixed', right.  good point.
18:10 ruoso hmmm make test with target kp6-boot is a noop
18:11 pmurias ruoso: the bug wrong parsing of my broke almost every test
18:26 mncharity oky.  well, doing much of a ruby backend seems like it would only take a day or two.  if not, something unexpected is going on, the finding of which could be worthwhile in itself.  so I'm still inclined to make it this weekend's project.  and if it turns out kp6 has bootstrap issues, finding them could be useful too.  and no doubt any will get resolved.  no?
18:27 mncharity s/no?/sound plausible?/
18:27 pmurias yes
18:27 ruoso mncharity, one thing I know for sure, bootrapping exercises always fixes a lot of bugs ;) so, yes, it's a very usefull thing
18:28 mncharity re 'bootrapping exercises always fixes a lot of bugs', sigh, right.  :)
18:29 mncharity ok, many thanks for all the help bashing on the idea.
18:29 mncharity it's appreciated.
18:30 TimToady It's particularly useful if you discover missing tests
18:31 ruoso oh yeah... I probably wrote like 10 or 15 new test cases when bootstrapping kp6
18:31 ruoso as I like to say about TTD
18:31 ruoso TDD
18:31 ruoso a bug report is only successfull if it includes a test case reproducing the bug
18:32 meppuru joined #perl6
18:35 mncharity re missing tests, ah, ok.  (wistful chant "don't hit any kp6 bugs, don't hit any...").  re successful, modulo a quibble vis heisenbugs, understood.
18:39 mncharity I'm hoping to simply be able to do a ruby version of Emit/Perl5.pm.  and otherwise not reach into kp6, or do anything different wrt kp6 than the existing p5 backend does.  effort/risk would seem to shoot up dramatically if that proves not to be the case.
18:42 mncharity hmm, that's a good clarification of objectives.  a new, fast backend, no less capable than the existing p5 backend.  if it turns out that's not sufficient to fully bootstrap, well, that's a separate project.
18:43 mncharity with quite different skill requirements, flavor, etc.
18:44 ispy_ joined #perl6
18:58 * skids wonders if it is his brain broken or Proxy accessors, they return <obj:Proxy> rather than call FETCH
18:59 pugs_svn r19436 | ruoso++ | [smop] Added a goto method to the stack. It will be used to implement Continuation-Passing-Style
19:02 iblechbot joined #perl6
19:08 Limbic_Region joined #perl6
19:08 __Ace__ joined #perl6
19:29 buubot joined #perl6
19:34 DarkWolf84 joined #perl6
19:37 rdice joined #perl6
19:40 Psyche^ joined #perl6
19:41 jisom joined #perl6
19:55 ruoso home &
19:58 cmarcelo joined #perl6
20:15 riffraff joined #perl6
20:17 snearch joined #perl6
20:20 ispy_ joined #perl6
20:35 rlb3 left #perl6
20:36 thoughtpolice joined #perl6
20:49 iblechbot_ joined #perl6
21:06 TJCRI joined #perl6
21:09 lunatico joined #perl6
21:49 Auzon joined #perl6
22:02 ashleyb joined #perl6
22:15 cognominal_ joined #perl6
22:18 japhb joined #perl6
23:14 c9s joined #perl6
23:28 bwisti joined #perl6

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

Perl 6 | Reference Documentation | Rakudo