Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2015-09-11

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:00 ShimmerFairy japhb: IIRC they're sitting in specs/ . I think discussion on that simply died down
00:04 japhb OK, gotcha.
00:11 psch m: my $x = :{1 => 4}; say $x.perl
00:11 camelia rakudo-moar c6a50f: OUTPUT«:{1 => 4}␤»
00:12 xinming joined #perl6
00:12 psch ShimmerFairy: i'm similarly suprised
00:13 psch 949d82cd4850e5f4d2f0911d136312d3650272b6 is "make :{} mean object hash"
00:13 psch ...except it doesn't
00:13 psch ...except it doesn't, if there's no % sigil
00:13 psch s:2nd/doesn't/does/
00:14 n0tjack joined #perl6
00:18 psch m: my %h = :{1 => 4}; %h{2} => 5; say %h.perl
00:18 camelia rakudo-moar c6a50f: OUTPUT«{"1" => 4}␤»
00:18 psch m: my %h = :{1 => 4}; %h{2} = 5; say %h.perl
00:18 camelia rakudo-moar c6a50f: OUTPUT«{"1" => 4, "2" => 5}␤»
00:20 skids m: my %h := :{1 => 4}; %h{2} = 5; say %h.perl
00:20 camelia rakudo-moar c6a50f: OUTPUT«:{1 => 4, 2 => 5}␤»
00:21 skids The default hash is not an object hash.
00:21 laouji joined #perl6
00:21 ShimmerFairy which seems like a bug to me
00:23 skids No it's by design.
00:23 psch m: my %h{Any} = 1 => 2; say %h.perl
00:23 camelia rakudo-moar c6a50f: OUTPUT«(my Any %{Any} = 1 => 2)␤»
00:24 psch ehh, there was some non-binding things iirc
00:24 psch i might be mistaken, i've been awake a bit :)
00:24 skids That... may be a bug.  I thought I remembered that working.
00:24 psch s/things/syntax/
00:25 psch m: my %h := :{1 => 4}; %h{2} = 5; say %h.perl
00:25 camelia rakudo-moar c6a50f: OUTPUT«:{1 => 4, 2 => 5}␤»
00:25 ShimmerFairy skids: as far as I'm concerned, it's a design bug if the methods I tried don't produce an object hash like I expect.
00:25 psch imo assigning an :{} should turn it into a Hash where the key can be Any
00:25 psch and i'm pretty sure that's intended with the commit i mentioned above
00:26 psch i mean, otherwise the syntax is nigh-useless
00:26 psch or rather, useless in the obvious way
00:26 psch (s/in/for/ maybe?)
00:27 psch star: my %h = :{ 1 => 2 }; say %h.perl
00:27 camelia star-m 2015.03: OUTPUT«("1" => 2).hash␤»
00:27 * psch shrugs
00:27 psch star: my %h{Any} = { 1 => 2 }; say %h.perl
00:27 camelia star-m 2015.03: OUTPUT«Hash[Any,Any].new("1" => 2)␤»
00:27 psch *that* is extra-weird
00:27 psch but eh :P
00:27 skids m: my @a = array[int].new(1,2,3); @a.perl.say; array[int].new(1,2,3).perl.say; # would you epect that to do similarly?
00:27 camelia rakudo-moar c6a50f: OUTPUT«[1, 2, 3]␤array[int].new(1, 2, 3)␤»
00:28 psch i actually would, i think
00:28 ShimmerFairy yes. If I'm assigning a Positional or Associative to a @ or % declaration, I'd expect the variable to adapt, not the assigned thing
00:29 psch skids: the thing i'm wondering is, if that's not how i'm supposed to achieve that, how *am* i supposed to achieve it?
00:29 skids But, type constraints are tied to the variable.
00:29 psch skids: mind, binding is a "only if you really know what you're doing" thing
00:30 psch (which isn't to say that binding correctly solves it, but i'm wondering how to declare the var, for % specifically)
00:30 skids Oh I would not say that about binding.  Only about sigilless variables :-).
00:30 skids Yeah I would have expected %h{Any} to have worked.
00:31 skids I mean Any,Any.  Oh that was why.
00:31 ShimmerFairy I would not think of a %h{Any} declaration as the way to get an object hash. That feels really wrong to me as the only way.
00:38 laouji joined #perl6
00:41 ShimmerFairy At least for hashes, I'd expect assigning an object hash in a declaration to be sufficient. And if not that, then at least  my %h; %h{1} = 2  should _definitely_ not stringify the key I gave :)
00:42 psch http://design.perl6.org/S03.html#Term_precedence
00:42 laouji joined #perl6
00:42 psch about 3/4th of a page (on my screen) down
00:43 psch "By default a hash forces all its keys to be strings. To compose a hash that allows arbitrary objects (such as numbers) as keys, add a colon on front:"
00:43 psch which means we have a bug
00:43 z448 joined #perl6
00:43 psch 'cause %h = :{1 => 2} should give an object hash
00:44 psch i'm not awake enough anymore to think about "what if the first key we use when assigning a value isn't a string?"
00:44 aborazmeh joined #perl6
00:44 aborazmeh joined #perl6
00:44 psch which is to say i'm not giving an opinion on "my %h; %h{1} = 2  should _definitely_ not stringify the key I gave"
00:45 ShimmerFairy If I didn't give a stringy key, the last thing I expect is for it to be treated like a stringy key :)
00:47 n0tjack joined #perl6
00:49 skids I think that part is a bug.  http://design.perl6.org/S02.html#Hash_subscripts_and_bare_keys
00:49 dalek rakudo-star-daily: 46e96c4 | coke++ | log/ (8 files):
00:49 dalek rakudo-star-daily: today (automated commit)
00:49 dalek rakudo-star-daily: review: https://github.com/coke/rakudo-star-daily/commit/46e96c4c24
00:50 skids Unless someone decided the default key type is "Str(Any)"
00:51 psch m: my %h = :{ 1, 2 }; say %h.perl
00:51 camelia rakudo-moar c6a50f: OUTPUT«Odd number of elements found where hash initializer expected␤  in block <unit> at /tmp/1qQPkP2oSB:1␤␤»
00:52 psch m: my %h = :{ Pair.new(:key(1), :value(2) }; say %h.perl
00:52 camelia rakudo-moar c6a50f: OUTPUT«5===SORRY!5=== Error while compiling /tmp/UQvjls8CSI␤Unable to parse expression in argument list; couldn't find final ')' ␤at /tmp/UQvjls8CSI:1␤------> 3my %h = :{ Pair.new(:key(1), :value(2) 7⏏5}; say %h.perl␤»
00:52 psch m: my %h = :{ Pair.new(:key(1), :value(2)) }; say %h.perl
00:52 camelia rakudo-moar c6a50f: OUTPUT«Odd number of elements found where hash initializer expected␤  in block <unit> at /tmp/BQuXNMZ3H6:1␤␤»
00:52 psch yeah uhhm
00:52 * psch slowly steps away from the keyboard
00:54 ShimmerFairy I think the base issue might possibly be that the default Associative type has such a specific constraint (Str), where no other sigil type has as specific a default :)
00:54 ShimmerFairy (And fwiw I'm not about to suggest not making Str keys the default, since I can predict a lot of things would break for that)
00:55 skids It's an expectation born of a host of predecessr languages.
00:55 ShimmerFairy good thing P6 has a habit of breaking expectations :P
00:58 skids I think that not having string keys by default would be a hard pill for a lot of casual PHP/shell coders to swallow.
00:58 skids (on top of the several other paradigm shifts)
01:00 ShimmerFairy skids: I think Str keys by default does a lot of good in most cases, it just makes wanting object keys harder. It certainly seems tricky on the surface.
01:01 ShimmerFairy "It" being the question of how to make it easier, that is :)
01:02 skids I don't have warm fuzzies for that new .perl syntax for %h{Any} yet, I don't understand why it's necessary.
01:04 ShimmerFairy skids: it's so that using :{} will produce the same kind of output for .perl (and if you didn't use :{}, it tells you about a neat new syntax you can use instead!)
01:05 skids (Isn't the only reason to use %h{Any} that you want type safety on things bound to %h s nobody binds a Hash[Str,Any] or whatnot to it?)
01:07 skids I mean, use it as opposed to %h := :{};
01:08 ShimmerFairy skids: if you ask for keys of type 'Any', then you can bind anything that ultimately is Any. What syntax you use (%h{Any} or :{}) shouldn't make a difference.
01:08 ShimmerFairy Hm, where did  $file.open(:w); $file.say()  go? I could swear that used to exist
01:11 skids ShimmerFairy: of course it matters.  One is a type constraint on a variable name, the other is a roperty of the object itself.
01:11 skids m: my %h := :{}; %h{1} = 2; %h.perl.say; my %b{Any} = :{}; %b{1} = 2; %b.perl.say; %h := { foo => "bar" }; %h.perl.say; %b := { foo => "bar" }
01:11 camelia rakudo-moar c6a50f: OUTPUT«:{1 => 2}␤(my Any %{Any} = 1 => 2)␤{:foo("bar")}␤Type check failed in binding; expected 'Associative[Any,Any]' but got 'Hash'␤  in block <unit> at /tmp/g_ttEHGn13:1␤␤»
01:12 ShimmerFairy o_o but... a Str hash should match an Associative[Any, Any] constraint, since Str ~~ Any
01:13 skids No, I don't think paramterized types recurse typechecks into parameters.
01:13 ShimmerFairy m: say Hash ~~ Associative[Any, Any]
01:13 camelia rakudo-moar c6a50f: OUTPUT«False␤»
01:14 ShimmerFairy o_o
01:14 psch m: my %h; %h{1} = 2; say %h.perl # this i'd also expect to type check fail, fwiw
01:14 camelia rakudo-moar c6a50f: OUTPUT«{"1" => 2}␤»
01:14 psch 'cause it's a literal Int...
01:14 psch vOv
01:14 psch Cool not withstanding
01:14 psch or maybe it does :/
01:14 skids psch: The last spec link I posted would seem to agree.
01:15 psch skids: yeah, i think that's what brought me there
01:15 psch anyay, i need some rest o/
01:16 Akagi201_ joined #perl6
01:19 n0tjack joined #perl6
01:38 n0tjack joined #perl6
01:49 ShimmerFairy $ perl6 -e 'say ?run("false")'
01:49 ShimmerFairy False
01:49 ShimmerFairy $ perl6 -e 'say ?run("false", :out)'
01:49 ShimmerFairy True
01:49 ShimmerFairy That's... not good.
01:51 kaare_ joined #perl6
01:52 n0tjack joined #perl6
01:54 ShimmerFairy a closer look says that the exitcode itself is getting set wrongly. Huh.
01:58 skids Ahah. http://design.perl6.org/S09.html#line_1182 (and it has been that way for a long while.)
02:00 * ShimmerFairy rakudobugs the exitcode thing
02:08 dayangkun joined #perl6
02:09 z448 joined #perl6
02:24 n0tjack joined #perl6
02:36 ShimmerFairy m: class Foo { has $.bar is rw }; my @a = Foo.new(bar => 1); say @a; @a.push(@a[*-1]); @a[*-1].bar = 42; say @a
02:36 camelia rakudo-moar c6a50f: OUTPUT«[Foo.new(bar => 1)]␤[Foo.new(bar => 42) Foo.new(bar => 42)]␤»
02:36 ShimmerFairy known bug?
02:37 ShimmerFairy m: my @a = 1; say @a; @a.push(@a[*-1]); @a[*-1] = 42; say @a  # for comparison
02:37 camelia rakudo-moar c6a50f: OUTPUT«[1]␤[1 42]␤»
02:37 ShimmerFairy m: class Foo { has $.bar is rw }; my @a = Foo.new(bar => 1); say @a; @a.push(@a[*-1].clone); @a[*-1].bar = 42; say @a    # workaround, fixed with adding .clone
02:37 camelia rakudo-moar c6a50f: OUTPUT«[Foo.new(bar => 1)]␤[Foo.new(bar => 1) Foo.new(bar => 42)]␤»
02:55 Juerd joined #perl6
02:56 zostay is there a doc somewhere that tells me how to translate my pre-glr stuff to glr? i've got bugs everywhere, mostly because flattening is different than before
02:56 yoleaux 1 Sep 2015 07:17Z <cdc> zostay: I think you can replace "Supply.on-demand(-> $a { ... })" construction with a supply block. https://gist.github.com/jnthn/a56fd4a22e7c43080078#supply-syntax-constructs.  I find this latter construction more readable.
02:56 yoleaux 10 Sep 2015 15:34Z <timotimo> zostay: paul evans on twitter was complaining that p6sgi is "as disappointing as the perl5 one" and lacks support for streaming of input data and response backpressure and "..."
02:57 n0tjack joined #perl6
02:57 zostay thx for the feedback timotimo and cdc :)
02:57 zostay lemme go dust off my twitter account
02:58 noganex joined #perl6
03:07 ugexe perl6 -e 'say ?run("false", :out).exitcode'
03:07 ugexe False
03:09 ugexe perl6 -e 'say run("false", :out).out.close.exitcode'
03:09 ugexe 1
03:10 ShimmerFairy just noting that ?(run().exitcode) will return False on a successful exitcode :)
03:11 ugexe you have to close .out first
03:12 ugexe not that that isnt a bug of course
03:14 ShimmerFairy ugexe: I still cry foul on Proc.exitcode being wrong once you've opened streams. The equivalent bash redirects don't screw with the exit code, and I wouldn't expect redirects to mess with it in the first place.
03:22 n0tjack joined #perl6
03:23 colomon doh.  what is cwd now?
03:24 ugexe $*CWD ?
03:25 colomon ugexe++
03:29 n0tjack joined #perl6
03:36 khw joined #perl6
04:02 n0tjack joined #perl6
04:09 dalek doc: a47ed84 | skids++ | lib/Language/subscripts.pod:
04:09 dalek doc: Explain convenience behaviors in associative subscripting section
04:09 dalek doc:
04:09 dalek doc: (could use some links, but too tired)
04:09 dalek doc:
04:09 dalek doc: Also, provide an example of off-end access of a native array.
04:09 dalek doc: review: https://github.com/perl6/doc/commit/a47ed849ca
04:16 aborazmeh joined #perl6
04:16 aborazmeh joined #perl6
04:25 rmgk_ joined #perl6
04:34 n0tjack joined #perl6
04:36 skids Hrm was hoping docs would update the HTML before I konked out.  Apologies for any markup errors, have to sleep.
04:44 laouji joined #perl6
04:49 zhanggong joined #perl6
04:49 X230-XXZX joined #perl6
04:56 zostay anyone want to go on a wild goose chase for me? https://gist.github.com/zostay/13a073e62520b1041ecb
04:56 aborazmeh joined #perl6
04:56 aborazmeh joined #perl6
05:01 awwaiid hahainternet, psch: Thanks again for the reference earlier. I ended up with https://github.com/awwaiid/pinpoint-code-color/blob/master/pinpoint-code-color (used 'shell', which works also but isn't mentioned in Proc)
05:06 n0tjack joined #perl6
05:12 ugexe http://doc.perl6.org/routine/shell
05:23 nightfrog joined #perl6
05:36 nightfrog joined #perl6
05:38 xfix joined #perl6
05:38 n0tjack joined #perl6
05:48 domidumont joined #perl6
05:51 domidumont joined #perl6
05:56 JimmyZ zostay: how about put 'dd $_' inside for $node.nodes {
06:10 n0tjack joined #perl6
06:16 [Tux] test             50000    40.466    40.386
06:16 [Tux] test-t           50000    39.359    39.278
06:17 [Tux] gooooood morning perl6!
06:17 [Tux] so it looks like GLR is now consistently faster than nom was just before the merge
06:22 mohij joined #perl6
06:28 abraxxa joined #perl6
06:31 grondilu I don't see improvement on rakudo compile time, though.
06:32 TimToady compiler doesn't use lists much
06:33 JimmyZ compiler is nqp ...
06:33 grondilu yeah good points
06:37 espadrine joined #perl6
06:37 masak good morning, #perl6
06:38 * masak will be busy with $teaching for the rest of the day, but just wanted to say hi
06:40 ShimmerFairy masak: $teaching.WHAT  :P
06:43 n0tjack joined #perl6
06:47 abraxxa joined #perl6
06:53 TimToady jnthn: on shaped list assignment, we should probably require the input to be strucured; flat input can always be reshaped based on the arrays's shape, or using nested .rotor calls
06:54 TimToady map should try to produce something of the same shape as the input, even if map returns some number of arguments that is not 1, I suspect
06:57 TimToady .keys should likely produce tuples that can be used as .[||tuple] to retrieve an individual leaf
06:57 TimToady (you can get the top-level keys with .[*]:k anyway, so we don't have to put that behavior into .keys)
07:00 TimToady rotate and reverse make some sense on slices, but probably not on the whole array, unless we want some APLish trick of treating a shaped array as flat when convenient
07:01 TimToady but offhand I think we probably want to something explicit to open up a flat view, either for reading or writing
07:01 TimToady *to require
07:03 TimToady by and large, my bias is to treat the shaped array as a complete object, rather than trying to pretend it's an array of arrays
07:03 TimToady hence a preference for iterators to visit leaves, not just the top level
07:04 TimToady the shape being a convenient barrier to say what should be considered the leaves
07:06 rurban joined #perl6
07:11 kjs_ joined #perl6
07:15 n0tjack joined #perl6
07:18 Ven joined #perl6
07:19 FROGGS joined #perl6
07:20 lizmat joined #perl6
07:21 timotimo TimToady: do you have a comment about "my %foo = :{ 1 => 1 }" giving you a non-object-hash? a justification for asking the user to use := instead of =
07:22 gfldex joined #perl6
07:23 FROGGS m: my Int %foo = :{ 1 => 1 }; say %foo.keys[0].WHAT # hmmm...
07:23 camelia rakudo-moar c6a50f: OUTPUT«Type check failed in binding key; expected 'Str' but got 'Int'␤  in block <unit> at /tmp/e7UF2oH5Ww:1␤␤»
07:24 TimToady I think we could issue a "Useless use of :{}" there
07:25 TimToady likewise even without the :
07:25 timotimo yes, we used to give a deprecation notice about "itemized hash assigned to hash variable"
07:27 zakharyas joined #perl6
07:27 TimToady that seems saner than making hashes an exception to one-arg or iteration
07:27 timotimo i think so, too
07:27 TimToady but nothing seems quite sane when I'm up this late...
07:28 darutoko joined #perl6
07:28 TimToady been hacking a version of rakudo that separates .cache from a (non-caching) .list, and almost have it working
07:29 TimToady we have a heck of a lot of places that call .list just to get a list currently, that accidentally also cache, so I think this is a good thing to clarify
07:30 TimToady still have a couple three bugs in the test suite, though, so probably can't finish tonight
07:30 timotimo are you going to push the WIP branch?
07:30 timotimo branches*
07:32 TimToady I suppose I could, if someone's interested in playing with it
07:36 timotimo i'm not guaranteeing it
07:38 dalek rakudo/list-v-cache: b410729 | TimToady++ | src/ (13 files):
07:38 dalek rakudo/list-v-cache: early hackage to distinguish .cache from .list
07:38 dalek rakudo/list-v-cache: review: https://github.com/rakudo/rakudo/commit/b410729b44
07:42 dalek rakudo/list-v-cache: 8911bc9 | jnthn++ | src/core/List.pm:
07:42 dalek rakudo/list-v-cache: No, .infinite did not survive the GLR.
07:42 dalek rakudo/list-v-cache: review: https://github.com/rakudo/rakudo/commit/8911bc9a3c
07:42 dalek rakudo/list-v-cache: 2af8cb4 | jnthn++ | src/Perl6/Optimizer.nqp:
07:42 dalek rakudo/list-v-cache: Make optimizer aware of types of nqp:: ops.
07:43 dalek joined #perl6
07:44 moritz TimToady: thanks; the .list vs. .List distinction in Seq seemed a bit dubious to me :-)
07:44 TimToady oh, that's a bit of a fossil, could just use .list now
07:45 TimToady not related, but there seems to be one failing test due to eqv calling .perl on something with no .perl method, so we'll have to address that somehow
07:46 * TimToady is going to bed now, however...
07:46 ShimmerFairy Don't most things have a .perl? O_o
07:46 ShimmerFairy ♞ TimToady o/
07:46 FROGGS joined #perl6
07:48 n0tjack joined #perl6
07:48 timotimo some things just say "NameOfClass<$!WHICH>"
07:50 ShimmerFairy I could've sworn .perl was something defined on Mu, and thus quite hard to make disappear :)
07:50 timotimo yeah
07:50 timotimo m: Mu.perl
07:50 camelia rakudo-moar c6a50f: ( no output )
07:53 kjs_ joined #perl6
07:53 TimToady m: say $~MAIN.perl
07:53 camelia rakudo-moar c6a50f: OUTPUT«Method 'perl' not found for invocant of class 'Perl6::Grammar'␤  in block <unit> at /tmp/UVxqWLSUXb:1␤␤»
07:54 TimToady rafk &
08:01 mohij joined #perl6
08:02 ShimmerFairy oh yeah, NQP objects are how you make things like .perl disappear :P
08:04 thou joined #perl6
08:09 cognominal joined #perl6
08:12 duncan_dmg joined #perl6
08:19 rhr joined #perl6
08:20 n0tjack joined #perl6
08:24 rindolf joined #perl6
08:33 moritz fall back to === semantics for NQP objects?
08:38 ShimmerFairy I've run into problems of this nature with NQP objects before, so I think the better long-term solution would be to either replace NQP objects that can be exposed with P6 versions, or to make the appropriate NQP objects more P6-like (I'm thinking of things like .gist and so on)
08:38 kjs_ joined #perl6
08:39 timotimo we can just give the nqp objects the methods, that'd be enough i believe
08:39 timotimo hllize will take care of the rest
08:41 ShimmerFairy m: say Cursor.^attributes  # would that fix stuff like this too?
08:41 camelia rakudo-moar c6a50f: OUTPUT«Method 'gist' not found for invocant of class 'NQPAttribute'␤  in block <unit> at /tmp/y3xo3Vqmgt:1␤␤»
08:41 dakkar joined #perl6
08:42 timotimo probably
08:44 ShimmerFairy timotimo: I don't suppose we could redeclare bootstrapped private attributes in src/core, could we? For the bug I just gave, that would seem to be an alternate solution if it were possible :)
08:45 timotimo oof.
08:45 timotimo perhaps we can do monkey typing?
08:45 * timotimo is ankle deep in JIT right now :)
08:46 ShimmerFairy Of course, letting NQPAttribute and the like behave more P6-y would make it a bit nicer, even if we'd like to not have NQP-level types like BOOTSTRAPATTR exposed :P
08:47 ShimmerFairy that Cursor example wasn't the best, come to think of it, because it's inheriting from an NQP class. The bootstrap issue will whine about BOOTSTRAPATTR instead :)
08:49 laouji joined #perl6
08:50 leont joined #perl6
08:51 mohij joined #perl6
08:52 n0tjack joined #perl6
08:52 jnthn morning, #perl6
08:52 yoleaux 10 Sep 2015 21:45Z <FROGGS> jnthn: here is the current state of perl6-j, if you are curious: https://gist.github.com/FROGGS/3598992b921b34a1c6d5
08:55 jnthn .oO( In the "what happens if I snort powdered naga jolokia" sense of curious maybe... )
08:57 FROGGS O.o
08:57 jnthn .ask FROGGS Don't suppose a $self := nqp::decont($self); at the start of that method helps? Dunno why it'd only be needed in some cases and not others though...
08:57 yoleaux jnthn: I'll pass your message to FROGGS.
08:58 FROGGS jnthn: I tried a nqp::decont($attr) in the bindattr_s call that fails
08:58 yoleaux 08:57Z <jnthn> FROGGS: Don't suppose a $self := nqp::decont($self); at the start of that method helps? Dunno why it'd only be needed in some cases and not others though...
08:58 FROGGS jnthn: (without luck)
08:58 jnthn Or rather, why only on moar but not JVM
08:58 jnthn Ah, OK :(
08:59 jnthn What's really werid is that the first bind works o.O
08:59 jnthn First bindattr, I mean
08:59 FROGGS it doesnt
08:59 jnthn Oh wait
08:59 jnthn Yeah, the first debug line is over the create
08:59 FROGGS aye
08:59 FROGGS create works, bind doesnt
09:00 FROGGS though funnily the bind does work while building the setting
09:00 FROGGS it just fails afterwards, in user code or when precompiling nativecall
09:00 jnthn What the heck...
09:00 FROGGS I tell ya
09:01 FROGGS[mobile] joined #perl6
09:01 FROGGS[mobile] jnthn: sorry, have to eat cake now :/
09:02 FROGGS[mobile]2 joined #perl6
09:02 lizmat joined #perl6
09:03 jnthn Best excuse ever :)
09:03 jnthn Enjoye!
09:04 jnthn [Tux]: Nice the performance is going in the right direction :)
09:04 [Tux] indeed \o/
09:04 [Tux] and all tests still pass
09:05 jnthn :)
09:05 domidumont joined #perl6
09:07 andreoss joined #perl6
09:08 andreoss can I use NQP as Perl6 slang?
09:08 andreoss use Slang::NQP or something like that
09:09 moritz don't think so.
09:11 dalek rakudo/nom: 524a763 | lizmat++ | src/core/traits.pm:
09:11 dalek rakudo/nom: "cached" is one of the possible Routine traits
09:11 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/524a763297
09:12 lizmat m: class cached {}; sub a($a) is cached {}   # weird
09:12 camelia rakudo-moar c6a50f: OUTPUT«5===SORRY!5=== Error while compiling /tmp/bFwHl1eyqJ␤Can't use unknown trait 'is ' in a sub declaration.␤at /tmp/bFwHl1eyqJ:1␤    expecting any of:␤        rw parcel hidden-from-backtrace hidden-from-USAGE␤        pure default DEPRECATED inli…»
09:13 jnthn lizmat: If you name a type in a trait, its type object is passed, not a named arg
09:13 lizmat maybe we should use an "isa" trait to mark inheritance?
09:14 jnthn For the 100000000th time...
09:14 jnthn ...no.
09:14 lizmat okokok
09:14 lizmat must have missed the discussion  :-(
09:14 jnthn Sorry, I just saw it too many times
09:14 lizmat I forgot why not, or never knew it
09:15 lizmat is it performance of the grammar ?
09:15 jnthn Even if we do that, you'd *still* have this situation.
09:15 jnthn Well, it's more that it doesn't especially fix anything, and would come at the cost of breaking a huge amount.
09:15 timotimo yikes, so many failures
09:16 lizmat if we use "isa" only for type objects, and "is" for all the other traits, how would we *still* have this situation?
09:16 lizmat sorry if I'm asking for the obvious, but I'm really in the dark here wrt that
09:16 jnthn Because you'd still want "is" to pass the role when there is one
09:17 lizmat ??
09:17 espadrine joined #perl6
09:17 jnthn role foo { }; sub bar is foo { }
09:17 lizmat roles are set with "does" ?
09:17 lizmat ah, punned roles
09:17 ab5tract_ joined #perl6
09:17 jnthn no no, it's on a sub
09:17 jnthn That's actually going to call trait_mod:<is>(&bar, foo)
09:17 jnthn While if you just say
09:18 jnthn sub bar is notatype { }
09:18 jnthn You get
09:18 jnthn trait_mod:<is>(&bar, :notatype)
09:18 jnthn The named arg syntax is convenient and OK in the small
09:18 jnthn But we really should encourage the type-based approach for userland modules
09:19 jnthn As it's a good bit more robust
09:19 jnthn Probably especially in the face of having multiple versions of modules loading.
09:19 lizmat ah, so you're saying that things like "is cached" where cached is *not* a type, is really the problem?
09:20 * moritz didn't even know about the type-based approach
09:20 jnthn :)
09:20 ab5tract_ We have types now? ;)
09:20 * moritz idly roasts ab5tract_
09:20 jnthn lizmat: I'm saying it's useful to have and probably OK for some uses, but we probably want to guide module authors towards the type-based approach.
09:21 jnthn lizmat: Or not, and just see if it emerges as a best practice anyway ;)
09:23 * jnthn has a fix for the S17-lowlevel/threads.t regression he caused
09:23 lizmat jnthn++
09:24 n0tjack joined #perl6
09:25 lizmat so suppose I have code that has an "is foo" trait on a sub
09:25 lizmat later, the system adds a "foo" class
09:25 lizmat all of a sudden my code will be broken after that update
09:27 jnthn Aye, though given (except native types) class names culturally start uppercase, it's not likely
09:27 jnthn The convention hinted at in S14 is that lowercase role names are typically for use as traits
09:29 lizmat ok, well...  I need to hit the road again to make it in time to Lyon
09:29 moritz .oO( into the Lyon's den )
09:29 jnthn lizmat: Safe travels
09:30 lizmat thank you
09:30 lizmat I'll get back to this...  :-)
09:30 jnthn :)
09:30 lizmat commute&
09:31 * jnthn wonders how on earth S15-nfg/many-threads.t got busted
09:31 jnthn It's a reliable SEGV here
09:35 jnthn Wow, MVM_CROSS_THREAD_WRITE_LOG is pretty loud on this one.
09:36 jnthn And all inside of HYPER, matching the analysis in the backlog. :)
09:42 brrt joined #perl6
09:43 zakharyas joined #perl6
09:46 laouji joined #perl6
09:48 timotimo there's some "todo passed" in the spec tests, but also a whole bunch of failing tests :\
09:49 jnthn "whole bunch"?
09:50 timotimo a screenful
09:50 timotimo the previous results have disappeared into the scroll buffer, but i'm running a new set right now
09:50 timotimo gather.t seems to fail, for example
09:51 jnthn Odd...no sign of that here
09:51 timotimo how about t/spec/S02-literals/adverbs.rakudo.moar ....................... Dubious, test returned 255 (wstat 65280, 0xff00)
09:51 timotimo t/spec/S02-literals/numeric.t ................................. Dubious, test returned 4 (wstat 1024, 0x400)
09:51 timotimo t/spec/S02-types/WHICH.t ...................................... Dubious, test returned 1 (wstat 256, 0x100)
09:52 jnthn Only the first of those, which looks like an NQP object leaking into Perl 6 space
09:52 thou joined #perl6
09:52 timotimo pairs-as-lvalues?
09:52 timotimo failed 2 of 5
09:52 jnthn No
09:53 timotimo weird!
09:53 timotimo i'll double-check for unclean checkouts
09:53 timotimo oh
09:53 timotimo am i supposed to be on the master branch of glr?
09:53 timotimo most probably >_>
09:54 moritz "master branch of glr"?
09:54 timotimo er
09:54 nine adverbs has been failing here for a day or two
09:54 timotimo the master branch of roast
09:54 nine yes
09:55 FROGGS timotimo: also keep in mind that a "screenful" differs in meaning here :o)
09:56 timotimo :)
09:56 n0tjack joined #perl6
09:56 timotimo i meant to give a rough estimate
09:57 nine A screenful here would be 100 files ;)
09:57 FROGGS files?
09:57 timotimo wow
09:57 nine lines
09:57 timotimo ah
09:57 FROGGS I have about 64 lines
09:58 timotimo one error gets reported over like 3 or 4 lines
09:58 FROGGS is jnthn still at 80x25? :P
09:58 timotimo one failing file, more correctly
09:58 nine FROGGS: AFAIK even the windows terminal can do more lines, just not more columns ;)
09:58 psch FROGGS: the "bind_attribute_native" call that dies in your gist works if it gets a hint for the correct field...
09:59 psch FROGGS: i have no idea if that's actually useful to know, though :)
09:59 psch FROGGS: mind, that's also in jdb, not with any kind of patch that figures out the right hint...
09:59 FROGGS psch: I think it very much is
10:00 FROGGS psch: still I dont know how to debug bind_attribute_native with st.NO_HINT :/
10:00 FROGGS I like to add debugging statements or some such, but that's problematic how bind_attribute_native is implemented
10:01 FROGGS psch: that it works with a hint explains why the decont hack does not work out which jnthn++ mentioned
10:02 psch FROGGS: what i've done is 1) uncomment the bytecode dumping, 2) extend RuntimeException with SpecialRuntimeException in P6OpaqueBaseInstance, 3) throw that instead of RuntimeException in resolveAttribute, 4) breakpoint on that exception type, 5) read __P6Opaque__68.class bytecode
10:02 psch s/i\'ve done/i'm doing/
10:02 FROGGS hmm
10:02 FROGGS I should probably learn how to jdb
10:02 psch FROGGS: i suppose compiling nqp with -g to javac allows jdb to read that source
10:03 psch FROGGS: 'cause it keeps telling me to do that when i want to "list" generated bytecode...
10:03 psch FROGGS: although we'd have to inject that into the classfilewriter from ASM...
10:03 psch (fsvo "inject")
10:03 FROGGS >.<
10:10 timotimo only three failing test files now
10:10 psch eh, actually that's bogus anyway
10:10 timotimo adverbs, many-threads and i had to kill start
10:11 psch i mean, "javac -g" adds debugging annotations that come from the code that's compiled
10:11 FROGGS timotimo: that sounds about correct
10:11 psch ...but we don't actually have code that's compiled except what's in P6Opaque{...}.java
10:11 FROGGS hmmm
10:11 psch and that code's not particularly useful 'cause it's mostly throwing exceptions :P
10:14 psch hmm, apparently we can use visitLabel and visitLineNumber to attach line numbers to bytecode segments...
10:19 * FROGGS listens carefully
10:21 psch FROGGS: http://mail-archive.ow2.org/asm/2012-02/msg00003.html is what made me think that
10:21 psch FROGGS: i'm not sure how useful it is for us, because we still don't actually have source... and some things you're allowed to do in jvm-bytecode don't map to java code either
10:22 * FROGGS nods
10:24 psch huh
10:24 psch https://gist.github.com/peschwa/9072d94296c74114aa7c
10:24 psch that's the first few lines of __P6Opaque_68.bind_attribute_native
10:25 psch __P6Opaque__68 is Attribute
10:25 FROGGS psch: what's the 'huh'? I don't spot it
10:25 psch FROGGS: the "huh" is in jdb, actually...
10:25 FROGGS bah! :P
10:25 psch sorry :s
10:25 FROGGS *g*
10:26 psch revision 2 of the gist has the jdb bit i'm looking at
10:26 psch (i wanted to add a file but UI confusion...)
10:27 psch basically, .delegate (which is .field_10) is null
10:27 psch and we pass STable.NO_HINT
10:27 psch which is -1
10:28 psch so we aren't actually looking for the attribute "$!name", we already know we can't find it
10:28 psch because we get bad info, somehow
10:28 psch i'm thinking .delegate probably shouldn't be null...
10:29 psch oh, one error in there
10:29 psch .field_10 isn't .delegate
10:29 n0tjack joined #perl6
10:29 laouji joined #perl6
10:29 Ulti m: say $*IN.get;
10:29 camelia rakudo-moar 524a76: OUTPUT«Céad slán ag sléibhte maorga Chontae Dhún na nGall␤»
10:30 psch .delegate just is the 10th field in __P6Opaque__68
10:30 FROGGS psch: none of the 15 fields are .delegate, right?
10:30 psch FROGGS: right, the field_* thingies are P6-level attributes
10:30 FROGGS aye
10:30 psch (or nqp-and-higher rather)
10:30 FROGGS from BOOTSTRAP.nqp line 107 to 121
10:31 FROGGS they are: str int int int int Mu Mu Mu Mu Mu int int int int Mu
10:31 FROGGS fits very well the null/0
10:31 psch FROGGS: yeah, it should :)
10:31 psch FROGGS: cause that's what defines those fields
10:32 andreoss moritz: would it be a sane idea to have something like Slang::NQP or Inline::NQP or I'm missing something here?
10:32 laouji joined #perl6
10:32 FROGGS andreoss: what do you need t for?
10:32 FROGGS it*
10:32 andreoss If I have NQP code that runs much faster than Perl6's one
10:32 FROGGS hmmm
10:33 FROGGS I guess a Slang::NQP should be doable with some hackory
10:34 psch but i'd only be faster if you pass it to NQP::Compiler instead of Perl6::Compiler, no?
10:34 andreoss or maybe i have a chunk of code that operates only on natives and I don't want unnecessary object wrapping to occur
10:34 FROGGS psch: so we want to find out why .delegate is null if it is null?
10:34 psch FROGGS: yeah, i'm pretty sure .delegate being null there is why we don't get anything useful out of bind_attribute_native
10:34 FROGGS k
10:34 pat_js joined #perl6
10:34 psch FROGGS: i suspect something somewhere in the nqp::create() call...
10:36 FROGGS psch: the create call just allocates the object
10:36 Ulti do you not get $*IN when you do perl6 -e '' ?
10:36 Ulti and if not why not
10:37 FROGGS Ulti: you probably need to pass it a filehandle
10:38 psch oh, right, the "huh"
10:38 * Ulti notices the double quotes in his one liner ;___; BASH mad $* an empty string and Rakudo complained about IN
10:38 timotimo andreoss: we're supposed to let you work with natives sufficiently well so that the perl6 code reaches the speed of the nqp code ... at least somewhat
10:38 psch FROGGS: the "huh" was: "hints are for fast field access" but the decompiled bytecode says "check the delegate, if that's null check the hint"
10:38 Ulti might be a good place for a more awesome error message though
10:38 psch FROGGS: i assume the object should be allocated with a delegate in place, or we need hints
10:39 jnthn iirc, the delegate is used for mixin related bits and maybe for deserialized objects, but not for other cases
10:39 mprelude joined #perl6
10:40 FROGGS P6opaque.change_type looks interesting
10:40 telex joined #perl6
10:42 psch jnthn: yeah, that's what the comments say as well, which means the codegen is probably wrong
10:43 jnthn psch: It should be something like "if there's a delegate then use it, otherwise use the hint, and if there's not one then fall back to the name-based lookup"
10:44 psch jnthn: oh, of course... which means i'll have to pull apart the name based lookup in the byte code :s
10:44 jnthn psch: I think the name-based lookup is implemented in the P6opaque instance base class
10:44 jnthn Rather than code-gen'd
10:44 psch jnthn: yeah, it's resolveAttribute... which is what throws
10:45 psch ohh
10:45 psch the nameToHintMap is wrong
10:46 FROGGS how so?
10:47 psch hold on
10:47 psch i had the contents a bit ago, but i forgot how :P
10:49 psch hm, no, it has "$!name", must've missed that last time
10:50 Ven joined #perl6
10:50 psch hm
10:51 psch we have on classHandle in the REPRData
10:51 psch with an ST with the same ID as the classHandle we're looking for
10:51 psch but they have different SCs
10:52 FROGGS O.O
10:52 psch s/on/one/
10:52 psch https://gist.github.com/peschwa/9072d94296c74114aa7c
10:53 psch plus this:
10:53 psch main[1] print rd.classHandles[0].st == classHandle.st rd.classHandles[0].st == classHandle.st = true
10:53 psch missing a \n between "ndle.st" and "rd.class"...
10:53 psch wonky paste :s
10:54 FROGGS I can read it anyway :o)
10:54 psch and that's why we don't find nameToHintMap
10:54 psch which is why we don't find the attribute
10:56 psch i guess i'll blindly try only comparing the STables
10:56 psch because i don't really have a grasp on what serialization contexts do... :)
10:56 FROGGS this is scary
10:57 AlexDaniel joined #perl6
10:57 FROGGS dont several classHandles share a STable?
10:58 AlexDaniel not sure why this RT was not deleted for 12 hours…
10:58 FROGGS AlexDaniel: hi, what RT are talking about?
10:58 timotimo STable combines a type object and a REPR, dunnit?
10:58 AlexDaniel FROGGS: https://rt.perl.org/Public/Bug/Display.html?id=126035
10:59 psch FROGGS: uh, i'm not sure.  i was assuming what timotimo says is true, which means every ST is unique to one combination
10:59 timotimo oh
10:59 timotimo one per HOW + REPR pairing
10:59 FROGGS psch: yes, but if you have several object of a kind, they share an STable
10:59 AlexDaniel :)
10:59 timotimo yeah, HOW instance
10:59 FROGGS objects*
11:00 timotimo which means it'd be per class
11:00 FROGGS hmmm
11:00 psch FROGGS: well, they also need the same hints then
11:00 FROGGS should that be good enough here?
11:00 FROGGS AlexDaniel: I marked it as spam...
11:01 AlexDaniel FROGGS: yeah, I see :)
11:01 psch FROGGS: i think it should be, we're only looking for "how can we access the value", not "what is the value"
11:01 AlexDaniel thanks
11:01 n0tjack joined #perl6
11:01 psch still curious how this suddenly come up...
11:02 psch the code in questions is almost 2.5 years old :S
11:02 FROGGS psch: yeah, I cannot imagine how the Attribute belongs to another SC after building the setting
11:02 timotimo AlexDaniel: she says she still believes in signs. does that mean she's fond of languages with sigils?
11:03 FROGGS timotimo: or signs as in prefix ops?
11:03 timotimo could be
11:03 AlexDaniel timotimo: yeah, we can probably send some Larry's pics
11:04 timotimo https://www.expeditedssl.com/aws-in-plain-english - this is partially amusing
11:04 FROGGS I mean, it is good that we can lexically scope here belief :o)
11:04 timotimo especially the description of Direct Connect
11:06 psch building setting with the patch now
11:07 itz joined #perl6
11:08 domidumont joined #perl6
11:10 psch well, it builds NativeCall at least :)
11:10 psch actually it even finished the build!
11:10 FROGGS psch: please run 'make j-test'
11:11 AlexDaniel It's like: Stacking cash on the sidewalk and lighting it on fire – haha
11:11 FROGGS psch: do you still have a modified 'for flat nqp::hllize' in there?
11:11 psch FROGGS: yeah
11:12 domidumont joined #perl6
11:12 psch FROGGS: also, NativeCall builds but apparently fails literally every test
11:12 psch oh, wait
11:12 psch t/04-nativecall/16-rt125729.t ........ ok
11:13 psch every other fail is all fails, all with "Bad plan"
11:13 FROGGS that tests typed CArrays IIRC
11:13 psch (Wstat: 0 Tests: 0 Failed: 0)
11:13 ibo2perl6 joined #perl6
11:13 timotimo o_O
11:13 timotimo how'd that happen
11:13 psch oh
11:14 psch FROGGS: actually, the traits.pm bit looks as before
11:14 FROGGS psch: can you commit or gist your patch?
11:15 psch FROGGS: yeah, let me clean up a bit first
11:15 ibo2perl6 m: my $bh =  «a a a b b c».BagHash; $bh.perl.say; for $bh.kv -> $k, $v { say "$k => $v" } # this breaks one of my scripts
11:15 camelia rakudo-moar 524a76: OUTPUT«("a"=>3,"c"=>1,"b"=>2).BagHash␤a 3 => c 1␤Too few positionals passed; expected 2 arguments but got 1␤  in block <unit> at /tmp/UQsMFDWol9:1␤␤»
11:16 FROGGS psch: I'd like to try that then on the rakudo cu_load branch
11:16 FROGGS psch: because then loading the setting and other stuff does not happen through CompUnitRepo anymore
11:16 ibo2perl6 m: my $bh =  «a a a b c».BagHash;for $bh.kv -> $k, $v { say "$k => $v" }
11:16 camelia rakudo-moar 524a76: OUTPUT«a 3 => c 1␤Too few positionals passed; expected 2 arguments but got 1␤  in block <unit> at /tmp/5WqW0URw5O:1␤␤»
11:17 FROGGS psch: low level stuff is loaded via Perl6/ModuleLoader.nqp, and perl 6 modules a loaded via CompUnit(Repo)
11:17 dalek nqp: 52e409e | peschwa++ | src/vm/jvm/runtime/org/perl6/nqp/sixmodel/reprs/P6OpaqueBaseInstance.java:
11:17 dalek nqp: Only compare STables when looking for the nameToHintMap.
11:17 dalek nqp:
11:17 dalek nqp: For some reason the SC of a class apparently changes, which makes us unable to
11:17 dalek nqp: find the type hint needed to access attributes. This patch hacks around that.
11:17 dalek nqp: review: https://github.com/perl6/nqp/commit/52e409ec22
11:17 FROGGS m: my $bh =  «a a a b c».BagHash;for $bh.kv -> $k, $v? { say "$k => $v" }
11:17 camelia rakudo-moar 524a76: OUTPUT«a 3 => c 1␤Use of uninitialized value $v of type Mu in string context  in block  at /tmp/JYUrweds3T:1␤b 1 => ␤»
11:17 FROGGS m: my $bh =  «a a a b c».BagHash;for $bh.kv -> $k, $v? { say "$k => $v".perl }
11:17 camelia rakudo-moar 524a76: OUTPUT«"a 3 => c 1"␤Use of uninitialized value $v of type Mu in string context  in block  at /tmp/p0XdQrtjxm:1␤"b 1 => "␤»
11:18 FROGGS m: my $bh =  «a a a b c».BagHash;for flat $bh.kv -> $k, $v { say "$k => $v".perl }
11:18 camelia rakudo-moar 524a76: OUTPUT«"a => 3"␤"c => 1"␤"b => 1"␤»
11:18 FROGGS ibo2perl6: ^^
11:18 ibo2perl6 does that mean I should now flat it myself?
11:19 FROGGS ibo2perl6: aye
11:19 ibo2perl6 FROGGS++
11:19 FROGGS ibo2perl6: now less stuff gets flattened surpi^Wautomatically
11:19 amaliapomian_ joined #perl6
11:20 ibo2perl6 :D
11:20 psch FROGGS: patch is only in nqp, as dalek mentions
11:20 psch i'm afk for a bit o/
11:23 FROGGS psch++
11:26 tadzik does anyone run rakudobrew on windows?
11:27 FROGGS never tried
11:27 timotimo never tired
11:29 tadzik I've been told it works :)
11:29 timotimo that's good :)
11:29 Psyche^_ joined #perl6
11:30 [Tux] m: [[^2]].perl.say
11:30 camelia rakudo-moar 524a76: OUTPUT«5===SORRY!5=== Error while compiling /tmp/WasS9DTD5Q␤Unable to parse expression in bracketed infix; couldn't find final ']' ␤at /tmp/WasS9DTD5Q:1␤------> 3[[^7⏏2]].perl.say␤»
11:30 [Tux] is that intended?
11:30 [Tux] m: [[^2],[^2]].perl.say
11:30 camelia rakudo-moar 524a76: OUTPUT«5===SORRY!5=== Error while compiling /tmp/60QNUllJJB␤Unable to parse expression in bracketed infix; couldn't find final ']' ␤at /tmp/60QNUllJJB:1␤------> 3[[^7⏏2],[^2]].perl.say␤»
11:31 [Tux] m: [[1,2]].perl.say
11:31 camelia rakudo-moar 524a76: OUTPUT«[1, 2]␤»
11:31 FROGGS [Tux]: seems to be an LTM fail
11:31 FROGGS m: say [[^]]
11:31 camelia rakudo-moar 524a76: OUTPUT«one()␤»
11:33 [Tux] I have to leave in a sec. feel free to RT that yourself :P
11:33 n0tjack joined #perl6
11:35 kaare_ joined #perl6
11:36 ilmari joined #perl6
11:37 ilmari trying to install panda with rakudobrew failed in t/tester.t
11:37 yoleaux 25 Sep 2014 20:07Z <nwc10> ilmari: lunch
11:37 ilmari hahahaaaa
11:37 ilmari yes, I have had lunch since then
11:38 [Tux] panda pased this morning still
11:38 ilmari freshly brewed moar rakudo
11:39 ilmari oh, it passed on the second go
11:39 [Tux] I'm off. bbl
11:40 ilmari is here a preferred pastebot?
11:40 ilmari s/bot/bin/
11:40 thou joined #perl6
11:40 ilmari http://fpaste.scsys.co.uk/498559
11:40 tadzik :D
11:41 tadzik ilmari: we usually use github gist
11:41 tadzik ilmari: tester is a funny one since it simulates failing tests inside it, but doesn't surpress console output
11:42 tadzik (because back in the days there wasn't a way to do that, and it's quite possible that it still isn't :))
11:42 tadzik so it always looks confusing
11:42 tadzik but now it seems like it failed for real
11:42 ilmari but it definitely failed in that run (no panda installed)
11:43 tadzik very interesting
11:43 tadzik but the second try worked?
11:43 tadzik I blame sunrays
11:43 ilmari yes
11:43 itz did it fail at the reverse dependency building step?
11:43 ilmari itz: see the paste
11:44 itz no
11:44 ilmari no?
11:44 tadzik revdeps are ded
11:44 tadzik and thankfully
11:45 itz oh thats good news
11:45 tadzik I thought it'd be a controversial decision but everyone seems to like it
11:45 tadzik weird :)
11:47 tadzik does anyone remember what IRC nickname github:patzim uses?
11:47 tadzik I remember it starting with miz... I think
11:47 tadzik ilmari: well, please let me know if you see it happen again, especially if reproducible
11:49 tadzik joined #perl6
11:51 ilmari tadzik: got it fail once more running prove -e perl6 -lv t/tester.t
11:51 tadzik oh, interesting
11:52 tadzik I get a full pass
11:52 tadzik on freshly built rakudo and panda
11:52 ilmari it only fails very occasionally
11:53 tadzik planned two tests but ran one, like it crashed midway between lives-ok() and dies-ok()
11:53 tadzik very weird
11:54 moritz that's why test plans are still useful
11:54 tadzik indeed
11:54 ilmari done_testing() and the non-zero exit would have caught that too
11:54 kjs_ joined #perl6
11:54 ilmari https://gist.github.com/ilmari/b6c28f43569f5d6d8a98
11:55 tadzik aha!
11:55 moritz what it does not catch is some refactoring not running all of your tests (but still exiting cleanly)
11:56 tadzik ilmari: are you using some new-ish prove perchance?
11:56 ilmari I'm not saying test plans are never useful, but it wouldn't make any difference in this case
11:56 ilmari TAP::Harness v3.35 and Perl v5.22.0
11:56 tadzik it looks like prove sees the result that the inner-prove produced and thinks it's the outer one
11:56 tadzik it's quite nasty all in all
11:56 ilmari tadzik: but only sometimes?
11:56 tadzik ilmari: ...apparently
11:57 tadzik I'm on 3.30
11:57 tadzik let me update and see if it happens to me then, sometimes
11:58 tadzik nope, runs like a charm
11:58 ilmari it's only failed twice for me so far, out of tens of runs
11:58 ilmari running it in a loop now
12:00 ilmari failed again just now
12:01 ilmari while prove -e perl6 -lrv t/tester.t ; do :; done
12:01 tadzik it consistently never fails for me :/
12:02 nine ibo2perl6: for $bh.kv -> ($k, $v) { say "$k => $v".perl } is nicer I think
12:04 ilmari is there a readline-enabled repl for perl6?
12:05 nine ilmari: install Linenoise
12:06 ilmari ah, _obviously_
12:06 n0tjack joined #perl6
12:06 * ilmari searched for readline on modules.perl6.org and installed Readline, but that didn't help
12:07 tadzik heh
12:07 tadzik oh, I was to write m-b for linenoise
12:08 * timotimo afk for ~4 hours
12:09 * awwaiid is pleased with their first non-toy perl6 grammar, https://github.com/awwaiid/pinpoint-code-color/blob/master/pinpoint-code-color
12:10 ilmari nine: wow, that makes the repl take a _lot_ longer to start up
12:10 ilmari from .2s to 2.2s
12:11 tadzik :o
12:11 ilmari and I thought Devel::REPL was bad
12:11 n0tjack joined #perl6
12:11 tadzik module loading is very constly :/
12:11 tadzik costly, even
12:12 jnthn Well, it is if you don't pre-compile...
12:12 tadzik yep
12:12 ilmari panda install doesn't?
12:12 tadzik I guess we should do something about it...
12:12 tadzik ilmari: it used to, but doesn't anymore
12:12 tadzik let me point you to the reason why
12:13 tadzik ilmari: http://www.nntp.perl.org/group/perl.perl6.users/2015/08/msg2216.html
12:14 ilmari tadzik: I see
12:17 Mhoram joined #perl6
12:18 FROGGS tadzik: please wait for the cu_load branch to land before doing any precomp work...
12:18 tadzik okay
12:22 skids joined #perl6
12:27 ibo2perl6 left #perl6
12:31 [Coke] (80x25) of course jnthn would be. I also am, but i'm an old fart at this point. "I remember using a physical terminal to access the MTS at college..."
12:33 rurban joined #perl6
12:33 [Coke] (126035) it's spam. to deal with spam, don't delete, click the big red S in the menu, upper right hand side.
12:34 jnthn My eyes aren't (haven't ever been, won't ever be) good enough to do much more than 80x25 :)
12:34 [Coke] (well, it's red after you click on it)
12:35 brrt joined #perl6
12:35 FROGGS jnthn: there might come a time where you plug in cameras into your left ear, and attach them to your forehead :D
12:37 dalek Heuristic branch merge: pushed 24 commits to rakudo/cu_load by FROGGS
12:37 * jnthn is a little curious if google glass might be interesting for him
12:38 n0tjack joined #perl6
12:38 jnthn "Show me a zoom on that bit of the real world" :)
12:38 FROGGS I've not yet seen one
12:38 [Coke] maybe we can get Perl 6 added to http://www.fileformat.info/'s "how to print"
12:38 FROGGS [Coke]: we can ask them
12:39 jdv79 what is cu_load for?
12:39 [Coke] m: say "\x[1f595]"
12:39 camelia rakudo-moar 524a76: OUTPUT«🖕␤»
12:39 FROGGS jdv79: separating Perl 6 level module loading from nqp level
12:39 jdv79 o
12:46 TimToady jnthn: see http://irclog.perlgeek.de/perl6/2015-09-11#i_11201188 for my nsa musings
12:47 jnthn TimToady: I saw them, thanks. :) I need to ponder them a bit, but a nasty Moar race condition stole my attention this morning.
12:48 TimToady yeah, and I'm .caching madly enough that I only slept 3 hours
12:49 psch FROGGS: are you looking at cu_load currently?
12:49 FROGGS psch: I was hoping it helps loading the setting more cleanly, but the opposite effect happened
12:50 jnthn TimToady: That is...not much sleep
12:51 [Coke] spw hasn't forgotten about the youtube video of the q&a, roman is working on it.
12:51 psch FROGGS: hmm, yeah i'm seeing another SOE, with similar code path to what we had with the nom jvm build...
12:52 FROGGS :/
12:52 timotimo looking forward to that recording
12:53 sufrostico joined #perl6
12:54 TimToady jnthn: it's just jetlag, mostly, and I can take naps when I need 'em now that I'm home
12:54 jnthn ah, jetlag...
12:55 * jnthn still feels like he's recovering from his last batch of travel
12:58 abaugher joined #perl6
13:00 Woodi joined #perl6
13:00 itz has anyone integrated rakudobrew with PS1 to display which version is in use?
13:03 [Coke] does panda not work when using a relatively-path'd perl6 to bootstrap?
13:03 tadzik hmm
13:03 tadzik yes
13:03 moritz [Coke]: did you 'make install'?
13:03 [Coke] ... yup, that seems to be a problem. (or maybe a perl6 not in your path)
13:03 [Coke] moritz: yup.
13:04 [Coke] trying to run the inline::perl5 tests, it's kind of a pain with a local dev copy.
13:05 [Coke] ARGLEBARGLE. also, panda still not working with http proxy.
13:05 [Coke] I think that's a Christmas blocker.
13:06 tadzik it is
13:06 tadzik if you have HTTP::UserAgent installed
13:06 [Coke] adding it to the list. :)
13:06 tadzik I think I even documented that :)
13:06 FROGGS WRTFM?
13:07 [Coke] https://gist.github.com/coke/38a589cec239409a4212
13:07 [Coke] tadzik: how can I install HTTP::UserAgent ?
13:07 [Coke] ... with panda?
13:07 tadzik :}
13:07 jdv79 is Digest GLR'ed yet?
13:07 [Coke] right. I think that needs to be bundled, then.
13:07 jdv79 that blocked me from using IO::Socket::SSL recently
13:08 dakkar surprise of the day: @().elems == 1
13:08 jdv79 which is what H::UA uses
13:08 tadzik [Coke]: to my defense, you can tell panda to use http all the time if it's git being blocked you're after
13:08 jdv79 looks like not
13:08 [Coke] tadzik: still needs a proxy.
13:08 moritz m: say @().perl
13:08 camelia rakudo-moar 524a76: OUTPUT«(Nil)␤»
13:09 dakkar moritz: is that expected?
13:09 [Coke] is camelia updated past glr yet? checking...
13:10 [Coke] looks like.
13:10 [Coke] dakkar: what version of perl6 do you have?
13:10 n0tjack joined #perl6
13:10 dakkar [Coke]: 5746d
13:10 dakkar built a few days ago
13:11 jdv79 carving 6.0 out of roast sounds like a lot of work
13:11 [Coke] perl6 -version might be easier to figure out...
13:11 [Coke] jdv79: yup
13:11 jdv79 that only a select few can even do
13:11 dakkar This is perl6 version 2015.07.1-776-g5746df2 built on MoarVM version 2015.07-108-g7e9f29e
13:11 dakkar [Coke]: but yes, past glr
13:13 [Coke] RT: 1,041 tickets, 14 [GLR], 11 testneeded
13:16 [Coke] trying to see if I can find anything on RT#77644. this segfaults: ./perl6-valgrind-m -e 'EVAL q[] while 1'
13:17 [Coke] (whereas ./perl6 just chews memory)
13:20 TimToady NB: after we merge list-v-cache, some subset of the GLRization will have to be revisited--anywhere we added a .list, that will need to change to .cache (unless it's before a .elems, which will .cache now, so .list.elems can just be .elems)
13:24 khw joined #perl6
13:26 pmurias joined #perl6
13:28 jnthn TimToady: I assume you updated the binder to use .cache instead of .list?
13:28 thou joined #perl6
13:29 TimToady yes, I even updated the jvm binder :)
13:29 TimToady (without testing it)
13:29 jnthn Nice
13:30 TimToady down to 1 test failure (that is my fault :)
13:30 TimToady well, I guess the .perl one is also my fault :)
13:32 aborazmeh joined #perl6
13:32 aborazmeh joined #perl6
13:33 hernanGOA joined #perl6
13:35 itz did the old [1, 2]<> have a name?
13:36 jdv79 isn't that the zen slice
13:37 moritz it is
13:38 TimToady it's one form of it
13:38 thou joined #perl6
13:38 TimToady .[] and .{} are also Zen slices
13:38 itz https://perl6advent.wordpress.com/2014/12/13/day-13-string-interpolation-and-the-zen-slice/ has {} as well
13:39 n0tjack joined #perl6
14:03 dalek rakudo/nom: 8dd779a | hoelzro++ | src/core/ (2 files):
14:03 dalek rakudo/nom: Remove initialization of removed dynamic vars
14:03 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/8dd779a8ba
14:03 dalek rakudo/nom: 13fda77 | hoelzro++ | src/core/Exception.pm:
14:03 dalek rakudo/nom: Fix recommendation for $^X
14:03 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/13fda77ad1
14:03 dalek rakudo/nom: 8004846 | hoelzro++ | src/Perl6/Grammar.nqp:
14:03 dalek rakudo/nom: Error out if we see semicolon form without unit
14:03 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/8004846b8c
14:06 lichtkind joined #perl6
14:06 colomon *** Error in `/home/colomon/.rakudobrew/moar-nom/install/bin/moar': double free or corruption (!prev): 0x00007fce30089ae0 ***
14:06 colomon generated during the smoke test, but I don’t know by what.  :(
14:07 n0tjack joined #perl6
14:07 daxim in p6 string model, do I still have the distinction between lax "UTF8" (possibly 72 bits) and strict "UTF-8"?  it was occasionally useful to use unassigned codepoints beyond 1ffff.
14:09 TimToady no, we don't use utf-8 internally anymore, and graphemes are (by default) stored in 32-bit ints
14:10 TimToady utf-8 is just an encoding now
14:10 jnthn The utf-8 decoder in MoarVM follows Unicode Corrigendum 9
14:11 echo`division joined #perl6
14:11 moritz m: say chr(0x1ffff + 1)
14:11 camelia rakudo-moar 800484: OUTPUT«𠀀␤»
14:14 TimToady .oO(non corrigendum illegitimi)
14:14 daxim I didn't know about that text:  http://www.unicode.org/versions/corrigendum9.html   I'm relieved that I can pass around non-characters for interchange
14:15 colomon X::AdHoc.new(payload => "Could not submit test report: Unexpected named parameter 'pretty' passed")
14:15 colomon tadzik: ???
14:15 steffi joined #perl6
14:15 TimToady m: say (^100000000).EXISTS-POS(10000000)
14:16 camelia rakudo-moar 800484: OUTPUT«True␤»
14:16 tadzik :S
14:16 TimToady m: say (^100000000).EXISTS-POS(100000000)
14:16 tadzik colomon: oh hm
14:16 camelia rakudo-moar 800484: OUTPUT«(timeout)»
14:16 TimToady I have a fix for that too
14:16 tadzik colomon: update JSON::Fast
14:17 * colomon tries panda reboostrap
14:17 jnthn TimToady: At least it can reify 10 million elements before timing out :)
14:17 colomon … which doesn’t exist
14:18 colomon even when spelled correctly
14:18 moritz colomon: when you need a rebootstrap, you usually can't call panda anymore; which is why rebootstrap.p6 is a separate script (in the panda source dir)
14:18 colomon just asked rakudobrew to build panda again, looked like it brought in a bunch of changs for JSON::Fast
14:20 tadzik yeah
14:23 FROGGS jdv79: I just fixed Digest
14:25 FROGGS grondilu: ^^
14:29 colomon tadzik: that doesn’t seem to have cleared things up.  :\
14:29 tadzik :/
14:29 tadzik is smoker using JSON::Fast?
14:29 tadzik or ::TIny
14:30 n0tjack joined #perl6
14:31 colomon tadzik: neither
14:31 grondilu FROGGS++
14:31 dalek perl6-roast-data: 22e34e6 | coke++ | / (9 files):
14:31 dalek perl6-roast-data: today (automated commit)
14:31 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/22e34e6d52
14:31 colomon I think I’ve got emmentaler just using Rakudo’s built-in JSON
14:31 tadzik :o
14:31 colomon though of course it calls panda,
14:31 colomon and uses whatever panda uses
14:31 colomon there
14:32 * colomon ponders completely blowing away his rakudo/panda setup and starting from scratch
14:33 dalek rakudo/list-v-cache: 524a763 | lizmat++ | src/core/traits.pm:
14:33 dalek rakudo/list-v-cache: "cached" is one of the possible Routine traits
14:33 dalek rakudo/list-v-cache: review: https://github.com/rakudo/rakudo/commit/524a763297
14:33 dalek rakudo/list-v-cache: 8bc2c40 | TimToady++ | src/core/traits.pm:
14:33 dalek rakudo/list-v-cache: Merge branch 'nom' into list-v-cache
14:33 dalek rakudo/list-v-cache: review: https://github.com/rakudo/rakudo/commit/8bc2c406b6
14:33 dalek rakudo/list-v-cache: d46a494 | TimToady++ | src/core/Seq.pm:
14:34 grondilu so many C<flat> :/  Will be always have to use this that often or is it just temporary?
14:34 dalek joined #perl6
14:34 grondilu *we
14:35 FROGGS grondilu: I think most of them will stay...
14:35 grondilu :/
14:35 [Coke] Only use it if you need to be flat. :)
14:35 FROGGS grondilu: for example when you use meta ops (X, Z), they produce lists of lists
14:36 * moritz had to add surprisingly few flat() calls in his modules
14:36 FROGGS grondilu: and when you subscript, it retains the requested structure... so you want to flat that out
14:36 grondilu ok
14:36 FROGGS m: my @a = ^10; say @a[^5,5..9]
14:36 camelia rakudo-moar 800484: OUTPUT«((0 1 2 3 4) (5 6 7 8 9))␤»
14:36 n0tjack joined #perl6
14:36 FROGGS stuff like that
14:38 * colomon ’s biggest GLR issue so far has been Set.list no longer being the same as Set.keys
14:39 muraiki joined #perl6
14:40 TimToady yeah, I can argue that one both ways, but something to be said for consistency with bags and mixes
14:40 muraiki if I want to specify a type such as a Set of Str in a sub's signature, what's the correct syntax to do so?
14:41 colomon TimToady: I don’t mind the change, but I used Set.list a lot where today it needs to be Set.keys
14:41 colomon the resulting failure states are pretty amusing.  :)
14:41 n0tjack joined #perl6
14:43 TimToady jnthn: list-v-cache is ready to merge, no failures except known ones in adverb.t and litvar.t
14:43 TimToady shall we just bite the bullet, since it's likely to have some performance improvement?
14:44 TimToady plust the failure mode of using .list instead of .cache is fairly obvious
14:45 [Coke] sooner the better if we want it in the september release.
14:45 jnthn TimToady: litvar.t?
14:45 jnthn Odd
14:45 jnthn adverb.t isn't yours, I don't think
14:45 jnthn TimToady: Anyway, we can merge
14:45 TimToady well, except it was caused by my .perl change to eqv
14:46 jnthn Oh
14:46 jnthn :)
14:46 TimToady but that's independent
14:46 TimToady the litvar might possibly be my problem, but I think we can proceed anyway
14:46 jnthn The S15-nfg/many-threads.t one is because better code-gen made a certain race much more likely
14:46 jnthn Yeah, I'd go for it
14:47 moritz jnthn: that's one of the best reasons for a regression I've heard of :-)
14:47 dalek rakudo/nom: b410729 | TimToady++ | src/ (13 files):
14:47 dalek rakudo/nom: early hackage to distinguish .cache from .list
14:47 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/b410729b44
14:47 dalek rakudo/nom: 834c805 | TimToady++ | / (8 files):
14:47 dalek rakudo/nom: Merge branch 'nom' into list-v-cache
14:48 TimToady killed dalek :)
14:48 dalek joined #perl6
14:48 moritz in #perl6, you kill dalek :-)
14:48 TimToady anyway, it's merged
14:48 moritz TimToady++
14:49 moritz TimToady: so the implication is that if you write function that's supposed to receive the iterator, you don't use a @-sigiled parameter anymore
14:49 moritz right?
14:50 TimToady yes, that was already in GLR
14:50 jdv79 FROGGS: thanks
14:50 TimToady it just now calls .cache internally rather than .list
14:52 pmurias hoelzro: once I get @array.push working anything else will be stopping the merge?
14:53 vendethiel moritz: you mean you exterminate it ;-)
14:59 moritz vendethiel: I guess I do :-)
15:00 ugexe the new nom merge appears to break something for me but only on windows
15:00 hoelzro pmurias: I would like to see if I can get around the optimization removal in the MAST compiler; if I can't get it in the next few days, let's just merge, perhaps on Sunday?
15:02 n0tjack joined #perl6
15:04 pmurias hoelzro: it's currently only diabled when we are cross compiling
15:04 pmurias * disabled
15:05 dalek nqp/js-merge-wip: a7d006d | (Pawel Murias)++ | src/vm/js/QAST/Compiler.nqp:
15:05 dalek nqp/js-merge-wip: Minor cleanup.
15:05 dalek nqp/js-merge-wip: review: https://github.com/perl6/nqp/commit/a7d006d025
15:05 hoelzro I know; I just would rather remove that "if cross compiling" check
15:05 hoelzro call me particular =)
15:07 TimToady litvar.t passes after the merge, somehow, and jvm compiles \o/
15:07 pmurias hoelzro: copy & paste would avoid that, but I would rather avoid that
15:09 itz is there a version of dd which returns the type like this "dd $a" -> Str $a = "A"
15:10 dalek joined #perl6
15:12 laouji joined #perl6
15:13 FROGGS TimToady: jvm compiles?
15:13 FROGGS TimToady: also NativeCall.pm?
15:14 FROGGS but it will surely fail the tests from t/04-nativecall
15:16 [Coke] t/spec/S17-procasync/no-runaway-file-limit.t is running away
15:17 FROGGS O.o
15:17 FROGGS ahh, is that the one where jnthn said the proper fix will be interesting?
15:17 captain-adequate joined #perl6
15:18 [Coke] https://gist.github.com/coke/4be19f57f3845d3713f0 - roast failures.
15:20 jnthn t/spec/S17-lowlevel/thread.t is fixed in MoarVM, but didn't bump yet
15:22 ugexe rakudobrew is broke on travis and windows now :(
15:24 TEttinger joined #perl6
15:24 [Coke] t/spec/S17-procasync/no-runaway-file-limit.t in make spectest hung. running by hand, get:
15:24 [Coke] moar(85050,0x11812b000) malloc: *** error for object 0x7fa1eeecbdc0: pointer being freed was not allocated
15:29 cognominal joined #perl6
15:34 n0tjack joined #perl6
15:45 dalek rakudo/gmr: 278a719 | (Stefan Seifert)++ | src/Perl6/ (2 files):
15:45 dalek rakudo/gmr: Fix return 1, :a(2)
15:45 dalek rakudo/gmr:
15:45 dalek rakudo/gmr: Though return is implemented as a function call, we may not promote pairs to
15:45 dalek rakudo/gmr: named arguments, because we cannot demote them afterwards.
15:45 dalek rakudo/gmr:
15:45 dalek rakudo/gmr: Fixes RT #75118
15:45 dalek rakudo/gmr: review: https://github.com/rakudo/rakudo/commit/278a719899
15:46 nine The gmr branch is now free of regressions and actually fixes two RT tickets :)
15:46 jnthn nine++
15:46 TimToady ugexe: if it's reporting a Seq error, then probably you need to change .list to .cache somewhere
15:49 domidumont joined #perl6
15:50 ugexe TimToady: the program just abruptly stops with no error or anything. after running it more its not always, but random, although its always at the same spot, at something like: sub work(&code) { await start { &code } }; my $foo := work { gather for 1..3 { <some work here> } }; for $foo.list ...
15:53 TimToady well, could be threads, or it could be .cache; try changing the .list there to .cache maybe?
15:54 skids joined #perl6
15:57 kjs__ joined #perl6
16:06 n0tjack joined #perl6
16:07 dalek nqp/js-merge-wip: 1b3369e | (Pawel Murias)++ | / (5 files):
16:07 dalek nqp/js-merge-wip: Support calling methods on arrays.
16:07 dalek nqp/js-merge-wip:
16:07 dalek nqp/js-merge-wip: Do this by wrapping them in special objects for method calls.
16:07 dalek nqp/js-merge-wip: review: https://github.com/perl6/nqp/commit/1b3369e565
16:20 hoelzro pmurias: I'll see if I can fix the underlying issue; I'll take the condition check over copy/paste
16:20 itz m: [[1,]]
16:20 camelia rakudo-moar 0c79be: ( no output )
16:21 itz m: dd [[1,]]
16:21 camelia rakudo-moar 0c79be: OUTPUT«[1]␤»
16:21 itz m: dd [[1],]
16:21 camelia rakudo-moar 0c79be: OUTPUT«[[1],]␤»
16:21 itz is that the single arg rule?
16:22 jnthn itz: yes
16:23 n0tjack joined #perl6
16:34 pmurias hoelzro: keep in mind that serialize_sc must be also overridable, as we use that to avoid serializing twice while cross compiling
16:35 hoelzro pmurias: yes, that's fine
16:36 pmurias just returning an ast fragment instead of a null would remove the if
16:38 pmurias wouldn't be more elegant :(
16:39 n0tjack joined #perl6
16:44 itz http://stevemynott.blogspot.co.uk/2015/09/a-little-glrer-glr-great-list-refactor.html
16:51 moritz "LIST NOW IMMUTABLE" the example is a bad one, since pre-GLR died the same way
16:52 moritz it's just that push, pop, shift, unshift are gone from List
16:53 itz ok I'll change that .. probably later since I'll batch up changes
16:53 ilmari Linenoise gets confused about the cursor position with multibyte utf8 characters
16:54 tadzik joined #perl6
16:54 ilmari it uses bytes when calculating the cursor position
16:55 ilmari not just the cursor position. it seems to operate entirely on bytes
16:57 ilmari if I type å backspace, it deletes the second byte of the character
16:58 ilmari and if I then hit enter, perl6 dies with ===SORRY!=== Malformed termination of UTF-8 string
16:58 ilmari ah: https://github.com/antirez/linenoise/issues/25
17:05 jnthn dinner &
17:08 [Coke] jnthn: I am planning a 20 mile hike tomorrow ending in a curry. Thought you might appreciate that.
17:11 n0tjack joined #perl6
17:11 anaeem1_ joined #perl6
17:12 rurban joined #perl6
17:14 flussence p6doc is blowing up in a test at lib/Perl6/TypeGraph.pm:89... I can get the failing test to pass via s:g/\./»./, but I don't know if that's the right way to go about it.
17:16 moritz flussence: uhm, what kind of method calls need the >> now?
17:16 ilmari Method 'super' not found for invocant of class 'Array'
17:17 duncan_dmg left #perl6
17:17 moritz ilmari: callwith, callsame etc. to the rescue
17:17 ilmari (that's the error from lib/Perl6/TypeGraph.pm:89)
17:18 moritz huh
17:18 moritz I thought it's a p5ism
17:24 n0tjack joined #perl6
17:25 tokuhiro_ joined #perl6
17:29 brrt joined #perl6
17:29 nine _itz: you might want to mention, that a Slip slips into a list ;) my @a = 1, (2, 3).Slip, 4; # @a is now [1, 2, 3, 4]
17:30 brrt hmm
17:30 brrt m: my @list = 1, (2, 3), 4; dd @list.flat.list;
17:30 camelia rakudo-moar 0c79be: OUTPUT«(1, $(2, 3), 4)␤»
17:31 brrt m: my @list := 1, (2, 3), 4; say @list.flat.list;
17:31 camelia rakudo-moar 0c79be: OUTPUT«(1 2 3 4)␤»
17:31 brrt why?
17:31 nine brrt: Array itemizes its contents
17:32 brrt is there any way to unitemize it
17:32 nine brrt: and itemization prevents flattening
17:32 brrt hmm
17:33 nine m: my @a = 1, (2, 3), 4; say @a.perl; my @b = @a.List.flat; say @b.perl; say @a.map(*.list).flat.list.perl;
17:33 camelia rakudo-moar 0c79be: OUTPUT«[1, (2, 3), 4]␤[1, 2, 3, 4]␤(1, 2, 3, 4)␤»
17:34 brrt ok
17:34 brrt so .List makes it a list again, and it can flatten
17:34 brrt .list also does this
17:35 nine m: my @a = 1, (2, 3), 4; say @a.perl; my @b = @a.list.flat;
17:35 camelia rakudo-moar 0c79be: OUTPUT«[1, (2, 3), 4]␤»
17:35 nine brrt: no, there's a difference between .list and .List ^^^
17:35 brrt yeah, but not in this aspect
17:36 brrt m: my @a = 1, (2, 3), 4; say @a.list.flat.list;
17:36 camelia rakudo-moar 0c79be: OUTPUT«(1 (2 3) 4)␤»
17:36 brrt NO
17:36 brrt thats not fair
17:36 nine brrt: .list on an Array really doesn't do anything. It just returns self, since Arrays are also Lists
17:36 nine brrt: .List gives you a real, pristine List
17:37 brrt perl6 has an unmatched ability to make sane programmers go crazy
17:37 n0tjack joined #perl6
17:38 telex joined #perl6
17:39 brrt in a good way?
17:42 nine Granted this .list vs. .List distinction is not by design. I just added .List because I got tired of writing the same code again and again and I really think, internals should return Lists as far as possible. That their implementation uses an Array to gather the results should be a detail that's best hidden.
17:43 brrt yeah, that's probably best
17:44 _itz nine: thanks I'll add that
17:46 mprelude joined #perl6
17:46 brrt actually, it works out pretty well
17:57 Alina-malina joined #perl6
17:58 brrt joined #perl6
18:05 n0tjack joined #perl6
18:12 skids flussence: I had slready got past that and started on working on the next problem -- if you want I can commit the fixes so far.
18:12 flussence ahh, carry on. I can read the pod just fine for now :)
18:13 dalek doc: e232576 | skids++ | lib/Perl6/TypeGraph (2 files):
18:13 dalek doc: Partway fix doc build after a GLR-related something or other
18:13 dalek doc: review: https://github.com/perl6/doc/commit/e232576ad4
18:22 FROGGS joined #perl6
18:26 tokuhiro_ joined #perl6
18:27 FROGGS o/
18:27 muraiki \o
18:28 FROGGS what do I do now? I don't want to work on the jvm today :S
18:29 muraiki the lisp machine port
18:29 FROGGS O.o
18:30 muraiki I have used a bunch of languages on the jvm, but never actually learned java
18:30 muraiki I feel like I should learn it as the lingua franca of most business development, but it's so rarely used in the type of stuff I do (non-enterprise web apps) that I haven't really felt the need to
18:31 muraiki but I look forward to being able to use java libraries from p6 instead of from scala (too much time converting types around) or clojure (depending on how enterprisey the java code is, can be a nightmare)
18:32 psch FROGGS: you could try figuring out why my portaudio bindings segfault when trying to use jackd as audio driver, but don't when using alsa :P
18:32 psch FROGGS: although last i tried was about a week or two ago, so maybe something changed already
18:32 FROGGS psch: where is the code?
18:33 japhb FROGGS: I vote for the rakudo/cpp3 merge.  ;-)
18:33 psch FROGGS: https://github.com/peschwa/Audio-PortAudio
18:33 FROGGS japhb: that's why I was working on the jvm...
18:33 japhb DANGIT.
18:33 FROGGS japhb: I need to port stuff to jvm, and thus need a working perl6-j
18:33 FROGGS japhb: exactly
18:34 FROGGS psch: do I get a commit bit?
18:34 psch FROGGS: sure, hold on
18:34 * japhb is now considerably more annoyed at the JVM
18:35 psch FROGGS: done
18:36 FROGGS psch: how do I select the jackd backend?
18:36 psch FROGGS: you need to have jackd running, which might need some alsa configuration as well
18:36 FROGGS ohh
18:37 flussence doesn't jackd have some handwavey-autostart-magic feature like pulseaudio these days?
18:37 n0tjack joined #perl6
18:37 psch FROGGS: but in general it's "$ /usr/bin/jackd -R -P89 -dalsa -dhw:0 -r48000 -p256 -n3"
18:37 psch where -r -p and -dhw depend on your soundcard
18:38 psch https://wiki.archlinux.org/index.php/Pro_Audio#JACK
18:38 psch that heading should be enough to get it to a working-enough-for-trying-if-it-works state
18:38 psch or rather the paragraph i guess
18:39 psch flussence: i'm not aware of any such future
18:39 flussence oh, maybe the programs I was using did it internally...
18:40 psch flussence: might also be a distribution-thing...
18:43 yqt joined #perl6
18:43 FROGGS $ perl6 -Ilib test.pl
18:43 FROGGS init: Host error.
18:43 FROGGS Cannot locate symbol 'Pa_GetDefaultOutputDevice' in native library 'libportaudio.so'
18:44 yqt joined #perl6
18:44 psch 19_20140130-1 is the portaudio version i was running against
18:45 Fleurety joined #perl6
18:45 araujo joined #perl6
18:45 araujo joined #perl6
18:46 FROGGS portaudio.h,v 1.5 2002/03/26 18:04:22
18:48 FROGGS ohh, hold on
18:49 timotimo 2002? %-)
18:49 FROGGS I've also got a libportaudio.so.2
18:50 FROGGS which is libportaudio2 19+svn20140130-1
18:50 psch .so{.\d+,} jungle :/
18:51 psch well, it's not quite a dll-hell, is it vOv
18:51 FROGGS *g*
18:52 FROGGS psch: how can I tell that it is using jackd? https://gist.github.com/FROGGS/9f182b90d616e936a349
18:53 psch FROGGS: looks to me like it can't get any device
18:54 psch FROGGS: you might have to "pulseaudio -k" in case that's running
18:54 psch (and possibly disable to restarting daemon...)
18:54 psch FROGGS: i'd advice trying first without jackd whether it does anything then
18:54 psch FROGGS: you should then hear occassional crackles, because of lots of underruns...
18:56 skids Yes jackd put in autostart I think in a kneejerk reaction to "hey why won't anyone come over here and work on our code" when pulseaudio strated gaining steam.
18:56 skids Then they let the systwide daemon bitrot
18:56 skids Then pulseaudio turned around and said, hey, we really need a systemwide daemon for this.
18:57 skids And the sage never ends
18:57 skids *saga
19:00 pyrimidine we used to have sage in our backyard growing like crazy, so you could say our sage never ended
19:01 psch FROGGS: i've also made the experience that jackd when running doesn't appear as the default device to portaudio
19:01 yqt joined #perl6
19:01 psch FROGGS: which is why you'll probably have check with enum-devices.pl which device id the jackd client sits on
19:02 skids These days I uninstall everything and just use alsa dmix; my needs are not complicated and my patience is limited.
19:02 psch FROGGS: and replace :device(Pa_GetDefaultOutputDevice) with :device($id-you-found) in line 33
19:02 FROGGS psch: I think we need to fix that one too: https://gist.github.com/FROGGS/9f182b90d616e936a349#file-gistfile1-txt-L17
19:03 psch FROGGS: right, iirc that's line 70 in test.pl
19:03 psch FROGGS: the assignment works via an intermediate variable, but not directly
19:04 FROGGS weird, but true
19:05 sufrostico joined #perl6
19:06 FROGGS it seems to have connected to jackd now
19:06 FROGGS but jackd gives: JackAudioDriver::ProcessGraphAsyncMaster: Process error
19:07 FROGGS I don't hear cracks though or anything else
19:13 psch curious
19:13 psch it always either dump its core or segfaulted for me
19:14 * [Coke] wonders again why we need str, gist, perl, dd (and now ddt)
19:14 psch do you have continuous output in the terminal?
19:14 psch i'm still expecting underruns, fwiw
19:14 psch oh but process error
19:15 FROGGS yeah, no idea what that means
19:16 _itz ddt is for debugging :P
19:16 psch FROGGS: did you adjust the constants to what you gave jackd?
19:16 psch SAMPLE_RATE and FRAMES_PER_BUFFER that is
19:16 FROGGS ummm
19:17 n0tjack joined #perl6
19:18 FROGGS now I did, but still get the process error
19:19 [Coke] _itz: maybe it should be part of the debugger, than.
19:19 [Coke] *then.
19:20 psch FROGGS: did you check the device id and give that to Pa_StreamParameters?
19:20 _itz that was a jokey reference to the banned 1950s DDT .. dd is in core
19:21 psch FROGGS: aside from that i'd say "check with another jack-capable program", but "process error" sounds like it's our fault...
19:21 FROGGS psch: why do I have to do such much manually?
19:21 jercos audio is hard, let's go shopping?
19:22 psch FROGGS: because the bindings are 1/4th finished and i wanted to have a working base first :/
19:22 FROGGS *g*
19:22 * moritz doesn't like shopping
19:22 psch also what jercos++ says
19:22 * timotimo doesn't like shooping either
19:23 moritz in fact, I mostly prefer compiler hacking over shopping
19:23 psch FROGGS: thing is, from the list of available device the user has to chose one if the default isn't the right one
19:23 FROGGS psch: what device do I chose? default, pulse, system, hdmi or intel?
19:23 psch FROGGS: and with jack it never seems to be the right one... vOv
19:23 moritz (except when it's in an electronic or hardware store, and I have unlimited budget :-)
19:23 psch FROGGS: that depends on which device jackd says it has, but if you have pulse that might muck it up anyway... :/
19:24 n0tjack joined #perl6
19:24 FROGGS psch: jackd prints 'Acquire audio card Audio0', so, device 0?
19:25 FROGGS psch: now I get a lot of output underflow and then it exits gracefully
19:26 psch FROGGS: but jackd says it got a connection?
19:26 FROGGS no, doesnt say anything
19:27 skids jackd never says anything useful except when you poke it with specially designed cattle prods (included).
19:28 FROGGS device=4 hangs, and when I ctrl+c, it prints something
19:28 FROGGS ohh!
19:28 FROGGS device=6 makes some peeping noise, and then segfaults :D
19:28 psch \o/
19:29 FROGGS and jackd prints process error :o)
19:29 psch i have no idea how to reliably figure out the right device, fwiw
19:29 psch i've been guessing locally and got something similar :P
19:30 psch anyway, i'm pretty sure the program talking to jackd shouldnt be driven to segfault if it continuously underruns
19:30 moritz panda help; # resolve stage failed for help: Project help not found in the ecosystem
19:31 moritz panda # without args: no output at all
19:31 espadrine joined #perl6
19:31 tadzik --help is there
19:31 tadzik that's what MAIN does by default
19:31 FROGGS psch: do you insist on pulseaudio? or do you just want to get sound running?
19:31 * moritz not intellligent enough
19:31 tadzik the move to install being the default action is kind of like that :/
19:31 tadzik moritz: I think both of those cases should do help, and can be done to do so
19:31 psch FROGGS: portaudio.  because low-latency and portable, and yes, i need the low latency at least
19:32 FROGGS adding a positional 'help' candidate won't hurt
19:32 n0tjack joined #perl6
19:32 FROGGS psch: have you played with libSDL_audio?
19:34 psch FROGGS: i haven't tried using it for what i wanted to use the portaudio bindings for, no
19:35 dalek doc: ceed374 | moritz++ | lib/Pod/Convenience.pm6:
19:35 dalek doc: Fix flattening in pod-with-title
19:35 dalek doc: review: https://github.com/perl6/doc/commit/ceed374176
19:35 moritz has anybody tried htmlify.p6 in perl6/doc post-glr?
19:41 FROGGS psch: I think one problem is that moar tries to manage the mem of the output buffer in the callback
19:41 timotimo so it ends up calling free() on it?
19:41 n0tjack joined #perl6
19:42 FROGGS seems so
19:42 FROGGS and before I changed the param to a CArray directly (used to be a Pointer we casted to CArray), it realloced the CArray I think
19:43 timotimo ugh
19:44 FROGGS I know we mark strings in callbacks, but I dunno yet if we mark other stuff as well
19:45 FROGGS now it segfaults during a GC run
19:51 n0tjack joined #perl6
19:54 moritz m: Pod::Heading.new(:level(1), :contents['a', 'b'])
19:54 camelia rakudo-moar 0c79be: ( no output )
19:54 moritz m: Pod::Heading.new(:level(1), :contents['a', 'b']).contents.^name.say
19:54 camelia rakudo-moar 0c79be: OUTPUT«Array␤»
19:57 ggoebel joined #perl6
20:02 n0tjack joined #perl6
20:05 moritz m: say 'a b c'.subst(:g, /\s+/, '_')
20:05 camelia rakudo-moar 0c79be: OUTPUT«a_b_c␤»
20:07 moritz I have a very weird thing here while debugging htmlify.p6
20:07 moritz it dies with "Type check failed in binding <anon>; expected 'Positional' but got 'Str'"
20:08 moritz the line it points it $someString.subst(:g, /\s+/, '_')
20:08 moritz *it points to is
20:09 moritz and before this I've added lines with warn(), say() and die() calls
20:09 moritz and none of them seem to have any effect, except that they change the line number of the error
20:09 moritz but it's clearly a run-time error, since other run-time statements before it are also executed
20:11 * skids was beating his head on that earlier, too.
20:12 skids You have to carefully watch the line number, since there are probably multiple problem points in the code.
20:12 skids I found any kind of .map or such where the .subst is causes the issue.
20:13 skids Delete that .subst, and the error goes to another pat of the code.
20:13 moritz that is... decidedly ungood
20:13 skids Split the params of the subst up on different lines, and it ends up on the matcher/1st arg.
20:13 moritz plus ungood, even
20:14 skids And --ll-backtrace just tells you it happenned in bind, which we already knew.
20:17 skids What I can't figure out is how the error can sometimes report on the "once {" above which would seem to bear no resemblance at all.
20:18 moritz skids: do you get the same phenomenon that debug output before the error location doesn't seem to work?
20:21 skids Yeah well, I threw a "say" in the concat and it did nothing.
20:22 nightfrog joined #perl6
20:23 n0tjack joined #perl6
20:25 moritz skids: it seems the error message points us to a totally wrong line
20:25 moritz for @definitions -> [$sk, $name] {
20:26 moritz @definitions.perl says ["Reference", "creation"]
20:26 moritz so there's a level of nesting missing
20:26 skids Huh, I get mine on htmlify line 424ish
20:27 moritz skids: that's what the error message says, but that's not where the error occurs
20:28 tokuhiro_ joined #perl6
20:28 jdv79 is there really a dd and ddt?
20:28 moritz m: dd [1, 2]
20:28 camelia rakudo-moar 0c79be: OUTPUT«[1, 2]␤»
20:28 moritz m: ddt [1, 2]
20:28 camelia rakudo-moar 0c79be: OUTPUT«5===SORRY!5=== Error while compiling /tmp/TNqaPHGd66␤Undeclared routine:␤    ddt used at line 1. Did you mean 'dd'?␤␤»
20:28 moritz seems there's a dd, no ddt
20:28 jdv79 ok
20:29 jdv79 [Coke]: what are you talking about then?
20:31 brrt larry wall yapc::eu keynote: https://youtu.be/RvCkvXvqi3U
20:31 skids moritz: indeed, fixing the single-arg issue there lets it run much further.
20:31 psch https://github.com/rakudo/rakudo/pull/529 has ddt
20:36 dalek doc/htmlify-glr: d1363d6 | moritz++ | htmlify.p6:
20:36 dalek doc/htmlify-glr: Fix fallout from the single-arg rule
20:36 dalek doc/htmlify-glr: review: https://github.com/perl6/doc/commit/d1363d62cb
20:44 skids moritz: that push made a new branch... intentionally?
20:44 dha joined #perl6
20:44 moritz skids: yes; I'm afraid it (or the next commit) will break the build under pre-glr
20:44 skids OK, just checking
20:45 moritz m: my @a = Pod::FormattingCode.new(type => "X", meta => [["declarator", "sub"],], config => {}, contents => ["Subroutines"]).meta[0]; say @d.perl
20:45 camelia rakudo-moar 0c79be: OUTPUT«5===SORRY!5=== Error while compiling /tmp/95e0BmUaYs␤Variable '@d' is not declared␤at /tmp/95e0BmUaYs:1␤------> 3ntents => ["Subroutines"]).meta[0]; say 7⏏5@d.perl␤»
20:45 moritz m: my @a = Pod::FormattingCode.new(type => "X", meta => [["declarator", "sub"],], config => {}, contents => ["Subroutines"]).meta[0]; say @a.perl
20:45 camelia rakudo-moar 0c79be: OUTPUT«[["declarator", "sub"],]␤»
20:46 moritz why?
20:46 moritz m: say Pod::FormattingCode.new(type => "X", meta => [["declarator", "sub"],], config => {}, contents => ["Subroutines"]).meta[0].perl
20:46 camelia rakudo-moar 0c79be: OUTPUT«["declarator", "sub"]␤»
20:47 moritz why doesn't the single-arg rule flatten that out when assigning it to an array?
20:47 * moritz notices he still doesn't have a reliable mental of post-glr (non-)flattening
20:48 skids Is .meta a scalar maybe?
20:49 moritz if it makes a difference, .perl should inform me about it, no?
20:50 skids m: my $a = [1,2]; my @b = $a; $a.perl.say; @b.perl.say;
20:50 camelia rakudo-moar 0c79be: OUTPUT«[1, 2]␤[[1, 2],]␤»
20:50 skids m: my $a := [1,2]; my @b = $a; $a.perl.say; @b.perl.say;
20:50 camelia rakudo-moar 0c79be: OUTPUT«[1, 2]␤[1, 2]␤»
20:51 skids The first $a.perl could perhaps be $[]
20:52 skids The breaking of the transparency of Scalar was a necessary consequence of GLRR, I don;t now how far we want to let that bleed though.
20:53 dalek doc/htmlify-glr: 6770eb8 | moritz++ | htmlify.p6:
20:53 dalek doc/htmlify-glr: Another GLR fix
20:53 dalek doc/htmlify-glr: review: https://github.com/perl6/doc/commit/6770eb8e39
20:54 moritz enough hacking for tonight
20:54 moritz good * everybody&
20:55 FROGGS gnight moritz
20:55 skids And for that matter, even as a scalar it should have let the .[] through to what it contained.
20:55 skids o/
20:55 n0tjack joined #perl6
20:59 skids m: class A { has @.a is rw }; my $f = A.new(a => [[1,2],]); $f.a[0].say; $f.a[0].WHAT.say; $f.a[0].VAR.WHAT.say; my @b = $f.a[0]; @b.perl.say;
20:59 camelia rakudo-moar 0c79be: OUTPUT«[1 2]␤(Array)␤(Scalar)␤[[1, 2],]␤»
21:00 n0tjack joined #perl6
21:06 n0tjack joined #perl6
21:15 n0tjack joined #perl6
21:21 AlexDaniel joined #perl6
21:26 dalek rakudo-star-daily: 9715a26 | coke++ | log/ (9 files):
21:26 dalek rakudo-star-daily: today (automated commit)
21:26 dalek rakudo-star-daily: review: https://github.com/coke/rakudo-star-daily/commit/9715a26ae0
21:27 dha joined #perl6
21:28 n0tjack joined #perl6
21:38 dha Would it be wrong to say that one can think of state variables in this way: They are lexically scoped in terms of access, but the contents of the variable are maintained between calls as they would be if the variable had been declared globally?
21:40 dha I understand that saying that initialization occurs only once is probably the more accurate way to put it, but I find that could be confusing, depending on what one thinks "initialization" is.
21:43 jercos I would say that's correct in so far as my understanding of their relation to C static variables.
21:44 jercos It may not be a technically accuracte description of their function, but I don't see a way in which that understanding would cause unintended behavior.
21:59 japhb dha: You need to be clear about the interaction of state variables and closure clones.  Talking about global declarations gives people a different sense of how sharing works (or doesn't).
22:00 [Coke] ddt - there was a pull request
22:00 n0tjack joined #perl6
22:03 Lou_ joined #perl6
22:04 Lou_ left #perl6
22:09 dha Ok, what do I need to know about closure clones?
22:10 dha And, just to be clear, that was a "you can think of it in these terms, but it's not necessarily accurate"
22:23 tokuhiro_ joined #perl6
22:24 justcheckingin joined #perl6
22:28 atweiden joined #perl6
22:33 n0tjack joined #perl6
22:53 sufrostico joined #perl6
23:04 krakan joined #perl6
23:05 Timbus m: if my $things := (1,2,3,4).grep(*>2) { say $things>>.Str; }
23:05 camelia rakudo-moar 0c79be: OUTPUT«This Seq has already been iterated, and its values consumed␤  in block <unit> at /tmp/X1g5zFXR6z:1␤␤»
23:05 Timbus m: my $things := (1,2,3,4).grep(*>2); say $things>>.Str;
23:05 camelia rakudo-moar 0c79be: OUTPUT«(3 4)␤»
23:05 stux|RC-only joined #perl6
23:05 n0tjack joined #perl6
23:06 Timbus whyfor :/
23:06 psch m: with (1,2,3,4).grep( * > 2 ) -> $things { $things.say }
23:06 camelia rakudo-moar 0c79be: OUTPUT«(3 4)␤»
23:06 psch m: if (1,2,3,4).grep( * > 2 ) -> $things { $things.say } # although if works here as well
23:06 camelia rakudo-moar 0c79be: OUTPUT«(3 4)␤»
23:07 Timbus where the heck did 'with' come from
23:07 Timbus thats cool
23:07 psch m: if (^3).grep( * < 1 ) -> $things { $things.say } # doesn't here
23:07 camelia rakudo-moar 0c79be: OUTPUT«(0)␤»
23:07 psch oh
23:07 psch list with one elem
23:07 psch nvm
23:07 psch m: if 0 -> $f { say "huh" }; with 0 -> $f { say "hah!" }
23:07 camelia rakudo-moar 0c79be: OUTPUT«hah!␤»
23:07 psch that's the difference
23:08 Timbus duuude, thats way better than makling  all our stuff return 0 but True
23:08 psch Timbus: i think that's probably pretty close to the reason why it got implemented :)
23:10 Timbus that's cool. but that's still odd re: list  reiteration
23:11 isacloud joined #perl6
23:12 lizmat joined #perl6
23:13 psch Timbus: yeah, the error is LTA
23:14 psch Timbus: but afaiu this kind of construct (i.e. "if <assignment or binding> { }") is somewhere in the area of DIHWIDT
23:14 skids joined #perl6
23:16 lizmat computer, messages ?
23:16 lizmat guess not
23:16 * lizmat waves from Lyon
23:16 psch hi lizmat o/
23:16 lizmat psch o/
23:17 Timbus well, it's fairly common to assign in an if, though..
23:18 Timbus at least, the perl5 code at my work is littered with it. some of which I put there.
23:18 psch m: if my $x = 5 { }; say $x
23:18 camelia rakudo-moar 0c79be: OUTPUT«5␤»
23:19 Timbus aaaa
23:19 Timbus aaah no
23:19 psch Timbus: P5 special-cases it so that that doesn't happen :)
23:19 Timbus so thats a thing, huh
23:19 psch ...maybe not really special-casing, i guess
23:19 lizmat dd my $i = 42
23:19 psch P6 scoping is a bit different, i'm confident in that statement
23:20 lizmat m: dd my $i = 42
23:20 camelia rakudo-moar 0c79be: OUTPUT«$i = 42␤»
23:20 Timbus well, to be fair i use -> instead of assignment, but its the same idea
23:20 psch m: if 5 -> $x { }; say $x
23:20 camelia rakudo-moar 0c79be: OUTPUT«5===SORRY!5=== Error while compiling /tmp/73l27rh5oo␤Variable '$x' is not declared␤at /tmp/73l27rh5oo:1␤------> 3if 5 -> $x { }; say 7⏏5$x␤»
23:21 Timbus yeah.  so that's ok
23:22 psch in contrast:
23:22 psch perl -E'if( my $x = 5 ) { }; say $x, "or else"'
23:22 psch or else
23:24 Timbus yeah, the scoping is different, that's fine. my initial example only used := instead of -> to make it more clear the 'if' block is doing something special. the arrow makes it less clear.
23:25 psch m: say (^5).grep(*>2).WHAT
23:25 camelia rakudo-moar 0c79be: OUTPUT«(Seq)␤»
23:25 psch m: my $x := (^5).grep(*>2); say $x>>.Str; say $x>>.Str
23:25 camelia rakudo-moar 0c79be: OUTPUT«(3 4)␤This Seq has already been iterated, and its values consumed␤  in block <unit> at /tmp/y9PZ6pcQrm:1␤␤»
23:26 psch Timbus: the if block isn't doing anything special
23:26 Timbus oh..
23:26 psch Timbus: Seq is an ephemeral class, after evaluation it returns something Associative (i think..?) and breaks
23:27 psch Timbus: but you bound the Seq to a variable
23:27 psch and it's already broken
23:27 psch which is why i'm saying the error is somewhat LTA :)
23:28 Timbus what makes it broken straight away? oh, the evaluation of its truthiness?
23:29 psch yeah
23:29 Timbus mmh. either way, will use 'with' and probably switch to @'s, cheers
23:29 psch Timbus: the sigil isn't the problem, the binding is
23:30 psch ...i thought, but that's apparently wrong
23:30 psch it is the sigil
23:30 telex joined #perl6
23:30 Timbus :)
23:30 psch those post-glr semantics...
23:31 psch i really should get around to reading what changed :/
23:32 n0tjack joined #perl6
23:32 Timbus feels a little magical atm.. i guess it must just be sufficiently advanced
23:32 psch i *think* the rule in general is "don't secretly flatten"
23:33 psch but that rule has consequences that seem unintuitive...
23:33 psch m: say [[1,]]; say [[1],]
23:33 camelia rakudo-moar 0c79be: OUTPUT«[1]␤[[1]]␤»
23:33 dalek rakudo/nom: 49e9745 | lizmat++ | src/core/Any.pm:
23:33 dalek rakudo/nom: Usurp PR #529 into dd, itz++
23:33 dalek rakudo/nom:
23:33 dalek rakudo/nom: No point keeping a separate dd and ddt in my view.
23:33 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/49e9745dad
23:37 lizmat in about 7 hours there's the patch -p3 hackathon: http://patch.pm
23:37 lizmat better get some sleep&
23:39 dalek rakudo/cu_load: b410729 | TimToady++ | src/ (13 files):
23:39 dalek rakudo/cu_load: early hackage to distinguish .cache from .list
23:39 dalek rakudo/cu_load: review: https://github.com/rakudo/rakudo/commit/b410729b44
23:39 dalek rakudo/cu_load: 834c805 | TimToady++ | / (8 files):
23:39 dalek rakudo/cu_load: Merge branch 'nom' into list-v-cache
23:39 dalek joined #perl6
23:43 raiph joined #perl6
23:52 psch Timbus: the alternative to assigning a Seq to an @-sigilled variable is calling .cache on the Seq, fyi
23:52 psch m: my $x = (^5).grep(*>2); say $x>>.Str; say $x.cache>>.Str;
23:52 camelia rakudo-moar 49e974: OUTPUT«(3 4)␤This Seq has already been iterated, and its values consumed␤  in block <unit> at /tmp/D1imEvAmwu:1␤␤»
23:52 psch m: my $x = (^5).grep(*>2); say $x.cache>>.Str; say $x.cache>>.Str;
23:52 camelia rakudo-moar 49e974: OUTPUT«(3 4)␤(3 4)␤»
23:53 Timbus i see. kinda
23:53 psch ...i'm still not 100% sure on the meaning of some of those things, though :)
23:54 psch m: my $x = (^5).grep(*>2).cache; say $x>>.Str; say $x>>.Str;
23:54 camelia rakudo-moar 49e974: OUTPUT«(3 4)␤(3 4)␤»
23:56 n0tjack joined #perl6

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

Perl 6 | Reference Documentation | Rakudo