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.
fglock back in #perl6 - I was away in Spain for a few days 00:27
lambdabot fglock: You have 2 new messages. '/msg lambdabot @messages' to read them. 00:28
pugs_svn r18798 | fglock++ | [kp6] TODO update 10:41
pugs_svn r18799 | fglock++ | [kp6-perl5] initial impl of structure autovivification; 12:26
r18799 | fglock++ | - this still fails: my %x; (%x{1}){2};
pugs_svn r18800 | fglock++ | [kp6-perl5] added "HashContainer" 14:39
r18801 | fglock++ | [kp6-perl5] Hash.STORE is gone 14:43
dlocaus Good morning! 15:27
fglock dlocaus: hi! 15:32
moritz_ good localtime() 15:33
moritz_ has one and a half hours to kill, but no possibilty to hack on perl 6 :( 15:34
dlocaus Write documentation! :) 15:36
that's always good for killing time :)
moritz_: "proto token xyz { };" is that legal perl6? All by itself? 15:38
kp6: proto token xyz { };
exp_evalbot r18801: OUTPUT[no method 'say' in Class 'Str'␤ at compiled/perl5-kp6-mp6/lib/KindaPerl6/Runtime/Perl5/MOP.pm line 334␤ KindaPerl6::Runtime::Perl5::MOP::__ANON__('DISPATCH=HASH(0x874ecd4)', 'say') called at compiled/perl5-kp6-mp6/lib/KindaPerl6/Runtime/Perl5/MOP.pm line 162␤
..main::DISPATCH('DISPATCH=HASH(0x874ecd4)', 'say') called at - line 16␤]
fglock dlocaus: yes, it's legal 15:40
dlocaus fglock: is it supposed to be a Multi class? or a MultiToken Class? 15:41
fglock it's a multi token 15:43
dlocaus ok, I've made that change on my own code, but it breaks
on the empty braces { }
if I put a "1;" in there it works, well it parses at least.
fglock how about { '' } 15:44
dlocaus I've checked the grammar for proto, but it says that it should be <.ws>
checking
kitty:~/volunteer/perl6/pugs/v6/v6-KindaPerl6> perl script/kp6 t/kp6/56-token-sym.t 15:45
1..1
DISPATCH: calling APPLY DISPATCH=HASH(0x117b440) on invalid object:$VAR1 = {};
at compiled/perl5-kp6-mp6/lib/KindaPerl6/Runtime/Perl5/MOP.pm line 121
main::DISPATCH('undef', 'APPLY', 'DISPATCH=HASH(0x117b440)') called at - line 128
fglock 56-token-sym was broken by a recent refactoring
not sure how it (doesn't) works 15:46
dlocaus What is the best way to go about testing this?
or finding out how it broke?
fglock reverting to past versions works, but it is very tedious 15:47
dlocaus humm, sounds possibly better than trying to debug machine generated code :) 15:48
I'll bang on this some more.
fglock brb 15:50
pugs_svn r18802 | dlo++ | [kp6] grammar "proto token ..." is supposed to be a MultiToken. 15:53
r18802 | dlo++ |
r18802 | dlo++ | I have changed Sub.pm to produce a MultiToken class instead of a "Multi". This produced another
r18802 | dlo++ | bug in which "proto token xyz { };" did not parse properly. Test case 56-proto-sym.t displays the bug.
r18802 | dlo++ |
pugs_svn r18802 | dlo++ | reference: 15:53
r18802 | dlo++ | irclog.perlgeek.de/perl6/2007-11-06#i_138735
lambdabot Title: IRC log for #perl6, 2007-11-06
dlocaus does anyone know what this code does? 16:13
do { [] }; # <= this line.
do {
main::say('*** Syntax Error in Block: missing closing curly bracket } ');
die('error in Block')
};
fglock dlocaus: it looks like an "empty signature" emitted by MiniPerl6 16:14
dlocaus ah, so it doesn't actually do anything?
fglock empty parameter binding
dlocaus ok, ty
pugs_svn r18803 | pmurias++ | [kp6] commented out COMPILER::begin_block() in proto - it might be better to solve the runtime issues before the compile time 16:29
pmurias dlocaus: MultiToken should be only used for 'proto token {}' 16:30
dlocaus Yes. 16:31
Isn't that what I did?
I've traced the compilation problem to compiled/perl5-kp6-mp6/lib/KindaPerl6/Runtime/Perl5/Pad.pm: my $source = $data->{_dispatch}( $data, 'perl' )->{_value}; 16:32
$source returns { ... } instead of "{ }"
pmurias begin_block compiles and runs the ast at compile time 16:33
is ... a compile error in kp6? 16:34
dlocaus I think so 16:35
pmurias you can fix it ;) 16:36
dlocaus the compiled/perl5-kp6-mp6/lib/KindaPerl6/Grammar/Sub.pm file code expects "{}" not "{ ... }" as produced by compiled/.../Pad.pm 16:36
pmurias Multi.perl would have to serialise it correctly
itself 16:37
commenting begin_block out is the best option untill it does
dlocaus pmurias: I'm sorry, I don't get what you are saying? 16:38
fglock buggy code is easy to find - commenting out code creates hard to find bugs 16:39
pmurias fglock: it's just removing functionality 16:40
pmurias multis won't exist at compile time 16:41
dlocaus ah ha! 16:42
dev.pugscode.org/browser/v6/v6-Kind...P.pm#L1451 16:43
There's the bug
lambdabot tinyurl.com/24j5wb
dlocaus ::Code->perl() returns "{ ... }", but the grammar spec requires "'{' <.opt_ws> '}'".
fglock it's not a bug - it's a TODO
pmurias dlocaus: the bug in Multi.pm 16:44
kp6 should handle ...
dlocaus looks lost 16:46
pmurias dlocaus: sorry the ofenting .perl is in MOP
dlocaus: "..." is valid perl6
pugs: ...
exp_evalbot OUTPUT[*** Cannot use this control structure outside a 'routine' structure␤ at /tmp/fEyKiVbDzw line 1, column 1 - line 2, column 1␤]
pmurias pugs: sub a {...}; a()
exp_evalbot OUTPUT[*** Unimplemented stub called␤ at /tmp/JFGbraT6h4 line 1, column 23-27␤ /tmp/JFGbraT6h4 line 1, column 17-20␤]
dlocaus I thought "..." was valid perl6 for "Unknown, code that will be replaced later" 16:47
dlocaus the perl6 grammar spec, called for optional white space. 16:47
pmurias dlocaus: yes 16:48
pugs_svn r18804 | pmurias++ | [kp6] uncommented the line fglock requested, Multi and MultiToken exist at compile time but are empty 16:49
pmurias the syntax error happened in begin_block()
dlocaus so, "<.opt_ws>" should also handle "..."
pmurias dlocaus: no
pmurias the grammar used by kp6 isn't the offical perl6 grammar 16:50
dlocaus The only other option is to replace the '{' <.opt_ws> '}' with '{' <.opt_ws_or_code> '}'
pmurias that's STD
it wouldn't help at all
dlocaus: you mean in token proto 16:51
dlocaus pmurias: yes.
pmurias dlocaus: token proto parses ok
dlocaus no.
pmurias it calls begin_block($ast)
dlocaus: yes 16:52
dlocaus That is what started me on this.
pmurias the ast is then executed
pmurias the side effects are serilised as perl6 and turned into ast 16:53
the were serilised by calling .perl which returned invalid perl6 code
pmurias fglock: please check if i'm correct 16:54
pugs_svn r18805 | fglock++ | [kp6] a simple impl of '...'
dlocaus humm, that didn't invoke the bug
pmurias dlocaus: i fixed it and it disapeared 16:55
the result of begin_block is then ignored as far as i know 16:56
fglock t/kp6/56-token-sym.t now gives "UndefinedHashItem" messages, which is the thing I'm working now 16:58
dlocaus running tests.
:) 16:59
t/kp6/36-multi.t breaks 17:00
proto my_multi {};
&my_multi.long_names = [
Well, in some manner or anther, I've caused 56-token-sym.t to be closed out :) 17:03
On my plate I have the following>
Tene kp6: ...
dlocaus 1. Get the AST to do the following perl6 -> kp6 -> perl6 17:03
2. Write documentation to explain the big picture of kp6.
pmurias Tene: you scared of exp_evalbot
Tene I did. 17:04
pmurias ;)
Tene looks around.
Tene rawrs at dalek. 17:05
pmurias dlocaus: Multi should be used for proto my_multi {} 17:09
fglock kp6: say 123
Tene fglock: no exp_evalbot
fglock Tene: say 123
Tene ENOACCESS 17:10
fglock hmm - a bug
dlocaus pmurias: but fglock said MultiToken should be used for proto namespace {} 17:14
pmurias: irclog.perlgeek.de/perl6/2007-11-06#i_138732 17:15
lambdabot Title: IRC log for #perl6, 2007-11-06
dlocaus well, not proto namespace, but for proto.. 17:15
pmurias only for proto token my_multitoken {} 17:16
dlocaus pmurias: oh hurm.. 17:17
oh hurmm.. I have to vote today... :).. Ducks pmurias... I'll be back in a while :)
fglock pugs: say ` perl script/kp6 --do Namespace -Bperl5 <<< ' ... ' ` 17:18
pmurias physics& 17:21
fglock hmm - psychics 17:22
dlocaus Humm, a programmer commenting on physics being psychics, when at the ever increasing complexity of our computer systems, we actually claim to know what's going on in our computer. 17:33
;)
avar fglock: !!! is die
fglock avar: fix it !!! 17:34
avar !!!
what should ... use as a noop?
dlocaus brb, gotta vote now.
fglock is it a noop?
avar I think so, not sure though 17:35
!!! = die, ??? = warn, ... = noop iirc
moritz_
.oO( is voting a noop? )
fglock '...' is a noop in google 17:36
moritz_ sub foo { ... } is a prototype
the 'yadayadayada' op 17:37
so it has a semantic
fglock S03 says it complains bitterly 17:39
dlocaus back 18:30
dlocaus moritz_: all perl6 files beginning with "use v6-alpha;" have to be compiled with mp6 right? 19:42
moritz_ dlocaus: no
dlocaus: it's just a flag that says it's not perl 5 19:43
dlocaus ok
moritz_ because a perl 6 compiler has to assume perl 5 syntax on any file it reads, unless it encounters a 'use v6;', a 'module ...' or a 'class ...' statement 19:44
dlocaus wasn't that up for debate?
weather or not to allow the perl6 compiler to parse perl5? 19:45
moritz_ well, maybe. But the current specs says "perl5 until told otherwise"
dlocaus and eval "$perl_code_here"? 19:46
moritz_ if called in p6, it evals p6 19:46
if called from p5, it evals p5
if called from python... guess what ;) 19:47
dlocaus I mean, if you eval " .. code .. " you have to have the compiler too to compile what ever is in that string. 19:48
if you only have the parrot interperter you cannot compile.
moritz_ of course
dlocaus hurmm... ok
moritz_ that's why you have to compile the whole compiler into PIR if you want to distribute it separately
dlocaus thinks the parrot people really have their work cut out for them.
dlocaus other work to do - cya tomorrow & 20:32