Think twice before running "make install" for Pugs | moritz.faui2k3.org/irclog/ | pugscode.org | sial.org/pbot/perl6 | ?eval [~] <m oo se> | We do Haskell, too | > reverse (show (scanl (*) 1 [1..] !! 4)) | "Perl 6 Today" video from YAPC::Asia: xrl.us/v6op
Set by agentzh on 6 May 2007.
moritz unreal_name: under unix with file $imagename 00:00
if $file ~~ Image { say "it's an image, YaY!" } 00:01
00:01 SubStack joined
unreal_name $file ~~ Image ?? 00:03
that would actually work
?
00:04 weinigLap joined
moritz unreal_name: if you'd define a class Image that overlaods ~~ and implements that check - then yes ;) 00:04
unreal_name but what would that class actually contain? :) 00:08
i can define ~~ to compare file names to contain .jpg
and stuf
but is there more i could do?
moritz of course
svnbot6 r16471 | Aankhen++ | examples/rules/Grammar-IRC.pm:
r16471 | Aankhen++ | * took a shot at the `host` rule.
moritz you could check for magic numbers/known file headers
just like file(1) does
renormalist is anyone getting the examples/rules/basic.pl to run with any input that the rules match? 00:09
I cannot write any usable basic line although the grammar looks readable
unreal_name moritz thanks, could you point me in the right direction 00:10
to learn how to check these headers?
moritz unreal_name: read the source code of "file"
unreal_name: but why would you want to replement that? 00:11
unreal_name well 00:12
i need to read contents of directory
and resize all image files
but for all i know, an image doesn't have to end with .jpeg
and all that
so i need a way to find whether or not a file is an image
renormalist unreal_name: and how do you the resize-stuff? with external programs like imagemagick? 00:13
00:13 SubStack joined
unreal_name with GD module 00:14
moritz for i in *; do convert "$i" -resize 150x100 "small-$I"; done 00:15
all(<linux unix gnu_tools>)++ 00:16
s/I/i/ of course
unreal_name shell scripts? 00:17
renormalist unreal_name: so maybe it's more useful to handle failures instead of pre-filtering whether the image is ok 00:18
Aankhen`` ?eval rule foo { . }; "a" ~~ /<foo>/ 00:20
00:20 evalbot_r16467 is now known as evalbot_r16470
evalbot_r16470 *** Cannot parse regex: <foo>ā¤*** Error: ā¤Match.new(ā¤ ok => Bool::False, ā¤ from => 0, ā¤ to => 0, ā¤ str => "", ā¤ sub_pos => (), ā¤ sub_named => {}ā¤) 00:20
unreal_name maybe... i tried : GD::Image($file, 1) inside eval
for each file... it still outputted errors
svnbot6 r16472 | Aankhen++ | examples/rules/basic.pl: 00:21
r16472 | Aankhen++ | * grammar updates.
00:24 nekokak joined
renormalist Aankhen``: did you see the non-closing bracket in <expr>? its probably also a bug 00:26
Aankhen``: I mean examples/rules/basic.pl, of course
Aankhen``: do you have an example BASIC string that works? 00:27
Aankhen`` Oh, whoops, I missed that. 00:33
I wonder how it compiles at all. :-S
renormalist: No, I don'tā€¦ from reading the grammar, though, it seems this ought to work: `PRINT "hello";`. 00:35
svnbot6 r16473 | Aankhen++ | examples/rules/basic.pl:
r16473 | Aankhen++ | * fixed unmatched bracket spotted by renormalist++
Aankhen`` I think I'm gaining an understanding of controlled backtracking. 00:36
regex foo :ratchet { bar } # this is sort of like `^bar`, except that instead of being anchored to the beginning of the string, it's anchored to the current position. Right? 00:37
00:39 Eidolos joined
renormalist Aankhen``: erm, sorry, I don't know. 'To what do you refer, to :ratchet? 00:41
just reading S05
Aankhen`` The :ratchet regex modifier.
No worries, it was a general question for anyone who might know. ;-) 00:42
renormalist :-) 00:43
I had the hope that with answering your question I could buy an answer to the basic.pl example mysteries ... :-) 00:44
Aankhen`` Heh, I'm looking into it at present. 00:45
I have a few questions of my own, like how it compiled at all!
Well, how the regex compiled at any rate.
00:47 evalbot_r16470 is now known as evalbot_r16472 00:48 bsb joined
renormalist Aankhen``: when commenting in the grammar keyword, Pugs panics. So maybe something is wrong with it. 00:48
Aankhen`` Yeh, grammars don't really work all that well as yet.
00:52 nipotaway is now known as nipotan
svnbot6 r16474 | Aankhen++ | examples/rules/basic.pl: 00:56
r16474 | Aankhen++ | * rules have :sigspace implicitly.
r16474 | Aankhen++ | * `program` need only be a `token`.
r16474 | Aankhen++ | * $line needn't be initialized.
00:59 polettix joined 01:04 justatheory joined 01:06 trunix joined
renormalist Aankhen``: The \n in <program> is a bit weird because basic.pl reads by line and the \n aren't part of each line for the match. It's kinda double handled. 01:11
01:12 nicodaemos joined
Aankhen`` renormalist: The script builds up $basic_program like so: $basic_program ~= $line ~ "\n"; 01:12
And once that's done, my $parsed = $basic_program ~~ /<program>/; 01:13
renormalist hm, indeed. Anyway, I have to sleep, gn8 all 01:18
01:20 foof joined 01:27 jisom joined 01:41 dduncan joined 01:42 amnesiac left, amnesiac joined 01:56 mncharity joined
thoughtpolice is there a reason my "@a = 1..*;" is just resulting in a stack overflow; do I need it to be in list context for it to be lazy? 02:24
Aankhen`` I believe the infinite generators aren't implemented yet, or something like that. 02:25
thoughtpolice ah 02:26
that might be something worth trying implementing :)
dduncan I wouldn't expect that to be a *stack* overflow though, unless the range is implemented recursively 02:45
or the stack overflow is an elsewhere-manifestation of the bug
never mind 02:46
02:52 mako132_ joined 02:55 [particle] joined 03:38 Alias_ joined
svnbot6 r16475 | Darren_Duncan++ | ext/QDRDBMS/ : renamed all exportable functions of AST.pm by prepending 'new' to each, so their fully-qualified names don't match class names in same file 03:41
r16476 | Darren_Duncan++ | ext/QDRDBMS/ : part 1/2 of rename QDR_10_AST.t to QDR_10_AST_Literals.t 03:47
03:48 Eidolos joined 04:01 REPLeffect joined 04:04 masak joined
svnbot6 r16477 | Darren_Duncan++ | ext/QDRDBMS/ : part 2/2 of rename QDR_10_AST.t to QDR_10_AST_Literals.t 04:14
04:19 [particle] joined 04:24 Eidolos joined 04:37 weinigLap joined
Aankhen`` Do backslashes have special meaning within a regex subrule like < a b c >? 04:53
Do I need to double them to actually match them?
svnbot6 r16478 | Aankhen++ | examples/rules/Grammar-IRC.pm: 04:56
r16478 | Aankhen++ | * pretty much everything makes more sense as a token than a regex.
r16478 | Aankhen++ | * wrapping to 80 cols.
05:04 dolmans joined 05:08 BooK joined
lumi Aankhen``: Wasn't it "all punctuation should be escaped"? 05:09
Aankhen`` S05 says "When you get tired of writing: token sigil { '$' | '@' | '@@' | '%' | '&' | '::' } 05:10
you can write: token sigil { < $ @ @@ % & :: > }"
I'm trying to figure out whether backslashes are still metacharacters within it (e.g. so you can include '<' and '>'). 05:11
japhb Aankhen``: Not guaranteed correct, but probably whatever happens in STD marks TimToady's current thinking ... this seems very likely to have come up .... 05:18
(not having checked myself)
Aankhen`` Can't find it in there. :-( 05:19
japhb wow, I'm honestly surprised 05:20
Aankhen`` Yeah, I though that bit I pasted was from the grammar. 05:22
dduncan question ... how do I make Pugs throw an exception with a stack trace? 05:24
in the past, I thought die() did this, but now it doesn't 05:25
I want something like Perl 5's confess()
or in general, I want any thrown exception to include a stack trace, whether I throw it or not
I'm trying to debug my code, which is partially recursive, and that could really help 05:35
05:40 devogon joined
dduncan doing some manual debugging, it seems the problem may be that while sub multis work, submethod BUILD multis do not 05:46
that is, the wrong one of the latter is being invoked 05:47
so if I pod-comment-out the multi version that I don't want to invoke, then the other one is invoked ... fortunately I don't need to use both versions for my first release 05:50
?eval say 'foo.bar.baz'.split( /\./ ).perl(); 05:58
05:58 evalbot_r16472 is now known as evalbot_r16478
evalbot_r16478 OUTPUT[("f", "o", "o", ".", "b", "a", "r", ".", "b", "a", "z")ā¤] Bool::True 05:58
dduncan I will look in the docs too, but what is the Perl 6 way to say what that pattern means in Perl 5? 05:59
I thought it was the same
rereading the docs told me no different, so this may be a Pugs bug ... 06:04
?eval say 'foo.bar.baz'.split( /a/ ).perl(); 06:05
evalbot_r16478 OUTPUT[("f", "o", "o", ".", "b", "a", "r", ".", "b", "a", "z")ā¤] Bool::True
dduncan yep, definitely a bug
on the other hand ... 06:09
?eval say 'foo.bar.baz'.split( '.' ).perl();
evalbot_r16478 OUTPUT[("foo", "bar", "baz")ā¤] Bool::True
dduncan that does work, so I'll use that for now
Aankhen`` ?eval 'foo.bar.baz'.split( rx/\./ ).perl 06:10
evalbot_r16478 "(\"foo\", \"bar\", \"baz\")"
Aankhen`` dduncan: I guess you need to be explicit about its being an rx// rather than an m// for now.
dduncan okay ... in this case, I only want to split on a constant string anyway, so would the '' form then be more efficient? 06:11
in Perl 5, '' form seems to make a regex anyway
Aankhen`` I believe it would be, but I could be wrong.
dduncan but not sure if Perl 6 does
well, while unnecessary, I'll try the rx// form now just to help self-documenting 06:12
thank you
Aankhen`` Hmm, there aren't any tests using // in t/builtins/string.t
dduncan oh btw, the m// and m:p5// gave the same results as //
Aankhen`` I'd better add some.
dduncan what about t/builtins/split.t ? 06:13
Aankhen`` Er, sorry, t/builtins/string/split.t
dduncan yes
svnbot6 r16479 | Aankhen++ | examples/rules/Grammar-IRC.pm: 06:18
r16479 | Aankhen++ | * fixed \c[BEL]
Aankhen`` Yes, reading S05 again shows that `split /.../, $foo` should DTRT. 06:19
meppl good morning 06:21
Aankhen`` Hiya meppl.
meppl hello aankhen 06:22
Aankhen`` What's shakin'?
06:26 Averell joined
svnbot6 r16480 | Aankhen++ | t/builtins/strings/split.t: 06:39
r16480 | Aankhen++ | * added tests for split /.../, $str
Aankhen`` ?eval "a b c d".comb 06:45
06:45 evalbot_r16478 is now known as evalbot_r16479
evalbot_r16479 (Match.new(ā¤ ok => Bool::True, ā¤ from => 0, ā¤ to => 1, ā¤ str => "a", ā¤ sub_pos => (), ā¤ sub_named => {}ā¤), Match.new(ā¤ ok => Bool::True, ā¤ from => 1, ā¤ to => 2, ā¤ str => "b", ā¤ sub_pos => (), ā¤ sub_named => {}ā¤), Match.new(ā¤ ok => Bool::True, ā¤ from => 1, ā¤ to => 2, ā¤ str => "c", ā¤ sub_pos => (), ā¤ sub_named => {}ā¤), Match.new(ā¤ ok => Bool::True, ā¤ from => 1, ā¤ to => 2, ā¤ str 06:45
Aankhen`` What is `comb`?
06:45 franck__ joined
Tene ?eval "a b c d".comb(rx/a/) 06:53
evalbot_r16479 ("a",)
Aankhen`` but what does it do sir
svnbot6 r16481 | Aankhen++ | t/builtins/strings/split.t:
r16481 | Aankhen++ | * use is_deeply instead of split_test for all but one test.
Aankhen`` It just looks for the first occurrence?
?eval "a b c d".comb(rx:g/a/) 06:54
06:54 evalbot_r16479 is now known as evalbot_r16480
evalbot_r16480 () 06:54
Tene are you expecting there to be multiple 'a's?
Aankhen`` I think I knew at one point, but that must have been a while back.
No, just fiddling with the params to see what it does.
Tene Ahh.
Aankhen`` Do you understand it sufficiently to explain it? :-) 06:55
Tene No.
Aankhen`` Darn.
Tene I suspect the synopses do. 06:56
Aankhen`` Which one?
Hmm, I'll check S29.
Ahh. 06:57
svnbot6 r16482 | Darren_Duncan++ | ext/QDRDBMS/ : workaround Pugs not dispatching correct multis yet by commenting-out extra versions ; change any /.../ to rx/.../ 07:02
dduncan well, that's it for me today ... midnight 07:03
Aankhen`` G'night. 07:04
dduncan good night
07:07 kanru joined 07:20 dduncan left 07:22 marmic joined 07:55 demq joined 08:07 iblechbot joined 08:17 IllvilJa joined 08:18 buetow joined 08:36 marmic joined
gaal Aankhen``: I think I understand comb from S29. Do you find it unclear? 08:40
remember that the English verb "to comb" means "to go through X looking for Y" 08:42
foof like when they combed the desert in spaceballs? 08:43
gaal there's a desert in space? balls. 08:45
(sorry, required daily irc inanity dosage)
Aankhen`` gaal: Yeah, I looked at S29 and it seems to make sense.
Hence the <Aankhen``> Ahh.
I suppose I should have mentioned that I looked at it, though. 08:46
gaal Ahh. }:)
Aankhen`` gaal: Thanks anyway. ^_^
gaal sure :)
moritz on #perlde there is a discussion about p5 regexes... what exactly does m/.*\z/ match?
Aankhen`` Any string at all?
moritz intuitively I'd say it matches any string
but it doesn't seem to work that way
Aankhen`` What doesn't it match? 08:47
moritz perl -w -e 'my $foo = "bar\n"; print "matched" if ($foo =~ m/.*\z/);'
gaal ā••ā•’
Aankhen`` evalbot_r16480: "bar\n" =~ /.*\z/
eval: "bar\n" =~ /.*\z/
buubot Aankhen``:
Aankhen`` evalbot_r16480: "bar\n" =~ /.*\z/ ? 1 : 0
Argh.
eval: "bar\n" =~ /.*\z/ ? 1 : 0
buubot Aankhen``: 0
Aankhen`` eval: "bar\n" =~ /.*/ ? 1 : 0
buubot Aankhen``: 1
Aankhen`` eval: "bar\n" =~ /\z/ ? 1 : 0
buubot Aankhen``: 1
Aankhen`` I dunno then.
\z matches the absolute end of the string. 08:48
.* matches anything at all.
moritz right
right again
gaal can't match anything, can it, because /s isn't in effect
Aankhen`` Ah, right.
gaal . does not match anything
Aankhen`` eval: "bar\n" =~ /.*\z/s ? 1 : 0
buubot Aankhen``: 1
Aankhen`` There we go.
moritz gaal: but with .* it matches the empty string as well, right?
gaal yes
Aankhen`` gaal++ # my sleep-addled brain could not comprehend
eval: "" =~ /.*\z/s ? 1 : 0
buubot Aankhen``: 1
moritz and shouldn't there be _alwys_ an empty string before the end of string? 08:49
gaal moritz: well technically .*\z matches an empty string only if it ends. :-P
Aankhen`` LOL.
moritz *lol*
Aankhen`` The Never-Ending Story 2: The Never-Ending String
moritz so it wouldn't match a circular string? *g* 08:50
gaal The Neverending End
foof doesn't haskell have those? :) 08:51
moritz so is it a perl regex bug that /.*\z/ doesn't match every string?
Aankhen`` moritz: Doesn't it?
Well, with a /s.
gaal hmm, moritz, I think you have a point.
Aankhen`` And it's not a bug.
At least not the way I see it.
moritz Aankhen``: but .* permits an empty string
Aankhen``: and there are empty string _everywhere_ 08:52
Aankhen`` Yes, which /.*\z/s matches.
Or without /s too.
gaal perhaps you can't have two atoms reuse the same thing in a p5 re?
Aankhen`` What I missing? :-\
Oh.
As in, for example, \n <empty string> \z?
gaal Aankhen``: mortiz's point is that "asdkfkljasldkfjalksdjf>look here<" has an empty place at the very end
Aankhen`` Right. 08:53
gaal does /$\z/ moose?
Aankhen`` So what's the problem?
moritz Aankhen``: perl -w -e 'my $foo = "bar\n"; print "matched" if ($foo =~ m/.*\z/);'
Aankhen``: no output on my maschine
gaal ah, wait no. i get it
Aankhen`` moritz: So as I said, you're referring to the empty string between the \n and the end of the string, yes?
moritz Aankhen``: right 08:54
Aankhen`` Then it would seem like a bug.
Unless split '' is a special case and there actually aren't empty strings between each character.
gaal what does split have to do with this? 08:55
Aankhen`` Which would make sense. If you look at an array @foo, there aren't empty elements between each element... are there?
gaal: I figure it's the only place which shows there are empty strings in between each character.
Or am I missing another one?
08:55 buetow joined
moritz but 08:56
perl -we 'my $f = "ab"; print "match\n" if ($f =~ m/a.*.*b/)'
match
gaal "\n" !~ /.*\z/
Aankhen`` Yes, because both of them can match nothing at all.
moritz so there seem to be two empty strings between 'a' and 'b'
gaal "\n" =~ /.*\z/s
Aankhen`` moritz: The .* doesn't match the empty string, it matches `nothing`.
moritz Aankhen``: and what is the difference? 08:57
Aankhen`` Er... '' vs. undef?
There are infinite "nothing"s between each character, whereas there may only be a single empty string
?
gaal bbl...&
Aankhen`` See you gaal.
Tene Aankhen``: * means 'match 0 or more instances' 08:58
Aankhen`` Tene: Yup.
Tene it matches 0 instances of '.' there
Aankhen`` In this case it's matching 0 instances, i.e. nothing.
Tene that's different from empty string
moritz Aankhen``: but if .* does match "nothing", the number of empty strings doesn't matter ;)
Aankhen`` moritz: Er, okay. What are we discussing? :-S
(Sorry, I keep getting lost.)
moritz Aankhen``: why doesn't m/.*\z/ matches every string? 08:59
s/matches/match/
Aankhen`` Because the .* *in that case* doesn't match anything at all.
Hmm.
Hold on.
You're saying there's an empty string between \n and the end of the string.
I'm saying that there might not be.
moritz there's nothing between \n and \z ;) 09:00
Aankhen`` So... hmm.
You do have a point.
BURN THEM AT THE STAKE
Tene capture (\z) and see what it gives back.
Aankhen`` Isn't \z a zero-width assertion? 09:01
Tene I think so. 09:02
Aankhen`` Seems to me, after this discussion, that /.*\z/ ought to match everything.
Tene That seems likely.
Aankhen`` But someone working on the engine might be able to enlighten you as to why it shouldn't.
On or with.
Aankhen`` pokes avar.
09:11 buetow joined 09:26 Alias_ joined 09:51 isaacd joined 10:04 chris2 joined 10:27 Eidolos_ joined
Juerd NOTE: feather may be taken offline tonight, and will then return online after a few hours, with a new IP address (that is not yet known) 10:43
10:54 prism joined 10:57 franck__ joined 11:24 xinming joined, ofer joined 11:41 kanru joined 11:44 ggoebel joined 11:47 blaze-x_ joined
svnbot6 r16483 | fglock++ | [mp6-jvm] - added 'run_tests.sh', 'BUGS' 11:49
r16483 | fglock++ | - passes all but one test
11:50 fglock joined
avar hia fglock:) 11:54
fglock avar: hi! 12:05
brb # meeting
12:05 fglock left 12:19 iblechbot joined 12:25 buetow joined 12:34 Eidolos_ is now known as Eidolos 12:35 nipotan is now known as nipotaway 12:47 elmex joined
moritz avar: any ideas regarding www.perlmonks.org/?node_id=616538 ? 12:53
lambdabot Title: Strange regex to test for newlines: /.*\z/
avar avar@Arsia:~$ perl5.9.5 -e 'print "there is no newline\n" if "\n" =~ /.?\z/' 13:03
there is no newline
avar@Arsia:~$ perl5.9.5 -e 'print "there is no newline\n" if "\n" =~ /.*\z/'
avar@Arsia:~$
so yes, that's a bug
moritz avar: ok, thanks 13:04
13:12 macroron joined 13:16 [particle1 joined, bloonix joined 13:32 DarkWolf84 joined 13:34 prism joined 13:37 franck___ joined 13:51 fglock joined 14:08 lichtkind joined 14:14 ofer joined 14:18 rhandom joined 14:38 polettix is now known as poletti 14:39 poletti is now known as polettix 14:40 polettix is now known as poletti 14:42 poletti is now known as polettix 14:53 Maddingue joined 15:08 bernhard joined
offby1 Am I misunderstanding the query interface for rt.perl.org/rt3/Search/Build.html ? I assumed that I could search for bugs I've opened by putting "offby1" in the "Requestor EmailAddress" box, clicking Add, then clicking "Add and Search". But the result is always empty ... any hints? 15:15
lambdabot Title: Login
15:20 REPLeffect joined, c9s joined
Juerd IMPORTANT: feather's IP as of tonight: 193.200.132.135 15:21
Juerd IMPORTANT: feather's IP, in a few hours: 193.200.132.135
Juerd timezones :) 15:21
TimToady perl6.wall.org now points there in case anyone's dns lags 15:25
well, ten minutes from now...
moritz wants an alias called justanotherbrickinthe.wall.org ;-) 15:27
15:29 weinigLap joined 15:33 chris2 joined
svnbot6 r16484 | lwall++ | missing rule for qw-ish assertions like < $ @ % & @@ :: > 15:41
r16485 | Nelson++ | Space for contributors in README 15:51
15:58 fglock joined, shmem joined 15:59 rashakil_ joined 16:18 SubStack joined
svnbot6 r16486 | lwall++ | added missing assertions from S5 16:21
r16486 | lwall++ | cleaned up all the undefined vars found by latest pugs at compile time
moritz TimToady: so pugs+cheat is good enough now to detect some errors in STD.pm? 16:22
TimToady it was always pretty good at syntax errors, now it's starting to pick up some semantic errors too 16:23
16:23 Daveman joined
moritz though sometimes the error messages are a bit confusing 16:24
TimToady well, PCR dumps a lot of warnings, and the bridge still doesn't handle <$foo> right somehow
moritz btw i've seen remarkable little on warnings in the synopsis... is that a todo feature, or did I miss something?
TimToady S04:776 on the semantics 16:27
the warn function call is in IO.pod
moritz ok, thanks 16:28
TimToady maybe your synopsis linker should send the link back here to irc
or maybe lambdabot should do it 16:29
moritz I could make the log bot print the message, but then lambdabot would report the title and tinyurl 16:31
so it's lambdabot's jub ;)
16:31 buetow joined
TimToady @tell lambdabot it's your jub 16:33
lambdabot Nice try ;)
TimToady except lambdabot is probably not sufficiently Perl-centric 16:35
I presume it belongs to the Haskell folks really 16:36
at least, I don't see it offhand under pugs/
Jmax judging from whois... 16:38
and the ident
TimToady I think we just lost feather... 16:40
Tene Looks like. 16:43
TimToady 'course, the topic set by Juerd++ doesn't say how long it'll take... 16:44
unless you count "a few hours" to mean the new IP address works in addition to resolving 16:45
Tene TTL for feather's A record is 3600 16:46
TimToady that's seconds? 16:47
Tene Yes.
TimToady well, probably takes that long to move the computer, or whatever portion of the computer they're moving...
let's hope they tweaked the entry at the start of the physical move... 16:48
good time to go take a shower... & 16:49
16:52 chris2 joined, franck__ joined 16:56 justatheory joined 17:04 weinigLap_ joined 17:08 kanru joined 17:16 kunwon1 joined 17:23 Yaakov joined, REPLeffect joined 17:32 juerd joined
juerd feather is traveling :) 17:32
moritz juerd++ feather++ 17:33
hm, feather is not pingable for me 17:43
17:44 ozo joined 17:45 jisom joined
cj TimToady: why does $foo->isa() die() if $foo is not a blessed reference? 17:48
17:49 Psyche^ joined
cj seems like returning false would save a lot of if(ref $foo && ref $foo ne 'HASH' && ref $foo ne 'ARRAY' && ref $foo ne 'GLOB' && ref $foo ne 'SCALAR' && $foo->isa()){ mumble() } 17:49
moritz because -> can only call methods, not subs? (just a guess)
audreyt cj: autobox.pm and Moose::Autobox on CPAN fixes that... 17:50
(for some value of fix)
moritz ;)
and perl 6 fixes that, of course
audreyt (for larger value of fix) 17:51
moritz by introducing $var ~~ $type
cj hey there audreyt. ltns. how are you? 17:52
17:52 riffraff joined
riffraff hi 17:52
audreyt reasonably okay. :)
cj I hear that RL has been keeping you from hanging out with us so much :) 17:53
audreyt correct :)
moritz RL--
17:53 kunwon1 joined
[particle1 hopes audrey is able to minimize RL to the system tray soon again 17:54
juerd moritz: No, feather is in a car.
audreyt well, during Jul1~Jul30 for sure.
juerd moritz: We still don't have mobile broadband :)
moritz juerd: what a pity :(
audreyt but before that I can only steal slices of cycles here and there
juerd: I _do_ have citywide mobile broadband... :)
juerd audreyt: Do you have any domains pointing to feather by IP?
audreyt juerd: yes and all of them are changed by now. 17:55
juerd audreyt: broad enough to host something like feather?
audreyt: Great, thanks
audreyt juerd: well, using something like dyndns
then maybe yes
juerd DNS is not the problem. You can always VPN and bridge that.
avar what do you guys need?
juerd There was also technically no reason for the IP change. It saves me a lot of trouble though :)
avar: Airconditioning. 17:56
avar hummhumm
audreyt sure, I was referring to the question of hosting feather-esque server using taipei city wifi
juerd audreyt: That's pretty neat.
feather is traveling more than a city though :) 17:57
japhb [OT rant] Would journalists PLEASE stop referring to x ** 2 as "an exponential relationship" ?
juerd has no idea how big Taipei is though
japhb: No. And they will also not disassociate "hacking" from computer crime. 17:58
audreyt 271.80 kmĀ² (104.9 sq mi)
juerd Etcetera
audreyt population 2,630,872
moritz ant "quantum leaps" from beeing big
juerd audreyt: Is it square? :)
feather is traveling approx 100 km 17:59
audreyt not quite :)
juerd From Amsterdam to Dordrecht
Away from the expensive data centre, to our little-less-expensive office link. 18:00
moritz juerd: how much traffic does feather consume?
juerd moritz: That depends on the amounts of movies abuvisely shared ;)
moritz ;)
japhb commute & 18:01
juerd It has served dozens of GBs a day, when it still hosted a pirated copy of Serenity
Its normal traffic is mostly dominated by the daily full system backup
But that's local.
Well, it was local until today. 18:02
kolibrie having it in Dordrecht should mean you can get to it faster, should need arise 18:03
offby1 Dordrecht! I've been there.
juerd Yes; that's one of the reasons that feather is moved as one of the first few machines.
offby1 Can't remember a thing about it though.
juerd I'm also considering turning feather into a xen box
kolibrie it's much smaller than Taipei
juerd And having the most important things, like the SV[KN] repository, separate from the rest. 18:04
18:04 Psyche^ is now known as Patterner
juerd kolibrie: Yes, it is, but is the distance between Amsterdam and Dordrecht less than the Taipei wifi network covers? :) 18:05
18:06 prly joined
kolibrie juerd: hmm. based on those stats about Taipei, maybe not 18:06
18:07 veritos joined
moritz if we assume taipei to be perfectly spherical... *g* 18:07
audreyt "We'll make an assumption that the cow is a small sphere..." 18:08
18:10 weinigLap_ is now known as weinigLap
[particle1 moos 18:11
18:11 [particle1 is now known as [particle]
veritos [particle1: fix your username. there you go. 18:11
i fail to see how you can mistype 1 for [. 18:12
moritz veritos: with a weird keyboard layout perhaps? 18:13
veritos moritz: he's american.
[particle] i didn't mistype
veritos oh never mind then. 18:14
[particle] my client disconnected, then reconnected while [particle] hadn't timed out yte
moritz veritos: that doesn't matter... there are ergonomic alternative keyboard layouts
18:14 drupek12 joined
[particle] since the name was taken, the client tried to be smart by giving me a similar name 18:14
veritos heh.
[particle] (or maybe irc does that automatically)
avar it doesn't 18:15
[particle] then it's my stupid smart client 18:18
18:18 prly_ joined 18:20 kaether joined 18:25 japhb joined 18:28 larsen_ joined 18:30 kaether left, kaether joined
avar @tell fglock wrt re::engine::PCR and other p6-on-p5 engines I'm wondering how best to expose grammars in p5 land through that interface 18:31
lambdabot Consider it noted.
18:33 kaether left 18:35 kaether joined 18:39 xinming joined 18:40 SCalimlim joined
fglock avar: in PCR, grammars are p5 classes; regexes are p5 methods; /<Grammar::meth>/ should work 18:45
lambdabot fglock: You have 1 new message. '/msg lambdabot @messages' to read it.
18:46 justatheory joined
avar and how would you specify/import a class? my $re = qr//; $re->bless("Grammar::Some::Grammar")..? 18:47
well, you could fully qualify it
that's better probably:)
yup
fglock just 'use' it, I think
avar fglock: I just got %+ and %- wrapping going in blead too, and you can do all the neat stuff currently in re::engine::Plugin's test suite 18:48
So I was thinking what nead stuff I could do with ::PCR since it's the most complete p6 engine for p5, :rw via $1 = "ook" or $+{ook} = "eek" is one obvious thing:)
also, if you have time I'd love some comments on th ::Plugin API. 18:49
fglock you can hack PC::Runtime::Match if needed 18:50
re API: I'll take a look later # now at work 18:53
18:59 rindolf joined
fglock TimToady: re "Range - A pair of Ordered endpoints; gens immutables when iterated" - how about s/immutables/values/ 18:59
18:59 dduncan joined
[particle] can a Range return non-constants? that'd be neat 19:00
sorta like perl 5's scalar glob
well, no, that returns constants
i mean, it could be a closure generator
as long as the closures return the proper values for comparison to the endpoints 19:01
fglock [particle]: I was not thinking of "non-constants", but "lazy" 19:02
[particle] then i suggest "gens immutables lazily" 19:03
but maybe that can be changed by pragmata
19:03 salty-horse joined
fglock I mean, a range of ranges, for example 19:03
salty-horse is svn.pugscode.org down?
TimToady see topic
[particle] yes, that lives on feather, which is down. see /title
err, /topic.
19:03 wolverian joined
TimToady [particle]: ranges are considered immutables too 19:04
fglock TimToady: ok
salty-horse thanks
[particle] ah, okie
19:05 Aankhen`` joined
h8crime timtoady 19:10
you there
fglock TimToady: re STD-in-v6.pm - most of it parses (without cheat); I'm trying to figure a plan to implement the missing semantics 19:11
dduncan regarding the channel heading/comment about feather, how long ago was it set? 19:14
fglock STD-in-kp6 would be a much better plan, if there was more brain power available
19:15 isaacd joined
Jmax dduncan: i think feather is back up now. 19:15
Aankhen`` Four hours ago, it seemsw.
s/w//
dduncan oh? looking ...
Jmax well, wolverian is connected via it
dduncan svk pull still has propfind errors, so that part isn't working
Jmax the new DNS record may not have fully propogated 19:16
Aankhen`` wonders out of curiosity whether multidimensional arrays could take a Range or Junction for dimensions, like my @foo[42; 2 .. 6; 4 | 5]; 19:17
(No, I see absolutely no use case for it. Curiosity, like I said.) 19:18
kolibrie feather's uptime is 19 min
audreyt curiously I can't connect to feather from here (behind NAT) but on a public host I can 19:20
Jmax are you using the domain name? or the ip address?
is the httpd running?
Tene DNS is updated for me.
apache is running 19:21
audreyt etc/hosts is bad; fixed
Tene woah, the load average is only ~5 19:22
19:22 REPLeffe1t joined
Tene <5! 19:22
audreyt apache restarted; connection now works for svn and ssh 19:23
dduncan Hello audreyt, I was wondering whether die is supposed to include a stack backtrace? I thought it used to in Pugs, but now it doesn't and I wish it did. 19:24
I want something at least as helpful as Carp::confess
oh, and svk pull is now working again here 19:25
19:26 polettix joined
audreyt dduncan: ok, implementing 19:26
dduncan is it a trivial thing?
oh, and thank you 19:27
audreyt dunno, I imagine it is 19:28
looking into it
19:29 PerlJam joined 19:30 Juerd joined, diakopter joined 19:31 renormalist joined
Juerd Anyone still experiencing problems with feather? 19:31
wolverian not me 19:32
19:32 TreyHarr1s joined
diakopter nor I 19:32
19:32 salty-horse left
diakopter different datacenter? different VM host? 19:34
Juerd feather is not a VM 19:35
It's in a different datacentre now. The one we built next to our office.
Very small scale, but nicely within the same building :) 19:36
audreyt dduncan: it's in 19:40
diakopter ping times are lower from Seattle. Juerd++ 19:41
dduncan thank you
will fetch and test now
audreyt np :)
19:41 devbot6 joined
renormalist can someone suggest me working examples that show the currently working OO of pugs? 19:42
Juerd diakopter: Impossible :) 19:43
dduncan my ext/QDRDBMS/ modules use OO and are working as far as I've tested them
19:44 perlDreamer joined
Juerd diakopter: It's routed over the same network, and the added distance is 100 km, and there are 4 more switches and 1 extra router in between now. 19:44
dduncan though I discovered yet that multi submethod BUILD ... or multis in general, compile but don't dispatch right
diakopter hrm.
dduncan in my case, the 2 variants had named parameters with different names
perlDreamer TimToady, $=POD will return all file scoped POD to me in a scalar? 19:45
dduncan I had to comment out one variant to get the other one, that I was using, to dispatch
perlDreamer @=POD will give it to me in chunks?
lambdabot Unknown command, try @list
perlDreamer and %=POD will let me get it by named sections?
dduncan did multis ever work in Pugs, or did they just compile?
audreyt multis work, but currently I think only positional works reliably 19:46
dduncan okay
audreyt by-type, too 19:47
just not named
dduncan well, for now I only have one multi, and I don't need both to work short term
in my case, I have something analagous to this: "multi foo (Str :$bar!)" and "multi foo (Array :$quux!)" 19:48
each has 1 named arg, the args have different names, both are mandatory
perlDreamer diakopter, are commas equivalent to colons? 19:49
19:49 svnbot6 joined
dduncan that's all fyi ... making it work isn't needed by me short term 19:50
diakopter I dunno if a comma could replace my colon...
19:50 specbot6 joined
audreyt I wouldn't want to exchange my colon for a coma... 19:50
svnbot6 r16488 | audreyt++ | * Introduce the envPosStack abstraction to cleanup the
r16488 | audreyt++ | stack-trace generaion; "fail" now also generates trace.
perlDreamer diakopter: try this one
audreyt: may your colon live long in health, levels of consciousness notwithstanding 19:51
audreyt :) 19:52
dduncan now rebuilding with 88 19:54
riffraff multi untyped with different arities work? 19:56
are they even theorically possible? :)
audreyt I mean multi f ($x) vs multi f ($x, $y) 19:57
dduncan I made a point of having my whole QDRDBMS API, in general, just use named args
even though most of the time they are all mandatory ... helps self-documenting
it also brings more uniformity, considering that QDRDBMS is centered around tuple and relation types whose attributes are named 19:58
riffraff audreyt, yes, I thought they didn't work, cause max {$_} and sort {$_} don't dispatch right, always get the two-argument versions
but maybe I just checked too much time ago
audreyt I didn't know that sort and max takes unary code 20:02
Aankhen`` Hmm, I can't remember... how do you specify a mandatory named parameter?
audreyt maybe they do and I missed that?
Aankhen``: (:$param!)
Aankhen`` Ah, thanks.
riffraff the sort spec is complex, it should get SomeThing ::= KeyExtractor|Comparator 20:03
KeyExtractor is unary and Comparator is binary Code
but I remember trying to define the unary version multi in perl6 and iot did not work 20:04
long time ago, thus
diakopter TimToady: what happens to %=POD{'DATA'} if there are two POD sections named DATA? the second one wins?
riffraff going to check again as soon as pugs finish compiling :)
audreyt riffraff: no, it still doesn't work, mainly because I missed that part of spec
riffraff it can be dopne easily in Prelude.pm if it's possible to define a multi variant in perl of something inside pugs 20:05
audreyt riffraff: I don't see tests in t/builtins/lists/sort.t ...
riffraff t/unspecced/sort.t 20:06
audreyt ahh yes
sorry
riffraff for the unary max, I don't remeber really 20:07
maybe I invented it
but it would make sense for this kind of things to have the same interface, I believe 20:08
audreyt yup
diakopter prepares to build/smoke pugs on Vista. Someone, should i use vanilla-perl or activestate perl? I have ghc-6.6.1.
dduncan I didn't realize ghc was updated ... but 6.6.1 is 4 weeks old ... will install now ... 20:12
diakopter I'll take that as a 'use vanilla-perl' 20:13
20:13 gene9 joined
dduncan are 6.6.1 binaries compatible with 6.6.0 ones? Or should I make clean and rebuild Pugs from scratch after this? 20:14
or maybe I'll just do the 6.6.1 update later, if there is a need for it 20:16
PerlJam Juerd: What's up with feather's load avg? 20:17
dduncan (keep things stable)
Juerd PerlJam: It's incredibly high.
I don't know who had the brilliant idea of nicing something -20... 20:18
audreyt me, it's a cpan process, now suspended. 20:20
killed, even.
renormalist I remember I've seen a syntactical mapping from Moose syntax to Perl6 syntax in audreys talks. Does someone (like audrey? :-) remember which slides that were? 20:23
because I'm trying to take the Moose cookbook for minimalistic OO examples
audreyt there's no mapping... just flipping thru examples and their equivalents 20:24
renormalist and I don't find the Perl6 equivalent for Moose's "requires 'methodname'"
audreyt: yes, that I mean, slides that change from moose to perl6 and back
do you remember which slides that was? 20:25
audreyt the deploying-perl6 talk I think
Juerd audreyt: feather has too many processes and too little CPU to run smoothly with any process at such unnice values
Commitbit's jifty takes a lot of resources too. I wonder why
audreyt missing XML::simple 20:26
so it kept retryiing
just installed it and looking
Juerd Okay
I'll leave feather alone for now then 20:27
audreyt commitbit is apparently hanging :/ 20:30
I'll turn it off and relook tomorrow.
PerlJam waits for the perlmonks thread that starts with "See how bad perl sucks? It brought feather to its knees"
20:31 takanori_ joined
audreyt load is now <7 20:31
Juerd PerlJam: Well, commitbit is a bit obscure and complex way of bringing something down with Perl. Most of the time it even doesn't do that :)
audreyt help appreciated looking into commitbit problems (/etc/apache2/sites-enabled/svn.pugscode.org has it disabled) -- or I'll do that tomorrow. sleep &
Juerd PerlJam: perl -e'fork while fork' is so much more effective, faster, and easier to "install" :)
audreyt++ # good night 20:32
fglock audreyt: can we discuss 6-in-6 some day? I need a new roadmap
renormalist does someone know what the Moose "requires 'method'" i sin Perl6? 20:35
20:36 evalbot_r16487 joined
PerlJam renormalist: If I knew where it was documented or if you could tell me what it is in Moose 20:39
fglock renormalist: probably 'does' ('use' a Role)
PerlJam I *might* be able to tell you what it is in perl 6
[particle] renormalist: i think that's just telling moose to load the subtype utils etc
is it? i forget the syntax :( 20:40
renormalist fglock: "does" uses a role, that's "with" in Moose. 20:41
PerlJam renormalist: so what does "requires 'method'" do? 20:42
renormalist PerlJam: requires 'methodname' is Mooses way to say that a class that uses/does a role must provide methodname
[particle] oh, i'm thinking of use Moose::Utils::TypeConstraints, nm me
i thought that was 'required'
has 'link' => ( is => 'ro', isa => 'PodLink', required => 1, ); 20:43
PerlJam renormalist: you could just put stub subs that die in a base class.
(or a role)
(depending on what you're trying to do exactly)
renormalist [particle]: required is similar but meant for member variables 20:44
[particle]: as far as I understand, of course
PerlJam: yes, I can handle it. I just thought this might be a thing that Moose had already "stolen" from Perl6 20:45
stevan_ renormalist: method foo { ... }
renormalist: yes, we stole it,.. but since that syntax is impossible in p5, we had to make our own 20:46
PerlJam well, stevan_ is the authority :)
renormalist stevan_: thanks
PerlJam stevan_: I take it that moose doesn't rely on attributes at all or very much? 20:47
stevan_ PerlJam: by attributes you mean??
PerlJam (I've only looked at Moose in a cursory, "wow this is neat, but I have other work to do" sort of way) 20:48
stevan_: my $foo : blah;
dduncan me too
stevan_ PerlJam: no Moose does not use those, ,.. cause I hates em :)
the API to use them is just horrid
PerlJam stevan_: fair enough :)
stevan_ plus you get much more control/flexibility with exporting functions 20:49
japhb stevan_: What is Moose's performance like? How bad is the overhead, roughly? (Are we talking a few percent or an order of magnitude?) I know that's a very general question, but I don't know enough Moose to ask a more precise question .... 20:50
stevan_ japhb: depends on what you use
there is a basic penalty for bootstrapping the MOP 20:51
after which its all relative to what features you are using
and if you dont mind more compile time costs, there is a way to make classes immutable which allows us to compile a faster constructor 20:52
PerlJam stevan_: is it slower or faster than perl's regular OO mechanisms? :)_
japhb stevan_: generally (unless it's brutal), I'm not too worried about startup time. (Curious, yes. Worried, no.) But I care about being able to dispatch millions of methods and member variable lookups per second.
stevan_ PerlJam: it pretty much *is* Perl's regular OO mechanisms :)
japhb I guess question 1 is: 20:53
diakopter dmake (pugs) on windows now depends on command-line svn...
PerlJam stevan_: I'll take that as "It's slow, but not excessively so"
stevan_ the accessors benchmark faster than hand codes, cause they use $_[0] instead of my $self, which you would use in real code
japhb Does all the heavy magic happen at object constructor time, after which method calls have near-zero overhead, or do method calls have overhead as well
stevan_: well, that's a damn good start 20:54
stevan_ japhb: there is not a whole lot of heavy magic actually
awwaiid normal method invocations of normal methods are just normal, iirc
stevan_ the MOP is insane ,.. cause its a MOP,... but its really not very magic
japhb: the object construction is more expensive because it is doing lots of stuff for you 20:55
such as collecting attributes, and initializeing slots, etc
but the immutable with inlined constructors brings that cost way way down
japhb: accessor methods are inlined by default
japhb What's the per-object memory footprint like? 20:56
stevan_ japhb: same as normal p5, we don't add anything special to the instance
s/normal p5/normal p5 hashes/
japhb Good answer
stevan_ japhb: the per-class overhead is more
but if that is a problem.,.. you should be coding in Java :P 20:57
japhb stevan_: I would expect that, sure. But I don't create a godzillion one-off classes.
stevan_ member variable lookups (to address an earlier question) are just $self->{foo}
cuase the accessors are inlined
actually $_[0]->{foo}
japhb inlined how? 20:58
stevan_ when the class is created
when you define an attribute, it installs accessors (based on what you asked it for)
at that time (compile time essentially) it evals a code string
which only creates as much of an accessors as you need 20:59
PerlJam stevan_: Have you ever used POE?
stevan_ so for instance,.. if you dont have a type constratint, then it wont add that code
japhb Uh, perhaps we are saying different things. Do you mean that accessor methods themselves make no calls, or that you have some sort of (source filter|Devel module) magic that actually inlines them into calling code
stevan_ PerlJam: not really, but we use it at $work, so I am familiar with it
japhb: I mean the accessor methods which Moose creates 21:00
no source filtering in Moose at all
no deep magic really at all to be honest
the deepest magic is the use of the B module to allow method introspection
japhb No matter how much you claim that there's no magic, no one will believe you. ;-) 21:01
stevan_ lol
japhb: read the source to Class::MOP
Class::MOP::Package is the closest thing to magic in there
and it's just symbol table hacking
japhb is not sure whether to be happy or disturbed that he's been writing a lot of symbol table hacking code recently 21:02
stevan_ disturbed
defintely
dduncan something I sort-of noticed before, and that appears to be exposed by the backtrace, is that the same section of code seems to execute redundantly ... or there are multiple scopes in the exact same space
stevan_ in Moose??
dduncan in Pugs
stevan_ ah :)
dduncan eg, 2 successive lines of line 59, column 12-58 21:03
that line is an invocation of ::Pkg->new()
in this case, it seems to be a non-issue
but it reminds me of how yesterday a debug message was printed twice in a row 21:04
in other code
moritz perhaps internally an anonymous mehtod is created and called?
dduncan that could explain what I see now, but not what I saw before
before it wasn't a backtrace, but an explicit print that was being invoked twice
will try to recreate now ... 21:05
stevan_ japhb: honestly, Moose is not going to be as fast as hand coded perl, but the amount of developer time saved, and the amount of testing time saved (why test something Moose already tests, consider it part of the "language", i mean would you test perl's builtins??) tend to outweigh the speed issues
there are several people (including me) running it in production environments on fairly high traffic sites with no issues 21:06
japhb stevan_: I was mostly probing around the "Is this developer-friendly but a non-starter in production for performance reasons, or close enough to take a hard look at?" question 21:08
stevan_ japhb: well, what kind of production environment are you putting it in? 21:09
if its a web-app, the network + DB overhead will far outweigh anything Moose can do
if your running a real time system for a nuke plant,.. then I would recommend against it
fglock stevan_: do you think it would make any performance difference if v6.pm inlined some of Moose runtime calls? 21:11
stevan_ fglock: inlined in what way>
japhb I have essentially two use-cases -- I high-bandwidth raw-mod_perl website at work (as in "mostly static for speed but still needs multiple racks of servers" sized), and my 3D rendering fun code.
fglock like, preprocess the bootstrap, for example 21:12
stevan_ fglock: yes, you would probably want to bypass the Moose sugar entirerly
but the bootstrap happens inside Class::MOP
so that is not easy to detach
renormalist Does anyone think a converted Moose-Cookbook-recipe makes sense for pugs/examples/cookbook/?
stevan_ japhb: i would try it out, there are a lot of factors at play, so I can't really say 21:13
japhb renormalist: I do. Despite my line of questioning, Moose seems like current Perl 5 OO BP, so I'd certainly say we should help people transition smoothly.
PerlJam renormalist: for the 5 or 10 people that use Moose :)
renormalist PerlJam: Moose is so cool, you will be the 6th or 11th tomorrow :-) 21:14
stevan_ PerlJam: actually the user base is getting pretty big now, definitely beyond 5 or 10 ;)
dduncan doing more exploring, it seems fairly plain now that Pugs is invoking the same submethod BUILD twice
japhb stevan_: sure, but you've satisfied my first cut -- it's at least not out of the question.
PerlJam stevan_: It
Grr
stevan_: It's too bad there's not a Moose book out already 21:15
21:15 justatheory joined
TimToady dduncan: is it really a submethod, or maybe it's a method that's getting inherited accidentally? 21:15
dduncan but since BUILD is redundant with itself, doing so has no other consequences
TimToady or maybe submethods are busticated
dduncan looking ...
PerlJam Giving Moose more publicity will increase its usage and make the transition from perl5 to perl6 easier since moose is more p6 than p5.
dduncan actually, there is inheritence in play
stevan_ japhb: its very likely (especially since you are using mod_perl) that Moose will not cause you any performance woes at all, and any ones it does cause you can work with/around without too much trouble 21:16
dduncan the submethod BUILD being called twice is the one declared by ListSel, which is subclassed by SeqSel but the latter doesn't have its own BUILD ... but it is like BUILD is being invoked on both of those classes anyway
SeqSel->new is what is being invoked initially 21:17
PerlJam dduncan: sounds like a lookup problem to me.
stevan_ PerlJam: actually merlyn has a 2 part article on Moose coming out in LinuxMag, we've been helping him with some technical reviews over on #moose
PerlJam stevan_: excellent!
stevan_ PerlJam: and honestly, I only declared it "ready for prod use" a month or so ago
although it had been in prod use for almost 9 months already :) 21:18
TimToady sounds like submethods are being improperly inherited then
japhb chuckles -- isn't that the one thing submethods are explicitely not supposed to do?
TimToady or the BUILDALL dispatcher is making a method call when it should be transforming it to a sub call
PerlJam stevan_: well.... the next step (after the magazine article) is to write a book. Perhaps some Moose recipes.
:-)
TimToady japhb: indeed
stevan_ PerlJam: want a commit bit ;)
dduncan so there are 4 packages in the hierarchy, from parent to child: Node, Expr, ListSel, SeqSel ... only ListSel declares a BUILD 21:19
stevan_ we got 5 recipes in the cookbook already
dduncan and SeqSel->new is invoked
TimToady try declaring a null BUILD submeth in the outer class
lambdabot TimToady: You have 2 new messages. '/msg lambdabot @messages' to read them.
TimToady @moosages
lambdabot renormalist said 1d 22h 57m 42s ago: S11/Modules misses a newline at 249 which breaks the following =over/=item list
h8crime said 30s ago: I'm going to rape your daughter
dduncan okay
stevan_ PerlJam: err, I mean 6 recipies
21:20 perlbot joined
PerlJam stevan_: it'll probably go unused. I'm trying to write about Perl 6 Regex now and P6OOP (though I've thought about it) doesn't have enough room in my brain until I'm done :) 21:20
21:21 fglock left
stevan_ PerlJam: fair nuff 21:21
TimToady h8crime: I have no reason to believe my daughter will be visiting Pitcairn Island any time soon...
would you like a commit bit?
h8crime no but i may be visiting seattle!
riffraff p6 design question: I know that supposedly there is a "cached" trait 21:22
but is there a way to control the cache size, or clean it up or whatever?
PerlJam riffraff: that sounds more like an implementation question that a design question. 21:23
riffraff well it is imĆØlementation to choose the size, but it is design to know the api to do that :)
h8crime p.s. let me get commit bit 21:24
dduncan TimToady, that seems to have been it ... adding a BUILD to SeqSel showed that it is indeed being separately invoked
riffraff probably I'm not explaining myself well, as usual, sorry
dduncan with it there, the ListSel debug message only appears once
riffraff but I'd like to be able to say "fib is caching($numresults)"
TimToady well, it is supposed to be separately invoked, just not as a method... 21:25
PerlJam riffraff: I'm sure we can say something like that in a hand-wavy sort of way. :)
riffraff eh
dduncan I figured that BUILDALL would only invoke a BUILD for each package in the hierarchy if it was explicitly defined
so this must be a Pugs bug
moreover, there were no separate invocations for the further parents of ListSel, so something seems to be halfway correct 21:26
riffraff also, it would be nice to be able to use an existing cache again (i.e. saving to disk). And that made me think of a %.cache property in the role. And that ma,de me think: when I do my $func = &func, am I guaranteed to get a reference to the same object all the time? 21:27
dduncan maybe
h8crime timtoady: let me get commit access yo
perlDreamer TimToady: If there are multiple POD streams with the same name, will the hash level access append or overwrite? 21:29
PerlJam perlDreamer: there are other options you know. 21:30
perlDreamer PerlJam: true. But overwrite is what hashes do and append is that I'm hoping it would do. 21:31
so the stream is considered to be defined as belonging to any section with the name
PerlJam perlDreamer: I think sometimes you want one view and sometimes you want the other 21:32
perlDreamer: so the "right" answer is an unstated 3rd option :) 21:33
perlDreamer PerlJam: when would you want the behavior to behave differently?
also, next time I'll append a "or something else" to my questions ;) 21:34
renormalist Are the other methods beside .perl/.yaml to dump objects? Eg, is there a haskell one? 21:38
Tene Not Yet. 21:39
moritz is .yaml even specced?
dduncan it keeps evolving
PerlJam wonders when we'll see .json
dduncan or at least implementations are periodically not backwards compatibel
moritz who needs backwards compatibility anyway ;) 21:40
riffraff we could have a .yaml that is json compatible :) 21:44
Juerd feather's all normal now :) 21:44
Tene perlDreamer: .xml 21:45
ack, mis-tab-complete
moritz xml... what's next? SQL? excel spreadsheets? 21:47
perlDreamer csv? 21:48
moritz too simple ;)
riffraff FASTA ? 21:49
.xml would be easy, I had one in ruby based on reflection of just 20 lines, I guess in perl6 it would be the same
Tene .php
svnbot6 r16489 | Darren_Duncan++ | ext/QDRDBMS/ : updated AST.pm to add no-op BUILD submethods to all ListSel subclasses as a temp workaround so that ListSel's BUILD isn't invoked twice by Pugs 21:57
japhb
.oO( Maybe this is the eventual interface to the compiler: $outfile.unslurp(Perl6::program($string).optimize.pbc) )
dduncan non-tree-formatted data formats like SQL or excel wouldn't work as well as tree-formatted ones, as they would require more indirection to reflect Perl code or data
moritz I know ;) 21:58
dduncan that said, one feature of QDRDBMS' language is that it has canonical representations in 3 formats: strings, ASTs, and relational 22:00
so part of the problem I'm working with is well representing ASTs as relations (which are loosely like tables) 22:01
and its two-way ... so in solving this, it may help Perl do likewise if it had the inclinatoin
the relational form is loosely analagous to SQL's information schema 22:02
but that it is more thorough, and would then comprise a meta-model
22:08 baest joined
perlDreamer How do you set a file handle not to autochomp? 22:11
dduncan doesn't Perl 6 not autochomp by default? 22:12
22:12 buetow joined
perlDreamer Perl 6 autochomps by default 22:12
See S29: chomp entry 22:13
dduncan I also have my own question ... I want to overload stringification for my class, like Perl 5's use overload "" or such ...
do I declare postcircumfix "" or is there a named method I overload?
moritz dduncan: I think it will be a roles,but I don't know if it's specced yet... 22:14
dduncan the purpose of this is to make debugging easy
perlDreamer I grepped the specs, and don't see that looks obvious
dduncan I already declare explicit as_perl() methods
basically just want that to be implicitly called if object used in string context ... maybe 22:15
moritz because youd'd need t o declare infix ~, prefix ~, circumfix "" etc.
dduncan I see
22:16 drupek12 joined
dduncan perlDreamer, what you want to know would probably be a property of an IO/name? object 22:16
sort of like desired text encoding or binary is 22:17
or a layer
still, I don't know
perlDreamer I'll keep reading specs :) 22:21
TimToady this is covered in S13 using "is deep", though I'm not entirely happy with the design yet 22:25
meppl good night 22:26
moritz TimToady: so you'd implement prefix:<~> and the other possibilities to stringify would follow automatically? 22:28
at least if you use the "is deep" trait 22:29
22:29 SimpleOversight joined
SimpleOversight What's the perl6 equiv to :: my $daemon = (split)[4]; 22:30
riffraff $_.split()[4] ? 22:32
SimpleOversight Riff: Ahhh, thanks. 22:33
perlDreamer S29 says that split no longer has a default delimiter 22:34
but to try using comb instead, $_.comb()[4]
riffraff why comb instead of split for this?
perlDreamer eval "one two three four".comb()[4]
riffraff: S29 says that split no longer has a default delimiter, and to use comb for doing that 22:35
?eval "one two three four".comb()[4]
riffraff ah default delimiter sorry, though of default argument $_
22:35 evalbot_r16487 is now known as evalbot_r16488
evalbot_r16488 \undef 22:35
perlDreamer @eval "one two three four".comb()[4]
@eval "one two three four".comb()
moritz perlDreamer: .comb is a sort of negated .split
riffraff wasn't it ?eval?
moritz ?eval "onw two three".comb(/\w+/) 22:36
perlDreamer @eval "onw two three".comb(/\w+/)
evalbot_r16488 Out of memory!
perlDreamer oh dear 22:37
moritz out of deers? mooses?
perlDreamer @eval "one two three four".comb() 22:38
moritz evalbot still uses ?eval
perlDreamer ?eval "one two three four".comb()
evalbot_r16488 (Match.new(ā¤ ok => Bool::True, ā¤ from => 0, ā¤ to => 3, ā¤ str => "one", ā¤ sub_pos => (), ā¤ sub_named => {}ā¤), Match.new(ā¤ ok => Bool::True, ā¤ from => 1, ā¤ to => 4, ā¤ str => "two", ā¤ sub_pos => (), ā¤ sub_named => {}ā¤), Match.new(ā¤ ok => Bool::True, ā¤ from => 1, ā¤ to => 6, ā¤ str => "three", ā¤ sub_pos => (), ā¤ sub_named => {}ā¤), Match.new(ā¤ ok => Bool::True, ā¤ from => 1, ā¤ to => 5, ōæ½xE2 22:39
perlDreamer hmmm 22:40
S29 also says "P5's split(' ') will translate to comb.
TimToady ?eval "one two three four".comb[3] 22:41
svnbot6 r16490 | renormalist++ | - cperl-mode.el: role handling analogue to class|package
evalbot_r16488 \Match.new(ā¤ ok => Bool::True, ā¤ from => 1, ā¤ to => 5, ā¤ str => "four", ā¤ sub_pos => (), ā¤ sub_named => {}ā¤)
TimToady ?eval ~"one two three four".comb[3] 22:42
evalbot_r16488 "four"
perlDreamer TimToady: The List from the unindexed one does not contain "four". Is that list Lazy?
TimToady however, the from/to is screwed up as tends to happen with character classes in evalbot
22:43 Psyche^ joined
TimToady probably the same bug 22:43
moritz pugs> ~("one two three".comb[1])
"two"
svnbot6 r16491 | renormalist++ | - the Currency recipe from P5's Moose covering roles in Perl6 syntax 22:44
TimToady yeah, works fine in your own pugs
h8crime timtoady: let me get commit access yo 22:45
TimToady something about evalbot running in safe mode seems to screw up anything to do with character classes
renormalist how are the svn:props typically set in pugs? svn:mime-type/svn-eol-style? Does someone (who?) do that manually? Or is there an automatism 22:46
moritz renormalist: some scripts in util/* do that 22:47
renormalist: but you have to call them manually
TimToady h8crime: I really doubt anyone here is really interested in giving you commit access given how you introduced yourself... 22:48
so I'll take your original answer of "no" as canonical. 22:49
h8crime :(
i didn't say no
perlDreamer (14:22:41) TimToady: would you like a commit bit? 22:50
(14:22:45) h8crime: no but i may be visiting seattle!
h8crime i was saying no she aint gonna be in pitcarin you were correct about that 22:51
TimToady I'm still inclined to believe that you lack the good taste to contribute usefully. 22:52
h8crime why is that? 22:53
22:54 Psyche^ is now known as Patterner
svnbot6 r16492 | renormalist++ | - the usual svn props 22:54
SimpleOversight When I run :: $daemon =~ s{\[\d+\]:}={}; say $daemon; # it puts <Subst> where i'd expect the actual string. What's the corret syntax for this? 22:57
23:04 mako132_ joined 23:14 SubStack joined
SimpleOversight I've dropped back to s:Perl5/\[\d+\]://; as indicated at www.mail-archive.com/perl6-users@pe...0156.html. I managed to kill win32 pugs with one of the other attempts :) 23:24
lambdabot Title: Re: CGI on 6
perlDreamer When a POD stream is read via its named scalar variable, i.e. $=DATA, is it assumed to have gone through %=DATA.cat, as to processing of internal newlines? 23:27
23:27 xinming joined 23:28 kaether joined
avar $=DATA isn't the POD var, is it? 23:29
svnbot6 r16493 | lwall++ | Keep syntactic categories in sync with synopses 23:30
TimToady The structure of pod variables is not yet specced. 23:31
perlDreamer Maybe I'm going about this the wrong way.
I have 1-2 free hours per day that I'd like to contribute to writing tests. 23:32
Where can I best use that time to help out? (aside from learning about Perl 6 in general)
TimToady well, if there are blank areas in the specs without smartlinks, it either means there are missing tests, or missing smartlinks... 23:34
moritz the builtins seems to be a goodpoint to start
s29 iirc 23:35
perlDreamer Cool! I'll start there. 23:36
23:41 dvorak joined, lidden joined, tewk joined, clkao joined 23:43 irc joined, cognominal joined, JarJarBinks joined, kaether left 23:44 kaether joined
polettix stevan_: a-ha! you finally wrote a section "How do I write custom constructors with Moose" after my telepathic SOS! 23:47
23:48 pbuetow joined 23:51 isaacd_ joined 23:57 xinming joined