»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
Set by moritz on 22 December 2015.
00:03 mr-foobar left 00:05 labster joined 00:17 parisba left, parisba joined, TakinOver joined 00:19 Spot__ left, SmokeMachine____ left 00:22 SmokeMachine____ joined 00:23 Spot__ joined 00:36 rurban1 joined 00:37 rurban left 00:38 rurban joined 00:41 rurban1 left 00:42 rurban1 joined 00:43 rurban left 00:48 tbrowder joined
colomon grondilu: I have to say at first blush, overriding infix:<*> if you have three objects seems very wrong to me. are you trying to improve the accuracy of floating point or something? 00:50
00:52 tbrowder left 00:54 rurban1 left, rurban joined 01:00 rurban left 01:01 rurban joined 01:05 kalkin- left, kalkin-_ joined 01:11 rurban left 01:12 rurban joined 01:16 rurban left 01:17 rurban joined 01:20 molaf left 01:21 rurban left, kurahaupo_ joined, rurban joined 01:23 kurahaupo left 01:33 molaf joined
grondilu colomon: I want to optimize expressions like a*b*a 01:34
or rather a.transpose*b*a, as discussed then 01:35
01:39 kurahaupo_ left
grondilu I don't want it very hard though, but a simple solution would be nice. 01:40
colomon I’m not sure of the wisdom of trying to squeeze matrix multiplication in with normal multiplication. 01:42
But it seems like if you really want to do something like this, the right way to do it is to add another layer of abstraction 01:43
so that infix:<*> (Matrix, Matrix) doesn’t return a Matrix, it returns some sort of proxy object which can generate a Matrix 01:44
and the optimizations are built on the proxy level
01:45 ilbot3 left 01:46 sufrostico left 01:47 ilbot3 joined
grondilu yeah I was considering that, but it's kind of ugly. 01:55
though now that I rethink about it, it makes some sense for my application. 01:56
02:00 rurban left 02:03 kid51 left 02:05 labster left 02:09 colomon left 02:11 colomon joined
timeless Type Order not found in type-graph data 02:18
02:22 Actualeyes joined
BenGoldberg Personally, I would think about porting PDL to perl6. 02:30
02:33 noganex joined 02:36 noganex_ left
grondilu again it's not actually for linear algebra, but for my Clifford module (that is, geometric algebra) 02:40
02:40 pecastro joined
timeless doc: make html is really slow :( 02:42
anyone know how practical it would be for `make html` to be parallelized? 02:43
i have access to >100 cores and would love to have this process run faster (right now, i'm assuming it's using one core) 02:44
02:44 Zero_Dogg left, Zero_Dogg joined 02:45 labster joined
Juerd If it's already parallelizable, try make -j 100 html 02:45
timeless html:
perl6 htmlify.p6
Juerd Oh :( 02:46
02:46 yqt left
timeless is perl6 happy to fork? 02:52
02:54 huggable left, huggable joined
grondilu I vaguely remember someone posted a neat trick to perform a fork lately 02:58
it might have involved v5 though. Can't quite remember. 02:59
timeless grondilu: wait, forking isn't supported in v6 yet? 03:01
(is threading?)
grondilu I think it will never be because it's not portable or something.
but there is a trick using a system call 03:02
timeless language/5to6-perlfunc.html#fork
grondilu m: say "I'm a child" if run fork 03:03
camelia rakudo-moar 87e91c: OUTPUT«5===SORRY!5=== Error while compiling /tmp/D0oQRTQZ0T␤Undeclared routine:␤ fork used at line 1␤␤»
grondilu m: say "I'm a child" if run 'fork'
camelia rakudo-moar 87e91c: OUTPUT«run is disallowed in restricted setting␤ in sub restricted at src/RESTRICTED.setting line 1␤ in sub run at src/RESTRICTED.setting line 14␤ in block <unit> at /tmp/BrJ6DSETH0 line 1␤␤»
timeless m: use NativeCall; sub fork returns int32 is native { * }; say fork; 03:07
camelia rakudo-moar 87e91c: OUTPUT«19709␤0␤»
03:08 skids joined
geekosaur it won't be in core. a POSIX module is projected but nonexistent as yet (likewise a module for Win32) 03:09
timeless m: eval 'use NativeCall; sub fork returns int32 is native { * }; $x=fork; say $x if $x > 0'
camelia rakudo-moar 87e91c: OUTPUT«5===SORRY!5=== Error while compiling /tmp/ecLHOG0NVG␤Undeclared routine:␤ eval used at line 1. Did you mean 'EVAL', 'val'?␤␤»
geekosaur but you can get at either of those with NativeCall of course
grondilu yes I remember now, it was indeed using NativeCall.
timeless m: EVAL 'use NativeCall; sub fork returns int32 is native { * }; $x=fork; say $x if $x > 0' 03:10
camelia rakudo-moar 87e91c: OUTPUT«5===SORRY!5=== Error while compiling /home/camelia/EVAL_0␤Variable '$x' is not declared␤at /home/camelia/EVAL_0:1␤------> 3sub fork returns int32 is native { * }; 7⏏5$x=fork; say $x if $x > 0␤»
grondilu m: use NativeCall; sub fork returns int32 is native { * }; say "I'm the parent" if fork;
camelia rakudo-moar 87e91c: OUTPUT«I'm the parent␤»
geekosaur I would expect rakudo's core to be slightly confused at times though, if it's using anything that doesn't expect fork (rakudo itself might not, but libuv may)
timeless m: EVAL 'use NativeCall; sub fork returns int32 is native { * }; my $x=fork; say $x if $x > 0' 03:11
camelia rakudo-moar 87e91c: OUTPUT«19772␤»
timeless m: EVAL 'use NativeCall; sub forkz returns int32 is native { * }; my $x=forkz; say $x if $x > 0'
camelia rakudo-moar 87e91c: OUTPUT«Cannot locate symbol 'forkz' in native library ''␤ in method setup at /home/camelia/rakudo-m-inst-2/share/perl6/sources/24DD121B5B4774C04A7084827BFAD92199756E03 (NativeCall) line 281␤ in method CALL-ME at /home/camelia/rakudo-m-inst-2/share/perl6/sou…»
grondilu timeless: why do you EVAL it?
timeless because that's what i'd do in perl5 to handle `use` failing 03:12
i want to write code which would work w/ fork if i can fork, and not die if i can't fork
grondilu there has to be a better way to do it.
timeless hopefully :) 03:13
clearly this didn't work :)
grondilu if there is no better way to deal with conditional NativeCall bindings, then it's clearly LTA 03:14
timeless LTA? 03:15
timeless needs to fix an error in the EVAL docs
so, what's the perl equivalent of `try: import X / except ImportError:` ? 03:18
(perl6)
03:19 sherwool left
timeless visits design.perl6.org/S04.html#Exceptions 03:20
grondilu timeless: Less Than Awesome 03:21
that's my favorite euphemism in S99
timeless localhost:3000/language/.html.html.....html.html 03:26
timeless kicks the `make run` script 03:27
03:31 kurahaupo joined 03:40 nowan left
dj_goku_ evening 03:41
03:46 skids left 03:48 nowan joined
timeless grumbles 03:53
m: EVAL 'use NativeCall; sub forkz returns int32 is native { * }; my $x=forkz; say $x if $x > 0' or say "oops"; 03:54
camelia rakudo-moar 87e91c: OUTPUT«Cannot locate symbol 'forkz' in native library ''␤ in method setup at /home/camelia/rakudo-m-inst-2/share/perl6/sources/24DD121B5B4774C04A7084827BFAD92199756E03 (NativeCall) line 281␤ in method CALL-ME at /home/camelia/rakudo-m-inst-2/share/perl6/sou…»
timeless m: EVAL 'use NativeCall; sub forkz returns int32 is native { * }; my $x=forkz; say $x if $x > 0'; CATCH {default {say .WHAT.perl, do given .backtrace[0] { .file, .line, .subname }}} 04:03
camelia rakudo-moar 87e91c: OUTPUT«X::AdHoc(/home/camelia/rakudo-m-inst-2/share/perl6/sources/24DD121B5B4774C04A7084827BFAD92199756E03 (NativeCall) 281 setup)␤»
04:04 maybekoo2 left
timeless grondilu: so, this seems to work, i guess 04:05
m: use NativeCall; sub forkz returns int32 is native { * }; CATCH {default {say .WHAT.perl, do given .backtrace[0] { .file, .line, .subname }}}; my $x=forkz; say $x if $x > 0; 04:06
camelia rakudo-moar 87e91c: OUTPUT«X::AdHoc(/home/camelia/rakudo-m-inst-2/share/perl6/sources/24DD121B5B4774C04A7084827BFAD92199756E03 (NativeCall) 281 setup)␤»
timeless m: use NativeCall; sub forkz returns int32 is native { * }; CATCH {X::AdHoc {say .WHAT.perl, do given .backtrace[0] { .file, .line, .subname }}}; my $x=forkz; say $x if $x > 0; 04:13
camelia rakudo-moar 87e91c: OUTPUT«5===SORRY!5=== Error while compiling /tmp/gh0wdOyVJ7␤Unexpected block in infix position (missing statement control word before the expression?)␤at /tmp/gh0wdOyVJ7:1␤------> 3s int32 is native { * }; CATCH {X::AdHoc7⏏5 {say .WHAT.perl, do giv…»
timeless m: use NativeCall; sub forkz returns int32 is native { * }; CATCH {when X::AdHoc {say .WHAT.perl, do given .backtrace[0] { .file, .line, .subname }}}; my $x=forkz; say $x if $x > 0;
camelia rakudo-moar 87e91c: OUTPUT«X::AdHoc(/home/camelia/rakudo-m-inst-2/share/perl6/sources/24DD121B5B4774C04A7084827BFAD92199756E03 (NativeCall) 281 setup)␤»
04:13 molaf left, BenGoldberg left 04:15 BenGoldberg joined, khw left
timeless m: use NativeCall; sub waitpid returns int32 is native { * }; CATCH {when X::AdHoc {say .WHAT.perl, do given .backtrace[0] { .file, .line, .subname }}}; say "hi"; 04:17
camelia rakudo-moar 87e91c: OUTPUT«hi␤»
04:18 Cabanossi left 04:19 Cabanossi joined 04:25 ssotka left
timeless m: use NativeCall; sub waitpid(int32, Pointer[int32], int32) returns int32 is native { * }; CATCH {when X::AdHoc {say .WHAT.perl, do given .backtrace[0] { .file, .line, .subname }}}; say "hi"; 04:30
camelia rakudo-moar 87e91c: OUTPUT«hi␤»
04:31 kurahaupo left
timeless m: use NativeCall; sub fork returns int32 is native { * }; sub waitpid(int32, Pointer[int32], int32) returns int32 is native { * }; my $x=fork; say "hi" if ($x == 0); if ($x) {my Pointer[int32] $p; my $z = waitpid($x, $p, 1); say $p.deref; 04:37
camelia rakudo-moar 87e91c: OUTPUT«5===SORRY!5=== Error while compiling /tmp/2RfJvo8_5T␤Missing block␤at /tmp/2RfJvo8_5T:1␤------> 3y $z = waitpid($x, $p, 1); say $p.deref;7⏏5<EOL>␤»
timeless m: use NativeCall; sub fork returns int32 is native { * }; sub waitpid(int32, Pointer[int32], int32) returns int32 is native { * }; my $x=fork; say "hi" if ($x == 0); if ($x) {my Pointer[int32] $p; my $z = waitpid($x, $p, 1); say $p.deref; }
camelia rakudo-moar 87e91c: OUTPUT«hi␤Invocant requires an instance of type NativeCall::Types::Pointer[int32], but a type object was passed. Did you forget a .new?␤ in method deref at /home/camelia/rakudo-m-inst-2/share/perl6/sources/51E302443A2C8FF185ABC10CA1E5520EFEE885A1 (NativeCal…»
timeless m: use NativeCall; sub fork returns int32 is native { * }; sub waitpid(int32, int32 as rw, int32) returns int32 is native { * }; my $x=fork; say "hi" if ($x == 0); if ($x) {my $p; my $z = waitpid($x, $p, 1); say $p; } 04:40
camelia rakudo-moar 87e91c: OUTPUT«5===SORRY!5=== Error while compiling /tmp/QSTvJAtbYd␤Malformed parameter␤at /tmp/QSTvJAtbYd:1␤------> 3s native { * }; sub waitpid(int32, int327⏏5 as rw, int32) returns int32 is native {␤ expecting any of:␤ constraint␤ …»
timeless m: use NativeCall; sub fork returns int32 is native { * }; sub waitpid(int32, int32 is rw, int32) returns int32 is native { * }; my $x=fork; say "hi" if ($x == 0); if ($x) {my $p; my $z = waitpid($x, $p, 1); say $p; }
camelia rakudo-moar 87e91c: OUTPUT«hi␤Native call expected argument that references a native integer, but got P6opaque␤ in method CALL-ME at /home/camelia/rakudo-m-inst-2/share/perl6/sources/24DD121B5B4774C04A7084827BFAD92199756E03 (NativeCall) line 303␤ in block <unit> at /tmp/bpt8…»
timeless m: use NativeCall; sub fork returns int32 is native { * }; sub waitpid(int32, int32 is rw, int32) returns int32 is native { * }; my $x=fork; say "hi" if ($x == 0); if ($x) {my $p=int32.new; my $z = waitpid($x, $p, 1); say $p; } 04:41
camelia rakudo-moar 87e91c: OUTPUT«hi␤Method 'BUILDALLPLAN' not found for invocant of class 'Perl6::Metamodel::NativeHOW'␤ in block <unit> at /tmp/RGOeQIFE3e line 1␤␤»
timeless ?!
m: use NativeCall; sub fork returns int32 is native { * }; sub waitpid(int32, int32 is rw, int32) returns int32 is native { * }; my $x=fork; say "hi" if ($x == 0); if ($x) {my int32 $p; my $z = waitpid($x, $p, 1); say $p; } 04:42
camelia rakudo-moar 87e91c: OUTPUT«hi␤0␤»
geekosaur NativeCall has some weird corner cases as yet; you hit one of them 04:43
I think it, or a close relative, is already rakudobug-d
timeless is this likely close to correct? www.irccloud.com/pastebin/z1N7ziCH...fy.diff.pl 04:49
===SORRY!=== Error while compiling /home/timeless/hg/perl6/doc/htmlify.p6 04:50
Only one CATCH block is allowed
at /home/timeless/hg/perl6/doc/htmlify.p6:50
ok, so i guess i want try{} 04:51
m: constant $x=3; say $x 04:55
camelia rakudo-moar 87e91c: OUTPUT«3␤»
timeless m: const $WNOHANG = 1; say $WNOHANG;
camelia rakudo-moar 87e91c: OUTPUT«5===SORRY!5=== Error while compiling /tmp/NM71BCMKAe␤Variable '$WNOHANG' is not declared␤at /tmp/NM71BCMKAe:1␤------> 3const 7⏏5$WNOHANG = 1; say $WNOHANG;␤»
timeless ?! 04:56
oh constant!=const
> This appears to be Perl 5 code 04:57
heh
BenGoldberg m: use NativeCall; sub fork returns int32 is native { * }; sub waitpid(int32, Pointer[int32], int32) returns int32 is native {*}; my $x = fork; if( $x ) { my Pointer[int32] $p .= new; waitpid( $x, $p, 1 ); say $p } else { say "hi" }
camelia rakudo-moar 87e91c: OUTPUT«5===SORRY!5===␤Word 'if' interpreted as 'if()' function call; please use whitespace instead of parens␤at /tmp/jq4su7d0QK:1␤------> 3ns int32 is native {*}; my $x = fork; if7⏏5( $x ) { my Pointer[int32] $p .= new; wa␤Unexpected block in in…»
BenGoldberg m: use NativeCall; sub fork returns int32 is native { * }; sub waitpid(int32, Pointer[int32], int32) returns int32 is native {*}; my $x = fork; if ( $x ) { my Pointer[int32] $p .= new; waitpid( $x, $p, 1 ); say $p } else { say "hi" } 04:58
camelia rakudo-moar 87e91c: OUTPUT«hi␤NativeCall::Types::Pointer[int32]<NULL>␤»
04:59 ufobat joined
timeless m: use NativeCall;try { sub fork returns int32 is native { * }; CATCH { when X::AdHoc { sub fork() { return -1; } } } }; say fork; 05:03
camelia rakudo-moar 87e91c: OUTPUT«5===SORRY!5=== Error while compiling /tmp/zFh4f1zq2f␤Undeclared routine:␤ fork used at line 1␤␤»
05:04 mohae left
BenGoldberg m: my $x = 4; say $x.WHERE; 05:05
camelia rakudo-moar 87e91c: OUTPUT«140131859372752␤»
BenGoldberg m: use NativeCall; sub fork returns int32 is native { * }; sub waitpid(int32, (Pointer), int32) returns int32 is native {*}; my $x = fork; if ( $x ) { my $p = -1; waitpid( $x, $p.WHERE, 1 ); say $p } else { say "hi" } 05:06
camelia rakudo-moar 87e91c: OUTPUT«Potential difficulties:␤ In 'waitpid' routine declaration - Not an accepted NativeCall type for parameter [2] : Any␤ --> For Numerical type, use the appropriate int32/int64/num64...␤ at /tmp/w8tuB54aXM:1␤ ------> 3ter), int32) return…»
BenGoldberg m: use NativeCall; sub fork returns int32 is native { * }; sub waitpid(int32, Pointer[int32], int32) returns int32 is native {*}; my $x = fork; if ( $x ) { my $p = 42; waitpid( $x, Pointer[int32].new($p.WHERE), 1 ); say $p } else { say "hi" } 05:07
camelia rakudo-moar 87e91c: OUTPUT«hi␤42␤»
05:07 sno left 05:08 Praise left 05:20 BenGoldberg left 05:38 domidumont joined, domidumont left, ssotka joined, domidumont joined 05:42 cpage_ left 05:43 cpage_ joined 05:44 cpage_ left 05:46 domidumont left 05:56 ssotka left 05:59 domidumont joined 06:00 domidumont left, domidumont joined 06:02 geraud left, sno joined 06:09 _mg_ joined 06:10 grondilu left 06:11 grondilu joined 06:13 _mg__ joined 06:14 _mg_ left, _mg__ is now known as _mg_ 06:26 firstdayonthejob joined 06:36 rindolf joined 06:40 rurban joined
masak good morning, #perl6 06:40
masak almost wrote "good Missing or wrong dependency, #perl6", but decided that was too snarky ;)
06:41 firstdayonthejob left 06:46 rindolf left
moritz I don't think I've got that error in a while 06:50
06:53 cpage_ joined 06:54 huggable left, huggable joined 06:55 wamba joined 07:01 brrt joined 07:07 aries_liuxueyang left 07:09 aries_liuxueyang joined 07:14 xinming left 07:15 darutoko joined, xinming joined 07:29 bjz joined
masak moritz: I'm currently getting it dozens of times per day 07:30
moritz huh 07:31
seems I don't use enough Rakudo these days :-)
masak this is happening when modifying a 12-module project with dependencies between the modules 07:36
moritz seems to warrant a bug report 07:39
is nine++ aware of this?
masak I've talked to FROGGS about it, and FROGGS++ submitted a bug report
I'm not 100% sure his report has the same root cause as mine, but it seems close enough 07:40
07:41 zakharyas joined 07:45 bjz left 07:52 brrt left 08:00 mr-foobar joined, bjz joined 08:01 ocbtec joined 08:03 rurban1 joined 08:04 rurban left 08:05 RabidGravy joined 08:09 rurban joined 08:11 rurban1 left 08:13 abraxxa joined 08:23 abraxxa left, abraxxa joined
RabidGravy hahaha, I've been fretting because this thing for generating SQL was making too many parentheses in comparison to the output SQL::Abstract tests against, all the while not realising that the latter actually parses the output and the expected SQL and compares the AST :-\ 08:34
so if someone could come up with an SQL parser that would be great kthx 08:40
jnthn Well, I did a lolsql one a while back, but... :)
08:48 AlexDaniel joined 08:52 zakharyas left 08:54 zakharyas joined 09:01 AlexDaniel left 09:02 mr-foobar left 09:07 rindolf joined
Ulti can someone who's an admin on reddit maybe deal with the latest post www.reddit.com/r/perl6 09:20
or maybe bump me up so I can deal with it
since I'm on there quite a bit
09:20 bjz left 09:21 user9 joined
RabidGravy not sure if I even have a reddit account 09:23
Ulti not entirely sure why the puppet account wasnt blocked immediately from the first post
looks like it was removed though 09:24
09:26 rurban1 joined, rurban left 09:31 zakharyas left 09:32 zakharyas joined
stmuk_ the reddit video doesn't even play! 09:39
RabidGravy probably because the malware payload is only just enough of a video to have the browser think it is a video 09:41
psch looks like it's a thumbnail, actually 09:45
09:47 bjz joined
stmuk_ I liked the pocgtfo executable pdfs 09:48
09:51 bjz_ joined 09:52 bjz left 10:01 maybekoo2 joined
RabidGravy so Grammar::BNF can't hack the SQL grammar I can find, I think it's make the dumbest possible grammar that works by hand 10:08
10:08 kid51 joined 10:21 rurban joined 10:24 TEttinger left, jack_rabbit left, rurban1 left 10:25 rurban1 joined, mr-foobar joined 10:26 rurban left 10:31 rurban joined 10:33 rurban1 left
RabidGravy or, even slacker, adjust the expected results to match the expected amount of parenthesizification 10:34
10:35 rurban left 10:36 rurban joined 10:37 labster left, kaare_ joined 10:40 rurban left, rurban joined 10:42 mr-foobar left 10:45 rurban left, rurban joined 10:50 perlpilot left, kent\n left 10:52 perlpilot joined 10:54 TimToady joined, huggable left, huggable joined 10:59 donaldh joined 11:00 yqt joined 11:01 Zero_Dogg left 11:02 Zero_Dogg joined, Zero_Dogg left, Zero_Dogg joined, telex left 11:03 telex joined 11:09 kid51 left 11:11 rindolf left 11:12 kid51 joined, _mg_ left 11:20 tbrowder joined 11:21 AlexDaniel joined 11:24 tbrowder left 11:26 huf joined 11:27 rindolf joined 11:36 rurban1 joined 11:38 rurban left 11:46 kid51 left 11:48 _mg_ joined 11:49 donaldh left 11:51 donaldh joined 11:59 awwaiid joined 12:04 g4 joined
DrForr I think I've found a way to break lib/.precomp - Are there known bugs? 12:10
12:10 Praise joined, Praise left, Praise joined
masak DrForr: yes, I'm getting that one several times daily 12:12
DrForr: basically, I change a .pm file in my project, and when I run things again I get "Missing or wrong version of module" and have to nuke lib/.precomp
lizmat DrForr: if you have a golf on how to do that, please report
masak FROGGS++ reported something like that
DrForr Okay, this is different then.
lizmat output with running RAKUDO_MODULE_DEBUG=1 is helpful :-) 12:13
masak oh, I will try that next time -- thanks for the tip :) 12:14
is RAKUDO_MODULE_DEBUG documented somewhere?
moritz masak: yes, docs/running.pod 12:15
... which should be installed as a manpage, but isn't
and I think we have a bug report for that too 12:16
12:16 rurban_ joined
masak :) 12:17
DrForr I'll have to play here because it's essentially using awwaliid's repl code but breaking the loader somehow.
12:18 setty1 joined
DrForr I'm going to have to do this later, but it's a little odd. 12:24
12:27 skids joined 12:28 g4 left
DrForr Basically if I have a grammar with a term, the code works. I remove the term from the grammar, and rerun. Now I get 'Could not find symbol '&here'' in the script that loads the grammar. Nothing to do with the script because I can fix it by deleting the .precomp directory. 12:30
12:31 mr-foobar joined
masak yes, that does sound different 12:31
please try to golf and submit an RT ticket
DrForr Will do this weekend.
12:33 Sgeo_ left 12:34 maybekoo2 left 12:37 kurahaupo joined, brrt joined 12:42 skids left
[Coke] (can't email a bug to RT) - please let me know if this is still an issue. 12:43
12:44 kurahaupo left 12:48 Praise left 12:50 Praise joined, Praise left, Praise joined 12:51 abraxxa left
dalek c: 9b72be0 | (Zoffix Znet)++ | app.pl:
Prevent infinite redirect on 404 files

Related to #576
12:51
13:02 cdg joined 13:11 mr-foobar left 13:15 brrt left
dalek c: fef2e8e | (Zoffix Znet)++ | app.pl:
Fix another infinite redirect bug
13:16
13:16 avalenn joined 13:22 sufrostico joined
stmuk_ votes "in" to Wombles 13:26
13:35 rurban joined, rurban1 left
dogbert17 o/ #perl6, does anyone want to take a quick look at a doc gist for Baggy.elems here? gist.github.com/dogbert17/d6bc8023...6ca7a27c4a 13:47
13:51 salv0 joined
AlexDaniel what is mixhash? 13:52
what is mix!? 13:53
psch m: my $x = new MixHash: 1, 2, 3; say $x;
camelia rakudo-moar 9cfcb9: OUTPUT«MixHash.new(3, 1, 2)␤»
psch m: my $x = new MixHash: 1, 2, 3; say $x.perl
camelia rakudo-moar 9cfcb9: OUTPUT«(3=>1,1=>1,2=>1).MixHash␤»
dogbert17 AlexDaniel: haven't you read the docs :)
psch its kinda like a SetHash but with different-than-one for the values i think? 13:54
well, "not only 1"*
AlexDaniel :o
dogbert17 the doc page for Baggy is a bit pathetic atm 13:55
AlexDaniel ok, so *Hash is mutable while just * is immutable 13:56
dogbert17 yes
AlexDaniel why not call it BagMut or something, uh… nevermind
dogbert17 maybe BagWomble 13:57
AlexDaniel then we hav Bag and Mix, and the difference is just that Bag has int weights and Mix has non-int weights
have*
psch m: (new BagHash: a => .5).perl.say 13:58
camelia rakudo-moar 9cfcb9: OUTPUT«().BagHash␤»
psch m: (new MixHash: a => .5).perl.say
camelia rakudo-moar 9cfcb9: OUTPUT«().MixHash␤»
psch m: (new MixHash: 1 => .5).perl.say
camelia rakudo-moar 9cfcb9: OUTPUT«(1 => 0.5=>1).MixHash␤»
AlexDaniel what
psch m: my $x = new MixHash: 5; $x<5> = .5; say $x.perl
camelia rakudo-moar 9cfcb9: OUTPUT«(5=>1,IntStr.new(5, "5")=>0.5).MixHash␤»
AlexDaniel m: say ("b" => 9, "b" => 2).Mix.perl;
camelia rakudo-moar 9cfcb9: OUTPUT«("b"=>11).Mix␤»
psch m: my $x = new MixHash: 5; $x{5} = .5; say $x.perl # actually... 13:59
camelia rakudo-moar 9cfcb9: OUTPUT«(5=>0.5).MixHash␤»
AlexDaniel m: say ("b" => 9.5, "b" => 2).Mix.perl;
camelia rakudo-moar 9cfcb9: OUTPUT«("b"=>11.5).Mix␤»
AlexDaniel m: say ("b" => 9.5, "b" => 2).Bag.perl;
camelia rakudo-moar 9cfcb9: OUTPUT«Type check failed in assignment; expected Int but got Rat (9.5)␤ in block <unit> at /tmp/FVTFGKm1gM line 1␤␤»
psch .new threw me for a loop there
m: (new MixHash: %(1 => .5)).perl.say
camelia rakudo-moar 9cfcb9: OUTPUT«("1" => 0.5=>1).MixHash␤»
psch well, not like that either apparently vOv
AlexDaniel m: my $n = ("b" => 9, "b" => 2).MixHash; say $n.grab 14:00
camelia rakudo-moar 9cfcb9: OUTPUT«.grab is not supported on a MixHash␤ in block <unit> at /tmp/M4HRsHFGcq line 1␤␤Actually thrown at:␤ in block <unit> at /tmp/M4HRsHFGcq line 1␤␤»
14:01 skids joined 14:05 girafe joined, ptolemarch joined
dalek c: 2bd9117 | (Jan-Olof Hendig)++ | doc/Type/Baggy.pod:
Added docs for Baggy.elems
14:05
14:15 rurban left
AlexDaniel dogbert17: the graph here is not very promising :) github.com/perl6/doc/issues/561 14:20
14:23 Praise left, Praise joined, Praise left, Praise joined
dalek c: 6f028bd | (Aleks-Daniel Jakimenko-Aleksejev)++ | lib/Pod/Htmlify.pm6:
Shorter commit SHA on doc footer

