Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2009-10-05

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:01 payload joined #perl6
00:10 envi^office joined #perl6
00:24 eternaleye joined #perl6
00:40 ayrnieu joined #perl6
00:59 hercynium joined #perl6
01:13 eternaleye joined #perl6
01:16 orafu joined #perl6
01:42 Gratz474 left #perl6
01:56 TiMBuS joined #perl6
01:56 ShaneC perl6: our $foo = 'a'; eval q~say $foo~;
01:57 p6eval sprixel 28613: OUTPUT«execute(): execute error: TypeError: Cannot call method 'call' of undefined at sprixel.pl line 89.␤»
01:57 p6eval ..rakudo 1ca164:  ( no output )
01:57 p6eval ..pugs: OUTPUT«a␤»
01:57 p6eval ..elf 28613: OUTPUT«/home/p6eval/pugs/mi​sc/STD_red/match.rb:117:in `block in to_dump0': undefined method `to_dump0' for nil:NilClass (NoMethodError)␤      from /home/p6eval/pugs/misc/STD_red/match.rb:117:in `map'␤        from /home/p6eval/pugs/misc/STD_red/match.rb:117:in `to_dump0'␤   from
01:57 p6eval ../home/p6eval/pugs/misc/S…
01:57 ShaneC my $foo = 'a'; eval q~say $foo~;
01:57 ShaneC perl6: my $foo = 'a'; eval q~say $foo~;
01:57 p6eval sprixel 28613: OUTPUT«execute(): execute error: TypeError: Cannot call method 'call' of undefined at sprixel.pl line 89.␤»
01:57 p6eval ..pugs, rakudo 1ca164: OUTPUT«a␤»
01:57 p6eval ..elf 28613: OUTPUT«/home/p6eval/pugs/mi​sc/STD_red/match.rb:117:in `block in to_dump0': undefined method `to_dump0' for nil:NilClass (NoMethodError)␤      from /home/p6eval/pugs/misc/STD_red/match.rb:117:in `map'␤        from /home/p6eval/pugs/misc/STD_red/match.rb:117:in `to_dump0'␤   from
01:57 p6eval ../home/p6eval/pugs/misc/S…
01:58 ShaneC why does the 'my' version work but the 'our' doesnt?
01:58 ihrd joined #perl6
02:00 ShaneC ah nm, pugs gets it right, guessing it's a rakudo thing then
02:02 ShaneC marines
02:08 ShaneC left #perl6
02:14 eternaleye joined #perl6
02:15 am0c joined #perl6
02:22 ihrd left #perl6
02:27 diakopter TimToady: std/viv bug: repeat aaa until/while condition - doesn't preserve whether it was 'until' or 'while'
03:24 diakopter std: my $x=0; repeat { say $x } while(3)  # space not required between while and (3) ?
03:24 p6eval std 28613: OUTPUT«ok 00:02 103m␤»
03:33 pugs_svn r28614 | diakopter++ | [sprixel] implement print
03:33 pugs_svn r28614 | [sprixel] implement statement_control__S_repeat
03:33 pugs_svn r28614 | [sprixel] implement statement_control__S_until
03:33 pugs_svn r28614 | [sprixel] restore "not yet implemented" error message for primary nodes
03:39 diakopter TimToady: in the following, only the 'i' comes through in the ast -
03:40 diakopter std: /hi/
03:40 p6eval std 28613: OUTPUT«ok 00:02 96m␤»
03:45 diakopter std: /[/]/ # unending recursion hilite TimToady
03:45 p6eval std 28613: OUTPUT«Deep recursion on subroutine "Cursor::_BRACKETr" at STD.pm line 41532.␤Deep recursion on subroutine "Cursor::_BRACKETr" at STD.pm line 41953.␤Deep recursion on subroutine "STD::panic" at STD.pm line 41950.␤»
03:51 diakopter wow. I left that running in another window, and now my linux VM will apparently be unswapping forever...
03:57 quietfanatic joined #perl6
04:25 abbe joined #perl6
04:30 zloyrusskiy joined #perl6
04:46 * diakopter makes like a control exception and returns
04:46 crythias git r under ctrl
04:49 sjohnson get
04:49 sjohnson heheh
04:49 sjohnson sorry, writing "get" was actually a typo
04:50 sjohnson now i look stupid. oops
04:53 alanhaggai joined #perl6
04:54 bionoid joined #perl6
04:56 diakopter NOOPS DNA KROF
05:10 patspam joined #perl6
05:12 eternaleye_ joined #perl6
05:29 abbe joined #perl6
05:41 jferrero joined #perl6
05:43 crythias left #perl6
05:44 pugs_svn r28615 | lwall++ | [STD]
05:44 pugs_svn r28615 | /abc/ now includes a and b atoms in match/ast
05:44 pugs_svn r28615 | /[/]/ no longer recurses forever
05:44 pugs_svn r28615 | repeat while/until now requires ws after keyword
05:44 patspam joined #perl6
05:45 jferrero joined #perl6
05:45 diakopter whee
05:52 diakopter std: wait while fork
05:52 p6eval std 28615: OUTPUT«ok 00:03 97m␤»
06:07 diakopter sprixel: wait while fork
06:07 p6eval sprixel 28615:  ( no output )
06:07 diakopter heh
06:08 ssm joined #perl6
06:13 pugs_svn r28616 | diakopter++ | [sprixel] finish implement repeat while/until thanks to ++TimToady
06:32 Caelum the parrot rakudo pulls with --gen-parrot is a bit older than the current one right?
06:33 moritz_ Caelum: right
06:33 Caelum thank you
06:38 rfordinal joined #perl6
06:38 jrtayloriv joined #perl6
06:50 carlin say ^.^methods
06:50 carlin rakudo: say ^.^methods # oops
06:50 p6eval rakudo 1ca164: OUTPUT«0123456789101112131415161718192021222​32425262728293031323334353637383940414243444​54647484950515253545556575859606162636465666​76869707172737475767778798081828384858687888​99091929394959697989910010110210310410510610​7108109110111112113114115116117118119120␤»
06:50 moritz_ rakudo: say +undef.^methods
06:51 p6eval rakudo 1ca164: OUTPUT«121␤»
06:51 abbe carlin: i replied to your mail.
06:52 carlin abbe: Oh, thanks :-) I'll fix that now
06:52 Caelum what am I doing wrong here: http://scsys.co.uk:8001/34582
06:52 abbe you're welcome carlin .
06:53 pugs_svn r28617 | carlin++ | [t/spec/S02-magicals/config.t] Fix the FreeBSD test, the OS name should be in lowercase. Thanks to abbe++ for confirming.
06:54 Caelum it only counts the first number
06:57 moritz_ for $fh.lines -> $num
06:57 moritz_ .get just returns one line
06:58 pugs_svn r28618 | moritz++ | [t/spec] fudge two new tests for rakudo
06:58 jferrero joined #perl6
07:01 Caelum moritz_: works, thank you :)
07:02 Caelum I'm reading http://szabgab.com/talks/perl6/index.html which is no longer accurate
07:18 mariuz joined #perl6
07:22 iblechbot joined #perl6
07:40 mikehh joined #perl6
07:41 Caelum so "foo" xx 3 always makes a list
07:42 moritz_ right
07:42 moritz_ and $thing x 3 always makes a Str
07:49 rfordinal joined #perl6
07:53 rgrau joined #perl6
08:00 pugs_svn r28619 | Darren_Duncan++ | Spec S03 : added cases where a Range is considered empty
08:03 xenoterracide joined #perl6
08:05 Caelum you can't do, %foo{$word}++ for @words -> $word; that kinda sucks
08:07 moritz_ Caelum: I think prefix:<++> might work
08:07 moritz_ ++%foo{$word}
08:08 Caelum nope, though $_ works, just like in perl5 :)
08:09 moritz_ oh, that's what you mean
08:09 * moritz_ thought the autovivification didn't work
08:11 alanhaggai joined #perl6
08:19 Caelum wow, rakudo is incredibly slow
08:19 Caelum 29s to count words in a file, versus 0.02s in perl5
08:20 moritz_ yes, 3 orders of magnitude is currently the usual difference :(
08:32 sjohnson *sad face*
08:32 sjohnson i think speed might be a by product in SMOP
08:36 Matt-W There will be speed
08:36 Matt-W But functionality first
08:37 * moritz_ has large hopes in the PCC refactoring
08:37 Matt-W That's going to be a big help
08:37 moritz_ and in the signature binding thing that jnthn++ is going to re-work
08:38 Matt-W PCC is currently a big source of slow
08:38 Matt-W I believe pmichaud++'s PGE rework should also lead to speedups
08:38 moritz_ jnthn: speaking of which, did you get any update on your Hague grant? was it accepted?
08:38 moritz_ Matt-W: yes, but mostly parsing speedup, not so much runtime (except maybe when matching user-defined regexes)
08:42 Matt-W but still, parse/compile is a significant hit on startup at the moment
08:43 Matt-W just witness the massive difference in performance if you precompile your modules
08:43 Matt-W not runtime performance, but time before it does something
08:44 dakkar joined #perl6
08:46 rfordinal left #perl6
08:46 NorwayGeek joined #perl6
09:05 sjohnson im actually willing to sacrifice speed for functionality, if it's not speed-critial
09:05 sjohnson critical
09:17 pmurias joined #perl6
09:40 masak joined #perl6
09:50 am0c joined #perl6
10:02 carlin http://github.com/carlins/mwbot # release early ... but maybe not this early, oh well
10:05 masak carlin++ # cool!
10:06 Caelum http://szabgab.com/talks/perl6​/perl6-class-inheritance.html <-- is there really no $self->next::method like equivalent?
10:06 masak possible combinable with what MediaWiki syntax parser November has already.
10:07 carlin Oh cool
10:07 * carlin takes a look
10:07 carlin I want to get it functional enough to get it doing a bot task on Wikipedia
10:07 masak Caelum: I'd use nextsame() for that. I think that's correct.
10:08 Caelum ahh cool :)
10:11 Matt-W nextsame() goes to the next candidate in multi dispatch
10:11 masak rakudo: class Point { has ($.x, $.y) is rw; method reset { $!x = $!y = 0 } }; class Point3D is Point { has $.z is rw; method reset { $!z = 0; nextsame } }; my $p = Point3D.new(:x(23), :y(42), :z(12)); say [.x, .y, .z].fmt given $p; $p.reset; say [.x, .y, .z].fmt given $p
10:11 p6eval rakudo 1ca164: OUTPUT«23 42 12␤0 0 0␤»
10:11 masak Matt-W: you're not wrong.
10:11 Matt-W it would make sense if in inherited methods it goes to the parent class's
10:11 masak well, it does. see above.
10:11 Matt-W indeed
10:12 Matt-W you proved it while I was typing
10:13 Matt-W presumably nextwith() also works
10:13 Matt-W although probably less useful in this case
10:14 masak hm, interesting. nextwith would only see a limited set of the original multies.
10:16 masak rakudo: class A { multi method foo(Str $) { say "A Str" }; multi method foo(Int $) { say "A Int" } }; class B is A { multi method foo(Int $) { say "B Int"; nextwith("OH HAI") } }; B.new.foo(42)
10:16 p6eval rakudo 1ca164: OUTPUT«B Int␤»
10:16 masak I guess it reaches the end of the list of candidates without finding a match, and gives up.
10:16 masak if jnthn were here, he could confirm.
10:19 moritz_ that does look like a bug to me
10:19 masak why?
10:19 moritz_ because it should find the multi from class A, no?
10:19 masak can I bikeshed a bit about .excl_min and .excl_max? I don't think core routines should have underscores in them, I think 'excl' is an ugly shortening of 'exclude', and I don't immediately see why we should use the negative 'exclude' instead of 'include'.
10:20 masak moritz_: well, think of how/when the chain of candidates is constructed.
10:21 moritz_ masak: (re bikeshedding) agreed with everything (maybe except the last one)
10:21 moritz_ masak: when/how is it constructed?
10:22 masak moritz_: before the call to the narrowest one.
10:22 masak at that time, only the Int candidates remain.
10:22 moritz_ oh.
10:22 masak the Str variant is not a candidate.
10:22 moritz_ right
10:22 moritz_ so... what would you do to dispatch to the Str candidate?
10:22 masak that's what I mean when I said 'hm, interesting. nextwith would only see a limited set of the original multies.'
10:23 masak moritz_: probably the .HOW.dispatch thing that szabgab did in his code.
10:27 alanhaggai_ joined #perl6
10:28 moritz_ if we get confirmation from TimToady or jnthn, that would make an excellent test case
10:29 masak TimToady might roll over the horizon soon. jnthn is probably making the best of hist last few days in .kr right now.
10:30 moritz_ massak++ # " roll over the horizon", I like that
10:31 sjohnson is it okay to talk OT on this chan?
10:31 masak sjohnson: as long as people are not annoying, we tend to enjoy OT. but it's always subordinate to real Perl 6 discussion, of course.
10:32 hanekomu joined #perl6
10:32 moritz_ sjohnson: if the off-topic amount is much smaller than your overal on-topic talk, yes
10:32 masak funnily enough, discussions tend to derail into being about Perl 6. :)
10:32 sjohnson just that i get really irritated when random people on the ircs who think they are smarter than me call me an idiot
10:32 masak it's amazing how often you can turn OT talk into a one-liner which turns up a bug or an interesting corner case.
10:33 sjohnson i'm sure this has happened to everyone here at least a dozen times in their lives at one point or another
10:33 masak not on this channel, but people can be quite brusque elsewhere, yes.
10:33 moritz_ sjohnson: yes, it did. Though I tend to stay only in channels where that happens rarely or not at all
10:33 moritz_ like here :-)
10:34 sjohnson yeah i have found some friendly ppl here
10:34 moritz_ many channels on irc.perl.org are also very friendly, IME
10:34 patspam joined #perl6
10:35 masak people on #bash are knowledgeable, but they also seem infinitely bored with the FAQs. they have a bot which churns out links for people asking them. and they answer a bit dismissively sometimes.
10:35 sjohnson even the perl chan is kind of mean from time to time
10:36 masak oh yes.
10:37 masak it's a tricky problem: how to avoid introducing hierarchical-mindedness and meanness when the community grows beyond the size of a village?
10:38 hanekomu split off into specialized subchannels. leave the original channel for the newcomers
10:38 masak http://en.wikipedia.org/wiki/Dunbar's_number
10:38 hanekomu so someone who wants to coach them can, but others can discuss higher-level topics somewhere else
10:38 masak yes, perhaps.
10:39 masak what I've always liked about #perl6 is that it's decidedly not a channel for newcomers (just as Perl 6 is more of a 'last language' than a 'first language'). the years 2005-2007 changed my programming path forever.
10:40 masak lunch &
10:40 moritz_ and it still embraces newcomers
10:40 moritz_ I still remember my "huh?" when I suddenly had a commit bit email in my inbox
10:41 moritz_ just because I went here to tell people that a link on pugscode.org was broken :-)
10:46 Caelum sjohnson: I think channels should have rules about people not being dicks, which would be enforced by people who know what that means. Maybe harder to accomplish than it sounds, I dunno
10:47 carlin http://meta.wikimedia.org/wiki/Don%27t_be_a_dick
10:49 Caelum wow
10:49 carlin Wikipedia; is there anything they don't have a policy for?
10:49 Matt-W Probably not
10:49 Matt-W They're very good at producing policy, and then arguing about it
10:49 Matt-W Or arguing about it, producing it, then arguing about it some more
10:51 carlin Or just arguing
10:51 moritz_ bikeshedding.
10:52 Matt-W Yup
10:52 Matt-W I suppose their major problem is that the community's really big
10:52 moritz_ aye
10:52 Matt-W Perl 6 is still fairly manageable in that we can actually convince each other of things
10:52 moritz_ or if not, nobody really minds if Larry decides :-)
10:52 Caelum I've worked on very small projects where people are dicks too
10:53 Caelum not entirely a size isssue
10:54 Matt-W No this is true, but it's usually worse in a larger group
11:03 xinming_ joined #perl6
11:22 masak I think smaller groups have more of a chance of producing more sustainable relations between people. it definitely helps to meet people face-to-face on YAPCs and NPWs. one is not as likely to commence a flame war with someone one's met in meatspace.
11:23 Juerd s/one\'s/once/?
11:23 moritz_ "one has met in meatspace"?
11:24 Juerd Oh
11:24 Juerd Yeah, that seems logical.
11:33 Jedai joined #perl6
11:36 masak t/spec/S32-array/splice.t bailed out after test 26 in the spectest harness, but runs fine standalone.
11:37 masak but apart from that, all spectests pass. committing.
11:39 pugs_svn r28620 | masak++ | [t/spec/S32-array/delete.t] unfudged two tests for Rakudo
11:42 dalek rakudo: d91717d | masak++ | src/ (2 files):
11:42 dalek rakudo: moved Array.delete to setting
11:42 dalek rakudo: It's not likely that 'undef' will work as intended for typed arrays but,
11:42 dalek rakudo: hey, all the old tests pass, plus two TODO'd ones.
11:42 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/d​91717dffe6662a3d2b9014e3229d0b61278af96
11:42 masak rakudo: my @a = 0..1; @a.delete(0); say @a.perl
11:42 p6eval rakudo 1ca164: OUTPUT«Null PMC access in isa()␤in method Any::map (src/gen_setting.pm:182)␤called from method List::perl (src/gen_setting.pm:1851)␤called from Main (/tmp/vKCPJWlRpW:0)␤»
11:43 masak guess I should wait a while.
11:44 colomon joined #perl6
11:45 jrtayloriv joined #perl6
11:46 NorwayGeek joined #perl6
11:49 moritz_ rakudo: my @a = 0..1; @a.delete(0); say @a.perl
11:49 p6eval rakudo 1ca164: OUTPUT«Null PMC access in isa()␤in method Any::map (src/gen_setting.pm:182)␤called from method List::perl (src/gen_setting.pm:1851)␤called from Main (/tmp/CYRNRg6jLr:0)␤»
11:49 moritz_ it should have rebuilt at 13:45
11:50 masak it works locally.
11:53 colomon Huh.  Any ideas why "git pull" has stopped working for me on Rakudo?  It's saying "You asked me to pull without telling me which branch you want to merge with," but that never was an issue before?
11:53 * colomon should have known better than to reboot his MBP.  (79 days uptime before reboot.)
11:53 masak colomon: I've not fully figured out that part of git-pull yet. but 'git pull origin master' should do what you want.
11:54 masak colomon: mine's up 100 days today. :)
11:54 Juerd Speaking of uptime. Feather's almost at 200 days.
11:54 moritz_ colomon: what does 'git branch' say?
11:54 colomon masak: Thank you, that worked.
11:54 Juerd So you guys have been treating it well for a while now :)
11:54 colomon Oh, * is pointing to "no branch".
11:54 colomon git checkout master?
11:55 colomon bingo
11:55 masak there you go.
11:55 Juerd Oh, and feather0, the actual computer, is at 359 days
11:55 slavik2 masak/moritz: how much of spec does rakudo implement?
11:55 Juerd >1 year :)
11:55 slavik2 Juerd: week short :P
11:55 colomon must have been while I was messing around with Lanny's patch yesterday.
11:55 Juerd Oh, right, it's 365, not 356 per day.
11:55 moritz_ slavik2: "a good chunk", but we have no real numbers on that one
11:55 Juerd <1 year :(
11:56 moritz_ <3 years :-)
11:56 Juerd Heh
11:56 slavik2 moritz_: fair enough ... I am still waiting for assertions in grammars :P and there was some other thing that was not implemented for smart matchers ...
11:57 moritz_ slavik2: assertions in grammars might come soonish, when pmichaud++ finishes his work of refactoring PGE
11:57 slavik2 pmichaud: chop chop :P
11:58 masak slavik2: yes, but it's spelled 'pmichaud++ # keep up the good work!' :P
11:58 slavik2 pmichaud++ # keep up the good work!
11:58 slavik2 :)
12:03 slavik2 masak: any idea if zip works on a list of objects?
12:03 masak sure, why not?
12:03 slavik2 I submitted that as a bug long time ago
12:03 masak URL?
12:03 slavik2 zip would not work on a list of matcher objects
12:03 masak oh, Match objects.
12:03 slavik2 can't find it in rt
12:04 masak no, those are known to be wonky.
12:04 slavik2 aww
12:04 slavik2 :(
12:04 masak better to convert their contents to something else and zip on that.
12:04 slavik2 my %hash = $/<blah> Z $/<glah>; #this does not work
12:05 masak I'm not surprised.
12:05 masak Don't Do That, Then.
12:05 envi^home joined #perl6
12:05 slavik2 :(
12:05 carlin doctor, doctor it hurts when I do this!
12:05 moritz_ well yes, list context on match objects is a bit broken, I think
12:06 masak slavik2: you're an early adopter; this is what it's like. :) remember that you'll still get the reward of being the first to do many things.
12:06 slavik2 I know
12:06 slavik2 I am an early adopter, because I can't wait any longer
12:06 masak slavik2: there's also a certain sense of satisfaction in working around things.
12:09 slavik2 hmm, I am also thinking of submitting "absence of Programming Perl6" as a bug ...
12:09 masak I still want to write something. I'd be happy to pair up with someone for great justice. my idea is producing 5 or so mid-sized Perl 6 programs, each of which shows off the strengths of Perl 6 in some way.
12:09 * moritz_ raises hand
12:09 masak moritz_: you're on.
12:09 slavik2 I wrote a grammar example
12:09 masak the book can easily be collaboratively written using a wiki or Google Docs or something.
12:09 slavik2 except now it doesn't work :(
12:10 slavik2 bcacm.org/~slavik/
12:10 moritz_ or a github repository :-)
12:10 * moritz_ doesn't really like wikis for writing larger stuff
12:10 * Matt-W would find some tuits for help
12:11 slavik2 so, I have some perl6 code that worked way long ago, but is broken now ...
12:11 slavik2 it doesn't output anything
12:11 moritz_ masak: I'm kinda busy tonight and tomorrow, but maybe we could organize a brainstorming IRC meeting for Wednesday evening (GMT-zone evening, that is)?
12:12 slavik2 why not take the spec and write code samples?
12:12 moritz_ because the spec is more of a reference
12:13 masak moritz_: I'd like that.
12:13 slavik2 hmm, then take key points from each "chapter" and write code samples?
12:13 moritz_ shall we say 18H UTC?
12:13 slavik2 today?
12:13 moritz_ Wednesday
12:14 * moritz_ busy tonight
12:14 moritz_ table tennis needs to be played :-)
12:21 Matt-W heh
12:21 Matt-W my usual table tennis partner is off work
12:22 moritz_ training tonight, match tomorrow, match on Thursday :-)
12:26 Matt-W :)
12:27 Matt-W recorders tonight, taking the cat to the vet tomororw (Then aikido if there's time), gaming on wednesday, viols on thursday, aikido on friday...
12:27 Matt-W I'll just keep an eye on what you're writing and complain about your grammar
12:29 moritz_ as long as you also fix it, that's great :-)
12:31 takadonet joined #perl6
12:31 takadonet morning all
12:31 moritz_ \0/
12:32 meppl joined #perl6
12:37 slavik2 Matt-W: how is aikido?
12:37 masak moritz_: Wednesday 18:00 UTC works great.
12:38 moritz_ \𝚯/
12:39 masak :)
12:40 masak rakudo: my @a = 0..1; @a.delete(0); say @a.perl
12:40 p6eval rakudo d91717: OUTPUT«[undef, 1]␤»
12:41 * masak closes ticket
12:42 colomon masak: shouldn't that be my @a = 0...1; now?
12:43 moritz_ ranges still listify in list context
12:43 moritz_ you need series for more fancy stuff, though
12:43 colomon Do ranges still have by?
12:43 masak no.
12:44 colomon that's a step in the right direction, then!  :)
12:45 * moritz_ happily deleted quite a few tests over the weekend
12:45 moritz_ but under the storm of colomon++'s new tests nobody really noticed
12:46 colomon the sad thing is, there's still an entire way of calling trig functions not yet tested (because it's in the spec but NYI).
12:47 moritz_ the one with the enum?
12:47 colomon yes
12:49 colomon you're supposed to be able to set $?TRIGBASE (or whatever the sigil is) to change the base as well as doing it on a call-by-call basis.
12:49 jaldhar joined #perl6
12:49 moritz_ $<[?*!^]>TRIGBASE :-)
12:49 colomon it will be easy enough to add the tests for that, but it will bump up the number of trig tests again.
12:49 jaldhar joined #perl6
12:49 colomon hmmm....
12:49 colomon rakudo: say pi.sin(:base("degrees"))
12:49 p6eval rakudo d91717: OUTPUT«1.22464679914735e-16␤»
12:50 moritz_ well, one call for each function and base should be enough
12:50 colomon that case isn't tested either.  (and obviously it doesn't work).
12:50 moritz_ assuming the value is semi-random
12:50 colomon Hmmm... that's a good idea for refactoring a bit, actually.
12:50 moritz_ yes, calling positional params by name isn't implemented
12:51 colomon I thought it would fail instead of just ignoring the param.
12:52 moritz_ method calls generally ignore superfluous named arguments
12:52 kcwu joined #perl6
12:54 colomon that seems icky
12:54 colomon doesn't it mean typos for optional named arguments will be silently ignored?
12:54 moritz_ yes :(
12:54 colomon or is that just a rakudo bug?
12:55 moritz_ no, it's a specced feature
12:55 colomon that seems very odd....
12:55 jaldhar joined #perl6
12:56 moritz_ TimToady had some good reasons for it, but I'm still not sure if it's worth it
13:02 frederico joined #perl6
13:06 SmokeMachine joined #perl6
13:08 slavik2 angry russian left ...
13:11 Matt-W moritz_: I'm not either
13:13 jaldhar joined #perl6
13:21 * carlin needs to parse either JSON, XML or YAML ... hm ...
13:23 jaldhar joined #perl6
13:24 masak carlin: check out moritz_++'s JSON grammar.
13:24 masak http://github.com/moritz/json
13:25 carlin masak: Oh cool :-) Thanks
13:25 pmurias joined #perl6
13:27 nihiliad joined #perl6
13:35 iblechbot joined #perl6
13:43 carlin \o/ I think I've got JSON::Tiny figured out. moritz_++
13:43 jaldhar joined #perl6
13:43 masak that's great. reuse rocks!
13:49 moritz_ and viklund++, he applied those fixes that made it pass its tests :-)
13:50 jferrero joined #perl6
13:51 TheHatter joined #perl6
13:55 TheHatter left #perl6
13:56 mberends joined #perl6
13:57 PacoLinux joined #perl6
14:01 payload joined #perl6
14:05 mberends diakopter: which sprixel functions should I now try to spectest manually?
14:05 phenny mberends: 04 Oct 21:57Z <diakopter> tell mberends I'm redoing the entirety of sprixel's builtins in Perl 6 (with embedded JS for some things) after I redo the interpreter engine to treat everything as an .invoke(), with proper captures and signatures and the like.
14:06 mberends aha. never a dull moment :)
14:08 pmichaud good morning, #perl6
14:08 moritz_ good localtime pmichaud
14:08 mberends good day pm
14:09 Matt-W oh hai pmichaud
14:19 crythias joined #perl6
14:20 masak hi pmichaud++
14:21 Psyche^ joined #perl6
14:23 jaldhar joined #perl6
14:39 pugs_svn r28621 | pmurias++ | [mildew-js] Code uses the m0ld block from re-smop Code
14:39 masak carlin: I added your mwbot to proto's projects.list. you already have a proto commit bit, I see.
14:40 Woody2143 joined #perl6
14:40 carlin masak: Thanks :-) The name will probably change at some point though
14:41 masak then you'll even have use for your commit bit. :)
14:41 jaldhar joined #perl6
14:42 xinming joined #perl6
14:43 carlin heh yeah, outside of that and the tab-completion I don't think I could help much with proto
14:44 moritz_ every small bit is very welcome.
14:44 moritz_ oh, and writing projects helps us to exercise proto :-)
14:51 NorwayGeek joined #perl6
14:51 _jaldhar joined #perl6
14:52 carlin http://gist.github.com/202158 # and the output: http://gist.github.com/202159
14:52 carlin \o/
14:53 moritz_ \o/ indeed
14:53 moritz_ carlin++
14:55 carlin moritz_++ and viklund++ # JSON::Tiny++
14:56 Matt-W carlin++
14:56 Matt-W that's neat
14:58 _jaldhar joined #perl6
14:58 masak carlin++ # today's cool script
15:03 Eevee joined #perl6
15:04 payload joined #perl6
15:05 _jaldhar joined #perl6
15:05 diakopter mberends: repeat while/until
15:06 diakopter and all the other control structures
15:07 mberends diakopter++: great! limited connectivity this week so I may have to batch lots of updates offline.
15:07 carlin I think I'll leave making MWBot.pm use JSON::Tiny until after I've slept. 'Night all.
15:08 lanny joined #perl6
15:08 moritz_ mberends: I can strongly recommend git-svn then :-)
15:08 diakopter carlin: 'nite
15:08 lanny colomon: you get that message from git when you aren't on a branch that is tracking anything.
15:08 KyleHa joined #perl6
15:08 mberends thank moritz_, will look into git-svn :)
15:08 lanny mberends: git-svn is really good but it doesn't handle svn props.
15:08 justatheory joined #perl6
15:09 abra joined #perl6
15:10 abra joined #perl6
15:12 abra joined #perl6
15:13 abra joined #perl6
15:13 pmurias_ joined #perl6
15:14 abra joined #perl6
15:19 diakopter pmurias: you around?
15:23 ruoso joined #perl6
15:26 diakopter afk&
15:30 PZt joined #perl6
15:32 pugs_svn r28622 | lwall++ | [S03] dehuffmanize excl_* slightly to emphasize boolean nature to reader
15:32 pugs_svn r28622 | [S32] add i as constant
15:32 iblechbot joined #perl6
15:33 _jaldhar joined #perl6
15:36 zaphar_ps joined #perl6
15:40 jferrero joined #perl6
15:40 NorwayGeek joined #perl6
15:40 kidd joined #perl6
15:41 _jaldhar joined #perl6
15:43 pmurias diakopter: pong
15:44 pmurias ruoso: hi
15:44 rfordinal joined #perl6
15:52 pugs_svn r28623 | pmurias++ | [re-mildew] some refactoring
15:53 alanhaggai joined #perl6
15:58 rfordinal3643 joined #perl6
15:59 diakopter pmurias: I was curious why your dispatch uses the non-mangled 'infix<blah>' as the identifiers instead of STD's mangled editions?
15:59 alfieANDfred joined #perl6
15:59 diakopter (was that a decision you made or is there something inherent in smop/mold that requires that)
16:01 pmurias diakopter: why should i mangle my identifiers?
16:02 pmurias if i mangled them i would have to unmangle them when i want to display them
16:04 pmurias diakopter: does newer STD mangle identifiers by default?
16:06 pmurias diakopter: by mangled editions you mean the ones with special characters replaced by alphanumerics?
16:11 ejs joined #perl6
16:15 lanny rakudo: class Foo { has @!nums = 2,3,4; method postcircumfix:<[ ]>(*@ns) { my @v = gather for @ns { take(@!nums[$_] + 1) }; @v.elems == 1 ?? @v[0] !! @v; }; }; my Foo $f .= new; $f[3].say;
16:15 p6eval rakudo d91717: OUTPUT«No such attribute '@!nums'␤in method Foo::postcircumfix:[ ] (/tmp/fiztnU3av4:2)␤called from method Foo::postcircumfix:[ ] (/tmp/fiztnU3av4:2)␤called from Main (/tmp/fiztnU3av4:0)␤»
16:16 stephenlb joined #perl6
16:16 lanny I don't find any bugs for [] losing knowledge of the objects attributes.  Is this a known issue (that is tribal knowledge vs in RT).
16:16 diakopter pmurias: yes that's what I mean
16:17 TimToady I don't think I've seen that bug before
16:17 moritz_ lanny: I don't recognize it, feel free to submit
16:17 diakopter pmurias: yes, sprixel gets the ast with the names mangled
16:17 lanny ok.
16:17 diakopter (mangle.pl)
16:18 diakopter whether that's done in viv or std or cursor, I don't know
16:18 TimToady the P5 types are mangled by necessity, but if we provided a link into the symbol table, the key there would be unmangled
16:19 TimToady the unmangled name should certainly be made available one way or another
16:20 cdarroch joined #perl6
16:20 diakopter std: wait while fork
16:20 p6eval std 28623: OUTPUT«ok 00:01 97m␤»
16:21 TimToady well, Str on the correct node gives back the unmangled form
16:21 diakopter ok.. ToJS.pm could do that
16:21 pmichaud lanny: rakudo doesn't like that formulation because the default postcircumfix:<[ ]>(Int) is more specific than the method defined in Foo
16:22 diakopter but stabs linked to nodes would be great too :)
16:22 diakopter or at least their identifiers
16:22 diakopter the pads' identifiers, I mean
16:22 pmichaud i.e., I'm not sure what the call chain there should look like
16:23 stephenlb joined #perl6
16:25 pmichaud rakudo:  class Foo { method postcircumfix:<[ ]>($x) { say $x; } };   my Foo $f .= new;  $f[3];
16:25 p6eval rakudo d91717: OUTPUT«3␤»
16:26 lanny grr.  I've been playing with signatures for a while now.  Spec suggests that *@@slice is the correct sig
16:27 lanny rakudo: class Foo { has @!nums = 2,3,4; method postcircumfix:<[ ]>($ix) { @!nums[$ix]}; }; my Foo $f .= new; $f[3].say;
16:27 p6eval rakudo d91717: OUTPUT«No such attribute '@!nums'␤in method Foo::postcircumfix:[ ] (/tmp/V7vyWpXmYU:2)␤called from method Foo::postcircumfix:[ ] (/tmp/V7vyWpXmYU:2)␤called from Main (/tmp/V7vyWpXmYU:0)␤»
16:27 lanny However...
16:28 pmichaud rakudo:  class Foo { has $!x = 4; method postcircumfix:<[ ]>($y) { say $!x; } };   my Foo $f .= new;  $f[3];
16:28 p6eval rakudo d91717: OUTPUT«4␤»
16:29 pmichaud ohhhhh, I know the problem.
16:29 pmichaud TT #389
16:30 moritz_ which desugars to https://trac.parrot.org/parrot/ticket/389 ;-)
16:30 lanny Thanks.  :)
16:30 pmichaud because methods are automatically entered into the namespace, and because Parrot's IMCC compiler automatically short-circuits name lookups when there's a same-named method in the compilation unit, the @!num[...]  call is thinking that @!num is an instance of Foo
16:30 pmichaud s/same-named method/same-named sub/
16:31 moritz_ (the IRC logs advertised in the /topic also turn TT #389 into a link)
16:31 lanny The sub named '[ ]
16:31 moritz_ I sometimes use them for following links, even when I have no need to backlog ;-)
16:31 lanny '[ ]'?
16:31 NorwayGeek joined #perl6
16:31 xinming_ joined #perl6
16:32 pmichaud this is a bit tricky to explain, but here goes
16:32 pmichaud the method declaration produces
16:32 pmichaud .namespace ['Foo']
16:32 * lanny sits closer to the campfire.
16:32 pmichaud .sub 'postcircumfix:[ ]' :method
16:32 pmichaud ... code for method
16:32 pmichaud ... code for @!nums[$ix] looks like:
16:32 pmichaud $P0 = getattribute self, '@!nums'
16:33 pmichaud 'postcircumfix:[ ]'($P0, $ix)
16:33 pmichaud ....
16:33 pmichaud okay so far?
16:33 lanny Yep.  I'm with you.
16:33 pmichaud okay, there are two bugs at play
16:34 pmichaud first, the Parrot sub itself gets entered into the ['Foo'] namespace
16:34 lanny That was even my first thought but then figured that @num would have been handled by Array.pcf<[ ]>
16:34 pmichaud i.e., Parrot currently treats all methods as being automatically exported into the namespace
16:34 pmichaud the second bug is that Parrot automatically short-circuits any function call lookups if there's a same-named sub in the current namespace
16:34 pmichaud so that call to 'postcircumfix:[ ]'($P0, $ix)  ends up being recursive
16:35 pmichaud and then complains that @!num doesn't have a @!num attribute
16:35 lanny Makes sense.
16:35 moritz_ but why is 'postcircumfix:[ ]' called as a sub, not as a method?
16:35 pmichaud moritz_: hll interop
16:35 moritz_ pmichaud: ok
16:35 pmichaud if we're dealing from objects from another world, they don't have a "postcircumfix:[ ]" method
16:36 pmichaud so we currently do postcircumfix:[ ] as a function call, and that call takes care of dispatching as a method or going through the vtable interface
16:39 TimToady seems like it's something that should be translated when one dispatcher delegates to a different language's dispatcher
16:39 TimToady and not before that
16:39 pmichaud I'm not sure that I follow
16:39 TimToady I think parrot is making probably making unwarranted assumptions about the various language's dispatchers here
16:39 pmichaud I follow that and agree.  :)
16:39 pmichaud parrot hasn't completely come to grips with the idea of per-language dispatchers
16:39 pmichaud at any rate, the fix here is probably for Rakudo to have a private function that handles postcircumfix:[ ]
16:40 pmichaud and to call that function something other than postcircumfix:[ ]
16:40 TimToady and a p6 single dispatch may want to delegate to a different foreign mechanism than a p6 function call would
16:40 pmichaud in fact, I suspect that if I simply renamed it to !postcircumfix:[ ]   then this issues would go away
16:40 pmichaud *issue
16:40 TimToady so coalescing the dispatchers into one API feels wrongish
16:40 justatheory joined #perl6
16:42 pmichaud TimToady: btw, I think that you'll be pleased to know that the regex and tools refactor is eliminating the angle-less names :)
16:42 TimToady the reason p6 gets away with making everything a function call underneath is that we can track which dispatcher is invoking us; the parrot approach seems like a bottleneck on that from your description
16:42 TimToady pmichaud: :D
16:42 * ruoso trying to review pmichaud's notes on S08
16:42 TimToady :D xx *
16:43 pmichaud TimToady: yes, I agree that the parrot approach bottlenecks things; I haven't found an alternative yet
16:43 pmichaud given  $x[...]
16:43 pmichaud I'm not sure what code to generate to handle the postcircumfix
16:43 pmichaud if we generate
16:43 pmichaud $x."postcircumfix:<[ ]>"(...)
16:43 pmichaud that somewhat depends on the target $x (which could be a foreign object) understanding the "postcircumfix:<[ ]>" method
16:44 TimToady unless the dispatcher does the translation at delegation time
16:44 pmichaud which dispatcher?
16:44 ruoso is the irclog down?
16:44 TimToady the . dispatcher
16:44 pmichaud right
16:44 TimToady the one that understands nextsame :)
16:45 pmichaud so then the p6 dispatcher needs a way to map p6-named methods into Parrot's underlying vtable interface?
16:45 TimToady the one that sees that the next candidate is off in lala-land, and translates the call to lala-ese
16:45 moritz_ ruoso: it was over the weekend
16:45 pmichaud the notes I linked to were from a week or so ago
16:46 * ruoso not being able to reach it right now
16:49 pmichaud anyway, I fully admit that our current postcircumfix:<[ ]> handling is hackish, but I haven't come up with a better way to deal with non-Rakudo objects
16:49 TimToady the single dispatcher will need to be taught somehow so that you are not tempted to use the wrong dispatcher
16:49 pmichaud that makes sense
16:49 pmichaud especially since it means I throw it over to jnthn++ for now :)
16:49 TimToady wfm :)
16:54 TimToady Juerd: if feather has been up for a year, it almost certainly means there are known security vulnerabilities you haven't patched.  :)
16:55 pmichaud TimToady: over the weekend while working on regex engine, I came across a place where  Regexp::Grammar's   <MATCH=xyz>  syntax could be useful.  Is there a p6 equivalent?  Is it just   $/=<xyz>   ?
16:56 szabgab joined #perl6
16:58 TimToady it'd be something more like { $¢ = $<xyz> }, assuming $<xyz> is a Cursor
16:58 TimToady but that might screw up in other ways
16:58 pmichaud yeah, that doesn't seem exactly the same
16:58 pmichaud the example from Regexp::Grammars   would be something like      <left_paren> <MATCH=expr> <right_paren>
16:59 TimToady anyway, the invariant is that the return of the rule has to be a Cursor, but the Cursor nature doesn't care which match nature it carries along
16:59 pmichaud which returns the result of <expr> as the match object, but still does the tests for left_paren and right_paren
16:59 pmichaud return of rule always being Cursor is working out very well for me, btw
16:59 moritz_ wouldn't that just be <( expr )> ?
17:00 TimToady well, that's just <.left_paren> <expr> <.right_paren>, except for the expr nesting
17:00 moritz_ but we have no way to inline the expr call, right?
17:00 pmichaud moritz_: I want to capture more than just the text -- I think that <( and )> only set the from/to points of the match
17:00 pmichaud what <MATCH=expr> does is say *this* is my match object
17:01 pmichaud i.e., it hoists a subrule's match object to be the match returned from the current rule
17:01 TimToady but which current pos do you advertise as the result?
17:01 pmichaud (technically:  the match contained in the cursor returned from the current rule)
17:01 pmichaud I think the cursor pos is still at the end of <right_paren>
17:02 pmichaud I'm not sure what Regexp::Grammars does there -- might need to play with it a bit or ask TheDamian
17:02 ruoso TimToady, why would "my $x = (1, (2, 3))" flatten?
17:02 pmichaud anyway, not pressing at the moment, but I might come back and ask about the feature again
17:02 pmichaud (and others have asked me about it as well)
17:03 TimToady it feels/smells like include semantics
17:03 TimToady ruoso: I don't know, why would it?
17:03 ruoso TimToady, you said it would
17:03 ruoso :)
17:04 TimToady when?
17:05 pmichaud TimToady: http://irclog.perlgeek.de/​perl6/2009-09-23#i_1532822
17:06 moritz_ everything you say can and will be used against you ;-)
17:06 TimToady I did threaten to change my mind the next day.  How do you know I didn't?  :)
17:06 pmichaud We don't.  Thus the question.  :)
17:08 pmichaud I've just decided to leave links in the synopses to clarifying points from irc conversations (or mailing list items)
17:08 pmichaud so that someone remembers to go and verify or clean up the synopsis point, and so that people reading the synopsis are aware of things "under discussion"
17:08 eternaleye joined #perl6
17:10 pmichaud afk, lunch for me
17:19 hercynium joined #perl6
17:26 jnthn hi folks
17:26 jnthn Back home.
17:27 jnthn Mostly needing sleep.
17:29 jnthn Will be back onto Rakudo things tomorrow.
17:29 Chillance joined #perl6
17:46 pmichaud jnthn: wb
17:46 pmichaud jnthn: get rest :)
17:48 jnthn pmichaud: Yes, will do.
17:53 NorwayGeek joined #perl6
17:57 fridim joined #perl6
17:57 Juerd TimToady: Regarding feather I only care about known *remote* vulnerabilities :)
17:58 Juerd TimToady: I work under the assumption that feather can crash or be compromised at any time.
18:02 slavik2 feather?
18:03 diakopter Camelia lost her feathers
18:03 TimToady pmichaud: I'm considering that, for symbol table keys, operator names should not canonicalize to :<> form but rather all the way to mangled form
18:03 TimToady this would enhance language interop, I think
18:06 TimToady so instead of cicumfix:<\< \>> it would it would be circumfix__S_Lt__Gt or some such
18:06 pmichaud is there a canonical mangled form, then?
18:06 TimToady STD currently uses src/perl6/mangle.pl
18:07 pmichaud yes, but is that going to be "spec" ?  ;-)
18:07 TimToady that's what I'm asking myself
18:07 pmichaud by "language interop" you're referring to interoperability among ... ?
18:07 TimToady mangle.pl isn't quite right, since it doesn't distinguish <a b> from <ab>
18:07 TimToady how a Python program might call a Perl operator
18:07 pmichaud got it
18:08 TimToady since we need to canonicalize symbol table keys anyway
18:08 TimToady and decanonicalize for readability sometimes
18:08 TimToady and assuming our mangling is round-trippable
18:09 TimToady mapping to standard identifiers seems friendlier to other cultures
18:11 TimToady oh wait, it does distinguish those already
18:11 xinming joined #perl6
18:11 TimToady :<[ ]> is S_Bra_Ket, whild :<[]> is S_BraKet
18:12 TimToady *whilst
18:14 TimToady almost certainly STD is borken wrt symtab canonicalization of ops
18:15 TimToady std: my sub infix:<XX> () {...}; my sub infix:«XX> () {...}
18:15 p6eval std 28623: OUTPUT«[31m===[0mSORRY![31m===[0m␤(Possible runaway string from line 1)␤Malformed block at /tmp/K7mOxGlcz0 line 1 (EOF):␤------> [32mXX> () {...}; my sub infix:«XX> () {...}[33m⏏[31m<EOL>[0m␤    expecting escape␤FAILED 00:03 107m␤»
18:15 TimToady std: my sub infix:<XX> () {...}; my sub infix:«XX» () {...}
18:15 p6eval std 28623: OUTPUT«ok 00:02 102m␤»
18:15 TimToady shoulda caught that
18:17 japhb joined #perl6
18:19 TimToady course, by that argument, we should mangle the sigils too
18:19 slavik2 I have a grammar example I wrote long time ago, it doesn't work anymore (no output at all).
18:20 lanny class Foo { has @.xs; method Str { "{@.xs}" }; }; my @ys = 2,3,4; my Foo $f .= new(:stuff(@ys)); $f.say;
18:20 lanny rakudo: class Foo { has @.xs; method Str { "{@.xs}" }; }; my @ys = 2,3,4; my Foo $f .= new(:stuff(@ys)); $f.say;
18:20 p6eval rakudo d91717: OUTPUT«␤»
18:20 lanny Should there be a warning there about 'no attribute :stuff'?
18:20 lanny rakudo: class Foo { has @.xs; method Str { "{@.xs}" }; }; my @ys = 2,3,4; my Foo $f .= new(:xs(@ys)); $f.say;
18:20 p6eval rakudo d91717: OUTPUT«2 3 4␤»
18:26 pugs_svn r28624 | diakopter++ | [STD setting] parse setting files with names containing CORE with the NULL setting
18:27 jnthn lanny: The signature of that just takes a slurpy hash.
18:27 jnthn (of the default new)
18:28 lanny ok.
18:28 colomon I actually ran into the same thing with sin today:
18:28 colomon rakudo: say pi.sin("degrees");
18:29 p6eval rakudo d91717: OUTPUT«0.0548036651487895␤»
18:29 lanny neat
18:29 colomon rakudo: say pi.sin(:base("degrees"));
18:29 p6eval rakudo d91717: OUTPUT«1.22464679914735e-16␤»
18:29 stephenlb joined #perl6
18:30 lanny Odd.  Why did "degrees" work.  I would have thought at the least you'd get something like 'Str can't be Num'
18:30 colomon using named positionals doesn't work in rakudo right now, I guess, and extra parameters in the slurpy hash are ignored, so the :base is ignored.
18:30 lanny ah, ok.
18:30 colomon lanny: all the trig methods take an optional parameter which specifies the base to use.
18:31 colomon which is why the first one works.
18:31 colomon the second, in theory, should do the same thing, but instead it silently ignores the parameter.
18:31 lanny Ah got it.
18:31 lanny Ok.  Next up is...
18:31 TimToady fix is waiting on parrot fix, expected in a week or so, I believe
18:32 lanny rakudo: my $q = 5; my @cf = gather while $q > 0 { $q.say; take($q); --$q; }; ";;{@cf}".say;
18:32 p6eval rakudo d91717: OUTPUT«5␤4␤3␤2␤1␤;;0 0 0 0 0␤»
18:32 colomon (In theory it should be an enum rather than a string, but when I tried adding the enum a few weeks back all of rakudo blew up.)
18:32 colomon lanny, that's a known gather / take bug.
18:32 lanny ah.  Darn me.  That's what I get for getting tired of looking in RT before I speak.  :)
18:33 colomon I'm with you all the way, I hate trying to look stuff up in RT.
18:34 colomon you can get around it by doing something which forces a copy of the value.
18:35 colomon rakudo: my $q = 5; my @cf = gather while $q > 0 { my $qq = $q; $qq.say; take($qq); --$q; }; ";;{@cf}".say;
18:35 p6eval rakudo d91717: OUTPUT«5␤4␤3␤2␤1␤;;5 4 3 2 1␤»
18:36 colomon TimToady: moritz_ implied (earlier today) there is a good reason named parameters which are not actual parameters are ignored?
18:37 diakopter Use of uninitialized value $b in numeric gt (>) at viv line 499.
18:37 lanny colomon: yes.  was using take(my $v=$q);  Just thought I'd discovered an (uknown) bug
18:38 colomon lanny: yeah, I think that bug was already known when I discovered it a few months back.  :)
18:45 pmichaud colomon: in methods
18:45 colomon pmichaud: yes
18:46 mberends joined #perl6
18:48 colomon pmichaud: (is it different with subs?)
18:51 colomon rakudo: sin(pi, :base("degrees));
18:51 p6eval rakudo d91717: OUTPUT«Confused at line 2, near "(pi, :base"␤in Main (src/gen_setting.pm:3468)␤»
18:51 colomon rakudo: say sin(pi, :base("degrees"));
18:51 p6eval rakudo d91717: OUTPUT«FixedIntegerArray: index out of bounds!␤in sub sin (src/gen_setting.pm:559)␤called from Main (/tmp/vjd09tuJ77:0)␤»
18:52 colomon ooooo, that's exciting.
18:53 pmichaud yes, it's different with subs
18:53 pmichaud methods have an implied slurpy hash argument, subs do not
18:54 pmichaud (at least, that was my last reading of the spec)
18:55 colomon All these subtleties are making my head spin.  Good thing I trust TimToady...
18:59 masak joined #perl6
18:59 pmichaud I'd be happy if methods didn't have an implied slurpy hash
18:59 pmichaud for a variety of reasons
18:59 pmichaud otoh, the implied slurpy hash might be needed for callnext, nextwith, etc.
19:01 jnthn yes, the reason they have it is deferal.
19:01 jnthn See Interface Consistency section of S12.
19:01 jnthn You can suppress it with "is hidden" and stuff.
19:05 colomon S12 is as clear as mud to me.  I fear I still need to study up on the subtleties of p6 OO.
19:06 colomon jnthn++ # pointing out the exact point of the spec, so I could go from ignorant to uncomprehending.
19:06 colomon :)
19:10 PerlJam yeah, I don't understand either.
19:10 PerlJam Does "is hidden" remove the methods from ordinary dispatch?
19:10 jnthn No
19:10 jnthn Just from deferral.
19:11 PerlJam okay
19:11 jnthn There is a test file that may be clearer.
19:11 jnthn ah, here you go
19:11 jnthn http://svn.pugscode.org/pugs/t/spec​/S12-class/interface-consistency.t
19:12 colomon rakudo: say Num::sin.signature.perl
19:12 p6eval rakudo d91717: OUTPUT«No applicable candidates found to dispatch to for 'sin'␤in Main (/tmp/8NagkNCqm9:0)␤»
19:14 colomon Oh!  Actually, the test answers my question in a completely different direction.
19:14 jnthn & needed
19:14 jnthn (Num::sin calls it)
19:15 colomon rakudo: say &Num::sin.signature.perl
19:15 p6eval rakudo d91717: OUTPUT«undef␤»
19:16 colomon I was worried about "uncaptured named parameters", and rather than being an important part of the design that I didn't understand, it turns out they are simply a Parrot bug.
19:16 jnthn colomon: Yeah, there be bugs there.
19:16 jnthn colomon: Hopefully ex-bugs soon.
19:18 colomon rakudo: say;
19:18 p6eval rakudo d91717: OUTPUT«say requires an argument at line 2, near ";"␤in Main (src/gen_setting.pm:2562)␤»
19:18 pugs_svn r28625 | lwall++ | [S03] more tidying of ranges
19:20 SmokeMachine joined #perl6
19:29 justatheory joined #perl6
19:31 user_4812 joined #perl6
19:32 user_4812 left #perl6
19:33 pugs_svn r28626 | diakopter++ | [sprixel] lots of preparation for bootstrapping namespace/object/type system in the (tiny) subset of Perl 6 that sprixel has already implemented.  Builtins for deriving scopes/context and creating/modifying/introspecting members of scopes/objects.  Essentially hashes, but
19:33 pugs_svn ..without the P6 syntax for hashes b/c they're really JS object [prototype-chains] underneath.
19:36 mberends diakopter++ :-)
19:39 jnthn Sheesh...wow.
19:42 mberends diakopter: have you updated/will you update Test.pm.js since r28616/in the next 12 hours? I feel like implementing skip and todo, but cannot commit right now...
19:43 diakopter r28626 contained one diff line for that file, but I don't have any uncommitted local changes now
19:44 diakopter sprixel: my $core = get_core; say $core; member $core,"answer",42; say member $core,"answer"; say $core;
19:44 p6eval sprixel 28624: OUTPUT«Scope with keys: [  ]␤42␤Scope with keys: [ answer (Int()) ]␤»
19:46 mberends diakopter: ok, can patch one line manually. under a revised harness-fudging.pl, sprixel passes 192/445 tests in 15 files
19:49 diakopter kewl
19:49 diakopter well, does that include the "passes" that are actually todos?
19:49 mberends hmm, yes. but that's only about half the passes, the other half are proper passes
19:49 diakopter ok :D
19:49 diakopter ++mberends
19:55 pugs_svn r28627 | diakopter++ | [STD Makefile] add 2 more symlinks (setting and lib) TimToady plz correct if necessary
19:56 pugs_svn r28628 | diakopter++ | [sprixel] fix the what() and derive_context() builtins some more
19:56 xinming_ joined #perl6
19:59 mberends moritz_: it looks like lambdabot has stopped irclogging again :(
20:00 moritz_ lambdabot?
20:00 mberends whateverbot
20:01 moritz_ the irc logs seem to be still updated
20:01 moritz_ http://irclog.perlgeek.de/​perl6/2009-10-05#i_1571239
20:03 mberends moritz_: "seem", it must be the clever firewall/proxy between this computer and the interweb doing some cacheing. thankx 4 looking :)
20:04 mberends s/seem/looks like/
20:04 moritz_ I could try to emit some non-caching headers for the 'today' page
20:05 mberends it's non urgent
20:14 pugs_svn r28629 | moritz++ | [irclog] emit Cache-Control: no-cache for today's pages
20:14 mberends moritz_++
20:15 moritz_ mberends: let me know if it makes any difference, in case you find out
20:17 mberends moritz_: it makes no difference, but Novell BorderManager may be to blame. Thanks for the workaround, I can click on any recent timestamp as a different url :)
20:18 moritz_ Novell BorderLine? ;-)
20:18 mberends :-)
20:25 wmoxam joined #perl6
20:25 wmoxam left #perl6
20:29 justatheory joined #perl6
20:42 _jaldhar joined #perl6
20:54 _jaldhar joined #perl6
20:56 pmurias joined #perl6
21:01 _jaldhar joined #perl6
21:02 pugs_svn r28630 | diakopter++ | [sprixel] additional function jseval() - analogous to Q::PIR {}, except for JavaScript.  the this object in the function is the ast/expression tree node, which has .context as one of its members
21:03 meppl joined #perl6
21:05 diakopter sprixel: say jseval 'this.result = Type(this.context)'
21:05 p6eval sprixel 28629: OUTPUT«Scope␤»
21:05 diakopter tee hee
21:06 diakopter sprixel: say jseval 'this.result = this.invoker.T'
21:06 p6eval sprixel 28629: OUTPUT«term__S_identifier␤»
21:07 diakopter sprixel: say jseval 'this.result = this.invoker.identifier.TEXT'
21:07 p6eval sprixel 28629: OUTPUT«jseval␤»
21:09 diakopter suh-weet
21:09 _jaldhar joined #perl6
21:09 * diakopter begins cooking with gas
21:10 * sjohnson lights the flame for diakopter
21:11 * mberends looks for fireproof gloves
21:12 * pmurias runs away screaming...
21:12 diakopter hah
21:12 mberends "program ended abruptly: code too hot"
21:16 * moritz_ goes for the extinguisher and smashes it on the floor
21:16 moritz_ people always react illogical when panicking ;-)
21:18 _jaldhar joined #perl6
21:19 diakopter sprixel: sub stack_trace { jseval 'var res=[],node=this; do { res.push(node.T) } while (node=node.invoker); this.result = res.join("->")' }; say stack_trace;
21:19 p6eval sprixel 28630: OUTPUT«identifier->term__S_identifier->noun__S_​term->statement->statementlist->Sub_invocation-​>term__S_identifier->noun__S_term->arglist->arg​s->eval_args->term__S_identifier->noun__S_term-​>statement->statementlist->compilation_unit␤»
21:21 lanny joined #perl6
21:21 diakopter TimToady: now you can see the tree path for anything that std can parse.. ^^  (just call stack_trace at the point you want to see the path)
21:21 mberends when you relate that to the viv output, it looks beautiful
21:23 colomon joined #perl6
21:23 diakopter well, I'm wrong on that.. sprixel also has to implement it, too.. although I guess I can add a primitive that'll dive down into an unimplemented tree to look for such things
21:24 lanny With pretty simple classes, loops, and array access should rakudo be some 400 X slower than perl5?
21:24 lanny I believe I heard roughly 3 X slower earlier.
21:24 googe joined #perl6
21:25 mberends lanny: the tinier the operations, the greater the performance difference will be. it varies a lot.
21:26 lanny ah.  darn
21:27 lanny I'm doing euler prob 7.  compute the 10001st prime.  perl5 = 1.5s, rakudo=11.5m
21:27 lanny Ok.  Well that makes sense anyway.  Thank you.
21:28 mberends Parrot is undergoing some major refactoring that *should* help performance quite a lot. nobody knows how much though.
21:30 lanny Well, at this point it should be hard to make it worse for this app.  :)
21:31 mberends heh
21:31 diakopter pika FIRE
21:33 colomon lanny: I've seen 5000x speed difference between Perl 5 and Rakudo.
21:33 dukeleto colomon: on what?
21:33 colomon scanning a large text file
21:34 dukeleto lanny: do you know about euler_bench?
21:34 lanny No I don't
21:34 colomon perl 5 is super-optimized to handle it, and rakudo is painfully slow.
21:34 dukeleto lanny: http://github.com/notbenh/euler_bench/
21:35 dukeleto lanny: euler_bench is a way to run the euler problems as benchmarks across languages and versions of languages
21:35 lanny Interesting.
21:36 dukeleto lanny: please contribute any euler prob's that you have
21:36 dukeleto lanny: we have implementation in perl5,rakudo,parrot,ruby,haskell and probably more
21:36 lanny Although by their nature Euler problems are pretty heavily into just the mathematical portion of a language
21:36 dukeleto lanny: you would be surprised
21:37 dukeleto lanny: if you have a github account, I can add you as a committer
21:37 lanny Sure.  Account name is LannyRipple
21:38 lanny At the very least I can add this primes generator and your perl5 code is going to see a goodly jump in speeds
21:38 dukeleto lanny: very recently we have abstracted euler_bench to use arbitary files, so it is no longer directly tied to euler prob #'s. I use it to benchmark parrot scripts across all released versions as well as trunk
21:38 dukeleto lanny: we already have a few implementations for that probably, but you can add yours as well
21:39 dukeleto lanny: we are more concerned with showing performance differences between different implementations than finding the most performant solution to each problem
21:41 lanny While that's true if you are using poor algorithms then difference in the languages will just be compounded
21:43 dukeleto lanny: we treat all implementations of a single problem as useful for benchmarking, even if they are dog slow.
21:44 diakopter lanny: 'showing performance differences between different implementations' is distinct from 'showing performance differences among the optimization abilities of the implementations'.. if you have to give the optimizing compiler lots of hints to make it recognize places/ways to optimize (and the program is equivalent), then there's a spot for more potential optimization in the compiler.
21:45 lanny No, I agree there.  Looking at the haskell implementations for the Language shootout game and how I would address them shows that difference.
21:45 lanny But for instance if you have an O(N^2) algorithm then you get a compounding problem in the relative speeds between perl5 and 6 (for example)
21:46 lanny Ideally you'd just test O(N) algorithms to determine the speed gap which could be applied to other Orders of complexity
21:47 diakopter right, or if the method of evaluating the algorithm adds additional time complexity to the algorithm itself (instead of just linear overhead... )
21:47 lanny yes
21:49 lanny And then there is the joy of keeping things in sync.  I'm not picking on prob7 here but that's the one I was just noticing the gap on myself.
21:49 NorwayGeek joined #perl6
21:49 diakopter the pidigits algorithm on the language shootout was a fun one (in JS)
21:49 lanny Looks like perl6 is using O(N * log N) since someone introduced the sqrt() optimization for finding the 10001st prime while perl5 is still using O(N^2)
21:50 _jaldhar joined #perl6
21:52 lanny dukeleto: I'll look around it more.  Right now though wife just walked in the door and gotta figure out what we'll do for supper.
21:55 hercynium_ joined #perl6
21:56 hercynium joined #perl6
22:04 patspam joined #perl6
22:06 _jaldhar joined #perl6
22:06 Whiteknight joined #perl6
22:12 mberends left #perl6
22:26 _jaldhar joined #perl6
22:28 quietfanatic joined #perl6
22:30 _jaldhar joined #perl6
22:31 japhb joined #perl6
22:32 _jaldhar joined #perl6
22:34 quietfanatic rakudo: our Int @A1; our @A2; @A2[0] = "Str"
22:34 p6eval rakudo d91717: OUTPUT«Assignment type check failed; expected Int, but got Str␤in Main (/tmp/TaI3DQoZtV:0)␤»
22:34 justatheory joined #perl6
22:37 diakopter rakudo: our Int @A1; our Str @A2; @A2[0] = "Str"
22:37 p6eval rakudo d91717:  ( no output )
22:37 diakopter rakudo: our Int @A1; our Str @A2; @A2[0] = "Str"; @A1[0] = 3;
22:37 p6eval rakudo d91717: OUTPUT«Assignment type check failed; expected Str, but got Int␤in Main (/tmp/TDAowkMj7A:0)␤»
22:38 diakopter rakudo: our Int @A1; our Str @A2; @A2[0] = "Str"; our Int @AInt; @A1[0] = 3;
22:38 p6eval rakudo d91717: OUTPUT«Assignment type check failed; expected Str, but got Int␤in Main (/tmp/dnYNmw7095:0)␤»
22:38 diakopter rakudo: our Int @A1; our Str @A2; @A2[0] = "Str"; our Int @AInt = 0,0; @A1[0] = 3;
22:38 p6eval rakudo d91717: OUTPUT«Assignment type check failed; expected Str, but got Int␤in Main (/tmp/4VwEBmi3JL:0)␤»
22:39 diakopter hm
22:39 quietfanatic It took me a long time to figure out where that message was coming from.
22:40 quietfanatic because it's spooky action at a distance
22:41 diakopter rakudo: our Int @A1; our Str @A2; our Int @AInt; @A2[0] = "Str";
22:41 p6eval rakudo d91717:  ( no output )
22:41 diakopter rakudo: our Int @A1; our Str @A2; our Int @AInt; @A2[0] = "Str"; @A1[0] = 3;
22:41 p6eval rakudo d91717: OUTPUT«Assignment type check failed; expected Str, but got Int␤in Main (/tmp/fiW0vmiDze:0)␤»
22:41 quietfanatic rakudo: my Str @A1; my @A2; @A2[0] = 5
22:41 p6eval rakudo d91717: OUTPUT«Assignment type check failed; expected Str, but got Int␤in Main (/tmp/lIidfhTdOH:0)␤»
22:43 quietfanatic rakudo: my Int @A; my Str @B; @A[0] = 3
22:43 p6eval rakudo d91717: OUTPUT«Assignment type check failed; expected Str, but got Int␤in Main (/tmp/Uvj5lbmYvv:0)␤»
22:43 quietfanatic rakudo: my Int @A; my Str @B; my Int @C; @A[0] = 3
22:43 ruoso joined #perl6
22:43 p6eval rakudo d91717: OUTPUT«Assignment type check failed; expected Str, but got Int␤in Main (/tmp/wp1yjkexoc:0)␤»
22:44 quietfanatic rakudo: my Int @Z; my Int @A; my Str @B; my Int @C; @A[0] = 3
22:44 p6eval rakudo d91717: OUTPUT«Assignment type check failed; expected Str, but got Int␤in Main (/tmp/H9ECLUKMVj:0)␤»
22:44 quietfanatic rakudo: my Str @Z; my Int @A; my Str @B; my Int @C; @A[0] = 3
22:44 p6eval rakudo d91717:  ( no output )
22:44 quietfanatic rakudo: my Str @Z; my Int @A; my Code @B; my Int @C; @A[0] = 3
22:44 p6eval rakudo d91717: OUTPUT«Assignment type check failed; expected Code, but got Int␤in Main (/tmp/7ip1O8GO4x:0)␤»
22:45 quietfanatic The last unique type constraint, it seems, is picked as the constraint for all arrays.
22:45 quietfanatic rakudo: my Str @Z; my Int @A; my Code @B; my Int @C; @C[0] = 3
22:45 p6eval rakudo d91717: OUTPUT«Assignment type check failed; expected Code, but got Int␤in Main (/tmp/qRgmORdzrp:0)␤»
22:45 quietfanatic rakudo: my Str @Z; my Code @B; my Int @C; @C[0] = 3
22:45 p6eval rakudo d91717:  ( no output )
22:46 quietfanatic rakudo: my Str @A; my @B; @B.push: 3
22:46 p6eval rakudo d91717:  ( no output )
22:46 quietfanatic rakudo: my Str @A; my @B; @B[0] 3
22:46 p6eval rakudo d91717: OUTPUT«Confused at line 2, near "3"␤in Main (src/gen_setting.pm:3468)␤»
22:46 quietfanatic rakudo: my Str @A; my @B; @B[0] = 3
22:46 p6eval rakudo d91717: OUTPUT«Assignment type check failed; expected Str, but got Int␤in Main (/tmp/NCwktDIvUq:0)␤»
22:47 quietfanatic rakudo: my Str @A; my @B; @B.push: 3; say @B[0].WHAT
22:47 p6eval rakudo d91717: OUTPUT«Int()␤»
22:47 quietfanatic rakudo: my Str @A; my @B; @B.push: 3; @B[0] = @B[0];
22:47 p6eval rakudo d91717:  ( no output )
22:47 quietfanatic rakudo: my Str @A; my @B; @B.push: 3; @B[1] = 4
22:47 diakopter ah, the last one that hasn't been done before (like you said)
22:47 p6eval rakudo d91717: OUTPUT«Assignment type check failed; expected Str, but got Int␤in Main (/tmp/g4WNr1jzmx:0)␤»
22:48 diakopter what about in a block
22:48 diakopter (my )
22:48 quietfanatic rakudo: do {my Int @A; my @B; @B[0] = 3}
22:48 p6eval rakudo d91717:  ( no output )
22:48 quietfanatic rakudo: my Int @A; my @B; @B[0] = 3
22:48 p6eval rakudo d91717:  ( no output )
22:48 quietfanatic rakudo: do {my Str @A; my @B; @B[0] = 3}
22:48 p6eval rakudo d91717: OUTPUT«Assignment type check failed; expected Str, but got Int␤in Main (/tmp/LlDmQ1mGn5:1)␤»
22:49 quietfanatic Oh, and it only does that for arrays too.
22:50 quietfanatic I mean, for postcircumfix:<[ ]>
22:50 diakopter lol at 'thoughtful'
22:51 diakopter 'patient'
22:51 diakopter by that measure, sprixel is downright fixated
22:53 pmichaud rakudo:  my Str @a;  my @b;  @b.push(3);  say @b;
22:53 p6eval rakudo d91717: OUTPUT«3␤»
22:54 pmichaud rakudo:  my Str @a;  my @b;  @b[0] = 3;  say @b;
22:54 p6eval rakudo d91717: OUTPUT«Assignment type check failed; expected Str, but got Int␤in Main (/tmp/MnBiEOzY98:0)␤»
22:54 pmichaud wtf
22:54 pmichaud rakudo:  my Str @a;  my @b;  say @a =:= @b;
22:54 p6eval rakudo d91717: OUTPUT«0␤»
22:54 pmichaud rakudo:  my Str @a;  my @b;  say @a.PARROT;
22:54 p6eval rakudo d91717: OUTPUT«␤»
22:54 pmichaud rakudo:  my Str @a;  my @b;  say @b.PARROT;
22:54 p6eval rakudo d91717: OUTPUT«Perl6Array␤»
22:55 pmichaud that's.... weird
23:22 ihrd joined #perl6
23:29 Tene phenny: tell masak You should add weblocks to your list of web frameworks to look at.
23:29 phenny Tene: I'll pass that on when masak is around.
23:30 colomon joined #perl6
23:31 Confield joined #perl6
23:34 tak11 joined #perl6
23:51 eternaleye joined #perl6
23:51 pugs_svn r28631 | lwall++ | [perl6/Makefile] preserve copy semantics on snapshots
23:56 xinming joined #perl6
23:59 diakopter rakudo: my $a=0; 1 while ++$a < 40000; say $a
23:59 p6eval rakudo d91717:  ( no output )
23:59 diakopter rakudo: my $a=0; 1 while ++$a < 20000; say $a
23:59 p6eval rakudo d91717: OUTPUT«20000␤»

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

Perl 6 | Reference Documentation | Rakudo