pugscode.org/ | nopaste: sial.org/pbot/perl6 | pugs: [~] <m oo se> (or rakudo:, kp6:, elf: etc.) (or perl6: for all) | irclog: irc.pugscode.org/
Set by Tene on 29 July 2008.
00:01 sri_kraih left, sri_kraih joined 00:02 jan__ left, sri_kraih left 00:03 sri_kraih joined 00:05 jan_ joined 00:16 pedrob left 00:24 eternaleye left, smg joined 00:31 eternaleye joined 00:39 ispy_ left 00:40 sri_kraih left 00:41 sri_kraih joined 00:57 alester joined 00:58 cookys_ left 01:08 explorer left 01:21 eternaleye left 01:25 ai369_ joined 01:33 ai369_ left 01:54 eternaleye joined 02:03 alester left 02:28 justatheory left 02:30 r0bby joined 02:33 eternaleye left 02:34 alester joined 02:45 azawawi joined
pugs_svn r22770 | azawawi++ | [STD_syntax_highlight] updated SYNOPSIS for --simple 02:57
03:00 hercynium joined, Psyche^ joined 03:01 Patterner left, Psyche^ is now known as Patterner 03:02 elmex_ joined
pugs_svn r22771 | azawawi++ | [STD_syntax_highlight] added --help 03:11
r22771 | azawawi++ | [STD_syntax_highlight] the filename is checked now before passing it to STD
03:12 Ral_ joined, Ral_ left 03:17 elmex left, elmex_ is now known as elmex 03:19 awwaiid joined 03:22 jamtech joined 03:36 eternaleye joined
pugs_svn r22772 | azawawi++ | [STD_syntax_highlight] ignore #elem "color" css in --simple mode 03:43
03:49 jamtech left 04:03 elmex_ joined 04:04 Psyche^ joined 04:14 elmex left, elmex_ is now known as elmex 04:16 Patterner left, Psyche^ is now known as Patterner 04:17 hercynium left
pugs_svn r22773 | azawawi++ | [STD_syntax_highlight] support #-comments in --simple mode 04:19
04:20 jauaor left 04:21 cognominal left, araujo left 04:54 cognominal joined
azawawi @tell moritz_ im getting nouns for =begin pod comments from STD_syntax_highlight, is that the right behavior? 05:00
lambdabot Consider it noted.
azawawi @tell lambdabot Hi5
lambdabot Nice try ;)
05:01 azawawi left 05:22 eternaleye left, eternaleye joined 05:27 abra joined 05:42 abra left 06:05 alester left 06:15 jfredett left 06:20 abra joined, abra left, abra joined 07:28 abra left 07:51 eternaleye left 07:53 PZt left 08:03 iblechbot joined 08:13 alanhaggai joined 08:15 pbuetow joined 08:29 eternaleye joined 08:31 iblechbot left
moritz_ good morning 08:34
lambdabot moritz_: You have 1 new message. '/msg lambdabot @messages' to read it.
08:36 pbuetow left, pbuetow joined 08:46 kanru left 08:47 kanru joined 08:58 schmalbe joined 09:05 mberends joined 09:16 araujo joined 09:17 bacek joined
bacek pugs: say (Bool::True|Bool::False).perl 09:17
p6eval pugs: OUTPUT[(Bool::False | Bool::True)ā¤]
bacek pugs: say (Bool::True|Bool::False | Bool::False).perl
p6eval pugs: OUTPUT[*** No compatible multi variant found: "&Bool::False"ā¤ at /tmp/h5YgqYh5Yb line 1, column 6-42ā¤]
bacek pugs: say (Bool::True|Bool::False|Bool::False).perl
p6eval pugs: OUTPUT[(Bool::False | Bool::True)ā¤]
bacek pugs: say (1|2|3).perl 09:18
p6eval pugs: OUTPUT[(1 | 2 | 3)ā¤]
bacek pugs: say (1|2|3|2|1).perl
p6eval pugs: OUTPUT[(1 | 2 | 3)ā¤]
bacek pugs: say (1|2|3|2|1|Bool::False).perl
p6eval pugs: OUTPUT[(Bool::False | 1 | 2 | 3)ā¤]
bacek pugs: say (1|2|3|2|1|Bool::False|"foo"|"foo"|"bar").perl 09:19
p6eval pugs: OUTPUT[(Bool::False | 1 | 2 | 3 | "bar" | "foo")ā¤]
bacek rakudo: say (1|2|3|2|1|Bool::False|"foo"|"foo"|"bar").perl
p6eval rakudo 31963: OUTPUT[any(1, 2, 3, 2, 1, Bool::False, "foo", "foo", "bar")ā¤]
bacek perl6: say uniq(<1 2 3 2 1 Bool::False "foo" "foo" "bar"> 09:20
p6eval elf 22773: OUTPUT[Parse error in: /tmp/5VDlzXFreKā¤panic at line 1 column 0 (pos 0): Can't understand next input--giving upā¤WHERE: say uniq(<1 2 3 2 1 Bool::Falsā¤WHERE:/\<-- HEREā¤ STD_red/prelude.rb:99:in `panic'ā¤ STD_red/std.rb:76:in `scan_unitstopper'ā¤ STD_red/std.rb:224:in `comp_unit'ā¤
..STD_r...
..pugs: OUTPUT[*** ā¤ Unexpected end of inputā¤ expecting operator, ":" or ")"ā¤ at /tmp/CaLmrNGjzr line 2, column 1ā¤]
..rakudo 31963: OUTPUT[Statement not terminated properly at line 1, near "(<1 2 3 2 "ā¤ā¤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)ā¤]
bacek perl6: say <1 2 3 2 1 Bool::False "foo" "foo" "bar">.uniq 09:21
p6eval elf 22773: OUTPUT[Can't call method "uniq" on unblessed reference at (eval 117) line 3.ā¤ at ./elf_f line 3861ā¤]
..pugs, rakudo 31963: OUTPUT[123Bool::False"foo""bar"ā¤]
bacek pugs: say ((1|2|3) < 2).perl 09:30
p6eval pugs: OUTPUT[(Bool::False | Bool::True)ā¤]
bacek rakudo: say ((1|2|3) < 2).perl
p6eval rakudo 31963: OUTPUT[Bool::Trueā¤]
09:48 mberends left 09:51 mberends joined 10:02 z80ASM joined 10:05 adc_Penner joined 10:12 z80ASM left 10:16 z80ASM joined 10:18 bacek_ joined, bacek left 10:41 iblechbot joined
wayland76 rakudo: say what? 10:41
p6eval rakudo 31963: OUTPUT[Statement not terminated properly at line 1, near "?"ā¤ā¤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)ā¤]
wayland76 rakudo: eh what?
p6eval rakudo 31963: OUTPUT[Statement not terminated properly at line 1, near "?"ā¤ā¤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)ā¤]
10:44 ihrd joined 11:00 Alias_ joined 11:02 alanhaggai left 11:13 kanru left, kanru joined 11:24 pedrob joined 11:28 kanru left 11:29 pedrob left 11:30 fronty joined, kanru joined
bacek_ perl6: say int((1||2)) 11:37
p6eval elf 22773: OUTPUT[Undefined subroutine &GLOBAL::circumfix_i_32_41 called at (eval 119) line 3.ā¤ at ./elf_f line 3861ā¤]
..pugs, rakudo 31963: OUTPUT[1ā¤]
bacek_ perl6: say int((1|2))
p6eval elf 22773: OUTPUT[Undefined subroutine &GLOBAL::circumfix_i_32_41 called at (eval 121) line 3.ā¤ at ./elf_f line 3861ā¤]
..rakudo 31963: OUTPUT[Method 'truncate' not found for invocant of class 'Junction'ā¤current instr.: 'parrot;Any;int' pc 10245 (src/gen_builtins.pir:6438)ā¤]
..pugs: OUTPUT[any(VInt 1,VInt 2)ā¤]
moritz_ int(1|2) should return (1|2) 11:38
bacek_ moritz_: agreed... I'm trying to fix rakudo's Junction to be proper junctions... 11:39
moritz_ bacek_: and change the dispatcher to do autothreading? 11:40
11:40 meppl joined
ihrd intresting, what should return int (1.1|2)? (1|2)? 11:40
bacek_ moritz_: yes. But I'm failing all the time
moritz_ ihrd: right 11:41
bacek_ rakudo: say list(1|2, 2|3).uniq.perl
p6eval rakudo 31963: OUTPUT[Multiple Dispatch: No suitable candidate found for 'is_equal', with signature 'PP->I'ā¤current instr.: 'parrot;List;uniq' pc 3324 (src/gen_builtins.pir:2212)ā¤]
bacek_ moritz_: it's one of examples...
moritz_ bacek_: I guess it's non-trivial, which is why no implementation does it right atm
11:41 fronty left
moritz_ rakudo: say (1, 2, 3).uniq 11:41
p6eval rakudo 31963: OUTPUT[123ā¤]
bacek_ moritz_: pugs is very close to.
moritz_ we have List.uniq? even though it's not clear in the spec? /me is surprised 11:42
pugs: say 1|2
p6eval pugs: OUTPUT[any(VInt 1,VInt 2)ā¤]
moritz_ that should print either 1\n2\n or 2\n1\n
bacek_ moritz_: yes, List.uniq is unspecced 11:43
rakudo: say list(1|2) eq list(2|3) 11:46
p6eval rakudo 31963: OUTPUT[get_string() not implemented in class 'Junction'ā¤current instr.: 'parrot;List;get_string' pc 2430 (src/gen_builtins.pir:1717)ā¤]
bacek_ rakudo: say (list(1|2) eq list(2|3)).perl
p6eval rakudo 31963: OUTPUT[get_string() not implemented in class 'Junction'ā¤current instr.: 'parrot;List;get_string' pc 2430 (src/gen_builtins.pir:1717)ā¤]
bacek_ crap...
11:53 araujo left 11:59 araujo joined 12:12 schmalbe left
bacek_ perl6: say ((1|2)+1).perl 12:18
p6eval rakudo 31963: OUTPUT[any("2", "3")ā¤]
..pugs: OUTPUT[(2 | 3)ā¤]
..elf 22773: OUTPUT[4ā¤]
bacek_ rakudo's hashes always stringifies keys... 12:19
s/rakudo/parrot/ 12:20
12:21 lumi left, zamolxes left, z80ASM left 12:26 abra joined
moritz_ bacek_: in Perl 6 that'ds a feature 12:39
12:41 pedrob joined
bacek_ moritz_: which one? 12:45
perl: my %h = (Bool::True => 1); say %h.keys 12:47
perl6: my %h = (Bool::True => 1); say %h.keys 12:48
p6eval elf 22773: OUTPUT[Bool::Trueā¤]
..rakudo 31963: OUTPUT[1ā¤]
..pugs: OUTPUT[*** ā¤ Unexpected "%h"ā¤ expecting "=", context, ":" or "("ā¤ at /tmp/C0vRNtIdY2 line 1, column 4ā¤]
bacek_ perl6: my %h; %h<Bool::True> = 1; say %h.keys 12:51
p6eval elf 22773, pugs, rakudo 31963: OUTPUT[Bool::Trueā¤]
moritz_ bacek_: hash keys are strings. 12:59
bacek_ moritz_: how you can explain mine last example? 13:11
perl6: my %h; %h<Bool::True> = 1; %h<1>=2; say %h.keys
p6eval elf 22773: OUTPUT[1Bool::Trueā¤]
..pugs, rakudo 31963: OUTPUT[Bool::True1ā¤]
bacek_ perl6: my %h = {Bool::True => 1}; say %h.keys 13:12
p6eval elf 22773: OUTPUT[Bool::Trueā¤]
..pugs: OUTPUT[*** ā¤ Unexpected "%h"ā¤ expecting "=", context, ":" or "("ā¤ at /tmp/MwC8BIMA0A line 1, column 4ā¤]
..rakudo 31963: OUTPUT[1ā¤]
bacek_ it's... weird
moritz_ uhm, %h<...> expects a string literal in place of the ... 13:13
that explains 13:51 < bacek_> perl6: my %h; %h<Bool::True> = 1; say %h.keys
bacek_ moritz_: but result is not string... 13:16
moritz_ rakudo: my %h; %h<Bool::True> = 1; %h<1>=2; say %h.keys.[0].WHAT 13:17
p6eval rakudo 31963: OUTPUT[Strā¤]
moritz_ that looks like a string to me.
bacek_ perl6: my %h; %h<Bool::True> = 1; %h<"Bool::True">=2; say %h.keys 13:18
p6eval pugs, rakudo 31963: OUTPUT[Bool::True"Bool::True"ā¤]
..elf 22773: OUTPUT["Bool::True"Bool::Trueā¤]
moritz_ sure, if you write %h<"> the " will be part of the hash key. 13:19
13:22 simcop2387 left 13:23 simcop2387 joined
bacek_ perl6: my %h; %h<Bool::True> = 1; my $a="<Bool::True>"; %h<$a>=2; say %h.keys 13:25
p6eval elf 22773, pugs, rakudo 31963: OUTPUT[Bool::True$aā¤]
bacek_ perl6: my %h; %h<Bool::True> = 1; my $a="<Bool::True>"; %h{$a}=2; say %h.keys
p6eval rakudo 31963: OUTPUT[Bool::True<Bool::True>ā¤]
..elf 22773, pugs: OUTPUT[<Bool::True>Bool::Trueā¤]
bacek_ perl6: my %h; %h{Bool::True} = 1; my $a="<Bool::True>"; %h{$a}=2; say %h.keys 13:26
p6eval rakudo 31963: OUTPUT[1<Bool::True>ā¤]
..pugs: OUTPUT[<Bool::True>1ā¤]
..elf 22773: OUTPUT[<Bool::True>Bool::Trueā¤]
13:26 meppl left
bacek_ perl6: my %h; %h{Bool::True} = 1; my $a=Bool::True; %h{$a}=2; say %h.keys 13:27
p6eval elf 22773: OUTPUT[Bool::Trueā¤]
..pugs, rakudo 31963: OUTPUT[1ā¤]
bacek_ hmm... 13:28
13:29 mberends left
bacek_ perl6: my %h; %h{Bool::True} = 1; my $a=Bool::True; %h{$a}=2; say %h.keys.[0].WHAT 13:29
p6eval elf 22773, pugs, rakudo 31963: OUTPUT[Strā¤]
bacek_ perl6: say (1|"1 + 2).perl 13:31
p6eval pugs: OUTPUT[*** ā¤ Unexpected end of inputā¤ expecting block, "\\", variable name or "\""ā¤ at /tmp/Yaq296kC9g line 2, column 1ā¤]
..elf 22773: OUTPUT[Parse error in: /tmp/G8TxiCxQnxā¤panic at line 1 column 8 (pos 8): Error in quotesnabberā¤WHERE: say (1|"1 + 2).perlā¤WHERE: /\<-- HEREā¤ STD_red/prelude.rb:99:in `panic'ā¤ STD_red/std.rb:1298:in `quotesnabber'ā¤ (eval):1:in `__quote_6321039'ā¤ STD_red/prelude.rb:406:in
..`bloc...
..rakudo 31963: OUTPUT[Statement not terminated properly at line 1, near "|\"1 + 2).p"ā¤ā¤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)ā¤]
bacek_ perl6: say (1|"1" + 2).perl
p6eval elf 22773: OUTPUT[3ā¤]
..rakudo 31963: OUTPUT[any(1, 3)ā¤]
..pugs: OUTPUT[(1 | 3.0)ā¤]
bacek_ perl6: say (1|"3" + 2).perl
p6eval rakudo 31963: OUTPUT[any(1, 5)ā¤]
..pugs: OUTPUT[(1 | 5.0)ā¤]
..elf 22773: OUTPUT[5ā¤]
bacek_ perl6: say (1|"3" x 2).perl 13:32
p6eval rakudo 31963: OUTPUT[any(1, "33")ā¤]
..pugs: OUTPUT[(1 | "33")ā¤]
..elf 22773: OUTPUT[33ā¤]
13:35 mberends joined
bacek_ perl6: (say(1|2)>0).WHAT 13:35
p6eval elf 22773: OUTPUT[3ā¤]
..rakudo 31963: OUTPUT[get_string() not implemented in class 'Junction'ā¤current instr.: 'print' pc 14650 (src/gen_builtins.pir:9033)ā¤]
..pugs: OUTPUT[any(VInt 1,VInt 2)ā¤]
bacek_ perl6: say ((1|2)>0).WHAT
p6eval rakudo 31963: OUTPUT[Boolā¤]
..pugs: OUTPUT[Junctionā¤]
..elf 22773: OUTPUT[Numā¤]
bacek_ perl6: say (((1|2)>0)).WHAT 13:36
p6eval rakudo 31963: OUTPUT[Boolā¤]
..pugs: OUTPUT[Junctionā¤]
..elf 22773: OUTPUT[Numā¤]
bacek_ perl6: say (?((1|2)>0)).WHAT
p6eval rakudo 31963: OUTPUT[Boolā¤]
..pugs: OUTPUT[Junctionā¤]
..elf 22773: OUTPUT[Intā¤]
13:48 pedrob left, pedrob joined
bacek_ perl6. say 1|2 13:50
perl6: say 1|2
p6eval elf 22773: OUTPUT[3ā¤]
..rakudo 31963: OUTPUT[get_string() not implemented in class 'Junction'ā¤current instr.: 'print' pc 14650 (src/gen_builtins.pir:9033)ā¤]
..pugs: OUTPUT[any(VInt 1,VInt 2)ā¤]
13:51 abra left 13:53 abra joined 14:03 alanhaggai joined 14:06 abra left 14:07 abra joined 14:11 tjc001 joined 14:12 pmurias joined
pmurias bacek_: hash keys are string unless you specify otherwise 14:12
14:14 ZuLuuuuuu joined 14:20 tjc001 left 14:28 hercynium joined 14:32 ruoso joined 14:34 ihrd left, hercynium left 14:35 ihrd joined
ihrd rakudo: my $e = [1,2,3]; "YAY".say for $e; 14:35
p6eval rakudo 31963: OUTPUT[YAYā¤]
ihrd rakudo: my $e = [1,2,3]; say $e.elems; "YAY".say for $e; 14:36
p6eval rakudo 31963: OUTPUT[3ā¤YAYā¤]
ruoso pmurias, Hi! 14:37
ihrd rakudo: my $e = [1,2,3]; my @a := $e; "YAY".say for @a;
p6eval rakudo 31963: OUTPUT[YAYā¤]
ihrd argh
14:38 alanhaggai_ joined, alanhaggai left, alanhaggai_ is now known as alanhaggai
ihrd rakudo: my $e = [1,2,3]; say $e.WHAT; my @a := $e; say @a.WHAT; "YAY".say for @a; 14:39
p6eval rakudo 31963: OUTPUT[Arrayā¤Arrayā¤YAYā¤]
pmurias ruoso: hi
ihrd hi
oh, soory 14:40
pmurias ihrd: hi
ihrd i just hope it works in trunk
14:41 [particle] joined
ruoso pmurias, I was thinking about add_method... maybe it shouldn't be that specific 14:41
but something more generic, linked to the AST
so new types of packages can handle new definitions 14:42
in an easier way
pmurias handling new definitions shouldn't be hard 14:44
$?CLASS.add_action(...)
ruoso you mean using that in the method name? 14:46
s/that/the thing being defined/
pmurias yes
ruoso so, add_is ? 14:47
add_does ?
add_has ?
pmurias add_parent
add_attribute
compose_role
ruoso right... that was my point...
I was thinking it would be nice to require less logic...
making it more AST-related 14:48
pmurias new_definition("has",....)
ruoso yeah... something like that
pmurias it seems to duplicate the method dispatch
ruoso hm?
this is in declaration time... 14:49
not in runtime
pmurias what i mean the new_definition will just redispatch new_definition to a different method call
ruoso is routine_declarator a multi-token ? (is it multi-token the name?)
pmurias it's a multi-token 14:50
see STD.pm
re AST-related have in mind our IR (in mildew) desugars everything to method calls 14:52
ruoso exactly... so it could follow this logic indepedently of which type of declaration 14:53
maybe make it specific to each of the STD multi-tokens...
like routine_declarator
scope_declarator
trait_auxiliary 14:54
trait_verb etc
then the user just need to associate the package_declarator keyword with the metaclass 14:55
and add the tokens
and that's all
pmurias this logic = ? 14:59
ruoso I mean that it could be blind to what the actual keywords are 15:00
it would just call a method based on each STD multi-token was matched
then you wouldn't need an exception in the compiler to allow a different keyword
you just need to associate a package_declarator keyword with a metaclass
that knows how to handles that keywords 15:01
pmurias well yes 15:03
15:17 [particle]1 joined 15:20 alester joined
ruoso pmurias, then I think the methods would be something like register_routine_declarator(...) 15:24
but I'm still unsure on what the parameters would be
15:25 ihrd left
pmurias ruoso: i would rather go for manual specifing what a given grammar rule means 15:29
15:30 ruoso left
pmurias as the MOP will be used manually or from a grammar not inheriting from perl6 15:30
15:33 [particle] left 15:41 [particle]1 left 15:46 mberends left 15:54 justatheory joined 15:58 justatheory left 16:05 alanhaggai_ joined, alanhaggai left, alanhaggai_ is now known as alanhaggai 16:13 ZuLuuuuuu left 16:16 jhorwitz joined 16:18 rindolf joined 16:27 pedrob left 16:29 dalek left 16:30 dalek joined 17:03 abra left 17:05 zamolxes joined 17:18 sidewinder128 joined
sidewinder128 Hello, anyone have an estimated when Perl6 will be released? 17:21
zamolxes a new version is released every month.. 17:23
(i'm talking about the parrot implementation, rakudo)
17:24 apeiron left 17:28 apeiron joined 17:30 alester left
moritz_ sidewinder128: christmas. 17:35
we just don't say which christams 17:36
sidewinder128 if is this one Awesome! 17:38
moritz_ that's rather unlikely.
sidewinder128 rakudo is getting stable to use? 17:39
moritz_ it's getting there, but slowly :/ 17:40
rakudo: say "hi to sidewinder128"
p6eval rakudo 31963: OUTPUT[hi to sidewinder128ā¤]
moritz_ it passes nearly 4500 spec tests, if you want a number. 17:41
sidewinder128 oh nice
moritz_ there's a progress graph on rakudo.de/ 17:42
lambdabot Title: Rakudo - A Perl 6 Compiler
sidewinder128 I see
ok thanks guys 17:43
17:45 azawawi joined
azawawi good evening 17:45
moritz_: ping 17:47
moritz_ azawawi: pong 17:48
azawawi moritz_: how r u?
17:48 ZuLuuuuuu joined
moritz_ stressed 17:48
have to work through a paper and diagonalize a matrix until tomorrow :/
azawawi finished a foosball tournament an hour ago ;-) 17:49
17:49 smtms left 17:50 [particle] joined
azawawi i tried to work around =pod comments but STD prints out <span class="noun"> 17:50
any ideas? 17:51
moritz_ you could color noun in blue, and give all possible submatches of noun a different color
azawawi i did a _comment for #-comments 17:52
moritz_ by re-parsing?
azawawi s{}{}...
azawawi is generating a sample for moritz 17:57
feather.perl6.nl/~azawawi/simple_te...imple.html 17:58
lambdabot Title: ./STD_syntax_highlight ../../t/spec/S02-builtin_data_types/array.t 17:59
17:59 sidewinder128 left
azawawi moritz_: should STD_syntax_highlight read from STDIN? 18:03
moritz_ nice
azawawi: perhaps if the file name is '-'
18:04 alanhaggai left
azawawi moritz_: im thinking how to generate 375 tests in a reasonable time [cron] while generating --simple and normal modes 18:05
moritz_ azawawi: I guess the most time is spent in STD.pm while parsing the file...
azawawi: so re-use the parse tree to generate both output files 18:06
azawawi moritz_: ./STD_syntax_highlight [filename|-] [rule] [--simple-output=filename1.html] [--full-output=filename2.html] ? 18:07
moritz_ azawawi: something like that, yes
azawawi is gonna watch spiderman 2 now... no university ;-) 18:08
18:09 smtms joined 18:23 [particle] left 18:50 rindolf left
pugs_svn r22774 | azawawi++ | [STD_syntax_highlight] --simple is now --simple-html=filename|- 18:52
r22774 | azawawi++ | [STD_syntax_highlight] default full mode is now --full-html=filename|-
r22774 | azawawi++ | [STD_syntax_highlight] not compatible atm with ETOOMUCHTIME
19:07 ZuLuuuuuu left
pugs_svn r22775 | azawawi++ | [STD_syntax_highlight] added file generation timestamp html comment 19:08
19:12 abra joined 19:19 masak joined 19:22 abra left
pugs_svn r22776 | azawawi++ | [STD_syntax_highlight] ETOOMUCHTIME now generates simple and full html in one run. 19:27
r22776 | azawawi++ | [STD_syntax_highlight] fixed the wallclock benchmarking to nop instead of noc
19:29 abra joined
azawawi moritz_: ? 19:30
moritz_: im trying to execute 'at now' to run ETOOMUCHTIME script but atd seems to be off 19:31
moritz_ azawawi: maybe connected the DST change today?
azawawi moritz_: Can't open /var/run/atd.pid to signal atd. No atd running? 19:32
moritz_ azawawi: and is an atd running? 19:33
azawawi moritz_: nop 19:34
moritz_ are you root on feather1?
azawawi nop ;-)
moritz_ azawawi: try again please 19:35
azawawi moritz_: perfect... i already had one queued ;-)
moritz_: simple and full htmls in one run; within 3 hours we're gonna have some interesting stuff 19:36
moritz_ azawawi: pleae 'use POSIX qw(nice); nice(19)' at the very beginning... ;) 19:37
azawawi moritz_: will do it right now 19:38
moritz_: should i put it in ETOOMUCHTIME or STD_syntax_highlight? 19:39
moritz_ in ETOOMUCHTIME
azawawi and all system() follow the nice 19 afterwards? 19:40
moritz_ yes
all sub processes inherit the parent's nice value 19:41
pugs_svn r22777 | azawawi++ | [STD_syntax_highlight] ETOOMUCHTIME says "let us play 'nice' with others" 19:45
moritz_ nice commit message ;)
azawawi moritz_++
i was aware that you renice things from Perl... that's way too cool.
19:46 justatheory joined 19:55 justatheory left 19:59 [particle] joined 20:03 slavik joined 20:06 [particle] left 20:10 [particle] joined 20:15 pedrob joined 20:20 Ringo47 joined, Ringo47 left 20:26 bjorn` is now known as MrElendig, MrElendig is now known as Guest73769 20:29 Guest73769 is now known as bjorn`
azawawi moritz_: ping 20:35
moritz_ azawawi: pong
azawawi moritz_: check out this updated version: feather.perl6.nl/~azawawi/syn/S02.html
lambdabot Title: S02
azawawi moritz_: s/^c/please c/ ;-) 20:36
moritz_ feather.perl6.nl/~azawawi/html/S02-...imple.html doesn't show any colors 20:37
lambdabot Title: ../../t/spec/S02-whitespace_and_comments/unspace.t, tinyurl.com/692fcy
moritz_ wrong CSS URL?
azawawi oh
stupid caching proxy on my side
try it now... i hate ISP proxies 20:38
moritz_ why do the "simple" and "full" option use different colors?
azawawi really?
moritz_ simple uses bold green for comments, full uses blue 20:39
azawawi oh ;-)
azawawi forgot to add simple comment support to full ;-) 20:40
so simple > full ;-)
i will refactor it once things into one sub once i iron out all the small bugs here & there 20:41
i just dont understand why ISP likes to cache things... it is really stupid... 20:42
i guess small version can be loaded through an iframe 20:43
moritz_ are you sure it's the ISP that does the caching, and not your browser? 20:44
azawawi but they should be on the same domain... although i didnt test that
im 100% sure ;-)
moritz_ when I suspect caching issues I always use wget to circumvent browser cache
azawawi i use CTRL-R- CTRL-F5 different browsers all the time
moritz_ ah, but firefox caches redirects even if you say Ctrl+r :( 20:45
azawawi chrome then ff3 for firebug
chrome caches things the first time you CTRL-R and then the next time it wakes up ;-)
perlcabal.org = feather.perl6.nl... hmmm cool 20:46
iframe will work then
slavik I finally got grammars to semi-work, but it seems that any tokens/regex/rules that I define in a grammar become global ... what is the syntax to match a string against a grammer? (I use pugs, but have rakudo installed) 20:47
moritz_ rakudo has much better grammar support IMHO
slavik I see 20:48
moritz_ currently $string ~~ MyGrammar causes MyGrammar::TOP to match
slavik moritz_: ty
going to try it
moritz_ that will change, though (it's going to be a type check, but we haven't settled on a new syntax yet)
slavik what does TOP have to be? a rule or a token? 20:49
I also found that one of the keywords parses spaces between the braces and the actual regex 20:50
slavik@slavik-desktop:~/code/perl6$ perl6 grammar.pl
too few arguments passed (1) - 2 params expected
This is Rakudo Perl 6, revision 31356 built on parrot 0.7.1-devel 20:51
weird ...
moritz_ slavik: rule or token or regex
toke = regex :ratchet
rule = regex :ratchet :sigspace 20:52
rakudo: grammar Foo { token TOP { ^ ab }; }; if "abc" ~~ Foo { say $/ }
p6eval rakudo 31963: RESULT[0]
moritz_ ouch.
rakudo: grammar Foo { token TOP { ^ ab }; }; if "abc" ~~ &Foo::TOP { say $/ } 20:53
p6eval rakudo 31963: OUTPUT[abā¤]
moritz_ that's not nice, but it seems to work :/
slavik hmm
moritz_ rakudo's idea is that a regex is a code object, which isn't entirely wrong...
20:55 abra left, abra joined
slavik hmm, any idea how I would get pugs to match against a grammar? 20:56
also, how would I force a token to match more than once in a string?
like if a string is "123 456" and I want a token nums { \d+ } to return "123" and "456" 20:58
moritz_ [<nums> \s+]+
or use a rule in the first place...
slavik that would go where?
s/token/rule/ ? 20:59
moritz_ rakudo: rule nums { \d+ }; if "123 456" ~~ m/<nums>+/ { say $/[1] }
p6eval rakudo 31963: OUTPUT[Use of uninitialized valueā¤ā¤]
moritz_ rakudo: rule nums { \d+ }; if "123 456" ~~ m/<nums>+/ { say $<nums>[0] }
p6eval rakudo 31963: OUTPUT[123 ā¤]
moritz_ rakudo: rule nums { \d+ }; if "123 456" ~~ m/<nums>+/ { say $<nums>[1] }
p6eval rakudo 31963: OUTPUT[456ā¤]
moritz_ rakudo: token nums { \d+ }; if "123 456" ~~ m/[<nums> \s+]+/ { say $<nums>[1] } 21:00
p6eval rakudo 31963: OUTPUT[456ā¤]
moritz_ there's more than one way to do it ;)
slavik hmm, pugs doesn't want to cooperate :( 21:02
moritz_: does rakudo do bignum when needed? 21:03
moritz_ rakudo: say 2**65 21:04
p6eval rakudo 31963: OUTPUT[3.68934881474191e+19ā¤]
slavik is there a pugs bot here?
moritz_ sure.
pugs: say 2**65
p6eval pugs: OUTPUT[36893488147419103232ā¤]
slavik ahh, nice 21:05
moritz_: how would I get rakudo to print the whole number the way pugs does it? 21:08
moritz_: any predictions on when a RC perl6 interpreter might be available? 21:09
moritz_ slavik: whole number... dunno, you could try printf
slavik: RC... perhaps in year. Or one and a half. Dunno 21:10
21:10 charsbar left
slavik ty 21:10
moritz_: at this point, would you recommend rakudo or pugs for playing around? 21:11
moritz_ slavik: I mostly play with rakudo because it's actively developed 21:12
slavik likes the idea of Perl6 + Haskell ... 21:13
Although I am sure there will be a Haskell on Parrot version ...
moritz_ well, audreyt has announced that she'll continue pugs development once ghc 6.10.1 is out
slavik I see 21:14
moritz_: another question ... has the parallelization for "for all" loops been tried yet? 21:16
moritz_ slavik: pugs had parallelized hyper ops at some point 21:17
21:23 masak` joined, masak left 21:24 masak` is now known as masak
pmurias slavik: parrot doesn't seems to be a good target for haskell 21:25
slavik :(
pmurias: I have to ask ... why? 21:26
pmurias it has a very sophisticated runtime of it's own
slavik I see
pmurias and it compiles to machine code so compiling to parrot bytecode would be pointless 21:27
21:28 explorer joined
moritz_ unless you want interaction with other languages that parrot might provide one day 21:28
pmurias well you could use the FFI 21:29
it actually a NCI in parrot
pasteling "slavik" at 67.100.227.140 pasted "Statement not terminated properly at line 7, near "token nums"" (11 lines, 178B) at sial.org/pbot/32880
slavik what am I doing wrong there? 21:30
moritz_ in rakudo you need a ; after each token/regex :( 21:31
one of these small annoying details
slavik ahh
that's fine
pugs_svn r22778 | azawawi++ | [smartlinks] Added simple and full version hyperlinks.
r22778 | azawawi++ | [smartlinks] If the simple version is clicked, an iframe loads the
r22778 | azawawi++ | [smartlinks] highlighted p6 test file within the same page.
r22778 | azawawi++ | [smartlinks] If the full version is clicked, a new browser tab is opened
r22778 | azawawi++ | [smartlinks] containing the highlighted p6 code with the full parse tree viewer.
moritz_ oh, and never name a regex "text", rakudo doesn't like it
masak slavik: you must separate rule definitions with semicolons at present
there's an rt ticket about that
slavik ok 21:32
no problem
masak in fact, don't name it anything that's already used by the PGE internals...
slavik so, perl6 is like C++ now? :P
21:32 abra left
masak slavik: no, much more fun :) 21:32
slavik hmm, seems like rakudo is crashing ... 21:33
Multiple Dispatch: No suitable candidate found for 'concatenate', with signature 'PPP->P'
same code as in the paste, but with the ; added after token defs
masak tries
slavik I have rakudo based on parrot 0.8 21:34
21:34 jhorwitz left
masak it's the last line. 21:34
slavik ?
masak it segfaults here, too
slavik: comment out the last line, and the problem goes away
I think /<nums>/ is illegal 21:35
it doesn't refer to the URL grammar in any way
slavik I see
masak you probably meant URL::nums
slavik yes
that is what works in pugs though ...
heh
azawawi moritz_: inlined highlighted p6 code feather.perl6.nl/~azawawi/syn/S02.html ;-) 21:36
lambdabot Title: S02
masak slavik: you also don't need the parentheses
slavik masak: habit from perl5 :P
21:36 meppl joined
slavik also, how come it doesn't match against URL, should I be doing URL::TOP? 21:36
doesn't URL imply URL::TOP? 21:37
masak slavik: you don't need them in that place in Perl 5 either
slavik: right now it does, yes
slavik did not know that
masak slavik: perldoc perlsyn :)
slavik it doesn't match URL, but does match URL::TOP ...
moritz_ azawawi: very nice... I just think that you shouldn't repeat the test name, it's one line of visual clutter 21:38
(in the not-expanded view, that is)
slavik ok, awesome, we're in business ... :D 21:39
moritz_ perhaps just one line with 'Highlighted: <a ...>small</a> | <a ...>full</a<
azawawi hmmm cool
moritz_ wonders why the !#%@Ā²" hell the non-ASCII won't work. 21:40
last time I tried, it would even parse STD.pm on feather1 21:41
slavik masak: if (condition); {} ... wtf?! there has to be a semi-colon after the condition???
moritz_ not at all 21:42
slavik: but you need a whitespace after the 'if', otherwise it's a sub call
masak slavik: no, where'd you get that from.
moritz_ rakudo: if (3 < 5) { say "yes" }
p6eval rakudo 31963: OUTPUT[yesā¤]
moritz_ rakudo: if(3 < 5) { say "yes" } # that should fail
p6eval rakudo 31963: OUTPUT[yesā¤]
masak moritz_: another bug report :) 21:43
masak reports
moritz_ masak: I just wanted to suggest just that ;)
masak :)
21:43 bacek_ left
moritz_ std: if(3 < 5) { say "yes" } # that should fail 21:43
pasteling "slavik" at 67.100.227.140 pasted "Statement not terminated properly at line 11, near "{\n\tsay \"Fu"" (15 lines, 258B) at sial.org/pbot/32881
p6eval std 22778: OUTPUT[parse failureā¤]
slavik put a semi-colon after the condition and it works as expected ... 21:44
moritz_ slavik: but a ; after the grammar { ... } and it works. 21:45
slavik ahh
21:47 ruoso joined
slavik moritz_: that's only for the time being, afaik there shouldn't be a need for ; after {} ... am I correct? 21:47
masak slavik: yes. 21:48
21:48 iblechbot left
masak as long as there's a line break after the '}' 21:48
moritz_ right, every }\n implies a ; (except where inapproprate)
pmurias ruoso: rehi
slavik hmm, but I have }\n ...
ruoso pmurias, hi
moritz_ I was talking about Perl 6, not about rakudo ;)
slavik :( 21:49
masak slavik: it's a bug in Rakudo.
ruoso pmurias, my intent is to make the compiler use the MOP too
slavik masak: unfinished parser?
masak it, too, has been reported already
slavik: certainly.
unfinished most things.
pmurias ruoso: of course the compiler should use the MOP
masak slavik: not Christmas yet.
pugs_svn r22779 | azawawi++ | [smartlinks] format is now "Highlighted: <a>small</a>|<a>full</a>" 21:50
moritz_ but it's going to be November soon ;)
masak indeed.
azawawi moritz_: done... it looks cool. thx
slavik masak: it's cool :) it's still lots of fun playing with things that are broken ^^
pmurias ruoso: but i don't think the grammar rule names should be used as method names what if TimToady changes them? 21:51
slavik feels like I am living on the bleeding edge ...
masak slavik: tell me about it :)
ruoso pmurias, well STD needs to stabilize someda
*someday
slavik although pugs is faster :(
21:52 pbuetow left
slavik and rakudo has a broken bignum :( 21:52
ruoso pmurias, and I think TimToady means the multi-token as the way to extend the language
so the names themselves are very much important
masak slavik: aye.
azawawi pmurias: coming soon... --simple and --full modes in synopsis ;-) im waiting for the cron job to pick up the changes...
masak slavik: anything in particular you want to do with bignums? 21:53
slavik rakudo: my $factorial =1; for 2..22 { $factorial *= $_; } say $factorial;
p6eval rakudo 31963: OUTPUT[Statement not terminated properly at line 1, near "say $facto"ā¤ā¤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)ā¤]
slavik rakudo: my $factorial =1; for 2..22 { $factorial *= $_; }; say $factorial;
p6eval rakudo 31963: OUTPUT[86461594444431360000ā¤]
slavik err
masak seems to work fine.
azawawi @tell lambdabot Hi5 ;-)
lambdabot Nice try ;)
slavik that's a wrong answer ...
rakudo: my $factorial =1; for 2..10 { $factorial *= $_; }; say $factorial; 21:54
p6eval rakudo 31963: OUTPUT[3628800ā¤]
slavik ok, that's correct
moritz_ rakudo: my $factorial =1; for 2..30 { $factorial *= $_; }; say $factorial
slavik pugs: my $factorial =1; for 2..22 { $factorial *= $_; }; say $factorial;
p6eval rakudo 31963: OUTPUT[20404066139399312202792960000000ā¤]
pugs: OUTPUT[1124000727777607680000ā¤]
pmurias azawawi: i watched spiderman 2
too
moritz_ it seems that only infix:<**> promotes to num
slavik compare pugs and rakudo outputs ...
masak slavik: that wrong answer is possibly something you should report to rakudobug 21:55
slavik where is that?
masak rakudobug?
pmurias azawawi: no, it was actuall spider man 3 ;)
slavik yes
azawawi is watching "Pirates of the caribbean: curse of the black pearl" now ;-)
masak oops, wrong channel
moritz_ [email@hidden.address]
slavik ahh, ok
masak moritz_++ is faster on the trigger :) 21:56
moritz_ perl6: my $f = 1; $f *= $_ for 2..25; say $f;
p6eval rakudo 31963: OUTPUT[1193170003333152768000000ā¤]
..elf 22779: OUTPUT[Unknown rule: infix_postfix_meta_operator:=ā¤It needs to be added to ast_handlers.ā¤ at ./elf_f line 1918ā¤]
..pugs: OUTPUT[15511210043330985984000000ā¤]
moritz_ perl 5 agrees with pugs. 21:57
masak pugs has a much saner grip on numbers in general
...compared to rakudo
pmurias azawawi: i watched that before 21:58
moritz_ masak: the only unusual thing with pugs maths is that it clings to fractions much longer than needed
pmurias azawawi: no, actually it was the 3 part too ;)
moritz_ masak: and that it even takes decimal fractions as "real" fractions
ruoso pmurias, I was actually about to ask TimToady to leave 'routine_declarator:method' in viv's output
azawawi pmurias: lol 21:59
22:00 masak left
pmurias ruoso: yes the standard grammar should stabilise, but i think the method names should be seperated from the grammar 22:00
ruoso why? 22:01
pmurias as method names generally state name an action, and rule names are declarative
22:01 ispy_ joined
ruoso hm? 22:01
moritz_ pugs: say 2**65
p6eval pugs: OUTPUT[36893488147419103232ā¤]
pmurias has vs add_attribute
22:01 smg left
pmurias no, thats a different thing 22:02
ruoso exactly...
we have actually few "categories" of tokens
that are extensible in STD
I think to allow this same extensibility from STD in the runtime itself, we need to pass through this categories to the metaclass 22:03
pmurias is something like marco routine_declarator:foo {...} legal?
ruoso yes
so as defining this token....
azawawi moritz_: agentzh seems to have docs/feather/script/update-syn on an hourly cron... it is up2date now ;-) 22:04
pmurias ruoso: if someone wrote a non-STD base grammar for p6 wouldn't it be a bit silly to map MOP calls to STD names 22:05
22:05 [particle] left
ruoso pmurias, hm? how do you mean? 22:06
azawawi announces the new STD syntax-highlighted synopsis: perlcabal.org/syn/S02.html... Click "small" or "Full"
slavik seems like rakudo's variable interpretation is off, too ... "$/<blah>" will output $/ ~ "blah" ...
ruoso pmurias, my point is for people that want to extend STD, not use a different base
pmurias but is specifing that routine_declarator:method maps to add_method hard? 22:07
moritz_ rakudo: token foo { 'bar' }; 'bar' ~~ m/<foo>/; say $/<foo>;
p6eval rakudo 31963: OUTPUT[barā¤]
moritz_ slavik: looks fine for me
ruoso pmurias, that will require the compiler to know every possible keyword for routine_declarator 22:08
my point is that it only needs to know that it need to add something...
something of the routine_declarator "category" 22:09
slavik rakudo: token foo { 'bar' }; 'bar' ~~ m/<foo>/; say "blah: $/<foo>";
p6eval rakudo 31963: OUTPUT[blah: bar<foo>ā¤]
slavik that
pmurias when you add a new keyword you specifiy what metaclass method it maps to
* specify
ruoso pmurias, that is only needed for the package_declarator 'category' 22:10
everything else can follow an uniform api
pmurias token routine_declarator:thingy { <sym> {make quasi {$?CLASS.add_thingy} }} 22:11
ruoso pmurias, but that is not how STD works... I wanted to make it uniform, being in STD, or being an extension 22:12
pmurias i'm not really aware how STD will work as it currently doesn't allow mapping the matched text to what it compiles too 22:14
ruoso hm? what do you mean?
pmurias but i understand that when you add something to the grammar you will have to specify what it will compile to
ruoso: if you add something a new token to a category it has no meaning 22:15
ruoso right... that's the point... I want to delay that meaning to the metaclass
pmurias so there must be a way to specify what it is equivalent too 22:16
ruoso I mean that the compiler should not be aware of that meaning
and delegate that to the metaclass
pmurias the metaclass should not be aware of the parser
ruoso but it can be aware of the AST 22:17
maybe
or some higher-level representation...
pugs_svn r22780 | moritz++ | [t/spec] added two bigint tests, slavik++
22:17 bsb joined
slavik ^^ 22:17
ruoso or maybe even the method signature in the metaclass would be bound to the AST somehow
slavik do I get a brownie point?
pmurias it's not very clear what the AST is 22:18
moritz_ perlbot: karma slavik
perlbot Karma for slavik: 1
slavik awesome
ruoso pmurias, not yet... it will need to become clear sometime
slavik has trouble building pugs from svn ... 22:19
ruoso pmurias, and stabilize just as STD needs to
slavik I have to use cabal ...
moritz_ slavik: the cabal route worked fine for me, and I've even got success reports from win Xp
slavik well, the only problem I have with cabal is that it doesn't have the latest svn of pugs 22:20
pmurias ruoso: it might but it might also have multiple represantations which can translate to each other on demand
moritz_ slavik: does 'perl Makefile.PL; make' not work for you?
ruoso pmurias, which means that binding to a signature is not very far from real 22:21
slavik moritz_: going to try again ... but it was something related to ghc on my system
pmurias ruoso: ?
ruoso pmurias, thinking on the Catalyst::Controller example... let's suppose we want to support the following syntax: 22:22
slavik moritz_: I would get an error about something Boolean and it told me to "report this bug" or something of the sort
ruoso controller Foo { action bar does Authentication('realm') does Authorization('role') ($foo){ ... } } 22:23
then the metaclass for the controller could have the method
22:23 bennymac1 left
moritz_ slavik: what's your svn revision? 22:24
ruoso pmurias, it would then have a method in the metaclass that would look something like: register_routine_declarator:action ($:trait, $:signature, $:block) {}
moritz_ azawawi: all the 'small' links in S29 are 404s for me... are they just not yet generated, or borked paths?
slavik moritz_: I am updating it now
pmurias ruoso: how would the grammar modifing part look? 22:25
slavik moritz_: I wasn't too concerned with getting svn pugs to build after I found that cabal worked fine and I could mess around with perl6
moritz_ slavik: and is your repo URL svn.pugscode.org/pugs ? if not, you are on an old mirror
lambdabot Title: pugs - Revision 22780: /
ruoso pmurias, it can be identical to routine_declarator:method
slavik hmm 22:26
ruoso with just the "method" part being different
pmurias, because that syntax is already supported by method
std: class Foo { method bar ($:trait, $:signature, $:block) does Authentication('realm') does Authorization('role') {...} }
p6eval std 22780: OUTPUT[parsedā¤]
ruoso pmurias, my previous example had the traits in the wrong place 22:27
slavik Updated to revision 22780.
:)
ruoso it just changes the keyword... and thus changing the meaning of the traits
and the meaning of the signature also 22:28
pmurias ruoso: i understand what you are aiming for but i would rather directly specify that routine_declarator:action maps to add_action
ruoso pmurias, in the compiler?
azawawi moritz_: still generating... i think we should postpone the generation of big files like rx.t to the last of work queue 22:29
pmurias ruoso: in the grammar
ruoso pmurias, the problem with that is not being uniform in how this things work 22:30
moritz_ has the feeling that S29 takes endlessly to display
slavik make[1]: *** No rule to make target `/usr/lib/perl/5.8/Config.pm', needed by `Makefile'. Stop.
my system uses 5.10
ruoso pmurias, I want to take the extensibility STD opens to the compiler itself 22:31
delaying the semantics of that to the metaclasses
for every declarator
including the ones defined by STD
moritz_ slavik: did you do a 'make realclean'
slavik no, will do it now
no such target ... maybe I should refetch it? 22:32
pmurias ruoso: you are aware that it's possible to replace the grammar for perl6
slavik wait, wrong dir ...
azawawi moritz_: btw, chrome's webkit engine shows what html elements get ignored by the parser (via the inspector)...
ruoso pmurias, yes, I am... but I'd like to make it less needed...
pmurias, for instance... just declaring a token that is identical to one already existing 22:33
pmurias, but with a different keyword
pmurias, then I could register in the compiler that the metaclass Foo takes care of the package_declarator foo
pmurias ruoso: i think we should ask TimToady what he thinks of it 22:34
ruoso last time he said "I don't really care" :P
pmurias but i think the degree with which we entangle the metamodel and the grammar is important 22:35
i belive that they should be completly seperated but i understand your aproach
ruoso I just want to make sure it's very easy to create things like this Catalyst::Controller example 22:36
22:38 meppl left
pmurias class Controller is keyword("controller") { method add_action is declarator("action") {...} } 22:38
if you're doing something fancy use a module ;)
ruoso well.. I'm not really sure how the above code would fit... but I suppose there could be a module that would help doing extensions... 22:39
but my point is that we can make the compiler aware of that extensibility
pmurias use Metaclass;
ruoso and it will be much easier to do things like that then
pmurias ruoso: when you add something to a grammar you can make the compile aware what it should compile to with make 22:40
STD is compiler agnostic so it doesn't have such rules
ruoso my point is that it the extensions can also be compiler agnostic
pmurias what you really want by your proposal is for them to be builtin 22:41
ruoso for them to be able to "pretend" to be built-in 22:42
22:42 slavik left
ruoso tes 22:42
yes
that's the point... allowing extensions to work just like the built-ins do
pmurias s/allowing/forcing 22:43
or at least encouragin
ruoso hmmm... I really see "working as a built-in" as an advantage
and something to be pursued...
pmurias generally yes 22:44
ruoso and I understand that is the intention in the way STD is designed
I just want to take this vision to the compiler also
pmurias but it also frees you to change stuff to whatever you want
what i want to prevent is the grammar creeping into other parts of the compiler 22:45
ruoso I'm not talking about defining a new language...
it's just a new keyword in a given specific multi-token
which STD already was designed to support extensibility
I'm accepting the structure of STD 22:46
and the compiler would work on top of that structure
pmurias the MOP in this case 22:47
ruoso the MOP is already tied to that in a way
because add_method will need to receive everything that is in the method_def token
and it won't expect to receive things that are not there.. 22:48
I just want to make that tie explicit, and extensible
pmurias add method will receive the method name and a method
ruoso: don't make add_method receive a Match, please 22:49
ruoso hmmm.... ok... I wasn't realizing the compiler was already instantiating the Method object before... 22:50
fine... that means we need two hooks instead of one
I still argue to make the MOP API oriented to the way STD define the multi-tokens 22:51
but it can receive an object that was initialized by the compiler
and that way the compiler needs to support hooks that will receive Match (or AST) and return a new object 22:52
pmurias but does Foo.HOW.register_routine_declarator:method('foo',sub {say "foo"}) seems sensible to you
ruoso: the grammar can have such hooks
s/seems/see
m
ruoso not really... if we go that way... we need to have... Foo.HOW.register_routine_declarator:method($fully_initialized_method_object) 22:53
and Method has $.name
pmurias, the grammar already has the hooks... it's just the compiler that needs to support new variants for each of the multi-tokens 22:54
pmurias that's just plainly ugly
register_routine_declarator:method is not an acceptable method name 22:55
with a stange parameter too
ruoso well, we can work out a better name
but I do think it needs to be related to the STD multi-tokens 22:56
so that the compiler can call the method without knowing what it means
pmurias why? 22:57
the grammar specifies what a given bit of text is
ruoso because new keywords would not require a change in the compiler
pmurias they do, the grammar is a part of the compiler
it can even be viewed as the compiler itself 22:58
ruoso well... compilers are usually splitted in two parts
the parsing and the emitting
my point is that if the "emitting" part supports the multi-tokens, it won't need to change when the "parsing" part changes 22:59
pmurias but you can't have a good method name with routine_declarator:method in it 23:01
ruoso we can have it just as "add_routine_declarator", and receive ($keyword, $object) as arguments... 23:02
anyway...
ruoso later &
pmurias it's even worse
ruoso let's mature this more...
pmurias ruoso: you mean talk about it later? ;) 23:03
23:09 elmex left 23:10 explorer left 23:20 pmurias left 23:24 sri_kraih_ joined 23:31 smg joined 23:32 sri_kraih left 23:41 zamolxes left 23:43 pedrob left 23:48 meppl joined 23:50 ispy_ left