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. |
|||
00:03
bacek left
00:05
cjfields left
00:08
FurnaceBoy is now known as FurnaceBoyAway
00:14
japhb left,
japhb joined
00:18
c1sung left
00:19
c1sung joined
00:26
drbean joined
00:35
bacek joined
00:49
alanhaggai joined
01:18
penk joined
01:24
penk left,
penk joined
01:26
Ched- left,
Ched- joined
|
|||
pasteling | "diakopter" at 209.9.237.164 pasted "[yap6] progress... take a look!" (12 lines, 667B) at sial.org/pbot/31193 | 01:30 | |
diakopter | moritz or Auzon: would it be possible to add yap6 to the evalbot as something that can be invoked, but not one that auto-replies to perl6: ? | 01:32 | |
01:34
lichtkind joined
|
|||
lichtkind | %ziffern = {0, 'null', 1, 'eins'}; | 01:35 | |
is this a block returning a array? | |||
pugs_svnbot | r20642 | diakopter++ | [yap6] | 01:37 | |
r20642 | diakopter++ | my/our declarations work (but the distinction | |||
r20642 | diakopter++ | doesn't mean anything yet) | |||
r20642 | diakopter++ | variable declaration is required before using it | |||
r20642 | diakopter++ | making some headway toward generalizing the | |||
r20642 | diakopter++ | grammar-system so that the rules can be defined | |||
r20642 | diakopter++ | more declaratively. use Perl6in5::Grammar; #etc | |||
r20642 | diakopter++ | probably some other improvements I'm forgetting. | |||
02:00
lichtkind left
02:02
c1sung left
02:03
c1sung joined
02:21
edpratomo joined
02:31
Limbic_Region left
02:58
pbuetow is now known as pbuetow_
03:03
FurnaceBoyAway left
03:23
Lunchy left
03:28
Lunchy joined
03:38
snooper joined
03:39
r0bby left,
alanhaggai left,
alanhaggai_ joined
03:43
r0bby joined
03:49
pbuetow_ left
03:50
redicaps joined
04:01
Alias_ joined
04:03
Alias__ joined
04:09
redicaps left
04:21
Alias_ left
04:26
redicaps joined
04:31
nekobaka joined,
nekobaka left
04:32
justatheory left,
nekobaka joined,
wknight8111 left
04:34
yath left,
yath joined
04:55
Ched- left
04:57
nipotan is now known as nipotaway
05:00
Alias__ left,
Alias_ joined
|
|||
Auzon | diakopter: Yes, we can do that. nqp is implemented in the same way | 05:09 | |
diakopter | Auzon: neat... point me in the right direction and I can do it | 05:19 | |
Auzon | Evalbot's source is in pugs/misc/evalbot I believe | ||
evalbot.pl is the file to edit. | 05:20 | ||
you can diff r20510 and r20497 to find out how I added elf to it. | 05:21 | ||
diakopter fights with the parser generator generator | 05:24 | ||
breakthrough | 05:28 | ||
05:33
schmalbe joined
05:39
alanhaggai_ left,
alanhaggai_ joined
05:40
erikh joined
|
|||
erikh | :) | 05:40 | |
05:43
alanhaggai_ left
05:45
kolibrie left
05:52
alanhaggai joined
05:53
kolibrie joined,
schmalbe left
05:58
justatheory joined
|
|||
moritz_ | good morning | 05:58 | |
diakopter: yap6 has quite high version dependencies on many perl modules... are they really all needed in such new versions? | 05:59 | ||
diakopter | moritz_: no... most of them aren't needed at all | 06:07 | |
that was wishful thinking :D | 06:08 | ||
moritz_ | diakopter: ok, I'll (locally) revert the version to older values, test the stuff, and commit if it works | 06:09 | |
s/older/lower/ | 06:10 | ||
06:13
kolibrie left
|
|||
moritz_ | diakopter: Makefile.PL complains about missing 'Compiler.pm' | 06:16 | |
06:18
justatheory left
|
|||
diakopter | I've never used the Makefile... it's merely stubbed in for an eventuality there was a reason I volunteered to do it :) | 06:18 | |
moritz_ | ok, so how do I run a program with yap6? | ||
06:21
stevan_ joined
|
|||
diakopter | just pipe the commands on STDIN to sbin/perl6 | 06:23 | |
but, the version in pugscode svn does only simple arithmetic and variable declaration/assignment. | 06:24 | ||
and 'say' | |||
it enforces 'my', too. | |||
moritz_ | I just looked at sbin/perl6 | ||
seems like it supports filenames as well | |||
diakopter | yeah, that too. | ||
moritz_ | (which is how the rest of the implementations are handled in evalbot) | ||
diakopter | oh, ok | 06:25 | |
so you'll need File::Slurp | |||
Alias_ | Doesn't Perl 6 have a slurp command yet? | 06:26 | |
Oh wait, the IO in parrot isn't done, is it | |||
moritz_ | Alias_: it does, but perl 5 does not ;) | ||
Alias_ | If you don't want a dependency, there's a nice convenient one you can cut and past at PPI::Util::_slurp | 06:27 | |
moritz_ | Alias_: I don't want to change anything, I just want be able to run diakopter's program ;) | 06:29 | |
Alias_ | ah :) | 06:31 | |
I think I'll shut up now | |||
diakopter prepares to be embarassed | 06:32 | ||
moritz_ | echo 'say 1;' | perl -Ilib ./sbin/perl6 | 06:33 | |
Adding AST node: ["__PACKAGE__::say",1] | |||
diakopter | cool | ||
moritz_ | echo 'say 1+2;' | perl -Ilib ./sbin/perl6 | 06:34 | |
Adding AST node: ["__PACKAGE__::say",3] | |||
diakopter | echo 'my $a=4;my $b = 2**(3+$a); say $b' | ||
moritz_ | and it even does constant folding! | ||
diakopter | har | ||
_sort_of_ | 06:35 | ||
but yeah, with the CPStyle, that will be much easier | |||
06:38
exp_evalbot left
|
|||
pugs_svnbot | r20643 | moritz++ | [evalbot] first shot at evalbot'ting yap6 | 06:38 | |
06:39
exp_evalbot joined
|
|||
moritz_ | yap6: my $x = 3; say $x; | 06:39 | |
exp_evalbot | No output (you need to produce output to STDOUT) | ||
moritz_ | urks | ||
Can't open perl script "sbin/perl6": No such file or directory | |||
seems like I screwed up good ;) | 06:40 | ||
diakopter | ha | ||
06:41
exp_evalbot left
|
|||
pugs_svnbot | r20644 | moritz++ | [evalbot] chdir to yap6/src/ before executing | 06:41 | |
06:41
exp_evalbot joined
|
|||
moritz_ | the src/ part was missing | 06:41 | |
yap6: my $x = 3; say $x; | 06:42 | ||
exp_evalbot | No output (you need to produce output to STDOUT) | ||
moritz_ | reading input file failed at sbin/perl6 line 16. | ||
diakopter | input file on relative path? | ||
moritz_ | no, absolute path | ||
it's a temp file | |||
06:43
poletti left
|
|||
moritz_ is stupid | 06:43 | ||
06:43
exp_evalbot left
|
|||
pugs_svnbot | r20645 | moritz++ | [evalbot] hopefully pass the right filename to yap6 | 06:43 | |
06:44
exp_evalbot joined
|
|||
moritz_ | yap6: my $x = 3; say $x; | 06:44 | |
exp_evalbot | OUTPUT[Adding AST node: ["__PACKAGE__::declare","my","\$x"]Adding AST node: ["__PACKAGE__::assign","\$x",3]Adding AST node: ["__PACKAGE__::say",3]] | ||
06:44
alanhaggai left,
alanhaggai joined
|
|||
diakopter | yap6: my $cool=1; my $moritz=$cool; say $moritz; | 06:44 | |
exp_evalbot | OUTPUT[Adding AST node: ["__PACKAGE__::declare","my","\$cool"]Adding AST node: ["__PACKAGE__::assign","\$cool",1]Adding AST node: ["__PACKAGE__::declare","my","\$moritz"]Adding AST node: ["__PACKAGE__::assign","\$moritz",1]Adding AST node: ["__PACKAGE__::say",1]] | ||
diakopter | perl6: my $cool=1; my $moritz=$cool; say $moritz; | 06:45 | |
exp_evalbot | kp6 r20645: OUTPUT[1] | ||
..pugs: OUTPUT[1] | |||
..rakudo r28058: OUTPUT[1] | |||
..elf r20645: OUTPUT[1] | |||
diakopter | cool; thanks moritz_ | ||
moritz_ | diakopter: you're welcome | ||
diakopter | yap6: $cool=1; | 06:47 | |
exp_evalbot | OUTPUT[Illegal usage: "\$cool has yet to be declared Syntax Error...!] | ||
06:47
araujo left
|
|||
diakopter | yap6: my $bigint=298498729837498279857298467928379827349872983794283; say $bigint**22 | 06:48 | |
exp_evalbot | OUTPUT[Adding AST node: ["__PACKAGE__::declare","my","\$bigint"]Adding AST node: ["__PACKAGE__::assign","\$bigint","298498729837498279857298467928379827349872983794283"] Syntax Error...!] | ||
diakopter | yap6: my $bigint=298498729837498279857298467928379827349872983794283; say $bigint**22; | ||
exp_evalbot | OUTPUT[Adding AST node: ["__PACKAGE__::declare","my","\$bigint"]Adding AST node: ["__PACKAGE__::assign","\$bigint","298498729837498279857298467928379827349872983794283"]Adding AST node: | ||
..["__PACKAGE__::say","281018379062767445728981169780389290529035844269992235764458544260114746908616637642082803103989983586679589438332442517544242575541618894... | |||
diakopter | har | ||
sorry; was just testing the irc constraints there... I hope exp_evalbot didn't get banned. :D | |||
moritz_ | no, it limits the output | 06:49 | |
diakopter | ah, good :) | ||
yap6: our $a=2; | 06:50 | ||
exp_evalbot | OUTPUT[Adding AST node: ["__PACKAGE__::declare","our","\$a"]Adding AST node: ["__PACKAGE__::assign","\$a",2]] | ||
moritz_ | I tried to think of every security relevant aspect while writing evalbot... | ||
so I took care the output doesn't start with arbitrary characters (not to trigger bot), limit resources etc. | |||
diakopter | yap6: my $a = $b; | 06:52 | |
exp_evalbot | OUTPUT[Illegal usage: "Undeclared variable \$b Syntax Error...!] | ||
diakopter | yap6: my $aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa = $b; | 06:53 | |
exp_evalbot | OUTPUT[Illegal usage: "Undeclared variable \$b Syntax Error...!] | ||
diakopter | yap6: my $aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa = 1; | ||
exp_evalbot | OUTPUT[Adding AST node: ["__PACKAGE__::declare","my","\$aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"]Adding AST node: ["__PACKAGE__::assign","\$aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",1]] | ||
diakopter | nice. this is much more convenient than using a shell. okay, I'll privmsg it | 06:54 | |
moritz_ | heh ;) | 06:55 | |
maybe should set up a REPL ;) | |||
then you'll even see newlines as newlines, not as  | 06:56 | ||
07:00
kolibrie joined
07:08
luqui joined
07:12
iblechbot joined
07:13
meppl joined
07:17
meppl left
07:24
pmurias joined
07:39
ruoso left
|
|||
diakopter | moritz_: does your evalbot machine have Symbol::Glob :D | 07:46 | |
btw if you install it from CPAN, it has two undocumented prereqs - Class::Std and Class::Std::Utils | 07:48 | ||
moritz_ | diakopter: installing it... | 08:04 | |
diakopter: done | 08:05 | ||
diakopter | awesome | 08:10 | |
08:33
epico joined
08:34
epico left
08:38
alanhaggai_ joined
08:43
IngoLiebhaber joined
08:47
IngoLiebhaber left
08:48
iblechbot left
08:49
elmex joined
08:50
IngoLiebhaber2 joined
08:52
alanhaggai left
|
|||
IngoLiebhaber2 | mhh is iblechbot gone? | 08:53 | |
moritz_ | seems like | 08:55 | |
08:56
luqui left
|
|||
moritz_ | it did join roughly 4 hours ago, though | 08:56 | |
pugs_svnbot | r20646 | diakopter++ | [yap6] | 08:59 | |
r20646 | diakopter++ | more modular rule declaration... some work toward | |||
r20646 | diakopter++ | string literals. | |||
09:01
BinGOs_ joined
|
|||
pmurias | diakopter: why did you create so many empty files in yap6? | 09:08 | |
09:09
BinGOs left
|
|||
diakopter | pmurias: Just placeholders for the coding I do in my brain before I type it | 09:11 | |
09:12
IngoLiebhaber2 left
09:13
chris2 joined
09:15
BinGOs_ is now known as BinGOs
09:16
luqui joined
09:22
bacek left
09:28
alanhaggai_ left
09:30
alanhaggai joined
09:32
sri_work_ left,
redicaps left
09:57
r0bby left
10:00
luqui left,
ruoso joined
10:07
hcchien left
10:14
edpratomo left,
hcchien joined
|
|||
moritz_ | rakudo: my &a = sub { 1 }; say a(); | 11:14 | |
exp_evalbot | rakudo r28058 OUTPUT[1] | ||
moritz_ | is that valid? | ||
pugs requires binding for that | 11:15 | ||
which somehow makes sense, because if you acess a(), you use the container, not the contents of the variable | |||
and assignment to the container is binding | |||
ruoso | &a is no longer sub invocation in p6 iirc | 11:22 | |
it's just a variable name | |||
moritz_ | ruoso: yes, but a() invokes the sub bound to &a | 11:23 | |
ruoso | which is a container that happens to have been assigned sub { 1 } | 11:24 | |
rakudo: say VAR(&a) | 11:25 | ||
exp_evalbot | rakudo r28058 OUTPUT[Scope not found for PAST::Var 'a'current instr.: 'parrot;PCT::HLLCompiler;panic' pc 156 (src/PCT/HLLCompiler.pir:103) | ||
ruoso | pugs: say VAR(&a) | ||
exp_evalbot | OUTPUT[***  Unexpected ")" expecting "::" or signature value Variable "&a" requires predeclaration or explicit package name at /tmp/Y5jZjHAE1b line 1, column 11] | ||
moritz_ | pugs: my &a; say VAR(&a) | ||
exp_evalbot | OUTPUT[<SubPrim(&)>] | ||
moritz_ | rakudo: my &a; say VAR(&a) | ||
exp_evalbot | rakudo r28058 OUTPUT[Could not find non-existent sub VARcurrent instr.: '_block11' pc 34 (EVAL_11:21) | ||
ruoso | pugs: my &a; VAR(&a).STORE(sub { 1 }) | 11:26 | |
exp_evalbot | OUTPUT[*** No such method in class Sub: "&STORE" at /tmp/SNvhqw4QgV line 1, column 8 - line 2, column 1] | ||
11:27
alanhaggai left
|
|||
ruoso | pugs: my &a; &a.STORE(sub { 1 }) | 11:27 | |
exp_evalbot | OUTPUT[*** No such method in class Sub: "&STORE" at /tmp/EwvsLLp82J line 1, column 8 - line 2, column 1] | ||
ruoso | that seems to be the problem... | ||
pugs doesn't use &a as a variable... | |||
but am I correct? is &a really a variable? | 11:28 | ||
yes I am | 11:29 | ||
it is a variable | |||
moritz_ | yes, & is a valid sigil | ||
does Callable | |||
ruoso | if it is a variable it is a container | 11:30 | |
if it is a container, it must have STORE, right? | |||
moritz_ | presumably | 11:31 | |
so assignment to a &a variable should work? | 11:32 | ||
there's only one test for it in t/ | 11:33 | ||
t/var/constant.t 162: try { &wobble = { 23 } }; | |||
and that's for testing that 'wobble' is constant, not that the assignment actually works | 11:34 | ||
11:35
braceta joined
|
|||
ruoso | but that would result in a different failure | 11:35 | |
pugs: my &a is readonly; &a = { 23 } | 11:36 | ||
exp_evalbot | OUTPUT[*** Can't modify constant item: VStr "MkCode {isMulti = True, subName = \"&\", subType = SubPrim, subOuterPads = [], subInnerPad = MkPad (padToList []), subPackage = , subAssoc = AIrrelevantToParsing, subParams = [], subBindings = [], subSlurpLimit = [], subReturns = (mkType \"Any\"), | ||
..subLValue = False, subBody = Prim ([Pugs.AST.Internals... | |||
moritz_ | aye | ||
ruoso | hmm | ||
moritz_ | pugs: my &a is readonly; &a := { 23 }; | ||
exp_evalbot | RESULT[\:() "$_" := "Scalar" #<Scalar:0xb712fbac> "&?BLOCK" := "Sub" #<Sub:0xb6604cec> {, "&a" := "Sub" #<Sub:0xb7a8a928>, "$_" := "Scalar" #<Scalar:0xb7170dc4> "@_" := "Array" #<Array:0xb71d236c> | ||
.. ... | |||
moritz_ | pugs: my &a is readonly; &a := { 23 }; say a() | ||
exp_evalbot | OUTPUT[23] | ||
moritz_ | pugs: my &a = { 23 }; say a() | 11:37 | |
exp_evalbot | OUTPUT[*** Can't modify constant item: VStr "MkCode {isMulti = True, subName = \"&\", subType = SubPrim, subOuterPads = [], subInnerPad = MkPad (padToList []), subPackage = , subAssoc = AIrrelevantToParsing, subParams = [], subBindings = [], subSlurpLimit = [], subReturns = (mkType \"Any\"), | ||
..subLValue = False, subBody = Prim ([Pugs.AST.Internals... | |||
ruoso | but it seems the problem in pugs is clear.. | ||
pugs: my $a = sub { 23 }; say $a(); | |||
exp_evalbot | OUTPUT[23] | ||
ruoso | &a was supposed to be a variable just like $a | 11:38 | |
for some reason, pugs is special casing it | |||
pugs: my $a; VAR($a).STORE(sub { 23 }); say $a(); | |||
exp_evalbot | OUTPUT[*** No such method in class Scalar: "&STORE" at /tmp/K4N9XS0HW4 line 1, column 8-33] | ||
ruoso | uh? | ||
moritz_ | I don't think pugs implements that correctly | 11:39 | |
it just does assignment and binding wihtout calling STORE | |||
ruoso | oh... ok... it special cases everything then ;) | ||
moritz_ | yes | 11:40 | |
pugs seemes to have the "get 90% of real world cases right" philosophy | |||
which seems to be a quite popular approach for implementing a Perl 6 compiler | 11:41 | ||
because the specced behaviour is often hard to get right, hard to understand and doesn't promise quick results | |||
11:49
chris2 left
|
|||
diakopter | moritz_: which Test.pm does each implementation use/favour? | 11:53 | |
moritz_ | diakopter: pugs uses ext/Test/, rakudo its own | 11:54 | |
kp6 also has a hand-rolled Test.pm | 11:55 | ||
diakopter | hrm | ||
moritz_ | kp6's is in v6/v6-KindaPerl6/src-modules/Test.pm | 11:56 | |
that a very primitive one ;) | |||
11:59
Maghnus left
12:04
alanhaggai joined
12:08
justatheory joined,
bacek joined
|
|||
pmurias | S12:443 C<VAR> is a no-op on a non-scalar variables and values | 12:10 | |
diakopter | pugs: say "2"~(say 3)~"4" | 12:15 | |
exp_evalbot | OUTPUT[3214] | ||
diakopter | pugs: say "2"~(say "3")~"4" | ||
exp_evalbot | OUTPUT[3214] | ||
diakopter | pugs: say " 2 "~(say " 3 ")~" 4 " | ||
exp_evalbot | OUTPUT[ 3  2 1 4 ] | ||
moritz_ | the argument list is evaluated before any output is made | 12:16 | |
diakopter | it says the 3 first, then it cats the 2, the result of say3 and the 4. | ||
moritz_ | but I don't think it has to be this way | ||
diakopter | say say 4 | 12:17 | |
moritz_ | it is allowed to lazily evaluated them, and print each item of the arg list immediately | ||
diakopter | pugs: say say 4 | ||
exp_evalbot | OUTPUT[41] | ||
diakopter | pugs: say say say say 3 | ||
exp_evalbot | OUTPUT[3111] | ||
diakopter | pugs: say !say say !say 3 | ||
exp_evalbot | OUTPUT[31] | ||
diakopter | pugs: say([say 5]) | 12:18 | |
exp_evalbot | OUTPUT[51] | ||
diakopter | pugs: say([say 5].perl) | ||
exp_evalbot | OUTPUT[5[Bool::True,]] | ||
diakopter | so Bool::True stringifies to 1 | 12:19 | |
pugs: say((say 5).perl) | |||
exp_evalbot | OUTPUT[5Bool::True] | ||
diakopter | pugs: say({say 5}.perl) | 12:20 | |
exp_evalbot | OUTPUT[:() "$_" := "Scalar" #<Scalar:0xb7121448> "&?BLOCK" := "Sub" #<Sub:0xb6604dac> {"$_" := "Scalar" #<Scalar:0xb71d2d4c> "@_" := "Array" #<Array:0xb71d02f8> "&?ROUTINE" := "Sub" #<Sub:0xb6604dac> | ||
.. "&?BLOCK" := "Sub... | |||
diakopter | pugs: {say} | ||
exp_evalbot | OUTPUT[] | ||
diakopter | pugs: {say}.say | 12:21 | |
exp_evalbot | OUTPUT[<SubBlock(<anon>)>] | ||
diakopter | pugs: {say}.perl | ||
exp_evalbot | RESULT[":() \"\$_\" := \"Scalar\" #<Scalar:0xb684b314>\n \"\&?BLOCK\" := \"Sub\" #<Sub:0xb6604cec> \{, , \"\$_\" := \"Scalar\" #<Scalar:0xb71d2d98>\n \"\@_\" := \"Array\" #<Array:0xb71d048c>\n | ||
..\"\&?ROUTINE\" := \"Sub\" #<Sub:0xb6604cec>\n ... | |||
diakopter | pugs: {say}.WHAT | ||
exp_evalbot | RESULT[::Block] | ||
moritz_ | the serialization of code in pugs is... well... suboptimal ;) | ||
diakopter | pugs: {say}.WHAT? | 12:22 | |
exp_evalbot | OUTPUT[***  Unexpected "?" expecting term postfix or operator at /tmp/48yUldpzQH line 1, column 11] | ||
diakopter | {say}!this | ||
ooo it didn't like that | |||
pugs: {say}!this | 12:23 | ||
exp_evalbot | OUTPUT[*** Odd number of elements found where hash expected: VCode (MkCode {isMulti = False, subName = "<anon>", subType = SubBlock, subOuterPads = [PRuntime {pr_pad = MkPad (padToList [("$_",PELexical {pe_type = (mkType "Scalar"), pe_proto = <Scalar:0xb6607bec>, pe_flags = MkEntryFlags | ||
..{ef_isContext = True}, pe_store = <ref:0xb660a214>}),("@_",... | |||
diakopter | ok ok | ||
hm; why did it want that to be a hash? | |||
diakopter tails to work | 12:24 | ||
12:27
pjcj joined
|
|||
ruoso | pmurias, re: no-op VAR on non-scalar.... does that mean that &a = sub { 1 } is invalid? | 12:49 | |
I always thought that every variable could be used as scalar... | 12:54 | ||
like... | |||
@a = @b | |||
lambdabot | Maybe you meant: activity activity-full admin all-dicts arr ask . ? @ v | ||
ruoso | I would STORE in '@a' a copy of the items of '@b' | ||
pugs: @a.STORE(1,2,3,4) | 12:55 | ||
exp_evalbot | OUTPUT[***  Unexpected "." expecting "::" Variable "@a" requires predeclaration or explicit package name at /tmp/GF22Y7LEIi line 1, column 3] | ||
ruoso | pugs: my @a; @a.STORE(1,2,3,4) | 12:56 | |
exp_evalbot | OUTPUT[*** No such method in class Array: "&STORE" at /tmp/2m15yMUaGx line 1, column 8 - line 2, column 1] | ||
ruoso | that's odd... so every list-to-list assignement needs to be made in more than one step... | 13:00 | |
I was expecting STORE to be available to do that... | |||
moritz_ | ruoso: don't rely on an implementation to test your understanding of the specs | ||
ruoso | moritz_, I'm actually looking at S29 | 13:01 | |
bacek | pugs: my @a.STORE(1..5); say ~@a; | 13:04 | |
exp_evalbot | OUTPUT[***  Unexpected "@a" expecting "=", ".=", context, ":" or "(" at /tmp/TwxucELM5N line 1, column 4] | ||
ruoso | pugs: my $a; VAR($a).STORE(1..5); say $a; | ||
exp_evalbot | OUTPUT[*** No such method in class Scalar: "&STORE" at /tmp/Bpe7autOzh line 1, column 8-27] | ||
ruoso | oh sure... pugs doesn't have STORE... | 13:05 | |
kp6: my $a; VAR($a).STORE(1..5); say $a; | |||
exp_evalbot | kp6 r20646: OUTPUT[syntax error at position 20, line 1 column 20:my $a; VAR($a).STORE(1..5); say $a ^ HERE] | ||
bacek | pugs: my @a=(1..5); my @b=@a; @a[0]=7; say ~@a; say ~@b; | ||
exp_evalbot | OUTPUT[7 2 3 4 51 2 3 4 5] | ||
ruoso | pugs: my $a; my $b = (1,2,3); VAR($a).STORE($b); say $a; | 13:06 | |
exp_evalbot | OUTPUT[*** No such method in class Scalar: "&STORE" at /tmp/86xZKKM6zV line 1, column 25-42] | ||
ruoso | kp6: my $a; my $b = (1,2,3); VAR($a).STORE($b); say $a; | ||
exp_evalbot | kp6 r20646: OUTPUT[123] | ||
ruoso | kp6: my @a; my $b = (1,2,3); VAR(@a).STORE($b); say $a; | 13:07 | |
exp_evalbot | kp6 r20646: OUTPUT[] | ||
ruoso | kp6: my @a; my $b = (1,2,3); VAR(@a).STORE($b); say @a; | ||
exp_evalbot | kp6 r20646: OUTPUT[123] | ||
ruoso | kp6: my @a; my $b = (1,2,3); @a.STORE($b); say @a; | ||
exp_evalbot | kp6 r20646: OUTPUT[] | ||
bacek | pugs: my $a=(1..5); my @b=$a; say ~@b; | ||
exp_evalbot | OUTPUT[1 2 3 4 5] | ||
bacek thinks that everything just works... | 13:08 | ||
ruoso | bacek, the question is if every variable is a container, and if every container can STORE | ||
S12 seems to imply that @a can't STORE | 13:09 | ||
the thing is... | |||
moritz_ | TimToady mentioned that the scalar container forwards methods to its contents, while all other containers don't | ||
so @a.STORE only works, if STORE is specced in the role that the '@' sigil implies | 13:10 | ||
which is Positional, iirc | |||
ruoso | If I can't VAR(@a).STORE(...), then I can't replace the array inside a variable, which means that @a = (1,2,3); @a = (2,3,4) would not destroy the first array, but replace the items on that same array | 13:11 | |
which is odd | |||
moritz_ | let's wait for the allmighty TimToady to clarify it ;) | 13:12 | |
ruoso | I was expecting to implement @a = (1,2,3) as VAR(@a).STORE(1,2,3), which can actually replace the array | ||
and would make a real difference on bind × assign | |||
13:21
meppl joined
|
|||
ruoso | ok... thinking better... I realised I'm confusing things out... | 13:24 | |
every variable points to a container, this is how bind can work. binding works by replacing the container... | 13:25 | ||
but this is not necessarly visible to the language | |||
13:26
jhorwitz joined
|
|||
ruoso | VAR($a) is necessary because all other variables have alternative access methods to the values... @a[0] or %a<foo> | 13:26 | |
but this is at syntax level | 13:27 | ||
13:27
TJCRI joined,
smtms left
|
|||
ruoso | therefore there's no way to confuse when you're calling a method on a value or on the variable itself | 13:27 | |
$a.foo is always a method call on the value inside the scalar, while @a.foo is always a method call on the variable @a | 13:28 | ||
which means | |||
$a.foo is actually ____RESOLVE_VARIABLE_NAME___('$a').FETCH.foo | 13:30 | ||
and | |||
@a.foo is actually ____RESOLVE_VARIABLE_NAME___('@a').foo | |||
lambdabot | Unknown command, try @list | ||
13:30
wknight8111 joined
|
|||
ruoso | not that yet, actually... | 13:31 | |
$a.foo is actually ____RESOLVE_VARIABLE_NAME___('$a').cell.FETCH.foo | |||
@a.foo is actually ____RESOLVE_VARIABLE_NAME___('@a').cell.foo | |||
13:31
cmarcelo joined
|
|||
ruoso | @a := @b is ___RESOLVE...___('@a').cell = ___RESOLVE...___('@b').cell | 13:32 | |
where ___RESOLVE...___ is the implementation specific way of resolving the variable name... | |||
or, trying to keep the API sane... | 13:33 | ||
13:33
smtms joined
|
|||
ruoso | @a := @b is ___RESOLVE...___('@a').STORE(___RESOLVE...___('@b').FETCH()) | 13:33 | |
@a.foo is ____RESOLVE_VARIABLE_NAME___('@a').FETCH.foo | 13:34 | ||
13:34
iblechbot joined
|
|||
ruoso | $a.foo is ____RESOLVE_VARIABLE_NAME___('$a').FETCH.FETCH.foo | 13:34 | |
moritz_ is missing the ___METHOD_DISPATCH for calling foo ;-) | |||
ruoso | well... if we're going that way... we're missing the __METHOD_DISPATCH for the __RESOLVE...__ also | 13:35 | |
;) | |||
but you think I got my sanity back? | |||
moritz_ | no, that's lost forever ;) | 13:36 | |
ruoso | heh | 13:37 | |
which is the syntax for looking for a variable by name in p6? | 13:39 | ||
does that exposes the variable container itself? | 13:40 | ||
pmurias | ruoso: you should be able to do @a.STORE(...) or equivalent | ||
ruoso | pmurias, STORE doesn't seem to be part of the Array API | 13:41 | |
pmurias | how can i assing multiple values into an array? | 13:42 | |
to get a variable by name you can use ::{'name'} | 13:43 | ||
S03:1734 | 13:44 | ||
where is the Array API defined? | 13:45 | ||
ruoso | S29 | ||
pmurias | seems to miss postifx:<[]> at least | 13:46 | |
ruoso: the ___RESOLVE_VARIABLE_NAME___ seems to be some sort of method on the current lexical pad | 13:49 | ||
ruoso | yes.. | ||
::{'$name'} is that same thing? or is that only for package variables | 13:50 | ||
moritz_ | only for package vars iirc, same as in p5 | ||
pmurias | no | 13:51 | |
moritz_ | although I'm not entirely sure, because you can access pseudo-packages like ::OUTER | ||
which are lexical pad | |||
ruoso | MY is optional to limit the lookup | 13:52 | |
pmurias | it's S02:1734 | ||
he null pseudo-package is reserved to mean the same search list as an ordinary | |||
ruoso | ::('$foo') looks up for any variable visible by this scope | ||
pmurias | name search | 13:53 | |
ruoso | ::('$MY::foo') looks only for variable defined in this scope | ||
::('MY::$foo') actually | |||
and ::('OUR::$foo') looks only for package variables | 13:54 | ||
so.... | |||
the last question is now... | |||
does ::('...') returns the container itself? | |||
pmurias | yes | ||
or rather no ;) | 13:55 | ||
ruoso | so @a := @b is the same as ::('@a').STORE(::('@b').FETCH()) | ||
pmurias | looks reasonable | ||
ruoso | oh... actually it looks like I have to imply the context when using :: | 13:56 | |
it seems that the above code is not legal... | |||
pmurias | use ::<@a> then | ||
ruoso | although I would advocate it for accessing the container itself | ||
pmurias, I mean It should have a sigil before | 13:57 | ||
$::<@a> | |||
instead of | |||
::<@a> | |||
pmurias | no | ||
::<@a> is legal | |||
[particle] | :: is a sigil, and ::() is an operator | ||
pmurias | it's a diffrent thing | ||
13:58
TJCRI left
|
|||
pmurias | it's expalined at S02:1734 | 13:58 | |
ruoso | @a[0] could be written as ::('@a').postfix:[](0) | 13:59 | |
pmurias | *explained | ||
moritz_ | why is just everything in S02? ;-) | ||
pmurias | ruoso: is ::('@a') legal? | ||
ruoso | or would it be | ||
@a[0] could be written as ::('@a').FETCH.postfix:[](0) | |||
moritz_ | isn't [0] a postcircumfix? | 14:00 | |
pmurias | moritz_: it's Bits and Pieces and there are a lot of those ;) | ||
diakopter | Here's my version of statement list: rule stmtList { $Statement - o(($StmtTrm - $StmtList) | ($StmtTrm - $Block - o($NewLine - $StmtList))); | ||
} | |||
ruoso | pmurias, I'm looking at the specs in the browser, could you please provide me a quote instead of the line number? | 14:01 | |
diakopter | (where "-" means 'concatenate' (mandatory follow) and o() means optional | ||
) | |||
pmurias | ruoso: ok | ||
moritz_ | ruoso: just use the irc logs, there the line number points to the right piece in the spec | ||
ruoso | moritz_, thanks | ||
pmurias | perlcabal.org/syn/S02.html#line_1734 | ||
lambdabot | Title: S02 | ||
ruoso | ok... that implies that ::('@a') is really the same as @a | 14:03 | |
pmurias | ruoso: can one use () brackets instead of {}? | 14:04 | |
ruoso | pmurias, both seem to be used in S02 | 14:05 | |
pmurias, but ::{} seems to be used only for package lookup | |||
14:06
ruoso left
|
|||
diakopter | revised stmtList: ($Statement - o(($StmtTrm - $StmtList) | ($StmtTrm - $Block - o($BlockList)))) | ($Block - o($BlockList)) | 14:11 | |
14:13
ruoso joined
|
|||
ruoso | gah... i hate pressing ctrl+alt+backspace by accident | 14:13 | |
pmurias | ruoso: what were you trying to press? | 14:21 | |
14:22
acmoore joined
|
|||
ruoso | I change desktops using ctrl+alt+arrows | 14:22 | |
pmichaud | (rakudo doesn't implement VAR() yet, fwiw) | ||
ruoso | then I want to backspace on the text editor | ||
and I do it too fast | |||
14:22
broquaint joined
|
|||
pmurias | diakopter: why don't you use strict? ;) | 14:29 | |
14:37
orafu left
|
|||
moritz_ | rakudo: subset Even of Int where { $_ % 2 == 0 }; my Even $x = 2; say $x | 14:41 | |
exp_evalbot | rakudo r28059 OUTPUT[2] | ||
moritz_ | rakudo: subset Even of Int where { $_ % 2 == 0 }; my Even $x = 3; say $x | ||
exp_evalbot | rakudo r28059 OUTPUT[Type mismatch in assignment.current instr.: 'parrot;Perl6Object;infix:=' pc 65 (src/gen_builtins.pir:51) | ||
moritz_ | YaY | ||
14:42
r0bby joined
14:49
IllvilJa left
|
|||
ruoso | I think when SMOP gets there, there will be another implementation specific macro to get the variable container, as there is for ___RI___($obj) | 14:55 | |
so @a := @b can be translated to ___VC___('@a').STORE(___VC__('@b').FETCH()) in SMOP | 14:56 | ||
and ::('@a') is actually ___VC__('@a').FETCH | 14:57 | ||
pugs_svnbot | r20647 | moritz++ | [spec] added test for 'subset' with code assertions | 15:01 | |
moritz_ | pugs: say 3.5 ~~ 3..4 | 15:05 | |
exp_evalbot | OUTPUT[] | ||
15:06
Torment is now known as Jedai
|
|||
pugs_svnbot | r20648 | moritz++ | [spec] tests for subset with ranges | 15:10 | |
r20649 | avar++ | 4 tests were erroneously marked as a parsefail on rakudo, 2 of them fail though. | |||
15:11
ispy_ joined,
alanhaggai left
|
|||
pugs_svnbot | r20650 | avar++ | Rakudo can parse is(int('3e4d5'), 3e4, "int('3e4d5') is 3e4");, removed as parsefail | 15:13 | |
avar | pmichaud: `todo "reason"# mark "todo" because "not ok" is expected' | 15:17 | |
Why wouldn't one just want those to show up as failed in the test output? | |||
not ok is good, skipping the entire file because of a parse failure isn't | 15:18 | ||
pmichaud | I don't understand the question. | ||
moritz_ | avar: because one wants a clean output of "make spectest_regression" | ||
pmichaud | "todo" means "we know this fails, and we'll fix it eventually but not right now." | ||
moritz_ | if the output of a test run isn't clean, it's harder to track new regressions | 15:20 | |
pmichaud | I'd like us to get rid of the "parsefail" and "can't parse" error messages, though | 15:21 | |
it should be "rakudo can't parse 3e4d5" or "CATCH not implemented" instead of "can't parse" | |||
and ideally with an RT ticket associated with it :-) | |||
e.g., "CATCH not implemented, RT#55555" | |||
avar | oh well, I broke the test suite then:) | 15:23 | |
15:23
ispy_ left
|
|||
bacek | pugs: say $! | 15:24 | |
exp_evalbot | OUTPUT[] | ||
bacek | rakudo: say $! | ||
exp_evalbot | rakudo r28059 OUTPUT[Null PMC access in clone()current instr.: 'parrot;List;clone' pc 1670 (src/gen_builtins.pir:1265) | ||
bacek | gotcha! | 15:25 | |
pmichaud | known bug. :-) | ||
bacek | pmichaud, how old? | 15:26 | |
pmichaud | bacek: we already know that rakudo doesn't quite handle $_, $!, and $/ properly. | 15:27 | |
haven't had a chance to fix them. | |||
bacek | pmichaud, ok. | ||
avar | sh-3.1$ ../../parrot perl6.pbc -e 'say int(Inf) eq Inf ' | 15:28 | |
0 | |||
sh-3.1$ ../../parrot perl6.pbc -e 'say int(-Inf) eq -Inf' | |||
1 | |||
== says they're both equivalent | |||
pmichaud | Inf not implemented. | ||
or, at least, the implementation isn't well defined yet in rakudo/Parrot. | 15:29 | ||
avar | it's passed to parrot's iseq(string, string) | ||
pmichaud | well, yes, since you used 'eq' :-) | 15:30 | |
15:31
ispy_ joined
|
|||
avar | the test suite did | 15:34 | |
pmichaud | right now rakudo probably thinks that 'Inf' is a type, since it begins with a capital letter. | 15:37 | |
so essentially this is all comparing undefs. :-P | |||
ruoso | doesn't it complains about unknown types? | 15:38 | |
[particle] | that's "advanced" | ||
rakudo doesn't have a registry for that yet | |||
pmichaud | we don't have a good mechanism yet for looking up types, so we cheat at the moment. | 15:39 | |
ruoso | oh... I see... | ||
15:39
alanhaggai joined
|
|||
ruoso | this is one important confusing point | 15:39 | |
because there is class and there is package | 15:40 | ||
they are not the same thing, but one implies the other | |||
or not... | |||
meppl | good night | ||
pmichaud | right, but so far it hasn't been an issue for us. | 15:41 | |
[particle] | parrot does NameSpace has-a Class | ||
but rakudo is free to do whatever on top of that | 15:42 | ||
ruoso | I think you have two namespace hashes actually... one for Package and other for Class/Type/Role/Whatever | 15:43 | |
pugs_svnbot | r20651 | moritz++ | [spec] re-fudged some failing test (unfudged by avar++) | ||
15:43
armagad joined
15:44
meppl left
|
|||
ruoso | I know a class must have a package | 15:46 | |
because the default method dispatch assumes that | |||
PerlJam | you mean a class is a package. | ||
ruoso | PerlJam, not really... | 15:47 | |
moritz_ | a class implies a package | ||
just like a module implies a package | |||
ruoso | a syntatically-defined-class implies a package | ||
PerlJam | or perhaps "class does package" | ||
ruoso | a programatically-defined-class doesn't | ||
a foreign-language-class also doesn't imply a package | 15:49 | ||
but you still must have a way to find it | |||
15:49
alanhaggai_ joined
|
|||
ruoso | I think the "NameSpace has Class, Package, Role ..." thing might be the way to do it | 15:50 | |
like p5 does with globs | |||
then you can register a named Class defined within an anonymous package | 15:51 | ||
or maybe I just lost my mind again | 15:53 | ||
but PerlJam is probably right... a Class is a Package | 15:54 | ||
15:54
orafu joined
|
|||
PerlJam | Well, according to S10 "modules and classes are declared with separate keywords, but they're still just packages with extra behaviors." | 15:54 | |
moritz_ | PerlJam: oh come on, everybody can settle things by quoting the specs ;-) | 15:55 | |
PerlJam | :) | ||
ruoso | pugs: class Foo { method bar { return baz() } }; module Foo { sub baz { 1 } }; my $a = Foo.new(); say a.bar(); | 15:56 | |
exp_evalbot | OUTPUT[*** No such subroutine: "&a" at /tmp/jPt49V0EKI line 1, column 97-104] | ||
ruoso | pugs: class Foo { method bar { return baz() } }; module Foo { sub baz { 1 } }; my $a = Foo.new(); say $a.bar(); | ||
exp_evalbot | OUTPUT[1] | ||
ruoso | pugs merges both... | ||
rakudo: class Foo { method bar { return baz() } }; module Foo { sub baz { 1 } }; my $a = Foo.new(); say $a.bar(); | |||
exp_evalbot | rakudo r28059 OUTPUT[Could not find non-existent sub returncurrent instr.: 'parrot;Foo;bar' pc 218 (EVAL_11:110) | ||
ruoso | rakudo doesn't | 15:57 | |
kp6: class Foo { method bar { return baz() } }; module Foo { sub baz { 1 } }; my $a = Foo.new(); say $a.bar(); | |||
exp_evalbot | kp6 r20651: 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(0x824cafc)', 'APPLY') called at compiled/perl5-kp6-mp6/lib/KindaPerl6/Runtime/Perl5/MOP.pm line 169 | ||
..main::DISPATCH('HASH(0x824cafc)', 'APPLY') called at compiled/perl5-kp6-mp6/lib/Kin... | |||
moritz_ | rakudo: class Foo { method bar { baz() } }; module Foo { sub baz { 1 } }; my $a = Foo.new(); say $a.bar(); | 15:58 | |
exp_evalbot | rakudo r28059 OUTPUT[1] | ||
moritz_ | rakudo is just missing return() | ||
ruoso | ah | ||
ok | |||
moritz_ | which would make another 100+ tests pass | ||
or probably much more | |||
[particle] | we have all we need to create return for rakudo except tuits iirc | 15:59 | |
moritz_ | is it implemented in PAST? | ||
PerlJam | moritz_: watch it with the 4 letter words. | 16:00 | |
[particle] | no, it needs to go there first | ||
PerlJam | moritz_: for instance, time travel is possible; we *just* need a wormhole ;) | ||
moritz_ | I concure, implementing perl 6 is mostly blocking on tuits | 16:01 | |
ruoso | hmm... in the end there isn't much difference from Class and Module | ||
except for Syntax, of course | |||
16:01
alanhaggai_ left
|
|||
moritz_ | ruoso: modules don't support polymorphism and inheritance I suspect | 16:02 | |
ruoso | moritz_, neigther do classes... it's the dispatching of a particular object that does | ||
[particle] | unless mixed in | ||
pmurias | ruoso: modules don't have a .HOW() | ||
ruoso | of course they do... | 16:03 | |
they are objects too | |||
16:03
alanhaggai left
|
|||
pmurias | /me-- | 16:03 | |
ruoso | and that makes things even more complicated | 16:04 | |
because if I'm supposed to merge Classes and Modules with the same name | |||
into a single package | |||
(as it would be natural in P5) | 16:05 | ||
there's no point in having them at all (again, except for syntax) | |||
pmurias | you mean of having a distinction? | ||
ruoso | in the runtime sense... | ||
the difference is that method invocation is different from sub invocation | 16:06 | ||
moritz_ | really? isn't method invocation just a sub invocation with a fixed 'self'? | 16:07 | |
16:07
sscaffidi joined
|
|||
ruoso | but method invocation implies OO semantics (inheritance and stuff) | 16:07 | |
sub invocation doesn't | |||
and I think that's the purpose of submethod, which is a sub that have a fixed self | 16:08 | ||
moritz_ wonders why ruoso unifies everything but can't unify method and sub calls | |||
Grand Unified Perl 6 of Everything | |||
PerlJam | moritz_: what's the "self" in a sub call. | ||
ruoso | moritz_, because there must be some way of differentiating them... | ||
PerlJam | ? | ||
ruoso | because sub doesn't inherit | ||
moritz_ | PerlJam: dunno, never really thought of it | 16:09 | |
16:09
Southen_ joined
|
|||
PerlJam | moritz_: if you can come up with a good enough answer I may be swayed towards believing the unification of subs and methods is possible and maybe even desirable. | 16:09 | |
moritz_ | PerlJam: maybe the package? | 16:10 | |
but I'm too distracted to actually think it through | |||
(and I lack OO knowledge for it) | |||
[particle] | module Foo { sub new(...) { ... } }; my $x = Foo.new; # can this work? | ||
PerlJam | ruoso: subs not inheriting is easy though. Just make sure whatever class the sub belongs to doesn't have a parent. | ||
ruoso | [particle], yes... but in theory, it's not inheritable | 16:11 | |
PerlJam, the problem is when you mix a module with a class | |||
[particle] | ruoso: are you sure you don't have to call Foo::new? | 16:12 | |
ruoso | [particle], I am... method dispatch falls back to subroutine dispatch, placing the invocant as first argument | 16:13 | |
[particle] | ah, right. ok. | ||
pmurias | can one have both a a sub foo and a method foo | ||
? | |||
ruoso | I don't think so | ||
at least now that I realised Module and Class must be merged in runtime | 16:14 | ||
16:14
elmex_ joined
16:15
elmex left,
elmex_ is now known as elmex
|
|||
diakopter | pmurias: :P actually it can use strict now that I gave up on the require-time symbol table mods | 16:15 | |
PerlJam | yes, you can have a sub foo and a method foo (Because the method belongs to a particular class) | ||
ruoso | pugs: module Foo { sub bar { say 'Hi' } }; class Bar is Foo { method foo { self.bar() } }; Foo.new.foo | ||
exp_evalbot | OUTPUT[*** No such method in class Foo: "&foo" at /tmp/igYTDbq6gj line 1, column 86 - line 2, column 1] | ||
ruoso | pugs: module Foo { sub bar { say 'Hi' } }; class Bar is Foo { method foo { self.bar() } }; Bar.new.foo | ||
exp_evalbot | OUTPUT[Hi] | ||
[particle] | diakopter: can you make parrotvm.org point to a parrot-related site, instead of perl 6-related? | 16:16 | |
moritz_ | [particle]: I think that would break many links to the parrot svn mirror | ||
ruoso | I'm not sure pugs behaviour is correct... | ||
[particle] | moritz_: i don't want the svn diffs pointing somewhere else, just the front page | 16:17 | |
when someone types parrotvm.org, it's confusing to land on a page about perl 6 | |||
lambdabot | Title: Perl6 Community Development Server | ||
diakopter | is it a good sign that the best syntax highlighter in my text editor for STD.pm is to tell it it's Ruby? | 16:18 | |
16:18
elmex left
|
|||
moritz_ | diakopter: use vim + perl6.vim | 16:18 | |
diakopter | I don't know if Notepad++ will use perl6.vim | 16:19 | |
vixey | @karma Notepad | ||
lambdabot | Notepad has a karma of 2 | ||
moritz_ | that's cheating | ||
diakopter | [particle]: I don't know; currently it's all on the same vhost in apache2 | ||
moritz_ | just like C-- | ||
diakopter | (Notepad++)++ | ||
[particle]: do you want to buy the domain from me? :P (kidding) | 16:20 | ||
moritz_ | ;) | ||
moritz_ has secured rakudo.de | |||
and perl-6.de, I was too late for perl6.de | |||
diakopter | [particle]: I guess it could be on a separate vhost from the perlsix.* domains | 16:21 | |
16:21
alanhaggai joined
|
|||
diakopter | its config file would merely need duplicated. | 16:21 | |
[particle] | i'm really weak with dns stuff, so i trust you know what you're talking about :) | 16:22 | |
diakopter | since SVN::Web uses a common cache, it wouldn't be any more of a resource bog | ||
[particle] | (common cache)++ | ||
diakopter | TimToady: you around? I have some suggestions for simplifying the statement/terminator/expression handling in STD.pm | ||
pugs_svnbot | r20652 | moritz++ | [t] updated deprecated-syntax.pod | ||
Khisanth | hrm some stuff is already deprecated? | 16:23 | |
[particle] | stuff gets deprecated all the time | ||
16:23
elmex joined
|
|||
[particle] | when better syntax or more abstractions are found | 16:24 | |
.oO(i don't think there's ever been a deprecation in perl 6 because something is too abstract) |
|||
moritz_ | Khisanth: in that file some artifacts of the old test suite are documented. Some of it had been legal Perl 6 before, some never was | 16:25 | |
diakopter | people deprecate Perl 6 all the time :) | ||
16:25
Southen left
|
|||
diakopter | along with denigrate... | 16:26 | |
Khisanth | heh | ||
[particle] | perl 5 is self-deprecating | 16:27 | |
Khisanth | well I expected thing to be deprecated(instead of removed) when things are changed but you want to keep backwards compatibility but I am not sure what would exist that would need backwards compatibility at this point | ||
moritz_ | diakopter: the German perl community is very anti Perl 6 biased :/ | ||
Khisanth: the whole point of Perl 6 is to break backwards compatibilty. Otherwise we could just have morphed Perl 5 into what we want | 16:28 | ||
Patterner likes Perl6 | |||
diakopter | actually, I take that back. the C# highlighting is far superior; the function list it generates is most complete. | ||
Khisanth | moritz_: that would make deprecation even stranger! | 16:29 | |
diakopter | and yet, Pugs seems to run Perl 5 code without problem, even after 'use v6' | 16:30 | |
moritz_ | pugs: use v6; print "yes" if "\n" =~ m/./ | 16:31 | |
exp_evalbot | OUTPUT[***  Unexpected "m" There is no =~ operator in Perl 6 -- did you mean ~~ (match) or ~= (concat-assign)? at /tmp/bclp6wXUoE line 1, column 32] | ||
moritz_ | pugs: use v6; print "yes" if "\n" ~~ m/./ | ||
exp_evalbot | OUTPUT[yes] | ||
moritz_ | diakopter: I can't confirm that | ||
Khisanth | diakopter: but is that with or without embedding perl5? :) | 16:32 | |
16:38
sscaffidi_ joined
16:41
sscaffidi_ left
|
|||
diakopter | moritz_: ok. I guess I meant its ability to 'use' Perl 5 modules. | 16:44 | |
16:44
Psyche^ joined
16:47
braceta left
|
|||
diakopter | my point is that even though backward compatibility is broken, as TimToady said, the /usr/bin/perl that implements Perl 6 must be able to run Perl 5 as well. And the ability to import (at least many) Perl 5 modules, whether with perl5 embedded or linked or caged or virtualized or whatever, kindof makes the broken backward compatibility a non-issue. | 16:47 | |
16:49
nipotaway is now known as nipotan
|
|||
diakopter | besides, many (most) places don't upgrade their perl5 anyways for production systems, for fear of breaking things (because they don't have tests or don't have time to test or whatever). At my previous employer, I built several special builds of a newer perl for several systems... Some of the processes were chaining three builds of perl5. | 16:52 | |
16:52
Alias_ left,
Alias__ joined
|
|||
diakopter | I meant (most?) | 16:52 | |
16:56
Patterner left,
Psyche^ is now known as Patterner
16:59
ispy_ left
17:04
Alias__ left,
Alias__ joined
|
|||
rakudo_svn | r28060 | particle++ | [rakudo] eval: propagate $! to caller (bacek++) | 17:05 | |
ruoso | diakopter, I'm not sure anymore that we'll have /usr/bin/perl as perl 6 (such as rakudo or any other implementation) | 17:22 | |
17:22
Alias_ joined,
Alias__ left
|
|||
ruoso | diakopter, I, now, tend to believe that we'll have perl 5.12 embedding perl 6 (whichever implementation) on the moment some code does "use v6"; | 17:22 | |
and probably p5 will in fact be morphed, but to support different runloops and interpreters | 17:23 | ||
avar | what makes you think that? | 17:24 | |
ruoso | we have too many modules that uses XS | ||
that's not going away | |||
avar | No I mean the part about 5.12 and p5 being morphed | ||
17:24
smtms left
|
|||
ruoso | there are already tricks inside p5 to implement method dispatching as new OPs | 17:25 | |
xinming | ruoso: What I believe is, we might have a perl 5 implementation based on bootstraped perl 6. ;-) | ||
ruoso | xinming, p5 has too much magic to be re-implemented | ||
and having alternative dispatchings in the interpreter is the key of merging the execution of different interpreters | |||
xinming | and the perl 6 is bootstraped by perl 5. so, the original perl 5 still lives, but with changed role. | 17:26 | |
well, just guessing. :-) | |||
ruoso | TimToady pointed that there are some parts of p5 that uses the C stack... once that is fixed, and different dispatching mechanisms can be integrated in p5 | 17:27 | |
we could have the execution being switched from p5 and, i.e., smop | |||
without extra overhead | |||
xinming | ruoso: from your words, IMHO It'll probably take over 6 year to have a useful perl 6. >_< | 17:29 | |
ruoso | xinming, not really... | ||
you'll just have /usr/bin/rakudo, /usr/bin/smop, /usr/bin/perl6 | 17:30 | ||
xinming | ruoso: well, Just my logic. you said about 5.12. :-D | ||
ruoso | the point is... it's not the same runtime, therefore, it's not the same language... | ||
at the point we have perl 6 runtime done, we can start interoperating perl5 with perl6 | 17:31 | ||
(actually we don't need to wait before we start it...) | |||
but there are some important differences in the p5 interpreter for this 'runtime merge' to work well... | 17:32 | ||
diakopter ponders | |||
ruoso | we'll probably have the p6 implementations successfully embedding p5 and vice-versa | ||
but that won't mean that we can have /usr/bin/perl pointing to a perl6 implementation | 17:33 | ||
Auzon | rakudo: my $sub = sub {say "1234"}; $sub(); | ||
exp_evalbot | rakudo r28060 OUTPUT[1234] | ||
Auzon | hi all | ||
ruoso | hi Auzon | ||
moritz_ | hi Auzon | ||
xinming | hi Auzon | ||
Auzon | I'm writing tests for sprintf, and I loathe how system dependent it is. | 17:34 | |
perl6: say sprintf('%d', 1234); | 17:37 | ||
exp_evalbot | kp6 r20652: 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(0x824bd9c)', 'APPLY', 'HASH(0x8e4dce8)', 'HASH(0x8e522e0)') called at | ||
..compiled/perl5-kp6-mp6/lib/KindaPerl6/Runtime/Perl5/MOP.pm line 169 main::DISPATCH('HASH(0x824bd9c)', 'APPLY', 'H... | |||
..pugs: OUTPUT[1234] | |||
..rakudo r28060: OUTPUT[Could not find non-existent sub sprintfcurrent instr.: '_block11' pc 35 (EVAL_10:19) | |||
..elf r20652: OUTPUT[1234] | |||
ruoso | Auzon, it shouldn't be much, unless "use locale" is in effect (assuming "use locale" is valid Perl 6) | ||
Auzon | pugs: say sprintf('%u', -1); | 17:38 | |
exp_evalbot | OUTPUT[*** Ix{Integer}.index: Index (-1) out of range ((0,15)) at /tmp/e1f8fnTGjH line 1, column 1-22] | ||
Auzon | ruoso: The difference I found (which is from P5, but P6's sprintf is very similar to the P5 version from what I understand) is negative numbers in the unsigned types. On a 32 bit computer, they differ from a 64 bit computer | 17:39 | |
elf: say sprintf('%u', -1) | |||
exp_evalbot | OUTPUT[4294967295] | ||
ruoso | Auzon, well... but that type of cast is expected to be system dependent anyway | 17:40 | |
I could even argue that it deserves a warning | |||
Auzon | Mine gives 18446744073709551615, since I'm running 64 bit. | 17:41 | |
But yeah, a warning would make sense. | |||
moritz_ | I don't think any implementation does warnings yet | 17:42 | |
Auzon | %e, %f, %g, and some others could benefit from using regexes with testing, but I'm uncertain how stable regexes are across implementations | 17:43 | |
moritz_ | Auzon: do it anyway. They will stabilize | ||
Auzon | alright. | 17:47 | |
[particle] | that's what fudge is for! | 17:53 | |
moritz_ always thought that fudge was for eating ;) | 17:54 | ||
17:54
Lorn joined
|
|||
[particle] | perl 6 compilers have to eat, too | 17:54 | |
moritz_ | and test suite maintainers ;) | 17:55 | |
moritz_ prepares in #perl6-soc report | |||
ruoso | but about interoperating p5 and p6... I'm curious to see how SMOP::P6Opaque+Moose::MetaInstance::SMOP::P6Opaque will behave in p5 (once it's implemented in SMOP and embeded in p5) | 17:56 | |
stevan_ | ruoso: is there any p5 work involved in your SMOP grant :) | 17:57 | |
Auzon | Out of curiosity, is it feasible to reimplement P5 regexes (minus code execution) in Parrot? | ||
ruoso | stevan_, nope... but it shouldn't be hard after the grant work is finished... | ||
moritz_ | Auzon: surely much more feasible than ordinary perl 5, and I think a subset is already done | ||
Auzon: perl 5 regexes are tested quite thoroughly | 17:58 | ||
stevan_ | ruoso: I am specifically wondering if your design allows for possibly replacing some of the Moose/MOP internals with some of the SMOP goodness | ||
ruoso | stevan_, in theory yes. | ||
stevan_ | since SMOP is based (somewhat) on MO, there is perhaps enough commonality in the underlying designs | ||
rakudo_svn | r28061 | pmichaud++ | [rakudo]: | 17:59 | |
r28061 | pmichaud++ | * Refactor handling of exported methods into !EXPORT sub. | |||
stevan_ | and in the lower level components | ||
ruoso | stevan_, SMOP goes to the same abstraction level that MO.... | ||
nothingmuch was my zen master during this base design ;) | |||
[particle] | Auzon: PGE already has a Perl5Regex front end, but it hasn't been hooked up to rakudo yet | ||
stevan_ | re: Moose::MetaInstance::SMOP::P6Opaque - there is no some prior art on meta-instance extensions (MooseX::InsideOut and MooseX::GlobRef), so you might want to take a look :) | 18:00 | |
18:00
Lorn_ joined
|
|||
stevan_ | ruoso: coming to YAPC::NA and/or OSCON? | 18:00 | |
ruoso | stevan_, no... it's kinda hard for a brazillian to get into the US this days ;) | ||
18:00
Lorn left
18:01
Lorn_ left,
cjfields joined
|
|||
stevan_ | ruoso: ah, ok | 18:01 | |
I will write a letter to the state department asking for them to pick you up, you might have to stay in cuba a little while though | |||
ruoso | stevan_, but about the metainstance... I would need SMOP and SMOP::P6Opaque p5 modules first ;) | ||
stevan_, heh | 18:02 | ||
stevan_, that after finishing the grant work (which have p6opaque as the major milestone) | |||
stevan_ | ruoso: well if you make them decoupled enough, couldnt we maybe re-use the C code for SMOP::p6opaque? | ||
ruoso | stevan_, sure sure... the idea is really to embed smop inside p5 | 18:03 | |
stevan_ | :) | ||
ruoso | I'm curious on how the polymorphic-eval thing will behave with p5 | ||
stevan_ | not very well I suspect | ||
ruoso | there are some tricks involving new OP definitions... | 18:04 | |
stevan_ | although you should talk to clkao and nothingmuch about their recent perlguts diving | ||
ruoso | that should be saner to do than trying with XS | ||
stevan_ | yes | ||
nothingmuch was also playing with LLVM and p5 recently too, had some interesting results | |||
ruoso | interoperating them? | ||
stevan_ | compiling perl with LLVM | ||
ruoso | ah... ok... | ||
stevan_ | gcc-llvm to be exact | ||
was faster then native compile (according to perlbench) | 18:05 | ||
and llvm bytecode too | |||
pugs_svnbot | r20653 | diakopter++ | [yap6] | ||
r20653 | diakopter++ | updated ROADMAP & TODO - the ROADMAP is more interesting. | |||
stevan_ | he can explain it much better then I can,. but it sounded very interesting | 18:06 | |
ruoso | indeed ,it sounds | ||
diakopter | ruoso: have you seen libFIRM | ||
ruoso | diakopter, nope... | ||
diakopter | take a look sometime... | 18:07 | |
ruoso | stevan_, what worries me more is if the missing stacklessness in p5 won't be a major problem interacting with smop | ||
stevan_ | diakopter: sounds not unsimilar to ML-RISC | ||
missing stacklessness? | 18:08 | ||
diakopter: basically, build a intermedite graph repr and then apply aggresive optimizations to it | |||
diakopter | oh, I didn't realize they'd released a free c-frontend | ||
ruoso | stevan_, I'm not completely aware of it yet... TimToady told me some parts of p5 are not stackless (in the C stack) | ||
stevan_ | hmm... i am no perlguts expert, but as far as I am aware the optree is stackless | 18:09 | |
pugs_svnbot | r20654 | Auzon++ | [gsoc_spectest] Moved elems.t to spec area, added smartlink. Added 25 sprintf tests. | ||
stevan_ | maybe the regexp engine? | ||
rakudo_svn | r28063 | pmichaud++ | [rakudo]: | ||
r28063 | pmichaud++ | * Add more improvements to List (bacek++) | |||
r28063 | pmichaud++ | * Two additional subtests in t/spec/S29-list/grep.t now pass. | |||
r28063 | pmichaud++ | * Patch courtesy Vasily Chekalkin [email@hidden.address] | |||
ruoso | I didn't dive into it yet to find out what it is... | ||
stevan_ | ask around on #p5p someone will surely know | 18:10 | |
ruoso | TimToady warned me that it could require a recompiled p5 | ||
I'll do it... as soon as I have something that will actually be testeable in p5 | 18:11 | ||
stevan_, but you made me curious... I'm going to ask there anyway... ;) | 18:13 | ||
18:27
cjfields left
|
|||
diakopter | oh, I thought of a way to get around having to predeclare all these rules and rulerefs | 18:28 | |
18:29
schmalbe joined
|
|||
diakopter | have the first source filter write the generated predeclarations to another .pm as a mixin to the original and then use that .pm.... we'll see if it works. | 18:29 | |
18:30
cjfields joined
18:31
thestarslookdown joined
|
|||
diakopter | at the least, it will find the mixin the next run :P | 18:33 | |
18:46
thestarslookdown left
18:48
lichtkind joined
|
|||
lichtkind | pugs: say 3; | 18:49 | |
exp_evalbot | OUTPUT[3] | ||
lichtkind | ah | ||
pugs: %h = 3 => 'g'; + %h; | |||
exp_evalbot | OUTPUT[***  Unexpected " =" expecting "::" Variable "%h" requires predeclaration or explicit package name at /tmp/DpDP5oeFbu line 1, column 3] | ||
lichtkind | pugs: %h = (3 => 'g'); + %h; | ||
exp_evalbot | OUTPUT[***  Unexpected " =" expecting "::" Variable "%h" requires predeclaration or explicit package name at /tmp/kUxQPQG2lN line 1, column 3] | ||
lichtkind | pugs: my %h = (3 => 'g'); %h.kv; | 18:50 | |
exp_evalbot | RESULT[("3", "g")] | ||
lichtkind | pugs: my %h = (3 => 'g'); %h.elems; | ||
exp_evalbot | RESULT[1] | ||
lichtkind | pugs: my %h = (3 => 'g'); %h; | ||
exp_evalbot | RESULT[{("3" => "g"),}] | ||
lichtkind | pugs: my %h = 3 => 'g'; %h; | ||
exp_evalbot | RESULT[{("3" => "g"),}] | ||
lichtkind | pugs: my %h = 3 => 'g'; ~ %h; | 18:51 | |
exp_evalbot | RESULT["3\tg\n"] | ||
lichtkind | pugs: my %h = 3 => 'g'; + %h; | ||
exp_evalbot | RESULT[1] | ||
lichtkind | pugs: my %h = 3 => 'g'; +%h; | ||
exp_evalbot | RESULT[1] | ||
lichtkind | pugs: my %h = 3 => 'g'; ? %h; | ||
exp_evalbot | RESULT[Bool::True] | ||
lichtkind | pugs: my %h = 3 => 'g'; %h; | 18:52 | |
exp_evalbot | RESULT[{("3" => "g"),}] | ||
lichtkind | pugs: my %h = 3 => 'g'; %h.keys; | ||
exp_evalbot | RESULT[("3",)] | ||
lichtkind | pugs: my %h = 3 => 'g'; %h.pairs; | ||
exp_evalbot | RESULT[(("3" => "g"),)] | ||
lichtkind | pugs: my %h = 3 => 'g'; %h.length; | 18:53 | |
exp_evalbot | OUTPUT[*** No such method in class Hash: "&length" at /tmp/zrrtkKGlch line 1, column 21-30] | ||
lichtkind | pugs++ | ||
pugs: my %h = 3 , 'g'; %h.pairs; | |||
exp_evalbot | RESULT[(("3" => "g"),)] | ||
lichtkind | sorry for poluting chat but my build dont work properly | 18:56 | |
18:57
b_jonas joined
|
|||
diakopter | lichtkind: you can msg the bot directly | 18:57 | |
lichtkind | diakopter: how? | 18:58 | |
moritz_ | lichtkind: /msg exp_evalbot pugs: say "do something" | 19:10 | |
19:16
braceta joined
|
|||
moritz_ | #perl6-soc in 15m | 19:17 | |
19:20
PorkSoda left
|
|||
ruoso home & | 19:23 | ||
19:23
ruoso left
|
|||
moritz_ | TimToady++ # comparing Perl 6 with Klingon armies ;) | 19:25 | |
TimToady | alas, my brain hasn't been good for much beyond that this week... | ||
19:29
Alias_ left
19:37
meppl joined
19:39
sscaffidi left
|
|||
pmichaud | pugs: say (1).elems; | 19:39 | |
exp_evalbot | OUTPUT[1] | ||
19:39
IllvilJa joined
|
|||
pmichaud | pugs: say 1.elems; | 19:39 | |
exp_evalbot | OUTPUT[1] | ||
pmichaud | (thanks, pugs, evalbot) | ||
19:39
armagad left
|
|||
pmichaud | pugs: say undef.elems; | 19:39 | |
exp_evalbot | OUTPUT[1] | ||
19:45
mj41_ joined
19:46
lambdabot left,
alanhaggai_ joined
19:47
lambdabot joined
|
|||
cjfields | Is run.pugscode.org down? | 19:48 | |
19:48
braceta left
|
|||
moritz_ | seems like | 19:49 | |
cjfields | pugs: -v | ||
exp_evalbot | OUTPUT[*** No such subroutine: "&v" at /tmp/4iFM1824OD line 1, column 1 - line 2, column 1] | ||
cjfields | d'oh | ||
moritz_ | pugs: say $?PUGS_VERSION | 19:50 | |
exp_evalbot | OUTPUT[Perl6 User's Golfing System, version 6.2.13, October 17, 2006 (r18093)] | ||
Khisanth | implementation specific globals? | ||
moritz_ | at the moment, yes :( | 19:51 | |
cjfields | latest pugs subversion is r20654, guess it isn't building easily | 19:52 | |
moritz_ | cjfields: the changes that tried to adapt it to ghc 6.8.2 broke the build | 19:53 | |
19:54
sscaffidi joined
|
|||
Khisanth | pugs: $] | 19:54 | |
cjfields | I thought so; I've been having problems building it with ghc 6.8.2 | ||
exp_evalbot | OUTPUT[***  Unexpected "]" expecting "::" at /tmp/DaoFir5I6b line 1, column 2] | ||
19:57
chris2 joined
19:59
sscaffidi left
20:00
araujo joined
20:01
mj41 left
20:02
pen1 joined,
penk left,
alanhaggai left
20:05
b_jonas left
20:08
sscaffidi joined,
xinming_ joined
20:14
crats joined
20:22
xinming left
|
|||
pugs_svnbot | r20655 | moritz++ | [spec] fixed subset-range.t | 20:34 | |
20:40
ruoso joined
|
|||
lichtkind | /msg exp_evalbot pugs: @a = 1..4; say "@a[]" | 20:41 | |
pugs_svnbot | r20656 | pmurias++ | [std5] replaced magic numbers with DEBUG::constant_name | ||
rakudo_svn | r28073 | Whiteknight++ | [rakudo] Removing trailing whitespace for t/codingstd/trailing_space warnings | 20:42 | |
lichtkind | pugs: @a = 1..4; say "@a[]" | ||
exp_evalbot | OUTPUT[***  Unexpected " =" expecting "::" Variable "@a" requires predeclaration or explicit package name at /tmp/Df0gEiwNwN line 1, column 3] | ||
lichtkind | /msg exp_evalbot @a = 1..4; say "@a[]" | 20:43 | |
pmurias | TimToady: i have changed the debugging magic numbers, revert if i have done something incorrectly | 20:44 | |
ruoso | btw... I've just realised that embedding SMOP in p5 is actually more important than I ever realised before.. | 20:46 | |
cognominal_ | perl6: say '' ~~ / $ / | 20:48 | |
exp_evalbot | kp6 r20656: OUTPUT[syntax error at position 7, line 1 column 7:say '' ~~ / $  ^ HERE] | ||
..pugs: OUTPUT[] | |||
..rakudo r28073: OUTPUT[] | |||
..elf r20656: OUTPUT[syntax error at (eval 14) line 3, near """ ~" at ./elf_f_faster line 4492] | |||
cognominal_ | perl6: say 'a' ~~ / a $ / | 20:49 | |
exp_evalbot | kp6 r20656: OUTPUT[syntax error at position 8, line 1 column 8:say 'a' ~~ / a $  ^ HERE] | ||
..pugs: OUTPUT[] | |||
..rakudo r28073: OUTPUT[a] | |||
..elf r20656: OUTPUT[syntax error at (eval 14) line 3, near ""a" ~" at ./elf_f_faster line 4492] | |||
20:50
alanhaggai_ left
|
|||
cognominal_ | perl6: say ?('' ~~ / $ /) | 20:50 | |
exp_evalbot | kp6 r20656: OUTPUT[syntax error at position 4, line 1 column 4:say ?('' ~~ / $ / ^ HERE] | ||
..pugs: OUTPUT[1] | |||
..rakudo r28073: OUTPUT[1] | |||
..elf r20656: OUTPUT[syntax error at (eval 14) line 3, near """ ~" at ./elf_f_faster line 4492] | |||
20:52
schmalbe left
20:53
renormalist joined
20:54
renormalist left
20:56
renormalist joined
|
|||
pmurias | ruoso: what are the problems caused by stackiness in interacting with smop? | 20:57 | |
ruoso | not with smop, but with the thing stacking... | ||
once that smop might want to call that interpreter again | |||
but it looks like smop will be easily integrated into the p5 runloop | 20:59 | ||
21:00
jhorwitz left
|
|||
diakopter | urk - what is dalek doing talking in #perl6 | 21:07 | |
moritz_ | diakopter: nothing? | ||
diakopter | oh, I'm getting irsii/screen artifacts. first time in many many hours. | 21:08 | |
irssi | |||
moritz_ | diakopter: I sometimes get them too, when switching between channels | 21:09 | |
21:13
renormalist left
21:14
pmurias left
21:25
kaether joined
21:29
[particle]1 joined,
IllvilJa left
21:33
tcliou_ joined
21:36
tcliou left
21:37
donaldh joined
|
|||
pugs_svnbot | r20657 | moritz++ | [spec] fudged one more test | 21:42 | |
21:47
[particle] left
21:53
sscaffidi left
|
|||
rakudo_svn | r28074 | particle++ | add eval_dies_ok and eval_lives_ok (bacek++ moritz++) | 22:02 | |
r28075 | particle++ | [rakudo] more tests passing due to eval_dies_ok and eval_lives_ok (moritz++ bacek++) | 22:03 | ||
22:18
rhr left
22:19
rhr joined
22:21
xinming joined
22:27
meppl left
22:31
donaldh left
22:36
xinming_ left
22:37
IllvilJa joined
22:41
iblechbot left
22:45
jferrero joined
22:49
sri_work joined
22:53
IllvilJa left
|
|||
pugs_svnbot | r20658 | Auzon++ | [gsoc_spectest] Revived t/TASKS for the tasks directly related to the test suite. I will be watching this file for test requests. | 22:53 | |
r20659 | diakopter++ | [yap6] | 22:56 | ||
r20659 | diakopter++ | Added hand-drawn rules for blocks (incl subs/variants) | |||
r20659 | diakopter++ | Refactored rules to work more like a full-blown re engine | |||
r20659 | diakopter++ | Take a look at the diff..... it's fun. | 22:57 | ||
22:57
chris2 left
|
|||
diakopter | <-- decommuter | 22:58 | |
23:06
simcop2387 joined
23:09
IllvilJa joined
23:29
meppl joined
|
|||
Auzon | pugs: say ('%x' x 10).perl | 23:32 | |
exp_evalbot | OUTPUT["\%x\%x\%x\%x\%x\%x\%x\%x\%x\%x"] | ||
Auzon | pugs: my @a = 'a' .. 'i'; say sprintf('%x' x 10, @a); | ||
exp_evalbot | OUTPUT[*** Insufficient arguments to sprintf at Prelude.pm line 668, column 13-53] | ||
Auzon | pugs: my @a = 'a' .. 'i'; say sprintf(('%x' x 10), @a); | 23:33 | |
exp_evalbot | OUTPUT[*** Insufficient arguments to sprintf at Prelude.pm line 668, column 13-53] | ||
Auzon | pugs: my @a = 'a' .. 'i'; say sprintf(('%x' x 10), *@a); | ||
exp_evalbot | OUTPUT[***  Unexpected "a" expecting term postfix, operator, ":" or ")" at /tmp/NOK3MM0AJM line 1, column 48] | ||
23:35
elmex left
|
|||
Auzon | perl6: my @a = 'a' .. 'i'; say sprintf(('%x' x 10), @a); | 23:35 | |
exp_evalbot | kp6 r20659: 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(0x824bfac)', 'APPLY', 'HASH(0x8e524d0)', 'HASH(0x8e521c4)') called at | 23:36 | |
..compiled/perl5-kp6-mp6/lib/KindaPerl6/Runtime/Perl5/MOP.pm line 169 main::DISPATCH('HASH(0x824bfac)', 'APPLY', 'H... | |||
..pugs: OUTPUT[*** Insufficient arguments to sprintf at Prelude.pm line 668, column 13-53] | |||
..rakudo r28075: OUTPUT[Could not find non-existent sub sprintfcurrent instr.: '_block11' pc 92 (EVAL_11:32) | |||
..elf r20659: OUTPUT[Argument "a" isn't numeric in range (or flip) at (eval 14) line 3.Use of uninitialized value in range (or flip) at (eval 14) line 3.Argument "i" isn't numeric in range (or flop) at (eval 14) line 3.Use of uninitialized value in range (or flop) at (eval 14) line 3.Use of | |||
..uninitialized value in sprintf at ./elf_f_faster line 261.Use of... | |||
Auzon | duhhh. | ||
perl6: my @a = 10 .. 20; say sprintf(('%x' x 10), @a); | |||
exp_evalbot | kp6 r20659: 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(0x824bfac)', 'APPLY', 'HASH(0x8e524d0)', 'HASH(0x8e521c4)') called at | ||
..compiled/perl5-kp6-mp6/lib/KindaPerl6/Runtime/Perl5/MOP.pm line 169 main::DISPATCH('HASH(0x824bfac)', 'APPLY', 'H... | |||
..pugs: OUTPUT[abcdef10111213] | |||
..rakudo r28076: OUTPUT[Could not find non-existent sub sprintfcurrent instr.: '_block11' pc 92 (EVAL_11:32) | |||
..elf r20659: OUTPUT[Use of uninitialized value in range (or flip) at (eval 14) line 3.Argument "" isn't numeric in sprintf at ./elf_f_faster line 261.Use of uninitialized value in sprintf at ./elf_f_faster line 261.Use of uninitialized value in sprintf at ./elf_f_faster line 261.Use of | 23:37 | ||
..uninitialized value in sprintf at ./elf_f_faster line 261.Use of uni... | |||
Auzon | Originally, I thought @a.sprintf('%x ' x @a.elems); would be a neat idea. But I no longer see a use for it. | 23:39 | |
well, @a.sprintf('%x') was my original idea. But map() solves that. | |||
23:41
cjfields left
|
|||
TimToady | pugs: say [10..20].fmt('%x') | 23:42 | |
exp_evalbot | OUTPUT[a b c d e f 10 11 12 13 14] | ||
Auzon | Yeah, that. :) | ||
rakudo_svn | r28078 | pmichaud++ | [rakudo]: | 23:43 | |
r28078 | pmichaud++ | * More List class refactoring. This commit temporarily breaks | |||
r28078 | pmichaud++ | S29-list/sort.t due to an odd Parrot bug, which I'm looking at | |||
r28078 | pmichaud++ | now. | |||
TimToady | pugs: say [10..20].fmt('%x').join('') | ||
exp_evalbot | OUTPUT[] | ||
Auzon | pugs: say [10..20].fmt('%x').perl | ||
exp_evalbot | OUTPUT["a b c d e f 10 11 12 13 14"] | ||
TimToady | pugs: say [10..20].fmt('%x').join | 23:44 | |
exp_evalbot | OUTPUT[] | ||
TimToady | hmm | ||
pugs: say [10..20].fmt('%x').elems | |||
exp_evalbot | OUTPUT[1] | ||
TimToady | that seems wrongish | ||
Auzon | I don't see .fmt in S29 either. | 23:45 | |
pugs: say [10..20].fmt('%x', "\n") | |||
exp_evalbot | OUTPUT[abcdef1011121314] | ||
TimToady | S02:1348 | 23:46 | |
Auzon | yep, that's where I saw that | ||
TimToady | say "foo".join('') | ||
pugs: say "foo".join('') | |||
exp_evalbot | OUTPUT[] | ||
TimToady | that's wrong | ||
pugs say join('', 'foo') | 23:47 | ||
Auzon | pugs: say join('', 'foo') | ||
exp_evalbot | OUTPUT[foo] | ||
Auzon | perl6: say join('', 'foo'); say 'foo'.join(''); | 23:48 | |
exp_evalbot | kp6 r20659: 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(0x824be5c)', 'APPLY', 'HASH(0x8e4f0d8)', 'HASH(0x8e536d0)') called at | ||
..compiled/perl5-kp6-mp6/lib/KindaPerl6/Runtime/Perl5/MOP.pm line 169 main::DISPATCH('HASH(0x824be5c)', 'APPLY', 'H... | |||
..pugs: OUTPUT[foo] | |||
..rakudo r28078: OUTPUT[fooMethod 'join' not found for invocant of class 'Perl6Str'current instr.: '_block11' pc 72 (EVAL_10:25) | |||
..elf r20659: OUTPUT[Undefined subroutine &GLOBAL::join called at (eval 14) line 3. at ./elf_f_faster line 4492] | |||
TimToady | pugs: say ('foo').join('') | 23:49 | |
exp_evalbot | OUTPUT[] | ||
23:51
jferrero left
|
|||
Auzon | t/spec/S29-list/join.t (smartlinked to join in S29) claims that join should fail on strings, and S29 doesn't say one way or the other | 23:51 | |
TimToady | pugs: say ['foo'].join('') | 23:53 | |
exp_evalbot | OUTPUT[foo] | ||
TimToady | the others are arguable, I guess | 23:54 | |
pugs: say 'foo'.elems | |||
exp_evalbot | OUTPUT[1] | ||
Auzon | pugs: my $foo = 'bar'; $foo.join(',').say | ||
exp_evalbot | OUTPUT[,] | ||
Auzon | pugs: my $foo = 'bar'; ($foo).join(',').say | 23:55 | |
exp_evalbot | OUTPUT[,] | ||
Auzon | pugs: my $foo = 'bar'; [$foo].join(',').say | ||
exp_evalbot | OUTPUT[bar] | ||
23:55
bacek_ joined
|
|||
Auzon | The difference between join(',', $foo) and $foo.join(',') seems odd. | 23:55 | |
TimToady | yes, I think so too | 23:56 | |
so maybe join needs to be more like elems | |||
Auzon | It would be easier in many regards (especially for explaining) if $foo.bar(', | 23:57 | |
TimToady | basically, I think Object should probably define default methods that are biased to particular types | ||
Auzon | if $foo.bar(',') was equal to bar(',', $foo) or something similar | ||
TimToady | much like $a+$b is most generically coercing to numeric | ||
so too the most generic .join should presume a list | 23:58 | ||
more specific types may, of course, override that | |||
23:59
meppl left
|
|||
pmichaud | interestingly, S29 doesn't define 'join' on lists | 23:59 | |
only on Str |