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.
bjoern_ Hi, I have this code: [[[ 02:54
token CR { <[\x0D]> } 02:55
token LF { <[\x0A]> }
token CRLF { <CR> <LF> }
rule foo { bar | <CRLF> }
my $content = "\x0d\x0a";
my $match = $content ~~ m:keepall/<foo>/;
say $match.perl;
]]]
my version of Pugs says this does not match. However, if I change foo so it reads: '''rule foo { <CRLF> }''' the string matches. why is that?
(I tested this with 6.2.13 on Win32) 02:56
Chris j #lisp 03:20
augh
sorry
fax -_- 03:21
K0brik hey 05:43
#perl are too conservative so I went here instead 05:46
platypus o.O
K0brik they kicked me because I told them about the CutSys::Chao he 05:47
some of them believe in a world ruled by a fascist minority 05:48
how it going with the sexy perl? 05:51
dduncan this channel is mainly for talk about Perl 6 ... Perl 5 is generally off-topic 05:55
K0brik to make good software one need good philosophy, right? 05:55
diotalevi which is what we have Larry for. 05:56
K0brik and all the other little helpers
ahmadz hi 05:57
K0brik may I call you brothers and sisters?
diotalevi Huh? 05:58
K0brik sure
diotalevi I'd rather just be called by my handle. 05:59
K0brik what type of handle?
diotalevi: are you a boy or a girl? 06:00
diotalevi Does it matter?
K0brik alot
diotalevi Why?
fax K0brik: a lot :)
dduncan this isn't a dating service
dduncan just call us all by either our handle or 'you', keeps it simple 06:01
K0brik because a language should be made by fellow brothers and sisters of course
dduncan whatever, we are people, and it doesn't matter what our genders are 06:02
its all platonic here
K0brik I'm not a sexist but I thought diotalevi was referencing his penis
dduncan you really need to read up on how word meaning is influenced by context 06:03
diotalevi No.
K0brik j/k brothers
dduncan a 'handle' is the name that people in an online discussion identify themselves as, mine is 'dduncan' 06:04
also known as a 'nick'
K0brik yeah. I know
K0brik and I respect that 06:04
dduncan then how could you be confused by diotalevi?
K0brik random idiocy I guess 06:05
dduncan anyway, I've got stuff to do, bye for now
K0brik never mind
me too. I just had to say hey
diotalevi Ok. Next time, be normal to us. 06:07
K0brik yeah. I'm just a fellow who likes the simplicity of perl
no shame to have a bit of influence, right? 06:08
diotalevi oh, what a difference having the right tool for the job makes... 06:23
irobot sounds like a fortune 06:23
irobot I have found that perl works for most things 06:29
pmurias hi 12:36
pugs_svnbot r18225 | pmurias++ | [kp6] the C rules are correctly processed by Inline::C 12:40
diff: dev.pugscode.org/changeset/18225
lambdabot Title: Changeset 18225 - Pugs - Trac
pugs_svnbot r18226 | pmurias++ | [kp6] TokenC rules are now visible as perl6 methods 13:01
diff: dev.pugscode.org/changeset/18226
lambdabot Title: Changeset 18226 - Pugs - Trac
pmurias it would be interesting to check how fast the c rules are in comparision to mp6 ones ;) 13:01
fglock pmurias: they may be faster than p5 ones in some cases, because they are inlined and have no unicode 13:05
pugs_svnbot r18227 | fglock++ | [kp6] updated 'ident' syntax 13:10
diff: dev.pugscode.org/changeset/18227
lambdabot Title: Changeset 18227 - Pugs - Trac
pmurias fglock: utf8 shouldn't be a big slowdown if added correctly 13:13
fglock: late binding is propably more problematic 13:16
masak the pugs test suite is the hippest test suite I know :) 13:28
someone should write an article about the cultural references hidden in it
pmurias fglock: is rules taking using $_ as the default string to match against specced? 13:29
fglock pmurias: they should be, but there are still some mp6isms in kp6 13:31
pmurias fglock: i don't understand 13:34
they should be speced? 13:35
fglock this wasn't specced when the first implementation was done, so the implementation in kp6 may need fixing 13:37
pmurias is it specced now? 13:40
fglock looking 13:41
ferreira New article on operators: feather.perl6.nl/~ferreira/perl6-op...pare1.html Please have look if you feel like it. 13:48
lambdabot Title: compare1.pod6
fglock pmurias: not sure 13:56
pugs_svnbot r18228 | Aankhen++ | * [kp6-lisp] really implemented lexical variables. hopefully. 13:58
diff: dev.pugscode.org/changeset/18228
lambdabot Title: Changeset 18228 - Pugs - Trac
masak ferreira: cool article. I did not know about `before` and `after` before. :) 14:00
pugs_svnbot r18229 | Aankhen++ | [kp6-lisp]
r18229 | Aankhen++ | * define stub functions in packages.lisp
r18229 | Aankhen++ | * tweaked stub error message in Pad.lisp
diff: dev.pugscode.org/changeset/18229
lambdabot Title: Changeset 18229 - Pugs - Trac
masak what is the exact reach of chained comparison ops? will 1 < $val1 != $val2 < 6 check whether $val1 is less than 6? 14:02
pugs_svnbot r18230 | Aankhen++ | * [kp6-lisp] moved code from packages.lisp into Package.lisp, to match Pad.lisp 14:03
r18231 | Aankhen++ | * [kp6-lisp] removed packages.lisp
diff: dev.pugscode.org/changeset/18231
lambdabot Title: Changeset 18231 - Pugs - Trac
masak hm, probably not
Aankhen`` avar: my $x = 5; if (1) { my $x = 6; say $x; }; say $x; # => 6\n5 14:04
(You need the `if` there since bare blocks seem to fail to parse.)
fglock Aankhen``: do { } should work 14:06
Aankhen`` pmurias: You said yesterday that KP6 already does the separation of cells and variables thing. Could you elaborate?
fglock: Ah, cool. It's not a big deal, though, I just wanted to test the lexicals.
pmurias Aankhen``: kp6 does separation of containers and contents 14:07
my $a = 1;
binds a Scalar to $a 14:08
and calls $a.ASSIGN(1);
Aankhen`` I see.
pmurias $a.STORE(1) actually
Aankhen`` What does `my $b := $a` subsequently do?
pmurias binds $b to the Scalar stored in $a 14:10
Aankhen`` Hmm, okay.
pmurias the binds are = in perl5 land
platypus pmurias: I thought that binding was *$b = *$a; in perl5 land. 14:21
fglock platypus: in perl5, $a = Scalar.new; $b = $a # $a and $b point to the same object 14:24
because in perl5 objects are pointers
platypus nods. 14:25
You didn't mention that you where dealing with objects.
Juerd references!
platypus (pedent in me wishes to point out that they are refrences rather then objects) But Juerd has done that for me. 14:26
[particle] ...they were talking about how kp6 is implemented.
juerd: is feather smp?
fglock ok, references 14:28
Juerd [particle]: Yes. 14:32
[particle] juerd: thanks. we just got make -j working for parrot, and are working on parallelization of make test 14:33
Juerd Neat 14:34
Note that that usually speeds things up even on single CPU systems 14:35
[particle] yes, but testing on native smp can also be enlightening. i can do that on my box, but was hoping the new and improved feather could be used by others :) 14:36
Juerd It can! 14:37
fglock i wonder if i used cheat/metholate on kp6, would it run in pugs 14:41
Aankhen`` KP6 doesn't support infix:<x>, does it? 14:45
bloonix 14:50
fglock Aankhen``: no - do you need it? 14:53
Aankhen`` fglock: Only for prettifying the generated code; it's not urgent.
pugs_svnbot r18232 | Aankhen++ | * [kp6-lisp] more Lispy handling of newlines in generated code. 15:00
r18233 | Aankhen++ | [kp6-lisp]
r18233 | Aankhen++ | * added PAD slot to KP6-CODE class.
r18233 | Aankhen++ | * moved code from functions.lisp into Code.lisp
diff: dev.pugscode.org/changeset/18233
lambdabot Title: Changeset 18233 - Pugs - Trac
ferreira masak: Perl 6 would teach us many things. Using 'before' and 'after' is one of them. 15:03
pugs_svnbot r18234 | Aankhen++ | * [kp6-lisp] removed functions.lisp
diff: dev.pugscode.org/changeset/18234
lambdabot Title: Changeset 18234 - Pugs - Trac
ferreira masak: I also think that 1 < $val1 != $val2 < 6 will only check the adjacent pairs: 1 < $val1, $val1 != $val2, $val2 < 6 15:04
masak ferreira: yes, me too, upon further reflection 15:05
ferreira masak: 1 < 6 > 1 is kind of weird and so are other expressions, but I think the point is that some nice (readable) expressions like $a < $b < $c become possible. 15:08
pugs_svnbot r18235 | Aankhen++ | * [kp6-lisp] pruned a bit of unused code.
diff: dev.pugscode.org/changeset/18235
lambdabot Title: Changeset 18235 - Pugs - Trac 15:09
masak ferreira: how does 1 < 6 > 1 compete against "everything only evaluated once"? does that only go for variable evaluations, not literals? 15:10
also, is there any danger of 1 < 6 > 1 being parsed as 1 qw<6> 1? or is there a term/op rule or something that decides that? 15:11
ferreira masak: I don't think there is a term/op rule to decide for the right thing in this case
TimToady there is no problem with term/op confusion here 15:13
avar Aankhen``: What could I use for while () {} in lisp? 15:14
ferreira The "everything only evaluated once" has to do with evaluating "exp1 < exp2 < exp3" as "($tmp1, $tmp2) = (exp1, exp2); $tmp1 < $tmp2 and ($tmp3) = (exp3), $tmp2 < $tmp3". If exp2 is identical to exp3, it could be evaluated twice.
avar the goto construct I guess
TimToady it doesn't matter if an immutable value is evaluated multiple times
Aankhen`` avar: Eh?
avar: Heard of DO? :-)
TimToady it's only the side effects that matter
Aankhen`` (do () ((not (...cond...))) exp1 exp2 exp3 ... expn) 15:15
fax (loop (stuff)) also 15:15
Aankhen`` Oh yeah, LOOP would be easier.
fax but it must be a () thingy, so probably you want (loop (progn ...)) 15:16
TimToady ferreira: "people would easily point" is not quite understandable. Perhaps just "one is forced to choose" 15:16
fax or even (loop while (condition) do ...) :S
Aankhen`` fax: Why not (loop :while (cond) :do (...))?
Heh.
avar while ($cond) { $body } could be (loop (unless cond (return)) $body) 15:17
fax I wonder why I didn't say that first :p
ferreira TimToady: I see. I have the habit of writing too much at first.
Aankhen`` avar: Or it could be the more natural form. :-P
And for until, just change :while to :until.
avar oh there's :while, neat 15:18
TimToady ferreira: well, I think you were trying for something more like "people would naturally assume you have to choose"
Aankhen`` avar: Hidden depths of LOOP. <G>
fax yeah, loop is a whole'nother programming language :)
avar oh crap, you're adding an indenter to the emitter?:) 15:19
Aankhen`` avar: I already added the framework for it, but I can't actually indent until infix:<x> works. 15:20
At least it's breaking lines more logically, for now. :-)
TimToady does lisp have an sprintf equivalent?
fax (format nil ...)
TimToady or substr(' ', 0, $len)
avar TimToady: Something much, much better
ferreira TimToady: I thought of emphasizing how Perl 6 would not have this issue to be criticized ;-)
TimToady and it's so much better that you can't make a string of spaces? :) 15:21
Aankhen`` Er.
avar CL-USER> (format t "It's like a ~r times better" 1000)
It's like a one thousand times better
Aankhen`` Yes, it does, but this is in Perl 6 land.
avar :)
fax TimToady: (make-string 5 :initial-element #\space)
gives " "
Aankhen`` We're talking about indenting the generated code.
avar Aankhen``: You can just use a loop instead of x
TimToady ferreira: well, and in fact many pointless discussions about which operators to overload do in fact happen in the P5 camp 15:22
avar sub x { my ($str, $times) = @_; my $ret; ...
Aankhen`` avar: Too much effort for too little gain.
I'll just wait till KP6-CL can compile it. :-P
avar But the best way to do this imo would be to write a lispindent program that just calls (read) on the string on stdin and (prints) it 15:23
TimToady well, at least lisp is easy to indent, just put a newline and a random number of spaces before each (, then delete any whitespace before each )
:)
ferreira TimToady: changing the subject, I was thinking of that specification that a declared Str() method would be used for string coercion (implicit or with ~). But if we declare Num() and Int(), which one would be used by numeric coercion (implicit or with +)? 15:24
TimToady + implies Num
TimToady unless you happen to know the context requires Int anyway 15:25
ferreira like in $a div $b?
TimToady what appears to be coercion is mostly just multiple dispatch
P5 always coerces, but in P6 we just set up the multis so that the defaults work that way 15:26
so in P5, $a == $b strongly implies Num($a) === Num($b), it's not as strong in P6 15:27
we just try to supply enough operators that people aren't tempted to overload them for uses other than the obvious 15:29
which is one of the strongest arguments for allowing Unicode operators, I think 15:30
otherwise you get travesties like C++'s use of <<
ferreira right. but will there be a way in pure Perl 6 to add a new operator by specifying its precedence and associativity like Prolog could do? In Prolog, it was much easier because of the light syntax. 15:32
Aankhen`` fglock: How does one use the HTML emitter? I want to examine the generated AST…
avar Aankhen``: --ast 15:33
--ast | perltidy
TimToady ferreira: certainly, see S06:1538
Aankhen`` Oh, --ast works.
avar: Heh, thanks.
pugs_svnbot r18236 | avar++ | Implemented while 15:36
diff: dev.pugscode.org/changeset/18236
lambdabot Title: Changeset 18236 - Pugs - Trac
TimToady ferreira: however, you never actually have to specify an arbitrary precedence *value* in Perl 6; all precedence is relative to an existing operator
TimToady so you could easily install 100,000 precedence levels between * and +, for instance, without worrying about running out of levels 15:37
avar ferreira: b.t.w. I liked your emacs+slime+opengl demo
too bad I can't see the source.. 15:38
ferreira TimToady: that's beautiful
TimToady thank you. one of my few original inventions. :)
most everything else is stolen, er, borrowed 15:39
ferreira avar: what? I think you are confusing me with someone else.
[particle] everything is relative, and nothing is real
masak likes the value-less precedence thing too
ferreira TimToady: it is the integration magic that counts ;-)
TimToady well, nothing is at least interesting, if not real
you're gonna give me a swelled head. oh wait, too late... :) 15:40
szbalint wohoo my amazon books arrived 15:48
szbalint now has most of the books mentioned in READTHEM
fglock scheme2006.cs.uchicago.edu/11-ghuloum.pdf 15:50
avar cat t/kp6/54-while.t | perl kp6-mp6-perl5.pl --lisp | sbcl 15:52
There is no applicable method for the generic function
#<STANDARD-GENERIC-FUNCTION CL->PERL (10)>
when called with arguments
(T).
mm
Aankhen`` You want 'true. 15:55
pmurias fglock: do you plan to emit native code? ;)
avar pmurias: we're doing that already:) 15:56
pmurias well directly
avar why reinvent the wheel?
fglock pmurias: re article? i thought it could give some hints on implementing variables, etc 15:57
pmurias k 15:58
avar Aankhen``: I lack debug-foo 16:00
Aankhen`` avar: Clearly. ^_^ 16:10
avar how do I see /where from/ that was called?
Tene pugs: my $a = 'foo'; $a ~~ s:g{o}='a'; $a 16:14
exp_evalbot OUTPUT[*** Cannot parse regex: o␤*** Error: ␤] 16:15
Aankhen`` avar: Pastebin the generated code.
Tene unknown parameter 'g'
Is this NYI, or am I misremembering?
avar Aankhen``: cat t/kp6/54-while.t | perl kp6-mp6-perl5.pl --lisp 16:16
Aankhen`` Hmm, what do I do to get the length of a list in KP6? 16:17
fglock Aankhen``: .elems 16:18
Aankhen`` Weird, I tried that. 16:19
Oh, hold on, I might have forgotten to use parentheses on the previous method call.
fglock Aankhen``: i think mp6 doesn't support .elems (kp6 is compiled with mp6) 16:21
Aankhen`` fglock: Ahh. 16:22
Any other way to check that an arrayref is defined?
Er, has more than one element?
Bleh, I fail.
"has at least one element".
fglock maybe: if @x {...} 16:24
Tene pugs: my $a = 'foo'; $a ~~ s:global{o}='a'; $a 16:26
exp_evalbot OUTPUT[*** Cannot parse regex: o␤*** Error: ␤]
pugs_svnbot r18237 | Aankhen++ | * [kp6-lisp] fixed a few bugs in error handling in Code.lisp 16:34
diff: dev.pugscode.org/changeset/18237
lambdabot Title: Changeset 18237 - Pugs - Trac
Aankhen`` avar: It's the functions in GLOBAL.lisp. All the comparison functions are returning NIL/T instead 'FALSE/'TRUE. 16:38
avar crap 16:39
Aankhen`` I'll fix.
avar great
Aankhen`` avar: What's with the definition for <=? 16:43
avar what about it? 16:44
Aankhen`` Why not just (<= foo bar)? 16:46
avar (cl->perl (<= (num* first) (num* second)))) 16:47
numeric context?
Aankhen`` Yes, but you've got: (signum (- foo bar)) 16:48
avar that's the definition for <=>
Aankhen`` Ah, right. 16:52
All the angle brackets confused me. :-P
Aankhen`` avar: Your problem ees fixed. 16:59
pugs_svnbot r18238 | Aankhen++ | [kp6-lisp]
r18238 | Aankhen++ | * removed redundant CL->PERL on arguments to function calls.
r18238 | Aankhen++ | * added KP6-COERCE methods for T and NIL to KP6-BIT.
r18238 | Aankhen++ | * added coercion to GLOBAL.lisp to ensure that KP6 objects are returned from every function.
diff: dev.pugscode.org/changeset/18238
lambdabot Title: Changeset 18238 - Pugs - Trac
pugs_svnbot r18239 | avar++ | Fixed ne and !=, tests were inverted 17:16
diff: dev.pugscode.org/changeset/18239
lambdabot Title: Changeset 18239 - Pugs - Trac
avar Aankhen``: plz run tests kthx 17:19
TimToady avar
re: (cl->perl (<= (num* first) (num* second))))
that's a decent p5 definition 17:20
and maybe a decent kp6 definition
but isn't how it works in p6
Aankhen`` waves at diakopter. 17:20
Aankhen`` TimToady: We don't have multis yet, so we're just faking it. 17:20
TimToady operates at diakopter :)
is fine for kp6, just a fwiw 17:21
Aankhen`` nods.
More accurately, we don't have subs at all yet.
[particle] if you implement multis, you'll get subs for free ;)
Aankhen`` :-P 17:22
riffraff hi 17:22
Aankhen`` avar: Tests are for wusses! 17:23
avar Aankhen``: Implement bindings!
Aankhen`` I keep trying and failing. :-( 17:24
avar ;/
diakopter discovered this week his employer has a site license for nearly every single msft product (for the past three months). And here we were considering implementing an internal EAI/BAM solution (*not* based on BizTalk) with license fees of $400-1500k/year
Aankhen`` diakopter: :-o
[particle] wonders if diakopter's company would sponsor a terminal server for remote development of perl6 & parrot :D 17:25
diakopter and so now our division's budget folks are surprised to see an extra mil or two in the budget for this fiscal year. talk about incentive to virtualize as many servers as possible.....!
doubt it...
Aankhen`` LOL.
[particle] it'd cost less than $1M, i promise. 17:26
diakopter I mean, now that virtual server is freely licensable. 17:27
avar [particle]: feather? 17:31
[particle] avar: need a license for the os
avar huh? 17:32
[particle] perhaps i misunderstood your question 17:32
[particle] avar: a Windows Terminal Server. 17:34
diakopter [particle]: they've got both infinite (non-)virtual OS licenses and CALs, but for internal use. I doubt donating to a non-profit project/entity would be permitted. However, when I was at oscon I asked the MSFT/Port25 guys if they would consider hosting remote access build/test farms on win32/64 for AL2 projects, and they said, hold that thought for a coupla months, msft will be making a giant announcement along those lines. I ... 17:58
... held the thought, but not my breath. 17:59
[particle] i'll check the sky over redmond for smoke signals
pugs_svnbot r18240 | kjwcode++ | Probably about time I did this. I may not code much right now, 20:11
r18240 | kjwcode++ | but I do a lot of smokes.
diff: dev.pugscode.org/changeset/18240
lambdabot Title: Changeset 18240 - Pugs - Trac
pugs_svnbot r18241 | pmurias++ | [kp6] TokenC: rule names are magled, some stubs 21:23
diff: dev.pugscode.org/changeset/18241
lambdabot Title: Changeset 18241 - Pugs - Trac