»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg camelia perl6: ... | irclog: irc.perl6.org | UTF-8 is our friend!
Set by sorear on 25 June 2013.
[Coke] colomon++ 00:13
raydiak the typo of the day is: perlformance 01:12
dalek rl6-roast-data: f8af72b | coke++ | / (5 files):
today (automated commit)
01:40
vendethiel moritz++ # sleeping 01:49
ssqq m: my token somechar { < a b > }; if 'ccc' ~~ / ^ <!someclass>+ $/ { say 'ccc match <someclass> } 02:23
camelia rakudo-moar d45c53: OUTPUT«===SORRY!=== Error while compiling /tmp/4TphMBWfkx␤Unable to parse expression in single quotes; couldn't find final "'" ␤at /tmp/4TphMBWfkx:1␤------> lass>+ $/ { say 'ccc match <someclass> }⏏<EOL>␤ expectin…»
ssqq m: my token somechar { < a b > }; if 'ccc' ~~ / ^ <!someclass>+ $/ { say 'ccc match <someclass>' }
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␤␤»
ssqq m: my token someclass { < a b > }; if 'ccc' ~~ / ^ <!someclass>+ $/ { say 'ccc match <someclass>' }
camelia rakudo-moar d45c53: OUTPUT«(timeout)» 02:24
ssqq this code would make perl6 interpreter into a deep loop.
m: my token someclass { <[ab]> }; if 'ccc' ~~ / ^ <!someclass>+ $/ { say 'ccc match <someclass>' } 02:26
camelia rakudo-moar d45c53: OUTPUT«(timeout)»
ssqq m: if 'ccc' ~~ / ^ <- [ab]>+ $/ { say 'ccc match <someclass>' } 02:29
camelia rakudo-moar d45c53: OUTPUT«ccc match <someclass>␤»
ssqq *token-name" like regex name could not use in negative class. 02:37
m: my token token-name { <[ab]> }; 'ccc' ~~ /^ <- token-name>+ $/;
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␤␤»
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/languages/nqp/lib/QRegex.moarvm:parse:29)␤ from gen/moar/stage2/QRegex.nqp:1956 (/home/camelia/rakudo-inst-2/languages/nq…»
Naddiseo Is there a way to use the hyper operators to call multiple methods on a single object? 04:23
something like: my @methods = <foo bar baz>; my @results = $obj>>.@methods; 04:24
flussence m: my $array = <foo bar zzz>; say $array."$_" for <count pop [1]>; 04:36
camelia rakudo-moar d45c53: OUTPUT«===SORRY!=== Error while compiling /tmp/nZbJfo4xii␤Quoted method name requires parenthesized arguments. If you meant to concatenate two strings, use '~'.␤at /tmp/nZbJfo4xii:1␤------> $array = <foo bar zzz>; say $array."$_"[33…»
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␤␤»
flussence m: my $array = <foo bar zzz>; say $array."$_"() for <elems pop [1]>;
camelia rakudo-moar d45c53: OUTPUT«3␤No such method 'pop' for invocant of type 'Parcel'␤ in block <unit> at /tmp/uA01yIwIV1:1␤␤»
flussence hm, the first one works at least...
m: my @array = <foo bar zzz>; say @array."$_"() for <elems pop [1]>;
camelia rakudo-moar d45c53: OUTPUT«3␤zzz␤No such method '[1]' for invocant of type 'Array'␤ in block <unit> at /tmp/LXHCwJmfcW:1␤␤»
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:40
Naddiseo Nah, I just wanted a shorthand way. 04:41
rather than writing my @a = ($foo.bar, $foo,baz, $foo.foo ....)
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
m: my class Foo { has $x = 1; has $z; has $y = 2; }; say Foo.^attributes».get_value(Foo.new)
camelia rakudo-moar d45c53: OUTPUT«1 (Any) 2␤»
Naddiseo Neat. 04:59
next thing. is there something for pretty printing the output of .perl ?
moritz Naddiseo: I don't think so 05:06
Naddiseo *sigh* 05:07
moritz though there's JSON::Pretty if you have only hashes, arrays, strings, numbers and booleans 05:08
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
also is there a better name for this? my C is rusty :(
moritz pointer 05:25
avuserow: you can use a CArray with one element to emulate such a pointer
avuserow I mean specifically returning a value via pointer
and okay, that works :) 05:26
moritz "C" :-)
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␤»
raydiak what am I doing wrong?
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)␤»
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␤»
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␤»
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:02
raydiak good night, #perl6 08:37
dalek kudo/newio: f57427b | moritz++ | src/core/Supply.pm:
Simplify Supply.list
09:00
kudo/newio: 828d0df | lizmat++ | src/core/Supply (2 files):
Deprecate Supply.for in favour of .from-list
kudo/newio: d45c53a | lizmat++ | docs/ChangeLog:
Update ChangeLog for Supply.from-list
kudo/newio: 0477e37 | lizmat++ | / (3 files):
Merge branch 'nom' into newio
El_Che moritz: ntpd ("lsof -i" showed it running). I just stopped it, I didn't disable it. 09:05
dalek ecs: 9fd217a | lizmat++ | S17-concurrency.pod:
Rename Supply.for -> from-list

