»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, std:, or /msg camelia p6: ... | irclog: irc.perl6.org | UTF-8 is our friend!
Set by moritz on 25 December 2014.
awwaiid hmm. ok, I'll noodle 00:00
timotimo you'll what?
awwaiid I'll contemplate run-time debugging API that would provide for things like user space debugging and binding.pry things. 00:01
00:02 rurban left
awwaiid meaning I'll probably do nothing and check back in 6 months and someone else will have done it 00:02
(but you never know)
00:03 raiph joined
timotimo hehe :) 00:03
00:06 rurban joined 00:07 rurban left
timotimo i don't have a windows box to test it, flussence ... 00:10
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
but those test files don't have windows line endings
00:11 wicope left 00:13 adu left 00:19 vendethiel left 00:20 vendethiel joined 00:28 araujo joined
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
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␤␤»
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␤»
timotimo but you don't build an Int object with the constructor
though ... we could build a constructor that just boxes an int into Int
00:32 araujo left
raiph hmm. i'm exploring issues raised by a question on a perlmonks thread 00:33
timotimo can has link?
i don't know why you'd want a new method on an Int
raiph perlmonks.org/?node_id=1115558
the Int.new is at best a tangent, more likely a red herring 00:34
timotimo what is "the PV of the scalar"? 00:35
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
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 :)
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 alini left
timotimo m: sub foobar(int $a, int $b) { }; my Int $a = 5; my int $b = 6; foobar($a, $b); 00:38
camelia ( no output )
raiph m: my ($i1, $i2) = 1, 1; sub foo ($arg1, $arg2 ) { say $arg2 }; foo($i1, $i2); 00:42
camelia rakudo-moar af1c18: OUTPUT«1␤»
raiph so this is basic sub dispatch, no explicit types in evidence
m: my ($i1, $i2) = 1, 1; multi sub foo ($arg1, $arg2 ) { say $arg2 }; foo($i1, $i2); 00:43
camelia rakudo-moar af1c18: OUTPUT«1␤»
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␤»
raiph m: my ($i1, $i2) = 1, 1; say $i1.WHAT 00:45
camelia rakudo-moar af1c18: OUTPUT«(Int)␤»
raiph ah, figured it out 00:47
timotimo: P6 has two types for a scalar, and that's his confusion (and was mine for a while) 00:48
(the container and the value)
00:51 adu joined
timotimo yeah, our scalar containers can contain an object of any type they want 00:51
i'm currently looking into how the code works that does things like multi sub foo(1) { ... } 00:53
and why we don't do that at compile time yet
00:55 Hor|zon joined
timotimo ah, we only pass types of things into the multi-call-analysis method 00:58
so at that point we don't know any more what the value used to be
01:00 Hor|zon left
raiph timotimo: there's a, er, spike at the moment for literals in sigs which is to make them a $ where literal 01:00
(spike = simplest thing that could possibly work) 01:01
timotimo oh
i thought more like a "performance problem"
raiph heh
timotimo m: say (sub foo(1) { }).signature
camelia rakudo-moar af1c18: OUTPUT«:(Int $ where { ... })␤»
timotimo i'm not 100% sure if that goes very deep 01:02
raiph .oO ( is there a more contemporary / popular word for spike? )
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:05
raiph timotimo: please read perlmonks.org/?node_id=1115550, at least the bit starting "The code I wrote led to run-time resolution because" 01:06
timotimo i've read it 01:08
anything in particular you want to bring to my attention?
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␤»
timotimo m: my $time := nqp::time_n(); for ^1000 { nqp::getcomp('perl6').backend.name }; say nqp::time_n() - $time;
camelia rakudo-moar af1c18: OUTPUT«0.00188779830932617␤»
timotimo m: my $time := nqp::time_n(); for ^10_000 { nqp::getcomp('perl6').backend.name }; say nqp::time_n() - $time;
camelia rakudo-moar af1c18: OUTPUT«0.0264570713043213␤»
timotimo probably not worth caching this %)
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␤»
timotimo raiph: forgot to highlight; anything in particular you want to bring to my attention? 01:11
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) {}`
timotimo i need to find out where this conversion happens 01:13
01:13 FernandoBasso left, yeahnoob joined
raiph timotimo: presumably an alternative is to leave the conversion in place... 01:14
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
timotimo in principle when creating the where block, we could mix in a role that tells us "just a comparison against a simple value"
Mouq timotimo: Probably Actions.pm 01:17
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
and also, perhaps, add machinery in the resolution code to make use of that set
Mouq timotimo: Line 3904
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
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
So I'd tend toward B 01:22
m: my role Bar {}; sub foo($ where 42 where Bar) {}; foo 42 but Bar 01:23
camelia ( no output )
raiph Mouq: I'm thinking B is the thing to do, but for different reasons
timotimo: so now I'm curious what you think of A) and B)
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
camelia rakudo-moar af1c18: OUTPUT«No such method 'params' for invocant of type 'Sub'␤ in block <unit> at /tmp/0pDhRKMR_9:1␤␤»
Mouq m: my role Bar {}; sub foo($ where 42 where Bar) {}; say &foo.parameters[0].type
camelia rakudo-moar af1c18: OUTPUT«No such method 'parameters' for invocant of type 'Sub'␤ in block <unit> at /tmp/3cLMYe2gKo:1␤␤»
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)␤»
Mouq That could probably get turned into Int statically… OTOH, that depends on ACCEPTS not being overloaded for Int :| 01:27
m: use MONKEY_TYPING; augment class Int { method ACCEPTS (|) { True } }; sub foo ($ where 42) {}; foo 15 01:28
camelia rakudo-moar af1c18: OUTPUT«===SORRY!=== Error while compiling /tmp/q4ZKbJezzH␤Package 'Int' already has a Method 'ACCEPTS' (did you mean to declare a multi-method?)␤at /tmp/q4ZKbJezzH:1␤------> ␤»
Mouq m: use MONKEY_TYPING; augment class Int { multi method ACCEPTS (|) { True } }; sub foo ($ where 42) {}; foo 15 #?
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␤␤»
Mouq Huh
m: use MONKEY_TYPING; augment class Int { multi method ACCEPTS ($) { True } }; sub foo (42) {}; foo 15 01:29
camelia ( no output )
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␤␤»
Mouq In conclusion: This stuff is wicked hard 01:32
:P at least, with MONKEY_TYPING enabled
01:33 dayangkun joined
Mouq would like to disclose that he has done no work with optimizations in Rakudo, in case it wasn't clear 01:34
raiph Mouq: :D 01:36
dalek kudo/nom: af983a1 | Mouq++ | src/Perl6/Grammar.nqp:
Fix "my &term:<*>"
01:47
Mouq That code is really bogus, but my attempt to fix it a few hours ago caused a weird massive slowdown 01:48
dalek ast: 953fe4c | Mouq++ | S06-operator-overloading/term.t:
Add tests for overloading &terms
01:56
ast: e10e70f | Mouq++ | S06-operator-overloading/term.t:
Make sure we test for sub form of term declaration too
ast: 2fe00ac | Mouq++ | S (6 files):
Merge branch 'master' of github.com/perl6/roast
kudo/nom: d72d837 | Mouq++ | src/Perl6/Grammar.nqp:
Make sure we stringify &term name

Not strictly necessary here, but good practice
02:21
kudo/nom: cd84cf1 | Mouq++ | t/spectest.data:
Add term overloading tests to spectest.data
02:22
kudo/nom: 9db8b8d | Mouq++ | src/Perl6/Grammar.nqp:
Prevent scope declarators from interfering with postfixes

For example, "sub foo { }()" would parse fine, but "my sub foo { }()" wouldn't because the "my" would grab ws after the sub. This is a step in making "state $i++" of RT #115614
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=115614
02:24 chenryn joined 02:29 chenryn left
Mouq m: my $str where Str = 4 02:30
camelia ( no output )
Mouq Real nice
:P
02:34 chenryn joined 02:44 Hor|zon joined 02:48 Hor|zon left
raiph m: my $str where Str = 4; say $str.WHAT 02:55
camelia rakudo-moar af983a: OUTPUT«(Any)␤»
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:56
:s/to/with 02:58
JimmyZ s 02:59
m: say (my multi $s).WHAT
camelia rakudo-moar af983a: OUTPUT«(Any)␤»
JimmyZ m: say (my proto $s).WHAT 03:00
camelia rakudo-moar af983a: OUTPUT«(Any)␤»
raiph Mouq++ 03:01
03:13 noganex joined, vendethiel left 03:15 vendethiel joined, adu left, noganex_ left 03:18 Patterner joined
Mouq m: my ($a) is default(Str) 03:20
camelia rakudo-moar af983a: OUTPUT«===SORRY!=== Error while compiling /tmp/5iZ0kYHIlk␤Two terms in a row␤at /tmp/5iZ0kYHIlk:1␤------> my ($a) ⏏is default(Str)␤ expecting any of:␤ postfix␤ infix stopper␤ infix or me…»
Mouq m: my ($a)is default(Str)
camelia ( no output )
Mouq Heh, I'll fix that too :P
JimmyZ nice catch! 03:21
03:22 Psyche^ left
JimmyZ ls 03:26
03:30 jakesyl joined 03:35 adu joined
Mouq Weird. I can get it so that "my $i\ ++" is valid, but it won't take "my $i\++" or "my $i++" 03:43
JimmyZ but my $i\++ should be syntax error? 03:45
looks like not 03:47
std: my $i\++ 03:48
camelia std f9b7f55: OUTPUT«ok 00:00 135m␤»
Mouq JimmyZ: My goal is rt.perl.org/rt3//Public/Bug/Displa...?id=115614
JimmyZ std: my $i\+++
camelia std f9b7f55: OUTPUT«===SORRY!===␤Bogus term at /tmp/tjhKpuDCby line 1 (EOF):␤------> my $i\+++⏏<EOL>␤Parse failed␤FAILED 00:00 137m␤»
Mouq std: $++++++++++++\#'[(Not recommended)]+++++++++++++++++$
camelia std f9b7f55: OUTPUT«ok 00:00 135m␤»
JimmyZ std: my $i\++++ 03:49
camelia std f9b7f55: OUTPUT«ok 00:00 135m␤»
03:53 broquain1 is now known as broquaint
dalek href="https://modules.perl6.org:">modules.perl6.org: a0c5585 | (Anthony Parsons)++ | web/lib/P6Project/Hosts/Github.pm:
Add some more filetypes as valid GitHub readmes

  (All the markdown file extensions it knows, plus rst and asciidoc. Reference:
   github.com/github/linguist/blob/ma...guages.yml )
04:01
flussence wait, I'm blind 04:14
dalek href="https://modules.perl6.org/gh-pages:">modules.perl6.org/gh-pages: 636b6ba | (Anthony Parsons)++ | build-project-list.pl:
Same as previous, but on the correct branch this time
flussence (how does dalek's email lookup thing work? could've sworn it used to show my gh username properly...) 04:16
dalek kudo/nom: 4bab488 | Mouq++ | src/Perl6/Grammar.nqp:
Variable postconstraints NYI; Fix some cases of var decl + postfix
04:18
ast: ac9067a | Mouq++ | S12-class/attributes.t:
Rakudo now throws NYI on variable postconstraints
04:19
04:19 BenGoldberg left
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:20
flussence ah well, not a big deal. 04:24
04:25 jack_rabbit joined 04:29 kaleem joined 04:31 dayangkun left 04:33 Hor|zon joined 04:34 vendethiel left 04:35 vendethiel joined 04:38 Hor|zon left
dalek ast: 95909f0 | Mouq++ | S04-declarations/my.t:
Add test for "my sub {}()"
04:42
05:11 telex left 05:12 telex joined 05:17 kaleem left 05:19 chenryn left 05:35 wicope joined 05:48 [Sno] joined 05:50 diana_olhovik_ joined 05:58 mr-foobar left, rurban__ joined
dalek ast: bb73fea | Mouq++ | S05-capture/match-object.t:
Add test for RT #77146
05:59
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...l?id=77146
06:22 Hor|zon joined 06:24 vendethiel left 06:25 jack_rabbit left 06:26 diana_olhovik_ left 06:27 Hor|zon left
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)␤»
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.
Mouq .tell jnthn *@a[0] := "foo";
yoleaux Mouq: I'll pass your message to jnthn.
06:31 vendethiel joined 06:39 yeahnoob left 06:42 Rounin joined 06:49 kaleem joined, virtualsue joined 06:50 FROGGS_ left 07:01 alini joined 07:05 chenryn joined, Saran_ joined 07:08 gfldex joined 07:10 japhb left 07:11 Woodi joined 07:16 andreoss joined 07:25 diana_olhovik joined 07:28 gfldex left 07:33 alpha- joined 07:34 bjz joined 07:43 necrosis joined 07:44 necrosis left 07:52 [Sno] left 08:04 yeahnoob joined, prime left 08:05 abraxxa joined 08:06 FROGGS joined 08:07 zakharyas joined 08:08 pecastro left 08:10 chenryn left 08:11 chenryn joined, Hor|zon joined 08:12 kaare__ joined 08:13 FROGGS left, awwaiid left, virtualsue left 08:14 awwaiid joined, bjz left 08:15 bjz joined 08:16 Hor|zon left, kaare_ left, alini left 08:17 prime joined 08:21 pmqs joined 08:22 Maddingu1 is now known as Maddingue 08:24 darutoko joined
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
sergot retupmoca: thanks! I added you as a collaborator tho :) 08:25
moritz less harassment through a commit bit 08:31
moritz practices that regularly
sergot hehe :) 08:32
08:35 [Sno] joined
adu hey 08:39
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 rurban__ left
adu moritz: all it has to do is s/(.*) (.*), (.*)/ \1 \3, \2/ 08:41
moritz adu: ..except that the regexes probably aren't right as they are now 08:42
adu well, yeah 08:43
JimmyZ compile it to .so, and use objdump :P
08:48 lumimies left 08:53 Kristien joined
Kristien guys guys guuys 08:53
hi 08:54
Timbus <adu> moritz: all it has to do is s/(.*) (.*), (.*)/ \1 \3, \2/ 08:55
this would be wrong when it comes to floating point operations, probably 08:56
timotimo hi Kristien 08:58
Kristien book will arrive today :D 08:59
jnthn morning, #perl6
yoleaux 06:31Z <Mouq> jnthn: Bug in .bind_pos? «my Int @a; @a[0] = "foo";» lives
06:31Z <Mouq> jnthn: *@a[0] := "foo";
jnthn .tell Mouq Yes, surely a bug. Another one to address when I work some more on typed arrays, I guess :)
yoleaux jnthn: I'll pass your message to Mouq.
timotimo good morning jnthn :) 09:00
09:04 alini joined
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
masak good antenoon, #perl6 09:16
moritz good an, masak 09:28
masak I have an unpublished post about mazes lying about.
moritz how dare you! 09:29
masak :P
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 adu left
Kristien my beautiful creation of the day: system('sh', '-c', 'cd $0 && ctags -R $1', split) while (<>); 09:29
masak Kristien: that looks like Perl 5. 09:30
moritz Kristien: what language is that?
Kristien Perl 5!
masak Kristien: now flail to explain how you're on topic :)
moritz uhm, does split really fill $0 and $1?
Kristien no, those are single quotes
jnthn Well, $0 is the program name, no? :)
Kristien they are filled in by sh
masak jnthn: not in quotes.
jnthn oh, right :)
Kristien sh -c puts the first argument in $0 and the second one in $1
masak single quotes 09:31
moritz
.oO( you are in a twisted maze of masaks, all alike )
Kristien I should rewrite this in Perl 6
masak took you far too long to realize :P 09:32
jnthn notes that reply works to both Kristien and moritz :P 09:33
09:33 dakkar joined
masak jnthn: as a matter of fact, moritz managed to partly anticipate my blog post title ;) 09:33
jnthn: will be interesting to see what happens first: me publishing the post, or someone(tm) fixing rt.perl.org/Ticket/Display.html?id=123602 (which I discovered as part of finding the mazes) 09:35
Kristien does Perl 6 have <>?
masak Kristien: lines()
moritz masak: in the subway, I found a really nice behavior for you, potential rakudobug 09:36
m: class A { ... }; class B is A { }; class A is B { }; say A.^mro
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␤␤»
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␤»
moritz circular self-inheritance!
Kristien masak does that also do the command-line arguments stuff?
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 Saran_ left
masak jnthn: I'm not so sure... :) 09:38
finishing the post today is just a goal.
also, someone else might fix the RT ticket. 09:39
jnthn True :)
So, who likes ropes? :D
masak .oO( not that I want to rope you into something )
jnthn Too bad it gets the wrong answer, rather than getting into an infinite loop
masak .oO( who likes to do some salty checks, arrr! )
jnthn Then we coulda said it had enough rope to hang itself...
masak haha 09:40
Kristien moritz: nice
jnthn moritz: I'd put that in as a bug. There already is some kinda check in there, I thought...
...but apparently not a good enough one :)
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 :)
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␤␤»
Mouq jnthn: I'll rakudobug it :)
09:42 rindolf joined 09:43 Kristien left
moritz Mouq++ 09:46
09:49 Tux__ left, |Tux| joined
Mouq The ticket I was talking about before is #122221 09:51
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=122221
09:54 coffee` joined 09:55 espadrine joined
ab5tract speaking of blog posts, am i the only one who has been refreshing pmthium semi-neurotically? 09:56
09:58 yeahnoob left
timotimo i'm not doing that because i don't want to put pressure on the man 09:58
09:58 abhi24 joined 09:59 Mouq left
abhi24 hi guys, i want to contribute to TPF, i have 1 year experience in perl language.. how do i start ? 10:01
dalek c: dedd8d8 | moritz++ | lib/Language/mop.pod:
[mop] explain composition time, static reasoning
10:03
c: f00a14e | moritz++ | lib/Type/Cool.pod:
[Cool] floor, ceiling
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:04
10:06 risou joined
abhi24 timotimo: I don't have any specific project in mind.. but i do want to contribute to perl6 language effort.. 10:07
moritz abhi24: so, what's your idea of fun?
abhi24: do you like to write modules? or test? or documentation? or discover bugs? or organize conferences?
timotimo moritz: if you say it that way it sounds kind of ironic :o
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
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 modules.perl6.org ?
10:10 _mg_ joined
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
timotimo github.com/perl6/perl6-most-wanted - this repository holds a list of "most wanted" modules, which you can use for inspiration
moritz abhi24: and ask for help in here
abhi24 Okay great! I can start porting modules then.. 10:12
10:16 mvuets joined, Mouq joined
abhi24 timotimo: not didn't have a look at modules.perl6.org But i am looking at it now.. 10:17
10:22 chenryn left 10:26 lumimies joined 10:27 Kristien joined 10:29 |Tux| left 10:30 |Tux| joined
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
camelia rakudo-moar 4bab48: OUTPUT«No such method 'composed' for invocant of type 'Perl6::Metamodel::ClassHOW'␤ in block <unit> at /tmp/_DYQ8Oim5q:1␤␤»
10:35 rurban joined
timotimo is there something still missing for "Async socket and file IO" in github.com/perl6/perl6-most-wanted...eatures.md ? 10:36
what about "Proper signal handling"? we kind of have that now, i'd say
moritz timotimo: then remove them, and wait for more specific requirements/complaints 10:38
timotimo is anybody going to notice the removal? 10:39
10:40 _mg_ left
jnthn timotimo: Not sure we've got the async file stuff yet 10:43
timotimo i know we got linesasync at the very least 10:44
and slurpasync
possibly not writing asynchronously
10:44 Hor|zon left
jnthn Those only got impl'd on JVM, I think... 10:44
moritz muhahahahaha 10:46
I've just tried to add an error message for the case of inheriting from a class that's not yet composed
guess I what I got
Class Any cannot inherit from Mu because the parent is not composed yet
timotimo oh? 10:47
well, time to look into implementing that for moarvm
interesting 10:49
IO::Async::File returns Channels for things that would create lazy lists
should that be changed to Supplies?
Kristien async I/O :( 10:51
timotimo hm?
Kristien I believe solely in blocking I/O. 10:52
moritz blocking I/O is your one true god, and Kristien is its prophet 10:55
Kristien :D 10:56
10:56 Patterner left
Kristien I'm the priestess Io. 10:56
10:57 Patterner joined, MilkmanDan left 10:58 MilkmanDan joined 10:59 Hor|zon joined 11:01 skarn left 11:02 dustinm` left, skarn joined 11:03 dustinm` joined
moritz $ ./perl6-m -e 'class A { ... }; class B is A { }; class A { }' 11:03
===SORRY!=== Error while compiling -e
Class B cannot inherit from A because the parent is not composed yet
11:04 chenryn joined 11:08 chenryn left 11:09 Kristien left
Mouq moritz++ 11:11
11:12 chenryn joined
dalek kudo/mop-composed: eb55acc | moritz++ | src/Perl6/Metamodel/ (2 files):
Throw error on inheriting from a stubbed (or not yet composed) class

This is a bit ugly, it only checks if the REPR has been composed yet. In the setting, lots of inheritance happens before the parent class is fully composed, so cannot check for is_composed.
11:13
moritz jnthn: ^^ a short review would be welcome before I merge it into nom
11:13 kst left
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
11:14 kst joined
moritz jnthn: so opinions on that are very welcome too 11:15
11:16 Kristien joined 11:18 Kristien left 11:21 zakharyas left, zakharyas1 joined 11:26 Mouq left 11:32 raiph left 11:35 baest joined
timotimo i wonder what kristien doesn't like about async i/o 11:38
dalek rl6-most-wanted: 1c9eac3 | timo++ | most-wanted/features.md:
remove "proper signal handling" from "features"

it's implemented nowadays
11:40
11:40 Kristien joined 11:43 Kristien left, baest left 11:45 Kristien joined, Kristien left 11:46 baest joined
abraxxa nine_: ping 11:52
11:54 yeahnoob joined 11:55 yeahnoob left, yeahnoob joined 12:02 chenryn left
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
moritz: So it works out fine for all normal use.
And avoids the setting bootstrap tricks getting int he way. 12:05
So, think I'm +1 to it.
moritz jnthn: ok, thanks
jnthn: what I don't really like about it is how it doesn't compose well with other (potential) meta classes
12:06 kaleem left
moritz jnthn: but I guess we'll worry about that when that becomes a problem 12:06
jnthn Aye
12:06 kaleem joined
jnthn Well, various places in the MOP do similar kinds of duck typing to cope with less sophisticated meta-classes 12:06
12:07 kaleem left
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
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
jnthn timotimo: Well, we might consider extending the compile-time analysis 12:26
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
Which would intersect well with trace JIT
But it's a lot of memory to do it all the time
Heck, it's interesct well with current spesh... 12:29
*it'd
Other thing is that we can handle where clauses much more efficiently than today if we can be sure they lack free vars. 12:30
dalek kudo/nom: eb55acc | moritz++ | src/Perl6/Metamodel/ (2 files):
Throw error on inheriting from a stubbed (or not yet composed) class

This is a bit ugly, it only checks if the REPR has been composed yet. In the setting, lots of inheritance happens before the parent class is fully composed, so cannot check for is_composed.
12:31
kudo/nom: d297154 | moritz++ | src/ (2 files):
Typed exception X::Inheritance::NotComposed
jnthn otoh, I think the simple cases (non-invokable) we already handle well
(As in, we don't go to the effort of faking up a call frame for the trial bind) 12:32
12:34 Kristien joined
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
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
timotimo or you could do async I/O to become extremely famous 12:39
Kristien like Ryan Dahl? :D
12:39 rmgk_ joined, rmgk left, rmgk_ is now known as rmgk, pyrimidi_ joined
timotimo is that the node.js person? 12:39
Kristien ja!
timotimo k
nine_ abraxxa: pong 12:41
12:41 pyrimidine left
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
abraxxa nine_: just wanted to ask if something regarding bytes has come up 12:43
Kristien Woodi: welkom
abraxxa i saw that moritz merged retupmoca's commit
Woodi just read www.ilikebigbits.com/blog/2014/4/21...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) ...
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
timotimo usually the computer will give cpu time to other processes when a process is waiting for I/O to complete 12:46
well, the OS will
xiaomiao AUGH
Woodi xiaomiao: big O notation is about number of steps algoritm is doing, right. but CPUs are waiting a lot lastly...
xiaomiao Woodi: it's a worst-case analysis
Kristien well the CPU does do multiple steps to address memory
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
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
xiaomiao Woodi: but worst case you need to shuffle each element, so it ends up as O(n*log(n) ) or O(n*2)
Woodi: IT'S WRONG
you can't just define a constant to be variable
that's wrong. Don't do it. Don't try it.
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
Kristien Woodi: that isn't a problem
xiaomiao so what he discusses is *average* time, thus not big-oh
Kristien just don't cache!
xiaomiao Woodi: right, that is very sensitive to initial conditions
abraxxa nine_: i'll compile rakudo from that branch then
xiaomiao e.g. cache sizes, cache eviction rate, ...
hard to reason generally about it
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
jnthn Indeed; constant factors and memory behavior matters plenty for performance, but that's not the focus of the big O.
Kristien a cache miss is O(oops)
jnthn It is important to be aware of constant factor differences, though.
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
xiaomiao queue.acm.org/detail.cfm?id=1814327 12:51
^^ that is a good analysis of abstract O(n) notation and practical performance
12:51 brrt joined
lizmat is trying to catch up with her irc backlog for the P6 weekly 12:51
my my, has the weekend been busy :-)
brrt \o
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. :)
brrt which i guess is becoming harder
jnthn o/ brrt 12:52
brrt \o jnthn
jnhtn - 2 questions, what is realistically-sized, and what proportion of time is currently spent
xiaomiao jnthn: very nice example are integer factorization algos
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
Kristien the best ones require quantum computers
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 [Sno] left
brrt oh 12:54
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 :)
Kristien hmm, my book arrives tomorrow, not today 12:56
jnthn Kristien: Aww!
jnthn bbi10
Kristien wants to make an AWK slang 12:58
dalek Heuristic branch merge: pushed 36 commits to rakudo/newio by lizmat
Kristien hmm for/given/when
xiaomiao Woodi: augh. it only gets worse in the later parts 12:59
srsly. constants are not variable
brrt anyway i've been thinking about the parrot threading thing 13:00
13:00 rindolf left
brrt i really fail to see how it is better than 'regular' threads 13:00
and ... how they should be nonblocking 13:01
timotimo i didn't understand where the dispatch to "things i should do for other threads" happens 13:02
13:02 wtw joined 13:03 Alina-malina left
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?
timotimo Woodi: only if the data you need for replicating the results is less than the result itself
for storage, i mean
or if the source data is needed very often all around anyway 13:04
brrt well yes, but green threads block
Woodi: I can answer most questions about the JIT :-) 13:05
timotimo, as far as i know the following happens
Kristien blocking and threads are orthogonal
blockingness is a feature of an API
brrt .... true.... but.....
Kristien butt
brrt threads without blocking apis don't make all that much sense 13:06
they don't program like threads
anyway, that's a separate discussion
13:06 kaleem joined
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
brrt and thread b just waits on thread a to return the value 13:08
timotimo it's queued
but when does thread a actually pump values from the queue?
brrt which... blocks, if you ask me
timotimo between every two opcodes?
13:08 pdurbin left
brrt between every so many opcodes, just like gc checks 13:08
timotimo er, gc checks have to happen for every allocation 13:09
brrt yes, but gc checks also happen during normal running
otherwise a single thread could starve all others
if it never allocates 13:10
timotimo oh, right
because they have to all stop in order to do gc
brrt right
not in all forms of gc, but they do in most efficient (as in throughput) forms
sidenote; it kind of annoys me that GC research has all but been killed by the dies-young heuristic of generational GC 13:11
13:11 abhi24 left
timotimo of course, i'm talking about moarvm's gc 13:11
don't know very much about parrot's gc
Woodi brrt: what's are interesting and unresearched cases ? :) 13:12
brrt pluggable, iirc, so there are a few
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?
brrt anyway, there are more ways to implement the function of 'ensuring there is always enough space'
jnthn brrt: s/parallel/concurrent/ ?
brrt yes 13:15
and yes
jnthn Moar's GC is parallel, but not concurrent.
brrt oh, but you can do both
jnthn For sure :)
13:15 Mouq joined
Kristien I once implemented a VM that had one GC per thread. 13:15
and objects were shared between GC with a refcount
brrt what about cycles
Kristien only GCs count towards refcount, not references between objects -- those are resolved by the GCs 13:16
brrt i see, nice
Kristien and GCs were run at every context switch 13:17
13:17 Alina-malina joined 13:20 Mouq left 13:23 chenryn joined
timotimo we don't have a "startswith" or "endswith", right? 13:25
we'd do regexes instead?
Kristien m: "foobar".index("foo").say 13:27
camelia rakudo-moar 4bab48: OUTPUT«0␤»
timotimo m: "foobar".index("mom").say 13:28
camelia rakudo-moar 4bab48: OUTPUT«(Int)␤»
Kristien m: "whale".index("mom").say
camelia rakudo-moar 4bab48: OUTPUT«(Int)␤»
Kristien :O
timotimo m: "whale".index("jonah").say 13:29
camelia rakudo-moar 4bab48: OUTPUT«(Int)␤»
13:33 Kristien left 13:36 kaare__ is now known as kaare_ 13:50 [Sno] joined 13:51 dakkar left 13:55 dakkar joined 14:01 xfix joined 14:02 mvuets left
btyler hi all. playing around with OO::Monitors and bumping into an explosion when I use it on something with a BUILD submethod: gist.github.com/kanatohodets/9b1d1...cff0ad000a 14:07
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:08
14:09 kaare_ left, mvuets joined
timotimo because the lock that the monitor gives you is initialized too late 14:12
your submethod BUILD is run before monitor's thingie has a chance to build the lock :(
jnthn D'oh :)
Who the heck wrote that darn OO::Monitors module...
Woodi jnthn: yea, someone should do Actor-based instead ;) 14:14
jnthn :P
jnthn did write OO::Monitors and OO::Actors in the space of about 2-3 hours...betwene the two :) 14:15
"Oh no I have a talk and I said it'd be about objects and concurrency"
Woodi but Actors looks like nice evolution of objects, threads and delay enc^Wrationalization...
14:16 kaare_ joined
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:18
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:19
14:20 dj_goku_ joined, dj_goku left
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:21
jnthn Wow :) 14:23
14:24 ven joined
ven o/, #perl6 14:24
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
multiplicity lets you create multiple p5s in the same p6 process space without segfaulting
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:27
camelia rakudo-moar d29715: OUTPUT«1␤2␤3␤4␤5␤5␤»
ven m: try { { leave 5 }; };try { -> { leave } }; 14:28
camelia rakudo-moar d29715: OUTPUT«===SORRY!=== Error while compiling /tmp/0O2Fq7Xzem␤Undeclared routine:␤ leave used at line 1␤␤»
timotimo m: my ($found) = first-index { .say; $_ == 5 }, (1..1_000_000); say $found
camelia rakudo-moar d29715: OUTPUT«1␤2␤3␤4␤5␤4␤»
timotimo m: my ($found) = (grep { .say; $_ == 5 }, (1..1_000_000))[0]; say $found
camelia rakudo-moar d29715: OUTPUT«1␤2␤3␤4␤5␤5␤»
ven 's reading the apocalypses and chuckling a bit at times 14:30
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␤»
lizmat or complain about the :D in the coercer 14:32
std: sub a(Int(Cool:D) $a) { say $a }; a Cool
camelia std f9b7f55: OUTPUT«ok 00:01 141m␤»
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" }
camelia rakudo-moar d29715: OUTPUT«===SORRY!=== Error while compiling /tmp/ZdH8uvjGAR␤Missing block␤at /tmp/ZdH8uvjGAR:1␤------> b c>; my @zzz = <I II III>; for @xxx⏏; @yyy; @zzz -> $x; $y; $z { say "$x $y ␤ expecting any of:␤ p…»
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␤␤»
timotimo sounds reasonable to me, maybe someone could rakudobug it
lizmat I will
jnthn lizmat: Yeah...which in turn really wants definedness types to become first class too... 14:34
14:34 Rounin left
ven jnthn: should the definedness types be defined? :P 14:35
jnthn No, type objects never are :P
ven (was there "for @xx; @yy" removed in favor of Z[,]?
)
-there, actually. 14:36
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␤»
lizmat rakudobugged as #123770 14:44
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=123770
jnthn ven: No, still 5 there 14:45
14:46 telex left
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.
ven I definitely am.. 14:48
14:48 grondilu joined, telex joined
jnthn We don't flatten on sub calls unless the callee demands it with | or the caller demands it with * 14:49
s/sub//
dalek kudo/nom: 22e8c05 | lizmat++ | src/core/ (20 files):
Eradicate now obsolete "as" coercer from the core
moritz lizmat++ 14:50
lizmat where would I need to look to deprecate "as" ??
I don't see a trait doing "as" ?
jnthn m: sub foo(Str() $a) { say $a.WHAT; }; foo(42);
camelia rakudo-moar d29715: OUTPUT«(Str)␤»
ven jnthn: I'll go re-read pmichaud++'s blog post, then. 14:51
jnthn lizmat: Note that Str(Any) can be written Str()
lizmat ah, ok, will fix :-)
moritz lizmat: git grep 'trait_mod:<as>'
lizmat moritz: duh :-)
jnthn lizmat: No semantic difference, just a little stylisher
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
14:52 salva left
moritz has used github.com/moritz/perl6-all-modules to find the modules in the ecosystem that use "as" 14:52
and I've started a panda branch that gets rid of it
jnthn Cool
lizmat++ moritz++
moritz but won't merge until after the Feb release
jnthn Aye
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
they are *more likely to be*. it's up to the caller to decide, *BUT* the core.setting will (mostly) do it
lizmat jnthn, moritz : so when did Str(Any) start to work? was that hoelzro's work 14:58
?
14:58 Kristien joined
ven feels much less scared now. 14:58
14:58 Kristien left
timotimo jnthn made that work as part of the 6pe-mop merge, no? 14:58
moritz lizmat: jnthn++ implemented, and I merged it... yesterday?
lizmat ok, and the "pe" was for "parametric extensions" right? 14:59
moritz yes
lizmat okidoki
dalek kudo/nom: 9ac3df0 | lizmat++ | src/core/ (12 files):
Str() is more idiomatic than Str(Any), jnthn++
timotimo yup, the target type of a coercion is the parameter set on "coercive types" or something like that 15:00
i still have no clue how the whole thing works :D
but i haven't looked either
moritz "by magic"
15:00 fil_ left
jnthn ven: Yes, the sentence kinda has an implicit "When it comes to list operations like map and grep, ..." 15:00
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.
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«===SORRY!===␤'self' used where no object is available␤at /tmp/HLQ4Me4Mta:1␤------> :$chainable!) { $r.wrap(-> { callsame; ⏏self }) }; class A{method foo is chainab␤Missing block␤at /tmp/HLQ4Me4Mta:1␤-----…»
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. :)
lizmat jnthn: may I quote you on that :-) 15:03
jnthn lizmat: Sure
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 :)
Well, and (c) 'cus native arrays need the native-ref stuff that I've been working on recently. 15:04
lizmat :-)
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:05
15:07 salva joined 15:09 rindolf joined 15:11 Kristien joined, kaleem left 15:15 adu joined 15:16 chenryn left
lizmat hmm... interesting task: finding out the line number of the code being parsed while inside a trait :-( 15:17
15:17 grondilu left
jnthn lizmat: Hmm 15:18
lizmat nqp::getlexcaller('$/') ?
jnthn lizmat: How hard is it to add deprecated things from inside the parser, ooc?
lizmat: 'cus you might consider just doing it in the trait_mod:<as> action method...
15:18 chenryn joined, chenryn left
lizmat not very, I would think, it's just a sub call really 15:18
jnthn Or grammar rule
lizmat hmmm....
or just add $/ as an extra parameter in "$*W.apply_trait($/, '&trait_mod:<as>', $declarand, $<typename>.ast);" ? 15:20
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.
colomon has rakudo’s qq:to indent functionality changed to convert tabs to spaces?
jnthn Or what you suggested
lizmat jnthn: once we remove "as" as a Parameter trait, the whole handling of "as" can be deleted
so I think adding an extra param is the easiest way 15:22
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
camelia rakudo-moar d29715: OUTPUT«===SORRY!=== Error while compiling /tmp/INc0yiL2iD␤Missing block␤at /tmp/INc0yiL2iD:1␤------> ; class A{method foo is chainable{say 1}⏏}; say A.new.foo␤»
lizmat looks like :-)
ven dang it :P
15:23 Kristien left
jnthn ven: $r.wrap(-> \self, |c { callsame; self }) 15:24
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«===SORRY!===␤'self' used where no object is available␤at /tmp/5CeD2W6Yfv:1␤------> le!) { $r.wrap(-> \self, |c { callsame; ⏏self }) }; class A{method foo is chainab␤Missing block␤at /tmp/5CeD2W6Yfv:1␤-----…»
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
camelia rakudo-moar d29715: OUTPUT«===SORRY!=== Error while compiling /tmp/XexPnkKNDK␤Missing block␤at /tmp/XexPnkKNDK:1␤------> ; class A{method foo is chainable{say 1}⏏}; say A.new.foo␤»
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()␤»
jnthn Otherwise the {...} is taken as an argument to the trait
hoelzro o/ #perl6 15:32
15:35 cursork joined
Util \o hoelzro 15:36
sjn \o #perl6
sjn is reading www.joelonsoftware.com/articles/Wrong.html
it got me thinking; is there a way to "taint" and "untaint" variables in Perl 6? 15:37
lizmat spec says: our enum Taint does Tainting <Untainted Tainted>; 15:38
NYI AFAIK 15:39
pmichaud s/spec/synopses/
sjn right
ven ooh >_>
lizmat pmichaud: oops, sorry, old habits die hard
pmichaud lizmat: for me also. :)
15:40 adu left
lizmat gives up on deprecation "as" trait atm, it requires quite a lot of work in Deprecations.pm as well 15:41
colomon lots of failures on smoker this morning — is NativeCall borked? 15:48
jnthn colomon: If so it's first report I've heard of it. 15:50
pmurias hoelzro: hi
colomon jnthn: I’ll try it by hand 15:51
dalek p/js: e4174c8 | (Pawel Murias)++ | src/vm/js/nqp-runtime/reprs.js:
Stub the NFA repr.
p/js: 9ee2b35 | (Pawel Murias)++ | src/vm/js/nqp-runtime/runtime.js:
Capture lexical scopes correctly so the setting isn't lost when loading a module.
p/js: 9fc8c03 | (Pawel Murias)++ | src/vm/js/bin/ (2 files):
Load QRegex by default.

