Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2015-02-09

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 awwaiid hmm. ok, I'll noodle
00:00 timotimo you'll what?
00:01 awwaiid I'll contemplate run-time debugging API that would provide for things like user space debugging and binding.pry things.
00:02 awwaiid meaning I'll probably do nothing and check back in 6 months and someone else will have done it
00:02 awwaiid (but you never know)
00:03 raiph joined #perl6
00:03 timotimo hehe :)
00:06 rurban joined #perl6
00:10 timotimo i don't have a windows box to test it, flussence ...
00:11 timotimo could be that if you write the code in a windows editor, you'll end up with windows line endings and that just gets fed into the string
00:11 timotimo but those test files don't have windows line endings
00:20 vendethiel joined #perl6
00:28 araujo joined #perl6
00:29 raiph m: say Int.new(1) # How might I find out what that those named args are?
00:29 yoleaux 3 Feb 2015 08:27Z <ven> raiph: maybe you could post jnthn++'s slides to reddit, or are you waiting for the videos
00:29 camelia rakudo-moar d9f58f: OUTPUT«Default constructor for 'Int' only takes named arguments␤  in method new at src/gen/m-CORE.setting:949␤  in block <unit> at /tmp/m3hzTf0YWG:1␤␤»
00:30 timotimo m: say Int.^find_method("new").perl.say
00:31 camelia rakudo-moar d9f58f: OUTPUT«use of uninitialized value $name of type Any in string context  in block <unit> at /tmp/b5kYzEL2vg:1␤␤method new ($: Any |) { #`(Method|44315520) ... }␤True␤»
00:31 timotimo but you don't build an Int object with the constructor
00:31 timotimo though ... we could build a constructor that just boxes an int into Int
00:33 raiph hmm. i'm exploring issues raised by a question on a perlmonks thread
00:33 timotimo can has link?
00:33 timotimo i don't know why you'd want a new method on an Int
00:33 raiph http://perlmonks.org/?node_id=1115558
00:34 raiph the Int.new is at best a tangent, more likely a red herring
00:35 timotimo what is "the PV of the scalar"?
00:36 raiph timotimo: let's return to that later cuz that's messy p5 detail
00:36 timotimo we still store Int and Str objects inside scalar containers most of the time
00:37 timotimo the poster probably meant "using Ints & Strs etc. for efficiency" to refer to "int & str etc." instead?
00:37 raiph hang on, takes me a long time to gather my slow thoughts :)
00:37 timotimo "That implies that if I call a multi-sub defined to take (say) two Int vars; but I pass it integers embedded in ordinary scalars; then it will fail?" - what is that supposed to mean? "fail"?
00:38 timotimo m: sub foobar(int $a, int $b) { }; my Int $a = 5; my int $b = 6; foobar($a, $b);
00:38 camelia rakudo-moar af1c18: ( no output )
00:42 raiph m: my ($i1, $i2) = 1, 1; sub foo ($arg1, $arg2 ) { say $arg2 }; foo($i1, $i2);
00:42 camelia rakudo-moar af1c18: OUTPUT«1␤»
00:42 raiph so this is basic sub dispatch, no explicit types in evidence
00:42 raiph m: my ($i1, $i2) = 1, 1; multi sub foo ($arg1, $arg2 ) { say $arg2 }; foo($i1, $i2);
00:43 camelia rakudo-moar af1c18: OUTPUT«1␤»
00:44 raiph m: my ($i1, $i2) = 1, 1; multi sub foo ($arg1, $arg2 ) { say $arg2 }; multi sub foo (Int $arg1, Int $arg2) { say 'Int' ~ $arg2 }; foo($i1, $i2);
00:44 camelia rakudo-moar af1c18: OUTPUT«Int1␤»
00:45 raiph m: my ($i1, $i2) = 1, 1; say $i1.WHAT
00:45 camelia rakudo-moar af1c18: OUTPUT«(Int)␤»
00:47 raiph ah, figured it out
00:48 raiph timotimo: P6 has two types for a scalar, and that's his confusion (and was mine for a while)
00:48 raiph (the container and the value)
00:51 adu joined #perl6
00:51 timotimo yeah, our scalar containers can contain an object of any type they want
00:53 timotimo i'm currently looking into how the code works that does things like multi sub foo(1) { ... }
00:53 timotimo and why we don't do that at compile time yet
00:55 Hor|zon joined #perl6
00:58 timotimo ah, we only pass types of things into the multi-call-analysis method
00:58 timotimo so at that point we don't know any more what the value used to be
01:00 raiph timotimo: there's a, er, spike at the moment for literals in sigs which is to make them a $ where literal
01:01 raiph (spike = simplest thing that could possibly work)
01:01 timotimo oh
01:01 timotimo i thought more like a "performance problem"
01:01 raiph heh
01:01 timotimo m: say (sub foo(1) { }).signature
01:01 camelia rakudo-moar af1c18: OUTPUT«:(Int $ where { ... })␤»
01:02 timotimo i'm not 100% sure if that goes very deep
01:02 raiph .oO ( is there a more contemporary / popular word for spike? )
01:05 timotimo the "flags and types" array that the whole thing generates and passes around seems to be used in many places, not 100% sure what the fallout would be if i added a further list that keeps values around (if known)
01:06 raiph timotimo: please read http://perlmonks.org/?node_id=1115550, at least the bit starting "The code I wrote led to run-time resolution because"
01:08 timotimo i've read it
01:08 timotimo anything in particular you want to bring to my attention?
01:09 timotimo m: my $time := nqp::time_n(); for ^100 { nqp::getcomp('perl6').backend.name }; say nqp::time_n() - $time;
01:09 camelia rakudo-moar af1c18: OUTPUT«0.000355243682861328␤»
01:09 timotimo m: my $time := nqp::time_n(); for ^1000 { nqp::getcomp('perl6').backend.name }; say nqp::time_n() - $time;
01:09 camelia rakudo-moar af1c18: OUTPUT«0.00188779830932617␤»
01:09 timotimo m: my $time := nqp::time_n(); for ^10_000 { nqp::getcomp('perl6').backend.name }; say nqp::time_n() - $time;
01:09 camelia rakudo-moar af1c18: OUTPUT«0.0264570713043213␤»
01:09 timotimo probably not worth caching this %)
01:10 timotimo j: my $time := nqp::time_n(); for ^10_000 { nqp::getcomp('perl6').backend.name }; say nqp::time_n() - $time;
01:10 camelia rakudo-jvm af1c18: OUTPUT«Can't open perl script "/home/camelia/jvm-rakudo/eval-client.pl": No such file or directory␤»
01:10 timotimo raiph: forgot to highlight; anything in particular you want to bring to my attention?
01:11 timotimo hm, with the 6pe, we could perhaps create better subset types for Int, Str, Num, ... with literals or something
01:12 raiph timotimo: Rakudo is currently converting a literal as a parameter (eg the 1 in `multi sub c (1) {}`) in to a 'where' constraint (`multi sub c ($ where 1) {}`
01:13 timotimo i need to find out where this conversion happens
01:13 yeahnoob joined #perl6
01:14 raiph timotimo: presumably an alternative is to leave the conversion in place...
01:16 timotimo and just make the analysis smarten in order to "see through"
01:16 raiph timotimo: and be able to analyze where constraints to turn a 'where 1' into a static subtype
01:16 timotimo in principle when creating the where block, we could mix in a role that tells us "just a comparison against a simple value"
01:17 Mouq timotimo: Probably Actions.pm
01:18 raiph aiui, to make it become a compile time resolution you've got to convert to a finite set of values that are all of the nominal type
01:18 raiph and also, perhaps, add machinery in the resolution code to make use of that set
01:18 Mouq timotimo: Line 3904
01:19 raiph timotimo: Mouq: do you agree that there are at least the two basic solutions?
01:19 Mouq Or more specifically, 3919 "%*PARAM_INFO<post_constraints>.push($val);"
01:20 raiph A) change conversion to a where clause to something else
01:21 raiph B) analyze where constraints to produce a set of values; enhance static resolution code
01:21 Mouq I don't think we should make sub foo($ where 42) {} less effecient than sub foo(42) {} if they're supposed to mean the same thing
01:22 Mouq So I'd tend toward B
01:23 Mouq m: my role Bar {}; sub foo($ where 42 where Bar) {}; foo 42 but Bar
01:23 camelia rakudo-moar af1c18: ( no output )
01:23 raiph Mouq: I'm thinking B is the thing to do, but for different reasons
01:23 raiph timotimo: so now I'm curious what you think of A) and B)
01:25 raiph aiui B is supposed to happen, the analysis to catch 'where 1' etc. would be a relatively simple and solid start on B; and that start would render A moot or worse, wasted code
01:25 Mouq m: my role Bar {}; sub foo($ where 42 where Bar) {}; say &foo.params[0].type
01:25 camelia rakudo-moar af1c18: OUTPUT«No such method 'params' for invocant of type 'Sub'␤  in block <unit> at /tmp/0pDhRKMR_9:1␤␤»
01:25 Mouq m: my role Bar {}; sub foo($ where 42 where Bar) {}; say &foo.parameters[0].type
01:25 camelia rakudo-moar af1c18: OUTPUT«No such method 'parameters' for invocant of type 'Sub'␤  in block <unit> at /tmp/3cLMYe2gKo:1␤␤»
01:26 Mouq m: my role Bar {}; sub foo($ where 42 where Bar) {}; say &foo.signature.params[0].type
01:26 camelia rakudo-moar af1c18: OUTPUT«(Any)␤»
01:27 Mouq That could probably get turned into Int statically… OTOH, that depends on ACCEPTS not being overloaded for Int :|
01:28 Mouq m: use MONKEY_TYPING; augment class Int { method ACCEPTS (|) { True } }; sub foo ($ where 42) {}; foo 15
01:28 camelia rakudo-moar af1c18: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/q4ZKbJezzH�Package 'Int' already has a Method 'ACCEPTS' (did you mean to declare a multi-method?)�at /tmp/q4ZKbJezzH:1�------> �»
01:28 Mouq m: use MONKEY_TYPING; augment class Int { multi method ACCEPTS (|) { True } }; sub foo ($ where 42) {}; foo 15 #?
01:28 camelia rakudo-moar af1c18: OUTPUT«Constraint type check failed for parameter '<anon>'␤  in sub foo at /tmp/e35H8wXkPA:1␤  in block <unit> at /tmp/e35H8wXkPA:1␤␤»
01:28 Mouq Huh
01:29 Mouq m: use MONKEY_TYPING; augment class Int { multi method ACCEPTS ($) { True } }; sub foo (42) {}; foo 15
01:29 camelia rakudo-moar af1c18: ( no output )
01:31 Mouq m: use MONKEY_TYPING; augment class Int { multi method ACCEPTS ($_) { self %% $_ } }; sub foo (12) { say "ok"; }; foo 6; foo 2; foo 5;
01:31 camelia rakudo-moar af1c18: OUTPUT«ok␤ok␤Constraint type check failed for parameter '<anon>'␤  in sub foo at /tmp/PIlKYsysd1:1␤  in block <unit> at /tmp/PIlKYsysd1:1␤␤»
01:32 Mouq In conclusion: This stuff is wicked hard
01:32 Mouq :P at least, with MONKEY_TYPING enabled
01:33 dayangkun joined #perl6
01:34 * Mouq would like to disclose that he has done no work with optimizations in Rakudo, in case it wasn't clear
01:36 raiph Mouq: :D
01:47 dalek rakudo/nom: af983a1 | Mouq++ | src/Perl6/Grammar.nqp:
01:47 dalek rakudo/nom: Fix "my &term:<*>"
01:47 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/af983a1b66
01:48 Mouq That code is really bogus, but my attempt to fix it a few hours ago caused a weird massive slowdown
01:56 dalek roast: 953fe4c | Mouq++ | S06-operator-overloading/term.t:
01:56 dalek roast: Add tests for overloading &terms
01:56 dalek roast: review: https://github.com/perl6/roast/commit/953fe4c910
01:56 dalek roast: e10e70f | Mouq++ | S06-operator-overloading/term.t:
01:56 dalek roast: Make sure we test for sub form of term declaration too
01:56 dalek roast: review: https://github.com/perl6/roast/commit/e10e70fdb7
01:56 dalek roast: 2fe00ac | Mouq++ | S (6 files):
01:56 dalek roast: Merge branch 'master' of https://github.com/perl6/roast
01:56 dalek roast: review: https://github.com/perl6/roast/commit/2fe00ac90d
02:21 dalek rakudo/nom: d72d837 | Mouq++ | src/Perl6/Grammar.nqp:
02:21 dalek rakudo/nom: Make sure we stringify &term name
02:21 dalek rakudo/nom:
02:21 dalek rakudo/nom: Not strictly necessary here, but good practice
02:21 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/d72d837234
02:21 dalek rakudo/nom: cd84cf1 | Mouq++ | t/spectest.data:
02:21 dalek rakudo/nom: Add term overloading tests to spectest.data
02:21 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/cd84cf16d6
02:21 dalek rakudo/nom: 9db8b8d | Mouq++ | src/Perl6/Grammar.nqp:
02:21 dalek rakudo/nom: Prevent scope declarators from interfering with postfixes
02:21 dalek rakudo/nom:
02:21 dalek rakudo/nom: For example, "sub foo { }()" would parse fine, but "my sub foo { }()"
02:21 dalek rakudo/nom: wouldn't because the "my" would grab ws after the sub. This is a step in
02:22 dalek rakudo/nom: making "state $i++" of RT #115614
02:22 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/9db8b8d6b0
02:22 synopsebot Link: https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=115614
02:24 chenryn joined #perl6
02:29 Mouq m: my $str where Str = 4
02:29 camelia rakudo-moar af1c18: ( no output )
02:30 Mouq Real nice
02:30 Mouq :P
02:34 chenryn joined #perl6
02:45 Hor|zon joined #perl6
02:55 raiph m: my $str where Str = 4; say $str.WHAT
02:55 camelia rakudo-moar af983a: OUTPUT«(Any)␤»
02:56 Mouq raiph: Rakudo parses them, and subsequently does nothing to them. My next patch will at least throw an NYI error, might look into whether I can implement it later tonight
02:57 Mouq :s/to/with
02:59 JimmyZ s
02:59 JimmyZ m: say (my multi $s).WHAT
02:59 camelia rakudo-moar af983a: OUTPUT«(Any)␤»
02:59 JimmyZ m: say (my proto $s).WHAT
02:59 camelia rakudo-moar af983a: OUTPUT«(Any)␤»
03:01 raiph Mouq++
03:13 noganex joined #perl6
03:15 vendethiel joined #perl6
03:18 Patterner joined #perl6
03:19 Mouq m: my ($a) is default(Str)
03:19 camelia rakudo-moar af983a: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/5iZ0kYHIlkâ�¤Two terms in a rowâ�¤at /tmp/5iZ0kYHIlk:1â�¤------> [32mmy ($a) [33mâ��[31mis default(Str)[0mâ�¤    expecting any of:â�¤        postfixâ�¤        infix stopperâ�¤        infix or me…»
03:20 Mouq m: my ($a)is default(Str)
03:20 camelia rakudo-moar af983a: ( no output )
03:20 Mouq Heh, I'll fix that too :P
03:21 JimmyZ nice catch!
03:26 JimmyZ ls
03:29 jakesyl joined #perl6
03:35 adu joined #perl6
03:43 Mouq Weird. I can get it so that "my $i\ ++" is valid, but it won't take "my $i\++" or "my $i++"
03:45 JimmyZ but my $i\++ should be syntax error?
03:47 JimmyZ looks like not
03:47 JimmyZ std: my $i\++
03:47 camelia std f9b7f55: OUTPUT«ok 00:00 135m␤»
03:48 Mouq JimmyZ: My goal is https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=115614
03:48 JimmyZ std: my $i\+++
03:48 camelia std f9b7f55: OUTPUT«[31m===[0mSORRY![31m===[0m�Bogus term at /tmp/tjhKpuDCby line 1 (EOF):�------> [32mmy $i\+++[33m�[31m<EOL>[0m�Parse failed�FAILED 00:00 137m�»
03:48 Mouq std: $++++++++++++\#'[(Not recommended)]+++++++++++++++++$
03:48 camelia std f9b7f55: OUTPUT«ok 00:00 135m␤»
03:49 JimmyZ std: my $i\++++
03:49 camelia std f9b7f55: OUTPUT«ok 00:00 135m␤»
04:01 dalek modules.perl6.org: a0c5585 | (Anthony Parsons)++ | web/lib/P6Project/Hosts/Github.pm:
04:01 dalek modules.perl6.org: Add some more filetypes as valid GitHub readmes
04:01 dalek modules.perl6.org:
04:01 dalek modules.perl6.org: (All the markdown file extensions it knows, plus rst and asciidoc. Reference:
04:01 dalek modules.perl6.org:  https://github.com/github/linguist/bl​ob/master/lib/linguist/languages.yml )
04:01 dalek modules.perl6.org: review: https://github.com/perl6/modul​es.perl6.org/commit/a0c55851f0
04:14 flussence wait, I'm blind
04:14 dalek modules.perl6.org/gh-pages: 636b6ba | (Anthony Parsons)++ | build-project-list.pl:
04:14 dalek modules.perl6.org/gh-pages: Same as previous, but on the correct branch this time
04:14 dalek modules.perl6.org/gh-pages: review: https://github.com/perl6/modul​es.perl6.org/commit/636b6baf6e
04:16 flussence (how does dalek's email lookup thing work? could've sworn it used to show my gh username properly...)
04:18 dalek rakudo/nom: 4bab488 | Mouq++ | src/Perl6/Grammar.nqp:
04:18 dalek rakudo/nom: Variable postconstraints NYI; Fix some cases of var decl + postfix
04:18 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/4bab4886ca
04:19 dalek roast: ac9067a | Mouq++ | S12-class/attributes.t:
04:19 dalek roast: Rakudo now throws NYI on variable postconstraints
04:19 dalek roast: review: https://github.com/perl6/roast/commit/ac9067a46d
04:20 Mouq flussence: It depends on the way the commit gets written. I know that when I use GitHub's editor to commit, it gets logged as "Alexander Moquin"
04:23 flussence ah well, not a big deal.
04:25 jack_rabbit joined #perl6
04:29 kaleem joined #perl6
04:33 Hor|zon joined #perl6
04:35 vendethiel joined #perl6
04:42 dalek roast: 95909f0 | Mouq++ | S04-declarations/my.t:
04:42 dalek roast: Add test for "my sub {}()"
04:42 dalek roast: review: https://github.com/perl6/roast/commit/95909f0d70
05:12 telex joined #perl6
05:35 wicope joined #perl6
05:48 [Sno] joined #perl6
05:50 diana_olhovik_ joined #perl6
05:58 rurban__ joined #perl6
05:59 dalek roast: bb73fea | Mouq++ | S05-capture/match-object.t:
05:59 dalek roast: Add test for RT #77146
05:59 dalek roast: review: https://github.com/perl6/roast/commit/bb73feaaa6
05:59 synopsebot Link: https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=77146
06:22 Hor|zon joined #perl6
06:27 Mouq m: my Int @a = 1, 2, 3; @a[0] := "foo"; say @a.perl
06:27 camelia rakudo-moar 4bab48: OUTPUT«Array[Int].new("foo", 2, 3)␤»
06:31 Mouq .tell jnthn Bug in .bind_pos? «my Int @a; @a[0] = "foo";» lives
06:31 yoleaux Mouq: I'll pass your message to jnthn.
06:31 Mouq .tell jnthn *@a[0] := "foo";
06:31 yoleaux Mouq: I'll pass your message to jnthn.
06:31 vendethiel joined #perl6
06:42 Rounin joined #perl6
06:49 kaleem joined #perl6
06:49 virtualsue joined #perl6
07:01 alini joined #perl6
07:04 chenryn joined #perl6
07:04 Saran_ joined #perl6
07:08 gfldex joined #perl6
07:10 Woodi joined #perl6
07:16 andreoss joined #perl6
07:25 diana_olhovik joined #perl6
07:33 alpha- joined #perl6
07:34 bjz joined #perl6
07:43 necrosis joined #perl6
08:03 yeahnoob joined #perl6
08:05 abraxxa joined #perl6
08:05 FROGGS joined #perl6
08:07 zakharyas joined #perl6
08:10 chenryn joined #perl6
08:11 Hor|zon joined #perl6
08:12 kaare__ joined #perl6
08:14 awwaiid joined #perl6
08:15 bjz joined #perl6
08:16 prime joined #perl6
08:21 pmqs joined #perl6
08:24 darutoko joined #perl6
08:25 sergot morning \0
08:25 yoleaux 5 Feb 2015 01:29Z <retupmoca> sergot: I just made another PR for your openssl stuff...I'm really not trying to harass you, I promise!
08:25 FROGGS joined #perl6
08:25 sergot retupmoca: thanks! I added you as a collaborator tho :)
08:31 moritz less harassment through a commit bit
08:31 * moritz practices that regularly
08:32 sergot hehe :)
08:35 [Sno] joined #perl6
08:39 adu hey
08:40 adu how short of a program do you think you could make an att <=> intel assembly syntax converter?
08:40 * moritz has no idea whatsoever
08:41 adu moritz: all it has to do is s/(.*) (.*), (.*)/ \1 \3, \2/
08:42 moritz adu: ..except that the regexes probably aren't right as they are now
08:43 adu well, yeah
08:43 JimmyZ compile it to .so, and use objdump :P
08:53 Kristien joined #perl6
08:53 Kristien guys guys guuys
08:53 Kristien hi
08:55 Timbus <adu> moritz: all it has to do is s/(.*) (.*), (.*)/ \1 \3, \2/
08:55 Timbus this would be wrong when it comes to floating point operations, probably
08:58 timotimo hi Kristien
08:59 Kristien book will arrive today :D
08:59 jnthn morning, #perl6
08:59 yoleaux 06:31Z <Mouq> jnthn: Bug in .bind_pos? «my Int @a; @a[0] = "foo";» lives
08:59 yoleaux 06:31Z <Mouq> jnthn: *@a[0] := "foo";
08:59 jnthn .tell Mouq Yes, surely a bug. Another one to address when I work some more on typed arrays, I guess :)
08:59 yoleaux jnthn: I'll pass your message to Mouq.
09:00 timotimo good morning jnthn :)
09:04 alini joined #perl6
09:06 JimmyZ morning all
09:06 Kristien I'm thinking of putting ctags in crontab but I'm not sure whether it's a good idea.
09:09 Hor|zon joined #perl6
09:16 masak good antenoon, #perl6
09:27 moritz good an, masak
09:28 masak I have an unpublished post about mazes lying about.
09:29 moritz how dare you!
09:29 masak :P
09:29 masak maybe I can set as a goal to get it publish-ready today, so that I can turn back to posting about macros.
09:29 Kristien my beautiful creation of the day: system('sh', '-c', 'cd $0 && ctags -R $1', split) while (<>);
09:30 masak Kristien: that looks like Perl 5.
09:30 moritz Kristien: what language is that?
09:30 Kristien Perl 5!
09:30 masak Kristien: now flail to explain how you're on topic :)
09:30 moritz uhm, does split really fill $0 and $1?
09:30 Kristien no, those are single quotes
09:30 jnthn Well, $0 is the program name, no? :)
09:30 Kristien they are filled in by sh
09:30 masak jnthn: not in quotes.
09:30 jnthn oh, right :)
09:30 Kristien sh -c puts the first argument in $0 and the second one in $1
09:30 masak single quotes
09:31 moritz .oO( you are in a twisted maze of masaks, all alike )
09:31 Kristien I should rewrite this in Perl 6
09:32 masak took you far too long to realize :P
09:33 * jnthn notes that reply works to both Kristien and moritz :P
09:33 dakkar joined #perl6
09:33 masak jnthn: as a matter of fact, moritz managed to partly anticipate my blog post title ;)
09:35 masak jnthn: will be interesting to see what happens first: me publishing the post, or someone(tm) fixing https://rt.perl.org/Ticket/Display.html?id=123602 (which I discovered as part of finding the mazes)
09:35 Kristien does Perl 6 have <>?
09:35 masak Kristien: lines()
09:36 moritz masak: in the subway, I found a really nice behavior for you, potential rakudobug
09:36 moritz m: class A { ... }; class B is A { }; class A is B { }; say A.^mro
09:36 camelia rakudo-moar 4bab48: OUTPUT«No such method 'gist' for invocant of type 'A'␤  in method gist at src/gen/m-CORE.setting:8551␤  in sub say at src/gen/m-CORE.setting:17365␤  in block <unit> at /tmp/rIvbwzU01D:1␤␤»
09:37 moritz m: class A { ... }; class B is A { }; class A is B { }; say A.^mro.map: { .^name }
09:37 camelia rakudo-moar 4bab48: OUTPUT«A B A␤»
09:37 moritz circular self-inheritance!
09:37 Kristien masak does that also do the command-line arguments stuff?
09:38 moritz Kristien: it does the "interpret command line arguments as file names" stuff, but not the crazy "pass it to a shell if it looks like a command"
09:38 jnthn masak: Well, given I've got a LOT of slides to write today, your post might win... :P
09:38 masak jnthn: I'm not so sure... :)
09:38 masak finishing the post today is just a goal.
09:39 masak also, someone else might fix the RT ticket.
09:39 jnthn True :)
09:39 jnthn So, who likes ropes? :D
09:39 * masak .oO( not that I want to rope you into something )
09:39 jnthn Too bad it gets the wrong answer, rather than getting into an infinite loop
09:39 * masak .oO( who likes to do some salty checks, arrr! )
09:39 jnthn Then we coulda said it had enough rope to hang itself...
09:40 masak haha
09:40 Kristien moritz: nice
09:40 jnthn moritz: I'd put that in as a bug. There already is some kinda check in there, I thought...
09:40 jnthn ...but apparently not a good enough one :)
09:42 Mouq m: class A {...}; class B is A { }; class A {}; say B # Already a ticket somewhere, discussing if we actually want to be able to do this
09:42 yoleaux 08:59Z <jnthn> Mouq: Yes, surely a bug. Another one to address when I work some more on typed arrays, I guess :)
09:42 camelia rakudo-moar 4bab48: OUTPUT«No such method 'gist' for invocant of type 'B'␤  in sub say at src/gen/m-CORE.setting:17369␤  in block <unit> at /tmp/xCbzka7Htx:1␤␤»
09:42 Mouq jnthn: I'll rakudobug it :)
09:42 rindolf joined #perl6
09:46 moritz Mouq++
09:49 |Tux| joined #perl6
09:51 Mouq The ticket I was talking about before is #122221
09:51 synopsebot Link: https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=122221
09:54 coffee` joined #perl6
09:55 espadrine joined #perl6
09:56 ab5tract speaking of blog posts, am i the only one who has been refreshing pmthium semi-neurotically?
09:58 timotimo i'm not doing that because i don't want to put pressure on the man
09:58 abhi24 joined #perl6
10:01 abhi24 hi guys, i want to contribute to TPF, i have 1 year experience in perl language.. how do i start ?
10:07 dalek doc: dedd8d8 | moritz++ | lib/Language/mop.pod:
10:07 dalek doc: [mop] explain composition time, static reasoning
10:07 dalek doc: review: https://github.com/perl6/doc/commit/dedd8d80a9
10:07 dalek doc: f00a14e | moritz++ | lib/Type/Cool.pod:
10:07 dalek doc: [Cool] floor, ceiling
10:07 dalek doc: review: https://github.com/perl6/doc/commit/f00a14e804
10:07 timotimo abhi24: when you say "contribute to TPF", do you have any specific project in mind? i suppose because you're in #perl6 you want to contribute to the perl6 language effort?
10:07 risou joined #perl6
10:07 abhi24 timotimo: I don't have any specific project in mind.. but i do want to contribute to perl6  language effort..
10:08 moritz abhi24: so, what's your idea of fun?
10:08 moritz abhi24: do you like to write modules? or test? or documentation? or discover bugs? or organize conferences?
10:08 timotimo moritz: if you say it that way it sounds kind of ironic :o
10:08 moritz timotimo: that's ... not how I meant it :-)
10:08 timotimo abhi24: maybe you have a background in web design, in which case you could help improve our web pages and documents and such
10:09 abhi24 moritz: my idea of fun is to code all day :) .. I would like write modules and fix bugs.
10:09 timotimo sounds good! did you already have a look at http://modules.perl6.org ?
10:10 _mg_ joined #perl6
10:10 abhi24 timotimo: i just have background of software development in perl..
10:10 moritz abhi24: then pick an existing module, and improve on it, or port your favorite p5 module to p6
10:10 timotimo https://github.com/perl6/perl6-most-wanted - this repository holds a list of "most wanted" modules, which you can use for inspiration
10:10 moritz abhi24: and ask for help in here
10:12 abhi24 Okay great! I can start porting modules then..
10:16 mvuets joined #perl6
10:16 Mouq joined #perl6
10:17 abhi24 timotimo: not didn't have a look at http://modules.perl6.org But i am looking at it now..
10:26 lumimies joined #perl6
10:27 Kristien joined #perl6
10:30 |Tux| joined #perl6
10:32 moritz m: enum A <b c>; say A.^composed
10:32 camelia rakudo-moar 4bab48: OUTPUT«No such method 'composed' for invocant of type 'Perl6::Metamodel::EnumHOW'␤  in block <unit> at /tmp/ibsklMra8F:1␤␤»
10:33 moritz m: say Int.^composed
10:33 camelia rakudo-moar 4bab48: OUTPUT«No such method 'composed' for invocant of type 'Perl6::Metamodel::ClassHOW'␤  in block <unit> at /tmp/_DYQ8Oim5q:1␤␤»
10:34 rurban joined #perl6
10:36 timotimo is there something still missing for "Async socket and file IO" in https://github.com/perl6/perl6-most-wan​ted/blob/master/most-wanted/features.md ?
10:36 timotimo what about "Proper signal handling"? we kind of have that now, i'd say
10:38 moritz timotimo: then remove them, and wait for more specific requirements/complaints
10:39 timotimo is anybody going to notice the removal?
10:43 jnthn timotimo: Not sure we've got the async file stuff yet
10:44 timotimo i know we got linesasync at the very least
10:44 timotimo and slurpasync
10:44 timotimo possibly not writing asynchronously
10:44 jnthn Those only got impl'd on JVM, I think...
10:46 moritz muhahahahaha
10:46 moritz I've just tried to add an error message for the case of inheriting from a class that's not yet composed
10:46 moritz guess I what I got
10:46 moritz Class Any cannot inherit from Mu because the parent is not composed yet
10:47 timotimo oh?
10:47 timotimo well, time to look into implementing that for moarvm
10:49 timotimo interesting
10:49 timotimo IO::Async::File returns Channels for things that would create lazy lists
10:49 timotimo should that be changed to Supplies?
10:52 Kristien async I/O :(
10:52 timotimo hm?
10:53 Kristien I believe solely in blocking I/O.
10:56 moritz blocking I/O is your one true god, and Kristien is its prophet
10:56 Kristien :D
10:56 Kristien I'm the priestess Io.
10:57 Patterner joined #perl6
10:58 MilkmanDan joined #perl6
10:58 MilkmanDan joined #perl6
11:00 Hor|zon joined #perl6
11:02 skarn joined #perl6
11:02 dustinm` joined #perl6
11:03 moritz $ ./perl6-m -e 'class A { ... }; class B is A { }; class A { }'
11:03 moritz ===SORRY!=== Error while compiling -e
11:03 moritz Class B cannot inherit from A because the parent is not composed yet
11:04 chenryn joined #perl6
11:11 Mouq moritz++
11:12 chenryn joined #perl6
11:13 dalek rakudo/mop-composed: eb55acc | moritz++ | src/Perl6/Metamodel/ (2 files):
11:13 dalek rakudo/mop-composed: Throw error on inheriting from a stubbed (or not yet composed) class
11:13 dalek rakudo/mop-composed:
11:13 dalek rakudo/mop-composed: This is a bit ugly, it only checks if the REPR has been composed yet.
11:13 dalek rakudo/mop-composed: In the setting, lots of inheritance happens before the parent
11:13 dalek rakudo/mop-composed: class is fully composed, so cannot check for is_composed.
11:13 dalek rakudo/mop-composed: review: https://github.com/rakudo/rakudo/commit/eb55acce07
11:13 moritz jnthn: ^^ a short review would be welcome before I merge it into nom
11:14 moritz jnthn: I also pondered a role Perl6::Metamodel::ReadyForComposition, but since only ClassHOW does it now, it seems like a bit of overkill
11:14 kst joined #perl6
11:15 moritz jnthn: so opinions on that are very welcome too
11:16 Kristien joined #perl6
11:21 zakharyas1 joined #perl6
11:35 baest joined #perl6
11:38 timotimo i wonder what kristien doesn't like about async i/o
11:40 dalek perl6-most-wanted: 1c9eac3 | timo++ | most-wanted/features.md:
11:40 dalek perl6-most-wanted: remove "proper signal handling" from "features"
11:40 dalek perl6-most-wanted:
11:40 dalek perl6-most-wanted: it's implemented nowadays
11:40 dalek perl6-most-wanted: review: https://github.com/perl6/perl6​-most-wanted/commit/1c9eac3658
11:40 Kristien joined #perl6
11:45 Kristien joined #perl6
11:46 baest joined #perl6
11:52 abraxxa nine_: ping
11:54 yeahnoob joined #perl6
11:55 yeahnoob joined #perl6
12:04 jnthn moritz: Hm, well, I don't see any bad side-effects right off. In normal situations, you don't compose the REPR until you compose the class.
12:04 jnthn moritz: So it works out fine for all normal use.
12:05 jnthn And avoids the setting bootstrap tricks getting int he way.
12:05 jnthn So, think I'm +1 to it.
12:05 moritz jnthn: ok, thanks
12:05 moritz jnthn: what I don't really like about it is how it doesn't compose well with other (potential) meta classes
12:06 moritz jnthn: but I guess we'll worry about that when that becomes a problem
12:06 jnthn Aye
12:06 kaleem joined #perl6
12:06 jnthn Well, various places in the MOP do similar kinds of duck typing to cope with less sophisticated meta-classes
12:07 timotimo jnthn: what do you think is the correct way to go to make the multiple-dispatch optimizer aware of candidates that want specific values in some places rather than just types?
12:07 timotimo and is there something we can do to make dispatch in those cases more efficient at run time if we can't compile-time-optimize?
12:17 pmurias joined #perl6
12:26 jnthn timotimo: Well, we might consider extending the compile-time analysis
12:28 timotimo i've been looking at that; it seems like we'd have to add a "values" array to the "analyse dispatch" method that's installed in the BOOTSTRAP
12:28 jnthn For the latter, one might consider compiling a dispatcher that's basically an if-ladder style construct
12:28 jnthn Which would intersect well with trace JIT
12:28 jnthn But it's a lot of memory to do it all the time
12:29 jnthn Heck, it's interesct well with current spesh...
12:29 jnthn *it'd
12:30 jnthn Other thing is that we can handle where clauses much more efficiently than today if we can be sure they lack free vars.
12:31 dalek rakudo/nom: eb55acc | moritz++ | src/Perl6/Metamodel/ (2 files):
12:31 dalek rakudo/nom: Throw error on inheriting from a stubbed (or not yet composed) class
12:31 dalek rakudo/nom:
12:31 dalek rakudo/nom: This is a bit ugly, it only checks if the REPR has been composed yet.
12:31 dalek rakudo/nom: In the setting, lots of inheritance happens before the parent
12:31 dalek rakudo/nom: class is fully composed, so cannot check for is_composed.
12:31 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/eb55acce07
12:31 dalek rakudo/nom: d297154 | moritz++ | src/ (2 files):
12:31 dalek rakudo/nom: Typed exception X::Inheritance::NotComposed
12:31 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/d297154bef
12:31 jnthn otoh, I think the simple cases (non-invokable) we already handle well
12:32 jnthn (As in, we don't go to the effort of faking up a call frame for the trial bind)
12:34 Kristien joined #perl6
12:35 timotimo free vars as in the blocks are not closing over anything?
12:36 Kristien timotimo: the thing I don't like about async I/O is that you have to design your interfaces to be async, and you cannot implement sync itnerfaces to do async I/O
12:36 Kristien whereas the only reason for doing async I/O is as an optimisation, which can be perfectly done at a lower level as demonstrated by Erlang and Go
12:38 timotimo or you could do async I/O to become extremely famous
12:39 Kristien like Ryan Dahl? :D
12:39 rmgk_ joined #perl6
12:39 pyrimidi_ joined #perl6
12:39 timotimo is that the node.js person?
12:39 Kristien ja!
12:39 timotimo k
12:40 nine_ abraxxa: pong
12:42 Woodi hallo #perl6 :)
12:42 nine_ abraxxa: I'll be in meetings most of the afternoon, but I'll be able to help in the evening
12:43 abraxxa nine_: just wanted to ask if something regarding bytes has come up
12:43 Kristien Woodi: welkom
12:43 abraxxa i saw that moritz merged retupmoca's commit
12:43 Woodi just read http://www.ilikebigbits.com/blog/​2014/4/21/the-myth-of-ram-part-i  where author redefines a bit O(N) notation for including memory access times... however in one places he says "recalculation is faster then mem access" and this seems to be true :)
12:44 xiaomiao Woodi: hrm, memory access is O(1) ...
12:45 Woodi so maybe some simple subset of tasks where CPU is waiting could be replaced by calculations...
12:45 Kristien that has little to do with algoritmic complexity and more with hardware implementations
12:45 timotimo usually the computer will give cpu time to other processes when a process is waiting for I/O to complete
12:46 timotimo well, the OS will
12:46 xiaomiao AUGH
12:46 Woodi xiaomiao: big O notation is about number of steps algoritm is doing, right. but CPUs are waiting a lot lastly...
12:46 xiaomiao Woodi: it's a worst-case analysis
12:46 Kristien well the CPU does do multiple steps to address memory
12:46 xiaomiao Woodi: so e.g. sorting, best case you end up with a sorted input and spend o(n) to run over the input once
12:47 Woodi xiaomiao: but this guy hijacked that notation :) so it's mean something else
12:47 nine_ abraxxa: that seems to be fixed in nom
12:47 xiaomiao Woodi: but worst case you need to shuffle each element, so it ends up as O(n*log(n) ) or O(n*2)
12:47 xiaomiao Woodi: IT'S WRONG
12:47 xiaomiao you can't just define a constant to be variable
12:47 xiaomiao that's wrong. Don't do it. Don't try it.
12:48 Woodi xiaomiao: I agree. but problem is that calculation can be faster then mem access
12:48 xiaomiao actually the graphs in part 1, the "access cost" has a hard upper limit
12:48 Kristien Woodi: that isn't a problem
12:48 xiaomiao so what he discusses is *average* time, thus not big-oh
12:48 Kristien just don't cache!
12:48 xiaomiao Woodi: right, that is very sensitive to initial conditions
12:48 abraxxa nine_: i'll compile rakudo from that branch then
12:48 xiaomiao e.g. cache sizes, cache eviction rate, ...
12:48 xiaomiao hard to reason generally about it
12:48 abraxxa nine_: is that branch the one where the releases are made of?
12:49 xiaomiao ... which is not what big-oh notation is about
12:49 jnthn Indeed; constant factors and memory behavior matters plenty for performance, but that's not the focus of the big O.
12:49 Kristien a cache miss is O(oops)
12:49 jnthn It is important to be aware of constant factor differences, though.
12:50 Woodi hacking bigO is just excuse to point fact that if CPU is waiting then it is better to calculate. or switch thread :)
12:50 * Kristien is happy she never has to deal with performance at this level
12:51 xiaomiao http://queue.acm.org/detail.cfm?id=1814327
12:51 xiaomiao ^^ that is a good analysis of abstract O(n) notation and practical performance
12:51 brrt joined #perl6
12:51 * lizmat is trying to catch up with her irc backlog for the P6 weekly
12:51 lizmat my my, has the weekend been busy  :-)
12:51 brrt \o
12:51 jnthn Concrete example: Moar uses a worst-case O(n**3) algorithm for computing dominance frontiers. There's an O(n*log(n)) one for it too, that one has a high constant factor - sufficiently so that you can engineer the O(n**3) one to be faster on realistic sized problems. :)
12:51 brrt which i guess is becoming harder
12:52 jnthn o/ brrt
12:52 brrt \o jnthn
12:52 brrt jnhtn - 2 questions, what is realistically-sized, and what proportion of time is currently spent
12:52 xiaomiao jnthn: very nice example are integer factorization algos
12:53 brrt reasons for the first question is that realistically-sized-moar-frames are quite a bit larger than i personally had expected
12:53 xiaomiao jnthn: the best ones have such high setup costs that they only win for inputs >95 decimal digits iirc
12:53 Kristien the best ones require quantum computers
12:54 jnthn brrt: You'll have to dig up the paper (comment at the top of graph.c links it) for exact numbers, but iirc you have to be into the thousands of BBs before hitting the cross-over point.
12:54 xiaomiao Kristien: assuming that a quantum computer could stay coherent long enough ;)
12:54 brrt oh
12:55 brrt that is quite a constant size factor :-)
12:55 jnthn brrt: The amount of time spent isn't currently too bad. Especially after I fixed a stupid bug that made it an O(n**4) by accident :)
12:56 Kristien hmm, my book arrives tomorrow, not today
12:56 jnthn Kristien: Aww!
12:56 * jnthn bbi10
12:58 * Kristien wants to make an AWK slang
12:58 dalek Heuristic branch merge: pushed 36 commits to rakudo/newio by lizmat
12:58 Kristien hmm for/given/when
12:58 xiaomiao Woodi: augh. it only gets worse in the later parts
12:59 xiaomiao srsly. constants are not variable
13:00 brrt anyway i've been thinking about the parrot threading thing
13:00 brrt i really fail to see how it is better than 'regular' threads
13:01 brrt and ... how they should be nonblocking
13:02 timotimo i didn't understand where the dispatch to "things i should do for other threads" happens
13:02 wtw joined #perl6
13:03 Woodi I just wonder what if jit instead of saving value in varible and later accessing it just replicate calculations in value access placess...
13:03 Kristien brrt: green threads?
13:03 timotimo Woodi: only if the data you need for replicating the results is less than the result itself
13:03 timotimo for storage, i mean
13:03 timotimo or if the source data is needed very often all around anyway
13:04 brrt well yes, but green threads block
13:04 brrt Woodi: I can answer most questions about the JIT :-)
13:05 brrt timotimo, as far as i know the following happens
13:05 Kristien blocking and threads are orthogonal
13:05 Kristien blockingness is a feature of an API
13:05 brrt .... true.... but.....
13:05 Kristien butt
13:05 brrt threads without blocking apis don't make all that much sense
13:06 brrt they don't program like threads
13:06 brrt anyway, that's a separate discussion
13:06 kaleem joined #perl6
13:07 brrt thread a creates object a; thread a passes object a to thread b (somehow); thread b really gets a proxy to object a; thread b tries to access object a; but rather than really doing that, the access is queued for thread a to execute
13:07 timotimo right
13:07 brrt and thread b just waits on thread a to return the value
13:07 timotimo it's queued
13:08 timotimo but when does thread a actually pump values from the queue?
13:08 brrt which... blocks, if you ask me
13:08 timotimo between every two opcodes?
13:08 pdurbin left #perl6
13:08 brrt between every so many opcodes, just like gc checks
13:09 timotimo er, gc checks have to happen for every allocation
13:09 brrt yes, but gc checks also happen during normal running
13:09 brrt otherwise a single thread could starve all others
13:10 brrt if it never allocates
13:10 timotimo oh, right
13:10 timotimo because they have to all stop in order to do gc
13:10 brrt right
13:10 brrt not in all forms of gc, but they do in most efficient (as in throughput) forms
13:11 brrt sidenote; it kind of annoys me that GC research has all but been killed by the dies-young heuristic of generational GC
13:11 timotimo of course, i'm talking about moarvm's gc
13:11 timotimo don't know very much about parrot's gc
13:12 Woodi brrt: what's are interesting and unresearched cases ? :)
13:12 brrt pluggable, iirc, so there are a few
13:13 brrt in short, pauseless and or parallel GC aren't as efficient as generational yet, because they typically don't use the generational hypothesis / heuristic into account
13:14 arnsholt And as I understand it, they basically trade throughput for low latency, no?
13:14 brrt anyway, there are more ways to implement the function of 'ensuring there is always enough space'
13:14 jnthn brrt: s/parallel/concurrent/ ?
13:14 brrt yes
13:15 brrt and yes
13:15 jnthn Moar's GC is parallel, but not concurrent.
13:15 brrt oh, but you can do both
13:15 jnthn For sure :)
13:15 Mouq joined #perl6
13:15 Kristien I once implemented a VM that had one GC per thread.
13:15 Kristien and objects were shared between GC with a refcount
13:15 brrt what about cycles
13:16 Kristien only GCs count towards refcount, not references between objects -- those are resolved by the GCs
13:16 brrt i see, nice
13:17 Kristien and GCs were run at every context switch
13:17 Alina-malina joined #perl6
13:23 chenryn joined #perl6
13:25 timotimo we don't have a "startswith" or "endswith", right?
13:25 timotimo we'd do regexes instead?
13:27 Kristien m: "foobar".index("foo").say
13:27 camelia rakudo-moar 4bab48: OUTPUT«0␤»
13:28 timotimo m: "foobar".index("mom").say
13:28 camelia rakudo-moar 4bab48: OUTPUT«(Int)␤»
13:28 Kristien m: "whale".index("mom").say
13:28 camelia rakudo-moar 4bab48: OUTPUT«(Int)␤»
13:28 Kristien :O
13:29 timotimo m: "whale".index("jonah").say
13:29 camelia rakudo-moar 4bab48: OUTPUT«(Int)␤»
13:50 [Sno] joined #perl6
13:55 dakkar joined #perl6
14:01 xfix joined #perl6
14:07 btyler hi all. playing around with OO::Monitors and bumping into an explosion when I use it on something with a BUILD submethod: https://gist.github.com/kanat​ohodets/9b1d1b8debcff0ad000a
14:08 btyler I looked at the source to OO::Monitors, but it is still a little dense for my ability level, and I don't understand why BUILD makes it unhappy
14:09 mvuets joined #perl6
14:12 timotimo because the lock that the monitor gives you is initialized too late
14:12 timotimo your submethod BUILD is run before monitor's thingie has a chance to build the lock :(
14:12 jnthn D'oh :)
14:12 jnthn Who the heck wrote that darn OO::Monitors module...
14:14 Woodi jnthn: yea, someone should do Actor-based instead ;)
14:14 jnthn :P
14:15 * jnthn did write OO::Monitors and OO::Actors in the space of about 2-3 hours...betwene the two :)
14:15 jnthn "Oh no I have a talk and I said it'd be about objects and concurrency"
14:15 Woodi but Actors looks like nice evolution of objects, threads and delay enc^Wrationalization...
14:16 kaare_ joined #perl6
14:18 btyler for context: ab5tract and I were hacking on something to do some map-reduce-ish stuff with Inline::Perl5 and existing p5 DB code. the p5 DB code takes a little while to load, so we wanted to create a p5 interpreter pool and feed it out to p6 threads for them to do their work
14:19 btyler and OO::Monitors seemed like a nice way to handle the worker pool bits -- threads would just block until a new interpreter became available
14:20 dj_goku_ joined #perl6
14:21 btyler btw, for 50% of 2-3 hours, OO::Monitors does a pretty stellar job preventing perl5 from segfaulting when compiled without multiplicity and accessed from multiple perl6 threads :)
14:23 jnthn Wow :)
14:24 ven joined #perl6
14:24 ven o/, #perl6
14:25 btyler er, let me correct that statement for the historical record: accessing any single p5 interpreter from multiple p6 threads, multiplicity or not
14:25 btyler multiplicity lets you create multiple p5s in the same p6 process space without segfaulting
14:26 btyler touching any single one from multiple threads is a recipe for unhappiness in any case
14:26 ven m:     my ($found) = grep { .say; $_ == 5 }, (1..1_000_000); say $found
14:26 camelia rakudo-moar d29715: OUTPUT«1␤2␤3␤4␤5␤5␤»
14:27 ven m: try { { leave 5 }; };try { -> { leave } };
14:27 camelia rakudo-moar d29715: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/0O2Fq7Xzemâ�¤Undeclared routine:â�¤    leave used at line 1â�¤â�¤Â»
14:28 timotimo m: my ($found) = first-index { .say; $_ == 5 }, (1..1_000_000); say $found
14:28 camelia rakudo-moar d29715: OUTPUT«1␤2␤3␤4␤5␤4␤»
14:28 timotimo m: my ($found) = (grep { .say; $_ == 5 }, (1..1_000_000))[0]; say $found
14:28 camelia rakudo-moar d29715: OUTPUT«1␤2␤3␤4␤5␤5␤»
14:30 * ven 's reading the apocalypses and chuckling a bit at times
14:31 lizmat m: sub a(Int(Cool:D) $a) { say $a }; a Cool   # feels this should fail
14:31 camelia rakudo-moar d29715: OUTPUT«use of uninitialized value of type Cool in numeric context  in sub a at /tmp/L77KWsiM9N:1␤␤0␤»
14:32 lizmat or complain about the :D in the coercer
14:32 lizmat std: sub a(Int(Cool:D) $a) { say $a }; a Cool
14:32 camelia std f9b7f55: OUTPUT«ok 00:01 141m␤»
14:32 ven m: my @xxx = 1, 2, 3; my @yyy = <a b c>; my @zzz = <I II III>;    for @xxx; @yyy; @zzz -> $x; $y; $z { say "$x $y $z" }
14:32 camelia rakudo-moar d29715: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/ZdH8uvjGARâ�¤Missing blockâ�¤at /tmp/ZdH8uvjGAR:1â�¤------> [32m b c>; my @zzz = <I II III>;    for @xxx[33mâ��[31m; @yyy; @zzz -> $x; $y; $z { say "$x $y [0mâ�¤    expecting any of:â�¤        p…»
14:33 lizmat m: sub a(Cool:D $a as Int) { say $a }; a Cool  # should fail like this
14:33 camelia rakudo-moar d29715: OUTPUT«Parameter '$a' requires an instance, but a type object was passed␤  in sub a at /tmp/D5UepJwrRP:1␤  in block <unit> at /tmp/D5UepJwrRP:1␤␤»
14:33 timotimo sounds reasonable to me, maybe someone could rakudobug it
14:33 lizmat I will
14:34 jnthn lizmat: Yeah...which in turn really wants definedness types to become first class too...
14:34 ven jnthn: should the definedness types be defined? :P
14:35 jnthn No, type objects never are :P
14:35 ven (was there "for @xx; @yy" removed in favor of Z[,]?
14:35 ven )
14:36 ven -there, actually.
14:37 ven m: sub foo($a, @b, $c) { say $c }; foo(3, ^10, 5) # that'll be Any post-GLR, yes?
14:37 camelia rakudo-moar d29715: OUTPUT«5␤»
14:44 lizmat rakudobugged as #123770
14:44 synopsebot Link: https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=123770
14:45 jnthn ven: No, still 5 there
14:47 ven jnthn: then I didn't understand the flattening of the GLR :p. why does it keep the 5, as it's the end of the list (and IIRC my (@a, $b) = ... puts Any in the last one)?
14:47 jnthn ven: You're confusing assignment with binding.
14:48 ven I definitely am..
14:48 grondilu joined #perl6
14:48 telex joined #perl6
14:48 jnthn We don't flatten on sub calls unless the callee demands it with | or the caller demands it with *
14:49 jnthn s/sub//
14:49 dalek rakudo/nom: 22e8c05 | lizmat++ | src/core/ (20 files):
14:49 dalek rakudo/nom: Eradicate now obsolete "as" coercer from the core
14:49 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/22e8c05648
14:50 moritz lizmat++
14:50 lizmat where would I need to look to deprecate "as"  ??
14:50 lizmat I don't see a trait doing "as" ?
14:50 jnthn m: sub foo(Str() $a) { say $a.WHAT; }; foo(42);
14:50 camelia rakudo-moar d29715: OUTPUT«(Str)␤»
14:51 ven jnthn: I'll go re-read pmichaud++'s blog post, then.
14:51 jnthn lizmat: Note that Str(Any) can be written Str()
14:51 lizmat ah, ok, will fix  :-)
14:51 moritz lizmat: git grep 'trait_mod:<as>'
14:51 lizmat moritz: duh  :-)
14:51 jnthn lizmat: No semantic difference, just a little stylisher
14:51 jnthn lizmat: I *thought* there was an as trait in CORE.setting, otherwise we may handle it in the compiler directly. But I don't *think* so.
14:52 * moritz has used https://github.com/moritz/perl6-all-modules to find the modules in the ecosystem that use "as"
14:52 moritz and I've started a panda branch that gets rid of it
14:52 jnthn Cool
14:52 jnthn lizmat++ moritz++
14:52 moritz but won't merge until after the Feb release
14:52 jnthn Aye
14:57 ven jnthn: ah, I misread that sentence "The above two points produce a general guideline that method call invocants are generally not-flattened, while function call arguments are more likely to be."
14:57 ven they are *more likely to be*. it's up to the caller to decide, *BUT* the core.setting will (mostly) do it
14:58 lizmat jnthn, moritz : so when did Str(Any) start to work?  was that hoelzro's work
14:58 lizmat ?
14:58 Kristien joined #perl6
14:58 * ven feels much less scared now.
14:58 timotimo jnthn made that work as part of the 6pe-mop merge, no?
14:58 moritz lizmat: jnthn++ implemented, and I merged it... yesterday?
14:59 lizmat ok, and the "pe" was for "parametric extensions" right?
14:59 moritz yes
14:59 lizmat okidoki
14:59 dalek rakudo/nom: 9ac3df0 | lizmat++ | src/core/ (12 files):
14:59 dalek rakudo/nom: Str() is more idiomatic than Str(Any), jnthn++
14:59 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/9ac3df05f5
15:00 timotimo yup, the target type of a coercion is the parameter set on "coercive types" or something like that
15:00 timotimo i still have no clue how the whole thing works :D
15:00 timotimo but i haven't looked either
15:00 moritz "by magic"
15:00 jnthn ven: Yes, the sentence kinda has an implicit "When it comes to list operations like map and grep, ..."
15:01 ven jnthn: the first time(s) I read that as "method calls won't flatten whereas sub calls will always flatten", which felt scary
15:01 jnthn lizmat: 6pe in Moar/NQP is a very general mechanism for type parameterization and (once I get to it) interning them across compilation units.
15:02 ven m: sub trait_mod:<is>(Routine $r, :$chainable!) { $r.wrap(-> { callsame; self }) }; class A{method foo is chainable{say 1}}; say A.new.foo
15:02 camelia rakudo-moar d29715: OUTPUT«[31m===[0mSORRY![31m===[0m�'self' used where no object is available�at /tmp/HLQ4Me4Mta:1�------> [32m :$chainable!) { $r.wrap(-> { callsame; [33m�[31mself }) }; class A{method foo is chainab[0m�Missing block�at /tmp/HLQ4Me4Mta:1�-----…»
15:02 jnthn lizmat: The primary motivation was typed data structures, but it turns out the exact same mechanism is also a great way to implement coercion types and cache mixins. :)
15:03 lizmat jnthn: may I quote you on that  :-)
15:03 jnthn lizmat: Sure
15:03 jnthn lizmat: The reason I did coercion types and the mixin cache first is 'cus (a) they're useful, and (b) they're a gentler first test for the 6pe implementation :)
15:03 jnthn Well, and (c) 'cus native arrays need the native-ref stuff that I've been working on recently.
15:04 lizmat :-)
15:05 jnthn lizmat: Dunno how much you inferred from the log, but the main story so far in terms of Perl 6 benefits is my branch has working "has int $.x is rw" (rw-accessors for native things) and various Buf assignment cases got fixed ($buf[0, 1] = 1,2; for example, which was busted before).
15:06 salva joined #perl6
15:09 rindolf joined #perl6
15:11 Kristien joined #perl6
15:15 adu joined #perl6
15:17 lizmat hmm...  interesting task: finding out the line number of the code being parsed while inside a trait  :-(
15:17 jnthn lizmat: Hmm
15:18 lizmat nqp::getlexcaller('$/') ?
15:18 jnthn lizmat: How hard is it to add deprecated things from inside the parser, ooc?
15:18 jnthn lizmat: 'cus you might consider just doing it in the trait_mod:<as> action method...
15:18 chenryn joined #perl6
15:18 lizmat not very, I would think, it's just a sub call really
15:18 jnthn Or grammar rule
15:18 lizmat hmmm....
15:20 lizmat or just add $/ as an extra parameter in "$*W.apply_trait($/, '&trait_mod:<as>', $declarand, $<typename>.ast);" ?
15:20 lizmat and use that in the P6 code ?
15:21 jnthn lizmat: Or just since this is temporary set a contextual in the parser and look for it in the trait.
15:21 colomon has rakudo’s qq:to indent functionality changed to convert tabs to spaces?
15:21 jnthn Or what you suggested
15:21 lizmat jnthn: once we remove "as" as a Parameter trait, the whole handling of "as" can be deleted
15:22 lizmat so I think adding an extra param is the easiest way
15:23 jnthn lizmat: Yeah, don't have the code in front of me; if the extra param is easy enough then go for it.
15:23 ven m: sub trait_mod:<is>(Routine $r, :$chainable!) { $r.wrap(-> { callsame; nqp::getlexcaller('self') }) }; class A{method foo is chainable{say 1}}; say A.new.foo
15:23 camelia rakudo-moar d29715: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/INc0yiL2iD�Missing block�at /tmp/INc0yiL2iD:1�------> [32m; class A{method foo is chainable{say 1}[33m�[31m}; say A.new.foo[0m�»
15:23 lizmat looks like  :-)
15:23 ven dang it :P
15:24 jnthn ven: $r.wrap(-> \self, |c { callsame; self })
15:25 ven m: sub trait_mod:<is>(Routine $r, :$chainable!) { $r.wrap(-> \self, |c { callsame; self }) }; class A{method foo is chainable{say 1}}; say A.new.foo
15:25 camelia rakudo-moar d29715: OUTPUT«[31m===[0mSORRY![31m===[0m�'self' used where no object is available�at /tmp/5CeD2W6Yfv:1�------> [32mle!) { $r.wrap(-> \self, |c { callsame; [33m�[31mself }) }; class A{method foo is chainab[0m�Missing block�at /tmp/5CeD2W6Yfv:1�-----…»
15:25 ven m: sub trait_mod:<is>(Routine $r, :$chainable!) { $r.wrap(-> \this, |c { callsame; this }) }; class A{method foo is chainable{say 1}}; say A.new.foo
15:25 camelia rakudo-moar d29715: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/XexPnkKNDK�Missing block�at /tmp/XexPnkKNDK:1�------> [32m; class A{method foo is chainable{say 1}[33m�[31m}; say A.new.foo[0m�»
15:26 jnthn m: sub trait_mod:<is>(Routine $r, :$chainable!) { $r.wrap(-> \this, |c { callsame; this }) }; class A{method foo is chainable {say 1}}; say A.new.foo
15:26 camelia rakudo-moar d29715: OUTPUT«1␤A.new()␤»
15:26 jnthn Otherwise the {...} is taken as an argument to the trait
15:32 hoelzro o/ #perl6
15:35 cursork joined #perl6
15:36 Util \o hoelzro
15:36 sjn \o #perl6
15:36 * sjn is reading http://www.joelonsoftware.com/articles/Wrong.html
15:37 sjn it got me thinking; is there a way to "taint" and "untaint" variables in Perl 6?
15:38 lizmat spec says: our enum Taint does Tainting <Untainted Tainted>;
15:39 lizmat NYI AFAIK
15:39 pmichaud s/spec/synopses/
15:39 sjn right
15:39 ven ooh >_>
15:39 lizmat pmichaud: oops, sorry, old habits die hard
15:39 pmichaud lizmat: for me also.  :)
15:41 * lizmat gives up on deprecation "as" trait atm, it requires quite a lot of work in Deprecations.pm as well
15:48 colomon lots of failures on smoker this morning — is NativeCall borked?
15:50 jnthn colomon: If so it's first report I've heard of it.
15:50 pmurias hoelzro: hi
15:51 colomon jnthn: I’ll try it by hand
15:51 dalek nqp/js: e4174c8 | (Pawel Murias)++ | src/vm/js/nqp-runtime/reprs.js:
15:51 dalek nqp/js: Stub the NFA repr.
15:51 dalek nqp/js: review: https://github.com/perl6/nqp/commit/e4174c8ce9
15:51 dalek nqp/js: 9ee2b35 | (Pawel Murias)++ | src/vm/js/nqp-runtime/runtime.js:
15:51 dalek nqp/js: Capture lexical scopes correctly so the setting isn't lost when loading a module.
15:51 dalek nqp/js: review: https://github.com/perl6/nqp/commit/9ee2b35e41
15:51 dalek nqp/js: 9fc8c03 | (Pawel Murias)++ | src/vm/js/bin/ (2 files):
15:51 dalek nqp/js: Load QRegex by default.
15:51 dalek nqp/js:
15:51 dalek nqp/js: Add t/qast/02-manipulation.t to run_tests.
15:51 dalek nqp/js: review: https://github.com/perl6/nqp/commit/9fc8c03dd6
15:52 b2gills m: ^2 R[&say] 1 # what ?!
15:52 camelia rakudo-moar 9ac3df: OUTPUT«10..^2␤»
15:52 moritz GIGO?
15:53 jnthn lol
15:53 jnthn m: say 1, ^2
15:53 camelia rakudo-moar 9ac3df: OUTPUT«10..^2␤»
15:53 jnthn m: say ^2
15:53 camelia rakudo-moar 9ac3df: OUTPUT«0..^2␤»
15:53 jnthn Doesn't put spaces in :)
15:53 b2gills ( I just figured that out after posting )
15:54 * jnthn hands b2gills today's Worst Use Of Meta-operator award
15:54 b2gills I would like to thank the *
15:55 ven moritz: does your latest commit(s) mean we can't have "Abstract classes" (or rather, placeholder classes) anymore?
15:55 * pmurias still conside
15:55 pmurias sorry
15:55 colomon jnthn:
15:55 colomon NativeCall
15:55 colomon *build stage failed for NativeCall: Failed building lib/NativeCall.pm6
15:55 colomon ===SORRY!=== Error while compiling lib/NativeCall.pm6
15:55 colomon 'IntTypedCArray' cannot inherit from 'CArray' because 'CArray' isn't compose yet (maybe it is stubbed)
15:55 colomon at lib/NativeCall.pm6:194
15:56 jnthn Hm, that'd be moritz++'s patch from earlier today
15:56 moritz oh, that might be my fault
15:56 * jnthn is still surprised
15:57 hoelzro pmurias: I was looking at implementing findmethod earlier today; the objects hanging off of JS objects in nqp-js are JS functions. Is there a way to get the CodeRef object corresponding to a method?
15:57 jnthn Oh my...
15:57 hoelzro I was thinking of attaching the method object to the Function via _method or something
15:57 hoelzro but you may have a better idea
15:58 moritz jnthn: how did that ever work? :/
15:58 jnthn moritz: 'cus the role doesn't get composed until punned
15:58 jnthn moritz: And the is doesn't take effect until then.
15:59 moritz jnthn: should the check be moved to composition time?
16:00 jnthn moritz: Dunno. I'm more inclined to say NativeCall shouldn't be doing what it is...
16:00 jnthn The easy workaround for now to fix it is to move the roles and multis relating to them into an augment (more)
16:00 dalek nqp/js: 232b9cf | (Pawel Murias)++ | t/nqp/90-findmethod.t:
16:00 dalek nqp/js: Add a findmethod test.
16:00 dalek nqp/js: review: https://github.com/perl6/nqp/commit/232b9cfb70
16:00 Kristien joined #perl6
16:01 jnthn I suspect once we have native arrays in core there's going to be a much better way to write CArray
16:01 hoelzro pmurias: much better than the dumb test I wrote =)
16:02 kaleem joined #perl6
16:02 pmurias hoelzro: attaching the code ref would work, I was thinking of getting the method out of the method cache
16:02 hoelzro ah ha
16:02 hoelzro that would do
16:05 dalek nqp/js: d38f177 | (Pawel Murias)++ | src/vm/js/ (3 files):
16:05 dalek nqp/js: Implement nqp::findmethod.
16:05 dalek nqp/js: review: https://github.com/perl6/nqp/commit/d38f1776c9
16:05 hoelzro aw man, you beat me to it =P
16:06 pmurias it seems my commit is wrong :(
16:07 dalek nqp/js: 33a0a90 | (Pawel Murias)++ | src/vm/js/nqp-runtime/core.js:
16:07 dalek nqp/js: Fix previous commit.
16:07 dalek nqp/js: review: https://github.com/perl6/nqp/commit/33a0a9065f
16:09 lizmat This week's P6 weekly draft: https://p6weekly.wordpress.com/?p=​381&amp;shareadraft=54d8dbab2f272
16:09 lizmat comments, suggestions, etc. very welcome
16:10 lizmat ETA for publishing at 19:00 UTC (almost 3 hours from now)
16:12 moritz lizmat: the colomon++ TODO list seems to lack a link
16:13 jnthn lizmat: The...what moritz said :)
16:13 lizmat hehe  indeed
16:13 mr-foobar joined #perl6
16:13 jnthn lizmat: The 6pe merge also got us the 10x faster mixins :)
16:14 lizmat how do you measure that ?
16:14 jnthn Before:
16:14 jnthn C:\consulting\rakudo>timecmd perl6-m -e "role R { }; class C { }; for ^100000 { C.new does R };"
16:14 jnthn command took 0:0:46.98 (46.98s tota
16:14 jnthn After:
16:14 jnthn timecmd perl6-m -e "role R { }; class C { }; for ^100000 { C.new does R };"
16:14 jnthn command took 0:0:4.84 (4.84s tota
16:14 lizmat moritz jnthn: link added
16:15 lizmat o, so that would make compilation faster
16:15 moritz jnthn: ... but only when doing the same mixin all over
16:15 moritz right?
16:15 * masak .oO( you can never mix into the same role twice )
16:15 pmurias hoelzro: to avoid duplication of work you could "claim" some TODO tasks ;)
16:16 hoelzro pmurias: just throw my name next to the task in TODO?
16:16 hoelzro lizmat++ # p6weekly
16:16 jnthn lizmat: Yes, I got CORE.setting about 700KB smaller due to re-use too.
16:16 pmurias hoelzro: that would work fine
16:16 jnthn Which may also be wroth a mention
16:16 jnthn moritz: Sure, but that's a common case
16:16 hoelzro pmurias: ok, sounds good to me!
16:16 jnthn moritz: Int but True for example
16:17 jnthn Or the many mixins of the Doc role, precedence, etc. in CORE.setting
16:18 raiph joined #perl6
16:18 moritz jnthn: Such but Wow :-)
16:19 lizmat jnthn: added
16:22 * lizmat finally caught up with the backlog
16:26 b2gills m: class unsafe-Str is Str { multi method Str (unsafe-Str:D:){ uc nqp::unbox_s self } }; multi sub say(unsafe-Str){die}; my unsafe-Str $us .= new: :value<hello world>; say $us.Str; say $us; # http://www.joelonsoftware.com/articles/Wrong.html
16:26 camelia rakudo-moar 9ac3df: OUTPUT«HELLO WORLD␤Died␤  in sub say at /tmp/Is6hYtzh6Y:1␤  in block <unit> at /tmp/Is6hYtzh6Y:1␤␤»
16:28 b2gills sjn: ^ That is how I would handle unsafe strings
16:30 moritz b2gills: the problem is that it doesn't propagate by conatenation, for example
16:30 FROGGS lizmat++ # weekly
16:32 dalek perl6-roast-data: 39610e4 | coke++ | / (5 files):
16:32 dalek perl6-roast-data: today (automated commit)
16:32 dalek perl6-roast-data: review: https://github.com/coke/perl6​-roast-data/commit/39610e445f
16:33 b2gills moritz: You get the idea though. A real implementation will require more work, including a more complete re-implementation of &say in the local scope
16:33 brrt left #perl6
16:34 moritz b2gills: I don't think it's viable
16:35 b2gills It may have to be `class unsafe-Str { has $!Str }`
16:35 ab5tract jnthn: regarding OO::Monitors... i had trouble telling whether this could have been written as a Role, or whether it needed to become it's own keyword-y thing
16:36 jnthn ab5tract: Not really, the point is that you want the locking applied to the methods automatically.
16:37 b2gills The point is using the type system instead of only on coding convention
16:37 jnthn ab5tract: You can easily get a lock attribute composed in through a role, but intercepting dispatch needs the MOP stuff.
16:38 jnthn Could then have just made all classes in the scope using the module have monitor semantics, but that's not the Perl 6 way
16:38 ab5tract interesting
16:38 jnthn (Like we add new operators for new meanings, not overload existing ones with unrelated meanings.)
16:38 ab5tract what about all classes with a given role within the scope having monitor semantics ;)
16:38 dalek rakudo/newio: 22e8c05 | lizmat++ | src/core/ (20 files):
16:38 dalek rakudo/newio: Eradicate now obsolete "as" coercer from the core
16:38 dalek rakudo/newio: review: https://github.com/rakudo/rakudo/commit/22e8c05648
16:38 dalek rakudo/newio: 9ac3df0 | lizmat++ | src/core/ (12 files):
16:38 dalek rakudo/newio: Str() is more idiomatic than Str(Any), jnthn++
16:38 dalek rakudo/newio: review: https://github.com/rakudo/rakudo/commit/9ac3df05f5
16:38 dalek rakudo/newio: cdac0e6 | lizmat++ | src/core/ (18 files):
16:38 dalek rakudo/newio: Merge branch 'nom' into newio
16:38 dalek rakudo/newio: review: https://github.com/rakudo/rakudo/commit/cdac0e69ba
16:39 ab5tract but i think i see what you mean. we are rewiring some mop internals, so the only real clean way is to bundle that rewiring into its own keyword
16:40 ab5tract *mop internals behavior
16:40 jnthn Yeah, it's just extending a set of things Perl 6 already has a bunch of entries for (class, grammar, role, module, package...)
16:41 dalek zavolaj: b29e0a3 | moritz++ | lib/NativeCall.pm6:
16:41 dalek zavolaj: Fix for latest rakudo
16:41 dalek zavolaj: review: https://github.com/jnthn/zavolaj/commit/b29e0a349f
16:42 moritz colomon: ^^ FTFY
16:42 colomon moritz++ # it works
16:43 * colomon relaunched the smoker on hack
16:44 dalek rakudo/newio: 2f5a7aa | lizmat++ | src/core/ (4 files):
16:44 dalek rakudo/newio: Some more "as" coercion trait eradication
16:44 dalek rakudo/newio: review: https://github.com/rakudo/rakudo/commit/2f5a7aa1a7
16:49 adu joined #perl6
16:53 ab5tract .tell nine sometimes i am getting back Bufs from Class::DBI, instead of strings. the column type is varchar with a utf8 character set
16:53 yoleaux ab5tract: I'll pass your message to nine.
16:53 ab5tract .tell nine which then makes it explode when trying to stringify
16:53 yoleaux ab5tract: I'll pass your message to nine.
16:54 moritz ab5tract: sounds nasty. Perl 5 doesn't really distinguish strings and buffers the way Perl 6 does
16:56 nine_ ab5tract: the current heuristic is to convert strings with a set utf8 flag to Str and everything else to Buf where you have to decode manually. Unfortunately it's hard to predict what you'll get. It works just fine with DBD::Pg since this always sets the utf8 flag on strings.
16:56 ab5tract moritz: indeed. character encodings are generally a mine field. p6 is heading in the right direction
16:57 ab5tract nine_: i see. i will poke at it a bit. it confuses me how i would get both Buf and Str for values of the same column, in the same query
16:58 beastd joined #perl6
16:58 moritz ab5tract: perl 5 can represent strings with all codepoints < 256 in two different ways
16:59 moritz ab5tract: and for the programmer, it's pretty much random which one is chosen
16:59 dalek rakudo/newio: ed8670e | lizmat++ | src/core/io_operators.pm:
16:59 dalek rakudo/newio: Fix some faulty coercions
16:59 dalek rakudo/newio: review: https://github.com/rakudo/rakudo/commit/ed8670e575
16:59 moritz s/random/opaque/
17:00 lizmat afk for a bit&
17:01 spider-mario joined #perl6
17:04 skids joined #perl6
17:06 ab5tract moritz: indeed.
17:12 dayangkun joined #perl6
17:14 eternaleye joined #perl6
17:17 sftp joined #perl6
17:17 nine_ ab5tract: correction: I treat all pure 7 bit ASCIi P5 strings as Strcas well
17:18 diana_olhovik joined #perl6
17:19 moritz I see posts like this http://www.reddit.com/r/programming/comment​s/2va4e9/the_repeated_deaths_of_oop/cog3dan and think "and they call Perl line noise"
17:19 moritz (>>=) :: [a] -> (a -> [b]) -> [b]
17:19 Mouq joined #perl6
17:20 colomon indeed
17:20 molaf joined #perl6
17:20 moritz fish throwning into a box which starts a slide into another series of boxes
17:20 moritz *thrown
17:21 Kristien joined #perl6
17:22 Kristien hi
17:22 moritz \o Kristien
17:23 Kristien what would you call a queue in which equal values cannot be inserted twice?
17:23 rindolf joined #perl6
17:24 jnthn .oO( a quenique )
17:24 Kristien such that given { $q.enqueue(1); $q.dequeue(); $q.enqueue(1); } then $q.empty() is true?
17:25 Kristien It thought of "once queue" but that's so ambiguous.
17:28 japhb joined #perl6
17:28 ingy ☺/
17:29 dj_goku joined #perl6
17:29 dj_goku joined #perl6
17:30 Kristien ingy: hi!
17:30 dalek rakudo/nom: 7a543d1 | Mouq++ | docs/ChangeLog:
17:30 dalek rakudo/nom: Add two ChangeLog entries
17:30 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/7a543d1eb3
17:30 ingy ¡hi Kristien!
17:31 sftp joined #perl6
17:32 Kristien I'll go with "once queue"
17:32 moritz Kristien: uniqueue
17:32 moritz a pun on 'unique' and 'queue'
17:39 hoelzro pmurias: you mentioned that those missing ops are necessary for QASTNode.  Once they're all implemented, do you have a test to make sure QASTNode is working?
17:41 pmurias t/qast/02-manipulation.t
17:43 hoelzro ah, perfect =)
17:43 pmurias I have a test in t/qast-node.t in the github pmurias/rakudo-js repo that I'm porting thing over from
17:44 hoelzro hmm, that test is currently passing
17:45 dalek nqp/js: a81dd83 | (Pawel Murias)++ | t/qast/02-manipulation.t:
17:45 dalek nqp/js: Add a commented out failing part of a test.
17:45 dalek nqp/js: review: https://github.com/perl6/nqp/commit/a81dd83309
17:45 pmurias hoelzro: parts of QASTNode are working, others end up using a NYI op
17:46 hoelzro pmurias: and the latter aren't addressed by that test yet?
17:47 Kristien moritz: Queue::Once it is: https://gist.github.com/rig​htfold/25dbf34cb276c21d0753
17:49 pmurias hoelzro: nqp::reprname seems to be missing
17:50 * moritz might have also called Queue::Resentful or Queue::Unforgiving :-)
17:50 moritz *it
17:50 Kristien Queue::Unforgiving would die :P
17:50 _mg_ joined #perl6
17:50 Kristien How about Queue::Ohm, since it resists?
17:51 jnthn Queue::Highlander
17:51 pmurias hoelzro: I have to leave now, I'll check what's left for QASTNode in more detail tommorow morning
17:52 Kristien Queue::Dupliphobic
17:54 mj41 joined #perl6
17:56 dalek nqp/js: 6b77ae8 | (Pawel Murias)++ | TODO:
17:56 dalek nqp/js: Update TODO.
17:56 dalek nqp/js: review: https://github.com/perl6/nqp/commit/6b77ae82a4
18:01 dalek nqp/js: bdfce82 | (Pawel Murias)++ | TODO:
18:01 dalek nqp/js: Mark TODO task as medium.
18:01 dalek nqp/js: review: https://github.com/perl6/nqp/commit/bdfce824ab
18:04 pmurias hoelzro: there a couple of tasks in TODO you could work on without blocking on any hard to work around problems
18:04 pmurias got to leave&
18:08 |Tux| does perl6' «use Test;» support «is($thing, rx{ "some literal text" }, "check if thing has text");» ?
18:08 colomon moritz++ # smoker results much better after your fix
18:15 |Tux| ok($thing ~~ rx{"some text"}, "test name"); # works fine, but misses out on the diagnostic (got vs. expect)
18:17 mattp_ joined #perl6
18:18 _dolmen_ joined #perl6
18:20 dalek perl6-most-wanted: ec230e4 | (Michal Jurosz)++ | most-wanted/bindings.md:
18:20 dalek perl6-most-wanted: Add libgit2 to bindings.md
18:20 dalek perl6-most-wanted: review: https://github.com/perl6/perl6​-most-wanted/commit/ec230e4d28
18:21 jdv79 { use v5; use $p5_mod; } should work, right?
18:21 jdv79 i get an error about the "package $p5_mod;" line not being valid p6
18:25 Kristien joined #perl6
18:26 gfldex joined #perl6
18:26 Kristien moritz: I thought of "geminiphobic queue"
18:26 hoelzro I was thinking about the idea of bundling doc.perl6.org into Rakudo itself, so Str.WHY (for example) would return something useful
18:26 Kristien A geminiphobe is afraid of twins.
18:26 Mso150 joined #perl6
18:27 hoelzro at first I thought of baking these into rakudo itself, but then I thought about how that would increase start up time
18:27 hoelzro what if we were to store compiled versions of the docs in @*INC somehow? would that be an approach everyone would feel comfortable about?
18:30 itz_ hoelzro: Str.WHY should return something useful if you run p6doc-index first
18:30 hoelzro itz_: is that in the rakudo repo?
18:31 itz_ no its in the doc repo
18:31 * hoelzro looks
18:32 hoelzro itz_: and rakudo loads this index file?
18:32 itz_ no p6doc
18:33 hoelzro ah, that's why I'm confused =)
18:33 hoelzro I would like to make this work:
18:33 hoelzro m: say Str.WHYU
18:33 camelia rakudo-moar 9ac3df: OUTPUT«No such method 'WHYU' for invocant of type 'Str'␤  in block <unit> at /tmp/_TvY2cBKgw:1␤␤»
18:33 hoelzro dammit
18:33 hoelzro m: say Str.WHY
18:33 camelia rakudo-moar 9ac3df: OUTPUT«Invocant requires an instance, but a type object was passed␤  in method WHY at src/gen/m-CORE.setting:6761␤  in block <unit> at /tmp/tNPzgn2kG5:1␤␤»
18:33 hoelzro huh.
18:33 hoelzro that's odd.
18:33 hoelzro m: say Int.WHY
18:33 camelia rakudo-moar 9ac3df: OUTPUT«(Any)␤»
18:34 b2gills m: say "Life, the Universe, and Everything".WHY; # it's because of this
18:34 camelia rakudo-moar 9ac3df: OUTPUT«42␤»
18:34 El_Che left #perl6
18:34 hoelzro yeah, I remember that easter egg
18:34 hoelzro I'
18:34 El_Che joined #perl6
18:34 hoelzro we should probably make Str.WHY not blow up, though
18:35 itz_ what should Str.WHY return?
18:36 b2gills I'd almost say that easter should be removed, but it currently can be used to make sure the implementation allows such overloading
18:36 flussence right now, (Any) would be a good start...
18:36 mj41 lizmat: https://registry.hub.docker.com/u/mj41/perl6-star/ ... still 20 minutes to p6weekly deadline?
18:36 mj41 :-)
18:37 dalek Inline-Perl6: a299d61 | (Stefan Seifert)++ | / (4 files):
18:37 dalek Inline-Perl6: Remove last obstacle for an installable Inline::Perl6
18:37 dalek Inline-Perl6:
18:37 dalek Inline-Perl6: Renamed inline.pl6 to Inline::Perl6::Helper and look for it in @INC
18:37 dalek Inline-Perl6: so it can get installed by MakeMaker's make install like any other
18:37 dalek Inline-Perl6: module.
18:37 dalek Inline-Perl6: review: https://github.com/niner/Inl​ine-Perl6/commit/a299d61d7f
18:37 flussence (would it be out of the question to simply stuff all the Pod strings into a DOC.setting?)
18:37 itz_ oh I see not consistrant
18:37 itz_ errr
18:38 itz_ constaint
18:38 flussence consistent? :)
18:38 itz_ flussence++ # autocorrect
18:38 diana_olhovik__ joined #perl6
18:39 b2gills Perhaps the defined constraint can be removed from Str.WHY, or  use multi methods
18:40 TimToady can always return "42"
18:41 xfix sub { get-the-answer }.WHY # 42
18:41 hoelzro itz_: preferably 'Built-in class for strings. Objects of type Str are immutable.'
18:44 hoelzro removing the definedness constraint and checking for definedness in that if fix the issue
18:44 dalek Inline-Perl6: 2db30e1 | (Stefan Seifert)++ | lib/Inline/Perl6.pm:
18:44 dalek Inline-Perl6: Provide some basic information on how to install and use.
18:44 dalek Inline-Perl6: review: https://github.com/niner/Inl​ine-Perl6/commit/2db30e1f34
18:45 rindolf joined #perl6
18:46 FROGGS joined #perl6
18:48 Kristien m: Str.WHY.say
18:48 camelia rakudo-moar 7a543d: OUTPUT«Invocant requires an instance, but a type object was passed␤  in method WHY at src/gen/m-CORE.setting:6761␤  in block <unit> at /tmp/xkyAMIT5Rq:1␤␤»
18:48 Kristien m: "42".WHY.say
18:48 camelia rakudo-moar 7a543d: OUTPUT«(Any)␤»
18:48 grettir joined #perl6
18:51 El_Che camelia kills my irssi buffer it seems :)
18:51 grondilu joined #perl6
18:51 El_Che I don't know what you guys are printing :)
18:51 TimToady it's just UTF-8
18:51 Kristien oh WHY returns pod
18:52 El_Che this config works fine with utf-8
18:52 hoelzro I was thinking of using perl6/doc to build WHYs for the core classes and put them somewhere rakudo could load it
18:52 El_Che oh, maybe not (the server was rebooted, let me check :) )
18:52 * grondilu learnt about the lastlog IRC command today
18:52 TimToady sometimes it's irssi, sometimes your terminal emulator, or screen
18:53 TimToady if anything in the pipeline decides it doesn't like utf8, it can be a problem
18:55 moritz http://perlgeek.de/en/article/s​et-up-a-clean-utf8-environment
18:55 bayprogrammer joined #perl6
18:56 nine_ Inline::Perl6 has entered the CPAN :)
18:57 moritz \o/
18:58 jnthn \o/
18:58 jnthn nine_: Does it depend on you having a Rakudo-moar installed somewhere already, or does it bundle a private one?
18:59 nine_ jnthn: it assumes a perl6 in the PATH and that this perl6 is using the MoarVM backend.
19:00 moritz nine_: can't it assume a perl6-m in PATH?
19:01 moritz nine_: then it should work when multiple perl6s are in PATH
19:01 [Coke] the S17-supply/start.t error is fiddly. add diagnostics? passes. change Test.pm to add diagnostics? passes.
19:02 dalek Inline-Perl6: 2f23f66 | (Stefan Seifert)++ | / (2 files):
19:02 dalek Inline-Perl6: Use perl6-m instead of perl6 for finding libmoar.so
19:02 dalek Inline-Perl6: review: https://github.com/niner/Inl​ine-Perl6/commit/2f23f66b93
19:02 nine_ moritz: of course it can.
19:02 mj41 nine_: thx ... ~/devel/perl6 [master L|…262]$ perl -e'use Inline::Perl6; Inline::Perl6::initialize; Inline::Perl6::run("say 0.1+.2-.3"); print .1+.2-.3."\n"; Inline::Perl6::destroy;'
19:02 mj41 0
19:02 mj41 5.55111512312578e-17
19:02 nine_ mj41: nice :)
19:03 nine_ Now that it's sort of working, I really should think about the API
19:05 Mso150 joined #perl6
19:08 * TimToady would like to do something about the 'is native("saymeoverandover") { * }' boilerplate
19:08 pmqs Anyone know if p6-Inline-C is working at the moment? (specifically with R* 2015.01)
19:10 hoelzro TimToady: when I worked on my Expat binding, I just made an expat trait that called &trait_mod:<is>($r, :native)
19:10 hoelzro perhaps NativeCall could add a way of doing something like that?
19:11 jnthn hoelzro: I hope you called it in a BEGIN block, or you're going to end up in a pre-comp nightmare...
19:11 hoelzro hmm, I never tried it with precomp
19:11 hoelzro ruh roh
19:12 TimToady library "saymeonce" { method foo (int32 $a) {*} }  or so
19:12 TimToady maybe with something less ambiguous than *
19:12 Kristien joined #perl6
19:12 hoelzro jnthn: is that a limitation of precomp itself, or just the current implementation?
19:13 TimToady or even just 'use nativelib 'saymeonce'; method...
19:13 jnthn hoelzro: A general limitation.
19:13 hoelzro hmm
19:13 raydiak oh you can fix precomp failures with BEGIN blocks?  /me goes to maybe un-break more of his stuff...
19:13 jnthn hoelzro: I mean, if you think about what you're setting up there, you're expecting the linker to merge two objects for you...
19:14 Kristien hi
19:14 hoelzro jnthn: I'm afraid I don't understand the analogy
19:15 hoelzro I figured it would be ok since my expat trait is also getting run at BEGIN time
19:15 hoelzro but my precomp is knowledge is quite limited
19:15 jnthn hoelzro: Oh, then you're OK
19:15 hoelzro jnthn: all traits are run at BEGIN time, right?
19:15 jnthn I thought you were just calling it in the module body
19:15 jnthn Right
19:15 hoelzro oh, goodness no =)
19:15 jnthn OK, then you're fine. False alarm. :)
19:15 hoelzro ok, I was wondering what I was missing!
19:15 hoelzro =)
19:15 jnthn Anyway, to explain the situation for those following along...
19:16 jnthn Imagine module A *does* mix in to a compile-time object (like a Sub) at its load time.
19:16 jnthn We pre-comp A
19:17 jnthn We pre-comp module B, which loads A, resulting in its mainline being run. The compiler is smart enough to realize you mutated the object, so serializes a new version of it with the changes.
19:17 jnthn You then pre-comp module C, which also loads A, resulting in....another version of the object.
19:17 jnthn Then D loads B and C. Conflict.
19:18 TimToady having 'is native' distributed to each sub/method means there's no library peg upon which to hang info like mangling-ness
19:18 jnthn TimToady: Folks also want to be able to delay computation of what library to load until first call
19:19 jnthn TimToady: I was pondering that you could write a my class libfoo does NativeModule { method library() { 'foo.so' } }
19:19 jnthn TimToady: Then it's just is native(libfoo)
19:19 nine_ jnthn: thanks for the explanation! I fear Inline::Perl5 is suffering from that problem. But it still has other precomp issues as well.
19:20 TimToady jnthn: that'd work too
19:20 jnthn TimToady: You still get to put it on each sub, but it's a LOT shorter :)
19:20 Kristien I bet Inline::APL is the default in Perl 5.
19:20 TimToady one could still have a compile-time topic, as it were
19:20 jnthn Yeah; I'm less sure how to set that up
19:20 jnthn Maybe a package trait.
19:20 TimToady GIVEN libfoo { ... }
19:21 TimToady BEGIN given libfoo { ... }   even
19:21 jnthn module Stuff is native-default(libfoo) { ... }
19:22 TimToady traits are becoming one of those smells
19:22 TimToady like adverbs
19:22 jnthn Note that the given there would run too late to influence much.
19:23 TimToady troo
19:23 jnthn Or it'd have to go back and fix stuff up
19:23 TimToady and the {} would mess up the scoping anyway
19:23 jnthn That also
19:24 jnthn I wonder if use NativeCall 'libfoo'; could be made to work...
19:24 TimToady if each libfoo is going to take its own modifiers, probably shouldn't combine that much
19:25 TimToady use native libfoo, :mangle;
19:25 nine_ use NativeCall 'libfoo'; sub foo is native {*}; sounds easy to implement?
19:26 * TimToady would like to infer the 'is native' from the * as well, or whatever we use instead of *
19:26 jnthn I'm not so happy about trying to infer the "is native"
19:26 nine_ Less typing but faaar less obvious
19:26 TimToady something like external lib access is important enough to deserve syntactic relief in my estimation
19:26 jnthn Folks often put native stuff and then nice Perl 6-y wrapping stuff in the same module
19:27 TimToady which is why the *-oid should be unambiguous at least
19:28 jnthn Not really. Writing proto nice-shiny-interface(...) is export { * } is hardly uncommon in such a module.
19:28 TimToady we don't want allow any room for anyone else's NCI to get better than us :)
19:29 TimToady why * is not a good choice, sure
19:29 TimToady we have control of the compiler, so we can do something else if we want :)
19:29 jnthn tbh, I mostly hear folks saying they like NativeCall (and asking for it to support rw, unions, picking the library path at runtime etc.) rather than asking for syntactic relief. :)
19:30 * TimToady has always kinda disliked the term "native" anyway, so perhaps is irrationally opposed to the trait, on behalf of all the aboriginal peoples of the world
19:30 jnthn I think needing "is native" but finding a way for that being all that's needed is a nice balance.
19:31 [Coke] is C
19:31 * jnthn contemplates that "is foreign" is the alternative :P
19:31 TimToady "native" has bad overloading in many cultures
19:31 TimToady yes, we all love our foreigners too :P
19:31 skids My vote is still for "MetalCall"
19:31 [Coke] that would have the advantage of being totally metal.
19:31 jnthn Rock on!
19:32 jnthn Clearly MetalCall should, when used, download and play an MP3 of some randomly chosen metal band.
19:32 TimToady no, that would be MetaliCall
19:32 jnthn :D
19:33 geekosaur is perl?
19:33 skids To add gasoline to this conversation, my problem with Sum is dealing with native libraries being optional (e.g. in general, and also if the sysadmin removes one of them, falling back.)
19:33 Kristien jnthn: or should it buy IKEA furniture? http://ikeaordeath.com/
19:33 hoelzro is extern?
19:33 TimToady to my mind, being external very nearly rises to the level of declarator
19:33 dalek rakudo/nom: 7b39dad | lizmat++ | src/core/ (2 files):
19:33 dalek rakudo/nom: Make Str.WHY no longer a special case
19:33 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/7b39dad9a4
19:33 avuserow_ timotimo: (from a while back in the backlog) I'd write startswith/endswith as a regex: $foo ~~ /^bar/ or $foo ~~ /bar$/
19:34 geekosaur (sorry, guess that's the opposite)
19:34 geekosaur so, yeh
19:35 raydiak is compiled...is binary...
19:35 geekosaur Diplomat / is diplomatic :p
19:35 TimToady as a declarator, we wouldn't need {*} at all, just {} to terminate the def
19:35 raydiak .oO( is NotPerl6 )
19:35 * FROGGS .oO( is complicated )
19:35 * TimToady really really doesn't like doing this as a trait
19:36 TimToady and what is metal, anyway?  Is Java metal on a Java chip?
19:36 FROGGS TimToady: also, I'd need stuff like: sub foo(const MyStruct&)..., how would I do that?
19:36 jnthn Kristien: Bah, I only got 13/20 and I've lived in Sweden the last several years...
19:37 lizmat P6 weekly published: https://p6weekly.wordpress.com
19:37 colomon hmmm, perl 6 weekly just went live?
19:37 Kristien I should do the hello world quiz again, where you have to identify the programming language from the hello world program.
19:37 TimToady FROGGS: I don't mind traits so much on parameters, since they tend to be more compact
19:37 lizmat mj41: added your Docker image info as well
19:37 lizmat colomon: yes :-)
19:37 Kristien I got all of them right last year except for the lisps
19:37 colomon lizmat++
19:38 TimToady is native is like, /x in Perl 5, oh, go back and rethink everything you've read till now
19:38 FROGGS Kristien: You scored 18 out of 20! Congrats you are... True Kvlt. :D
19:38 Kristien Nice. :P
19:38 TimToady so a special declarator seems better to me, if I don't think about it too hard
19:38 FROGGS Kristien: I have two of the mentioned things at home :o)
19:39 TimToady well, gotta go grocery shopping, so you guys solve all the problems of the world while I'm gone...
19:39 TimToady afk &
19:39 jnthn m: say '☠' ~~ /\w/
19:39 raydiak something like "native someCfunc ();" ?
19:39 camelia rakudo-moar 7a543d: OUTPUT«Nil␤»
19:39 jnthn Aww
19:39 FROGGS TimToady: this will still get quite verbose, but I guess that's the only option we have
19:40 * jnthn gets back to the day's course material writing, so he has some time for Perl 6 things later on in the evening...
19:40 rurban joined #perl6
19:40 nine_ TimToady: is native doesn't really change what you read before it. There's still a sub with the given signature. It's just that the body is not within the {} but in an external library. So really is native is changing what follows.
19:40 vendethiel Kristien: 'can't remember which one it was for the lisps. lost on the TEX vaiants :p
19:40 TimToady FROGGS: we can overload the parameter syntax too, if it gets out of hand; we have the technology, we just don't want to see everything as a nail
19:41 FROGGS nod
19:41 TimToady rafk &
19:41 Kristien vendethiel: It's fun to see there are languages I don't know yet.
19:41 Kristien apparently they exist
19:42 mj41 lizmat: thx
19:42 vendethiel Kristien: know magpie? newspeak? nuprl? those are fun :P
19:42 Kristien :c
19:43 lizmat Kristien: or one of the oldies but goodies but unknownies: http://en.wikipedia.org/wiki/​TUTOR_(programming_language)
19:44 Kristien I want to learn Modula-2 but I can't find an implementation that works
19:44 Kristien It took me weeks to get an Eiffel compiler to work and I've had lots of fun with it.
19:47 moritz Kristien: my success with EiffelStudio were a lot faster, it seems :-)
19:48 Kristien It took me a long time before I finally found someone who had a Homebrew tap with an EiffelStudio formula.
19:48 moritz maybe it's the OS then :-)
19:49 moritz on linux i just downloaded the installer, ran it, and it worked
19:49 andreoss` joined #perl6
19:49 Kristien I quite like the language. I'm writing a distributed bug tracker in it.
19:50 Mouq joined #perl6
19:51 espadrine joined #perl6
19:52 moritz I liked it too, but it doesn't seem to optimize for getting things done quickly
19:53 Kristien Yeah. More like getting them done correctly.
19:54 moritz I don't think those two need to stand in contradiction
19:54 moritz at least not in as much contradiction as Eiffel puts them
19:54 Kristien Me neither.
19:55 Kristien I like how the preconditions and postconditions and invariants automatically end up in the documentation.
19:55 moritz yes, that's neat
19:55 moritz and how they are inherited
19:56 b2gills I wonder if README.md should use the `[text][link-name]`  `\n[link-name]: link-url "hover text"` for urls, so that the definitions can all be all in the same place in the file ( makes finding/updating broken links easier )
19:58 Kristien One thing I don't like is how the type system violates LSP by making parameter types covariant instead of contravariant. :v
19:59 lizmat jnthn: I was thinking about implementing an nqp::lstat op
19:59 lizmat thoughts?
19:59 Kristien Is POST inherited in Perl 6?
19:59 moritz Kristien: no
20:00 Kristien I see.
20:01 Kristien Extremely interesting.
20:02 moritz PRE and POST phasers can reference parameters and lexicals
20:02 Kristien oh right
20:02 moritz and those references make it impossible for the phasers to be moved around
20:03 Kristien I exercise full understanding.
20:03 jnthn lizmat: Hmm...how were you thinking of representing the stat buffer?
20:04 jnthn lizmat: Integer array?
20:04 lizmat eh, not, it would just work like nqp::stat
20:04 jnthn Oh, you pass the thing you want
20:04 lizmat yeah, like nqp::stat works now
20:04 jnthn Is that a good way for it to work, ooc?
20:04 lizmat but will follow symlinks
20:04 lizmat well, it would be more ideal if we could have access to the stat buffer
20:05 jnthn Maybe we should bite the bullet and implement that? :)
20:05 lizmat perhaps...  :-)
20:05 jnthn Or maybe nqp::stat(...) stays as it is, we add nqp::lstat(...) just like it, and nqp::statbuf and nqp::lstatbuf for the buffer.
20:06 grondilu 20:13 < TimToady> or even just 'use nativelib 'saymeonce';
20:06 grondilu ^that'd be amazing
20:06 lizmat ok, I'll look at that tomorrow
20:06 lizmat seems the flu is finally getting to me... :-(
20:06 skids Sum [+=] librcypto support, start on backend-selection mechanism;  Unfortunately for now you have to have 3 hash libs installed just to install it.
20:07 skids libcrypto even
20:07 jnthn lizmat: Ergh...get well soon
20:07 skids lizmat++ for weekly and best wishes
20:08 lizmat thanks all...  nothing a few good nights of sleep can't fix
20:08 vendethiel lizmat++ # p6 weekly, and being ill (as I am...)
20:14 raydiak lizmat++ : "going to refer telling you" ~~ s/refer/defer/
20:14 dalek doc: 3ef3498 | moritz++ | / (3 files):
20:14 dalek doc: Document X::Inheritance::NotComposed
20:14 dalek doc: review: https://github.com/perl6/doc/commit/3ef34986f7
20:15 dalek doc: e0a0037 | moritz++ | lib/Language/mop.pod:
20:15 dalek doc: [mop] add a disclaimer that with great power comes great responsibility
20:15 dalek doc: review: https://github.com/perl6/doc/commit/e0a00370ec
21:06 ilbot3 joined #perl6
21:06 Topic for #perl6 is now »ö« Welcome to Perl 6! | http://perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, std:, or /msg camelia p6: ... | irclog: http://irc.perl6.org | UTF-8 is our friend!
21:07 dalek roast: cf760b1 | usev6++ | S14-roles/basic.t:
21:07 dalek roast: Add test for RT #117041
21:07 dalek roast: review: https://github.com/perl6/roast/commit/cf760b1f69
21:07 synopsebot Link: https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=117041
21:10 mj41 dobrou noc (goodnight)
21:10 moritz \o mj41
21:11 bartolin std: role A::B { method foo(A::C $a) { } }
21:11 camelia std f9b7f55: OUTPUT«[31m===[0mSORRY![31m===[0m�In parameter declaration, typename 'A::C' must be predeclared (or marked as declarative with :: prefix) at /tmp/pKMilacEPI line 1:�------> [32mrole A::B { method foo(A::C[33m�[31m $a) { } }[0m�Parse failed�FAILED 00:00…»
21:11 bartolin std: role A::B { method foo(A $a) { } }
21:11 camelia std f9b7f55: OUTPUT«[31m===[0mSORRY![31m===[0m�In parameter declaration, typename 'A' must be predeclared (or marked as declarative with :: prefix) at /tmp/MD0GLvANd_ line 1:�------> [32mrole A::B { method foo(A[33m�[31m $a) { } }[0m�Parse failed�FAILED 00:00 138m�»
21:11 jnthn dobrou noc, mj41 o/
21:13 * jnthn was more used to spelling it "dobrú noc" :)
21:16 Mso150 joined #perl6
21:16 grettir joined #perl6
21:18 timotimo lizmat: if you like i'll take over the weekly again next monday
21:23 bjz joined #perl6
21:28 _dolmen_ joined #perl6
21:29 Util PerlJam: I agree on "rarely used". Thx.
21:29 Util moritz: I will add ."$methodname". Also "looking up variables by name", after a little more thought. Thx.
21:31 kaare_ joined #perl6
21:32 raiph joined #perl6
21:35 retupmoca Util: are you aware of http://perlgeek.de/en/article/5-to-6 - linked from perl6.org homepage?
21:37 * retupmoca has not actually looked at the new page yet
21:38 masak PerlJam: happy Monday! \o/
21:38 masak everyone: would it make sense to add "a more fully-featured pack/unpack" to https://github.com/perl6/perl6-most-wan​ted/blob/master/most-wanted/features.md ?
21:38 masak I've seen it requested recently.
21:39 masak perhaps we should also more seriously think about creating a "better pack/unpack" alternative as a module? it's been discussed before.
21:39 timotimo sure
21:40 Util retupmoca: Yes. Thanks for mentioning it, though, since it reminds me that I left out the list of other places to look! (It was was already on my list, in another doc)
21:42 Kristien Util: thank you.
21:42 Kristien I now understand typeglobs.
21:43 masak and how does that make you feel?
21:44 Kristien Knowledgable.
21:44 * masak .oO( POWARRRR! )
21:44 Kristien masak: http://asset-e.soup.io/ass​et/3197/1089_e9d2_500.png
21:45 skids Well, working compact struct <-> buf8 conversion will ameliorate some of the need for pack/unpack.
21:45 masak is the Perl programmer standing on a mound of spaghetti and meatballs?
21:46 Kristien it's a monk!
21:46 timotimo masak: i think so
21:46 * pyrimidi_ sees that and thinks FSM
21:46 masak being able to summon FSM is powerful indeed
21:46 Peter_R joined #perl6
21:46 Kristien funfact: googling "church of the finite state machine" results in flying spaghetti monster articles because google sucks at acronyms
21:47 masak seems legit
21:47 Kristien I should found the church of the markov chain
21:48 * masak learns from https://p6weekly.wordpress.com/2015/​02/09/2015-06-in-the-wake-of-fosdem/ that a lot of people have been very busy doing cool stuffs
21:48 Util Kristien: You are very welcome.
21:49 masak I haven't -- I've just been very busy :)
21:49 masak lizmat++ # https://p6weekly.wordpress.com/2015/​02/09/2015-06-in-the-wake-of-fosdem/
21:49 Kristien Util: if you join, the number of members doubles!
21:49 Kristien http://xkcd.com/1102/
21:50 masak m: sub foo( Str(Any) $x ) { say $x.perl }; foo 42
21:50 camelia rakudo-moar 7b39da: OUTPUT«"42"␤»
21:50 masak "\o/"
21:50 masak er, "\\o/"
21:50 masak jnthn++
21:50 Kristien m: 'drowning' ~~ /o/
21:50 camelia rakudo-moar 7b39da: ( no output )
21:51 Kristien m: say 'drowning' ~~ /o/
21:51 camelia rakudo-moar 7b39da: OUTPUT«「o」␤»
21:51 Kristien m: say so 'drowning' ~~ /o/
21:51 camelia rakudo-moar 7b39da: OUTPUT«True␤»
21:51 masak lizmat: ss/refer telling you/defer telling you/ in the post?
21:52 masak m: say "there is no "U" and "I" in education" unless "education" ~~ /u/ & /i/
21:52 camelia rakudo-moar 7b39da: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/QZd7gBsOfBâ�¤Two terms in a rowâ�¤at /tmp/QZd7gBsOfB:1â�¤------> [32msay "there is no "[33mâ��[31mU" and "I" in education" unless "educati[0mâ�¤    expecting any of:â�¤        infix stopperâ�¤  â€¦Â»
21:52 masak m: say q[there is no "U" and "I" in "education"] unless "education" ~~ /u/ & /i/
21:52 camelia rakudo-moar 7b39da: ( no output )
21:52 masak :)
21:52 Kristien junctions are good
21:53 El_Che joined #perl6
21:53 masak they're OK, I guess.
21:53 [Coke] my problem with junctions is that it's almost always "oh, if you want <foo> you shouldn't use be using junctions". :)
21:54 [Coke] I suspect it will be more awesome when autothreading bigger things automagically.
21:54 * raydiak still has Each on his wishlist
21:54 Kristien > conjunction junction, what's your function?
21:54 hahainternet joined #perl6
21:54 masak [Coke]: I think they have a tendency to make people go heart-eyed about them. the expectations don't match the rather humble use cases.
21:54 hahainternet thought i had this channel missing somewhere
21:55 Kristien haha hahainternet
21:55 masak hahainternet: welome back.
21:55 hahainternet merci
21:55 hahainternet i had a question too
21:55 hahainternet so with tcl, you can create a safe interp, no access to potential hazardous functions
21:55 hahainternet and i'm sure everyone's seen how in python and ruby etc, you can basically still get access to any object remotely in scope
21:55 hahainternet so making a 'safe' interpreter is somewhat difficult
21:55 hahainternet has anyone put any thoughts into encapsulated 'safe' perl 6? i had a quick look on google but nothing obviously relevant
21:56 masak hahainternet: camelia here on the channel is running on such a reduced feature set.
21:56 masak m: shell("echo hahasafe!")
21:56 camelia rakudo-moar 7b39da: OUTPUT«shell is disallowed in restricted setting␤  in sub restricted at src/RESTRICTED.setting:1␤  in sub shell at src/RESTRICTED.setting:15␤  in block <unit> at /tmp/6dKXQE2gbs:1␤␤»
21:57 hahainternet masak: how safe is it though? is it something fundamental or is it closer to the slightly hackier ways it was done in p5 for example
21:57 * masak can never remember if it's `shell` or `run`
21:57 Kristien with certain shells you better run if they go off
21:57 masak hahainternet: it's good enough for us, but it's not fundamental in the sense you mean, I think.
21:58 masak hahainternet: my guess is that Perl 6 is impossible to lock down and make safe.
21:58 Kristien If you hold a Unix shell to your ear, do you hear the C?
21:58 hahainternet masak: well i know golang use NaCl for that sort of thing
21:58 hahainternet i'm just interested in reading src/RESTRICTED.setting i guess :D
21:58 masak go ahead :)
21:59 flussence a seccomp thing would get you 90% of the way to a safe interpreter, but that's non-portable
21:59 hahainternet flussence: indeed, the way tcl does it is quite lovely, but it's a small language
22:00 flussence RESTRICTED.setting might be a bit more secure if it forbade "use nqp;"...
22:00 FROGGS flussence: aye
22:01 b2gills I think that Moar can be made to work with capsicum with a few ifdefs, and a few nqp ops https://duckduckgo.com/?q=capsicum+freebsd
22:02 b2gills Then it could be as simple as nqp::disallow_file() or other to disable the current process from opening any other files
22:02 hahainternet b2gills: that was the sort of thing i was looking for really, a slightly more fundamental underlying restriction
22:02 hahainternet but not that i'm trying to complain
22:03 b2gills Google wants to add it to Linux as well for the Chrome browser
22:03 b2gills Currently Freebsd is the only OS I know that has it
22:03 hoelzro are capsicum restrictions inherited by child processes?
22:03 hahainternet b2gills: that has what specifically? Capsicum?
22:03 virtualsue joined #perl6
22:04 b2gills yes
22:04 FROGGS_ joined #perl6
22:04 hoelzro I could see a utility that locks itself down, and then exec()s it child in that restricted environment
22:04 hahainternet b2gills: i understand google's effort is NaCl and is available quite widely
22:04 hahainternet there's a bunch of containerising solutions though, i genreally still prefer full VMs
22:05 b2gills It
22:05 hahainternet but sandboxing desktop apps is going to become a major focus soon
22:06 b2gills It's not a containerizing solution, it is used in addition to containerizing
22:06 hahainternet b2gills: ah i see, i'll go read up on it
22:08 Peter_R joined #perl6
22:08 raydiak +1 to disallowing nqp in restricted setting (for one because nativecall goes along with that)
22:09 timotimo yes
22:09 Sqirrel joined #perl6
22:09 timotimo and all kinds of file i/o, too
22:10 hahainternet for me what i'm most concerned about is trying to have safe execution in the same process
22:10 b2gills With Capsicum it wouldn't matter, as the process (and presumably newly spawned subprocesses) is no longer allowed to do those operations anyway
22:10 hahainternet so for example, taking camelia and gaining direct access to whatever irc module it's using
22:10 hahainternet obviously making that a process boundary works, i'm just interested in research
22:11 hahainternet and b2gills yeah there are a number of ways to do that on linux etc too, but i already can do that so i wish to learn about p6 :D
22:12 b2gills To stop Perl6 programs from doing trusted operations needs support in the backend (I would assume)
22:14 raydiak depends on how trustworthy the restricted setting becomes
22:14 raydiak e.g. disallowing nqp in the restricted setting would immediately work across all rakudo backends, unless I'm mistaken
22:15 timotimo huh? so many nativecall failures today?!
22:16 colomon joined #perl6
22:17 b2gills I think that all it would take is one precompiled module to get around a restricted setting
22:17 raydiak timotimo: I noticed this in the log today, are you already using it? https://github.com/jnthn/zavolaj/commit/​b29e0a349fd8402fc5ac0ab02952f78cc62390c6
22:17 timotimo p6doc can't be built right now because it uses unique rather than uniq
22:18 timotimo hold on
22:18 timotimo oh, this is woefully outdated
22:18 raydiak b2gills: hm good point
22:21 hahainternet i should subscribe to that repo too as i need to bug people to see if allocating C structs is sorted etc
22:21 hahainternet i'm lazy though, and it's impossible to keep up with everything
22:25 timotimo m: say my $foo ~~= Any;
22:25 camelia rakudo-moar 7b39da: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/iq77uMkRBt�Cannot make assignment out of ~~ because chaining operators are too diffy�at /tmp/iq77uMkRBt:1�------> [32msay my $foo ~~=[33m�[31m Any;[0m�»
22:25 timotimo farabi uses this, though
22:25 * timotimo fixes
22:26 timotimo std: say my $foo ~~= Any
22:26 camelia std f9b7f55: OUTPUT«[31m===[0mSORRY![31m===[0m�Cannot make assignment out of ~~ because chaining operators are diffy at /tmp/JDmBZe743d line 1:�------> [32msay my $foo ~~=[33m�[31m Any[0m�Check failed�FAILED 00:00 138m�»
22:27 itz_ http://pl6anet.org/stats/
22:27 itz_ increasingly quite nicely
22:27 dalek nqp/native-ref: e65c095 | jnthn++ | src/vm/moar/QAST/QASTCompilerMAST.nqp:
22:27 dalek nqp/native-ref: Implement attributeref scope.
22:27 dalek nqp/native-ref: review: https://github.com/perl6/nqp/commit/e65c09580c
22:28 timotimo itz_: neato :)
22:28 TimToady it's really a smell to change the type of a variable with an assignment op, which is why STD prohibits it
22:29 timotimo OK
22:29 timotimo but this is $foobar ~~= s/.../.../
22:29 TimToady that doesn't do what you think it does
22:29 TimToady I think
22:29 timotimo i wonder how it ever worked, then :)
22:29 El_Che ls
22:29 TimToady s/// used to return the changed string
22:29 timotimo this is supposed to expand ~ into the home
22:30 timotimo so i'll just turn it into .= subst
22:37 ilbot3 joined #perl6
22:37 Topic for #perl6 is now »ö« Welcome to Perl 6! | http://perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, std:, or /msg camelia p6: ... | irclog: http://irc.perl6.org | UTF-8 is our friend!
22:37 Kristien Though I don't like paths as part of the I/O module
22:37 Kristien File system module is better. Paths don't necessarily do anything with I/O.
22:38 masak I disagree, I think.
22:38 raydiak yes my software would be much cleaner without all that pesky input and output :)
22:38 masak they're pretty closely related.
22:38 Kristien Is there a file system abstraction like java.nio.file.FileSystem?
22:38 masak I see I/O as one of those aspects of a program that you have to relate to, but that can at least be contained and cordoned off.
22:38 Kristien Or is there only the global file system?
22:40 masak one of the nicest separations of concerns, in fact, is Perl 5's -n -p -i -a -0 -l flags for abstracting common I/O operations from the script/program into command-line options.
22:42 flussence .oO( I prefer -E and say() over -l these days... )
22:43 Kristien my VM passes many resources (argv, env vars, std{in,out,err}, file system, network, etc) to the main function instead of as globals
22:47 Kristien Global variables create hidden dependencies and many people consider them bad, yet they happily use the global file system, network, stdout, cwd and environment variables.
22:47 * Kristien no understand vOv
22:48 gr33n7007h joined #perl6
22:49 hahainternet file systems aren't global, they're heirarchical
22:49 hahainternet networks are segmented on various levels
22:49 hahainternet and stdout is just a filehandle
22:49 hahainternet vOv
22:51 * raydiak would be irritated if he had to add more params to a sub just to be able to call say...and another to be able to call spurt...and another to get $*ENV<HOME>...and another to be able to use IO::Socket...and and and
22:51 Kristien dynamic scope
22:52 Kristien solves that problem partially
22:53 pmurias joined #perl6
22:53 grettir joined #perl6
22:55 clkao joined #perl6
22:57 BenGoldberg joined #perl6
23:01 BenGoldberg joined #perl6
23:08 dalek rakudo/native-ref: 7b7310f | jnthn++ | src/core/Cursor.pm:
23:08 dalek rakudo/native-ref: Fix reliance on binding to native lexicals.
23:08 dalek rakudo/native-ref: review: https://github.com/rakudo/rakudo/commit/7b7310f666
23:14 vendethiel joined #perl6
23:29 dalek rakudo/native-ref: 06a9a56 | jnthn++ | src/Perl6/Metamodel/BOOTSTRAP.nqp:
23:29 dalek rakudo/native-ref: Teach multi-dispatcher about native refs.
23:29 dalek rakudo/native-ref: review: https://github.com/rakudo/rakudo/commit/06a9a5641e
23:30 timotimo jnthn: can you tell me what that patch does for us? fewer Scalar allocations in MATCH? that'd seem quite helpful
23:30 jnthn timotimo: It replaces one ugly hack with a slightly less ugly hack...
23:30 timotimo oh
23:30 timotimo fair enough
23:31 jnthn Really we could do with exposing an nqp::op for the really simple str -> int coercion.
23:31 jnthn otoh I'd really not mind getting rid of the whole str -> int thing altogether there at some point.
23:32 jnthn So I've got a patch that switches us over to use lexicalref, attributeref, and assign_*...and it gets through CORE.setting compilation.
23:32 timotimo the one where we know we have base10 and we know that every character is 0..9 and there is no . and no spaces?
23:32 jnthn But...CORE.setting hangs on loading.
23:35 jnthn timotimo: The coerce_is MoarVM op
23:35 jnthn timotimo: But yeah, that's its semantics.
23:40 timotimo ah, we'd want to have that on all backends, yes?
23:40 jnthn Yeah
23:41 jnthn Which is why I went with another hack for now :)
23:45 dalek rakudo/native-ref: 4341212 | jnthn++ | src/ (3 files):
23:45 dalek rakudo/native-ref: Make sure the native refs get fully composed.
23:45 dalek rakudo/native-ref: review: https://github.com/rakudo/rakudo/commit/4341212aa8
23:47 jnthn Enough for today; I'll leave the debugging of the next patch I have here that hangs stuff for tomorrow.
23:47 vendethiel joined #perl6
23:50 jnthn 'night o/
23:56 timotimo gnite jnthn!
23:56 skids o/

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

Perl 6 | Reference Documentation | Rakudo