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.
pugs_svnbot r20680 | Auzon++ | [gsoc_spectest] added some tasks for S29 so I don't forget them later. 00:09
pugs_svnbot r20681 | diakopter++ | [yap6] 00:21
r20681 | diakopter++ | still diagnosing a very strange (to me) bug in expr...
r20681 | diakopter++ | but lots of cleanup.
bacek perl6: my Hash $h = {a => {b => {c => 42}}}; say $h; 01:00
exp_evalbot kp6 r20681: OUTPUT[a b c 42␤]
..pugs: OUTPUT[a b c 42␤␤␤␤]
..rakudo r28124: OUTPUT[Odd number of elements found where hash expected␤current instr.: 'parrot;List;hash' pc 1801 (src/gen_builtins.pir:1325)␤
..elf r20681: OUTPUT[a Pair=HASH(0x85e2518)␤]
pmichaud rakudo doesn't understand { ... } as a hash composer yet. 01:02
bacek pmichaud: yes... It treat it as code. 01:04
I can't fudge S29-list/reduce.t... Fudge incorrectly generate skip-count. 01:05
pmichaud which part? 01:06
bacek sub foo 01:08
fudge add one more test
pmichaud isn't it just #?rakudo skip "{} hash composer unimplemented" 01:09
bacek you can try. And will get Parse errors: Bad plan. You planned 11 tests but ran 12. 01:10
pmichaud do you have any other local changes? 01:11
bacek pmichaud: yes. I'll commit them in few seconds 01:12
pmichaud please commit and I'll look at it.
bacek done 01:13
pugs_svnbot r20682 | bacek++ | [spec] Fudge few tests for rakudo.
bacek pmichaud: #55368 with fixed List.reduce. It passed S29-list/reduce except num of tests 01:14
pmichaud need to rebuild 01:15
bacek to rebuild rakudo? Or patch? 01:16
pmichaud rebuild parrot + rakudo
(doing that now.)
TimToady: I think I'm being really dense (re: "Clarification on S12" thread on p6c) 01:18
either I'm not asking the questions right or I'm totally lost on the answers ;-|
pmichaud bacek: on my system everything passes 01:22
bacek hmm 01:24
pmichaud just a sec, about to commit 55368
bacek 11 tests?
pmichaud yes, 11 tests.
All tests successful, 6 subtests skipped.
Files=1, Tests=11, 4 wallclock secs ( 4.73 cusr + 0.05 csys = 4.78 CPU)
bacek pmichaud: great! 01:25
bacek may be its problem with perl on MacOSX... 01:25
bacek #?rakudo 4 skip 'parsefail' 01:34
skip(5, 'parsefail');# {
this this from reduce.rakudo...
rakudo_svn r28125 | pmichaud++ | [rakudo]: 01:37
r28125 | pmichaud++ | * Improved List.reduce (bacek++)
r28125 | pmichaud++ | * Patch courtesy Vasily Chekalkin <bacek at bacek.com>, RT#55368
pmichaud mine has 01:38
#?rakudo 4 skip 'parsefail'
skip(4, 'parsefail');# {
bacek pmichaud: strange...
bacek when I invoke 't/fudge' it create correct skip(4). But from fudgeall it generates skip(5)... 01:47
bacek perl6: say [1..10].reduce: { $^a + $^b * $^c }; 02:18
exp_evalbot kp6 r20682: OUTPUT[syntax error at position 4, line 1 column 4:␤say [1..10].reduce: { $^a + $^b * $^c }␤ ^ HERE␤]
..pugs: OUTPUT[141␤]
..rakudo r28125: OUTPUT[141␤]
..elf r20682: OUTPUT[Can't call method "reduce" on unblessed reference at (eval 14) line 3.␤ at ./elf_f_faster line 4492␤]
bacek perl6: say [1..10].reduce: { $^c + $^b * $^a };
exp_evalbot kp6 r20682: OUTPUT[syntax error at position 4, line 1 column 4:␤say [1..10].reduce: { $^c + $^b * $^a }␤ ^ HERE␤] 02:19
..pugs: OUTPUT[10␤]
..rakudo r28125: OUTPUT[12650␤]
..elf r20682: OUTPUT[Can't call method "reduce" on unblessed reference at (eval 14) line 3.␤ at ./elf_f_faster line 4492␤]
bacek perl6: say { $^a + $^d }.arity 02:21
exp_evalbot kp6 r20682: OUTPUT[no method 'arity' in Class 'Int'␤ at compiled/perl5-kp6-mp6/lib/KindaPerl6/Runtime/Perl5/MOP.pm line 345␤ KindaPerl6::Runtime::Perl5::MOP::__ANON__('HASH(0x8e5248c)', 'arity') called at compiled/perl5-kp6-mp6/lib/KindaPerl6/Runtime/Perl5/MOP.pm line 169␤
..main::DISPATCH('HASH(0x8e5248c)', 'arity') called at - line 12␤]
..pugs: OUTPUT[<SubBlock(<anon>)>␤*** No such method in class Bool: "&arity"␤ at /tmp/ci34qN29Sh line 1, column 1 - line 2, column 1␤]
..rakudo r28125: OUTPUT[2␤]
..elf r20682: OUTPUT[Parse error in: /tmp/QQLqReeQBe␤panic at line 1 column 17 (pos 17): Statement not terminated properly␤WHERE: say { $^a + $^d }.arity␤WHERE: /\<-- HERE␤ STD_red/prelude.rb:98:in `panic'␤ STD_red/std.rb:355:in `eat_terminator'␤ STD_red/std.rb:269:in `block in
..statementlist'␤ STD_red/prelude.rb:153:in `call'␤ STD_red/pre...
bacek perl6: my $s = sub { $^a + $^d }; say $s.arity; 02:22
exp_evalbot kp6 r20682: OUTPUT[no method 'arity' in Class 'Code'␤ at compiled/perl5-kp6-mp6/lib/KindaPerl6/Runtime/Perl5/MOP.pm line 345␤ KindaPerl6::Runtime::Perl5::MOP::__ANON__('HASH(0x8e52bd8)', 'arity') called at compiled/perl5-kp6-mp6/lib/KindaPerl6/Runtime/Perl5/MOP.pm line 169␤
..main::DISPATCH('HASH(0x8e52bd8)', 'arity') called at compiled/perl5-kp6-mp6/lib/Kind...
..pugs: OUTPUT[1␤]
..rakudo r28125: OUTPUT[2␤]
..elf r20682: OUTPUT[Global symbol "$d" requires explicit package name at (eval 14) line 3.␤ at ./elf_f_faster line 4492␤]
bacek its weird... I expect "4"...
[particle] why? you have two params? 02:23
bacek [particle]: 'DWIM' principe... I thinks that $^d is forth param. 02:28
[particle] no no 02:29
they're taken in alphabetical order
rakudo: my $a = sub { $^something + $^some_other_thing }; say $a.arity 02:30
exp_evalbot rakudo r28125 OUTPUT[2␤]
[particle] would you expect that to be arity 7000000000000000000000000000000000000something?
bacek [particle]: eek.
rakudo: say [1..10].reduce: { $^a + $^b * $^c }; 02:31
exp_evalbot rakudo r28125 OUTPUT[141␤]
bacek rakudo: say [1..10].reduce: { $^c + $^b * $^a};
exp_evalbot rakudo r28125 OUTPUT[12650␤]
bacek why?
[particle] because the first argument is the result of the previous call 02:33
in one case, you add it
in the second case, you multiply it
$^a
bacek [particle]: why arguments reordered?
[particle] { $^b + $^a } # the first arg goes into the lexicographically-sorted first param ($^a) 02:34
second arg goes into second lexicographically-sorted param, $^b
etc 02:35
this allows you to use params in an order different from the order in which the args were passed
bacek [particle]: not very intuitive. what about { $^a + $^Я }? Second arg is 'russian capital ya' 02:36
[particle] unicode codepoint sorted
it's in the spec
bacek [particle]: which one? 02:37
[particle] S06?
have to check
bacek [particle]: I'll read it...
afk, lunch time...
[particle] yes, S06:1520 02:38
Auzon perl6: say undef.WHAT 03:49
exp_evalbot kp6 r20682: OUTPUT[DISPATCH: calling WHAT on invalid object:$VAR1 = undef;␤␤ at compiled/perl5-kp6-mp6/lib/KindaPerl6/Runtime/Perl5/MOP.pm line 128␤ main::DISPATCH('undef', 'WHAT') called at - line 11␤] 03:50
..pugs: OUTPUT[Scalar␤]
..rakudo r28127: OUTPUT[Failure␤]
..elf r20682: OUTPUT[Undef␤]
Auzon perl6: say undef.defined;
exp_evalbot kp6 r20682: OUTPUT[DISPATCH: calling defined on invalid object:$VAR1 = undef;␤␤ at compiled/perl5-kp6-mp6/lib/KindaPerl6/Runtime/Perl5/MOP.pm line 128␤ main::DISPATCH('undef', 'defined') called at - line 11␤]
..pugs: OUTPUT[␤]
..rakudo r28127: OUTPUT[Method 'defined' not found for invocant of class 'Failure'␤current instr.: '_block11' pc 37 (EVAL_10:17)␤
..elf r20682: OUTPUT[Can't call method "defined" on an undefined value at (eval 14) line 3.␤ at ./elf_f_faster line 4492␤]
pugs_svnbot r20683 | Auzon++ | [gsoc_spectest] Fixed typo in test. 1 modified test. 04:41
moritz_ good morning 05:49
Auzon good evening moritz_ :) 05:50
moritz_ our common uptime seems to be severly limited by the various time zones ;) 05:53
Auzon: what's your localtime? 05:54
Auzon mmm... 0053
I think I did that right 05:55
Auzon usually doesn't use military time. But it's midnight, and I find am/pm to be weird with midnight/noon. 05:56
moritz_ ;) 05:57
in Germany we use only the 0..23 range, but informally we sometimes say "5 o'clock noon" 05:58
but you virtually never see that written down
Auzon So you're what? 8 hours ahead of me? 05:59
moritz_ 7
7:58 here
moritz_ pugs: my $a = 1..5; my @b = $a; @b 07:26
exp_evalbot RESULT[[[1, 2, 3, 4, 5],]]
moritz_ pugs: my $a = 1..5; my @b = $a; say @b.elems 07:27
exp_evalbot OUTPUT[1␤]
moritz_ pugs: my $a = 1..5; my @b = $a; say @b[0].WHAT
exp_evalbot OUTPUT[Array␤]
moritz_ rakudo: say 2, 3, 4..6, 7 07:29
exp_evalbot rakudo r28127 OUTPUT[234567␤]
bacek pugs: my $a = (1..5); my @b = $a; say 'One '~@b; @b = $a; say 'Two '~@b;
exp_evalbot OUTPUT[One 1 2 3 4 5␤Two 1 2 3 4 5␤]
pugs_svnbot r20684 | moritz++ | [t] updated TASKS 07:33
moritz_ rakudo: say 1 ~~ Num 08:54
exp_evalbot rakudo r28127 OUTPUT[0␤]
moritz_ rakudo: say 1 ~~ Num|Int 09:00
exp_evalbot rakudo r28127 OUTPUT[1␤]
moritz_ wow, I didn't expect that to work ;)
bacek perl6: say 1 ~~ Item 09:04
exp_evalbot kp6 r20684: OUTPUT[no method 'APPLY' in Class 'Undef'␤ at compiled/perl5-kp6-mp6/lib/KindaPerl6/Runtime/Perl5/MOP.pm line 345␤ KindaPerl6::Runtime::Perl5::MOP::__ANON__('HASH(0x824be0c)', 'APPLY') called at compiled/perl5-kp6-mp6/lib/KindaPerl6/Runtime/Perl5/MOP.pm line 169␤
..main::DISPATCH('HASH(0x824be0c)', 'APPLY') called at compiled/perl5-kp6-mp6/lib/Kin...
..pugs: OUTPUT[1␤]
..rakudo r28127: OUTPUT[Method 'ACCEPTS' not found for invocant of class 'Failure'␤current instr.: 'infix:~~' pc 8638 (src/gen_builtins.pir:5845)␤
..elf r20684: OUTPUT[syntax error at (eval 14) line 3, near "1 ~"␤ at ./elf_f_faster line 4492␤]
moritz_ is class Item specced somewhere?
I think TimToady had to rethink if we need it 09:05
bacek moritz_: no idea
moritz_ perl6: say 1 ~~ Any
exp_evalbot kp6 r20684: OUTPUT[no method 'APPLY' in Class 'Undef'␤ at compiled/perl5-kp6-mp6/lib/KindaPerl6/Runtime/Perl5/MOP.pm line 345␤ KindaPerl6::Runtime::Perl5::MOP::__ANON__('HASH(0x824be0c)', 'APPLY') called at compiled/perl5-kp6-mp6/lib/KindaPerl6/Runtime/Perl5/MOP.pm line 169␤
..main::DISPATCH('HASH(0x824be0c)', 'APPLY') called at compiled/perl5-kp6-mp6/lib/Kin...
..pugs: OUTPUT[1␤]
..rakudo r28127: OUTPUT[1␤]
bacek perl6: say 1 ~~ Any
exp_evalbot ..elf r20684: OUTPUT[syntax error at (eval 14) line 3, near "1 ~"␤ at ./elf_f_faster line 4492␤]
kp6 r20684: OUTPUT[no method 'APPLY' in Class 'Undef'␤ at compiled/perl5-kp6-mp6/lib/KindaPerl6/Runtime/Perl5/MOP.pm line 345␤ KindaPerl6::Runtime::Perl5::MOP::__ANON__('HASH(0x824be0c)', 'APPLY') called at compiled/perl5-kp6-mp6/lib/KindaPerl6/Runtime/Perl5/MOP.pm line 169␤
..main::DISPATCH('HASH(0x824be0c)', 'APPLY') called at compiled/perl5-kp6-mp6/lib/Kin...
..pugs: OUTPUT[1␤]
..rakudo r28127: OUTPUT[1␤]
moritz_ was faster
bacek drop dead. Moritz was faster
exp_evalbot ..elf r20684: OUTPUT[syntax error at (eval 14) line 3, near "1 ~"␤ at ./elf_f_faster line 4492␤]
bacek moritz_: there is some ~~ Item in spectest 09:06
may be we should replace it.
moritz_ spec/S29-list/first.t
bacek moritz_: exactly
moritz_ thinks so, yes
bacek moritz_: DONT STEAL MY KARMA! 09:07
I'll fix it :)
moritz_ *lol*
moritz_ bacek: maybe just change it to Int, because that's what it is 09:07
a test for Any isn't specific enough, because List ~~ Any 09:08
bacek moritz_: died on test8... 09:09
heh 09:10
rakudo: say 1 ~~ Num
exp_evalbot rakudo r28127 OUTPUT[0␤]
bacek this is the problem :)
moritz_ that's why I said "Int, because that's what it is"
rakudo: say Int ~~ Num 09:11
exp_evalbot rakudo r28127 OUTPUT[0␤]
bacek rakudo: say 1.0 ~~ Num
moritz_ Int is a subset of Num, not is a Num
exp_evalbot rakudo r28127 OUTPUT[1␤]
bacek rakudo: say 1.0 ~~ Float
exp_evalbot rakudo r28127 OUTPUT[Method 'ACCEPTS' not found for invocant of class 'Float'␤current instr.: 'infix:~~' pc 8638 (src/gen_builtins.pir:5845)␤
bacek yeek
moritz_ that's rakudoesk for "not Type 'Float' found" 09:12
there's no Float in the specs
bacek moritz_: yep. 09:13
pugs_svnbot r20685 | bacek++ | [spec] Replace ~~Item with ~~Int.
bacek now we can add S29-list/first.t to spectest_regression 09:14
moritz_ not for me
1..9
Method 'ACCEPTS' not found for invocant of class 'Failure'
(make localtest)++ 09:15
uhm, wtf?
now it works
bacek: ok, send patch ;) 09:16
bacek thinks that update_passing_test_data.pl should output diff for spectest_regression.data 09:18
:)
bacek Ok. TIme to go home 09:22
moritz_: canyou check S29-list/map_multy.t? It works for me
And grep.t aswell. 09:23
moritz_ bacek: will do (later today)
bacek ok
see ya in couple of hours
moritz_ there's no map_mult(i|y).t 09:24
pugs_svnbot r20686 | pmurias++ | [elf] pointed out more distastfull deviations from Perl 6 in the elf code base 09:43
moritz_ "distastefull deviations" nice description ;) 09:44
masak en.wikipedia.org/wiki/Alliteration
b_jonas ruby-1.8.7 came out last week 09:56
I'm installing it now
moritz_ b_jonas: cross-poster ;)
b_jonas yeah
masak what is elf, actually?
I seem to have missed it among all implementations
moritz_ masak: yet another Perl 6 compiler
b_jonas the executable format or the creature? 09:57
masak moritz_: what's it do?
I mean, in what way is it special?
moritz_ masak: it consists of a ruby translation of STD.pm
masak ah, now I remember
moritz_ masak: and is bootstrapped with a Perl 5 backend (excpet the parsing)
masak does ruby have grammars?
moritz_ don't think so 09:58
masak then what was the advantage of translating STD.pm to ruby? 09:59
why not perl 5, say?
moritz_ "escape bootstrapping hell" 10:00
so when your emitter breaks something, the parser doesn't
at least I think that was mncharity's reason
masak ok
moritz_ evalbot control version 10:44
exp_evalbot This is evalbot revision 20674
moritz_ evalbot control restart
moritz_ evalbot control version 10:44
exp_evalbot This is evalbot revision 20686 10:44
pmurias masak: why not perl5 than, i would guess mncharity likes ruby more than perl5 12:27
moritz_: "bootstraping hell" is a problem untill you're bootstraped 12:28
moritz_ pmurias: probably better re-phrase "recompilation hell" 12:29
pmurias having a bootstraped grammar would be preferable, mncharity considered it, but it would be lots of boring work 12:30
being boostraped is a positive quality, once your compiler isn't extremely doggy 12:31
moritz_ und unless it slows down too much 12:32
s/^u/a/
cjfields purl, bugs? 12:33
bugs? 12:34
moritz_ no purl in #perl6 ;)
cjfields ah, forgot which list I was on.
pmurias s/doggy/dodgy/
lichtkind moritz_: did you understand the concept of slurpy blocks? 13:03
rakudo_svn r28129 | pmichaud++ | [rakudo]: 13:06
r28129 | pmichaud++ | * Handling cloning of ranges (RT#55400, bacek++)
r28129 | pmichaud++ | * Patch courtesy Vasily Chekalkin <bacek at bacek.com>
r28129 | pmichaud++ | * Minor modifications by Pm
avar pmichaud: is there a svn web thingy where one can view commits for rakudo? 13:22
pmichaud avar: yes 13:23
it's the same as for parrot -- just a sec
www.parrotvm.org/svn/parrot/revision?rev=28129
lambdabot Title: revision: /parrot (Rev: 28129, via SVN::Web)
avar nomn nom nom 13:25
pmichaud pugs: my $a = 1..5; for =$a { say $_; }; say $a; 13:26
exp_evalbot OUTPUT[1␤2␤3␤4␤5␤1 2 3 4 5␤]
moritz_ lichtkind: I know blocks with slurpy sigs - do you mean that? 13:29
ruoso pmichaud, did my last message on p6-compiler exposed the problem you were looking for? 14:15
pmichaud ruoso: yes, many thanks. Very well explained. 14:16
nothingmuch ruoso: ditch work! 14:19
ruoso :) 14:20
fglock hi! 14:58
moritz_ welcome back fglock ;)
fglock moritz_: it's nice to be back :) 14:59
ruoso fglock, hey :) 15:03
fglock hi ruoso! how was your trip? 15:04
ruoso nice... thanks...
fglock going home - I'll try to reconnect later & 15:05
cjfields pugs: "ABC-DEF".trans(("- AB..Z" => "_ a..z")) 15:16
exp_evalbot RESULT["abc_def"]
rakudo_svn r28140 | Whiteknight++ | [Rakudo] update builtins to use ".namespace []" instead of ".namespace", as per #48549 15:25
r28141 | Whiteknight++ | [Rakudo] update classes to use ".namespace []" instead of ".namespace", as per #48549 15:29
moritz_ pugs: given (2) { say "yes" when 2 } 16:27
exp_evalbot OUTPUT[*** ␤ Unexpected "when"␤ expecting operator, ":", "," or "}"␤ at /tmp/VIRe1UFRaJ line 1, column 23␤]
moritz_ pugs: given (2) { say "yes" when 2; }
exp_evalbot OUTPUT[*** ␤ Unexpected "when"␤ expecting operator, ":", "," or "}"␤ at /tmp/8OePiLTMuQ line 1, column 23␤]
moritz_ ok, pugs doesn't allow when as a statement modifier
rakudo: say |(1, 2, 3) 16:32
exp_evalbot rakudo r28145 OUTPUT[␤get_bool() not implemented in class 'Junction'␤current instr.: 'parrot;PCT::HLLCompiler;command_line' pc 1288 (src/PCT/HLLCompiler.pir:688)␤
moritz_ pugs: say |(1, 2, 3)
exp_evalbot OUTPUT[123␤]
[particle] seems rakudo doesn't have prefix:| 16:33
or is it the |() op?
moritz_ prefix:| 16:34
diakopter wow; that was almost trivial 16:35
moritz_ diakopter: what, adding prefix:| to yap6? 16:36
diakopter (adding infinite recursion detection to the recursive-descent-parser framework)
diakopter pats self on the back
i'm surprised mjd didn't include it himself 16:38
moritz_ diakopter: I think there is something like that in HOP
diakopter: at least for head-recursion
(or is that called left-recursion? dunno)
diakopter there isn't something like that in the parser chapter.. it might be in the regex chapter 16:40
pugs_svnbot r20687 | diakopter++ | [yap6] 16:41
r20687 | diakopter++ | added infinite recursion detection to the parser
r20687 | diakopter++ | fixed the expr rule problem from earlier
diakopter anyway, I like my implementation :)
pugs_svnbot r20687 | diakopter++ | moved some generic parser generator functions to Parser.pm
r20687 | diakopter++ | merged in some more functions from HOP::Lexer to Lexer.pm
diakopter moritz_: how soon before exp_evalbot updates its svn
[particle] diakopter: can you add the svn diff links back to *_svnbot?
i guess moritz_ could do it, too
diakopter 11:35:37 < moritz_> (or is that called left-recursion? dunno)
argh; mispaste again
moritz_ evalbot control restart 16:42
diakopter stupid putty/rightmouseclick 16:42
moritz_ evalbot control version 16:42
exp_evalbot This is evalbot revision 20687
moritz_ diakopter: lucky you ;) 16:42
diakopter [particle]: I had it that way a few months ago but folks here complained that they didn't want them
moritz_ [particle]: people tend to use the links in the irc logs when they have a browser open anyway
[particle] oh 16:43
well, the most important links to me are for rakudo anyway, and i get those next door 16:44
moritz_ (at least I do some, and since I got very positive feedback after adding those I guess I'm not the only one)
pugs_svnbot r20688 | diakopter++ | [yap6]
r20688 | diakopter++ | fixing my dumb typos
diakopter evalbot control version
exp_evalbot This is evalbot revision 20687
moritz_ diakopter: btw the svn updates every three minutes 16:45
sorry, 5
diakopter [particle]: what, you don't like to read my piddly commit diffs? :P 16:46
moritz_ yap6: say 42+3
diakopter hee 16:46
moritz_ Segmentation fault 16:46
diakopter r20689 works
evalbot control version 16:47
exp_evalbot This is evalbot revision 20688
diakopter evalbot control svnupdate
moritz_ diakopter: it can't do that, it doesn't have write permissions 16:48
diakopter it could mark a semaphore file somewhere the updater controller can read? 16:49
moritz_ that would be possible 16:50
(but not as easy as the other operations so far)
[particle] diakopter: that's exactly what i wanted to do! to keep track of you and ruoso and fglock etc 16:52
pugs_svnbot r20689 | diakopter++ | [yap6] 16:53
r20689 | diakopter++ | removed more tracing cruft
[particle] it's hard for me to manage 17 open ff tabs
moritz_ yap6: say 2+42
moritz_ uhm, wtf does evalbot segfault? 16:53
[particle] rakudo: say "hi"
exp_evalbot rakudo r28145 OUTPUT[hi␤]
[particle] yap6: say 1
[particle] heh 16:54
diakopter evalbot control version 16:54
exp_evalbot This is evalbot revision 20688
moritz_ rakudo: say 1 16:55
exp_evalbot rakudo r28145 OUTPUT[1␤]
diakopter pugs: say { say 3; };
exp_evalbot OUTPUT[<SubBlock(<anon>)>␤]
diakopter moritz_: yap6 won't parse say 42+3 yet because it doesn't yet do longest token matching. 16:57
moritz_ why doest it need LTM for parsing that? 16:59
diakopter b/c it matches 42 as an expression 17:00
and therefore plus(expr(say 42),3) doesn't parse
moritz_ why not? 17:01
say 42 is also a valid expression ;)
diakopter follows the trace output
diakopter oh. hrm. :/ 17:07
moritz_ if you rely on LTM for getting the precedence right you'll need exponential time in the number of tokens at worst 17:09
diakopter moritz_: ok; thanks 17:11
moritz_ remembers reading about a cool interpreter with mutable syntax that did roughly that... 17:12
nice paper
the drawbacks were that it took about a minute to start the interpreter and parse/compile the prelude
diakopter heh 17:13
Juerd moritz_: Did you know who was behind tnx.nl/php? :) 17:14
moritz_ Juerd: no. you? 17:15
Juerd Yea :)
moritz_ a whois is helpful ;)
diakopter moritz_: oh... I see what I did wrong... alternate() shouldn't have infinite recursion detection, but concatenate() should.
I just assumed.... instead of thinking through it :) 17:16
moritz_ (btw that virtual machine already did JITting - it was a few minutes before ;)
pugs_svnbot r20690 | diakopter++ | [yap6] 17:17
r20690 | diakopter++ | remove infinite recursion detection from alternate()
diakopter btw, as of yesterday yap6 only outputs whether parse succeeded or failed. 17:22
moritz_ yap6: say 1 17:23
exp_evalbot OUTPUT[Parse successful␤]
moritz_ ok
yap6: say 1+2*3
exp_evalbot OUTPUT[Parse successful␤]
moritz_ yap6: say(1+2*3,4)
exp_evalbot OUTPUT[ Syntax Error near: "say"]
moritz_ yap6: say(1)
exp_evalbot OUTPUT[Parse successful␤]
moritz_ yap6: say(1,2) 17:24
exp_evalbot OUTPUT[ Syntax Error near: "say"]
diakopter it doesn't do commas yet
moritz_ ok, no lists yet
diakopter yap6: say(1+2*3**4)
exp_evalbot OUTPUT[Parse successful␤]
diakopter evalbot control version 17:25
exp_evalbot This is evalbot revision 20688
moritz_ diakopter: that version is only evalbot's version, not yap6's
kp6: say 0
exp_evalbot kp6 r20690: OUTPUT[0␤]
moritz_ that's the svn repo's revision
diakopter oh ok
moritz_ bbl & 17:26
diakopter yap6: say 42+3+5+(((((((((((((((((((((((((((((((((say 4)))))))))))))))))))))))))))))))))) 17:31
exp_evalbot OUTPUT[ Syntax Error near: ")"]
diakopter yap6: say 42+3+5+(((((((((((((((((((((((((((((((((say 4)))))))))))))))))))))))))))))))))
exp_evalbot OUTPUT[Parse successful␤]
diakopter yap6: my $sub1=multi sub { 4+5; my $q = 4452; say $q } 17:32
exp_evalbot OUTPUT[Parse successful␤]
Khisanth lisp? :P 17:43
diakopter I'm realizing that what I'm currently working on in yap6 is only a lexer with a little bit of syntax checking. Full syntax checking will need to occur in another pass. 18:29
well, semantics checking. 18:30
ruoso diakopter, even syntax is not that simple... because BEGIN code might change the future syntax... 18:55
nothingmuch, around?
nothingmuch iishish 19:00
nothingmuch is reasing
reading
before napping
diakopter ruoso: right, so when the current parser detects something that changes the future syntax, the new parser is swapped in 19:01
ruoso diakopter, the parser have a runtime state that is changeable
it's not a new parser
it's the same parser that morphs 19:02
diakopter I mean, the morphed parser is swapped in for the rest of the parsing unit
I meant "new parser" just to mean one that's even slightly different from the current 19:03
ruoso nothingmuch, if cog's around, could you please ask him some suggestions on what I could do tomorrow between 5 am and someone getting up....
ruoso diakopter, i see... it's the same parser, but the changes are always localized (or not) 19:04
diakopter ruoso: I've been talking about parse-time. but you're saying the grammar can be changed arbitrarily at runtime, from some arbitrary IO... which means the parsing unit will need to be parsed just like an arbitrary eval 19:05
so there's another parse-time 19:06
what I've called a parsing unit
ruoso BEGIN is at parse time
diakopter in other words, BEGIN is parsed as the first parsing unit
BEGIN had better occur before the new-syntax-code in the file, then. :) ... 19:07
because otherwise it means, when the parser encounters the BEGIN block, it should immediately parse, semantic check, type check, compile/run/interpret the contents of the block, and apply any grammar changes as instructed. 19:08
ruoso exactly 19:09
diakopter and then somehow go back and parse stuff occuring before the BEGIN block with the new grammar
ruoso exactly
diakopter so which is it... can a BEGIN block affect syntax preceding it? or not? 19:10
ruoso preceding, i don't think so
diakopter ok; that's all I meant by "BEGIN had better occur before the new-syntax-code in the file, then." 19:10
ruoso yes 19:11
:)
diakopter alright, that's straightforward to implement in the yap6 framework 19:12
(b/c all the data structures are streams, even the [imagined] AST and IR/IL 19:13
)
ruoso lazy parsing?
that's a new one
:)
diakopter bbiaw 19:16
diakopter moritz_: after studying it more, [operator] precedence levels should also be straightforward. Each precedence level gets its own rule, with the shape of the rule representing the affixedness of the operator 19:35
Each level is chained to the other
where there are multiple shapes for a given precedence level, each is part of an alternative() 19:36
alternate()
pugs_svnbot r20691 | diakopter++ | [yap6] 19:45
r20691 | diakopter++ | added a dieif() parser generator, which dies on success with the
r20691 | diakopter++ | provided message. Useful for implementing the deprecation errors
r20691 | diakopter++ | in STD.pm.
r20691 | diakopter++ | Added lots of syntax from S11 & S10
r20691 | diakopter++ | removed two of the lexing categores (newline/usev6). WS is next. :)
r20691 | diakopter++ | Fixed some more precedence problems
diakopter please, anyone, feel free to correct the inefficiencies represented in my very crude Perl 5 skills in yap6... I'm sure I have suboptimal algorithms & bad design all over the place. 19:49
moritz_: and then, each operator precedence level includes as its last option the next higher precedence level, so expressions that don't include all of the precedence levels still work. :) 19:53
for instance, see "rule op_numaddt" and "rule term" at www.parrotvm.org/svn/pugs/blame/mis...TD_hand.pm 19:58
lambdabot Title: blame: /pugs/misc/yap6/src/lib/Perl6in5/Grammar/STD_hand.pm (Rev: HEAD, via SVN: ..., tinyurl.com/6dxmbg
diakopter hmm, now to choose an overload operator that represents "concatenate but with no intervening whitespace" how about + 20:01
yap6: my$a=3; 20:02
exp_evalbot OUTPUT[Parse successful␤]
diakopter heh
yap6: package Bar { my $fee; multi method foo { say$fee;}; multi method blue { say 2234 } } 20:04
exp_evalbot OUTPUT[Parse successful␤]
wolverian yap6: package Bar { 20:05
exp_evalbot OUTPUT[ Syntax Error near: "package"]
wolverian well, near enough :)
diakopter yap6: say say say 4; say (say (say (say (23+23432/2234+2234**5666)))) 20:12
exp_evalbot OUTPUT[Parse successful␤]
xinming yap6: say if say if say if say if 0; 20:16
exp_evalbot OUTPUT[ Syntax Error near: "if"]
xinming yap6: say "hello" if 1; 20:17
exp_evalbot OUTPUT[ Syntax Error near: "\""]
diakopter xinming: it doesn't know "if" yet :)
xinming err... Not implemented. :-)
diakopter nor quotes :)
moritz_ diakopter: do you have a plan for context-sensitve lexing yet?
diakopter such as quotes? 20:18
or whatever the new name for qq{} is
or <>
moritz_ quotes, regexes
<...> are quotes in p6
diakopter yep; just like the other rules... a recursive hierarchy of detection rules 20:19
but when a parser enters a quoted region, things are redefined... well actually, the parsers for the grammar variants are generated before parsing begins 20:20
it's because of the several layers of indirection
$base vs $base vs base()
$base vs $Base vs base()
moritz_ how does that work with look-aheads? 20:21
diakopter so, if " doesn't trigger a grammar shift within <>, it's treated just as bare text. 20:22
moritz_ I mean what happens with a lookahead into a part of a string that's handled by a different lexer?
diakopter hey, how it's implemented by the thing that generates grammars from STD.pm is another question... I'm just concerned with parsing STD.pm... and I'm not convinced lookaheads are needed for that. 20:23
what are lookaheads even used for in STD.pm? I bet there's a way to represent the rule that doesn't need them... 20:24
moritz_ ok, I'll stop bugging you with non-productive questions ;) 20:25
diakopter or, converts them to recursive descent syntax
oh. there's a much easier way to do infinite recursion detection. 20:27
(so that degenerate grammars can be specified) 20:28
moritz_ actually most grammars that have a lookahead of $n can be reduced to a grammar of 1
s:last/grammar/lookahead/
diakopter that's what I intuitively figured
moritz_ and 1 token lookahead is no problem, because it doesn't go past DSL boundaries
because each DSL boundary knows that it is one 20:29
diakopter actually, there wouldn't be another parsing "step", per se... the semantic checking would be done by the lexhandlers (one for each rule). 20:45
s/step/pass/ 20:46
diakopter in the new syntax, "-" will continue to mean concatenate, but it also means with intervening whitespace allowed. "+" will mean no whitespace allowed. 20:49
ruoso going to braga & 20:52
meppl good night 21:55
diakopter gnight
meppl ;) 21:56
diakopter !home 21:59
dolmen perl6: my $a of int; 22:07
exp_evalbot kp6 r20691: OUTPUT[no method 'APPLY' in Class 'Undef'␤ at compiled/perl5-kp6-mp6/lib/KindaPerl6/Runtime/Perl5/MOP.pm line 345␤ KindaPerl6::Runtime::Perl5::MOP::__ANON__('HASH(0x824bfb4)', 'APPLY') called at compiled/perl5-kp6-mp6/lib/KindaPerl6/Runtime/Perl5/MOP.pm line 169␤
..main::DISPATCH('HASH(0x824bfb4)', 'APPLY') called at compiled/perl5-kp6-mp6/lib/Kin...
..pugs: OUTPUT[*** ␤ Unexpected "of"␤ expecting "?", "!", trait, "=", infix assignment or operator␤ at /tmp/ns2orSs70f line 1, column 7␤]
..rakudo r28145: OUTPUT[Statement not terminated properly at line 1, near "of int;"␤current instr.: 'parrot;PGE::Util;die' pc 120 (runtime/parrot/library/PGE/Util.pir:82)␤
..elf r20691: OUTPUT[Unknown rule: trait_verb:fulltypename␤It needs to be added to ast_handlers.␤ at ./elf_f_faster line 2674␤]
dolmen perl6: my @a of int;
exp_evalbot kp6 r20691: OUTPUT[no method 'APPLY' in Class 'Undef'␤ at compiled/perl5-kp6-mp6/lib/KindaPerl6/Runtime/Perl5/MOP.pm line 345␤ KindaPerl6::Runtime::Perl5::MOP::__ANON__('HASH(0x824bf1c)', 'APPLY') called at compiled/perl5-kp6-mp6/lib/KindaPerl6/Runtime/Perl5/MOP.pm line 169␤
..main::DISPATCH('HASH(0x824bf1c)', 'APPLY') called at compiled/perl5-kp6-mp6/lib/Kin...
..pugs: OUTPUT[*** ␤ Unexpected "of"␤ expecting "?", "!", trait, "=", infix assignment or operator␤ at /tmp/vs6JNJwwge line 1, column 7␤]
..rakudo r28145: OUTPUT[Statement not terminated properly at line 1, near "of int;"␤current instr.: 'parrot;PGE::Util;die' pc 120 (runtime/parrot/library/PGE/Util.pir:82)␤
..elf r20691: OUTPUT[Unknown rule: trait_verb:fulltypename␤It needs to be added to ast_handlers.␤ at ./elf_f_faster line 2674␤]
dolmen perl6: my $a of Int; 22:28
exp_evalbot kp6 r20691: OUTPUT[no method 'APPLY' in Class 'Undef'␤ at compiled/perl5-kp6-mp6/lib/KindaPerl6/Runtime/Perl5/MOP.pm line 345␤ KindaPerl6::Runtime::Perl5::MOP::__ANON__('HASH(0x824bfb4)', 'APPLY') called at compiled/perl5-kp6-mp6/lib/KindaPerl6/Runtime/Perl5/MOP.pm line 169␤
..main::DISPATCH('HASH(0x824bfb4)', 'APPLY') called at compiled/perl5-kp6-mp6/lib/Kin...
..pugs: OUTPUT[*** ␤ Unexpected "of"␤ expecting "?", "!", trait, "=", infix assignment or operator␤ at /tmp/La5bRJxF90 line 1, column 7␤]
..rakudo r28145: OUTPUT['of' not implemented at line 1, near ";"␤current instr.: 'parrot;PGE::Util;die' pc 120 (runtime/parrot/library/PGE/Util.pir:82)␤
..elf r20691: OUTPUT[Unknown rule: trait_verb:fulltypename␤It needs to be added to ast_handlers.␤ at ./elf_f_faster line 2674␤]
moritz_ still not implemented ;) 22:29
rakudo_svn r28146 | pmichaud++ | [rakudo]: 22:49
r28146 | pmichaud++ | * Fix .list and !flatten so they don't generate clones of the elements.
r28146 | pmichaud++ | * This also fixes Range.WHAT.
dolmen rakudo: say (1..2).WHAT; 22:57
exp_evalbot rakudo r28146 OUTPUT[Range␤]
dolmen rakudo: say (1..2).perl;
exp_evalbot rakudo r28146 OUTPUT[1..2␤]
dolmen rakudo: say (1..*).WHAT;
exp_evalbot rakudo r28146 OUTPUT[Range␤]
dolmen rakudo: say (1..*)[3];
exp_evalbot rakudo r28146 OUTPUT[get_pmc_keyed() not implemented in class 'Range'␤current instr.: '_block11' pc 58 (EVAL_13:23)␤ 22:58
dolmen rakudo: say (1..8)[3];
exp_evalbot rakudo r28146 OUTPUT[get_pmc_keyed() not implemented in class 'Range'␤current instr.: '_block11' pc 52 (EVAL_13:23)␤
dolmen rakudo: say ((1..8)[3]);
exp_evalbot rakudo r28146 OUTPUT[get_pmc_keyed() not implemented in class 'Range'␤current instr.: '_block11' pc 52 (EVAL_13:23)␤
dolmen rakudo: say ((1..8)[0..3]);
exp_evalbot rakudo r28146 OUTPUT[get_integer() not implemented in class 'Range'␤current instr.: 'parrot;Perl6Object;new' pc 337 (src/gen_builtins.pir:227)␤
dolmen rakudo: my @a=1..8; say @a[0..3]; 23:03
exp_evalbot rakudo r28146 OUTPUT[get_integer() not implemented in class 'Range'␤current instr.: 'parrot;Perl6Object;new' pc 337 (src/gen_builtins.pir:227)␤
dolmen rakudo: my @a=1..8;
exp_evalbot rakudo r28146 RESULT[[1, 2, 3, 4, 5, 6, 7, 8]]
dolmen rakudo: my @a=1..8; say @a[0..3].perl;
exp_evalbot rakudo r28146 OUTPUT[get_integer() not implemented in class 'Range'␤current instr.: 'parrot;Perl6Object;new' pc 337 (src/gen_builtins.pir:227)␤
dolmen rakudo: my @a=1..8; say @a[3].perl;
exp_evalbot rakudo r28146 OUTPUT[4␤]
dolmen rakudo: my @a=1..8; say @a[2,3].perl;
exp_evalbot rakudo r28146 OUTPUT[3␤]
dolmen rakudo: my @a=1..8; say @a[2].perl; 23:04
exp_evalbot rakudo r28146 OUTPUT[3␤]
dolmen rakudo: my @a=1..8; say @a[3].perl;
exp_evalbot rakudo r28146 OUTPUT[4␤]
dolmen rakudo: my @a=1..8; say @a[2,7].perl;
exp_evalbot rakudo r28146 OUTPUT[3␤]
dolmen rakudo: my @a=1..8; say @a[2.7].perl;
exp_evalbot rakudo r28146 OUTPUT[3␤]
dolmen rakudo: my @a=1..8; say @a[2.0].perl;
exp_evalbot rakudo r28146 OUTPUT[3␤]
dolmen rakudo: my @a=1..8; say @a[2.01].perl;
exp_evalbot rakudo r28146 OUTPUT[3␤]