Add t/qast/02-manipulation.t to run_tests.
b2gills m: ^2 R[&say] 1 # what ?! 15:52
camelia rakudo-moar 9ac3df: OUTPUT«10..^2␤»
moritz GIGO?
jnthn lol 15:53
m: say 1, ^2
camelia rakudo-moar 9ac3df: OUTPUT«10..^2␤»
jnthn m: say ^2
camelia rakudo-moar 9ac3df: OUTPUT«0..^2␤»
jnthn Doesn't put spaces in :)
b2gills ( I just figured that out after posting )
jnthn hands b2gills today's Worst Use Of Meta-operator award 15:54
b2gills I would like to thank the *
ven moritz: does your latest commit(s) mean we can't have "Abstract classes" (or rather, placeholder classes) anymore? 15:55
pmurias still conside
sorry
colomon jnthn:
NativeCall
*build stage failed for NativeCall: Failed building lib/NativeCall.pm6
===SORRY!=== Error while compiling lib/NativeCall.pm6
'IntTypedCArray' cannot inherit from 'CArray' because 'CArray' isn't compose yet (maybe it is stubbed)
at lib/NativeCall.pm6:194
jnthn Hm, that'd be moritz++'s patch from earlier today 15:56
moritz oh, that might be my fault
jnthn is still surprised
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...
hoelzro I was thinking of attaching the method object to the Function via _method or something
but you may have a better idea
moritz jnthn: how did that ever work? :/ 15:58
jnthn moritz: 'cus the role doesn't get composed until punned
moritz: And the is doesn't take effect until then. 15:59
moritz jnthn: should the check be moved to composition time?
jnthn moritz: Dunno. I'm more inclined to say NativeCall shouldn't be doing what it is... 16:00
16:00 kaare_ left
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 p/js: 232b9cf | (Pawel Murias)++ | t/nqp/90-findmethod.t:
Add a findmethod test.
16:01
16:01 Kristien joined
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, Kristien left
pmurias hoelzro: attaching the code ref would work, I was thinking of getting the method out of the method cache 16:02
16:02 alini left
hoelzro ah ha 16:02
that would do
dalek p/js: d38f177 | (Pawel Murias)++ | src/vm/js/ (3 files):
Implement nqp::findmethod.
16:05
hoelzro aw man, you beat me to it =P
pmurias it seems my commit is wrong :( 16:06
dalek p/js: 33a0a90 | (Pawel Murias)++ | src/vm/js/nqp-runtime/core.js:
Fix previous commit.
16:07
lizmat This week's P6 weekly draft: p6weekly.wordpress.com/?p=381&...8dbab2f272 16:09
comments, suggestions, etc. very welcome
ETA for publishing at 19:00 UTC (almost 3 hours from now) 16:10
moritz lizmat: the colomon++ TODO list seems to lack a link 16:12
jnthn lizmat: The...what moritz said :) 16:13
lizmat hehe indeed
16:13 mr-foobar joined
jnthn lizmat: The 6pe merge also got us the 10x faster mixins :) 16:13
lizmat how do you measure that ? 16:14
jnthn Before:
C:\consulting\rakudo>timecmd perl6-m -e "role R { }; class C { }; for ^100000 { C.new does R };"
command took 0:0:46.98 (46.98s tota
After:
timecmd perl6-m -e "role R { }; class C { }; for ^100000 { C.new does R };"
command took 0:0:4.84 (4.84s tota
lizmat moritz jnthn: link added
o, so that would make compilation faster 16:15
moritz jnthn: ... but only when doing the same mixin all over
right?
16:15 diana_olhovik left
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 ;)
hoelzro pmurias: just throw my name next to the task in TODO? 16:16
lizmat++ # p6weekly
jnthn lizmat: Yes, I got CORE.setting about 700KB smaller due to re-use too.
pmurias hoelzro: that would work fine
jnthn Which may also be wroth a mention
moritz: Sure, but that's a common case
hoelzro pmurias: ok, sounds good to me!
jnthn moritz: Int but True for example
Or the many mixins of the Doc role, precedence, etc. in CORE.setting 16:17
16:18 raiph joined
moritz jnthn: Such but Wow :-) 16:18
lizmat jnthn: added 16:19
16:21 abraxxa left
lizmat finally caught up with the backlog 16:22
16:22 skids left 16:23 fhelmberger left
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; # 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␤␤»
b2gills sjn: ^ That is how I would handle unsafe strings 16:28
moritz b2gills: the problem is that it doesn't propagate by conatenation, for example 16:30
FROGGS lizmat++ # weekly
dalek rl6-roast-data: 39610e4 | coke++ | / (5 files):
today (automated commit)
16:32
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
16:33 brrt left
moritz b2gills: I don't think it's viable 16:34
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 zakharyas1 left
jnthn ab5tract: Not really, the point is that you want the locking applied to the methods automatically. 16:36
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.
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
jnthn (Like we add new operators for new meanings, not overload existing ones with unrelated meanings.)
ab5tract what about all classes with a given role within the scope having monitor semantics ;)
dalek kudo/newio: 22e8c05 | lizmat++ | src/core/ (20 files):
Eradicate now obsolete "as" coercer from the core
kudo/newio: 9ac3df0 | lizmat++ | src/core/ (12 files):
Str() is more idiomatic than Str(Any), jnthn++
kudo/newio: cdac0e6 | lizmat++ | src/core/ (18 files):
Merge branch 'nom' into newio
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:39
*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 volaj: b29e0a3 | moritz++ | lib/NativeCall.pm6:
Fix for latest rakudo
moritz colomon: ^^ FTFY 16:42
colomon moritz++ # it works
colomon relaunched the smoker on hack 16:44
dalek kudo/newio: 2f5a7aa | lizmat++ | src/core/ (4 files):
Some more "as" coercion trait eradication
16:46 FROGGS left 16:49 adu joined
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.
ab5tract .tell nine which then makes it explode when trying to stringify
yoleaux ab5tract: I'll pass your message to nine.
moritz ab5tract: sounds nasty. Perl 5 doesn't really distinguish strings and buffers the way Perl 6 does 16:54
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
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:57
16:58 beastd joined
moritz ab5tract: perl 5 can represent strings with all codepoints < 256 in two different ways 16:58
16:58 dj_goku_ left
moritz ab5tract: and for the programmer, it's pretty much random which one is chosen 16:59
dalek kudo/newio: ed8670e | lizmat++ | src/core/io_operators.pm:
Fix some faulty coercions
moritz s/random/opaque/
16:59 rindolf left
lizmat afk for a bit& 17:00
17:01 spider-mario joined 17:04 skids joined
ab5tract moritz: indeed. 17:06
17:07 kaleem left 17:12 dayangkun joined, dayangkun left 17:14 eternaleye joined 17:17 sftp joined
nine_ ab5tract: correction: I treat all pure 7 bit ASCIi P5 strings as Strcas well 17:17
17:18 diana_olhovik joined
moritz I see posts like this www.reddit.com/r/programming/commen...op/cog3dan and think "and they call Perl line noise" 17:19
(>>=) :: [a] -> (a -> [b]) -> [b]
17:19 Mouq joined
colomon indeed 17:20
17:20 molaf joined
moritz fish throwning into a box which starts a slide into another series of boxes 17:20
*thrown
17:21 Kristien joined, espadrine left
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:24 rindolf joined
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
It thought of "once queue" but that's so ambiguous.
17:28 japhb joined
ingy ☺/ 17:28
17:29 yeahnoob left, sftp left, dj_goku joined, dj_goku left, dj_goku joined
Kristien ingy: hi! 17:30
dalek kudo/nom: 7a543d1 | Mouq++ | docs/ChangeLog:
Add two ChangeLog entries
ingy ¡hi Kristien! 17:31
17:31 sftp joined
Kristien I'll go with "once queue" 17:32
17:32 Hor|zon left
moritz Kristien: uniqueue 17:32
a pun on 'unique' and 'queue'
17:36 rurban left
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:39
pmurias t/qast/02-manipulation.t 17:41
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
hoelzro hmm, that test is currently passing 17:44
17:44 rindolf left
dalek p/js: a81dd83 | (Pawel Murias)++ | t/qast/02-manipulation.t:
Add a commented out failing part of a test.
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?
Kristien moritz: Queue::Once it is: gist.github.com/rightfold/25dbf34cb276c21d0753 17:47
pmurias hoelzro: nqp::reprname seems to be missing 17:50
moritz might have also called Queue::Resentful or Queue::Unforgiving :-)
*it
Kristien Queue::Unforgiving would die :P
17:50 _mg_ joined
Kristien How about Queue::Ohm, since it resists? 17:50
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
Kristien Queue::Dupliphobic 17:52
17:54 mj41 joined 17:56 mvuets left, Kristien left
dalek p/js: 6b77ae8 | (Pawel Murias)++ | TODO:
Update TODO.
17:56
p/js: bdfce82 | (Pawel Murias)++ | TODO:
Mark TODO task as medium.
18:02
pmurias hoelzro: there a couple of tasks in TODO you could work on without blocking on any hard to work around problems 18:04
got to leave&
18:04 pmurias left 18:07 xinming_ is now known as xinming
|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
|Tux| ok($thing ~~ rx{"some text"}, "test name"); # works fine, but misses out on the diagnostic (got vs. expect) 18:15
18:17 mattp_ joined 18:18 _dolmen_ joined
dalek rl6-most-wanted: ec230e4 | (Michal Jurosz)++ | most-wanted/bindings.md:
Add libgit2 to bindings.md
18:20
jdv79 { use v5; use $p5_mod; } should work, right? 18:21
i get an error about the "package $p5_mod;" line not being valid p6 18:22
18:25 Kristien joined 18:26 gfldex joined
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
Kristien A geminiphobe is afraid of twins.
18:26 Mso150 joined
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
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:28 xinming left
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
hoelzro looks
itz_: and rakudo loads this index file? 18:32
itz_ no p6doc 18:33
18:33 _dolmen_ left
hoelzro ah, that's why I'm confused =) 18:33
I would like to make this work:
m: say Str.WHYU
camelia rakudo-moar 9ac3df: OUTPUT«No such method 'WHYU' for invocant of type 'Str'␤ in block <unit> at /tmp/_TvY2cBKgw:1␤␤»
hoelzro dammit
m: say Str.WHY
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␤␤»
hoelzro huh.
that's odd.
m: say Int.WHY
camelia rakudo-moar 9ac3df: OUTPUT«(Any)␤»
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
hoelzro yeah, I remember that easter egg 18:34
I'
18:34 El_Che joined
hoelzro we should probably make Str.WHY not blow up, though 18:34
itz_ what should Str.WHY return? 18:35
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...
mj41 lizmat: registry.hub.docker.com/u/mj41/perl6-star/ ... still 20 minutes to p6weekly deadline?
:-)
dalek line-Perl6: a299d61 | (Stefan Seifert)++ | / (4 files):
Remove last obstacle for an installable Inline::Perl6

