Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2014-12-23

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:13 [Coke] colomon++
00:25 Business joined #perl6
00:26 raiph joined #perl6
00:36 dayangkun joined #perl6
01:02 atroxaper joined #perl6
01:12 raydiak the typo of the day is: perlformance
01:19 ninjazach joined #perl6
01:23 lue joined #perl6
01:28 awoodland joined #perl6
01:34 yeahnoob_ joined #perl6
01:40 dalek perl6-roast-data: f8af72b | coke++ | / (5 files):
01:40 dalek perl6-roast-data: today (automated commit)
01:40 dalek perl6-roast-data: review: https://github.com/coke/perl6​-roast-data/commit/f8af72be39
01:41 hagiri joined #perl6
01:46 awoodland joined #perl6
01:49 vendethiel moritz++ # sleeping
02:00 lsm-desktop joined #perl6
02:19 ssqq joined #perl6
02:20 rmgk_ joined #perl6
02:23 ssqq m: my token somechar { < a b > }; if 'ccc' ~~ / ^ <!someclass>+ $/ { say 'ccc match <someclass> }
02:23 camelia rakudo-moar d45c53: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/4TphMBWfkxâ�¤Unable to parse expression in single quotes; couldn't find final "'" â�¤at /tmp/4TphMBWfkx:1â�¤------> [32mlass>+ $/ { say 'ccc match <someclass> }[33mâ��[31m<EOL>[0mâ�¤    expectin…»
02:23 ssqq m: my token somechar { < a b > }; if 'ccc' ~~ / ^ <!someclass>+ $/ { say 'ccc match <someclass>' }
02:23 camelia rakudo-moar d45c53: OUTPUT«No such method 'someclass' for invocant of type 'Cursor'␤  in method ACCEPTS at src/gen/m-CORE.setting:14323␤  in block <unit> at /tmp/OFWZsvXKbz:1␤␤»
02:23 ssqq m: my token someclass { < a b > }; if 'ccc' ~~ / ^ <!someclass>+ $/ { say 'ccc match <someclass>' }
02:24 camelia rakudo-moar d45c53: OUTPUT«(timeout)»
02:24 ssqq this code would make perl6 interpreter into a deep loop.
02:26 ssqq m: my token someclass { <[ab]> }; if 'ccc' ~~ / ^ <!someclass>+ $/ { say 'ccc match <someclass>' }
02:26 camelia rakudo-moar d45c53: OUTPUT«(timeout)»
02:29 ssqq m: if 'ccc' ~~ / ^ <- [ab]>+ $/ { say 'ccc match <someclass>' }
02:29 camelia rakudo-moar d45c53: OUTPUT«ccc match <someclass>␤»
02:37 ssqq *token-name" like regex name could not use in negative class.
02:37 ssqq m: my token token-name { <[ab]> }; 'ccc' ~~ /^ <- token-name>+ $/;
02:37 camelia rakudo-moar d45c53: OUTPUT«No such method 'name' for invocant of type 'Cursor'␤  in method ACCEPTS at src/gen/m-CORE.setting:14323␤  in block <unit> at /tmp/MfzE5iOn1y:1␤␤»
02:45 ssqq nqp-m: token token-name { <[ab]> }; ok( 'ccc' ~~ /^ <- token-name>+ $/);
02:45 camelia nqp-moarvm: OUTPUT«Cannot find method 'name'␤   at <unknown>:1  (<ephemeral file>::53)␤ from gen/moar/stage2/QRegex.nqp:1872  (/home/camelia/rakudo-inst-2/languag​es/nqp/lib/QRegex.moarvm:parse:29)␤ from gen/moar/stage2/QRegex.nqp:1956  (/home/camelia/rakudo-inst-2/languages/nq…»
02:55 atroxaper joined #perl6
03:13 Mso150_i joined #perl6
03:14 erkan joined #perl6
03:14 erkan joined #perl6
03:15 vendethiel joined #perl6
03:18 Mso150_i_g joined #perl6
03:46 vendethiel joined #perl6
03:54 noganex_ joined #perl6
04:22 Naddiseo joined #perl6
04:23 Naddiseo Is there a way to use the hyper operators to call multiple methods on a single object?
04:24 Naddiseo something like: my @methods = <foo bar baz>; my @results = $obj>>.@methods;
04:28 adu joined #perl6
04:36 flussence m: my $array = <foo bar zzz>; say $array."$_" for <count pop [1]>;
04:36 camelia rakudo-moar d45c53: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/nZbJfo4xii�Quoted method name requires parenthesized arguments. If you meant to concatenate two strings, use '~'.�at /tmp/nZbJfo4xii:1�------> [32m $array = <foo bar zzz>; say $array."$_"[33…»
04:37 flussence m: my $array = <foo bar zzz>; say $array."$_"() for <count pop [1]>;
04:37 camelia rakudo-moar d45c53: OUTPUT«No such method 'count' for invocant of type 'Parcel'␤  in block <unit> at /tmp/rhhJWdbAcz:1␤␤»
04:37 flussence m: my $array = <foo bar zzz>; say $array."$_"() for <elems pop [1]>;
04:37 camelia rakudo-moar d45c53: OUTPUT«3␤No such method 'pop' for invocant of type 'Parcel'␤  in block <unit> at /tmp/uA01yIwIV1:1␤␤»
04:37 flussence hm, the first one works at least...
04:37 flussence m: my @array = <foo bar zzz>; say @array."$_"() for <elems pop [1]>;
04:37 camelia rakudo-moar d45c53: OUTPUT«3␤zzz␤No such method '[1]' for invocant of type 'Array'␤  in block <unit> at /tmp/LXHCwJmfcW:1␤␤»
04:40 flussence tried to be too fancy at the end, but that works. If you want parallel method invocation like that it's not going to have a shorthand though.
04:41 Naddiseo Nah, I just wanted a shorthand way.
04:41 Naddiseo rather than writing my @a = ($foo.bar, $foo,baz, $foo.foo ....)
04:43 avuserow joined #perl6
04:50 flussence if it's an object pretending to be a struct, and you don't mind poking at internals, there's also this:
04:50 flussence m: my class Foo { has $x = 1; has $z; has $y = 2; }; say Foo.^attributes».get_value(Foo.new)
04:50 camelia rakudo-moar d45c53: OUTPUT«1 (Any) 2␤»
04:51 raiph joined #perl6
04:59 Naddiseo Neat.
04:59 Naddiseo next thing. is there something for pretty printing the output of .perl ?
05:00 anaeem1 joined #perl6
05:06 moritz Naddiseo: I don't think so
05:07 Naddiseo *sigh*
05:07 kaare_ joined #perl6
05:08 moritz though there's JSON::Pretty if you have only hashes, arrays, strings, numbers and booleans
05:08 [Sno] joined #perl6
05:13 bjz joined #perl6
05:16 jack_rabbit joined #perl6
05:22 awoodland joined #perl6
05:22 avuserow I have a nativecall question. Say I have a C function: void foo(int *bar, int *baz); and it does the thing where it puts the return values into bar and baz. Does nativecall have a good way of handling this?
05:22 avuserow also is there a better name for this? my C is rusty :(
05:25 moritz pointer
05:25 moritz avuserow: you can use a CArray with one element to emulate such a pointer
05:25 avuserow I mean specifically returning a value via pointer
05:25 avuserow and okay, that works :)
05:26 moritz "C" :-)
05:49 atroxaper joined #perl6
05:52 bjz joined #perl6
05:55 bjz joined #perl6
05:58 sqirrel joined #perl6
06:18 dayangkun joined #perl6
06:25 kaare_ joined #perl6
06:26 anaeem1_ joined #perl6
06:46 anaeem1_ joined #perl6
06:50 lue joined #perl6
06:52 raydiak m: my $v = 0; class A { has $.a = Proxy.new(FETCH => method { $v }); }; my $a = A.new; $v = 42; say $a.a;
06:52 camelia rakudo-moar d45c53: OUTPUT«0␤»
06:52 raydiak what am I doing wrong?
06:53 raydiak m: my $v = 0; class A { has $.a = Proxy.new(FETCH => method { \$v }); }; my $a = A.new; $v = 42; say $a.a; # but this works as I expect
06:53 camelia rakudo-moar d45c53: OUTPUT«\(42)␤»
06:56 raydiak m: my $a = 0; my $b = Proxy.new(FETCH => method { $a }); $a = 42; say $b; # needless complication removed
06:56 camelia rakudo-moar d45c53: OUTPUT«0␤»
06:57 raydiak m: my $a = 0; my $b := Proxy.new(FETCH => method { $a }); $a = 42; say $b; # nevermind :P
06:57 camelia rakudo-moar d45c53: OUTPUT«42␤»
07:02 raydiak trying to figure out how I would get a property to default to a Proxy, instead of its value, since you can't bind a default
07:07 kjs_ joined #perl6
07:10 bjz joined #perl6
07:22 erkan joined #perl6
07:22 erkan joined #perl6
07:25 darutoko joined #perl6
07:31 kaleem joined #perl6
07:38 kaleem_ joined #perl6
07:40 kjs_ joined #perl6
08:17 kjs_ joined #perl6
08:17 anaeem___ joined #perl6
08:19 cosimo joined #perl6
08:20 kjs_ left #perl6
08:22 vendethiel joined #perl6
08:27 lue joined #perl6
08:34 erkan joined #perl6
08:34 telex joined #perl6
08:37 raydiak good night, #perl6
08:48 sqirrel joined #perl6
08:59 rindolf joined #perl6
09:00 dalek rakudo/newio: f57427b | moritz++ | src/core/Supply.pm:
09:00 dalek rakudo/newio: Simplify Supply.list
09:00 dalek rakudo/newio: review: https://github.com/rakudo/rakudo/commit/f57427b140
09:00 dalek rakudo/newio: 828d0df | lizmat++ | src/core/Supply (2 files):
09:00 dalek rakudo/newio: Deprecate Supply.for in favour of .from-list
09:00 dalek rakudo/newio: review: https://github.com/rakudo/rakudo/commit/828d0df4e7
09:00 dalek rakudo/newio: d45c53a | lizmat++ | docs/ChangeLog:
09:00 dalek rakudo/newio: Update ChangeLog for Supply.from-list
09:00 dalek rakudo/newio: review: https://github.com/rakudo/rakudo/commit/d45c53a61b
09:00 dalek rakudo/newio: 0477e37 | lizmat++ | / (3 files):
09:00 dalek rakudo/newio: Merge branch 'nom' into newio
09:00 dalek rakudo/newio: review: https://github.com/rakudo/rakudo/commit/0477e37988
09:03 mvuets joined #perl6
09:04 Mso150 joined #perl6
09:04 El_Che moritz: ntpd ("lsof -i" showed it running). I just stopped it, I didn't disable it.
09:12 fhelmberger joined #perl6
09:20 dalek specs: 9fd217a | lizmat++ | S17-concurrency.pod:
09:20 dalek specs: Rename Supply.for -> from-list
09:20 dalek specs:
09:20 dalek specs: Main reason for this, is that after the GLR, the .for method will have a very
09:20 dalek specs: different meaning in general.  To avoid a conceptual clash, a rename felt
09:20 dalek specs: warranted.
09:20 dalek specs:
09:20 dalek specs: Also itemize "from-list" and "interval" for clarity.
09:20 dalek specs: review: https://github.com/perl6/specs/commit/9fd217a607
09:28 dakkar joined #perl6
09:32 abraxxa joined #perl6
09:48 * timotimo has started catching up with the advent posts
09:48 timotimo m: subset Test where * < 10; my Test $foo = 5;
09:48 camelia rakudo-moar d45c53: ( no output )
09:48 timotimo m: subset Test where * < 10; my Test $foo = "3";
09:48 camelia rakudo-moar d45c53: ( no output )
09:49 timotimo mhm, mhm
09:49 timotimo there's a "" in the "cool subset of MAIN" post where i suspect the author put "<Any>"
09:51 timotimo https://events.ccc.de/congress/​2014/Fahrplan/events/6243.html - oh, interesting
09:51 erkan joined #perl6
09:53 abraxxa sounds bad
10:05 btyler_ there was some discussion about this on /r/perl -- it might be something groundbreaking, but more likely just a CGI param list context bug
10:05 timotimo oh, that thing again
10:06 btyler_ https://bugzilla.mozilla.o​rg/show_bug.cgi?id=1074812 in particular
10:06 virtualsue joined #perl6
10:09 abraxxa this one is also by a Checkpoint security researcher: http://blog.gerv.net/2014/10/new-class-of​-vulnerability-in-perl-web-applications/
10:10 masak good antenoon, #perl6
10:10 abraxxa it links to the bug btyler_ pasted
10:11 abraxxa jup, this is it
10:11 abraxxa Check Point are going to be presenting on this vulnerability at the 31st Chaos Communications Congress in December in Hamburg, so check their analysis out too.
10:31 anaeem1_ joined #perl6
10:38 rurban joined #perl6
10:42 kaleem joined #perl6
10:43 hekmek joined #perl6
10:50 Ugator1 joined #perl6
11:05 bjz joined #perl6
11:18 atroxaper joined #perl6
11:18 moritz El_Che: ok, thanks. I deinstalled it, we'll see how well kvm-clock and openntpd on the host machine will work out
11:23 El_Che moritz: imho opinion replacing soft is not always the way to go. Specially if you know one well and the other not.
11:23 El_Che I am used from solaris zones to disable ntp and let the host feed the time to zones :)
11:24 moritz El_Che: openntpd was already running on the host
11:25 moritz El_Che: reading through the reviews of ntpd source code scared the hell out of me
11:25 El_Che moritz: that bad?
11:25 El_Che moritz: an alternative could be something like ntpdate in a cron
11:26 moritz El_Che: it's like 300k lines of C code, much of it not written with security in mind
11:28 spider-mario joined #perl6
11:30 avalenn joined #perl6
11:37 avalenn joined #perl6
11:39 avalenn joined #perl6
11:39 moritz http://www.p6c.org/ is now live
11:41 vendethiel joined #perl6
11:43 moritz (box shadows stolen from the perl6.org
11:47 lizmat moritz++
11:48 lizmat .oO( it feels faster to me)
11:48 itz_ joined #perl6
11:50 moritz it also has less content to load :-)
11:50 FROGGS_ ohh yes, it feels way faster
11:51 FROGGS_ at least in the middle of good Ol' Europe
11:51 moritz it's served from the same box as perl6.org
11:52 sqirrel joined #perl6
11:52 avalenn what is the difference between p6c.org and perl6.org ?
11:53 moritz avalenn: doesn't the title and contents make that clear?
11:54 FROGGS_ p6c.org and perl6.org look identical
11:54 moritz they do?
11:54 FROGGS_ yes
11:54 moritz shit, they don't for me :(
11:54 moritz have I messed up the virtual hosts again?
11:54 FROGGS_ both show: Welcome to Perl 6
11:54 FROGGS_ Hi, my name is Camelia.
11:54 FROGGS_ ...
11:54 avalenn yes, they not only look identical but are for all content and purpose
11:55 moritz at least they both show the perl6.org content
11:55 moritz sorry for the confusion
11:55 moritz p6c.org is supposed to show https://github.com/perl6/www.p​6c.org/blob/master/index.html
11:56 lizmat FROGGS_: do you have any feelings about runtime setting of %*ENV<PERL6LIB> and its effects of @*INC ?
11:56 moritz does http://www.p6c.org/ show the new thing for everybody?
11:56 lizmat moritz: I'm not sure what "new" is, looks identical to perl6.org for me
11:56 moritz :(
11:57 FROGGS_ I don't see <h1>Perl 6 Community Servers</h1> fwiw on p6c.org
11:57 FROGGS_ lizmat: what do you mean by runtime setting?
11:57 moritz ok, please try again
11:58 FROGGS_ moritz: that did it :o)
11:58 moritz \o/
11:58 FROGGS_ lizmat: what I know is that using PERL6LIB to move a CURL::inst to the front does not work for panda
11:58 lizmat %*ENV<PERL6LIB> = 'path'; require module   # should 'path' be included in search ?
11:59 lizmat FROGGS_: ok, looking at similar test issues now
11:59 FROGGS_ moritz: btw, I'm reading the Acknowledgements right now and realize I did not have paid by now
11:59 lizmat moritz: yeah, much better now
12:00 moritz sorry for the confusion everybody
12:00 moritz avalenn: now it should be clear what the difference is :-)
12:00 FROGGS_ lizmat: I'm not sure about your example code...
12:01 moritz FROGGS_: well, the hardware is paid for, everything coming in now is for maintenance and running costs
12:01 lizmat FROGGS_: if 'module' is in 'path', should the module loader find that or not
12:02 FROGGS_ moritz: what do you prefer? that I pay now or on demand?
12:02 moritz FROGGS_: on demand, actually; now I have a decent buffer already
12:03 FROGGS_ lizmat: setting $*ENV<PERL6LIB> and expecting a change in @*INC sounds highly magical to me
12:03 FROGGS_ too magical
12:03 lizmat FROGGS_: agree
12:03 FROGGS_ one should mess with @*INC directly or via 'use lib'
12:03 lizmat however, it would be a WAT for people coming from P5
12:03 lizmat I would even say: don't mess with @*INC
12:03 FROGGS_ true
12:04 lizmat but that is another issue...
12:04 lizmat ok, we agree on that then...
12:05 FROGGS_ :o)
12:25 itz_ joined #perl6
12:25 rurban joined #perl6
12:25 FROGGS_ joined #perl6
12:25 Woodi joined #perl6
12:25 yeltzooo9 joined #perl6
12:25 carlin joined #perl6
12:25 synopsebot joined #perl6
12:25 prammer joined #perl6
12:25 Alina-malina joined #perl6
12:26 lsm-desktop joined #perl6
12:26 eternaleye joined #perl6
12:26 integral joined #perl6
12:26 rhr_ joined #perl6
12:26 clkao joined #perl6
12:26 isacloud_ joined #perl6
12:26 skarn joined #perl6
12:26 hobbified joined #perl6
12:26 Juerd joined #perl6
12:26 kaare_ joined #perl6
12:26 gtodd joined #perl6
12:26 Spot__ joined #perl6
12:26 hahainternet joined #perl6
12:26 broquaint joined #perl6
12:26 Khisanth joined #perl6
12:26 moritz joined #perl6
12:26 Sir_Ragnarok joined #perl6
12:26 pmichaud joined #perl6
12:26 cosimo joined #perl6
12:26 gfldex joined #perl6
12:26 colomon joined #perl6
12:26 Akagi201_ joined #perl6
12:26 nine joined #perl6
12:26 64MABGFJ3 joined #perl6
12:26 skaufman1 joined #perl6
12:26 ingy joined #perl6
12:26 daxim joined #perl6
12:26 jnthn joined #perl6
12:26 baest joined #perl6
12:26 cxreg2 joined #perl6
12:26 PerlJam joined #perl6
12:26 pyrimidine joined #perl6
12:26 Guest98101 joined #perl6
12:26 mtj joined #perl6
12:26 mathw joined #perl6
12:26 alexghacker joined #perl6
12:26 El_Che joined #perl6
12:26 dg joined #perl6
12:26 MilkmanDan joined #perl6
12:26 Timbus joined #perl6
12:26 tinita_ joined #perl6
12:26 leedo_ joined #perl6
12:27 cibs joined #perl6
12:27 skarn joined #perl6
12:28 [Sno] joined #perl6
12:28 Vlavv joined #perl6
12:28 ilogger2 joined #perl6
12:28 dagurval joined #perl6
12:28 btyler_ joined #perl6
12:28 Guest68514 joined #perl6
12:28 ruoso_ joined #perl6
12:36 BenGoldberg joined #perl6
12:49 kaleem joined #perl6
13:11 atroxaper joined #perl6
13:30 * lizmat drops a pin in the storm
13:31 * moritz 's powerful magnet catches it before it hits the floor
13:33 telex joined #perl6
13:35 anaeem1_ joined #perl6
13:37 atroxaper joined #perl6
13:43 bjz joined #perl6
13:48 * lizmat notices some classes in the setting are not "my"
13:48 lizmat does that make any difference?  (I think not, but checking just in case)
13:49 moritz m: say OUR::<VM>
13:49 camelia rakudo-moar d45c53: OUTPUT«(Any)␤»
13:49 lizmat m: say OUR::<Pair>
13:49 camelia rakudo-moar d45c53: OUTPUT«(Any)␤»
13:49 lizmat so guess not, right ?
13:50 moritz m: class A { }; say OUR::<A>
13:50 camelia rakudo-moar d45c53: OUTPUT«(A)␤»
13:50 moritz lizmat: it seems the OUR from the setting is simply dropped somewhere
13:50 lizmat m: say SETTING::<Pair>
13:50 camelia rakudo-moar d45c53: OUTPUT«(Any)␤»
13:50 lizmat m: say SETTING::<VM>
13:50 camelia rakudo-moar d45c53: OUTPUT«(Any)␤»
13:50 lizmat m: say SETTING::<Pair>:exists
13:50 camelia rakudo-moar d45c53: OUTPUT«False␤»
13:51 lizmat m: say SETTING::<VM>:exists
13:51 camelia rakudo-moar d45c53: OUTPUT«False␤»
13:53 lizmat m: use Supply;
13:53 camelia rakudo-moar d45c53: OUTPUT«===SORRY!===␤Could not find Supply in any of: /home/camelia/rakudo-inst-2/languages/perl6/lib, /home/camelia/rakudo-inst-2/languages/perl6␤»
13:53 lizmat I was thinking of creating a hash in ModuleLoader with the names of the modules in core
13:53 lizmat and create a better error message
13:53 hoelzro ahoy #perl6
13:53 lizmat (if loading failed)
13:53 lizmat hoelzro o/
13:54 hoelzro o/ lizmat
13:57 jack_rabbit joined #perl6
14:04 rindolf joined #perl6
14:06 raydiak good morning, #perl6
14:06 lizmat raydiak o/
14:07 raydiak \o lizmat
14:11 erkan joined #perl6
14:11 erkan joined #perl6
14:12 PZt joined #perl6
14:28 vendethiel okay, let me try something dangerous now.
14:28 vendethiel :P
14:29 vendethiel m: role Parent[::T]{ role Sub[T $x] { constant VAL = $x; } }; subset ParentInt of Parent[Int]; subset SubInt of ParentInt::Sub[5]; say SubInt::VAL;
14:29 camelia rakudo-moar d45c53: OUTPUT«===SORRY!===␤You cannot create an instance of this type␤»
14:29 vendethiel =(
14:30 telex joined #perl6
14:30 moritz also it would be SubInt::Sub::VAL, if at all
14:31 vendethiel moritz: no
14:31 vendethiel moritz: I have two subsets
14:36 vendethiel (the subsets are only necessary because X[Y]::Z doesn't parse ATM)
14:36 vendethiel (...Which I should definitely look at)
14:37 raiph joined #perl6
14:42 lizmat errands&
14:43 dalek rakudo/nom: c05de61 | lizmat++ | src/Perl6/ModuleLoader.nqp:
14:43 dalek rakudo/nom: Remove trailing whitespace
14:43 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/c05de614ed
14:44 moritz vendethiel: I don't think subsets inhert the WHO at all
14:44 Rounin joined #perl6
14:45 moritz m: role Sub[T $x] { constant VAL = $x; }; Sub[42].WHO<VAL>
14:45 camelia rakudo-moar d45c53: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/2walLxsg6y�Invalid typename 'T' in parameter declaration.�at /tmp/2walLxsg6y:1�------> [32mrole Sub[T[33m�[31m $x] { constant VAL = $x; }; Sub[42].WHO[0m�»
14:45 moritz m: role Sub[$x] { constant VAL = $x; }; Sub[42].WHO<VAL>
14:45 camelia rakudo-moar d45c53: OUTPUT«===SORRY!===␤You cannot create an instance of this type␤»
14:51 moritz m: role Sub[$x] { constant VAL = $x; };
14:51 camelia rakudo-moar d45c53: OUTPUT«===SORRY!===␤You cannot create an instance of this type␤»
15:02 vendethiel m: role Sub[$x] { method x { $x } }; Sub[5].say
15:02 camelia rakudo-moar d45c53: OUTPUT«===SORRY!===␤You cannot create an instance of this type␤»
15:02 vendethiel m: role Sub[Int $x] { method x { $x } }; Sub[5].say
15:02 camelia rakudo-moar d45c53: OUTPUT«===SORRY!===␤You cannot create an instance of this type␤»
15:02 vendethiel what?
15:02 vendethiel I'm positive this worked...
15:02 vendethiel m: role Foo[Str $x] { method print { say $x } }; Foo["hey".uc].print
15:02 camelia rakudo-moar d45c53: OUTPUT«HEY␤»
15:02 vendethiel uh-oh.
15:02 vendethiel moritz: is it the "Int"?
15:03 moritz m: say Sub
15:03 camelia rakudo-moar d45c53: OUTPUT«(Sub)␤»
15:03 moritz vendethiel: perhaps related to the fact that 'Sub' already is a class?
15:04 vendethiel probably is.
15:04 vendethiel m: role X[Int $x] { method x { $x } }; X[5].say
15:04 camelia rakudo-moar d45c53: OUTPUT«(X[Int])␤»
15:04 vendethiel yeah.
15:05 vendethiel m: role Foo[T $x] { constant VAL = $x; }; Foo[42].WHO<VAL>
15:05 camelia rakudo-moar d45c53: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/vX2Up5fc8M�Invalid typename 'T' in parameter declaration.�at /tmp/vX2Up5fc8M:1�------> [32mrole Foo[T[33m�[31m $x] { constant VAL = $x; }; Foo[42].WHO[0m�»
15:05 vendethiel m: role Foo[::T $x] { constant VAL = $x; }; Foo[42].WHO<VAL>
15:05 camelia rakudo-moar d45c53: OUTPUT«Cannot call 'postcircumfix:<{ }>'; none of these signatures match:␤:(Any \SELF, Any \key)␤:(Any \SELF, Any \key, \ASSIGN)␤:(Any \SELF, Any \key, :BIND($BIND)!)␤:(Any \SELF, Any \key, Any :SINK($SINK)!, *%other)␤:(Any \SELF, Any \key, Any :delete(…»
15:06 avalenn /msg camelia help
15:07 moritz m: role Foo[::T $x] { constant VAL = $x; }; Foo[42].WHO.^name
15:07 camelia rakudo-moar d45c53: OUTPUT«(signal SEGV)»
15:07 kaleem joined #perl6
15:07 moritz that's not good :-)
15:07 * moritz rakudbugs it
15:07 moritz p: role Foo[::T $x] { constant VAL = $x; }; Foo[42].WHO.^name
15:07 camelia rakudo-parrot d45c53: OUTPUT«Can only use get_how on a SixModelObject␤  in block <unit> at /tmp/2psc3GXD8v:1␤␤»
15:08 moritz r: role Foo[$x]  }; Foo[42].WHO.^name
15:08 camelia rakudo-{parrot,moar} d45c53: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/tmpfileâ�¤Unable to parse role definitionâ�¤at /tmp/tmpfile:1â�¤------> [32mrole Foo[$x]  [33mâ��[31m}; Foo[42].WHO.^name[0mâ�¤Â»
15:08 moritz r: role Foo[$x] { }; Foo[42].WHO.^name
15:08 camelia rakudo-parrot d45c53: OUTPUT«Can only use get_how on a SixModelObject␤  in block <unit> at /tmp/tmpfile:1␤␤»
15:08 camelia ..rakudo-moar d45c53: OUTPUT«(signal SEGV)»
15:09 moritz golf'd
15:17 vendethiel moritz++
15:34 rurban joined #perl6
15:37 kaare_ joined #perl6
15:40 jack_rabbit joined #perl6
15:41 molaf joined #perl6
15:42 jack_rabbit joined #perl6
15:51 sqirrel joined #perl6
15:58 colomon oh noez, abctranspose is broken!
16:02 colomon m: my $key = Mu
16:02 camelia rakudo-moar c05de6: ( no output )
16:02 colomon m: my $key = Mu; say "Okay"
16:02 camelia rakudo-moar c05de6: OUTPUT«Okay␤»
16:07 colomon ===SORRY!===
16:07 colomon Type check failed in binding $key; expected 'Any' but got 'Mu'
16:07 colomon any way to get a better error message?
16:09 colomon I ask because my code never binds a variable named $key anywhere but a my statement
16:13 atroxaper joined #perl6
16:19 muraiki joined #perl6
16:21 moritz colomon: run with --ll-exception
16:21 moritz colomon: maybe it's in the setting
16:23 mr-foobar joined #perl6
16:32 masak ooh, http://www.p6c.org/
16:33 masak moritz++
16:38 moritz I guess I should announce the new server (and feather EOL) on some mailing list(s)
16:38 moritz p6c? p6a? p6u?
16:38 raiph joined #perl6
16:40 masak all of the above sounds good to me.
16:41 nwc10 p6a is p6c|p6u ?
16:42 masak I think they're all disjunct...
16:42 colomon moritz++: good call
16:44 colomon enum.Invert?
16:45 colomon called by (several steps skipped) MapIter.reify?
16:46 colomon elsif ($did_iterate || nqp::elems($rpa) || $rpa) && nqp::can($block, 'fire_phasers') {
16:46 colomon $block.fire_phasers('LAST');
16:46 colomon }
16:46 colomon is the final step in the backtrace.
16:46 colomon :\
16:49 moritz colomon: can you nopaste the whole backtrace please?
16:50 colomon moritz: https://gist.github.com/co​lomon/89d63a42453a978e3033
16:50 colomon oh!
16:50 colomon not running the moar I thought I was
16:51 colomon ack, this one's just as scary
16:51 colomon my $coro := { nqp::continuationreset($GATHER_PROMPT, $state); $takings };
16:51 moritz colomon: the whole backtrace is from the setting?
16:51 colomon is the top call the trace reports
16:52 colomon moritz: yes
16:52 moritz colomon: does a simple perl6 -e 'say 42' work?
16:53 colomon yes
16:53 colomon and "panda install ABC" works fine
16:54 colomon but I don't think the abctranspose module is ever tested
16:54 moritz colomon: does loading the module alone work?
16:55 moritz colomon: on my build, src/gen/m-CORE.setting:13612 points into  X::Mixin::NotComposable
16:55 colomon yes
16:55 colomon yes, but I'm 100% sure my m-CORE.setting is different than yours
16:56 colomon moritz: the abc2ly script (which is my main use for ABC module) works fine.
16:57 colomon so basically this rakudo works, but I'm doing something which triggers massive wonkiness
16:59 cognominal joined #perl6
17:00 colomon actually, I don't think those line numbers correspond meaningfully to my m-CORE.setting either.
17:01 moritz colomon: then there might some wonkyness with using older .moarvm files going on
17:01 moritz colomon: what command are you running? I'll try to reproduce on my machine
17:02 colomon ack, that will be hard.
17:02 moritz t/06-duration.t ... ok
17:02 moritz Could not find symbol '&Actions'
17:02 colomon moritz: right, as I said, current Rakudo is broken WRT ABC
17:02 colomon it's one of the damned precompile bugs.
17:02 moritz :(
17:03 colomon …. so why don't I try current rakudo without compiling
17:03 colomon ?
17:03 colomon give me a minute
17:06 gtodd feather EOL!
17:10 robins joined #perl6
17:11 masak m: say "feather ", chr(0xa), "!"
17:11 camelia rakudo-moar c05de6: OUTPUT«feather ␤!␤»
17:11 masak feather NL!
17:14 atroxaper joined #perl6
17:14 gtodd feather no longer
17:15 gtodd moritz: re ntpd software .... there's always taiclockd as an alternative ;-)
17:17 * masak still hasn't learned not to log into feather in the antenoon
17:18 moritz masak: should I disable your feather account?
17:19 zakharyas joined #perl6
17:19 moritz gtodd: I've installed openntpd
17:19 nwc10 either that or send him coffee
17:20 cognominal joined #perl6
17:20 moritz (and the thread level isn't all too high, because the NTP servers that it talks to are in the AS, and I trust those who run the network)
17:20 gtodd moritz: ++  most things associated with openbsd use security aware developers and such ....
17:21 masak moritz: that might help, yes.
17:22 moritz masak: I've set your login shell to /bin/false. I hope that helps
17:22 gtodd moritz:  that last remark about trust constitutes the main security feature of everything :-)
17:23 colomon moritz: okay, I can duplicate with latest rakudo
17:24 moritz colomon: :(
17:24 gtodd writing about sort on the 23rd++
17:26 gtodd moritz: that is a sort of good article
17:26 moritz gtodd: thanks :-)
17:26 colomon moritz: so you need to clone the ABC repo
17:27 moritz colomon: done
17:27 colomon then get this file: https://gist.github.com/co​lomon/1ab1285e9daa221ff65f
17:27 colomon then perl6 --ll-exception -Ilib bin/abctranspose Dmix Amix +7 <road_press.abc
17:28 colomon and you should get the error I'm seeing
17:29 moritz colomon: I do
17:29 fhelmberger joined #perl6
17:30 moritz colomon: curious; I don't need the input file to reproduce the error, but I do need the command line arguments
17:30 colomon yeah, just started worrying about that +7
17:31 colomon nope, 7 still fails
17:33 moritz colomon: it seems to be $in.slurp in sub Transpose that produces the error
17:33 moritz m: say $*IN.slurp
17:33 camelia rakudo-moar c05de6: OUTPUT«Céad slán ag sléibhte maorga Chontae Dhún na nGall␤Agus dhá chéad slán ag an Eireagal ard ina stua os cionn caor is coll;␤Nuair a ghluais mise thart le Loch Dhún Lúich’ go ciúin sa ghleann ina luí␤I mo dhiaidh bhí gleanntáin ghlas’ G…»
17:33 moritz m: sub f($in) { $in.slurp.chars }; say f $*IN
17:33 camelia rakudo-moar c05de6: OUTPUT«1134␤Saw 1 call to deprecated code during execution.␤======================================​==========================================␤Method slurp (from IO::Handle) called at:␤  /tmp/URNNZyBU3n, line 1␤Deprecated since v2014.10, will be removed w…»
17:34 moritz huh, not so easy to reproduce
17:34 anaeem1 joined #perl6
17:34 moritz colomon: maybe the deprecation stuff is tripping over something else
17:37 colomon moritz: brill!
17:38 moritz colomon: oh
17:38 moritz colomon: $original-key.scale-names produces ("D", "E", "F", "G", "A", "B", "C", "D", "E", "F", "G", Mu)
17:38 colomon afk # but looking forward to fixing stuff when he gets the computer back
17:45 moritz colomon: https://github.com/colomon/ABC/pull/1 waiting for you :-)
17:46 TimToady moritz: "please say so to."  too?
17:46 TimToady (on p6c)
17:46 moritz TimToady: yes
17:47 moritz TimToady: fixed in git, thanks
17:47 moritz and smls++ also fixed a typo in git
17:50 * masak .oO( I don't always remote shell -- but when I do, I /bin/false ) :P
17:50 koo6 joined #perl6
17:52 moritz Now I wonder why people (including myself) use /bin/false as a shell entry in /etc/passwd, when /bin/true would work just as well
17:52 moritz does the exit status of the login shell determine if things show up in a log somewhere, maybe?
17:57 jdv79 what determines what is built in or not?  just a list in the setting?
17:57 masak jdv79: basically.
17:57 masak well, definitions in the setting, I guess.
17:58 jdv79 and they all just "export" as per their default mechanism - just trying to understand how stuff is just available globally
17:59 moritz jdv79: they are in an outer lexical scope of the program you run
18:01 jdv79 so its not like the setting specs a list of well defined modules and then it loads them and they in turn export?
18:01 anaeem1 joined #perl6
18:04 moritz jdv79: no
18:05 moritz jdv79: the motivation is that it makes lexical overriding/shadowing of pre-defined symbols possible
18:05 moritz it falls naturally out of the outer-lexical semantics
18:05 moritz m: say pi
18:05 camelia rakudo-moar c05de6: OUTPUT«3.14159265358979␤»
18:05 anaeem1_ joined #perl6
18:05 moritz m: my \pi = 3.2; say pi
18:05 camelia rakudo-moar c05de6: OUTPUT«3.2␤»
18:09 jdv79 interesting.  thanks.
18:12 Mso150 joined #perl6
18:14 sergot moritz++ # p6c.org
18:18 moritz TimToady: if you have a bit of spare mental power, please take a look / comment on https://github.com/rakudo/rakudo/pull/339
18:26 Ugator1 joined #perl6
18:28 erkan joined #perl6
18:30 colomon moritz++ moritz++ moritz++
18:46 pmurias joined #perl6
18:46 pmurias does anyone besides me feel that an ack6 would be useful?
18:47 colomon pmurias: useful in what sense?
18:49 pmurias I do relatively a lot of searching with ack, I feel it we be awesome to do that using Perl 6 rules
18:58 vendethiel pmurias: I've considered translating https://github.com/tombenner/ru to p6
18:58 vendethiel (admittedly not the same)
19:00 pmurias OTOH after thinking about it a bit what I really want is a structured code search: like all the mentions of a variable matching /foo.*/
19:01 pmurias vendethiel: what I was also thinking recently is to make p6 *the* shell
19:01 vendethiel pmurias: ooh, that sounds pretty amazing as well. would work
19:01 pmurias with a slang that would allow shellish things
19:02 psch joined #perl6
19:02 pmurias so typing "ls" works ;)
19:03 psch hi #perl6
19:04 psch pmurias: p6sh is something that came up in my head as well, partly inspired by e.g. pryrepl.org
19:04 TimToady moritz: I'm fine with the \W approach
19:04 psch in a similar vein, improving the REPL had been on my mind as well for a long time, but i think that relies on a few things we don't quite do yet
19:06 psch e.g. allowing line breaks in the REPL means we'd have to lift it from NQP further towards HLL territory, i think
19:06 psch s/line breaks/line breaks as generic white space/
19:07 pmurias the p6sh seems seems to be a sum of an improved REPL and a shell slang
19:07 dalek rakudo/nom: 27a9887 | usev6++ | src/Perl6/Grammar.nqp:
19:07 dalek rakudo/nom: Allow postfix operator called as method after unary postfix hyper operator
19:07 dalek rakudo/nom:
19:07 dalek rakudo/nom: currently something like '(my @a = 1)>>.++' fails, since METAOP_HYPER_CALL is called
19:07 dalek rakudo/nom: instead of METAOP_HYPER_POSTFIX. Fixes RT #122342.
19:07 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/27a9887f63
19:07 dalek rakudo/nom: c941b0b | usev6++ | src/Perl6/Grammar.nqp:
19:07 synopsebot Link: https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=122342
19:07 dalek rakudo/nom: Allow dotted form of postfix operator after unary postfix hyper operator, but only for non-wordy operators
19:07 dalek rakudo/nom:
19:07 dalek rakudo/nom: The previous version which special cased postfix:<i> only seemed too fragile.
19:07 dalek rakudo/nom: Now the dotted form is allowed only for non-wordy operators.
19:07 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/c941b0b8c2
19:07 dalek rakudo/nom: 8154bd3 | moritz++ | src/Perl6/Grammar.nqp:
19:07 dalek rakudo/nom: Merge pull request #339 from usev6/nom
19:07 dalek rakudo/nom:
19:07 dalek rakudo/nom: Allow postfix operator called as method after unary postfix hyper operator
19:07 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/8154bd396a
19:11 psch pmurias: well, there is design decisions as well.  e.g. *sh in general takes ^M as "evaluate this", while the REPL should check if what's been entered up to now could be completed to be valid
19:12 psch but then maybe /{$/ could *for p6sh* count as equivalent to \^M
19:13 psch i'm far from clear about how HLL::Compiler.interactive could be adjusted to allow \n as meaningless white space :/
19:16 pmurias psch: that would need integration with the parser
19:20 FROGGS_ psch: that is what moreinfo should do (grep the irclogs and/or std for that term)
19:21 psch FROGGS_++: that's probably what i remembered that was missing without remembering the term for it
19:21 FROGGS_ :o)
19:24 psch heh http://irclog.perlgeek.de/​perl6/2014-10-09#i_9480243
19:24 FROGGS_ hhe
19:25 FROGGS_ hehe*
19:48 FROGGS__ joined #perl6
20:10 virtualsue joined #perl6
20:20 TimToady s/moreinfo/moreinput/
20:20 FROGGS__ yeah
20:23 masak TimToady: how's tomorrow's post coming along?
20:27 brrt joined #perl6
20:35 psch joined #perl6
20:37 mickcy_ca joined #perl6
20:38 [Coke] TimToady, moritz: "please say so to." was fixed to "so to0.", I changed it to "so."
20:39 mickcy_ca I am wondering if anyone can assist with linux fifo access
20:39 mickcy_ca More accurately, linux sytem pipes
20:40 moritz [Coke]++
20:42 geekosaur what's the question? (I don't think even perl 6 can fix fifos; they are idiosyncratic and almost never what you really want.)
20:44 mickcy_ca I am attempting to get data from ffmpeg through a pipe ... P5 - no problem ... P6 ... my $pipe= 'test'.IO; $pipe.get.say; .. .crashes with "Failed to seek in filehandle: 29"
20:45 masak wow, an actual Perl 6 question. didn't expect that. :)
20:46 masak mickcy_ca: I'm getting `No such method 'get' for invocant of type 'IO::Path'` -- do you have an outdated version of Rakudo?
20:47 mickcy_ca This is perl6 version 2014.09 built on MoarVM version 2014.09
20:47 mickcy_ca Similar failure happens with $pipe.lines.say
20:49 geekosaur hm, why is get trying to seek?
20:50 geekosaur so it's not an issue with fifos /per se/, but perl6 is doing something it probably shouldn't
20:50 mickcy_ca That is my assumption ...
20:51 mickcy_ca Especially since Perl5.18.2 does fifo access flawlessly.
20:53 mickcy_ca Interestingly, both .get and .lines can get the first value at run, but report blank lines after on the default Ubuntu install (2013 ... removed it already).  Same basic error on Parrot and JVM.
20:54 mickcy_ca Sorry ... on 2014.09, JVM reports only blank lines.
20:55 atroxaper joined #perl6
20:55 [Coke] Should p6c.org be an alias for www.p6c.org?
20:57 mickcy_ca Submitted as bug number 123484
20:58 psch mickcy_ca: .read works locally, with a ~1h old perl6-m build.  no idea if it works on 2014.9.  note that you get a Buf from that and have to encode (i think?)
20:59 psch nope, decode :)
21:01 mickcy_ca Maybe stupid question ... how to get bleeding edge version?
21:02 mickcy_ca .get fails with "No such method 'read_bytes' for invocant of type 'Any" on 2014.09
21:03 moritz mickcy_ca: http://rakudo.org/how-to-get-rakudo # iirc
21:03 mickcy_ca Sorry that was parrot ..MoarVM say : "read bytes requires an object with REPR MVMOSHandle" ... Not sure what this is.
21:04 psch mickcy_ca: https://github.com/tadzik/rakudobrew for easy access to the bleeding edge
21:04 mickcy_ca Compiling ...
21:06 avuserow anyone tried HTTP::Server::Async lately? it seems to spin my CPU with a "hello world" server on moarvm.
21:06 avuserow rakudo built yesterday: This is perl6 version 2014.12-26-gd45c53a built on MoarVM version 2014.12
21:10 TimToady masak: pretty much done, but need to eat lunch now
21:10 masak TimToady++
21:14 cognominal joined #perl6
21:19 Ecto joined #perl6
21:21 sqirrel joined #perl6
21:24 awoodland joined #perl6
21:34 kjs_ joined #perl6
21:38 ninjazach joined #perl6
21:43 awoodland joined #perl6
21:44 dalek star: e5f2897 | moritz++ | tools/ (2 files):
21:44 dalek star: Bump versions to 2014.12
21:44 dalek star: review: https://github.com/rakudo/star/commit/e5f2897d67
21:44 dalek star: f86e108 | moritz++ | modules/ (14 files):
21:44 dalek star: Update module revisions
21:44 dalek star: review: https://github.com/rakudo/star/commit/f86e108029
21:44 moritz all module tests pass with the moar backend
21:49 rurban joined #perl6
21:50 telex joined #perl6
21:52 moritz rakudo-parrot complains about missing install/bin/ops2c
21:54 erkan joined #perl6
21:54 moritz why didn't that occur for the compiler release?
21:56 mickcy_ca OK ... I have gone bleeding edge ... same problem with reading from a system fifo.
21:56 moritz oh, because star has another copy of NQP::Configure
21:57 masak :/
21:57 psch mickcy_ca: are you opening the handle?
21:58 mickcy_ca Same error if I open or not.
22:00 mickcy_ca Something else curious ... is there a reason why many of the functions that are listed at https://github.com/perl6/specs/blob​/master/S32-setting-library/IO.pod thrown as "No such method ..."?
22:01 timotimo what's with p6c.org now?
22:01 psch mickcy_ca: as mentioned, .read works for me, see https://gist.github.com/pe​schwa/934fd8e42da67b4c23c5
22:02 moritz timotimo: what should be with it?
22:02 timotimo it still looks like perl6.org on my machine
22:02 timotimo hold on ...
22:02 timotimo ah, a ctrl-r helped
22:03 psch mickcy_ca: .get is definitely bugged, but you reported that i think?
22:04 mickcy_ca psch: Reported .get and .list.
22:05 psch mickcy_ca++
22:05 mickcy_ca psch: ... .lines not .list.
22:06 mickcy_ca psch: This is perl6 version 2014.12-30-g8154bd3 built on MoarVM version 2014.12
22:06 mickcy_ca throws No such method 'read' for invocant of type 'IO::Path'
22:07 psch m: IO.Path.^methods.say
22:07 camelia rakudo-moar 8154bd: OUTPUT«No such method 'Path' for invocant of type 'IO'␤  in block <unit> at /tmp/JXossQygVc:1␤␤»
22:07 psch m: IO::Path.^methods.say
22:07 camelia rakudo-moar 8154bd: OUTPUT«FALLBACK new gist␤»
22:07 psch m: IO::Handle.^methods.say
22:07 camelia rakudo-moar 8154bd: OUTPUT«FALLBACK new gist␤»
22:07 psch huh
22:07 timotimo try :all for ^methods?
22:07 psch m: IO::Handle.^methods(:all).say
22:07 camelia rakudo-moar 8154bd: OUTPUT«FALLBACK new gist ACCEPTS WHERE WHICH take WHY set_why Bool so not defined new CREATE bless BUILDALL BUILD_LEAST_DERIVED Numeric Real Str Stringy item say print note gist perl DUMP DUMP-PIECES DUMP-OBJECT-ATTRS isa does can clone Capture Method+{<anon>}.ne…»
22:07 moritz it's camelia
22:08 moritz it cripples IO
22:08 moritz for safety
22:08 psch oh, right, RESTRICTED again
22:08 timotimo oh, of course
22:11 raydiak attempting to open a pipe blocks until something is written to it?
22:11 moritz opening not, I hope
22:11 timotimo maybe it blocks until something opens it from the other side?
22:11 * timotimo has hardly used fifos so far
22:12 raydiak no, I mean...unless I'm doing something wrong, it *does*
22:13 psch raydiak: that's what i'd think from what i see.  echoing into a fifo blocks until something reads, so reading block until something writes
22:13 raydiak psch: I'm not trying to read anything
22:13 psch oh, wait, just opening shouldn't block, no
22:13 raydiak perl6 -e 'open "testpipe"' blocks
22:14 raydiak so something somewhere is trying to read and then seek back to 0, even on pipes, for whatever reason
22:15 raydiak do we look for a BOM automagically when we open files or anything?
22:16 timotimo BOM is deprecated :)
22:17 jferrero joined #perl6
22:17 raydiak ah
22:17 timotimo (as is windows)
22:17 mickcy_ca psch: read does not appear on either of those method probes.
22:19 mickcy_ca psch: I mean any of those ... IO::Handle.^methods(:all).say spews out much but read does not appear on my just compiled version.
22:20 psch right, i didn't ran the perl6-m i recently compiled...
22:20 psch that's what i get for having one perl6-m in my $PATH and a few others that i just fiddle around with...
22:21 psch mickcy_ca: 2014.12-30-g8154bd3 and 2014.12-11-g08c2b0f both have IO::Handle.read
22:22 psch that's the two perl6-m i have built atm
22:22 TimToady http://perl6advent.wordpress.com/2014/12/24/​day-24-seeing-wrong-right/?preview=true&amp;​preview_id=2836&amp;preview_nonce=a84e79302e
22:24 mickcy_ca psch: Apparently, I am on crack is see read now ... testing ...
22:25 vendethiel TimToady++
22:29 mickcy_ca psch: SUCCESS!!!!!  my problem with read was that I set up var as my $fifo = "fifo".IO ... $fifo.WHAT.say says IO::Path  then $fifo.open ... $fifo.WHAT.say says IO::Path ... If I do $fifo = "fifo"; $fifo = open $fifo; $fifo.WHAT.say says IO::Handle ... and now read works.
22:29 psch mickcy_ca: you can "fifo".IO.open
22:30 psch i.e. my $handle = "fifo".IO.open
22:30 psch .open returns the opened IO::Handle from an IO::Path
22:31 mickcy_ca psch: so it does ... found another bug.
22:31 mickcy_ca psch: I can submit that.
22:34 moritz compiling stuff with parrot feels really sluggish, now that I'm used to Moar
22:34 psch mickcy_ca: submit what?
22:38 mickcy_ca If you open the file directly with $file = "test".IO.open $file.WHAT is IO::Handle ... if one uses $file = $test.IO; $file.open; $file.WHAT reports IO::Path.  This is inconsistent.
22:39 psch m: sub pretend-im-open ($file) { return "opened" }; my $opened = pretend-im-open("file"); my $file = "file"; pretend-im-open($file); say $opened; say $file
22:39 camelia rakudo-moar 8154bd: OUTPUT«opened␤file␤»
22:40 psch mickcy_ca: to expand on that, calling $file.open doesn't assign the opened Handle to $file, it returns it in sink context
22:40 psch mickcy_ca: you can use .= instead of . if you want it opened in-place (i think)
22:40 moritz TimToady++
22:40 * moritz took the liberty of setting the category to 2014
22:41 psch yeah, if you have a IO::Path in $file and use $file .= open you get an opened IO::Handle afterwards
22:42 psch mickcy_ca: i don't see the inconsistency.  .open is a method that returns an opened IO::Handle from an IO::Path, but you're no assigning that Handle but trying to read from the Path
22:42 naddiseo joined #perl6
22:43 psch mickcy_ca: on the other hand, "test.IO.open calls open on the Path and returns the Handle and that gets assigned to $file
22:43 psch s/"//
22:43 psch err, s/"test/"test"/
22:46 mickcy_ca psch: You are correct, but calling .open on a previously declared IO::Path object should convert and return an IO::Handle object to be consistent with calling .io.open.
22:47 psch mickcy_ca: it can't convert in-place, because the callee might be immutable.  conside
22:47 psch m: "abc" ~~ s/a/d/
22:47 camelia rakudo-moar 8154bd: OUTPUT«Cannot assign to an immutable value␤  in method subst-mutate at /home/camelia/rakudo-inst-2/languages​/perl6/runtime/CORE.setting.moarvm:1␤  in method subst-mutate at src/gen/m-CORE.setting:4099␤  in block <unit> at /tmp/yUmsbzRPCJ:1␤␤»
22:47 raydiak TimToady++: "implementtors"
22:47 atroxaper joined #perl6
22:48 psch mickcy_ca: same for "file".IO.open; the String "file" is immutable and can't be turned into a Handle
22:48 psch mickcy_ca: and surely special-casing .open to check whether the callee is a container or not isn't sane :)
22:48 psch (or is it the caller and i'm mixing this up again..? :/ )
22:50 psch what i mean with callee is "object the method is called on", which probably isn't what callee means...
22:52 mickcy_ca psch:  Thanks for the feedback, but surely whether you call .IO.open or .IO followed by .open, the same results should follow.  They don't.
22:53 mickcy_ca Should it matter if I call it in one line or I proceed to do it in two lines for some reason.
22:58 psch mickcy_ca: by that reasoning <my $x = 5 + 5;> and <my $x = 5; $x + 5> should both result in $x == 10
23:01 mickcy_ca psch: That is a great way to put it ... my reasoning is that if I execute <my $x = 5 + 5;> and <my $x = 5; $x += 5;>  they should both return 10;
23:02 psch mickcy_ca: but you're not executing $x += 5, you're executing $x + 5.  if you want $x += 5 use .= instead of .
23:02 mickcy_ca psch: I get now ... .open is not a coercer.
23:02 psch m: my $file = "file"; $file.subst(/file/, "opened"); say $file; $file .= subst(/file/, "opened"); say $file
23:02 camelia rakudo-moar 8154bd: OUTPUT«file␤opened␤»
23:03 mickcy_ca <sigh> my misunderstanding has been cleared up.  Thank you VERY much.
23:04 psch mickcy_ca++: glad to help :)
23:04 mickcy_ca psch:++
23:18 mickcy_ca Another question ... testing the Supply framework ... cannot seem to get the following to work <my my $pipe = 'test_pipe'.IO.open; my $supply = Supply.new.map({$pipe.read(30).d​ecode('UTF-8')});$supply.tap(-> $s {$s.say;}); sleep 20;> This outputs nothing, even though the $pipe.read is verified in a while loop elsewhere.
23:18 bcode_ joined #perl6
23:22 Timbus mickcy_ca, map is supposed to be applied to data being passed through the supply
23:22 Timbus you arent passing anything through it..
23:25 mickcy_ca Timubs: That is interesting ... I may have made a error understanding http://perl6advent.wordpress.com/2013/12/​19/perl-6-supplies-reactive-programming/ where much the same framework was used.
23:29 mickcy_ca Timbus: this works if I change Supply.new -> Supply.interval(1)
23:30 Timbus interval is an instance of a supply that pumps a tick every 1 second, so yeah
23:30 psch TimToady: "Eventually we we either reach a consensus" - i think one of those "we"s should go
23:30 TimToady oui
23:31 Timbus put an 'or' inbetween the we's imo
23:31 vendethiel TimToady: non
23:33 psch also "which is a certainly a mistake"
23:34 raiph joined #perl6
23:35 TimToady fixed
23:37 Timbus mickcy_ca, try this: my $supply = Supply.from-list('test_pipe'.IO.open.lines);
23:37 Timbus it might work how you want
23:38 Timbus hm, except you need bytes, not lines
23:46 mickcy_ca Timbus: Big conversation about .lines "Failed to seek in filehandle: 29" earlier on ... running 2014.12-30-g8154bd3 built on MoarVM version 2014.12 ... and honestly, I would prefer lines.
23:47 Timbus oh
23:47 cognominal joined #perl6
23:47 mickcy_ca That is the whole reason for using .read
23:48 Timbus well in your case, you need to make your own supply. that's less cool though
23:51 psch you can build a Supply with gather/take around read(1)
23:51 Timbus yeah
23:52 Ugator1 joined #perl6
23:55 mickcy_ca psch: not sure how to do that.
23:57 mickcy_ca I would like to get rid of the interval because the data from my source comes out at "about 1 / sec".
23:58 psch mickcy_ca: something like my $s = Supply.new; $s.emit({ my $fh = "file".IO.open; gather { while $fh.read(1).decode('UTF-8') -> $chr { my $line; if $chr ~~ /\n/ { take $line } else { $line ~= $chr } }
23:59 Timbus read 1 and then decode? something about that..
23:59 psch plus syntax corrections :) (i think "})" at the end)

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

Perl 6 | Reference Documentation | Rakudo