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.
Caelum I'm getting this trying to compile pugs: RRegex.hs:44:7: Could not find module `Data.Array': 00:18
mncharity Caelum: using a nice old ghc 6.6.1? 00:42
mncharity wishes ruby had smalltalk's becomes() :/ 00:42
Caelum mncharity: 6.8.2, the one on Debian :) 00:43
mncharity Caelum: my fuzzy understanding is pugs has regrettably not yet been ported to 6.8. 00:50
Caelum ahh
mncharity I believe 6.6.1 works.
Caelum seems weird that a compiler would break backward compatibility
mncharity i believe that has been the repeated experience across several ghc revs. 00:51
pugs_svn r19650 | putter++ | [kp6] ruby backend: work around ruby sensitivity to comma position; additional infix ops; package variables; binding of same. 01:10
mncharity apropos previous conversation re binding, things ended up more complex. while getting s_x will check for lexical variables, and then object methods (used for package variables), setting s_x = 3 will create a lexical if one doesn't already exist, period. so $x := 3 is now something like if not defined? x or defined? x == "local-variable"; s_x = 3; else; self.s_x = 3; end. 01:14
and yes, I suppose a container needs to created there so its more like ...s_x = Scalar.new(3) .
...s_x = 3.containerize :) 01:15
the not defined? x may be excess, only true if there's been a compiler error. 01:16
mncharity anyway, perl script/kp6 -Bruby -e 'sub f($n){if $n == 0 {0} else {if $n == 1 {1} else {f($n-1)+f($n-2)}}}; say f(10)' now works. also with my sub f. 01:18
note the ; before say. without it, you get two separate compilation units. 01:19
mncharity and binding a lhs other than a single variable isn't implemented as yet. 01:20
pugs_svn r19651 | putter++ | [kp6] ruby backend: sync doc. Non-container bindees are now given containers. 01:41
r19651 | putter++ | As container ro/rw isn't implemented, my $x := 3; $x = 4; regrettably works.
mncharity btw, if anyone wants a separable kp6 project, you might take a look at BEGIN (and macros). currently, kp6 tries to use the same emitter for BEGIN and other ast nodes. so BEGIN's emit_ruby hands over some ruby code, which kp6 then tries to eval() as p5. instead, it should ideally ask an emitter appropriate to the backend being used at compile-time. 01:46
mncharity or perhaps the Emit/Ruby.pm ast note for BEGIN should be kludged to call emit_perl, and worry about the rest at bootstrap time. 01:47
pugs_svn r19652 | lwall++ | [kv.t] Fixed test count, which was only off by two orders of magnitude... 02:13
cxreg fyi, pugscode.org download link is pointing to a non-working rakudo.org url (redirected here from #parrot) 03:08
mncharity cxreg: thanks. :) things have gotten a bit crufty. 03:22
pugs_svn r19653 | putter++ | [kp6] ruby backend: a first rough cut at class variables and methods. 06:38
moritz_ Caelum: there is pugs-ghc681.diff which have to apply to compile pugs with ghc 6.8.1 08:07
pugs_svn r19654 | moritz++ | [pugscode.org] added a working download link, cxreg++ 08:14
pugs_svn r19655 | pmurias++ | fixed accidential modification of run_tests.pl 08:46
pugs_svn r19656 | ruoso++ | [smop] when implementing SMOP__SLIME__Frame I realise that it is even simpler than I first had thought. see www.perlfoundation.org/perl6/index....ementation for the new layout 10:50
lambdabot Title: Default SMOP Interpreter Implementation / Perl 6, tinyurl.com/3328jg
pugs_svn r19657 | ruoso++ | [smop] new C call SMOP__NATIVE__capture_delegate can be used to create a cloned capture with a new invocant. SMOP__SLIME__CurrentFrame is a proxy responder interface that delegates all calls to the currently active frame in the interpreter using the capture_delegate call. 12:34
pugs_svn r19658 | ruoso++ | [smop] move_capturize implemented in SMOP__SLIME__Frame... 12:57
pugs_svn r19659 | ruoso++ | [smop] SMOP__SLIME__Frame.goto($count) 14:54
pugs_svn r19660 | ruoso++ | [smop] SMOP__SLIME__CurrentFrame implemented. 15:02
pugs_svn r19661 | ruoso++ | [smop] SMOP__NATIVE__int basics implemented. 15:14
pugs_svn r19662 | ruoso++ | [smop] SMOP__SLIME__Node implemented. 15:48
pmurias ruoso: i looked into the new layout, it's much easier to understand 16:59
will the nodes have to be rw 17:00
?
ruoso pmichaud, in SLIME, yes... 17:05
pugs_svn r19663 | ruoso++ | [smop] SMOP__SLIME__Capturize code written
ruoso pmurias, ^ 17:06
pmichaud, oops
pmichaud np :-)
ruoso pmurias, but the idea is that any other implementation may replace SLIME at any time :)
slime is just the lame default implementation
pmurias ruoso: i wandered if having explicit register would be better then mixing data with the code 17:09
ruoso pmurias, it probably is... but I wanted to have the simplest possible implementation up... 17:10
ruoso and that's the point on it being completely pluggable 17:10
so I can replace it with a more serious implementation in the future 17:11
pmurias would it be theoreticly possible to have a stackfull implementation too? 17:13
ruoso in theory yes...
but I trully believe that a intepreter is better as stackless 17:14
mofino IS IT DONE YET? 17:21
*channel lynch*
:)
[particle2 wanna help? 17:27
mofino I wish 17:27
I'm too useless to help
[particle] i can give you a commit bit
there's plenty of useless things to do :)
mofino do you guys need a hand warmer?
I'm good at that 17:28
[particle] you can read the spec, and make sure the tests look good
or write new tests... or ask questions about stuff you've read
mofino Hmm 17:29
I guess that's a good idea anyway
[particle] :)
mofino regardless of uselessness
[particle] if you msg me your email addr and preferred username, i'll give you a pugs commit bit
mofino !
Slow down, I only started out as a troll 17:30
we just met!
[particle] yep, it's that easy to get involved. we even accept trolls
mofino I would like to go out for dinner first, at least.
[particle] orders dinner for the channel 17:31
well, if you want to get involved, we'd love the help 17:34
mofino Honestly if I was reliable, I would
instead I sit in the peanut gallery and shout obsceneties 17:35
Tene They even let me in!
mofino I will however take your advice and start reading
[particle] excellent! there's a lot to read. 17:36
pugs_svn r19664 | ruoso++ | [smop] SMOP__INTPTR__InterpreterInstance written...
mofino man, I'm so excited for perl6
[particle] so is everyone else in the channel. you've come to the right place :)
mofino it's going to be so very awesome 17:37
[particle] rakudo: say "perl 6 rocks"
exp_evalbot OUTPUT[perl 6 rocks␤]
mofino CANT WAIT 17:38
RELEASE TODAY!
mofino explodes
pugs_svn r19665 | ruoso++ | [smop] As the first draft code of the lowlevel interpreter instance, marking version 0.1.2
[particle] pugs: "i can't wait".say
exp_evalbot OUTPUT[i can't wait␤]
mofino stop getting me all excited!
ruoso cool... next thing in my ROADMAP is the sm0p preprocessor
pmurias ruoso: regarding help with the preprocessor,is there anything you want to know or do not know how to do? 17:49
ruoso I still don't know exactly how to integrate the preprocessor in the build process 17:50
as to be called before cpp
[particle] "build process" == makefile? 17:50
.smop.cpp : \n \s+ <preprocessor_name> $< $@ 17:52
where .smop is the input file extension, and .cpp is the output extension
and where $< is the input file, and @ is the output file
$@ 17:53
pmurias [particle]: it's \t instead of \s
[particle] ah, yeah, right.
ruoso [particle], "build process" == autoconf/automake
[particle] ah, i don't know autotools, they're not windows-friendly 17:54
ruoso hm...
but anyway... I wanted to avoid having to create a different file
and just have gcc calling it, as it calls cpp.. 17:55
pmurias windows is not pmurias-friendly
ruoso ruoso is not windows-friendly ;P
pugs_svn r19666 | ruoso++ | [smop] updating Makefile.am to include the new files. 17:56
ruoso pmurias, but I'm also a little distant from KP6 lately... It would be nice if someone closer could write the emitter... 17:57
pmurias ruoso: i could work on it in a bit more than 3 weeks time 18:06
ruoso pmurias, hmmm... ok... let's hope fglock has some time before that... 18:07
pmurias kp6 is not that hard
;)
swimming& 18:08
simcop2387 i should take him out of here 18:11
ruoso error: pointers are not permitted as case values 18:35
gahhhhhhh
sometimes I forget how C is stupid..
integral can't you cast them to a numeric type? 18:42
ruoso case (int)SMOP__ID__foo: ? 18:43
error: case label does not reduce to an integer constant 18:44
no... it's really stupid...
TimToady it's gonna turn into cascaded ifs anyway so you might as well write it that way 18:45
ruoso yeah... I was hoping not having to write dumb cascade ifs... :P 18:46
TimToady that's what macros are for :) 18:48
ruoso hmmm... 18:52
ruoso wondering if given/when can be written as a macro to create cascaded ifs... 18:53
spinclad #define GIVEN(x) dollar_ = (x); 19:20
#define WHEN(y) if ((x) == (y)) {
#define ENDWHEN } 19:21
that ENDWHEN is UGLY tho
oop, #define WHEN(y) if (dollar_ == (y)) { 19:22
and you have to choose a type for dollar_
moritz_ actually it's if(smartmatch(dollar_), (y))
spinclad if(smartmatch(dollar_, (y))) 19:23
right
spinclad better, leave the braces out of the macros: use as WHEN(yy1) { ... } \n WHEN(yy2) { ... } 19:26
no elses here, though; as long as your C<y>s exclude each other it should work 19:31
TimToady alternately, if you want exclusive, define WHEN to start out with "else if" 19:32
then dummy up the first "if (0) {}" 19:33
pugs_svn r19667 | ruoso++ | [smop] Major code review... We already support the sm0p preprocessor... the file just need to be named .sm0p and then automake executes sm0p.pl to transform... For now sm0p.pl is just taking out the sm0p code as I can check if everything compiles... smop itself compiles fine... 19:56
..some tests still do not compile
ruoso home & 19:58
moritz_ ruoso++ # hacking smop, verbose commit messages
ruoso :)
if anyone wants to make the rest of the tests to compile, I'd be very much happy... ;) 19:59
cosimo_ you mean tests in t/spec? 19:59
TimToady :) 20:00
ruoso cosimo_, not yet :P... still in smop/test/
TimToady cosimo_: did you notice I made the colon optional on #? lines?
ruoso really home & 20:01
cosimo_ TimToady: no, but now I'm 'svn update'-ing. I will check existing tests. 20:02
and t/spec/README I guess
TimToady the other new thing is #?DOES 20:03
cosimo_ ok, looked up ?DOES in the readme. Thanks
TimToady which currently allows digits but I'm thinking of allowing expressions so you can use it inside a parameterized sub
since it just gets shoved in as the arg to skip() 20:04
the funnest fix was to change "plan 2732" to "plan 27", which removed a *lot* of red from the smoke page :) 20:05
but, alas, reduced the total test count to back below 20,000 20:06
moritz_ ;)
cosimo_ I wasn't able to do much during last week. I moved to another apartment... :-) 20:12
TimToady: did you see my msg on p6l about uniq and stuff? 20:13
pugs_svn r19668 | putter++ | [kp6] v6-KindaPerl6/script/run_tests.pl: svn propset svn:executable true run_tests.pl 20:21
ludan hi 20:26
TimToady cosimo_: I answered it on the list
ludan: howdy 20:27
pmurias mncharity: sorry for breaking run_tests.pl
ludan TimToady: howdy :)
pmurias mncharity: re the BEGIN problem method names in are conflicting with the ones in Perl5 (Perl5 is emiting mixed ruby/perl5 code as a result) 20:31
pmurias emit_body needs to be emit_ruby_body or similar 20:31
pugs_svn r19669 | putter++ | [kp6] ruby backend: +fixes. +more runtime. a few more tests pass. 20:36
mncharity pmurias: re run_tests, no problem. :) find t/kp6|perl -ne '...system...' is always available. 20:37
mncharity pmurias: re BEGIN, oh, drat. I'm sorry about that. I'll go through and rename myself clear. 20:38
cosimo_ TimToady: I read now your mails on google groups... I have probably messed up my perl6 mail folder :-􏿽xA7 20:40
pmurias mncharity: made the same mistake, fglock++ found it for me 20:41
with perl5v6
cosimo_ TimToady: thanks for pointing out "doubt" vs "question". I had no doubt about that. :-) But I was wrong 20:42
mncharity pmurias: I wonder if the Emit/Perl5 code should be modified, s/emit_(?!perl5)/emit_perl5/g ? 20:43
mncharity perl -ne 'print if /emit_(?!perl5)/' src/KindaPerl6/Visitor/Emit/Perl5.pm 20:45
pmurias mncharity: yes 20:46
mncharity: will you do it or shall i? 20:47
(doing it) 20:58
pugs_svn r19670 | putter++ | [kp6] ruby backend: +fixed a regression. +renamed some emit methods to avoid collisions with the perl5 emitter. t/kp6 BEGIN tests now pass. pmurias++/fglock++ 21:01
mncharity pmurias: oh, thanks :)
pugs_svn r19671 | pmurias++ | [kp6] 21:13
r19671 | pmurias++ | added a perl5_ to methods in order to avoid conflicts with other backends
r19671 | pmurias++ | s/emit_(?!perl5)/emit_perl5_$1/g
riffraff hi 21:23
mncharity pmurias: (?!perl5) is actually a zero-length lookahead assertion ;0 21:25
err, ;)
mncharity pmurias: thanks for getting BEGIN to work. the test failures were worrying. 21:27
pmurias mncharity: yess...
but it work anyway ;)
mncharity :) 21:31
mncharity tries to remember what use lib "."; means... 21:33
TimToady puts the . on the front of the path 21:34
cosimo_: looks like I lied; fudge already handles an expression on DOES (as long as the expression isn't 0, that is :) 21:35
mncharity looks like kp6's passing of ../../t/01-sanity/06-use.t is a bit bogus. script/kp6 -Cast -e 'use lib ".";' reports it broken into two separate compilation units. 21:39
re puts the . on the front of the path, thanks 21:40
pmurias mncharity: kp6 dosn't really support use 21:44
mncharity less work for me :)
pmurias mncharity: actually more 21:45
ispell-- 21:46
pugs_svn r19672 | lwall++ | [fudge] clarify that #?DOES can take an expression (within limits)
mncharity oh... kp6 uses use()? hmm... 21:47
it would be quite useful to have a list of all the kp6 p6 files which will need to be compiled to bootstrap.
pmurias find src/ 21:48
withought some things in other languages 21:49
pmurias mncharity: kp6 uses the perl5 use 21:50
Botje I know i'm going to regret it, but does pugs expose metaclasses somehow? since $obj.meta doesn't quite work 21:54
mncharity ok. I'll punt until the bootstrap begins and there are multiple .rb files at hand.
moritz_ pugs: say "foo".HOW.methods
exp_evalbot OUTPUT[["reverse","chop","index","quotemeta","join","chars","bytes","split","LIST","ITEM","bless"]␤]
moritz_ Botje: but I think right now it only works for strings, not in the general case 21:55
Botje i see 21:56
moritz_ Botje: you're welcome to fix this if you want ;) 21:57
Botje would it be much work? :P
moritz_ yes, I fear
but you can try anyway
Botje hmm 21:58
so why does it work for strings ? :)
moritz_ because audrey started with them, as a prototype 21:59
Botje I was hoping to use perl 6's shiny meta-ness for a paper :) 22:00
moritz_ uhm
I don't think any implementation exposes that yet
pugs_svn r19673 | putter++ | [kp6] ruby backend: a few additional passing tests. 22:01
Botje well, I was planning on contributing to pugs anyway 22:01
moritz_ that's great
Botje but i'm guessing it's more than a day's work ;)
moritz_ do you have a commit bit yet?
Botje I'll be able to hack on it in two weeks at best 22:02
pmurias depends on how good haskell coder you are
Botje I'm down to one head-asplosion a week on #haskell :)
moritz_ ;)
uhm, it seems I just killed commitbit 22:04
it wasn't responding, so I did an svc -d commitbit 22:05
then the same with -u
now I get a 503
ah, now it works
moritz_ Botje: pugs isn't developed very actively these days - but you're welcome to change that 22:06
Botje: and whenever you feel like hacking on anything perl6 related, feel free to request a commit bit here on the channel
Botje i'll see after my exams ;) 22:07
moritz_ good luck ;)
pmurias sleep 22:08
mncharity wonders if there is any pattern to how many/which t/kp6 tests need to pass in order to bootstrap
g'night pmurias, thanks for your help
moritz_ mncharity: they could all pass, and still bootstrap wouldn't automatically work 22:09
mncharity true. it's the reverse case of 'bootstrap doesn't require feature x' which is potentially interesting. 22:10
moritz_ mncharity: but fglock said that bootstrap was nearly there, just a few bugs left in the backend
mncharity in order to more rapidly get to bootstrap, check performance, and see if the approach is panning out. 22:11
moritz_ mncharity: but the current backend is so slow that he (temporarily) gave up bootstrapping work
Botje it appears all builtin types have HOW implemented 22:12
mncharity re nearly there, :) re just a few bugs left, :(
moritz_ pugs: say 2.HOW.methods
exp_evalbot OUTPUT[["LIST","ITEM","bless"]␤]
moritz_ pugs: say (2i).HOW.methods 22:13
exp_evalbot OUTPUT[*** No such method in class Class: "&methods"␤ at /tmp/bkPwbcx5QZ line 1, column 5 - line 2, column 1␤]
moritz_ pugs: say (2i) * (1i) 22:14
exp_evalbot OUTPUT[-2 + 0i␤]
Botje pugs: say 2i.WHAT
exp_evalbot OUTPUT[0 + 2i␤]
moritz_ so Complex doesn't have a .HOW
pugs: say "str".WHAT
exp_evalbot OUTPUT[Str␤]
pugs_svn r19674 | putter++ | [kp6] ruby backend: +run_scripts to docs. +isa(). 22:20
mncharity bbiab
meppuru good night 22:21
cj moo 22:29
I'm attending this thing next week:
www.langnetsymposium.com/
lambdabot Title: 2008 Lang.NET Symposium
cj thanks, lambdabot
I'm thinking I'll recruit some warm bodies to help implement "Iron Perl6" or whatever
anyone want to contribute anything to the effort? :) 22:30
moritz_ cj: just an idea - that could be a kp6 backend
cj moritz_: nifty. where can I find the kp6 bytecode spewer? 22:31
moritz_ cj: nowhere yet. You need to write it ;) 22:32
cj: currently it spits out perl5 (and other HLLs)
cj moritz_: I guess my question is "what is the 'it' which spits out perl5 (and other HLLs)"? 22:33
s/"\?/?"/ 22:34
moritz_ Visitor::EmitPerl5 and other, iirc
cj cool. got a svn url? 22:37
moritz_ svn.pugscode.org/pugs/v6/v6-KindaPe...itor/Emit/ 22:38
lambdabot Title: Revision 19674: /v6/v6-KindaPerl6/src/KindaPerl6/Visitor/Emit, tinyurl.com/ynqqq3
moritz_ there are Perl5.pm, Lisp.pm, Ruby.pm etc
only Perl5.pm is full featured right now
cj moritz_: nifty. it would be neat to bootstrap to IL! 22:45
moritz_ cj: yes ;) 22:46
cj: in general fglock and pmurias are the kp6 gurus, if you have further questions 22:47
moritz_ is just an interested oberserver who contributes one or two test cases
pugs_svn r19675 | cosimo++ | [t] Test suite refactoring. 23:11
r19675 | cosimo++ | Moved all builtins/math test scripts under t/spec/S29-num and S29-trig.
r19675 | cosimo++ | Applied fudge-ification.
r19675 | cosimo++ | Applied new is_approx() tests for approximate compares.
moritz_ cosimo_: if you change the tests to use is_approx, then the Test.pm in the pugs repo should have that as well 23:20
pugs_svn r19676 | cosimo++ | Added and documented approx(), is_approx() approximate test functions. 23:25
cosimo_ moritz_: just did that. I can't test pugs, though 23:26
moritz_ ok
cosimo_ good night to all 23:38