􏿽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,