Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2016-08-01

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:05 bjz joined #perl6
00:11 gfldex m: role R {}; sub f(R $r){ dd $r}; my Int $v = 1 but R; f($v);
00:11 camelia rakudo-moar fa84f1: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Calling f(Int) will never work with declared signature (R $r)␤at <tmp>:1␤------> 3b f(R $r){ dd $r}; my Int $v = 1 but R; 7⏏5f($v);␤»
00:11 gfldex should that work?
00:12 gfldex m: role R {}; sub f($r){ dd $r}; my Int $v = 1 but R; f($v); dd $v, $v ~~ R;
00:12 camelia rakudo-moar fa84f1: OUTPUT«Int+{R} $r = 1␤Int+{R} $v = 1␤Bool::True␤»
00:16 BenGoldberg bisectable, m: my (::N); N::x
00:16 bisectable BenGoldberg: On both starting points (good=2015.12 bad=fa84f13) the exit code is 1 and the output is identical as well
00:16 bisectable BenGoldberg: Output on both points: Cannot call method 'AT-KEY' on a null object␤  in block <unit> at /tmp/sPmv84pXBd line 1␤
00:20 cdg joined #perl6
00:20 captain-adequate joined #perl6
00:21 BenGoldberg bisectable, m: role Foo[$x] { }; say Foo[42].WHO.^name
00:21 bisectable BenGoldberg: On both starting points (good=2015.12 bad=fa84f13) the exit code is 0 and the output is identical as well
00:21 bisectable BenGoldberg: Output on both points: VMNull
00:23 BenGoldberg m: say chr 2**63
00:23 camelia rakudo-moar fa84f1: OUTPUT«␀␤»
00:23 BenGoldberg m: say chr 2**63-2
00:23 camelia rakudo-moar fa84f1: OUTPUT«chr codepoint cannot be negative␤  in block <unit> at <tmp> line 1␤␤»
00:24 BenGoldberg m: multi sub cross() { }
00:24 camelia rakudo-moar fa84f1: ( no output )
00:24 BenGoldberg bisectable, multi sub cross() { }
00:24 bisectable BenGoldberg: On both starting points (good=2015.12 bad=fa84f13) the exit code is 0 and the output is identical as well
00:24 bisectable BenGoldberg: Output on both points:
00:25 BenGoldberg bisectable, m: for 0..0xffff -> $i { say $i if $i %% 100; my $c = try { :16(uniprop($i.chr, "Bidi_Mirroring_Glyph")).chr }; say "{$i.fmt("%04x")}: {$i.chr} ~ $c" if $c.defined}
00:26 bisectable BenGoldberg: On both starting points (good=2015.12 bad=fa84f13) the exit code is 0 and the output is identical as well
00:26 bisectable BenGoldberg: https://gist.github.com/e95d4d857b72a3228436239d74d3a598
00:26 BenGoldberg m: for 0..0xffff -> $i { say $i if $i %% 100; my $c = try { :16(uniprop($i.chr, "Bidi_Mirroring_Glyph")).chr }; say "{$i.fmt("%04x")}: {$i.chr} ~ $c" if $c.defined}
00:26 camelia rakudo-moar fa84f1: OUTPUT«(signal SEGV)0␤100␤200␤»
00:29 AlexDaniel commit releases for 0..0xffff -> $i { say $i if $i %% 100; my $c = try { :16(uniprop($i.chr, "Bidi_Mirroring_Glyph")).chr }; say "{$i.fmt("%04x")}: {$i.chr} ~ $c" if $c.defined}
00:30 AlexDaniel ah right
00:30 AlexDaniel commit: releases for 0..0xffff -> $i { say $i if $i %% 100; my $c = try { :16(uniprop($i.chr, "Bidi_Mirroring_Glyph")).chr }; say "{$i.fmt("%04x")}: {$i.chr} ~ $c" if $c.defined}
00:30 committable AlexDaniel: https://gist.github.com/539428256414be39c0bc9716bfa35e69
00:31 AlexDaniel BenGoldberg: bisectable does not catch SEGVs properly yet :(
00:32 AlexDaniel … especially when they are fixed?
00:32 BenGoldberg But not fixed for camelia?
00:32 AlexDaniel m: for 0..0xffff -> $i { say $i if $i %% 100; my $c = try { :16(uniprop($i.chr, "Bidi_Mirroring_Glyph")).chr }; say "{$i.fmt("%04x")}: {$i.chr} ~ $c" if $c.defined}
00:32 camelia rakudo-moar fa84f1: OUTPUT«(signal SEGV)0␤100␤200␤»
00:32 AlexDaniel commit: HEAD for 0..0xffff -> $i { say $i if $i %% 100; my $c = try { :16(uniprop($i.chr, "Bidi_Mirroring_Glyph")).chr }; say "{$i.fmt("%04x")}: {$i.chr} ~ $c" if $c.defined}
00:32 committable AlexDaniel: ¦«HEAD»: 0␤100␤200 «exit signal = SEGV (11)»
00:32 AlexDaniel ah
00:32 tbrowder left #perl6
00:34 AlexDaniel MasterDuke: am I reading that incorrectly or does the one above say that it is OK on HEAD?
00:34 AlexDaniel MasterDuke: I mean this one: https://gist.github.com/Whateverable/539428256414be39c0bc9716bfa35e69
00:34 AlexDaniel MasterDuke: I mean, if it does, then it's a bug :)
00:56 araujo__ joined #perl6
01:02 FROGGS_ joined #perl6
01:26 rburkholder joined #perl6
01:31 cyphase joined #perl6
01:34 labster joined #perl6
01:34 kalkin-_ joined #perl6
01:47 ilbot3 joined #perl6
01:47 Topic for #perl6 is now »ö« Welcome to Perl 6! | https://perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:,  or /msg camelia p6: ... | irclog: http://irc.perl6.org or http://colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
01:57 wamba joined #perl6
02:00 stanrifkin joined #perl6
02:10 kaare__ joined #perl6
02:12 konobi .tell pmurias well, es6 has support on all modern browsers... though a few still have aspects that aren't implementent yet. Thankfully we can use babel to transpile from pure es6 to es5, or combo of es5/es6 for different browsers support (or use polyfills)
02:12 yoleaux konobi: I'll pass your message to pmurias.
02:12 yoleaux 31 Jul 2016 19:31Z <pmurias> konobi: I'm applying your refactoring piece by piece as there was a bit of things that where breaking stuff and also I prefer run the tests after relatively small changes rather then debug complex interactions
02:13 konobi .tell pmurias yup... it had all been working up until a small change around code-ref/core/sixmodel =0(
02:13 yoleaux konobi: I'll pass your message to pmurias.
02:14 djbkd joined #perl6
02:30 konobi .tell pmurias i have a feeling it might be due to a missunderstanding somewhere of how the 'this' keyword works
02:30 yoleaux konobi: I'll pass your message to pmurias.
02:34 noganex_ joined #perl6
02:38 rmmm joined #perl6
02:57 mcmillhj joined #perl6
03:03 geekosaur dalek pinged out about 8 hours ago...
03:09 MasterDuke BenGoldberg: FYI, you were calling bisectable with an 'm: ' in front of your code. it should actually be valid Perl 6 (the 'm: ' will just be a label), but it's probably not what you intended
03:10 MasterDuke AlexDaniel: yeah, something seems off there
03:11 mcmillhj joined #perl6
03:24 mcmillhj joined #perl6
03:27 harmil Think I found my problem with an attribute becoming the type, Callable, but not sure why...
03:27 harmil m: class NotComposed { has &.func = ~*; }; class IsRat does Rational[Int,Int] { has &.func = ~* }; class IsReal does Real { has &.func = ~* }; say "In NotComposed, func={NotComposed.new.func.perl}"; say "In IsRat, func={IsRat.new.func.perl}"; say "In IsReal, func={IsReal.new.func.perl}"
03:27 camelia rakudo-moar fa84f1: OUTPUT«In NotComposed, func={ ... }␤In IsRat, func=Callable␤In IsReal, func={ ... }␤»
03:28 harmil It seems that any class that does Rational has its callable attributes munged.
03:29 * geekosaur thinks that looks like a rakudobug...
03:30 harmil Yeah, I was just checking to see if I was doing something stupid before sending email
03:38 mcmillhj joined #perl6
03:51 njmurphy joined #perl6
04:14 mcmillhj joined #perl6
04:28 finanalyst joined #perl6
04:30 mcmillhj joined #perl6
04:43 Cabanossi joined #perl6
04:45 mcmillhj joined #perl6
04:49 andrzejku joined #perl6
04:57 mcmillhj joined #perl6
04:58 jeek joined #perl6
05:00 labster joined #perl6
05:06 andrzejku hi :)
05:09 agent_white joined #perl6
05:10 holyghost hello
05:12 andrzejku I am looking for Perl friend
05:13 mcmillhj joined #perl6
05:14 holyghost try #perl
05:15 holyghost lots of good mainframe basic dude around here :-)
05:15 andrzejku ok
05:15 holyghost s/dude/dudes
05:15 andrzejku thank you
05:16 NEveD joined #perl6
05:18 andrzejku holyghost, you are very good
05:19 abraxxa joined #perl6
05:32 mcmillhj joined #perl6
05:35 rburkholder joined #perl6
05:40 ufobat joined #perl6
05:45 mcmillhj joined #perl6
05:47 Zoffix joined #perl6
05:56 perlawhilrl joined #perl6
06:02 Novell joined #perl6
06:02 Woodi joined #perl6
06:02 mcmillhj joined #perl6
06:06 jonas2 joined #perl6
06:08 freeside joined #perl6
06:09 TimToady joined #perl6
06:16 mcmillhj joined #perl6
06:22 Khisanth joined #perl6
06:26 bob777 joined #perl6
06:31 firstdayonthejob joined #perl6
06:41 bob777 joined #perl6
06:59 moritz \o
06:59 Zoffix o/
07:02 darutoko joined #perl6
07:06 ufobat hello :-)
07:07 Woodi hi today :)
07:10 Woodi I wonder what unmapped memory is... FreeBSD got patch that improves mem performance 35% - 135%  https://reviews.freebsd.org/D7195  do they just removed we-have-infinity-lot-of-memory layer ?
07:12 moritz "this can improve the performance 1.35X ~ 2.35x for FIO on hyperv."
07:12 moritz what is FIO?
07:22 Woodi file IO ?
07:24 Woodi probably this  https://wiki.mikejung.biz/Benchmarking
07:28 zakharyas joined #perl6
07:29 pdcawley joined #perl6
07:36 Zoffix New blog post "Hacking on The Rakudo Perl 6 Compiler: Mix Your Fix": http://perl6.party/post/Hacking-on-Rakudo-Perl-6-Compiler-Mix-Your-Fix
07:40 CIAvash joined #perl6
07:46 mcmillhj joined #perl6
07:53 cibs joined #perl6
07:53 dakkar joined #perl6
07:59 moritz Zoffix: you seem to be unaware of local ettiquette. It's called "lol I blug" here :-)
08:03 mcmillhj joined #perl6
08:06 salva_ joined #perl6
08:06 sno joined #perl6
08:19 RabidGravy joined #perl6
08:22 mcmillhj joined #perl6
08:57 mcmillhj joined #perl6
09:01 ab6tract joined #perl6
09:04 ab6tract good *, #perl6
09:04 ab6tract i ran into something interesting while working on the Sereal port last Friday
09:05 ab6tract an array of Nums failed to smartmatch against an array of equivalent Rats
09:05 ab6tract calling .perl.EVAL on the array of Nums would make the smart match work
09:06 ab6tract i'm not sure how to craft a minimal example for this, because every approach i have used to reproduce would Just Work, except for the original test case based on a real Sereal blob
09:10 ab6tract eg: "    not ok 3 - ARRAY -- got: $[1.23e0, 4.56e0, 7.89e0]expected: $[1.23, 4.56, 7.89]"
09:10 ab6tract m: say  $[1.23e0, 4.56e0, 7.89e0] ~~ $[1.23, 4.56, 7.89]
09:10 camelia rakudo-moar 4b934d: OUTPUT«True␤»
09:10 ab6tract so, wtf?
09:14 spider-mario joined #perl6
09:16 bjz joined #perl6
09:17 xinming_ joined #perl6
09:21 ab6tract too early for the heavy questions, maybe?
09:25 moritz ab6tract: what types do you get there?
09:25 moritz ab6tract: are these "vanilla" Array objects, or parameterized? (Array[Num] or so)?
09:26 ab6tract moritz: they are vanilla. the data gets encoded in Sereal as a double and gets read back out through a C function that casts to double (NativeCall return type specified as num64)
09:26 mcmillhj joined #perl6
09:27 ab6tract JSON::Tiny and JSON::Fast don't seem to support Nums, and only pass back Rats (the expected result is saved into a json file when generating the corpus of Sereal files (p5 script))
09:27 moritz m: my num64 $n = 1e1; say [$n] ~~ [1e1]
09:27 camelia rakudo-moar 4b934d: OUTPUT«True␤»
09:28 moritz m: my num64 $n = 1e1; say [$n] ~~ [10.0]
09:28 camelia rakudo-moar 4b934d: OUTPUT«True␤»
09:28 ab6tract moritz: indeed. exactly as happens to me: any attempt to get a non-ok result from  $[1.23e0, 4.56e0, 7.89e0] ~~ $[1.23, 4.56, 7.89] fails
09:28 ab6tract and even calling .perl.EVAL on the object (should be a no-op, correct) makes it pass
09:33 ab6tract so it's unclear how to even create a portable test case
09:34 ab6tract i can work around it by calling .Str.Rat on the result from the read_double C call
09:34 ab6tract (custom function we wrote for getting doubles out of a blob)
09:34 kurahaupo joined #perl6
09:35 ab6tract but that feels very much like a hack, because the expression works fine when i type it in manually!
09:35 moritz ab6tract: can you get a minimal example that mimics the double extraction?
09:35 moritz s/get/produce/
09:39 mcmillhj joined #perl6
09:39 ab6tract without the underlying C code?
09:40 ab6tract was just about to try it with pack/unpack, but it doesn't seem to support nums yet
09:49 mcmillhj joined #perl6
09:53 psch m: use NativeCall; sub fabs(num64 $) is native {*}; my $x = fabs(1e1); say [$x] ~~ [10.0]
09:53 camelia rakudo-moar 4b934d: OUTPUT«False␤»
09:54 psch m: use NativeCall; sub fabs(num64 $) is native {*}; my $x = fabs(1e1); say [$x] ~~ [10.0]; say $x
09:54 camelia rakudo-moar 4b934d: OUTPUT«False␤(Mu)␤»
09:54 ab6tract psch: lol, why didn't i think of that
09:54 psch m: use NativeCall; sub fabs(num64 $) is native returns num64 {*}; my $x = fabs(1e1); say [$x] ~~ [10.0]; say $x
09:54 camelia rakudo-moar 4b934d: OUTPUT«True␤10␤»
09:54 psch ab6tract: no idea :)
09:54 ab6tract damnit, same issue
09:54 ab6tract fuck
09:55 ab6tract so, that doesn't actually help in the end
09:55 psch well, it does help insofar the its probably not NC directly
09:55 psch s/the/that/
09:56 ab6tract the C code just does a memcpy from the relevant buf and it's return values are consistent with the inputs
10:00 ab6tract what really gets my goat is the .perl.EVAL part...
10:02 mcmillhj joined #perl6
10:04 psch m: use NativeCall; sub fabs(num32 $) is native returns num32 {*}; my $x = fabs(1e1); say [$x] ~~ [10.0]; say $x
10:05 camelia rakudo-moar 4b934d: OUTPUT«True␤10␤»
10:05 psch well, definitely weird :)
10:10 ab6tract i've noticed that other serialization libs just do .Str.Rat
10:11 ab6tract i was wondering if that is based on consensus for a best approach or..
10:12 psch m: use nqp; use NativeCall; sub fabs(num32 $) is native returns num32 {*}; my $x = fabs(1e1); say nqp::what($x)
10:12 camelia rakudo-moar 4b934d: OUTPUT«(Num)␤»
10:13 ab6tract m: use nqp; use NativeCall; sub fabs(num32 $) is native returns num32 {*}; say nqp::what( fabs(1e1) )
10:13 camelia rakudo-moar 4b934d: OUTPUT«(Num)␤»
10:14 psch i guess that also boxes on moar..?
10:14 mcmillhj joined #perl6
10:15 tx0h_ joined #perl6
10:16 ab6tract psch: sorry, how do you mean?
10:16 psch ab6tract: well, the native sub returns a native type
10:16 psch ab6tract: but Num isn't
10:17 psch fwiw, i'm not sure r-j does it differently - we can't really have a WHAT for native types i think
10:17 ab6tract right, yeah
10:17 psch j: use nqp; say nqp::what(my num32 $ = 1e1)
10:17 camelia rakudo-jvm cd19db: OUTPUT«(Num)␤»
10:18 ab6tract this actually makes sense to me
10:18 ab6tract as otherwise you would never have a solid way to get the value into anything else
10:18 ab6tract since you can't call a coercion method on an unboxed
10:19 timotimo i inputted my password wrong 2 times and now it seems like i'm getting to wait for an hour before i'm allowed to try again?
10:19 cpage_ joined #perl6
10:20 timotimo oh ...
10:20 timotimo dalek died again
10:20 timotimo no, i mean
10:20 timotimo hack.p6c.org died again
10:20 psch oh
10:20 psch i logged in like 20 minutes ago
10:20 psch $ uptime 10:20:38 up 25 days, 17:15,  4 users,  load average: 6409.08, 6379.62, 6306.41
10:20 timotimo yeah
10:21 psch that i think is a record..?
10:21 timotimo *shrug*
10:21 timotimo i'm going to force-kill hack
10:22 moritz timotimo: thank you
10:23 timotimo no need for thanks
10:23 dalek joined #perl6
10:23 synopsebot6 joined #perl6
10:23 timotimo ... if only we could figure out what makes the virtual discs freak out like that?
10:23 TEttinger maybe thanking people fixes it but only temporarily
10:24 timotimo makes sense
10:24 moritz TEttinger: more permanent solutions would be very welcome, yes
10:24 TEttinger and saying "thank you" actually reduces the reliability of the discs. clearly we need to switch to "cheerio, guvnah!"
10:25 ab6tract psch: here's the C code -- https://github.com/ab5tract/Sereal/blob/perl6/Perl6/ext/decode.c#L86
10:25 ab6tract and here's the sereal decoder -- https://github.com/ab5tract/Sereal/blob/perl6/Perl6/lib/Sereal/Decoder.pm6#L64
10:25 ab6tract just in case you get curious :)
10:26 pmurias joined #perl6
10:26 moritz TEttinger: why do I get the distinct feeling you're trolling?
10:28 timotimo not trolling, just making light of the situation
10:29 rindolf joined #perl6
10:33 TEttinger if I was trolling it would be a very different sense
10:33 TEttinger joking is more transparent
10:33 TEttinger trolling might be,
10:34 TEttinger hey can perl6 help me find this one prime number, it's like my favorite but I forgot it and it's 4242 decimal places
10:35 TEttinger which would be followed by attempts at guessing primes and returned with "no, not it"
10:35 cdg joined #perl6
10:38 moritz I guess I just don't appreciate your sense of humor, then
10:39 TEttinger that's fine. I don't have a great one
10:39 TEttinger I'm also very sleepy
10:39 TEttinger good night
10:39 moritz sleep well, and dream of an improved sense of humor
10:39 TEttinger oh, long running process
10:39 TEttinger this thing will stay online, watching, judging, in silence
10:43 bob777 joined #perl6
10:43 canopus joined #perl6
10:44 mcmillhj joined #perl6
10:58 mcmillhj joined #perl6
11:09 mcmillhj joined #perl6
11:10 tbrowder joined #perl6
11:14 tbrowder left #perl6
11:15 CIAvash joined #perl6
11:28 mcmillhj joined #perl6
11:45 ab6tract the intrigue continues... if I call .Str.Num on the num64 it *also* passes the smartmatch
11:46 ab6tract of course, smart match is not all that intelligent about arrays, so what one really wants to use is is-deeply
11:47 ab6tract which fails when comparing Nums to Rats
11:47 ab6tract m: use Test; is-deeply [1.1e0], [1.1], "the same?";
11:47 camelia rakudo-moar 4b934d: OUTPUT«not ok 1 - the same?␤␤# Failed test 'the same?'␤# at <tmp> line 1␤# expected: $[1.1]␤#      got: $[1.1e0]␤»
11:48 mcmillhj joined #perl6
11:48 ab6tract m: say [ [], [], [] ] ~~ [ [], [ [] ], [] ]
11:48 camelia rakudo-moar 4b934d: OUTPUT«True␤»
11:49 ab6tract m:  [ [], ['a'], [] ] ~~ [ [], [ ['a'] ], [] ]
11:49 camelia rakudo-moar 4b934d: ( no output )
11:49 ab6tract m: say  [ [], ['a'], [] ] ~~ [ [], [ ['a'] ], [] ]
11:49 camelia rakudo-moar 4b934d: OUTPUT«True␤»
11:50 ab6tract wow... is-deeply agrees with smartmatch here
11:50 ab6tract great
11:50 masak m: say @?INC
11:50 camelia rakudo-moar 4b934d: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Variable '@?INC' is not declared␤at <tmp>:1␤------> 3say 7⏏5@?INC␤»
11:50 masak no @?INC ?
11:51 masak do S11 and S28 need an update? or will @?INC come back?
11:51 cyphase joined #perl6
11:51 ilmari m: say $*REPO.repo-chain
11:51 camelia rakudo-moar 4b934d: OUTPUT«(inst#/home/camelia/.perl6 inst#/home/camelia/rakudo-m-inst-2/share/perl6/site inst#/home/camelia/rakudo-m-inst-2/share/perl6/vendor inst#/home/camelia/rakudo-m-inst-2/share/perl6 CompUnit::Repository::AbsolutePath.new(next-repo => CompUnit::Repository::NQ…»
11:52 masak I just wanted to know whether '.' was in @?INC (which I guess it's not)
11:53 ilmari there's no '.' my $*REPO.repo-chain
11:53 aries_liuxueyang joined #perl6
11:53 ilmari AFAICT
11:56 jnthn No, @?INC won't come back :)
11:57 jnthn You'd have to use lib '.' to get the cwd into the repo chain
11:57 masak I just wanted to check that it wasn't there by default
11:58 ilmari and I see 'use lib'  resolves it to an absoulte path at use time, unlike perl5
12:01 ab6tract m: my @a = [ [], ['a'], [] ]; my @b =  [ [], [ ['a'] ], [] ]; say @a ~~ @b; use Test; is-deeply @a, @b, "how are these the same?"
12:01 camelia rakudo-moar 4b934d: OUTPUT«True␤ok 1 - how are these the same?␤»
12:01 ab6tract why is it that i always manage to use p6 in a way that shows weird and disturbing seams?
12:04 masak m: say [ ['a'] ].perl
12:04 camelia rakudo-moar 4b934d: OUTPUT«["a"]␤»
12:04 masak ab6tract: it's the one-element rule you're encountering
12:04 masak m: my @a = [ [], ['a'], [] ]; my @b =  [ [], [ ['a'], ], [] ]; say @a ~~ @b; use Test; is-deeply @a, @b, "how are these the same?"
12:04 camelia rakudo-moar 4b934d: OUTPUT«False␤not ok 1 - how are these the same?␤␤# Failed test 'how are these the same?'␤# at <tmp> line 1␤# expected: $[[], [["a"],], []]␤#      got: $[[], ["a"], []]␤»
12:05 ab6tract fair enough, i thought that might be the case
12:05 masak I don't know if there's a good doc page somewhere explaining that...
12:05 masak ...but that's clearly what's happening
12:05 ab6tract masak: unfortunately this doesn't explain my "array of Nums fails to smartmatch with array of Rats unless that array of Nums has .perl.EVAL called on itself"
12:06 masak m: say [1e0, 2e0] ~~ [1.0, 2.0]
12:06 camelia rakudo-moar 4b934d: OUTPUT«True␤»
12:06 masak worksforme :)
12:06 ab6tract that is exactly my issue
12:07 masak you sure you're not experiencing floating-point fuzziness or something?
12:07 ab6tract m:     not ok 3 - ARRAY -- got: $[1.23e0, 4.56e0, 7.89e0]expected: $[1.23, 4.56, 7.89]
12:07 camelia rakudo-moar 4b934d: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Two terms in a row␤at <tmp>:1␤------> 3 ARRAY -- got: $[1.23e0, 4.56e0, 7.89e0]7⏏5 expected: $[1.23, 4.56, 7.89]␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤…»
12:07 ab6tract oops
12:07 ab6tract "    not ok 3 - ARRAY -- got: $[1.23e0, 4.56e0, 7.89e0]expected: $[1.23, 4.56, 7.89]"
12:07 ab6tract now, try to craft a case where those two don't pass ok
12:08 ab6tract masak: and if I call .Str.Num on those Nums it will pass the smartmatch
12:09 masak m: say [1.23e0, 4.56e0, 7.89e0] ~~ [1.23, 4.56, 7.89]
12:09 camelia rakudo-moar 4b934d: OUTPUT«True␤»
12:09 masak dunno what you're doing, but it works here
12:09 ab6tract that's my point, masak. i am running into an error case
12:09 ab6tract you cannot get those to fail smartmatch
12:09 masak are you sure your test is using smartmatching?
12:09 ab6tract yes
12:09 masak wait, you want them to *fail* smartmatching?
12:10 masak m: say 1.23e0 ~~ 1.23
12:10 camelia rakudo-moar 4b934d: OUTPUT«True␤»
12:10 ab6tract no, i want them to pass. and they pass when inputting manually
12:10 ab6tract they only fail in the code that i am testing
12:10 ab6tract but even the got and expected values will pass smartmatch when put in manually
12:11 ab6tract and the code i am testing will pass smartmatch if i do $a_of_nums.perl.EVAL ~~ $b
12:11 masak what's the name of the assertion sub you're calling?
12:11 ab6tract but not if i do $a_of_nums ~~ $b
12:11 ab6tract 'ok'
12:11 masak aha, and the expression you pass contains a smartmatch?
12:11 ab6tract yup
12:11 masak how have the Nums been produced?
12:12 ab6tract from a C routine: https://github.com/ab5tract/Sereal/blob/perl6/Perl6/ext/decode.c#L86
12:12 masak the plotchki thickens
12:13 ab6tract here is the nativecall definition: https://github.com/ab5tract/Sereal/blob/perl6/Perl6/lib/Sereal/Decoder/Reader/Native.pm6#L21
12:13 ab6tract and here is the line of code that pulls a double from the buf
12:13 ab6tract https://github.com/ab5tract/Sereal/blob/perl6/Perl6/lib/Sereal/Decoder.pm6#L39
12:13 masak ok, I now urge you to golf this
12:13 masak like, down to something ridiculously small, like three lines of code
12:13 ab6tract really not sure how to golf something that needs an object file
12:13 masak you'll think of something, I'm sure :D
12:13 ab6tract doing it just with NativeCall doesn't trigger the same issue
12:14 masak right now there is too much code not contributing to the bug
12:16 ab6tract right, but the smallest possible test case still requires a C compilation phase
12:16 ab6tract i'll see what i can do
12:16 telex joined #perl6
12:16 masak ++ab6tract
12:17 masak sometimes during especially intense golfing sessions, the C compilation phase (or equivalent) goes away
12:20 ab6tract m: use nqp; use NativeCall; sub fabs(num32 $) is native returns num32 {*}; say nqp::what( fabs(1e1) ); say [ fabs(1e1) ] ~~ [ 10.0 ]
12:20 camelia rakudo-moar 4ee104: OUTPUT«(Num)␤True␤»
12:20 ab6tract m: use nqp; use NativeCall; sub fabs(num32 $) is native returns num64 {*}; say nqp::what( fabs(1e1) ); say [ fabs(1e1) ] ~~ [ 10.0 ]
12:20 camelia rakudo-moar 4ee104: OUTPUT«(Num)␤False␤»
12:21 ab6tract m: use nqp; use NativeCall; sub fabs(num64 $) is native returns num64 {*}; say nqp::what( fabs(1e1) ); say [ fabs(1e1) ] ~~ [ 10.0 ]
12:21 camelia rakudo-moar 4ee104: OUTPUT«(Num)␤True␤»
12:21 ab6tract whoa
12:21 ab6tract should i expect the second one to work?
12:23 mcmillhj joined #perl6
12:23 bob777 joined #perl6
12:25 perlpilot joined #perl6
12:25 ab6tract answer: no, because num32 <> num64 and thus it gets mangled on way through the fabs routine
12:30 naser joined #perl6
12:31 naser hello
12:31 naser what are some good books on perl6, i found some on amazon but they are 10+ years old..
12:31 tadzik there aren't any
12:32 tadzik whatever's in http://perl6.org/documentation/ is your best bet at learning it :)
12:32 kalkin- Is it true that TT is working on a Perl6 book?
12:33 naser I am feeling confused about this language, looks like an old yet new language, no books except few old ones..
12:33 perlpilot naser: if the books you have found on amazon are "Perl 6 and Parrot Essentials" and "Perl 6 Now", the first is no longer relevant and the second is more of a Perl 5 book  :)
12:34 kalkin- naser: What helped me a lot is reading learnXinYminutes and the docs. Anything beyond that, wouldn't be in a Beginners Book anyway.
12:35 kalkin- This channels is also very helpful and filled with kind people
12:36 kalkin- What I personally missing the most a Good Practice guide, to learn what is the Perl6 way to do this or that, but there can be a Good Practices guide, because now one really knows how Good Practices should be.
12:36 wamba joined #perl6
12:37 cdg joined #perl6
12:37 mcmillhj joined #perl6
12:37 naser i wish i could find something i can view offline on an e-reader..
12:38 naser probably i could scrap the content of perl6 site and turn it into an epub document...
12:39 jeek https://www.facebook.com/DaTweekaz/videos/10153828034206794/
12:39 jeek asciidoc converts to epub pretty easily
12:40 kalkin- pod2mobi would be nice, to read the docs on the kindle
12:40 kalkin- I like the way you can read The Art of Unix Programming or Ruby on Rails docs on a Kindle. It is very comfortable
12:48 prammer joined #perl6
12:49 awwaiid joined #perl6
12:50 apejens kalkin-: it looks like https://metacpan.org/pod/EBook::MOBI kan do pod -> mobi? It has a plugin for it, and a small example, but might need to write the actual script `pod2mobi`
12:51 kalkin- apejens: My impression was that Pod5 and 6 differ, am I wrong?
12:51 apejens ahh, lol, I didn't see I was in #perl6, sorry!
12:52 apejens kalkin-: but perhaps a pod6 input plugin wouldn't be too hard to write
12:52 kalkin- apejens: i will look in to it, when i have time. Thanks for the hint
13:02 bjz joined #perl6
13:04 mcmillhj joined #perl6
13:05 mcmillhj joined #perl6
13:19 skids joined #perl6
13:20 dvinciguerra joined #perl6
13:25 [Coke] .tell pmurias I'm ok with using a cutting edge JS. There are compilers to get us to an older version if needed, no? (I think getting something working all the way through the stack is more important at this point, so if the newer JS makes your job easier...)
13:25 yoleaux [Coke]: I'll pass your message to pmurias.
13:30 mcmillhj joined #perl6
13:34 Actualeyes joined #perl6
13:44 bob777 joined #perl6
13:49 mcmillhj joined #perl6
13:53 kalkin-_ joined #perl6
13:59 mcmillhj joined #perl6
14:03 avar Is Inline::Perl6 unmaintained? Trying to compile it on Rakudo star 2016.07 yields an error about a missing 'frames' struct member.
14:03 avar Looking at moarvm.git jnthn removed that back in march in 824748d
14:04 [Coke] buggable, source?
14:05 [Coke] avar;it's not tested as part of the rakudo release process.
14:05 chansen_ joined #perl6
14:05 avar Which is apparently an internal API now, so my attempt to patch this to use the new API failed: https://metacpan.org/source/NINE/Inline-Perl6-0.05/Perl6.xs#L91
14:06 olinkl joined #perl6
14:06 avar Right, but it's also looking like I'm the only one who's tried to install this on a star release in ~6 months :){
14:06 ab6tract :S
14:08 ugexe ahem i think you mean 4 months and 28 days
14:08 avar Anyway, a monkeypatch of getting rid of everytihng after ? seems to "work": https://metacpan.org/source/NINE/Inline-Perl6-0.05/Perl6.xs#L91
14:09 Lucas_One joined #perl6
14:11 bob778 joined #perl6
14:12 tadzik joined #perl6
14:14 mindos joined #perl6
14:15 mithaldu_ joined #perl6
14:16 peteretep joined #perl6
14:16 pnu_ joined #perl6
14:16 DrParis joined #perl6
14:16 clkao joined #perl6
14:16 zacts joined #perl6
14:16 jkramer left #perl6
14:17 zostay joined #perl6
14:17 jnap_ joined #perl6
14:18 Spot__ joined #perl6
14:18 ggherdov joined #perl6
14:18 PotatoGim joined #perl6
14:19 BuildTheRobots joined #perl6
14:20 avar nine: *ping*
14:20 [Coke] avar; can you open an issue for this here: https://github.com/niner/Inline-Perl6 so nine sees it?
14:20 [Coke] heh. didn't see your ping yet. :)
14:20 avar will open an issue anyway..
14:21 Zoffix joined #perl6
14:22 avar https://github.com/niner/Inline-Perl6/issues/1 :)
14:23 [Coke] avar++
14:24 [Coke] nine: might want to update links in the p5 distro of I:6 so that it points back to github.
14:24 [Coke] (metacpan wants me to open a ticket in cpan's RT.
14:25 ggherdov joined #perl6
14:29 avar [Coke], nine : I also opened this issue asking "why the multiplicity?" https://github.com/niner/Inline-Perl6/issues/2
14:29 kid51 joined #perl6
14:29 prammer joined #perl6
14:29 kid51 First time I've ever seen Perl 6 in a job posting:  https://jobs.perl.org/job/20342
14:30 [Coke] kid51: woohoo
14:31 [Coke] kid51: I'm actually using Perl 6 in a project at work myself, very happy.
14:31 ugexe wanted: senior perl6 web developer
14:33 TimToady maybe someone just fatfingered it :)
14:33 moritz do I qualify if I'm a senior web developer, and a senior Perl 6 developer? :-)
14:34 [Coke] TimToady: killjoy. :P
14:36 stmuk_ it says PHP 7 as well .. just looks like a BS jobpost mangled by an agent or manager
14:37 chansen_ joined #perl6
14:38 hwcomcn joined #perl6
14:39 hwcomcn joined #perl6
14:42 hwcomcn joined #perl6
14:42 AndyBotwin joined #perl6
14:45 nine avar: thanks for the reports! I'm a bit ill right now but will have a look once I feel better. Inline::Perl6 hasn't seen much action as you may actually be the very first user ;)
14:45 finanalyst joined #perl6
14:47 finanalyst joined #perl6
14:48 holyghost joined #perl6
14:49 grondilu joined #perl6
14:52 hwcomcn_ joined #perl6
14:53 avar nine: Yeah no rush at all, I'm just playing with this stuff for a hobby project
14:53 Zoffix left #perl6
14:57 sena_kun joined #perl6
14:57 cyphase joined #perl6
15:04 ab6tract well, some of us colleagues of avar have evil-er plans in mind ;)
15:05 ab6tract but it isn't a rush in our case, either
15:09 pmurias joined #perl6
15:10 pmurias maybe that job post is a bait and switch trap, they will promise you Perl 6 and make you write PHP? ;)
15:10 yoleaux 02:12Z <konobi> pmurias: well, es6 has support on all modern browsers... though a few still have aspects that aren't implementent yet. Thankfully we can use babel to transpile from pure es6 to es5, or combo of es5/es6 for different browsers support (or use polyfills)
15:10 yoleaux 02:13Z <konobi> pmurias: yup... it had all been working up until a small change around code-ref/core/sixmodel =0(
15:10 yoleaux 02:30Z <konobi> pmurias: i have a feeling it might be due to a missunderstanding somewhere of how the 'this' keyword works
15:10 yoleaux 13:25Z <[Coke]> pmurias: I'm ok with using a cutting edge JS. There are compilers to get us to an older version if needed, no? (I think getting something working all the way through the stack is more important at this point, so if the newer JS makes your job easier...)
15:12 Actualeyes joined #perl6
15:14 acrussell joined #perl6
15:15 pmurias .tell konobi arrow function having different this semantics was one of the problems
15:15 yoleaux pmurias: I'll pass your message to konobi.
15:16 cdg joined #perl6
15:16 khw joined #perl6
15:21 dalek doc: 245236e | (Tom Browder)++ | doc/Language/tables.pod6:
15:21 dalek doc: correct example table
15:21 dalek doc: review: https://github.com/perl6/doc/commit/245236edc0
15:22 dalek doc: 7632895 | (Tom Browder)++ | doc/Language/tables.pod6:
15:22 dalek doc: correct spelling
15:22 dalek doc: review: https://github.com/perl6/doc/commit/7632895fe4
15:25 tbrowder joined #perl6
15:26 cibs joined #perl6
15:29 TEttinger joined #perl6
15:31 AndyBotwin joined #perl6
15:36 andrewb joined #perl6
15:38 captain-adequate joined #perl6
15:43 tbrowder don't see pragma when searching docsl zoffix's last blog post is great but first time i've seen "use monkey-guts" mentioned to enable nqp in p6
15:45 tailgate say I have an array @r = <(a b) (c d) (e f)>. Can I name the tuple values in a lambda, like @r.map({->($x, $y) $x ~ $y})?
15:47 jnthn Yes, pretty much like you did it, just need the block around the lambda body
15:47 jnthn Also, <(a b) (c d) (e f)> looks a bit confused :)
15:47 tailgate jnthn: lol I just figured that out
15:48 tailgate thnaks
15:48 jnthn m: my @r = <a b>, <c d>, <e f>; say @r.map(-> [$x, $y] { $x ~ $y })
15:48 camelia rakudo-moar 4ee104: OUTPUT«(ab cd ef)␤»
15:48 tbrowder ref rakudo dev: i've installed panda now system-wide (using its bootstrap instructions) along with rakudo head; however, panda can't find the source of p6 modules. do i have to download my own p6 module repo so "panda install" will work?
15:59 gtodd1 joined #perl6
16:01 gtodd1 any heavy git users have an opinion on the best/simplest/safest way to maintain source control for an application developing and using/working with at the same time?
16:02 [Coke] tbrowder: what are you doing that can't find the source of p6 modules?
16:02 [Coke] also, are you behind a firewall?
16:03 gtodd by that I mean say I'm writing a module and using it in an app ... eventually I will have a repo for my application based on Module.p6m  and a repo for Module.p6m
16:04 [Coke] I would just start out with repos for both things
16:05 gtodd I was thinking of instead of pushing an pulling a ton up and down from bitbucket or github I could just have a branch "myapp" I switch into to add my own configuration etc. and then the main branch for the module itself ...
16:05 gtodd I guess if I'm going to go that way eventually I might as well do it now
16:05 gtodd and have two repos
16:06 jnthn Provided the module is in a folder and isolated, it's possible to extract its history separately using git filter-branch later
16:07 jnthn If you go the two repo route from the start, git subtree may help make it less annoying
16:07 gtodd ok ... I thought I could have a branch specific remote so when I pushed it would be automagically pushing the right stuff to the right place
16:07 gtodd it just doesn't seem big enough yet
16:07 jnthn Remtoes are always branch specific anyway :)
16:07 jnthn Well, uh
16:08 gtodd Oh good :)  ...
16:08 jnthn Branches each have their own remote branch, and those might have different remotes
16:08 pmurias [Coke]: it should be possible to compile the runtime parts using the new javascript into the old version
16:08 jnthn I'd probably use subtree or something though...
16:08 jnthn Or just fix it later with filter-branch
16:09 dalek doc: f39e6d4 | Altai-man++ | doc/Type/A (3 files):
16:09 dalek doc: Now examples from pages of Any/Array/Attribute are compilable. See https://github.com/perl6/doc/issues/776
16:09 dalek doc: review: https://github.com/perl6/doc/commit/f39e6d407b
16:09 rindolf joined #perl6
16:10 bob778 joined #perl6
16:10 gtodd jnthn: OK thanks the other bit of the puzzle is I have a number of toy apps  (in perl6   perl5 Catalyst etc.) that are set up specifically to deploy or run on heroku or aws and where I want to abstract out the the non-specifc to me bits in order to have a public branch I can push to git-hub say
16:11 gtodd jnthn: filter-branch seems interesting
16:11 gtodd I think I will do one that way and one with 2 repos and see which is more "natural"
16:12 gtodd for each application :)
16:12 jnthn :)
16:14 dalek doc: 4258331 | (Wenzel P. P. Peppmeyer)++ | util/extract-examples.p6:
16:14 dalek doc: extract example based on .modified unless --force
16:14 dalek doc: review: https://github.com/perl6/doc/commit/42583314d4
16:22 AndyBotwin joined #perl6
16:24 BrassLantern joined #perl6
16:26 freeside joined #perl6
16:31 jdv79 unmatched}: your blogging pace is impressive
16:32 perlpilot joined #perl6
16:34 moritz not just pace, also quality
16:35 jdv79 i already commended him on that point months ago:)
16:35 jdv79 but yes, of course
16:36 jdv79 and very much an inspiration to try to do more
16:46 labster joined #perl6
16:52 Juerd joined #perl6
16:56 dvinciguerra joined #perl6
16:58 tadzik joined #perl6
16:58 setty1 joined #perl6
17:00 AlexDaniel joined #perl6
17:02 itaipu joined #perl6
17:05 tbrowder [Coke}: I am no longer using rakudobrew.  I am using the head of rakudo (git clone) and installing it in a system-wide location (with suitable path in my .bash_aliases).  I installed panda from a git clone using its bootstrap and it also is installed system-wide using its default path (which I also have in my bash_aliases).  Yhus panda and perl6 (and nqp,
17:05 tbrowder etc.) are available from any dir.  The problem is panda can't find modules when I command installation, so I need help to fix my dev environment so all play nicely together.
17:05 tbrowder s/Yhus/Thus
17:06 tbrowder [Coke]: see finger fumble above
17:07 tbrowder [Code]: no firewall
17:08 firstdayonthejob joined #perl6
17:09 roguelazer joined #perl6
17:13 FROGGS joined #perl6
17:22 dha joined #perl6
17:23 M-Illandan joined #perl6
17:23 Matthew[m] joined #perl6
17:44 dalek doc: 5ae4076 | (Wenzel P. P. Peppmeyer)++ | doc/Language/operators.pod6:
17:44 dalek doc: make operators.pod6 compile
17:44 dalek doc: review: https://github.com/perl6/doc/commit/5ae40767cb
17:51 [Coke] tbrowder: I still don't understand what you mean.
17:51 [Coke] can't find a module to -install-? or cannot find a module to use?
17:51 [Coke] and rakudobrew or not, if you installed panda with the perl6 you already isntalled, you should be ok.
17:52 [Coke] if it's somehow tied to the old rakudobrew you mentioned, I wouldn
17:52 [Coke] t expecet that to work
18:02 cyphase joined #perl6
18:12 Tonik joined #perl6
18:14 dogbert17 joined #perl6
18:14 cognominal joined #perl6
18:29 birdrock joined #perl6
18:50 firstdayonthejob joined #perl6
18:51 TEttinger joined #perl6
18:56 konobi moo
18:56 yoleaux 15:15Z <pmurias> konobi: arrow function having different this semantics was one of the problems
19:01 spider-mario joined #perl6
19:05 TEttinger joined #perl6
19:06 itaipu joined #perl6
19:08 dogbert17 o/ #perl6
19:09 dogbert17 huggable buggable
19:09 dogbert17 huggable: buggable
19:10 cyphase joined #perl6
19:11 dogbert17 have written up some docs for Pair.invert. Comments welcome : https://gist.github.com/dogbert17/211c376936c7c1442cdfa2a826ecc16c
19:13 sno joined #perl6
19:15 perlpilot dogbert17: what about an example with ('Perl' => %hash).invert  ?
19:18 perlpilot or even ('Perl' => { foo => "bar", baz => "blat" }).invert   # I'm not sure your description is quite right either.  I think it's not about Positional, but rather Iterable
19:19 dogbert17 perlpilot: that might force me to make some changes :)
19:20 dogbert17 perlpilot: I believe that you're right, back to the drawing board then
19:21 dogbert17 m: say ('Perl' => (1..5)).invert
19:21 camelia rakudo-moar 5c5ef1: OUTPUT«(1 => Perl 2 => Perl 3 => Perl 4 => Perl 5 => Perl)␤»
19:22 dogbert17 yeah, the positional rubbish must go
19:23 hankache joined #perl6
19:24 hankache good evening #perl6
19:25 perlpilot hello hankache
19:25 hankache hi perlpilot
19:26 bdmatatu joined #perl6
19:26 wamba joined #perl6
19:30 * lizmat starts working on the P6W
19:30 hankache lizmat++
19:32 masak ++lizmat
19:33 hankache [+] (lizmat)
19:33 * lizmat feels identified
19:34 AlexDaniel m: say [+] ‘lizmat’
19:34 camelia rakudo-moar 5c5ef1: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '3⏏5lizmat' (indicated by ⏏)␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in block <unit> at <tmp> line 1␤␤»
19:34 AlexDaniel m: say [-] ‘lizmat’
19:34 camelia rakudo-moar 5c5ef1: OUTPUT«lizmat␤»
19:35 hankache how come? ^^^
19:36 AlexDaniel hankache: #128757 #128758
19:36 synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=128757
19:36 synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=128758
19:36 bdmatatu Hi all, is it possible to inherit from Date but override the formatter?
19:37 TEttinger lizmat is a number in radix 36 or higher
19:38 jdv79 is react a "supply" block?
19:38 AlexDaniel m: say :36<lizmat>
19:38 camelia rakudo-moar 5c5ef1: OUTPUT«1301684645␤»
19:38 zostay jdv79: yes, it just doesn't return a Supply
19:38 gfldex bdmatatu: see https://github.com/rakudo/rakudo/blob/nom/src/core/Date.pm#L24
19:39 timotimo yup, it immediately noms all the values that you'd normally get from the supply block
19:39 AlexDaniel m: say :35<lizmat>
19:39 camelia rakudo-moar 5c5ef1: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Couldn't process entire number: 2/6 int chars, 2/-1 fractional chars␤at <tmp>:1␤------> 3say :35<lizmat>7⏏5<EOL>␤»
19:39 AlexDaniel ↑ what?
19:39 AlexDaniel 2/-1 fractional chars? What is it all about?
19:39 lizmat AlexDaniel: perhaps because that excludes "z"  Or do you mean the LTAness ?
19:40 dogbert17 perlpilot: have updated the gist, i.e. https://gist.github.com/dogbert17/211c376936c7c1442cdfa2a826ecc16c  (feels like I have entered deep waters ...)
19:40 AlexDaniel lizmat: LTAness
19:40 TEttinger yeah, radix 35 would be 0-9a-y, but agreed on the unusual error
19:40 AlexDaniel I feel like I already rakudobugged this…
19:40 TEttinger it does say the general point though, that it can't process the number
19:41 bdmatatu Thanks gfldex, looks like inheriting from that is a bit tricky
19:41 gfldex bdmatatu: all you need to do is provide your own .new
19:41 lizmat bdmatatu: looks to me that you don't need to inherit from Date, but just specify a :formatter parameter ?
19:41 AlexDaniel hmm maybe not
19:42 bdmatatu I was going to use the same formatter in a few places, so thought a class would be better.
19:42 perlpilot dogbert17++ Looks good to me.  I don't have any other commentary.  :)
19:42 tx0h hi
19:42 dogbert17 perlpilot: :) thx
19:43 lizmat class MyDate is Date { method new(|c) { self.Date.new(|c, :formatter( { ... } ) } }
19:43 lizmat self.Date::new
19:44 sena_kun joined #perl6
19:44 tx0h i'm not sure if i have overseen something, but is there no way in bailador to use a scalar as a Template::Mojo ?
19:44 jdv79 are supply and react doc'd?
19:44 jdv79 search seems to fail me
19:46 dalek doc: 522a231 | (Jan-Olof Hendig)++ | doc/Type/Pair.pod6:
19:46 dalek doc: Added docs for Pair.invert. perlpilot++
19:46 dalek doc: review: https://github.com/perl6/doc/commit/522a231a81
19:47 bdmatatu lizmat: thanks, works great!
19:47 dalek doc: 5f18bbf | (Wenzel P. P. Peppmeyer)++ | doc/Language/operators.pod6:
19:47 dalek doc: better example
19:47 dalek doc: review: https://github.com/perl6/doc/commit/5f18bbfd97
19:47 dalek doc: ca3eef2 | (Wenzel P. P. Peppmeyer)++ | Makefile:
19:47 dalek doc: add make examples-clean
19:47 dalek doc: review: https://github.com/perl6/doc/commit/ca3eef2d15
19:50 dalek doc: 71caed5 | (Wenzel P. P. Peppmeyer)++ | doc/Language/concurrency.pod6:
19:50 dalek doc: add whenever and react to index
19:50 dalek doc: review: https://github.com/perl6/doc/commit/71caed5638
19:50 gfldex jdv79: ^^^
19:51 jdv79 thanks
19:51 AndyBotwin joined #perl6
19:52 pochi m: my $a; $a = $a+1
19:52 camelia rakudo-moar 5c5ef1: OUTPUT«Use of uninitialized value of type Any in numeric context  in block <unit> at <tmp> line 1␤»
19:53 pochi perl5 tells me which variable it thinks is uninitialized: "Use of uninitialized value $a in addition (+) at -e line 1."
19:53 hoelzro perl 6 does, sometimes
19:53 pochi would that be possible in perl6 as well?
19:53 hoelzro m: my $a; say "$a"
19:53 camelia rakudo-moar 5c5ef1: OUTPUT«Use of uninitialized value $a of type Any in string context␤Any of .^name, .perl, .gist, or .say can stringify undefined things, if needed.  in block <unit> at <tmp> line 1␤␤»
19:54 hoelzro it is possible, we just need to find the right code to change =)
19:54 pochi :-)
19:58 travis-ci joined #perl6
19:58 travis-ci Doc build errored. Wenzel P. P. Peppmeyer 'add whenever and react to index'
19:58 travis-ci https://travis-ci.org/perl6/doc/builds/148988171 https://github.com/perl6/doc/compare/ca3eef2d1540...71caed56380e
19:58 travis-ci left #perl6
20:02 dogbert17 is "string".comb the fastest way to split a string into a list of characters or might there be an alternative hiding in the docs somewhere?
20:03 hoelzro huh, turns out that's super easy to add (the uninitialized value variable name thing)
20:03 hoelzro pochi: want to make a contribution to Perl 6? =)
20:03 pochi I was looking in Mu.pm :-)
20:04 hoelzro that's the place to look!
20:04 pochi compiling ...
20:04 hoelzro want more hints, or would you prefer to figure it out on your own?
20:05 pochi I just tried to copy-paste the code from the string case
20:05 sena_kun I don't see anywhere in the docs(grep too) usage of "=begin output". Why nobody used it over years? It seems to be a valid pod code.
20:05 hoelzro pochi: did it work?
20:06 hoelzro sena_kun: that's the POD code for "example output of a chunk of code", right?
20:06 sena_kun hoelzro, sure.
20:06 pochi hoelzro: still compiling
20:06 hoelzro sena_kun: yeah, it seems like it would be very useful
20:06 gfldex sena_kun: did you check if the renderers support it too?
20:07 sena_kun gfldex, nope. That's why I'm asking. (:
20:07 cyphase joined #perl6
20:07 gfldex sena_kun: i believe they don't. It wouldn't be hard to change that tho.
20:07 sena_kun Let's try it locally...
20:09 sena_kun gfldex, it's just we often use `code` block to show output. The easy solution is to just do a `:skip-test` and to worry, but I'm interested.
20:10 pmurias joined #perl6
20:10 pmurias hi
20:10 sena_kun s/to/don't
20:10 sena_kun Ah.
20:12 pochi hoelzro: no go :-( Seems $name just is the empty string
20:15 rindolf joined #perl6
20:18 hoelzro pochi: could you show me the diff of the change you made?
20:20 AlexDaniel m: sub hello { say 42 }; say &hello
20:20 camelia rakudo-moar 5c5ef1: OUTPUT«sub hello () { #`(Sub|54567296) ... }␤»
20:20 AlexDaniel how can I do the same thing with a method?
20:20 AlexDaniel and is it even possible?
20:21 AlexDaniel m: class Foo { method hello { say 42 } }; my $x = Foo.new; say $x.&hello
20:21 camelia rakudo-moar 5c5ef1: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Undeclared routine:␤    hello used at line 1. Did you mean 'shell'?␤␤»
20:21 gfldex AlexDaniel: you have to use the MOP
20:22 jnthn Foo.^lookup('hello')
20:23 AlexDaniel m: class Foo { method hello { say 42 } }; my $x = Foo.new; $x.^lookup(‘hello’)($x)
20:23 camelia rakudo-moar 5c5ef1: OUTPUT«42␤»
20:23 AlexDaniel so does not work as nicely on an instance
20:24 pochi hoelzro: https://pastee.org/3ncbm
20:24 jnthn "does not work as nicely"?
20:24 jnthn Works just the same
20:24 setty1 joined #perl6
20:25 AlexDaniel jnthn: well, I have to pass the object itself if I want to call it
20:25 tbrowder [Coke]: Sorry, when I first installed panda I tried to install a module (don't remember which) and panda couldn't find it.  I just tried "panda install Linenoise" and it recognized it being installed.  Sorry for the  wasted bandwidth--looks like a non-problem now.
20:25 jnthn Sure, methods need an object to work on.
20:25 AlexDaniel jnthn: sure, I just hoped that it will be done for me
20:26 jnthn Ah. That's now how Perl 6 OO works :)
20:26 jnthn And if you do want that, closures are really compact in Perl 6.
20:26 hoelzro pochi: that's weird - a similiar patch worked for me
20:26 AlexDaniel yeah
20:26 jnthn {$x.hello} is quite a bit shorter than $x.^lookup('hello') :)
20:27 pochi hoelzro: You are right, it works on the 'my $a ...' example :-)
20:27 gfldex jnthn: .assuming is defined for Routine, that includes Method, but there is no easy way to call that method.
20:27 zostay tx0h, i'm not sure i understand the question, the call to template() in bailador takes a string (scalar) containing the template, doesn't it?
20:27 AlexDaniel jnthn: except that .hello is a multimethod in my case, and it seems like it will be a bit longer to preserve that
20:27 pochi hoelzro: but not on my actual usecase :-)
20:29 jnthn m: say '-> |c { $x.foo(|c) }'.chars
20:29 camelia rakudo-moar 5c5ef1: OUTPUT«20␤»
20:29 pochi m: class Foo { has Numeric $.a; method foo() { $.a = $.a + 1 } }; Foo.new.foo
20:29 camelia rakudo-moar 5c5ef1: OUTPUT«Use of uninitialized value of type Numeric in numeric context  in method foo at <tmp> line 1␤Cannot modify an immutable Numeric␤  in method foo at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
20:29 jnthn m: say '$x.^lookup("foo")'.chars
20:29 camelia rakudo-moar 5c5ef1: OUTPUT«17␤»
20:29 jnthn Only just and I was generous with whitespace :)
20:30 sena_kun It seems current renderers treat `output` as plain paragraph.
20:31 pochi hoelzro: seems the warning about uninitialized variables can't handle attributes, because the string example doesn't work if it's a string attribute
20:32 hoelzro pochi: ahhh...what's your exact usecase?
20:32 AlexDaniel jnthn: okay, that might work
20:32 AlexDaniel jnthn: thanks
20:32 pochi hoelzro: see a couple of lines above, I asked camelia :-)
20:34 espadrine joined #perl6
20:35 hoelzro ahhh, that makes sense
20:35 hoelzro hmm
20:35 hoelzro I really want to make that work now.
20:35 berov joined #perl6
20:38 acrussell joined #perl6
20:45 tx0h zostay: no, it's just a path. that means that every time you request a page the file must get opened, read and closed.
20:49 tbrowder left #perl6
20:51 zostay ah, i see, i misread the code... skipped the template method in Bailador::App
20:52 zostay app.renderer.render('text', ...) ought to do what you want
20:53 gnull joined #perl6
20:54 tx0h oh, i didn't saw that? let me try. ty.
20:56 zostay np, i haven't used bailador in a while myself, i just read the code on github, but something like what i wrote is possible
20:59 * tx0h nods
21:00 tx0h it works, 2nd argument (3rd) must be an array with the vars for the template
21:01 geraud joined #perl6
21:05 jdv79 was there any word on using private class attrs from a role?
21:07 trnh joined #perl6
21:07 trnh joined #perl6
21:09 jdv79 at present, and from memory, it seems there is no solution
21:10 hankache joined #perl6
21:11 lizmat and another Perl 6 Weekly hits the Net: https://p6weekly.wordpress.com/2016/08/01/2016-31-an-end-of-an-era/
21:12 dalek doc: 5bb9af9 | Altai-man++ | doc/Type/ (2 files):
21:12 dalek doc: AttributeContainer and Proc/Async now compile
21:12 dalek doc: review: https://github.com/perl6/doc/commit/5bb9af92f8
21:14 xinming joined #perl6
21:27 labster joined #perl6
21:34 travis-ci joined #perl6
21:34 travis-ci Doc build passed. Altai-man 'AttributeContainer and Proc/Async now compile'
21:34 travis-ci https://travis-ci.org/perl6/doc/builds/149013626 https://github.com/perl6/doc/compare/71caed56380e...5bb9af92f822
21:34 travis-ci left #perl6
21:46 jdv79 m: my @a = 1,2,3;my $h = {k => {k2 => @a}}; for $h.values>><k2>.list {.say}
21:46 camelia rakudo-moar 67b654: OUTPUT«[1 2 3]␤»
21:46 jdv79 shouldn't that list flatten out there?
21:49 jargan joined #perl6
22:00 cpage_ joined #perl6
22:10 zacts joined #perl6
22:11 gfldex sena_kun: i tried to implement =begin output and found that the parser eats indentation and newlines
22:16 olinkl joined #perl6
22:16 sena_kun gfldex, you investigated Pod::To::HTML?
22:16 gfldex sena_kun: i'm using Pod::To::BigPage, easier to change because it's basicly just a flat list of multies
22:18 Sgeo joined #perl6
22:20 gfldex sena_kun: https://gist.github.com/gfldex/5f99bea644df1b692d23ce42e0d5c028
22:25 sena_kun gfldex, I see. Maybe I should to magically know it, but still. It looks like every Pod::To-like module has it's own way to parse Pod content, am I wrong? Or parsing already built-in into compiler as a part of language?
22:25 Rawriful joined #perl6
22:26 sena_kun Ah, I'm wrong, actually.
22:27 gfldex sena_kun: rakudo does all the parsing of the actual .pod6 file. It outputs the data structure in the gist. There are a few shortcomings that different renderers deal with in different ways.
22:27 sena_kun gfldex, ah, now I understand it. Thanks. Let's see...
22:29 WhopperSwan007 joined #perl6
22:29 gfldex sena_kun: how nodes are rendered depends on their parent nodes, at times generations deep. util/extract-examples.p6 is a simple example how to deal with that.
22:30 frobisher joined #perl6
22:30 gfldex i tried to build a round-tripping Pod::To::Perl6 for easy testing both of a renderer and the pod6 part of the grammer and got stuck.
22:32 sena_kun gfldex, I'm looking at Grammar.nqp now and it seems we have to extend it a little bit if we want it to treat `=begin output` in a special way.
22:33 sena_kun Since internal parser treats `=begin something` as just plain paragraph, where all spaces and newlines are eaten.
22:34 gfldex sena_kun: if you want to dig into it, Pod::Block could do with a parent attribute and if filename/linenumber could be preserved it would make it much easier for renderers to complain about dupe index entries and other problems.
22:38 sena_kun gfldex, I'm not sure my attempts can give some result, but I'll try to investigate it further. Also, I thought about the examples compilation: we can fix up at least two common-case problems in automatical way using grep. I'll prepare PR a bit leter, I suppose.
22:39 sena_kun *later
22:39 sena_kun It'll take me some time to do a proper review of the diff.
22:43 sena_kun s@grep@grep/sed@
22:44 canopus joined #perl6
22:51 mcmillhj joined #perl6
22:59 TEttinger joined #perl6
23:15 cpage_ joined #perl6
23:23 cpage_ joined #perl6
23:24 LegalResale joined #perl6
23:28 lambd0x joined #perl6
23:28 lambd0x Hi everyone!
23:28 jdv79 europe might be sleeping
23:28 jdv79 plus its monday
23:29 sena_kun lambd0x, 0/
23:29 Celelibi joined #perl6
23:29 lambd0x sena_kun: \o
23:29 TEttinger joined #perl6
23:31 lambd0x People, how can I declare a continuous extending bidimensional array in perl 6.
23:31 dalek doc: 057226c | dmaestro++ | doc/Type/Int.pod6:
23:31 dalek doc: Clarify description of lsb, msb
23:31 dalek doc:
23:31 dalek doc: Description of msb was slightly misleading, as the indexing referred to is always from the right.
23:31 dalek doc: Clarified both lsb and msb.
23:31 dalek doc: review: https://github.com/perl6/doc/commit/057226c2aa
23:31 dalek doc: 8405f0b | (Wenzel P. P. Peppmeyer)++ | doc/Type/Int.pod6:
23:31 dalek doc: Merge pull request #779 from dmaestro/clarify_Int_msb_description
23:31 dalek doc:
23:31 dalek doc: Clarify description of lsb, msb
23:31 dalek doc: review: https://github.com/perl6/doc/commit/8405f0bab5
23:32 dalek doc: d0dfc5a | Altai-man++ | html/js/main.js:
23:32 dalek doc: The TOC animation was removed
23:32 dalek doc: review: https://github.com/perl6/doc/commit/d0dfc5ab6f
23:32 dalek doc: ce02d33 | (Wenzel P. P. Peppmeyer)++ | html/js/main.js:
23:32 dalek doc: Merge pull request #783 from perl6/animation-has-gone
23:32 dalek doc:
23:32 dalek doc: The TOC animation was removed
23:32 dalek doc: review: https://github.com/perl6/doc/commit/ce02d3374b
23:33 lambd0x Is there a way to do it? E.g. my @array; is a single-dimensional array that's continuous extending..
23:34 gfldex m: my @a[*;*]
23:34 camelia rakudo-moar e411e5: OUTPUT«Jagged array shapes not yet implemented. Sorry. ␤  in block <unit> at <tmp> line 1␤␤»
23:35 gfldex lambd0x: ^^^
23:36 gfldex m: my @a; @a[1;1] = 10; dd @a;
23:36 camelia rakudo-moar e411e5: OUTPUT«Array @a = [Any, [Any, 10]]␤»
23:36 gfldex that means you can use multi dim arrays but there is no constraint on the dimensions. If you need that you will have to implement that by hand.
23:37 gfldex m: my @a; @a[1;1] = 10; dd @a.pairs;
23:37 camelia rakudo-moar e411e5: OUTPUT«(0 => Any, 1 => $[Any, 10]).Seq␤»
23:37 gfldex also, .pairs and a few other methods don't do what they should.
23:38 gfldex m: my @a; @a[1;1] = 10; dd @a.elems;
23:38 camelia rakudo-moar e411e5: OUTPUT«2␤»
23:44 lambd0x gfldex: so this is really a feature that still needs to be implemented.. wow
23:45 lambd0x Well, at least I can use a statically defined multidimensional array at will. That might be sufficient for the time being.
23:46 lambd0x gfldex: thanks for answering
23:47 dainis joined #perl6

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

Perl 6 | Reference Documentation | Rakudo