Fixes #578
14:27
[Coke] what browser are we trying to support by providing png support in addition to svg support on the docs site, OOC? 14:33
just wondering if we can remove one of the moving parts.
dalek c: ee767e6 | (Aleks-Daniel Jakimenko-Aleksejev)++ | lib/Pod/Htmlify.pm6:
Shorter date on doc footer
14:34
dogbert17 AlexDaniel: indeed, numbers actually got worse after fixing a bunch of 404's
[Coke] docs - we are inconsistent in adding ␤ in the comment showing what the output of something was.
e.g. :
say 42.WHICH eq 42.WHICH; # True
vs.
say 42; # 42␤
I would recommend just removing ␤ - it's not adding value, IMO 14:35
dogbert17 [Coke]: i'm afraid I'm one of the culprits :(
[Coke] if we do feel it's adding value, write up something and note it in the contributions guidelines.
14:35 _mg_ left 14:36 ZoffixW joined
[Coke] is it desirable on docs that we have a max column width for the docs? 14:37
14:37 rurban joined
ZoffixW [Coke], pngs can be dropped IMO. They were likely added 'cause IE8 wasn't supporting it, but it's been EOLed by Microsoft since January. Everything else supports it: caniuse.com/#feat=svg 14:37
dogbert17 [Coke]: I agree, it doesn't add any value IMHO
AlexDaniel keep PNGs please 14:38
[Coke] AlexDaniel: ok, but why?
ZoffixW [Coke], [max column] yes, the lines would be a tad too long on my 1440p 27" monitor :P 14:39
But to that point, I noticed on mobile the margins are way too fat.
AlexDaniel [Coke]: because my text-based browser does not display SVGs 14:40
ZoffixW AlexDaniel, does it display PNGs?
AlexDaniel ZoffixW: yes
ZoffixW AlexDaniel, what browser is it?
AlexDaniel ZoffixW: w3m
ZoffixW: you need a terminal with support for images though
ZoffixW :/ 14:41
DrForr Sounds like a cruel way to cheat with aalib+doom :)
AlexDaniel but even if you don't care about text-based browsers there's still IE 8
DrForr Oh, that'd be interesting. regular aa text on the back layer and a cropped image of the original Doom app somewhere embedded. 14:42
AlexDaniel don't remove features that are already there
[Coke] AlexDaniel: no, there is not still IE8. :P 14:43
ZoffixW No, there isn't IE8. We support it neither in our support policy nor should we, because it's no longer secure.
I have nothing against keeping PNGs for text browsers. I mean, we do have an actual user right here :)
b2gills
.oO( was IE8 ever secure )
14:44
[Coke] if you can't use your text based browser directly for pngs, I'm not sure that counts as a reason, either. if there was a standalone svg file, would that suffice?
AlexDaniel where does that need to remove pngs comes from again? 14:45
what are you trying to solve by removing one of the potentially useful features?
b2gills Does anyone know if it is simple to use only some of the candidates for multi tokens in a grammar? 14:46
[Coke] Because we have limited resources - if we can remove a thing that requires support, it's one less thing for us to deal with
AlexDaniel how much resources does png generation take?
[Coke] I am ok with leaving it in, if we have one contributor who needs it for local development. That's fine.
AlexDaniel: dead code is best code
b2gills removed dead code is best code 14:47
[Coke] It slows down local development.
b2gills: yes, thanks you for clearly up my sloppy sentiment there.
14:48 wamba left
AlexDaniel [Coke]: OK, if you make these SVGs external then it's probably good enough 14:48
right now it is inlined, which hurts a lot actually 14:49
e.g. I can't even zoom it properly in firefox
[Coke] In general, I like inline (except for Any); having separate .svg external links alongside the .pngs would be a nice to have, aye 14:50
14:50 ZoffixW left
b2gills
.oO( r̶e̶m̶o̶v̶e̶d̶ exterminated dead code is the best code )
14:51
14:51 mohae joined
DrForr waits for the inevitable dalek checkin :) 14:51
AlexDaniel [Coke]: ok, so both shortened commit hash and shortened date are now live
14:51 rurban1 joined
AlexDaniel [Coke]: any other issues with the footer? 14:51
14:52 FROGGS joined, rurban left 14:54 huggable left
[Coke] AlexDaniel: Artistic License 2.0 should be a link to same. 14:56
copyright should be spelled: 14:57
AlexDaniel [Coke]: well, that's the file to edit :) github.com/perl6/doc/blob/147a284c...ooter.html
[Coke] ©
gregf_ hello 14:58
[Coke] ... Yes, I can make the edits myself, but then why ask?
gregf_: hello
gregf_ role Foo { method should_be_able_to_access_ivars(){ say $!bar; }}; class FooImpl does Foo { has $.bar is rw; } <== should this not work?
[Coke] Thanks for fixing the ones I opened tickets for.
AlexDaniel [Coke]: thought that there would be something slightly more complicated
[Coke] m: role Foo { method should_be_able_to_access_ivars(){ say $!bar; }}; class FooImpl does Foo { has $.bar is rw; }
camelia rakudo-moar 9cfcb9: OUTPUT«5===SORRY!5=== Error while compiling /tmp/i9VUPXVzJO␤Attribute $!bar not declared in role Foo␤at /tmp/i9VUPXVzJO:1␤------> 3be_able_to_access_ivars(){ say $!bar; }}7⏏5; class FooImpl does Foo { has $.bar is ␤ expecting any of:␤ …»
psch m: role Foo { method should_be_able_to_access_ivars(){ say $!bar; }}; class FooImpl does Foo { has $.bar is rw; }
camelia rakudo-moar 9cfcb9: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Pgx3D7sJoV␤Attribute $!bar not declared in role Foo␤at /tmp/Pgx3D7sJoV:1␤------> 3be_able_to_access_ivars(){ say $!bar; }}7⏏5; class FooImpl does Foo { has $.bar is ␤ expecting any of:␤ …»
psch argh
[Coke] heh
psch m: role Foo { method should_be_able_to_access_ivars(){ say $.bar; }}; class FooImpl does Foo { has $.bar is rw; } 14:59
camelia ( no output )
psch didn't mean to copy the \n, but apparently did..? vOv
[Coke] the role has to compile by itself first, so that seems correct
psch gregf_: the ! twigil means the Attribute. the . twigil means the (potentially auto-generated) accessor
gregf_ m: role Foo { method should_be_able_to_access_ivars(){ say $.bar; }}; class FooImpl does Foo { has $.bar is rw; }; Foo.new(:bar(100)).should_be_able_to_access_ivars()
camelia rakudo-moar 9cfcb9: OUTPUT«Method 'bar' not found for invocant of class 'Foo'␤ in method should_be_able_to_access_ivars at /tmp/N9TQv_Q1d7 line 1␤ in block <unit> at /tmp/N9TQv_Q1d7 line 1␤␤»
gregf_ psch: ah - i see 15:00
wow, such subtle differences :)
psch yeah, it compiles but still doesn't find the method
m: role R { method bar { $.b } }; class C does R { has $.b is rw }; C.new(:2b).bar.say 15:01
camelia rakudo-moar 9cfcb9: OUTPUT«2␤»
gregf_ correct, but it should i guess ?
psch well, i can't see through your long names :P
gregf_ heh
*just so that im clear in making my point* :) 15:02
psch gregf_: oh, you instantiated Foo, not FooImpl
gregf_ ah - good catch
oh so :b(100) and :100b are the same 15:03
o_O
psch gregf_: well, it's neat for e.g. s///
m: $_ = "foo"; s:2nd/o/u/; .say
camelia rakudo-moar 9cfcb9: OUTPUT«fou␤»
gregf_ my, that took me a while to figure out :) 15:04
psch m: Date.today.later(:2days)
camelia ( no output )
psch m: Date.today.later(:2days).say
camelia rakudo-moar 9cfcb9: OUTPUT«2016-06-12␤»
psch or that
gregf_ m: say CORE::.keys.grep(/nd/) 15:05
camelia rakudo-moar 9cfcb9: OUTPUT«(&append &prepend &infix:<notandthen> &rindex &indir &rand &indices IterationEnd &trait_mod:<handles> &infix:<and> PositionalBindFailover &METAOP_TEST_ASSIGN:<andthen> &roundrobin &index &infix:<andthen> &undefine &find-reducer-for-op &srand &round &end Se…»
psch m: say later Date.today : :2days : # heh
camelia rakudo-moar 9cfcb9: OUTPUT«2016-06-12␤»
gregf_ psch++ 15:06
[Coke]++
15:08 zakharyas left
gregf_ m: $_ = "foofoo"; s:5th/o/u/; .say 15:09
camelia rakudo-moar 9cfcb9: OUTPUT«foofoo␤»
psch m: $_ = "foofoo"; s:3th/o/u/; .say
camelia rakudo-moar 9cfcb9: OUTPUT«foofuo␤»
psch m: $_ = "foofoo"; s:2x/o/u/; .say
camelia rakudo-moar 9cfcb9: OUTPUT«fuufoo␤»
15:10 zakharyas joined
psch gregf_: see doc.perl6.org/routine/subst 15:10
(although apparently :$st, :$nd, and :$rd are undocumented)
15:10 bbkr joined, Zero_Dogg left
gregf_ oh, thats just sugar for subst? 15:10
psch well, actually s/// is subst-rw, and S/// is subst iirc 15:11
15:11 Zero_Dogg joined
gregf_ rw as in it modifies the string? 15:11
bbkr hi. any idea why successful test suite is treated by Travis-CI as failed? travis-ci.org/bbkr/GeoIPerl6/builds/99810697
gregf_ anyways psch++ 15:12
psch bbkr: i see "Failed tests: 2-3" and "Done. Your build exited with 1.", which seems to indicate failure..?
[Coke] bbkr: it's not successful? you failed 2 subtests?
psch as for what failed: floating pointyness, i'd guess from a distance 15:13
bbkr damn, I see two different results on two different browsers. something is messed with session probably :) 15:14
bbkr.org/travisvci.png 15:16
FROGGS o/
psch o/ FROGGS 15:17
15:18 bbkr left
timeless did BenGoldberg find a version of use Nativall ... sub waitpid that worked? 15:18
m: use NativeCall; sub fork returns int32 is native { * }; sub waitpid(int32, Pointer[int32], int32) returns int32 is native {*}; my $x = fork; if ( $x ) { my $p = 42; waitpid( $x, Pointer[int32].new($p.WHERE), 1 ); say $p } else { say "hi" } 15:19
camelia rakudo-moar 9cfcb9: OUTPUT«hi␤42␤»
timeless this doesn't look like what we're expecting 15:20
m: use NativeCall; sub fork returns int32 is native { * }; sub waitpid(int32, int32 is rw, int32) returns int32 is native { * }; my $x=fork; say "hi" if ($x == 0); if ($x) {my int32 $p; my $z = waitpid($x, $p, 1); say $p; }
camelia rakudo-moar 9cfcb9: OUTPUT«hi␤0␤» 15:21
timeless hopes that "is" the correct answer, but isn't really sure how to figure it out
actually, i think what i really want to know is how to properly use `try` to conditionally define something :/ 15:22
psch m: my $x = do { try "foo" + 2 } // 10; say $x; $x = do { try "2" + 2 } // 10; say $x 15:24
camelia rakudo-moar 9cfcb9: OUTPUT«10␤4␤»
psch timeless: ^^^ like that maybe?
15:24 mst is now known as {[{[{[{[, {[{[{[{[ is now known as mst 15:25 _mg_ joined
[Coke] docs.perl6.org/language/traps has several perl 5 specific traps that should be in 5-6 instead. 15:25
timeless try { sub waitpid(int32, int32 is rw, int32) returns int32 is native { * }; CATCH { when X::AdHoc { sub waitpid() { return -1; }}} $waitpid = waitpid;
psch: something like this ^ (which doesn't work at all)
b2gills (10:27:28 AM) b2gills: m: use NativeCall; sub fork returns int32 is native { * }; sub waitpid(int32, int32 is rw, int32) returns int32 is native {*}; if fork() -> $x { my int32 $p = 42; waitpid( $x, $p, 0 ); say $p } else { say "hi"; exit 0 } 15:26
(10:27:28 AM) b2gills: m: use NativeCall; sub fork returns int32 is native { * }; sub waitpid(int32, int32 is rw, int32) returns int32 is native {*}; if fork() -> $x { my int32 $p = 42; waitpid( $x, $p, 0 ); say $p } else { say "hi"; exit 1 }
m: use NativeCall; sub fork returns int32 is native { * }; sub waitpid(int32, int32 is rw, int32) returns int32 is native {*}; if fork() -> $x { my int32 $p = 42; waitpid( $x, $p, 0 ); say $p } else { say "hi"; exit 0 } 15:27
m: use NativeCall; sub fork returns int32 is native { * }; sub waitpid(int32, int32 is rw, int32) returns int32 is native {*}; if fork() -> $x { my int32 $p = 42; waitpid( $x, $p, 0 ); say $p } else { say "hi"; exit 1 }
camelia rakudo-moar 9cfcb9: OUTPUT«hi␤0␤»
rakudo-moar 9cfcb9: OUTPUT«hi␤256␤»
timeless oh, right, exit, thanks b2gills