Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2014-01-12

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:08 * psch goes to sleep
00:36 jeffreykegler joined #perl6
01:00 berekuk joined #perl6
01:13 BenGoldberg joined #perl6
01:23 clsn joined #perl6
01:28 araujo joined #perl6
01:37 timotimo what to do now?
01:48 colomon 1. steal underwear
02:24 colomon preflex: tell rindolf https://gist.github.com/colomon/8379810 runs in 6.5 minutes under Niecza.  Haven't gotten it to work under Rakudo yet.
02:24 preflex Consider it noted.
02:54 c1sung joined #perl6
03:49 atroxaper joined #perl6
04:06 [Coke] colomon: is fudging or fixing niecza on your radar?
04:07 colomon [Coke]: not today, certainly
04:07 colomon in the next couple days, maybe
04:08 [Coke] just wondering. no pressures.
04:09 skids joined #perl6
04:18 preflex_ joined #perl6
04:23 thou joined #perl6
05:27 ssutch joined #perl6
05:41 wooden joined #perl6
05:42 wooden joined #perl6
06:09 xinming_ joined #perl6
06:24 ssutch joined #perl6
06:56 xinming joined #perl6
06:59 hummeleBop joined #perl6
07:01 xinming_ joined #perl6
07:51 grondilu joined #perl6
08:14 darutoko joined #perl6
08:16 SamuraiJack joined #perl6
08:22 thou joined #perl6
08:41 hoelzro morning #perl6!
08:42 raydiak \o morning
08:42 FROGGS morning
08:44 daniel-s joined #perl6
08:44 hoelzro so my spectest succeeded
08:44 hoelzro \o\
08:44 hoelzro /o/
08:45 FROGGS \o/
08:45 hoelzro PR pending for both roast and rakudo
08:48 dalek rakudo/nom: 2312829 | (Rob Hoelz)++ | src/core/Hash.pm:
08:48 dalek rakudo/nom: Make :delete work with typed hashes
08:48 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/2312829a33
08:48 dalek rakudo/nom: 58307f7 | (Tobias Leich)++ | src/core/Hash.pm:
08:48 dalek rakudo/nom: Merge pull request #234 from hoelzro/nom
08:48 dalek rakudo/nom:
08:48 dalek rakudo/nom: Make :delete work with typed hashes
08:48 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/58307f7cad
08:48 dalek roast: 649a552 | (Rob Hoelz)++ | S09-typed-arrays/hashes.t:
08:48 dalek roast: Add test for :delete + typed hashes
08:48 dalek roast: review: https://github.com/perl6/roast/commit/649a552222
08:48 dalek roast: ce1f2e7 | (Tobias Leich)++ | S09-typed-arrays/hashes.t:
08:48 dalek roast: Merge pull request #34 from hoelzro/master
08:48 dalek roast:
08:48 dalek roast: Add test for :delete + typed hashes
08:48 dalek roast: review: https://github.com/perl6/roast/commit/ce1f2e71f6
08:48 FROGGS hoelzro: can you check if the roast tests work on niecza/pugs?
08:48 FROGGS (and fudge them otherwise?)
08:49 hoelzro FROGGS: sure, I can try
08:49 hoelzro also, how do I leave a message for lizmat?
08:50 hoelzro I figured she should have a look at my impl in case I did something wrong
08:51 FROGGS preflex: tell hoelzro This way
08:51 preflex Consider it noted.
08:52 hoelzro FROGGS: thanks!
08:52 preflex hoelzro: you have 1 new message. '/msg preflex messages' to read it.
08:52 hoelzro preflex: tell lizmat I fixed a bug with your typed hashes feature; would you mind looking it over?
08:52 preflex Consider it noted.
08:54 nebuchadnezzar joined #perl6
08:55 hoelzro damn, building NQP-m is segfaulting =/
09:01 hoelzro actually, FROGGS, I don't think I need to actually run niecza on it, since typed hashes aren't impl'd there
09:01 hoelzro I just need to adjust the fudge number on line 62, right?
09:01 FROGGS[mobile] joined #perl6
09:06 hoelzro k, new PR for roast
09:16 hoelzro hmm
09:17 hoelzro sv->value ends up being NULL in compiler.c, line 400
09:24 dalek roast: c79bc98 | (Rob Hoelz)++ | S09-typed-arrays/hashes.t:
09:24 dalek roast: Update fudge number for typed hashes test
09:24 dalek roast: review: https://github.com/perl6/roast/commit/c79bc9825a
09:24 dalek roast: 4c530a3 | (Tobias Leich)++ | S09-typed-arrays/hashes.t:
09:24 dalek roast: Merge pull request #35 from hoelzro/master
09:24 dalek roast:
09:24 dalek roast: Update fudge number for typed hashes test
09:24 dalek roast: review: https://github.com/perl6/roast/commit/4c530a3dcc
09:34 geekosaur joined #perl6
09:44 masak antenoon, #perl6
09:44 FROGGS o/
09:49 hoelzro ahoy masak
09:54 dmol joined #perl6
09:56 rindolf joined #perl6
09:58 rindolf Hi all.
09:58 rindolf colomon: here?
10:01 hoelzro ahoy rindolf
10:01 rindolf hoelzro: meow.
10:33 kivutar joined #perl6
10:50 SamuraiJack joined #perl6
10:51 Rotwang joined #perl6
10:53 Piers joined #perl6
10:56 berekuk joined #perl6
10:57 denisboyun joined #perl6
11:06 mberends joined #perl6
11:07 xinming joined #perl6
11:08 kivutar joined #perl6
11:12 xinming_ joined #perl6
11:13 ingy joined #perl6
11:14 wsri joined #perl6
11:18 cianuro joined #perl6
11:19 cianuro buongiorno a tutti
11:23 xinming joined #perl6
11:47 daniel-s joined #perl6
11:47 preflex joined #perl6
11:47 c1sung joined #perl6
11:47 REPLeffect joined #perl6
11:47 colomon joined #perl6
11:47 yogan joined #perl6
11:47 torbjorn joined #perl6
11:47 simcop2387 joined #perl6
11:47 dbrock joined #perl6
11:47 go|dfish joined #perl6
11:47 xfix joined #perl6
11:47 bakedb joined #perl6
11:47 Ulti joined #perl6
11:47 rom1504 joined #perl6
11:51 avuserow joined #perl6
11:51 mtj_- joined #perl6
11:51 [Coke] joined #perl6
11:51 mathw joined #perl6
11:51 pmichaud joined #perl6
11:51 Util joined #perl6
11:51 masak joined #perl6
11:51 breinbaas joined #perl6
11:57 FROGGS[mobile] hi cianuro
11:59 spider-mario joined #perl6
12:01 mohij joined #perl6
12:02 spider-mario joined #perl6
12:30 mtk joined #perl6
12:36 pecastro joined #perl6
12:42 araujo joined #perl6
12:42 araujo joined #perl6
12:54 psch joined #perl6
12:54 psch hi #perl6
12:55 timotimo o/
13:06 timotimo what's on the menu for perl6 today? :3
13:06 rjbs Popcorn.
13:06 timotimo maybe i'll implement div to round towards -inf on parrot
13:16 mohij joined #perl6
13:20 psch how can i get locprepost from the optimizer? World has a method which takes a cursor, but afaict the optimizer doesn't have a cursor
13:23 timotimo that's the line of your code?
13:23 psch yeah, it should be
13:23 timotimo stuff from the cursor is mostly attached to the .node of the QAST nodes, but i'm not sure how exactly to get the line from that
13:23 psch for the eject symbol and all in X::Comp.gist
13:24 timotimo ah
13:27 moritz the match should be enough for that, no?
13:29 psch moritz: the match is attached to the past the optimizer gets?
13:29 moritz psch: yes
13:30 moritz as $past.node
13:31 psch right, that's where i get .from and .orig for the line numbers
13:31 psch or rather, from the $op
13:31 psch as in, $op.node.orig etc
13:40 zakharyas joined #perl6
13:42 atroxaper joined #perl6
13:45 psch it works, thanks moritz
13:45 * TimToady sitting at gate at sjc
13:46 psch i was wary of trying it like this because the cursor has .from instead of .pos, but seeing as it's used interchangeable in another spot and i adopted it from there, i probably should have just tried it
13:46 TimToady lots of powered seats in the terminal, all without power :/
13:48 TimToady boarding &
13:50 hoelzro does anyone have a good guide for P6 contexts for P5 programmers?
13:50 hoelzro I'm having a rough time with this.
13:53 moritz hoelzro: with lists vs. items, or other kind of contexts?
13:53 hoelzro just list vs item atm
13:53 hoelzro by other contexts, do you mean boolean vs numeric vs string?
13:54 FROGGS[mobile] joined #perl6
13:54 moritz yes
13:54 moritz http://doc.perl6.org/language/containers is a start, but I realize know that it stops before getting to the really interesting bits
13:55 moritz http://faq.perl6.org/#ref
13:56 mtk joined #perl6
13:57 hoelzro oh, I did not know about faq.perl6.org
13:57 hoelzro moritz++
14:10 psch https://gist.github.com/peschwa/8377306 # still a few thinks amiss...
14:10 psch can it actually happen that the optimizer has to throw "undeclared routine"? seeing as the grammar does as well
14:10 psch similarly for "undeclared private method"
14:10 psch (also, the tests probably aren't exhaustive enough, and there's *still* a nominal type check failure...)
14:11 denis_boyun joined #perl6
14:11 moritz psch: the grammar can't catch all cases, because you can post-declare both subs and private methods in Perl 6
14:12 moritz in fact, I don't even know which cases Grammar.pm could reasonably catch
14:12 psch oh, okay
14:16 psch r: class A { method doit() { self!really() } }; my A $a .= new;
14:16 camelia rakudo-parrot 58307f, rakudo-jvm 58307f: ( no output )
14:16 psch r: class A { method doit() { self!really() } }; my A $a .= new; $a.doit;
14:16 camelia rakudo-jvm 58307f: OUTPUT«No such private method '!really' for invocant of type 'A'␤␤»
14:16 camelia ..rakudo-parrot 58307f: OUTPUT«No such private method '!really' for invocant of type 'A'␤  in method doit at /tmp/xyFcu1Yzij:1␤  in block  at /tmp/xyFcu1Yzij:1␤␤»
14:16 psch r: try EVAL 'class A { method doit() { self!really() } }; my A $a .= new; $a.doit;' $!.perl
14:16 camelia rakudo-jvm 58307f: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/y4cvvj_L5T�Two terms in a row�at /tmp/y4cvvj_L5T:1�------> [32mreally() } }; my A $a .= new; $a.doit;' [33m�[31m$!.perl[0m�    expecting any of:�        postfix�        infix stoppe…»
14:16 camelia ..rakudo-parrot 58307f: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/7I8AikkWAY�Two terms in a row�at /tmp/7I8AikkWAY:1�------> [32mreally() } }; my A $a .= new; $a.doit;' [33m�[31m$!.perl[0m�    expecting any of:�        postfix�        infix sto…»
14:16 psch r: try EVAL 'class A { method doit() { self!really() } }; my A $a .= new; $a.doit;'; $!.perl
14:16 camelia rakudo-parrot 58307f, rakudo-jvm 58307f: ( no output )
14:17 FROGGS r: try EVAL 'class A { method doit() { self!really() } }; my A $a .= new; $a.doit;'; say $!.perl
14:17 camelia rakudo-parrot 58307f, rakudo-jvm 58307f: OUTPUT«X::Method::NotFound.new(method => "!really", typename => "A", private => Bool::True)␤»
14:17 psch ... right
14:18 psch FROGGS++ moritz++ timotimo++ jnthn++ masak++ # catching up
14:19 FROGGS :o)
14:19 diakopter rjbs++ # absurd but not that absurd
14:21 hoelzro hmm
14:21 hoelzro I've got this code: for @cells -> $cell { $cell.value = Int }
14:21 hoelzro is there a way to work a hyper operator in here?
14:21 hoelzro like @cells<<.value = Int?
14:22 hoelzro maybe @cells<<.value = map({ Int }, 1 ... Inf)
14:23 timotimo @cells>>.value will give you a list of lvalues
14:24 timotimo so @cells>>.value X= Int should work
14:26 timotimo r: my @cells = Pair.new xx 5; say @cells; @cells>>.value X= Int; say @cells;
14:26 camelia rakudo-parrot 58307f, rakudo-jvm 58307f: OUTPUT«Any => Mu Any => Mu Any => Mu Any => Mu Any => Mu␤Any => Mu Any => Mu Any => Mu Any => Mu Any => Mu␤»
14:26 timotimo hm.
14:29 raiph2 joined #perl6
14:29 raiph joined #perl6
14:29 timotimo hm, maybe a dbus binding for perl6 would be interesting
14:42 masak hoelzro: I'd just do `@cells = Int xx @cells;`
14:43 timotimo that doesn't seem like a translation of what rob had before to me
14:44 xinming joined #perl6
14:44 hoelzro oh, that works too =)
14:44 FROGGS[mobile] joined #perl6
14:44 Rotwang will File::Temp be included in R* release in the future?
14:44 hoelzro oh, wait
14:45 hoelzro I need to preserve the existing cell objects
14:45 FROGGS @cells>>.value.map({ $_ //= Int }) ?
14:46 hoelzro wouldn't that result in just getting the values?
14:47 johnmilton joined #perl6
14:47 FROGGS it assigns to it in the map
14:47 timotimo that is, if the value method is rw
14:48 hoelzro oh, because map aliases it?
14:49 FROGGS r: my @cells = Pair.new xx 5; say @cells; @cells>>.value.map({ $_ //= Int }); say @cells
14:49 camelia rakudo-jvm 58307f: OUTPUT«Any => Mu Any => Mu Any => Mu Any => Mu Any => Mu␤Nominal type check failed for parameter 'lhs'␤  in block  at /tmp/metoJiY_Dd:1␤  in block  at gen/jvm/CORE.setting:7346␤  in block  at gen/jvm/CORE.setting:7210␤  in method gimme at gen/jvm/CORE.se…»
14:49 camelia ..rakudo-parrot 58307f: OUTPUT«Any => Mu Any => Mu Any => Mu Any => Mu Any => Mu␤Nominal type check failed for parameter 'lhs'; expected Any but got Mu instead␤  in sub METAOP_TEST_ASSIGN:<//> at gen/parrot/CORE.setting:16608␤  in block  at /tmp/_2uZWfWe32:1␤␤»
14:56 beastd joined #perl6
15:16 xenoterracide joined #perl6
15:17 cognominal joined #perl6
15:21 FROGGS[mobile] joined #perl6
15:23 jnthn Good UGT morning, #perl6
15:23 preflex jnthn: you have 1 new message. '/msg preflex messages' to read it.
15:23 moritz \o jnthn
15:24 clsn r: sub f(:a($b)) { say $b }; f(:a(1), :a(2))
15:24 camelia rakudo-parrot 58307f, rakudo-jvm 58307f: OUTPUT«2␤»
15:24 clsn r: sub f(:a(:b($b))) { say $b }; f(:a(1), :b(2))
15:24 camelia rakudo-parrot 58307f: OUTPUT«Unexpected named parameter 'a' passed␤  in sub f at /tmp/MYIMfeMTcW:1␤  in block  at /tmp/MYIMfeMTcW:1␤␤»
15:24 camelia ..rakudo-jvm 58307f: OUTPUT«Unexpected named parameter 'a' passed␤␤»
15:25 clsn hm.  A little inconsistent.  going to make truly matching Signatures near impossible.
15:26 moritz r: sub f(:$a) { say $a }; f :a(1), :a(2)
15:26 camelia rakudo-parrot 58307f, rakudo-jvm 58307f: OUTPUT«2␤»
15:26 moritz r: sub f(:a(:$b)) { say $b }; f :a(1), :b(2)
15:26 camelia rakudo-jvm 58307f: OUTPUT«Unexpected named parameter 'a' passed␤␤»
15:26 camelia ..rakudo-parrot 58307f: OUTPUT«Unexpected named parameter 'a' passed␤  in sub f at /tmp/HwmHrgIW4G:1␤  in block  at /tmp/HwmHrgIW4G:1␤␤»
15:27 moritz r: sub f(:a(:$b)) { say $b }; say &f.signature.params[0].perl
15:27 camelia rakudo-parrot 58307f, rakudo-jvm 58307f: OUTPUT«:a(:b(:$b))␤»
15:27 arnsholt Should be f :a(:b(1)) no?
15:27 moritz r: sub f(:a(:$b)) { say $b }; say &f.signature.params[0]
15:27 camelia rakudo-parrot 58307f, rakudo-jvm 58307f: OUTPUT«:a(:b(:$b))␤»
15:27 moritz r: sub f(:a(:$b)) { say $b }; say &f.signature.params[0].named_names
15:27 camelia rakudo-parrot 58307f, rakudo-jvm 58307f: OUTPUT«b a␤»
15:27 jnthn Note that a Parameter object has a list of all names it can be matched by
15:28 jnthn ah, like moritz++ just shoved
15:28 moritz arnsholt: no, the  sub f(:a(:$b)) { } syntax installs a and b as aliases
15:28 arnsholt Ah, right
15:28 moritz IMHO it's a bug that it complains about :a as unexpected named parameters
15:28 clsn yeah... but it can be matched multiple times by one of those names, but not by two of them.
15:28 arnsholt I thought it'd be destructuring
15:28 moritz r: sub f(:a(:$b)) { say $b }; f :a(1)
15:28 camelia rakudo-parrot 58307f, rakudo-jvm 58307f: OUTPUT«1␤»
15:28 moritz r: sub f(:a(:$b)) { say $b }; f :a(1), :b(1)
15:28 camelia rakudo-jvm 58307f: OUTPUT«Unexpected named parameter 'a' passed␤␤»
15:28 camelia ..rakudo-parrot 58307f: OUTPUT«Unexpected named parameter 'a' passed␤  in sub f at /tmp/MIqs0Ev188:1␤  in block  at /tmp/MIqs0Ev188:1␤␤»
15:28 jnthn arnsholt: No, you need subsignatures for that
15:29 arnsholt Right, right
15:29 arnsholt In that case I guess it's a bug =)
15:29 moritz and the bug only occurs when both are present
15:29 jnthn moritz: So...which of the two values should it take?
15:29 moritz clsn++ # good find
15:29 clsn Same as when there's only one: the last one, I guess
15:29 clsn Thanks.
15:29 moritz jnthn: it should be consistent with  f :a<1>, :<2>
15:29 jnthn It current takes the first avialable name. I don't fancy making parameter binding slower...
15:29 moritz erm
15:29 moritz jnthn: it should be consistent with  f :a<1>, :a<2>
15:30 jnthn moritz: That makes things n**2, no?
15:30 jnthn moritz: Since parameter order != argument order, so we have to go through all the possible names and see which was passed first...
15:31 jnthn I'm not sure we actually preserve enough info to know which of the two nmaes came first on all backends.
15:31 moritz jnthn: I don't know enough about the binder to answer that
15:31 moritz jnthn: but I'd expect there to be a hash from (alias) name to actual variable
15:31 jnthn Moar and probably do it. I dunno if JVM can. Parrot sure can't.
15:31 moritz so that when it sees :b in the argument list, it finds the parameter $a in O(1)
15:31 moritz but again, that might be way too simplistic :-)
15:32 FROGGS[mobile] joined #perl6
15:32 clsn I need to send in some of these bugs I keep finding.
15:33 jnthn Well, trouble is
15:33 jnthn sub f(:a(:$b)) { }
15:33 jnthn f(:a(1), :b(2))
15:33 jnthn f(:b(1), :a(2))
15:33 jnthn oops
15:33 jnthn f(:b(21), :a(1))
15:34 jnthn gah, but anyway, I assume from the first calls you'd expect 2, and hte final one you'd expect 1
15:34 jnthn Which menas it's not just finding an a or a b
15:34 jnthn We bind parameters left to right
15:34 jnthn Not arguments left to right.
15:34 jnthn Has to be based on parameters or defaults don't work out.
15:35 clsn I mean, you kind of have yourself to blame if you pass both :a() and :b() if they're aliases to each other.  It's sort of gigo.  If you pass two and they're the same one, it's anyone's guess which you'll get.
15:35 jnthn Anyway, I think I'm happy with it being an error.
15:35 jnthn Because it's the conservative thing
15:35 daxim joined #perl6
15:35 jnthn If we decide to relax it in the future, we'll make something that didn't work before start working, not break something...
15:36 clsn going to make truly matching signatures nearly impossible.  Have to compare all the lists of names to see which are subsets or overlaps with each other, etc.
15:36 clsn Probably going to just have to do our best and fake it.
15:36 ajr joined #perl6
15:36 jnthn clsn: Yes, you might now be understanding why nobody seriously tackled signature smartmatch yet. :D There's lots of "fun" hiding...
15:37 masak jnthn! \o/
15:37 jnthn clsn++ # digging into the fun :)
15:37 jnthn o/ masak
15:37 clsn Heh.  Still, there's a lot to be improved without getting too bogged down.
15:37 jnthn aye
15:48 Rotwang is there a destructor method in p6?
15:49 Rotwang I need to clean up temporary dir when the class is garbage collected
15:49 Rotwang object*
15:50 jnthn Rotwang: In theory, DESTROY. In practice, it's (a) not implemented, and (b) even if it was, makes very weak promises about when it'll be called
15:50 jnthn Rotwang: More typical Perl 6 way to handle such things is block exit handlers...
15:52 masak yeah, LEAVE is your friend.
15:52 masak sometimes in the guises of KEEP or UNDO.
15:52 masak how'd you respond to the jet lag?
15:53 dalek rakudo-star-daily: 65270bd | coke++ | log/ (5 files):
15:53 dalek rakudo-star-daily: today (automated commit)
15:53 dalek rakudo-star-daily: review: https://github.com/coke/rakudo-star-daily/commit/65270bd7b0
15:53 dalek rakudo-star-daily: 762a8a0 | coke++ | log/ (5 files):
15:53 dalek rakudo-star-daily: today (automated commit)
15:53 dalek rakudo-star-daily: review: https://github.com/coke/rakudo-star-daily/commit/762a8a0b56
15:53 dalek perl6-roast-data: a0b8512 | coke++ | / (4 files):
15:53 dalek perl6-roast-data: today (automated commit)
15:53 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/a0b8512a42
15:53 gcole joined #perl6
15:54 jnthn masak: Just fine :)
15:55 Rotwang where can I read on those "block exit handlers"?
15:58 masak Rotwang: S04
15:58 masak "Phasers"
15:59 masak http://perlcabal.org/syn/S04.html#Phasers
16:00 araujo joined #perl6
16:00 Rotwang thanks
16:03 dalek rakudo/moar-support: aeda1bd | jonathan++ | src/vm/moar/ (2 files):
16:03 dalek rakudo/moar-support: Implement p6getouterctx.
16:03 dalek rakudo/moar-support: review: https://github.com/rakudo/rakudo/commit/aeda1bda67
16:03 jnthn That starts unbusting the macro tests on Moar a bit
16:04 masak nice.
16:06 clsn r: <a b>.map({$_}) X, <c d>.map({$_})
16:06 camelia rakudo-parrot 58307f, rakudo-jvm 58307f: ( no output )
16:06 clsn r: say <a b>.map({$_}) X, <c d>.map({$_})
16:06 camelia rakudo-parrot 58307f, rakudo-jvm 58307f: OUTPUT«␤»
16:06 clsn What am I missing here?  Shouldn't that be the same as <a b> X, <c d>?
16:06 masak r: say (<a b>.map({$_}) X <c d>.map({$_}))
16:06 camelia rakudo-parrot 58307f, rakudo-jvm 58307f: OUTPUT«␤»
16:07 masak hm.
16:07 masak r: say (<a b> X <c d>)
16:07 camelia rakudo-parrot 58307f, rakudo-jvm 58307f: OUTPUT«a c a d b c b d␤»
16:07 jnthn r: say <a b>.map({$_})
16:07 camelia rakudo-parrot 58307f, rakudo-jvm 58307f: OUTPUT«a b␤»
16:07 clsn I was going to try to use stuff like that to check for subsetness among param names, but this cropped up.
16:08 clsn r: say <a b>.perl; say <a b>.map({$_}).perl
16:08 camelia rakudo-parrot 58307f, rakudo-jvm 58307f: OUTPUT«("a", "b")␤("a", "b").list␤»
16:08 masak r: sub id { $^x }; say (<a b>.map(&id) X <c d>.map(&id))
16:08 camelia rakudo-parrot 58307f, rakudo-jvm 58307f: OUTPUT«␤»
16:08 * masak submits rakudobug
16:09 masak r: say (<a b>.map({$_}) X <c d>)
16:09 camelia rakudo-parrot 58307f, rakudo-jvm 58307f: OUTPUT«a c a d b c b d␤»
16:09 Rotwang r:  'class A { submethod BUILD() { say "build"; }; LEAVE { say "leave"; } }; A.new'
16:09 camelia rakudo-parrot 58307f, rakudo-jvm 58307f: ( no output )
16:09 masak interesting. so it takes two maps.
16:09 clsn r: say (<a b> X <c d>.map({$_}))
16:09 camelia rakudo-parrot 58307f, rakudo-jvm 58307f: OUTPUT«␤»
16:09 clsn No, only the second one it looks like.
16:10 masak oh!
16:10 masak yes.
16:10 masak clsn++
16:10 masak r: say (<a b> X <c d>.map({$_})).perl
16:10 camelia rakudo-parrot 58307f, rakudo-jvm 58307f: OUTPUT«().list␤»
16:11 clsn r: my @a=<a b>; my @b=<c d>.map({$_}); say $a X $b
16:11 camelia rakudo-parrot 58307f: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/zX45SymcaB�Variable '$a' is not declared. Did you mean '@a'?�at /tmp/zX45SymcaB:1�------> [32m @a=<a b>; my @b=<c d>.map({$_}); say $a[33m�[31m X $b[0m�    expecting any of:�      ÃƒÂ¢Ã¢â€šÂ¬Ã‚¦Ã‚»
16:11 camelia ..rakudo-jvm 58307f: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/eB2V1Wz0_T�Variable '$a' is not declared. Did you mean '@a'?�at /tmp/eB2V1Wz0_T:1�------> [32m @a=<a b>; my @b=<c d>.map({$_}); say $a[33m�[31m X $b[0m�    expecting any of:�        p…»
16:11 clsn r: my @a=<a b>; my @b=<c d>.map({$_}); say @a X @b
16:11 camelia rakudo-parrot 58307f, rakudo-jvm 58307f: OUTPUT«a c a d b c b d␤»
16:12 clsn Hrm.  Not sure that proves anything.
16:12 cibs joined #perl6
16:13 masak no, it doesn't, really.
16:13 masak maps have their own iterators, IIRC.
16:14 masak probably acting up when interacting with cross products for some reason.
16:14 jnthn Well, note that = is eager
16:14 jnthn uh, mostly eager
16:15 colomon r: say Num.WHAT
16:15 camelia rakudo-parrot 58307f, rakudo-jvm 58307f: OUTPUT«(Num)␤»
16:16 colomon r: say "{ Num.WHAT }"
16:16 camelia rakudo-jvm 58307f: OUTPUT«use of uninitialized value of type Num in string context␤␤»
16:16 camelia ..rakudo-parrot 58307f: OUTPUT«use of uninitialized value of type Num in string context  in block  at /tmp/3_dm5APrNM:1␤␤␤»
16:16 clsn Assigning to variables (probably items, though) seems to be a workaround.
16:16 jnthn colomon: string vs gist
16:16 moritz or .item
16:16 colomon jnthn: yes, but strikes me as weird here?
16:17 jnthn colomon: Not really
16:17 jnthn colomon: Interpolation is just .Str on anything and then concatenate
16:17 clsn No, it makes sense.  Num.WHAT === Num, so you're essentially doing "{ Num }"
16:17 jnthn r: say Num.WHAT.gist
16:17 camelia rakudo-parrot 58307f, rakudo-jvm 58307f: OUTPUT«(Num)␤»
16:17 jnthn r: say Num.WHAT.Str
16:17 camelia rakudo-jvm 58307f: OUTPUT«use of uninitialized value of type Num in string context␤␤»
16:17 camelia ..rakudo-parrot 58307f: OUTPUT«use of uninitialized value of type Num in string context  in block  at /tmp/ZoeGbQcBD4:1␤␤␤»
16:19 colomon jnthn: I think the gist of my complaint is that variable interpolation uses .gist, but { } interpolation uses .Str.  why is it different?
16:21 jnthn colomon: Variable interpolation does, though?
16:21 jnthn r: my Num $x; say "$x"
16:21 camelia rakudo-jvm 58307f: OUTPUT«use of uninitialized value of type Num in string context␤␤»
16:21 camelia ..rakudo-parrot 58307f: OUTPUT«use of uninitialized value of type Num in string context  in block  at /tmp/WLXTHiFt8v:1␤␤␤»
16:21 colomon ah.  well in that case, carry on.  ;)
16:22 * colomon was working on https://gist.github.com/colomon/8386731 which is his p6 version of https://news.ycombinator.com/item?id=7043943
16:25 colomon jnthn:  any hints on handling stack overflows in rakudo-jvm?  I've tried -Xss2m and I'm still getting them.  (different mini project)
16:27 Rotwang joined #perl6
16:28 jnthn colomon: Well, I know there is some gather/take issue that can lead to such things
16:28 colomon I think the problem is in a giant X+ operation
16:29 * colomon does not have a copy of the rakudo source open on his machine at the moment to check.
16:29 ajr_ joined #perl6
16:29 jnthn r: try { die 'x'; CATCH { default { gather { take 1 } } } }; say 'lived'
16:29 camelia rakudo-parrot 58307f, rakudo-jvm 58307f: OUTPUT«lived␤»
16:29 jnthn aha...
16:30 jeffreykegler joined #perl6
16:38 wooden joined #perl6
16:38 wooden joined #perl6
16:39 thou joined #perl6
16:47 atroxaper joined #perl6
16:57 Rotwang r: 'class A { submethod BUILD() { say "build"; }; LEAVE { say "leave"; } }; A.new'
16:57 camelia rakudo-parrot 58307f, rakudo-jvm 58307f: ( no output )
16:58 Rotwang on rakudo I get "leave"
16:58 Rotwang what am I missing?
16:59 colomon r: class A { submethod BUILD() { say "build"; }; LEAVE { say "leave"; } }; A.new
16:59 camelia rakudo-parrot 58307f, rakudo-jvm 58307f: OUTPUT«leave␤»
17:00 Rotwang yeah, I've forgotern to remove the '
17:00 Rotwang shouldn't it be: build␤leave␤ ?
17:01 colomon r: class A { submethod BUILD() { say "build"; }; }; A.new
17:01 camelia rakudo-parrot 58307f, rakudo-jvm 58307f: OUTPUT«build␤»
17:01 FROGGS r: sub foo($bar is copy $baz is copy) { } # LTA
17:01 camelia rakudo-parrot 58307f: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/kuU45cIgSn�Missing block�at /tmp/kuU45cIgSn:1�------> [32msub foo($bar is copy [33m�[31m$baz is copy) { } # LTA[0m�    expecting any of:�        statement list�        prefix or …»
17:01 camelia ..rakudo-jvm 58307f: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/XqqbMsaILt�Missing block�at /tmp/XqqbMsaILt:1�------> [32msub foo($bar is copy [33m�[31m$baz is copy) { } # LTA[0m�    expecting any of:�        statement list�        prefix or ter…»
17:01 FROGGS hmmm
17:01 FROGGS r: sub foo(:$bar is copy :$baz is copy) { } # LTA
17:01 camelia rakudo-jvm 58307f: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/eUnkt33L5d�Variable '$baz' is not declared�at /tmp/eUnkt33L5d:1�------> [32msub foo(:$bar is copy :$baz[33m�[31m is copy) { } # LTA[0m�»
17:01 camelia ..rakudo-parrot 58307f: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/2tkYRwtCtU�Variable '$baz' is not declared�at /tmp/2tkYRwtCtU:1�------> [32msub foo(:$bar is copy :$baz[33m�[31m is copy) { } # LTA[0m�»
17:01 FROGGS right, this one
17:03 Rotwang colomon: so am I using LEAVE wrong?
17:03 colomon Rotwang I don't know
17:05 Rotwang ok, any other ideas how to run code during the object deconstruction?
17:06 Rotwang except for writing custom method "cleanup" and then calling it in the END block?
17:07 rindolf joined #perl6
17:15 * araujo looks around
17:15 araujo bit of an off topic question, but.... anyway knows a nice text editor , lightweight and with a gui tailored for writing essays ?
17:16 moritz Rotwang: not really; sadly DESTROY methods aren't implemented yet
17:16 dayangkun joined #perl6
17:17 Rotwang ok
17:18 _ilbot joined #perl6
17:18 Topic for #perl6 is now »ö« Welcome to Perl 6! | http://perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:,  niecza:, std:, or /msg camelia perl6: ... | irclog: http://irc.perl6.org | UTF-8 is our friend!
17:18 FROGGS[mobile] joined #perl6
17:21 clsn FROGGS: aren't you missing a comma in the above?
17:21 FROGGS clsn: correct, and the error message is not ideal
17:21 clsn Ah I see.
17:26 _ilbot joined #perl6
17:26 Topic for #perl6 is now »ö« Welcome to Perl 6! | http://perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:,  niecza:, std:, or /msg camelia perl6: ... | irclog: http://irc.perl6.org | UTF-8 is our friend!
17:26 SamuraiJack joined #perl6
17:28 gcole_ joined #perl6
17:29 _ilbot joined #perl6
17:29 Topic for #perl6 is now »ö« Welcome to Perl 6! | http://perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:,  niecza:, std:, or /msg camelia perl6: ... | irclog: http://irc.perl6.org | UTF-8 is our friend!
17:32 grondilu Too bad rosetcode is down right now, there was an interesting algorithm task for computing pi that showed up today.   Here's my translation of the ruby code:  https://gist.github.com/grondilu/8387779
17:33 grondilu I couldn't figure how to make it more accurate in Perl 6.
17:34 grondilu The problem is that to get arbitrary precision we need to use FatRat, but then how do you compute the square root?  I tried with a custom implementation but without much success.
17:36 BenGoldberg joined #perl6
17:38 LlamaRider joined #perl6
17:39 LlamaRider joined #perl6
17:39 masak Rotwang: I've never seen LEAVE used inside of 'class' like that. that's not what jnthn and I meant.
17:39 masak Rotwang: rather, LEAVE is for the scope where you declare the variable holding the thing you want to destruct.
17:40 Rotwang masak: aha, now I understand, but anyway, I think the example I gave shows some undesirable begaviuour?
17:40 mohij joined #perl6
17:44 deyan_ joined #perl6
17:46 masak not sure. not focused enough to think about it.
17:46 masak I didn't understand why the BUILD submethod didn't fire.
17:47 LLamaRider1 joined #perl6
17:47 * moritz neither
17:50 locsmif joined #perl6
17:50 deyan_ joined #perl6
17:53 foodoo joined #perl6
17:53 masak r: class C { submethod BUILD(:$f) { say "OH HAI" } }; C.new(:f(42)); say "bye!"
17:53 camelia rakudo-parrot 58307f, rakudo-jvm 58307f: OUTPUT«OH HAI␤bye!␤»
17:53 masak r: class C { submethod BUILD() { say "OH HAI" } }; C.new(:f(42)); say "bye!"
17:53 camelia rakudo-parrot 58307f, rakudo-jvm 58307f: OUTPUT«OH HAI␤bye!␤»
17:53 masak r: class C { submethod BUILD() { say "OH HAI" } }; C.new(); say "bye!"
17:53 skids joined #perl6
17:53 camelia rakudo-parrot 58307f, rakudo-jvm 58307f: OUTPUT«OH HAI␤bye!␤»
17:53 masak in this immortal words of GlitchMr:
17:53 masak the*
17:54 masak '...'
17:54 masak r: class C { submethod BUILD() { say "OH HAI" }; LEAVE { say "leave" } }; C.new(); say "bye!"
17:54 camelia rakudo-parrot 58307f, rakudo-jvm 58307f: OUTPUT«leave␤»
17:54 masak ok, so the LEAVE phaser incapacitates the BUILD submethod.
17:54 masak now *that's* interesting.
17:55 masak r: class C { submethod BUILD(:$f) { say "OH HAI" }; LEAVE { say "leave" } }; C.new(:f(42)); say "bye!"
17:55 camelia rakudo-parrot 58307f, rakudo-jvm 58307f: OUTPUT«leave␤»
17:55 masak in fact, it seems to make the mainline never run.
17:55 masak r: class C { LEAVE { say "leave" } }; say "mainline"
17:55 camelia rakudo-parrot 58307f, rakudo-jvm 58307f: OUTPUT«leave␤»
17:55 masak which is still wrong, but makes a bit more sense, maybe.
17:55 jeffreykegler1 joined #perl6
17:56 masak Rotwang++ # doing something no-one had thought of trying before
17:56 Rotwang no one had any need for a destructor? [;
17:57 moritz it's not the lack of need
17:58 moritz it needs some GC hooks, and you must be able to allocate new objects in such a hook
17:58 moritz and at least parrot doesn't allow that
17:58 LLamalessRider joined #perl6
17:59 arnsholt And most GC algorithms don't guarantee order
18:00 moritz that wouldn't be so bad if we had a two-phase cleanup
18:00 moritz call the DESTROY method of all objects being collected in one run
18:00 FROGGS[mobile] joined #perl6
18:00 moritz and only deallocate after all the methods in that batch have been called
18:00 masak sounds like a lovely idea.
18:04 Rotwang joined #perl6
18:04 arnsholt Might be problematic if the destructors have to create objects though
18:06 masak ...accidentally? :)
18:06 masak oh, sorry, I read it as "have to concrete objects"
18:06 masak arnsholt: problematic because there might not be enough memory?
18:06 arnsholt Yeah
18:07 arnsholt Or things being in this weird in-between state
18:07 jnthn Well, the typical approach is to have a finalizer queue
18:07 jnthn Any object thta has a DESTROY is additionally rooted in another array somewhere
18:08 jnthn And if the GC discovers that is the only way to reach it, then it makes it as live, but removes it from that array
18:08 jnthn Then the finalizer runs
18:08 jnthn Once and only once
18:12 FROGGS[mobile] joined #perl6
18:15 clsn Rakudo doesn't support typed positional slurpys, but it also doesn't really support typed named slurpys.  Typing the named slurpy declares it to be Associative[Type], but the binder always just gives it a plain hash, which is Associative, so it never matches.
18:16 clsn r: sub foo(Int *%_) { }; f(:b(7))
18:16 camelia rakudo-jvm 58307f: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/hIQytmdBP8�Undeclared routine:�    f used at line 1��»
18:16 camelia ..rakudo-parrot 58307f: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/oUxi2CI8Dz�Undeclared routine:�    f used at line 1��»
18:16 clsn r: sub foo(Int *%_) { }; foo(:b(7))
18:16 camelia rakudo-parrot 58307f: OUTPUT«Nominal type check failed for parameter '%_'; expected Associative[Int] but got Hash instead␤  in sub foo at /tmp/ymYKerXxFg:1␤  in block  at /tmp/ymYKerXxFg:1␤␤»
18:16 camelia ..rakudo-jvm 58307f: OUTPUT«Nominal type check failed for parameter '%_'␤␤»
18:32 LLamalessRider joined #perl6
18:33 FROGGS[mobile] joined #perl6
18:36 dalek roast: ed446b2 | coke++ | S06-signature/errors.t:
18:36 dalek roast: Add test for RT#76368
18:36 dalek roast: review: https://github.com/perl6/roast/commit/ed446b2a7d
18:36 synopsebot Link: https://rt.perl.org/rt3//Public/Bug/Display.html?id=76368
18:48 jeffreykegler joined #perl6
18:52 dalek roast: 951c516 | coke++ | S12-introspection/methods.t:
18:52 dalek roast: add test for RT # 76648
18:52 dalek roast: review: https://github.com/perl6/roast/commit/951c516275
18:54 pecastro_ joined #perl6
19:03 sftp joined #perl6
19:04 Piers joined #perl6
19:05 araujo joined #perl6
19:07 araujo joined #perl6
19:07 araujo joined #perl6
19:07 berekuk joined #perl6
19:11 spider-mario joined #perl6
19:12 pecastro joined #perl6
19:38 ilbot3 joined #perl6
19:48 ilbot3 joined #perl6
19:50 kaare_ joined #perl6
19:56 ilbot3 joined #perl6
20:31 denisboyun joined #perl6
20:48 jeffreykegler left #perl6
21:17 dayangkun joined #perl6
21:33 kivutar joined #perl6
21:34 raiph2 joined #perl6
21:34 raiph joined #perl6
21:37 berekuk joined #perl6
21:51 Vlavv__ joined #perl6
22:06 pecastro joined #perl6
22:10 araujo joined #perl6
22:28 nnunley joined #perl6
22:31 xinming_ joined #perl6
22:31 araujo joined #perl6
22:36 xinming joined #perl6
22:41 jeffreykegler joined #perl6
22:41 berekuk joined #perl6
22:43 dalek perl6-roast-data: 3e72f27 | coke++ | / (6 files):
22:43 dalek perl6-roast-data: today (automated commit)
22:43 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/3e72f27634
22:45 FROGGS 96.66%
22:45 timotimo very good :)
22:45 FROGGS yeah
22:45 FROGGS feels good
22:45 jnthn Getting there :)
22:45 FROGGS still much todo
22:46 diakopter FROGGS: only 3.34% todo
22:46 jnthn That was run before my 150 tests from exceptions/misc.t :)
22:46 jnthn I get we can do 97% tomorrow :)
22:46 diakopter jnthn: today is only just begun
22:47 timotimo awesome! :)
22:47 jnthn diakopter: Somewhere in the world... :)
22:47 jnthn s/get/bet/
22:47 * timotimo will make parrot catch up a tiny bit, too
22:47 timotimo TODO passed:   16-19
22:47 timotimo TODO passed:   66-67, 70-71
22:47 jnthn :)
22:47 FROGGS cool!
22:47 timotimo hardly measurable, but people shall notice! :)
22:47 jnthn Did we regress some Parrot tests in MoarVM branch?
22:48 jnthn Would be good ot see how Parrot nad JVM work in moar-support compared to nom...
22:48 dalek nqp: 08d6968 | (Timo Paulssen)++ | src/vm/parrot/ (3 files):
22:48 dalek nqp: implement floordiv for int and bigint on parrot
22:48 dalek nqp: review: https://github.com/perl6/nqp/commit/08d6968dae
22:48 jnthn .oO( Now it's implemented floorlessly... )
22:49 dalek rakudo/nom: 828a8be | (Timo Paulssen)++ | / (2 files):
22:49 dalek rakudo/nom: remove hacks for parrot's C-like div and bump NQP_REVISION
22:49 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/828a8be8aa
22:49 dalek rakudo/nom: eb1aa54 | (Timo Paulssen)++ | docs/ChangeLog:
22:49 dalek rakudo/nom: mention div change in ChanegLog
22:49 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/eb1aa546fb
22:49 timotimo jnthn: when you run parrot tests in moar-support, you get a bunch of aborted tests due to Hash.defined being used there
22:50 jnthn wtf...
22:50 timotimo MTE
22:57 idiosyncrat left #perl6
22:57 jeffreykegler joined #perl6
23:00 berekuk joined #perl6
23:01 timotimo r: 5 % 0
23:01 camelia rakudo-jvm 58307f: OUTPUT«Divide by zero using infix:<%>␤  in block  at gen/jvm/CORE.setting:901␤  in method bless at gen/jvm/CORE.setting:817␤␤»
23:01 camelia ..rakudo-parrot 58307f: OUTPUT«Divide by zero using infix:<%>␤  in method sink at gen/parrot/CORE.setting:12142␤  in method BUILDALL at gen/parrot/CORE.setting:904␤  in method bless at gen/parrot/CORE.setting:824␤  in method new at gen/parrot/CORE.setting:809␤  in method new…»
23:02 timotimo nqp: nqp::mod_i(5, 0)
23:02 camelia nqp-parrot: ( no output )
23:02 camelia ..nqp-moarvm: OUTPUT«(signal FPE)»
23:02 camelia ..nqp-jvm: OUTPUT«java.lang.ArithmeticException: / by zero␤  in  (/tmp/KSoCVZcdtv:1)␤  in  (gen/jvm/stage2/NQPHLL.nqp:1100)␤  in eval (gen/jvm/stage2/NQPHLL.nqp:1086)␤  in evalfiles (gen/jvm/stage2/NQPHLL.nqp:1292)␤  in command_eval (gen/jvm/stage2/NQPHLL.nqp:1196)␤  in co…»
23:02 timotimo er, parrot?
23:02 timotimo nqp: say(nqp::mod_i(5, 0))
23:02 camelia nqp-moarvm: OUTPUT«(signal FPE)»
23:02 camelia ..nqp-parrot: OUTPUT«5␤»
23:02 camelia ..nqp-jvm: OUTPUT«java.lang.ArithmeticException: / by zero␤  in  (/tmp/hFPQymjNta:1)␤  in  (gen/jvm/stage2/NQPHLL.nqp:1100)␤  in eval (gen/jvm/stage2/NQPHLL.nqp:1086)␤  in evalfiles (gen/jvm/stage2/NQPHLL.nqp:1292)␤  in command_eval (gen/jvm/stage2/NQPHLL.nqp:1196)␤  in co…»
23:02 timotimo is ... is that right?
23:03 colomon joined #perl6
23:04 timotimo "a modulo 0 is undefined in the majority of systems, although some do define it to be a." sayeth wikipedia
23:06 psch S03 looks like it should be undefined in perl6
23:06 psch seeing as it's defined via division
23:06 colomon grondilu: by coincidence, I posted a sqrt algorithm earlier today.  It's trivial to convert to give you FatRats. https://gist.github.com/colomon/8386731
23:06 timotimo right. so it should throw an exception.
23:07 TimToady reminds me of the person who gave the lightning talk about how 'undef' was not sufficiently undefined in Perl 5, so he made a program poke random numbers into that location
23:07 grondilu colomon: it's not a coincidence.  I did not bother mentioning this rosetta task, until I saw your post.
23:07 grondilu I'm not sure I understand how that would work with FatRat, though.
23:08 TimToady .oO(slowly)
23:10 * lue wonders if  my int8 $a = 0xFF; $a++;  would result in  $a == 0x00  or if it would blow up.
23:10 timotimo i think it should result in 0x00, personally
23:11 timotimo but that's the bit-banger in me speaking :P
23:12 * FROGGS .oO( my int8 $a is overflowing; my int8 $b is blowing-up )
23:12 * grondilu finally understood how colomon's program work.  Neat stuff.
23:12 lue timotimo: That's what I'd like too. I also don't think native types should be so closely managed by Perl 6, it's low-level after all :)
23:13 lue (which is another point against excepting)
23:13 timotimo in my mind, if you're using low-level "native" types, you're asking for low-level semantics in most cases
23:14 TimToady which are basically non-portable semantics, but that's
23:14 TimToady C-land
23:14 jnthn Well, there's also the "it's a pragma" option :)
23:14 TimToady a pragma might have no effect on one architecture, and cause it to run 10 times slower on a different architecture
23:15 TimToady not arguing against pragmas, but that's the kind of tradeoff
23:15 * FROGGS .oO( use tradeoff )
23:15 TimToady the specs currently use pragmas to control what intermediate results are acceptable anyway
23:15 FROGGS and tradeon, obviously
23:16 TimToady afk &
23:16 FROGGS gnight &
23:16 lue use MONKEY_ANTICS for non-blowing-up native types, clearly
23:16 lue ♞ FROGGS o/
23:18 * lue would really appreciate it if rakudo's file path handlers could understand the magic of things like *, ~, or ..
23:20 dalek roast: 812ff94 | (Timo Paulssen)++ | S03-operators/arith.t:
23:20 dalek roast: unfudge parrot negative div and mod tests
23:20 dalek roast: review: https://github.com/perl6/roast/commit/812ff94a16
23:20 dalek roast: 4c65527 | (Timo Paulssen)++ | S03-operators/adverbial-modifiers.t:
23:20 dalek roast: unfudge some rakudo multi colonpair syntax tests
23:20 dalek roast: review: https://github.com/perl6/roast/commit/4c65527b52
23:30 araujo joined #perl6
23:30 araujo joined #perl6
23:31 colomon grondilu: sorry, you just need to change the my @approximations = 1,
23:31 colomon to my @approximations = 1.FatRat,
23:32 colomon and the number in converged to as tight as you'd like.
23:32 colomon has-converged
23:37 grondilu colomon: indeed.  it's terribly slow, though.  I guess the FatRat values quicly become very fat.
23:38 grondilu (and much before convergence happens)
23:47 psch gnight #perl6
23:59 * grondilu found a way not to use rationals
23:59 grondilu r: sub my-sqrt($n) { my $target = 10**16 * $n; .[*-1]/10**16 given 1, { ($_ +  $target/$_)/2 } ... * == * }; say my-sqrt(2)
23:59 camelia rakudo-parrot eb1aa5: OUTPUT«1.4142135623731e-08␤»
23:59 camelia ..rakudo-jvm eb1aa5: OUTPUT«1.4142135623730952E-8␤»

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

Perl 6 | Reference Documentation | Rakudo