Renamed inline.pl6 to Inline::Perl6::Helper and look for it in @INC so it can get installed by MakeMaker's make install like any other module.
18:37
flussence (would it be out of the question to simply stuff all the Pod strings into a DOC.setting?)
itz_ oh I see not consistrant
errr
constaint 18:38
flussence consistent? :)
itz_ flussence++ # autocorrect
18:38 diana_olhovik__ joined
b2gills Perhaps the defined constraint can be removed from Str.WHY, or use multi methods 18:39
18:39 diana_olhovik left
TimToady can always return "42" 18:40
xfix sub { get-the-answer }.WHY # 42 18:41
hoelzro itz_: preferably 'Built-in class for strings. Objects of type Str are immutable.'
removing the definedness constraint and checking for definedness in that if fix the issue 18:44
dalek line-Perl6: 2db30e1 | (Stefan Seifert)++ | lib/Inline/Perl6.pm:
Provide some basic information on how to install and use.
18:45 rindolf joined 18:46 FROGGS joined
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␤␤»
Kristien m: "42".WHY.say
camelia rakudo-moar 7a543d: OUTPUT«(Any)␤»
18:49 grettir joined
El_Che camelia kills my irssi buffer it seems :) 18:51
18:51 grondilu joined
El_Che I don't know what you guys are printing :) 18:51
TimToady it's just UTF-8
Kristien oh WHY returns pod
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
El_Che oh, maybe not (the server was rebooted, let me check :) )
grondilu learnt about the lastlog IRC command today
TimToady sometimes it's irssi, sometimes your terminal emulator, or screen
if anything in the pipeline decides it doesn't like utf8, it can be a problem 18:53
moritz perlgeek.de/en/article/set-up-a-cle...nvironment 18:55
18:55 bayprogrammer joined, dakkar left
nine_ Inline::Perl6 has entered the CPAN :) 18:56
moritz \o/ 18:57
jnthn \o/ 18:58
nine_: Does it depend on you having a Rakudo-moar installed somewhere already, or does it bundle a private one?
nine_ jnthn: it assumes a perl6 in the PATH and that this perl6 is using the MoarVM backend. 18:59
19:00 Kristien left
moritz nine_: can't it assume a perl6-m in PATH? 19:00
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 line-Perl6: 2f23f66 | (Stefan Seifert)++ | / (2 files):
Use perl6-m instead of perl6 for finding libmoar.so
nine_ moritz: of course it can.
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;'
0
5.55111512312578e-17
nine_ mj41: nice :)
Now that it's sort of working, I really should think about the API 19:03
19:04 Mso150 left 19:05 Mso150 joined
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:09
hoelzro TimToady: when I worked on my Expat binding, I just made an expat trait that called &trait_mod:<is>($r, :native) 19:10
perhaps NativeCall could add a way of doing something like that?
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
ruh roh 19:12
TimToady library "saymeonce" { method foo (int32 $a) {*} } or so
maybe with something less ambiguous than *
19:12 Kristien joined
hoelzro jnthn: is that a limitation of precomp itself, or just the current implementation? 19:12
TimToady or even just 'use nativelib 'saymeonce'; method... 19:13
jnthn hoelzro: A general limitation.
hoelzro hmm
raydiak oh you can fix precomp failures with BEGIN blocks? /me goes to maybe un-break more of his stuff...
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
hoelzro jnthn: I'm afraid I don't understand the analogy
I figured it would be ok since my expat trait is also getting run at BEGIN time 19:15
but my precomp is knowledge is quite limited
jnthn hoelzro: Oh, then you're OK
hoelzro jnthn: all traits are run at BEGIN time, right?
jnthn I thought you were just calling it in the module body
Right
hoelzro oh, goodness no =)
jnthn OK, then you're fine. False alarm. :)
hoelzro ok, I was wondering what I was missing!
=)
jnthn Anyway, to explain the situation for those following along... 19:16
Imagine module A *does* mix in to a compile-time object (like a Sub) at its load time.
We pre-comp A
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
You then pre-comp module C, which also loads A, resulting in....another version of the object.
Then D loads B and C. Conflict.
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
TimToady: I was pondering that you could write a my class libfoo does NativeModule { method library() { 'foo.so' } } 19:19
TimToady: Then it's just is native(libfoo)
nine_ jnthn: thanks for the explanation! I fear Inline::Perl5 is suffering from that problem. But it still has other precomp issues as well.
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 :)
Kristien I bet Inline::APL is the default in Perl 5.
TimToady one could still have a compile-time topic, as it were
jnthn Yeah; I'm less sure how to set that up
Maybe a package trait. 19:21
TimToady GIVEN libfoo { ... }
BEGIN given libfoo { ... } even
jnthn module Stuff is native-default(libfoo) { ... }
TimToady traits are becoming one of those smells 19:22
like adverbs
jnthn Note that the given there would run too late to influence much.
TimToady troo 19:23
jnthn Or it'd have to go back and fix stuff up
TimToady and the {} would mess up the scoping anyway
jnthn That also
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
use native libfoo, :mangle; 19:25
nine_ use NativeCall 'libfoo'; sub foo is native {*}; sounds easy to implement?
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"
nine_ Less typing but faaar less obvious
TimToady something like external lib access is important enough to deserve syntactic relief in my estimation
jnthn Folks often put native stuff and then nice Perl 6-y wrapping stuff in the same module
TimToady which is why the *-oid should be unambiguous at least 19:27
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 :)
why * is not a good choice, sure 19:29
we have control of the compiler, so we can do something else if we want :)
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. :)
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.
[Coke] is C 19:31
jnthn contemplates that "is foreign" is the alternative :P
TimToady "native" has bad overloading in many cultures
yes, we all love our foreigners too :P
skids My vote is still for "MetalCall"
[Coke] that would have the advantage of being totally metal.
jnthn Rock on!
19:32 Mouq left
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
jnthn :D
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.)
Kristien jnthn: or should it buy IKEA furniture? ikeaordeath.com/
hoelzro is extern?
TimToady to my mind, being external very nearly rises to the level of declarator
dalek kudo/nom: 7b39dad | lizmat++ | src/core/ (2 files):
Make Str.WHY no longer a special case
avuserow_ timotimo: (from a while back in the backlog) I'd write startswith/endswith as a regex: $foo ~~ /^bar/ or $foo ~~ /bar$/
geekosaur (sorry, guess that's the opposite) 19:34
so, yeh
raydiak is compiled...is binary...
geekosaur Diplomat / is diplomatic :p
TimToady as a declarator, we wouldn't need {*} at all, just {} to terminate the def 19:35
raydiak
.oO( is NotPerl6 )
FROGGS .oO( is complicated )
TimToady really really doesn't like doing this as a trait
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?
jnthn Kristien: Bah, I only got 13/20 and I've lived in Sweden the last several years...
lizmat P6 weekly published: p6weekly.wordpress.com 19:37
colomon hmmm, perl 6 weekly just went live?
Kristien I should do the hello world quiz again, where you have to identify the programming language from the hello world program.
TimToady FROGGS: I don't mind traits so much on parameters, since they tend to be more compact
lizmat mj41: added your Docker image info as well
colomon: yes :-)
Kristien I got all of them right last year except for the lisps
colomon lizmat++
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
Kristien Nice. :P
TimToady so a special declarator seems better to me, if I don't think about it too hard
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...
afk &
jnthn m: say '☠' ~~ /\w/
raydiak something like "native someCfunc ();" ?
camelia rakudo-moar 7a543d: OUTPUT«Nil␤»
jnthn Aww
FROGGS TimToady: this will still get quite verbose, but I guess that's the only option we have
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
19:40 rurban joined
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
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
FROGGS nod 19:41
TimToady rafk &
Kristien vendethiel: It's fun to see there are languages I don't know yet.
apparently they exist 19:42
mj41 lizmat: thx
vendethiel Kristien: know magpie? newspeak? nuprl? those are fun :P
Kristien :c
lizmat Kristien: or one of the oldies but goodies but unknownies: en.wikipedia.org/wiki/TUTOR_(progra..._language) 19:43
19:43 rindolf left
Kristien I want to learn Modula-2 but I can't find an implementation that works 19:44
It took me weeks to get an Eiffel compiler to work and I've had lots of fun with it.
19:46 molaf left
moritz Kristien: my success with EiffelStudio were a lot faster, it seems :-) 19:47
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
on linux i just downloaded the installer, ran it, and it worked
19:49 andreoss` joined
Kristien I quite like the language. I'm writing a distributed bug tracker in it. 19:49
19:50 Mouq joined 19:51 andreoss left, adu left, espadrine joined
moritz I liked it too, but it doesn't seem to optimize for getting things done quickly 19:52
Kristien Yeah. More like getting them done correctly. 19:53
moritz I don't think those two need to stand in contradiction 19:54
at least not in as much contradiction as Eiffel puts them
Kristien Me neither.
I like how the preconditions and postconditions and invariants automatically end up in the documentation. 19:55
moritz yes, that's neat
and how they are inherited
19:56 Peter_R left
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:56
Kristien One thing I don't like is how the type system violates LSP by making parameter types covariant instead of contravariant. :v 19:58
lizmat jnthn: I was thinking about implementing an nqp::lstat op 19:59
thoughts?
Kristien Is POST inherited in Perl 6?
moritz Kristien: no
Kristien I see. 20:00
Extremely interesting. 20:01
moritz PRE and POST phasers can reference parameters and lexicals 20:02
Kristien oh right
moritz and those references make it impossible for the phasers to be moved around 20:03
Kristien I exercise full understanding.
jnthn lizmat: Hmm...how were you thinking of representing the stat buffer?
lizmat: Integer array? 20:04
lizmat eh, not, it would just work like nqp::stat
jnthn Oh, you pass the thing you want
lizmat yeah, like nqp::stat works now
jnthn Is that a good way for it to work, ooc?
lizmat but will follow symlinks
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? :)
lizmat perhaps... :-)
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.
grondilu 20:13 < TimToady> or even just 'use nativelib 'saymeonce'; 20:06
^that'd be amazing
lizmat ok, I'll look at that tomorrow
seems the flu is finally getting to me... :-(
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
libcrypto even
jnthn lizmat: Ergh...get well soon
skids lizmat++ for weekly and best wishes
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...)
raydiak lizmat++ : "going to refer telling you" ~~ s/refer/defer/ 20:14
dalek c: 3ef3498 | moritz++ | / (3 files):
Document X::Inheritance::NotComposed
20:15
c: e0a0037 | moritz++ | lib/Language/mop.pod:
[mop] add a disclaimer that with great power comes great responsibility
raydiak m: my @foo; BEGIN { @foo = ^3 }; say @foo.WHAT; say @foo; # hrm? 20:17
camelia rakudo-moar 7a543d: OUTPUT«(Array)␤This type does not support elems␤ in method REIFY at src/gen/m-CORE.setting:9893␤ in method REIFY at src/gen/m-CORE.setting:10359␤ in method reify at src/gen/m-CORE.setting:8944␤ in block at src/gen/m-CORE.setting:8969␤ in method …»
20:17 ilbot3 left 20:18 moritz left
raydiak m: my @foo; BEGIN { @foo := ^3 }; say @foo.perl; # should this work, or is the phaser making something happen which I don't understand? 20:21
camelia rakudo-moar 7a543d: OUTPUT«Array.new()␤»
20:24 darutoko left
b2gills It is probably getting re-initialized at run-time 20:26
20:26 abraxxa joined
b2gills m: my @foo := BEGIN ^3; say @foo.perl 20:26
camelia rakudo-moar 7a543d: OUTPUT«0..^3␤»
FROGGS m: BEGIN my @foo; BEGIN { @foo := ^3 }; say @foo.perl;
camelia rakudo-moar 7a543d: OUTPUT«Array.new()␤»
raydiak m: my @foo; BEGIN { @foo = ^3 }; say @foo.WHAT; say @foo; # okay well this one is far weirder 20:27
camelia rakudo-moar 7a543d: OUTPUT«(Array)␤This type does not support elems␤ in method REIFY at src/gen/m-CORE.setting:9893␤ in method REIFY at src/gen/m-CORE.setting:10359␤ in method reify at src/gen/m-CORE.setting:8944␤ in block at src/gen/m-CORE.setting:8969␤ in method …»
raydiak is that a failure between laziness and phasers? 20:28
either way, thanks b2gills++, that form does work in my case :) 20:31
and Math::Symbolic precomp problems seem to be gone with that fix \o/ 20:32
Kristien I can help thinking of Bear Grylls when I read "b2gills"
20:33 bjz left 20:35 _mg_ left 20:38 grondilu left
PerlJam Happy Monday Perl 6 People! :) 20:44
(or if you're far enough on the other side of the world from me ... happy Tuesday! :) 20:45
raydiak \o PerlJam, happy *day :) 20:46
20:49 Sqirrel joined
Kristien PerlJam: TIL happy Mondays exist. 20:50
20:50 grettir left
Kristien raydiak: do I see a typeglob there? 20:50
Kristien doesn't understand typeglobs 20:51
20:51 andreoss` left
huf does p6 have them? 20:52
FROGGS no
PerlJam nope
huf *phew*
20:54 moritz joined
dalek c/Util/perl_5_to_6_guide: 5262a67 | util++ | lib/Language/perl_5.pod:
Initial version of Perl 5 to Perl 6 translation index.
20:54
Util pmichaud: In response to your query about `a place for "what's the p6 equivalent of p5's XYZ?"`, 20:55
I have started a document, and brain-dumped many details on equivalents.
moritz: I am uncertain if any changes are needed before committing it to master.
Please let me know what work it needs, and I will be glad to make
it fit well with the rest of the excellent doc.perl6.org site. Thx.
github.com/perl6/doc/commit/5262a67c53
b2gills I recommend p3rl.org/Package::Stash for manipulating typeglobs in Perl5
moritz Util: for one, a shorter file name would be very nice 20:56
Util: like 5to6.pod or so
raydiak Kristien: heh no, twas an informal mix of a Whatever star into my english
Kristien :O
Util moritz: Will do.
Kristien hopes glob in Perl 6 supports recursion 20:57
Kristien almost exclusively uses recursive globbing
moritz Util: (it's mostly not about the length, more about that I don't like underscores in file names) 20:58
Util: apart from that, +1 to master
PerlJam Util: I'd leave out the language about "rarely used" in the section on the & sigil (lines 96-109) 20:59
21:00 telex left
PerlJam Util: oh, and what moritz said, +1 to master :) 21:00
moritz Util: one missing piece that people tend to ask is about looking up variables by name 21:02
21:02 telex joined
moritz $::($name) and &::($name) and ::($name_with_sigil) etc. 21:02
21:02 Mso150 left
moritz also, $object->$methodname vs. $object."$methodname"() 21:03
Util Kristien: My talk "The Why of My" explains typeglobs (time 3:00 thru 7:06)
www.youtube.com/watch?v=SA4mUs3Ro98
FROGGS moritz: you know that ilbot is missing here?
Kristien Util: let's see
moritz FROGGS: I wasn't aware. Something killed my screen + irssi session here too :( 21:05
FROGGS :/
moritz maybe an OOM killer
FROGGS moritz: just have seen that both of you dropped at the same time
moritz the alternatives would be scary
21:06 ilbot3 joined 21:07 Mouq left
dalek ast: cf760b1 | usev6++ | S14-roles/basic.t:
Add test for RT #117041
21:07
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=117041
mj41 dobrou noc (goodnight) 21:10
moritz \o mj41
bartolin std: role A::B { method foo(A::C $a) { } } 21:11
camelia std f9b7f55: OUTPUT«===SORRY!===␤In parameter declaration, typename 'A::C' must be predeclared (or marked as declarative with :: prefix) at /tmp/pKMilacEPI line 1:␤------> role A::B { method foo(A::C⏏ $a) { } }␤Parse failed␤FAILED 00:00…»
bartolin std: role A::B { method foo(A $a) { } }
camelia std f9b7f55: OUTPUT«===SORRY!===␤In parameter declaration, typename 'A' must be predeclared (or marked as declarative with :: prefix) at /tmp/MD0GLvANd_ line 1:␤------> role A::B { method foo(A⏏ $a) { } }␤Parse failed␤FAILED 00:00 138m␤»
jnthn dobrou noc, mj41 o/
21:13 mj41 left
jnthn was more used to spelling it "dobrú noc" :) 21:13
21:16 Mso150 joined, grettir joined
timotimo lizmat: if you like i'll take over the weekly again next monday 21:18
21:21 grettir left, Mso150 left, abraxxa left 21:22 raiph left 21:23 bjz joined 21:26 xfix left 21:28 _dolmen_ joined
Util PerlJam: I agree on "rarely used". Thx. 21:29
moritz: I will add ."$methodname". Also "looking up variables by name", after a little more thought. Thx.
21:31 kaare_ joined 21:32 raiph joined, _dolmen_ left
retupmoca Util: are you aware of perlgeek.de/en/article/5-to-6 - linked from perl6.org homepage? 21:35
retupmoca has not actually looked at the new page yet 21:37
21:38 bjz left
masak PerlJam: happy Monday! \o/ 21:38
everyone: would it make sense to add "a more fully-featured pack/unpack" to github.com/perl6/perl6-most-wanted...eatures.md ?
I've seen it requested recently.
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 spider-mario left
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:40
Kristien Util: thank you. 21:42
I now understand typeglobs.
masak and how does that make you feel? 21:43
Kristien Knowledgable. 21:44
masak .oO( POWARRRR! )
Kristien masak: asset-e.soup.io/asset/3197/1089_e9d2_500.png
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?
Kristien it's a monk! 21:46
timotimo masak: i think so
pyrimidi_ sees that and thinks FSM
21:46 pyrimidi_ is now known as pyrimidine, colomon left
masak being able to summon FSM is powerful indeed 21:46
21:46 Peter_R joined
Kristien funfact: googling "church of the finite state machine" results in flying spaghetti monster articles because google sucks at acronyms 21:46
masak seems legit 21:47
Kristien I should found the church of the markov chain
masak learns from p6weekly.wordpress.com/2015/02/09/...of-fosdem/ that a lot of people have been very busy doing cool stuffs 21:48
Util Kristien: You are very welcome.
masak I haven't -- I've just been very busy :) 21:49
lizmat++ # p6weekly.wordpress.com/2015/02/09/...of-fosdem/
Kristien Util: if you join, the number of members doubles!
xkcd.com/1102/
masak m: sub foo( Str(Any) $x ) { say $x.perl }; foo 42 21:50
camelia rakudo-moar 7b39da: OUTPUT«"42"␤»
masak "\o/"
er, "\\o/"
jnthn++
Kristien m: 'drowning' ~~ /o/
camelia ( no output )
Kristien m: say 'drowning' ~~ /o/ 21:51
camelia rakudo-moar 7b39da: OUTPUT«「o」␤»
Kristien m: say so 'drowning' ~~ /o/
camelia rakudo-moar 7b39da: OUTPUT«True␤»
masak lizmat: ss/refer telling you/defer telling you/ in the post?
21:52 El_Che left
masak m: say "there is no "U" and "I" in education" unless "education" ~~ /u/ & /i/ 21:52
camelia rakudo-moar 7b39da: OUTPUT«===SORRY!=== Error while compiling /tmp/QZd7gBsOfB␤Two terms in a row␤at /tmp/QZd7gBsOfB:1␤------> say "there is no "⏏U" and "I" in education" unless "educati␤ expecting any of:␤ infix stopper␤ …»
masak m: say q[there is no "U" and "I" in "education"] unless "education" ~~ /u/ & /i/
camelia ( no output )
masak :)
Kristien junctions are good
21:53 El_Che joined
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". :)
I suspect it will be more awesome when autothreading bigger things automagically. 21:54
raydiak still has Each on his wishlist
Kristien > conjunction junction, what's your function?
21:54 hahainternet joined
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
Kristien haha hahainternet 21:55
masak hahainternet: welome back.
hahainternet merci
i had a question too
so with tcl, you can create a safe interp, no access to potential hazardous functions
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
so making a 'safe' interpreter is somewhat difficult
has anyone put any thoughts into encapsulated 'safe' perl 6? i had a quick look on google but nothing obviously relevant
masak hahainternet: camelia here on the channel is running on such a reduced feature set. 21:56
m: shell("echo hahasafe!")
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␤␤»
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`
Kristien with certain shells you better run if they go off
masak hahainternet: it's good enough for us, but it's not fundamental in the sense you mean, I think.
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?
hahainternet masak: well i know golang use NaCl for that sort of thing
i'm just interested in reading src/RESTRICTED.setting i guess :D
masak go ahead :)
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
flussence RESTRICTED.setting might be a bit more secure if it forbade "use nqp;"... 22:00
FROGGS flussence: aye
b2gills I think that Moar can be made to work with capsicum with a few ifdefs, and a few nqp ops duckduckgo.com/?q=capsicum+freebsd 22:01
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
but not that i'm trying to complain
b2gills Google wants to add it to Linux as well for the Chrome browser 22:03
Currently Freebsd is the only OS I know that has it
hoelzro are capsicum restrictions inherited by child processes?
hahainternet b2gills: that has what specifically? Capsicum?
22:03 virtualsue joined
b2gills yes 22:04
22:04 FROGGS_ joined
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
there's a bunch of containerising solutions though, i genreally still prefer full VMs
b2gills It 22:05
hahainternet but sandboxing desktop apps is going to become a major focus soon
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:06 Peter_R left 22:07 diana_olhovik__ left, FROGGS left 22:08 Sqirrel left, Peter_R joined
raydiak +1 to disallowing nqp in restricted setting (for one because nativecall goes along with that) 22:08
timotimo yes 22:09
22:09 Sqirrel joined
timotimo and all kinds of file i/o, too 22:09
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
hahainternet so for example, taking camelia and gaining direct access to whatever irc module it's using
22:10 pmqs left
hahainternet obviously making that a process boundary works, i'm just interested in research 22:10
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:11
b2gills To stop Perl6 programs from doing trusted operations needs support in the backend (I would assume) 22:12
raydiak depends on how trustworthy the restricted setting becomes 22:14
e.g. disallowing nqp in the restricted setting would immediately work across all rakudo backends, unless I'm mistaken
timotimo huh? so many nativecall failures today?! 22:15
22:16 colomon joined
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? github.com/jnthn/zavolaj/commit/b2...8cc62390c6
timotimo p6doc can't be built right now because it uses unique rather than uniq
hold on 22:18
oh, this is woefully outdated
raydiak b2gills: hm good point
22:19 FROGGS_ left
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
i'm lazy though, and it's impossible to keep up with everything
timotimo m: say my $foo ~~= Any; 22:25
camelia rakudo-moar 7b39da: OUTPUT«===SORRY!=== Error while compiling /tmp/iq77uMkRBt␤Cannot make assignment out of ~~ because chaining operators are too diffy␤at /tmp/iq77uMkRBt:1␤------> say my $foo ~~=⏏ Any;␤»
timotimo farabi uses this, though
timotimo fixes
std: say my $foo ~~= Any 22:26
camelia std f9b7f55: OUTPUT«===SORRY!===␤Cannot make assignment out of ~~ because chaining operators are diffy at /tmp/JDmBZe743d line 1:␤------> say my $foo ~~=⏏ Any␤Check failed␤FAILED 00:00 138m␤»
itz_ pl6anet.org/stats/ 22:27
increasingly quite nicely
dalek p/native-ref: e65c095 | jnthn++ | src/vm/moar/QAST/QASTCompilerMAST.nqp:
Implement attributeref scope.
22:28 beastd left
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
timotimo OK 22:29
but this is $foobar ~~= s/.../.../
TimToady that doesn't do what you think it does
I think
timotimo i wonder how it ever worked, then :)
El_Che ls
TimToady s/// used to return the changed string
timotimo this is supposed to expand ~ into the home
so i'll just turn it into .= subst 22:30
TimToady that would be better
timotimo m: my $filename = "~/foo.txt"; $filename .= subst('~', %*ENV<HOME>); say $filename 22:31
camelia rakudo-moar 7b39da: OUTPUT«/home/camelia/foo.txt␤»
TimToady well, $foobar ~~ s/// should also leave the changed string in $foobar
no need for the =
raydiak m: say '~/foo.txt'.IO.absolute
camelia rakudo-moar 7b39da: OUTPUT«/home/camelia/~/foo.txt␤»
raydiak guess not
timotimo strange 22:32
m: say 'foo'.IO.^methods
camelia rakudo-moar 7b39da: OUTPUT«BUILD new-from-absolute-path abspath is-absolute is-relative parts volume dirname basename extension Numeric Bridge Int succ pred IO open pipe watch absolute relative cleanup resolve parent child chdir rename copy chmod unlink symlink link mkdir rmdir cont…»
dalek p/native-ref: af86ca3 | jnthn++ | src/vm/moar/QAST/QASTCompilerMAST.nqp:
Improve error reporting for [lexical&attribute]ref
22:34 ilbot3 left
timotimo farabi accepts any given file name and just returns the slurp of the values 22:35
great!
good thing we're warning against opening it up to the 'net
Kristien What is IO?
m: say 'foo'.IO.WHAT
camelia rakudo-moar 7b39da: OUTPUT«(IO::Path)␤»
Kristien ah
timotimo lizmat has been doing some really valuable work in the "newio" branch to make all of this stuff more betterer 22:36
Kristien I/O is the wart of software.
22:37 ilbot3 joined
Kristien Though I don't like paths as part of the I/O module 22:37
File system module is better. Paths don't necessarily do anything with I/O.
masak I disagree, I think. 22:38
raydiak yes my software would be much cleaner without all that pesky input and output :)
masak they're pretty closely related.
Kristien Is there a file system abstraction like java.nio.file.FileSystem?
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.
Kristien Or is there only the global file system?
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:40
22:41 virtualsue left
flussence
.oO( I prefer -E and say() over -l these days... )
22:42
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:43
22:45 gr33n7007h left
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
hahainternet file systems aren't global, they're heirarchical 22:49
networks are segmented on various levels
and stdout is just a filehandle
vOv
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
solves that problem partially 22:52
22:52 Kristien left 22:53 pmurias joined, grettir joined 22:54 colomon left 22:55 clkao joined 22:57 BenGoldberg joined 23:01 BenGoldberg left, BenGoldberg joined 23:06 amaliapomian left, wicope left 23:08 grettir left, vendethiel left
dalek kudo/native-ref: 7b7310f | jnthn++ | src/core/Cursor.pm:
Fix reliance on binding to native lexicals.
23:08
23:09 clkao left 23:12 gfldex left 23:14 vendethiel joined, Spot__ left 23:27 coffee` left
dalek kudo/native-ref: 06a9a56 | jnthn++ | src/Perl6/Metamodel/BOOTSTRAP.nqp:
Teach multi-dispatcher about native refs.
23:29
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...
timotimo oh
fair enough
jnthn Really we could do with exposing an nqp::op for the really simple str -> int coercion. 23:31
otoh I'd really not mind getting rid of the whole str -> int thing altogether there at some point.
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?
jnthn But...CORE.setting hangs on loading.
timotimo: The coerce_is MoarVM op 23:35
timotimo: But yeah, that's its semantics.
23:37 vendethiel left
timotimo ah, we'd want to have that on all backends, yes? 23:40
jnthn Yeah
Which is why I went with another hack for now :) 23:41
dalek kudo/native-ref: 4341212 | jnthn++ | src/ (3 files):
Make sure the native refs get fully composed.
23:45
23:46 pmurias left
jnthn Enough for today; I'll leave the debugging of the next patch I have here that hangs stuff for tomorrow. 23:47
23:47 vendethiel joined 23:48 espadrine left
jnthn 'night o/ 23:50
timotimo gnite jnthn! 23:56
skids o/