Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2009-11-14

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:15 jaldhar joined #perl6
00:19 seanstickle joined #perl6
00:29 frew_ joined #perl6
00:38 orafu joined #perl6
00:43 Whiteknight joined #perl6
00:50 Whiteknight joined #perl6
00:57 xomas_ joined #perl6
01:41 Chillance joined #perl6
01:59 seanstickle joined #perl6
02:05 granvork joined #perl6
02:07 Wolfman2000 back from dinner. Now...to take care of this pastebin
02:11 meppl joined #perl6
02:11 jaldhar joined #perl6
02:22 granvork left #perl6
02:40 diakopter howyd
03:01 colomon jnthn: you still there?
03:08 seanstickle joined #perl6
03:09 seanstickle left #perl6
03:29 colomon jnthn, pmichaud: the line causing the trouble in Rat.gcd is ($a, $b) = ($b, $a) if ($b > $a);
03:30 colomon I'm not sure to what degree you guys want to work around issues like this, versus solving the underlying ng issue causing the trouble?
03:30 seanstickle joined #perl6
03:30 colomon jnthn: also, make t/spec/S32-num/rat.t fails miserably for me.  Does this match what you are seeing?
03:30 colomon time for bed now, I reckon (though this Cincinnati game is pretty good...)
03:34 Wolfman2000 g'night
03:36 pdcawley joined #perl6
03:43 Meldrake joined #perl6
03:58 seanstickle joined #perl6
04:04 meppel joined #perl6
04:06 seanstickle left #perl6
04:12 pnate joined #perl6
04:33 pmichaud colomon: good find -- ng doesn't have list assignment yet.  I might be able to add that.
04:38 Wolfman2000 pmichaud: what made you guys decide to work heavily on ng anyway?
04:38 pmichaud Wolfman2000: I don't quite understand the question
04:39 diakopter Wolfman2000: (as opposed to what)
04:39 Wolfman2000 pmichaud: seems like the major focus of Perl 6 right now is the ng branch...compared to...well, other branches or the master branch.
04:39 pmichaud Wolfman2000: we needed to redo the grammar, which is what the ng branch is for
04:40 pmichaud it ends up being a major refactor
04:40 pmichaud in many ways, starting over ends up being much simpler and cleaner than trying to keep things working in the master branch
04:40 pmichaud (because the changes are _that_ pervasive)
04:41 pmichaud eventually we'll have the ng branch roughly comparable to master, at which point we'll rename 'ng' to 'master' and it'll be the released version
04:41 pmichaud (incoming!)
04:41 * Wolfman2000 ducks and covers.
04:43 pmichaud oops, not yet.  ended up with a merge conflict
04:43 diakopter heh
04:43 * Wolfman2000 unducks
04:45 japhb pmichaud, can you take a look at the statement modifier if parsing bug in NQP-rx?
04:45 pmichaud sure.
04:45 japhb thanks!
04:45 Eevee joined #perl6
04:45 pmichaud what's the bug...?
04:46 diakopter nqp: say(3) if (4 if 1);
04:46 p6eval nqp: Confused at line 1, near "say(3) if "␤current instr.: 'parrot;HLL;Grammar;panic' pc 448 (src/cheats/hll-grammar.pir:197)␤
04:46 pmichaud that's not a bug as far as NQP is concerned.
04:46 diakopter japhb: I was just guessing
04:46 japhb nqp: sub foo () { return 0 if 0; return 1; }; say(foo());
04:46 p6eval nqp: Unable to parse blockoid, couldn't find final '}' at line 1␤current instr.: 'parrot;Regex;Cursor;FAILGOAL' pc 1630 (src/Regex/Cursor-builtins.pir:179)␤
04:47 pmichaud I might decide against fixing that one.
04:48 diakopter o_O
04:48 pmichaud if only because fixing it requires some extra stuff in the grammar that I might not want to put there.
04:48 diakopter moar backtracking?
04:48 pmichaud let me see if I can get my merge conflict fixed
04:48 pmichaud no, it means recognizing a number of keywords as expression terminators
04:49 pmichaud such as 'if'
04:51 diakopter nqp: sub foo () { (return 0) }; say(foo());
04:51 p6eval nqp: Unable to parse blockoid, couldn't find final '}' at line 1␤current instr.: 'parrot;Regex;Cursor;FAILGOAL' pc 1630 (src/Regex/Cursor-builtins.pir:179)␤
04:52 diakopter nqp: sub foo () { [return 0] }; say(foo());
04:52 p6eval nqp: Unable to parse blockoid, couldn't find final '}' at line 1␤current instr.: 'parrot;Regex;Cursor;FAILGOAL' pc 1630 (src/Regex/Cursor-builtins.pir:179)␤
04:53 diakopter nqp: sub foo () { if 0 { 4 } else { } }; say(foo());
04:53 p6eval nqp: Null PMC access in get_string()␤current instr.: 'print' pc 63783 (gen/nqp-actions.pir:4431)␤
04:54 japhb pmichaud, so ... how does t/nqp/02-if.t work, when this does not?  What is the real difference?  I originally thought it was the return, but that appears not to be the only way to trigger it (in my code).
04:54 pmichaud in NQP, return is a statement, not a function
04:54 pmichaud I don't know which test you're referring to in 02-if.t
04:55 pmichaud (I've not seen them -- PerlJam++ added all of the statement modifiers to NQP)
04:55 japhb The last two are say and print modified by if.
04:55 pmichaud right, those are function calls.
04:55 pmichaud they have parens
04:55 pmichaud so NQP knows where the expression argument ends
04:56 diakopter nqp: sub foo () { (if 3 { 4 }) }; say(foo());
04:56 p6eval nqp: Unable to parse blockoid, couldn't find final '}' at line 1␤current instr.: 'parrot;Regex;Cursor;FAILGOAL' pc 1630 (src/Regex/Cursor-builtins.pir:179)␤
04:56 pmichaud with "return 0 if ..."    there aren't any parens
04:56 japhb I take it parens on the return don't disambiguate?
04:56 japhb nqp: sub foo () { return(0) if 0; return 1; }; say(foo());
04:56 p6eval nqp: Unable to parse blockoid, couldn't find final '}' at line 1␤current instr.: 'parrot;Regex;Cursor;FAILGOAL' pc 1630 (src/Regex/Cursor-builtins.pir:179)␤
04:56 pmichaud not at this point they don't
04:56 pmichaud (because "return" is a statement, not a function call....)
04:56 japhb right
04:56 diakopter see the several other examples of the "couldn't find final '}'....
04:57 diakopter (not involving return)
04:57 pmichaud the other examples are all issues of trying to put statements inside of parens
04:57 diakopter ok
04:58 diakopter (also a npmca up there somewhere)
04:58 pmichaud yeah, that's because the empty else block returned a npmc
04:58 pmichaud that one I can probably fix to return an empty list or something.
04:59 dalek joined #perl6
04:59 pmichaud ugh, "return 0 if $expr"  is not going to be pretty
05:01 japhb nqp: sub foo () { { return 0 }() if 0; return 1 }; say(foo());
05:01 p6eval nqp: 1␤
05:01 diakopter japhb: :D
05:01 japhb Thankfully block != sub ...
05:01 diakopter nqp: sub foo () { { return 0 }() if 1; return 1 }; say(foo());
05:01 p6eval nqp: 0␤
05:02 diakopter except it doesn't work..
05:02 pmichaud I suppose I could create a new syntactic category
05:02 pmichaud or perhaps define 'return' and 'make' as prefix operators
05:02 diakopter oh wait
05:02 japhb diakopter, yes, it does.  ;-)
05:02 was kicked by diakopter: diakopter
05:02 japhb ?!?
05:05 pugs_svn r29078 | kyle++ | [t/spec] More tests for Nil based on r29056
05:05 pugs_svn r29079 | kyle++ | [t/spec] Test for RT 70267: {nextsame}()
05:05 pugs_svn r29080 | kyle++ | [t/spec] Test for RT 70003: $/.orig produces CodeString
05:05 pmichaud I wonder if having return and make as prefix works....
05:07 pmichaud I'll try that.
05:13 japhb [git] If you have edits in progress in several files, and are ready to test some out, but others cause parsefail, what's the best way to stow away just the edits causing failure?  The best idea I've got so far is 'git stash; git stash apply; git checkout <parsefail files>; ... test "working" files ... commit ... ; git stash pop; ... fix parsefails ... test ... commit'
05:14 pmichaud $ ./nqp
05:14 pmichaud > sub foo () { return 0 if 0; return 1; }; say(foo());
05:14 pmichaud 1
05:14 lambdabot <no location info>: parse error on input `0'
05:14 japhb pmichaud++
05:24 justatheory joined #perl6
05:26 eternaleye joined #perl6
05:28 dalek nqp-rx: e46c70d | pmichaud++ | src/NQP/Grammar.pm:
05:28 dalek nqp-rx: Convert statement_control:return to prefix:return .
05:28 dalek nqp-rx: review: http://github.com/perl6/nqp-rx/commit/e46c70d1db00a522e14542f2015807363ab8020e
05:28 dalek nqp-rx: 53fc7ad | pmichaud++ | src/NQP/ (2 files):
05:28 dalek nqp-rx: Convert statement_control:make to prefix:make .
05:28 dalek nqp-rx: review: http://github.com/perl6/nqp-rx/commit/53fc7ad49c85599dc679ef1398dff4806c8c14da
05:28 dalek nqp-rx: 710c598 | pmichaud++ | src/NQP/ (2 files):
05:28 dalek nqp-rx: Remove obsolete regexes and methods for 'return'/'make'.
05:28 dalek nqp-rx: review: http://github.com/perl6/nqp-rx/commit/710c5980e091fbcce9da7cc09cbf45d8cac2837b
05:28 dalek nqp-rx: e574f6f | pmichaud++ | src/stage0/ (3 files):
05:28 dalek nqp-rx: Update bootstraps.
05:28 dalek nqp-rx: review: http://github.com/perl6/nqp-rx/commit/e574f6fb01eeecae25fa6027d0e03b2d31edd628
05:48 Wolfman2000 ...I've found another Perl 6 hater.
05:51 Tene Yeah, noticed.
05:52 Tene He's being kind of an ass. m'eh.
05:53 quietfanatic Just don't be a Perl 6 hater hater. :)
05:54 Tene He's still helpful, though, so I wouldn't hold it against him.
05:54 Tene Yes, that.
05:55 Wolfman2000 quietfanatic: no intention to.
05:55 Wolfman2000 I don't think he likes that I'm trying to use Perl 5 to make a Perl 6 pastebin
05:55 Wolfman2000 ...the syntax highlighting could be useful though
05:56 nihiliad joined #perl6
06:03 chromatic joined #perl6
06:14 masak joined #perl6
06:15 masak morning, #perl6.
06:16 pmichaud \o/ itsmasak
06:16 Wolfman2000 masak: morning. I'm HOPING to understand HTML::Parser enough to get syntax highlighting working
06:17 masak Wolfman2000: what does HTML::Parser have to do with syntax highlighting?
06:17 Wolfman2000 masak: I need to extract the <pre> that results from Syntax::Highlight::Perl6
06:17 masak I thought all you needed to do was parse the YAML from STD.pm.
06:17 frew_ joined #perl6
06:18 Wolfman2000 masak: remember, I'm on Perl 5 here
06:18 masak Wolfman2000: well, so is STD.pm.
06:19 masak at least the half of it that outputs the YAML.
06:22 Wolfman2000 masak: If I was familiar with YAML, I may have been able to save some time.
06:22 Wolfman2000 But at this point, I'm very close.
06:23 masak Wolfman2000: it's very important that you do not listen to me. I'm probably the largest threat to your success at this point. keep going on the way you've chosen.
06:23 Wolfman2000 masak: I'm unsure how much of that is sarcasm.
06:24 masak not a great deal, actually.
06:24 masak sometimes it's important that people make their own path before listening to advice.
06:24 Wolfman2000 ...in other words, allow me to make my mistakes.
06:25 Wolfman2000 If nothing else, thank you for that
06:25 masak I deliberately chose to avoid that word, but yes. :)
06:26 masak since I have no good estimate of whether it would really be a mistake, or how much it would cost you, I think it's best that you try and see what happens.
06:28 masak one against: http://hbfs.wordpress.com/2009/11/13/the-perl-6-logo/
06:28 masak and one, I think, for: http://twitter.com/mcspring/status/5701459470
06:29 masak "Perl 6's logo shows that it will be some kind of Martian!"
06:31 masak based on the picture, I thought that Twitterer might be a girl, but it turned out to be a boy.
06:35 quietfanatic masak: You never can tell these days :)
06:40 masak quietfanatic: :)
06:46 pdcawley joined #perl6
06:49 masak KyleHa++ # many new spectests
06:50 pmichaud sleep time here -- be back in the morning
06:50 masak pmichaud: sleep tight.
06:52 masak fperrad++'s p6c email about setup.pir looks interesting.
06:52 masak gotta play a bit with that.
06:54 masak "It’s repulsively cute." -- from that blog post. Yes, that's an accurate description of Camelia, and of the perl6.org design.
06:55 masak by design.
07:01 masak gotta go manage laundry. I'll pop by later.
07:03 Wolfman2000 phenny: tell masak HTML::TreeBuilder and HTML::Element to the rescue!
07:03 phenny Wolfman2000: I'll pass that on when masak is around.
07:09 diakopter joined #perl6
07:09 diakopter sigh
07:11 Wolfman2000 diakopter: Further progress on the pastebin has been made...but the implementations won't take place until I wake up. I apologize
07:11 Wolfman2000 I'm about to get sleep
07:13 diakopter TimToady: howzit
07:31 TimToady still upgrading my ubuntu...
07:34 diakopter 9.10?
07:34 diakopter scary
07:46 pugs_svn r29081 | finanalyst++ | typo
07:47 PerlJam IS there something that Perl 6 has borrowed from Perl 5 in the last 9 years?
07:47 PerlJam (something that was invented for perl 5 in the last 9 years, that was subsequently specced for perl 6)
07:49 TiMBuS joined #perl6
07:52 diakopter nqp: sub a () { say($a) }; my $a := "4"; a();
07:52 p6eval nqp: 4␤
07:53 diakopter std: sub a () { say($a) }; my $a := "4"; a();
07:53 p6eval std 29081: Potential difficulties:␤  Variable $a is not predeclared at /tmp/JYdVOJJfUu line 1:␤------> [32msub a () { say($a[33m⏏[31m) }; my $a := "4"; a();[0m␤ok 00:02 105m␤
07:55 zloyrusskiy joined #perl6
07:56 Exodist joined #perl6
08:00 carlin Argh, batch files are painful
08:16 zamolxes_ joined #perl6
08:20 masak joined #perl6
08:20 quietfanatic joined #perl6
08:22 masak I just re-stumbled over these; they made me happy. :)
08:22 phenny masak: 07:03Z <Wolfman2000> tell masak HTML::TreeBuilder and HTML::Element to the rescue!
08:22 masak http://pugscode.org/talks/oscon05/movies.html
08:22 agentzh joined #perl6
08:22 masak Wolfman2000: woot!
08:55 iblechbot joined #perl6
08:56 colone joined #perl6
09:02 jaldhar joined #perl6
09:02 lmc joined #perl6
09:08 pnate2 joined #perl6
09:15 zamolxes joined #perl6
09:17 M_o_C joined #perl6
09:19 barney joined #perl6
09:19 M_o_C joined #perl6
09:20 M_o_C joined #perl6
09:20 M_o_C joined #perl6
09:24 Su-Shee joined #perl6
09:24 Su-Shee good morning
09:26 masak \o/
09:29 Su-Shee is that a "it's finished" \o/ yay? :)
09:29 masak no, I was just stretching a bit.
09:30 Su-Shee and I got my hopes up.. ;))
09:31 masak well, if you want to see it finish sooner, I'm sure we can think of something. :)
09:31 bryan[c1] joined #perl6
09:32 Su-Shee na, it's just something like the pre-christmas jitter.. ;) I want to see how rakudo * spreads and what people think.
09:32 masak me too.
09:33 masak I actually want to see a bunch of things land before April, though.
09:33 bryan[c1] if perl6 = fail, { what will we do? };
09:33 masak bryan[c1]: you're assigning, not comparing.
09:33 bryan[c1] seems like the difference between python 2.x and 3.x is vast
09:33 masak bryan[c1]: that will set perl6 to fail.
09:33 Su-Shee it won't fail. litereally _everybody_ perlish I know is interested. some people actually wait since 2000 now.
09:33 bryan[c1] i hope perl doesnt fall into the same situation
09:34 masak bryan[c1]: then don't assign.
09:34 bryan[c1] haha clever
09:34 masak no, it's fundamental logic.
09:34 Su-Shee and I see the right programming language with the appropriate decade of programming style coming together.
09:34 bryan[c1] lighten up man, it's just a chat room.
09:35 masak bryan[c1]: aye.
09:35 masak bryan[c1]: anyway, Su-Shee is right, it won't fail.
09:35 masak though it can surely continue to be the underappreciated underdog.
09:35 masak which many people will consider a kind of failure.
09:35 bryan[c1] seems like thats what perl is
09:36 Su-Shee I don't even think that. my feeling is that people are hungry for something new.
09:36 masak Su-Shee: if so, then we're in for interesting times.
09:37 Su-Shee masak: if perl 6 would have finished when the ruby hype just took off - this would have been bad timing, probably.. but now it looks good imho.
09:37 masak bryan[c1]: Perl is an underdog too, but maybe less than you'd think. Python and Ruby have better PR machines, but Perl 5 is still widely used.
09:38 bryan[c1] ruby is fail
09:38 Su-Shee masak: that's in germany actually not really true anymore.
09:38 zamolxes joined #perl6
09:38 Su-Shee and it's not ruby and python which are competing, here it's java (massively) and php.
09:38 masak interesting. I hadn't heard that before.
09:38 bryan[c1] all 4 of those languages are fail
09:38 masak from my angle Ruby is still wildly popular.
09:39 bryan[c1] imo at least
09:39 Su-Shee masak: that's how it looks on the internet. in terms of jobs and companies, it doesn't.
09:39 bryan[c1] what the hell kind of company would need ruby?
09:39 bryan[c1] a failing one i say
09:40 masak bryan[c1]: I see you're a bit of a language connaisseur. what do you normally use?
09:40 Su-Shee startups like ruby very much, it suggests a modern, dynamic image and they get the right bunch of people with it.
09:40 bryan[c1] not really at all
09:40 masak bryan[c1]: you're not a programmer?
09:40 bryan[c1] even a skiddie could tell you ruby's syntax is horrible and ugly
09:40 masak bryan[c1]: I don't think it's horrible and ugly.
09:40 bryan[c1] and plus it's probably only REALLY popular in japan
09:40 Su-Shee thank you, I don't need other people for that, I actually speak a little ruby. ;)
09:41 bryan[c1] it's not google's shenanigans at least
09:41 bryan[c1] speaking of failures across the board
09:41 bryan[c1] google's new excuse for a language is a big pile of fail, hit by an avalanche of more fail
09:42 masak bryan[c1]: did you come in here to catalogue failures of different kinds?
09:42 bryan[c1] no i was just wondering what you guys thought of perl6
09:42 bryan[c1] kinda went off on a tangent
09:42 masak oh, I like it.
09:43 bryan[c1] but GO is pertty dumb imo
09:43 bryan[c1] its like they tried to make a hybrid of java c++
09:43 bryan[c1] java and c++**
09:43 masak I saw a few things that I liked in Go.
09:44 masak and a few things that Perl 6 already has. :)
09:51 masak bryan[c1]: have you tried Rakudo Perl 6 yet?
09:51 bryan[c1] no
09:51 masak bryan[c1]: did you know you can try it right here on the channel?
09:51 masak rakudo: say "OH HAI bryan[c1]!"
09:51 p6eval rakudo d04cce: OH HAI bryan[c1]!␤
09:52 masak but I should warn that p6eval has been unreliable lately for unknown reasons.
09:52 masak sometimes it doesn't answer, even though the program is correct.
09:52 bryan[c1] interesting
09:52 masak but you can download the latest Rakudo at perl6.org
09:53 masak bryan[c1]: yes, it's useful when you want to demonstrate a feature.
09:53 masak say, for example, that I want a random dice throw.
09:53 masak rakudo: say (1..6).pick
09:53 p6eval rakudo d04cce: 1␤
09:53 masak or I want to throw three dice
09:54 masak rakudo: sub dicethrow() { (1..6).pick }; say [dicethrow, dicethrow, dicethrow].perl
09:54 p6eval rakudo d04cce:  ( no output )
09:54 masak aww.
09:54 masak that's what it does sometimes. :/
09:55 masak not Rakudo's fault, just the bot.
09:56 masak rakudo: sub dicethrow() { (1..6).pick }; say dicethrow for ^3
09:56 p6eval rakudo d04cce: 1␤maximum recursion depth exceeded␤in Main (file <unknown>, line <unknown>)␤
09:56 masak o.O
09:57 masak it would seem we have a 'live demo' effect going on here...
09:58 * masak rebuilds Rakudo and tries to reproduce the problem locally
10:00 sjohnson o/
10:02 masak \o
10:06 masak nope. problem does not reoccur locally.
10:06 masak rakudo: sub dicethrow() { (1..6).pick }; say dicethrow for ^3
10:06 p6eval rakudo d04cce: 1␤maximum recursion depth exceeded␤in Main (file <unknown>, line <unknown>)␤
10:07 masak I posit that p6eval is running on a broken Rakudo.
10:31 mariuz joined #perl6
10:41 _eMaX_ joined #perl6
10:54 zamolxes joined #perl6
11:03 _eMaX_ joined #perl6
11:14 zamolxes joined #perl6
11:16 abworrall joined #perl6
11:42 |Jedai| joined #perl6
11:42 _eMaX_ joined #perl6
11:47 Su-Shee joined #perl6
11:53 zamolxes joined #perl6
12:00 abworrall How best to expose a C lib in rakudo ? Do I need to work it into Parrot first ? (/me compiled the moving parts for the first time an hour ago, has little clue :)
12:02 payload joined #perl6
12:23 Su-Shee joined #perl6
12:24 _eMaX_ joined #perl6
12:30 colone joined #perl6
12:35 lasse joined #perl6
12:36 lasse_ joined #perl6
12:38 lasse_ Hey, I need some help. I try to compile rakudo on Mandriva 2010 but 'failed with 'i586-mandriva-linux-gnu-gcc'. Anyone who can help?
12:41 rfordinal joined #perl6
12:41 carlin lasse_: What was the exact error message you got?
12:42 lasse_ the last lines are: inter::progs -        Determine what C compiler and linker to use...Compilation failed with 'i586-mandriva-linux-gnu-gcc'                                   Building Parrot ... ===SORRY!===        Unable to locate parrot_config
12:42 rfordinal left #perl6
12:44 carlin lasse_: what output do you get if you run the command 'gcc'?
12:46 lasse_ this is somewhat embarrasing: gcc bash: gcc: command not found
12:47 carlin That's alright. What does 'i586-mandriva-linux-gnu-gcc' get you?
12:47 lasse_ It probably works better if I have a compiler :) thanks :|
12:48 lasse_ I install gcc and try again
12:49 carlin No problem :-)
12:53 jnthn oh hai
12:53 carlin o/
13:00 abworrall am I right in thinking that I can't read binary files from perl6 at the mo ?
13:12 abworrall or is there a way I can persuade C<slurp()> to tolerate non-UTF-8 data ?
13:13 agentzh joined #perl6
13:20 jnthn abworrall: Glancing the implementation, it looks like there isn't a way at the moment. :-(
13:20 jnthn abworrall: slurp uses open, and open doesn't know about other encodings yet.
13:23 abworrall jnthn, thanks for digging that up; I was resorting to skimming the results of find -name "*IO*" :)
13:34 mberends joined #perl6
13:36 Whiteknight joined #perl6
13:39 abworrall is setting/Any-str.pm:unpack private support for the rakudo setting; with the unpack() that I want for my perl6 program lurking unimplemented in classes/Str.pir ?
13:40 araujo joined #perl6
13:46 pugs_svn r29082 | carlin++ | [t/spec/S32-io] Add batch file and allow these tests to run on Windows. Confirmed passing on Vista.
13:47 masak joined #perl6
13:48 masak a bit quiet here today.
13:49 jnthn abworrall: That doesn't look private to me...you should be able to call it.
13:49 jnthn (granted, it really should have an "our" or "is export" in proper Perl 6)
13:49 jnthn rakudo: unpack
13:49 p6eval rakudo d04cce: Not enough positional parameters passed; got 0 but expected 2␤in Main (file src/gen_setting.pm, line 324)␤
13:49 jnthn Aye.
13:50 jnthn masak: You were up early!
13:50 masak jnthn: nespal som.
13:50 jnthn masak: O... :-(
13:50 masak I'm not complaining.
13:50 masak it means I'll sleep well tonight.
13:51 jnthn Hopefully!
13:51 masak yes. :)
13:51 masak there is also the off chance that I'll hit that combination of deadly-tiread and can't-sleep...
13:51 jnthn eh well...being concious at 7am is much easier if you never became unconcious. :-)
13:51 masak aye. :)
13:51 jnthn Yeah...that'd suck. I really hate that.
13:52 jnthn Get that with jetlag sometimes, but thankfully not so much these days.
13:52 masak jetlag! that's it!
13:52 masak I feel jetlagged.
13:53 huf not as awesome as being jetlegged
13:53 jnthn ENOJET
13:53 jnthn Well, yeah. Jet lag means you're going on - or coming back from - some small adventure. :-)
13:53 masak look ma, no jet.
13:54 masak jnthn: well, I wrote many lines of code during the night.
13:55 jnthn masak: Oooh. Many lines of Perl 6? :-)
13:55 masak yup.
13:55 masak once again, I'm hitting Parrot limits.
13:56 masak I have one situation where a program is about to exit, and it just sits there, swapping.
13:56 jnthn :-(
13:56 masak eventually, it exits. after a couple minutes.
13:56 jnthn oh wtf?
13:56 pmurias joined #perl6
13:56 pmichaud good morning, #perl6
13:56 masak it seems to occur when the program run itself involves enough time and memory.
13:56 masak pmichaud: \o
13:56 jnthn lolitspmichaud
13:57 jnthn masak: Maybe weird "very expensive exit destruction" stuff
13:57 jnthn Or something.
13:57 masak jnthn: I blame the GC. :)
13:57 jnthn Very possibly that, or destruction ordering issues.
13:57 jnthn I dunno.
13:57 masak it's a tough problem to debug.
13:57 jnthn I'm not sure what's worse - taking a couple of minutes at exit or segfaulting and getting out quick. :-/
13:58 masak jnthn: well, sometimes it does the latter also.
13:58 masak exits in the middle of a program.
13:58 jnthn Oh, that one also sucks.
13:58 masak sometimes it doesn't even say 'Segfault'. it just exits.
13:58 jnthn ?
13:58 jnthn Ouch.
13:59 masak so I'm definitely doing something right, complexity-wise :)
13:59 masak rakudo: enum A <a b c>; my A $x = a; ++$x
13:59 p6eval rakudo d04cce:  ( no output )
14:00 masak locally, I get 'Assignment type check failed; expected A, but got Int'
14:00 jnthn Yeah, but it sucks that you're hitting these kinds of limitations.
14:00 jnthn Erm
14:00 abworrall rakudo: unpack("Z*", "perl6")
14:00 p6eval rakudo d04cce: Method 'postcircumfix:[ ]' not found for invocant of class 'Failure'␤in Main (file src/gen_setting.pm, line 324)␤
14:00 jnthn Re-phrase: it sucks that these limitations exist.
14:00 masak jnthn: yes.
14:00 mubot joined #perl6
14:00 masak jnthn: it sucks, but I'm not overly surprised.
14:01 jnthn masak: One way or another, things will improve. :-)
14:01 abworrall am I being dim here ? That looks correct to me
14:01 masak abworrall: unpack is not very far implemented.
14:01 jnthn masak: Uhm, er, do you understand unpack? :-)
14:01 masak I wrote what little there is.
14:02 jnthn abworrall: Actually I never figured out unpack in Perl 5.
14:02 masak unpack in Perl 6 has problems.
14:02 abworrall ah right then :)
14:02 masak spec-wise.
14:02 masak it's basically blocking on Str and Buf being properly spec'd.
14:02 jnthn :-/
14:02 masak TimToady is not entirely sure unpack has a place in the Perl 6 ecosystem, and if so, what place.
14:03 * pmichaud spins the wheel of "what shall I work on this morning" and it lands on .....
14:03 mberends masak: were you writing about your secr^W boring time consuming project?
14:03 pmichaud looks like numerics.
14:04 mberends magic number wheel
14:04 pmichaud unfortunately I'll be leaving in under an hour for soccer game
14:04 pmichaud so, might not get a whole lot done in that time
14:04 pugs_svn r29083 | carlin++ | [t/spec/S32-io] Fix the indenting and whitespace from my previous commit
14:04 jnthn pmichaud: At least get 1.0 to parse ;-)
14:05 jnthn ...doesn't ahve to work ;-)
14:05 jnthn <grin>
14:05 pmichaud it doesn't parse yet?
14:05 jnthn pmichaud: Not afaik
14:05 jnthn pmichaud: Rat and complex literals do though.
14:05 pmichaud okay, good idea
14:05 masak mberends: I've started procrastinating the slides for BPW. I'm not sure if I should have started procrastinating slightly earlier.
14:05 masak mberends: at least this time I don't have to invent the software along the way.
14:06 jnthn masak: ooh, I need to start procrastinating mine too...thanks for the reminder!
14:06 mberends procrastination is a fine art, improved with lots of practice
14:06 masak jnthn: tonight I even created a folder on the hard drive for the presentation!
14:06 jnthn pmichaud: Complex.pm I added back. We parse much of it, other bits are commented out.
14:07 jnthn pmichaud: There's two things that tells me I need to work on. :)
14:08 jnthn masak: oh wow!!
14:08 jnthn masak: I guess my closest equivalent would be creating a new powerpoint file :-P
14:09 masak aye. an empty one.
14:09 jnthn well akshually...I gave one of my talks before.
14:09 jnthn So I'll use that as a base, then add Extra Shiny Awesomeness.
14:10 masak :)
14:10 masak I have not given my talk before.
14:10 jnthn The cover picture stays the same though. That already is awesome.
14:10 jnthn The lolsql slides...now those I haz to write.
14:10 jnthn PLZ I CAN HAZ LITENIN TALK?
14:11 masak ah; that's why I only see you once in the schedule. :)
14:11 jnthn Yeah. One big talk, one lightning.
14:12 masak 'Talks in bold type have been confirmed by their respective speakers.' http://event.perl.lv/baltic2009/schedule
14:12 masak jnthn: you should log in and confirm your talk.
14:13 jnthn oh, I forgot to do that?
14:14 masak the lack of bold seems to suggest that.
14:14 jnthn done
14:14 masak jnthn++
14:14 jnthn lol...i writed the lolsql abstract in lolspeak.
14:14 masak :D
14:14 zamolxes joined #perl6
14:17 masak ah. time to prepare tonight's dinner: lasagna. &
14:18 _eMaX_1 joined #perl6
14:25 fridim_ joined #perl6
14:25 reid08 joined #perl6
14:27 Wolfman2000 *yawn* morning
14:28 jnthn morning, Wolfman2000
14:29 Wolfman2000 If I'm lucky (and not distracted by company coming later today), I will have more progress on the pastebin completed. Some stuff I took care of last night should help.
14:29 dalek nqp-rx: 5b31d0a | pmichaud++ | src/HLL/ (2 files):
14:29 dalek nqp-rx: Replace decimal and binary digit strings with <decint> and <binint>.
14:29 dalek nqp-rx: review: http://github.com/perl6/nqp-rx/commit/5b31d0a53c43ee23ff2fecff3f1107a2f9e0ee63
14:29 dalek nqp-rx: 453c3b5 | pmichaud++ | src/stage0/ (3 files):
14:29 dalek nqp-rx: Update bootstrap with new decint/binint.
14:29 dalek nqp-rx: review: http://github.com/perl6/nqp-rx/commit/453c3b5249beb2c0b57ac8884cc8f5d755e3d31d
14:31 pugs_svn r29084 | carlin++ | [t/spec/S32-io] Remove/update some comments
14:50 dalek nqp-rx: 7b584c0 | pmichaud++ | src/ (2 files):
14:50 dalek nqp-rx: Remove spurious "=cut" lines to make Parrot's pod checker happier (mikehh++).
14:50 dalek nqp-rx: review: http://github.com/perl6/nqp-rx/commit/7b584c0aa58a81d3aeb563ec203277ac6186639d
14:50 pmichaud afk, kid soccer
14:51 payload joined #perl6
14:56 itz joined #perl6
14:57 itz ok I'm too hungover to read docs, so how do I pull the ng branch?
15:01 jnthn itz: If you've already pulled the Rakudo git repo, then it should just be something like git checkout ng or maybe git checkout origin/ng
15:04 itz hmmm I seem to be on it on .. tnx
15:08 zamolxes joined #perl6
15:13 Whiteknight joined #perl6
15:17 Psyche^ joined #perl6
15:21 colomon jnthn: do you have a thought on patching Rat.gcd to work with the current ng versus fixing ng so Rat.gcd works?
15:29 nihiliad joined #perl6
15:32 jnthn colomon: The issue seems to be that list assignment ain't done yet in ng
15:32 colomon jnthn: yes.
15:32 jnthn So probably not using list assignment will fix it.
15:32 colomon yes, I've already fixed it locally.
15:32 colomon my question is, should I check in the workaround or not?
15:32 jnthn Oh, I see.
15:33 jnthn You can check it in, but please put a comment on it saying that it's a workaround.
15:33 colomon I mean, in theory list assignment should work sometime in the next couple of days...
15:33 colomon should I include the word workaround?
15:33 jnthn Sure, but I guess this may make the difference between us being able to pass some tests and no?
15:33 colomon # ($a, $b) = ($b, $a) if ($b > $a);  # TODO: next block could be this if NG supported it
15:33 colomon jnthn: I dunno, rat.t doesn't work at all for me.
15:33 jnthn That's fine.
15:33 colomon I'm just doing rat tests by hand in the REPL.
15:34 jnthn colomon: Ah, OK. Any ideas why?
15:34 colomon one sec.
15:34 jnthn Maybe the test relies on things ng doesn't do yet.
15:34 lisppaste3 colomon pasted "mae t/spec/S32-num/rat.t" at http://paste.lisp.org/display/90384
15:35 colomon Ah, it actually says "number parsing" now, that's an improvement.
15:35 jnthn Ah, OK
15:36 jnthn I think pmichaud++ is working on that area today.
15:36 colomon yes.
15:36 colomon I'll push as soon as I can figure out how.  :)
15:38 colomon oh, done!
15:38 jnthn :-)
15:40 colomon Second try complained about master not being up to date, but pushed the ng patch anyway.
15:42 jnthn heh. git.
15:44 colomon I'm completely convinced that in a couple of years when I understand it better, git will be the greatest thing ever.  :)
15:44 pmurias joined #perl6
15:44 colomon Right now from my POV it's like awesome raw power "controlled" by shear chaos.
15:45 jnthn :-)
15:45 colomon oh wow, the test we're breaking on is a bad test now.
15:45 colomon ~(Rat.new(1,4)), ~(0.25)
15:46 colomon Thing is, that assumes that 0.25 is a Num.  And when pmichaud is done today, it will probably be a Rat.
15:49 jnthn oh, yes.
15:49 colomon I'm not really sure how to get around that.  maybe 1.Num / 4.Num?
15:50 colomon did Num.Str get written when I wasn't looking?
15:50 jnthn 0.25e0 or so?
15:50 colomon nope, it didn't.
15:50 colomon why the heck does that work?
15:51 colomon I mean, say 1.Num / 4.Num works, but say 1/4 doesn't.
15:51 Wolfman2000 colomon: Isn't 1/4 supposed to be a rational?
15:51 colomon Internally, (1/4).Num is 1.Num / 4.Num...
15:52 colomon Wolfman2000: it's a Rat, yes.  But Rat.Str is just implemented as self.Num.Str.
15:52 Wolfman2000 Fair enough
15:52 am0c joined #perl6
15:53 colomon jnthn: 0.25e0 is probably right, but doesn't actually work yet either.  :)
15:53 jnthn Aye
15:53 colomon looks like stringification must have some sort of special case handling of Num?
15:54 colomon that is, I can say 1.Num / 4.Num, but I can't say (1.Num / 4.Num).Str, which should be exactly the same thing.
15:54 colomon (or maybe say has special handling of Num?
15:54 colomon )
15:55 colomon Hah, more dodgy tests: there's a bunch of "mixed type math" tests that assume things like 3.5 are Nums.
15:57 jnthn I don't think say does anything more than .Str...
16:02 colomon Hmmm... think I'm going to give a quick once over on rat.t to make it smart about 3.5 as Rat.
16:02 colomon but do it in the master branch build.
16:03 jnthn OK, cool.
16:04 colomon do we agree 0.25e0 should be a Num?
16:04 jnthn Depends whether you think it should be. ;-)
16:04 jnthn I think it should. :-)
16:05 colomon I'll change the tests to use that, then.
16:05 colomon rakudo: say (0.25e0);
16:05 p6eval rakudo d04cce: 0.25␤
16:05 colomon rakudo: say (0.25e0).WHAT;
16:05 p6eval rakudo d04cce: Num()␤
16:11 colomon jnthn: I'll be driving back home soon, but tell pmichaud when he gets back from soccer that if he can get 0.25e0 (etc) to work, we can probably have rat.t fully working by tomorrow morning.
16:12 jnthn Excellent.
16:12 jnthn colomon++
16:12 jnthn Safe drive. :-)
16:14 Wolfman2000 phenny: tell pmichaud for jnthn to get 0.25e0 (etc) to work...something related to Rat and Num. If successful, rat.t will be fully working by the end of the weekend.
16:14 phenny Wolfman2000: I'll pass that on when pmichaud is around.
16:15 [particle]1 joined #perl6
16:15 payload1 joined #perl6
16:16 pugs_svn r29085 | colomon++ | [t/spec] Librarally sprinkle "e0" throughout the code to ensure that numbers that were intended to be Nums actually are Nums.
16:17 TopoMorto joined #perl6
16:22 pugs_svn r29086 | lwall++ | [gimme5] switch $<foo>= to not suppress binding of what follows
16:23 justatheory joined #perl6
16:24 iblechbot joined #perl6
16:27 Chillance joined #perl6
16:34 frew_ joined #perl6
16:35 pmichaud back
16:35 phenny pmichaud: 16:14Z <Wolfman2000> tell pmichaud for jnthn to get 0.25e0 (etc) to work...something related to Rat and Num. If successful, rat.t will be fully working by the end of the weekend.
16:36 cottoo jnthn, can you test a win32 patch in #parrot?
16:38 pmichaud 15:45 <colomon> ~(Rat.new(1,4)), ~(0.25)
16:38 pmichaud assuming that we reduce fractions, why wouldn't that be true anyway?  ;-)
16:39 itz I get a segfault with ng on FreeBSD 8
16:40 pmichaud (I somewhat disagree with r29085, fwiw)
16:42 jnthn oh hi
16:42 jnthn cotto: link?
16:43 cotto jnthn, http://nopaste.snit.ch/18685
16:43 jnthn cotto: k
16:43 cotto if t/pmc/filehandle.t passes, that's all that matters
16:43 cotto (assuming I don't 'splode the build)
16:45 jnthn pmichaud: The problem is that it's "trivially true" in that both are Rat...
16:46 pmichaud what's the purpose of the test?
16:46 jnthn pmichaud: Perhaps a better check would be ~(Rat.new(1,4)), "0.25"
16:46 pmichaud do rats stringify to decimals?
16:46 jnthn I was guessing so.
16:46 jnthn I mighta missed the point though.
16:47 pmichaud anyway, if that's the case, then yes, it would be better to explicitly check for the expected string value rather than a stringification of some other value
16:47 pmichaud I think rats stringify to decimals and perlify to rats
16:47 pmichaud either way, the e0 approach doesn't seem right ish.
16:47 jnthn Hm, yeah.
16:47 jnthn cotto: Applied patch, running make...
16:50 pmichaud I wonder if number:sym<rational>  should directly call the Rat constructor or if it should go through   &infix:</>
16:50 * pmichaud guesses the latter
16:50 jnthn ?
16:50 jnthn Nah, should just construct a Rat, surely?
16:50 pmichaud what if the num+den are "out of range"?
16:50 jnthn Why another level of indirection?
16:50 jnthn Won't that be a check in the Rat construction?
16:51 pmichaud perhaps, in which case it should throw an exception
16:51 pmichaud I'd be surprised if Rat.new gave me back a non-Rat, though.   &infix:</> doesn't have that issue
16:51 jnthn oh
16:51 jnthn it's not meant to fail?
16:51 jnthn :-/
16:51 pmichaud I'll go look
16:52 jnthn At some level, it's all kinda irrelevant at the moment in that AFAIK Parrot doesn't give us portable 64-bit integers...
16:52 pmichaud C<Rat>s that would require
16:52 pmichaud more than 64 bits of storage in either numerator or denominator are
16:52 pmichaud automatically converted to C<Num>s.
16:52 jnthn oh, we concert
16:52 jnthn meh
16:52 jnthn *convert
16:52 jnthn OK, guess it'll ahve to be infix:</> then. :-(
16:53 pmichaud ....that's what it was before anyway :-)
16:53 jnthn EDESIGNEDFORSLOWNESS
16:53 pmichaud oh, if we think that infix:</>  is going to be significantly slow as an operator, then we might as well give up now
16:53 pmichaud I mean,   3+4  calls infix:<+>
16:54 pmichaud we can also do a compile-time call to infix:</>, and then keep the result as a constant
16:54 jnthn Well, my point is more that rather than just constructing a Rat, we have to chekc if it's OK to construct a Rat, and if not do something else.
16:54 diakopter well, there's DLR on Mono.  if it does anything well, it specialized numeric operations for types... and is good/efficient at it.
16:55 jnthn Yeah, true.
16:55 jnthn I guess I should stop worrying about Parrot's invocation speed as a design consideration. :-)
16:55 pmichaud jnthn: (check if it's ok)  that *is* what the spec says, though.
16:55 jnthn pmichaud: I'm not disagreeing it's what the spec says, just over whether that's a good idea. :-)
16:55 pmichaud I'm pretty sure it's okay.  I don't think rat constants will be quite that common to worry about.
16:56 jnthn Yeah, true.
16:56 pmichaud and we can .once them
16:56 jnthn cotto: aww...fail
16:56 cotto well crud
16:56 jnthn cotto: http://gist.github.com/234639
16:56 pmichaud I'm still slightly more concerned with correct semantics than speed :)
16:56 cotto {{{ win32 }}}
16:57 cotto thanks
16:58 Wolfman2000 Hmm...STD.pm is a Perl 6 module primarily, yet I was able to build a Perl 5 compatible version. Seems that almost any time I try to use it, I am told of "Use of uninitialized value $DEBUG in bitwise and (&) at (file location)". Where/how do I set this debug, first of all?
17:00 lisppaste3 Wolfman2000 pasted "Simple test, yet...it failed." at http://paste.lisp.org/display/90385
17:01 diakopter Wolfman2000: would you nopaste the contents of that STD.pm you have there
17:01 Wolfman2000 diakopter: sure. hang on
17:02 seanstickle joined #perl6
17:02 diakopter b/c I'm curious how it's working at all in that path
17:02 pmurias diakopter: hi
17:02 seanstickle left #perl6
17:02 diakopter oh
17:02 Wolfman2000 argh...I can't seem to remember the terminal command to cat to clipboard
17:02 diakopter pmurias: howdy! :)
17:03 diakopter Wolfman2000: never mind
17:03 diakopter I see how that module does it
17:03 Wolfman2000 diakopter: while you prepare the next task for me, I have to do the next round of laundry
17:04 synth joined #perl6
17:04 diakopter Wolfman2000: well, I don't know; I use the STD.pm from the pugs repo
17:05 ktne joined #perl6
17:11 Wolfman2000 diakopter: back. I believe I also have the pugs repo, but...isn't THAT STD.pm more for...well, Perl 6 versus Perl 5?
17:11 diakopter they're both for the same purpose
17:12 pmurias Wolfman2000: STD is compiled to perl5
17:12 diakopter parsing Perl 6 source code using a Perl 5 module that happened to be compiled/generated/translated from STD.pm (written in Perl 6)
17:13 Wolfman2000 ...I could have thought I already did that compiling step. Hence, perl5/lib/perl5/STD.pm
17:13 diakopter right.
17:14 diakopter though here's one thing you missed:
17:14 diakopter 'You have to put "use STD;" before using this module.'
17:15 TimToady which actually pulls in STD.pmc
17:15 diakopter (from) http://search.cpan.org/~azawawi/Syntax-Highlight-Perl6-0.76/lib/Syntax/Highlight/Perl6.pm
17:15 Wolfman2000 diakopter: put that in...still get the same error
17:16 Wolfman2000 also: I originally HAD use STD; in the code in question before I loaded Syntax::Highlight::Perl6;
17:16 TimToady note also that the line number you get is really in STD.pmc, not STD.pm
17:16 lisppaste3 Wolfman2000 pasted "My STD us--hey, where'd the captcha go?" at http://paste.lisp.org/display/90388
17:17 TimToady STD.pm5 is the readable version of that
17:17 diakopter http://cpansearch.perl.org/src/AZAWAWI/Syntax-Highlight-Perl6-0.76/lib/
17:17 diakopter (doesn't have a STD.pm5)
17:17 TimToady that's probably getting pretty ancient
17:17 Wolfman2000 ...so who has the right version? azawawi or me?
17:18 TimToady if he bundled a STD, it has to be an old snapshot
17:18 Wolfman2000 ...well, of Syntax::Highlight::Perl6, we both have the same version.
17:18 Wolfman2000 ...oh: talking of STD.pm now
17:19 Wolfman2000 Well, STD.pm has been updated recently...guess I'll have to re-figure out how to "compile" it
17:20 araujo joined #perl6
17:20 TimToady why is there a literal \r\n\r\n in the file?
17:20 Wolfman2000 TimToady: pastebin. <textarea>
17:20 TimToady well, p6 can't parse that
17:21 TimToady the warning is unrelated to the parsefail
17:21 Wolfman2000 ...
17:21 Wolfman2000 so strip the \rs and I should have it?
17:21 TimToady there's some failure of understand of abstraction levels here...
17:21 TimToady *understanding
17:22 TimToady the problem is that after you take a text and turn CRLF into \r\n, it's no longer Perl 6
17:22 TimToady you should be parsing whatever you had before CRLF turned into \r\n
17:23 Wolfman2000 TimToady: That's difficult. The original lines: use v6;ENTERENTERsay "Hello World!";
17:23 TimToady that's why it's saying there's no 'r' subroutine
17:23 TimToady that's not Perl 6 either
17:23 Wolfman2000 This was entered in a <textarea>, and then stored in the database mostly verbatim
17:23 Wolfman2000 granted, it escaped the \"double quotes\", but that's easily fixible.
17:23 TimToady depending on what you mean by ENTER
17:24 Wolfman2000 TimToady: I entered a newline. HTML converted it to \r\n
17:24 TimToady do you mean the user typed ENTER?
17:24 Wolfman2000 yes
17:24 TimToady I don't understand "HTML converted"
17:25 TimToady then you need to make sure the text string ends up with a real newline in it at that point
17:25 TimToady not some meta-representation of it
17:25 Wolfman2000 TimToady: ...I was about to ask that.
17:25 TimToady P6 isn't going to guess when you're changing meta-levels
17:26 Wolfman2000 TimToady: Sounds like I need to s/\\r\\n/chr(13) . chr(10)/g (or however that regex will work)
17:26 TimToady some language processors like shells give the impression of guessing, but they're just confused, usually :)
17:26 __ash__ joined #perl6
17:26 TimToady that sounds too late to me
17:27 Wolfman2000 too late? Long as I catch it before it's sent to Syntax::Highlight::Perl6, it should be fine
17:27 TimToady something should be producing the CRLF earlier in the process, or be told not to translate to \\r\\n
17:27 TimToady argh, no, it's almost always wrong to try to undo what something earlier did wrong
17:28 TimToady information is lost
17:28 TimToady what if the program contains a real \r\n?
17:28 TimToady much better to fix it at the source
17:30 frew_ joined #perl6
17:32 Wolfman2000 TimToady: to confirm: when the person makes the paste, catch the error THEN.
17:36 TimToady you need to capture control someplace where whatever represents newline really represents newline, not just a meta-representation of newline
17:36 Wolfman2000 TimToady: new paste on the way.
17:37 lisppaste3 Wolfman2000 pasted "Result of Data::Dumper and SQL Insert. Not seeing \rs or \ns." at http://paste.lisp.org/display/90390
17:40 Wolfman2000 TimToady: if it also matters, SQLite put in the literal newlines, and not the meta representations
17:47 pmichaud $ ./perl6
17:47 pmichaud > say 0.25.WHAT
17:47 pmichaud Rat()
17:47 pmichaud > say 0.25.perl
17:47 pmichaud 1/4
17:47 lambdabot Not in scope: `say'Not in scope: data constructor `WHAT'
17:47 lambdabot Not in scope: `say'Not in scope: `perl'
17:47 pmichaud > say 5.25.perl
17:47 lambdabot Not in scope: `say'Not in scope: `perl'
17:47 pmichaud 21/4
17:47 pmichaud >
17:47 lambdabot not an expression: `'
17:47 pmichaud \o/
17:50 TimToady arguably, .perl could spit out 5.25 to mean a Rat
17:50 Wolfman2000 TimToady: I think I have a better idea of what's going on. My latest pastes inserted themselves seemingly correctly. When I tried to store the value into a perl variable, the newlines BECAME \r\n
17:50 pmichaud TimToady: what would we expect for (1/3).perl, then ?
17:50 TimToady 1/3 :)
17:51 Wolfman2000 rakudo: say (1/3).perl;
17:51 pmichaud that's a little too dwimmy for my tastes :)
17:51 p6eval rakudo d04cce: 1/3␤
17:51 Wolfman2000 rakudo does it
17:51 TimToady well, the question is what the user expects
17:51 TimToady it's certainly correct to return either 1/3 or 5.25 by current spec
17:51 pmichaud Wolfman2000: TimToady is suggesting that  (21/4).perl should perhaps output "5.25"
17:52 Wolfman2000 TimToady--: I have to disagree with you there.
17:52 pmichaud Wolfman2000: while (1/3).perl would output "1/3"
17:52 pmichaud anyway, both are technically correct according to current spec, yes.  :)
17:55 TimToady rakudo: say 3.14159265.perl
17:55 p6eval rakudo d04cce: 3.14159265␤
17:56 pmichaud $ ./perl6
17:56 pmichaud > say 3.14159265.perl
17:56 pmichaud 62831853/20000000
17:56 pmichaud >
17:56 lambdabot Not in scope: `say'Not in scope: `perl'
17:56 lambdabot not an expression: `'
17:56 TimToady I think 3.14159265 preserves understanding
17:56 TimToady though it could be argued the Rat preserves a different understanding :)
17:57 pmichaud so, what's the guideline for deciding when it perlifies to a rational vs a dec_number ?
17:58 TimToady well, obviously non-repeating is one criterion
17:58 payload joined #perl6
17:58 TimToady but there could be some kind of relative length criterion
17:58 pmichaud 21/4  and 5.25 have the same length :)
17:59 pmichaud but yes, I understand the point :)
17:59 TimToady it would be nice to figure out which denominators work and which ones don't without actually doing it
18:02 masak joined #perl6
18:02 * Wolfman2000 may have a new idea...better try it
18:03 Wolfman2000 TimToady: Perhaps my issue is that I'm trying to do all of the conversions at once. I'm going to see if I can instead split the lines by newline and parse individually.
18:09 Whiteknight joined #perl6
18:11 masak Wolfman2000: what do you mean by 'and parse individually'?
18:11 Wolfman2000 masak: interate line by line, separated by the literal newlines.
18:11 Wolfman2000 Can't seem to do it all in one gulp, so I'm breaking it apart.
18:11 masak Wolfman2000: yes, but iterate what? what is it you're doing line by line?
18:11 pmichaud phenny: tell colomon  dec_number  (1.23 and 1.05e+3)  is now implemented in ng branch.
18:11 phenny pmichaud: I'll pass that on when colomon is around.
18:12 Wolfman2000 masak: the paste
18:12 pmichaud a line-by-line parse doesn't seem likely to work.
18:12 masak that's what I was getting at.
18:12 pmichaud (assuming that the goal is to indeed parse the paste)
18:12 Wolfman2000 pmichaud: that goal is correct.
18:12 Wolfman2000 let me try this solution out: if I'm wrong, I'll paste it
18:13 pmichaud hugme tweet  rakudo-ng now correctly treats 1.23 as Rat
18:13 hugme pmichaud: Sorry, I don't have access to twitter account ''
18:13 pmichaud hugme tweet rakudoperl rakudo-ng now correctly treats 1.23 as Rat
18:13 * hugme hugs pmichaud; tweet delivered
18:15 Wolfman2000 ...GAH! Alright, I'll paste.
18:16 pmichaud time for lunch
18:16 lisppaste3 Wolfman2000 pasted "My failed attempts at using Syntax::Highlight::Perl6 with pastes inside the database. OY!" at http://paste.lisp.org/display/90395
18:17 masak Wolfman2000: the idea of highlighting line-by-line is doomed from the beginning.
18:17 masak Perl 6 simply isn't that context-free.
18:18 pmichaud .oO(I wonder if it would be possible to have an "ng:" entry on p6eval?  Or perhaps we'll be able to merge back to master soon enough that it won't matter.)
18:18 Wolfman2000 masak: Well, my idea of slurping the whole thing hasn't worked out either
18:18 masak Wolfman2000: why is that?
18:19 Wolfman2000 Somehow, the literal newlines aren't being respected when you place the database contents into $paste
18:19 Wolfman2000 my $txt = $row->content; From what I've seen, $txt usually convers \x13\x10 to \r\n
18:20 masak well, you'll have to fix that.
18:21 masak find out what's doing the escaping.
18:21 Wolfman2000 masak: the content is stored in the database correctly. It's DBIC that's doing this I think. So far, that room has not been helpful.
18:22 masak unfortunately, I have no clue either.
18:22 lisppaste3 Wolfman2000 pasted "My error message BTW." at http://paste.lisp.org/display/90396
18:26 TimToady I think I figured out how to identify denominators that would work well as decimals for .perl
18:26 TimToady it has to have only factors of 2 and 5
18:26 masak that sounds like it could make sense.
18:27 TimToady so basically you shift off all the low 0 bits, and if the remaining number is a power of 5, it works
18:27 TimToady basically, you're constructing a new denominator that is a power of 10
18:28 TimToady so you multiply excess 2's by 5 and excess 5's by 2
18:28 jeremiah1 joined #perl6
18:28 moritz_ re
18:28 TimToady once you have a power of 10, you can use its size to place a dot into the numerator
18:29 jeremiah1 Zip is not playing friendly.
18:29 TimToady so can probably be done without any division at all, I think, if you allow table lookup of powers of 5 and powers of 10
18:29 jeremiah1 I have pasted some code from perlcabal
18:29 masak moritz_! \o/
18:30 jeremiah1 And it says it cannot find zip.
18:30 jeremiah1 I wonder if that means I need a newer rakudo? hmmm.
18:30 moritz_ zip is not implemented in rakudo, only infix:<Z> is (iirc)
18:30 moritz_ rakudo: say zip [1, 2], [3, 4]
18:30 p6eval rakudo d04cce: Could not find non-existent sub zip␤in Main (file src/gen_setting.pm, line 324)␤
18:31 jeremiah1 okay
18:31 jeremiah1 thanks moritz_
18:31 masak is it because zip would use slices with semicolons in them as arguments?
18:32 moritz_ masak: yes
18:32 masak will ng give us that? :>
18:32 * masak believes the ng branch represents miraculous things
18:32 moritz_ masak: I think it's about the only thing it doesn't give us ;-)
18:32 * Wolfman2000 could use a miracle right now.
18:33 jeremiah1 Where can I get ng? =]
18:33 moritz_ unless the the capture/parcel thing brings it to us
18:33 TimToady which it might, if we ever converge on a spec
18:33 masak I still haven't mentally gotten used to Parcels.
18:33 TimToady they're just Captures that haven't been sorted into sheep and goats yet
18:33 masak nod.
18:34 jeremiah1 Goats? Sheep?
18:34 masak I know how they work, just haven't grokked why we need them just yet.
18:34 jeremiah1 I may be in the wrong channel . . .
18:34 jeremiah1 :)
18:34 masak jeremiah1: we also have monkeys and rats in Perl 6.
18:34 jeremiah1 Now THAT sounds more like it.
18:34 masak and a big boat, if it starts to rain.
18:35 TimToady it did just start to rain, and the forecast was for 'clear'
18:35 jeremiah1 Picture becoming clearer - metaphor taking shape.
18:35 masak TimToady: I'll keep the boat engine running, just in case.
18:35 TimToady one could imagine Perl 6 as a kind of arcology :)
18:35 * jeremiah1 groans
18:35 moritz_ my girlfriend suggested to introduce a Zoo ;-)
18:36 * moritz_ wonders if the KitchSink role also fits into the Zoo
18:36 TimToady so maybe we should have a KitchetSkink
18:36 moritz_ *KitchenSink
18:36 TimToady that too
18:36 masak moritz_: a KitchSink is just a tacky KitchenSink? :)
18:36 Wolfman2000 I thought the goal of Perl 6 was to have everything BUT the KitchenSink
18:37 masak Woody2143: too late. it's in STD.pm.
18:37 TimToady no, we have that too
18:37 jnthn std: KitchenSink
18:37 p6eval std 29086: ok 00:01 101m␤
18:37 masak std: KitchSink
18:37 TimToady std: KitchenSkink
18:37 p6eval std 29086: Undeclared name:␤     'KitchSink' used at line 1␤ok 00:01 99m␤
18:37 p6eval std 29086: Undeclared name:␤     'KitchenSkink' used at line 1␤ok 00:01 99m␤
18:37 jnthn oh noes, the sink had a leak!
18:37 masak std: CatchySkunk
18:37 TimToady Excess Flood!?!?
18:37 p6eval std 29086: Undeclared name:␤     'CatchySkunk' used at line 1␤ok 00:01 99m␤
18:37 jeremiah1 heh
18:38 dalek joined #perl6
18:38 diakopter alack, poor dalek
18:38 masak TimToady: it's yet another sign.
18:38 masak TimToady: I feel the level rising in this channel.
18:38 jeremiah1 I knew him well.
18:38 TimToady well, dalek is in .nl, so it'll be the first to go
18:38 masak *lol*
18:38 * moritz_ might have killed dalek with some commits :-)
18:39 * moritz_ just showed his girlfriend what a nice place #perl6 is
18:40 TimToady not sure if you can characterize horrible pun wars as "nice"....
18:41 masak .oO( signal-to-nice ratio )
18:41 TimToady .oO( single-to-nice ratio )
18:42 jeremiah1 That is marriage itself: Single to nice.
18:42 masak ah. that explains a lot. maybe I'd be much nicer if I had a girlfriend. :)
18:42 TimToady I don't know if we could stand it
18:42 jnthn ETOONICE
18:43 mathw Hello
18:43 TimToady alas, with Unix folks, niceness is a negative priority
18:43 masak "Apparently, the whole channel was appeased to death."
18:44 jnthn pmichaud: about?
18:44 masak mathw! \o/
18:44 mathw yo masak
18:44 jnthn hi mathw! :-)
18:44 jnthn How (i|wa)s London?
18:44 mathw Crowded
18:44 mathw I'm currently utilising the free wifi at st pancras
18:44 mathw my train isn't for another two hours
18:44 mathw but I've just dispatched my sister off to cambridge
18:44 jnthn Is that because it's delayed?
18:44 TimToady ah, good old st pancreas...
18:44 mathw and my feet hurt
18:45 jnthn ;-)
18:45 mathw no it's because I'm on an advance, one-train-only ticket
18:45 TimToady we stayed in a hotel about 2 blocks from there once
18:45 mathw on the other hand, it means I did Nottingham<->London first class for £28
18:45 TimToady for a whole week, so we got used to the look of that station
18:45 TimToady kinda
18:45 masak is there a St Spleen and St Liver too?
18:45 mathw TimToady: Was that before or after the big refurb and the arrival of the Eurostar?
18:46 mathw masak: No but there should be
18:46 masak St Appendix Vermiformis!
18:46 jnthn masak: That gives me horrible memories of someone who dressed up as St Pancreas station at fancy dress once, back in my uni days...
18:46 mathw jnthn: rofl!
18:47 masak jnthn: I have no trouble imagining that as 'horrible' :)
18:47 * mathw starts a campaign to rename Stratford International to St Medulla Oblongata in time for the 2012 Olympics
18:47 mathw Sorry, St Medulla Oblongata International
18:47 masak :)
18:47 TimToady mathw: we were there ~6 years ago, I think
18:48 mathw that would be while the Eurostar was still at Waterloo then
18:48 * jnthn rode the Eurostar on the day after it had moved to St Pancras.
18:49 jnthn Given I was arriving from the north into KX, I was rather glad that I had a five minute walk arather than a 45 minute tube ride...
18:49 mathw yes
18:49 mathw it's convenient for me, as the nottingham trains arrive at StP too
18:49 mathw although I haven't used the Eurostar for years
18:49 mathw and my passport's expired
18:50 jnthn Heh. :-)
18:51 jnthn .oO( If my passport were to expire right now, I'd have to get a new one before I could get back into England. However, I could visit most of continental Europe just fine. )
18:51 mathw and I'm not sure how much longer I'm going to be in nottingham
18:51 jeremiah1 oh noes - Unable to locate parrot_config
18:51 jeremiah1 Just installed the parrot package on debian
18:51 jnthn jeremiah1: OH NOES!
18:51 mathw jnthn: yeah, crazy isn't it. We really need to sign up to Schengen
18:51 jeremiah1 But rakudo cannot find it. :(
18:51 jeremiah1 jnthn: Hi!
18:51 mathw jeremiah1: nooooooooooooooo
18:51 jeremiah1 I'll see you next weekend in Riga :)
18:52 jnthn jeremiah1: oh hi, you the...yes, you are.
18:52 jnthn Awesome.
18:52 jeremiah1 mathw: Have I done something horribly wrong?
18:52 * jnthn wanted to make sure he said "see you in Riga" to the corret Jeremiah. :-)
18:52 masak jeremiah1: hi. I don't believe we've met, but see you in Riga. :)
18:52 jeremiah1 THere are others?
18:52 mathw jeremiah1: I don't know, I was just comiserating. I'm in no fit state to help you at the moment I'm afraid.
18:53 jeremiah1 masak: We meet quickly at NPW :)
18:53 jeremiah1 But not formally,.
18:53 masak ok :)
18:53 TimToady obviously if there's a jeremiah1 there's a jeremiah0...
18:53 jeremiah1 mathw: :)
18:53 jnthn jeremiah1: Riga is like, so getting invaded by (Swedish|people living in Sweden) next week.
18:53 jeremiah1 I thought jeremiah0 was me when I was not lazy and registered my nick.
18:53 jeremiah1 jnthn: Dude, totally. :)
18:53 jeremiah1 And perl 6ers
18:54 jnthn \o/
18:54 * mathw wishes slow station announcement man would get to the point
18:54 jeremiah1 I'm taking the ferry from Stockholm to Riga.
18:54 jeremiah1 Should be fun
18:54 TimToady last I checked, there were 137 Larry Walls in the U.S. and two of them were me.
18:54 jeremiah1 TimToady: So you must get his mail.
18:54 TimToady only about half the time
18:54 jeremiah1 :P
18:55 mathw TimToady: two of them?
18:55 mathw 137 out of whatever the current US population is makes that a pretty rare name, I'd say
18:55 jnthn mathw: Is it actually a real person, or automated? :-)
18:55 mathw jnthn: real person
18:55 jnthn mathw: Ah.
18:55 jnthn mathw: Some statioins go in for automation, it seems.
18:56 mathw jnthn: st pancras international, oddly, has no automated announcements
18:56 mathw there are no announcements of train departures
18:56 mathw you have to watch the screens
18:56 jnthn mathw: Leading to such wonderous announcements as "We're sorry to report that the 17:37 train will depart 20 minutes late late because...it has been delayed."
18:56 mathw they only announce like they did just now that something exceptional has occurred
18:56 jnthn erm, without the dupe late...but still...
18:56 mathw jnthn: don't forget "East Midlands Trains apologises for any inconvenience caused"
18:57 Wolfman2000 masak: ......I found the error.
18:57 masak Wolfman2000++
19:03 masak sometimes you look at the output of a MegaHAL bot, and you just know they've been spending too much time in the wrong circles.
19:03 TimToady I'm sorry, masak.
19:04 masak TimToady: I didn't mean you in particular, TimToadybot. :)
19:04 masak but I found this Twitter user who's a MegaHAL bot.
19:05 masak I found it because it said "Perl 6 excites my man-loving gene.", which triggered my live "Perl 6" search.
19:05 jeremiah1 Talking to that TimToadybot is like talking to a wall.
19:05 masak jeremiah1: :)
19:05 jeremiah1 :)
19:06 colomon joined #perl6
19:06 masak that bot also says things like "Don't even think anarchism is a crab slut.", "Zen and the desperate need to find a way to think too hard.", and "It's great how Fox News reports it straight, fair and balanced."
19:06 masak (those are the nicer things it says, by the way)
19:07 masak indecent MegaHAL bot, you just got another follower on Twitter. :)
19:08 Wolfman2000 masak: the error I was making was a silly one. I was always selecting the first post. The post that had...the initial \r\ns placed manually.
19:08 masak Wolfman2000: there you go :)
19:09 Wolfman2000 Now...how can I squelch this warning with my STD.pm? Use of uninitialized value $DEBUG in bitwise and (&) at FILE
19:10 Wolfman2000 I'm getting tired of seeing that on the command line: I have to keep my debug stuff open
19:11 moritz_ define $DEBUG?
19:12 colomon_ joined #perl6
19:12 quietfanatic My guess, from that error message, is that it's supposed to be $DEBUG && do_something, but the && turned into & for some reason.
19:12 Wolfman2000 moritz_: if I knew what value to give it
19:13 Wolfman2000 quietfanatic: My STD.pm is not the most updated right now
19:13 quietfanatic because $DEBUG && do_something is probably common
19:13 moritz_ Wolfman2000: I'd try it with 0
19:13 Wolfman2000 But I don't recall how to compile the version
19:13 quietfanatic that do_something is probably warn() in fact
19:14 masak "Maybe it's about sexual liberation and not Perl & Python." - Yet another reason to rename it Perl Sex, then.
19:14 Wolfman2000 moritz_: $DEBUG = 0 does not work for the code
19:14 Wolfman2000 I'm still warned
19:14 snearch_ joined #perl6
19:14 snearch_ left #perl6
19:14 jnthn masak: Isn't it "Perl Sex" in Swedish anyway? ;-)
19:15 masak jnthn: yes, but we've always been progressive in that respect in Sweden.
19:15 masak or so I've heard.
19:15 snearch joined #perl6
19:15 quietfanatic What does the offending line look like in STD.pmc?
19:16 colomon pmichaud: just caught up with your comments on the rat tests.
19:16 phenny colomon: 18:11Z <pmichaud> tell colomon  dec_number  (1.23 and 1.05e+3)  is now implemented in ng branch.
19:16 colomon \o/
19:17 colomon I was hoping I'd discover that when I got home.  :)
19:17 jeremiah1 masak: Is Squerl only on GitHub?
19:17 masak jeremiah1: as opposed to what? CPAN?
19:17 jeremiah1 Yes
19:17 masak jeremiah1: then yes, it's only on github.
19:18 jeremiah1 Or rather, where should I be looking? :)
19:18 jeremiah1 GitHub it is.
19:18 chromatic joined #perl6
19:18 jeremiah1 Thanks
19:18 masak Web.pm (of which Squerl is currently a part) hasn't been released to CPAN... yet.
19:18 jeremiah1 Squerl.org was amuzing.
19:18 jeremiah1 I mean amusing.
19:18 masak heh. I have nothing to do with that one :)
19:19 jeremiah1 I figgured
19:19 colomon pmichaud: the tests were originally set up to verify that Rats stringified like the equivalent Nums, without  forcing Nums to stringify a particular way.
19:19 fridim_ joined #perl6
19:21 jnthn (squerl.org)++
19:29 colomon or perhaps rat.t will fail for no apparent reason.  :(
19:30 colomon plan * not implemented yet?
19:31 colomon okay, plan 60 (arbitrarily chosen) gets it going again.
19:32 moritz_ .oO( plan 9 is implemented, but plan * isn't? ;-)
19:32 moritz_ colomon: what aobut no plan at all, but done_testing() at the end?
19:33 colomon moritz_: hard to say, since test three bombs out.  :)
19:34 colomon So, test three needs Int.Rat.  I uncommented Int.Rat in Int.pm, but seems like Int.pm doesn't recognize Rat.  Suggestions?
19:34 colomon I could just move the definition to Rat.pm, I suppose...
19:35 Wolfman2000 masak, others: http://i37.tinypic.com/30tjja1.png FINALLY got something here!
19:35 masak Wolfman2000: cool!
19:36 Wolfman2000 The fun part will be coming now: will an improper syntax break, or be caught in my exception code?
19:36 moritz_ colomon: you can the order of the .pm files in Make (grep for CORE_SOURCES =)
19:36 colomon But Rat depends on Int, of course...
19:36 moritz_ colomon: if Int doesn't know about Rat, it must be forward declared
19:37 colomon oh, will that work here?
19:37 moritz_ class Rat { }; class Int { ... }; augment class Rat { ... }
19:37 moritz_ probably not with stubbing yet, but with augment
19:37 dalek rakudo: 7347ec0 | masak++ | src/parser/actions.pm:
19:37 dalek rakudo: [parser/actions.pm] aligned documentation with code
19:37 dalek rakudo: s/or/and/; The code has a && in the corresponding place, which makes much
19:37 dalek rakudo: more sense.
19:37 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/7347ec030170234343a191d80191ae68f846a81d
19:39 TimToady std: class R {...}; class I { }; class R {}
19:39 p6eval std 29086: [31m===[0mSORRY![31m===[0m␤Illegal redeclaration of symbol 'GLOBAL::<R>' (from line 1) at /tmp/VR6y9iXbQL line 1:␤------> [32mclass R {...}; class I { }; class R[33m⏏[31m {}[0m␤FAILED 00:01 101m␤
19:39 TimToady hmm, thought I fixed that one
19:39 * moritz_ thinks TimToady needs regression tests for STD.pm
19:39 TimToady std: my class R {...}; my class I { }; my class R {}
19:39 p6eval std 29086: [31m===[0mSORRY![31m===[0m␤Illegal redeclaration of symbol 'R' (from line 1) at /tmp/ubT7FNW7nd line 1:␤------> [32mlass R {...}; my class I { }; my class R[33m⏏[31m {}[0m␤FAILED 00:01 100m␤
19:40 TimToady I use the whole test suite for regression tests :)
19:40 moritz_ that does tell us a bit about missing tests ;-)
19:40 moritz_ I think we have such tests inside eval
19:41 TimToady std: sub foo {...}; sub foo {}
19:41 p6eval std 29086: [31m===[0mSORRY![31m===[0m␤Illegal redeclaration of routine 'foo' (from line 1) at /tmp/b26aau4LmO line 1:␤------> [32msub foo {...}; sub foo[33m⏏[31m {}[0m␤    expecting new name to be defined␤FAILED 00:01 100m␤
19:41 TimToady huh
19:42 moritz_ is bitwise negation of floats allowed?
19:42 zaslon lolmasakhazblogged! masak++ 'November 14 2009 -- it's a slightly smaller step for a man': http://use.perl.org/~masak/journal/39898?from=rss
19:43 moritz_ perl6: say +^ -1
19:43 p6eval pugs, rakudo d04cce: 0␤
19:43 p6eval ..elf 29086: Undefined subroutine &GLOBAL::prefix__43_94 called at (eval 123) line 3.␤ at ./elf_h line 5881␤
19:43 TimToady I think +^ probably implies coercion to Int
19:44 moritz_ TimToady: thanks, good answer ;-)
19:44 moritz_ it means that S03-operators/bit.t is not as bad as I thought
19:47 pugs_svn r29087 | moritz++ | [t/spec] test for RT #70415, split() should return real strings
19:47 pugs_svn r29088 | moritz++ | [t/spec] move tests for RT #67852 to integration/real-strings.t
19:53 masak 'night, #perl6.
19:57 Tene ENOMOREMASAK
20:06 mberends :)  # Tene: we have a continuation for masak
20:07 Tene Wait, so what happens if I invoke masak's continuation a dozen times?  Do we get a dozen masaks?
20:08 mberends Yes, the trick is to get each one to do something different.
20:09 jnthn .oO( multi masak { ... } )
20:14 Wolfman2000 moritz_: How will Perl6 handle datetimes anyway?
20:15 mberends Wolfman2000: http://perlcabal.org/syn/S32/Temporal.html
20:18 mberends Wolfman2000: with a lot of background from the Perl 5 DateTime: http://search.cpan.org/~drolsky/DateTime-0.51/lib/DateTime.pm
20:19 Wolfman2000 mberends: ...yeah, I'm using DateTime right now for the pastebin
20:19 Wolfman2000 at least I'm getting closer to finishing this darn thing.
20:19 mberends :)
20:30 oZ] joined #perl6
20:43 colomon Oh ack, our Num.Rat depends heavily on list assignment (NYI in ng).
20:43 jnthn colomon: Ah. Ouch.
20:43 jnthn colomon: I think it's on the "do soon" list though. :-)
20:43 colomon :)
20:44 colomon Just trying to sprint and see how far I can get here.  :)
20:45 jnthn :-D
20:45 jnthn colomon++
20:45 colomon You know: fix test 3.  skip test 4.  then test 5 breaks.  :)
20:46 colomon Rat.new (no arguments) doesn't work anymore: No applicable candidates found to dispatch to for 'new'
20:46 colomon Rat.new(1,4) does work.
20:47 jnthn That's odd...
20:48 colomon It would be trivial to implement, but I thought it was automatic?
20:49 pmichaud back again
20:49 colomon \o
20:49 jnthn colomon: is Rat.new marked multi?
20:49 colomon Thanks for the number parsing work.
20:49 jnthn wb pmichaud
20:49 colomon jnthn: yes
20:49 pmichaud jnthn: difficult to implement class stubs?
20:50 jnthn pmichaud: prob not.
20:50 jnthn colomon: that's...odd...then.
20:50 pmichaud might help with the Rat/Int/Num ordering
20:50 jnthn pmichaud: Heh. I thought that might be where you were going.
20:50 colomon I've already checked in the simple workaround of just putting Int.Rat in Rat.pm.
20:50 jnthn I was thinking jsut yesterday, "hmm...class stubs would solve this problem..."
20:50 pmichaud well, in the meantime I don't have any problem with putting some of Int's methods into the Rat.pm file
20:50 pmichaud colomon++
20:51 jnthn I can do class stubs Monday at latest.
20:51 jnthn Perhaps tomorrow.
20:51 colomon Num.Rat hung up over list assignment, non-trivial to sort it out.
20:52 pmichaud I'll work on list assignment later today then
20:52 pmichaud I worked on it a bit last night, but decided I needed a bit more thinking on it first
20:53 colomon don't let me rush you, either.
20:53 jnthn I thought long enough to know to leave it to pmichaud++ :-)
20:54 colomon no eval yet in ng, I see...
20:55 colomon Nor Num.Str.  Any idea what it would take to implement that?
20:55 pmichaud eval?  or Num.Str ?
20:56 colomon Num.Str would be more short-term useful, and probably easier, I'm guessing.
20:56 colomon (Num.Str was what I was asking about.)
20:56 pmichaud seems like Num.Str ought to be super-simple to implement
20:56 pmichaud why not whatever version was in master ?
20:57 colomon I assumed it was some deep PIR thing and didn't look for it.
20:57 colomon Doh!
20:57 jnthn It may ahve been PIR before, but probably need not be.
20:58 colomon ~self
20:58 jnthn :D
20:58 pmichaud that's wrong.
20:58 colomon is the implementation.
20:58 colomon oh wait, that's Num.perl
20:58 colomon and also Num.Str
20:58 pmichaud we can cheat it that way for now, but in general I think that operators should be defined in terms of methods, not vice-versa
20:58 jnthn yeah
20:58 colomon the question is, is ~Num implemented yet?
20:58 jnthn method Str { pir::set__SP(self) } # is what I was pondering
20:59 colomon ~Num is implemented.
20:59 pmichaud jnthn +1
20:59 colomon That's why "say Num" works, but say Rat.Num.Str doesn't.
20:59 Eevee joined #perl6
21:00 colomon Also, we don't have a Num.pm in ng yet, I don't think?
21:00 pmichaud that's just because say currently goes through Parrot's stringify interface
21:00 pmichaud say doesn't use prefix:<~>
21:00 colomon ah, okay.
21:00 jnthn colomon: say Num and say (instance of Num) are different.
21:00 colomon or .Str?
21:00 jnthn (type objects stringify differently)
21:00 pmichaud at the moment say just goes through Parrot's stringify interface.  I'm not sure what the ultimate result will be.
21:00 colomon jnthn: I know, just using say Num as shorthand here.  (either that, or I totally don't get your comment.)
21:01 jnthn colomon: ah, ok
21:01 colomon It was driving me crazy that "say 1.Num" would work, but "say 1.Num.Str" wouldn't.
21:02 colomon Any objection to going with Num.Str() { ~self } for the moment?  And if so, where does it go?
21:02 pmichaud Num.pm
21:02 pmichaud actually,
21:02 pmichaud src/cheats/num-str.pm
21:02 pmichaud we're trying to put our various cheats into the src/cheats directory
21:03 pmichaud you can just do src/cheats/num.pm if we think we'll have more num-based-cheats
21:03 moritz_ phenny: tell KyleHa re kh-1, I'm pretty sure that Bool::True.name should return 'True'; S12:1762 defines Bool to be an enum, and S12:1649 says .name returns the short name
21:03 phenny moritz_: I'll pass that on when KyleHa is around.
21:04 moritz_ did I read the backscroll correctly, and we have rakuo-ng reporting from dalek now?
21:04 pmichaud I haven't seen that.
21:04 colomon me neither.
21:04 pmichaud although I was wondering if it would be a huge pain to have ng in p6eval
21:04 moritz_ I've probably confused it with nqp-rx
21:05 moritz_ pmichaud: not a huge pain, just work ;-)
21:05 pmichaud well, I think the merge is likely to be at least >7 days away, and a lot of people could be p6eval-testing it
21:06 pmichaud but since I'm not doing the work, it's just a suggestion/idea :)
21:07 moritz_ I guess I'll a do it a bit less elaborate than mainline rakudo, which has two alternating parrot installs to guarntuee minimal downtime while rebuilding
21:07 colomon where do I add src/cheats/num.pm so it gets compiled properly?
21:08 pmichaud build/Makefile.in
21:08 oZ] left #perl6
21:08 pmichaud see the example for traits-export.pm  (or something like that)
21:08 pmichaud yeah, same as trait-export.pm
21:09 colomon that did something, anyway...
21:09 pmichaud dont forget to use Configure.pl to rebuild the makefil e:)
21:09 colomon :)
21:10 colomon looks good!
21:12 colomon The Rat stringification tests (which rely on Num.Str extensively) now work.  :)
21:13 colomon pushed.
21:14 colomon Does "dies_ok" currently work?
21:14 jnthn colomon: If a whole test file passes, uncomment it in spectest.data :-)
21:14 jnthn colomon: I'm not sure - there was some odd issue with "defined" last time I looked...
21:14 colomon jnthn: not even close to a whole test file yet.  :)
21:14 jnthn Aww!
21:17 nihiliad joined #perl6
21:18 colomon Huh.  infix:<+> doesn't work for Rats.
21:19 jnthn colomon: When called from within the setting?
21:19 colomon infix:<+> called from rat.t.
21:19 colomon it complains about Rat.new.
21:20 colomon No applicable candidates found to dispatch to for 'new'
21:20 jnthn ah, that...
21:20 jnthn You *may* have run into a nasty dispatch problem that I discovered yesterday.
21:21 jnthn In fact, quite likely - I was chasing the same kinda error. :-(
21:21 colomon Actually, problem seems to be that Int math is returning a Num.
21:22 c9s joined #perl6
21:26 colomon Huh.  $a.denominator * $b.denominator is coming out Num, even though both of those are Int.
21:26 c9s joined #perl6
21:27 colomon doesn't seem to happen in the REPL?
21:27 c9s joined #perl6
21:27 jnthn colomon: right
21:27 jnthn colomon: It's certainly the dispatch bug then.
21:28 jnthn Parrot mis-applies an optimization, and in doing so circumvents the multi-dispatcher.
21:28 jnthn Unfortunately, much as I'd like to rip out said optimziation, people have come to rely on the bug. :-(
21:30 pmichaud "mis-applies an optimization"  -- that really depends on perspective.
21:30 pmichaud there's nothing that says that find_name semantics have priority.
21:31 pmichaud is there an &infix:<*>(Int, Int)  yet?
21:31 pmichaud ah, there is.
21:32 jnthn pmichaud: Well, there's nothing that says otherwise either. :-)
21:32 pmichaud except tradition and history :)
21:32 jnthn But taking that view, that suggests it's up to us to generate different code.
21:33 jnthn (or get a behavior-changing pragma added)
21:33 pmichaud or that imcc should provid.... right
21:33 pmichaud should I go ahead and add the flag to past?  or should we add :multi to our subs?
21:33 pmichaud I'd hate for us to block on this for a long time.
21:33 jnthn I'm pretty sure that adding :multi to our subs will break other things.
21:34 pmichaud why is that?
21:34 frew_ joined #perl6
21:34 pmichaud if you're already doing :anon, it won't go in the namespace
21:34 jnthn oh, true...
21:34 pmichaud and :multi tells imcc not to optimize it
21:34 jnthn So that means it'd ignore the :multi completely? Or?
21:34 jnthn (Other than for saying "don't optimzie it"?)
21:34 pmichaud I dunno.  I just know that :multi doesn't participate in the optimization
21:35 pmichaud (because for obvious reasons it can't)
21:35 jnthn Right, I'm just not sure how :multi and :anon play together.
21:35 jnthn If we aren't ending up somewhere building a Parrot MultiSub, then we're fine.
21:35 pmichaud I think we might end up building Parrot MultiSubs and throwing them away as unbound
21:36 pmichaud but that might be an acceptable interim that is preferable to a past flag
21:36 jnthn That'd be a tad inefficient, but if it works fine as a fix for now, it's fine by me.
21:37 jnthn And I'm really not sure a PAST flag is a good idea. :-)
21:37 pmichaud I'd give it a try until we have some idea what Parrot is likely to do
21:37 pmichaud actually.....
21:37 pugs_svn r29089 | moritz++ | [evalbot] first shot at ng
21:37 pmichaud come to think of it, I wouldn't do it as a flag
21:37 pmichaud I'd do it as a new :pasttype
21:37 pmichaud 'callbyname'
21:37 pmichaud instead of 'call
21:37 pmichaud '
21:38 jnthn I think both may be wrong.
21:38 pmichaud I don't see a problem with adding a new pasttype for it, though.
21:38 jnthn Call by name just feels like an odd name for it.
21:39 pmichaud I'm open for other suggestions
21:39 jnthn I mean, if we do this, we probably should be defining these in terms of the scope we look in to find the thingy.
21:39 pmichaud or, it could be a flag.
21:39 pmichaud we might need 'tailcall' versions at some point
21:39 jnthn In many ways, :name('foo'), :pasttype('call') is a convenience.
21:40 jnthn For PAST::Op.new( :pasttype('call'), PAST::Var(...look up foo in the right place...) )
21:41 jnthn Thing is, while we have "lexical" and "package" scopes for vars, we don't have a "find_name" equivalent.
21:41 pmichaud sure, with the advantage(?)  that the convenience also offers some possible optimization hooks
21:41 pmichaud where if we explicitly use PAST::Var, those hooks are less obvious.
21:41 jnthn Well, maybe the answer is that :name(...) is what you use when that optimization is allowable.
21:41 pmichaud that's possible, yes.
21:41 jnthn And if you don't want said opt you write a PAST::Var node in there.
21:41 pmichaud we do have a find_name equivalent
21:41 jnthn Oh?
21:42 pmichaud PAST::Op.new( :pirop('find_sub_not_null'), 'foo')
21:42 pmichaud it doesn't deserve to be a PAST::Var, because you can't store to it.
21:42 jnthn Hm
21:42 jnthn Perhaps, yeah.
21:42 pmichaud same for :pirop('find_name')
21:42 jnthn Aye.
21:42 eternaleye joined #perl6
21:43 jnthn Well, technically you could store to something that you look up in that way, Parrot just doesn't have an op for doing a store with the same lookup semantics as find_name.
21:43 pmichaud btw, I'm thinking that for consistency I might have :pirop('opcode sig')  accept the double-underscore form as well  (:pirop('opcode__sig'))
21:43 jnthn Yeah, I'd prefer only one form.
21:43 pmichaud if you store to something you look up that way, you'd have to know what kind of thing you found
21:44 pmichaud and yes, it's possible to have a store_name opcode.... I just don't know how likely it is
21:44 eternaleye Is there any particular reason that all Junction types have infix constructors _except_ 'none'? Would infix:<!> complicate the grammar somehow?
21:44 moritz_ evalbot control restart
21:44 p6eval joined #perl6
21:45 moritz_ ng: say 'hi';
21:45 p6eval ng 7347ec: hi␤
21:45 jnthn evalbot control yourself
21:45 jnthn ;-)
21:45 jnthn moritz_: Yay! :-)
21:45 pmichaud ng:  say 0.25.perl;
21:45 p6eval ng 7347ec: 0.25␤
21:45 pmichaud hmmmm
21:45 moritz_ don't know yet if the crontab for the rebuild works
21:45 pmichaud ng:  say 0.25.WHAT;
21:45 p6eval ng 7347ec: Num()␤
21:45 moritz_ will find out tomorrow if you keep comitting stuff ;-)
21:45 pmichaud that doesn't look like the ng branch to me.
21:46 moritz_ oh
21:46 * moritz_ fail
21:46 pmichaud eternaleye: there's been off-and-on discussion about creating an infix constructor for none junctions, but nobody's come up with a real need or use case for them outside of filling up a slot
21:47 pmichaud infix:<!>  would mean not really having a postfix:<!> for factorial, though :-)
21:47 pmichaud and we also have the case that ! is a meta-infix op
21:47 eternaleye ng: multi infix:<!> is :assoc<chain>( *@eigenvalues --> Junction ) { return( none( @eigenvalues ) ); }; say (3 ! 2 ! 1).WHAT
21:47 p6eval ng 7347ec: Malformed routine definition at line 2, near "infix:<!> "␤in Main (file <unknown>, line <unknown>)␤
21:48 pmichaud ng doesn't do operator overloading yet.
21:48 pmichaud sorry, rephrase
21:48 pmichaud ng doesn't understand custom operator definitions yet
21:48 pmichaud (it'll overload existing operators just fine)
21:49 eternaleye pmichaud: Also, how would it block postfix:<!>? <term><postfix><term> is a parsefail, whereas <term><infix> is also a parsefail - no intersection
21:49 pmichaud eternaleye: you're assuming backtracking, I think.
21:50 eternaleye Maybe
21:50 pmichaud but in general infix and postfix occur in operator position, so one has to be careful with collisions there.
21:50 eternaleye Heh, maybe use ¡
21:52 pmichaud or ⊥
21:52 jnthn or nor
21:53 colomon pmichaud++  # just realized that (0.25).WHAT is Rat in ng now!  \o/
21:53 eternaleye Ooh, I like nor
21:53 jnthn Well
21:53 jnthn It really wants a prefix neither too is the problem. :-)
21:53 jnthn neither 1 nor 2 nor 3
21:53 jnthn :-)
21:53 eternaleye heh
21:53 jnthn Which is no better than none(1,2,3) :-)
21:53 pmichaud and at some point it's just easier to say  none(1,2,3)   than  "1 nor 2 nor 3"
21:53 eternaleye Although, nor fits the pattern of code-branching better than junction construction
21:54 jnthn Yeah, like, already after you typed nor twice. :-)
21:54 eternaleye and, or, etc
21:54 jnthn yeah
21:56 pmichaud ooooh
21:56 pmichaud we've sometimes talked about a when't  feature
21:56 pmichaud maybe that's really   when none(...)
21:57 pmichaud i.e.,     when none(Int)    # anything but an Int
21:57 kidd_ joined #perl6
21:58 pmichaud afk for a short bit
22:06 astrojp joined #perl6
22:09 hcchien joined #perl6
22:14 chromatic jnthn, fixing your bug yesterday means fixing a lot of things in PGE.
22:14 jnthn chromatic: Yeah. pmichaud feared it may be that way, I think.
22:15 jnthn chromatic: I guess too much code that exists relies on being able to call anonymous subs that way :-(
22:15 alester joined #perl6
22:15 chromatic In particular, PIR tests check explicitly that .const can find subs by name even when declared :anon.
22:16 jnthn I think .const is meant to go by subid anyway (which just defaults to name), so that isn't a problem - that's the "right way" in many senses.
22:16 hcchien joined #perl6
22:16 jnthn Ah, or was your point that .const and "foo" go through the same mechanism?
22:16 jnthn erm, "foo"()
22:17 jnthn for even foo()
22:17 chromatic They go through the same mechanism.
22:17 jnthn Ah, OK.
22:17 jnthn That makes it a bit tricker then. :-(
22:17 chromatic I *may* be able to disambiguate on the const case, but that's definitely trickier.
22:17 jnthn Yeah.
22:17 jnthn We can probably do code-gen differently to avoid the issue.
22:18 jnthn Maybe it's one to re-visit in pirc.
22:18 chromatic It should be much easier in pirc, but I'll keep thinking about it.
22:19 jnthn I hadn't quite appreciated how this form was used purposefully to call anonymous subs. If PGE does it, though, then I'm sure plenty of other code out there does too.
22:19 jnthn And the .const form really should always work - I hadn't appreciated they were tied either.
22:19 jnthn Anyway, thanks for looking into it.
22:20 jnthn My question was going to be "is it possible to add a pragma to disable the optimization", but if it breaks .const lookups of anonymous subs, it'd be unusable for us too.
22:21 * jnthn afk for a little bit
22:23 lichtkind joined #perl6
22:27 jeremiah1 chromatic: I am planning to talk about 'modern perl' at the Baltic perl workshop http://event.perl.lv/baltic2009/
22:27 chromatic I saw that; very nice.
22:27 jeremiah1 I have some things in my head already, but is there anything you think I should say?
22:27 jeremiah1 I mean, anything that I shouldn't miss or that i should emphasize?
22:28 chromatic The next time I give my talk, I'll emphasize these: http://www.modernperlbooks.com/mt/2009/06/take-advantage-of-modern-perl-links-from-the-yapc-talk.html
22:29 chromatic ... as well as Try::Tiny, Sub::Call::Tail, and more on local::lib.
22:29 jeremiah1 Ah, cool. I'll read that now. :)
22:29 jeremiah1 local::lib is really great - I was planning to talk about htat
22:31 jeremiah1 Oh wow. Tons of great stuff at those links. Thanks.
22:38 oZ] joined #perl6
22:44 NorwayGeek joined #perl6
23:31 zaslon lolpmichaudhazblogged! pmichaud++ 'Failure()<0xb6bb09e0>': Failure()<0xb6ba3678>
23:35 zaslon lolpmichaudhazblogged! pmichaud++ 'The Rakudo-ng branch': http://use.perl.org/~pmichaud/journal/39874?from=rss
23:47 rgrau joined #perl6
23:49 seanstickle joined #perl6

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

Perl 6 | Reference Documentation | Rakudo