Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2014-01-03

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:07 sftp joined #perl6
00:57 kaare_ joined #perl6
01:01 raydiak is there a consensus regarding file extentions for perl 6 scripts and modules? I've seen pl/p6/pl6, and pm/pm6
01:01 lue you forgot p6l and p6m :)
01:04 raydiak lue: my poor tangled neural pathways do not thank you :)
01:05 lue All are acceptable, though pl and pm can cause P5 confusion, imo. (In particular, I wish Rakudo would stop having their core implementation stored in .pm files)
01:06 raydiak yeah, I noticed vim for one doesn't notice if a pl or pm is perl 6
01:07 raydiak thanks lue++ ...as long as there isn't a single agreed standard, I won't worry about it
01:16 kaare_ joined #perl6
01:20 timotimo i have a binding <leader>p6 to :set ft=perl6
01:20 * lue should get back to that emacs mode sometime...
01:22 * timotimo is now interested in making a Perl6::Compiler::Whitelisted
01:24 timotimo it would be a QAST-level transformation that checks ops, calls and callmethods against whitelists and installs run-time checks for indirect lookups/method calls/sub calls/...
01:25 japhb raydiak: As the others have said, not much consensus.  When starting a project myself, I've been thinking about .p6 for binaries, .pm6 for modules, and .pod6 for pure docs.
01:25 lue ^ that's what I do now.
01:25 timotimo ^ i'm going to adopt that
01:26 hoverboard joined #perl6
01:26 lue Hm, I wonder where it is I tell GitHub that yes, README.pod6 is supposed to be a README...
01:27 raydiak that's what I'm doing too, though I'm not entirely convinced on p6 vs pl6
01:30 raydiak my fingers seem firmly convinced that it should be pl6 when I tell them to type p6
01:35 colomon joined #perl6
01:48 genehack joined #perl6
01:54 raiph joined #perl6
02:46 kurahaupo_mobile joined #perl6
02:56 hoverboard joined #perl6
03:13 raiph joined #perl6
03:18 zakalwe joined #perl6
03:18 zakalwe joined #perl6
03:27 zakalwe joined #perl6
03:27 zakalwe joined #perl6
03:33 zakalwe joined #perl6
03:46 SamuraiJack__ joined #perl6
03:51 dalek perl6-roast-data: 65b58f0 | coke++ | / (6 files):
03:51 dalek perl6-roast-data: today (automated commit)
03:51 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/65b58f0945
03:58 lue joined #perl6
04:11 jnap joined #perl6
04:13 atroxaper joined #perl6
04:28 [Coke] moar at 63.36% of jvm
04:30 atroxaper wow!
04:33 dalek rakudo/nom: dc1544f | coke++ | lib/Test.pm:
04:33 dalek rakudo/nom: track eval -> EVAL spec change
04:33 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/dc1544febe
04:34 [Coke] if I want to grab just that commit without doing a full merge (using a cherry pick) - that's fine, yes?
04:34 [Coke] (for moar-support branch)
04:36 * [Coke] assumes so.
04:36 dalek rakudo/moar-support: caa3b0f | coke++ | lib/Test.pm:
04:36 dalek rakudo/moar-support: track eval -> EVAL spec change
04:36 dalek rakudo/moar-support: review: https://github.com/rakudo/rakudo/commit/caa3b0f362
04:37 Timbus joined #perl6
04:41 preflex_ joined #perl6
04:59 kaleem joined #perl6
05:18 abnorman joined #perl6
05:24 [Coke] http://xkcd.com/1312/ - heh.
05:25 Grimnir joined #perl6
05:26 jnap joined #perl6
05:26 preflex joined #perl6
05:27 bonsaikitten joined #perl6
05:31 Grimnir_ joined #perl6
05:46 hoverboard joined #perl6
05:55 grondilu http://irclog.perlgeek.de/perl6/2014-01-02#i_8062978  « well, at some point, when Perl 6 is fast, we need to finish the final bootstrap stage of hiding nqp completely, but we're not there yet »
05:55 grondilu ^ I'm not sure this is a possibility, from a theoretical point of view.
05:56 grondilu as I understand it, a self-hosted language should be defined in at least one simplified version of itself.
05:57 grondilu It's something related to the work of the logician Alfred Tarski, I think
05:58 grondilu otherwise I could write to you a one-line implementation of Perl6.
05:58 grondilu something like:   eval { $*STDIN }
05:59 perigrin hiding not eliminating
05:59 grondilu oh, ok
06:00 perigrin nqp is [handwave] a subset of Perl6
06:00 geekosaur any time you have to drop into nqp from perl6 is a bug
06:00 lue grondilu: I think the idea was similar to hiding Parrot VM errors from rakudo-parrot users :)
06:01 geekosaur perl6 itself may do so, but you as someone writing a program in perl6 should not need to be aware of nqp or anything underneath it
06:03 grondilu not related: something's wrong with my local install of rakudo-parrot.
06:03 grondilu $ perl6 -e 'say "hi"'
06:03 grondilu ===SORRY!===
06:03 grondilu month out of range. Is: 0, should be in 1..12
06:03 grondilu ^ wtf?
06:04 moritz even my perl6-m gets that righter :-)
06:06 grondilu I did compile moarakudo recently.  Could it have interfere with my installation of rakudo*?   They are in very distinct directories, though.
06:08 * grondilu ran 'make install' in the rakudo* directory and now it works again.
06:12 Grimnir_ joined #perl6
06:18 baest joined #perl6
06:26 jnap joined #perl6
06:34 baest joined #perl6
06:39 arcterus joined #perl6
06:43 arcterus Is the sized-array branch ready to be merged, or is there still something that I need to do?
06:49 moritz arcterus: http://irclog.perlgeek.de/perl6/2013-12-14 has some review by jnthn++
06:50 nebuchadnezzar joined #perl6
06:51 arcterus joined #perl6
07:00 arcterus joined #perl6
07:00 arcterus moritz: thanks
07:13 PZt joined #perl6
07:15 kaleem joined #perl6
07:28 FROGGS[mobile] arcterus: I sent you a mail about that weeks ago
07:40 darutoko joined #perl6
07:54 brrt joined #perl6
08:05 [Keith]- joined #perl6
08:06 [Keith]- joined #perl6
08:09 zakharyas joined #perl6
08:13 [Keith] joined #perl6
08:13 [Keith] joined #perl6
08:21 hoverboard joined #perl6
08:21 hoverboard joined #perl6
08:23 masak morning, #perl6
08:26 moritz good actual morning, masak :-)
08:28 jnap joined #perl6
08:39 Piers joined #perl6
08:39 brrt \o #perl6
08:45 dmol joined #perl6
08:51 dalek roast: 14e7659 | (Elizabeth Mattijsen)++ | S02-types/deprecations.t:
08:51 dalek roast: Fix .eval deprecation test
08:51 dalek roast: review: https://github.com/perl6/roast/commit/14e765956b
09:01 brrt joined #perl6
09:02 brrt left #perl6
09:14 kurahaupo joined #perl6
09:16 FROGGS[mobile] grondilu: only do make m-install in your moarakudo, and it will only install perl6-m
09:19 daniel-s_ joined #perl6
09:27 xinming joined #perl6
09:29 jnap joined #perl6
09:35 nebuchadnezzar joined #perl6
09:35 arcterus joined #perl6
09:36 arcterus FROGGS[mobile]: sorry about that.  apparently my email's spam filter mistook your email for spam...
09:38 FROGGS[mobile] happens... :o)
09:40 FROGGS[mobile] would be awesome to get that feature in place... but I think you should talk about that with jnthn to make it happen
09:48 arcterus joined #perl6
09:49 arcterus FROGGS[mobile]: sounds good to me.
09:52 daxim joined #perl6
09:56 hoelzro morning #perl6!
09:57 raydiak \o good * hoelzro & #perl6
10:01 raydiak https://github.com/raydiak/pray # let the -Ofun be globally distributed :)
10:01 moritz raydiak++
10:01 hoelzro raydiak++
10:01 moritz raydiak: do you have some kind of release announcement?
10:02 raydiak moritz: I'm going to let you all tear it apart for a couple days before I announce
10:02 hoelzro huh
10:02 hoelzro this is the first I'm seeing of the new Perl 6 syntax highlighting!
10:02 hoelzro \o/
10:03 moritz \o/ indeed
10:03 moritz hoelzro++
10:03 hoelzro and the project is detected as Perl6!
10:03 hoelzro woooo
10:03 hoelzro took long enough =P
10:03 hoelzro I started that highlighter about a year ago!
10:08 hoelzro wow, Dec 18 2012
10:10 masak raydiak++ # impressive
10:11 masak is there someone we can contact at Github so we can send them flowers (for the Perl6 detection)? :)
10:11 FROGGS \o/
10:11 FROGGS hoelzro++ and raydiak++
10:12 FROGGS hmmm, gists called foo.p6 are not recognized as Perl 6 though
10:12 hoelzro masak: I added the detection too
10:12 FROGGS maybe it needs updating
10:12 hoelzro FROGGS: I've noticed it's a bit off as well
10:12 hoelzro ex. roast is just "Perl"
10:12 hoelzro FROGGS: wrt gists, before or after posting?
10:13 FROGGS before
10:13 FROGGS and after
10:13 hoelzro hmm
10:14 mohij joined #perl6
10:14 FROGGS v5 is     Perl6 52.1%    Perl 47.9%
10:14 FROGGS nice to know :o)
10:14 hoelzro it seems I'll be poking the GH folks soon...
10:14 hoelzro FROGGS: where do you see the language stats?
10:14 FROGGS there is a coloured bar on the front page of a repo
10:14 masak hoelzro++ # detection
10:15 FROGGS right underneath the title
10:15 FROGGS and above the list of files
10:15 masak hoelzro: do you work at Github?
10:15 hoelzro ah
10:15 hoelzro masak: no, I just wanted to do it
10:15 hoelzro it was my way to help out!
10:15 FROGGS you an even filter it: https://github.com/rakudo-p5/v5/search?l=perl6
10:15 hoelzro roast: Perl 99.99% Other 0.1% =(
10:15 hoelzro oh, that's neat
10:17 FROGGS even these recognize Perl 6 now, nice :o)  http://osrc.dfm.io/froggs
10:19 sqirrel joined #perl6
10:21 FROGGS damn, now I want to buy a github mug :/ # http://shop.github.com/
10:22 masak "Carl Mäsak is a serious Perl coder who loves pushing code." -- I should put that on my business card.
10:23 masak "It seems like Carl is—or should be—friends with timo." -- timotimo: I should buy you a beer sometime :)
10:24 FROGGS masak: just come to the gpw in march :o)
10:26 masak unlikely :/
10:27 FROGGS :(
10:28 FROGGS but you are coming to the yapc::eu, right?
10:29 jnap joined #perl6
10:32 SamuraiJack__ joined #perl6
10:32 SHODAN joined #perl6
10:34 masak yes, I'll do my very best.
10:34 berekuk joined #perl6
10:36 raydiak alright, bed for me; 'night #perl6
10:37 masak 'night, raydiak++
10:37 FROGGS gnight raydiak
10:49 arcterus joined #perl6
11:04 hoelzro well, I done goofed.
11:05 hoelzro I forgot to include .t as an extension for Perl 6 in both pygments *and* linguist
11:05 * hoelzro facepalms
11:05 hoelzro I know what I'm doing after work!
11:13 moritz you facepalm after work?
11:13 moritz (just kidding)
11:14 hoelzro heh
11:15 atroxaper joined #perl6
11:16 dagurval hey FROGGS, osrc.dfm.io thinks we should be friends :P
11:16 FROGGS well, it is in the internet, it must be true :o)
11:17 dagurval hehe
11:25 masak I read "facepalm after work" and pictured hoelzro in a reclining chair on a South Sea beach, being wafted with palm leaves.
11:27 FROGGS hehe
11:28 hoelzro that would be nice
11:29 hoelzro are there any Perl5 files in roast?
11:29 hoelzro other than fudge*?
11:30 jnap joined #perl6
11:31 moritz test_summary
11:31 moritz and iirc the socket tests use a p5 script
11:31 moritz not sure about that one though
11:32 dagurval rp: sub a(Pair $x) { }; a 'hello' => sub ($a) { };; a 'hello' => sub($b) { }
11:32 camelia rakudo-parrot dc1544: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/WTy8KjmzFkâ�¤Variable '$b' is not declaredâ�¤at /tmp/WTy8KjmzFk:1â�¤------> [32mo' => sub ($a) { };; a 'hello' => sub($b[33mâ��[31m) { }[0mâ�¤    expecting any of:â�¤        postfixâ�¤Â»
11:32 dagurval should space between sub and ($b) really be required?
11:32 moritz std: sub($b) { }
11:32 camelia std 09dda5b: OUTPUT«[31m===[0mSORRY![31m===[0m�Variable $b is not predeclared at /tmp/Qn6x5LdRl7 line 1:�------> [32msub([33m�[31m$b) { }[0m�Word 'sub' interpreted as 'sub()' function call; please use whitespace around the parens at /tmp/Qn6x5LdRl7 line 1:�------> …»
11:32 dagurval STD says YES
11:33 hoelzro ok, thanks moritz
11:33 hoelzro I think I should use roast to tune the language detection a bit
11:35 FROGGS hoelzro:v5 could be more challenging
11:35 spider-mario joined #perl6
11:36 hoelzro indeed =/
11:36 hoelzro I think I'll have to spend a bit of time on this, actually
11:36 hoelzro stupid linguist doesn't allow you to provide your own heuristics =/
11:37 hoelzro pygments gets it right 99% of the time
11:37 hoelzro linguist 1%
11:37 hoelzro =( =( =(
11:38 moritz so, just always revert linguist's results?
11:40 masak :P
11:40 hoelzro haha
11:40 masak yeah, clearly listen to what linguist says, and then do the opposite.
11:40 masak it's only right in 1% of the cases, so you will have a high success rate.
11:41 woolfy dagurval: at the moment no special Perl 6 happenings are foreseen at FOSDEM. Did you have something in mind?  Want to volunteer?  :-)
11:42 masak woolfy! \o/
11:43 FROGGS hi woolfy
11:44 woolfy ohoh...
11:44 woolfy :-)
11:45 dagurval woolfy: I was hoping to find an excuse to grab a few beers with #perl6 people :).
11:45 woolfy I forgot to wish you all a happy & healthy & successful 2014.  Here it is.  Happy & healthy & successful 2014 to all of you.
11:46 woolfy dagurval: in that case, be there at the friday night... the night before the event is the famous beer night at Delirium: Liz and I will certainly try to be there...  https://fosdem.org/2014/practical/beerevent/
11:46 masak woolfy: likewise. and since I like your ambitions/dreams re Perl 6, may they all come true.
11:47 masak wow, a beer night *at* Delirium. that sounds highly dangerous.
11:47 woolfy masak: thanks, I hope these dreams will come true...  even though I never did much to make it so (except for supporting Liz and some of you)
11:48 woolfy Delirium Café is an immensely large pub and they have over 2,400 different beers, the book with descriptions of all their beers is a pleasure to browse through
11:48 masak woolfy: you're being too modest. if there's anyone's support I feel more or less constantly, it's yours. <3
11:50 dagurval This year I'll be sure to come timely. Last year it was full! Me and a friend I was traveling with gave up on it and ended up at another bar where the only table available was next to a bunch of XMPP guys. Which was great too, they were a great bunch of guys :).
11:51 woolfy Me modest?  Hehe...
11:51 masak :)
11:52 woolfy dagurval: last year we were there at 17:00 and we "conquered" a nice big round table on the 1st floor, with enough space for 12 people and we had a nice and pleasant evening with a lot of Perl people, including some Perl 6 people
11:53 masak Perl 6 projects I want to work on in 2014: finish up p6cc2012, Nomic, Dark, macros/d3, MoarVM, secretary bot.
11:53 woolfy I hope we can repeat that same conquering this year.  I hope I will not have pneumonia like last year, because I was not allowed to have any alcohol next to my medication...
11:53 woolfy masak++
11:53 masak trust me, this is more of a '++masak' declaration :P
11:54 masak but a guy can dream.
12:11 timotimo with a custom repr, would it be easy to implement mmapped file IO and shared memory regions?
12:13 moritz maybe for buffers
12:13 timotimo that was my thought, yes
12:14 timotimo i'm actually more interested in shared memory at the moment, though
12:14 timotimo there's an API with which you can display video frames to mplayer using shared memory. that would be a cool place for experimentation
12:14 timotimo (don't expect framerates above 1, though)
12:14 moritz 1 per... minute? :-)
12:15 timotimo yeah :)
12:22 timotimo oh, actually i was wrong
12:22 timotimo you can pipe video data through the stdin of mplayer
12:31 jnap joined #perl6
12:31 jnthn afternoon o/
12:31 preflex jnthn: you have 1 new message. '/msg preflex messages' to read it.
12:32 moritz \o jnthn
12:32 jnthn 63%...not bad
12:32 jnthn timotimo: How's le sort going?
12:32 FROGGS hi jnthn
12:32 timotimo jnthn: ran into a wall; can you look at it, too?
12:33 timotimo https://gist.github.com/timo/af7bc1b6725d1734a6eb
12:33 jnthn I'm looking at the wall you ran into. It looks quite intact, tbh.
12:33 jnthn :P
12:33 timotimo it seems to crash between "before the comparison" and "writing the * value to the b_list", so my guess is the call to comparator is somehow problematic
12:35 jnthn What's it crash with?
12:35 timotimo outer frame is of wrong type or something like that
12:35 jnthn ugh
12:35 timotimo When invoking frame_name_9928, Provided outer frame 0x5000510 (MVMStaticFrame frame_name_9929) does not match expected static frame type 0x5000390 (MVMStaticFrame message)
12:36 jnthn That looks like an error reporting fail...
12:36 timotimo in any case i can't tell what's wrong :(
12:37 * jnthn builds
12:37 jnthn If we can nail this before today's test run we might get some more %s :)
12:37 timotimo i'd like that :)
12:37 timotimo i think we have like 6 hours before it starts
12:39 mohij joined #perl6
12:43 FROGGS jnthn: btw, that invocation of rethrow explodes here: https://github.com/rakudo/rakudo/blob/moar-support/src/core/Exception.pm#L180
12:44 FROGGS -e "Nil.match" is a good test for that
12:47 jnthn timotimo: It looks like the dispatch to postcircumfix:[ ] fails in the block in the setting that is passed as the comparator.
12:47 timotimo oh, interesting
12:48 jnthn I wonder if we've an off-by-one somewhere and are passing something past the end of the input data?
12:48 jnthn In:
12:48 jnthn if $i0 < $right && ($i1 > $end || -1 == comparator(nqp::atpos(@data, $i0), nqp::atpos(@data, $i1))) {
12:48 jnthn Should that not be $i1 >= $end
12:48 FROGGS so I think it always explodes atm when it wants to print the list of candidates of a method call when
12:49 FROGGS s/when//
12:49 timotimo that's a good question. let me look at the code i implemented again
12:49 jnthn FROGGS: Yes, looks like
12:49 timotimo you are right.
12:50 timotimo i'm annoyed that the error was so impenetrable :\
12:50 hoelzro fg
12:50 hoelzro dammit
12:50 hoelzro apologies
12:50 timotimo you're back! \o/
12:51 hoelzro I am!
12:51 jnthn Well, when the error reporting is still busted... I but it mostly by just looking carefully at the backtrace though.
12:51 timotimo mhm. i should adopt that methodology
12:52 timotimo if it works now, i'll commit it
12:54 jnthn Well, now it doesn't crash, but it doesn't sort either :P
12:54 timotimo heh.
12:54 timotimo i think it needs to be return @b_list at the end
12:54 timotimo that doesn't explain why it doesn't look sorted at a ll, though
12:55 timotimo hm, no, it should be return @data
12:56 timotimo oh
12:56 timotimo it's expected to modify the list in-place
12:56 timotimo so the nqp::clone in the beginning is what busts it
12:57 jnthn ...but, you use @data everywhere else?
12:57 timotimo yeah, but not @input_data ;)
12:58 timotimo however, i can use this to have nqp::list_i for both arrays and be a tiny bit more efficient!
13:01 masak r: role Summable { method sum { [+] self.list } }; my @a = 1, 2, 3; @a does Summable; say @a.sum
13:01 camelia rakudo-parrot dc1544, rakudo-jvm dc1544: OUTPUT«6␤»
13:02 masak whoa.
13:02 masak r: role Proddable { method prod { [*] self.list } }; my @a = 10, 20, 30; @a does Proddable; say @a.prod
13:02 camelia rakudo-parrot dc1544, rakudo-jvm dc1544: OUTPUT«6000␤»
13:02 masak \o/
13:03 moritz p: role Summable { method sum { [+] self } }; my @a = 1..3; say (@a does Summable).sum
13:03 camelia rakudo-parrot dc1544: OUTPUT«6␤»
13:04 jnthn timotimo: oh, I see what you mean...yeah
13:04 * jnthn removes the clone and builds, to see if it helps :)
13:08 xfix http://codegolf.stackexchange.com/a/17304/3103
13:08 xfix Does it really have to be so ugly?
13:09 xfix I need a function that finds most common keys in a bag.
13:09 moritz xfix: you shouldn't look for codegolf solutions when you want a pretty solution
13:10 xfix I don't mean this. I just ask if this could be shorter?
13:10 moritz first you find it ugly, now you don't want it prettier, but shorter?
13:10 xfix Python has most_common() method in counters.
13:10 moritz call me confused.
13:10 xfix I just was asking if there is something like that, so I wouldn't have to cast between many different types.
13:11 rindolf joined #perl6
13:11 moritz p: say bag <a b a b c b>
13:11 camelia rakudo-parrot dc1544: OUTPUT«bag(a(2), b(3), c)␤»
13:11 moritz p: say bag(<a b a b c b>).max
13:11 camelia rakudo-parrot dc1544: OUTPUT«bag(a(2), b(3), c)␤»
13:11 moritz p: say bag(<a b a b c b>).pairs.max(*.value)
13:11 camelia rakudo-parrot dc1544: OUTPUT«"b" => 3␤»
13:11 moritz p: say bag(<a b a b c b>).pairs.max(*.value).key
13:11 camelia rakudo-parrot dc1544: OUTPUT«b␤»
13:12 masak p: say bag(<a b a b c b>).pairs.sort
13:12 camelia rakudo-parrot dc1544: OUTPUT«"a" => 2 "b" => 3 "c" => 1␤»
13:12 masak meh.
13:12 masak p: say bag(<a b a b c b>).pairs.sort(-*.value)
13:12 camelia rakudo-parrot dc1544: OUTPUT«"b" => 3 "a" => 2 "c" => 1␤»
13:12 xfix At least removal of ».key would be nice.
13:12 timotimo xfix: are you GlitchMr?
13:12 xfix yep
13:13 moritz ... but now your nick is golfed.
13:14 timotimo :)
13:14 masak xfix: does it really have to be so ugly? I need a nick that says "GlitchMr", but with fewer characters.
13:15 timotimo :P
13:15 xfix Yeah, sort of.
13:17 masak there's something about the Schwartzian transform that could be generalized and put into a language.
13:17 masak maybe LINQ is the closest manifestation of that anywhere.
13:18 masak there's also (which I've seen once, don't remember where) "do operation under a transform" which is an interesting idea.
13:19 xfix That indeed looks like an interesting idea. It would require a perfect object wrapper which remembers the position in list, but yeah.
13:19 skids joined #perl6
13:24 abnorman joined #perl6
13:25 shinobicl joined #perl6
13:28 masak I'm not quite sure what it would require.
13:28 masak I guess what I'm missing is some nice theory to bind it all together.
13:28 moritz probably a whole lot of architecture would be required :-)
13:28 masak it does remind me somehow about functors and natural transformations.
13:29 masak moritz: I'm not even sure about that.
13:29 masak moritz: it might be simply syntactic sugar.
13:29 timotimo there we go :)
13:29 masak I'm *not* suggesting we cram it into Perl 6, though :)
13:29 dalek rakudo/moar-support: f920930 | (Timo Paulssen)++ | src/vm/moar/ (2 files):
13:29 dalek rakudo/moar-support: implement p6sort on moarvm.
13:29 dalek rakudo/moar-support: review: https://github.com/rakudo/rakudo/commit/f920930f99
13:29 moritz and now, ladies and gentlemen, watch masak while he enters category theory :-)
13:29 masak nah, I already bother you enough with category theory :P
13:30 timotimo i don't categorically oppose that
13:30 * masak .oO( keep your eye on this identity arrow... focus on it... your eyelids are getting veeeeery heavy... )
13:30 atroxaper joined #perl6
13:32 jnap joined #perl6
13:34 * colomon zzzzzzzzzzzzzzzzzzzzz
13:34 * jnthn shoots an arrow at masak
13:34 masak r: sub length-of-sleep($sleep) { $sleep.chars }; say length-of-sleep 'zzzzzzzzzzzzzzzzzzzzz'
13:34 camelia rakudo-parrot dc1544, rakudo-jvm dc1544: OUTPUT«21␤»
13:35 jnthn multi sleep(Str $s where /^z+$/) { sleep($s.chars) } # :P
13:35 masak jnthn: you should definitely not shoot arrows inside of a category! all it takes is for a chain of arrows to lead back to you, and suddenly (by the definition of "category") you've shot yourself!
13:36 xenoterracide joined #perl6
13:36 masak r: multi sleep(Str $s where /^z+$/) { sleep($s.chars) }; say "going to sleep {now}"; sleep("zzz"); say "awake {now}!"
13:36 camelia rakudo-parrot dc1544: OUTPUT«going to sleep Instant:1388756234.272857␤Cannot call 'sleep'; none of these signatures match:␤:(Str $s)␤  in any  at gen/parrot/BOOTSTRAP.nqp:1218␤  in any  at gen/parrot/BOOTSTRAP.nqp:1209␤  in sub sleep at /tmp/L4NBiYKVry:1␤  in sub sleep a…»
13:36 camelia ..rakudo-jvm dc1544: OUTPUT«going to sleep Instant:1388756235.742␤Cannot call 'sleep'; none of these signatures match:␤:(Str $s)␤  in any  at gen/jvm/BOOTSTRAP.nqp:1201␤  in sub sleep at /tmp/9Cv3wp2Qys:1␤␤»
13:36 masak aww
13:37 masak the error is thrown from 'any'?
13:37 jnthn Oh...it musn't work 'cus sleep is not multi in the setting
13:37 jnthn So declaring one here hides it
13:37 benabik joined #perl6
13:37 masak oh!
13:38 masak r: multi sleep(Str $s where /^z+$/) { OUTER::sleep($s.chars) }; say "going to sleep {now}"; sleep("zzz"); say "awake {now}!"
13:38 camelia rakudo-jvm dc1544: OUTPUT«going to sleep Instant:1388756326.002␤No such method 'Any' for invocant of type 'Int'␤  in any  at gen/jvm/BOOTSTRAP.nqp:1658␤  in sub sleep at /tmp/B9iameDYk8:1␤␤»
13:38 camelia ..rakudo-parrot dc1544: OUTPUT«going to sleep Instant:1388756324.020155␤No such method 'Any' for invocant of type 'Int'␤  in any  at gen/parrot/BOOTSTRAP.nqp:1674␤  in any  at gen/parrot/BOOTSTRAP.nqp:1669␤  in sub sleep at /tmp/BtacqqnHPF:1␤  in sub sleep at /tmp/BtacqqnHPF…»
13:38 masak mrrrrgh
13:38 masak can't even get some decent &sleep around here!
13:39 jnthn bbiab
13:39 masak anyway, brownie points to whoever spectests and pushes making sleep a multi in the setting.
13:41 ajr joined #perl6
13:51 grondilu r: say ([*] 2 .. $_) / (2*log(2)**($_+1)) given 15
13:51 camelia rakudo-jvm dc1544: OUTPUT«2.3028319097785316E14␤»
13:51 camelia ..rakudo-parrot dc1544: OUTPUT«230283190977853␤»
13:52 * colomon currently has a p5 program calling a p5 program which calls a p6 program.  Gonna rewrite the top-level one to p6, though, I think.
13:52 grondilu r: my $n = 15; my $h = ([*] 2 .. $n) / (2*log(2)**($n+1)); say abs($h - $h.round);
13:52 camelia rakudo-parrot dc1544, rakudo-jvm dc1544: OUTPUT«0.15625␤»
13:53 grondilu n: my $n = 15; my $h = ([*] 2 .. $n) / (2*log(2)**($n+1)); say abs($h - $h.round);
13:53 camelia niecza v24-109-g48a8de3: OUTPUT«(timeout)[auto-compiling setting]␤»
13:56 * grondilu is working on http://rosettacode.org/wiki/Hickerson_series_of_almost_integers#Perl_6
13:57 grondilu How can I have better precision than Num?  Do I have to use native types?
14:02 dalek rakudo/moar-support: 1324a70 | jonathan++ | src/core/GatherIter.pm:
14:02 dalek rakudo/moar-support: Fix accidental double-nesting in gather/take hack.
14:02 dalek rakudo/moar-support:
14:02 dalek rakudo/moar-support: Will go away once we get the real gather/take implementation done.
14:02 dalek rakudo/moar-support: review: https://github.com/rakudo/rakudo/commit/1324a70d8f
14:02 colomon grondilu: native types will not help at all
14:03 jnthn grondilu: Use Rat or FatRat?
14:03 jnthn FROGGS: Above seems to fix first two issues in https://gist.github.com/FROGGS/cbdcd4054a450d0faa22
14:03 colomon that won't help with calls to log, but it might help with **?
14:03 jnthn ah, true...
14:04 masak grondilu: use Rat or FatRat, by rounding the denominator to the nearest integer?
14:04 FROGGS jnthn++
14:04 FROGGS will test is a sec
14:04 masak there will be loss of precision, but maybe not by much...
14:04 masak feels like it would be very negligible for large denominators.
14:07 pnu joined #perl6
14:09 masak pnu: you left on a jet plane, not knowing when you'd be back again -- and you came back within one minute!? :P
14:09 masak that's some jet plane.
14:10 * grondilu tried with Rat and FatRats, does not help much.
14:10 masak aww
14:10 pnu masak: yes.. just flying from a cloud to another.. ;-)
14:10 grondilu also I had to build a Rat constant for log(2)
14:11 grondilu constant log2 = log(2).Rat
14:11 masak that sounds sensible in any case.
14:11 masak as it's computed a lot.
14:11 masak s/computed/used/
14:11 grondilu isn't it cached by the optimizer?
14:11 timotimo no, i don't think it does that
14:11 timotimo ... maybe it does
14:12 timotimo look for a WVal in --target=optimize
14:12 * timotimo has no compiled perl6 hand
14:12 timotimo handy
14:13 * grondilu once wondered if a "deterministic" trait could not be used so that an optimizer would know whether or not he can cache a function call with a literal or constant argument
14:13 timotimo "is pure"
14:14 grondilu oh, I did not know about this trait.
14:14 timotimo it may be an implementation detail :P
14:14 timotimo also it will only work locally
14:14 grondilu anyway, this rosetta task is a tricky one.
14:15 dalek rakudo/moar-support: 7118b92 | (Timo Paulssen)++ | src/Perl6/Metamodel/BOOTSTRAP.nqp:
14:15 dalek rakudo/moar-support: implement arity_fail for moarvm's binder.
14:15 dalek rakudo/moar-support: review: https://github.com/rakudo/rakudo/commit/7118b9234b
14:16 grondilu Maybe we could use a FatNum type ;-)
14:16 jnap joined #perl6
14:17 timotimo you may need to make clean to get the new bootstrap to stick :(
14:17 timotimo something's not quite right in the makefile i fear
14:26 grondilu r: say map &log, 1 .. 5
14:26 camelia rakudo-jvm dc1544: OUTPUT«0 0.7924812503605781 1.6094379124341003␤»
14:26 camelia ..rakudo-parrot dc1544: OUTPUT«0 0.792481250360578 1.6094379124341␤»
14:26 denis_boyun joined #perl6
14:26 grondilu r: say map &log, 6 .. 10
14:26 camelia rakudo-jvm dc1544: OUTPUT«0.9207822211616018 0.946394630357186 2.302585092994046␤»
14:26 camelia ..rakudo-parrot dc1544: OUTPUT«0.920782221161602 0.946394630357186 2.30258509299405␤»
14:26 grondilu r: say map { log($_) }, 6 .. 10
14:26 camelia rakudo-jvm dc1544: OUTPUT«1.791759469228055 1.9459101490553132 2.0794415416798357 2.1972245773362196 2.302585092994046␤»
14:26 camelia ..rakudo-parrot dc1544: OUTPUT«1.79175946922805 1.94591014905531 2.07944154167984 2.19722457733622 2.30258509299405␤»
14:27 grondilu sorry for the noise, I'm trying to reproduce a local weird behavior
14:28 grondilu r: say map &log, 1 .. 10
14:28 camelia rakudo-jvm dc1544: OUTPUT«0 0.7924812503605781 0.8982444017039272 0.9357849740192015 0.9542425094393249␤»
14:28 camelia ..rakudo-parrot dc1544: OUTPUT«0 0.792481250360578 0.898244401703927 0.935784974019201 0.954242509439325␤»
14:29 grondilu ^ this
14:29 kbaker_ joined #perl6
14:29 grondilu r: say (map &log, 1 .. 10).elems
14:29 camelia rakudo-parrot dc1544, rakudo-jvm dc1544: OUTPUT«5␤»
14:29 grondilu why 5 elements??
14:30 grondilu oh, I think I see
14:30 grondilu log can take two positional arguments, so it takes them two at a time
14:31 jnthn r: say (map *.log, 1..10).elems
14:31 camelia rakudo-parrot dc1544, rakudo-jvm dc1544: OUTPUT«10␤»
14:31 sqirrel joined #perl6
14:32 grondilu it's an easy error to make, imho.  The logarithm base should not be given positionally, maybe.
14:32 grondilu r: say log(10, :base(10))
14:32 camelia rakudo-jvm dc1544: OUTPUT«Unexpected named parameter 'base' passed␤␤»
14:32 camelia ..rakudo-parrot dc1544: OUTPUT«Unexpected named parameter 'base' passed␤  in sub log at gen/parrot/CORE.setting:3847␤  in block  at /tmp/jyJ3iBKewN:1␤␤»
14:33 grondilu r: say log(10, 10)
14:33 camelia rakudo-parrot dc1544, rakudo-jvm dc1544: OUTPUT«1␤»
14:35 timotimo r: say (1 .. 10)».log
14:35 camelia rakudo-jvm dc1544: OUTPUT«0 0.6931471805599453 1.0986122886681098 1.3862943611198906 1.6094379124341003 1.791759469228055 1.9459101490553132 2.0794415416798357 2.1972245773362196 2.302585092994046␤»
14:35 camelia ..rakudo-parrot dc1544: OUTPUT«0 0.693147180559945 1.09861228866811 1.38629436111989 1.6094379124341 1.79175946922805 1.94591014905531 2.07944154167984 2.19722457733622 2.30258509299405␤»
14:35 FROGGS jnthn: I can confirm that it works :o)
14:36 johnmilton joined #perl6
14:38 colomon r: [+] (1..100).map(-> $k { -1.FatRat ** ($k - 1) / $k })
14:38 camelia rakudo-parrot dc1544, rakudo-jvm dc1544: ( no output )
14:38 colomon r: my $ln2 =  [+] (1..100).map(-> $k { -1.FatRat ** ($k - 1) / $k }); say $ln2
14:38 camelia rakudo-parrot dc1544, rakudo-jvm dc1544: OUTPUT«-5.18737751763962026080511767565825315790897␤»
14:38 colomon r: my $ln2 =  [+] (1..100).map(-> $k { (-1).FatRat ** ($k - 1) / $k }); say $ln2
14:38 camelia rakudo-parrot dc1544, rakudo-jvm dc1544: OUTPUT«0.688172179310195203244645882693484065938370␤»
14:39 colomon r: my $ln2 =  [+] (1..100).map(-> $k { (-1).FatRat ** ($k - 1) / $k }); say ln 2 - $ln2
14:39 camelia rakudo-jvm dc1544: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/5GHTdx8GBkâ�¤Undeclared routine:â�¤    ln used at line 1. Did you mean '&on', '&lc'?â�¤â�¤Â»
14:39 camelia ..rakudo-parrot dc1544: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/zK2v4p4fIqâ�¤Undeclared routine:â�¤    ln used at line 1. Did you mean '&lc'?â�¤â�¤Â»
14:39 colomon r: my $ln2 =  [+] (1..100).map(-> $k { (-1).FatRat ** ($k - 1) / $k }); say 2.log - $ln2
14:39 camelia rakudo-jvm dc1544: OUTPUT«0.004975001249750033␤»
14:39 camelia ..rakudo-parrot dc1544: OUTPUT«0.00497500124975003␤»
14:39 colomon ugh
14:39 colomon r: my $ln2 =  [+] (1..200).map(-> $k { (-1).FatRat ** ($k - 1) / $k }); say 2.log - $ln2
14:39 camelia rakudo-parrot dc1544: OUTPUT«0.00249375007812103␤»
14:39 camelia ..rakudo-jvm dc1544: OUTPUT«0.0024937500781210264␤»
14:39 colomon r: my $ln2 =  [+] (1..1000).map(-> $k { (-1).FatRat ** ($k - 1) / $k }); say 2.log - $ln2
14:39 camelia rakudo-parrot dc1544: OUTPUT«0.000499750000124921␤»
14:39 camelia ..rakudo-jvm dc1544: OUTPUT«4.997500001249211E-4␤»
14:40 colomon r: my $ln2 =  [+] (1..2000).map(-> $k { (-1).FatRat ** ($k - 1) / $k }); say 2.log - $ln2
14:40 camelia rakudo-jvm dc1544: OUTPUT«2.499375000077908E-4␤»
14:40 camelia ..rakudo-parrot dc1544: OUTPUT«0.000249937500007902␤»
14:40 * colomon is impressed at the speed, depressed at the accuracy
14:40 moritz colomon++ # taylored functions
14:42 timotimo jnthn: any way we can make sure grammars and other things that i create inside an eval will get cleaned up by the java and/or parrot and/or moarvm GC after they become unreachable?
14:42 moritz hunt down the references to them?
14:42 timotimo not sure how :|
14:43 moritz do we create new SC in an eval?
14:43 * moritz neither
14:43 timotimo that was my first thought, but i didn't know how to check
14:44 benabik joined #perl6
14:48 raiph joined #perl6
14:49 denis_boyun joined #perl6
14:50 grondilu colomon: this converges way too slowly.  Feel free to suggest a faster series.
14:50 colomon grondilu: I'm working on it.
14:52 grondilu isn't there a continued fraction, maybe?
14:52 colomon grondilu: I'm trying to implement (13) from http://mathworld.wolfram.com/NaturalLogarithmof2.html
14:52 colomon but I'm having an issue of some sort here.
14:53 grondilu lol
14:53 grondilu what a formula :)
14:53 colomon I'm building very elaborate FatRats which are never-the-less not terribly close to ln2
14:53 grondilu that's really the big guns
14:53 colomon I implemented sub infix:<choose>($n, $k) to get there.  ;)
14:54 colomon missed a term in the formula
14:55 colomon that's got it working now
14:56 timotimo xfix: now you've made me try some codegolf myself :|
14:56 btyler joined #perl6
14:56 grondilu (18) and (19) should converge fast too.
14:57 grondilu (and much easier to implement)
14:58 colomon grondilu: sorry, got distracted by my wife
14:58 xfix timotimo, yeah. Sadly, Perl 6 is somewhat verbose (mandatory whitespace), but it works well in certain cases.
14:59 colomon https://gist.github.com/colomon/8239209
14:59 timotimo xfix: ".trim-trailing" *g*
14:59 colomon grondilu: try FatRat.new(33636436125281008291653702688829128057940764118386796024399, 48527119591121290137917232399964930206766900113689699942400) for your 2.log
15:00 xfix I mean, you cannot say `say[+]lines`. You have to type `say [+] lines`.
15:00 * grondilu tries it
15:01 timotimo i'm trying the "transpose text" golf right now, but [Z~] will stop at the shortest line :(
15:01 colomon grondilu: there may be precision issues with using printf and a FatRat, btw.  but if you switch to .gist for the output it does a good job
15:02 grondilu damn, amazingly even with this ln(2), it fails for n >= 16
15:02 xenoterracide joined #perl6
15:04 colomon grondilu: hold on, let me try to generate a better one for you.
15:04 colomon FatRat.new(11497654316995854314538600826176386914675840284781772934832310629025531009647835922483180950073671, 16587608864985500678430621519107217028770145595488224555912965535307732927005633645841205742796800)
15:04 jnthn FROGGS: spectest looks a bit better in S05 after that fix too...
15:04 colomon r: say FatRat.new(11497654316995854314538600826176386914675840284781772934832310629025531009647835922483180950073671, 16587608864985500678430621519107217028770145595488224555912965535307732927005633645841205742796800)
15:05 camelia rakudo-parrot dc1544, rakudo-jvm dc1544: OUTPUT«0.693147180559945309417232121458176720436878413072877796805022437563561095101202914337276226823724532␤»
15:07 * grondilu uses constant ln2 = [+] map { 1.FatRat / 2**$_ / $_ }, 1 .. *;
15:08 grondilu r: constant ln2 = [\+] map { 1.FatRat / 2**$_ / $_ }, 1 .. *; say .exp for ln2[^10]
15:08 camelia rakudo-parrot dc1544: OUTPUT«1.64872127070013␤1.86824595743222␤1.94773404105468␤1.97840638913757␤1.99081015044697␤1.99600130826677␤1.99823023188594␤1.99920616848774␤1.99964007107279␤1.99983535795882␤»
15:08 camelia ..rakudo-jvm dc1544: OUTPUT«1.6487212707001282␤1.8682459574322223␤1.9477340410546757␤1.9784063891375727␤1.9908101504469735␤1.9960013082667747␤1.9982302318859413␤1.999206168487736␤1.999640071072791␤1.999835357958819␤»
15:10 grondilu I tried with the 1000th term of (18) with no success :(
15:11 grondilu no success with the 2000th term either.
15:11 moritz aren't there any spigot algorithms for ln 2?
15:12 grondilu I suspect this is not the issue here.  I think FatRat is just not Fat enough.
15:13 grondilu I should try with colomon's last value, though
15:14 thou joined #perl6
15:14 colomon FatRat is infinitely fat
15:15 diakopter also heavy
15:16 grondilu colomon: FatRat.new(11497654316995854314538600826176386914675840284781772934832310629025531009647835922483180950073671, 16587608864985500678430621519107217028770145595488224555912965535307732927005633645841205742796800) failed as well for n >= 16
15:16 colomon grondilu: that sounds like something else is wrong here.
15:17 grondilu the code I'm trying:  https://gist.github.com/grondilu/8239521
15:19 dalek rakudo/moar-support: b7e8ae0 | jonathan++ | .gitignore:
15:19 dalek rakudo/moar-support: Update .gitignore.
15:19 dalek rakudo/moar-support: review: https://github.com/rakudo/rakudo/commit/b7e8ae07c1
15:20 jnthn timotimo: If you want something to look into with a potentially very big win: t\spec\S32-num\rat.rakudo.moar hangs on the first test.
15:20 jnthn timotimo: If Rats are busted this could explain various hangs. Also could win quite a few tests :)
15:22 jnthn timotimo: oh, actually...maybe it hangs a bit later
15:22 timotimo probably didn't output all of its stuff before it hung?
15:22 jnthn Yeah
15:22 jnthn Golfed it
15:22 jnthn It's Rat.new that hangs
15:22 jnthn (with no args)
15:22 timotimo i can look into that :)
15:23 ajr joined #perl6
15:23 grondilu ooops SORRY
15:24 grondilu it's actually normal that for n >= 16 it's not almost integer
15:24 colomon right, was just seeing that
15:24 colomon it fails in every example program.
15:25 ajr_ joined #perl6
15:26 grondilu then I guess I can use (18), it's a neat formula.  Sorry for the false alarm, guys.
15:26 timotimo interesting
15:26 timotimo jnthn: ./perl6-m --ll-exception -e 'sub test(\a = 0, \b = 1) { say a, b }; test()
15:26 timotimo '
15:26 timotimo (Any)1
15:27 timotimo maybe the 0 comes up as "no default set" in the binder due to an improper check?
15:27 timotimo False gives the same output. and switching a and b around
15:27 * timotimo looks at the binder
15:28 ajr_ joined #perl6
15:28 timotimo yup
15:29 timotimo if (my $default := nqp::getattr($param, Parameter, '$!default_value'))
15:29 timotimo that would do it
15:29 jnthn Oh...yeah, that looks wrong.
15:30 timotimo do i compare that against NQPMu or nqp::isnull it?
15:30 jnthn Should be a null check
15:30 timotimo good
15:31 timotimo good hint btw :)
15:34 timotimo that could potentially unbust a lot more stuff
15:36 timotimo # Looks like you failed 1 tests of 824
15:36 timotimo # FUDGED!
15:36 timotimo that's pretty darn good
15:36 ajr_ joined #perl6
15:36 timotimo not ok 823 - Rat.Rat yields correct Rat
15:36 timotimo #      got: '301281685344656669 1250'
15:36 timotimo # expected: '301281685344656640 1250'
15:36 timotimo there you go :)
15:36 dalek rakudo/moar-support: 7f8a180 | (Timo Paulssen)++ | src/Perl6/Metamodel/BOOTSTRAP.nqp:
15:36 dalek rakudo/moar-support: fix default value check in moarvm binder, unbusts Rat.
15:36 dalek rakudo/moar-support: review: https://github.com/rakudo/rakudo/commit/7f8a180774
15:36 timotimo todays test run is bound to give a much better percentage.
15:38 daxim https://wiki.python.org/moin/2.x-vs-3.x-survey?action=AttachFile&amp;do=get&amp;target=2013-2014+Python+2.x-3.x+survey.pdf (~40 KiB)
15:41 jnthn timotimo: Yes, what with this and sort... :)
15:41 woolfy I bought ten soft toy camels, so-called Cool Camels.  They can form the number 6.  http://www.flickr.com/photos/wendyga/11731491965/in/set-72157639349680056
15:42 ajr_ joined #perl6
15:42 moritz woolfy++
15:43 masak woolfy: cute!
15:44 jnthn Nice :)
15:46 espadrine joined #perl6
15:58 Psyche^_ joined #perl6
16:01 jnap joined #perl6
16:07 kst` joined #perl6
16:45 rjbs Take away two camels and you'd have a 5.
16:45 rjbs 6 - 2 = 5
16:45 rjbs 5 + 2 = 7
16:45 rjbs 6 = 7
16:45 rjbs Debate settled.
16:46 colomon joined #perl6
16:48 japhb raydiak: Couple things I would suggest for scene files:  1) Change color(r:,g:,b:) to rgb(,,) or color('rgb',,,), since you may have other color spaces in the future, and it will just be confusing to magically figure out color space from names of coordinate keys;
16:50 japhb 2) In general, replace {"r":R,"g":G,"b":B} with [R,G,B] and {"x":X,"y":Y,"z":Z} with [X,Y,Z].  It's shorter, less cumbersome, and everyone knows what order they coordinates come in.  Besides, you'll just want them in vector form anyway.
16:52 japhb 3) Consider putting instancing on your feature short list.  The canonical examples are wheels on a car model, windows in a building model, and flowers in a garden model.  If you do this in a general way, that will include material instancing, not just geometry instancing, and it will be way easier to make medium-complexity scenes by hand.
16:55 japhb COLLADA has some interesting lessons here, not that it's perfect.  But they did seem to understand where the boundary of named keys versus arrays of values should be (COLLADA used to advertize the interesting property that gzip'ed COLLADA scenes could often be smaller than native binary scenes from various modeling tools)
16:55 japhb And they do a LOT of instancing.
16:57 japhb (I should note that the interesting bit about that COLLADA file size claim is that at the outermost level, COLLADA is an *XML* format.  It just stops doing that at a certain point in the object heirarchy and reverts to space-delimited arrays.)
17:04 atroxaper joined #perl6
17:09 atroxaper joined #perl6
17:14 japhb Further fun: Use 256 color terminal mode and additive color samples to make a swank preview mode.  :-)
17:23 jnap joined #perl6
17:26 kbaker_ joined #perl6
17:32 timotimo Konsole from kde has full rgb ansi escapes.
17:49 timotimo and with half blocks you can use background and foreground to have two colors above each other for every character in your terminal
17:49 timotimo and these colors will be in mostly square blocks, rather than horribly stretched rectangles
17:51 raydiak japhb: yeah the way colors and coordinates are handled in the scene files is one of the things that will definitely be improved
17:52 raydiak instancing is also planned; I was thinking about putting a "resources" or somethring key, and a way to reference from the rest of the scene file
17:52 raydiak or a way to specify a path to any other data in the scene, wherever it may be
17:53 timotimo XPath style :)
17:53 Entonian joined #perl6
17:53 raydiak japhb: but medium-complexity scenes scare me until you have your way with the slow bits :)
17:53 raydiak yeah, exactly XPath
17:53 raydiak *exactly like
17:54 raydiak (and 'morning #perl6 \o)
17:54 timotimo 'morning raydiak :)
18:13 ajr joined #perl6
18:15 [Coke] r: say 20866 / 28453
18:15 camelia rakudo-parrot dc1544, rakudo-jvm dc1544: OUTPUT«0.733350␤»
18:22 ajr_ joined #perl6
18:24 djanatyn joined #perl6
18:29 raydiak oh, and timotimo: I did think about going further to spruce up the preview...at least color...but I'm waiting to see whether we can still have a preview after concurrency is added without adding ncurses dependency or the like
18:35 denis_boyun joined #perl6
18:35 beastd joined #perl6
18:38 dalek perl6-roast-data: c667117 | coke++ | bin/ (3 files):
18:38 dalek perl6-roast-data: Don't bother dumping core.
18:38 dalek perl6-roast-data:
18:38 dalek perl6-roast-data: timotimo++
18:38 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/c667117884
18:38 dalek perl6-roast-data: 632bd75 | coke++ | bin/rakudo.moar.sh:
18:38 dalek perl6-roast-data: combine clone/checkout
18:38 dalek perl6-roast-data:
18:38 dalek perl6-roast-data: benabik++
18:38 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/632bd75a16
18:39 [Keith] joined #perl6
18:39 dalek rakudo-star-daily: de56ca7 | coke++ | log/ (5 files):
18:39 dalek rakudo-star-daily: today (automated commit)
18:39 dalek rakudo-star-daily: review: https://github.com/coke/rakudo-star-daily/commit/de56ca77cc
18:42 djanatyn joined #perl6
19:06 dbrock joined #perl6
19:25 abnorman joined #perl6
19:27 japhb_ raydiak, I haven't had a chance to dive deep into the code (just the top two levels so far), but if you haven't already, there's a general algorithmic improvement that's usually worth it even relatively early in a ray-tracer's life: keeping a cache (usually only 1 or 2 entries) for each object of the most recent nearest other object hit by rays from that source -- then when emitting from that source always check that cached destination for inters
19:27 japhb_ ection *first* in order to get an upper bound for distance to objects that might matter for that ray.
19:29 japhb_ Once that's in place, the next optimization (which feeds in well to concurrency), is to send rays out in Hilbert Curve order, which maximizes the cache hits.
19:30 timotimo oh i love hilbert curves
19:30 japhb_ The part that works for concurrency is that the Hilbert Curve is self-similar, so you can break up the image into (say) 64x64 pixel squares, hand them off in Hilbert Curve order to the rendering task queue, and then each render worker picks up the squares and renders the pixels in Hilbert Curve order.
19:31 japhb_ If you do multisampling, and more than a few samples, do the *samples* in Hilbert Curve order as well.
19:31 japhb_ It's HC all the way down.  ;-)
19:33 japhb_ Of course, when you go concurrent, you'll either have to be smart about cache updates, or do the cache per-thread.  (You might think this means it doesn't matter any more what order you send squares to the render queue, but there's still a second-order memory cache effect on the objects in the scene to be hit by the initial rays.)
19:38 ivanshmakov joined #perl6
19:39 jnap joined #perl6
19:43 masak any native English-speaker free for a brief privmsg? :)
19:43 raydiak japhb_: thanks! makes sense, all noted - though I'll have to lose the preview
19:45 timotimo no preview? :(
19:45 raydiak or render extremely small portions at a time and buffer the output...
19:45 timotimo sure
19:45 raydiak or use ncurses and not have to worry about serial output
19:45 timotimo i'd love to get Blessinx (blessix?) up to speed for you
19:45 raydiak (choosing the render tile size based on the console preview doesn't sound very wise to me)
19:45 japhb_ raydiak, Oh, yeah, I was going to mention that.  As long as the height of characters in the preview represent an area the height of the squares sent to the rendering queue, you can lose the outermost level of Hilbert-ing (keeping it within each render square), and still have a preview window rendered in row-wise order.  :-)
19:46 japhb_ raydiak, Other way around: Choose the preview size based on the render tile size.  ;-)
19:46 * masak loves the phrase "lose the outermost level of Hilbert-ing" :)
19:47 japhb_ Speaking of which, if you need the English speaker still, I'm here.  Though you tend to be more pedantic than I.
19:48 raydiak japhb_: unless I'm doing higher-res renders, won't that create extremely small previews for reasonable tile sizes?
19:48 timotimo i think i'll see if i can find something to cause the slowness in stage mast ...
19:48 timotimo raydiak: the preview should be as big as the terminal we're using, methings
19:50 raydiak I agree...that's what confused me about "choose the preview size based on the tile size"
19:51 timotimo that was probably a tiny thinko
19:51 raydiak or if you mean "the preview should not assume 80 columns", I also agree with that, but want to keep it portable
19:51 timotimo sure, if you just set the preview size based on some variable, it doesn't matter what source the value for that variable is
19:52 raydiak I was thinking about just letting people pass --preview=160 or whatever
19:52 raydiak and what is Blessinx?
19:53 timotimo i tried to port the "blessings" module from python to perl6
19:53 timotimo the name is crazy lame, though
19:54 raydiak I'll probably have to buffer the whole image in memory eventually anyway, so worst case for the preview is only undating it in 64-pixel rows at a time or something
19:54 timotimo for a preview, wouldn't it be enough to very roughly sample?
19:54 timotimo instead of letting all the data flow into the output?
19:55 timotimo just have like 2 samples per character that ends up on the terminal?
19:55 * japhb_ pops his window stack
19:56 raydiak you mean cast separate rays for the preview?
19:56 japhb_ Hmmm, actually raydiak, that's an excellent idea.
19:56 raydiak ?
19:57 japhb_ Since a 64x64 tile has 4K pixels in it, if you cast a ray or 4 per tile for the preview, your total runtime doesn't even increase a tenth of a percent.
19:58 timotimo yeah, that way you could have a preview very early
19:58 raydiak both true
20:00 japhb_ Come to think of it, a preview ray per 16x16 subtile would also be "efficient enough", and work well for small renders that would otherwise result in a tiny preview.
20:00 raydiak though I might rather keep it throttled with the rendering process, so it still functions as a progress indicator...if I just want a fast preview, I try --width=32 before starting a higher-res version
20:01 raydiak I could also probably disable some of the lighting features in some cases, or render in greyscale, to make the preview parts go faster
20:01 japhb_ The other thing is that you can just keep a running counter updated with tile number, or (swankier) a status line with number of queued tiles, number of active tiles, and number of finished tiles.  \r to the rescue.  ;-)
20:02 * japhb_ has used r to great effect many a time.
20:02 raydiak as long as it works as expected in cmd.exe, too, I'm all for it :)
20:03 japhb_ I think it should ... but I haven't used that in quite a while.
20:03 raydiak not a windows fan myself, but not abandoning supporting it either
20:03 FROGGS maybe the autoflush could be a problem on windows
20:03 japhb_ I've also done the moral equivalent of '"\c8" x $message.chars' on truly lame terminals.
20:08 raydiak gotta run some errands; thanks for all the advice, everyone!
20:08 japhb_ You're quite welcome.  :-)
20:09 kathyz joined #perl6
20:10 ribasushi buahahahahahahahahahahahahaha
20:11 ribasushi python devs discover... ithreads (in 2014): http://permalink.gmane.org/gmane.comp.python.stackless/5874
20:12 timotimo hey mister sushi :)
20:12 ribasushi o/
20:13 FROGGS o/
20:28 dmol joined #perl6
20:40 jnap joined #perl6
20:49 xenoterracide joined #perl6
21:12 * lizmat resolves to look at backlog since Dec 24 and make a list of issues to be looked into
21:17 timotimo sounds good :)
21:20 ajr_ masak; did you get your English speaker?
21:20 dalek specs: dcaef33 | (Elizabeth Mattijsen)++ | S99-glossary.pod:
21:20 dalek specs: Add HN related lemma's
21:20 dalek specs: review: https://github.com/perl6/specs/commit/dcaef338f4
21:21 xenoterracide joined #perl6
21:21 timotimo jnthn: can you tell me if i can get at the line number of a QAST::Block's (for example) .node from inside QASTCompilerMAST.nqp?
21:21 timotimo if and how*
21:21 timotimo er, more precisely how i can get at the compiler object in use that would have the right .lineof method
21:21 masak ajr_: yes; thanks.
21:21 timotimo hm, actually, this may be a bad idea.
21:22 FROGGS timotimo: I thought :node gets $/ so you can try to find that match (and so the line number) when producing a backtrace
21:22 [Coke] r: say 21339 - 20866; # how long until moar passes niecza :( :)
21:22 camelia rakudo-parrot dc1544, rakudo-jvm dc1544: OUTPUT«473␤»
21:23 FROGGS wow
21:23 [Coke] (and I think we already got some of those.)
21:23 FROGGS the numbers are great, even when that does not say much about usability
21:24 woolfy \o/   rjbs++
21:28 * woolfy was looking through backlog and saw rjbs do 6=7  &  "Debate settled"  which makes me happy
21:32 lizmat re http://irclog.perlgeek.de/perl6/2013-12-23#i_8033798
21:32 lizmat r: my @a; say @a[*-1]:exists; say ?(@a[*-1]:exists)
21:32 camelia rakudo-parrot dc1544, rakudo-jvm dc1544: OUTPUT«False␤True␤»
21:33 lizmat I'm not sure how the latter flips the boolean state
21:33 [Coke] woolfy, lizmat: Hio!
21:34 lue r: my @a; say (@a[*-1]:exists).WHAT
21:34 camelia rakudo-parrot dc1544, rakudo-jvm dc1544: OUTPUT«(Parcel)␤»
21:34 lizmat [Coke]: hio to yuo too
21:34 japhb_ a = b = 1; a * a = b * a; a * a - b * b = b * a - b * b; (a + b) * (a - b) = b * (a - b); a + b = b; a + b + 5 = b + 5; 1 + 1 + 5 = 1 + 5; 7 = 6;  # There, a second, independent proof.
21:34 timotimo FROGGS: the match has the position in the string, but to get the line number you have to go through the lineposcache
21:34 lizmat ah, of course
21:34 lue r: my @a; say (@a[*-1]:exists).perl
21:34 camelia rakudo-parrot dc1544, rakudo-jvm dc1544: OUTPUT«(Bool::False,)␤»
21:34 lue r: say ?(Bool::False,)
21:34 camelia rakudo-parrot dc1544, rakudo-jvm dc1544: OUTPUT«True␤»
21:35 lue lizmat: that's why ^
21:35 lizmat ah, so the problem is really that [*-1] returns a Parcel rather than a Bool
21:36 lue r: my @a; say (@a[0]:exists).perl
21:36 camelia rakudo-parrot dc1544, rakudo-jvm dc1544: OUTPUT«Bool::False␤»
21:37 lizmat lue: the array slice handler sees it's a single element, so returns Bool
21:38 lizmat [*-1] it cannot see it's a single element
21:38 lizmat I think, hmmm.... lemme check
21:38 lue lizmat: I was just checking on your "specific to [*-1]" statement, that's all.
21:39 timotimo i think i want to give rakudo support for sub(:named(1):named(2):named(3)) this month
21:43 wtw joined #perl6
21:46 dalek rakudo/nom: e322495 | (Timo Paulssen)++ | docs/ChangeLog:
21:46 dalek rakudo/nom: a few changelog entries
21:46 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/e322495f5e
21:57 kaare_ joined #perl6
22:07 timotimo so ... how do i get rxtrace to actually do anything at all for rakudo instead of nqp?
22:07 timotimo right now it just stops dead in its tracks once it reaches compunit
22:08 timotimo (--target=parse is much more helpful if your parse doesn't abort somewhere)
22:09 FROGGS I think you would have to PerlG::Grammar.HOW.trace-on(Perl6::Grammar)
22:09 FROGGS same for Q and Regex
22:09 timotimo mhm
22:09 FROGGS I do this for v5:     Perl5::Grammar.HOW.trace-on(Perl5::Grammar)           if nqp::getenvhash()<V5TRACE> eq 'Perl5::Grammar';
22:09 timotimo some time i'll fix that >_>
22:10 shinobicl left #perl6
22:11 FROGGS p: BEGIN { use Perl6::Grammar:from<NQP>; PerlG::Grammar.HOW.trace-on(Perl6::Grammar) }; say 42
22:11 camelia rakudo-parrot dc1544: OUTPUT«===SORRY!===␤Could not find symbol '&Grammar'␤»
22:11 monk111 joined #perl6
22:11 FROGGS p: BEGIN { use Perl6::Grammar:from<NQP>; Perl6::Grammar.HOW.trace-on(Perl6::Grammar) }; say 42
22:11 camelia rakudo-parrot dc1544: OUTPUT«Calling postfixish␤  Calling stdstopper␤    Calling MARKED␤    Calling terminator␤      Calling terminator:sym<;>␤Calling ws␤  Calling MARKED␤  Calling _ws␤    Calling ww␤    Calling MARKER␤Calling infixish␤  Calling stdstopper␤  …»
22:11 FROGGS nice typo >.<
22:11 monk111 may i have the wisdom of other monks here plz?
22:12 FROGGS monk111: for free? :o)
22:13 monk111 yep ;)
22:13 monk111 anyone on genetic algorithms
22:13 monk111 i'm kinda stack
22:13 BenGoldberg joined #perl6
22:13 monk111 terminate funtion is not terminating
22:13 FROGGS O.o
22:14 monk111 specifically speaking of AI::Genetic::Pro;
22:14 FROGGS monk111: can you put your question in a one-liner and run it here via p: ?
22:14 FROGGS ohh, seems like not
22:14 timotimo we have a module for that? cool
22:15 FROGGS that is a Perl 5 module :/
22:15 timotimo ... oh :(
22:15 monk111 sooo.. channel then ? :P
22:15 FROGGS maybe #perl-help on irc.perl.org?
22:17 huf or just #perl on this network
22:27 masak monk111: sorry to hear you're stack. hope they can help you on some Perl 5 channel.
22:29 FROGGS monk111: there seems to be a channel: http://irclog.tt.ro.vutbr.cz/perl-ai/2011-11-28
22:31 FROGGS monk111: and a mailing list: http://www.google.de/url?sa=t&amp;rct=j&amp;q=&amp;esrc=s&amp;source=web&amp;cd=5&amp;cad=rja&amp;ved=0CF0QFjAE&amp;url=http%3A%2F%2Flists.perl.org%2Flist%2Fperl-ai.html&amp;ei=EzrHUu3WBIPpswbQ9YCYCg&amp;usg=AFQjCNECPOiqypzQ5niw-MPq2NE9XX8UiQ&amp;sig2=hfeVtW_3nAFmFboWSjpv1w&amp;bvm=bv.58187178,d.Yms
22:31 FROGGS eww, sorry
22:31 FROGGS monk111: this http://lists.perl.org/list/perl-ai.html
22:32 * masak .oO( WHO DEFILES MY BACKLOG WITH UNAESTHETIC URLS )
22:32 FROGGS :/
22:33 monk111 left #perl6
22:33 * lue .oO(%20WHO%20DEFILES%20MY%20BACKLOG%20WITH%20UNAESTHETIC%20URLS%20)
22:34 * FROGGS .oO(+WHO+DEFILES+MY+BACKLOG+WITH+UNAESTHETIC+URLS+)
22:34 colomon joined #perl6
22:40 djanatyn joined #perl6
22:44 japhb_ .oO( "We do!" [ from The Simpson's Stonecutters Song] )
22:44 japhb_ Gah, move that apostrophe one word to the right.  Sigh.
22:46 HaraldJoerg joined #perl6
22:49 jnthn Wow, we broke 70% mark already? :)
22:49 timotimo yup :D
22:49 japhb_ What's the current %?
22:49 jnthn Now somebody fix the unicode property testes in S05 :P
22:49 jnthn That'll be another bunch :P
22:50 japhb_ jnthn, What's your minimum % to merge moar-support?
22:50 FROGGS I'd vote for 83% :o)
22:51 japhb_ 5/6?  Why?
22:51 jnthn japhb_: Well, I'm not quite so worried about % as I am about it building.
22:51 jnthn japhb_: I think merging conveys "we at least build and pass sanity test quite reliably"
22:52 timotimo wow. i'm trying to .dump a match object from arglist's EXPR and it goes over the recursion limit o_O
22:52 timotimo how does that happen
22:52 lizmat circular refs?
22:52 timotimo yeah, but how?
22:52 japhb_ .DUMP?  Circular refs should be noticed and trimmed.
22:52 timotimo .dump actually
22:53 timotimo dump comes from NQP's NQPMatch
22:53 japhb_ Oh ah.  Yeah, that may not have circular ref detection.
22:54 timotimo why would the match stuff ever build a circular ref?
22:55 woolfy joined #perl6
22:55 timotimo i'd like to pass a flag deep into nqp-land to only get that output when i give a commandline flag or env var
22:55 timotimo hm, maybe an env var would be kinda easy to check
22:56 timotimo how do i do that in nqp? query a single env var?
22:56 FROGGS <FROGGS> I do this for v5:     Perl5::Grammar.HOW.trace-on(Perl5::Grammar)           if nqp::getenvhash()<V5TRACE> eq 'Perl5::Grammar';
22:56 timotimo oh!
22:56 FROGGS :o)
22:56 diakopter wuts wring eith the unicode tests
22:56 timotimo they fail
22:56 diakopter ..
22:57 FROGGS it is failicode
22:57 FROGGS diakopter: fix 'em if you can handle the fame :o)
22:58 diakopter well
22:58 diakopter I'll see
22:58 [Coke] ugh, rakudo.jvm test_summary run sooo slow.
22:58 FROGGS yeah, that prevents me fro running a v5 test on it
22:58 FROGGS from*
23:02 japhb_ preflex, tell jnthn Along with native-type union() -- the most immediate case of which is the num32/uint32 and num64/uint64 cases I need for Protocol Buffers -- it would also be nice to have fast NQP ops for byteswap of uint16, uint32, uint64 (and uint128, if that's even a thing in Perl 6)
23:02 preflex Consider it noted.
23:03 timotimo but jnthn is right here!
23:03 jnthn japhb_: byteswap as in, endian conversion?
23:03 preflex jnthn: you have 1 new message. '/msg preflex messages' to read it.
23:03 FROGGS right over there --^
23:03 japhb_ jnthn, yeah, exactly.
23:03 japhb_ timotimo: Heh, I read FROGGS saying "jnthn jnap" as jnthn saying he was taking a nap.  :-)
23:04 timotimo :D
23:04 jnthn japhb_: I'm pondering that these want to be operations on buffers or something like that.
23:05 HaraldJoerg left #perl6
23:05 japhb_ jnthn, that's fine by me, as long as there's a way to convert num* to a buffer.  :-)
23:06 japhb_ But yeah, byteswapping a 2**n-byte section of a buf8 seems very valuable.
23:06 jnthn buf is mutable, so no reason we can't implement a whole bunch of methods for doing these things.
23:06 japhb_ nodnod.
23:07 japhb_ I suggested an NQP op, because if you're having to do endian conversion, you're generally having to do it a LOT, and every bit of speed counts.
23:07 jnthn aye
23:07 jnthn But we still want a nice method-y Perl 6 API to it.
23:08 * lizmat will dream about fixing @a[*-1]:exists returning a Parcel rather than a Bool
23:08 japhb_ No argument.  There's no reason not to have a method on the buf that wraps the nqp::op, especially if we want to do "byteswap every 8-byte chunk of this big buffer" or "... of this byte range within the buffer"
23:08 FROGGS lizmat: sleep well :o)
23:09 * japhb_ (day)dreams of ISAs that included arbitrary byte rearrangement as a single instruction.
23:10 japhb_ .oO( You want those bytes in 18275634 order?  We can do that! )
23:15 timotimo hrmpf. making sure adverbial forms will end up in the arglist properly seems a bit daunting
23:15 japhb_ Interesting data point: To write a double in Go's native binary serialization format, you union it to a 64-byte integer, endian swap it, then write the resulting integer using 7-bits-per-octet variable-length encoding.  They do this because they claim the win from dropping all the trailing zeroes in floating-point values that happen to be integers or simple base-2 fractions more than makes up for the expansion from variable-length encoding.
23:16 timotimo hm, maybe i just need to look out for fake_infix
23:18 lue japhb_: surely you mean 7-bits-per-byte? :)
23:18 japhb_ lue: "7 bits of source data per octet of serialized data"
23:19 lue Ah, I misread that as you saying "7 bits per 8 bits" then :)
23:19 japhb_ I used to hate the use of 'octet'.  And now I do it all the time, as a way to differentiate between in-memory and serialized forms.
23:21 japhb_ Spent too much time around network engineers, I guess.  :-)
23:21 lue I use 'octet' whenever I'm in a environment that doesn't guarantee 8b/B . Which doesn't happen often.
23:23 * japhb_ is reminded of modems and other serial beasties
23:24 diakopter like Tony the Tiger
23:28 wooden joined #perl6
23:32 masak :P
23:32 masak clearly, if I got that one, Sweden is too influenced by US culture for its own good...
23:32 wtw joined #perl6
23:33 masak (and yes, we had them at home. corn with *sugar* on it! it was the 1980s and no-one knew sugar was dangerous.)
23:33 jnthn We have frosties in UK too :P
23:33 jnthn I ate those for breakfast loads as a kid :)
23:34 jnthn All that sugar. Guess that's why I turned out so bad.
23:34 jnthn :P
23:34 masak :P
23:34 japhb_ http://en.wikipedia.org/wiki/Honey_Smacks   <--  Originally called "Sugar Smacks".  Seriously.
23:34 japhb_ jnthn: Truly bad to the bone.
23:35 * masak .oO( Originally called "Cheese Smacks". Syriously. )
23:35 aindilis joined #perl6
23:40 japhb_ http://en.wikipedia.org/wiki/Honey_Smacks#Sugar_content   # You gotta love people selling something that is over half sugar by weight as a kid's breakfast cereal.  That takes ... a certain mentality.
23:40 japhb_ Perhaps one which hates parents.
23:45 FROGGS or teeth
23:45 masak or children.
23:47 lue or sugar production workers.
23:52 silug_ joined #perl6
23:52 japhb_ Heh.  After the octet discussion with lue, it turns out that they don't use the 7-bits-per-octet encoding after all; that was a misleading article.  They use one-byte value if representable in 7 bits, or negated byte-count followed by minimum bytes to represent if needing more than 7 bits.  That seems a bit complex, but I guess it avoids bitwise shifts in the common case, which could be slow on some arches.

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

Perl 6 | Reference Documentation | Rakudo