Main reason for this, is that after the GLR, the .for method will have a very different meaning in general. To avoid a conceptual clash, a rename felt warranted.
Also itemize "from-list" and "interval" for clarity.
09:20
timotimo has started catching up with the advent posts 09:48
timotimo m: subset Test where * < 10; my Test $foo = 5; 09:48
camelia ( no output )
timotimo m: subset Test where * < 10; my Test $foo = "3";
camelia ( no output )
timotimo mhm, mhm 09:49
there's a "" in the "cool subset of MAIN" post where i suspect the author put "<Any>"
events.ccc.de/congress/2014/Fahrpl.../6243.html - oh, interesting 09:51
abraxxa sounds bad 09:53
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
btyler_ bugzilla.mozilla.org/show_bug.cgi?id=1074812 in particular 10:06
abraxxa this one is also by a Checkpoint security researcher: blog.gerv.net/2014/10/new-class-of-...lications/ 10:10
masak good antenoon, #perl6
abraxxa it links to the bug btyler_ pasted
jup, this is it 10:11
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.
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:18
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:23
moritz El_Che: openntpd was already running on the host 11:24
El_Che: reading through the reviews of ntpd source code scared the hell out of me 11:25
El_Che moritz: that bad?
El_Che moritz: an alternative could be something like ntpdate in a cron 11:25
moritz El_Che: it's like 300k lines of C code, much of it not written with security in mind 11:26
moritz www.p6c.org/ is now live 11:39
moritz (box shadows stolen from the perl6.org 11:44
lizmat moritz++ 11:47
.oO( it feels faster to me)
11:48
moritz it also has less content to load :-) 11:50
FROGGS_ ohh yes, it feels way faster
FROGGS_ at least in the middle of good Ol' Europe 11:51
moritz it's served from the same box as perl6.org
avalenn what is the difference between p6c.org and perl6.org ? 11:52
moritz avalenn: doesn't the title and contents make that clear? 11:53
FROGGS_ p6c.org and perl6.org look identical 11:54
moritz they do?
FROGGS_ yes
moritz shit, they don't for me :(
have I messed up the virtual hosts again?
FROGGS_ both show: Welcome to Perl 6
Hi, my name is Camelia.
...
avalenn yes, they not only look identical but are for all content and purpose
moritz at least they both show the perl6.org content 11:55
sorry for the confusion
p6c.org is supposed to show github.com/perl6/www.p6c.org/blob/...index.html
lizmat FROGGS_: do you have any feelings about runtime setting of %*ENV<PERL6LIB> and its effects of @*INC ? 11:56
moritz does www.p6c.org/ show the new thing for everybody?
lizmat moritz: I'm not sure what "new" is, looks identical to perl6.org for me
moritz :(
FROGGS_ I don't see <h1>Perl 6 Community Servers</h1> fwiw on p6c.org 11:57
lizmat: what do you mean by runtime setting?
moritz ok, please try again 11:58
FROGGS_ moritz: that did it :o)
moritz \o/
FROGGS_ lizmat: what I know is that using PERL6LIB to move a CURL::inst to the front does not work for panda
lizmat %*ENV<PERL6LIB> = 'path'; require module # should 'path' be included in search ?
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
lizmat moritz: yeah, much better now
moritz sorry for the confusion everybody 12:00
avalenn: now it should be clear what the difference is :-)
FROGGS_ lizmat: I'm not sure about your example code...
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
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
FROGGS_ lizmat: setting $*ENV<PERL6LIB> and expecting a change in @*INC sounds highly magical to me 12:03
too magical
lizmat FROGGS_: agree
FROGGS_ one should mess with @*INC directly or via 'use lib'
lizmat however, it would be a WAT for people coming from P5
I would even say: don't mess with @*INC
FROGGS_ true
lizmat but that is another issue... 12:04
ok, we agree on that then...
FROGGS_ :o) 12:05
lizmat drops a pin in the storm 13:30
moritz 's powerful magnet catches it before it hits the floor 13:31
lizmat notices some classes in the setting are not "my" 13:48
does that make any difference? (I think not, but checking just in case)
moritz m: say OUR::<VM> 13:49
camelia rakudo-moar d45c53: OUTPUT«(Any)␤»
lizmat m: say OUR::<Pair>
camelia rakudo-moar d45c53: OUTPUT«(Any)␤»
lizmat so guess not, right ?
moritz m: class A { }; say OUR::<A> 13:50
camelia rakudo-moar d45c53: OUTPUT«(A)␤»
moritz lizmat: it seems the OUR from the setting is simply dropped somewhere
lizmat m: say SETTING::<Pair>
camelia rakudo-moar d45c53: OUTPUT«(Any)␤»
lizmat m: say SETTING::<VM>
camelia rakudo-moar d45c53: OUTPUT«(Any)␤»
lizmat m: say SETTING::<Pair>:exists
camelia rakudo-moar d45c53: OUTPUT«False␤»
lizmat m: say SETTING::<VM>:exists 13:51
camelia rakudo-moar d45c53: OUTPUT«False␤»
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␤»
lizmat I was thinking of creating a hash in ModuleLoader with the names of the modules in core
and create a better error message
hoelzro ahoy #perl6
lizmat (if loading failed)
hoelzro o/
hoelzro o/ lizmat 13:54
raydiak good morning, #perl6 14:06
lizmat raydiak o/
raydiak \o lizmat 14:07
vendethiel okay, let me try something dangerous now. 14:28
:P
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␤»
vendethiel =(
moritz also it would be SubInt::Sub::VAL, if at all 14:30
vendethiel moritz: no 14:31
moritz: I have two subsets
(the subsets are only necessary because X[Y]::Z doesn't parse ATM) 14:36
(...Which I should definitely look at)
lizmat errands& 14:42
dalek kudo/nom: c05de61 | lizmat++ | src/Perl6/ModuleLoader.nqp:
Remove trailing whitespace
14:43
moritz vendethiel: I don't think subsets inhert the WHO at all 14:44
moritz m: role Sub[T $x] { constant VAL = $x; }; Sub[42].WHO<VAL> 14:45
camelia rakudo-moar d45c53: OUTPUT«===SORRY!=== Error while compiling /tmp/2walLxsg6y␤Invalid typename 'T' in parameter declaration.␤at /tmp/2walLxsg6y:1␤------> role Sub[T⏏ $x] { constant VAL = $x; }; Sub[42].WHO␤»
moritz m: role Sub[$x] { constant VAL = $x; }; Sub[42].WHO<VAL>
camelia rakudo-moar d45c53: OUTPUT«===SORRY!===␤You cannot create an instance of this type␤»
moritz m: role Sub[$x] { constant VAL = $x; }; 14:51
camelia rakudo-moar d45c53: OUTPUT«===SORRY!===␤You cannot create an instance of this type␤»
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␤»
vendethiel m: role Sub[Int $x] { method x { $x } }; Sub[5].say
camelia rakudo-moar d45c53: OUTPUT«===SORRY!===␤You cannot create an instance of this type␤»
vendethiel what?
I'm positive this worked...
m: role Foo[Str $x] { method print { say $x } }; Foo["hey".uc].print
camelia rakudo-moar d45c53: OUTPUT«HEY␤»
vendethiel uh-oh.
moritz: is it the "Int"? 15:03
moritz m: say Sub
camelia rakudo-moar d45c53: OUTPUT«(Sub)␤»
moritz vendethiel: perhaps related to the fact that 'Sub' already is a class?
vendethiel probably is. 15:04
m: role X[Int $x] { method x { $x } }; X[5].say
camelia rakudo-moar d45c53: OUTPUT«(X[Int])␤»
vendethiel yeah.
m: role Foo[T $x] { constant VAL = $x; }; Foo[42].WHO<VAL> 15:05
camelia rakudo-moar d45c53: OUTPUT«===SORRY!=== Error while compiling /tmp/vX2Up5fc8M␤Invalid typename 'T' in parameter declaration.␤at /tmp/vX2Up5fc8M:1␤------> role Foo[T⏏ $x] { constant VAL = $x; }; Foo[42].WHO␤»
vendethiel m: role Foo[::T $x] { constant VAL = $x; }; Foo[42].WHO<VAL>
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(…»
avalenn /msg camelia help 15:06
moritz m: role Foo[::T $x] { constant VAL = $x; }; Foo[42].WHO.^name 15:07
camelia rakudo-moar d45c53: OUTPUT«(signal SEGV)»
moritz that's not good :-) 15:07
moritz rakudbugs it
p: role Foo[::T $x] { constant VAL = $x; }; Foo[42].WHO.^name
camelia rakudo-parrot d45c53: OUTPUT«Can only use get_how on a SixModelObject␤ in block <unit> at /tmp/2psc3GXD8v:1␤␤»
moritz r: role Foo[$x] }; Foo[42].WHO.^name 15:08
camelia rakudo-{parrot,moar} d45c53: OUTPUT«===SORRY!=== Error while compiling /tmp/tmpfile␤Unable to parse role definition␤at /tmp/tmpfile:1␤------> role Foo[$x] ⏏}; Foo[42].WHO.^name␤»
moritz r: role Foo[$x] { }; Foo[42].WHO.^name
camelia rakudo-parrot d45c53: OUTPUT«Can only use get_how on a SixModelObject␤ in block <unit> at /tmp/tmpfile:1␤␤»
..rakudo-moar d45c53: OUTPUT«(signal SEGV)»
moritz golf'd 15:09
vendethiel moritz++ 15:17
colomon oh noez, abctranspose is broken! 15:58
m: my $key = Mu 16:02
camelia ( no output )
colomon m: my $key = Mu; say "Okay"
camelia rakudo-moar c05de6: OUTPUT«Okay␤»
colomon ===SORRY!=== 16:07
Type check failed in binding $key; expected 'Any' but got 'Mu'
any way to get a better error message?
I ask because my code never binds a variable named $key anywhere but a my statement 16:09
moritz colomon: run with --ll-exception 16:21
colomon: maybe it's in the setting
masak ooh, www.p6c.org/ 16:32
moritz++ 16:33
moritz I guess I should announce the new server (and feather EOL) on some mailing list(s) 16:38
p6c? p6a? p6u?
masak all of the above sounds good to me. 16:40
nwc10 p6a is p6c|p6u ? 16:41
masak I think they're all disjunct... 16:42
colomon moritz++: good call
enum.Invert? 16:44
called by (several steps skipped) MapIter.reify? 16:45
elsif ($did_iterate || nqp::elems($rpa) || $rpa) && nqp::can($block, 'fire_phasers') { 16:46
$block.fire_phasers('LAST');
}
is the final step in the backtrace.
:\
moritz colomon: can you nopaste the whole backtrace please? 16:49
colomon moritz: gist.github.com/colomon/89d63a42453a978e3033 16:50
oh!
not running the moar I thought I was
ack, this one's just as scary 16:51
my $coro := { nqp::continuationreset($GATHER_PROMPT, $state); $takings };
moritz colomon: the whole backtrace is from the setting?
colomon is the top call the trace reports
moritz: yes 16:52
moritz colomon: does a simple perl6 -e 'say 42' work?
colomon yes 16:53
and "panda install ABC" works fine
but I don't think the abctranspose module is ever tested 16:54
moritz colomon: does loading the module alone work?
colomon: on my build, src/gen/m-CORE.setting:13612 points into X::Mixin::NotComposable 16:55
colomon yes
yes, but I'm 100% sure my m-CORE.setting is different than yours
moritz: the abc2ly script (which is my main use for ABC module) works fine. 16:56
so basically this rakudo works, but I'm doing something which triggers massive wonkiness 16:57
colomon actually, I don't think those line numbers correspond meaningfully to my m-CORE.setting either. 17:00
moritz colomon: then there might some wonkyness with using older .moarvm files going on 17:01
colomon: what command are you running? I'll try to reproduce on my machine
colomon ack, that will be hard. 17:02
moritz t/06-duration.t ... ok
Could not find symbol '&Actions'
colomon moritz: right, as I said, current Rakudo is broken WRT ABC
it's one of the damned precompile bugs.
moritz :(
colomon …. so why don't I try current rakudo without compiling 17:03
?
give me a minute
gtodd feather EOL! 17:06
masak m: say "feather ", chr(0xa), "!" 17:11
camelia rakudo-moar c05de6: OUTPUT«feather ␤!␤»
masak feather NL!
gtodd feather no longer 17:14
moritz: re ntpd software .... there's always taiclockd as an alternative ;-) 17:15
masak still hasn't learned not to log into feather in the antenoon 17:17
moritz masak: should I disable your feather account? 17:19
moritz gtodd: I've installed openntpd 17:19
nwc10 either that or send him coffee
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 ....
masak moritz: that might help, yes. 17:21
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 :-)
colomon moritz: okay, I can duplicate with latest rakudo 17:23
moritz colomon: :( 17:24
gtodd writing about sort on the 23rd++
moritz: that is a sort of good article 17:26
moritz gtodd: thanks :-)
colomon moritz: so you need to clone the ABC repo
moritz colomon: done 17:27
colomon then get this file: gist.github.com/colomon/1ab1285e9daa221ff65f
then perl6 --ll-exception -Ilib bin/abctranspose Dmix Amix +7 <road_press.abc
and you should get the error I'm seeing 17:28
moritz colomon: I do 17:29
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:30
nope, 7 still fails 17:31
moritz colomon: it seems to be $in.slurp in sub Transpose that produces the error 17:33
m: say $*IN.slurp
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…»
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…»
moritz huh, not so easy to reproduce 17:34
moritz colomon: maybe the deprecation stuff is tripping over something else 17:34
colomon moritz: brill! 17:37
moritz colomon: oh 17:38
colomon: $original-key.scale-names produces ("D", "E", "F", "G", "A", "B", "C", "D", "E", "F", "G", Mu)
colomon afk # but looking forward to fixing stuff when he gets the computer back
moritz colomon: github.com/colomon/ABC/pull/1 waiting for you :-) 17:45
TimToady moritz: "please say so to." too? 17:46
(on p6c)
moritz TimToady: yes
TimToady: fixed in git, thanks 17:47
and smls++ also fixed a typo in git
masak .oO( I don't always remote shell -- but when I do, I /bin/false ) :P 17:50
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
does the exit status of the login shell determine if things show up in a log somewhere, maybe?
jdv79 what determines what is built in or not? just a list in the setting? 17:57
masak jdv79: basically.
well, definitions in the setting, I guess.
jdv79 and they all just "export" as per their default mechanism - just trying to understand how stuff is just available globally 17:58
moritz jdv79: they are in an outer lexical scope of the program you run 17:59
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
moritz jdv79: no 18:04
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
m: say pi
camelia rakudo-moar c05de6: OUTPUT«3.14159265358979␤»
moritz m: my \pi = 3.2; say pi 18:05
camelia rakudo-moar c05de6: OUTPUT«3.2␤»
jdv79 interesting. thanks. 18:09
sergot moritz++ # p6c.org 18:14
moritz TimToady: if you have a bit of spare mental power, please take a look / comment on github.com/rakudo/rakudo/pull/339 18:18
colomon moritz++ moritz++ moritz++ 18:30
pmurias does anyone besides me feel that an ack6 would be useful? 18:46
colomon pmurias: useful in what sense? 18:47
pmurias I do relatively a lot of searching with ack, I feel it we be awesome to do that using Perl 6 rules 18:49
vendethiel pmurias: I've considered translating github.com/tombenner/ru to p6 18:58
(admittedly not the same)
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:00
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
pmurias with a slang that would allow shellish things
pmurias so typing "ls" works ;) 19:02
psch hi #perl6 19:03
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
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
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
s/line breaks/line breaks as generic white space/
pmurias the p6sh seems seems to be a sum of an improved REPL and a shell slang 19:07
dalek kudo/nom: 27a9887 | usev6++ | src/Perl6/Grammar.nqp:
Allow postfix operator called as method after unary postfix hyper operator

