Camelia, the Perl 6 bug

IRC log for #perl6, 2007-05-21

Perl 6 | Reference Documentation | Rakudo | Niecza | Specs

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

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

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

Perl 6 | Reference Documentation | Rakudo | Niecza | Specs