􏿽xBB􏿽xF6􏿽xAB Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: irc.perl6.org/ | UTF-8 is our friend!
Set by Benabik on 3 February 2011.
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
snarkyboojum how (im)possible would it be to write a Perl 6 parser in C? :D 00:59
sjohnson snarkyboojum: SMOP 01:00
www.perlfoundation.org/perl6/index.cgi?smop
not sure how far along it's coming, however. 01:01
maybe it wasn't as simple as they thought ;)
snarkyboojum sjohnson: how much of Perl 6 does it parse? :D
sjohnson: cheers for linkage
sjohnson ruoso / pmurias could tell you :)
snarkyboojum there doesn't seem to be a smop target for evalbot 01:03
Parsing Perl 6 (in any language) sounds like an interesting thesis topic :P 01:13
colomon flussence: fixing << >> quoting has been on my to-do list for about five months now, I think. :) 01:21
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
sorear good * #perl6 01:42
phenny sorear: 03 Feb 10:18Z <jnthn> 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.
sorear: 03 Feb 10:20Z <jnthn> 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.
sorear: 03 Feb 10:21Z <jnthn> 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.
sorear jnthn: on now? 01:43
colomon \o 01:46
01:50 patspam left
sorear ruoso is back in #perl6? 01:51
01:52 dukeleto left 01:53 dukeleto joined
sjohnson looks like it 02:00
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
colomon huh 02:29
sjohnson o
oops, hi
colomon 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"
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
colomon If I switch it to infix:<FR+>, it works fine... :\ 02:33
02:36 drbean left
Tene colomon: sounds like rakudobug to me. 02:38
colomon Tene: That's what I'm thinking too, but I've been confused by import / export issues before... 02:39
snarkyboojum what does is export(:DEFAULT) do? 02:47
sjohnson looks like it exports default symbols
could be wrong though :)
Tene adds it to the default list of symbols to export to scopes that use that module.
snarkyboojum sjohnson: what does "exports default symbols" mean?
colomon it says "export this sub from this module." 02:48
snarkyboojum what's the difference between that and just 'is export'?
colomon snarkyboojum: as far as I know, there is none.
Tene None.
colomon :DEFAULT is just a little more explicit.
Tene You can give other tags for it to be in, though. 02:49
snarkyboojum ok
Tene :MANDATORY, iirc, is always exported even if you ask for a different tag set, or nothing.
or is export(:foo)
then it's only imported when you ask for the :foo tags
etc.
snarkyboojum colomon: does it work if you don't specify 'is export'? (newbie questions here) :) 02:50
02:51 stifynsemons left
colomon without "is export", it doesn't complain, but it doesn't get that operator, either. 02:52
so it converts the FatRats to Nums before doing the math. 02:53
snarkyboojum how about just using 'is export' without the :DEFAULT adverb or whatever it's called
colomon trying... 02:54
"Can't import symbol &infix:<+> because it already exists in this lexical scope"
snarkyboojum how bizarro 02:55
colomon believe me, I'm not enjoying it. :\ 02:56
sjohnson let the good times roll, with perl 6
snarkyboojum what would 'our multi sub infix:<+>(Math::FatRat $a, Math::FatRat $b) is export' do?
package scope or some such?
colomon adding our, you mean?
snarkyboojum yeah
colomon exact same result as without the our. 02:57
snarkyboojum ok. thanks for entertaining my questions :)
colomon thanks for thinking systematically! my brain is pretty fried tonight.
snarkyboojum shouldn't 'our' install the operator in a different scope or something?
colomon 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.
snarkyboojum another permutation would be to use our without 'is export' hehe :)
colomon trying...
snarkyboojum I seem to remember it needing to be there for rakudo, but that's fuzzy and probably totally wrong :)
colomon 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:00
guess I should be trying to golf this. 03:01
snarkyboojum oh well, should make for entertaining (if not annoying) reading for anyone backlogging :)
colomon :)
snarkyboojum and I should probably read S11
colomon me too. ;)
03:07 patspam joined
colomon huh. My super-simple golf doesn't duplicate the problem. :\ 03:13
03:13 patspam left
colomon aha! 03:13
03:13 mkramer1 joined
snarkyboojum me neither, but my super simple golf doesn't do what I expected it to do either :) 03:17
03:18 Sarten-X left 03:19 stifynsemons joined
snarkyboojum colomon: e.g. gist.github.com/810690 03:22
colomon: but then, nfi :) 03:23
colomon I don't think "is Num" works yet.
snarkyboojum colomon: doesn't work without it.. and I get max recursion errors if I do 'does Numeric' 03:24
colomon one sec
snarkyboojum if I just do class A {} I get 'Can't take numeric value for object of type A'
k
03:26 Sarten-X joined
colomon okay, one step at a time, I guess. 03:27
rakudo: gist.github.com/810690
p6eval rakudo 2666b6: ( no output )
snarkyboojum didn't know evalbot could run gists - cool :) 03:28
colomon it's a new feature, I'm not even sure if it worked there. :) 03:29
snarkyboojum that's what I get locally :P 03:30
colomon it actually looks like the is Num part there is working.
snarkyboojum rakudo: gist.github.com/810690
p6eval 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
..502:CORE.settin…
snarkyboojum looks it works :)
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 ;)
it* 03:32
colomon 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; }
snarkyboojum :S
colomon since if you have a Numeric type and you ask for a Numeric type, then all you need to do is return yourself.
snarkyboojum rakudo: gist.github.com/810690
p6eval 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␤»
snarkyboojum that's just class A {}
rakudo: gist.github.com/810690 03:34
p6eval rakudo 2666b6: ( no output )
snarkyboojum :)
colomon wait, the explanation I was embarking on makes no sense. sigh.
too tired, should be going to bed. 03:35
snarkyboojum I'll stop stirring the muddy water then :)
szbalint oh joy, time to catch a flight 03:36
colomon snarkyboojum: I don't think your infix:<+> declarations are doing anything there. 03:40
snarkyboojum yeah, not sure they're being used :D
colomon I've just deleted them and gotten the same results in two of the cases. :)
snarkyboojum colomon: hehe. muddy. water. etc. 03:41
apparently S13 talks about an 'is exported' 03:42
is that a typo?
colomon presumably. 03:43
okay, the "does Numeric" case.
You're supposed to have arithmetic operators for classes that do Numeric. 03:44
when you don't, it calls
our multi sub infix:<+>($a, $b) {
+$a + +$b;
}
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.
snarkyboojum colomon: ah - nasty error in that case
03:47 patspam joined, patspam left, patspam joined
colomon so, your case where it's not Num or Numeric. 03:47
snarkyboojum yeah... 03:48
colomon In that case, you still call the above infix:<+>
snarkyboojum oh, so it still wants a Numeric type?
colomon but this time +$a calls Any.Numeric, which dies with the "Can't take numeric value" message you got. 03:49
snarkyboojum so you're not truly overriding the op..
colomon you didn't override the op, you just declared it without a body, so it called the default Any version. 03:50
snarkyboojum colomon: same errof if a body is provided 03:51
and { ... } is a body isn't it?
a "not implemented" body :D
colomon apparently not, based on what we've just done! :)
snarkyboojum well even providing a body still results in the same error "Can't take numeric value for object of type A"
colomon you're right about the same error if a body is provided, I don't understand that. 03:52
snarkyboojum maybe it's is exported not doing the right thing - nfi
sorear good * #perl6
snarkyboojum o/
colomon \o
03:53 masonkramer joined
snarkyboojum sorear will be able to put his finger on the issue :P 03:53
but I don't want to distract him from hacking on Niecza :D 03:54
03:55 benabik joined, Limbic_Region left
colomon if you take infix:<+> out of class A, it works as you'd expect. 03:57
03:58 felliott left
colomon actually, I think I'm gonna report this as a bug as well. 03:58
snarkyboojum colomon: yeah, it's just not registering the infix op 04:03
colomon bug submitted.
04:04 VXZ joined
colomon BTW, if you call infix:<+> in the class body, it does call the infix:<+> defined there. 04:05
rakudo: gist.github.com/810730
p6eval 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␤»
colomon afk # bed
snarkyboojum colomonČ laku noć 04:06
eek
04:08 patspam_ joined 04:09 patspam_ left, patspam_ joined 04:12 patspam left, patspam_ is now known as patspam 04:13 Sarten-X left
sorear snarkyboojum: niecza is blocking on jnthn++'s tuits; I have spare cycles; what do you want? 04:17
04:18 mtk left
snarkyboojum sorear: just something colomon was trying to work out with rakudo as you said good * earlier.. feels like we're missing something obvious :) 04:18
04:23 Su-Shee_ joined 04:24 Su-Shee left 04:25 satyavvd joined 04:26 mtk joined 04:28 patspam left, patspam joined 04:38 patspam left 04:42 snearch joined
snarkyboojum Who's doing future rakudo releases? Schedule looks MT. 04:47
04:54 Sarten-X joined, karb joined 04:58 karb left
sorear MT? 05:00
jdhore Michael Tiemann? 05:01
:P
snarkyboojum empty ;) 05:17
05:23 Grimnir_ left
sorear »ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: irc.perl6.org/ | UTF-8 is our friend! 05:25
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, uniejo_ joined
sorear -> sleep 06:41
06:52 Chillance joined 06:55 Chat7352 joined 06:56 Chat7352 left 07:00 kaare_ joined
dalek d: fe05c9c | larry++ | STD.pm6:
warn on Useless use of [] around infix op
07:05
diakopter TimToady! 07:19
07:19 cognominal left
TimToady we got back from India, it would appear 07:19
07:20 cafesofie left
diakopter You probably didn't travel by apparition 07:20
07:21 wtw joined
diakopter hopes masak & moritz read this 07:21
TimToady 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
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
moritz_ good morning 07:32
jnthn morning
TimToady o/
jnthn TimToady: Welcome back. Ö=
TimToady: Hope you had a good trip. 07:33
oops, ESWEDISHKEYBOARD
TimToady is back from the land of http proxies...
jnthn :-)
07:39 drbean joined
TimToady phenny: tell sorear a couple days ago I noticed a !%foo{$x}:exists or some such, which is a precedence thinko 07:41
phenny TimToady: yeah, sure, whatever
diakopter o_. 07:42
TimToady (makes the :exists apply to the ! rather than the subscript) 07:43
07:48 am0c joined 07:53 [particle] joined
jnthn When did phenny turn rebellious? :) 07:54
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
colomon 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:01
moritz_ (maybe in a namespace, like Math::gcd) 09:03
but in general, +1 from me
rakudo: say 2 minmax 5 09:04
p6eval rakudo 2666b6: OUTPUT«2345␤»
moritz_ surprised
rakudo: say (2 minmax 5).perl
p6eval rakudo 2666b6: OUTPUT«2..5␤»
moritz_ rakudo: sub gcd(Int $x, Int $y) { (($x max $y), ($x min $y), * % * ... 0)[*-2] }; say gcd 24, 16 09:05
p6eval rakudo 2666b6: OUTPUT«8␤»
colomon moritz_: minmax returns a Range. 09:09
moritz_ yes, so I noticed :-)
colomon rakudo: sub gcd(Int $x, Int $y) { ($x, $y, * % * ... 0)[*-2] }; say gcd 24, 16; say gcd 16, 24 09:10
p6eval rakudo 2666b6: OUTPUT«8␤8␤»
09:10 cafesofie joined
moritz_ ah right, no need for sorting 09:11
colomon 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:12
moritz_ well, for the Mandelbrot thing you also need to limit the number of iterations, iirc 09:13
colomon 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)
p6eval rakudo 2666b6: OUTPUT«===SORRY!===␤Malformed multi at line 22, near "sub foo(Nu"␤»
moritz_ urks. use Numeric
colomon 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
09:14 flatwhatson_ left
moritz_ colomon: ah, clever idea 09:14
colomon 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)
p6eval 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
.."Foo!…
colomon 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
p6eval 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,
..Int…
moritz_ colomon: there are no disjunctive types
colomon 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)
p6eval rakudo 2666b6: OUTPUT«Foo!␤»
colomon oh? 09:17
moritz_ that works, but note that the multi dispatch behavior is different than a hypthetical "real" Int | Num
because here the nominal type is Numeric, and the Int | Num is just a constraint which can contribute an epsilon of tightness 09:18
colomon What I'm really wanting here is the Rational role. :) 09:19
moritz_ that's what Rat is supposed to be 09:20
colomon you mean, Rat is supposed to be "does Rational"? yes.
I mean, class Rat does Rational 09:21
09:21 flatwhatson_ joined
moritz_ I can't remember exactly 09:22
but there should be a role that basically does what Rat does, which is parameterized by the type of numerator and denominator 09:23
colomon Rational[Int,uint64] for example, is our standard Rat. (this is from S02) 09:24
moritz_ ok
colomon FatRat is just Rational[Int,Int] 09:25
moritz_ right
colomon the reason I'm looking at it closely is infix:<+> for Math::FatRat.
you should be able to add a normal Rat to a FatRat and get a FatRat.
moritz_ colomon: if it helps you, feel free to add a Rational role to Rakudo, even if it doesn't do much yet 09:26
colomon and the code involved is *exactly* the same in the sub body as adding two FatRats
Thing is, it feels a little bit funky to me. 09:27
moritz_ that's probably because there are lots of missing pieces in Rakudo 09:28
colomon If you add Rational[A, B] to Rational[C, D], how do you figure out the resulting type?
moritz_ by dispatchting to the * and + and / operations of types A, B, C and D 09:29
colomon 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.
moritz_: that doesn't work, because of the FatRat thing
moritz_ 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?
colomon because, $a / $b is always either Rat or Num
you have to explicitly create a FatRat. 09:31
moritz_ only if $a and $b are Ints
there's no rules that says BigInt / BigInt needs to be Rat or Num
colomon In p6, Int *is* BigInt
and BigInt / BigInt does have to be Rat or Num. 09:32
*therefore
moritz_ or another (Big)Int
colomon no
moritz_ rakudo: say (10/5).What
p6eval rakudo 2666b6: OUTPUT«Method 'What' not found for invocant of class 'Rat'␤ in main program body at line 22:/tmp/63_LygbAwq␤»
moritz_ rakudo: say (10/5).WHAT
p6eval rakudo 2666b6: OUTPUT«Rat()␤»
colomon interesting way to get your answer even with an error. :) 09:33
rakduo: say (10/5).dghsjkghsdjghsd
rakudo: say (10/5).dghsjkghsdjghsd
p6eval rakudo 2666b6: OUTPUT«Method 'dghsjkghsdjghsd' not found for invocant of class 'Rat'␤ in main program body at line 22:/tmp/fqmJrce2PW␤»
jnthn Perl 6. So awesome even the errors contain the answer you wanted. :P
colomon "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
moritz_ colomon: you're right. Actually you need div for dividing by the gcd
colomon though actually, that should say "Rat or perhaps Num" or something like that. 09:35
moritz_: yup
moritz_ so the internal Rational code doesn't need to use infix:</>, unless in the case of overflow
colomon yeah, that's where it gets tricky
moritz_ what we need is code like if $a * $b ~~ none($a.WHAT, $b.WHAT) { # degrade to Num } 09:36
colomon 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:39
09:40 dakkar joined
colomon 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...
moritz_ that's more like it
there should be a create-rat-if-possible($numerator, $denominator, $storage-size) or so 09:41
colomon 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.
needs storage size for numerator and denominator, but the basic notion is dead on. 09:43
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
masak greetings, zebras. 10:01
moritz_ \o masak
colomon afk # back to bed 10:03
10:04 daxim joined
masak diakopter: fwiw, the technical term is "Apparating" :P 10:04
by the way, I think minmax is useless/evil and shoould be destroyed while we have the chance. 10:05
moritz_ why is it evil? 10:06
masak 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.
and serving up the *promise* of extending but failing to deliver is evil.
moritz_ if [minmax] returned a range from the minimum to maximum value of a list, would you find that better? 10:08
masak what I'm after is a kind of consistency that makes minmax useful even in its meta forms. 10:09
there might be one, but neither the current semantics nor the former quite fits the bill. 10:10
moritz_ agreed 10:11
masak 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:12
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:13
moritz_ speaking of backlog... 10:17
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
tadzik o/ 10:21
moritz_ \o tadzik, how are the exams going?
masak tadzik! \o/ 10:22
tadzik 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
moritz_: the worst part now is, sorry, but Physics :)
moritz_ tadzik: believe me, I know how bad physics can be :-) 10:23
tadzik moritz_: I'm totally dumb from all this, I just can't get my head around stuff
masak guesses that has to do with the elasticity of the head :) 10:24
tadzik OTOH, they even changed the rules of passing after they saw how many people passed the exercises
moritz_ tadzik: that's a common reaction to having to learn too much at a time
tadzik 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:25
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:27
moritz_ 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:28
tadzik 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:29
moritz_ tadzik: then you're heading in the right direction :-) 10:30
tadzik yeah, I hope so :) 10:31
10:37 cafesofie left
tadzik moritz_: how is Ronja? 10:41
moritz_ tadzik: fine, thanks. She's still not heavy enough, but gathers weight faster than expected 10:43
10:57 shortcircuit left 11:07 IllvilJa joined, am0c left 11:27 coldhead left 11:29 kensanata joined 11:42 skangas joined 11:45 satyavvd left, VXZ left
masak 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:54
11:55 REPLeffect joined, ruoso joined
masak 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:55
flussence before I continue this .indent thing, I think I'll go get Text-Tabs-Wrap itself working. In particular the test files seem broken :( 11:58
(also "prove -e perl6" is fast becoming my favourite command line) 12:00
masak :)
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
flussence
.oO( the one advantage of having to use CGI.pm is that I get a lot of code golf practice )
12:07
masak 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".
flussence they both make the code shorter :)
masak can't argue with that :) 12:13
12:13 mtk joined
tadzik I don't quite get dynamic variables: nopaste.snit.ch/30466 why is the last one 'undef'? 12:27
...and what is undef doing in Perl 6? :) 12:28
moritz_ rakudo: say Failure.new.perl
p6eval rakudo 2666b6: OUTPUT«too few positional arguments: 1 passed, 2 (or more) expected␤ in main program body at line 1␤»
moritz_ rakudo: say Failure.new(1).perl 12:29
p6eval rakudo 2666b6: OUTPUT«1␤»
flussence "undef" is just a stringification
moritz_ rakudo: say Failure.new(1)
p6eval rakudo 2666b6: ( no output )
moritz_ hm, I recall that it's something to do with failures
flussence rakudo: say ~(...) 12:30
p6eval rakudo 2666b6: ( no output )
flussence hm
oh
masak 'undef' is leaking through from Parrot.
flussence rakudo: say (...).perl
p6eval rakudo 2666b6: ( no output )
flussence pretty sure I saw it from a dotdotdot
masak is sad that &say isn't reliable
moritz_ 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
masak: and it's not about say(), its about a fail() during a stringification
masak oh, ok. 12:32
flussence rakudo: sub a { ... }; a().perl.say
p6eval rakudo 2666b6: OUTPUT«undef␤»
masak I don't think any .perl method in Rakudo should return 'undef'.
moritz_ one could argue about whether say() should be specially fail()-prove
flussence if anything, that should probably return "..." 12:33
moritz_ masak: yep, that's a bug (and a long standing bug)
flussence it's in src/builtins/Exception.pir:93 btw 12:34
moritz_ 13:31 < moritz_> masak: not leaking through, src/builtins/Exception.pir line 93
flussence I'm not paying attention today :)
anyway the best thing I can think of is stringifying it as "fail('self.exception' 12:39
er
"fail('{self.exception'
without the typing fail().
you get the idea :)
masak 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.
moritz_ doesn't that apply to all things that represent Perl 6 level objects? 12:40
masak perhaps. but it's especially noticeable with blocks, since they nest in FUTURE but not in SIC. 12:47
jnthn masak: Unnested tends to be needed.
*unnesting
masak: PAST2DNST implements it. PAST -> POST also.
masak I will probably spend the day thinking about unnesting. 12:48
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
12:49 bluescreen joined
moritz_ still waits for p4 review 12:49
masak I haven't forgot about it :) 12:50
(and I'm eager to write it, too)
arnsholt Excellent! =)
masak 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
jnthn 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, Vlavv` left, Intensity joined
jnthn masak: It's with a contextual array and pushing onto it, iirc. 12:57
masak hm, that way of doing things has croseed my mind. 13:00
takadonet mornign all 13:03
masak takadonet: \o 13:04
takadonet flussence: ping 13:05
moritz_ has now rejected ownership of his RT tickets, and insteaded added the tag 'testneeded' to them 13:06
13:07 plobsing_ left
masak moritz_++ 13:07
the days of moritz_ as a human 'testsneeded' tag are over ;)
moritz_ an era ends. A new one begins.
13:08 Vlavv` joined
flussence takadonet: pong! 13:12
takadonet flussence: I saw in the backlog that you wanted to get Text::Wrap-Tabs working?
13:13 masonkramer left
flussence yeah, seems like a good place to start in figuring out the last bit of .indent 13:13
takadonet 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
I just added you as a collaborator to the project 13:17
flussence cool, thanks :)
I noticed the t/* files looked a bit perl5ish, maybe that's why they didn't work...
13:24 MayDaniel joined
szabgab /wg 17 13:27
masak hugme should hug irssi users, too :)
moritz_ masak: patches welcome :-)
masak good to know :) 13:28
colomon rakduo: say ([minmax] 2, 5, 3, 6, 13, -4, 231, 544, 2, 4, 5).perl
szbalint szabgab: in Brussels yet? :) 13:29
colomon rakudo: say ([minmax] 2, 5, 3, 6, 13, -4, 231, 544, 2, 4, 5).perl
p6eval rakudo 2666b6: OUTPUT«-4..544␤»
szabgab szbalint: yes I am here already
oh now I see why /wg 17 did not work earlier :) 13:30
colomon rakudo: say ([max] 2, 5, 3, 6, 13, -4, 231, 544, 2, 4, 5).perl
p6eval rakudo 2666b6: OUTPUT«544␤»
colomon rakudo: say ([min] 2, 5, 3, 6, 13, -4, 231, 544, 2, 4, 5).perl
p6eval rakudo 2666b6: OUTPUT«-4␤»
szabgab szbalint: are you also coming? 13:31
szbalint I'm here already :)
szabgab oh nice
moritz_ sounds like an sz.* meeting :-)
13:32 plainhao joined
szabgab moritz_: will you come to LinuxTag and give a Perl 6 talk? 13:32
moritz_ szabgab: no. I've abandoned all travel plans for this year 13:33
family first
13:33 stifynsemons joined
moritz_ ... unless I can't stand it anymore at home, and need to get out :-) 13:34
masak szabgab: when's LinuxTag?
moritz_ Chemnitz, I think
szabgab May
13:34 bluescreen left
moritz_ oh 13:34
moritz_ can't read
tadzik Chemnitz, almost like Chełm :)
masak unless it clashes with YAPC::Russia, I could go. sounds like fun. 13:35
szbalint moritz_: oh, did your fork() materialize already? :)
szabgab wasn't that you discussed on the perlde channel?
moritz_ szbalint: yes
szabgab last year I gave an ad-hoc Perl 6 talk
it would be nice to have one now planned a nd scheduled up-front
szbalint d'oh, I missed the event. Congrats belatedly :) 13:36
szabgab so more people know about it
moritz_ szbalint: thank you
takadonet flussence: do a pull on the master branch and it should compile and run the test under the newest rakudo verison
please note some will still fail
szabgab 11-14 May
moritz_: www.linuxtag.org/2011/
moritz_ szbalint: I'm confused. There's linuxtag in Berlin, and Linux-Tage in Chemnitz 13:37
sorry, meant szabgab
the Berlin one is in May
szabgab and linux tages all over Austria :)
or sg similar
linux wochen
close :) 13:38
moritz_ well, just a factor of 7 :-)
13:38 MayDaniel left
masak szabgab: I'll get back to you on availability, but it sounds like a definite possibility. 13:38
szabgab the talk dead-line is in a few days
I forgotten to announce it in time 13:39
13:39 bluescreen joined
szabgab masak: moritz_ dead-line is 8 Feb 13:40
wiki.linuxtag.org/w/vp:Main_Page
masak ok, I'll check availability now.
13:41 bluescreen left 13:42 bluescreen joined 13:47 bluescreen left 13:48 bluescreen joined, stifynsemons left 13:50 bluescreen left, bluescreen joined, shortcircuit joined
[Coke] rant: google should not be hitting the "today" link when going through the irc logs. 13:52
flussence why not?
[Coke] could we add that to the robots.txt ? (force it to index content based on a url with the date in it?)
flussence oh
[Coke] flussence: because tomorrow, the data it's searched is wrong.
moritz_ [Coke]: I'd hate to forbid indexing /today because that's an often used link 13:53
flussence I guess you could have it set an Expires header for midnight...
13:53 cognominal joined
moritz_ [Coke]: maybe have 'today' doing a (temporary) redirect to today's date? 13:53
[Coke] moritz_: often used, but should it be indexed??
moritz_ [Coke]: there's no reason to not index it, just not under that URL 13:54
[Coke] <shrug> as long as I don't have to manually fixup google's search, IDC.
13:54 fhelmberger joined
[Coke] moritz_: that is what I'm saying. don't index THAT URL. 13:54
13:54 fhelmberger left
[Coke] I obviously still want to find that page worth of data, but only if it's using a unique url. 13:54
13:54 fhelmberger joined
moritz_ 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
[Coke] which is why I sugested an easy solution. :)
13:55 tzhs joined
moritz_ ... which I don't like at all 13:55
[Coke] it'll still find the unique URL by date, (or we can update the nagivation to make it so.) 13:56
moritz_: why don't you like it?
aloha, aloha?
phenny, aloha? 13:57
ETOOMANYBOTS.
is there an infobot in here?
masak 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.
moritz_ [Coke]: because forbidding the URL that is most often used as a link target goes against all SEO principles
13:57 drbean left
[Coke] Who is most often linking to today? 13:58
google? because that's the WRONG LINK. ;)
moritz_ no, other websites
[Coke] I know if I'm sending someone to the archives, it's because I want them to find something specific.
moritz_ like perl6.org/community/
and if you want to link to the logs in general, the "today" page is usually the best
[Coke] Ok. 13:59
flussence if it's only google you're worried about, putting a <link rel=canonical> in there should be enough. 14:00
moritz_ flussence: that sounds like a great idea 14:01
moritz_ didn't know about that one
szbalint moritz_: how about canonical naming today to the $current_date?
14:01 pmurias joined
flussence it's relatively new, they made it up for this exact reason :) 14:01
moritz_ szbalint: how?
szbalint doh. slow wifi.
moritz_ ah 14:02
szabgab masak: www.socialtext.net/perl5/index.cgi?events
for all the event I know about :) 14:03
szbalint I was first! :D
szabgab masak: so YAPC::Russia overlaps with LinuxTag in Berlin :( 14:05
szbalint anyway moritz_: <link rel="canonical" href="irclog.perlgeek.de/perl6/2011-02-04" />
easy pease 14:06
*y
moritz_ this is one of those changes where the commit message is about 4x longer than the actual patch :-)
github.com/moritz/ilbot/commit/40e...f9f414a068 14:07
[Coke]++ flussence++ szbalint++ 14:08
14:11 abraxxa left 14:15 Trashlord joined
shortcircuit 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
moritz_ shortcircuit: 301 is "permanent", and the link for "today" changes every 24h - not very permanent
anyway, looking at the referrers I don't get any search engine traffic besides google 14:23
Eevee hey, cool, didn't know about rel="canonical" 14:24
Juerd That's only for ubuntu links :)
moritz_ Eevee: neither did I. #perl6 is a constant source of new knowledge and quotes :-) 14:25
14:25 wamba joined
Juerd Perl domains are slow at getting ipv6 :( 14:25
ip6.nl/tester.plp
moritz_ Juerd++ 14:26
my site works, but the NS doen't have v6 addresses 14:27
szbalint I added ipv6 to my personal domain this week.
bytemark++
Juerd szbalint: What domain? 14:29
moritz_: Same question :)
moritz_ Juerd: perlgeek.de
Juerd Nice name :)
szbalint x0r.be 14:30
moritz_ well, I don't have any control of the perl6.org domain 14:31
so not much I can do on that front
Juerd Who does? 14:32
'cause feather2 is 2a02:2308:10::f:2
flussence takadonet: pushed fixes for those broken tests. If I get time later today I might look into making them use Test.pm
moritz_ Juerd: Daniel Wright 14:33
takadonet flussence: I could do that as well . depend on time at work
moritz_ Juerd: but if we'd start with IPv6, we should have a v6 address per subdomain
Juerd Why?
There's really no reason for that, except https. 14:34
moritz_ name based virtual hosts suck for secu... exactly
Juerd And if anyone wants to host ssl sites on feather, that's great.
tadzik github.com/tadzik/neutro/issues#issue/3 -- hrm. Isn't that a Parrot issue?
Juerd Find someone to pay for the certificate and ask me for extra IP addresses, 4 and 6 14:35
flussence huh, doesn't SSLv3 allow for name-based hosts?
I thought they fixed that.
szbalint yeah, well I wouldn't mind pushing for an effort where http means https is also available when using IPv6
with self-signed certs 14:36
Juerd szbalint: Sounds insane. Why?
szbalint 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
14:37 stifynsemons joined
Juerd You'd still have that with the self signed certs. 14:37
14:37 hirschnase left
szbalint https is underutilized :S 14:37
Juerd No protection against MITM unless you verify the fingerprints.
szbalint Juerd: not really. If it's a site that I visited before 14:38
14:38 cjk101010 left
moritz_ Juerd: yes, but protection against ordinary evesdropping 14:38
and little protection > no protection
Juerd I have a better idea. Make https the default when http:// is left out.
Unless it's not available, then fall back to http
Even better: add TLS negotiation to HTTP itself, on port 80
szbalint 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, xinming_ joined
moritz_ has some trouble with TLS 14:41
one of my mail provides overs IMAP over TLS
and some stupid network providers don't let me use it, because they think it's insecure... they just block the port
no wait, smtp over tls, not imap
Juerd You can do STARTTLS negotiation over the normal ports 14:42
14:42 stifynsemons left
moritz_ unless the stupid network provider blocks the port. 14:42
szbalint they're not going to block port 80. 14:43
Juerd That's why we have 587
And it's not TLS's or SSL's fault, or even SMTP's fault, that your ISP sucks and blocked the port... :)
moritz_ Juerd: I know
Juerd 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 ip6.nl/tester.plp
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.
moritz_ Juerd: could you please check if embedded images work on sudokugarden.de?
Juerd What's an "embedded" image? 14:46
moritz_ Juerd: last time I tried it via IPv6 the images didn't show up, but I couldn't find a reason for that
Juerd: those via <img> tags
Juerd juerd.nl/i/c166c67f48d507fd260563d42dcdeff2.jpg
moritz_ Juerd: thanks, looks fine
must have been a client side fuckup
Juerd 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.
moritz_ I know... same DNS as perlgeek.de
Juerd This is not a problem, for at least another decade, I guess
moritz_ but the one who hosts the DNS is also a geek. He'll want to know :-) 14:48
szbalint yeah, everyone's dual stacking, except the next gen mobile guys
Juerd Send 'em the link to ip6.nl/tester.plp and complain that you want green instead of red, for your domains.
moritz_ szbalint: well, I guess the mobile ISPs will do the recursive DNS lookups for the mobile devices 14:49
szbalint and then they're running a dual-stacked dns resolver
Juerd Say something about that it makes you feel inadequately geeky to see those red boxes :P
They'll understand and add ipv6 support within a few hours! 14:50
moritz_ or I'll promise him a nice, self-made lasagne :-)
Juerd Do both1 14:51
s/1/!/
moritz_ (which I'd do anyway sooner or later)
Juerd Pointing a gun would probably work too
But don't do that
moritz_ wouldn't do that to his best man :-) 14:52
14:53 dual joined
szbalint 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:53
(paraphrased a bit) 14:54
14:54 kaydsoft left
moritz_ how would verizone add AAAA records to .de domains? 14:56
szbalint they control the resolving dns server 14:57
for their mobile users.
moritz_ 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
szbalint v4 content gets the proxy treatment 15:00
pmurias tell sorear does niecza support lexical classes? why do they appear in the stash? 15:04
moritz_ pmurias: talk to phenny :-) 15:06
15:06 bluescreen left 15:10 cafesofie joined, colomon left 15:22 kaydsoft joined, bluescreen joined 15:23 cafesofie left
pmurias phenny: tell sorear does niecza support lexical classes? if so why do they appear in the stash? 15:24
phenny pmurias: I'll pass that on when sorear is around.
masak (rel="canonical")++
pmurias ?
pmurias googled it 15:25
moritz_ pmurias: see backlog... we hope it fixes an indexing problem with the IRC logs
15:28 am0c joined
sorear good * #perl6 15:30
phenny sorear: 07:41Z <TimToady> tell sorear a couple days ago I noticed a !%foo{$x}:exists or some such, which is a precedence thinko
sorear: 15:24Z <pmurias> tell sorear does niecza support lexical classes? if so why do they appear in the stash?
15:30 c1sung joined
sorear pmurias: yes; simplicity 15:30
15:35 benabik_sleep is now known as benabik 15:37 wtw left 15:38 fhelmberger left 15:39 kaare_ joined
masak o/, sorear 15:41
sorear Juerd: you think you have it bad? my ISP won't route outgoing IPv6 packets 15:43
Juerd My ISP doesn't do IPv6 at all
But I'm using a tunnel (sixxs)
pmurias sorear: simplicity? 15:52
szbalint my isp is doing a trial IPv6 run atm 15:53
I wish they'd deploy fully.
15:53 colomon joined
gfldex they will 15:53
szbalint eventually. 15:55
pmurias sorear: it's in a package with a generate name right?
sorear: how am i supposed to distinguished what is a global and what was just put there for simplicity of implementation? 15:57
15:58 colomon left, wamba left
pmurias sorear: did the debugging name put into nam actually help with debugging? 15:58
* names 15:59
16:01 colomon joined
colomon stupid library basement internet. 16:01
16:07 colomon left 16:09 kaydsoft left, colomon joined 16:10 plobsing joined
colomon is having a crisis of confidence about the denominators of Rats in p6. 16:13
16:13 kaydsoft joined
masak confidence? denominators? 16:14
16:14 allbery_b joined, Patterner left 16:16 Psyche^ joined, Psyche^ is now known as Patterner
colomon 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.
rakudo: say (1/100 + 9/100).perl 16:18
p6eval rakudo 2666b6: OUTPUT«1/10␤»
colomon the spec sort of implies that should be 10/100 16:19
rakudo: say (1/3 + 1/6).perl
p6eval rakudo 2666b6: OUTPUT«1/2␤»
colomon and it's very explicit that that should be 3/6
but what about 16:20
rakudo: say (3/6).perl
p6eval rakudo 2666b6: OUTPUT«1/2␤»
colomon should that be 1/2 or 3/6?
16:20 Mowah left
[Coke] I would imagine that if 1/3+1/6 = 3/6, then 3/6.perl == 3/6 16:21
colomon not simplifying feels very wrong to me.
[Coke] perhaps add an explicit .simplify() for rats.
or, change the spec to always simplify, sure. ;)
colomon 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.
pmurias sorear: i could seperate anonymous entries with a regex but that's not very elegant
benabik colomon: Trying to keep it from simplifying repeatedly on [+] @list-of-rats ? 16:23
16:23 justatheory joined
[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
colomon benabik: it only prevents it in certain cases.
*rationale, I hope. ;)
[Coke] FWIW, I wouldn't expect perl to keep track of the GCD on that for me 16:26
colomon I should add, it does simplify in many cases. It only doesn't simplify (in addition) if one denominator is divisible by the other.
[Coke] (I'd not care if it did; I'd leave it up to the implementations)
moritz_ colomon: where does the spec says it needs to preserve the denominator?
colomon S02. 16:27
I can't be more specific, my internet is pretty hosed here.
so for instance, if you add 1/15 + 1/20, it will simplify as much as it can.
rakudo: say (1/15 + 1/20).perl 16:28
p6eval rakudo 2666b6: OUTPUT«7/60␤»
colomon not a great example there. :)
slavik1 rakudo: say 2**64
p6eval rakudo 2666b6: OUTPUT«1.84467440737096e+19␤»
slavik1 D:
no bignum?
colomon rakudo: say (1/15 + 3/20).perl
p6eval rakudo 2666b6: OUTPUT«13/60␤»
masak slavik1: no, not yet. 16:29
slavik1 rakudo: say (2**64).WHAT
p6eval rakudo 2666b6: OUTPUT«Num()␤»
slavik1 rakudo: say (2**64).perl
p6eval rakudo 2666b6: OUTPUT«1.84467440737096e+19␤»
slavik1 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
moritz_ slavik1: do you need more than 1e308? 16:33
16:35 colomon joined
colomon how much of what I last said got lost there? 16:35
16:37 risou joined
benabik 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
colomon benabik++
colomon: slavik1: nope. but I've created Math::BigInt for the time being
[11:29am] colomon: slavik1: it's a bit of a pain to install, alas.
[11:29am] colomon: slavik1: and I don't know if it works on Windows at all.
[11:30am] colomon: rakudo: say (3/15 + 3/20).perl
rakudo: say (3/15 + 3/20).perl 16:38
p6eval rakudo 2666b6: OUTPUT«7/20␤»
colomon rakudo: say (3/15 + 4/20).perl 16:39
p6eval rakudo 2666b6: OUTPUT«2/5␤»
16:39 felliott joined
colomon okay, I think here's where it gets weird: 16:40
rakudo: say (3/15 + 1/20 + 3/20).perl
p6eval rakudo 2666b6: OUTPUT«2/5␤»
colomon by the spec, I think the denominator there depends on the order of the additions. 16:41
16:44 felliott left, risou_ joined
colomon here we go, an even better example 16:45
rakudo: say (1/15 + 2/15 + 1/20 + 3/20).perl
p6eval rakudo 2666b6: OUTPUT«2/5␤»
16:45 risou left
colomon if you add 1/15 + 1/20 before adding the others, the answer should be 24/60 16:46
benabik colomon:
colomon if you add 1/15 + 2/15 and 1/20 + 3/20 first, the answer can be 2/5
benabik is still not used to the IRC client.
colomon: It seems like simplifying sometimes is far stranger than the options of never and always. 16:47
colomon yes
I think I need to do a blog post on this. :)
(And I'm not going to try that until I'm on a stable Internet connection.) 16:48
benabik Titled "Why do we do this, it's too crazy"?
moritz_ now reads S02 to verify or falsify colomon's claim
colomon moritz_: I'd love to hear I'm wrong about this. :)
16:48 pmurias left 16:49 kensanata left
moritz_ C<Rat> addition and subtraction should attempt to preserve the 16:50
denominator of the more precise argument if that denominator is
an integral multiple of the less precise denominator.
16:51 pecastro joined
moritz_ Hence, if you are adding a bunch of C<Rat>s that 16:52
represent, say, dollars and cents, the denominator may stay 100 the
entire way through.
16:52 IllvilJa left
moritz_ "may" vs. "should" 16:52
16:53 envi left
moritz_ I think this is insane, because the example of dollars and cents are already covered by stringification rules of Rats 16:54
masak how so?
16:55 colomon left 16:58 colomon joined
moritz_ 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
colomon sorry, moritz_ I lost the lead up to that?
2, 5, exact string, yes. 17:00
moritz_ so I argue that there's no need to preserve the denominator
colomon will hopefully be able to go home in a few minutes, to a blessedly stable internet connection.
ah!
simplify! ;)
moritz_ 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
moritz_ the question is whether 1.07 + 2.03 stringifies to 3.1 or 3.10 17:02
colomon yes
masak nod
colomon but as far as I know, it's 3.1 by spec
even though it's 310 / 100 by spec 17:03
moritz_ I thought it's 3.10, becaue the denom is 100?
masak if I cared about the stringification, I'd use a formatting routine anyway.
colomon masak: +1
masak but I guess that's not very relevant to this discussion... :P
colomon moritz_: can you find language to that effect? I've never looked for it, I admit.
moritz_ colomon: I quoted two parts of the spec in the backlog 17:04
colomon moritz_: sorry, that must have been a bit I missed. and I think going for the log will kill my internet connection.
I'll take your word for it. 17:05
masak colomon: I don't think we're in a rush; we can wait until you get home.
moritz_ aye 17:06
colomon It's always good to have your arguments in order before TimToady shows up. :) 17:13
anyway, we're packing up here 17:14
masak .oO( ...because TimToady plays bowling with one's arguments? ) :P
colomon "smashing" is the metaphor I would use. :p 17:16
masak "strike!"
[Coke] (*#&@$ turkey. 17:18
17:20 colomon left 17:22 colomon joined 17:27 dukeleto left, colomon left, dukeleto joined, MayDaniel joined 17:33 daxim left
takadonet flussence: ping 17:34
flussence pong!
17:35 alester joined, cdarroch joined, cdarroch left, cdarroch joined
takadonet flussence: 17:36
flussence: almost done converting all tests to use Test.pm
flussence ah, ok :)
17:36 guidj0s joined 17:37 V15170R joined
takadonet flussence: changes pushed 17:38
17:40 colomon joined
flussence ok, now to see what can be done about those 4 failures :) 17:41
takadonet I thought that project was dead so thanks for showing interest in finishing it 17:44
flussence no prob, it'll keep me busy by the looks of things 17:45
takadonet 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, MayDaniel left
takadonet ali.as/top100/ 17:46
under Volatile 100 17:47
flussence wow, that's a lot
17:48 risou joined
takadonet surprisingly we have a huge chuck of those modules builtin perl6 already 17:48
17:48 sftp left, dakkar left, risou left 17:51 sftp joined, Guest84197 left
Util 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" }
p6eval rakudo 2666b6: OUTPUT«3/5␤7/9␤»
Util To do the same kind of binding to particular keys of inner hashes, this works:
rakudo: my @AoH = { X => 3, Y => 5 }, { X => 7, Y => 9 }; for @AoH -> ( :X($x), :Y($y) ) { say "$x/$y" }
p6eval rakudo 2666b6: OUTPUT«3/5␤7/9␤»
Util To do the same kind of binding to the key and value of inner Pairs, none of this works:
rakudo: my @AoP = X => 3, Y => 5 , M => 7, N => 9; for @AoP -> ( :key($k), :value($v) ) { say "$k/$v" }
p6eval rakudo 2666b6: OUTPUT«Mu()/Mu()␤Mu()/Mu()␤Mu()/Mu()␤Mu()/Mu()␤»
Util rakudo: my @AoP = X => 3, Y => 5 , M => 7, N => 9; for @AoP -> ( $key, $value ) { say "$key/$value" }
p6eval rakudo 2666b6: OUTPUT«Not enough positional parameters passed; got 0 but expected 2 in sub-signature␤ in <anon> at line 2:/tmp/pKAZLJnsz2␤ in main program body at line 1␤»
Util rakudo: my @AoP = X => 3, Y => 5 , M => 7, N => 9; for @AoP -> :( $key, $value ) { say "$key/$value" }
p6eval rakudo 2666b6: OUTPUT«Not enough positional parameters passed; got 0 but expected 2 in sub-signature␤ in <anon> at line 2:/tmp/hjmVnhGQx6␤ in main program body at line 1␤»
Util rakudo: my @AoP = X => 3, Y => 5 , M => 7, N => 9; for @AoP -> [ $key, $value ] { say "$key/$value" }
p6eval rakudo 2666b6: OUTPUT«Nominal type check failed for parameter ''; expected Positional but got Pair instead␤ in <anon> at line 22:/tmp/6mnystwRWq␤ in main program body at line 1␤»
Util Is there a syntax I am missing, or is binding-to-Pair just NotYetImplimented in Rakudo?
takadonet looks at masak 17:53
Util 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. 17:57
moritz_ Util: [ ] unpacking only works for arrays, iirc 18:02
Util: it's () for objects in general
18:04 rgrau joined 18:06 _jaldhar left
Util 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:06
Since a Pair is an object, ($key,$value) should call the .key and .value methods on the Pair. 18:07
benabik Util: Shouldn't ($:key, $:value) work? 18:12
Util benabik: did you mean (:$key, :$value) ? 18:13
sorear benabik: when you set the topic yesterday, the first three characters got garbled, just so you know.
benabik Util: Probably.
sorear: Apologies. They looked fine to me, but the encoding probably got changed somewhere.
Util rakudo: my @AoP = X => 3, Y => 5 , M => 7, N => 9; for @AoP -> ( :$key, :$value ) { say "$key/$value" } 18:14
p6eval rakudo 2666b6: OUTPUT«Mu()/Mu()␤Mu()/Mu()␤Mu()/Mu()␤Mu()/Mu()␤»
18:15 jaldhar joined
Util benabik: yes, it should also work; S06 just gives the even shorter version in its binding examples. 18:15
18:16 sftp left, sftp joined
sorear jnthn: ping 18:17
benabik 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
sorear yeah. irssi has a similar flaw... 18:18
benabik Somewhere between copying from the online log and Conversation, it probably ended up being in some wrong encoding.
sorear actually... 18:19
nobody has needed to change the topic for a while
18:19 ChanServ sets mode: +o sorear, sorear sets mode: +t , ChanServ sets mode: -t , sorear sets mode: -o sorear, kjeldahl joined
benabik I first removed that button and then switched clients entirely. :-D 18:19
ChanServ didn't like that idea, apparently. 18:20
18:20 ChanServ sets mode: +o sorear, sorear sets mode: +t-o sorear
benabik sorear++ for protecting everyone from my tendency to press random buttons. :-D 18:21
18:22 bpa joined, bluescreen left, vmspb joined 18:25 bluescreen joined 18:30 guidj0s left
moritz_ rakudo: my @AoP = X => 3, Y => 5 , M => 7, N => 9; for @AoP -> (:$key, :$value) { say "$key/$value" } 18:41
p6eval rakudo 2666b6: OUTPUT«Mu()/Mu()␤Mu()/Mu()␤Mu()/Mu()␤Mu()/Mu()␤»
moritz_ 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:42
Util moritz_: So the syntax you just used will work correctly someday, after introspection learns about the accessors? 18:44
colomon 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
Util thanks, everyone!
18:47 markmont joined
colomon moritz_: but I did backlog, anyway. :) 18:48
tadzik ~~
pmichaud good morning, everyone, from the great frozen home of Super Bowl XLV 18:52
er, good afternoon, I guess
colomon \o
pmichaud We're now on snow day #4 for this week, with a fresh coating of snow :-) picasaweb.google.com/patrick.michaud/20110204 18:53
colomon how many inches? 18:54
pmichaud 6 inches overnight. we were forecast for 1-3 inches
(and it's still snowing lightly here)
colomon nice
we got 8 or 9 earlier this week.
pmichaud can't even see the steps from our front door down to the street
like, it's one smooth surface down to the street -- no "bumps" where the edges of the steps would be 18:55
18:55 bluescreen left 18:56 snearch joined
moritz_ \o pmichaud 18:58
18:58 bluescreen joined
moritz_ colomon: you're right, it doesn't explicitly follow 18:58
18:58 vmspb left
moritz_ but if not, I see even less point in preserving the denominator 18:59
colomon moritz_: on the whole, it strikes me as a very wrong-headed attempt to make dollars and cents "easy".
pmichaud afk, lunch
dalek kudo: 953b982 | felliott++ | src/ (3 files):
implement infix:<orelse> based off Kodi++'s xor work

Signed-off-by: Moritz Lenz [email@hidden.address]
19:12
Tene pmichaud: I thought you were in Texas? 19:17
19:18 kaare_ left
pmichaud Tene: Yes, Texas. 19:18
Tene Huh. I'm surprised that you get snow there.
pmichaud 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
(if ever)
maps.google.com/maps?q=33.087892,-9...82&z=5 # my location 19:20
arnsholt Apparently the university in Austin is closed. Just because there's snow =) 19:21
19:22 jaldhar left
pmichaud 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
arnsholt That's a very good point. Still a bit weird for a Norwegian, TBH 19:39
19:52 mtk left
benabik masak: BTW, I blame you, Less Wrong and MoR for any mistakes I just made in my homework due to lack of sleep. 19:56
19:57 coldhead joined 19:58 mtk joined
moritz_ blaming is easy :-) 19:59
sbp I blame masak for being easily blameable 20:01
masak yeah, sorry about that. 20:02
bpa perl6: sub infix:<zero> ($a, $b) { return 0; } say(1 zero 3);
p6eval rakudo 2666b6: OUTPUT«===SORRY!===␤Confused at line 22, near "sub infix:"␤»
..niecza v2-4-gf3cce73: OUTPUT«===SORRY!===␤␤Strange text after block (missing comma, semicolon, comment marker?) at /tmp/ahdHS8WkLl line 1:␤------> sub infix:<zero> ($a, $b) { return 0; }⏏ say(1 zero 3);␤Other potential difficulties:␤ $b is declared but not
..used at /tmp/ahd…
..pugs: OUTPUT«0␤»
bpa perl6: sub infix:<zero> ($a, $b) { return 0; } say(1 Xzero 3); 20:03
p6eval niecza v2-4-gf3cce73: OUTPUT«===SORRY!===␤␤Strange text after block (missing comma, semicolon, comment marker?) at /tmp/tEGYFdYqCm line 1:␤------> sub infix:<zero> ($a, $b) { return 0; }⏏ say(1 Xzero 3);␤Other potential difficulties:␤ $b is declared but not
..used at /tmp/tE…
..rakudo 2666b6: OUTPUT«===SORRY!===␤Confused at line 22, near "sub infix:"␤»
..pugs: OUTPUT«*** ␤ Unexpected "Xzero"␤ expecting operator, ":" or ")"␤ at /tmp/c_YmP3CS3f line 1, column 47␤»
bpa Is this a scope issue? or I just misunderstanding the X operator?
moritz_ 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
p6eval rakudo 2666b6: OUTPUT«===SORRY!===␤Unable to parse declarator, couldn't find final ')' at line 22␤»
moritz_ bpa: read the eorror mesasge
pmichaud bpa: need a semicolon after the closing brace
closing brace ends a statement only if it's the last thing on the line
moritz_ std: class MyPair { has ($.key, $.value }; for MyPair.new(key => 1, value => 2), MyPair.new(key => 1, value => 10) -> (:$key, :$value) { say "$key/$value" }
benabik masak: I think the piles of laughter my wife and I got are worth being a little tired. :-D
p6eval 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,
..$.value …
bpa perl6: sub infix:<zero> ($a, $b) { return 0; }; say(1 Xzero 3); 20:05
p6eval pugs: OUTPUT«*** ␤ Unexpected "Xzero"␤ expecting operator, ":" or ")"␤ at /tmp/0LiapCcPdo line 1, column 48␤»
..niecza v2-4-gf3cce73: OUTPUT«Potential difficulties:␤ $b is declared but not used at /tmp/vP0P2eLAJr line 1:␤------> sub infix:<zero> ($a, ⏏$b) { return 0; }; say(1 Xzero 3);␤ $a is declared but not used at /tmp/vP0P2eLAJr line 1:␤------> sub infix:<zero> (⏏$a,
..$b) { return …
..rakudo 2666b6: OUTPUT«===SORRY!===␤Could not find sub &infix:<zero>␤»
bpa there, the rakudo error I was looking for... sub not found
moritz_ 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" }
p6eval std 625303c: OUTPUT«ok 00:01 125m␤»
moritz_ bpa: that's a problem with rakudo not doing lexical lookups in the X meta operator 20:06
bpa: 'our sub infix:<zero>' would be a workaround
bpa so, known issue then
moritz_ 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" }
p6eval rakudo 2666b6: OUTPUT«1/2␤1/10␤»
moritz_ yes
Util: see above for a working example of unpacking in signature
masak benabik: #perl6: fun times for the whole family. 20:08
flussence 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:09
bpa the our fixes that nicely, thank you for the tip 20:10
moritz_ flussence: if there are good defaults, just use (named) parameters with defaults
takadonet flussence: it's not a good idea but I just wanted to work first then improve it later
change anything that you see fit 20:11
flussence I'm still trying to figure out what most of these 1..3 char variables are for :) 20:12
(first thing I'm going to do is translate them into english) 20:13
20:24 nadim_ left
masak benabik: anyway, I'm glad you seem to like MoR. yet another convert. ;) 20:25
benabik masak: I'm trying to spread it through my little corner of the country/'net. ;) 20:26
masak \o/
20:26 snearch left
masak I've probably told about 20 friends about it by now, with varying degrees of persuasion depending on the friendship. 20:27
moritz_ the better the friendship, the less persuasive? :-)
masak guess again... :P
moritz_ :-)
20:31 kaare_ joined 20:32 nadim_ joined 20:37 plainhao left
colomon 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:37
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.
arnsholt Wouldn't a Rat simplify to 31/10?
colomon arnsholt: that's what we're looking at right now. 20:39
under the current implementation, yes.
(in Rakudo, I mean)
but by spec, there are times when it is not supposed to simplify.
arnsholt If you don't always simplify, comparing Rats would get kinda complicated, at a guess
arnsholt goes to read the spec
colomon s/imply/impart/ back a few lines. 20:40
arnsholt: S02
moritz_: I might be wrong about the .perl being 3.10 thing.
because the .perl function is supposed to normalize the fraction unless it's exactly representable as a decimal number. 20:41
which means if $a is a Rat, $a == $a.perl.eval, but $a.numerator does not have to equal $a.perl.eval.numerator. 20:42
masak that sounds, if not insane, then at least cruel and unusual :) 20:43
flussence I get a feeling I'm porting Perl 4 code to Perl 6... 20:45
colomon 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."
arnsholt 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
colomon arnsholt: right, that's what I said. 20:46
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
20:47 molaf joined
arnsholt Yeah, that sounds like an FAQ item 20:48
colomon 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
moritz_ .perl ends the laziness, no? 20:48
colomon Which seems to imply there are cases where it is more likely (but still not necessary) that the fraction simplifies.
arnsholt Sounds like something that should either be implementation-dependent, or be concretised a bit 20:49
20:50 shortcircuit joined
colomon 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:53
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/
flussence 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:01
moritz_ we'll just leave it as-is in Rakudo until somebody submits a bugreport with a sensible interpretation of the spec :-) 21:02
tadzik /o\
tadzik 's phone just took a bath in yoghurt
moritz_ remove the batterie, and wash it
tadzik It's sad how something so ridicolous can have such a sad effects 21:03
21:03 MayDaniel joined
tadzik moritz_: in water? I tried to remove the yoghurt from everywhere I reached 21:03
masak what kind of yoghurt was it?
tadzik uhm, strawberry. With these...
phenny: "nasiona"?
phenny tadzik: "seeds" (pl to en, translate.google.com)
flussence strawberry and telephone flavour, delicious. 21:04
tadzik yeah, that's it. Although I think they didn't get inside
moritz_ tadzik: yes. But only if you think that the water doesn't go in deeper than the jogurth
tadzik I wouldn't bet on that
moritz_ I've had success with a laptop keyboard + orange juice
tadzik it was working just a moment after I took it out of the pocket, then stopped
moritz_ removed battery, cleaned it with water, dried it
flussence depends how long it was in there. I'd imagine a phone has some moisture resistance for rain and stuff...
masak finds himself writing A::B(...) instead of A::B.new(...) far too often 21:09
colomon masak: same here
probably about every third or fourth time I try to call .new, I'd guess. 21:10
masak yeah, it happens often.
in one of my projects I defined postcircumfix:<( )> to delegate to .new
probably not a good habit, but it felt like it helped. :) 21:11
arnsholt Nice trick =)
Util 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.
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:
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" }
p6eval rakudo 953b98: OUTPUT«1/2␤1/10␤»
Util 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" }
p6eval rakudo 953b98: OUTPUT«1/2␤1/10␤»
tadzik Util: silica gel, yes
flussence rakudo: #= :( 21:14
p6eval rakudo 953b98: OUTPUT«===SORRY!===␤Whitespace character is not allowed as a delimiter at line 22, near " :("␤»
flussence known?
21:14 uvtc joined
tadzik I should have one in a camera bag 21:14
masak flussence: I think so, yes.
uvtc tadzik: Hi. Any tips on that segfault I'm seeing while installing neutro? I filed a report on github. 21:15
21:19 ashleydev left 21:20 ashleydev joined
tadzik uvtc: yeah, saw that. And I'm quite sure this is a Parrot issue. I assume that's reproducible? 21:21
TimToady colomon: I'm fine with any standard math function being in the user's namespace directly 21:22
21:22 kaydsoft left 21:23 kaydsoft joined
moritz_ \o/ 21:23
colomon TimToady: so gcd is okay? \o/
TimToady gcd is fine; we should merely try to avoid polluting the namespace with N slightly incompatible variants of every function like PHP does
uvtc tadzik: on my system, yes. If I run it again, I get
TimToady but the setting is an outer lexical scope so that it can be overridden 21:24
uvtc tadzik: 2 "fatal: ..." about mt and ft already existing,
TimToady so it doesn't matter so much if we prepopulate the namespace with useful stuff
uvtc tadzik: but then get the Segfault again.
TimToady esp if it can be loaded lazily
tadzik uvtc: huh, strange. Do you use some longer-running Perl 6 programs? 21:25
comparable to neutro
uvtc tadzik: no, no Perl 6 programs running at the moment. 21:26
tadzik the segfault is most definitely not my fault, still it's worth investigating, I've had segfaulting Perl 6 some time ago too
uvtc: what if you try to bootstrap neutro piece by piece, so:
PERL6LIB=mt/lib:ft/lib:jt/lib bin/neutro File::Tools
uvtc tadzik: could you please tell me how I'd go about manually installing perl6-File-Tools (the way...
moritz_ uvtc: please try to rm -rf ~/.perl6/lib 21:27
tadzik I mean, perl6-File-Tools, then perl6-Module-Tools, then neutro
maybe it'll run fine in smaller portions
TimToady 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
moritz_ having precompiled but outdated .pir files can lead to weird errors
uvtc tadzik: right. Could you please tell me how to do that?
moritz_: I've got no ~/.perl6 dir. 21:28
tadzik 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
moritz_ uvtc: ok, one possible error source down
colomon 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.
uvtc moritz_: Oh, I guess I'd assumed that neutro would create it if necessary...
TimToady rakudo: say (12, 15, *+* ... 0).Str
uvtc moritz_: will create and try again... 21:29
p6eval rakudo 953b98: OUTPUT«(timeout)»
TimToady whoops
colomon That's part of the reason I wanted a gcd function available, so that the fast magic could happen in just one place.
tadzik moritz_: github.com/tadzik/neutro/issues#issue/3 -- it segfaults after some time
TimToady rakudo: say (12, 15, * % * ... 0).Str
p6eval rakudo 953b98: OUTPUT«12 15 12 3 0␤»
tadzik hmm, or maybe not
uvtc: let me know how is installing everything piece by piece going
uvtc tadzik: after manually creating my own ~/.perl6 dir, and then trying again, it seems to have worked. 21:30
TimToady colomon: nevermind, I see you figgered that out later 21:31
tadzik that's strange as hell
dalek kudo: 9242428 | moritz++ | build/PARROT_REVISION:
bump PARROT_REVISION to get some testing on newer birds
tadzik uvtc: could you try again and confirm that all the problem is caused by a lack of ~/.perl6 directory?
uvtc tadzik: sure, just a sec... (`rm -fr ~/.perl6` and trying again...) 21:32
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...
tadzik 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
uvtc 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, V15170R left
uvtc tadzik: no difference that I can see when running with --v. 21:37
tadzik huh
21:37 vmspb joined
tadzik uvtc: ooc, could you checkout the metainfo branch, and try on that version? 21:37
uvtc tadzik: just a sec. I added my ~/.perl6/bin to my PATH, and tried `neutro perl6-Acme-Meow` and it worked. 21:41
tadzik cool
could you try something with some dependencies, like Math-Model?
uvtc tadzik: where is it finding perl6-File-Tools and perl6-Module-Tools? 21:43
tadzik uvtc: is ~/.perl6/lib, it should
uvtc tadzik: no, the only thing in there is Acme/Meow.* 21:44
tadzik: (and JSON -- that worked too)
tadzik I wonder how did it work
what does echo $PERL6LIB give you?
uvtc 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.
tadzik magic 21:46
uvtc How can I ask perl6 what it's module search path is?
tadzik rakudo: say @*INC.perl 21:47
p6eval rakudo 953b98: OUTPUT«["lib", "/home/p6eval/.perl6/lib", "/home/p6eval//p1/lib/parrot/3.0.0-devel/languages/perl6/lib", "."]␤»
uvtc Looks like R* comes with perl6-File-Tools and perl6-Module-Tools. :) 21:48
tadzik oh, that's *
uvtc tadzik: yes 21:49
tadzik yeah, that explains a lot
uvtc tadzik: Sorry, perhaps I should've explicitly mentioned it here. I did so in the bug report.
tadzik No, not your fault
uvtc tadzik: Perlhaps I should file a new issue, requesting that neutro check first if those two packages are already installed? 21:50
sorear good * #perl6
tadzik looks to me that I've never installed Star, so I have no idea how neutro works there
uvtc: it has no way to check for presence of modules it hasn't installed by itself
I think neutro was included in Star some time ago too 21:51
uvtc tadzik: I don't see it in my /usr/local/rakudo/bin dir.
tadzik that's correct, it Was included, not it's not 21:52
* now it's not
uvtc 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
tadzik uvtc: I'm quite sure neutro creates .perl6 internally if it's not present, will look into this tomorrow
uvtc tadzik: thanks! 21:56
tadzik thank you!
uvtc tadzik: Sure, yw. :) Also, perhaps (for now) a note in the readme to just run "neutro ." to bootstrap if using R*.
tadzik uvtc: well volunteered :) 21:57
uvtc 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:00
sorear moritz_: is it bad of me to think people shouldn't be using perl6: if they only care about rakudo: ? 22:01
tadzik uvtc: can be. Or just a patch, what's easier for you
sorear TimToady: What do you mean by the !%foo<bar>:exists thinko?
jnthn sorear: pong
TimToady it applies the adverb to the !, not the subscript
jnthn sorear: But just back from a week's teaching and tired. So ask easy questions. :P
TimToady adverbs are at assignment precedence, give or take 22:02
sorear TimToady: is this a problem with Perl?
TimToady you were wondering why it was producing a funny result, iirc
was several days ago
sorear ok. 22:03
TimToady but couldn't reply from behind my http proxy
uvtc tadzik: ok, will get back to you (here, on irc -- I don't see an email address for you anywhere).
TimToady though, come to think of it, we might be able to make 5foo<bar>:!exists work 22:04
sorear jnthn: I'd just like help understanding native types and stuff
TimToady s/5/%/
22:04 mtk left
tadzik uvtc: irc is fine too 22:04
sorear jnthn: in nqp-nom, is "foo" supposed to make a parrot;Str?
jnthn sorear: It does at the moment. 22:05
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.
sorear native string = str, boxed string = Str? 22:09
22:10 molaf left
jnthn sorear: Yes 22:10
sorear: Note that the type object for str is an object
sorear what I'm most fuzzy on is the concept of inlinable representations
jnthn sorear: But we never end up with instances of it.
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
sorear so, str !=== Str 22:11
does str ~~ Str?
jnthn (str !=== Str) correct 22:12
str ~~ Str - not sure, off hand. Feasibly.
I'm quite sure that str ~~ Stringy
People tend to write Str in multiple dispatchy contexts.
I think we'll end up with str ~~ Str, int ~~ Int, num ~~ Num and so forth.
Unless TimToady++ feels otherwise. :) 22:13
But it's probably most natural that way.
masak +1
sorear I suppose str has to become Str when placed in a parcel.
er
capture
jnthn 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. :)
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.
sorear: Otherwise you can't make a call without boxing, which would probably suck.
TimToady especially if you're calling a C function... 22:15
jnthn 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...)
sorear What do you call the smallest runtime type which contains object and unboxed native types?
If I have my Mu $x; is it possible for $x.WHAT === str?
jnthn 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
TimToady native types are really container types, so it can't also be Mu
jnthn Depends if that can be made efficient enough I guess.
TimToady: I could see $x.WHAT === str being true in some case though, given that .WHAT is a macro, not a method. 22:17
TimToady s/container types/container types known to the compiler so they don't have be known to the runtime/
jnthn: nod
jnthn TimToady: my Mu $x - I guess that would box on assignment because the container forces it to. 22:18
22:18 mkramer1 left
TimToady to me it becomes clearer with a type like int, which obviously has no internal typeness 22:18
jnthn *nod*
Yeah, strings are...kinda weirder in that sense. :) 22:19
sorear I think ints are weirder because Int and int have vastly different domains
jnthn Every backend will probably have some notion of string that's lighter than what Str entails though.
TimToady is still not sure that str exists at the P6 level
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
pmurias sorear: hi 22:21
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:22
sorear pmurias: putting lexical stashes in the stash tree means that there is a single unified stash tree 22:23
TimToady the question I think is whether one might want to write generic code against some abstract 'str' type
22:24 felliott joined
TimToady 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
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
jnthn TimToady: That may well be the case.
slavik1 TimToady: something similar to java's Integer and int but being able to drop Integer down to int? 22:26
TimToady as currently defined, for instance, Num can always optimize to num
I am not sufficiently familiar with java types to say
slavik1 TimToady: same here, but java has Integer as an object and int as a primitive type ... 22:27
pmurias sorear: what do we need a single unified stash tree for?
slavik1 mindprod.com/jgloss/intvsinteger.html 22:28
pmurias hmm, json doesn't support cycles 22:29
sorear: i'll implement more of the lisp backend and we will see how the design works out for a different target 22:30
sorear pmurias: I don't understand your issue with globalness
pmurias: it makes stash merging a lot simpler
TimToady has just realized that you could define fixed-point numbers with implied denominators with Rat[Int,100] 22:31
it's a very useful notion to have constants be degenerate subset types 22:32
pmurias sorear: by issue was how do we determin if it's a global stash entry named SAFE:7 or a lexical one
s/by/my 22:33
sorear global stash entries have names like GLOBAL::Foo
if it doesn't start with GLOBAL, it's not global
pmurias so all of the stash entries are lexical
sorear the topmost stash contains the following children: GLOBAL, PROCESS, UNIT:NUMBER 22:34
pmurias it seems ok then
i didn't consider the fact that json has no cycles too 22:35
sorear is something making cycles?
pmurias no, just refering to things by names instead of just having reference to that seems strange 22:37
STD had a lot of bugs because it was using a strange refer to stuff by name scheme 22:38
sorear 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
22:41 stkowski joined
pmurias sorear: re debugging names which are part of an xref do they help you with anything? 22:42
sorear yes 22:45
colomon 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
flussence well, here's a start: github.com/flussence/Text-Tabs-Wra...xt/Wrap.pm 23:17
pmurias sorear: how can i specify an empty setting? 23:20
masak rakudo: (say "OH HAI" if $_ > 4 for 1, 2, 3) or say "empty!" 23:23
p6eval rakudo 924242: OUTPUT«empty!␤»
masak rakudo: (for 1, 2, 3 { if $_ > 4 { say "OH HAI" } }) or say "empty!" 23:24
p6eval rakudo 924242: ( no output )
masak submits rakudobug
23:24 drbean joined
masak rakudo: say (for 1, 2, 3 { if $_ > 4 { say "OH HAI" } }).perl 23:26
p6eval rakudo 924242: OUTPUT«(Bool::False, Bool::False, Bool::False)␤»
masak rakudo: say (say "OH HAI" if $_ > 4 for 1, 2, 3).perl 23:27
p6eval rakudo 924242: OUTPUT«()␤»
23:34 pmurias left
sorear phenny: tell pmurias -L NULL 23:35
phenny sorear: I'll pass that on when pmurias is around.
23:36 bpa left 23:39 pecastro joined 23:44 vmspb left
masak all Yapsi tests now pass again locally. 23:46
I'll do some cleanup tomorrow morning, and then a release. 23:47
jnthn masak++
masak Yapsi is now brimming with extensibility :)
jnthn
.oO( Official Perl 6 compiler release officially delayed to ensure it's continuing completeness )
*its
masak 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
23:49 wooden left 23:50 whiteknight joined
sorear jnthn: is my Mu $x = int; legal? What methods does $x respond to then? 23:52
sjohnson anyone here a GPL expert?
jnthn 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.
masak 'night, #perl6 23:54
23:54 masak left 23:57 cafesofie joined