Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2015-01-13

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:07 adu why can't I access enum members?
00:07 yoleaux 12 Jan 2015 11:38Z <timotimo> adu: perl6 .new() isn't like __init__ or __new__, it's like python's .frob or .blubber or .yoink; also, new calls bless calls BUILDALL calls BUILD unlike what geekosaur said, and skids wrongly wrote bless(*, ...), but the * as first argument is wrong nowadays
00:07 yoleaux 12 Jan 2015 11:44Z <moritz> adu: see http://perlgeek.de/blog-en/perl-6/object-construction-and-initialization.html and http://doc.perl6.org/language/classtut#Constructors
00:07 masak adu: indeed, why can't you?
00:07 masak m: enum Foo <a b>; say b
00:07 camelia rakudo-moar 050686: OUTPUT«b␤»
00:07 masak I can ;)
00:08 adu http://pastie.org/9828545
00:09 masak no idea from just that paste.
00:10 adu the only difference I can think of is that CAST::Op is a class, and CAST::Type is a role
00:10 TimToady so name it with the class it ends up with instead?
00:11 adu I can't just s/role/class/ because then I'd have to change 12 files
00:12 TimToady .oO("We can't fix this--we have 11 users already...")
00:13 adu ok, it works if CAST::Type is a class
00:13 TimToady enum names work more like sub names than like methods
00:14 TimToady arguably, it might be possible to make the role names work instead, but I'd like jnthn++'s opionion on that
00:15 adu so I should move the enum somewhere else?
00:15 adu can I put enums in their own file?
00:15 TimToady roles are primarily for abstracting sets of methods, and have not been heavily thought through for other generic purposes
00:16 TimToady I don't see why not, offhand
00:16 TimToady could certainly be put into their own module and exported
00:16 TimToady assuming we fixed that
00:20 TimToady m: module Stuff { enum MyEnum is export <foo bar baz>; }; import Stuff; say baz
00:20 camelia rakudo-moar 050686: OUTPUT«baz␤»
00:20 TimToady yes, fixed last Friday
00:20 TimToady I guess Perl 6 is mature now :P
00:21 * TimToady kinda thought that whole discussion was a little silly to anyone who has had a 14-year-old in the house
00:21 TimToady they generally oscillate in maturity ±10 years or so
00:23 TimToady so you should not be astonished if Perl 5 acts 24 one day and 4 the next day...
00:28 TimToady s/5/6/  # can't spell today
00:29 TimToady .oO(Can you call it spelling if it's numbers? If not, what do you call it?)
00:31 masak counting.
00:31 TimToady but I wasn't counting, I was just typing a digit
00:32 adu uh oh
00:32 adu Type check failed in assignment to '$!op'; expected 'CAST::OpKind' but got 'OpKind'
00:32 masak ooh :)
00:32 adu I'm so confused
00:32 TimToady if I accidentally typed 555 instead of 666, would that be miscounting the Number of the Beast?
00:33 TimToady that seems wrongish
00:34 adu TimToady: is it supposed to do that?
00:34 TimToady my last utterance was your answer
00:35 TimToady exporting a type should not make it a different type
00:36 adu https://github.com/andydude/p6-c-parser/blob/cast-version-2/lib/CAST/OpKind.pm6
00:37 japhb .oO( 668 -- the number of the neighbor of the beast )
00:37 adu but what's really puzzling me is that it should be CAST::OpKind::OpKind::call that works, but CAST::OpKind::call also works
00:37 TimToady CAST::OpKind is the name of the module, not the name of the enum
00:38 adu but then why would both work?
00:38 TimToady because enum exports to its immediate surroundings
00:38 TimToady m: my enum X <a b c>; say X::a: say a
00:38 adu ah
00:38 camelia rakudo-moar 050686: OUTPUT«a␤Cannot call 'say'; none of these signatures match:␤:(Obsolete:D $: *%_)␤:($: *%_)␤  in block <unit> at /tmp/76vcJh8XGq:1␤␤»
00:39 TimToady oh, X is taken
00:39 TimToady m: my enum XX <a b c>; say XX::a: say a
00:39 camelia rakudo-moar 050686: OUTPUT«a␤Cannot call 'say'; none of these signatures match:␤:(Obsolete:D $: *%_)␤:($: *%_)␤  in block <unit> at /tmp/UjQGzde8PW:1␤␤»
00:39 TimToady um...
00:39 masak colon.
00:39 TimToady ah
00:39 TimToady m: my enum XX <a b c>; say XX::a; say a
00:39 camelia rakudo-moar 050686: OUTPUT«a␤a␤»
00:41 TimToady error message is a bit LTA though
00:41 TimToady m: my enum XX <a b c>; say XX::a.^methods
00:41 camelia rakudo-moar 050686: OUTPUT«enums pair perl pick roll Int invoke Str Numeric gist kv key value Int Num Rat FatRat abs Bridge chr sqrt base expmod is-prime floor ceiling round lsb msb narrow Range sign conj rand sin asin cos acos tan atan atan2 sec asec cosec acosec cotan acotan sinh …»
00:42 TimToady m: my enum XX <a b c>; say XX::a.say(a)
00:42 camelia rakudo-moar 050686: OUTPUT«Cannot call 'say'; none of these signatures match:␤:(Obsolete:D $: *%_)␤:($: *%_)␤  in block <unit> at /tmp/1rxt9WMdaV:1␤␤»
00:42 adu my enum XX <a b c>; my XX $kind; say $kind;
00:42 adu m: my enum XX <a b c>; my XX $kind; say $kind;
00:42 camelia rakudo-moar 050686: OUTPUT«(XX)␤»
00:42 adu maybe the error is actually that it's Nil
00:44 dayangkun joined #perl6
00:49 ajr joined #perl6
00:51 skids joined #perl6
00:53 kaare__ joined #perl6
00:53 Mso150_e joined #perl6
00:54 masak 'night, #perl6
00:58 colomon joined #perl6
01:01 ajr_ joined #perl6
01:11 cognominal joined #perl6
01:18 Ven joined #perl6
01:20 yeahnoob joined #perl6
01:21 adu TimToady: I figured it out
01:22 adu I had to declare it "my OpKind" instead of "my CAST::OpKind"
01:22 adu I still don't quite understand why there is any difference between the two
01:22 adu s/my/has/
01:22 TimToady CAST::OpKind is the name of the module, not anything in it or exported from it
01:22 adu ah
01:23 adu so CAST::OpKind::OpKind might have worked
01:23 TimToady nod
01:23 * adu needs to think more
01:24 * TimToady thinks adu++ needs to give the enum a different name from the module
01:24 adu lol
01:24 adu maybe CAST::Ops::OpKind?
01:25 * TimToady thinks adu++ needs to give the module a different name from the enum, rather
01:25 adu :)
01:26 * TimToady ponders the pragmatic ambiguity of "make these things different"
01:29 Rounin joined #perl6
01:37 raydiak good evening, #perl6
01:38 raydiak m: Buf.new.[0, 1] = 2, 3 # this should be reported as a bug, correct?
01:38 camelia rakudo-moar 050686: OUTPUT«Cannot modify an immutable Int␤  in method STORE at src/gen/m-CORE.setting:8022␤  in sub postcircumfix:<[ ]> at src/gen/m-CORE.setting:2829␤  in block <unit> at /tmp/r28g6o8w_a:1␤␤»
01:38 TimToady already reported, I think
01:38 raydiak thank you
01:38 TimToady but you might make sure there's a test :)
01:39 * raydiak looks
01:42 raydiak hm...I see buf scattered across several test files, not sure where it would belong, still looking
01:47 adu how do I get a character from a string?
01:48 adu raydiak!
01:48 raydiak maybe it would go in S09-subscript/slice.t ?
01:48 raydiak adu!
01:51 raydiak there's also S03-operators/buf.t , kinda feels like a better place in with other buf stuff, but idk if slicing tests would go with "operators" or not
01:52 BenGoldberg joined #perl6
01:52 raydiak adu: if you mean "a character by index", that's .substr
01:53 adu raydiak: thanks
01:53 raydiak you're welcome :)
01:53 raydiak bah gotta run for a bit already...back in a while
02:06 vukcrni joined #perl6
02:24 adu how do I parse an int?
02:24 adu m: Int("5")
02:24 camelia rakudo-moar 050686: ( no output )
02:24 adu m: say Int("5")
02:24 camelia rakudo-moar 050686: OUTPUT«5␤»
02:25 adu wow
02:28 japhb adu: Or just +, if you can accept any Numeric value.
02:28 colomon note, however
02:28 japhb m: say +"5.24", +"3", +"4+5i";
02:28 camelia rakudo-moar 050686: OUTPUT«5.2434+5i␤»
02:29 colomon m: say Int("5 fish")
02:29 camelia rakudo-moar 050686: OUTPUT«Cannot convert string to number: trailing characters after number in '5⏏ fish' (indicated by ⏏)␤  in method Int at src/gen/m-CORE.setting:13942␤  in method Int at src/gen/m-CORE.setting:6237␤  in block <unit> at /tmp/4DY6uXgHT9:1␤␤»
02:29 japhb m: .say for +"5.24", +"3", +"4+5i";
02:29 camelia rakudo-moar 050686: OUTPUT«5.24␤3␤4+5i␤»
02:29 japhb m: .WHAT.say for +"5.24", +"3", +"4+5i";
02:29 camelia rakudo-moar 050686: OUTPUT«(Rat)␤(Int)␤(Complex)␤»
02:30 skids I must say the error messages have become so awesome it's almost easier to code perl6 scripts than perl5.
02:30 skids They usually tell me exactly where the typo/thinko is and what it is.
02:33 skids The only exception being when Any hits a string or numeric context (line number often wrong) and when a undefined type object is hit (doesn't say what type the undef was).
02:34 bjz joined #perl6
02:39 b2gills m: multi sub test ( int \a ){ say a.WHAT; say 'int' }; multi sub test ( Int \a ){ say a.WHAT }; test (my int $ = 1);
02:39 camelia rakudo-moar 050686: OUTPUT«(Int)␤int␤»
02:40 b2gills Nevermind, of course it promotes it to an Int if you use a method on it.
02:43 skids m: multi sub test ( int \a ){ say a ~~ int; say 'int' }; multi sub test ( Int \a ){ say a.WHAT }; test (my int $ = 1);
02:45 camelia rakudo-moar 050686: OUTPUT«False␤int␤»
02:45 cognominal joined #perl6
02:45 raydiak back
02:45 raydiak putting my buf slice test in S09-subscript/slice.t unless anyone objects
02:47 b2gills The most difficult things in programming is naming things, the second most difficult thing is figuring out where to put the tests
02:48 raydiak and I guess third is finding the ticket number I should attach to the test :)
02:51 raydiak ah well, will report just in case, better to have a dup than none
02:56 adu joined #perl6
03:04 skids m: my %d; %d.push("b" => "c"); %d.perl.say; %d.push(:a(1)); %d.perl.say;
03:04 camelia rakudo-moar 050686: OUTPUT«("b" => "c").hash␤("b" => "c").hash␤»
03:06 _4d47 whats the best way to include ./lib to run a module tests ? ufo, @*INC, export PERL6LIB ?
03:06 colomon prove -e "perl6 -Ilib" t/whatever
03:06 colomon dunno if that's best, but it's what I always do.  :)
03:07 raydiak m: sub foo { @_.perl.say }; foo("b" => "c"); foo(:a(1));
03:07 camelia rakudo-moar 050686: OUTPUT«Array.new("b" => "c")␤Unexpected named parameter 'a' passed␤  in sub foo at /tmp/PWMdgm4LZB:1␤  in block <unit> at /tmp/PWMdgm4LZB:1␤␤»
03:07 kurahaupo joined #perl6
03:08 _4d47 cool thanks i like it
03:08 skids I've been staring to move away from @*INC to "use lib './lib';"
03:16 raydiak is "#?rakudo skip 'RT #123594'" the right thing to do when adding a test which currently fails?
03:16 synopsebot Link: https://rt.perl.org/rt3//Public/Bug/Display.html?id=123594
03:16 raydiak idk much about those magic little comments we have in roast
03:24 * raydiak figures out how to read the README and use fudge to answer his own question (the answer seems to be yes)
03:25 dalek roast: b8e8171 | raydiak++ | S09-subscript/slice.t:
03:25 dalek roast: Add test for RT #123594
03:25 dalek roast: review: https://github.com/perl6/roast/commit/b8e8171176
03:25 synopsebot Link: https://rt.perl.org/rt3//Public/Bug/Display.html?id=123594
03:28 noganex joined #perl6
03:29 skids heh.  bot chaining win.
03:50 telex joined #perl6
04:02 kurahaupo left #perl6
04:14 adu joined #perl6
04:25 anaeem1 joined #perl6
04:31 yeahnoob joined #perl6
04:34 adu lol
04:36 adu I think I just came up with a name for this
04:36 adu transformation between c syntax and semantics
04:38 yeahnoob joined #perl6
04:39 yeahnoob joined #perl6
04:39 yeahnoob joined #perl6
04:40 yeahnoob joined #perl6
04:46 tinyblak joined #perl6
04:47 tinyblak joined #perl6
04:50 kaleem joined #perl6
04:55 tinyblak_ joined #perl6
05:13 tinyblak joined #perl6
05:14 kurahaupo joined #perl6
05:20 tinyblak_ joined #perl6
05:36 vendethiel joined #perl6
05:40 tinyblak joined #perl6
05:48 kurahaupo joined #perl6
06:00 Rounin joined #perl6
06:05 xfix joined #perl6
06:08 rindolf joined #perl6
06:08 sirdancealot joined #perl6
06:13 yeahnoob joined #perl6
06:16 yeahnoob joined #perl6
06:27 moritz m: .say for  Signature.^attributes.map: { .^name }
06:27 camelia rakudo-moar 050686: OUTPUT«BOOTSTRAPATTR␤BOOTSTRAPATTR␤BOOTSTRAPATTR␤BOOTSTRAPATTR␤BOOTSTRAPATTR␤»
06:28 moritz m: .say for  Rat.^attributes.map: { .^name }
06:28 camelia rakudo-moar 050686: OUTPUT«Attribute␤Attribute␤»
06:42 kaleem joined #perl6
06:57 szabgab joined #perl6
07:03 [Sno] joined #perl6
07:11 Patterner joined #perl6
07:21 darutoko joined #perl6
07:33 gfldex joined #perl6
07:47 FROGGS joined #perl6
07:51 FROGGS[mobile] joined #perl6
07:59 eiro joined #perl6
07:59 eiro hello
08:01 FROGGS[mobile] hi
08:05 JimmyZ ????
08:16 zakharyas joined #perl6
08:21 FROGGS joined #perl6
08:29 davido_ joined #perl6
08:35 Ugator joined #perl6
08:37 eternaleye joined #perl6
08:55 fhelmberger joined #perl6
08:59 CurtisOvidPoe m: say 1/(.1 + .2 - .3) # divide by zero error
08:59 camelia rakudo-moar 050686: OUTPUT«Type check failed for return value; expected 'Int' but got 'Failure'␤  in any return_error at src/vm/moar/Perl6/Ops.nqp:649␤  in method floor at src/gen/m-CORE.setting:11400␤  in method Str at src/gen/m-CORE.setting:11421␤  in method gist at src/ge…»
08:59 CurtisOvidPoe I don’t know how easy it would be, but a more user-friendly error message might help there.
09:00 moritz agreed
09:00 moritz iirc we have a bug report open for that
09:00 CurtisOvidPoe m: say 1.1/(.1 + .2 - .3)
09:00 camelia rakudo-moar 050686: OUTPUT«Type check failed for return value; expected 'Int' but got 'Failure'␤  in any return_error at src/vm/moar/Perl6/Ops.nqp:649␤  in method floor at src/gen/m-CORE.setting:11400␤  in method Str at src/gen/m-CORE.setting:11421␤  in method gist at src/ge…»
09:00 CurtisOvidPoe That’s strange. I would expect that it would at least say “expected ‘Real’”
09:00 lizmat m: 1.1 / (my $a = 0)
09:00 camelia rakudo-moar 050686: ( no output )
09:01 lizmat m: say 1.1 / (my $a = 0)
09:01 camelia rakudo-moar 050686: OUTPUT«Type check failed for return value; expected 'Int' but got 'Failure'␤  in any return_error at src/vm/moar/Perl6/Ops.nqp:649␤  in method floor at src/gen/m-CORE.setting:11400␤  in method Str at src/gen/m-CORE.setting:11421␤  in method gist at src/ge…»
09:01 CurtisOvidPoe moritz: thanks.
09:01 moritz CurtisOvidPoe: it's from some internal helper function
09:01 lizmat method floor(Rational:D:) returns Int:D {
09:01 FROGGS[mobile] joined #perl6
09:01 lizmat maybe we need to lose the "returns Int:D ?
09:02 CurtisOvidPoe Unfortunately, that’s a from a key slide in my talk and I can’t omit that example.
09:02 jnthn morning, #perl6
09:02 CurtisOvidPoe Question: “returns Int” makes sense to me, but what does the :D mean?
09:02 moritz lizmat: if it can fail, yes
09:02 * lizmat tries and runs spectest
09:02 moritz CurtisOvidPoe: that it's a defined Int
09:02 jnthn lizmat: Sounds like the Int:D is overly restrictive, yes.
09:03 moritz CurtisOvidPoe: ie not the type object
09:04 lizmat $ 6 'say 1/(my $a=0)'
09:04 lizmat Divide by zero
09:04 lizmat is that better ?
09:05 jnthn Surely... :)
09:05 lizmat CurtisOvidPoe: is that what you expect?
09:06 lizmat $ 6 'my $a = 1/($=0); say $a.WHAT; say $a'
09:06 lizmat (Rat)
09:06 lizmat Divide by zero
09:07 lizmat aka, you *do* get a Rat returned, but as soon as you want to do anything with it, it fails
09:10 moritz if that's a feature, we have to give up all type constraints on return values from methods in Rat
09:11 mvuets joined #perl6
09:12 lizmat some test failures, but from tests checking the exception type (which clearly has changed)
09:12 lizmat moritz: I removed the constraints from Rational.floor/ceiling: they were the only ones with return constraints
09:13 dalek rakudo/nom: 9672c0d | lizmat++ | src/core/Rational.pm:
09:13 dalek rakudo/nom: Rational.floor/ceiling less anal about return vals
09:13 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/9672c0df73
09:14 moritz lizmat++
09:14 abraxxa joined #perl6
09:19 dalek roast: 8da006e | lizmat++ | S03-operators/arith.t:
09:19 dalek roast: Fix changed exception type for 3/0
09:19 dalek roast: review: https://github.com/perl6/roast/commit/8da006e766
09:20 jnthn lizmat: Related: https://rt.perl.org/Ticket/Display.html?id=123077
09:23 jluis joined #perl6
09:24 sqirrel_ joined #perl6
09:33 lizmat afk for ~2 hours&
09:35 moritz m: say 1/0
09:35 camelia rakudo-moar 050686: OUTPUT«Type check failed for return value; expected 'Int' but got 'Failure'␤  in any return_error at src/vm/moar/Perl6/Ops.nqp:649␤  in method floor at src/gen/m-CORE.setting:11400␤  in method Str at src/gen/m-CORE.setting:11421␤  in method gist at src/ge…»
09:35 moritz still the bad old rakudo
09:36 tinyblak joined #perl6
09:38 CurtisOvidPoe lizmat: yes, that’s much better :)
09:39 kjs_ joined #perl6
09:39 dakkar joined #perl6
09:45 masak antenoon, #perl6
09:46 FROGGS o/ #perl6
09:46 FROGGS I'll be at the FOSDEM \o/
09:52 CurtisOvidPoe Yay!
09:57 nwc10 with or without the FROGGletS?
09:58 kaleem joined #perl6
10:02 FROGGS nwc10: without
10:02 FROGGS it is too complicated to get all of 'em with me
10:03 FROGGS I mean, we are talking about four hobbits here (wife + three kids)
10:04 FROGGS I just need to find good topics now and prep my talks :/
10:04 jnthn FROGGS: I'm also pondering topic :)
10:05 jnthn (So you're not alone :))
10:05 FROGGS jnthn: :o)
10:06 FROGGS jnthn: if you have spare topics left at the end... don't hesitate to share please
10:07 JimmyZ NSA! :P
10:07 FROGGS that's certainly a jnthnish topic, aye
10:08 FROGGS I could imagine a NativeCall talk
10:08 rurban joined #perl6
10:08 moritz that would be nice
10:08 moritz speaking of which: both the sqlite and the postgresql client API are great from a nativecall POV
10:08 FROGGS like a walk through...
10:08 FROGGS hmmm
10:09 FROGGS and I bet I can spend more time on NativeCall than on v5 or slangs in general other the other things I usually talk about
10:11 FROGGS moritz: so you'd favour that somebody extends DBDish::Pg?
10:11 jnthn FROGGS: A NativeCall talk would be nice; it tends to be well received by many folks who try it.
10:12 moritz FROGGS: no objections to that, but I just wanted to point to useful APIs that can be cleanly nativecalled (as examples for such a talk)
10:12 FROGGS jnthn: exactly my motivation
10:12 FROGGS moritz: my first thought was: "Shout a libname and we'll bind it!" but I dunno how well that would work out :o)
10:13 slavik joined #perl6
10:13 moritz FROGGS: live demos are always very risky
10:13 jnthn Terribly if somebody shouts "ncurses!" :)
10:14 moritz and I guess you don't want to bind something non-trivial in the front of an audience
10:14 Rounin How awful... Next time you should shout "OpenGL"
10:16 Rounin Then again, repetitive bindings like that can probably be auto-generated to some extent
10:16 * raydiak still hopes to make creating bindings a little less laborious when C::Parser is ready
10:17 * btyler_ also hopes that
10:22 Alina-malina joined #perl6
10:24 FROGGS yeah
10:25 virtualsue joined #perl6
10:25 FROGGS moritz: I guess that live coding is the extrem of live demos, and we all know the rule of live demos :o)
10:27 FROGGS but I might stick to libXML
10:32 dalek rakudo/nom: 39be5fb | jnthn++ | src/Perl6/World.nqp:
10:32 dalek rakudo/nom: Remove dead code.
10:32 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/39be5fb98e
10:32 dalek rakudo/nom: a6ac643 | jnthn++ | src/Perl6/Actions.nqp:
10:32 dalek rakudo/nom: Don't static-inline routine with `is copy` trait.
10:32 dalek rakudo/nom:
10:32 dalek rakudo/nom: Fixes RT#118183.
10:32 synopsebot Link: https://rt.perl.org/rt3//Public/Bug/Display.html?id=118183
10:32 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/a6ac643fde
10:32 dalek roast: 3b76c73 | jnthn++ | S06-traits/is-copy.t:
10:32 dalek roast: Test for RT#118183.
10:32 dalek roast: review: https://github.com/perl6/roast/commit/3b76c73954
10:32 synopsebot Link: https://rt.perl.org/rt3//Public/Bug/Display.html?id=118183
10:34 denis_boyun_ joined #perl6
10:37 tinyblak joined #perl6
10:39 tinyblak joined #perl6
10:39 tinyblak joined #perl6
10:41 masak today's mini-challenge: a 4x4 grid has 24 internal walls. in the power set of these, some of the members are "mazes", by definition grids with a unique path between every two squares. how many mazes exist?
10:41 masak a number is fine. (but it should be found with Perl 6, not with oeis.org)
10:42 masak cute ASCII art is even better.
10:42 tinyblak_ joined #perl6
10:42 tinyblak_ joined #perl6
10:44 moritz is that really a *mini* challenge?
10:44 masak solution can fit in ~50 LoC by my estimate. so yes.
10:48 jnthn 50 lines of Perl 6 can do quite a bit :P
10:59 masak I'm not contesting that.
10:59 tinyblak joined #perl6
11:02 tinyblak joined #perl6
11:03 dalek rakudo/nom: 0885ec3 | jnthn++ | src/Perl6/Grammar.nqp:
11:03 dalek rakudo/nom: Whine about redeclarations of labels.
11:03 dalek rakudo/nom:
11:03 dalek rakudo/nom: Fixes RT#120632.
11:03 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/0885ec3ddf
11:03 synopsebot Link: https://rt.perl.org/rt3//Public/Bug/Display.html?id=120632
11:03 dalek roast: b57a00b | jnthn++ | S04-statements/label.t:
11:03 dalek roast: Test duplicate labels are whined about.
11:03 dalek roast:
11:03 dalek roast: Covers RT#120632.
11:03 dalek roast: review: https://github.com/perl6/roast/commit/b57a00bf87
11:03 synopsebot Link: https://rt.perl.org/rt3//Public/Bug/Display.html?id=120632
11:19 dalek nqp/6pe: 9d6ba70 | jnthn++ | src/vm/moar/QAST/QASTOperationsMAST.nqp:
11:19 dalek nqp/6pe: Map nqp:: ops for parametricity on MoarVM backend.
11:19 dalek nqp/6pe: review: https://github.com/perl6/nqp/commit/9d6ba70ef8
11:19 dalek nqp/6pe: 98b770c | jnthn++ | t/nqp/87-parametric-6model.t:
11:19 dalek nqp/6pe: Some initial tests for 6model parametric ops.
11:19 dalek nqp/6pe: review: https://github.com/perl6/nqp/commit/98b770cc04
11:19 dalek nqp/6pe: f90dd15 | jnthn++ | t/nqp/87-parametric-6model.t:
11:19 dalek nqp/6pe: Basic tests for parameterization interning.
11:19 dalek nqp/6pe: review: https://github.com/perl6/nqp/commit/f90dd1594b
11:27 dalek roast: f031a89 | lizmat++ | S02-types/ (2 files):
11:27 dalek roast: Fudge questionable tests
11:27 dalek roast: review: https://github.com/perl6/roast/commit/f031a89ce7
11:34 masak hah. I don't even recall submitting RT #120632. :)
11:34 synopsebot Link: https://rt.perl.org/rt3//Public/Bug/Display.html?id=120632
11:35 colomon joined #perl6
11:38 jnthn Well, now the redecl error is a-OK :P
11:57 dalek rakudo/nom: 42bb409 | lizmat++ | src/core/ (3 files):
11:57 dalek rakudo/nom: Add custom HashIter constructors
11:57 dalek rakudo/nom:
11:57 dalek rakudo/nom: The idea being that we don't need to figure out at run time what type of
11:57 dalek rakudo/nom: iteration we need.  Hopefully a better target for inlining this way.  Shows
11:57 dalek rakudo/nom: about a 3% speedup in .keys/kv/values/pairs/invert.  Also reads better, I think.
11:57 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/42bb409b95
12:01 lizmat ^^^ also seems to give 1.5% improvement in Text::CSV benchmark
12:01 masak nice!
12:04 uniejo joined #perl6
12:06 tinyblak_ joined #perl6
12:07 tinyblak_ joined #perl6
12:18 grondilu joined #perl6
12:25 vendethiel for previous discussion: wouldn't have Failure as a bottom type make sense?
12:33 TuxCM lizmat, I reworked through my CSV_XS changes and got another 10% while implementing options (see test-t.pl)
12:34 TuxCM lizmat++
12:34 tinyblak joined #perl6
12:40 xfix joined #perl6
12:40 xfix joined #perl6
12:42 tinyblak joined #perl6
12:42 masak vendethiel: TimToady has repeatedly hinted that Failure is effectively our bottom type.
12:45 kaleem joined #perl6
12:56 colomon joined #perl6
12:59 tinyblak joined #perl6
13:00 brrt joined #perl6
13:02 lizmat .oO( in the end, it is all a mistake )
13:03 moritz in some sense, Failure as a bottom type isn't too far off
13:03 moritz because you can call any method on it
13:04 moritz which is a requirement for good bottom type
13:09 psch hi #perl6 \o
13:09 brrt lizmat, in perl6 io, and especially newio, who is responsible for encoding of strings
13:09 brrt btw, 'Buf' is our bag-of-bytes type right
13:10 moritz Blob is the most general bag-of-thingies type
13:11 moritz and Blob[uint8] the most general bag-of-bytes type
13:11 dalek rakudo/nom: fdf18b3 | lizmat++ | src/core/Array.pm:
13:11 dalek rakudo/nom: Streamline Array.at_pos
13:11 dalek rakudo/nom:
13:11 dalek rakudo/nom: - reduce number of boxings/unboxings
13:11 dalek rakudo/nom: - get better errors on Inf/NaN
13:11 dalek rakudo/nom:
13:11 dalek rakudo/nom: Gives about 15% speedup in @a[Int $b] access.  Adding a separate Int candidate
13:11 moritz and Buf is supposed to be writable, but isn't quite yet
13:11 dalek rakudo/nom: did not give the desired speedup effect: not sure why that is, maybe the
13:11 dalek rakudo/nom: overhead of having another candidate?  Unfortunately, not very noticeable
13:11 dalek rakudo/nom: in the test-suite.
13:11 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/fdf18b3b78
13:11 masak moritz: also, Failure gets through most typechecks.
13:11 lizmat m: say Failure ~~ Int
13:11 camelia rakudo-moar 42bb40: OUTPUT«False␤»
13:12 lizmat m: say 1/($=0)
13:12 camelia rakudo-moar 42bb40: OUTPUT«Divide by zero␤  in method Numeric at src/gen/m-CORE.setting:13949␤  in sub infix:<-> at src/gen/m-CORE.setting:4615␤  in method Str at src/gen/m-CORE.setting:11427␤  in method gist at src/gen/m-CORE.setting:4450␤  in sub say at src/gen/m-CORE.se…»
13:12 sirdancealot joined #perl6
13:12 lizmat afk for a few hours&
13:12 masak m: sub foo(--> Int) { fail }; my $x = foo; say "alive"
13:12 camelia rakudo-moar 42bb40: OUTPUT«Type check failed for return value; expected 'Int' but got 'Failure'␤  in any return_error at src/vm/moar/Perl6/Ops.nqp:649␤  in sub foo at /tmp/WcESj2YqJO:1␤  in block <unit> at /tmp/WcESj2YqJO:1␤␤»
13:12 masak huh.
13:13 lizmat that's *exactly* the problem!  :-)
13:13 Rounin joined #perl6
13:13 colomon joined #perl6
13:14 jnthn And making it work has a notable cost.
13:15 FROGGS moritz: there is a subbuf-rw fwiw
13:15 moritz FROGGS: yes
13:15 moritz FROGGS: my point is that it's not mutable in all the places where it should be
13:15 moritz (iirc)
13:15 masak jnthn: one that could be optimized away?
13:15 brrt but anyway. if in perl6 i have a file handle, and I write a string to it, who is going to do the encoding of the string
13:15 FROGGS moritz: correct
13:15 jnthn Suppose we have $a + $b + $c and we statically known all are of type Int
13:15 moritz brrt: the file handle has an encoding associated
13:16 brrt hmm
13:16 brrt what happens if i write something unencodable
13:16 FROGGS brrt: assplosion
13:16 moritz you get an exception, I believe
13:16 jnthn We can not statically inline the second + there, because we cannot rely on return types contributing static knowledge - short of looking deeper.
13:17 jnthn So we push more things towards dynamic optimization, and mostly leave static to be useful for native types.
13:17 jnthn That said, if Int:D rejects failure, we may be able to keep the benefits.
13:19 jack_rabbit joined #perl6
13:21 leont joined #perl6
13:31 tinyblak joined #perl6
13:35 rindolf joined #perl6
13:36 baest_ joined #perl6
13:42 rjbs joined #perl6
13:43 pmichaud joined #perl6
13:43 jack_rabbit joined #perl6
13:51 leont joined #perl6
13:59 anaeem1 joined #perl6
14:00 telex joined #perl6
14:00 kjs_ joined #perl6
14:01 synopsebot joined #perl6
14:02 tinyblak_ joined #perl6
14:06 [Coke] TimToady: how do you feel about renaming isNaN to is-NaN for is-prime parity?
14:06 tinyblak joined #perl6
14:09 rurban joined #perl6
14:16 psch p6: my $x = 5; say nqp::isint(nqp::decont($x)) # this still confuses me
14:16 camelia rakudo-{parrot,moar} 42bb40: OUTPUT«0␤»
14:16 psch especially in tandem with:
14:16 psch $ ./perl6 -e'my $x = 5; say nqp::isint(nqp::decont($x))'
14:16 psch 1
14:16 psch that's perl6-j
14:17 rhr joined #perl6
14:19 jnthn Int in Perl 6 is a P6opaque with a P6bigint located within it.
14:20 jnthn p6: say nqp::isint(Int); say nqp::isint(int);
14:20 camelia rakudo-{parrot,moar} 42bb40: OUTPUT«0␤1␤»
14:20 jnthn I'm a bit curious about the -j discrepancy.
14:23 psch mvm check repr identity, jvm checks for StorageSpec.CAN_BOX_INT
14:25 psch ...at least if i'm looking at the right spots, which is interp.c:2615 and Ops.java:2350
14:32 [Coke] http://imgur.com/gallery/CJfnAL7 - a little nicer than the ones I have!
14:33 tadzik whoa
14:40 skids joined #perl6
14:51 kjs_ joined #perl6
14:56 anaeem1 joined #perl6
15:01 kjs_ joined #perl6
15:02 donaldh joined #perl6
15:03 kaleem joined #perl6
15:27 adu joined #perl6
15:33 treehug88 joined #perl6
15:40 treehug88 joined #perl6
15:44 hoelzro o/ #perl6
15:45 psch o/ hoelzro
15:46 psch jnthn: so jvm is wrong and should also check for REPR id instead of the storagespec?
15:47 psch which means i'll have to do that myself in RakudoJavaInterop, which isn't bad because it gives me a convenient spot to check for values > Long.MAX_VALUE i guess
15:47 spider-mario joined #perl6
15:47 FROGGS joined #perl6
15:48 [Coke] thanks, all you groovy perl6 people.
15:48 FROGGS o/
15:49 jnthn psch: Well, inconsistency is certainly wrong... The JVM way does mean you're asking "can this unbox to a native int"...
15:49 psch o/ FROGGS
15:50 jnthn ...which may be useful.
15:51 jnthn Mebbe try changing it to be inline with Moar and Parrot, and see if spectest is happy.
15:52 psch right, i'll try that and see what falls out
15:52 psch got something else right now though, result will come in about 2 hours i think :)
15:53 * psch will bbl &
16:02 kjs_ joined #perl6
16:06 pyrimidine re: panda, is there a way to run bootstrap/rebootstrap or install w/ different backends?  IN other words, maybe have a panda (for the default) and panda-j/panda-p (for JVM or Parrot)?
16:07 pyrimidine *panda-m (for the default moar) # just to clarify
16:07 FROGGS pyrimidine: that is what you will get in a not too distant future for free
16:08 hoelzro if two multis exist that have the same signature except for a where condition on a parameter, and both wheres match the incoming value, what determines which is called?
16:08 FROGGS pyrimidine: the "eleven" branches of rakudo+panda will create foo,foo-m,foo-j and foo-p scripts for every binary that gets installed
16:08 hoelzro ex. my multi conjugate(Str $verb where /'вить' $/) { ... } ; my multi conjugation(Str $verb where /'ить' $/) { ... } ; say conjugate('язвить')
16:09 FROGGS hoelzro: the first declared IIRC
16:09 jnthn hoelzro: http://design.perl6.org/S12.html#Constrained_Type_Candidates
16:09 hoelzro ah, thanks FROGGS + jnthn
16:09 jnthn But what FROGGS said
16:10 jnthn There's an RT recently filed on this by CurtisOvidPoe++, but Rakudo is to spec on this one, so it's not a bug.
16:10 pyrimidine FROGGS: ok, thx.
16:10 pyrimidine FROGGS: Just making sure it isn't implemented now (e.g. I'm missing something obvious :)
16:10 FROGGS so it is the first hit in the method table
16:10 FROGGS pyrimidine: correct, it is not available yet
16:10 jnthn Could be a spec issue, though I already argued this one out with TimToady plenty. :)
16:11 jnthn So I'm not convinced he's likely to change his mind.
16:12 * jnthn was for "ambiguous" also
16:12 FROGGS jnthn: but checking for ambiguity would not be cheaper, right?
16:13 CurtisOvidPoe It the issue with that ticket is because runtime checking is so expensive? Would any compile-time checks work (or is that the halting problem?)
16:14 jnthn CurtisOvidPoe: Well, the administrative issue with the ticket is that we use RT for implementation bugs, and https://github.com/perl6/specs/issues for specification issues. :)
16:15 _4d47 joined #perl6
16:15 CurtisOvidPoe Ah, I had no idea.
16:15 jnthn CurtisOvidPoe: Compile time resolution quickly ends up being the halting problem.
16:17 mr-foobar joined #perl6
16:17 jnthn CurtisOvidPoe: I can't personally help much with the issue, though, in so far as I originally implemented it as complaining about ambiguity, and argued for the same semantics you are, but TimToady was insistent on "first match wins" for constraint types (for nominal types, we do care about ambiguity).
16:18 jnthn So eventually after a couple of debates on it, I ended up dragging Rakudo in line with spec.
16:19 jnthn I think performance was one argument, but "equivalence with given/when semantics" is the other I remember.
16:19 CurtisOvidPoe I wonder about the roles issue then. Maybe there could at least be a warning when there’s potential ambiguity if multiple roles provide mutli-methods with the same name? One of the biggest problems with inheritance and mixins is ordering.
16:20 CurtisOvidPoe I can buy the equivalence with given/when. It’s roles and inheritance where it bytes. If you have a muli in a parent or child, I assume the child wins? Is that tested?
16:21 CurtisOvidPoe And if I have a class and a role and the role is composed into the class, which is considered “first”?
16:21 CurtisOvidPoe (sorry if I’m beating a dead horse and being annoying)
16:23 jnthn The inheritance one has a nice easy answer: the invocant of a method is typed to match the enclosing class, and multi-dispatch on methods doesn't treat the invocant parameter specially in any way, so the first parameter in the child class has a narrower and so wins.
16:23 CurtisOvidPoe That makes perfect sense.
16:26 jnthn The roles case has a bit more going on. When you write a method in a role, the invocant's type is the generic type ::?CLASS. That is to say, every Perl 6 role is implicitly parametric on the type it is composed into. Composition thus first instantiates the role, and copies the instantiated method into the method table of the class. So the method the multi-dispatcher actually sees has an invocant typed with the class that composed the method.
16:26 Sir_Ragnarok_ joined #perl6
16:27 CurtisOvidPoe And if there’s ambiguity, the “native” class multi is first?
16:27 CurtisOvidPoe That might be hard if we’re flattening at compile-time.
16:27 * CurtisOvidPoe is just guessing.
16:28 jnthn In the absence of subset/where that is ambiguous at present.
16:28 jnthn Since - as you correctly point out - we flattened things at compile time.
16:29 jnthn You can, if you go introspecting deeply enough, figure out what methods came from roles.
16:30 jnthn I *think*
16:30 moritz you can
16:30 jnthn moritz: .package?
16:30 moritz .^roles
16:30 jnthn Oh, I meant from the Method object itself.
16:30 moritz and then look into the roles
16:31 jnthn Ah, true.
16:31 jnthn That'd be more round-about, but yes.
16:31 moritz but .package might work too
16:33 jnthn It's probably also worth noting that various very obvious ambiguities in multis could be pointed out at compile time, but are not yet.
16:33 brrt left #perl6
16:34 molaf joined #perl6
16:48 kaleem joined #perl6
16:50 KCL_ joined #perl6
17:04 anaeem1 joined #perl6
17:06 Sir_Ragnarok joined #perl6
17:09 salv0 joined #perl6
17:11 dalek perl6-roast-data: 2e529d4 | coke++ | / (5 files):
17:11 dalek perl6-roast-data: today (automated commit)
17:11 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/2e529d49ac
17:13 anaeem1_ joined #perl6
17:16 [Coke] no failures in a few days, that's good.
17:16 jnthn Nice
17:16 jnthn Especially as there's been a flow of patches too :)
17:16 anaeem1 joined #perl6
17:17 [Coke] mmm, rakudo.moar-jit has gone from 32907 to 33025 passes in 4 days.
17:19 vendethiel nice :D.
17:24 jnthn Dinner time here soon, and I plan to continue working on the 6model parametric bits this evening. :)
17:26 * timotimo likes
17:26 timotimo bon appetit
17:27 anaeem1 joined #perl6
17:28 [Sno] joined #perl6
17:35 hoelzro [Coke]: regarding Mojo6, are you going to try to preserve the "no dependencies" nature of Mojo5?
17:36 * hoelzro may have some tuits tonight
17:46 ab5tract joined #perl6
17:47 hoelzro I've noticed I often accidentally type a lexical variable (ie. $name) instead of the attribute that I mean ($!name).  I was thinking I could add a helpful error message; would it be ok if it were just Variable '$name' is not declared. Did you mean '$!name'?
17:47 hoelzro or should it be more particular?
17:49 [Coke] hoelzro: in general, I don't particular care for "no dependencies", but I've always worked places where installing dependencies was trivial.
17:49 [Coke] so, probably depends on how hard it is to satisfy.
17:50 hoelzro [Coke]: I was thinking of trying my hand at writing Mojo::CSS, and I wouldn't mind avoiding some reinventing of the wheel for the HTML/CSS parsing
17:51 jdv79 ugexe: its not the uri commit - the ssl.close call is hanging.
17:54 PerlJam even mojo5 isn't really "no dependencies"
17:56 gfldex joined #perl6
17:58 treehug88 joined #perl6
18:00 hoelzro PerlJam: fair enough =)
18:01 PerlJam plus, it seems to me that getting working would win on the -Ofun factor initially :)
18:01 PerlJam *it
18:02 arnsholt hoelzro: Suggesting $!foo for $foo sounds reasonable to me. Should be possible to implement as an extension to our existing "name missing" stuff
18:03 hoelzro PerlJam: yeah, I was thinking of using dependencies to get it working; the question is do I then try to make it dependency-less?
18:03 hoelzro arnsholt: yeah, I don't think it'll be to hard; I'm just wondering if the error should be more clear
18:04 hoelzro something like "There's no lexical '$name', but you have an attribute called '$!name'. Did you mean that?"
18:04 _4d47 joined #perl6
18:04 arnsholt Might be nicer. I think your original suggestion is nice as well
18:04 arnsholt It's a bit more concise
18:04 PerlJam aye, me too
18:05 kaare__ joined #perl6
18:05 hoelzro ok, how about I just leave the copy as-is, and others can improve if desired later?
18:09 eternaleye joined #perl6
18:12 jnthn hoelzro: About CSS, I think there's already a module in the ecosystem that does CSS parsing, and it looked like a lot of work/thought had gone into it.
18:13 FROGGS_ joined #perl6
18:13 jnthn hoelzro: +1 to suggesting an existing $!name if $name does not exist
18:13 hoelzro jnthn: I saw that!  I intend to make use of it =)
18:14 pmurias joined #perl6
18:15 itz will FOSDEM have a State of the Butterfly in addition to Get Ready to Party?
18:15 lizmat itz: not that I'm aware of (atm)
18:18 zakharyas joined #perl6
18:19 IllvilJa joined #perl6
18:21 * PerlJam idly wonders what Camelia looked like in her pupal stage
18:21 PerlJam actually, camelia has been a pupa for about 15 years now, IMHO  (Perl 5 was the caterpillar :)
18:22 ab5tract that caterpillar's got humps!
18:22 PerlJam .oO( camelpillar? )
18:23 * ab5tract has been imagining a Perl 6 camel as having fractal humps :)
18:23 ab5tract Perl 6: Even the humps have humps. Plenty of places to find a comfortable seat!
18:25 [Coke] hoelzro: please please jump in, even if you steal the repo to do it. :) happy to give out bits there, since I've been so lazy.
18:25 PerlJam perl6.org could have some imagery of a chrysalis slowly opening and Camelia emerging  :)
18:27 Mso150 joined #perl6
18:27 [Coke] hoelzro: you're a collaborator on https://github.com/coke/mojo6 if you like.
18:27 dwarring joined #perl6
18:28 lizmat [Coke]: wrt to isNaN vs Is-NaN, I don't have much of a feeling about that
18:29 PerlJam dwarring: did someone mentioning CSS somehow summon you?
18:29 lizmat [Coke]: but with regards to e.g. exists_key vs exists-key (aka anything with an underscore currently)
18:29 virtualsue joined #perl6
18:29 lizmat [Coke]: I think those should be kebabcased with the underscored version deprecated
18:30 PerlJam lizmat++ (That should be the "p6 standard" IMHO)
18:30 lizmat yup
18:30 lizmat :-)
18:31 * dwarring sips caffine & backlogs
18:32 ab5tract lizmat++
18:33 anaeem1_ joined #perl6
18:34 ab5tract fwiw, i think the isNan Is-Nan makes sense too. smells like a YAPE otherwise ;)
18:34 ab5tract *YAPAE
18:36 [Coke] yapae?
18:37 mvuets joined #perl6
18:38 woolfy nine: ping
18:38 dalek specs: 1ca7203 | coke++ | S99-glossary.pod:
18:38 dalek specs: fix link
18:38 dalek specs: review: https://github.com/perl6/specs/commit/1ca72032a6
18:41 ab5tract [Coke]: Yet Another Potentially Awkward Explanation - https://perl6advent.wordpress.com/2014/12/04/composers-coercers-and-the-case-of-a-camels-curious-corner/
18:42 dalek specs/newio: 8284cda | jnthn++ | S12-objects.pod:
18:42 dalek specs/newio: Correct spec of context aspects of the self term.
18:42 dalek specs/newio: review: https://github.com/perl6/specs/commit/8284cdae1f
18:42 dalek specs/newio: 1ca7203 | coke++ | S99-glossary.pod:
18:42 dalek specs/newio: fix link
18:42 dalek specs/newio: review: https://github.com/perl6/specs/commit/1ca72032a6
18:42 dalek specs/newio: f907cb8 | lizmat++ | S (2 files):
18:42 dalek specs/newio: Merge branch 'master' into newio
18:42 dalek specs/newio: review: https://github.com/perl6/specs/commit/f907cb812d
18:44 PerlJam ab5tract: might want to add that to S99
18:47 [Coke] btw, not "Is-NaN" but "is-NaN". also, I wonder if "is-nan" would be ok.
18:50 ab5tract PerlJam: i would be honored :D
18:51 sirdancealot joined #perl6
18:54 dwarring hoelzro: CSS::Grammar implements a basic selector parser - based on http://www.w3.org/TR/2011/REC-css3-selectors-20110929/
18:55 dwarring CSS::Module extends this - its based on http://www.w3.org/TR/css3-selectors/
18:55 anaeem1 joined #perl6
18:55 beastd joined #perl6
18:56 dwarring which is what Mojo::CSS implements
18:58 dwarring these modules do parsing only no attempt at implementing a CSS selector engine
18:58 dwarring ...so wide open
18:59 anaeem1 joined #perl6
19:00 dwarring Mojo::DOM and Mojo::CSS look interesting
19:01 itz I hadn't noticed http://perltricks.com/article/144/2015/1/13/How-to-create-a-grammar-in-Perl-6
19:01 Sqirrel joined #perl6
19:02 dalek rakudo/nom: b4a936e | lizmat++ | src/core/List.pm:
19:02 dalek rakudo/nom: Streamline List.at_pos for 15/20% improvement
19:02 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/b4a936e092
19:02 dalek rakudo/nom: ac75b0a | lizmat++ | src/core/List.pm:
19:02 dalek rakudo/nom: Handle List.at_pos(Inf/NaN) better
19:02 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/ac75b0a527
19:02 dalek rakudo/nom: 389326a | lizmat++ | src/core/ (2 files):
19:02 dalek rakudo/nom: Make sure X::Item exceptions are thrown properly
19:02 dalek rakudo/nom:
19:02 dalek rakudo/nom: Stubbing X::Item too late, would cause a "Cannot find &Item" error, probably
19:02 dalek rakudo/nom: because X *was* already stubbed, and X::Item was interpreted as a sub in X.
19:02 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/389326a9e0
19:03 dalek specs: 08e5b67 | PerlJam++ | S99-glossary.pod:
19:03 dalek specs: [S99] Add YAPAE
19:03 dalek specs: review: https://github.com/perl6/specs/commit/08e5b67e70
19:04 Mso150_b joined #perl6
19:06 telex joined #perl6
19:07 eternaleye joined #perl6
19:08 ab5tract [Coke]: ah, the capital 'I' did seem suspicious to me
19:09 lizmat jnthn: how would you feel of about only making int/Int candidates for at_pos in classes, and a catchall at_pos in Any that would the Any->int conversion ?
19:09 ab5tract keeping the casing of the type seems important to me
19:10 lizmat perhaps a Numeric catcher as well, which would do the Inf/Nan check
19:12 ab5tract PerlJam: ah, thanks for adding :) i just finished filing a PR when i saw it announced here :)
19:18 jnthn Why do we have an is-NaN method, ooc?
19:18 jnthn Is ~~ NaN not workable
19:18 jnthn ?
19:19 jnthn lizmat: That would probably save some duplication...
19:19 lizmat yes, quite some, and reduce the number of candidates significantly
19:19 jnthn lizmat: It'd imply a level of delegation, but that's probably not a big problem.
19:20 lizmat which would also be good, right ?
19:20 lizmat it would be punishing the programs that don't use int/Int for []
19:20 jnthn Well, the dispatch cache is keyed on the types that actually show up.
19:20 jnthn So if a program hits just a selection of candidates, the cache is quickly primed and the number of candidates matters rather less
19:21 lizmat types that actually show up where?
19:22 jnthn In calls
19:22 lizmat but if in the setting, we don't see a call with a certain type, how would a program than handle that?
19:22 dwarring hoelzro: example CSS selector parse...
19:22 dwarring perl6-m -I blib/lib -MCSS::Module::CSS3 -e'my $actions = CSS::Module::CSS3::Actions.new; say CSS::Module::CSS3.parse( q<input[class~="foo"]>, :rule<selectors>); say $/.ast.perl'
19:22 jnthn lizmat: The cache is built dynamically at runtime.
19:22 lizmat or is the cache outside of the setting
19:22 lizmat ok
19:23 jnthn lizmat: It depends on what types actually show up at runtime, like much of our optimization :)
19:23 lizmat yeah, ok
19:23 jnthn lizmat: So if somebody never does @foo[$a_str] then that candidate won't be in the multi dispatch cache.
19:23 kurahaupo joined #perl6
19:23 dwarring perl6-m -I blib/lib -MCSS::Module::CSS3 -e'my $actions = CSS::Module::CSS3::Actions.new; say CSS::Module::CSS3.parse( q<input[class~="foo"]>, :rule<selectors>, :$actions); say $/.ast.perl'
19:23 lizmat well, I'm streamlining  at_pos candidates now for all classes
19:23 jnthn The number of candidates being less is good of course for overall code size in memory.
19:23 lizmat yup
19:24 lizmat and when that's done, I'll see about reducing the number of candidates (except in Any)
19:24 lizmat and see what that brings us  :)
19:24 jnthn And good if the program uses so many of the candidates or so crazy range of types on a candidate that it overflows the multi cache and we fall back to the slower path.
19:25 lizmat ok
19:25 jnthn Thankfully, megamorphic things ain't hugely common.
19:25 lizmat so reducing candidates is good  :-)
19:26 jnthn lizmat: Yes, to a degree
19:27 ugexe jdv79: those messages you got with my examples are also known to be produced by older versions of openssl with AES-ni (and from what you posted your openssl is not up to date)
19:28 jnthn lizmat: For example, turning two multi candidates into a single one that does a type check is unhelpful.
19:28 lizmat yeah, got that  :-)
19:28 lizmat this is exactly what I'm splitting in a lot of cases now
19:29 jnthn OK. Then sounds like you're doing very agreeable things. :)
19:29 lizmat yeah  :-)
19:30 * jnthn ponders whether to work on 6pe JVM port, or on figuring out the bounded serialization interaction with it...
19:30 jnthn Mebbe I should do the port so I can remember how this code I wrote a month ago works. :)
19:32 ab5tract JVM is a huge "production ready" checkbox, imo
19:33 jercos I presume 6pe is not IPv6 over MPLS? >.>
19:34 TimToady datapoint: I had a helper doing quiz scorekeeping this past weekend, and he duplicated the dataentry using the JVM while I used MoarVM to run our quiz editor; both performed flawlessly
19:34 jnthn \o/
19:35 TimToady and he was running on a Mac
19:35 TimToady (which is why he had the JVM version from December, because MoarVM was still flakey on Mac back then)
19:36 jnthn Yeah, OSX is a good canary for some reason or toher.
19:36 jnthn *other
19:38 lizmat m: say (1,2,3,4.5)[-1]
19:38 camelia rakudo-moar 389326: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/xXEOxdv6nA�Unsupported use of a negative -1 subscript to index from the end; in Perl 6 please use a function such as *-1�at /tmp/xXEOxdv6nA:1�------> [32msay (1,2,3,4.5)[-1][33m�[31m<EOL>…»
19:38 TimToady I'm fine with hypehening 'is' functions in general
19:38 El_Che TimToady: you heard the Language track at fosdem is at Sunday?
19:38 lizmat m: my $a = (1,2,3,4.5); say $a[-1]
19:38 camelia rakudo-moar 389326: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/4G6lTlWbXZ�Unsupported use of a negative -1 subscript to index from the end; in Perl 6 please use a function such as *-1�at /tmp/4G6lTlWbXZ:1�------> [32mmy $a = (1,2,3,4.5); say $a[-1][33m…»
19:38 lizmat hmmm....
19:38 TimToady El_Che: yes
19:38 * TimToady gets to have the 'last word' :)
19:38 lizmat there *are* other presentations in that room after that, though
19:39 lizmat but not in the "Language" track
19:39 El_Che "And now, I declare all other languages obsolete" :)
19:39 bartolin joined #perl6
19:39 vendethiel please tell me fosdem will have some kind of recording
19:39 TimToady nah, just obsolescent :)
19:39 El_Che vendethiel: it has
19:39 El_Che to my surprise there is an other Perl talk just before TimToady's
19:42 TimToady "There's More Than One Way To Talk About It!"
19:42 FROGGS_ who's speaking? rjbs?
19:42 El_Che https://fosdem.org/2015/schedule/event/design_and_implementation_of_a_perl_number_theory_module/
19:42 El_Che the perl talks arein the dev room saturday
19:43 El_Che hehe
19:43 lizmat Dana
19:44 FROGGS_ "Fastest bigint probable prime testing to 10k digits".... I wonder how we do compete
19:44 uniejo joined #perl6
19:45 TimToady well, we do is-prime with libtommath
19:46 woolfy El_Che++
19:46 El_Che woolfy++
19:46 El_Che (that's how we say hi nowadays?) :)
19:47 woolfy oO(let's ++ eachother more often!)
19:47 El_Che Is that a hint for Larry for Presenting Perl++ at Fosdem? :)
19:50 woolfy :-)
19:51 dalek nqp: 1200c79 | peschwa++ | src/vm/jvm/NQP/Ops.nqp:
19:51 dalek nqp: Implement missing falsey(num) for JVM backend.
19:51 dalek nqp:
19:51 dalek nqp: Before this the new test in nqp/13-op.t killed NQP with a VerifyError due to
19:51 dalek nqp: invalid bytecode.
19:51 dalek nqp: review: https://github.com/perl6/nqp/commit/1200c79756
19:52 psch got sidetracked by that when running tests for the nqp::isint change... :)
19:52 dalek rakudo/nom: 958cbe7 | lizmat++ | src/core/Parcel.pm:
19:52 dalek rakudo/nom: Streamline Parcel.at_pos, for about 10% improvement
19:52 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/958cbe78d6
19:57 kjs_ joined #perl6
19:58 jnthn psch++
20:00 ab5tract speaking of ++, i owe psch++ # now the mountains of perl6-processing are visible enough to plot a base camp
20:00 ab5tract
20:00 ab5tract \
20:01 dalek rakudo/nom: 28e93b6 | lizmat++ | src/core/Range.pm:
20:01 dalek rakudo/nom: Streamline Range.at_pos: not much to win here
20:01 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/28e93b671c
20:01 cognominal joined #perl6
20:08 hoelzro [Coke]: cool, thanks!
20:08 hoelzro dwarring: thanks for the example!
20:09 dwarring hoelzro: np
20:12 cognominal left #perl6
20:12 kurahaupo joined #perl6
20:19 [Coke] jnthn: (remove isNaN) works for me.
20:35 amoquin joined #perl6
20:36 amoquin masak: Is the mini-challenge orientation-dependent?
20:36 amoquin Heh
20:36 Mouq better
20:44 kjs_ joined #perl6
20:48 virtualsue joined #perl6
20:51 ab5tract joined #perl6
20:52 telex joined #perl6
20:56 rurban joined #perl6
21:02 zakharyas joined #perl6
21:06 eternaleye joined #perl6
21:09 dalek nqp/6pe: 648d0ca | jnthn++ | src/vm/jvm/runtime/org/perl6/nqp/runtime/IndyBootstrap.java:
21:09 dalek nqp/6pe: Quiet warnings about variable name _.
21:09 dalek nqp/6pe: review: https://github.com/perl6/nqp/commit/648d0ca0bf
21:09 dalek nqp/6pe: c194b3a | jnthn++ | src/vm/jvm/runtime/org/perl6/nqp/sixmodel/ (4 files):
21:09 dalek nqp/6pe: Stub in STable parametricity extensions on JVM.
21:09 dalek nqp/6pe: review: https://github.com/perl6/nqp/commit/c194b3a942
21:09 dalek nqp/6pe: 7661100 | jnthn++ | src/vm/jvm/QAST/Compiler.nqp:
21:09 dalek nqp/6pe: Map parametric 6model nqp:: ops on JVM.
21:09 dalek nqp/6pe:
21:09 dalek nqp/6pe: They're not yet implemented, but it gets the test file compiling.
21:09 dalek nqp/6pe: review: https://github.com/perl6/nqp/commit/7661100657
21:09 ab5tract sub prune_array( $list, $indices ) { [ for $list.kv { $^v unless $indices (cont) $^k } ] }
21:10 ab5tract ^^ this solution makes me happy
21:10 zakharyas1 joined #perl6
21:11 hugme joined #perl6
21:12 synopsebot joined #perl6
21:13 Util joined #perl6
21:13 ab5tract not that there was really a problem floating around, but that showed up out of the mists today.
21:15 ab5tract it worked well as an example to explain the $^ twigil (or is it a stwigil when the sigil and twigil are presented in combination)
21:16 Mso150_b_g joined #perl6
21:17 telex joined #perl6
21:18 moritz lizmat: +    multi method at_pos(Parcel:D: Int \pos) is rw {
21:18 moritz +        my $pos = nqp::unbox_i(pos);
21:18 moritz lizmat: shouldn't it be Int:D \pos
21:19 moritz and then   my int $pos = nqp::unbox_i(pos) ?
21:21 rhr joined #perl6
21:22 Juerd joined #perl6
21:23 Util joined #perl6
21:23 synopsebot joined #perl6
21:25 Mso150_b_g_d joined #perl6
21:25 psch jnthn: replacing the check for StorageSpec.CAN_BOX_INT with REPR.equals(P6int.class) (and similarly for the other is$type ops) doesn't seem to cause any roast failures
21:26 psch all i got was what looks like a Supply-flap, in S17-supply/unique.t
21:26 psch jnthn: i'm wondering if we want an op along the lines of what isint on jvm does currently though.
21:27 jnthn psch: Only if we have a use case ;)
21:27 pmichaud joined #perl6
21:28 lizmat moritz: entirely correct  :-)
21:28 psch jnthn: i have exactly on use case, for unmarshaling towards java types, which is jvm-specific
21:28 psch *one
21:29 psch i can definitely make do with isbig_I and checking StorageSpec myself though
21:29 jnthn Yeah, if you're already in Java land just do it...
21:29 lizmat m: my $a; $a[Int] = 1
21:29 jnthn (With the StorageSpec)
21:29 camelia rakudo-moar 28e93b: OUTPUT«Invocant requires an instance, but a type object was passed␤  in method Bridge at src/gen/m-CORE.setting:4905␤  in sub infix:<<> at src/gen/m-CORE.setting:4828␤  in sub postcircumfix:<[ ]> at src/gen/m-CORE.setting:2736␤  in block <unit> at /tmp/HU…»
21:34 dwarring r: say "abc".substr(0,4)
21:34 camelia rakudo-{parrot,moar} 28e93b: OUTPUT«abc␤»
21:34 dwarring r: say "abc".substr(*-4)
21:34 camelia rakudo-moar 28e93b: OUTPUT«===SORRY!===␤Start argument to substr out of range. Is: -1, should be in 0..3␤»
21:34 camelia ..rakudo-parrot 28e93b: OUTPUT«Start argument to substr out of range. Is: -1, should be in 0..3␤  in method gist at gen/parrot/CORE.setting:13906␤  in method gist at gen/parrot/CORE.setting:1165␤  in sub say at gen/parrot/CORE.setting:16640␤  in sub say at gen/parrot/CORE.sett…»
21:34 dalek rakudo/nom: 6306593 | moritz++ | src/core/Parcel.pm:
21:34 dalek rakudo/nom: micro-optimize at_pos a bit more
21:34 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/630659321e
21:34 skaufman1 joined #perl6
21:34 ingy joined #perl6
21:34 daxim joined #perl6
21:34 jnthn joined #perl6
21:34 cxreg joined #perl6
21:34 mtj- joined #perl6
21:34 mathw joined #perl6
21:34 El_Che joined #perl6
21:34 Timbus joined #perl6
21:34 tinita_ joined #perl6
21:34 leedo_ joined #perl6
21:34 muraiki joined #perl6
21:34 robinsmidsrod joined #perl6
21:34 Guest22354 joined #perl6
21:34 nine joined #perl6
21:34 cibs joined #perl6
21:34 sivoais joined #perl6
21:34 MilkmanDan joined #perl6
21:34 atta joined #perl6
21:34 ka05 joined #perl6
21:34 sergot joined #perl6
21:34 dagurval_ joined #perl6
21:34 Hor|zon joined #perl6
21:34 pochi joined #perl6
21:34 ribasushi joined #perl6
21:34 broquaint joined #perl6
21:34 mst joined #perl6
21:34 sven_123 joined #perl6
21:34 Woodi joined #perl6
21:34 pyrimidine joined #perl6
21:34 tadzik joined #perl6
21:34 avuserow_ joined #perl6
21:34 17SABFOSP joined #perl6
21:34 ggoebel111111112 joined #perl6
21:34 frew joined #perl6
21:34 TuxCM joined #perl6
21:34 dj_goku joined #perl6
21:34 xinming joined #perl6
21:34 go|dfish joined #perl6
21:34 berekuk joined #perl6
21:34 araujo joined #perl6
21:34 amkrankruleuen joined #perl6
21:34 dylanwh joined #perl6
21:34 vike joined #perl6
21:34 vukcrni joined #perl6
21:34 treehug88 joined #perl6
21:34 kaare__ joined #perl6
21:34 FROGGS_ joined #perl6
21:34 sirdancealot joined #perl6
21:34 Mouq joined #perl6
21:34 hugme joined #perl6
21:34 telex joined #perl6
21:34 Util joined #perl6
21:34 synopsebot joined #perl6
21:34 jakesyl_insomnia joined #perl6
21:34 Sqirrel joined #perl6
21:34 Sir_Ragnarok joined #perl6
21:34 mr-foobar joined #perl6
21:34 zoosha joined #perl6
21:34 yakudza joined #perl6
21:34 Khisanth joined #perl6
21:34 Alina-malina joined #perl6
21:35 dwarring ^^ I wonder if that usage of .substr should be more forgiving
21:35 sivoais_ joined #perl6
21:35 Mouq I'm surprised I'm blanking on how to write "all but the last element"... Surely there's a better way than @a[^(*-1)]
21:35 * dwarring a lot can happen in a minute
21:36 [Coke] moritz: so now we cannot have a bigints worth of things in a parcel?
21:36 TimToady 0..*-2 mebbe
21:36 dwarring just a[*-1]  ?
21:36 xinming joined #perl6
21:36 frew joined #perl6
21:36 telex joined #perl6
21:37 [Coke] dwarring: @a[0..^*-1]
21:37 lizmat Mouq: @a[0..*-2]
21:37 Alina-malina joined #perl6
21:37 vukcrni joined #perl6
21:37 [Sno] joined #perl6
21:37 leont joined #perl6
21:37 Ugator joined #perl6
21:37 davido_ joined #perl6
21:37 bbkr joined #perl6
21:37 Grrrr joined #perl6
21:37 masak joined #perl6
21:37 jantore_ joined #perl6
21:37 woshty joined #perl6
21:37 wtw joined #perl6
21:37 avar joined #perl6
21:37 [Coke] ... TimToady's is saner, I think.
21:37 brrt joined #perl6
21:37 jakesyl_insomnia joined #perl6
21:38 skarn joined #perl6
21:38 ajr joined #perl6
21:40 gfldex joined #perl6
21:41 * dwarring all BUT last element 8-)
21:41 nyuszika7h joined #perl6
21:41 lizmat m: my @a = ^10; say @a[0..*-2]
21:41 camelia rakudo-moar 28e93b: OUTPUT«0 1 2 3 4 5 6 7 8␤»
21:42 TimToady bad netweather today...
21:42 rhr joined #perl6
21:42 ab5tract joined #perl6
21:42 spider-mario joined #perl6
21:42 clkao joined #perl6
21:42 rmgk joined #perl6
21:42 lue joined #perl6
21:42 mls joined #perl6
21:42 Pleiades` joined #perl6
21:42 torbjorn joined #perl6
21:42 lestrrat joined #perl6
21:42 labster joined #perl6
21:42 felher joined #perl6
21:42 ponbiki joined #perl6
21:42 epochbell joined #perl6
21:43 timotimo joined #perl6
21:43 TimToady ab5tract: your (cont) code might be more efficient if you guarantee $indices is a set outside the loop
21:43 esaym153 joined #perl6
21:43 lizmat joined #perl6
21:43 FlipBill joined #perl6
21:43 tony-o joined #perl6
21:43 awwaiid joined #perl6
21:43 psch joined #perl6
21:43 nwc10 joined #perl6
21:43 perlfan joined #perl6
21:43 TimToady otherwise might rebuild the set every iteration
21:43 jakesyl_insomnia joined #perl6
21:43 eiro joined #perl6
21:43 yoleaux joined #perl6
21:43 DarthGandalf joined #perl6
21:44 TimToady in the absence of a "sufficiently smart optimizer"
21:45 DarthGandalf joined #perl6
21:45 sivoais joined #perl6
21:47 ab5tract TimToady: thanks for the suggestion
21:48 vukcrni joined #perl6
21:48 nyuszika7h joined #perl6
21:48 jakesyl_insomnia joined #perl6
21:49 * ab5tract was actually assuming the presence of such a sufficiently smart optimizer
21:49 ab5tract sub prune_array( $list, $indices is copy ) {  $indices .= Set; [ for $list.kv { $^v unless $indices (cont) $^k } ] }
21:50 moritz [Coke]: that's going to be hard :-)
21:50 ggherdov joined #perl6
21:50 Celelibi joined #perl6
21:50 dalek joined #perl6
21:50 timotimo joined #perl6
21:50 skarn joined #perl6
21:50 Juerd joined #perl6
21:50 zakharyas1 joined #perl6
21:50 rurban joined #perl6
21:50 kjs_ joined #perl6
21:50 baest joined #perl6
21:50 jluis joined #perl6
21:50 Patterner joined #perl6
21:50 vendethiel joined #perl6
21:50 Vlavv joined #perl6
21:50 geekosaur joined #perl6
21:50 lumimies joined #perl6
21:50 danaj joined #perl6
21:50 haroldwu joined #perl6
21:50 jferrero joined #perl6
21:50 PerlJam joined #perl6
21:50 JimmyZ joined #perl6
21:50 avalenn joined #perl6
21:50 hobbs joined #perl6
21:50 nebuchadnezzar joined #perl6
21:50 gtodd joined #perl6
21:50 btyler_ joined #perl6
21:50 Spot__ joined #perl6
21:50 xiaomiao joined #perl6
21:50 jakesyl_insomnia joined #perl6
21:50 brrt joined #perl6
21:50 moritz [Coke]: if you have 8 billion GB of RAM, maybe
21:50 TimToady that's a heck of a lot of ram
21:51 ggherdov joined #perl6
21:52 mattp__ joined #perl6
21:52 eternaleye joined #perl6
21:52 skarn joined #perl6
21:53 kshannon_ joined #perl6
21:53 molaf joined #perl6
21:53 slavik joined #perl6
21:53 mephinet joined #perl6
21:53 integral joined #perl6
21:53 woolfy joined #perl6
21:53 [Tux] joined #perl6
21:53 flussence joined #perl6
21:53 lsm-desktop joined #perl6
21:53 yogan joined #perl6
21:53 bcode joined #perl6
21:53 fwilson joined #perl6
21:53 obra joined #perl6
21:53 renormalist joined #perl6
21:53 kst joined #perl6
21:53 krunen joined #perl6
21:53 Exodist joined #perl6
21:53 huf joined #perl6
21:53 osfameron joined #perl6
21:53 [Coke] joined #perl6
21:53 sjn joined #perl6
21:53 yeltzooo9 joined #perl6
21:53 dg joined #perl6
21:53 cosimo joined #perl6
21:53 charsbar_____ joined #perl6
21:53 pnu joined #perl6
21:54 psch marshaling of listy types to jvm is limited to 2**31 - 6 already, so small parcels don't hurt there at least :)
21:54 simcop2387 joined #perl6
21:54 simcop2387 joined #perl6
21:54 pnu joined #perl6
21:54 charsbar_____ joined #perl6
21:54 cosimo joined #perl6
21:54 dg joined #perl6
21:54 yeltzooo9 joined #perl6
21:54 sjn joined #perl6
21:54 [Coke] joined #perl6
21:54 osfameron joined #perl6
21:54 huf joined #perl6
21:54 Exodist joined #perl6
21:54 krunen joined #perl6
21:54 kst joined #perl6
21:54 renormalist joined #perl6
21:54 obra joined #perl6
21:54 fwilson joined #perl6
21:54 bcode joined #perl6
21:54 yogan joined #perl6
21:54 lsm-desktop joined #perl6
21:54 flussence joined #perl6
21:54 [Tux] joined #perl6
21:54 woolfy joined #perl6
21:54 integral joined #perl6
21:54 mephinet joined #perl6
21:54 slavik joined #perl6
21:54 molaf joined #perl6
21:54 kshannon_ joined #perl6
21:54 skarn joined #perl6
21:54 eternaleye joined #perl6
21:54 mattp__ joined #perl6
21:54 brrt joined #perl6
21:54 xiaomiao joined #perl6
21:54 Spot__ joined #perl6
21:54 btyler_ joined #perl6
21:54 gtodd joined #perl6
21:54 nebuchadnezzar joined #perl6
21:54 hobbs joined #perl6
21:54 avalenn joined #perl6
21:54 JimmyZ joined #perl6
21:54 PerlJam joined #perl6
21:54 jferrero joined #perl6
21:54 haroldwu joined #perl6
21:54 danaj joined #perl6
21:54 lumimies joined #perl6
21:54 geekosaur joined #perl6
21:54 Vlavv joined #perl6
21:54 vendethiel joined #perl6
21:54 Patterner joined #perl6
21:54 jluis joined #perl6
21:54 baest joined #perl6
21:54 kjs_ joined #perl6
21:54 rurban joined #perl6
21:54 zakharyas1 joined #perl6
21:54 Juerd joined #perl6
21:54 timotimo joined #perl6
21:54 dalek joined #perl6
21:54 Celelibi joined #perl6
21:54 ggherdov joined #perl6
21:54 jakesyl_insomnia joined #perl6
21:54 nyuszika7h joined #perl6
21:54 vukcrni joined #perl6
21:54 sivoais joined #perl6
21:54 DarthGandalf joined #perl6
21:54 yoleaux joined #perl6
21:54 eiro joined #perl6
21:54 perlfan joined #perl6
21:54 nwc10 joined #perl6
21:54 psch joined #perl6
21:54 awwaiid joined #perl6
21:54 tony-o joined #perl6
21:54 FlipBill joined #perl6
21:54 lizmat joined #perl6
21:54 esaym153 joined #perl6
21:54 epochbell joined #perl6
21:54 ponbiki joined #perl6
21:54 felher joined #perl6
21:54 labster joined #perl6
21:54 lestrrat joined #perl6
21:54 torbjorn joined #perl6
21:54 Pleiades` joined #perl6
21:54 mls joined #perl6
21:54 lue joined #perl6
21:54 rmgk joined #perl6
21:54 clkao joined #perl6
21:54 spider-mario joined #perl6
21:54 ab5tract joined #perl6
21:54 rhr joined #perl6
21:54 gfldex joined #perl6
21:54 avar joined #perl6
21:54 wtw joined #perl6
21:54 woshty joined #perl6
21:54 jantore_ joined #perl6
21:54 masak joined #perl6
21:54 Grrrr joined #perl6
21:54 bbkr joined #perl6
21:54 davido_ joined #perl6
21:54 Ugator joined #perl6
21:54 leont joined #perl6
21:54 [Sno] joined #perl6
21:54 Alina-malina joined #perl6
21:54 telex joined #perl6
21:54 frew joined #perl6
21:54 xinming joined #perl6
21:54 Khisanth joined #perl6
21:54 yakudza joined #perl6
21:54 zoosha joined #perl6
21:54 mr-foobar joined #perl6
21:54 Sir_Ragnarok joined #perl6
21:54 Sqirrel joined #perl6
21:54 synopsebot joined #perl6
21:54 Util joined #perl6
21:54 hugme joined #perl6
21:54 Mouq joined #perl6
21:54 sirdancealot joined #perl6
21:54 FROGGS_ joined #perl6
21:54 kaare__ joined #perl6
21:54 treehug88 joined #perl6
21:54 vike joined #perl6
21:54 dylanwh joined #perl6
21:54 amkrankruleuen joined #perl6
21:54 araujo joined #perl6
21:54 berekuk joined #perl6
21:54 go|dfish joined #perl6
21:54 dj_goku joined #perl6
21:54 TuxCM joined #perl6
21:54 ggoebel111111112 joined #perl6
21:54 17SABFOSP joined #perl6
21:54 avuserow_ joined #perl6
21:54 tadzik joined #perl6
21:54 pyrimidine joined #perl6
21:54 Woodi joined #perl6
21:54 sven_123 joined #perl6
21:54 mst joined #perl6
21:54 broquaint joined #perl6
21:54 ribasushi joined #perl6
21:54 pochi joined #perl6
21:54 Hor|zon joined #perl6
21:54 dagurval_ joined #perl6
21:54 sergot joined #perl6
21:54 ka05 joined #perl6
21:54 atta joined #perl6
21:54 MilkmanDan joined #perl6
21:54 cibs joined #perl6
21:54 nine joined #perl6
21:54 Guest22354 joined #perl6
21:54 robinsmidsrod joined #perl6
21:54 muraiki joined #perl6
21:54 leedo_ joined #perl6
21:54 tinita_ joined #perl6
21:54 Timbus joined #perl6
21:54 El_Che joined #perl6
21:54 mathw joined #perl6
21:54 mtj- joined #perl6
21:54 cxreg joined #perl6
21:54 jnthn joined #perl6
21:54 daxim joined #perl6
21:54 ingy joined #perl6
21:54 skaufman1 joined #perl6
21:54 bartolin joined #perl6
21:54 dwarring joined #perl6
21:54 IllvilJa joined #perl6
21:54 salv0 joined #perl6
21:54 skids joined #perl6
21:54 noganex joined #perl6
21:54 petercommand joined #perl6
21:54 diegok joined #perl6
21:54 ashleydev joined #perl6
21:54 breinbaas joined #perl6
21:54 [particle]1 joined #perl6
21:54 jercos joined #perl6
21:54 risou joined #perl6
21:54 Possum joined #perl6
21:54 _sri joined #perl6
21:54 betterworld joined #perl6
21:54 itz joined #perl6
21:54 vladtz joined #perl6
21:54 moritz joined #perl6
21:54 b2gills joined #perl6
21:54 Maddingue joined #perl6
21:54 ilogger2 joined #perl6
21:54 mtj_- joined #perl6
21:54 stux|RC-only joined #perl6
21:54 japhb joined #perl6
21:54 orevdiabl joined #perl6
21:54 erdic joined #perl6
21:54 oetiker joined #perl6
21:54 retupmoca joined #perl6
21:54 dsm joined #perl6
21:54 djanatyn joined #perl6
21:54 Diederich joined #perl6
21:54 salparadise joined #perl6
21:54 Bucciarati joined #perl6
21:54 BinGOs joined #perl6
21:54 Ulti joined #perl6
21:54 Gothmog_ joined #perl6
21:54 TimToady joined #perl6
21:54 anocelot joined #perl6
21:54 jtpalmer joined #perl6
21:54 jdv79 joined #perl6
21:55 ajr_ joined #perl6
21:55 17WAAWSLC joined #perl6
21:55 pmichaud joined #perl6
21:55 virtualsue joined #perl6
21:55 mvuets joined #perl6
21:55 sunnavy joined #perl6
21:55 ugexe joined #perl6
21:55 ruoso joined #perl6
21:55 mattp_ joined #perl6
21:55 eMBee joined #perl6
21:55 apejens joined #perl6
21:55 kshannon joined #perl6
21:55 raydiak joined #perl6
21:55 prammer joined #perl6
21:55 sunnavy_ joined #perl6
21:57 stux|RC-only joined #perl6
21:57 sivoais joined #perl6
21:57 dwarring joined #perl6
21:57 vladtz joined #perl6
21:57 masak amoquin: it's up to you whether you want to count different flips/rotations as equivalent or not.
21:58 lizmat m: say (0,1,2,3,4)[5]; say (0,1,2,3,4).list[5]   # this seems inconsistent
21:58 camelia rakudo-moar 28e93b: OUTPUT«(Mu)␤Nil␤»
21:58 lizmat m: my @a=^5; say @a[5]
21:58 camelia rakudo-moar 28e93b: OUTPUT«(Any)␤»
21:59 mattp__ joined #perl6
21:59 IllvilJa joined #perl6
21:59 salv0 joined #perl6
21:59 petercommand joined #perl6
21:59 breinbaas joined #perl6
21:59 itz joined #perl6
21:59 moritz joined #perl6
21:59 Maddingue joined #perl6
21:59 mtj_- joined #perl6
21:59 orevdiabl joined #perl6
21:59 erdic joined #perl6
21:59 oetiker joined #perl6
21:59 retupmoca joined #perl6
21:59 djanatyn joined #perl6
21:59 salparadise joined #perl6
21:59 Bucciarati joined #perl6
21:59 BinGOs joined #perl6
21:59 Gothmog_ joined #perl6
21:59 TimToady joined #perl6
21:59 anocelot joined #perl6
21:59 jdv79 joined #perl6
21:59 jtpalmer joined #perl6
22:00 nyuszika7h joined #perl6
22:01 TimToady ah, there's a global notice about the netsplits, which are not unexpected
22:01 dalek nqp/6pe: a2814dc | jnthn++ | src/vm/jvm/runtime/org/perl6/nqp/runtime/Ops.java:
22:01 dalek nqp/6pe: Port parametric interning to point MoarVM does it.
22:01 dalek nqp/6pe:
22:01 dalek nqp/6pe: With this, JVM passes all the parametric 6model tests so far, just as
22:01 dalek nqp/6pe: MoarVM does.
22:01 dalek nqp/6pe: review: https://github.com/perl6/nqp/commit/a2814dc396
22:01 dalek Heuristic branch merge: pushed 36 commits to rakudo/newio by lizmat
22:02 * lizmat is going to sleep out the splits
22:03 moritz good night lizmat
22:03 jnthn 'night, lizmat
22:03 masak good night, lizmat
22:05 baest joined #perl6
22:06 Spot__ joined #perl6
22:06 simcop2387 joined #perl6
22:06 skarn joined #perl6
22:06 eternaleye joined #perl6
22:06 ggherdov joined #perl6
22:06 timotimo joined #perl6
22:06 Juerd joined #perl6
22:06 zakharyas1 joined #perl6
22:06 rurban joined #perl6
22:06 kjs_ joined #perl6
22:06 jluis joined #perl6
22:06 Patterner joined #perl6
22:06 vendethiel joined #perl6
22:06 Vlavv joined #perl6
22:06 geekosaur joined #perl6
22:06 lumimies joined #perl6
22:06 danaj joined #perl6
22:06 haroldwu joined #perl6
22:06 jferrero joined #perl6
22:06 PerlJam joined #perl6
22:06 JimmyZ joined #perl6
22:06 avalenn joined #perl6
22:06 hobbs joined #perl6
22:06 nebuchadnezzar joined #perl6
22:06 gtodd joined #perl6
22:06 btyler_ joined #perl6
22:06 xiaomiao joined #perl6
22:06 Celelibi joined #perl6
22:07 Spot__ joined #perl6
22:07 sivoais joined #perl6
22:08 dalek joined #perl6
22:08 Celelibi joined #perl6
22:08 skarn joined #perl6
22:09 donaldh joined #perl6
22:09 simcop2387 joined #perl6
22:10 telex joined #perl6
22:10 ggherdov joined #perl6
22:19 timotimo joined #perl6
22:22 telex joined #perl6
22:27 colomon joined #perl6
22:30 jnthn sleep &
22:30 japhb o/
22:32 sirdancealot joined #perl6
22:37 andreoss joined #perl6
22:38 brrt yes, me too
22:43 andreoss may two lazy lists be mutually recursive in perl6?
22:46 japhb m: my @a; my @b; @a := { @b * 2 } ... *; @b := { @a + 1 } ... *; say @a[^5]; say @b[^5];
22:46 camelia rakudo-moar e2c18c: OUTPUT«Inf Inf Inf Inf Inf␤Inf Inf Inf Inf Inf␤»
22:47 Mouq m: my @a; my @b; @a := { @b[(state$)++] * 2 } ... *; @b := 0,{ @a[(state$)++] + 1 } ... *; say @a[^5]; say @b[^5];
22:47 camelia rakudo-moar e2c18c: OUTPUT«0 2 6 14 30␤0 1 3 7 15␤»
22:47 japhb m: my @a; my @b; @a := 0, { @b[$^i] * 2 } ... *; @b := 0, { @a[$^i] + 1 } ... *; say @a[^5]; say @b[^5];
22:47 camelia rakudo-moar e2c18c: OUTPUT«0 0 0 0 0␤0 1 1 1 1␤»
22:48 japhb m: my @a; my @b; @a := 0, { @b[$^i + 1] * 2 } ... *; @b := 0, { @a[$^i] + 1 } ... *; say @a[^5]; say @b[^5];
22:48 camelia rakudo-moar e2c18c: OUTPUT«use of uninitialized value of type Nil in numeric context  in block <unit> at /tmp/Vr5yN8SlDa:1␤␤This type does not support positional operations␤  in block  at src/gen/m-CORE.setting:8408␤  in method reify at src/gen/m-CORE.setting:8384␤  in met…»
22:50 psch m: my @a; my @b; @a := 0, 1, { @b[$^i] * 2 } ... *; @b := 0, 1, { @a[$^i] + 1 } ... *; say @a[^5]; say @b[^5];
22:50 camelia rakudo-moar e2c18c: OUTPUT«0 1 2 4 10␤0 1 2 3 5␤»
22:50 andreoss $^i has special meaning here?
22:51 psch m: say 1, 2, { $^a } ... 10
22:51 camelia rakudo-moar e2c18c: OUTPUT«1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 ...␤»
22:51 andreoss m: my @a; my @b; @a := 0, 1, { @b[$_] * 2 } ... *; @b := 0, 1, {
22:51 andreoss @a[$_] + 1 } ... *; say @a[^5]; say @b[^5];
22:51 camelia rakudo-moar e2c18c: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/TvDxbQZ2Oz�Unable to parse expression in block; couldn't find final '}' �at /tmp/TvDxbQZ2Oz:1�------> [32m, 1, { @b[$_] * 2 } ... *; @b := 0, 1, {[33m�[31m<EOL>[0m�»
22:51 andreoss m: my @a; my @b; @a := 0, 1, { @b[$_] * 2 } ... *; @b := 0, 1, { @a[$_] + 1 } ... *; say @a[^5]; say @b[^5];
22:51 camelia rakudo-moar e2c18c: OUTPUT«0 1 2 4 10␤0 1 2 3 5␤»
22:51 andreoss ok
22:52 psch andreoss: the ^-twigil syntax is useful e.g. when you want more than argument to the block
22:52 psch m: say 1, 2, { $^a  } ... 10
22:52 camelia rakudo-moar e2c18c: OUTPUT«1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 ...␤»
22:52 psch err
22:52 psch m: say 1, 2, { $^a + $^b } ... 10
22:52 camelia rakudo-moar e2c18c: OUTPUT«1 2 3 5 8 13 21 34 55 89 144 233 377 610 987 1597 2584 4181 6765 10946 17711 28657 46368 75025 121393 196418 317811 514229 832040 1346269 2178309 3524578 5702887 9227465 14930352 24157817 39088169 63245986 102334155 165580141 267914296 433494437 701408733 …»
22:52 psch m: say 1, 2, { $^a + $^b } ... 55 # that's how it stops...
22:52 camelia rakudo-moar e2c18c: OUTPUT«1 2 3 5 8 13 21 34 55␤»
22:53 psch *more than *one* argument... :)
22:53 andreoss {@a[$^i]} ... * will be depending on index than
22:54 andreoss so will work only for equally sized lists, not good
22:54 psch it takes the index from the current list and uses it to look up the next value from the other list, yes
22:54 psch lazy lists are potentially infinite
22:54 kurahaupo joined #perl6
22:55 japhb Takes the previous value from the current list, not the index.
22:55 andreoss s/equally sized/eqaully fast growing/
22:56 psch japhb: "takes the previous value from the current list as the index for the other list" was my intended meaning.  that didn't get clear i think
22:56 japhb andreoss, when the term on the left side of ... is a block, that block is inspected for parameter count, and that many previous values from the list are given to the block
22:56 japhb m: my @a; my @b; @a := 0, 1, { @b[$_] * 2 } ... *; @b := 0, 1, { @a[$_] + 1 } ... *; say @a[^10]; say @b[^10];
22:56 camelia rakudo-moar e2c18c: OUTPUT«use of uninitialized value of type Nil in numeric context  in block <unit> at /tmp/trfuVUGpsI:1␤␤use of uninitialized value of type Nil in numeric context  in block <unit> at /tmp/trfuVUGpsI:1␤␤This type does not support positional operations␤  i…»
22:56 japhb Wah ...?
22:57 japhb m: my @a; my @b; @a := 0, 1, { @b[$_] * 2 } ... *; @b := 0, 1, { @a[$_] + 1 } ... *; say @a[^5]; say @b[^5];
22:57 camelia rakudo-moar e2c18c: OUTPUT«0 1 2 4 10␤0 1 2 3 5␤»
22:57 japhb m: my @a; my @b; @a := 0, 1, { @b[$_] * 2 } ... *; @b := 0, 1, { @a[$_] + 1 } ... *; say @a[^6]; say @b[^6];
22:57 camelia rakudo-moar e2c18c: OUTPUT«use of uninitialized value of type Nil in numeric context  in block <unit> at /tmp/vyvOwdeX6T:1␤␤use of uninitialized value of type Nil in numeric context  in block <unit> at /tmp/vyvOwdeX6T:1␤␤This type does not support positional operations␤  i…»
22:57 japhb Weird.
22:57 japhb m: my @a; my @b; @a := 0, 1, { @b[$_] * 2 } ... *; @b := 0, 1, { @a[$_] + 1 } ... *; say @a[^5]; say @b[^10];
22:57 camelia rakudo-moar e2c18c: OUTPUT«0 1 2 4 10␤use of uninitialized value of type Nil in numeric context  in block <unit> at /tmp/3q6kE3V1wI:1␤␤This type does not support positional operations␤  in block  at src/gen/m-CORE.setting:8408␤  in method reify at src/gen/m-CORE.setting:83…»
22:58 japhb Oh ah, yes, running off each other's buffers.
22:59 japhb I guess the point is it's *possible* to have mutually recursive infinite lists without too much work.  Getting them really *right* is more work.
22:59 japhb And of course, you can just do it a pile of other ways.
23:00 andreoss my @odds; my @evens; @odd = 1,3, @evens.map(* + 1); @evens = 2,@odd.map(* + 1); say @odd[^3];
23:01 Mouq andreoss: assignment is eager
23:01 Mouq my @odds; my @evens; @odd := 1, @evens.map(* + 1); @evens := 2,@odd.map(* + 1); say @odd[^3];
23:01 andreoss m: my @odds; my @evens; @odd := 1,3, @evens.map(* + 1); @evens := 2,@odd.map(* + 1); say @odd[^3];
23:01 camelia rakudo-moar e2c18c: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/SQOFUgkij6â�¤Variable '@odd' is not declared. Did you mean '@odds'?â�¤at /tmp/SQOFUgkij6:1â�¤------> [32mmy @odds; my @evens; @odd[33mâ��[31m := 1,3, @evens.map(* + 1); @evens := 2,[0mâ�¤    exp…»
23:01 andreoss m: my @odds; my @evens; @odds := 1,3, @evens.map(* + 1); @evens := 2,@odd.map(* + 1); say @odd[^3];
23:01 camelia rakudo-moar e2c18c: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/VD5MuuA5OL�Variable '@odd' is not declared. Did you mean '@odds'?�at /tmp/VD5MuuA5OL:1�------> [32m.map(* + 1); @evens := 2,@odd.map(* + 1)[33m�[31m; say @odd[^3];[0m�»
23:03 andreoss i'm writing code here because perl6 doesn't work inside Emacs btw
23:04 ab5tract andreoss: you can start an individual chat with camelia
23:04 andreoss m: my @odds; my @evens; @odds := 1,3, @evens.map(* + 1); @evens := 2, @odds.map(1 + *); say @odds[^5];
23:04 camelia rakudo-moar e2c18c: OUTPUT«1 3␤»
23:05 psch m: my @odds; my @evens; @odds := 1,3, @evens.map(* + 1) ... *; @evens := 2, @odds.map(1 + *) ... *; say @odds[^7];
23:05 camelia rakudo-moar e2c18c: OUTPUT«1 3 5 7 9 11 13␤»
23:05 psch andreoss: you didn't make the lists lazy
23:05 psch err
23:05 psch infinite
23:05 psch lazy they couldve been, but they didn't generate more elements
23:06 andreoss isn't ...* stuff a range?
23:06 psch m: (1...*).WHAT.say
23:06 camelia rakudo-moar e2c18c: OUTPUT«(List)␤»
23:06 psch m: (1..*).WHAT.say
23:06 camelia rakudo-moar e2c18c: OUTPUT«(Range)␤»
23:06 andreoss foo...* = foo, foo+1, etc i mean
23:07 vendethiel m: my $a = 5; say ($a, *+1 ... *)[^10];
23:07 camelia rakudo-moar e2c18c: OUTPUT«5 6 7 8 9 10 11 12 13 14␤»
23:07 vendethiel andreoss: this?
23:08 andreoss vendethiel: i wanted mutual recursion between lists
23:08 vendethiel oooh, backlogging again
23:09 andreoss vendethiel: what your code was supposed to show?
23:09 vendethiel that you can "iterate off" a value
23:16 psch andreoss: you need ... * to have the lists continue to generate values
23:18 psch m: my @a := 1,2,3; @a.infinite.say; @a := 1,2,3...*; @a.infinite.say
23:18 camelia rakudo-moar e2c18c: OUTPUT«Nil␤1␤»
23:20 jack_rabbit joined #perl6
23:21 kjs_ joined #perl6
23:27 andreoss m: multi car2([$x, *@xs], [$y, *@ys] where $x == $y) { $x, $y }; say car2([1,2,3], [1,3,5]);
23:27 andreoss
23:27 camelia rakudo-moar e2c18c: OUTPUT«Cannot call 'infix:<==>'; none of these signatures match:␤:(Any $?)␤:(Any \a, Any \b)␤:(Real \a, Real \b)␤:(Int:D \a, Int:D \b)␤:(int $a, int $b)␤:(Num:D \a, Num:D \b --> Bool)␤:(num $a, num $b --> Bool)␤:(Rational:D \a, Rational:D \b)␤:(…»
23:27 andreoss m: multi car2([$x, *@xs], [$y, *@ys]) { $x, $y }; say car2([1,2,3], [1,3,5]);
23:27 andreoss
23:27 camelia rakudo-moar e2c18c: OUTPUT«1 1␤»
23:28 andreoss a bug?
23:29 psch m: sub f ($a, $b where $a == $b) { 1 }; say f 1, 1
23:29 camelia rakudo-moar e2c18c: OUTPUT«1␤»
23:29 psch considering that ^^^ works i'd say "maybe".  i'm not sure subsignature can be used in post-constraints outside of themselves
23:29 psch andreoss: maybe check the specs
23:30 psch i'll go to bed o/
23:32 telex joined #perl6
23:44 * Mouq has been trying to do the lazy @odd/@even snippet with Supplies and finds it surprisingly difficult
23:44 Mouq Dang immutability and all :P
23:44 * lue found she somehow gets duplicate entries in a Set while trying to solve masak's mini-challenge; hopefully updating rakudo will fix it :) .
23:45 Mouq lue: What kind of entities are they? I.e. are you sure they have the same .WHICH ?
23:45 lue Mouq: the set I get in the end is  set($(0, 0),$(0, 1),$(0, 2),$(2, 0),$(2, 1),$(2, 2),$(0, 0),$(1, 0),$(2, 0),$(0, 2),$(1, 2))
23:46 * masak has a solution to his own mini-challenge which is 33 LoC, but which counts rotations/flips as distinct
23:46 lue The weird thing is that I _do_ eliminate some duplicates when I convert it to a set, just not all of them, apparently :/
23:46 Mouq m: say $(0,0) === $(0,0)
23:46 camelia rakudo-moar e2c18c: OUTPUT«True␤»
23:46 Mouq Oh, huh
23:46 lue m: Array.new($(0, 0), $(0, 1), $(0, 1), $(0, 2), $(2, 0), $(2, 1), $(2, 1), $(2, 2), $(0, 0), $(1, 0), $(1, 0), $(2, 0), $(0, 2), $(1, 2), $(1, 2), $(2, 2)).Set.perl.say
23:46 camelia rakudo-moar e2c18c: OUTPUT«set($(0, 0),$(0, 1),$(0, 2),$(2, 0),$(2, 1),$(2, 2),$(1, 0),$(1, 2))␤»
23:47 lue if I take the array and convert it to a set in a snippet like that, it works. Somehow.
23:47 skids joined #perl6
23:47 Mouq m: say $(0,0) === (0,0)
23:47 camelia rakudo-moar e2c18c: OUTPUT«True␤»
23:47 Mouq m: say $(0,0) === (0;0)
23:47 camelia rakudo-moar e2c18c: OUTPUT«False␤»
23:49 lue That's why I'm hoping a recent Rakudo will solve it, 'cos otherwise I don't know.
23:51 lue masak: my solution is 179 lines so far (granted there are plenty of comments). I think I might be just a bit out of shape on this whole programming thing :P .
23:52 andreoss /part
23:52 andreoss left #perl6
23:52 masak lue: don't fret. I'm creating majorly.
23:52 masak cheating*
23:52 masak (and I learned a thing or two about spanning trees on grids in the process.)
23:55 lue I suppose if updating rakudo doesn't work, I could switch to Complex numbers and hope that solves it :P .
23:56 masak I don't really like using Complex as a 2-tuple.
23:57 masak IMO, it's a code smell to use Complex as a pair of reals without using any aspects of its multiplication.
23:57 * Mouq loved to use them as LoLs before he implemented LoLs :P
23:58 adu joined #perl6
23:59 lue masak: Of course Complex numbers aren't the best choice here, but if I find lists don't want to behave properly (yet again), I'll use complex numbers instead.

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

Perl 6 | Reference Documentation | Rakudo