pugscode.org/ | nopaste: sial.org/pbot/perl6 | ?eval [~] <m oo se> | We do Haskell, too | > reverse . show $ foldl1 (*) [1..4] | irclog: irc.pugscode.org/
Set by diakopter on 11 July 2007.
meppl good night 00:15
pasteling "rhr" at 65.94.7.35 pasted "some hacky edits to metholated STD to work around some pugs bugs" (46 lines, 1.8K) at sial.org/pbot/26991 01:58
"rhr" at 65.94.7.35 pasted "attempt to parse '42+1/(2**4-6)' with STD - fails strangely" (2243 lines, 83.5K) at sial.org/pbot/26992 02:01
szabgab morning 05:09
it is that time of the year again, I am trying to build and test Pugs and it does not work
make went well
but make smoke seems to be stuck 05:10
ext/Benchmark/t/basic.t - finishes but then ext/CGI/t/Dump.t takes forever 05:11
or rather I stop it after a while...
rhr hmm, it doesn't hang for me. what happens when you run pugs ext/CGI/t/Dump.t ? 05:15
szabgab I am running plain old "make test" to see what happens there 05:32
pugs ext/CGI/t/Dump.t printed 1..1 and now it is eating my CPU, but does not print anything 05:33
rhr interesting, do you get 3 regex parse errors after the 1..1? 05:35
szabgab no, nothing, just 100% load on the CPU 05:41
in the meantime on the other channel make test seems to be working hard on t/builtins/strings/match without sign of finishing it 05:42
rhr OK, so it's probably a problem with the pugs parser, which has been behaving erratically lately. I had it throw spurious errors 14 times in a row (!) earlier today before running the script correctly... 05:44
not sure what to do about it, though... 05:45
szabgab ok, I'll stop this for now and let others eat my CPU for a while 05:56
meppl good morning 08:22
pmurias hi 08:23
meppl good morning pmurias 08:25
daxim_ blast from the past! slashdot.org/article.pl?sid=00/07/19/203221 10:12
lambdabot Title: Slashdot | Larry Wall Announces Perl 6
pmurias ?eval @a := @b; 10:52
pugsbot_r17185 Error: ␤Unexpected " :="␤expecting "::"␤Variable "@a" requires predeclaration or explicit package name
pmurias ?eval my (@a,@b);@a := @b;
pugsbot_r17185 []
pmurias fglock: hi 11:05
i'm convinced the current Bind semantics are wrong 11:11
either it should call BIND on a signature, or emit a assignment to a container 11:12
fglock hmm 11:16
i think / VAR($var).BIND( 42 ) / is ok for containers
and then / $sig.BIND( $capture ) / for complex structures 11:17
do you have a use case, where is it wrong? 11:19
pmurias $var := @_[0]; 11:22
VAR($var).BIND assumes the specific internal structure of the thing it's binding 11:23
pmurias $var := @_[0] would work actually 11:24
fglock it doesn't - the thing it is binding is either a Value or a Container 11:25
pmurias does it copy roles and _dispatch right now? 11:26
fglock looking 11:27
pmurias i think an assigment in perl5 code would be more correct 11:29
fglock it only copies or set "readonly"
it should probably check the Type, but not set it 11:30
pmurias to put it another way what are the advantages of using BIND instead of = 11:31
only {modified} = 1 come to my mind
fglock yes, that's one thing
another one: you can't morph a scalar into an array: 11:32
fglock in / $a := @b / - $a is still a scalar 11:36
pmurias i think the / @b := $a / is the case which requires special handling 11:38
maybe we should defer discussion of it to the YAPC 11:41
...
fglock we could have some tests
we can use BEGIN blocks to test if the "modified" flags are working properly, 11:43
and for-loop to test scalar x array auto-deref
pmurias i don't know how to write the first one 11:46
i think i got the idea 11:48
fglock there are some - see t/kp6/xx-begin-*.t 11:49
pmurias a t/kp6/08-begin-bind.t fails if i run it by hand but works via the harness 11:55
pmurias s/a// 11:55
Shillo Hi all
fglock looking 11:56
pmurias Shillo: hi 11:56
fglock: i should probably commit my version which uses = 11:57
fglock pmurias: it works here 11:58
pugs_svnbot r17377 | pmurias++ | kp6: BIND replaces with =
diff: dev.pugscode.org/changeset/17377
lambdabot Title: Changeset 17377 - Pugs - Trac
pmurias after my latest commit too?
found the problem 12:00
the harness uses accepts a more relaxed format the i thought 12:02
fglock pmurias: what if a user-defined container redefines BIND? 12:07
pmurias fglock: sorry had my irc window scrolled up, i don't think a user-defined container can redefine BIND 12:51
pugs_svnbot r17378 | pmurias++ | kp6: better undef handling and a test for it
diff: dev.pugscode.org/changeset/17378
lambdabot Title: Changeset 17378 - Pugs - Trac
pmurias you can't overload '=' in perl5 12:53
pmurias some test assume the tap harness requires test numbers 12:57
is there a way to have it require them or should they be changed
fglock pmurias: I don't know 13:11
pmurias currently the begin & bind test appears to pass alhough shouldn't 13:12
fglock pmurias: ok, there is no BIND in the spec - only STORE and FETCH 13:17
t/kp6/08-begin-bind.t stopped working after the last commits 13:20
it looks like $counter is no longer logged as modified 13:21
pugs_svnbot r17379 | pmurias++ | kp6: tests fixed to report "not ok" if they don't work 13:24
diff: dev.pugscode.org/changeset/17379
lambdabot Title: Changeset 17379 - Pugs - Trac
pmurias fglock: i'll fix it
pmurias fglock: i'll fix it later today as i need a break now 13:40
fglock pmurias: sure 13:41
PerlJam in regex, | supports longest token matching, right? 15:25
(unlike perl5)
I don't think I actually read that anywhere, but infer it from the discussion on hashes %foo | %bar does longest-token across the two hashes. 15:26
fglock PerlJam: yes, | would match in "parallel" like junctions do 15:56
PerlJam yes, but the longest token always wins? 15:57
moritz_ it does 15:58
PerlJam "foo" ~~ / f | fo | foo /; # Always matches foo
so that makes me wonder if we shouldn't also have a ? modifier on | and & too
"foo" ~~ / f |? fo |? foo /; # Always matches f
moritz_ I think you can do this with backtracking control 15:59
PerlJam or @x = <f fo foo>; "foo" ~~ / |? @x /;
moritz_ f : | fo : | foo/
PerlJam moritz_: except there's no guaranteed order with |
you only get ordered matching with ||
(and I don't think that works anyway) 16:00
(or, it doesn't quite makes sense to me that it would work anyway)
not sure if I need to change my thinking or | needs more explaining. 16:01
PerlJam "foo" ~~ / ( f | fo | foo ) /; # What's in $0 ? IF the answer is a junction, how do I collapse to the "right" one? OR does that question not even make any sense? 16:03
pugs_svnbot r17380 | pmurias++ | kp6: things are again marked as modified; all test pass again
diff: dev.pugscode.org/changeset/17380
lambdabot Title: Changeset 17380 - Pugs - Trac
pmurias PerlJam: in $0 is foo 16:04
it's the longest one that matches
it's equivalent to "foo" ~~ /(fo?o?) / 16:05
PerlJam pmurias: okay, that jibes with my thinking completely. But again, I wonder should we modify | with a ? to make it "shortest token"?
"foo" ~~ / ( f |? fo |? foo ) /; # $0 == "f"
(similar logic applies to & ) 16:06
DarkWolf84 the lgic is simple 16:07
lazy
:)
the simplest answer is the first posible 16:08
PerlJam well, maybe similar logic doesn't apply to & 16:14
pmurias PerlJam: do you have a use case for |? ? 16:22
[particle] perljam: what about || 16:23
PerlJam [particle]: What about || ? || is ordered, so we always try the alternatives from left to right. 16:34
pmurias: not really, it just appeals to my sense of symmetry that everywhere else we have a "longest" thing, we have a corresponding way to get the "shortest". 16:35
fglock how about <longest f | fo | foo > and <shortest f | fo | foo > where longest is the default 16:39
pmurias fglock: my positional parameters get globalised :( 16:42
method f($a) {$a} gets turned into method f($a) {$GLOBAL::a}
fglock: what should i do? 16:44
fglock you need to transform the AST to hve them declared and added to the Pad 16:50
have 16:51
pugs_svnbot r17381 | lwall++ | Missing <sym> on !~ matcher discovered by rhr++ 17:00
diff: dev.pugscode.org/changeset/17381
lambdabot Title: Changeset 17381 - Pugs - Trac
fglock KindaPerl6::Visitor::Global finds undeclared variables and looks them up in GLOBAL 17:02
pmurias i started at first making KindaPerl6::Visitor::Global leave my params alone, but you suggestion in easier 17:04
fglock it's reasonably easy to do this at the AST creation time - it's done elsewhere 17:06
we should probably split the grammar in smaller files, in order to make recompilation faster 17:07
fglock pmurias: I think when add the sig to the Method node (in token method) we should have the params declared in 17:14
when we add 17:15
pmurias should 'for @(($node.sig).positional) -> $var {say "positional"}' work?
fglock it look ok 17:16
looks
pmurias: I'll try modifying the AST node creation - are you working on this too? 17:17
pmurias feel free 17:18
pugs_svnbot r17382 | fglock++ | [kp6] added stub to declare parameters as 'my' 17:31
diff: dev.pugscode.org/changeset/17382
lambdabot Title: Changeset 17382 - Pugs - Trac
fglock pmurias: the variable declaration worked, but i'm not sure how to do the variable initialization - should i commit? 17:56
fglock ok - i found out 18:04
pugs_svnbot r17383 | fglock++ | [kp6] method parameters exist as Pad variables at compile-time 18:34
diff: dev.pugscode.org/changeset/17383
lambdabot Title: Changeset 17383 - Pugs - Trac
pmurias fglock++ #positional parameters in methods work now 18:44
:)
fglock pmurias: it's easy to add params to subs now
pmurias yes 18:46
working now on getting subs to work
pugs_svnbot r17384 | fglock++ | [kp6] cleanup 'sub' emitter 18:52
r17385 | lwall++ | 1st whack at binding captures
diff: dev.pugscode.org/changeset/17385
lambdabot Title: Changeset 17385 - Pugs - Trac
pmurias fglock: we should use gobby if we work on the same file :) 18:57
fglock ok - but i'm not going to make further changes now :) 18:58
fglock you can overwrite my last commit 19:00
pmurias i reverted my own, as yours is better ;) 19:01
pmurias fglock: should our variables be add_lexicals'ed 19:17
? 19:18
fglock we need a separate place for globals, 19:19
but 'our' is a lexical alias to a global, right?
so maybe yes
fglock hmm - our vars are already being added to the pad, but it looks like subroutine decls is missing this 19:32
pmurias had to let my mother use the computer, 19:35
pmurias i'm working on that part of the grammar now 19:36
pugs_svnbot r17386 | fglock++ | [kp6] parameters are added to the pad at once, for less closure depth 19:55
diff: dev.pugscode.org/changeset/17386
pmurias Grammar.pm must be split 20:03
fglock pmurias: yup 20:06
just move the parts to Grammar/ 20:07
pmurias moving term into it's own file would be a good start
pmurias can't debug that part of grammar should i commit it now,or tommorow after i work on it some more? 20:18
fglock pmurias: better wait, you'd likely fix it quickly after some sleep 20:23
time to go home here 20:24
pugs_svnbot r17387 | rhr++ | [Metholated.pm] add _SPACE and _SPACE_rev 21:44
r17387 | rhr++ | [metholate] handle $+endargs like $+endstmt
r17387 | rhr++ | [STD] add is_type stub
diff: dev.pugscode.org/changeset/17387
DarkWolf84 is there any way to open udp socket with listen 22:01
?
TimToady fg