Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2009-10-02

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 TimToady transit gloria [sic] &
00:02 nihiliad joined #perl6
00:13 quietfanatic Is there a way to concatenate two functions, like Haskell's >> operator?
00:13 diakopter wrap ?
00:14 quietfanatic I know sub {&sub1; &sub2} works, but if you do that a lot of times, you get a lot of depth.
00:15 quietfanatic Wrap? Maybe, depending on how it's implemented.  But I don't think that's what I'm looking for.
00:15 quietfanatic For one thing, wrap modifies in place
00:15 diakopter o
00:16 Tene rakudo: sub foo { say 'hi' }; my @a; @a.push(&foo); say 'omg'; .() for @a;
00:16 p6eval rakudo 6c4bab: OUTPUT«omg␤hi␤»
00:16 Tene you could do that.
00:16 Tene quietfanatic: can you give an example?
00:17 quietfanatic Like, I'm writing an event system for my game engine,
00:17 quietfanatic and I want certain events (like collisions) to have a parameter
00:18 quietfanatic but of course I can't check every object for every possible collision, so
00:18 diakopter create a global register!! :)
00:18 quietfanatic I'd have the object keep a "collision method" and append the new collision code when I register a new collision event.
00:19 quietfanatic If I explained that sensically enough. :)
00:19 diakopter sounds like you create a list property on each object that stores its collision events, and the collision method iterates them like Tene said
00:20 quietfanatic Yes, I could just have a list of subs.  And overload postfix:<( )> on the list.
00:20 quietfanatic Yeah.
00:20 diakopter with the argument, if ..
00:21 quietfanatic Tene's idea will work fine.
00:22 diakopter .Net has an entire member system for events, though I heard someone say they regretted designating them at that level; they shoulda been just normal members whose slot types are treated as events when they're registered as such.
00:23 quietfanatic I gotta read up more on event implementation anyway.
00:23 diakopter there are scads of techniques of queuing up events on DOM objects
00:24 quietfanatic The thing is, I need a really robust system, including parametric events.
00:24 diakopter so make your event method iterator pass in the events as arguments
00:24 diakopter I mean, pass in the event args as args to the subs
00:25 quietfanatic That's not what I mean.
00:25 quietfanatic I mean, the parameter determines when the event gets called.
00:25 diakopter you could use the multiple dispatch system for that, or
00:25 quietfanatic If I say the ball object has a collision(Brick) routine, it needs to be called when it collides with a Brick and not when it collides with a Paddle.
00:26 quietfanatic That's also why I wanted to introspect signatures, by the way.
00:26 diakopter sounds like Collision is a parametric type
00:27 diakopter on two objects
00:27 diakopter I mean, are there 3-body collisions?
00:28 quietfanatic They happen, though coding them would be a pain.
00:29 quietfanatic What I'm doing for now is I don't have collisions as events, but as normal checking in other events.
00:29 diakopter do you have a Movement event?
00:29 quietfanatic Yes, it's called move.
00:30 diakopter is it a sub or a 'data' object
00:30 quietfanatic The collisions would be checked after that event.
00:30 quietfanatic It's a data object, that calls the object's move method.
00:30 quietfanatic Actually, it's onbly kind of a data object.
00:31 quietfanatic What happens is, when registering the event, I put the object class into the event's queue, rather than putting the event on the object somewhere.
00:32 rhr joined #perl6
00:32 diakopter do your objects use a discrete 2D grid when detecting collisions and calculating movement, or some kind of relative proximity checking to other objects
00:33 quietfanatic They're effectively rectangles, so it's easy to check their positions against eachother even though the grid is not discrete.
00:33 quietfanatic Doing collisions based on a bitmask will be fun and tricky.  (and slow)
00:34 diakopter I don't know.. assuming there's no superposition of objects' "centers", seems to me it'd be faster
00:34 quietfanatic No, I mean checking each pixel of the object's image (or mask or something) to see if they overlap.
00:35 diakopter oh, rather I'd think each object would register its boundaries into an array of arrays that represents the pixel grid
00:36 quietfanatic Oh.  If I used integer positions, that'd be possible.
00:36 diakopter and each movement would check whether the movement would cause an overlap..
00:37 diakopter right, integer aka discrete
00:37 quietfanatic In fact, it would even be easier if I was writing my own graphics library.
00:37 quietfanatic Yeah, integer = discrete, but I'm using Nums.
00:38 * diakopter runs. at least they're not bigints or smth :)
00:38 quietfanatic The only thing that bothers me about Nums here is that they have higher accuracy toward the top-right of the screen :)
00:38 quietfanatic I mean top-left
00:39 diakopter where's the origin
00:39 quietfanatic If somebody inplements a fast fixed-point data type, I'll use it.
00:39 quietfanatic The origin is in the top-left.
00:39 diakopter k
00:39 diakopter so each objects' movement is turn-based
00:40 quietfanatic Yes-ish.
00:40 diakopter so with 50 moving objects, each contributes toward computing the state that will determine how to draw the next frame?
00:40 quietfanatic I'm thinking that unless a specific turn order is specified, the objects will be moved in parallel.
00:41 quietfanatic Um, yes, I think?
00:41 diakopter I think that's what you mean by in parallel
00:41 diakopter each object's individual movement doesn't get its own frame redraw
00:41 quietfanatic No.
00:42 quietfanatic All objects move, then all objects are drawn.
00:42 diakopter that's what I was saying
00:42 quietfanatic (skipping over after_move events and such)
00:44 quietfanatic Well, I've got to get to class now.   Be back this evening.
00:54 jaldhar joined #perl6
01:04 diakopter std: my $a = 0; say $a while (++$a < 10) if ($a < 3)
01:04 p6eval std 28539: OUTPUT«[31m===[0mSORRY![31m===[0m␤Missing block (apparently gobbled by undeclared routine?) at /tmp/grRhPqfkh7 line 1 (EOF):␤------> [32m 0; say $a while (++$a < 10) if ($a < 3)[33m⏏[31m<EOL>[0m␤    expecting any of:␤     parameterized block␤      standard stopper␤ terminator␤
01:04 p6eval .. whitespace␤F…
01:04 diakopter rakudo: my $a = 0; say $a while (++$a < 10) if ($a < 3)
01:04 p6eval rakudo 6c4bab: OUTPUT«1␤2␤3␤4␤5␤6␤7␤8␤9␤Could not find non-existent sub if␤»
01:12 nErVe joined #perl6
01:16 orafu joined #perl6
01:21 patspam1 joined #perl6
01:24 colomon moritz_: Think I've figured out the sin glitch.  I took the "is export" off of Num.sin, erased the sin(Complex) functions, and now things seem to work.  More soon.
01:29 dukeleto "rakudo on rockets" web framework has a nice ring to it. just sayin'
01:41 diakopter rakudo: my $a=0;for (;++$a < 1e380;) {}
01:41 p6eval rakudo 6c4bab: OUTPUT«undefined identifier 'Inf'␤»
01:41 diakopter rakudo: my $a=0;for (;++$a < 1e280;) {}
01:42 p6eval rakudo 6c4bab:  ( no output )
01:42 diakopter that's fast
01:44 diakopter the bug is that it doesnt' complain about not finding for() sub
01:45 payload joined #perl6
01:58 htns joined #perl6
01:59 htns Hi. Never used IRC before. Hope this works...
02:00 htns Just built Parrot and then Rakudo.
02:00 htns Ran a simple script (say "hi", count to 10), and `time` tells me it took just under 5 seconds.
02:01 htns Is that about right right now for Rakudo on Parrot?
02:01 htns left #perl6
02:06 htns_ joined #perl6
02:08 pugs_svn r28540 | diakopter++ | [sprixel] implement trailing if/while (actually I'd already done if)
02:08 diakopter htns_: what does your script look like
02:08 diakopter rakudo: say 'hi'; my $a=0; say $a while ++$a < 10
02:08 p6eval rakudo 6c4bab: OUTPUT«hi␤1␤2␤3␤4␤5␤6␤7␤8␤9␤»
02:08 htns_ use v6;
02:08 htns_ say "hi";
02:08 htns_ for 1 .. 10 {
02:08 htns_ say ">>>$_<<<";
02:08 htns_ }
02:09 htns_ That's in a file named `foo.pl`.
02:10 htns_ In comparison, a similar file for Perl 6 runs in some crazy small amount of time (0.04 s).
02:10 diakopter htns_: you mean Perl 5?
02:10 diakopter diakopter@d5dev01:~/src/pugs/src/perl6$ time rakudo -e 'my $a=0; 1 while ++$a <= 10'
02:10 diakopter real    0m1.052s
02:10 diakopter user    0m0.732s
02:10 diakopter sys     0m0.280s
02:10 htns_ [sigh] Yes. Sorry.
02:11 diakopter around 1 second here
02:11 rfordinal joined #perl6
02:12 htns_ Wow. Hm.
02:12 htns_ Well, I built Parrot from source from svn.
02:12 diakopter diakopter@d5dev01:~/src/pugs/src/perl6$ time perl sprixel.pl -e 'my $a=0; 1 while ++$a <= 10'
02:12 diakopter real    0m1.682s
02:12 htns_ Did a `perl Configure.pl --prefix=/home/john/opt/parrot`.
02:12 diakopter user    0m1.508s
02:12 diakopter sys     0m0.176s
02:12 diakopter there's an --build-optimized or something switch
02:12 htns_ Then got Rakudo from svn.
02:13 htns_ `perl Configure.pl --parrot-config=/home/john/o​pt/parrot/bin/parrot_config`
02:13 htns_ Built and installed fine.
02:13 htns_ Didn't want to have Rakudo get Parrot. Wanted to do my own Parrot installed and all set, *then* get Rakudo.
02:13 diakopter sprixel: my $a=0; say $a if ($a < 20) while ++$a < 100
02:14 p6eval sprixel 28539: OUTPUT«1␤2␤3␤4␤5␤6␤7␤8␤9␤10␤​11␤12␤13␤14␤15␤16␤17␤18␤19␤»
02:14 diakopter sprixel: my $a=0; say $a if ($a < 20) while ++$a < 100; say $a
02:14 p6eval sprixel 28539: OUTPUT«1␤2␤3␤4␤5␤6␤7␤8␤9␤10␤11​␤12␤13␤14␤15␤16␤17␤18␤19␤100␤»
02:14 htns_ Did not use any `--build-optimized` options to anything.
02:14 diakopter htns_: ok... my 1s time is in linux in a vmware VM on windows vista
02:15 htns_ Sorry, forgot to mention, this is on Ubuntu 9.04.
02:16 htns_ (No idea what sprixel is, though maybe you're talking to me... :) )
02:16 diakopter sry, I'm testing it
02:16 diakopter it's this Perl 6 interpreter I'm writing in JavaScript
02:16 pugs_svn r28541 | colomon++ | [t/spec] Change generate-tests.pl to generate a test file for each forward trig function.  Works at the moment, but is duplicating the atan2 tests in every file.
02:16 htns_ Ah.
02:16 diakopter it uses TimToady's standard grammar/parser
02:18 htns_ s/talking/not talking/ . Wow, having trouble with the english language tonight. :)
02:19 htns_ Can you please tell me: what's the `use v6;` for?
02:20 htns_ It doesn't seem like I need it (the script behaves the same with or without it).
02:21 diakopter sprixel: my $a=7; ($a = $a*$a) while $a < 1e21; say $a;
02:21 p6eval sprixel 28541: OUTPUT«33232930569601␤»
02:21 TiMBuS joined #perl6
02:22 diakopter htns_: that's b/c "Perl 5 by default" is not yet implemented in Rakudo
02:22 msmatsko joined #perl6
02:22 htns_ Rakudo on Parrot will, by default, assume code in .pl files is Perl 5?
02:23 diakopter if someone implements that, yes.. :) which I assume is the plan since that's part of the Perl 6 spec. maybe not by Rakudo Star though?
02:24 colomon I don't recall hearing any mention of that at all this year.
02:24 rhr_ joined #perl6
02:24 diakopter mention of what
02:24 colomon I had been figuring "use v6;" was so Perl 5 knew not to try to run the file.
02:25 colomon Perl 5 being on by default for Rakudo.
02:25 htns_ I'd assumed something like that as well.
02:25 diakopter yeah, but Perl5-mode-by-default is still part of the speculatifications
02:26 htns_ S01 says "Migration is important. The perl interpreter will assume that it is being fed Perl 5 code unless the code starts with a "class" or "module" keyword, or you specifically tell it you're running Perl 6 code in some other way, such as"
02:26 diakopter yeah
02:26 colomon diakopter: not saying you're wrong about that, just that I haven't heard any recent mention of making things work like that.
02:26 htns_ s/perl interpreter/perl 6 interpreter/ ?
02:27 diakopter well, perl, since it's both 5 & 6
02:27 diakopter so *presumably*, a fully to-spec implementation would be a drop-in replacement
02:28 diakopter I'm not presuming that part of the spec won't get de-idealized :)
02:28 htns_ Oh, I see. I didn't realize that Rakudo + Parrot was intended to be able to be used as a drop-in replacement for my Perl 5.
02:29 colomon it's really kind of insane, isn't it?  I mean, implementing Perl 6 is already hard enough.  Asking every implementor to add the entirety of Perl 5 as well seems over the top.
02:30 diakopter well, pmichaud (but it applies to every implementor too) was writing somewhere recently that [extremely paraphrased] rakudo (substitute: each implementation)'s spec coverage progress would continue, and if it reached the totality by eternity, then so be it
02:31 diakopter and he was also willing to draw a box around a particular set of features and give it names/labels/version numbers
02:32 diakopter and even eventually call it "stable", if not "finished" or "fully to spec"
02:33 diakopter colomon: well, by doing interop/bindings/linking/hosting with Perl 5, pugs was able to achieve *quite* *a* *lot* toward that goal
02:33 diakopter but then again, messiahs advent only a few times per eon.  er something
02:34 htns_ I'm still trying to fathom totality by eternity. :)
02:34 diakopter oh, the unfathomable depths...
02:38 Tene Jonathan and a couple of others are working on integrating the Perl 5 interpreter as a language on Parrot.
02:38 Tene The project is called Blizkost.
02:39 htns_ I remember reading about it when Rakudo was removed from Parrot proper. Have all the parrot languages been removed?
02:39 Tene Yes.
02:41 diakopter colomon: but yeah, it's daunting. :)
02:41 htns_ Ah. I see. All the languages listed on the parrot site now link to wherever they are now hosted.
02:42 htns_ The Parrot certainly lost a lot of weight there. ;)
02:42 Tene Yes.
02:43 colomon moritz_: I haven't actually tested it yet, but I think the current changes ought to make the named argument trig tests which are currently skipped work...  Errr... but I haven't pushed the changes yet, still running spec test to make sure they don't break anything.  If I'm up in the middle of the night I'll push them.
02:57 colomon moritz_: Hmmm... actually looks like named argument sin still doesn't work.  Puzzling.
02:58 diakopter TimToady: I got an Use of uninitialized value in concatenation (.) or string at STD.pm line 11515.  mebbe I should svn up; rebuild
03:02 colomon rakudo: sub f($x, $y = 1) { say $x + $y; }; f(:x(3/2));
03:02 p6eval rakudo 6c4bab: OUTPUT«too many named arguments - 'x' not expected␤in sub f (/tmp/N929ueuN2f:1)␤called from Main (/tmp/N929ueuN2f:0)␤»
03:02 diakopter TimToady: did you commit everything?  make clean ; make # lots of warnings
03:09 dalek rakudo: f52e459 | (Solomon Foster)++ | src/setting/ (3 files):
03:09 dalek rakudo: Make Complex sin and asin work correctly.
03:09 dalek rakudo: This involved taking "is export" off Num.sin, adding Complex.asin, and implementing Any functions which forward the sub version of sin and asin to method versions.
03:09 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/f​52e45936087b0ad00b1fb4afc8fcf4f46e415a8
03:12 pmichaud joined #perl6
03:12 rhr_ joined #perl6
03:12 TiMBuS joined #perl6
03:12 orafu joined #perl6
03:12 nihiliad joined #perl6
03:12 mikehh joined #perl6
03:12 Intensity joined #perl6
03:12 colomon joined #perl6
03:12 silug joined #perl6
03:12 Rint joined #perl6
03:12 Helios- joined #perl6
03:12 kolibrie joined #perl6
03:12 avuserow joined #perl6
03:12 ezra joined #perl6
03:12 pugs_svn joined #perl6
03:12 phenny joined #perl6
03:12 yves joined #perl6
03:12 christine joined #perl6
03:12 allbery_b joined #perl6
03:12 sjohnson joined #perl6
03:12 zerhash joined #perl6
03:12 PacoLinux joined #perl6
03:12 omega joined #perl6
03:12 gbacon joined #perl6
03:12 lambdabot joined #perl6
03:12 araujo joined #perl6
03:12 rjh joined #perl6
03:12 fredrecsky joined #perl6
03:12 hudnix joined #perl6
03:12 broquaint joined #perl6
03:12 sri_ joined #perl6
03:12 dmpk2k joined #perl6
03:12 Infinoid joined #perl6
03:12 buu joined #perl6
03:12 garron joined #perl6
03:12 blaze-x joined #perl6
03:12 integral joined #perl6
03:12 clkao joined #perl6
03:12 ewilhelm_ joined #perl6
03:26 bigpresh_ joined #perl6
03:32 bigpresh_ joined #perl6
03:35 TimToady I only get one warning on failure to remove *.syml.store
03:35 TimToady and that's benign
03:36 TimToady and there's no files I haven't checked in
03:40 pugs_svn r28542 | lwall++ | [generate-tests.pl] suppress STD error on \# in regex
03:49 diakopter hum
03:50 diakopter I think my svn checkout was broken by switching between versions of svn client tools... also switching linux->windows via samba. hrm. :/
04:00 mberends joined #perl6
04:00 mberends \o impressive backlog :)
04:01 diakopter hi
04:02 diakopter sprixel: my $a=0; say $a if ($a < 50) while ($a = ++$a*2) < 1000; say $a
04:03 p6eval sprixel 28542: OUTPUT«2␤6␤14␤30␤1022␤»
04:03 mberends funky! nice progress diakopter. today more harness building, and then expanding the test suite.
04:08 mberends first putting in a few more test scripts manually, then try adding something like rakudo/tools/autounfudge.pl
04:11 mberends diakopter: why not spend a moment to toot your trumpet on blogspot?
04:16 diakopter mberends: eh.. well, there's not much to write home about... it's 10,000x slower than Perl 5 and 100,000x slower than JS/V8 for a minimal preincrement/while microbenchmark
04:16 diakopter once I got loop (;;) {} working, I just had to try some microbenchmarking.
04:17 mberends srsly!? did you remember to subtract the startup time?
04:17 diakopter yeah; this was a pretty big N
04:19 diakopter rakudo was around 2,000-3,000x slower than Perl 5, which .. isn't ultra encouraging, since (barring analysis/optimization) sprixel will only get slower...
04:20 [particle] joined #perl6
04:22 mberends I added some simple relative benchmarking to Rakudo's test suite, planning to extend that incrementally as it settles in. I'll also think of that in sprixel's harness, which will be pretty portable anyway.
04:22 diakopter cool
04:22 pugs_svn r28543 | lwall++ | [STD] improve errors regarding loops for diakopter++
04:24 colomon rakudo: sub f($x) { say $x + 1; }; f(:x(3/2))
04:24 p6eval rakudo f52e45: OUTPUT«too many named arguments - 'x' not expected␤in sub f (/tmp/DuWWxsEjtR:1)␤called from Main (/tmp/DuWWxsEjtR:0)␤»
04:25 mberends rakudo: sub f(:$x) { say $x + 1; }; f(:x(3/2)) # saw that once somewhere
04:25 p6eval rakudo f52e45: OUTPUT«2.5␤»
04:27 colomon moritz_: Hmmm.... also, my Complex.asin implementation is plainly broken, but my tests don't seem to detect that.  Clearly more / smarter tests are needed.
04:33 diakopter sprixel: my $a=0; 1 while ++$a <= 10000; # 151 JS function calls for each iteration of the 2nd statement.
04:33 p6eval sprixel 28542:  ( no output )
04:34 diakopter that's a few too many
04:37 mberends on a weeny Intel Atom that took "real 0m17.026s user 0m16.765s sys 0m0.164s"
04:39 diakopter ick.
04:39 mberends shower && commute &
05:00 redicaps joined #perl6
05:10 quietfanatic joined #perl6
05:21 [particle]1 joined #perl6
05:23 snearch joined #perl6
06:05 meppl joined #perl6
06:06 NorwayGeek joined #perl6
06:32 moritz_ \o/
06:34 mberends joined #perl6
06:34 diakopter \/o\
06:34 mberends ..must..have..coffee..
06:34 diakopter /o\
06:36 pugs_svn r28544 | lwall++ | [Cursor.pmc] handle stringish enums a bit better
06:36 diakopter eegslursh
06:36 diakopter mberends: largish refactor committing
06:37 mberends whee!
06:39 pugs_svn r28545 | diakopter++ | [sprixel] refactored CPS technique (no longer returns an array each call)
06:39 pugs_svn r28545 | made AutoIncrement a bit more "native" by having bigint modify in place when it's a *variable* that's being incremented/decremented..
06:39 pugs_svn r28545 | added in place increment/decrement methods to the bigint lib
06:39 diakopter 0.30 speedup, ish
06:39 diakopter or so I imagine
06:41 mberends diakopter++: cool. And just when you decided to explain it to me, you also decided to Change Everything ;)
06:41 moritz_ colomon: most tests so far just check that sin/cos/tan etc are consistent with each other... that's not enough
06:42 moritz_ colomon: we should just take some lists of values, run them through other program we're confident with, compare the results
06:43 quietfanatic Oops, I've challenged myself to make an automated C library importer for Rakudo.
06:44 moritz_ quietfanatic++
06:44 mberends quietfanatic++: I had been (day)dreaming about such a tool. make it come true!
06:44 quietfanatic Except for parsing the header file, I more or less know how to do it.
06:45 quietfanatic I mean, it'll take some grizly Q:PIR-ing, but yeah.
06:45 moritz_ in the parrot repo there's a tool called cgigen that parses the header-files
06:45 quietfanatic Oh really?
06:46 moritz_ it might be a bit out of date
06:46 moritz_ but it basically contains a C parser in PGE
06:46 mberends quietfanatic: could it look like Q:C{ ... } eventually?
06:47 quietfanatic mberends: Then I'd have to include a c compiler, like Inline::C, and I don't want to do that.
06:48 mberends oh, ok
06:48 quietfanatic But it's possible, yeah.
06:48 quietfanatic Especially if someone writes a C compiler in Perl 6. :)
06:49 mberends :) I'll lend you a copy of my GCC
06:49 quietfanatic Let's start with precompiled libraries, shall we?
06:54 quietfanatic moritz_: Oh, you mean ncigen?
06:55 moritz_ yes
07:03 patspam1 joined #perl6
07:15 sjohnson o/
07:21 rfordinal joined #perl6
07:29 pmichaud joined #perl6
07:30 avuserow_ joined #perl6
07:45 mikehh rakudo (f52e459) builds on parrot r41610 - make test / make spectest_smolder (up to r28545 -> #28453) PASS - Ubuntu 9.04 amd64
07:48 rfordinal left #perl6
07:52 NorwayGeek joined #perl6
07:53 NorwayGeek joined #perl6
08:05 mspauldi1g joined #perl6
08:05 TiMBuS joined #perl6
08:23 iblechbot joined #perl6
08:36 rgrau joined #perl6
08:46 dakkar joined #perl6
09:44 riffraff joined #perl6
10:21 payload joined #perl6
10:44 masak joined #perl6
10:44 masak oh hai, fellow pioneers.
10:45 am0c joined #perl6
10:45 Matt-W o/ mighty bug-finder
10:46 colomon moritz_: actually, the sin tests are against a list of known values for sine.  the asin tests (this is from running S32=trig.generate-tests.pl and looking in sin.t) are just to see if it consistent with sin.
10:46 masak nah, I just like to destroy things. :)
10:48 colomon (sorry, half awake one-handed typing not so good this moening.)
10:49 * masak abstains from obvious jokes
10:52 masak oh wait, this isn't Slashdot. never mind.
10:54 colomon Danke.
10:57 masak speaking of faux pas, this page seems topical and sensical: http://geekfeminism.wikia.co​m/wiki/So_you_made_a_mistake
10:59 colomon moritz_: figured out the asin mystery.  I was still declaring a version of it in the test file, and wierdly enough, that version + my new version generated correct answers.
11:10 patspam1 joined #perl6
11:20 masak diakopter: so, how long before I can run Druid in sprixel? :>
11:32 mberends masak: greetings! After carefully thinking about Date, Time and DateTime, I am sure it's not the effect of having recently written some code that way. They are the data types of the real world, and appear in many computer languages. My MS Basic from 1978 had date() and time() functions. Microsoft has just unbundled DateTime into Date and Time in Transact-SQL 2008. So that's my vote
11:32 masak thank you for this soul-searching answer. I appreciate it.
11:35 lichtkind joined #perl6
11:38 NorwayGeek joined #perl6
11:39 masak I'm currently pondering if some extra measure needs to be taken to get ranges of DateTime objects to work.
11:39 masak maybe they'll work out-of-the-box because DateTime does Real or something.
11:39 masak I won't add anything to the spec until I know.
11:39 lichtkind joined #perl6
12:09 takadonet joined #perl6
12:09 takadonet morning all
12:13 jogla joined #perl6
12:14 colomon morning!
12:15 jogla Moin
12:16 moritz_ \o/
12:19 jogla Hi moritz_
12:19 moritz_ long time no see jogla :-)
12:20 jogla Yeah
12:27 masak jogla++ # returning customer
12:28 jogla :)
12:32 pugs_svn r28546 | colomon++ | [spec/t] Update trig test generation code -- remove all the faked Complex functions previously included with the test code, and add Complex.asin tests (for all inverted functions).
12:33 takadonet Still working on those lovely math function Colomon?  :)
12:38 nErVe joined #perl6
12:44 pmichaud good morning, #perl6
12:44 takadonet morning sir
12:46 masak morning, pmichaud.
12:46 masak pmichaud: those Cursors look very useful!
12:46 pmichaud yes, they do seem to be useful.
12:47 pmichaud I'm very happy I have a working implementation of protoregexes.
12:47 pmichaud Today's focus is on a p6 regex parser
12:47 takadonet !!
12:47 masak \o/
12:47 pmichaud (to follow the STD.pm definition of regexes)
12:47 masak looking forward to that.
12:47 pmichaud same here
12:48 pmichaud I had lots of non-coding things I had to do yesterday, so not so much progress there.  But I think nearly all of the core pieces are in place
12:50 pmichaud afk for a bit, kids to school
12:54 Matt-W \o/
12:55 * Matt-W likes to hear about progress
12:55 redicaps left #perl6
13:04 colomon takadonet: Yup, slowly grinding away at the math.  Though I expect that now I have working Complex versions of sin and asin, the end of the trig function work is in sight.  All I need to do is clone the framework of those two for all the other trig functions.
13:05 takadonet colomon: Sweet
13:05 synth^2 joined #perl6
13:11 [particle] joined #perl6
13:28 Camenix joined #perl6
13:29 SmokeMachine joined #perl6
13:29 Camenix left #perl6
13:32 dalek rakudo: c4dbb59 | (Solomon Foster)++ | src/setting/ (3 files):
13:32 dalek rakudo: Fix the previous asin checkin so it actually works.
13:32 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/c​4dbb591c7cda59847b904f7340532668bed5f5f
13:33 masak what's the recommended way to run Rakudo on feather nowadays when Parrot and Rakudo should be installed?
13:34 masak I just tried 'perl6' but got the 'shared libraries' error one gets when things aren't installed all the way.
13:34 moritz_ masak: build & install one yourself
13:35 masak and the incantations for installing non-globally...?
13:35 moritz_ perl Configure.pl --gen-parrot
13:35 moritz_ make install
13:36 masak hokay.
13:40 KyleHa joined #perl6
13:43 _Jedai_ joined #perl6
13:48 mberends masak, what kind of ranges of datetime objects do you ponder? discrete or continuous? something like "18:30 every Tuesday between t1 and t2", or "any time between t1 and t2"?
13:48 masak the latter. that is, infix:<..>
13:48 masak the former should fall out automatically from dt/duration addition and infix:<...>.
13:51 * mberends ponders a TimeSpan object that could smartmatch a DateTime
13:55 masak .oO( DateTimeSpan )
13:55 * PerlJam wishes google calendar had a way to say "the thursday after the 3rd tuesday of every month"
13:56 masak mberends: what advantage would such an object confer over just $dt1..$dt2 ?
14:00 huf joined #perl6
14:04 icwiener joined #perl6
14:04 mberends masak: not sure, it was a suggestion to possibly help your "ranges of DateTime objects". It's non essential. Just ignore it :)
14:05 masak I think I'm heavily biased by generic solutions nowadays, to the point where I prefer existing A[B] solutions to a new AB solution almost all the time. :)
14:09 mberends masak: $t1..$t2 it is then, worksforme :)
14:12 snearch joined #perl6
14:13 mberends sprixel: use Test; plan 2; is(1,1,"one");is(2,2,"two");
14:13 p6eval sprixel 28546: OUTPUT«1..2␤ok 1 - one␤ok 2 - two␤»
14:14 Ctrl-ZZZ joined #perl6
14:15 justatheory joined #perl6
14:21 Chillance joined #perl6
14:22 masak sprixel: use Test; plan 2; is 1, 1, "one"; is 2, 2, "two";
14:22 p6eval sprixel 28546: OUTPUT«1..2␤ok 1 - one␤ok 2 - two␤»
14:22 masak \o/
14:22 moritz_ sprixel: use Test; plan 2; is 1, "1", "one"; is "2", 2, "two";
14:22 p6eval sprixel 28546: OUTPUT«1..2␤ok 1 - one␤ok 2 - two␤»
14:23 moritz_ sprixel: use Test; is 1.0, 1, 'a'
14:23 p6eval sprixel 28546: OUTPUT«ok NaN - a␤»
14:23 moritz_ you could still start counting at 1, even without a plan
14:23 moritz_ sprixel: use Test; is '01', 1, 2;
14:24 p6eval sprixel 28546: OUTPUT«not ok NaN - 2␤»
14:25 mberends moritz_, istr the Test.pm.js script uses the plan() call to initialize the test number to 1
14:25 mberends "feature" ;)
14:26 masak not for us done_testing fans.
14:28 moritz_ those call plan *; at the start
14:28 masak we do?
14:28 masak I don't.
14:29 pmichaud if "plan *;" is required, then that means that * (as a term) needs to be in the 01-sanity suite
14:29 pmichaud *probably needs
14:29 moritz_ pmichaud: plan *; is an option, not a requirement
14:29 pmichaud sure, but 01-sanity is intended to be "the minimal features needed to parse most of the tests"
14:30 moritz_ pmichaud: and for the 01-sanity suite I'd continue using planned tests
14:30 pmichaud that's not what 01-sanity does
14:30 moritz_ uhm, it's not been that for ages :/
14:30 pmichaud 01-sanity is the tests needed to say "okay, you have enough features to run Test.pm"
14:30 pmichaud 01-sanity doesn't itself use Test.pm
14:30 Psyche^ joined #perl6
14:31 pmichaud s/"parse most of the tests"/"run Test.pm"
14:31 moritz_ well, that's what you thought in the initial stages of building rakudo - if my memory serves right then it didn't work that way in reality
14:31 pmichaud right, because nobody kept 01-sanity up to date with Test.pm :)
14:31 moritz_ and also there's not one Test.pm
14:31 pmichaud but when we re-implemented Test.pm, I at least made an effort to not use features in Test.pm that weren't tested in 01-sanity
14:32 pmichaud or to add things to 01-sanity that were needed for Test.pm
14:34 mberends thanks for this explanation pmichaud, it helps the work on sprixel testing while dis-commuting :)
14:34 ruoso joined #perl6
14:38 masak is dis-commuting a more chaotic process than de-commuting? :)
14:40 ejs joined #perl6
14:43 mberends masak: yes, it seems to take far longer ;)
14:44 masak :)
14:52 SmokeMachine joined #perl6
14:53 nihiliad joined #perl6
15:03 masak eew, November symlinks in Test.pm from the Rakudo directory. it's better than almost all other approaches, but it's still pretty icky.
15:03 * masak looks forward to the Central Solution
15:04 moritz_ make rakudo's 'make install' copy Test.pm to $prefix/lib/perl5/
15:05 masak perl5? :)
15:06 moritz_ erm
15:06 moritz_ s/5/6/
15:06 masak as long as Rakudo finds it in its path _by default_, I'm happy.
15:06 moritz_ rakudo: say @*INC.perl
15:06 masak that'll be the nice part of the Central Solution: less fiddling with PERL6LIB.
15:06 p6eval rakudo c4dbb5: OUTPUT«["/home/p6eval/.perl6/lib", "/home/p6eval//p1/lib/parrot/1.​6.0-devel/languages/perl6/lib", "lib", "."]␤»
15:07 moritz_ ok, it's $prefix/languages/perl6/lib
15:07 masak wfm
15:10 kidd_ joined #perl6
15:12 masak Tweets: ""Ruby 2.0 will be production stable in 10 years" — Matz" -- "Hmm, sounds like they'll beat Perl 6 by a hefty margin then."
15:12 masak I find it difficult sometimes to predict whether intervening would be a net win.
15:13 colomon I think if you just submitted a rakudobug every time you were tempted to respond to a tweet like that, it might have better results on the whole.  :)
15:14 huf i guess this is like the french not bathing. 10 milennia from now ignorant people will still claim the french dont bathe and perl is unreadable and perl6 will never be finished...
15:14 masak (1) rakudobugs don't appear spontaneously. :) (2) I sincerely believe that responding to some tweets have good results. maybe not this one, though.
15:14 jan__ joined #perl6
15:14 pmichaud sometimes it's best to simply embrace the insanity :)
15:15 colomon masak: I bet if you gave yourself ten minutes to find a rakudobug, you could do it every time.
15:15 moritz_ or ignore it ;-)
15:16 colomon It just seems to me that, if we do our jobs well, these guys will be forced to eat crow in about eight months.
15:16 masak Twitter is a great place to actually spread the word about Perl 6. providing factual, sometimes tongue-in-cheek answer to a selection of taunts or false rumors can, I believe, have results.
15:18 Matt-W Mmm
15:18 Matt-W It is a good strategy - if you can come up with a reply of the right kind of tone
15:18 Matt-W you don't want people to think you're flaming
15:18 masak exactly.
15:18 colomon I guess I'm thinking about a conversation I had a couple of weeks ago at a bachelor party.
15:19 masak you were discussing Perl 6 at a bachelor party? :)
15:19 colomon The groom mentioned that one of my Facebook statuses had been about working on Rakudo.
15:19 Matt-W :)
15:19 colomon And one of the other guys, it turns out, used to be Perl programmer, but has fallen into (I think) PHP.
15:19 * Matt-W adds to the list of ideal items for the perfect fantasy wedding: camels and onions and butterflies
15:20 colomon And he reflexively made a crack about Perl 6 taking forever to come out.
15:20 Matt-W I always find it amusing when PHP programmers mock Perl 6
15:20 Matt-W And also quite saddening
15:20 Matt-W The poor people
15:20 colomon My response was about how well Rakudo is coming along.
15:20 colomon But if we're honest about it, right now it still isn't production-ready.
15:21 Matt-W of course not
15:21 colomon It's getting really close, but it's not there yet.
15:21 Matt-W But we're going to be
15:21 Matt-W quite possibly in 2010
15:21 masak just going to close those bugs first...
15:21 colomon That's what I'm saying.  If Rakudo * does its job, Perl 6 will have a reasonably production ready platform.
15:21 colomon It might not be "done", but it will be very useable, I think.
15:22 colomon At that point, responding to the naysayers will be almost effortless, I think.
15:22 colomon and a lot more convincing.
15:24 colomon That's my theory, anyway.  I'm not saying we shouldn't try to tell people what is going on now -- but we should be putting our money where our mouths are and making it actually happen.
15:24 * justatheory hugs colomon
15:24 colomon Of course, masak is a champ at the latter!
15:25 masak for better or worse, I care.
15:25 Matt-W I care too
15:25 masak but I also do it because I want to see cool things happen, and the easiest way to do that seems to be to write code, write blog posts and file bugs.
15:25 Matt-W I just don't have many tuits
15:25 Matt-W hugme: hug colomon
15:25 * hugme hugs colomon and blushes
15:26 rfordinal joined #perl6
15:26 masak I have made a tuit-money trade-off. I'm poor but happy. :)
15:26 masak actually, it's not even that bad.
15:26 Matt-W Unfortunately my day job sucks up a lot of tuits
15:26 masak but I am working half-time because I want to spend large parts of the other half on Perl 6.
15:27 Matt-W and my other hobbies suck up even more - but if I didn't do hobbies that weren't programming, I'd go mad
15:27 moritz_ aye, it's important to do something else
15:27 moritz_ 3x table tennis next week ;-)
15:27 Matt-W programming for a living can be soul destroying
15:27 Matt-W yay table tennis
15:28 * masak goes swimming
15:28 Matt-W I do aikido
15:28 masak and every time I do, I look at the tiles at the bottom of the pool and think about Druid. :)
15:28 Matt-W And play the recorder, viola de gamba, lute and sing
15:28 Matt-W hahaha
15:29 moritz_ the problem with table tennis is that it requires a lot of concentration
15:29 Matt-W yes but it's a different kind of concentration
15:29 moritz_ so it's not such a good way to switch off your brain and let your body work
15:29 Matt-W no
15:29 Matt-W swimming's better for that
15:29 Matt-W you can just swim up and down and up and down
15:29 Matt-W I used to go swimming and think about writing
15:30 masak I used to do swing dancing. I still run occasionally. I have a secret urge to do bicycle spinning.
15:30 Matt-W these days I tend to do that while I'm walking, or I think about composing music - the trouble with the latter being that I tend to forget the tune I was thinking about by the time I get home and can write it down
15:30 Matt-W bicycle spinning?
15:31 masak Matt-W: I don't know if that's the term.
15:31 masak Matt-W: we call it 'spinning' in Sweden. it's a form of exercise.
15:31 masak Matt-W: for tunes, I have a music player around my neck at all times with a recording ability.
15:31 masak Matt-W: but unfortunately, I never sit down and compose from those recordings... :/
15:32 masak hm, "Indoor cycling" seems to be the term. "Spinning" is a trademark.
15:36 Matt-W hmm
15:36 Matt-W my phone now has a sound recorder on it
15:37 Matt-W but last time I really had a tune I really wanted to record, I was on a very windy hillside
15:37 Matt-W never did get that one back :(
15:37 Matt-W masak: heh, good tweet
15:37 masak directed to everyone and no-one.
15:40 colomon I've always figured that if I can't remember a tune by the time I get back home, it probably wasn't worth remembering.  :)
15:41 Matt-W I'm not so sure about that
15:41 masak I've sometimes carried tunes all the way home by humming them over and over.
15:41 Matt-W I get distracted a lot
15:41 colomon (But then, once I get back home I try to record it pretty quickly, so maybe that's just an excuse not to get a digital recorder I can always have with me.)
15:41 Matt-W and I usually do a lot of revision over the base concept anyway
15:41 Matt-W what usually comes to me when I'm at an inconvenient moment to do anything about it is the first phrase
15:41 Matt-W so then I have to do any subsequent parts the hard ware
15:41 Matt-W way*
15:41 Matt-W but it gets me moving in the right direction
15:43 * Matt-W -> out of the office, anywhere but here
15:43 colomon Ah, the advantage with Irish Traditional Music is that tunes are so simple that not a lot of revision is called for.  ;)
15:45 colomon Getting back on subject, I'm finding that working on Rakudo is a powerful reminder that I used to program for fun.
15:48 masak +1
15:49 moritz_ working on rakudo, and working within the Perl 6 community (IMHO)
15:49 moritz_ (on and with ;-)
15:50 colomon that too!
15:50 masak using Rakudo. beating on Rakudo. :)
15:51 * moritz_ goes offline for the weekend
15:51 moritz_ have the appropriate amount of fun!
15:51 masak likewise, sinjoro!
15:51 masak I think I've picked out my favorite rakudobug so far:
15:51 masak rakudo: sub foo( &foo = &foo ) {}
15:51 p6eval rakudo c4dbb5:  ( no output )
15:52 masak rakudo: sub foo( &foo = &foo ) {}; foo
15:52 p6eval rakudo c4dbb5: OUTPUT«Null PMC access in isa()␤in sub foo (/tmp/vj9uXI2yhZ:1)␤called from Main (/tmp/vj9uXI2yhZ:0)␤»
15:52 masak really don't know how I arrived at that one.
15:52 diakopter masak: heh
15:52 masak rakudo: sub bar( &foo = &foo ) {}; bar
15:52 p6eval rakudo c4dbb5: OUTPUT«Null PMC access in isa()␤in sub bar (/tmp/3W6nYeH2c3:1)␤called from Main (/tmp/3W6nYeH2c3:0)␤»
15:52 colomon masak: Did it take you more than ten minutes to come up with that one?  ;)
15:52 diakopter sprixel: sub foo( &foo = &foo ) {}; foo
15:53 p6eval sprixel 28546:  ( no output )
15:53 masak colomon: no, but it's still not as simple as just sitting down and making rakudobugs happen. at least not most of the time.
15:53 diakopter sprixel: sub foo( &foo = &foo ) { say 4 }; foo
15:53 p6eval sprixel 28546:  ( no output )
15:53 diakopter heh
15:53 masak colomon: they appear as a by-product of actual coding, most of the time.
15:54 colomon masak: I know, I know.  Though it sometimes feels like ten minutes of uninhibited Perl 6 programming will produce a Rakudobug for sure...
15:54 masak not so sure about that.
15:55 masak it was definitely true by the end of 2008.
15:55 diakopter rakudo: sub foo( &foo = 1 ) {}; foo
15:55 masak I wrote a blog post around New Year about that.
15:55 p6eval rakudo c4dbb5: OUTPUT«Parameter type check failed; expected Callable, but got Int for foo in call to foo␤in sub foo (/tmp/IRDOGX8h44:1)␤called from Main (/tmp/IRDOGX8h44:0)␤»
15:55 masak but today, you'd have to be uninhibited in fairly specific ways for that to happen.
15:57 masak long bike ride &
15:58 colomon Errr... anyone out there know what is supposed to happen with a "fail"?
15:59 colomon Complex.Num calls fall if the imaginary part of the number is not zero -- but it seems to effectively be returning 0 as well.
16:00 colomon I get the fail message if I call it from the REPL, but just get a normal value isn't correct error in the test file.
16:00 colomon Seems like that could have very bad effects in practice.
16:00 colomon (That is to say, I'd much rather get NaN.)
16:04 cdarroch joined #perl6
16:04 diakopter rakudo: say NaN
16:04 p6eval rakudo c4dbb5: OUTPUT«NaN␤»
16:04 TimToady rakudo: say NaN + 1
16:04 p6eval rakudo c4dbb5: OUTPUT«NaN␤»
16:05 colomon rakudo: say tan(1i);
16:05 p6eval rakudo c4dbb5: OUTPUT«You can only coerce a Complex to Num if the imaginary part is zero␤0␤»
16:05 diakopter move 'only' to between 'Num' and 'if'
16:06 colomon Hmmm... I think it reads better as it is.
16:07 * colomon missed hearing the timer go off on the oven, but the bread hasn't burned yet.
16:08 iblechbot joined #perl6
16:14 stephenlb joined #perl6
16:21 lanny joined #perl6
16:23 araujo joined #perl6
16:23 Lorn joined #perl6
16:24 lanny Shouldn't infix:<+,-,*> for (Int, Int) produce an Int?  They are infinite precision to begin with.
16:24 colomon lanny: in what context?
16:24 colomon (I mean, Rakudo doesn't support infinite precision at the moment, for instance...)
16:25 lanny aha.  :)  The conversion to Num had fooled me.
16:25 lanny I thought Rakudo was already using GMP for Ints
16:25 colomon alas, no.
16:26 lanny Ok.  Well that makes clear a whole class of fuzziness I've been hitting.
16:28 drbean_ joined #perl6
16:28 lumi joined #perl6
16:32 rfordinal left #perl6
16:36 ispy_ joined #perl6
16:37 keeth joined #perl6
16:51 nihiliad joined #perl6
16:52 dukeleto 'ello
17:12 pugs_svn r28547 | lwall++ | [Cursor] start to setup for moving modules to lib
17:28 pugs_svn r28548 | diakopter++ | [sprixel] implement Conditional   Protasis ?? Apodosis !! ElseExpr
17:28 diakopter sprixel: say 0 ?? 5 !! 7
17:28 p6eval sprixel 28547: OUTPUT«7␤»
17:29 diakopter sprixel: say (say 4)??(say 5)!!(say 6)
17:29 p6eval sprixel 28547: OUTPUT«4␤5␤1␤»
17:38 discHead joined #perl6
17:43 diakopter my CPS refactor wasn't complete...
17:45 pugs_svn r28549 | diakopter++ | [sprixel] finish a bit more of the last CPS refactor..
17:47 masak diakopter: what's this V8.pm required by sprixel.pl? where do I buy it?
17:47 colomon masak: http://www.v8juice.com
17:48 masak gracias.
17:48 sjohnson heh
17:48 masak er.
17:48 sjohnson "Healthy programming starts with V8"
17:49 colomon sorry, couldn't resist.
17:49 masak :)
17:50 sjohnson a healthy masak, is a happy masak
17:50 sjohnson and productive
17:50 masak if I run 'make' in src/perl6, and then try to run sprixel on some example program, then it finds no V8 juice for me.
17:55 coldboot joined #perl6
17:56 masak ah! http://github.com/fictorial/perl-v8
17:59 crythias1 joined #perl6
18:03 Chillance_ joined #perl6
18:07 pugs_svn r28550 | diakopter++ | [sprixel] fix topic assignment in map block
18:13 alanhaggai joined #perl6
18:16 diakopter phenny: tell masak there's a file in perl6/sprixel/ that starts with RE and ends with ADME :)
18:16 phenny diakopter: I'll pass that on when masak is around.
18:37 pugs_svn r28551 | lwall++ | [STD,viv] raise middle args of ternaries
18:39 pmurias joined #perl6
18:42 pugs_svn r28552 | diakopter++ | [sprixel] align Conditional to use new args from viv/STD.  Begin an analysis phase to compute implied signatures for blocks with $^a and such.
18:43 diakopter TimToady: in a block with $^a and $^b, is $_ an alias to $a?
18:45 diakopter rakudo: $_ = 4; map { $^a + $^b; say $_ }, 1, 2
18:45 p6eval rakudo c4dbb5: OUTPUT«4␤»
18:48 TimToady diakopter: no
18:48 diakopter k
18:48 TimToady not since 7 or 8 years ago anyway :)
18:49 lanny Would a Rat.new(Num $num, Num $eps?) be of any use?
18:49 diakopter rakudo: $_ = 4; map { say $^a + $^b; say $_ }, 1, 2, 3,
18:49 p6eval rakudo c4dbb5: OUTPUT«No result object␤in Main (src/gen_setting.pm:2813)␤»
18:50 diakopter rakudo: $_ = 4; map { say $^a + $^b; say $_ }, 1, 2, 3
18:50 p6eval rakudo c4dbb5: OUTPUT«3␤4␤»
18:51 colomon lanny: taking two floating point numbers?  Why?
18:51 colomon Or is $eps some sort of precision thing?
18:51 lanny Well a rational approximation to a real number usually has an epsilon associated.
18:51 lanny Yes.
18:51 colomon ah.
18:52 colomon I certainly think it would be cool to have smart code to convert a Num to a Rat.
18:52 diakopter rakudo: map { say $^a + $^b + $^c }, 1, 2; say 8 # TimToady: if there aren't enough to fill the requested slots, it doesn't run?
18:52 p6eval rakudo c4dbb5: OUTPUT«8␤»
18:53 lanny Ok.  I'll write some tests too.
18:53 colomon Might fit in the system more logically as Num.Rat
18:55 TimToady diakopter: yes, because we have lots of ways to extend the end of the list
18:55 diakopter rakudo: say map { say $^a; if 1 { $^a } else { $^b } }, 1, 2 # something's not right here
18:55 p6eval rakudo c4dbb5: OUTPUT«1␤2␤11␤»
18:56 lanny colomon: It's all the same to me.  Is there any guidance on making cast subs vs .new of a given argument type?
18:56 TimToady placeholders are always scoped to inner {}
18:56 diakopter rakudo: say map { say $^a; if 0 { $^a } else { $^b } }, 1, 2 # something's not right here
18:56 p6eval rakudo c4dbb5: OUTPUT«1␤2␤00␤»
18:56 TimToady that's if 0 -> $a { $a } else -> $b { $b }
18:56 lanny colomon: It will change where I put the tests and was thinking associating that behavior with Rat would make more sense than introducing Rat tests into Num
18:57 diakopter shouldn't $b be an undefined error
18:57 diakopter oh, nm
18:57 colomon lanny: Not that I know of.  I'm just going on my instincts.  It seems like generally we have avoiding forcing people to call explicit new on numeric types.
18:57 TimToady std: say map { say $^a; if 0 { $^a } else { $^b } }, 1, 2 # something's not right here
18:57 p6eval std 28552: OUTPUT«ok 00:02 104m␤»
18:58 lanny colomon: ah.  Then I'm behind the spec on auto-conversion.  I'll put it in Num
18:58 diakopter a runtime error I meant.  but I was non-understanding
18:58 colomon lanny: so for instance, if you look at Rat, there is no constructor that takes a single Int.
18:58 colomon lanny: But Int has a Rat function to create a Rat from it.
18:59 lanny colomon: ok.
18:59 colomon lanny: As far as I know, the spec doesn't really cover this very thoroughly.  I believe the intention is to write the spec based on how the code works.  :)
19:00 pmurias ruoso: i'm trying out how the smop model of doing things would map out onto the js runtime, what are the benefits of passing the interpreter around instead of having it in a global?
19:01 TimToady you can have more than one?
19:01 diakopter std: { say $^a } # TimToady: infinite loop if you exclude this comment.
19:02 p6eval std 28552:  ( no output )
19:02 diakopter there went half my battery :)
19:03 pmurias TimToady: you could what i'm unsure is why would you need more than one as the interpreter does very little
19:04 pmurias in smop that is
19:13 lanny rakudo: (1/0).WHAT.say
19:13 p6eval rakudo c4dbb5: OUTPUT«Rat()␤»
19:19 sjohnson joined #perl6
19:19 pmurias joined #perl6
19:19 discHead joined #perl6
19:19 nihiliad joined #perl6
19:19 araujo joined #perl6
19:19 lanny joined #perl6
19:19 cdarroch joined #perl6
19:19 jan__ joined #perl6
19:19 Patterner joined #perl6
19:19 _Jedai_ joined #perl6
19:19 KyleHa joined #perl6
19:19 jogla joined #perl6
19:19 rhr_ joined #perl6
19:19 orafu joined #perl6
19:19 mikehh joined #perl6
19:19 Intensity joined #perl6
19:19 colomon joined #perl6
19:19 silug joined #perl6
19:19 Rint joined #perl6
19:19 Helios- joined #perl6
19:19 kolibrie joined #perl6
19:19 ezra joined #perl6
19:19 pugs_svn joined #perl6
19:19 phenny joined #perl6
19:19 yves joined #perl6
19:19 christine joined #perl6
19:19 allbery_b joined #perl6
19:19 zerhash joined #perl6
19:19 PacoLinux joined #perl6
19:19 omega joined #perl6
19:19 gbacon joined #perl6
19:19 lambdabot joined #perl6
19:19 rjh joined #perl6
19:19 fredrecsky joined #perl6
19:19 hudnix joined #perl6
19:19 broquaint joined #perl6
19:19 sri_ joined #perl6
19:19 dmpk2k joined #perl6
19:19 Infinoid joined #perl6
19:19 buu joined #perl6
19:19 garron joined #perl6
19:19 blaze-x joined #perl6
19:19 integral joined #perl6
19:19 clkao joined #perl6
19:19 ewilhelm joined #perl6
19:20 lanny I think it's trying to reply 'Inf'
19:20 lanny or maybe 'divide by 0'
19:21 cookys joined #perl6
19:22 colomon I think it is divide by zero, actually; we don't trap for that if I recall correctly.
19:23 colomon We can do "math" on the Rat 0/1, but it is unprintable.
19:23 ruoso pmurias, "interpreter" really means "thread" there
19:23 ruoso pmurias, we're going to have one "interpreter" object for each thread of execution (being it os thread or not)
19:23 lanny 1/0 you mean?  I hope we can do math on 0/1
19:24 keeth joined #perl6
19:24 colomon lanny: 1/0, yes.
19:25 colomon lanny: the math on the 1/0 is reasonably sensible, I just balk a bit because it allows you to do terrible things.
19:26 lanny colomon: most programming languages live in the real world though where 1/0 is an error to avoid small problems become big ones down the line
19:27 colomon lanny: but it's not a problem that goes away.  1/0 is tracked more or less the same way setting Inf or NaN would be.
19:28 pmurias ruoso: thanks
19:28 colomon though... hmmm...
19:28 lanny colomon: then numerator and denominator should probably be set to Inf
19:28 colomon rakudo: say 1 / (1 / 0);
19:28 p6eval rakudo c4dbb5: OUTPUT«0␤»
19:29 colomon rakudo: say Inf / Inf
19:29 p6eval rakudo c4dbb5: OUTPUT«NaN␤»
19:29 lanny ah.  well then Inf / 1
19:29 colomon rakudo: say 1 (Inf / 1);
19:30 p6eval rakudo c4dbb5: OUTPUT«Confused at line 2, near "(Inf / 1);"␤in Main (src/gen_setting.pm:3468)␤»
19:30 colomon rakudo: say 1 / (Inf / 1);
19:30 p6eval rakudo c4dbb5: OUTPUT«0␤»
19:30 lanny colomon: or even just fail 'zero denominator'
19:31 lanny ick
19:32 lanny Ok.  How do you get the number that a Class Num is from inside a method?  self and +self aren't doing what I expect.
19:33 DeathAnchor joined #perl6
19:33 lanny Which could just be me but the code worked when in Rat
19:33 DeathAnchor Question, what do you use for SVN client on a Win32 system?
19:35 lanny Ah.  Q:PIR
19:35 keeth left #perl6
19:36 keeth joined #perl6
19:36 colomon lanny: self should work just fine.
19:36 lanny DeathAnchor: I've heard TortoiseSVN mentioned before.
19:36 lanny colomon: is probably me then.
19:37 DeathAnchor gah, I hate tortoise. The gui is junk. I guess i could just use the commandline for it.
19:37 colomon lanny: you definitely shouldn't have to go into Q:PIR unless your code is actually in PIR.
19:37 * DeathAnchor was hoping for something better, but alas is disappointed.
19:38 lanny colomon: I'm tempted.  One sec while I nopaste it and maybe you can see where I've gone wrong.
19:40 lisppaste3 lanny pasted "$num.Rat()" at http://paste.lisp.org/display/88078
19:42 colomon rakduo: class Num is also { multi method Rat(Num $epsilon = 1.0e-6) { say self; }; }; 1.0.Rat;
19:43 lanny typo on 'rakudo'
19:43 colomon I wonder about self versus +self, but it sounds like you tried both?
19:43 lanny I did.
19:43 colomon rakudo: class Num is also { multi method Rat(Num $epsilon = 1.0e-6) { say self; }; }; 1.0.Rat;
19:43 p6eval rakudo c4dbb5: OUTPUT«1␤»
19:43 lanny Tried 'self' first and then noticed method Str { ~self } so figured to try +
19:44 colomon lanny: unfortunately I've got spectest running, so I can't just pry open Num.pm and insert your code.
19:44 lanny How very odd.  What I'm seeing after compiling is (exp(1)).Rat.perl.say gives no output
19:45 lanny colomon: no worries.
19:45 colomon but I don't see any obvious problems with the $num = +self line.
19:45 colomon insert some say statements in there and see where the code gets to?
19:46 diakopter pmurias: V8's runtime can thread across cores, but you can't access it from JS with the default build.  In the browser, Chrome can thread across cores, but all interthread communication has to be explicit across DOM frames (tabs) :)
19:46 diakopter (fyi)
19:46 lanny rakudo: class Num is also { multi method Rat(Num $eps = 4) { my $num = +self; say $num }; }; 3.14.Rat;
19:46 p6eval rakudo c4dbb5: OUTPUT«3.14␤»
19:46 lanny colomon: aye
19:47 sjohnson afternoon friends and perl 6 enthusiasts
19:48 lanny rakudo: say 1 / Inf
19:48 p6eval rakudo c4dbb5: OUTPUT«0␤»
19:49 lanny rakudo: say Inf / 1
19:50 p6eval rakudo c4dbb5: OUTPUT«Inf␤»
19:51 lanny rakudo: 1 / ( 0 / 1 )
19:51 p6eval rakudo c4dbb5:  ( no output )
19:51 lanny rakudo: say 1 / ( 0 / 1 )
19:51 p6eval rakudo c4dbb5:  ( no output )
19:52 colomon rakudo: say (1 / ( 0 / 1 )).perl
19:52 p6eval rakudo c4dbb5: OUTPUT«1/0␤»
19:52 lanny Ok.  it's because infix:</>( a, b/c ) is implemented as ( a * c / b )
19:52 Ryan52 joined #perl6
19:52 lanny Rather than a becoming a / 1 and doing the cross multiplication
19:53 colomon BTW, spectest finished, and I'm compiling your code as we speak.
19:54 lanny colomon: duh.  Rat.new(Int, Int) doesn't take named args.
19:55 dalek rakudo: a7d2a98 | (Solomon Foster)++ | src/setting/ (3 files):
19:55 dalek rakudo: Full support for Complex cos and acos.
19:55 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/a​7d2a982604df8d4f33896246e5f84e8acd50b9b
19:55 dalek rakudo: 1354976 | (Solomon Foster)++ | src/setting/ (3 files):
19:55 dalek rakudo: Full support for Complex tan and atan.
19:55 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/1​354976ccad5ce013194c1e4dddff48da2a223b2
19:55 dalek rakudo: be44f6a | (Solomon Foster)++ | src/setting/ (5 files):
19:55 dalek rakudo: Full support for Complex sec and asec.
19:55 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/b​e44f6a97a52d19df63b3d4a66b53c2bb9ac17a2
19:55 colomon lanny: as far as I know, named args don't work at all at the moment.  at least, I've had several fails with them in the last 24 hours.
19:57 colomon I should have noticed, but it seemed like the Rat.new was the safe part of your code.  :)
19:57 lanny Yeah.  :)
20:00 pugs_svn r28553 | fglock++ | [mp6] Javascript fixes, grammar fix
20:00 meppl joined #perl6
20:02 colomon oooo... when I do pi.Rat.perl, I get 355/113.  Shiny!  lanny++
20:03 lanny Yeah.  Debating if I want to go the distance for the first best-rat-approx within $epsilon but it's more code so thinking this is good enough
20:04 colomon seems like a heck of a good start, at any rate.
20:05 lanny Well it's using the continued fraction expansion.  At some point on my plate is to write a CE class.  Got most of the way in haskell and then life got busy.
20:05 colomon A pity I didn't have this when I was working on the Rat trig tests, it would have come in handy to get a highly accurate rational approx of pi.
20:05 lanny The CE expansion is guaranteed to be a best-rat-approx.  Just not necessarily the first closest.
20:10 quietfanatic joined #perl6
20:14 zloyrusskiy joined #perl6
20:18 mberends joined #perl6
20:29 tylerni7 joined #perl6
20:29 Chillance joined #perl6
20:33 payload joined #perl6
20:36 Ryan52 joined #perl6
20:43 pugs_svn r28554 | mberends++ | [sprixel/Test.pm.js] always initialize test counter to 1 for planless testing, moritz++ for noticing
20:45 mberends sprixel: use Test; is 1,"1","one";
20:45 p6eval sprixel 28553: OUTPUT«ok NaN - one␤»
20:45 diakopter sec
20:46 diakopter k now try
20:46 mberends sprixel: use Test; is 1,"1","one";
20:46 p6eval sprixel 28553: OUTPUT«ok 1 - one␤»
20:47 mberends done_testing should also be easy, will try it now
20:59 pugs_svn r28555 | mberends++ | [sprixel/Test.pm.js] done_testing function for planless testing
20:59 Ryan52 joined #perl6
21:01 Whiteknight joined #perl6
21:19 tak11 joined #perl6
21:20 mberends perl6: say 2 == 2 ?? "equal" !! "unequal"
21:20 p6eval pugs, rakudo be44f6, sprixel 28555: OUTPUT«equal␤»
21:20 p6eval ..elf 28555: OUTPUT«Unknown rule: infix:conditional␤It needs to be added to ast_handlers.␤ at ./elf_h line 2850␤»
21:21 mberends perl6: say "2" eq "2" ?? "equal" !! "unequal"
21:21 p6eval pugs, rakudo be44f6, sprixel 28555: OUTPUT«equal␤»
21:21 p6eval ..elf 28555: OUTPUT«Unknown rule: infix:conditional␤It needs to be added to ast_handlers.␤ at ./elf_h line 2850␤»
21:22 mberends perl6: say "2" == "2" ?? "equal" !! "unequal" # from t/01-sanity/03-equal.t
21:22 p6eval pugs, rakudo be44f6: OUTPUT«equal␤»
21:22 p6eval ..elf 28555: OUTPUT«Unknown rule: infix:conditional␤It needs to be added to ast_handlers.␤ at ./elf_h line 2850␤»
21:22 p6eval ..sprixel 28555: OUTPUT«execute(): execute error: comparison_op infix__S_EqualEqual not yet implemented; srsly!!?!?? at sprixel.pl line 89.␤»
21:23 mberends can probably fix sprixel there :)
21:25 mikehh joined #perl6
21:25 arnsholt_ joined #perl6
21:25 leedo_ joined #perl6
21:26 mtve joined #perl6
21:27 sjohnson joined #perl6
21:27 cxreg2 joined #perl6
21:27 nothingmuch_ joined #perl6
21:27 diakopte1 joined #perl6
21:27 mikehh joined #perl6
21:27 payload joined #perl6
21:27 Chillance joined #perl6
21:27 tylerni7 joined #perl6
21:27 mberends joined #perl6
21:27 pmurias joined #perl6
21:27 discHead joined #perl6
21:27 nihiliad joined #perl6
21:27 araujo joined #perl6
21:27 lanny joined #perl6
21:27 cdarroch joined #perl6
21:27 jan__ joined #perl6
21:27 Patterner joined #perl6
21:27 _Jedai_ joined #perl6
21:27 rhr_ joined #perl6
21:27 orafu joined #perl6
21:27 Intensity joined #perl6
21:27 colomon joined #perl6
21:27 silug joined #perl6
21:27 Rint joined #perl6
21:27 Helios- joined #perl6
21:27 kolibrie joined #perl6
21:27 ezra joined #perl6
21:27 pugs_svn joined #perl6
21:27 phenny joined #perl6
21:27 yves joined #perl6
21:27 christine joined #perl6
21:27 allbery_b joined #perl6
21:27 zerhash joined #perl6
21:27 PacoLinux joined #perl6
21:27 omega joined #perl6
21:27 gbacon joined #perl6
21:27 lambdabot joined #perl6
21:27 rjh joined #perl6
21:27 hudnix joined #perl6
21:27 broquaint joined #perl6
21:27 sri_ joined #perl6
21:27 dmpk2k joined #perl6
21:27 Infinoid joined #perl6
21:27 buu joined #perl6
21:27 garron joined #perl6
21:27 blaze-x joined #perl6
21:27 integral joined #perl6
21:27 clkao joined #perl6
21:27 ewilhelm joined #perl6
21:27 sbp joined #perl6
21:28 jjore_ joined #perl6
21:30 cj joined #perl6
21:32 cj joined #perl6
21:45 pugs_svn r28556 | mberends++ | [sprixel] do "2" == "2", 'make -f sprixel.mk test' passes t/01-sanity/03-equal.t
21:47 wknight8111 joined #perl6
21:51 pugs_svn r28557 | lwall++ | [STD] more lib movement
21:51 pugs_svn r28557 | [STD] don't add @_ or %_ until seen
21:51 pugs_svn r28557 | [STD] fix id collision between file scope and {} at pos 0 (diakopter++)
21:53 diakopte1 mberends: cool..  :D
21:55 diakopte1 moritz_: you around?
22:17 mberends diakopter++: sprixel passes 7/16 tests in t/spec/S03-operators/ternary.t
22:18 diakopter oh cool
22:18 * diakopter tries it
22:19 coldboot Wow, that's pretty cool. I can see Larry Wall working away at Perl6 right now.
22:19 diakopter eh
22:19 mberends gotta get this fudging harness more complete...
22:19 diakopter coldboot: he's standing in a crowd... :)
22:20 diakopter oh, perhaps you mean on the irc channel
22:20 coldboot Yeah I can see the pugs_svn bot.
22:20 coldboot What do you mean he's standing in a crowd?
22:21 diakopter I thought you meant you're one of the people here at this conf who can see him standing in a crowd at the front of the auditorium..
22:21 keeth_ joined #perl6
22:22 coldboot There's a conference going on right now?
22:22 diakopter 4 Infinite Loop
22:22 diakopter Cupertino
22:22 mberends perhaps coldboot is referring to commit r28557
22:22 diakopter coldboot: LLVM 2009 at Apple
22:23 kst joined #perl6
22:23 TimToady obviously Larry Wall could not be standing around at a conference *and* checking in code at the same time
22:23 mberends TimToady, have you seen Larry Wall today?
22:24 TimToady um, hmm, now that you mention it, I'm at the same conference, so yes
22:24 mberends maybe you saw someone else who saw him
22:24 diakopter I met a guy named Matt who saw him
22:25 sjohnson this is one of TimToady's cute children who learned how to type
22:25 sjohnson and help us with basic perl questions
22:25 mberends are TimToady's children bots? or butterflies?
22:26 sjohnson they're cute kids who crawl around on the floor and speak a bit of babytalk and english
22:26 diakopter phenny: tell quietfanatic welcome back from your chrysalis
22:26 phenny diakopter: I'll pass that on when quietfanatic is around.
22:27 diakopter mberends: ok
22:28 diakopter name a node in STD (or a symbol combo - with __S_ in the name) and I'll try to implement it next.
22:28 mberends from ternary.t: circumfix__S_Bra_Ket
22:30 diakopter oh, the -t doesn't work with TimToady's last commit
22:30 diakopter it can't find Test.pm
22:30 coldboot Is Duke Nukem Forever being written in Perl 6?
22:30 mberends sprixel testing works here without -t now
22:30 diakopter Duke Nukem Forever's hero's task is to implement Perl 6
22:31 diakopter the enemies are the spectests.
22:31 diakopter Duke Nukem Forever will be finished when all the enemies are encoded into the game as adversaries
22:32 diakopter then someone will actually have to try and beat the game.
22:32 diakopter but fortunately you can play the game before the game is finisehd
22:32 coldboot haha
22:32 TimToady are you using PERL6LIB envvar?
22:32 diakopter oo
22:32 TimToady you might need to add ./lib
22:33 diakopter oh I know
22:33 diakopter sprixel.pl is trying to read Test.pm locally and hack together the syml
22:33 diakopter s/hack/fake/
22:34 diakopter coldboot: but obviously you can't beat the game until the game is finished also.
22:36 diakopter "on which Perl 6 does your company standardize?"  "spectest_pugscode_svn_r4427293755732"
22:37 mberends :)
22:38 coldboot Why are there multiple implementations of Perl6, by the way?
22:38 quietfanatic joined #perl6
22:39 mberends Darwinian competition
22:39 quietfanatic Hi phenny.
22:39 phenny Hi quietfanatic
22:39 phenny quietfanatic: 22:26Z <diakopter> tell quietfanatic welcome back from your chrysalis
22:40 mberends coldboot: we can't agree on the best way to implement Perl 6, so we let the computers fight it out
22:40 diakopter mberends: more like, we can't agree on the slowest way to implement....
22:40 quietfanatic diakopter: That bus is beginning to feel like that yeah.
22:41 mberends Perl 6 on INTERCAL would win hands down
22:41 diakopter that bus's bus number needs to stay above 0
22:47 tak11 joined #perl6
22:51 diakopter mberends: do you want to make test 4 in ternary.t work by implementing operator div?
22:52 diakopter (while I look at test 9)
22:52 mberends ok, lemme take a hack at that
22:54 hercynium joined #perl6
22:55 pugs_svn r28558 | diakopter++ | [sprixel] non-implement circumfix__S_Bra_Ket and make sprixel.pl work with r-1
22:57 diakopter sprixel: say [1,2,3];
22:57 p6eval sprixel 28557: OUTPUT«␤»
22:57 diakopter heh
22:57 diakopter there's your non-Array
22:58 mberends useful for magicians who need to make things disappear
23:03 mberends S03-operators/equality.t blows up on Symbolic_unary prefix__S_Bang NYI, looks like low hanging fruit. let's try just a little bite...
23:11 ruoso joined #perl6
23:12 payload joined #perl6
23:18 pugs_svn r28559 | mberends++ | [sprixel/interp.js] add Symbolic_unary prefix__S_Bang (the logical ! operator) and pass 4/15 in S03-operators/equality.t
23:20 mberends diakopter: svn up your interp.js :)
23:26 crythias joined #perl6
23:31 mberends with better fudging, sprixel passes 8/15 of S03-operators/equality.t
23:50 pugs_svn r28560 | mberends++ | [sprixel] perform the integer div operator in interp.js and builtins.js
23:52 quietfanatic joined #perl6
23:53 mberends S03-operators/ternary.t passes 12/16

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

Perl 6 | Reference Documentation | Rakudo