currently something like '(my @a = 1)>>.++' fails, since METAOP_HYPER_CALL is called instead of METAOP_HYPER_POSTFIX. Fixes RT #122342.
kudo/nom: c941b0b | usev6++ | src/Perl6/Grammar.nqp:
Allow dotted form of postfix operator after unary postfix hyper operator, but only for non-wordy operators

The previous version which special cased postfix:<i> only seemed too fragile. Now the dotted form is allowed only for non-wordy operators.
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=122342
kudo/nom: 8154bd3 | moritz++ | src/Perl6/Grammar.nqp:
Merge pull request #339 from usev6/nom

Allow postfix operator called as method after unary postfix hyper operator
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:11
but then maybe /{$/ could *for p6sh* count as equivalent to \^M 19:12
i'm far from clear about how HLL::Compiler.interactive could be adjusted to allow \n as meaningless white space :/ 19:13
pmurias psch: that would need integration with the parser 19:16
FROGGS_ psch: that is what moreinfo should do (grep the irclogs and/or std for that term) 19:20
psch FROGGS_++: that's probably what i remembered that was missing without remembering the term for it 19:21
FROGGS_ :o)
psch heh irclog.perlgeek.de/perl6/2014-10-09#i_9480243 19:24
FROGGS_ hhe
hehe* 19:25
TimToady s/moreinfo/moreinput/ 20:20
FROGGS__ yeah
masak TimToady: how's tomorrow's post coming along? 20:23
[Coke] TimToady, moritz: "please say so to." was fixed to "so to0.", I changed it to "so." 20:38
mickcy_ca I am wondering if anyone can assist with linux fifo access 20:39
More accurately, linux sytem pipes
moritz [Coke]++ 20:40
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:42
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:44
masak wow, an actual Perl 6 question. didn't expect that. :) 20:45
mickcy_ca: I'm getting `No such method 'get' for invocant of type 'IO::Path'` -- do you have an outdated version of Rakudo? 20:46
mickcy_ca This is perl6 version 2014.09 built on MoarVM version 2014.09 20:47
Similar failure happens with $pipe.lines.say
geekosaur hm, why is get trying to seek? 20:49
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 ...
Especially since Perl5.18.2 does fifo access flawlessly. 20:51
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:53
Sorry ... on 2014.09, JVM reports only blank lines. 20:54
[Coke] Should p6c.org be an alias for www.p6c.org? 20:55
mickcy_ca Submitted as bug number 123484 20:57
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:58
nope, decode :) 20:59
mickcy_ca Maybe stupid question ... how to get bleeding edge version? 21:01
mickcy_ca .get fails with "No such method 'read_bytes' for invocant of type 'Any" on 2014.09 21:02
moritz mickcy_ca: rakudo.org/how-to-get-rakudo # iirc
mickcy_ca Sorry that was parrot ..MoarVM say : "read bytes requires an object with REPR MVMOSHandle" ... Not sure what this is. 21:03
psch mickcy_ca: github.com/tadzik/rakudobrew for easy access to the bleeding edge 21:04
mickcy_ca Compiling ...
avuserow anyone tried HTTP::Server::Async lately? it seems to spin my CPU with a "hello world" server on moarvm. 21:06
rakudo built yesterday: This is perl6 version 2014.12-26-gd45c53a built on MoarVM version 2014.12
TimToady masak: pretty much done, but need to eat lunch now 21:10
masak TimToady++
dalek ar: e5f2897 | moritz++ | tools/ (2 files):
Bump versions to 2014.12
21:44
ar: f86e108 | moritz++ | modules/ (14 files):
Update module revisions
moritz all module tests pass with the moar backend 21:44
moritz rakudo-parrot complains about missing install/bin/ops2c 21:52
moritz why didn't that occur for the compiler release? 21:55
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
masak :/ 21:57
psch mickcy_ca: are you opening the handle?
mickcy_ca Same error if I open or not. 21:58
mickcy_ca Something else curious ... is there a reason why many of the functions that are listed at github.com/perl6/specs/blob/master...ary/IO.pod thrown as "No such method ..."? 22:00
timotimo what's with p6c.org now? 22:01
psch mickcy_ca: as mentioned, .read works for me, see gist.github.com/peschwa/934fd8e42da67b4c23c5
moritz timotimo: what should be with it? 22:02
timotimo it still looks like perl6.org on my machine
hold on ...
ah, a ctrl-r helped
psch mickcy_ca: .get is definitely bugged, but you reported that i think? 22:03
mickcy_ca psch: Reported .get and .list. 22:04
psch mickcy_ca++ 22:05
mickcy_ca psch: ... .lines not .list.
psch: This is perl6 version 2014.12-30-g8154bd3 built on MoarVM version 2014.12 22:06
throws No such method 'read' for invocant of type 'IO::Path'
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␤␤»
psch m: IO::Path.^methods.say
camelia rakudo-moar 8154bd: OUTPUT«FALLBACK new gist␤»
psch m: IO::Handle.^methods.say
camelia rakudo-moar 8154bd: OUTPUT«FALLBACK new gist␤»
psch huh
timotimo try :all for ^methods?
psch m: IO::Handle.^methods(:all).say
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…»
moritz it's camelia
it cripples IO 22:08
for safety
psch oh, right, RESTRICTED again
timotimo oh, of course
raydiak attempting to open a pipe blocks until something is written to it? 22:11
moritz opening not, I hope
timotimo maybe it blocks until something opens it from the other side?
timotimo has hardly used fifos so far
raydiak no, I mean...unless I'm doing something wrong, it *does* 22:12
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
psch oh, wait, just opening shouldn't block, no
raydiak perl6 -e 'open "testpipe"' blocks
so something somewhere is trying to read and then seek back to 0, even on pipes, for whatever reason 22:14
do we look for a BOM automagically when we open files or anything? 22:15
timotimo BOM is deprecated :) 22:16
raydiak ah 22:17
timotimo (as is windows)
mickcy_ca psch: read does not appear on either of those method probes.
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:19
psch right, i didn't ran the perl6-m i recently compiled... 22:20
that's what i get for having one perl6-m in my $PATH and a few others that i just fiddle around with...
mickcy_ca: 2014.12-30-g8154bd3 and 2014.12-11-g08c2b0f both have IO::Handle.read 22:21
that's the two perl6-m i have built atm 22:22
TimToady perl6advent.wordpress.com/2014/12/2...a84e79302e
mickcy_ca psch: Apparently, I am on crack is see read now ... testing ... 22:24
vendethiel TimToady++ 22:25
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
i.e. my $handle = "fifo".IO.open 22:30
psch .open returns the opened IO::Handle from an IO::Path 22:30
mickcy_ca psch: so it does ... found another bug. 22:31
psch: I can submit that.
moritz compiling stuff with parrot feels really sluggish, now that I'm used to Moar 22:34
psch mickcy_ca: submit what?
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:38
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␤»
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
mickcy_ca: you can use .= instead of . if you want it opened in-place (i think)
moritz TimToady++
moritz took the liberty of setting the category to 2014
psch yeah, if you have a IO::Path in $file and use $file .= open you get an opened IO::Handle afterwards 22:41
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
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
s/"//
err, s/"test/"test"/
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:46
psch mickcy_ca: it can't convert in-place, because the callee might be immutable. conside 22:47
m: "abc" ~~ s/a/d/
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␤␤»
raydiak TimToady++: "implementtors"
psch mickcy_ca: same for "file".IO.open; the String "file" is immutable and can't be turned into a Handle 22:48
mickcy_ca: and surely special-casing .open to check whether the callee is a container or not isn't sane :)
(or is it the caller and i'm mixing this up again..? :/ )
what i mean with callee is "object the method is called on", which probably isn't what callee means... 22:50
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:52
Should it matter if I call it in one line or I proceed to do it in two lines for some reason. 22:53
psch mickcy_ca: by that reasoning <my $x = 5 + 5;> and <my $x = 5; $x + 5> should both result in $x == 10 22:58
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:01
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.
psch m: my $file = "file"; $file.subst(/file/, "opened"); say $file; $file .= subst(/file/, "opened"); say $file
camelia rakudo-moar 8154bd: OUTPUT«file␤opened␤»
mickcy_ca <sigh> my misunderstanding has been cleared up. Thank you VERY much. 23:03
psch mickcy_ca++: glad to help :) 23:04
mickcy_ca psch:++
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).dec....tap(-> $s {$s.say;}); sleep 20;> This outputs nothing, even though the $pipe.read is verified in a while loop elsewhere. 23:18
Timbus mickcy_ca, map is supposed to be applied to data being passed through the supply 23:22
you arent passing anything through it..
mickcy_ca Timubs: That is interesting ... I may have made a error understanding perl6advent.wordpress.com/2013/12/1...ogramming/ where much the same framework was used. 23:25
Timbus: this works if I change Supply.new -> Supply.interval(1) 23:29
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
TimToady oui
Timbus put an 'or' inbetween the we's imo 23:31
vendethiel TimToady: non
psch also "which is a certainly a mistake" 23:33
TimToady fixed 23:35
Timbus mickcy_ca, try this: my $supply = Supply.from-list('test_pipe'.IO.open.lines); 23:37
it might work how you want
hm, except you need bytes, not lines 23:38
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:46
Timbus oh 23:47
mickcy_ca That is the whole reason for using .read 23:47
Timbus well in your case, you need to make your own supply. that's less cool though 23:48
psch you can build a Supply with gather/take around read(1) 23:51
Timbus yeah
mickcy_ca psch: not sure how to do that. 23:55
I would like to get rid of the interval because the data from my source comes out at "about 1 / sec". 23:57
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:58
Timbus read 1 and then decode? something about that.. 23:59
psch plus syntax corrections :) (i think "})" at the end)