Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2014-02-02

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:18 tgt joined #perl6
00:21 BenGoldberg joined #perl6
00:21 jeffreykegler joined #perl6
00:23 xenoterracide joined #perl6
00:28 rurban1 joined #perl6
00:33 arnsholt joined #perl6
00:41 FROGGS joined #perl6
00:54 FROGGS joined #perl6
00:58 colomon joined #perl6
01:19 tgt joined #perl6
01:20 colomon o/
01:23 FROGGS joined #perl6
01:30 rurban1 joined #perl6
01:39 arnsholt joined #perl6
01:49 FROGGS joined #perl6
01:55 skids joined #perl6
02:02 lue http://rosettacode.org/wiki/I_before_E_except_after_C#Perl_6    probably not the best possible solution though :)
02:19 lue std: say uint[3];
02:19 camelia std 09dda5b: OUTPUT«ok 00:01 123m␤»
02:19 lue r: say uint[3];
02:19 camelia rakudo-moar 535d91: OUTPUT«===SORRY!===␤Cannot find method 'parameterize'␤»
02:19 camelia ..rakudo-parrot 535d91, rakudo-jvm 535d91: OUTPUT«===SORRY!===␤No such method 'parameterize' for invocant of type 'Perl6::Metamodel::NativeHOW'␤»
02:20 tgt joined #perl6
02:22 cognominal joined #perl6
02:26 TimToady lue++
02:27 FROGGS joined #perl6
02:32 rylo_ joined #perl6
02:33 uvtc joined #perl6
02:34 uvtc Any slides available for jnthn's "State of the Butterfly" talk?
02:50 * rjbs would also be interested.
02:57 skids joined #perl6
02:57 uvtc (http://irclog.perlgeek.de/perl6/2014-01-31#i_8202413)++ (where raydiak "contemplates putting together a list behaviour matrix which crosses parcel, list, array, capture, etc, with mutable, lazy, flattening, context-imposing, and so forth"
02:57 uvtc )
03:01 rurban1 joined #perl6
03:03 FROGGS joined #perl6
03:21 tgt joined #perl6
03:24 krunen joined #perl6
03:26 rjbs and forth? so it's a stack, too?
03:32 atroxaper joined #perl6
03:33 Pleiades` joined #perl6
03:34 grondilu_ joined #perl6
03:35 grondilu_ r: subset  duh of Str where 'foo'|'bar'; say $_ ~~ duh for <foo baz bar meh>
03:35 camelia rakudo-parrot 535d91, rakudo-jvm 535d91, rakudo-moar 535d91: OUTPUT«True␤False␤True␤False␤»
03:40 FROGGS joined #perl6
03:47 uvtc I stumbled upon this, <http://rosettacode.org/wiki/Bitmap#Perl_6>, which seems like a rather ordinary use of OOP, but it fails with a recent perl6-m:
03:47 uvtc Type check failed in assignment
03:47 uvtc in sub infix:<=> at src/gen/m-CORE.setting:16113
03:47 uvtc in block  at src/gen/m-CORE.setting:1690
03:47 uvtc in method fill at ./foo.pl6:16
03:47 uvtc in block  at ./foo.pl6:35
03:48 uvtc Seems to be that line, `@.data[$i][$j] = $p.clone;`
03:48 lue http://rosettacode.org/wiki/Generalised_floating_point_addition  <--  please tell me if it's just me that's making the table "the sequence of calculations" incomprehensible.
03:48 uvtc This is using "This is perl6 version 2014.01-19-gdc96308 built on MoarVM version 2014.01".
03:49 lue uvtc: does it work with other perl6s ?
03:49 uvtc Haven't tried. Only built Rakudo+Moar.
03:50 uvtc (I just copy/pasted the rosettacode example and thought I'd run it. Haven't poked around Perl 6 in a while.)
03:52 DopeyFish joined #perl6
03:54 lue It fails in all backends, so it's not a Moar issue.
03:54 lue r: class Foo { }; my $a = Foo; say $a.clone.WHAT
03:55 camelia rakudo-parrot 535d91, rakudo-jvm 535d91, rakudo-moar 535d91: OUTPUT«(Foo)␤»
03:55 TimToady the array should not be declared to hold Pixel
03:56 TimToady it's holding refs to arrays of pixels
03:56 TimToady at least that's what [][] implies
03:56 DopeyFish r: my (@odd, @even) = (1,2,3,4).classify:  {$_ % 2 ?? 'odd' !! 'even'} ; say @odd; say @even;
03:56 camelia rakudo-parrot 535d91, rakudo-moar 535d91: OUTPUT«"odd" => [1, 3] "even" => [2, 4]␤␤»
03:56 camelia ..rakudo-jvm 535d91: OUTPUT«"even" => [2, 4] "odd" => [1, 3]␤␤»
03:56 DopeyFish r: my (@odd, @even) = (1,2,3,4).classify:  {* % 2 ?? 'odd' !! 'even'} ; say @odd; say @even;
03:56 camelia rakudo-parrot 535d91, rakudo-jvm 535d91, rakudo-moar 535d91: OUTPUT«"odd" => [1, 2, 3, 4]␤␤»
03:56 TimToady when we have shaped arrays, [;] will allow it to be declared Pixel
03:57 lue TimToady: would you use Array[Pixel] there?
03:57 TimToady I wouldn't use a type at all, fo rnow
03:57 DopeyFish Was expect  * to give same result as $_ but it doesnt.
03:57 TimToady no, * implies {}, $_ doesn't
03:57 TimToady so * won't work inside {}, and $_ generally won't work outside
03:58 TimToady * % 2 is equivalent to { $_ % 2 }
03:58 TimToady so you're testing a closure for truth without calling it
03:59 DopeyFish thank you for the explanation.
04:00 TimToady yer welcome
04:00 TimToady 'bout the first useful thing I've done today, besides take cough syrup... :)
04:14 FROGGS joined #perl6
04:15 lue This is... odd, to say the least: http://rosettacode.org/wiki/9_billion_names_of_God_the_integer/Worship_of_false_idols
04:16 TimToady um, yeah
04:16 TimToady sometimes he doesn't like it when people think at different abstraction levels, is how I've taken it
04:19 lue I love the danger of this one :) http://rosettacode.org/wiki/Machine_code
04:20 TimToady yeah, that's an odd one two, from someone who likewise gets a bee in his bonnet from time to time
04:20 TimToady *too
04:21 lue .oO(TimToady knows what's what in RC-land)
04:21 tgt joined #perl6
04:22 TimToady I've looked at almost all the tasks that Perl 6 doesn't do yet
04:22 * TimToady tends to leave the mathematical ones for other folks, unless there's something easy to translate
04:23 TimToady for instance, I think someone else (grondilu?) should work on http://rosettacode.org/wiki/Gaussian_elimination
04:24 TimToady I've also tended to avoid the two-dimensional ones (as above) in hopes that shaped arrays would come along pretty soon
04:24 TimToady from a type perspective, a 2D array is very different from an array of arrays
04:25 lue TimToady: that was one I was interested in a bit, though I got tripped up on "backwards substitution" means. :P
04:25 TimToady rakudo didn't used to check, which is why the Pixel declaration used to wrok
04:26 TimToady I'm also one of the spam admins on RC, so I see everything that goes by
04:27 TimToady so yeah, I've a bit of familiarity with RC, on a broad rather than deep level
04:27 uvtc Seems like it would be useful if all the RC entries were in a db. That way, you could ask things like, "show me all $lang entries, sorted by $last-modified-date".
04:28 lue Heh, if I bothered to go back and fix it up and make the repo public, I'd have the Execute SNUSP task completed :)
04:29 TimToady some people get distracted easily :P
04:32 lue r: my @a is LoL; say "alive!"
04:32 camelia rakudo-parrot 535d91, rakudo-jvm 535d91, rakudo-moar 535d91: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/tmpfileâ�¤Variable trait 'is TypeObject' not yet implemented. Sorry. â�¤at /tmp/tmpfile:1â�¤------> [32mmy @a is LoL[33mâ��[31m; say "alive!"[0mâ�¤    ex…»
04:37 uvtc My only complaint with the Perl 6 entries on RC is that I'm usually hoping for a "baby Perl 6" version, but often get an experts Perl 6 version.
04:37 uvtc (at least, last time I went looking.)
04:40 TimToady often the expert version is quite readable if you know two or three things, and we sometimes try to explain those, though not often enough
04:41 TimToady and sometimes we give two different versions
04:42 telex joined #perl6
04:42 masak_ joined #perl6
04:42 itz_ joined #perl6
04:43 BenGoldberg Speaking of RC... I recently added a perl5 RC entry, http://rosettacode.org/wiki/Hickerson_series_of_almost_integers#Perl , which runs vastly faster than a naive implementation of that task; does anyone want to add a perl6 version that's similarly sped up?
04:43 TimToady thing is, RC is mostly about how your language is different from other languages, and a baby talk version usually is Perl written in some other language :)
04:45 TimToady BenGoldberg: I imagine a lot of people want to *have* it added :)
04:46 BenGoldberg If I could write perl6 as well as I can read it, I'd do it myself ;)
04:46 TimToady if you wanted to add a p5ish version, I'm sure someone else would be glad to make it more idiomatic p6
04:48 uvtc TimToady, I think there's also value both in showing how languages differ as well as how they are (or can be) similar. I think it can alleviate apprehension ("oh, Perl 6 is just like $other-lang except for $this and $that").
04:48 uvtc s/also//
04:49 TimToady sure, just sayin' RC as a whole tends to be biased towards idomaticity, not just for P6
04:49 TimToady *idio
04:50 BenGoldberg If you had the following p5 function: sub h { my ($n) = @_; return $iln2/2 if $n == 1; return $n*$iln2*h($n-1); } how would I write that as a p6 constant list?
04:50 BenGoldberg Err, make that conditional, if $n == 0
04:53 TimToady constant h = $iln2/2, -> $prev { my $n = ++state $; $n * $iln2 * $prev } ... *
04:53 TimToady that might be one way
04:53 TimToady mixes of n and previous value tend to be difficult
04:53 BenGoldberg Hmm...
04:53 uvtc Regardless, +1 for including bits of explanation in the RC entries. :)
04:53 TimToady I'm assuming the n starts at 0 from your conditional
04:53 BenGoldberg Yes
04:55 TimToady arguably ... should provide some way to get at the current offset
04:55 TimToady so we don't have to play tricks with state
04:59 BenGoldberg p6: constant iln2 = 1 / [+] map { 1.FatRat / 2**$_ / $_ }, 1 .. 200; constant h = iln2/2, { $^prev * (++state $ ) * iln2 } ... *; say .round(.001) for h[1..4];
04:59 camelia rakudo-parrot 535d91, rakudo-jvm 535d91, rakudo-moar 535d91: OUTPUT«1.041␤3.003␤12.996␤74.999␤»
04:59 camelia ..niecza v24-109-g48a8de3: OUTPUT«Unhandled exception: System.NullReferenceException: Object reference not set to an instance of an object␤  at Builtins.InvokeSub (Niecza.P6any obj, Niecza.Variable[] pos) [0x00000] in <filename unknown>:0 ␤  at Niecza.Kernel.ToComposable (Niecza.S…»
05:00 TimToady r: constant fact = 1, { $_ * ++state $ } ... *; say fact[^20]
05:00 camelia rakudo-parrot 535d91, rakudo-jvm 535d91, rakudo-moar 535d91: OUTPUT«1 1 2 6 24 120 720 5040 40320 362880 3628800 39916800 479001600 6227020800 87178291200 1307674368000 20922789888000 355687428096000 6402373705728000 121645100408832000␤»
05:01 TimToady r: constant fact = 1, [\*] 1..*; say fact[^20]
05:01 camelia rakudo-parrot 535d91, rakudo-jvm 535d91, rakudo-moar 535d91: OUTPUT«1 1 2 6 24 120 720 5040 40320 362880 3628800 39916800 479001600 6227020800 87178291200 1307674368000 20922789888000 355687428096000 6402373705728000 121645100408832000␤»
05:01 BenGoldberg r: constant fact = 0, 1, { $_ * ++state $ } ... *; say fact[^20]
05:01 camelia rakudo-parrot 535d91, rakudo-jvm 535d91, rakudo-moar 535d91: OUTPUT«0 1 1 2 6 24 120 720 5040 40320 362880 3628800 39916800 479001600 6227020800 87178291200 1307674368000 20922789888000 355687428096000 6402373705728000␤»
05:01 uvtc TimToady, here's an example: <http://rosettacode.org/wiki/Ackermann_function>. Many of the langs I checked at least show you the straightforward "C" version. But Perl 6 skips that and shows off other ways to do it. This appeals to folks who already know some Perl 6, but (IMO) turns off newbs (who *want* to see that translated C version).
05:01 BenGoldberg RC allows languages to have multiple distinct implementations of a task.
05:02 BenGoldberg If you want to include a translated C version of the Ackermann function, you can write it and add it to the RC page, in addition to the 'perlish' solution.
05:03 lue uvtc: the ternary chaining looks to me like the C version.
05:03 TimToady uvtc: I see that; feel free to add a normal recursive version at the front
05:03 uvtc BenGoldberg, my point is that it's newbs like me who (A) would want the baby Perl 6 version, and (B) wouldn't know how to write it in P6. :)
05:03 uvtc (that is, in order to add it to the RC entry)
05:04 uvtc lue, I want the Clojure version translated to P6 right there at the top of the P6 entry. :)
05:10 ilbot3 joined #perl6
05:10 Topic for #perl6 is now »ö« Welcome to Perl 6! | http://perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:,  niecza:, std:, or /msg camelia perl6: ... | irclog: http://irc.perl6.org | UTF-8 is our friend!
05:17 uvtc TimToady, the C/D/Lua/Clojure/etc. versions all look to my eye like direct translations of the definition at the top of the page.
05:18 TimToady sure, and will all run very slowly unless there is some kind of memoization
05:20 araujo joined #perl6
05:22 tgt joined #perl6
05:27 uvtc left #perl6
05:33 DopeyFish joined #perl6
05:35 jeffreykegler joined #perl6
05:42 TimToady fixed http://rosettacode.org/wiki/Ackermann_function#Perl_6 for uvtc++
05:48 jeffreykegler joined #perl6
06:25 tgt joined #perl6
06:29 xinming joined #perl6
06:29 xenoterracide joined #perl6
06:36 SamuraiJack joined #perl6
06:55 tgt joined #perl6
07:22 raydiak https://gist.github.com/raydiak/8764032 # problem with overloaded at_pos breaking lvalues; dunno if it's my fatigue or a bug, but suggestions welcome
07:31 moritz raydiak: you could try to make your at_pos like this
07:31 moritz my @res; for ... -> $i { @res[$i] := self.Array::at_pos($i) }
07:32 moritz ie explicitly binding into the result array
07:32 moritz no idea if it'll work
07:32 bjz joined #perl6
07:33 darutoko joined #perl6
07:43 raydiak moritz: thanks, I'll give a few more explicit variants a try
07:56 tgt joined #perl6
08:15 raydiak yep...apparently .Array::[] silently fails as an lvalue, but .Array::at_pos works
08:23 moritz \o/
08:23 * moritz didn't even know you could write .Array::[]
08:23 moritz oh, and you probably can't really since .[] is a subroutine
08:25 diakopter perl6: warn+map+(Fizz)[$_%3].(Buzz)[$_%5].(Bazz)[$_%7]||$_,1..100
08:25 camelia niecza v24-109-g48a8de3: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Undeclared names:â�¤      'Bazz' used at line 1â�¤  'Buzz' used at line 1â�¤  'Fizz' used at line 1â�¤â�¤Unhandled exception: Check failedâ�¤â�¤  at /home/p6eval/niecza/boot/lib/CORE.setting line 1502 (die @ 5) â�¤  at /ho…»
08:25 camelia ..rakudo-parrot 535d91, rakudo-jvm 535d91, rakudo-moar 535d91: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/tmpfileâ�¤Undeclared names:â�¤    Bazz used at line 1â�¤    Buzz used at line 1â�¤    Fizz used at line 1â�¤â�¤Â»
08:25 atroxaper joined #perl6
08:28 raydiak but .Array::[] works as an rvalue
08:29 moritz and what does it do? :-)
08:30 raydiak return the element's value...I thought...???...
08:32 raydiak r: class Foo is Array { method at_pos ($i) { die 'custom subscript' } }; my $foo = Foo.new(1,2,3); say $foo.Array::[1];
08:32 camelia rakudo-parrot 535d91, rakudo-jvm 535d91, rakudo-moar 535d91: OUTPUT«2␤»
08:32 raydiak r: class Foo is Array { method at_pos ($i) { die 'custom subscript' } }; my $foo = Foo.new(1,2,3); say $foo.[1];
08:32 camelia rakudo-moar 535d91: OUTPUT«custom subscript␤  in method at_pos at /tmp/tmpfile:1␤  in sub postcircumfix:<[ ]> at src/gen/m-CORE.setting:2361␤  in sub postcircumfix:<[ ]> at src/gen/m-CORE.setting:2325␤  in block  at /tmp/tmpfile:1␤␤»
08:32 camelia ..rakudo-jvm 535d91: OUTPUT«custom subscript␤  in method at_pos at /tmp/tmpfile:1␤  in sub postcircumfix:<[ ]> at gen/jvm/CORE.setting:2361␤  in sub postcircumfix:<[ ]> at gen/jvm/CORE.setting:2325␤  in block  at /tmp/tmpfile:1␤␤»
08:32 camelia ..rakudo-parrot 535d91: OUTPUT«custom subscript␤  in method at_pos at /tmp/tmpfile:1␤  in sub postcircumfix:<[ ]> at gen/parrot/CORE.setting:2365␤  in sub postcircumfix:<[ ]> at gen/parrot/CORE.setting:2329␤  in block  at /tmp/tmpfile:1␤␤»
08:33 raydiak r: class Foo is Array { method at_pos ($i) { die 'custom subscript' } }; my $foo = Foo.new(1,2,3); say $foo.Array::[1]; $foo.Array::[1] = 123; say $foo.Array::[1];
08:33 camelia rakudo-parrot 535d91, rakudo-jvm 535d91, rakudo-moar 535d91: OUTPUT«2␤2␤»
08:35 raydiak so it's definitely calling Array's [], and doing what I expect it to, except for the silent lval fail...unless I still don't understand something pertinent
08:41 moritz raydiak: I'm asking more from a syntaxctical perspective. What exactly does .Array::[] call?
08:41 moritz there's no method postcircumfix:<[ ]> that could be called in class Array
08:42 raydiak moritz: something magical (to me) seems to make it call one of the somethings defined in src/core/array_slice.pm, but I'm just guessing
08:52 regreg joined #perl6
08:56 raydiak still digging...have looked at List, Positional, Cool, and BOOTSTRAP now
08:57 tgt joined #perl6
09:05 raydiak okay, can't keep it all straight...bed time; this ought to be much easier to figure out with a clear head
09:06 raydiak g'night #perl6, and thanks moritz++ for the answers and challenge
09:24 FROGGS joined #perl6
09:27 Timbus r: class Foo is Array { method at_pos ($i) { die 'custom subscript' } }; my $foo = Foo.new(1,2,3); say $foo.Array.[1];
09:27 camelia rakudo-parrot 535d91, rakudo-jvm 535d91, rakudo-moar 535d91: OUTPUT«2␤»
09:31 grondilu joined #perl6
09:32 grondilu joined #perl6
09:32 grondilu joined #perl6
09:40 berekuk joined #perl6
09:47 masak_ yo sup, #perl6
09:47 diakopter suuuuuuup
09:48 moritz soup!
09:48 diakopter wait, you're not masak
09:48 moritz I'm not?
09:49 * moritz looks around confused
09:49 masak here I am! :)
09:49 diakopter that's better, ish
09:50 masak there must have been an IRC storm tonight.
09:57 tgt joined #perl6
09:59 timotimo sup!
10:00 * moritz submitted a pull request for p5's Encode module
10:01 moritz just docs, but it's already a non-wasted day :-)
10:01 masak the world, a little better. one day at a time.
10:02 masak ooh, new author note! \o/
10:02 dmol joined #perl6
10:02 masak ...meh. progress report is "no progress". :/
10:02 moritz :(
10:07 daniel-s_ joined #perl6
10:17 denis_boyun joined #perl6
10:23 * timotimo discovers a mash-up of rage against the machine's "killing in the name" and the thomas the tank engine theme song and is pretty pleased
10:24 tadzik :o
10:24 diakopter sung by weird al, I hope
10:25 timotimo nah, it's got the vocals from the original song
10:27 daniel-s_ joined #perl6
10:27 mberends joined #perl6
10:27 lizmat joined #perl6
10:29 tadzik mberends! \o/
10:31 timotimo good day mberends :)
10:34 kaare__ joined #perl6
10:36 arnsholt_ joined #perl6
10:36 japhb__ joined #perl6
10:36 atroxaper joined #perl6
10:36 colomon timotimo: you mean "There's two there's four there's six there's eight?"  ;)
10:37 daniel-s_ joined #perl6
10:37 rindolf joined #perl6
10:37 timotimo colomon: i'm not sure what that refers to
10:37 colomon timotimo: Thomas theme song words
10:37 timotimo oh
10:37 timotimo i don't actually know the thomas the tank engine words
10:38 timotimo in this case, it's the words from "killing in the name"
10:38 timotimo as in: "*choo* *choo* i won't do what you tell me!"
10:39 masak mberends! \o/
10:41 regreg joined #perl6
10:43 berekuk joined #perl6
10:46 FROGGS joined #perl6
10:47 tadzik timotimo: link?
10:48 timotimo r/thomasthedankengine
10:49 tadzik oh haha
10:49 masak clickable/permanent link: http://www.reddit.com/r/thomasthedankengine/comments/1vws1p/official_mashup_request_thread/
10:51 masak hehe. reminds me of https://soundcloud.com/pomdeterrific/pomdeter-call-me-a-hole
10:53 vendethiel joined #perl6
10:58 synopsebot joined #perl6
10:58 tgt joined #perl6
10:59 krunen joined #perl6
11:15 vendethiel joined #perl6
11:26 tgt joined #perl6
11:28 daniel-s_ joined #perl6
11:30 denisboyun joined #perl6
11:35 atroxaper Does anybody know in which system variable a path for Perl6 modules is stored?
11:35 atroxaper echo $PERL6LIB is empty
11:36 DopeyFish joined #perl6
11:37 daniel-s_ joined #perl6
11:37 spider-mario joined #perl6
11:38 DopeyFish I got a list of arrays and is currently using map to get size of each of arrays as such: @aa.map( { +@($_) } )
11:38 DopeyFish how can i replace the map block with a whatever star?
11:39 timotimo i think +@(*) ought to work (drop the { }, too)
11:39 timotimo r: my &foo = +@(*); say &foo.WHAT;
11:39 camelia rakudo-parrot 535d91, rakudo-jvm 535d91, rakudo-moar 535d91: OUTPUT«Type check failed in assignment to '&foo'; expected 'Callable' but got 'Int'␤  in block  at /tmp/tmpfile:1␤␤»
11:39 timotimo heh.
11:40 masak r: my &foo = sub(@l) { +@l }; say &foo.WHAT
11:40 camelia rakudo-parrot 535d91, rakudo-jvm 535d91, rakudo-moar 535d91: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/tmpfileâ�¤Variable '@l' is not declaredâ�¤at /tmp/tmpfile:1â�¤------> [32mmy &foo = sub(@l[33mâ��[31m) { +@l }; say &foo.WHAT[0mâ�¤    expecting any of:…»
11:40 masak r: my &foo = sub (@l) { +@l }; say &foo.WHAT
11:40 camelia rakudo-parrot 535d91, rakudo-jvm 535d91, rakudo-moar 535d91: OUTPUT«(Sub)␤»
11:44 DopeyFish so... can't be done?
11:45 timotimo no, it definitely can
11:45 timotimo i was just too lazy to type it up
11:45 timotimo r: my @lol; @lol.push((1, 2, 3)); @lol.push((1, 2)); say @lol.perl; say @lol.map: +@(*);
11:45 camelia rakudo-moar 535d91: OUTPUT«Array.new(1, 2, 3, 1, 2)␤No such method 'count' for invocant of type 'Int'␤  in method reify at src/gen/m-CORE.setting:7322␤  in method reify at src/gen/m-CORE.setting:7235␤  in method reify at src/gen/m-CORE.setting:7235␤  in method reify at src…»
11:45 camelia ..rakudo-parrot 535d91: OUTPUT«Array.new(1, 2, 3, 1, 2)␤No such method 'count' for invocant of type 'Int'␤  in method reify at gen/parrot/CORE.setting:7326␤  in method reify at gen/parrot/CORE.setting:7243␤  in method reify at gen/parrot/CORE.setting:7243␤  in method reify a…»
11:45 camelia ..rakudo-jvm 535d91: OUTPUT«Array.new(1, 2, 3, 1, 2)␤No such method 'count' for invocant of type 'Int'␤  in method reify at gen/jvm/CORE.setting:7322␤  in method reify at gen/jvm/CORE.setting:7235␤  in method reify at gen/jvm/CORE.setting:7235␤  in method reify at gen/jvm/CO…»
11:45 timotimo oh, it flattened
11:45 timotimo r: my @lol; @lol.push($(1, 2, 3)); @lol.push($(1, 2)); say @lol.perl; say @lol.map: +@(*);
11:45 camelia rakudo-parrot 535d91: OUTPUT«Array.new($(1, 2, 3), $(1, 2))␤No such method 'count' for invocant of type 'Int'␤  in method reify at gen/parrot/CORE.setting:7326␤  in method reify at gen/parrot/CORE.setting:7243␤  in method reify at gen/parrot/CORE.setting:7243␤  in method r…»
11:45 camelia ..rakudo-moar 535d91: OUTPUT«Array.new($(1, 2, 3), $(1, 2))␤No such method 'count' for invocant of type 'Int'␤  in method reify at src/gen/m-CORE.setting:7322␤  in method reify at src/gen/m-CORE.setting:7235␤  in method reify at src/gen/m-CORE.setting:7235␤  in method reify …»
11:46 camelia ..rakudo-jvm 535d91: OUTPUT«Array.new($(1, 2, 3), $(1, 2))␤No such method 'count' for invocant of type 'Int'␤  in method reify at gen/jvm/CORE.setting:7322␤  in method reify at gen/jvm/CORE.setting:7235␤  in method reify at gen/jvm/CORE.setting:7235␤  in method reify at gen/…»
11:46 timotimo grmbl.
11:46 timotimo r: my @lol; @lol.push([1, 2, 3]); @lol.push([1, 2]); say @lol.perl; say @lol.map: +@(*);
11:46 camelia rakudo-parrot 535d91: OUTPUT«Array.new([1, 2, 3], [1, 2])␤No such method 'count' for invocant of type 'Int'␤  in method reify at gen/parrot/CORE.setting:7326␤  in method reify at gen/parrot/CORE.setting:7243␤  in method reify at gen/parrot/CORE.setting:7243␤  in method rei…»
11:46 camelia ..rakudo-moar 535d91: OUTPUT«Array.new([1, 2, 3], [1, 2])␤No such method 'count' for invocant of type 'Int'␤  in method reify at src/gen/m-CORE.setting:7322␤  in method reify at src/gen/m-CORE.setting:7235␤  in method reify at src/gen/m-CORE.setting:7235␤  in method reify at…»
11:46 camelia ..rakudo-jvm 535d91: OUTPUT«Array.new([1, 2, 3], [1, 2])␤No such method 'count' for invocant of type 'Int'␤  in method reify at gen/jvm/CORE.setting:7322␤  in method reify at gen/jvm/CORE.setting:7235␤  in method reify at gen/jvm/CORE.setting:7235␤  in method reify at gen/jv…»
11:46 timotimo is that so?
11:46 timotimo r: my @lol; @lol.push([1, 2, 3]); @lol.push([1, 2]); say @lol.perl; say @lol.map: *.elems;
11:46 camelia rakudo-parrot 535d91, rakudo-jvm 535d91, rakudo-moar 535d91: OUTPUT«Array.new([1, 2, 3], [1, 2])␤3 2␤»
11:53 jac50 joined #perl6
11:59 DopeyFish found it.
12:00 DopeyFish @aa.map(+*)
12:00 daniel-s__ joined #perl6
12:00 DopeyFish r: my @lol; @lol.push($(1, 2, 3)); @lol.push($(1, 2)); say @lol.perl; say @lol.map(+*)
12:00 camelia rakudo-parrot 535d91, rakudo-jvm 535d91, rakudo-moar 535d91: OUTPUT«Array.new($(1, 2, 3), $(1, 2))␤3 2␤»
12:01 timotimo ah sure
12:01 timotimo no need to @(...) that
12:15 berekuk joined #perl6
12:43 lue joined #perl6
13:03 denisboyun joined #perl6
13:21 tgt joined #perl6
13:26 johnmilton joined #perl6
13:30 berekuk joined #perl6
13:50 rindolf joined #perl6
13:51 arnsholt joined #perl6
13:58 masak perl6: my &foo = sub ($x) { say "one parameter" }; foo("OH"); &foo = sub ($y, $z) { say "two parameters" }; foo("OH", "HAI")
13:58 camelia rakudo-parrot 535d91, rakudo-jvm 535d91, rakudo-moar 535d91: OUTPUT«one parameter␤two parameters␤»
13:58 camelia ..niecza v24-109-g48a8de3: OUTPUT«Potential difficulties:â�¤  $x is declared but not used at /tmp/tmpfile line 1:â�¤------> [32mmy &foo = sub ([33mâ��[31m$x) { say "one parameter" }; foo("OH"); [0mâ�¤  $y is declared but not used at /tmp/tmpfile line 1:â�¤------> [32mne parameter…»
14:00 zakharyas joined #perl6
14:10 masak sometimes it feels weird to declare accumulator-type variables outside of the loop where they're to be used.
14:11 masak and it doesn't feel like there's a phaser to help with that either.
14:11 masak I guess what I am thinking of is some kind of 'state' declaration for loops.
14:16 Timbus oh wow, thats something ive always wanted too :o
14:16 lizmat joined #perl6
14:17 clsn perl6: my $i=0; while $i < 6 { LEAVE { last }; say $i++; }
14:17 camelia rakudo-parrot 535d91: OUTPUT«===SORRY!===␤Error while compiling op p6return: Operation 'p6return' requires 1 operands, but got 2␤»
14:17 camelia ..rakudo-jvm 535d91, rakudo-moar 535d91, niecza v24-109-g48a8de3: OUTPUT«0␤»
14:17 masak clsn: ooh
14:17 masak clsn: haven't seen that one before.
14:18 clsn Yeah, looked weird to me too...
14:18 masak clsn: feel free to submit a rakudobug.
14:18 clsn Will in a bit.
14:18 masak Timbus: actually, I think this all ties into the "lagging-variable" package.
14:18 clsn I'm a little fuzzy on some of the phasers in general...
14:18 masak Timbus: maybe I should write a module for that just to get it out of my system.
14:18 masak clsn: that one is interesting, for sure.
14:18 clsn perl6: my $i=0; while $i < 6 { FIRST { say "Here"; last }; say $i++ }
14:18 camelia rakudo-moar 535d91: OUTPUT«0␤1␤2␤3␤4␤5␤»
14:18 camelia ..niecza v24-109-g48a8de3: OUTPUT«[31m===[0mSORRY![31m===[0m��Action method statement_prefix:FIRST not yet implemented at /tmp/tmpfile line 1:�------> [32mhile $i < 6 { FIRST { say "Here"; last }[33m�[31m; say $i++ }[0m��Unhandled exception: Unable to resolve metho…»
14:18 camelia ..rakudo-parrot 535d91, rakudo-jvm 535d91: OUTPUT«Here␤0␤1␤2␤3␤4␤5␤»
14:19 masak clsn: it's another one of those "how does X interact with Y" things. phasers are full of them.
14:19 clsn Wow, didn't expect moar to do different there.
14:19 Timbus i guess you could always use the first part of a loop(;;) ;/
14:19 clsn I'm not positive that the behavior is wrong or right there...
14:20 masak clsn: looks like rakudo-parrot has it right.
14:20 masak hm, wait.
14:20 clsn Does the "last" not count there then?
14:20 masak no, none of them are right.
14:20 masak yes, it should, of course.
14:20 masak clsn: feel free to submit a separate rakudobug for that one. ;)
14:20 clsn Heh. :)
14:22 Timbus call it 'the last bug' and we can declare perl 6 finished when it's closed
14:22 clsn Ooh, I like that.
14:27 bjz joined #perl6
14:31 denisboyun joined #perl6
14:39 arnsholt joined #perl6
14:41 rurban1 joined #perl6
14:44 BenGoldberg joined #perl6
14:53 tgt_ joined #perl6
14:53 raiph joined #perl6
15:02 denisboyun joined #perl6
15:07 virtualsue joined #perl6
15:10 virtualsue o/
15:12 rindolf joined #perl6
15:12 masak virtualsue: \o
15:12 timotimo ohai
15:14 tgt joined #perl6
15:14 virtualsue greets
15:16 zakharyas joined #perl6
15:16 FROGGS o/
15:24 ajr joined #perl6
15:30 arnsholt joined #perl6
15:31 rindolf Hi all, masak, timotimo , FROGGS
15:31 FROGGS hi rindolf
15:31 rindolf FROGGS: what's new?
15:31 FROGGS I dunno
15:31 FROGGS this is news to me: https://fosdem.org/2014/schedule/event/perl6_today/
15:31 FROGGS and I hope it does not takes months for the videos to appear
15:31 timotimo saturday ... so it happened already
15:32 * timotimo looks forward to slide uploads
15:32 virtualsue joined #perl6
15:32 ajr_ joined #perl6
15:33 TimToady unfortunately, they didn't turn down the unused wireless mic channel, and there is occasional static that is louder than jnthn++
15:33 timotimo aaw crud :(
15:33 virtualsue i'm hoping the video will be good
15:35 FROGGS TimToady: well, he can speak it again at home :o)
15:37 TimToady of course, I'm just guessing that's what happened, but sound engineer is one of the jobs I know how to fake pretty well
15:44 regreg joined #perl6
15:45 Sqirrel joined #perl6
15:45 FROGGS Sqirrel \o/
15:53 abraxxa joined #perl6
15:54 abraxxa I've written a little app in Perl 6 two years ago and just found out that it has a bug with the current Rakudo Star 2014.01 release: https://gist.github.com/abraxxa/806301
15:55 abraxxa the input check in line 51 and 56 accept number that aren't included in @allowed_numbers and @allowed_stars and I wonder if my code is correct or the release has a bug
15:57 timotimo i think you may want to use == instead of ~~ for those checks
15:57 timotimo the any will autothread the == comparison over all of its members anyway
15:57 timotimo oh, actually
15:58 timotimo your alloced_numbers and allowed_stars could just be actually ranges (i think assignment to a @var will listify them), and *then* you can use ~~ without any
15:59 Psyche^ joined #perl6
15:59 FROGGS p: my @allowed_numbers = (1..50); say 55 ~~ any @allowed_numbers
15:59 camelia rakudo-parrot 535d91: OUTPUT«False␤»
15:59 timotimo p: my @allowed_numbers = 1..50; say @allowed_numbers.WHAT
15:59 camelia rakudo-parrot 535d91: OUTPUT«(Array)␤»
15:59 timotimo ~~ should still work on that, but it would be less efficient
16:00 TimToady timotimo: allowed is a random subset though
16:00 timotimo oh, i didn't notice that
16:01 timotimo it's kind of hard, since the lines are wider than gist will show at once >_>
16:01 abraxxa i wonder if the (my $input = prompt) returns $input or something else
16:01 TimToady why is it testing && $input !~~ any @numbers  ?
16:01 FROGGS it will return the value of $input, yes
16:02 timotimo it should return that, yeah
16:02 abraxxa TimToady: to not allow the same number twice
16:02 TimToady wuold that not disallow any of the picked numbers the first part allowed
16:02 abraxxa yes
16:02 abraxxa that's the point of it
16:03 abraxxa a user pick without return
16:04 TimToady sorry, not awake enough yet to help
16:04 TimToady not to mention the flu, and the trigeminal shingles I'd better go to the doctor for this morning...
16:04 abraxxa hm...weird
16:04 abraxxa > say (my $input = prompt("Bitte geben sie Stern $_ ein (1-9): ")) ~~ 1..9;
16:04 abraxxa Bitte geben sie Stern  ein (1-9): 10
16:04 abraxxa True
16:05 timotimo hm. it may be problematic since what prompt returns is a string
16:05 timotimo so it sees that it begins with a 1 and says "that's okay"?
16:05 FROGGS perl6-p -e 'say (my $input = prompt("Bitte geben sie Stern $_ ein (1-9): ")).Int ~~ 1..9'
16:05 FROGGS Bitte geben sie Stern  ein (1-9): 22
16:05 FROGGS False
16:05 abraxxa TimToady: get well soon! I've been ill last week two, for the fifth time this winter...
16:05 timotimo FROGGS: what happens if you supply "foo" instead? :)
16:05 abraxxa ah!
16:06 timotimo r: say "foo".Int
16:06 camelia rakudo-parrot 535d91: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '⏏foo' (indicated by ⏏)␤  in method Int at gen/parrot/CORE.setting:12223␤  in method Int at gen/parrot/CORE.setting:5530␤  in block  at /tmp/tmpfile:1␤␤»
16:06 camelia ..rakudo-jvm 535d91: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '⏏foo' (indicated by ⏏)␤  in method Int at gen/jvm/CORE.setting:12202␤  in method Int at gen/jvm/CORE.setting:5526␤  in block  at /tmp/tmpfile:1␤␤»
16:06 camelia ..rakudo-moar 535d91: OUTPUT«===SORRY!===␤Cannot convert string to number: base-10 number must begin with valid digits or '.' in '⏏foo' (indicated by ⏏)␤»
16:06 abraxxa did this change in the last year in rakudo star?
16:06 TimToady I'll get over the flu on my own, but if I don't deal with this shingles, I could well get Bell's Palsy
16:06 FROGGS timotimo: that :o)
16:06 abraxxa cause that did work when i first wrote it
16:06 FROGGS say "22" ~~ 1..9
16:07 FROGGS p: say "22" ~~ 1..9
16:07 camelia rakudo-parrot 535d91: OUTPUT«True␤»
16:07 FROGGS n: say "22" ~~ 1..9
16:07 camelia niecza v24-109-g48a8de3: OUTPUT«False␤»
16:07 FROGGS clearly a rakudobug
16:07 abraxxa looks like we're up to something
16:07 timotimo r: say "foo" ~~ 1..9
16:07 camelia rakudo-parrot 535d91, rakudo-jvm 535d91, rakudo-moar 535d91: OUTPUT«False␤»
16:08 abraxxa every time I run this little app with a newer rakudo version I find a bug ;)
16:08 abraxxa but it's only about once a year
16:08 timotimo at least that doesn't give an exception
16:08 timotimo abraxxa: your contributions are helpful :)
16:08 TimToady p: say "2" ~~ any(1,2,3)
16:08 camelia rakudo-parrot 535d91: OUTPUT«True␤»
16:08 TimToady abraxxa: obviously if you ran this more often, we'd be done by now :)
16:09 timotimo :D
16:09 abraxxa but that seems to work here: > say "51" ~~ any(1..50);
16:09 abraxxa False
16:09 FROGGS n: say "22" ~~ any 1..9
16:09 camelia niecza v24-109-g48a8de3: OUTPUT«False␤»
16:09 FROGGS p: say "22" ~~ any 1..9
16:09 camelia rakudo-parrot 535d91: OUTPUT«False␤»
16:09 FROGGS hmmmm
16:10 FROGGS weird
16:12 * abraxxa tries to find a spectest where he could add some more
16:13 abraxxa rakudo/t/spec/S03-smartmatch/any-array.t looks promising
16:14 TimToady I thought it was bare range check that was malfing
16:14 TimToady r: say "22" ~~ 1..9
16:14 camelia rakudo-parrot 535d91, rakudo-jvm 535d91, rakudo-moar 535d91: OUTPUT«True␤»
16:15 abraxxa what's the perl6 counterpart of prove -vl ?
16:16 abraxxa hm, two of the existing tests in there fail
16:16 * abraxxa runs make rakudo-spectest
16:16 timotimo it's "spectest" (or, if you have multiple backends built p-spectest for example)
16:17 abraxxa make test told me to run make rakudo-spectest
16:17 abraxxa which works
16:17 timotimo oh
16:17 timotimo okay
16:17 abraxxa and quite a few fail
16:17 abraxxa not sure if that's ok because some features aren't implemented or bugfree
16:18 timotimo the ones that fail should actually be fudged properly
16:18 abraxxa e.g. t/spec/S02-lexical-conventions/unicode.rakudo.parrot ............ Dubious, test returned 1 (wstat 256, 0x100)
16:18 abraxxa No subtests run
16:18 timotimo (and have a proper ticket)
16:18 timotimo that's when it "crashes"
16:18 abraxxa that happened three times so far
16:19 FROGGS that is unusual
16:19 timotimo try running these with just perl6 rather than prove so you'll get the output
16:19 timotimo maybe your build has had some problem?
16:19 abraxxa just compiled it on Ubuntu 13.10 x86-64 wihtout any problems
16:20 timotimo i'd call that test crashing a problem, though
16:21 abraxxa i've built it with perl Configure.pl --gen-parrot --gen-nqp --backends=parrot as i didn't want the jvm backend
16:21 FROGGS abraxxa: that is alright
16:21 FROGGS can we get your perl6-p --version ?
16:22 abraxxa hm...i have the libicu48 ubuntu package installed but no -dev one
16:22 FROGGS ahh, that explains it
16:22 abraxxa might that cause the compile to succeed but leaving the binary with weird features?
16:22 timotimo yeah
16:22 FROGGS though, the tests should be skipped when icu is missing
16:22 abraxxa the build process should prevent that from happening
16:22 timotimo as soon as you try to use unicode database stuff, it'll tell you that icu is missing
16:22 abraxxa FROGGS: This is perl6 version 2014.01 built on parrot 5.9.0 revision 0
16:23 FROGGS k, thx
16:23 abraxxa makes sense
16:23 molaf_ joined #perl6
16:23 abraxxa still t/spec/S02-types/version.t ...................................... Failed 6/35 subtests
16:24 abraxxa and the failing in my code shouldn't be unicode related either
16:24 timotimo aye
16:24 abraxxa i'll build another one with libicu48-dev installed for comparision
16:26 FROGGS abraxxa: if we can't solve that now, I'll drop you a msg via github or will comment to your gist with a solution
16:26 abraxxa should i paste the full output of the non-icu build's make rakudo-spectest?
16:26 FROGGS no, don't think we need that
16:26 abraxxa ok
16:26 abraxxa after installing libicu-dev the Configure script fails
16:26 FROGGS I can test that here too
16:27 FROGGS that is a bug in parrot
16:27 FROGGS I think you need to create the following symlink: /usr/include/unicode -> /usr/include/x86_64-linux-gnu/unicode/
16:29 abraxxa yes, now it continues
16:30 abraxxa should be added to http://rakudo.org/how-to-get-rakudo/ or the README
16:30 timotimo the new parrot version that we neglected to upgrade to ... did it fix that?
16:30 abraxxa sorry, the README includes it
16:30 timotimo in that case, i'll bump the parrot version for the release i'll be doing this month
16:30 FROGGS timotimo: no, don't think so
16:31 timotimo but the parrot folks do know about it?
16:32 abraxxa can i build it using more than one core?
16:32 FROGGS timotimo: possibly, but not sure about that
16:32 FROGGS timotimo: I wanted to fix that, but had not time to do that yet
16:32 timotimo abraxxa: parrot, yes. rakudo, partially, nqp also only partially
16:32 abraxxa with which option?
16:32 FROGGS abraxxa: make -j3 for example
16:32 abraxxa ah, so nothing special
16:33 abraxxa can i pass that to Configure as well?
16:33 timotimo i don't think so
16:33 FROGGS no
16:35 abraxxa hm...that doesn't help much
16:35 timotimo yes, most of the build is actually sequential
16:38 abraxxa looks like the tests as well
16:39 timotimo for that you need TEST_JOBS=n
16:40 abraxxa ah yes
16:40 abraxxa i had that set in my bashrc but commented it out because of random cpan module failure
16:40 abraxxa TEST_JOBS=10 makes my eight cores to 100%
16:40 timotimo 8 should be enough, too :)
16:41 abraxxa that's quite a memory hugger
16:41 timotimo yes, it is
16:41 timotimo moarvm is pretty promising in that regard, though
16:42 abraxxa looking forward to it!
16:46 abraxxa Files=777, Tests=30268, 344 wallclock secs ( 8.02 usr  1.29 sys + 2336.52 cusr 160.69 csys = 2506.52 CPU)
16:46 abraxxa Result: PASS
16:47 timotimo not such a bad timing
16:49 denisboyun joined #perl6
16:49 abraxxa the bug in my app is still present
17:00 FROGGS abraxxa: it is a problem with precedence
17:01 FROGGS you need either any(@allowed_numbers), or replace && by 'or'
17:01 FROGGS err, 'and'
17:01 FROGGS p: say( "ohh" ~~ any 1 && 2 )
17:01 camelia rakudo-parrot 535d91: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '⏏ohh' (indicated by ⏏)␤  in method Numeric at gen/parrot/CORE.setting:12225␤  in sub infix:<==> at gen/parrot/CORE.setting:4049␤  in sub infix:<==> at gen/p…»
17:02 FROGGS p: say( "55" ~~ any 1 && 2 )
17:02 camelia rakudo-parrot 535d91: OUTPUT«False␤»
17:02 FROGGS umm
17:02 FROGGS p: say( "55" ~~ any True )
17:02 camelia rakudo-parrot 535d91: OUTPUT«True␤»
17:02 FROGGS well, in the end it is like the above
17:05 zby_home_ joined #perl6
17:07 abraxxa with TEST_JOBS=4: Files=777, Tests=30268, 411 wallclock secs ( 6.35 usr  0.93 sys + 1474.16 cusr 120.76 csys = 1602.20 CPU)
17:08 abraxxa so hyperthreading is useful
17:08 timotimo yeah, an extra register bank and (maybe?) extra L1 cache will definitely help
17:08 timotimo most of the benefit comes from having the pipeline stuffed all the time, i believe
17:08 abraxxa yes
17:09 abraxxa i'll try again with 8 jobs now to see if 8 -> 10 gives any substantial advantages
17:09 abraxxa 411 -> 344 secs is nice though
17:10 abraxxa 16,3% faster
17:10 timotimo if you like the speed, why not try 1) measuring the exact memory usage with /usr/bin/time and 2) running moarvm with that many jobs :)
17:13 abraxxa i wanted to wait until a rakudo-star release with moarvm is available
17:13 timotimo i suppose that's prudent
17:14 abraxxa TEST_JOBS=8 Files=777, Tests=30268, 339 wallclock secs ( 7.96 usr  1.18 sys + 2301.31 cusr 159.43 csys = 2469.88 CPU)
17:16 abraxxa i wonder why $input == any(1..50) fails
17:17 timotimo r: print any(1..50);
17:17 camelia rakudo-parrot 535d91, rakudo-jvm 535d91, rakudo-moar 535d91: OUTPUT«any(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50)»
17:17 abraxxa it returns an any object of True/False values where the 39th is True, all others False
17:18 timotimo right, that should boolify to True
17:19 abraxxa say 'true' if "39" == any(1..38)
17:19 abraxxa returns Nil
17:19 abraxxa say 'true' if "39" == any(1..39)
17:19 abraxxa returns true
17:19 abraxxa so that works
17:19 timotimo mhh
17:19 abraxxa so it's just the precedents problem that seems to have changed/fixed in the last year or so
17:21 abraxxa updated the gist, works now
17:21 abraxxa FROGGS: thanks
17:22 abraxxa TEST_JOBS=6
17:22 abraxxa Files=777, Tests=30268, 352 wallclock secs ( 6.97 usr  0.96 sys + 1898.13 cusr 139.15 csys = 2045.21 CPU)
17:22 abraxxa 4C/8T sandy bridge cpu
17:23 abraxxa time's output: 1910.14user 142.04system 5:58.89elapsed 571%CPU (0avgtext+0avgdata 772116maxresident)k
17:23 abraxxa 0inputs+10360outputs (0major+91996352minor)pagefaults 0swaps
17:23 timotimo oh, that's only like 120 megabytes of RAM per fork
17:23 timotimo that's not terribly
17:23 timotimo bad
17:23 abraxxa system monitored showed between 400 and 600megs
17:23 abraxxa left #perl6
17:23 abraxxa joined #perl6
17:24 ajr joined #perl6
17:24 timotimo it had seemed to me like rakudo-parrot will already spend about 200 megabytes of ram for just "say 1"
17:25 j00hn joined #perl6
17:27 abraxxa moarvm's readme on github says i can do --gen-moar but this isn't recognized by the rakudo-star 2014.01 release
17:27 timotimo oh? maybe that only goes for nqp?
17:27 timotimo try with --backends=parrot,moar --gen-nqp
17:28 abraxxa Unknown backend 'moar'; Supported backends are: jvm, parrot
17:28 timotimo ah, hm, okay
17:28 timotimo in that case, no moar for you
17:29 abraxxa i'll wait until it's included in rakudo-star
17:29 abraxxa thanks for the help
17:29 timotimo yeah, that's all right
17:39 krunen joined #perl6
17:42 rindolf joined #perl6
17:42 arnsholt joined #perl6
17:53 btyler joined #perl6
18:02 arnsholt joined #perl6
18:22 rylo_ joined #perl6
18:34 rindolf joined #perl6
18:36 sergot Could somebode tell me how to initialize private field in new method?
18:37 timotimo self!private_field = 123
18:37 timotimo should/could work
18:37 timotimo er, not really "self"
18:37 timotimo more like my $result = self.bless(....); $result!private_field = 123
18:37 sergot Is it better to use submethod BUILD to do that?
18:38 timotimo method new will not be called by any child methods "new" unless you explicitly do it that way
18:40 sergot r: class A { has $!t; method new($test) { my $RES = self.bless(); $RES!t = $test; } }; my $a = A.new;
18:40 camelia rakudo-parrot 535d91, rakudo-jvm 535d91, rakudo-moar 535d91: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/tmpfile�No such private method 't' for invocant of type 'A'�at /tmp/tmpfile:1�------> [32mw($test) { my $RES = self.bless(); $RES![33m�[31mt = $te…»
18:41 timotimo oh?
18:41 timotimo it might be spelled differently?
18:41 timotimo like $RES!$!t? that doesn't seem right
18:41 psch joined #perl6
18:42 psch hi #perl6
18:42 sergot hi psch o/
18:42 ajr joined #perl6
18:42 sergot r: class A { has $!t; method new($test) { my $RES = self.bless(); $RES!$!t = $test; } }; my $a = A.new;
18:43 camelia rakudo-parrot 535d91, rakudo-jvm 535d91, rakudo-moar 535d91: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/tmpfile�Cannot use this form of method call with a private method�at /tmp/tmpfile:1�------> [32mtest) { my $RES = self.bless(); $RES!$!t[33m�[31m …»
18:43 sergot timotimo: so, maybe BUILD is better? :)
18:43 timotimo in build you have direct access to the private attributes
18:45 sergot timotimo: that's what I need, I think.
18:46 psch sergot: what are you trying to do?
18:46 psch the log says "initialize private field in new", which works with the inherited .new()
18:46 psch m: class A { has $!foo; method getFoo { self!foo } }; A.new(:foo("test")).getFoo.say
18:46 camelia rakudo-moar 535d91: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/ts08DQQ44T�No such private method 'foo' for invocant of type 'A'�at /tmp/ts08DQQ44T:1�------> [32mass A { has $!foo; method getFoo { self![33m�[31mfoo } }; A.new(:foo("test")).getFoo.say…»
18:46 psch or does it
18:46 psch setting it works, but getting it didnt there :/
18:47 psch m: class A { has $!foo; method getFoo { $.foo } }; A.new(:foo("test")).getFoo.say # like this i think
18:47 camelia rakudo-moar 535d91: OUTPUT«No such method 'foo' for invocant of type 'A'␤  in method getFoo at /tmp/W_QOos412u:1␤  in block  at /tmp/W_QOos412u:1␤␤»
18:47 psch nope, nevermind
18:47 psch those twigils are definitely complicated :P
18:47 sergot In fact, I have two problems.
18:48 timotimo private attributes are not part of the public interface
18:48 timotimo that's why you can't set them via an autogenerated new method
18:48 sergot The first one is, that I want to run inherited new() method, to initialize some of inherited public fields.
18:49 beastd joined #perl6
18:49 sergot The second one is that I want to initialize a private field.
18:49 raiph timotimo: does/could rakudo tweast? https://www.lrde.epita.fr/dload/papers/demaille.09.sac.pdf
18:50 psch timotimo: right, .new takes any named parameter i just noticed
18:50 timotimo i'm not the right one to ask :P
18:51 timotimo psch: all methods do
18:51 psch oh okay
18:52 sergot Is submethod BUILD being inherited?
18:52 arnsholt joined #perl6
18:52 timotimo i think submethods never are
18:52 timotimo but BUILDALL calls all BUILD methods, no?
18:53 sergot r: class A { submethod BUILD(){ say 'HEY'; } }; class B is A {}; my $b = B.new;
18:53 camelia rakudo-parrot 535d91, rakudo-jvm 535d91, rakudo-moar 535d91: OUTPUT«HEY␤»
18:53 sergot Right, it is.
18:53 xinming_ joined #perl6
18:54 sergot So,it could be what I need to solve the first problem.
18:55 rindolf joined #perl6
18:57 panchiniak_ joined #perl6
18:57 psch sergot: S12 says "you must write your own BUILD in order to present private attributes as part of your initialization API", which i take to mean your solution is the intended one
18:58 sergot r: class A { has $.v; method new() { say 'OH HAI!'; $.v = 'test'; } }; class B is A {}; my $b = B.new; say $b.v;
18:58 camelia rakudo-jvm 535d91: OUTPUT«OH HAI!␤Cannot look up attributes in a type object␤  in method v at gen/jvm/CORE.setting:2771␤  in method new at /tmp/tmpfile:1␤  in block  at /tmp/tmpfile:1␤␤»
18:58 camelia ..rakudo-parrot 535d91: OUTPUT«OH HAI!␤Cannot look up attributes in a type object␤  in method v at gen/parrot/CORE.setting:2778␤  in method new at /tmp/tmpfile:1␤  in block  at /tmp/tmpfile:1␤␤»
18:58 camelia ..rakudo-moar 535d91: OUTPUT«OH HAI!␤Cannot look up attributes in a type object␤  in method v at src/gen/m-CORE.setting:2771␤  in method new at /tmp/tmpfile:1␤  in block  at /tmp/tmpfile:1␤␤»
18:58 sergot psch++ thanks, that's what I need :)
18:59 sergot r: class A { has $.v; method new() { say 'OH HAI!'; my $v = 'test' ;self.bless(:$v); } }; class B is A {}; my $b = B.new; say $b.v;
18:59 camelia rakudo-parrot 535d91, rakudo-jvm 535d91, rakudo-moar 535d91: OUTPUT«OH HAI!␤test␤»
18:59 dalek rakudo-star-daily: 99e67d4 | coke++ | log/ (5 files):
18:59 dalek rakudo-star-daily: today (automated commit)
18:59 dalek rakudo-star-daily: review: https://github.com/coke/rakudo-star-daily/commit/99e67d4e1e
19:00 sergot r: class A { has $.v; method new() { say 'OH HAI!'; my $v = 'test'; self.bless(:$v); } }; class B is A {}; my $b = B.new; say 'v: ' ~ $b.v;
19:00 camelia rakudo-parrot 535d91, rakudo-jvm 535d91, rakudo-moar 535d91: OUTPUT«OH HAI!␤v: test␤»
19:01 sergot thanks for help everyone. :)
19:02 jeffreykegler joined #perl6
19:03 arnsholt joined #perl6
19:04 sergot r: class A { has $.v; has $!p;  method new() { say 'OH HAI!'; my $v = 'test'; self.bless(:$v); }; submethod BUILD() { $!p = 'p'; } }; class B is A {}; my $b = B.new; say 'v: ' ~ $b.v;
19:04 camelia rakudo-parrot 535d91: OUTPUT«OH HAI!␤use of uninitialized value of type Any in string context  in block  at /tmp/tmpfile:1␤␤v: ␤»
19:04 camelia ..rakudo-jvm 535d91, rakudo-moar 535d91: OUTPUT«OH HAI!␤use of uninitialized value of type Any in string context␤v: ␤»
19:05 rindolf joined #perl6
19:05 sergot r: class A { has $.v; has $!p;  method new() { say 'OH HAI!'; my $v = 'test'; self.bless(:$v); }; }; class B is A {}; my $b = B.new; say 'v: ' ~ $b.v;
19:05 camelia rakudo-parrot 535d91, rakudo-jvm 535d91, rakudo-moar 535d91: OUTPUT«OH HAI!␤v: test␤»
19:07 sergot r: class A { has $.v; has $!p;  method new() { say 'OH HAI!'; my $v = 'test'; self.bless(:$v); }; submethod BUILD() {} }; class B is A {}; my $b = B.new; say 'v: ' ~ $b.v;
19:07 camelia rakudo-parrot 535d91: OUTPUT«OH HAI!␤use of uninitialized value of type Any in string context  in block  at /tmp/tmpfile:1␤␤v: ␤»
19:07 camelia ..rakudo-jvm 535d91, rakudo-moar 535d91: OUTPUT«OH HAI!␤use of uninitialized value of type Any in string context␤v: ␤»
19:07 sergot r: class A { submethod BUILD(){}; has $.v; has $!p;  method new() { say 'OH HAI!'; my $v = 'test'; self.bless(:$v); }; }; class B is A {}; my $b = B.new; say 'v: ' ~ $b.v;
19:07 camelia rakudo-parrot 535d91: OUTPUT«OH HAI!␤use of uninitialized value of type Any in string context  in block  at /tmp/tmpfile:1␤␤v: ␤»
19:07 camelia ..rakudo-jvm 535d91, rakudo-moar 535d91: OUTPUT«OH HAI!␤use of uninitialized value of type Any in string context␤v: ␤»
19:07 sergot Why does it now work with submethod BUILD?
19:08 sergot not*
19:08 psch B has only the default BUILD i think
19:08 psch because submethods aren't inherited
19:08 psch ...but then $.v is public and should be covered by that :/
19:09 psch maybe dropping a submethod inside the inheritance chain covers Mu.BUILD?
19:09 sergot Hmm
19:09 * timotimo is not completely competent WRT BUILD and new and BUILDALL :(
19:10 sergot :(
19:11 moritz when you define a BUILD, you have to take care of attribute initialization
19:11 moritz even of public attributes
19:12 sergot r: class A { submethod BUILD($.v){ $.v = 'test'; }; has $.v; has $!p;  method new() { say 'OH HAI!'; my $v = 'test'; self.bless(:$v); }; }; class B is A {}; my $b = B.new; say 'v: ' ~ $b.v;
19:12 camelia rakudo-parrot 535d91, rakudo-jvm 535d91, rakudo-moar 535d91: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/tmpfile�Virtual call $.v may not be used on partially constructed objects�at /tmp/tmpfile:1�------> [32mclass A { submethod BUILD($.v){ $.v[33m�[3…»
19:13 sergot r: class A { submethod BUILD(){ $.v = 'test'; }; has $.v; has $!p;  method new() { say 'OH HAI!'; my $v = 'test'; self.bless(:$v); }; }; class B is A {}; my $b = B.new; say 'v: ' ~ $b.v;
19:13 camelia rakudo-parrot 535d91, rakudo-jvm 535d91, rakudo-moar 535d91: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/tmpfile�Virtual call $.v may not be used on partially constructed objects�at /tmp/tmpfile:1�------> [32mclass A { submethod BUILD(){ $.v[33m�[31m …»
19:14 sergot moritz: could You tell me how?
19:15 sergot I this case I shouldn't do any initialization in new?
19:15 moritz 1) BUILd expects positional arguments
19:15 moritz 2) you can't assign to $.v, just to $!v
19:15 vendethiel I think there was a conference this weekend ? I saw a link posted but I lost it, does somebody have records ?
19:15 sergot r: class A { submethod BUILD(){ $!v = 'test2'; }; has $.v; has $!p;  method new() { say 'OH HAI!'; my $v = 'test'; self.bless(:$v); }; }; class B is A {}; my $b = B.new; say 'v: ' ~ $b.v;
19:16 camelia rakudo-parrot 535d91, rakudo-jvm 535d91, rakudo-moar 535d91: OUTPUT«OH HAI!␤v: test2␤»
19:16 sergot moritz++ thanks
19:16 moritz vendethiel: yes, FOSDEM
19:17 moritz and irc.perl6.org has all the links :-)
19:17 sergot moritz: If I use BUILD submethod I shouldn't initialize anything in new?
19:17 timotimo moritz: BUILD expects *positional* arguments?
19:18 psch S12 examples with BUILD(:$!foo, :$!bar) { } as a short-hand for BUILD(:$foo is copy, :$bar is copy) { $!foo := $foo; $!bar := $bar } - i suspect moritz++ braino'd
19:19 sergot r: class A { submethod BUILD(:$!v){ }; has $.v; has $!p;  method new() { say 'OH HAI!'; my $v = 'test'; self.bless(:$v); }; }; class B is A {}; my $b = B.new; say 'v: ' ~ $b.v;
19:19 camelia rakudo-parrot 535d91, rakudo-jvm 535d91, rakudo-moar 535d91: OUTPUT«OH HAI!␤v: test␤»
19:19 sergot psch++ moritz++ thanks :)
19:20 [Coke] OT: /me hurls https://www.kickstarter.com/projects/1488075951/ares-magazine for people who like scifi, games, and magazines. (I know the guy)
19:20 [Coke] (one of the guys, anyway)
19:22 colomon [Coke]: combining board game and SF magazine seems like an odd choices?
19:22 clsn Are @-variables supposed to hold Arrays, or Positionals?  Because it seems they'll only hold Arrays.
19:24 moritz they can hold non-Array Positionals just fine
19:24 Alina-malina joined #perl6
19:24 moritz m: my @a = (1, 2, 3); say @a.^name
19:24 camelia rakudo-moar 535d91: OUTPUT«Array␤»
19:24 moritz m: my @a := (1, 2, 3); say @a.^name
19:24 camelia rakudo-moar 535d91: OUTPUT«Parcel␤»
19:24 sergot r: class A { submethod BUILD(:$!v, :$!p){ $!p = 'a'; }; has $.v; has $!p;  method new() { say 'OH HAI!'; my $v = 'test'; self.bless(:$v); }; }; class B is A {}; my $b = B.new; say 'v: ' ~ $b.v;
19:24 camelia rakudo-parrot 535d91, rakudo-jvm 535d91, rakudo-moar 535d91: OUTPUT«OH HAI!␤v: test␤»
19:25 sergot r: class A { submethod BUILD(:$!v, :$!p){ $!p = 'a'; }; has $.v; has $!p;  method new() { say 'OH HAI!'; my $v = 'test'; self.bless(:$v); }; }; class B is A { method h() { say 'p: ' ~ $!p } }; my $b = B.new; say 'v: ' ~ $b.v;
19:25 camelia rakudo-parrot 535d91, rakudo-jvm 535d91, rakudo-moar 535d91: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/tmpfile�Attribute $!p not declared in class B�at /tmp/tmpfile:1�------> [32m is A { method h() { say 'p: ' ~ $!p } }[33m�[31m; my $b = B.new; say …»
19:26 sergot Can I inherit a private field?
19:27 timotimo only from roles, i think?
19:27 Alina-malina joined #perl6
19:27 Alina-malina joined #perl6
19:27 TimToady which is not inheriting, of course
19:27 timotimo fair enough
19:27 TimToady so basically no :)
19:28 timotimo TimToady: i seem to recall there was some way to access the private attributes of a variable that has "your own" type, but isn't `self`, right?
19:28 timotimo or was that only for private methods?
19:29 TimToady yes, as long as you're in the identical class
19:29 * moritz only knows the syntax for private methods
19:29 TimToady but you still have to name the exact class, $other!MyClassName::foo()
19:29 timotimo ah, that's methods, not attributes, though?
19:29 TimToady I think it works for attrs too
19:29 timotimo OK
19:30 TimToady thing is, all private method calls are really just sub calls in disguise
19:30 timotimo .o(that's also why they are pretty optimal)
19:30 TimToady but I think it generates the sub calls for attrs too
19:30 sergot r: class A { submethod BUILD(:$!v){ }; has $.v; method new() { say 'OH HAI!'; my $v = 'test'; self.bless(:$v); }; }; class B is A { method new() { }; }; my $b = B.new; say 'v: ' ~ $b.v;
19:30 timotimo hm, sub calls for attrs doesn't immediately seem optimal
19:30 camelia rakudo-parrot 535d91, rakudo-jvm 535d91, rakudo-moar 535d91: OUTPUT«No such method 'v' for invocant of type 'Any'␤  in block  at /tmp/tmpfile:1␤␤»
19:30 moritz timotimo: for attributes, where would the sigil go?
19:30 sergot r: class A { submethod BUILD(:$!v){ }; has $.v; method new() { say 'OH HAI!'; my $v = 'test'; self.bless(:$v); }; }; class B is A { method new() { callsame; }; }; my $b = B.new; say 'v: ' ~ $b.v;
19:30 timotimo i seem to recall we turn $!foo into getattr/setattr
19:30 camelia rakudo-parrot 535d91, rakudo-jvm 535d91, rakudo-moar 535d91: OUTPUT«OH HAI!␤v: test␤»
19:31 timotimo moritz: that's the question; probably after ::?
19:31 TimToady that's never right
19:31 TimToady only thing after :: allowed is ()
19:31 sergot r: class A { submethod BUILD(:$!v){ }; has $.v; method new() { say 'OH HAI!'; my $v = 'test'; self.bless(:$v); }; }; class B is A { has $.newfiled; method new() { callsame; }; }; my $b = B.new; say 'v: ' ~ $b.v;
19:31 TimToady for symbolic refs
19:31 camelia rakudo-parrot 535d91, rakudo-jvm 535d91, rakudo-moar 535d91: OUTPUT«OH HAI!␤v: test␤»
19:31 sergot How can I initializ $.newfiled ?
19:31 sergot initialize*
19:31 timotimo oh, hm
19:32 sergot $.newfiled*
19:32 sergot ahh... $.newfield
19:32 TimToady um, a new with a callsame is never gonna be the right thing
19:33 moritz sergot: with a submethod BUILD in B, for example
19:33 moritz or a default value
19:33 moritz also, if you don't do anything noteworthy in new, there's not point in having one anyway
19:34 rindolf joined #perl6
19:34 timotimo TimToady: will perl6 ever be the right thing? :P
19:34 * TimToady is a moderate
19:35 sergot moritz: I want to get all inherited fields (with inherited initialization) + initialize some not inherited. Which way is the best to do that?
19:36 rylinaux joined #perl6
19:37 clsn Ah.  class G does Positional { }; my @t:=G.new works (puts a G in @t).  Using = instead of := doesn't (it's an Array).  Has to do with how @ vars get assigned, OK.
19:37 rylinaux joined #perl6
19:37 moritz sergot: the easiest is still to put defaults directly on the attribute declaration
19:38 moritz has $.b; has $.c = $!a * 2; has $.d = 42;
19:39 TimToady r: class A { submethod BUILD(:$!v){ }; has $.v; method new() { say 'OH HAI!'; my $v = 'test'; self.bless(:$v); }; }; class B is A { has $.newfiled = 42 }; my $b = B.new; say 'v: ' ~ $b.v; say 'newfiled: ' ~ $b.newfiled;
19:39 camelia rakudo-parrot 535d91, rakudo-jvm 535d91, rakudo-moar 535d91: OUTPUT«OH HAI!␤v: test␤newfiled: 42␤»
19:40 TimToady r: class A { submethod BUILD(:$!v){ }; has $.v; method new() { say 'OH HAI!'; my $v = 'test'; self.bless(:$v); }; }; class B is A { has $.newfiled = 42 }; my $b = B.new(:newfiled(43)); say 'v: ' ~ $b.v; say 'newfiled: ' ~ $b.newfiled;
19:40 camelia rakudo-parrot 535d91, rakudo-jvm 535d91, rakudo-moar 535d91: OUTPUT«OH HAI!␤v: test␤newfiled: 42␤»
19:40 TimToady r: class A { submethod BUILD(:$!v){ }; has $.v; method new() { say 'OH HAI!'; my $v = 'test'; self.bless(:$v); }; }; class B is A { has $.newfiled }; my $b = B.new(:newfiled(43)); say 'v: ' ~ $b.v; say 'newfiled: ' ~ $b.newfiled;
19:40 camelia rakudo-jvm 535d91, rakudo-moar 535d91: OUTPUT«OH HAI!␤v: test␤use of uninitialized value of type Any in string context␤newfiled: ␤»
19:40 camelia ..rakudo-parrot 535d91: OUTPUT«OH HAI!␤v: test␤use of uninitialized value of type Any in string context  in block  at /tmp/tmpfile:1␤␤newfiled: ␤»
19:42 Alina-malina joined #perl6
19:43 sergot moritz: I can't do that. My new takes raw string, gets some values from there and then uses them to initialize public fields. But maybe... Can I achieve calling method like this: m(a => 2), in another way than *% in declaration?
19:43 TimToady r: class A { submethod BUILD(:$!v){ }; has $.v; method new() { say 'OH HAI!'; nextwith(:v<test>); }; }; class B is A { has $.newfiled }; my $b = B.new(:newfiled(43)); say 'v: ' ~ $b.v; say 'newfiled: ' ~ $b.newfiled;
19:43 camelia rakudo-jvm 535d91, rakudo-moar 535d91: OUTPUT«OH HAI!␤v: test␤use of uninitialized value of type Any in string context␤newfiled: ␤»
19:43 camelia ..rakudo-parrot 535d91: OUTPUT«OH HAI!␤v: test␤use of uninitialized value of type Any in string context  in block  at /tmp/tmpfile:1␤␤newfiled: ␤»
19:44 arnsholt joined #perl6
19:44 moritz sergot: I don't see wha tcalling methods with named arguments and *% declarations have to do with each other
19:45 [Coke] colomon: (odd choice) litle bit, yah.
19:45 moritz sergot: and keep in mind that non-trivial contructors are always going to make inheritance harder
19:45 raiph .tell masak "program transformation, optimization, instrumentation, etc [by] generating and rewriting ASTs ... can become tedious and hard to maintain ... . On the other hand, concrete syntax provides a natural and simpler representation of programs" (from https://www.lrde.epita.fr/dload/papers/demaille.09.sac.pdf); I assume similar issues apply to
19:45 raiph macros; was curious what your comments might be
19:46 yoleaux raiph: I'll pass your message to masak.
19:46 TimToady r: class A { submethod BUILD(:$!v){ }; has $.v; method new() { say 'OH HAI!'; nextwith(:v<test>); }; }; class B is A { has $.newfiled }; my $b = B.new(:v('do you see me?'),:newfiled(43)); say 'v: ' ~ $b.v; say 'newfiled: ' ~ $b.newfiled;
19:46 camelia rakudo-jvm 535d91, rakudo-moar 535d91: OUTPUT«OH HAI!␤v: test␤use of uninitialized value of type Any in string context␤newfiled: ␤»
19:46 camelia ..rakudo-parrot 535d91: OUTPUT«OH HAI!␤v: test␤use of uninitialized value of type Any in string context  in block  at /tmp/tmpfile:1␤␤newfiled: ␤»
19:46 TimToady I'd think nextwith to the default new should see those :v arguments
19:48 TimToady r: class A { submethod BUILD(:$!v){ }; has $.v; method new(*%_) { say 'OH HAI!'; nextwith(|%_)); }; }; class B is A { has $.newfiled }; my $b = B.new(:v('do you see me?'),:newfiled(43)); say 'v: ' ~ $b.v; say 'newfiled: ' ~ $b.newfiled;
19:48 camelia rakudo-parrot 535d91, rakudo-jvm 535d91, rakudo-moar 535d91: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/tmpfile�Unable to parse expression in block; couldn't find final '}' �at /tmp/tmpfile:1�------> [32m new(*%_) { say 'OH HAI!'; nextwith(|%_)[33m�[…»
19:48 TimToady r: class A { submethod BUILD(:$!v){ }; has $.v; method new(*%_) { say 'OH HAI!'; nextwith(|%_); }; }; class B is A { has $.newfiled }; my $b = B.new(:v('do you see me?'),:newfiled(43)); say 'v: ' ~ $b.v; say 'newfiled: ' ~ $b.newfiled;
19:48 camelia rakudo-parrot 535d91, rakudo-jvm 535d91, rakudo-moar 535d91: OUTPUT«OH HAI!␤v: do you see me?␤newfiled: 43␤»
19:48 sergot moritz: If I think correctly, unfortunately I can't use trivial new method.
19:49 kaare__ joined #perl6
19:49 havenwood joined #perl6
19:49 TimToady r: class A { submethod BUILD(:$!v){ }; has $.v; method new(*%_) { say 'OH HAI!'; nextwith(:v<test>, |%_); }; }; class B is A { has $.newfiled }; my $b = B.new(:v('do you see me?'),:newfiled(43)); say 'v: ' ~ $b.v; say 'newfiled: ' ~ $b.newfiled;
19:49 camelia rakudo-parrot 535d91, rakudo-jvm 535d91, rakudo-moar 535d91: OUTPUT«OH HAI!␤v: do you see me?␤newfiled: 43␤»
19:50 TimToady r: class A { submethod BUILD(:$!v){ }; has $.v; method new(*%_) { say 'OH HAI!'; nextwith(|%_, :v<test>); }; }; class B is A { has $.newfiled }; my $b = B.new(:v('do you see me?'),:newfiled(43)); say 'v: ' ~ $b.v; say 'newfiled: ' ~ $b.newfiled;
19:50 camelia rakudo-jvm 535d91: OUTPUT«OH HAI!␤v: test␤newfiled: 43␤»
19:50 camelia ..rakudo-moar 535d91: OUTPUT«OH HAI!␤v: do you see me?␤newfiled: 43␤»
19:50 camelia ..rakudo-parrot 535d91: OUTPUT«OH HAI!␤duplicate named argument in call␤  in method new at /tmp/tmpfile:1␤  in block  at /tmp/tmpfile:1␤␤»
19:50 TimToady ooh, differences!
19:50 psch what does niecza say?
19:50 timotimo what does the pugs say?
19:50 TimToady n: class A { submethod BUILD(:$!v){ }; has $.v; method new(*%_) { say 'OH HAI!'; nextwith(|%_, :v<test>); }; }; class B is A { has $.newfiled }; my $b = B.new(:v('do you see me?'),:newfiled(43)); say 'v: ' ~ $b.v; say 'newfiled: ' ~ $b.newfiled;
19:50 camelia niecza v24-109-g48a8de3: OUTPUT«OH HAI!␤v: test␤newfiled: 43␤»
19:51 TimToady niecza appears to agree with jvm
19:51 TimToady pugs: class A { submethod BUILD(:$!v){ }; has $.v; method new(*%_) { say 'OH HAI!'; nextwith(|%_, :v<test>); }; }; class B is A { has $.newfiled }; my $b = B.new(:v('do you see me?'),:newfiled(43)); say 'v: ' ~ $b.v; say 'newfiled: ' ~ $b.newfiled;
19:51 camelia pugs: OUTPUT«OH HAI!␤*** No such subroutine: "&nextwith"␤    at /tmp/7HvKSEUhE9 line 1, column 79-102␤»
19:51 TimToady that's what pugs says :)
19:51 timotimo :(
19:54 TimToady these days pugs is...venerable...
19:59 erkan joined #perl6
20:03 psch so that means that moar doesn't go via A.new and parrot does a mix of nextsame and nextwith, while jvm and niecza do it correctly?
20:05 timotimo the OpenPandora successor, the Pyra, could be a nice system to do MoarVM ARM development on
20:05 timotimo its two powerful cores run at up to 1.7 ghz and it'll probably have 2 gigabytes of ram
20:06 TimToady moar seems to be acting like I called nextsame instead of nextwith
20:06 rindolf joined #perl6
20:07 psch oh, right
20:10 colomon Has anyone tried Moar on Raspberry Pi?
20:10 sergot So, I'm not able to easily initialize a private field in a constructor using a named argument of new() [which name is not the same as the private field]. Am I right?
20:10 sergot e.g.:
20:11 sergot r: class A { has $!a; has $.b; method new($b){ self.bless(:$b) } }; my $a = A.new; # I want object to have $!a initialized here.
20:11 camelia rakudo-parrot 535d91, rakudo-jvm 535d91, rakudo-moar 535d91: OUTPUT«Not enough positional parameters passed; got 1 but expected 2␤  in method new at /tmp/tmpfile:1␤  in block  at /tmp/tmpfile:1␤␤»
20:11 sergot r: class A { has $!a; has $.b; method new($b){ self.bless(:$b) } }; my $a = A.new("a"); # I want object to have $!a initialized here.
20:11 camelia rakudo-parrot 535d91, rakudo-jvm 535d91, rakudo-moar 535d91: ( no output )
20:13 moritz colomon: moar compiled fine on the rpi last I tried, but NQP on moar doesn't
20:13 sergot r: class A { has $!a; has $.b; method new($b){ self.bless(:$b) } }; my $a = A.new("a"); # say $a.print_b; # I want object to have $!a initialized here. It should use $.b value to set $!a;
20:13 camelia rakudo-parrot 535d91, rakudo-jvm 535d91, rakudo-moar 535d91: ( no output )
20:13 psch m: class A { has $!a; has $.b; method getA { $!a }; submethod BUILD(:$!a, :$!b) { } }; A.new(:a("a"), :b("b")).getA.say;
20:13 camelia rakudo-moar 535d91: OUTPUT«a␤»
20:13 psch sergot: ^^
20:13 colomon moritz: think it's a bit thing or a little thing?
20:15 moritz colomon: iirc, moar simply doesn't support 32bit CPUs
20:15 sergot psch: I dont want to pass value of b as new argument.
20:15 colomon moritz: oh!
20:15 psch if you want to set $!a to the value of $.b do that in BUILD
20:15 sergot psch: of a
20:15 sergot *
20:15 sergot psch: I dont want to pass value of a as new argument.
20:15 moritz colomon: and the rpi has an arm11 CPU, which is 32bit
20:16 sergot r: class A { submethod BUILD(:$!a) {}; has $!a; has $.b; method new($b){ self.bless(:$b) } }; my $a = A.new("a");
20:16 camelia rakudo-parrot 535d91, rakudo-jvm 535d91, rakudo-moar 535d91: ( no output )
20:17 sergot r: class A { submethod BUILD(:$!b) { $!a = $!b }; has $!a; has $.b; method new($b){ self.bless(:$b) }; method print_a() { say $!a }; }; my $a = A.new("a"); $a.print_a;
20:17 camelia rakudo-parrot 535d91, rakudo-jvm 535d91, rakudo-moar 535d91: OUTPUT«a␤»
20:18 sergot It works...
20:18 psch this will break on inhertiance though i think
20:18 psch oh, no, nevermind, you're not declaring $!a in new
20:18 psch should be fine
20:19 sergot r: sub some_sub() { return "!"; }; class A { submethod BUILD(:$!b) { $!a = $!b ~ some_sub(); }; has $!a; has $.b; method new($b){ self.bless(:$b) }; method print_a() { say $!a }; }; my $a = A.new("a"); $a.print_a;
20:19 camelia rakudo-parrot 535d91, rakudo-jvm 535d91, rakudo-moar 535d91: OUTPUT«a!␤»
20:20 sergot r: sub some_sub($c) { return $c; }; class A { submethod BUILD(:$!b) { $!a = $!b ~ some_sub(); }; has $!a; has $.b; method new($b){ self.bless(:$b) }; method print_a() { say $!a }; }; my $a = A.new("a"); $a.print_a;
20:20 camelia rakudo-parrot 535d91, rakudo-jvm 535d91, rakudo-moar 535d91: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/tmpfileâ�¤Calling 'some_sub' requires argumentsâ�¤    Expected: :(Any $c)â�¤at /tmp/tmpfile:1â�¤------> [32mA { submethod BUILD(:$!b) { $!a = $!b ~ [33mâ��…»
20:20 sergot r: sub some_sub($c) { return $c; }; class A { submethod BUILD(:$!b) { $!a = $!b ~ some_sub($!b); }; has $!a; has $.b; method new($b){ self.bless(:$b) }; method print_a() { say $!a }; }; my $a = A.new("a"); $a.print_a;
20:20 camelia rakudo-parrot 535d91, rakudo-jvm 535d91, rakudo-moar 535d91: OUTPUT«aa␤»
20:21 sergot r: sub some_sub($c) { return $c; }; class A { submethod BUILD(:$!b) { isay $!b; w$!a = $!b ~ some_sub($!b); }; has $!a; has $.b; method new($b){ self.bless(:$b) }; method print_a() { say $!a }; }; my $a = A.new("a"); $a.print_a;
20:21 camelia rakudo-parrot 535d91, rakudo-jvm 535d91, rakudo-moar 535d91: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/tmpfile�Two terms in a row�at /tmp/tmpfile:1�------> [32m A { submethod BUILD(:$!b) { isay $!b; w[33m�[31m$!a = $!b ~ some_sub($!b); }; has $!a; h…»
20:21 sergot r: sub some_sub($c) { return $c; }; class A { submethod BUILD(:$!b) { say $!b; $!a = $!b ~ some_sub($!b); }; has $!a; has $.b; method new($b){ self.bless(:$b) }; method print_a() { say $!a }; }; my $a = A.new("a"); $a.print_a;
20:21 camelia rakudo-parrot 535d91, rakudo-jvm 535d91, rakudo-moar 535d91: OUTPUT«a␤aa␤»
20:21 sergot It doesnt work on my machine.
20:22 sergot r: sub some_sub($c) { return $c; }; class AAA { method new() { self.bless; } }; class A is AAA { submethod BUILD(:$!b) { say $!b; $!a = $!b ~ some_sub($!b); }; has $!a; has $.b; method new($b){ self.bless(:$b) }; method print_a() { say $!a }; }; my $a = A.new("a"); $a.print_a;
20:22 camelia rakudo-parrot 535d91, rakudo-jvm 535d91, rakudo-moar 535d91: OUTPUT«a␤aa␤»
20:23 sergot r: sub some_sub($c) { return $c; }; class AAA { has $.h; method new() { self.bless; } }; class A is AAA { submethod BUILD(:$!b) { say $!b; $!a = $!b ~ some_sub($!b); }; has $!a; has $.b; method new($b, $h){ self.bless(:$b, :$h) }; method print_a() { say $!a }; }; my $a = A.new("a", "h"); $a.print_a;
20:23 camelia rakudo-parrot 535d91, rakudo-jvm 535d91, rakudo-moar 535d91: OUTPUT«a␤aa␤»
20:25 timotimo raiph: having read a few bits of the TWEAST paper now, I think masak would agree that TWEAST is something we should be able to do with macros
20:26 sergot r: sub some_sub($c) { return $c; }; class AAA { has $.h; method new() { self.bless; } }; class A is AAA { submethod BUILD(:$!b) { say $!b; $!a = $!b ~ some_sub($!b); }; has $!a; has $.b; method new($b, *$h){ self.bless(:$b, :$h) }; method print_a() { say $!a }; }; my $a = A.new("a"); $a.print_a;
20:26 camelia rakudo-parrot 535d91, rakudo-jvm 535d91, rakudo-moar 535d91: OUTPUT«Not enough positional parameters passed; got 2 but expected 3␤  in method new at /tmp/tmpfile:1␤  in block  at /tmp/tmpfile:1␤␤»
20:32 xenoterracide joined #perl6
20:32 arnsholt joined #perl6
20:36 vendethiel sergot: why do you need to bless(:$b) ?
20:37 vendethiel even before, what does `method new { self.bless }` does differently ?
20:37 moritz swallow named arguments
20:38 vendethiel so that you can just `A.new();` without passing arguments ?
20:38 moritz you could do that before
20:38 moritz now you can say A.new(:thing) and :thing gets swallowed
20:39 moritz so, probably not what's desired
20:40 arnsholt joined #perl6
20:43 kivutar joined #perl6
20:45 masak p: class C { has $.x = die "forgot to pass argument to constructor" }; C.new
20:45 yoleaux 19:46Z <raiph> masak: "program transformation, optimization, instrumentation, etc [by] generating and rewriting ASTs ... can become tedious and hard to maintain ... . On the other hand, concrete syntax provides a natural and simpler representation of programs" (from https://www.lrde.epita.fr/dload/papers/demaille.09.sac.pdf); I assume similar issues apply to
20:45 camelia rakudo-parrot 535d91: OUTPUT«forgot to pass argument to constructor␤  in method  at /tmp/12PyNFGfnP:1␤  in block  at gen/parrot/CORE.setting:894␤  in method BUILDALL at gen/parrot/CORE.setting:849␤  in method bless at gen/parrot/CORE.setting:838␤  in method new at gen/parr…»
20:46 TimToady masak: did you see my nextwith vs nextsame bug above?
20:46 masak sorry, not backlogged yet.
20:46 masak will have a look later, or tomorrow.
20:47 vendethiel p: class C { has $.x; }; my C $c .= new(:x<slt>); $c.x.say;
20:47 camelia rakudo-parrot 535d91: OUTPUT«slt␤»
20:47 vendethiel oh.
20:47 vendethiel the autogenerated method accepts positional parameters by default
20:47 masak aye.
20:48 sergot Do I have to bless both private and public attributes?
20:49 berekuk joined #perl6
20:50 * colomon thought the autogenerated new accepted named parameters by default.
20:50 sergot vendethiel: I think that I have to bless to pass those as arguments of BUILD.
20:50 TimToady well, somebody has to bless, doesn't have to be you
20:51 TimToady my nextwith was calling the default new, which can bless, and bless will automatically run all the BUILDs for the actual type of the invocant, not the level of the new containing bless
20:51 TimToady otherwise default new couldn't work
20:52 sergot :D
20:53 smls joined #perl6
20:54 sergot TimToady: is using {call,next}{same,with} a good practice?
20:55 TimToady it's a power tool :)
20:55 smls for $*IN.lines() -> $line { say $lines }
20:56 smls ^^ should that work?
20:56 TimToady no
20:56 sergot You wrote using callsame is always a wrong way iirc.
20:56 vendethiel :p subset Quacking of Mu where *.^can('quack');
20:56 TimToady using it like that is useless, was my point, it just delegates back to the default new
20:56 vendethiel p: subset Quacking of Mu where *.^can('quack');
20:56 camelia rakudo-parrot 535d91: ( no output )
20:56 TimToady std: for $*IN.lines() -> $line { say $lines }
20:57 camelia std 09dda5b: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Variable $lines is not predeclared at /tmp/SFzj0N1Zp3 line 1:â�¤------> [32mfor $*IN.lines() -> $line { say [33mâ��[31m$lines }[0mâ�¤Potential difficulties:â�¤  $line is declared but not used at /tmp/SFzj0N1Zp3 line 1:â�¤-----…»
20:57 arnsholt joined #perl6
20:57 sergot Ok, now I understand. :)
20:57 vendethiel p: subset Quacking of Mu where *.^can('quack'); sub quack(Quacking $p) { say 'a'; }; quack(5);
20:57 camelia rakudo-parrot 535d91: OUTPUT«Constraint type check failed for parameter '$p'␤  in sub quack at /tmp/QYw8g8pjEJ:1␤  in block  at /tmp/QYw8g8pjEJ:1␤␤»
20:57 vendethiel p: subset Quacking of Mu where *.^can('quack'); sub quack(Quacking $p) { $p.quack(); }; class Duck { method quack { say 'quack!'; } }; quack(Duck.new);
20:57 camelia rakudo-parrot 535d91: OUTPUT«quack!␤»
20:57 vendethiel yay for structural typing
20:58 vendethiel p: subset Quacking of Mu where *.^can('quack'); sub quack(Quacking $p) { $p.quack(); }; sub blackbox {quack(5); }
20:58 camelia rakudo-parrot 535d91: ( no output )
20:58 vendethiel static checking can take care of that, probably
20:59 smls TimToady: right, I meant   « for $*IN.lines -> $line { say $line } »
20:59 smls that just hangs for me (Rakudo Star 2014.01)
20:59 TimToady well it won't work without parens
21:00 TimToady which you had before
21:00 TimToady std: for $*IN.lines -> $line { say $line }
21:00 camelia std 09dda5b: OUTPUT«ok 00:01 127m␤»
21:00 smls doesn't seem to make a difference
21:00 smls neither works for me
21:00 TimToady oh wait, I'm wrong
21:00 TimToady it's just bare lines() that needs 'em
21:00 TimToady method is fine
21:00 TimToady r: for $*IN.lines -> $line { say $line }
21:00 camelia rakudo-jvm 535d91: ( no output )
21:00 camelia ..rakudo-parrot 535d91: OUTPUT«There were three men came out of the West␤Their fortunes for to try␤And these three men made a solemn vow␤John Barleycorn must die␤␤They've ploughed, they've sewn, they've harrowed him in␤Threw clouds upon his head␤And these three men made …»
21:00 camelia ..rakudo-moar 535d91: OUTPUT«(signal SEGV)»
21:02 TimToady works here; is it just waiting for you to type something on stdin?
21:02 smls oh right, it works if I use a pipe to feed it input
21:02 smls put not if input comes interactively from the terminal
21:02 smls *but
21:02 smls yes, just waiting
21:02 TimToady works for me with latest star
21:03 TimToady you probably need a ^D before you see anything
21:03 smls ah ok
21:03 TimToady (shouldn't need it, if lines were sufficiently lazy)
21:03 sergot r: sub some_sub($c) { return $c; }; class AAA { method new() { self.bless; } }; class A is AAA { submethod BUILD(:$!b) { say $!b; $!a = $!b ~ some_sub($!b); }; has $!a; has $.b; method new($b){ self.bless() }; method print_a() { say $!a }; }; my $a = A.new("a"); $a.print_a;
21:03 TimToady so probably a buglet
21:03 camelia rakudo-jvm 535d91, rakudo-moar 535d91: OUTPUT«(Any)␤use of uninitialized value of type Any in string context␤use of uninitialized value of type Any in string context␤␤»
21:03 camelia ..rakudo-parrot 535d91: OUTPUT«(Any)␤use of uninitialized value of type Any in string context  in submethod BUILD at /tmp/tmpfile:1␤␤use of uninitialized value of type Any in string context  in submethod BUILD at /tmp/tmpfile:1␤␤␤»
21:04 smls ok
21:04 sergot \o/ I've just found what I was doing wrong. :)
21:06 * masak backlogs
21:10 berekuk joined #perl6
21:13 smls Is there a way to read from STDIN incrementally (i.e. without waiting for EOF), that works right now?
21:14 TimToady $*IN.get maybe
21:15 masak TimToady: ok, now I'm backlogging. I see a lot of trying stuff out, but any bug is lost in the noise.
21:15 Rotwang joined #perl6
21:15 masak TimToady: do you think you could rebase the bug on the present? ;)
21:16 masak raiph: I will read the paper more carefully... but at first blush, "concrete syntax" sounds exactly like what we're doing with quasiquoting to me. let me know if I'm missing something.
21:17 TimToady r: class A { submethod BUILD(:$!v){ }; has $.v; method new(*%_) { say 'OH HAI!'; nextwith(|%_, :v<test>); }; }; class B is A { has $.newfiled }; my $b = B.new(:v('do you see me?'),:newfiled(43)); say 'v: ' ~ $b.v; say 'newfiled: ' ~ $b.newfiled;
21:17 camelia rakudo-jvm 535d91: OUTPUT«OH HAI!␤v: test␤newfiled: 43␤»
21:17 camelia ..rakudo-moar 535d91: OUTPUT«OH HAI!␤v: do you see me?␤newfiled: 43␤»
21:17 camelia ..rakudo-parrot 535d91: OUTPUT«OH HAI!␤duplicate named argument in call␤  in method new at /tmp/tmpfile:1␤  in block  at /tmp/tmpfile:1␤␤»
21:17 TimToady that one
21:17 * masak peers at it
21:18 masak ah.
21:18 masak yes.
21:18 masak something is definitely up with that one. :)
21:18 * masak submits rakudobug
21:19 smls ok, this works:  « while $*IN.get -> $line { say $line } »
21:20 TimToady as long as your line isn't '0'
21:20 timotimo hehe.
21:20 masak r: class A { submethod BUILD(:$!v){ }; has $.v; method new(*%_) { nextwith(|%_, :v<bar>); }; }; class B is A {}; my $b = B.new(:v('foo')); say $b.v
21:20 camelia rakudo-jvm 535d91: OUTPUT«bar␤»
21:20 camelia ..rakudo-parrot 535d91: OUTPUT«duplicate named argument in call␤  in method new at /tmp/tmpfile:1␤  in block  at /tmp/tmpfile:1␤␤»
21:20 camelia ..rakudo-moar 535d91: OUTPUT«foo␤»
21:20 rindolf joined #perl6
21:20 masak slightly minimaler.
21:20 timotimo hooray
21:21 diakopter wat :)
21:21 arnsholt joined #perl6
21:21 timotimo there's no DWIM to this WAT! :(
21:21 masak yeah, 'wat' about sums it up ;)
21:21 diakopter wattf
21:21 masak timotimo: there's no law says that every WAT has to have a DWIM :P
21:22 timotimo right
21:22 timotimo but it's not right!
21:22 masak bet it's just entropy at work, as usual.
21:22 masak the world ends up with an increasing number of WATs, over time.
21:22 TimToady and I don't buy that every WAT is equal and opposite; sometimes you can hide them where they do little harm
21:23 TimToady which is why I reduced you to "corresponding" :)
21:23 masak I... agree, but only in a subtle and reluctant way.
21:23 masak need to ponder that last bit.
21:23 diakopter I agree in a wat kind of way
21:23 smls TimToady: What would be the P6 translation of  « while (defined(my $x = ...)) { ... } »  ?
21:24 TimToady well, you can drop the parens :)
21:24 TimToady there's a subtle semantic difference in that that my will scope outside in P6
21:25 masak anyway, in the above WAT, I think Parrot is obviously wrong, so let's drop that one out of the contest.
21:25 masak between the other two, JVM makes the most sense to me.
21:25 TimToady r: while defined my $x = $*IN.get { }; say $x
21:25 masak anyone agree/disagree?
21:25 camelia rakudo-moar 535d91: OUTPUT«(signal SEGV)»
21:25 camelia ..rakudo-parrot 535d91, rakudo-jvm 535d91: OUTPUT«(Str)␤»
21:25 TimToady r: while defined my $x = $*IN.get { last if Bool.roll }; say $x
21:25 camelia rakudo-parrot 535d91: OUTPUT«And these three men made a solemn vow␤»
21:25 camelia ..rakudo-moar 535d91: OUTPUT«(signal SEGV)»
21:25 camelia ..rakudo-jvm 535d91: OUTPUT«(Str)␤»
21:25 TimToady ,,
21:25 diakopter m: $*IN.get
21:25 camelia rakudo-moar 535d91: OUTPUT«(signal SEGV)»
21:26 TimToady r: while defined my $x = $*IN.get { last if Bool.roll }; say $x
21:26 camelia rakudo-moar 535d91: OUTPUT«(signal SEGV)»
21:26 camelia ..rakudo-jvm 535d91: OUTPUT«(Str)␤»
21:26 camelia ..rakudo-parrot 535d91: OUTPUT«There were three men came out of the West␤»
21:26 diakopter r: say defined $*IN
21:26 camelia rakudo-parrot 535d91, rakudo-jvm 535d91, rakudo-moar 535d91: OUTPUT«True␤»
21:26 smls ok
21:26 TimToady r: while defined my $x = $*IN.get { last if Bool.roll }; say $x
21:26 camelia rakudo-parrot 535d91: OUTPUT«Their fortunes for to try␤»
21:26 camelia ..rakudo-moar 535d91: OUTPUT«(signal SEGV)»
21:26 camelia ..rakudo-jvm 535d91: OUTPUT«(Str)␤»
21:26 diakopter r: say +$*IN
21:26 camelia rakudo-jvm 535d91: OUTPUT«Cannot call 'Numeric'; none of these signatures match:␤:(Mu:U \v: *%_)␤  in any  at gen/jvm/BOOTSTRAP.nqp:1212␤  in any  at gen/jvm/BOOTSTRAP.nqp:1202␤  in method Numeric at gen/jvm/CORE.setting:1008␤  in sub prefix:<+> at gen/jvm/CORE.setting:384…»
21:26 camelia ..rakudo-moar 535d91: OUTPUT«Cannot call 'Numeric'; none of these signatures match:␤:(Mu:U \v: *%_)␤  in method Numeric at src/gen/m-CORE.setting:1008␤  in sub prefix:<+> at src/gen/m-CORE.setting:3849␤  in sub prefix:<+> at src/gen/m-CORE.setting:3848␤  in block  at /tmp/tm…»
21:26 camelia ..rakudo-parrot 535d91: OUTPUT«Cannot call 'Numeric'; none of these signatures match:␤:(Mu:U \v: *%_)␤  in any  at gen/parrot/BOOTSTRAP.nqp:1219␤  in any  at gen/parrot/BOOTSTRAP.nqp:1210␤  in method Numeric at gen/parrot/CORE.setting:1011␤  in sub prefix:<+> at gen/parrot/C…»
21:26 TimToady jvm seems to be consistently wrong
21:27 berekuk joined #perl6
21:27 TimToady moar seems to be differently consistenly wrong
21:27 masak ;)
21:27 masak turns out having different backends is almost as informative as having different implementations :)
21:28 diakopter or misinformative
21:28 diakopter .oO( it's hard to pick up all your marbles and run home if you've lost them all... )
21:30 arnsholt joined #perl6
21:33 TimToady it also helps greatly to have consolidated the almost identical ones, but for the filename
21:34 TimToady j: while defined my $x = $*IN.get { say $x; last if Bool.roll }; say $x
21:34 camelia rakudo-jvm 535d91: OUTPUT«(Str)␤»
21:34 TimToady ooh, never enters the loop
21:35 masak so (Str) is the undef from the first .get call
21:36 TimToady j: while my $x = $*IN.get { say $x; last if Bool.roll }; say $x
21:36 camelia rakudo-jvm 535d91: OUTPUT«(Str)␤»
21:36 TimToady not the defined
21:38 TimToady it's like the = is returning the value before rather than the value after, like a postincr
21:39 TimToady so definitely a bug
21:40 skids joined #perl6
21:41 TimToady r: $_ = 'before'; say $_ = 'after';
21:41 camelia rakudo-parrot 535d91, rakudo-jvm 535d91, rakudo-moar 535d91: OUTPUT«after␤»
21:42 TimToady r: say (my $x = 'before) = 'after';
21:42 camelia rakudo-parrot 535d91, rakudo-jvm 535d91, rakudo-moar 535d91: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/tmpfile�Unable to parse expression in single quotes; couldn't find final "'" �at /tmp/tmpfile:1�------> [32msay (my $x = 'before) = 'after';[33m�[…»
21:43 TimToady r: say (my $x = 'before') = 'after';
21:43 camelia rakudo-parrot 535d91, rakudo-jvm 535d91, rakudo-moar 535d91: OUTPUT«after␤»
21:43 TimToady I guess it's just the pseudo-assignment that is misbehaving
21:43 TimToady r: say my $x = 'after';
21:44 camelia rakudo-parrot 535d91, rakudo-jvm 535d91, rakudo-moar 535d91: OUTPUT«after␤»
21:44 TimToady and not there, huh
21:44 berekuk joined #perl6
21:46 TimToady r: say my $x = $*IN.get;
21:46 camelia rakudo-moar 535d91: OUTPUT«(signal SEGV)»
21:46 camelia ..rakudo-jvm 535d91: OUTPUT«(Str)␤»
21:46 camelia ..rakudo-parrot 535d91: OUTPUT«There were three men came out of the West␤»
21:47 TimToady odd
21:48 * masak submits rakudobug for $*IN.get
21:48 masak r: say $*IN.get
21:48 camelia rakudo-moar 535d91: OUTPUT«(signal SEGV)»
21:48 camelia ..rakudo-jvm 535d91: OUTPUT«(Str)␤»
21:48 camelia ..rakudo-parrot 535d91: OUTPUT«There were three men came out of the West␤»
21:48 TimToady oh hey
21:48 TimToady masak++
21:49 masak entia non sunt blablabla ;)
21:50 diakopter I did that.. but m: instead of r: :D
21:50 TimToady masak: did you hear something?  ;)
21:51 TimToady diakopter: but nobody expects moar to work yet... :P
21:51 perigrin moar work to be done
21:52 TimToady done work needs to be moar :)
21:52 diakopter moar moar moar to moar moar
21:52 perigrin One does not mearly do work to moar (dor).
21:53 diakopter moor mourns moar mowers
21:54 perigrin "At length they discover'd the bonnie moar-vm"
21:55 perigrin I rede you, beware at the debugging, youg men
21:55 TimToady mmm oar oar oar!
21:55 * perigrin is a little late for burns night.
21:56 diakopter TimToady: I think you burst a seal
21:57 diakopter it was probably a mo ring
21:58 TimToady you've lost yer moaring, arr!
21:58 diakopter now the boat will ... roam...
22:00 lue the boat is no longer moared.
22:01 masak the moat is no longer boared.
22:02 arnsholt joined #perl6
22:03 BenGoldberg joined #perl6
22:12 arnsholt joined #perl6
22:22 araujo joined #perl6
22:23 jeffreykegler joined #perl6
22:23 arnsholt joined #perl6
22:30 masak 'night, #perl6
22:31 TimToady o/
22:44 virtualsue joined #perl6
22:46 arnsholt joined #perl6
22:50 dalek perl6-roast-data: bc515e3 | coke++ | / (6 files):
22:50 dalek perl6-roast-data: today (automated commit)
22:50 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/bc515e376e
22:56 fridim_ joined #perl6
23:01 raiph joined #perl6
23:08 jnthn evening, #perl6
23:09 colomon joined #perl6
23:09 [Coke] jnthn++o/
23:10 woolfy joined #perl6
23:11 jnthn Belgium. They do beer right. :)
23:12 jnthn .oO( If it kvaks like a duck... )
23:13 timotimo hey jnthn!
23:13 timotimo how was fosdem? :)
23:13 jnthn Saw some folks were after my FOSDEM slides. Here they are: http://jnthn.net/papers/2014-fosdem-perl6-today.pdf
23:13 timotimo is there going to be a perl6 development sprint nearby?
23:13 timotimo yay!
23:14 jnthn timotimo: Well, lizmat++ and I will hack tomorrow. After that I gotta go to Stockholm and teach for a couple of days. Then I'll be back and able to dig into Perl 6 hacking again :)
23:14 timotimo okay
23:14 timotimo i've gotten a reasonable amount of $dayjob work done today, although i spent almost the entire day procrastinating
23:14 timotimo javascript can be pretty ... weird
23:16 jnthn Some of my most productive days are ones where I procrastinate a bunch, then end up solving the tiny interesting problem inside of a big one I started with. :)
23:17 woolfy jnthn++ for his slides.  I am too tired after 3 days of Fosdem to look at all of them, so I just went through them very fast.  excellent stuff.  Thanks for doing this.  Highest praise from many attendees!
23:19 jnthn Yes, it was nice to talk to some folks today who came to say hi and ask a few follow-up questions after the talk :)
23:22 arnsholt joined #perl6
23:22 timotimo jnthn: the observation action method would have been a pretty good candidate for coercing to Rat, IMO
23:23 jnthn timotimo: No, Rat is when you know the value exactly. These are measurements, with error.
23:24 jnthn There's no point in paying the price of rationals over floating point when you're dealing with data that already has an error.
23:25 timotimo oh, that does indeed make sense
23:28 dalek rakudo/nom: ada4cdd | jonathan++ | src/perl6-debug.nqp:
23:28 dalek rakudo/nom: Fix REPL/debugger interaction.
23:28 dalek rakudo/nom:
23:28 dalek rakudo/nom: When you wrote one line in the debugger REPL, than a second that used
23:28 dalek rakudo/nom: something in the first, things got messed up. This fixes it.
23:28 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/ada4cdd2cc
23:29 dalek rakudo/nom: 4a74e76 | jonathan++ | src/vm/jvm/core/Promise.pm:
23:29 dalek rakudo/nom: Promise.keep should not scalarize its result.
23:29 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/4a74e76717
23:30 [Coke] jnthn: i cannot remember  the last time i beered.
23:31 logie_ joined #perl6
23:31 timotimo jnthn: i found the quality of the slides to be as impressively good as pretty much all your slides i've seen so far :)
23:37 jnthn [Coke]: oh noes!!
23:38 jnthn [Coke]: Belgium is a pretty great place to beer.
23:38 jnthn We went to a restaurant tonight and there was no beer on the menu and I'm thinking "wtf"...
23:38 jnthn So I ask, and they bring...a beer menu!!
23:38 skids lol.
23:39 timotimo :D
23:39 jnthn Best thing: Rochefort 10 costs about a third as much at a bar here as it does in Sweden. :)
23:39 timotimo .o( isn't that actually a kind of cheese? )
23:40 btyler joined #perl6
23:42 jnthn timotimo: http://www.ratebeer.com/beer/rochefort-trappistes-10/2360/
23:43 timotimo fair enough :)
23:43 rurban1 joined #perl6

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

Perl 6 | Reference Documentation | Rakudo