[00:03] *** stifynsemons left [00:04] *** felliott joined [00:10] *** icwiener left [00:14] *** Chillance left [00:23] *** rgrau left [00:39] *** vmspb left [00:45] *** felliott left [00:51] *** felliott joined [00:53] *** bluescreen left [00:55] *** felliott left [00:56] *** lichtkind left [00:59] how (im)possible would it be to write a Perl 6 parser in C? :D [01:00] snarkyboojum: SMOP [01:00] http://www.perlfoundation.org/perl6/index.cgi?smop [01:01] not sure how far along it's coming, however. [01:01] maybe it wasn't as simple as they thought ;) [01:01] sjohnson: how much of Perl 6 does it parse? :D [01:01] sjohnson: cheers for linkage [01:01] ruoso / pmurias could tell you :) [01:03] there doesn't seem to be a smop target for evalbot [01:13] Parsing Perl 6 (in any language) sounds like an interesting thesis topic :P [01:21] flussence: fixing << >> quoting has been on my to-do list for about five months now, I think. :) [01:25] *** patspam left [01:28] *** Limbic_Region joined [01:29] *** drbean joined [01:31] *** ab5tract joined [01:38] *** patspam joined [01:41] *** stifynsemons joined [01:42] good * #perl6 [01:42] sorear: 03 Feb 10:18Z tell sorear type check cache is presntly exhaustive. May or may not change that when I do subsets or other bits. May be a flag. Sometimes we want to reject ast too. [01:42] sorear: 03 Feb 10:20Z tell sorear the thing that handles the boxing/unboxing is NYI, as I mentioend yesterday. P6str is used as the repr of str. In the case you mention "foo" should never get boxed, as it's a waste. [01:42] sorear: 03 Feb 10:21Z tell sorear best thing on the native types is to wait a bit before copying it. I've some pieces still to work out the precise details of. [01:43] jnthn: on now? [01:46] \o [01:50] *** patspam left [01:51] ruoso is back in #perl6? [01:52] *** dukeleto left [01:53] *** dukeleto joined [02:00] looks like it [02:00] *** noganex_ joined [02:03] *** jevin joined [02:04] *** noganex left [02:14] *** ab5tract left [02:16] *** felliott joined [02:20] *** cdarroch left [02:29] *** _jaldhar joined [02:29] huh [02:29] o [02:29] oops, hi [02:30] sjohnson: hello [02:30] so, when I try to add infix:<+> for two FatRats, I get "Can't import symbol &infix:<+> because it already exists in this lexical scope" [02:31] my declaration is "multi sub infix:<+>(Math::FatRat $a, Math::FatRat $b) is export(:DEFAULT)" [02:31] Is there something obvious I'm missing? Because it sure seems like that error is not appropriate for multi... [02:33] *** whiteknight left [02:33] If I switch it to infix:, it works fine... :\ [02:36] *** drbean left [02:38] colomon: sounds like rakudobug to me. [02:39] Tene: That's what I'm thinking too, but I've been confused by import / export issues before... [02:47] what does is export(:DEFAULT) do? [02:47] looks like it exports default symbols [02:47] could be wrong though :) [02:47] adds it to the default list of symbols to export to scopes that use that module. [02:47] sjohnson: what does "exports default symbols" mean? [02:48] it says "export this sub from this module." [02:48] what's the difference between that and just 'is export'? [02:48] snarkyboojum: as far as I know, there is none. [02:48] None. [02:48] :DEFAULT is just a little more explicit. [02:49] You can give other tags for it to be in, though. [02:49] ok [02:49] :MANDATORY, iirc, is always exported even if you ask for a different tag set, or nothing. [02:49] or is export(:foo) [02:49] then it's only imported when you ask for the :foo tags [02:49] etc. [02:50] colomon: does it work if you don't specify 'is export'? (newbie questions here) :) [02:51] *** stifynsemons left [02:52] without "is export", it doesn't complain, but it doesn't get that operator, either. [02:53] so it converts the FatRats to Nums before doing the math. [02:53] how about just using 'is export' without the :DEFAULT adverb or whatever it's called [02:54] trying... [02:54] "Can't import symbol &infix:<+> because it already exists in this lexical scope" [02:55] how bizarro [02:56] believe me, I'm not enjoying it. :\ [02:56] let the good times roll, with perl 6 [02:56] what would 'our multi sub infix:<+>(Math::FatRat $a, Math::FatRat $b) is export' do? [02:56] package scope or some such? [02:56] adding our, you mean? [02:56] yeah [02:57] exact same result as without the our. [02:57] ok. thanks for entertaining my questions :) [02:57] thanks for thinking systematically! my brain is pretty fried tonight. [02:57] shouldn't 'our' install the operator in a different scope or something? [02:59] yes, or something. (I've never quite understood what it does in this context.) [02:59] and I don't think it does what it's supposed to in this context yet. [02:59] another permutation would be to use our without 'is export' hehe :) [02:59] trying... [02:59] I seem to remember it needing to be there for rakudo, but that's fuzzy and probably totally wrong :) [03:00] it's exactly the same as leaving off is export without our -- no complaints, but the code doesn't see the new operator, either. [03:01] guess I should be trying to golf this. [03:01] oh well, should make for entertaining (if not annoying) reading for anyone backlogging :) [03:01] :) [03:01] and I should probably read S11 [03:01] me too. ;) [03:07] *** patspam joined [03:13] huh. My super-simple golf doesn't duplicate the problem. :\ [03:13] *** patspam left [03:13] aha! [03:13] *** mkramer1 joined [03:17] me neither, but my super simple golf doesn't do what I expected it to do either :) [03:18] *** Sarten-X left [03:19] *** stifynsemons joined [03:22] colomon: e.g. https://gist.github.com/810690 [03:23] colomon: but then, nfi :) [03:23] I don't think "is Num" works yet. [03:24] colomon: doesn't work without it.. and I get max recursion errors if I do 'does Numeric' [03:24] one sec [03:24] if I just do class A {} I get 'Can't take numeric value for object of type A' [03:24] k [03:26] *** Sarten-X joined [03:27] okay, one step at a time, I guess. [03:27] rakudo: https://gist.github.com/810690 [03:27] rakudo 2666b6: ( no output ) [03:28] didn't know evalbot could run gists - cool :) [03:29] it's a new feature, I'm not even sure if it worked there. :) [03:30] that's what I get locally :P [03:30] it actually looks like the is Num part there is working. [03:30] rakudo: https://gist.github.com/810690 [03:30] rakudo 2666b6: OUTPUT«maximum recursion depth exceeded␤ in 'Numeric' at line 3159:CORE.setting␤ in 'Numeric' at line 3159:CORE.setting␤ in 'infix:<+>' at line 7454:CORE.setting␤ in 'infix:<+>' at line 502:CORE.setting␤ in 'infix:<+>' at line 502:CORE.setting␤ in 'infix:<+>' at line [03:30] ..502:CORE.settin… [03:30] looks it works :) [03:31] though it'd be confusing aligning backlogged output with versions of a gist, but anyway :) [03:31] perhaps p6eval, could spit out the version of the gist is ran ;) [03:32] it* [03:33] Okay, now with "does Numeric", what you're doing is saying "this class will do the Numeric role". [03:33] I'm pretty sure you'll find that Numeric.Numeric is implemented as { self; } [03:33] :S [03:33] since if you have a Numeric type and you ask for a Numeric type, then all you need to do is return yourself. [03:33] rakudo: https://gist.github.com/810690 [03:33] rakudo 2666b6: OUTPUT«Can't take numeric value for object of type A␤ in 'Any::Numeric' at line 1456:CORE.setting␤ in 'infix:<+>' at line 7454:CORE.setting␤ in main program body at line 29:/tmp/uuwoAO3tI2␤» [03:33] that's just class A {} [03:34] rakudo: https://gist.github.com/810690 [03:34] rakudo 2666b6: ( no output ) [03:34] :) [03:34] wait, the explanation I was embarking on makes no sense. sigh. [03:35] too tired, should be going to bed. [03:35] I'll stop stirring the muddy water then :) [03:36] oh joy, time to catch a flight [03:40] snarkyboojum: I don't think your infix:<+> declarations are doing anything there. [03:40] yeah, not sure they're being used :D [03:40] I've just deleted them and gotten the same results in two of the cases. :) [03:41] colomon: hehe. muddy. water. etc. [03:42] apparently S13 talks about an 'is exported' [03:42] is that a typo? [03:43] presumably. [03:43] okay, the "does Numeric" case. [03:44] You're supposed to have arithmetic operators for classes that do Numeric. [03:44] when you don't, it calls [03:44] our multi sub infix:<+>($a, $b) { [03:44] +$a + +$b; [03:44] } [03:45] ie, converts $a and $b to Numeric and then calls infix:<+> on them again. [03:45] since $a and $b already are Numeric, this creates an infinite loop. [03:45] colomon: ah - nasty error in that case [03:47] *** patspam joined [03:47] *** patspam left [03:47] *** patspam joined [03:47] so, your case where it's not Num or Numeric. [03:48] yeah... [03:48] In that case, you still call the above infix:<+> [03:48] oh, so it still wants a Numeric type? [03:49] but this time +$a calls Any.Numeric, which dies with the "Can't take numeric value" message you got. [03:49] so you're not truly overriding the op.. [03:50] you didn't override the op, you just declared it without a body, so it called the default Any version. [03:51] colomon: same errof if a body is provided [03:51] and { ... } is a body isn't it? [03:51] a "not implemented" body :D [03:51] apparently not, based on what we've just done! :) [03:51] well even providing a body still results in the same error "Can't take numeric value for object of type A" [03:52] you're right about the same error if a body is provided, I don't understand that. [03:52] maybe it's is exported not doing the right thing - nfi [03:52] good * #perl6 [03:52] o/ [03:52] \o [03:53] *** masonkramer joined [03:53] sorear will be able to put his finger on the issue :P [03:54] but I don't want to distract him from hacking on Niecza :D [03:55] *** benabik joined [03:55] *** Limbic_Region left [03:57] if you take infix:<+> out of class A, it works as you'd expect. [03:58] *** felliott left [03:58] actually, I think I'm gonna report this as a bug as well. [04:03] colomon: yeah, it's just not registering the infix op [04:03] bug submitted. [04:04] *** VXZ joined [04:05] BTW, if you call infix:<+> in the class body, it does call the infix:<+> defined there. [04:05] rakudo: https://gist.github.com/810730 [04:05] rakudo 2666b6: OUTPUT«hello␤Bool::True␤Can't take numeric value for object of type A␤ in 'Any::Numeric' at line 1456:CORE.setting␤ in 'infix:<+>' at line 7454:CORE.setting␤ in main program body at line 35:/tmp/v0KEVEd_Ea␤» [04:05] afk # bed [04:06] colomonČ laku noć [04:06] eek [04:08] *** patspam_ joined [04:09] *** patspam_ left [04:09] *** patspam_ joined [04:12] *** patspam left [04:12] *** patspam_ is now known as patspam [04:13] *** Sarten-X left [04:17] snarkyboojum: niecza is blocking on jnthn++'s tuits; I have spare cycles; what do you want? [04:18] *** mtk left [04:18] sorear: just something colomon was trying to work out with rakudo as you said good * earlier.. feels like we're missing something obvious :) [04:23] *** Su-Shee_ joined [04:24] *** Su-Shee left [04:25] *** satyavvd joined [04:26] *** mtk joined [04:28] *** patspam left [04:28] *** patspam joined [04:38] *** patspam left [04:42] *** snearch joined [04:47] Who's doing future rakudo releases? Schedule looks MT. [04:54] *** Sarten-X joined [04:54] *** karb joined [04:58] *** karb left [05:00] MT? [05:01] Michael Tiemann? [05:01] :P [05:17] empty ;) [05:23] *** Grimnir_ left [05:25] *** sorear changes topic to: »ö« Welcome to Perl 6! | http://perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: http://irc.perl6.org/ | UTF-8 is our friend! [05:26] *** Grimnir_ joined [05:46] *** Chat8090 joined [05:47] *** Chat8090 left [05:48] *** stifynsemons left [05:52] *** envi joined [05:57] *** simcop2387 joined [06:05] *** cjk101010 joined [06:19] *** snearch left [06:22] *** uniejo joined [06:24] *** uniejo left [06:24] *** uniejo_ joined [06:41] * sorear -> sleep [06:52] *** Chillance joined [06:55] *** Chat7352 joined [06:56] *** Chat7352 left [07:00] *** kaare_ joined [07:05] std: fe05c9c | larry++ | STD.pm6: [07:05] std: warn on Useless use of [] around infix op [07:05] std: review: https://github.com/perl6/std/commit/fe05c9c6b2 [07:19] TimToady! [07:19] *** cognominal left [07:19] we got back from India, it would appear [07:20] *** cafesofie left [07:20] You probably didn't travel by apparition [07:21] *** wtw joined [07:21] * diakopter hopes masak & moritz read this [07:23] we were one day late returning, due to Chicago shutting down for a few snow snifters, the wimps [07:23] oh, I see sorear++ added a similar patch to niecza [07:24] though I think I prefer my reading... [07:24] and mine will also complain on 1 [+](1,2,3) [07:28] *** benabik is now known as benabik_sleep [07:30] *** cosimo joined [07:31] *** cosimo left [07:32] *** cosimo joined [07:32] good morning [07:32] morning [07:32] o/ [07:32] TimToady: Welcome back. Ö= [07:33] TimToady: Hope you had a good trip. [07:33] oops, ESWEDISHKEYBOARD [07:33] * TimToady is back from the land of http proxies... [07:33] :-) [07:39] *** drbean joined [07:41] phenny: tell sorear a couple days ago I noticed a !%foo{$x}:exists or some such, which is a precedence thinko [07:41] TimToady: yeah, sure, whatever [07:42] o_. [07:43] (makes the :exists apply to the ! rather than the subscript) [07:48] *** am0c joined [07:53] *** [particle] joined [07:54] When did phenny turn rebellious? :) [08:07] *** Su-Shee_ is now known as Su-Shee [08:09] *** uniejo_ is now known as uniejo [08:26] *** abraxxa joined [08:29] *** justatheory left [08:53] *** cosimo left [09:01] TimToady: Rat's source uses a pir call for a GCD function all over the place. I'm finding I also want a (BigInt) GCD function for the Math::FatRat implementation, of course. And it's a pretty common number theory function anyway. Can we go ahead and add a gcd sub to p6? [09:03] (maybe in a namespace, like Math::gcd) [09:03] but in general, +1 from me [09:04] rakudo: say 2 minmax 5 [09:04] rakudo 2666b6: OUTPUT«2345␤» [09:04] * moritz_ surprised [09:04] rakudo: say (2 minmax 5).perl [09:04] rakudo 2666b6: OUTPUT«2..5␤» [09:05] rakudo: sub gcd(Int $x, Int $y) { (($x max $y), ($x min $y), * % * ... 0)[*-2] }; say gcd 24, 16 [09:05] rakudo 2666b6: OUTPUT«8␤» [09:09] moritz_: minmax returns a Range. [09:09] yes, so I noticed :-) [09:10] rakudo: sub gcd(Int $x, Int $y) { ($x, $y, * % * ... 0)[*-2] }; say gcd 24, 16; say gcd 16, 24 [09:10] rakudo 2666b6: OUTPUT«8␤8␤» [09:10] *** cafesofie joined [09:11] ah right, no need for sorting [09:12] I was just thinking about that Sequence... and that the inner loop of a Mandelbrot set script could also be expressed as a Sequence. :) [09:13] well, for the Mandelbrot thing you also need to limit the number of iterations, iirc [09:13] rakudo: multi sub foo(Int $a, Int $b) { say "Foo!"; }; multi sub foo(Num | Int $a, Num | Int $b) { say "Fancy foo!"; }; foo(2, 5) [09:13] rakudo 2666b6: OUTPUT«===SORRY!===␤Malformed multi at line 22, near "sub foo(Nu"␤» [09:13] urks. use Numeric [09:14] moritz_: yes, you make a lazy list of the Sequence and then check to see if it goes (say) 50 elements or not. [09:14] *** flatwhatson_ left [09:14] colomon: ah, clever idea [09:15] moritz_: Int and Num in the above example are proxies for the real types that I'm thinking of doing something like this with. [09:15] std: multi sub foo(Int $a, Int $b) { say "Foo!"; }; multi sub foo(Num | Int $a, Num | Int $b) { say "Fancy foo!"; }; foo(2, 5) [09:15] std 625303c: OUTPUT«===SORRY!===␤Unable to parse signature at /tmp/VYhxakYClQ line 1:␤------> , Int $b) { say "Foo!"; }; multi sub foo⏏(Num | Int $a, Num | Int $b) { say "Fanc␤Couldn't find final ')'; gave up at /tmp/VYhxakYClQ line 1:␤------> $b) { say [09:15] .."Foo!… [09:16] std: multi sub foo(Int $a, Int $b) { say "Foo!"; }; multi sub foo(Numeric $a where Num | Int, Numeric $b where Num | Int) { say "Fancy foo!"; }; foo(2, 5) [09:16] std 625303c: OUTPUT«Potential difficulties:␤ $b is declared but not used at /tmp/JQjbehX4i4 line 1:␤------> multi sub foo(Int $a, Int ⏏$b) { say "Foo!"; }; multi sub foo(Numer␤ $a is declared but not used at /tmp/JQjbehX4i4 line 1:␤------> multi sub foo(Int ⏏$a, [09:16] ..Int… [09:16] colomon: there are no disjunctive types [09:16] rakudo: multi sub foo(Int $a, Int $b) { say "Foo!"; }; multi sub foo(Numeric $a where Num | Int, Numeric $b where Num | Int) { say "Fancy foo!"; }; foo(2, 5) [09:16] rakudo 2666b6: OUTPUT«Foo!␤» [09:17] oh? [09:17] that works, but note that the multi dispatch behavior is different than a hypthetical "real" Int | Num [09:18] because here the nominal type is Numeric, and the Int | Num is just a constraint which can contribute an epsilon of tightness [09:19] What I'm really wanting here is the Rational role. :) [09:20] that's what Rat is supposed to be [09:20] you mean, Rat is supposed to be "does Rational"? yes. [09:21] I mean, class Rat does Rational [09:21] *** flatwhatson_ joined [09:22] I can't remember exactly [09:23] but there should be a role that basically does what Rat does, which is parameterized by the type of numerator and denominator [09:24] Rational[Int,uint64] for example, is our standard Rat. (this is from S02) [09:24] ok [09:25] FatRat is just Rational[Int,Int] [09:25] right [09:25] the reason I'm looking at it closely is infix:<+> for Math::FatRat. [09:25] you should be able to add a normal Rat to a FatRat and get a FatRat. [09:26] colomon: if it helps you, feel free to add a Rational role to Rakudo, even if it doesn't do much yet [09:26] and the code involved is *exactly* the same in the sub body as adding two FatRats [09:27] Thing is, it feels a little bit funky to me. [09:28] that's probably because there are lots of missing pieces in Rakudo [09:28] If you add Rational[A, B] to Rational[C, D], how do you figure out the resulting type? [09:29] by dispatchting to the * and + and / operations of types A, B, C and D [09:29] and the rules are actually different depending on that type, because if your add two Rats and they overflow, you get a Num, but if you add two FatRats you always get a FatRat. [09:29] moritz_: that doesn't work, because of the FatRat thing [09:30] why not? [09:30] if there's a FatRat made of two BigInts, and BigInt * Int returns a BigInt, what's wrong with automatically creating a Rational[BigInt, BigInt] as the result? [09:30] because, $a / $b is always either Rat or Num [09:31] you have to explicitly create a FatRat. [09:31] only if $a and $b are Ints [09:31] there's no rules that says BigInt / BigInt needs to be Rat or Num [09:31] In p6, Int *is* BigInt [09:32] and BigInt / BigInt does have to be Rat or Num. [09:32] *therefore [09:32] or another (Big)Int [09:32] no [09:32] rakudo: say (10/5).What [09:32] rakudo 2666b6: OUTPUT«Method 'What' not found for invocant of class 'Rat'␤ in main program body at line 22:/tmp/63_LygbAwq␤» [09:32] rakudo: say (10/5).WHAT [09:32] rakudo 2666b6: OUTPUT«Rat()␤» [09:33] interesting way to get your answer even with an error. :) [09:33] rakduo: say (10/5).dghsjkghsdjghsd [09:33] rakudo: say (10/5).dghsjkghsdjghsd [09:33] rakudo 2666b6: OUTPUT«Method 'dghsjkghsdjghsd' not found for invocant of class 'Rat'␤ in main program body at line 22:/tmp/fqmJrce2PW␤» [09:33] Perl 6. So awesome even the errors contain the answer you wanted. :P [09:34] "Dividing two Integral objects using infix: produces a a Rat, which is generally usable anywhere a Num is usable, but may also be explicitly cast to Num." [09:34] jnthn: \o [09:34] colomon: you're right. Actually you need div for dividing by the gcd [09:35] though actually, that should say "Rat or perhaps Num" or something like that. [09:35] moritz_: yup [09:35] so the internal Rational code doesn't need to use infix:, unless in the case of overflow [09:35] yeah, that's where it gets tricky [09:36] what we need is code like if $a * $b ~~ none($a.WHAT, $b.WHAT) { # degrade to Num } [09:39] hmmm. "A Rat64 that would require more than 64 bits of storage in the denominator is automatically converted either to a Num or to a lesser-precision Rat, at the discretion of the implementation." [09:40] *** dakkar joined [09:40] that's an odd statement, because the Rat64 cannot have more than 64 bits of storage. [09:40] it's more like, if the result of a Rat64 calculation would result in a rational with more than 64 bits of storage... [09:40] that's more like it [09:41] there should be a create-rat-if-possible($numerator, $denominator, $storage-size) or so [09:42] the way it's written in the spec makes it sound like Rat.new($a, $b) should create a Num in some circumstances, which strikes me as a very odd notion. [09:42] moritz_: yes, create-rat-if-possible. [09:43] needs storage size for numerator and denominator, but the basic notion is dead on. [09:45] *** Tedd1 left [09:47] *** envi_laptop joined [09:51] *** envi_laptop left [09:55] *** Mowah joined [09:58] *** Tedd1 joined [10:00] *** masak joined [10:01] greetings, zebras. [10:01] \o masak [10:03] afk # back to bed [10:04] *** daxim joined [10:04] diakopter: fwiw, the technical term is "Apparating" :P [10:05] by the way, I think minmax is useless/evil and shoould be destroyed while we have the chance. [10:06] why is it evil? [10:07] min and max are nice because they extend to min= and max= and other metaops. [10:07] minmax, as far as I can see, extends too but extends uselessly. [10:07] and serving up the *promise* of extending but failing to deliver is evil. [10:08] if [minmax] returned a range from the minimum to maximum value of a list, would you find that better? [10:09] what I'm after is a kind of consistency that makes minmax useful even in its meta forms. [10:10] there might be one, but neither the current semantics nor the former quite fits the bill. [10:11] agreed [10:12] another point: minmax returns a Range. that's the same kind of infraction as using Complex for storing 2d coordinates. not necessarily wrong, just... unwarranted. [10:13] one surprising consequence is that the return value of minmax stringifies to all the values in the range, as you found in the backlog. [10:17] speaking of backlog... [10:18] snarkyboojum, sjohnson: smop is "just" an object model + runtime, it doesn't parse Perl 6 by itself at all [10:18] there is/was a compiler named 'mildew' that used STD to parse Perl 6, and emitted smop code [10:21] o/ [10:21] \o tadzik, how are the exams going? [10:22] tadzik! \o/ [10:22] moritz_: cute! There is a chance I passed electronics today. It's a bit tough, and I expected that the second attempt (next thursday) will maybe be succesful [10:22] moritz_: the worst part now is, sorry, but Physics :) [10:23] tadzik: believe me, I know how bad physics can be :-) [10:23] moritz_: I'm totally dumb from all this, I just can't get my head around stuff [10:24] * masak guesses that has to do with the elasticity of the head :) [10:24] OTOH, they even changed the rules of passing after they saw how many people passed the exercises [10:24] tadzik: that's a common reaction to having to learn too much at a time [10:25] moritz_: maybe. I'm probably the only one who didn't even take a physics exam after High School, I managed to get on the Uni using CS only, so my lack of knowlegde is alredy covered with dust [10:27] but, as I expected Electronics will be tough-as-hell, and they turned out to be tough-a-bit, I may even focus for this week and try to pass this Physics instead of abandoning all hope :) [10:28] tadzik: I'd happily offer to explain physics stuff, but I found that it's quite hard in a text-only medium. Still if there's something you need explained, it might be worth an attempt [10:29] moritz_: I think the main thing I need is solving a bunch of exercises, maybe a bigger bunch. I don't have much problem understanding the concepts [10:30] tadzik: then you're heading in the right direction :-) [10:31] yeah, I hope so :) [10:37] *** cafesofie left [10:41] moritz_: how is Ronja? [10:43] tadzik: fine, thanks. She's still not heavy enough, but gathers weight faster than expected [10:57] *** shortcircuit left [11:07] *** IllvilJa joined [11:07] *** am0c left [11:27] *** coldhead left [11:29] *** kensanata joined [11:42] *** skangas joined [11:45] *** satyavvd left [11:45] *** VXZ left [11:54] so, a brief revisit to the Yapsi refactor this morning finally took me into the tricky part (having to do with blocks and variable lookups, unsurprisingly). I put it on ice for this evening, but I'm still generally hopeful that I'll be able to finish the refactor in a day or so. especially since there's a weekend coming up. [11:55] *** REPLeffect joined [11:55] *** ruoso joined [11:55] it's very noticeable how the FUTURE layer between the grammar/actions and the SIC serializer steps in an fills a real void in terms of absorbing complexity. [11:58] before I continue this .indent thing, I think I'll go get Text-Tabs-Wrap itself working. In particular the test files seem broken :( [12:00] (also "prove -e perl6" is fast becoming my favourite command line) [12:00] :) [12:00] I tend to run 'perl6 t/somefile.t' a lot when I'm not just running 'make test'. [12:05] *** mtk left [12:07] *** Trashlord left [12:07] .oO( the one advantage of having to use CGI.pm is that I get a lot of code golf practice ) [12:11] flussence: it would seem to me that not golfing, but abstracting yourself up a bit, would be the important priority. [12:11] unless additional abstraction layers, even homegrown, count as "cruft". [12:11] they both make the code shorter :) [12:13] can't argue with that :) [12:13] *** mtk joined [12:27] I don't quite get dynamic variables: http://nopaste.snit.ch/30466 why is the last one 'undef'? [12:28] ...and what is undef doing in Perl 6? :) [12:28] rakudo: say Failure.new.perl [12:28] rakudo 2666b6: OUTPUT«too few positional arguments: 1 passed, 2 (or more) expected␤ in main program body at line 1␤» [12:29] rakudo: say Failure.new(1).perl [12:29] rakudo 2666b6: OUTPUT«1␤» [12:29] "undef" is just a stringification [12:29] rakudo: say Failure.new(1) [12:29] rakudo 2666b6: ( no output ) [12:29] hm, I recall that it's something to do with failures [12:30] rakudo: say ~(...) [12:30] rakudo 2666b6: ( no output ) [12:30] hm [12:30] oh [12:30] 'undef' is leaking through from Parrot. [12:30] rakudo: say (...).perl [12:30] rakudo 2666b6: ( no output ) [12:30] pretty sure I saw it from a dotdotdot [12:30] * masak is sad that &say isn't reliable [12:31] tadzik: the 'dynamic' part of dynamic variables comes into play when you declare a new my %*FOO in the inner sub [12:31] masak: not leaking through, src/builtins/Exception.pir line 93 [12:31] masak: and it's not about say(), its about a fail() during a stringification [12:32] oh, ok. [12:32] rakudo: sub a { ... }; a().perl.say [12:32] rakudo 2666b6: OUTPUT«undef␤» [12:32] I don't think any .perl method in Rakudo should return 'undef'. [12:32] one could argue about whether say() should be specially fail()-prove [12:33] if anything, that should probably return "..." [12:33] masak: yep, that's a bug (and a long standing bug) [12:34] it's in src/builtins/Exception.pir:93 btw [12:34] 13:31 < moritz_> masak: not leaking through, src/builtins/Exception.pir line 93 [12:34] I'm not paying attention today :) [12:39] anyway the best thing I can think of is stringifying it as "fail('self.exception' [12:39] er [12:39] "fail('{self.exception' [12:39] without the typing fail(). [12:39] you get the idea :) [12:39] gah, there are two 'views' to what a block is during FUTURE traversal. in one view, a block is something to be called or stored into a variable. in another view, a block is something to be serialized as SIC. [12:40] doesn't that apply to all things that represent Perl 6 level objects? [12:47] perhaps. but it's especially noticeable with blocks, since they nest in FUTURE but not in SIC. [12:47] masak: Unnested tends to be needed. [12:47] *unnesting [12:47] masak: PAST2DNST implements it. PAST -> POST also. [12:48] I will probably spend the day thinking about unnesting. [12:49] the iteration of Yapsi I'm moving away from does a lot of manually initiated top-down/bottom-up traversal. I'd prefer if things just blended in. [12:49] *** bluescreen joined [12:49] * moritz_ still waits for p4 review [12:50] I haven't forgot about it :) [12:50] (and I'm eager to write it, too) [12:50] Excellent! =) [12:56] if my free time were more abundant, I'd have snuck in the second preparatory blog post before the Yapsi release. then again, if my free time were more abundant, I'd have started the Yapsi refactor in time. :) [12:56] masak: Note that the PAST to DNST is written in NQP, so it should be fairly accessible if you want to see hwo it's done there. [12:57] *** hirschnase joined [12:57] *** Vlavv` left [12:57] *** Intensity joined [12:57] masak: It's with a contextual array and pushing onto it, iirc. [13:00] hm, that way of doing things has croseed my mind. [13:03] mornign all [13:04] takadonet: \o [13:05] flussence: ping [13:06] * moritz_ has now rejected ownership of his RT tickets, and insteaded added the tag 'testneeded' to them [13:07] *** plobsing_ left [13:07] moritz_++ [13:07] the days of moritz_ as a human 'testsneeded' tag are over ;) [13:07] an era ends. A new one begins. [13:08] *** Vlavv` joined [13:12] takadonet: pong! [13:12] flussence: I saw in the backlog that you wanted to get Text::Wrap-Tabs working? [13:13] *** masonkramer left [13:13] yeah, seems like a good place to start in figuring out the last bit of .indent [13:15] a few quick notes about that module [13:15] It was my first real attempt of writing a perl 6 module and I was just doing a straight line by line convert from the p5 cpan version [13:17] I just added you as a collaborator to the project [13:17] cool, thanks :) [13:17] I noticed the t/* files looked a bit perl5ish, maybe that's why they didn't work... [13:24] *** MayDaniel joined [13:27] /wg 17 [13:27] hugme should hug irssi users, too :) [13:27] masak: patches welcome :-) [13:28] good to know :) [13:28] rakduo: say ([minmax] 2, 5, 3, 6, 13, -4, 231, 544, 2, 4, 5).perl [13:29] szabgab: in Brussels yet? :) [13:29] rakudo: say ([minmax] 2, 5, 3, 6, 13, -4, 231, 544, 2, 4, 5).perl [13:29] rakudo 2666b6: OUTPUT«-4..544␤» [13:29] szbalint: yes I am here already [13:30] oh now I see why /wg 17 did not work earlier :) [13:30] rakudo: say ([max] 2, 5, 3, 6, 13, -4, 231, 544, 2, 4, 5).perl [13:30] rakudo 2666b6: OUTPUT«544␤» [13:30] rakudo: say ([min] 2, 5, 3, 6, 13, -4, 231, 544, 2, 4, 5).perl [13:30] rakudo 2666b6: OUTPUT«-4␤» [13:31] szbalint: are you also coming? [13:31] I'm here already :) [13:31] oh nice [13:31] sounds like an sz.* meeting :-) [13:32] *** plainhao joined [13:32] moritz_: will you come to LinuxTag and give a Perl 6 talk? [13:33] szabgab: no. I've abandoned all travel plans for this year [13:33] family first [13:33] *** stifynsemons joined [13:34] ... unless I can't stand it anymore at home, and need to get out :-) [13:34] szabgab: when's LinuxTag? [13:34] Chemnitz, I think [13:34] May [13:34] *** bluescreen left [13:34] oh [13:34] * moritz_ can't read [13:34] Chemnitz, almost like Chełm :) [13:35] unless it clashes with YAPC::Russia, I could go. sounds like fun. [13:35] moritz_: oh, did your fork() materialize already? :) [13:35] wasn't that you discussed on the perlde channel? [13:35] szbalint: yes [13:35] last year I gave an ad-hoc Perl 6 talk [13:35] it would be nice to have one now planned a nd scheduled up-front [13:36] d'oh, I missed the event. Congrats belatedly :) [13:36] so more people know about it [13:36] szbalint: thank you [13:36] flussence: do a pull on the master branch and it should compile and run the test under the newest rakudo verison [13:36] please note some will still fail [13:36] 11-14 May [13:36] moritz_: http://www.linuxtag.org/2011/ [13:37] szbalint: I'm confused. There's linuxtag in Berlin, and Linux-Tage in Chemnitz [13:37] sorry, meant szabgab [13:37] the Berlin one is in May [13:37] and linux tages all over Austria :) [13:37] or sg similar [13:37] linux wochen [13:38] close :) [13:38] well, just a factor of 7 :-) [13:38] *** MayDaniel left [13:38] szabgab: I'll get back to you on availability, but it sounds like a definite possibility. [13:38] the talk dead-line is in a few days [13:39] I forgotten to announce it in time [13:39] *** bluescreen joined [13:40] masak: moritz_ dead-line is 8 Feb [13:40] http://wiki.linuxtag.org/w/vp:Main_Page [13:40] ok, I'll check availability now. [13:41] *** bluescreen left [13:42] *** bluescreen joined [13:47] *** bluescreen left [13:48] *** bluescreen joined [13:48] *** stifynsemons left [13:50] *** bluescreen left [13:50] *** bluescreen joined [13:50] *** shortcircuit joined [13:52] <[Coke]> rant: google should not be hitting the "today" link when going through the irc logs. [13:52] why not? [13:52] <[Coke]> could we add that to the robots.txt ? (force it to index content based on a url with the date in it?) [13:52] oh [13:52] <[Coke]> flussence: because tomorrow, the data it's searched is wrong. [13:53] [Coke]: I'd hate to forbid indexing /today because that's an often used link [13:53] I guess you could have it set an Expires header for midnight... [13:53] *** cognominal joined [13:53] [Coke]: maybe have 'today' doing a (temporary) redirect to today's date? [13:53] <[Coke]> moritz_: often used, but should it be indexed?? [13:54] [Coke]: there's no reason to not index it, just not under that URL [13:54] <[Coke]> as long as I don't have to manually fixup google's search, IDC. [13:54] *** fhelmberger joined [13:54] <[Coke]> moritz_: that is what I'm saying. don't index THAT URL. [13:54] *** fhelmberger left [13:54] <[Coke]> I obviously still want to find that page worth of data, but only if it's using a unique url. [13:54] *** fhelmberger joined [13:55] actually I have no idea which URL then indexes, the redirected to, or the original one [13:55] I know it's the target for permanent redirects, but I can't use a permanent one here [13:55] <[Coke]> which is why I sugested an easy solution. :) [13:55] *** tzhs joined [13:55] ... which I don't like at all [13:56] <[Coke]> it'll still find the unique URL by date, (or we can update the nagivation to make it so.) [13:56] <[Coke]> moritz_: why don't you like it? [13:56] <[Coke]> aloha, aloha? [13:57] <[Coke]> phenny, aloha? [13:57] <[Coke]> ETOOMANYBOTS. [13:57] <[Coke]> is there an infobot in here? [13:57] szabgab: I'll get back to you later today. I had a slight feeling there was a Russian conf in May, but unable to drag up any dates for it. [13:57] [Coke]: because forbidding the URL that is most often used as a link target goes against all SEO principles [13:57] *** drbean left [13:58] <[Coke]> Who is most often linking to today? [13:58] <[Coke]> google? because that's the WRONG LINK. ;) [13:58] no, other websites [13:58] <[Coke]> I know if I'm sending someone to the archives, it's because I want them to find something specific. [13:58] like perl6.org/community/ [13:58] and if you want to link to the logs in general, the "today" page is usually the best [13:59] <[Coke]> Ok. [14:00] if it's only google you're worried about, putting a in there should be enough. [14:01] flussence: that sounds like a great idea [14:01] * moritz_ didn't know about that one [14:01] moritz_: how about canonical naming today to the $current_date? [14:01] *** pmurias joined [14:01] it's relatively new, they made it up for this exact reason :) [14:01] szbalint: how? [14:01] doh. slow wifi. [14:02] ah [14:02] masak: https://www.socialtext.net/perl5/index.cgi?events [14:03] for all the event I know about :) [14:03] I was first! :D [14:05] masak: so YAPC::Russia overlaps with LinuxTag in Berlin :( [14:05] anyway moritz_: [14:06] easy pease [14:06] *y [14:06] this is one of those changes where the commit message is about 4x longer than the actual patch :-) [14:07] https://github.com/moritz/ilbot/commit/40e78d08e1085f5a1b15aa316566b2f9f414a068 [14:08] [Coke]++ flussence++ szbalint++ [14:11] *** abraxxa left [14:15] *** Trashlord joined [14:22] moritz_: You might have the Today link HTTP 301 to the current index-date link. Any indexer should update its internal representation appropriately. [14:22] shortcircuit: 301 is "permanent", and the link for "today" changes every 24h - not very permanent [14:23] anyway, looking at the referrers I don't get any search engine traffic besides google [14:24] hey, cool, didn't know about rel="canonical" [14:24] That's only for ubuntu links :) [14:25] Eevee: neither did I. #perl6 is a constant source of new knowledge and quotes :-) [14:25] *** wamba joined [14:25] Perl domains are slow at getting ipv6 :( [14:25] http://ip6.nl/tester.plp [14:26] Juerd++ [14:27] my site works, but the NS doen't have v6 addresses [14:27] I added ipv6 to my personal domain this week. [14:27] bytemark++ [14:29] szbalint: What domain? [14:29] moritz_: Same question :) [14:29] Juerd: perlgeek.de [14:29] Nice name :) [14:30] x0r.be [14:31] well, I don't have any control of the perl6.org domain [14:31] so not much I can do on that front [14:32] Who does? [14:32] 'cause feather2 is 2a02:2308:10::f:2 [14:32] takadonet: pushed fixes for those broken tests. If I get time later today I might look into making them use Test.pm [14:33] Juerd: Daniel Wright [14:33] flussence: I could do that as well . depend on time at work [14:33] Juerd: but if we'd start with IPv6, we should have a v6 address per subdomain [14:33] Why? [14:34] There's really no reason for that, except https. [14:34] name based virtual hosts suck for secu... exactly [14:34] And if anyone wants to host ssl sites on feather, that's great. [14:34] https://github.com/tadzik/neutro/issues#issue/3 -- hrm. Isn't that a Parrot issue? [14:35] Find someone to pay for the certificate and ask me for extra IP addresses, 4 and 6 [14:35] huh, doesn't SSLv3 allow for name-based hosts? [14:35] I thought they fixed that. [14:35] yeah, well I wouldn't mind pushing for an effort where http means https is also available when using IPv6 [14:36] with self-signed certs [14:36] szbalint: Sounds insane. Why? [14:37] Just because it's annoying me that major websites are lacking https and I have to tunnel everything through ssh to get security when using a public wifi for example. [14:37] *** stifynsemons joined [14:37] You'd still have that with the self signed certs. [14:37] *** hirschnase left [14:37] https is underutilized :S [14:37] No protection against MITM unless you verify the fingerprints. [14:38] Juerd: not really. If it's a site that I visited before [14:38] *** cjk101010 left [14:38] Juerd: yes, but protection against ordinary evesdropping [14:38] and little protection > no protection [14:38] I have a better idea. Make https the default when http:// is left out. [14:38] Unless it's not available, then fall back to http [14:38] Even better: add TLS negotiation to HTTP itself, on port 80 [14:39] that's more aggressive than what I had in mind, I just want more sites available through https [14:39] but I could live with it :) [14:40] *** felliott joined [14:40] *** xinming_ joined [14:41] * moritz_ has some trouble with TLS [14:41] one of my mail provides overs IMAP over TLS [14:41] and some stupid network providers don't let me use it, because they think it's insecure... they just block the port [14:41] no wait, smtp over tls, not imap [14:42] You can do STARTTLS negotiation over the normal ports [14:42] *** stifynsemons left [14:42] unless the stupid network provider blocks the port. [14:43] they're not going to block port 80. [14:43] That's why we have 587 [14:43] And it's not TLS's or SSL's fault, or even SMTP's fault, that your ISP sucks and blocked the port... :) [14:43] Juerd: I know [14:44] szbalint: That's be even more annoying than being on an ipv6-only link... [14:44] * Juerd created an ipv6-only server for the ipv6-only DNS test in http://ip6.nl/tester.plp [14:45] Trying to browse web pages on that thing is very frustrating. No google, no facebook [14:45] Amazon.com resolves but they don't have an ipv6 webserver, etc. [14:45] Juerd: could you please check if embedded images work on sudokugarden.de? [14:46] What's an "embedded" image? [14:46] Juerd: last time I tried it via IPv6 the images didn't show up, but I couldn't find a reason for that [14:46] Juerd: those via tags [14:46] http://juerd.nl/i/c166c67f48d507fd260563d42dcdeff2.jpg [14:46] Juerd: thanks, looks fine [14:46] must have been a client side fuckup [14:47] But the site won't work in pure ipv6 world :) [14:47] Your nameserver still needs ipv4 connectivity in order to even get the IPv6 address for the site. [14:47] I know... same DNS as perlgeek.de [14:47] This is not a problem, for at least another decade, I guess [14:48] but the one who hosts the DNS is also a geek. He'll want to know :-) [14:48] yeah, everyone's dual stacking, except the next gen mobile guys [14:48] Send 'em the link to http://ip6.nl/tester.plp and complain that you want green instead of red, for your domains. [14:49] szbalint: well, I guess the mobile ISPs will do the recursive DNS lookups for the mobile devices [14:49] and then they're running a dual-stacked dns resolver [14:49] Say something about that it makes you feel inadequately geeky to see those red boxes :P [14:50] They'll understand and add ipv6 support within a few hours! [14:50] or I'll promise him a nice, self-made lasagne :-) [14:51] Do both1 [14:51] s/1/!/ [14:51] (which I'd do anyway sooner or later) [14:51] Pointing a gun would probably work too [14:51] But don't do that [14:52] * moritz_ wouldn't do that to his best man :-) [14:53] *** dual joined [14:53] I'm pointing the gun: "Verizon guys are saying: 'We'll have a bunch of mobile devices on IPv6 only from 2011, do you want to add the AAAA records or should we do it for you?'" [14:54] (paraphrased a bit) [14:54] *** kaydsoft left [14:56] how would verizone add AAAA records to .de domains? [14:57] they control the resolving dns server [14:57] for their mobile users. [14:57] then I don't have a problem with that, if they use v4 to query "my" DNS server for an AAAA record [15:00] *** kaare_ left [15:00] v4 content gets the proxy treatment [15:04] tell sorear does niecza support lexical classes? why do they appear in the stash? [15:06] pmurias: talk to phenny :-) [15:06] *** bluescreen left [15:10] *** cafesofie joined [15:10] *** colomon left [15:22] *** kaydsoft joined [15:22] *** bluescreen joined [15:23] *** cafesofie left [15:24] phenny: tell sorear does niecza support lexical classes? if so why do they appear in the stash? [15:24] pmurias: I'll pass that on when sorear is around. [15:24] (rel="canonical")++ [15:24] ? [15:25] * pmurias googled it [15:25] pmurias: see backlog... we hope it fixes an indexing problem with the IRC logs [15:28] *** am0c joined [15:30] good * #perl6 [15:30] sorear: 07:41Z tell sorear a couple days ago I noticed a !%foo{$x}:exists or some such, which is a precedence thinko [15:30] sorear: 15:24Z tell sorear does niecza support lexical classes? if so why do they appear in the stash? [15:30] *** c1sung joined [15:30] pmurias: yes; simplicity [15:35] *** benabik_sleep is now known as benabik [15:37] *** wtw left [15:38] *** fhelmberger left [15:39] *** kaare_ joined [15:41] o/, sorear [15:43] Juerd: you think you have it bad? my ISP won't route outgoing IPv6 packets [15:43] My ISP doesn't do IPv6 at all [15:43] But I'm using a tunnel (sixxs) [15:52] sorear: simplicity? [15:53] my isp is doing a trial IPv6 run atm [15:53] I wish they'd deploy fully. [15:53] *** colomon joined [15:53] they will [15:55] eventually. [15:55] sorear: it's in a package with a generate name right? [15:57] sorear: how am i supposed to distinguished what is a global and what was just put there for simplicity of implementation? [15:58] *** colomon left [15:58] *** wamba left [15:58] sorear: did the debugging name put into nam actually help with debugging? [15:59] * names [16:01] *** colomon joined [16:01] stupid library basement internet. [16:07] *** colomon left [16:09] *** kaydsoft left [16:09] *** colomon joined [16:10] *** plobsing joined [16:13] * colomon is having a crisis of confidence about the denominators of Rats in p6. [16:13] *** kaydsoft joined [16:14] confidence? denominators? [16:14] *** allbery_b joined [16:14] *** Patterner left [16:16] *** Psyche^ joined [16:16] *** Psyche^ is now known as Patterner [16:17] the standard has language about preserving the denominator in cases where it could be simplified. [16:17] it's not at all implemented in Rakudo, which always simplifies if it can. [16:18] rakudo: say (1/100 + 9/100).perl [16:18] rakudo 2666b6: OUTPUT«1/10␤» [16:19] the spec sort of implies that should be 10/100 [16:19] rakudo: say (1/3 + 1/6).perl [16:19] rakudo 2666b6: OUTPUT«1/2␤» [16:19] and it's very explicit that that should be 3/6 [16:20] but what about [16:20] rakudo: say (3/6).perl [16:20] rakudo 2666b6: OUTPUT«1/2␤» [16:20] should that be 1/2 or 3/6? [16:20] *** Mowah left [16:21] <[Coke]> I would imagine that if 1/3+1/6 = 3/6, then 3/6.perl == 3/6 [16:21] not simplifying feels very wrong to me. [16:21] <[Coke]> perhaps add an explicit .simplify() for rats. [16:21] <[Coke]> or, change the spec to always simplify, sure. ;) [16:22] and the spec does imply that (3 * 1/6) should be 1/2; the denominator is only preserved for addition and subtraction. [16:22] it feels to me like the spec is trying to solve a problem that I don't see at all. [16:22] sorear: i could seperate anonymous entries with a regex but that's not very elegant [16:23] colomon: Trying to keep it from simplifying repeatedly on [+] @list-of-rats ? [16:23] *** justatheory joined [16:25] <[Coke]> colomon: I'd find out if there was a rational for that -perhaps to avoid unnecessary computation (but you have to do computation to figure out what the GCD is...) [16:25] benabik: it only prevents it in certain cases. [16:25] *rationale, I hope. ;) [16:26] <[Coke]> FWIW, I wouldn't expect perl to keep track of the GCD on that for me [16:26] I should add, it does simplify in many cases. It only doesn't simplify (in addition) if one denominator is divisible by the other. [16:26] <[Coke]> (I'd not care if it did; I'd leave it up to the implementations) [16:26] colomon: where does the spec says it needs to preserve the denominator? [16:27] S02. [16:27] I can't be more specific, my internet is pretty hosed here. [16:27] so for instance, if you add 1/15 + 1/20, it will simplify as much as it can. [16:28] rakudo: say (1/15 + 1/20).perl [16:28] rakudo 2666b6: OUTPUT«7/60␤» [16:28] not a great example there. :) [16:28] rakudo: say 2**64 [16:28] rakudo 2666b6: OUTPUT«1.84467440737096e+19␤» [16:28] D: [16:28] no bignum? [16:28] rakudo: say (1/15 + 3/20).perl [16:28] rakudo 2666b6: OUTPUT«13/60␤» [16:29] slavik1: no, not yet. [16:29] rakudo: say (2**64).WHAT [16:29] rakudo 2666b6: OUTPUT«Num()␤» [16:29] rakudo: say (2**64).perl [16:29] rakudo 2666b6: OUTPUT«1.84467440737096e+19␤» [16:29] would Num() itself be bignum or would there be a BigNum() ? [16:29] *** tzhs left [16:30] *** Kovensky joined [16:31] *** felliott left [16:32] *** colomon left [16:33] slavik1: do you need more than 1e308? [16:35] *** colomon joined [16:35] how much of what I last said got lost there? [16:37] *** risou joined [16:37] colomon: Last thing I see from you is "rakudo: say (1/15 + 3/20).perl" I don't know how much I didn't see. [16:37] benabik++ [16:37] colomon: slavik1: nope. but I've created Math::BigInt for the time being [16:37] [11:29am] colomon: slavik1: it's a bit of a pain to install, alas. [16:37] [11:29am] colomon: slavik1: and I don't know if it works on Windows at all. [16:37] [11:30am] colomon: rakudo: say (3/15 + 3/20).perl [16:38] rakudo: say (3/15 + 3/20).perl [16:38] rakudo 2666b6: OUTPUT«7/20␤» [16:39] rakudo: say (3/15 + 4/20).perl [16:39] rakudo 2666b6: OUTPUT«2/5␤» [16:39] *** felliott joined [16:40] okay, I think here's where it gets weird: [16:40] rakudo: say (3/15 + 1/20 + 3/20).perl [16:40] rakudo 2666b6: OUTPUT«2/5␤» [16:41] by the spec, I think the denominator there depends on the order of the additions. [16:44] *** felliott left [16:44] *** risou_ joined [16:45] here we go, an even better example [16:45] rakudo: say (1/15 + 2/15 + 1/20 + 3/20).perl [16:45] rakudo 2666b6: OUTPUT«2/5␤» [16:45] *** risou left [16:46] if you add 1/15 + 1/20 before adding the others, the answer should be 24/60 [16:46] colomon: [16:46] if you add 1/15 + 2/15 and 1/20 + 3/20 first, the answer can be 2/5 [16:46] * benabik is still not used to the IRC client. [16:47] colomon: It seems like simplifying sometimes is far stranger than the options of never and always. [16:47] yes [16:47] I think I need to do a blog post on this. :) [16:48] (And I'm not going to try that until I'm on a stable Internet connection.) [16:48] Titled "Why do we do this, it's too crazy"? [16:48] * moritz_ now reads S02 to verify or falsify colomon's claim [16:48] moritz_: I'd love to hear I'm wrong about this. :) [16:48] *** pmurias left [16:49] *** kensanata left [16:50] C addition and subtraction should attempt to preserve the [16:50] denominator of the more precise argument if that denominator is [16:50] an integral multiple of the less precise denominator. [16:51] *** pecastro joined [16:52] Hence, if you are adding a bunch of Cs that [16:52] represent, say, dollars and cents, the denominator may stay 100 the [16:52] entire way through. [16:52] *** IllvilJa left [16:52] "may" vs. "should" [16:53] *** envi left [16:54] I think this is insane, because the example of dollars and cents are already covered by stringification rules of Rats [16:54] how so? [16:55] *** colomon left [16:58] *** colomon joined [16:59] if the denominator contains only powers of 2 and 5, it's guarantueed to return an exact string [16:59] ie 1/5 stringifies to 0.2 without going through Num [16:59] sorry, moritz_ I lost the lead up to that? [17:00] 2, 5, exact string, yes. [17:00] so I argue that there's no need to preserve the denominator [17:00] * colomon will hopefully be able to go home in a few minutes, to a blessedly stable internet connection. [17:00] ah! [17:00] simplify! ;) [17:01] because what TimToady++ cares about is that if you add exact decimals, the result looks similar [17:01] so 20.2 + 50.1 => 70.3 (with that stringification) [17:02] *** pecastro left [17:02] the question is whether 1.07 + 2.03 stringifies to 3.1 or 3.10 [17:02] yes [17:02] nod [17:02] but as far as I know, it's 3.1 by spec [17:03] even though it's 310 / 100 by spec [17:03] I thought it's 3.10, becaue the denom is 100? [17:03] if I cared about the stringification, I'd use a formatting routine anyway. [17:03] masak: +1 [17:03] but I guess that's not very relevant to this discussion... :P [17:03] moritz_: can you find language to that effect? I've never looked for it, I admit. [17:04] colomon: I quoted two parts of the spec in the backlog [17:04] moritz_: sorry, that must have been a bit I missed. and I think going for the log will kill my internet connection. [17:05] I'll take your word for it. [17:05] colomon: I don't think we're in a rush; we can wait until you get home. [17:06] aye [17:13] It's always good to have your arguments in order before TimToady shows up. :) [17:14] anyway, we're packing up here [17:14] * masak .oO( ...because TimToady plays bowling with one's arguments? ) :P [17:16] "smashing" is the metaphor I would use. :p [17:16] "strike!" [17:18] <[Coke]> (*#&@$ turkey. [17:20] *** colomon left [17:22] *** colomon joined [17:27] *** dukeleto left [17:27] *** colomon left [17:27] *** dukeleto joined [17:27] *** MayDaniel joined [17:33] *** daxim left [17:34] flussence: ping [17:34] pong! [17:35] *** alester joined [17:35] *** cdarroch joined [17:35] *** cdarroch left [17:35] *** cdarroch joined [17:36] flussence: [17:36] flussence: almost done converting all tests to use Test.pm [17:36] ah, ok :) [17:36] *** guidj0s joined [17:37] *** V15170R joined [17:38] flussence: changes pushed [17:40] *** colomon joined [17:41] ok, now to see what can be done about those 4 failures :) [17:44] I thought that project was dead so thanks for showing interest in finishing it [17:45] no prob, it'll keep me busy by the looks of things [17:46] I lost interest since well... I don't really care about tabs and wraps of text [17:46] I started it b/c it's one of the most used cpan modules [17:46] *** risou_ left [17:46] *** MayDaniel left [17:46] http://ali.as/top100/ [17:47] under Volatile 100 [17:47] wow, that's a lot [17:48] *** risou joined [17:48] surprisingly we have a huge chuck of those modules builtin perl6 already [17:48] *** sftp left [17:48] *** dakkar left [17:48] *** risou left [17:51] *** sftp joined [17:51] *** Guest84197 left [17:52] To bind $x and $y to the first and second elements of each inner array (like in S06), this works for me: [17:52] rakudo: my @AoA = [3,5], [7,9]; for @AoA -> [ $x, $y ] { say "$x/$y" } [17:52] rakudo 2666b6: OUTPUT«3/5␤7/9␤» [17:52] To do the same kind of binding to particular keys of inner hashes, this works: [17:52] rakudo: my @AoH = { X => 3, Y => 5 }, { X => 7, Y => 9 }; for @AoH -> ( :X($x), :Y($y) ) { say "$x/$y" } [17:52] rakudo 2666b6: OUTPUT«3/5␤7/9␤» [17:52] To do the same kind of binding to the key and value of inner Pairs, none of this works: [17:52] rakudo: my @AoP = X => 3, Y => 5 , M => 7, N => 9; for @AoP -> ( :key($k), :value($v) ) { say "$k/$v" } [17:52] rakudo 2666b6: OUTPUT«Mu()/Mu()␤Mu()/Mu()␤Mu()/Mu()␤Mu()/Mu()␤» [17:52] rakudo: my @AoP = X => 3, Y => 5 , M => 7, N => 9; for @AoP -> ( $key, $value ) { say "$key/$value" } [17:52] rakudo 2666b6: OUTPUT«Not enough positional parameters passed; got 0 but expected 2 in sub-signature␤ in at line 2:/tmp/pKAZLJnsz2␤ in main program body at line 1␤» [17:52] rakudo: my @AoP = X => 3, Y => 5 , M => 7, N => 9; for @AoP -> :( $key, $value ) { say "$key/$value" } [17:52] rakudo 2666b6: OUTPUT«Not enough positional parameters passed; got 0 but expected 2 in sub-signature␤ in at line 2:/tmp/hjmVnhGQx6␤ in main program body at line 1␤» [17:52] rakudo: my @AoP = X => 3, Y => 5 , M => 7, N => 9; for @AoP -> [ $key, $value ] { say "$key/$value" } [17:52] rakudo 2666b6: OUTPUT«Nominal type check failed for parameter ''; expected Positional but got Pair instead␤ in at line 22:/tmp/6mnystwRWq␤ in main program body at line 1␤» [17:52] Is there a syntax I am missing, or is binding-to-Pair just NotYetImplimented in Rakudo? [17:53] * takadonet looks at masak [17:57] The relevant part of S06 is "Unpacking tree node parameters", where this kind of binding is used on sub params, but `for` uses arrow-subs, so the bind syntax should be the same for this use-case. [18:02] Util: [ ] unpacking only works for arrays, iirc [18:02] Util: it's () for objects in general [18:04] *** rgrau joined [18:06] *** _jaldhar left [18:06] I tried it because I had a vague memory that a Pair could also be dereferenced like a two-element array. Looks like I mis-remembered. [18:07] Since a Pair is an object, ($key,$value) should call the .key and .value methods on the Pair. [18:12] Util: Shouldn't ($:key, $:value) work? [18:13] benabik: did you mean (:$key, :$value) ? [18:13] benabik: when you set the topic yesterday, the first three characters got garbled, just so you know. [18:13] Util: Probably. [18:13] sorear: Apologies. They looked fine to me, but the encoding probably got changed somewhere. [18:14] rakudo: my @AoP = X => 3, Y => 5 , M => 7, N => 9; for @AoP -> ( :$key, :$value ) { say "$key/$value" } [18:14] rakudo 2666b6: OUTPUT«Mu()/Mu()␤Mu()/Mu()␤Mu()/Mu()␤Mu()/Mu()␤» [18:15] *** jaldhar joined [18:15] benabik: yes, it should also work; S06 just gives the even shorter version in its binding examples. [18:16] *** sftp left [18:16] *** sftp joined [18:17] jnthn: ping [18:17] sorear: I hadn't meant to change it at all, but Conversation has this big button that sets the topic to your current input line... which was empty. :-P [18:18] yeah. irssi has a similar flaw... [18:18] Somewhere between copying from the online log and Conversation, it probably ended up being in some wrong encoding. [18:19] actually... [18:19] nobody has needed to change the topic for a while [18:19] *** ChanServ sets mode: +o sorear [18:19] *** sorear sets mode: +t [18:19] *** ChanServ sets mode: -t [18:19] *** sorear sets mode: -o sorear [18:19] *** kjeldahl joined [18:19] I first removed that button and then switched clients entirely. :-D [18:20] ChanServ didn't like that idea, apparently. [18:20] *** ChanServ sets mode: +o sorear [18:20] *** sorear sets mode: +t-o sorear [18:21] sorear++ for protecting everyone from my tendency to press random buttons. :-D [18:22] *** bpa joined [18:22] *** bluescreen left [18:22] *** vmspb joined [18:25] *** bluescreen joined [18:30] *** guidj0s left [18:41] rakudo: my @AoP = X => 3, Y => 5 , M => 7, N => 9; for @AoP -> (:$key, :$value) { say "$key/$value" } [18:41] rakudo 2666b6: OUTPUT«Mu()/Mu()␤Mu()/Mu()␤Mu()/Mu()␤Mu()/Mu()␤» [18:42] Util: in principle it works, but not with Pair, which is set up from PIR code (and thus the introspection doesn't learn that .key and .value are accessors) [18:44] moritz_: So the syntax you just used will work correctly someday, after introspection learns about the accessors? [18:47] moritz_: I don't see where the quotes you pulled from S02 say that 310/100 should stringify to 3.10. Dunno if I missed a quote or not. [18:47] thanks, everyone! [18:47] *** markmont joined [18:48] moritz_: but I did backlog, anyway. :) [18:48] ~~ [18:52] good morning, everyone, from the great frozen home of Super Bowl XLV [18:52] er, good afternoon, I guess [18:52] \o [18:53] We're now on snow day #4 for this week, with a fresh coating of snow :-) https://picasaweb.google.com/patrick.michaud/20110204 [18:54] how many inches? [18:54] 6 inches overnight. we were forecast for 1-3 inches [18:54] (and it's still snowing lightly here) [18:54] nice [18:54] we got 8 or 9 earlier this week. [18:54] can't even see the steps from our front door down to the street [18:55] like, it's one smooth surface down to the street -- no "bumps" where the edges of the steps would be [18:55] *** bluescreen left [18:56] *** snearch joined [18:58] \o pmichaud [18:58] *** bluescreen joined [18:58] colomon: you're right, it doesn't explicitly follow [18:58] *** vmspb left [18:59] but if not, I see even less point in preserving the denominator [18:59] moritz_: on the whole, it strikes me as a very wrong-headed attempt to make dollars and cents "easy". [18:59] afk, lunch [19:12] rakudo: 953b982 | felliott++ | src/ (3 files): [19:12] rakudo: implement infix: based off Kodi++'s xor work [19:12] rakudo: [19:12] rakudo: Signed-off-by: Moritz Lenz [email@hidden.address] [19:12] rakudo: review: https://github.com/rakudo/rakudo/commit/953b982d7f [19:17] pmichaud: I thought you were in Texas? [19:18] *** kaare_ left [19:18] Tene: Yes, Texas. [19:18] Huh. I'm surprised that you get snow there. [19:18] We get snow usually about once or twice a year. But rarely do we get enough to close schools; and I don't know the last time we had four snow days in a row [19:18] (if ever) [19:20] http://maps.google.com/maps?q=33.087892,-96.761291&ie=UTF8&ll=33.100745,-96.723633&spn=22.372932,33.09082&z=5 # my location [19:21] Apparently the university in Austin is closed. Just because there's snow =) [19:22] *** jaldhar left [19:24] well, keep in mind that the roads and cars (and drivers) in Texas aren't built for snow [19:24] so even a light freeze makes things more than a little treacherous [19:31] *** bluescreen left [19:39] That's a very good point. Still a bit weird for a Norwegian, TBH [19:52] *** mtk left [19:56] masak: BTW, I blame you, Less Wrong and MoR for any mistakes I just made in my homework due to lack of sleep. [19:57] *** coldhead joined [19:58] *** mtk joined [19:59] blaming is easy :-) [20:01] I blame masak for being easily blameable [20:02] yeah, sorry about that. [20:02] perl6: sub infix: ($a, $b) { return 0; } say(1 zero 3); [20:02] rakudo 2666b6: OUTPUT«===SORRY!===␤Confused at line 22, near "sub infix:"␤» [20:02] ..niecza v2-4-gf3cce73: OUTPUT«===SORRY!===␤␤Strange text after block (missing comma, semicolon, comment marker?) at /tmp/ahdHS8WkLl line 1:␤------> sub infix: ($a, $b) { return 0; }⏏ say(1 zero 3);␤Other potential difficulties:␤ $b is declared but not [20:02] ..used at /tmp/ahd… [20:02] ..pugs: OUTPUT«0␤» [20:03] perl6: sub infix: ($a, $b) { return 0; } say(1 Xzero 3); [20:03] niecza v2-4-gf3cce73: OUTPUT«===SORRY!===␤␤Strange text after block (missing comma, semicolon, comment marker?) at /tmp/tEGYFdYqCm line 1:␤------> sub infix: ($a, $b) { return 0; }⏏ say(1 Xzero 3);␤Other potential difficulties:␤ $b is declared but not [20:03] ..used at /tmp/tE… [20:03] ..rakudo 2666b6: OUTPUT«===SORRY!===␤Confused at line 22, near "sub infix:"␤» [20:03] ..pugs: OUTPUT«*** ␤ Unexpected "Xzero"␤ expecting operator, ":" or ")"␤ at /tmp/c_YmP3CS3f line 1, column 47␤» [20:03] Is this a scope issue? or I just misunderstanding the X operator? [20:04] rakudo: class MyPair { has ($.key, $.value }; for MyPair.new(key => 1, value => 2), MyPair.new(key => 1, value => 10) -> (:$key, :$value) { say "$key/$value" } [20:04] rakudo 2666b6: OUTPUT«===SORRY!===␤Unable to parse declarator, couldn't find final ')' at line 22␤» [20:04] bpa: read the eorror mesasge [20:04] bpa: need a semicolon after the closing brace [20:04] closing brace ends a statement only if it's the last thing on the line [20:04] std: class MyPair { has ($.key, $.value }; for MyPair.new(key => 1, value => 2), MyPair.new(key => 1, value => 10) -> (:$key, :$value) { say "$key/$value" } [20:04] masak: I think the piles of laughter my wife and I got are worth being a little tired. :-D [20:04] std 625303c: OUTPUT«===SORRY!===␤Unable to parse declarator at /tmp/Vsh16l4vIg line 1:␤------> class MyPair { has ⏏($.key, $.value }; for MyPair.new(key =>␤Couldn't find final ')'; gave up at /tmp/Vsh16l4vIg line 1:␤------> class MyPair { has ($.key, [20:04] ..$.value … [20:05] perl6: sub infix: ($a, $b) { return 0; }; say(1 Xzero 3); [20:05] pugs: OUTPUT«*** ␤ Unexpected "Xzero"␤ expecting operator, ":" or ")"␤ at /tmp/0LiapCcPdo line 1, column 48␤» [20:05] ..niecza v2-4-gf3cce73: OUTPUT«Potential difficulties:␤ $b is declared but not used at /tmp/vP0P2eLAJr line 1:␤------> sub infix: ($a, ⏏$b) { return 0; }; say(1 Xzero 3);␤ $a is declared but not used at /tmp/vP0P2eLAJr line 1:␤------> sub infix: (⏏$a, [20:05] ..$b) { return … [20:05] ..rakudo 2666b6: OUTPUT«===SORRY!===␤Could not find sub &infix:␤» [20:05] there, the rakudo error I was looking for... sub not found [20:05] std: class MyPair { has $.key; has $.value }; for MyPair.new(key => 1, value => 2), MyPair.new(key => 1, value => 10) -> (:$key, :$value) { say "$key/$value" } [20:05] std 625303c: OUTPUT«ok 00:01 125m␤» [20:06] bpa: that's a problem with rakudo not doing lexical lookups in the X meta operator [20:06] bpa: 'our sub infix:' would be a workaround [20:06] so, known issue then [20:06] rakudo: class MyPair { has $.key; has $.value }; for MyPair.new(key => 1, value => 2), MyPair.new(key => 1, value => 10) -> (:$key, :$value) { say "$key/$value" } [20:06] rakudo 2666b6: OUTPUT«1/2␤1/10␤» [20:06] yes [20:06] Util: see above for a working example of unpacking in signature [20:08] benabik: #perl6: fun times for the whole family. [20:09] hm, I'm looking at Text::Wrap and wondering if a straight port is really such a good idea. Behaviour controlled by global variables? blegh [20:10] the our fixes that nicely, thank you for the tip [20:10] flussence: if there are good defaults, just use (named) parameters with defaults [20:10] flussence: it's not a good idea but I just wanted to work first then improve it later [20:11] change anything that you see fit [20:12] I'm still trying to figure out what most of these 1..3 char variables are for :) [20:13] (first thing I'm going to do is translate them into english) [20:24] *** nadim_ left [20:25] benabik: anyway, I'm glad you seem to like MoR. yet another convert. ;) [20:26] masak: I'm trying to spread it through my little corner of the country/'net. ;) [20:26] \o/ [20:26] *** snearch left [20:27] I've probably told about 20 friends about it by now, with varying degrees of persuasion depending on the friendship. [20:27] the better the friendship, the less persuasive? :-) [20:27] guess again... :P [20:27] :-) [20:31] *** kaare_ joined [20:32] *** nadim_ joined [20:37] *** plainhao left [20:37] moritz_: okay, this is weird. I'm starting to think the spec might imply that (310/100).perl has to be 3.10, while I don't see anything about what (310/100).Str does. [20:38] basically, the rules in the spec seem insane to me. [20:38] or perhaps more nicely, a valiant attempt to imply fuzzy DWIM logic to things. [20:38] Wouldn't a Rat simplify to 31/10? [20:39] arnsholt: that's what we're looking at right now. [20:39] under the current implementation, yes. [20:39] (in Rakudo, I mean) [20:39] but by spec, there are times when it is not supposed to simplify. [20:39] If you don't always simplify, comparing Rats would get kinda complicated, at a guess [20:39] * arnsholt goes to read the spec [20:40] s/imply/impart/ back a few lines. [20:40] arnsholt: S02 [20:40] moritz_: I might be wrong about the .perl being 3.10 thing. [20:41] because the .perl function is supposed to normalize the fraction unless it's exactly representable as a decimal number. [20:42] which means if $a is a Rat, $a == $a.perl.eval, but $a.numerator does not have to equal $a.perl.eval.numerator. [20:43] that sounds, if not insane, then at least cruel and unusual :) [20:45] I get a feeling I'm porting Perl 4 code to Perl 6... [20:45] Here's the rationale, I think: "Although most rational implementations normalize or "reduce" fractions to their smallest representation immediately through a gcd algorithm, Perl allows a rational datatype to do so lazily at need, such as whenever the denominator would run out of precision, but avoid the overhead otherwise." [20:45] Well, it says "allows a rational datatype to lazily [reduce] at need", which I guess means that $a.perl.eval.numerator may or may not be the same as $a.numerator [20:46] arnsholt: right, that's what I said. [20:47] but how weird is it that using .perl.eval doesn't produce the same Rat value, just a Rat with the equivalent numerical value? [20:47] *** molaf joined [20:48] Yeah, that sounds like an FAQ item [20:48] but then there's also "Rat addition and subtraction should attempt to preserve the denominator of the more precise argument if that denominator is an integral multiple of the less precise denominator." [20:48] *** shortcircuit left [20:48] .perl ends the laziness, no? [20:48] Which seems to imply there are cases where it is more likely (but still not necessary) that the fraction simplifies. [20:49] Sounds like something that should either be implementation-dependent, or be concretised a bit [20:50] *** shortcircuit joined [20:53] perhaps part of the source of my confusion is this: If the Rat automatically lazily simplifies, what is the point of the language about preserving the denominator from the second quote above? [20:55] That is, is the Rat implementation allowed to be lazy for the purposes of efficiency, or is it required to be lazy in some cases? [20:55] s/required to be lazy/required to "attempt" to be lazy/ [21:01] the way I read the spec is that it's not a requirement, just a warning to the user not to expect it to always be normalised [21:02] we'll just leave it as-is in Rakudo until somebody submits a bugreport with a sensible interpretation of the spec :-) [21:02] /o\ [21:02] * tadzik 's phone just took a bath in yoghurt [21:02] remove the batterie, and wash it [21:03] It's sad how something so ridicolous can have such a sad effects [21:03] *** MayDaniel joined [21:03] moritz_: in water? I tried to remove the yoghurt from everywhere I reached [21:03] what kind of yoghurt was it? [21:03] uhm, strawberry. With these... [21:03] phenny: "nasiona"? [21:03] tadzik: "seeds" (pl to en, translate.google.com) [21:04] strawberry and telephone flavour, delicious. [21:04] yeah, that's it. Although I think they didn't get inside [21:04] tadzik: yes. But only if you think that the water doesn't go in deeper than the jogurth [21:04] I wouldn't bet on that [21:04] I've had success with a laptop keyboard + orange juice [21:04] it was working just a moment after I took it out of the pocket, then stopped [21:04] removed battery, cleaned it with water, dried it [21:04] depends how long it was in there. I'd imagine a phone has some moisture resistance for rain and stuff... [21:09] * masak finds himself writing A::B(...) instead of A::B.new(...) far too often [21:09] masak: same here [21:10] probably about every third or fourth time I try to call .new, I'd guess. [21:10] yeah, it happens often. [21:10] in one of my projects I defined postcircumfix:<( )> to delegate to .new [21:11] probably not a good habit, but it felt like it helped. :) [21:11] Nice trick =) [21:13] tadzik: You know those little packets or cans of mosture-absorbants that are packed in pill bottles and shoeboxes? [21:13] Some company make envelopes completely lined with that stuff, to if you drown your watch or laptop, you can dry it in overnight instead of over-weeks. [21:13] moritz_: Thanks! I see that it also works without the colon (as a shortcut), and as :key($k), :value($v) to assign to vars with different names: [21:13] rakudo: class MyPair { has $.key; has $.value }; for MyPair.new(key => 1, value => 2), MyPair.new(key => 1, value => 10) -> ($key, $value) { say "$key/$value" } [21:13] rakudo 953b98: OUTPUT«1/2␤1/10␤» [21:13] rakudo: class MyPair { has $.key; has $.value }; for MyPair.new(key => 1, value => 2), MyPair.new(key => 1, value => 10) -> (:key($k), :value($v)) { say "$k/$v" } [21:13] rakudo 953b98: OUTPUT«1/2␤1/10␤» [21:13] Util: silica gel, yes [21:14] rakudo: #= :( [21:14] rakudo 953b98: OUTPUT«===SORRY!===␤Whitespace character is not allowed as a delimiter at line 22, near " :("␤» [21:14] known? [21:14] *** uvtc joined [21:14] I should have one in a camera bag [21:14] flussence: I think so, yes. [21:15] tadzik: Hi. Any tips on that segfault I'm seeing while installing neutro? I filed a report on github. [21:19] *** ashleydev left [21:20] *** ashleydev joined [21:21] uvtc: yeah, saw that. And I'm quite sure this is a Parrot issue. I assume that's reproducible? [21:22] colomon: I'm fine with any standard math function being in the user's namespace directly [21:22] *** kaydsoft left [21:23] *** kaydsoft joined [21:23] \o/ [21:23] TimToady: so gcd is okay? \o/ [21:23] gcd is fine; we should merely try to avoid polluting the namespace with N slightly incompatible variants of every function like PHP does [21:23] tadzik: on my system, yes. If I run it again, I get [21:24] but the setting is an outer lexical scope so that it can be overridden [21:24] tadzik: 2 "fatal: ..." about mt and ft already existing, [21:24] so it doesn't matter so much if we prepopulate the namespace with useful stuff [21:24] tadzik: but then get the Segfault again. [21:24] esp if it can be loaded lazily [21:25] uvtc: huh, strange. Do you use some longer-running Perl 6 programs? [21:25] comparable to neutro [21:26] tadzik: no, no Perl 6 programs running at the moment. [21:26] the segfault is most definitely not my fault, still it's worth investigating, I've had segfaulting Perl 6 some time ago too [21:26] uvtc: what if you try to bootstrap neutro piece by piece, so: [21:26] PERL6LIB=mt/lib:ft/lib:jt/lib bin/neutro File::Tools [21:26] tadzik: could you please tell me how I'd go about manually installing perl6-File-Tools (the way... [21:27] uvtc: please try to rm -rf ~/.perl6/lib [21:27] I mean, perl6-File-Tools, then perl6-Module-Tools, then neutro [21:27] maybe it'll run fine in smaller portions [21:27] colomon: I'm not sure it's worth doing all the min/max stuff in gcd, if the first % will automatically invert the pair as necessary [21:27] having precompiled but outdated .pir files can lead to weird errors [21:27] tadzik: right. Could you please tell me how to do that? [21:28] moritz_: I've got no ~/.perl6 dir. [21:28] uvtc: sure thing. Look at the last line of bootstrap.sh script. It installs 'from the current directory', so a dot. Now instead of the dot, supply the module name, so perl6-File-Tools first [21:28] uvtc: ok, one possible error source down [21:28] TimToady: actually, we probably don't want to calculate the gcd in Perl 6. Parrot has a gcd opcode, and the big digits library does as well. [21:28] moritz_: Oh, I guess I'd assumed that neutro would create it if necessary... [21:28] rakudo: say (12, 15, *+* ... 0).Str [21:29] moritz_: will create and try again... [21:29] rakudo 953b98: OUTPUT«(timeout)» [21:29] whoops [21:29] That's part of the reason I wanted a gcd function available, so that the fast magic could happen in just one place. [21:29] moritz_: https://github.com/tadzik/neutro/issues#issue/3 -- it segfaults after some time [21:29] rakudo: say (12, 15, * % * ... 0).Str [21:29] rakudo 953b98: OUTPUT«12 15 12 3 0␤» [21:29] hmm, or maybe not [21:29] uvtc: let me know how is installing everything piece by piece going [21:30] tadzik: after manually creating my own ~/.perl6 dir, and then trying again, it seems to have worked. [21:31] colomon: nevermind, I see you figgered that out later [21:31] that's strange as hell [21:31] rakudo: 9242428 | moritz++ | build/PARROT_REVISION: [21:31] rakudo: bump PARROT_REVISION to get some testing on newer birds [21:31] rakudo: review: https://github.com/rakudo/rakudo/commit/92424287bd [21:31] uvtc: could you try again and confirm that all the problem is caused by a lack of ~/.perl6 directory? [21:32] tadzik: sure, just a sec... (`rm -fr ~/.perl6` and trying again...) [21:33] tadzik: hm. This time there's no ~/.perl6/lib directory present after bootstrap.sh finishes running. [21:33] tadzik: will try again, this time starting with a fresh neutro... [21:34] it gets stranger every time :) [21:34] uvtc: could you add --v to neutro options in bootstrap.sh? It shouldn't affect anything, it'll just give us more info [21:35] tadzik: ran everything again from scratch. No ~/.perl6/lib dir created, so I don't know where it thinks it installed those prereqs. [21:35] tadzik: trying again with --v... [21:36] *** MayDaniel left [21:36] *** V15170R left [21:37] tadzik: no difference that I can see when running with --v. [21:37] huh [21:37] *** vmspb joined [21:37] uvtc: ooc, could you checkout the metainfo branch, and try on that version? [21:41] tadzik: just a sec. I added my ~/.perl6/bin to my PATH, and tried `neutro perl6-Acme-Meow` and it worked. [21:41] cool [21:41] could you try something with some dependencies, like Math-Model? [21:43] tadzik: where is it finding perl6-File-Tools and perl6-Module-Tools? [21:43] uvtc: is ~/.perl6/lib, it should [21:44] tadzik: no, the only thing in there is Acme/Meow.* [21:44] tadzik: (and JSON -- that worked too) [21:44] I wonder how did it work [21:44] what does echo $PERL6LIB give you? [21:45] tadzik: I tried renaming my ~/temp/tadzk-neutro-xyz dir (thinking that neutro was using the modules from there), but neutro still works. [21:45] tadzik: nothing. Not set. [21:46] magic [21:46] How can I ask perl6 what it's module search path is? [21:47] rakudo: say @*INC.perl [21:47] rakudo 953b98: OUTPUT«["lib", "/home/p6eval/.perl6/lib", "/home/p6eval//p1/lib/parrot/3.0.0-devel/languages/perl6/lib", "."]␤» [21:48] Looks like R* comes with perl6-File-Tools and perl6-Module-Tools. :) [21:48] oh, that's * [21:49] tadzik: yes [21:49] yeah, that explains a lot [21:49] tadzik: Sorry, perhaps I should've explicitly mentioned it here. I did so in the bug report. [21:49] No, not your fault [21:50] tadzik: Perlhaps I should file a new issue, requesting that neutro check first if those two packages are already installed? [21:50] good * #perl6 [21:50] looks to me that I've never installed Star, so I have no idea how neutro works there [21:50] uvtc: it has no way to check for presence of modules it hasn't installed by itself [21:51] I think neutro was included in Star some time ago too [21:51] tadzik: I don't see it in my /usr/local/rakudo/bin dir. [21:52] that's correct, it Was included, not it's not [21:52] * now it's not [21:55] tadzik: I think the solution for now is: 1. have bootstrap check for the presence of ~/.perl6 (if it's not there, create it) [21:55] uvtc: I'm quite sure neutro creates .perl6 internally if it's not present, will look into this tomorrow [21:56] tadzik: thanks! [21:56] thank you! [21:56] tadzik: Sure, yw. :) Also, perhaps (for now) a note in the readme to just run "neutro ." to bootstrap if using R*. [21:57] uvtc: well volunteered :) [22:00] tadzik: Ok. Will do, soon (need to make some time to learn git/github first). I fork neutro and send you a pull-request, correct? [22:01] moritz_: is it bad of me to think people shouldn't be using perl6: if they only care about rakudo: ? [22:01] uvtc: can be. Or just a patch, what's easier for you [22:01] TimToady: What do you mean by the !%foo:exists thinko? [22:01] sorear: pong [22:01] it applies the adverb to the !, not the subscript [22:01] sorear: But just back from a week's teaching and tired. So ask easy questions. :P [22:02] adverbs are at assignment precedence, give or take [22:02] TimToady: is this a problem with Perl? [22:02] you were wondering why it was producing a funny result, iirc [22:02] was several days ago [22:03] ok. [22:03] but couldn't reply from behind my http proxy [22:03] tadzik: ok, will get back to you (here, on irc -- I don't see an email address for you anywhere). [22:04] though, come to think of it, we might be able to make 5foo:!exists work [22:04] jnthn: I'd just like help understanding native types and stuff [22:04] s/5/%/ [22:04] *** mtk left [22:04] uvtc: irc is fine too [22:04] jnthn: in nqp-nom, is "foo" supposed to make a parrot;Str? [22:05] sorear: It does at the moment. [22:06] sorear: I suspect that the dotnet impl is a better example of how things should be. Sort of. But only sort of. [22:06] sorear: Nominally, "foo" makes a native string that gets boxed if the context needs it to be. [22:09] native string = str, boxed string = Str? [22:10] *** molaf left [22:10] sorear: Yes [22:10] sorear: Note that the type object for str is an object [22:10] what I'm most fuzzy on is the concept of inlinable representations [22:10] sorear: But we never end up with instances of it. [22:11] It's kinda a "placeholder" [22:11] Though that's a bad word I guess. But I don't have a better one to hand :) [22:11] *** uvtc left [22:11] so, str !=== Str [22:11] does str ~~ Str? [22:12] (str !=== Str) correct [22:12] str ~~ Str - not sure, off hand. Feasibly. [22:12] I'm quite sure that str ~~ Stringy [22:12] People tend to write Str in multiple dispatchy contexts. [22:12] I think we'll end up with str ~~ Str, int ~~ Int, num ~~ Num and so forth. [22:13] Unless TimToady++ feels otherwise. :) [22:13] But it's probably most natural that way. [22:13] +1 [22:13] I suppose str has to become Str when placed in a parcel. [22:13] er [22:13] capture [22:13] It'd be unfortunate if you boxed something - or more important it got boxed for you due to context - and then your multi candidates boxed differently. :) [22:14] sorear: Actually Parrot's calling captures are smart enough to do otherwise. [22:14] sorear: And I was expecting to make that the case in nqpclr too. [22:14] sorear: Otherwise you can't make a call without boxing, which would probably suck. [22:15] especially if you're calling a C function... [22:15] Of course, you could rely on aggressive inlining coming to the rescue (I mean inlining the optimization here, not the REPR inlining - which maybe I shoudl call something else...) [22:15] What do you call the smallest runtime type which contains object and unboxed native types? [22:15] If I have my Mu $x; is it possible for $x.WHAT === str? [22:16] I've been pondering that. Some of me wonders if Scalar is meant to end up as a parametric role, just like Array and Hash are kinda meant to be. [22:16] native types are really container types, so it can't also be Mu [22:16] Depends if that can be made efficient enough I guess. [22:17] TimToady: I could see $x.WHAT === str being true in some case though, given that .WHAT is a macro, not a method. [22:17] s/container types/container types known to the compiler so they don't have be known to the runtime/ [22:17] jnthn: nod [22:18] TimToady: my Mu $x - I guess that would box on assignment because the container forces it to. [22:18] *** mkramer1 left [22:18] to me it becomes clearer with a type like int, which obviously has no internal typeness [22:18] *nod* [22:19] Yeah, strings are...kinda weirder in that sense. :) [22:19] I think ints are weirder because Int and int have vastly different domains [22:19] Every backend will probably have some notion of string that's lighter than what Str entails though. [22:19] * TimToady is still not sure that str exists at the P6 level [22:20] sorear: in that sense, int is a subset type of Int [22:20] native storage implies extra arbitrary constraints on the type [22:21] *** pmurias joined [22:21] sorear: hi [22:22] jnthn: re lowlevel string, the question if the notion is shared across backends if not we might want to leave using backend specific lowlevel type to the optimizer [22:23] pmurias: putting lexical stashes in the stash tree means that there is a single unified stash tree [22:23] the question I think is whether one might want to write generic code against some abstract 'str' type [22:24] *** felliott joined [22:24] one would have to see a good use case [22:24] we also start getting into notions of a Foo type that can be foo on some machines but has to be Foo on others [22:25] so maybe abstract types can be uppercase but optimizable to lowercase types in some cases [22:25] and maybe Str is good enough without str [22:25] TimToady: That may well be the case. [22:26] TimToady: something similar to java's Integer and int but being able to drop Integer down to int? [22:26] as currently defined, for instance, Num can always optimize to num [22:26] I am not sufficiently familiar with java types to say [22:27] TimToady: same here, but java has Integer as an object and int as a primitive type ... [22:27] sorear: what do we need a single unified stash tree for? [22:28] http://mindprod.com/jgloss/intvsinteger.html [22:29] hmm, json doesn't support cycles [22:30] sorear: i'll implement more of the lisp backend and we will see how the design works out for a different target [22:30] pmurias: I don't understand your issue with globalness [22:30] pmurias: it makes stash merging a lot simpler [22:31] * TimToady has just realized that you could define fixed-point numbers with implied denominators with Rat[Int,100] [22:32] it's a very useful notion to have constants be degenerate subset types [22:32] sorear: by issue was how do we determin if it's a global stash entry named SAFE:7 or a lexical one [22:33] s/by/my [22:33] global stash entries have names like GLOBAL::Foo [22:33] if it doesn't start with GLOBAL, it's not global [22:33] so all of the stash entries are lexical [22:34] the topmost stash contains the following children: GLOBAL, PROCESS, UNIT:NUMBER [22:34] it seems ok then [22:35] i didn't consider the fact that json has no cycles too [22:35] is something making cycles? [22:37] no, just refering to things by names instead of just having reference to that seems strange [22:38] STD had a lot of bugs because it was using a strange refer to stuff by name scheme [22:41] TimToady: What is the .WHAT.perl of 37/100? Can it be assigned to a variable of type Rat[Int,Int64]? Rat? How about Rat[Int,Int]? Rat[Int,100]? [22:41] *** stkowski joined [22:42] sorear: re debugging names which are part of an xref do they help you with anything? [22:45] yes [22:45] sorear: my interpretation of the spec is that 37/100 is a Rat. (ie Rational[Int,Int64]) I think other Rational types have to be created explicitly with .new [22:48] *** jferrero left [22:52] *** jferrero joined [23:08] *** s1n joined [23:14] *** alester left [23:17] well, here's a start: https://github.com/flussence/Text-Tabs-Wrap/blob/cleanup/lib/Text/Wrap.pm [23:20] sorear: how can i specify an empty setting? [23:23] rakudo: (say "OH HAI" if $_ > 4 for 1, 2, 3) or say "empty!" [23:23] rakudo 924242: OUTPUT«empty!␤» [23:24] rakudo: (for 1, 2, 3 { if $_ > 4 { say "OH HAI" } }) or say "empty!" [23:24] rakudo 924242: ( no output ) [23:24] * masak submits rakudobug [23:24] *** drbean joined [23:26] rakudo: say (for 1, 2, 3 { if $_ > 4 { say "OH HAI" } }).perl [23:26] rakudo 924242: OUTPUT«(Bool::False, Bool::False, Bool::False)␤» [23:27] rakudo: say (say "OH HAI" if $_ > 4 for 1, 2, 3).perl [23:27] rakudo 924242: OUTPUT«()␤» [23:34] *** pmurias left [23:35] phenny: tell pmurias -L NULL [23:35] sorear: I'll pass that on when pmurias is around. [23:36] *** bpa left [23:39] *** pecastro joined [23:44] *** vmspb left [23:46] all Yapsi tests now pass again locally. [23:47] I'll do some cleanup tomorrow morning, and then a release. [23:47] masak++ [23:47] Yapsi is now brimming with extensibility :) [23:47] .oO( Official Perl 6 compiler release officially delayed to ensure it's continuing completeness ) [23:47] *its [23:49] I'm going to brag about FUTURE having being more streamlined by having one fewer node type than PAST, and much more informative by having ten or so more nodetypes. :P [23:49] *** wooden left [23:50] *** whiteknight joined [23:52] jnthn: is my Mu $x = int; legal? What methods does $x respond to then? [23:52] anyone here a GPL expert? [23:53] sorear: It'd compile and assign. I guess the method call on it should make it box to Int before the dispatch though. It's a kinda edge case. :/ [23:53] Because the type object is the only place where that's really a possibility. [23:54] 'night, #perl6 [23:54] *** masak left [23:57] *** cafesofie joined