Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2017-06-22

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:04 AlexDaniel m: say 1.WHAT
00:04 camelia rakudo-moar 86e7b2: OUTPUT: «(Int)␤»
00:04 AlexDaniel BenGoldberg: because this? ↑
00:04 mcmillhj joined #perl6
00:05 BenGoldberg m: my int $x = 1; say $x.WHAT;
00:05 camelia rakudo-moar 86e7b2: OUTPUT: «(Int)␤»
00:05 AlexDaniel hm
00:05 AlexDaniel wait…
00:05 AlexDaniel m: multi foo(Int) { ‘boxed’ }; multi foo(int) { ‘native’ }; say foo(1)
00:05 camelia rakudo-moar 86e7b2: OUTPUT: «boxed␤»
00:06 AlexDaniel I'm getting “native” here…
00:06 AlexDaniel c: all multi foo(Int) { ‘boxed’ }; multi foo(int) { ‘native’ }; say foo(1)
00:06 committable6 AlexDaniel, https://gist.github.com/674f621559c4475095006f196ceae4dc
00:06 AlexDaniel bisect: all multi foo(Int) { ‘boxed’ }; multi foo(int) { ‘native’ }; say foo(1)
00:06 bisectable6 AlexDaniel, Bisecting by output (old=2015.12 new=86e7b2b) because on both starting points the exit code is 0
00:06 AlexDaniel blargh
00:06 AlexDaniel bisect: multi foo(Int) { ‘boxed’ }; multi foo(int) { ‘native’ }; say foo(1)
00:06 bisectable6 AlexDaniel, bisect log: https://gist.github.com/3b76312cfb21e401200786a2237687c2
00:06 bisectable6 AlexDaniel, (2017-06-08) https://github.com/rakudo/rakudo/commit/ccfa5e51a21f5a613ecb0cfb24be6c15f4103752
00:06 bisectable6 AlexDaniel, Bisecting by output (old=2015.12 new=86e7b2b) because on both starting points the exit code is 0
00:06 bisectable6 AlexDaniel, bisect log: https://gist.github.com/c492e405d214e16f64a81e2e07a3e7b8
00:06 bisectable6 AlexDaniel, (2017-06-08) https://github.com/rakudo/rakudo/commit/ccfa5e51a21f5a613ecb0cfb24be6c15f4103752
00:08 AlexDaniel BenGoldberg: there's a comment under that commit that seems to be relevant
00:09 AlexDaniel so a literal is always an Int
00:09 AlexDaniel m: multi foo(Int) { ‘boxed’ }; multi foo(int) { ‘native’ }; say foo(1)
00:09 camelia rakudo-moar 86e7b2: OUTPUT: «boxed␤»
00:10 AlexDaniel m: multi foo(Int) { ‘boxed’ }; multi foo(int) { ‘native’ }; say foo(int.new(1))
00:10 camelia rakudo-moar 86e7b2: OUTPUT: «boxed␤»
00:10 AlexDaniel yeah, okay, you have to use a variable…
00:14 Cabanossi joined #perl6
00:24 lookatme joined #perl6
00:24 lookatme morning
00:37 MasterDuke BenGoldberg: i believe Zoffix had a write-up of some thoughts for native dispatching rules in a RT, but then jnthn explained something he hadn't realized and the end result is literals have to be Int
00:38 BenGoldberg Got it.
00:40 MasterDuke i think it was something like the dispatcher doesn't know the "size" of the literal, so native always wins, even when the literal would overflow and you'd expect it to go to the Int candidate
00:45 MasterDuke Util: can anyone show up to the Perl 6 hackathon tomorrow? i wasn't able to make it to the conference, but could probably come down for some of the afternoon/evening assuming you don't need to have paid for the conference to participate
00:59 timotimo https://github.com/timo/p6profiler-tools/commit/dba6d6543cea9066183f9d651cf46c7c1cf677b6  -  this shall be much better than building the sqlite3 file by hand and also piping the output of the program into dot to create an svg or whatevs
00:59 timotimo and with that i disappear into bed
01:01 mcmillhj joined #perl6
01:11 BenGoldberg Does anyone know if the following is possible?  I've got a function foo, which takes a role Bar, and an object of class Baz (which isn't a Bar), and I want to make it so calling foo() with my Baz object will call some conversion subroutine.
01:15 Actualeyes joined #perl6
01:16 aborazmeh joined #perl6
01:16 aborazmeh joined #perl6
01:21 BenGoldberg m: my role Foo[$z] { }; my class Bar { method Foo { say "converting"; Foo[42] } }; for Bar.new -> Foo(Bar) $x { dd $x } # coming closer...
01:21 camelia rakudo-moar 86e7b2: OUTPUT: «converting␤Foo[Int]␤»
01:33 BenGoldberg m: my role Foo[$z] { }; my class Bar { method Foo { say "converting"; Foo[42] } }; for Bar.new -> Foo['Abc'](Bar) $x { dd $x } # coming closer...
01:33 camelia rakudo-moar 86e7b2: OUTPUT: «No such method 'Foo[Str]' for invocant of type 'Bar'␤  in block <unit> at <tmp> line 1␤␤»
01:33 MasterDuke .ask Util can anyone show up to the Perl 6 hackathon tomorrow? i wasn't able to make it to the conference, but could probably come down for some of the afternoon/evening assuming you don't need to have paid for the conference to participate
01:33 yoleaux MasterDuke: I'll pass your message to Util.
01:34 BenGoldberg m: my role Foo[$z] { }; my class Bar { method Foo[$perhaps] { say "$perhaps"; Foo[42] } }; for Bar.new -> Foo['Abc'](Bar) $x { dd $x } # coming closer...
01:34 camelia rakudo-moar 86e7b2: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Missing block␤at <tmp>:1␤------> 3e Foo[$z] { }; my class Bar { method Foo7⏏5[$perhaps] { say "$perhaps"; Foo[42] } }␤»
01:38 mcmillhj joined #perl6
01:48 ilbot3 joined #perl6
01:48 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:54 awwaiid Util: https://github.com/perl6/roast/pull/97 and https://github.com/perl6/roast/compare/linkable-anchors are the anchors I was talking about in roast. My plan was to have a dual branch/pull-request demo, one in roast with the anchors and one in doc with a few references and a coverage script. This branch is as far as I got, and last real commit was 2016-02-06...
01:57 awwaiid Util: Here is the direct link to the colon wiki page, https://thelackthereof.org/Perl6_Colons (though my server is being flaky, it'll be back eventually)
02:25 noganex_ joined #perl6
02:27 Unavowed joined #perl6
02:35 BenGoldberg bisect: m: use NativeCall; sub system(Str --> int32) is native {...}; print system(  $*EXECUTABLE ~ q{ -e 'my role a[$b] { }; constant c = a[:()]' 2>/dev/null } );
02:35 bisectable6 BenGoldberg, On both starting points (old=2015.12 new=86e7b2b) the exit code is 0 and the output is identical as well
02:35 bisectable6 BenGoldberg, Output on both points: «256»
02:39 Unavowed joined #perl6
02:40 BenGoldberg bisect: m: use NativeCall; sub system(Str --> int32) is native {...}; print system(  $*EXECUTABLE ~ q{ -e 'my role a[$b] { }; constant c = a.^paramaterize: :()' 2>/dev/null } );
02:40 bisectable6 BenGoldberg, On both starting points (old=2015.12 new=86e7b2b) the exit code is 0 and the output is identical as well
02:40 bisectable6 BenGoldberg, Output on both points: «256»
02:40 BenGoldberg bisect: m: use NativeCall; sub system(Str --> int32) is native {...}; print system(  $*EXECUTABLE ~ q{ -e 'my role a[$b] { }; constant c = a.^parameterize: :()' 2>/dev/null } );
02:40 bisectable6 BenGoldberg, On both starting points (old=2015.12 new=86e7b2b) the exit code is 0 and the output is identical as well
02:40 bisectable6 BenGoldberg, Output on both points: «0»
02:41 BenGoldberg j: my role a[$b] { }; constant c = a[:()]; dd c
02:41 camelia rakudo-jvm 86e7b2: OUTPUT: «===SORRY!===␤setcodeobj can only be used with a CodeRef␤»
02:42 BenGoldberg j: my role a[$b] { }; constant c = a.^parameterize: :(); dd c
02:42 camelia rakudo-jvm 86e7b2: OUTPUT: «a[Signature]␤»
02:46 awwaiid joined #perl6
02:51 awwaiid joined #perl6
02:52 lookatme joined #perl6
02:55 kurahaupo_ joined #perl6
02:57 awwaiid joined #perl6
02:58 Cabanossi joined #perl6
03:02 awwaiid joined #perl6
03:08 awwaiid joined #perl6
03:14 KDr2_ joined #perl6
03:19 awwaiid joined #perl6
03:27 dj_goku joined #perl6
03:28 Cabanossi joined #perl6
03:41 awwaiid joined #perl6
03:42 Cabanossi joined #perl6
03:46 awwaiid joined #perl6
04:09 wamba joined #perl6
04:09 awwaiid joined #perl6
04:14 awwaiid joined #perl6
04:25 awwaiid joined #perl6
04:36 awwaiid joined #perl6
04:46 mr-foobar joined #perl6
04:51 curan joined #perl6
04:58 Cabanossi joined #perl6
05:00 rurban joined #perl6
05:01 xtreak joined #perl6
05:06 awwaiid joined #perl6
05:14 petercommand joined #perl6
05:15 awwaiid joined #perl6
05:38 astj joined #perl6
05:41 astj joined #perl6
05:43 TimToady joined #perl6
05:58 Cabanossi joined #perl6
05:58 TimToady joined #perl6
06:00 mr-foobar joined #perl6
06:05 ufobat joined #perl6
06:28 Cabanossi joined #perl6
06:39 xtreak joined #perl6
06:43 xtreak joined #perl6
06:53 rurban joined #perl6
07:05 wamba joined #perl6
07:11 scimon joined #perl6
07:27 keylet m: say 'string'[-1];
07:27 camelia rakudo-moar 86e7b2: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Unsupported use of a negative -1 subscript to index from the end; in Perl 6 please use a function such as *-1␤at <tmp>:1␤------> 3say 'string'[-1]7⏏5;␤»
07:27 keylet m: say 'string'[0];
07:27 camelia rakudo-moar 86e7b2: OUTPUT: «string␤»
07:28 keylet m: say 'string'[2];
07:28 camelia rakudo-moar 86e7b2: OUTPUT: «Index out of range. Is: 2, should be in 0..0␤  in block <unit> at <tmp> line 1␤␤»
07:28 Cabanossi joined #perl6
07:28 keylet m: say 'string'.Arr;
07:28 camelia rakudo-moar 86e7b2: OUTPUT: «No such method 'Arr' for invocant of type 'Str'␤  in block <unit> at <tmp> line 1␤␤»
07:28 keylet is there an alternative to Python's 'string'[-2] to get `n` ?
07:29 dakkar joined #perl6
07:33 moritz m: say 'string'.substr(*-2, 1)
07:33 camelia rakudo-moar 86e7b2: OUTPUT: «n␤»
07:39 keylet m: say 'string'.substr(*-1, 1)
07:39 camelia rakudo-moar 86e7b2: OUTPUT: «g␤»
07:39 keylet thank you moritz
07:43 keylet m: say ''.substr(*-1, 1)
07:43 camelia rakudo-moar 86e7b2: OUTPUT: «Start argument to substr out of range. Is: -1, should be in 0..0; ␤  in block <unit> at <tmp> line 1␤␤»
07:44 keylet m: my Str $foo = ''; say so $foo eq '' or $foo.substr(*-1, 1) ne ' '
07:44 camelia rakudo-moar 86e7b2: OUTPUT: «WARNINGS for <tmp>:␤Useless use of "ne" in expression ".substr(*-1, 1) ne ' '" in sink context (line 1)␤True␤»
07:44 keylet m: my Str $foo = ''; say so $foo eq '' or $foo.substr(*-1, 1) ne ' ';
07:44 camelia rakudo-moar 86e7b2: OUTPUT: «WARNINGS for <tmp>:␤Useless use of "ne" in expression ".substr(*-1, 1) ne ' '" in sink context (line 1)␤True␤»
07:44 moritz m: say ''.substr(*-1, 1) // ''
07:44 camelia rakudo-moar 86e7b2: OUTPUT: «␤»
07:45 keylet say so '' ne ' ';
07:45 evalable6 keylet, rakudo-moar 86e7b2bd2: OUTPUT: «True»
07:58 zakharyas joined #perl6
08:03 jonas1 joined #perl6
08:08 abraxxa joined #perl6
08:08 scimon Well good news. I'm consistently breaking travis. https://travis-ci.org/Scimon/perl6-build-test/jobs/245678395 Made a fresh repo and used the 4 modules i'm using in the Statico repo. Used mi6 to build and didn't touch the travis file. Updated META6.json with the modules.
08:08 scimon And it breaks.
08:09 scimon I'll look into it further later. Try including less items and see what happens. Possibly update travis to not use META6 and install each module in turn. Various options.
08:15 lowbro joined #perl6
08:15 lowbro joined #perl6
08:27 cog_ joined #perl6
08:28 Cabanossi joined #perl6
08:30 rurban1 joined #perl6
08:31 zakharyas joined #perl6
08:31 rurban2 joined #perl6
08:36 |oLa| joined #perl6
08:46 [ptc] joined #perl6
08:51 keylet joined #perl6
08:52 keylet m: my Int $count = 5; say "[m{$count.Str}]";
08:52 camelia rakudo-moar 86e7b2: OUTPUT: «[m5]␤»
08:56 ufobat joined #perl6
09:13 Cabanossi joined #perl6
09:13 keylet m: my Str $foo where $_ ne 'bar' = 'test';
09:13 camelia rakudo-moar 86e7b2: ( no output )
09:13 keylet m: my Str $foo where $_ ne 'bar' = 'test'; $foo = 'a';
09:13 camelia rakudo-moar 86e7b2: ( no output )
09:13 keylet m: my Str $foo where $_ ne 'bar' = 'test'; $foo = 'a'; $foo = 'bar';
09:13 camelia rakudo-moar 86e7b2: OUTPUT: «Type check failed in assignment to $foo; expected <anon> but got Str ("bar")␤  in block <unit> at <tmp> line 1␤␤»
09:15 keylet m: sub test (Str $foo where not $_ ~~ /[ ' || "]/) { return $foo; };
09:15 camelia rakudo-moar 86e7b2: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Unable to parse expression in single quotes; couldn't find final "'" ␤at <tmp>:1␤------> 3not $_ ~~ /[ ' || "]/) { return $foo; };7⏏5<EOL>␤    expecting any of:␤        single quotes␤      …»
09:15 keylet m: sub test (Str $foo where not $_ ~~ /[ ' || "]/) { return $foo; }
09:15 camelia rakudo-moar 86e7b2: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Unable to parse expression in single quotes; couldn't find final "'" ␤at <tmp>:1␤------> 3 not $_ ~~ /[ ' || "]/) { return $foo; }7⏏5<EOL>␤    expecting any of:␤        single quotes␤      …»
09:17 keylet https://glot.io/snippets/er1g8lv9rz
09:18 keylet look, it's wonderful! :)
09:28 wamba joined #perl6
09:30 timotimo m: sub test (Str $foo where none(/[' || "]/)) { return $foo }; test("yo"); test("yo'yo")
09:30 camelia rakudo-moar 86e7b2: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Unable to parse expression in double quotes; couldn't find final '"' ␤at <tmp>:1␤------> 3return $foo }; test("yo"); test("yo'yo")7⏏5<EOL>␤    expecting any of:␤        argument list␤      …»
09:30 timotimo m: sub test (Str $foo where none(/<['"]>/)) { return $foo }; test("yo"); test("yo'yo")
09:30 camelia rakudo-moar 86e7b2: OUTPUT: «Constraint type check failed in binding to parameter '$foo'; expected anonymous constraint to be met but got Str ("yo'yo")␤  in sub test at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
09:31 timotimo m: sub test (Str $foo where .contains(none("'", '"'))) { say $foo }; test("yo"); test("yo'yo")
09:31 camelia rakudo-moar 86e7b2: OUTPUT: «yo␤Constraint type check failed in binding to parameter '$foo'; expected anonymous constraint to be met but got Str ("yo'yo")␤  in sub test at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
09:31 keylet it should be escaped
09:31 keylet with \
09:31 timotimo no need if you use a character class
09:31 keylet m: sub test (Str $foo where none(/[\' || \"]/)) { return $foo }; test("yo"); test("yo'yo")
09:31 camelia rakudo-moar 86e7b2: OUTPUT: «Constraint type check failed in binding to parameter '$foo'; expected anonymous constraint to be met but got Str ("yo'yo")␤  in sub test at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
09:31 keylet timotimo: ok
09:31 timotimo and you can also use no regex at all for this
09:33 keylet ------> e.WHAT === Str ?? $title !! $title.Str, ⏏$new = True, $without-tab = True);
09:33 keylet Variable '$new' is not declared
09:33 keylet should I use 'my' there?
09:33 timotimo you can
09:33 timotimo or put a "my $new" in the line before it
09:34 keylet a have a method: method append (Str $innerText, Bool $new?, Bool $without-tab?)
09:35 keylet then I try to run it: self!append($title.WHAT === Str ?? $title !! $title.Str, $new = True, $without-tab = True);
09:35 timotimo passing named arguments works differently, and those are positional arguments you're declaring and passing
09:36 lookatme no, that is python way
09:36 keylet self!append($title.WHAT === Str ?? $title !! $title.Str, True, True);
09:37 keylet it that a Perl way?
09:37 keylet * is
09:37 timotimo https://docs.perl6.org/type/Signature#Signature_Literals
09:37 lookatme Declare named parameter `(:$new)`, then call with `(:new)`
09:37 tadzik the trailing True-s look a bit like WinAPI way to me
09:37 timotimo that is indeed a perl way. there's also the perl way for named arguments that works a bit differently
09:37 tadzik it should also take 7 undefs
09:38 timotimo yeah, they do, tadzik
09:38 timotimo also the function needs to have its name end in Ex
09:38 timotimo nobody uses non-Ex functions todays
09:40 lookatme joined #perl6
09:42 lookatme bye ~~
10:04 cog_ joined #perl6
10:05 itaylor57 joined #perl6
10:10 domidumont joined #perl6
10:16 mcmillhj joined #perl6
10:25 scimon https://travis-ci.org/Scimon/perl6-build-test Ok so in Travis loading File::Temp, Text::Markdown, Template::Mustache and YAMLish with zef (using dep-only) from META6.json breaks. But any combination of just three builds fine.... I'm now going to try changing the travis file to load each manually rather than using deps.
10:25 scimon I'm also going to try a docker build at some point.
10:31 mcmillhj joined #perl6
10:45 mcmillhj joined #perl6
10:55 rurban joined #perl6
10:56 scimon (doing the zef install for all 4 at once also fails)
11:01 [particle] joined #perl6
11:05 cog_ joined #perl6
11:06 prodotiscus joined #perl6
11:16 scimon I have opened an issue withTravis about the fun I'm having.
11:19 mcmillhj joined #perl6
11:21 eveo joined #perl6
11:21 zengargoyle scimon++
11:22 eveo scimon: I still see you're using script and sudo sections other dists aren't using. Have you tried removing them?
11:22 zengargoyle wonder if it's running out of memory or something.
11:23 Geth ¦ ecosystem: 0a3f06fc31 | prodotiscus++ | META.list
11:23 Geth ¦ ecosystem: Add Dictionary::Create to ecosystem
11:23 Geth ¦ ecosystem:
11:23 Geth ¦ ecosystem: See https://github.com/prodotiscus/perl6-Dictionary-Create
11:23 Geth ¦ ecosystem: review: https://github.com/perl6/ecosystem/commit/0a3f06fc31
11:23 zengargoyle i've tried with no sudo (but still a script) and it still fails.
11:23 scimon eveo: I'll get rid of them. I've been using mi6 to gen my modules and that's what it adds.
11:23 zengargoyle but it fails in the zef install part before getting to the final script.
11:24 zengargoyle it doesn't get to the Testing or Installing phase of install --depsonly .
11:24 scimon If anyone wants to mess about in that repo it's fine by me. I made it as a test bed.
11:27 scimon going back to all in one bit. Removed script and sudo section and added 2017.06 as a perl6 version.
11:28 scimon And now going on lunch.
11:28 zengargoyle i've run a few pared down cases from zengargoyle/p6-TestMe,
11:29 prodotiscus I'm trying to `zef install Dictionary::Create` now, but zef says `===> Searching for: Dictionary::Create` and don't find it
11:29 prodotiscus * doesn't
11:29 prodotiscus is it ok?
11:29 eveo buggable: eco dictionary
11:29 buggable eveo, Search::Dict 'a fast binary search of dictionary like files': https://github.com/zengargoyle/p6-Search-Dict
11:30 eveo prodotiscus: what distro is that module in? Are you sure it exists?
11:30 prodotiscus you can see, a added it to ecosystem
11:30 prodotiscus but it is my first module upload, so I could do somthing wrong
11:31 Ven joined #perl6
11:31 Ven o/
11:31 prodotiscus [14:23] <+Geth> ¦ ecosystem: 0a3f06fc31 | prodotiscus++ | META.list [14:23] <+Geth> ¦ ecosystem: Add Dictionary::Create to ecosystem [14:23] <+Geth> ¦ ecosystem: [14:23] <+Geth> ¦ ecosystem: See https://github.com/prodotiscus/perl6-Dictionary-Create [14:23] <+Geth> ¦ ecosystem: review: https://github.com/perl6/ecosystem/commit/0a3f06fc31
11:31 eveo prodotiscus: try again. You can just tried to update it before the ecosystem got update
11:32 Ven`` m: for $s.comb { say $s.substr(0, ++$).parse-base(16); }
11:32 camelia rakudo-moar 86e7b2: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Variable '$s' is not declared␤at <tmp>:1␤------> 3for 7⏏5$s.comb { say $s.substr(0, ++$).parse-ba␤»
11:32 eveo tried to install it I mean
11:32 Ven`` m: $s = '0234234'; for $s.comb { say $s.substr(0, ++$).parse-base(16); }
11:32 camelia rakudo-moar 86e7b2: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Variable '$s' is not declared␤at <tmp>:1␤------> 3<BOL>7⏏5$s = '0234234'; for $s.comb { say $s.sub␤»
11:32 Ven`` *sigh*
11:32 Ven`` m: my $s = '0234234'; for $s.comb { say $s.substr(0, ++$).parse-base(16); }
11:32 camelia rakudo-moar 86e7b2: OUTPUT: «0␤2␤35␤564␤9026␤144419␤2310708␤»
11:32 prodotiscus eveo: try zef install again?
11:32 zengargoyle prodotiscus: `zef search Dictionary::Create` finds it now. :)
11:33 prodotiscus ok, thank you :)
11:33 Ven`` I don't understand that m:
11:33 eveo prodotiscus: yes, last eco update should've run at 28m
11:33 Ven`` I don't seem to mutate the string...
11:33 Ven`` fwiw, without parse-base:
11:33 Ven`` m: my $s = '0234234'; for $s.comb { say $s.substr(0, ++$); }
11:33 camelia rakudo-moar 86e7b2: OUTPUT: «0␤02␤023␤0234␤02342␤023423␤0234234␤»
11:33 Ven`` it works without the .parse-base
11:34 prodotiscus `m:` evaluates your perl6 code
11:34 eveo It runs o. 8th, 28th and 48th minute of the hour and takes a couple of minutes to complete and it takes about 1-2 hrs for it to show up on modules.perl6.org
11:34 Ven`` prodotiscus: ??
11:34 Ven`` I know what m: does – I mean I don't understand the results I get.
11:34 prodotiscus Ven``: I thought you do not understand what `m:` does, sorry :)
11:35 Ven`` I wasn't clear, my bad
11:35 eveo m: say '0234234'.parse-base: 16
11:35 camelia rakudo-moar 86e7b2: OUTPUT: «2310708␤»
11:35 eveo Ven``: looks right? What part confuses you?
11:36 eveo parsebase treats the numeral in the string as being in base 16 above
11:36 eveo m: say 2310708.base: 16
11:36 camelia rakudo-moar 86e7b2: OUTPUT: «234234␤»
11:36 Ven`` oh, I must be behind on my local version.
11:36 Ven`` It stops after the first iteration
11:37 Ven`` m: my $s = '0x098647820001114a00000000'; for $s.comb { say $s.substr(0, ++$).parse-base(16); }
11:37 camelia rakudo-moar 86e7b2: OUTPUT: «0␤Cannot convert string to number: malformed base-16 number in '0⏏5x' (indicated by ⏏)␤  in block <unit> at <tmp> line 1␤␤»
11:37 Ven`` oh, maybe the exception isn't printed because of the say in the REPL
11:38 eveo It should be
11:38 zengargoyle scimon: if i do: (for f in File::Temp Text::Markdown Template::Mustache YAMLish; do zef --verbose install $f; done)
11:38 zengargoyle in travis, *it works* ...
11:38 eveo Ven``: You can use :16($foo) to parse all the weird stuff like 0x prefixes
11:39 Ven`` I'll update my rakudo to see if that's the issue.
11:39 zengargoyle either install --depsonly is conking out or travis is killing it for some reason.
11:39 eveo Might be...
11:41 zengargoyle https://travis-ci.org/zengargoyle/p6-TestMe/jobs/245741510
11:41 scimon :zengargoyle yeah when I tried all for one per line (because copy pasta) that worked in linux but not osx. Arg.
11:41 zengargoyle mine passed the osx also...
11:42 eveo Hmm... Wonder if it's the proc regression that crashes
11:42 eveo You could try 2017.05 rakudo instead of latest
11:42 eveo Though IIRC it crashes less on OSX than on Linux
11:43 eveo Oh wait no, that was for another already fixed bug
11:44 eveo buggable: eco mustach
11:44 buggable eveo, Template::Mustache 'A logic-free, cross-language templating format': https://github.com/softmoth/p6-Template-Mustache
11:46 eveo don't see it do any proc piping, but maybe zef does
11:47 eveo anyway, yeah, trying 2017.05 rakudo instead of latest is worth a try.
11:47 * eveo &
11:47 eveo left #perl6
11:47 scimon I'll add it to the list :)
11:48 Ven`` nope, evne with the new version, the REPL doesn't show the failure
11:49 AlexDaniel joined #perl6
11:50 Ven`` m: say 'a'.group-by(2);
11:50 camelia rakudo-moar 86e7b2: OUTPUT: «No such method 'group-by' for invocant of type 'Str'␤  in block <unit> at <tmp> line 1␤␤»
11:50 Ven`` the REPL is acting weird...
11:55 pmurias joined #perl6
12:05 zengargoyle .tel eveo 2017.05 passed the install --depsonly
12:05 zengargoyle .tell eveo 2017.05 passed the install --depsonly
12:05 yoleaux zengargoyle: I'll pass your message to eveo.
12:05 zengargoyle scimon: ^^^
12:05 eveo joined #perl6
12:06 araraloren joined #perl6
12:06 eveo zengargoyle: scimon OK, then it could well be the proc issue. The ticket is this and should be fixed this or next week. https://rt.perl.org/Ticket/Display.html?id=131592
12:06 yoleaux 12:05Z <zengargoyle> eveo: 2017.05 passed the install --depsonly
12:07 eveo Ven``: what perl6 version are you on?
12:07 Ven`` eveo: I just pull'd && made
12:07 eveo maybe I should do another toaster run for latest IO changes
12:07 Ven`` I got tons of "WARNING: unhandled Failure detected in DESTROY. If you meant to ignore it, you can mark it as handled by calling .Bool, .so, .not, or .defined methods. The Failure was:" in my for loop
12:08 Ven`` every iteration of my (buggy) for loop
12:08 zengargoyle cool, this or another proc thing was the same little glitch i ran into a few days ago. :)
12:08 eveo Ven``: that indicates the REPL fails to sink that for loop and the Failure never expldoes
12:09 * eveo builds latest and greatest
12:09 Ven`` well, many a failure
12:09 Ven`` it doesn't sink each iteration
12:09 * zengargoyle is starting to get the hang of using `hub` and `travis` CLI tools for the never ending quest of browser avoidance.
12:10 Ven`` I get it twice, even...
12:10 Ven`` ohhh, I get it now.
12:10 eveo ?
12:10 Ven`` I get, all in a row, all the failures from the previous `for` loops
12:10 Ven`` when I didn't get any failure.
12:10 eveo Yeah, you get that warning when an unhandled Failure gets GCed
12:11 Ven`` yes, but I'd expect `for { buggy code here }` to fail there and then
12:11 Ven`` not to wait until the next GC run to DESTROY them
12:11 eveo It's not buggy. It's failury
12:11 nadim joined #perl6
12:11 eveo So handle your Failures then :P
12:12 Ven`` why isn't the content of my for sink'd?
12:12 eveo Because it's a bug in REPL
12:12 Ven`` fair enough then
12:12 eveo Actually, no
12:12 eveo Works fine for me.
12:12 eveo Ven``: what exactly are you running that you get no explosions?
12:13 eveo When I run my $s = '0x098647820001114a00000000'; for $s.comb { say $s.substr(0, ++$).parse-base(16); } it explodes
12:13 Ven`` eveo: https://gist.github.com/vendethiel/1fb39987c4fed4e964464391c499feea
12:14 eveo Ah, I had `say` in mine
12:14 eveo m: my $s = '0x098647820001114a00000000'; for $s.comb { $s.substr(0, ++$).parse-base(16); }
12:14 camelia rakudo-moar 86e7b2: OUTPUT: «Cannot convert string to number: malformed base-16 number in '0⏏5x' (indicated by ⏏)␤  in block <unit> at <tmp> line 1␤␤»
12:15 eveo m: for 1 { +'x' }; $ = $
12:15 camelia rakudo-moar 86e7b2: OUTPUT: «WARNINGS for <tmp>:␤Useless use of "+" in expression "+'x'" in sink context (line 1)␤»
12:15 eveo mc: for 1 { +'x' }; $ = $
12:15 committable6 eveo, ¦2015.12: «WARNINGS for /tmp/rFF2_jEaGn:␤Useless use of "+" in expression "+'x'" in sink context (line 1)»
12:16 araraloren evening
12:16 Ven`` eveo: can you confirm the bug (failures not sunk) without the `say`?
12:18 eveo Ven``: 1 sec
12:18 eveo m: for 1 { ^2 .map: &say }
12:18 camelia rakudo-moar 86e7b2: OUTPUT: «===SORRY!===␤Cannot find method 'count' on object of type NQPMu␤»
12:19 eveo ^ other bugs are interfering with my research :)
12:20 Ven`` oh. :o
12:21 eveo Ven``: filed: https://rt.perl.org/Ticket/Display.html?id=131622
12:21 eveo It's not just the REPL, but a general thing
12:21 eveo m: &say.^name
12:21 camelia rakudo-moar 86e7b2: ( no output )
12:21 eveo m: &say.^name.say
12:21 camelia rakudo-moar 86e7b2: OUTPUT: «Sub␤»
12:22 scimon eveo: Thanks. I now have to joy of a 2 hour long meeting... yay.
12:22 timotimo i wonder if we should supply things like base64 and different compression algos as Decoder/Encoder objects?
12:22 Ven`` eveo++
12:23 Ven`` omg, a timotimo! hi.
12:23 timotimo yo ven
12:25 eveo And ticket for the count method thing: https://rt.perl.org/Ticket/Display.html?id=131623
12:25 Juerd timotimo: That could be a nice addition for https://gist.github.com/Juerd/ae574b87d40a66649692 even
12:25 eveo timotimo: sounds a fine idea for a module :)
12:26 eveo That's the whole point of Decoder/Encoder innit? User-lang dec./enc.
12:27 timotimo i think so
12:27 jnthn I'm not sure timotimo was meaning "in core", just whether they made sense to do that way as modules :)
12:27 timotimo yup
12:27 eveo \o
12:27 eveo left #perl6
12:27 jnthn And yeah, but we need to write some kind of implementation of the roles that acts as a "composite"
12:28 timotimo right, the "first decode this file as gzip, but the contents are utf8 encoded strings"
12:29 wamba joined #perl6
12:29 mcmillhj joined #perl6
12:30 Juerd timotimo: $foo.decode("gzip").decode([ ::Inf => [ ::uint32 => "utf-8" ] ])? :)
12:31 jnthn But decode is spec'd as blob => str
12:31 Juerd jnthn: I'm ignoring that part :)
12:31 jnthn Which is why it'd more need a composition :)
12:32 * Juerd personally doesn't see any conceptual difference between unpacking/packing and decoding/encoding
12:32 Juerd utf-8 is just another way to pack an integer
12:33 jnthn I'm just sayin' that it'd be more like a single call the .decode passing in a thing that is a composition of gzip and utf-8
12:33 jnthn *call to
12:34 Juerd Then you'd need to come up with a syntax for something that the language already has syntax for: a sequence of operations, each done on the output of the previous one
12:34 timotimo not quite
12:35 timotimo because when you naively just compose these you have different output to input types in between
12:36 Juerd That's another thing we already have syntax for: defining which kind of arguments and return values procedures will have :). Although it'd probably require different method names for returning something else.
12:39 mr-foobar joined #perl6
12:42 TimToady joined #perl6
12:48 TimToady joined #perl6
12:56 mcmillhj joined #perl6
12:57 TimToady joined #perl6
12:58 Cabanossi joined #perl6
13:01 rindolf joined #perl6
13:13 cpage_ joined #perl6
13:16 raschipi joined #perl6
13:17 tyilanmenyn joined #perl6
13:25 mr-foobar joined #perl6
13:36 |oLa|1 joined #perl6
13:37 Grauwolf joined #perl6
13:39 |oLa| joined #perl6
13:45 firstdayonthejob joined #perl6
13:45 |oLa|1 joined #perl6
13:51 |oLa| joined #perl6
14:03 user3 joined #perl6
14:04 user3 I have these 2 lines in a program p.6 and I want to print a usage message when the program is invoked either as "perl6 p.6 --help" or "perl6 p.6 help"
14:04 user3 multi MAIN(:$help) { say 'Usage etc'}
14:04 user3 multi MAIN('help') { callsame MAIN '--help'}
14:04 user3 This works for "perl6 p.6 --help" but not for "perl6 p.6 help"
14:05 user3 I've tried a number of variations on callsame MAIN ... but I can't get it right
14:07 raschipi user3: subcommands like that seems to be a hot topic in the last few days. I don't know the answer, but hopefully someone can help you.
14:07 [Coke] --help and help are two different things.
14:07 user3 yes, of course
14:08 geekosaur user3, when invoking MAIN within perl6, it would need to be :help not '--help'
14:08 user3 both work
14:08 user3 oops
14:09 user3 not sure
14:09 [Coke] also, "say $?USAGE" could be the body for both.
14:09 rurban joined #perl6
14:10 [Coke] (hurm, maybe not)
14:10 geekosaur the translation from command line form to internal pair form is not built into MAIN, it's built into perl 6's command line handling, so when invoking MAIN from within perl 6 you need to use the pair form.
14:10 [Coke] multi MAIN('help') { MAIN :help }
14:10 awwaiid joined #perl6
14:10 user3 trying it...
14:11 [Coke] m: say $?USAGE
14:11 camelia rakudo-moar 86e7b2: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Variable '$?USAGE' is not declared␤at <tmp>:1␤------> 3say 7⏏5$?USAGE␤»
14:11 [Coke] m: multi MAIN('eek') { ... } ; say $?USAGE
14:11 camelia rakudo-moar 86e7b2: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Variable '$?USAGE' is not declared␤at <tmp>:1␤------> 3multi MAIN('eek') { ... } ; say 7⏏5$?USAGE␤»
14:11 [Coke] m: sub MAIN('eek') { ... } ; say $?USAGE
14:11 camelia rakudo-moar 86e7b2: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Variable '$?USAGE' is not declared␤at <tmp>:1␤------> 3sub MAIN('eek') { ... } ; say 7⏏5$?USAGE␤»
14:11 * [Coke] wonders if the docs on $?USAGE need .. removing
14:13 user3 ok, that works to print the Usage message but I also get this error message: Too many positionals passed; expected 0 arguments but got 1
14:14 [Coke] can you nopaste your source?
14:14 [Coke] (and the command line you used)
14:15 rurban1 joined #perl6
14:15 user3 well, my source is just the 2 lines above, with the modification your suggested for the 2nd line
14:16 [Coke] with that, if I run 'perl6 foo.p6 --help' and 'perl6 foo.p6 help', I get the usage each time, no warnings.
14:16 [Coke] what version of perl6 are you using?
14:17 [Coke] https://gist.github.com/coke/7bd482ccea8940f9846432a220dce5fa
14:18 Util The hackathon has started; see: https://github.com/dcbpw/tpc-2017-dc/wiki
14:18 yoleaux 01:33Z <MasterDuke> Util: can anyone show up to the Perl 6 hackathon tomorrow? i wasn't able to make it to the conference, but could probably come down for some of the afternoon/evening assuming you don't need to have paid for the conference to participate
14:18 user3 This is Rakudo version 2017.04.3-176-g824cfa3 built on MoarVM version 2017.04-56-g8ad18b8 implementing Perl 6.c
14:18 Util MasterDuke: Yes, anyone can come! (awwaiid says so!)
14:19 scimon Enjoy folks.
14:19 user3 This is my source: multi MAIN(:$help) { say 'Usage etc' }; multi MAIN('help') { callsame MAIN :help}
14:19 [Coke] why callsame?
14:19 user3 And I get precisely this whey I run perl6 p.6 help
14:19 user3 Usage etc
14:20 user3 Too many positionals passed; expected 0 arguments but got 1 in sub MAIN at p.6 line 1 in block <unit> at p.6 line 1
14:20 user3 [Coke]: I'm learning p.6 and I try different commands
14:20 user3 *I'm learning perl 6
14:20 [Coke] "Very often, a re-dispatch passes the same argument along that the caller received, so there is a special routine for that: callsame"
14:21 [Coke] you're explicitly trying to get to another method with different args, so don't try to call it that way.
14:21 user3 ok
14:21 [Coke] so, remove 'callsame', and it works.
14:21 awwaiid joined #perl6
14:21 user3 wow
14:21 user3 that works now
14:22 user3 why is callsame useful for, exactly?
14:22 user3 *what
14:22 raschipi user3: when you don't actually know the name you have been called with
14:22 [Coke] user3: https://perl6.party/post/Perl6-But-Heres-My-Dispatch-So-Callwith-Maybe
14:22 [Coke] zoffix did a deep dive there a few months ago.
14:23 raschipi Or when you want to mess with  P6's dispatch, nice
14:27 [Coke] user3: so maybe "nextwith :help" might be appropriate.
14:27 [Coke] (nope, that has no output. hurm.)
14:28 Cabanossi joined #perl6
14:29 user3 it would be cleaner to avoid re-using the name "MAIN" in the second form
14:30 user3 that is, nextwith would be cleaner (if it worked)
14:31 Util eveo, Ulti: Regarding the not-to-be-introspected Junctions from yesterday;
14:31 Util Brian's code that is parsing .perl instead of introspection is in 18m58s-20m12s of:
14:31 Util https://www.youtube.com/watch?v=D16wa-gnFwE
14:32 eveo joined #perl6
14:32 eveo Util: do you know the timecode where it's mentioned?
14:32 awwaiid joined #perl6
14:33 Util 18m58s-20m12s , as I said  :^)
14:34 eveo Ah, right :D
14:34 AlexDani` joined #perl6
14:34 Util The slide that show his code is up for that 74 seconds.
14:34 * [Coke] did not realize there were two Brian Duggans
14:35 eveo dafuq
14:35 Util Coke: Yes, one is Brian Duggan (pronounced doo-gan), the other is Brian Duggan (pronounced dug-an).
14:36 nadim joined #perl6
14:36 eveo m:sub foo("foo") {}; &foo.signature.params[0].constraints[0].^name.say
14:36 evalable6 eveo, rakudo-moar 86e7b2bd2: OUTPUT: «Junction»
14:36 eveo mc: sub foo("foo") {}; &foo.signature.params[0].constraints[0].^name.say
14:36 committable6 eveo, ¦2015.12: «Junction»
14:37 lichtkind joined #perl6
14:37 eveo why ain't it just a Str
14:37 eveo I bet there's some perf to gain right there and then
14:37 bwisti joined #perl6
14:37 moritz looks like a bug to me
14:37 eveo mc: sub foo(1) {}; &foo.signature.params[0].constraints[0].^name.say
14:37 committable6 eveo, ¦2015.12: «Junction»
14:37 eveo Yeah
14:38 awwaiid joined #perl6
14:38 * [Coke] wonders why rakudobrew build nom generates Creating tools/build/install-jvm-runner.pl ...
14:38 eveo Hm, I don't see any Junctions in ASTs for the sub itself. It prolly the .constraints stuff that makes it; to shove all the constraints in it
14:39 user3 [Coke]: it's samewith, not nextwith
14:39 user3 it works now
14:39 eveo Yup: https://github.com/rakudo/rakudo/blob/86e7b2b/src/core/Parameter.pm#L96
14:40 eveo Mistery solved \o/
14:44 awwaiid joined #perl6
14:46 [Coke] eveo check the # of elems, and only all() if >1 ?
14:47 eveo mhm
14:47 eveo Well... dunno. Is this stuff used in core somewhere?
14:48 eveo The "always get a junction" is nice than variable return type
14:48 eveo Not my area of expertise, so I'll leave it for someone else :)
14:48 [Coke] user3: oh, right, because callwith requires it to have been a matching candidate to start with.
14:48 [Coke] (ditto nextwith)
14:49 [Coke] user3++
14:52 aindilis joined #perl6
14:54 Util eveo, Ulti: Brian just showed me his slides; the code is on #33,#34 of bduggan.github.io/meta-perl6-cli/
14:54 dha joined #perl6
14:55 eveo Util: yeah, I found where the junction is made
14:55 eveo https://github.com/rakudo/rakudo/blob/86e7b2b/src/core/Parameter.pm#L96
14:55 dha joined #perl6
14:57 wamba joined #perl6
14:58 zengargoyle Util++ mice talk.
14:59 * eveo giggles
15:01 eveo gah, Glot.IO is still on v2017.01
15:02 eveo Makes my shiny use of ≥ crash :/
15:02 eveo I guess I'll wait for next R* before telling them to upgrade, since 2017.04 was kinda of a lemon
15:04 donaldh joined #perl6
15:05 awwaiid joined #perl6
15:08 raschipi Is it possible to collapse a junction with just one element into it's element? Because junctions are meant to be used in boolean context, and it isn't easy to collapse them...
15:11 perlpilot raschipi: "is it possible?" questions almost always have an affirmative answer with Perl  ;)
15:11 rurban joined #perl6
15:11 raschipi Yeah, but is it easy...
15:11 perlpilot (and I say "almost" to account for those questions where the laws of the universe are violated :)
15:12 Util zengargoyle: Thanks! But, do you really mean *my* talk (Perl 6...brain), or Brian's (CLI metaprogramming)?
15:12 perlpilot Util: I liked your talk too (just watched it last night)
15:12 eveo raschipi: you're not meant to. Whether it's easy or impossible is irrelevant.
15:13 eveo m: say gather <a b c>.any».take
15:13 camelia rakudo-moar 86e7b2: OUTPUT: «(a b c)␤»
15:13 Cabanossi joined #perl6
15:13 perlpilot Util: I was anticipating some of your slides as you revealed that you do some of the exact same things that I do  :)
15:14 raschipi I know you're not meant to in normal circunstances, but if I want to introspect a constrain and p6 gives me a junction, I will have to unbox it...
15:17 eveo It'll likely be -> ;; $_? is raw { #`(Block|72808472) ... } more often than not.
15:19 eveo New blog post: "Perl 6: Seqs, Drugs, And Rock'n'Roll": https://perl6.party/post/Perl-6-Seqs-Drugs-and-Rock-n-Roll
15:21 awwaiid joined #perl6
15:24 raiph joined #perl6
15:25 Xliff Can someone tell me why I am getting "Missing block (apparently claimed by expression)
15:25 Xliff " in this block: https://gist.github.com/Xliff/f5a310aa0672e72e68154fb8fba50c40
15:26 eveo Xliff: don't see anything wrong with that code
15:26 geekosaur er?
15:26 Xliff eveo: That's what I thought... nevertheless, there is still an error.
15:27 khw joined #perl6
15:27 eveo Xliff: prove it :)
15:27 geekosaur isn't the given itself wrong?
15:27 Xliff It is surrounded by "for $*REPO.repo-chain { ... }"
15:27 AlexDaniel yea, given what?
15:27 eveo Ah yeah :)
15:27 eveo Xliff: remove the `given` block
15:27 Xliff What is wrong with the given? I thought that form would assume $_
15:27 eveo entirely
15:28 geekosaur Xliff, given *binds* $_
15:28 user3 joined #perl6
15:28 eveo Xliff: no, it aliases stuff to $_ and you didn't give it stuff to alias
15:28 geekosaur to the expression you give it
15:28 Xliff figgers
15:28 geekosaur which expression is your block, as written
15:28 eveo Xliff: and you don't need to, since you already have `for` aliasing it for you
15:29 eveo m: for ^3 { when 2 { .say } }
15:29 camelia rakudo-moar 86e7b2: OUTPUT: «2␤»
15:29 eveo left #perl6
15:30 cdg joined #perl6
15:31 user3 I have another question regarding multi MAIN, namely I if I put this code in a file p.6 and I invoke it without arguments, that is "perl6 p.6", it calls the second form instead of the first:
15:31 user3 multi MAIN() { say 'this'}; multi MAIN(:$help) { say 'that' }
15:32 user3 ???
15:32 awwaiid joined #perl6
15:33 moritz user3: named arguments are optional by default
15:33 geekosaur both of them match the usage, the later one wins. (absence of --help means $help is False)
15:33 user3 but the 1st form is more "narrow"
15:33 moritz user3: if you say  multi MAIN(:$help!) { }, it'll be called
15:34 nadim joined #perl6
15:34 user3 ok
15:35 Xliff Thanks eveo++ and geekosaur++
15:35 cdg_ joined #perl6
15:38 awwaiid joined #perl6
15:39 zengargoyle Util: your talk :)  the number of times i did some p6 or even p6(5.22+ish) and then went back to 5.8 or 5.10 for production ...
15:42 Xliff Why "Texas" in "Texas Equivalents"?
15:42 zengargoyle everything's bigger in Texas...
15:42 moritz in texas, everything is bigger
15:42 raschipi Because they're bigger, like everything in Texas
15:42 Xliff LOL
15:42 moritz and << is bigger than «
15:42 Xliff I get it now. :P
15:43 Xliff And y'all couldn't just say "Larger Equivalents" right?
15:43 Xliff Coz it just wasn't "big" enough? :)
15:43 raschipi In Brazil, they can be called Operadores de Itu.
15:43 zengargoyle not punny enough.
15:43 Xliff zengargoyle: that too.
15:44 bdmatatu joined #perl6
15:49 awwaiid joined #perl6
15:49 Util zengargoyle, perlpilot : cool! I am glad you both liked it. Thanks for saying so.
15:50 moritz Util: the slides looked pretty good. Would've loved to have been there
15:51 raschipi Util, moritz do you have a link to the slides?
15:51 * zengargoyle thinks p6 is just a ploy to improve unicode awareness and input methods.  sorta like sneaking in those metric units in soda bottles. :P
15:53 zengargoyle http://hack.p6c.org/~util/talks/
15:53 raschipi zengargoyle: is cocaine also a ploy to get people hooked into metric units?
15:54 zengargoyle so says the first slide of the talk. https://www.youtube.com/watch?v=EUXclZ_d0DQ
15:54 awwaiid joined #perl6
15:57 [Coke] (I think texas is also meant to evoke the USASCII-only world at the opposite end of unicode on the spectrum)
15:58 moritz [Coke]: maybe, but that's not such a fun story to tell :-)
15:58 zengargoyle heh, i remember the 70-80's when kids tv was trying to convert the US to metric... i'm still trying to force my brain as much as possible.
16:04 rightfold zengargoyle: we could do a little quiz
16:04 rightfold For example: how many meters in a kilometer?
16:04 rightfold Or this tricky one: how many milliliters in a centiliter?
16:05 raschipi How many yards in a meter?
16:05 rightfold How many bytes in a kilobyte? :trollface:
16:05 awwaiid joined #perl6
16:05 zengargoyle double the celsius, subtract 1/10th (floor) add 32.
16:05 rightfold Convert via Kelvin
16:06 geekosaur rankine :p
16:07 rightfold :sadpepe:
16:08 lichtkind joined #perl6
16:12 * zengargoyle wonders if p6 needs a number class that has an associated unit and makes sure all calculations are cromulent. :P
16:13 rightfold Meh, units
16:13 rightfold Why not go full symbolic computation, making units just normal unbound variables
16:13 Cabanossi joined #perl6
16:13 zengargoyle i think somebody did a p5 moose thingy that did that.  some physics type person.
16:16 awwaiid joined #perl6
16:16 perlpilot zengargoyle: if you search the logs for this channel you'll find the topic of "numbers with units" has come up before  :)
16:17 zengargoyle heh
16:18 * zengargoyle wonders if `units` or some other unit-y type program has a library that could be nativecallable....
16:20 mcmillhj joined #perl6
16:21 rightfold It's not had
16:21 rightfold hard*
16:21 rightfold There's a simple PureScript library that does this
16:23 zengargoyle yeay, i'm just thinking something like units already has all the data.  sorta like relying on unicode tables and timezone information.  let somebody else worry about the fine details.
16:26 awwaiid joined #perl6
16:36 pilne joined #perl6
16:38 awwaiid joined #perl6
16:39 mcmillhj joined #perl6
16:50 mcmillhj joined #perl6
16:52 kurahaupo joined #perl6
16:53 kurahaupo_ joined #perl6
16:54 kurahaupo joined #perl6
16:54 zakharyas joined #perl6
16:54 awwaiid joined #perl6
16:57 Cabanossi joined #perl6
16:59 domidumont joined #perl6
17:04 Geth ¦ doc: a55e9dd9f0 | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Type/Iterator.pod6
17:04 Geth ¦ doc: Document Iterator.count-only and .bool-only
17:04 Geth ¦ doc: review: https://github.com/perl6/doc/commit/a55e9dd9f0
17:05 llfourn joined #perl6
17:05 mcmillhj joined #perl6
17:13 awwaiid joined #perl6
17:18 rurban1 joined #perl6
17:25 wamba joined #perl6
17:27 Cabanossi joined #perl6
17:33 wamba joined #perl6
17:35 |oLa| joined #perl6
17:36 awwaiid joined #perl6
17:37 go|dfish joined #perl6
17:37 rurban joined #perl6
17:38 user3 More questions about "multi MAIN".
17:38 user3 I put the following in a file p.6 and invoke it as "perl6 p.6 help" or "perl6 p.6 --help" (works correctly):
17:38 user3 multi MAIN(:$help!) { say 'this' }; multi MAIN('help') { samewith :help}
17:39 user3 However I think this can be simplified further by declaring an alternative parameter, like in sub f(:color($colour)) { say ''}. This is my best guess but doesnt work:
17:39 user3 multi MAIN('help'(:$help!)) { say 'this' }
17:39 zapwai joined #perl6
17:39 user3 ???
17:39 Ulti user3 what was the command line you wanted?
17:40 user3 perl6 p6 help or perl6 p6 --help
17:40 Ulti command help thing  <--- something like that?
17:40 Ulti so you want both
17:40 user3 i want both to work, yes
17:41 Ulti then yeah you just have a main target with :$help and another with 'help'
17:41 Ulti does that not work?
17:41 user3 heres the error message:
17:41 * Ulti tries out locally
17:42 raschipi The alternative parameters need to have the same type but different spellings, you're looking for parameters of different types.
17:42 user3 oops I get no error message
17:42 user3 it just prints the default Usage message
17:44 Ulti user3: https://gist.github.com/MattOates/eaa7d6bd06616d92b80c1176c9c9cd71
17:44 Ulti that works for me locally ^
17:46 user3 is it the one you tried: multi MAIN('help'(:$help!)) { say 'this' }
17:47 user3 I'm uncertain about the syntax to use, I'm new to perl 6
17:50 awwaiid joined #perl6
17:55 travis-ci joined #perl6
17:55 travis-ci Doc build errored. Zoffix Znet 'Document Iterator.count-only and .bool-only'
17:55 travis-ci https://travis-ci.org/perl6/doc/builds/245874829 https://github.com/perl6/doc/compare/c128bfe1327d...a55e9dd9f00e
17:55 travis-ci left #perl6
17:55 awwaiid joined #perl6
18:06 ramortegui joined #perl6
18:06 awwaiid joined #perl6
18:13 |oLa|1 joined #perl6
18:13 awwaiid joined #perl6
18:14 konsolebox joined #perl6
18:19 awwaiid joined #perl6
18:26 bdmatatu joined #perl6
18:30 awwaiid joined #perl6
18:32 domidumont joined #perl6
18:40 awwaiid joined #perl6
18:44 user3 left #perl6
18:46 awwaiid joined #perl6
18:47 llfourn joined #perl6
18:48 andrzejku joined #perl6
18:52 awwaiid joined #perl6
18:57 awwaiid joined #perl6
18:58 Cabanossi joined #perl6
19:03 awwaiid joined #perl6
19:09 awwaiid joined #perl6
19:20 andrzejku joined #perl6
19:23 Util m: my $fh = open "/expected/to/fail", :w; $fh.print("hi"); $fh.close;
19:23 camelia rakudo-moar 43c176: OUTPUT: «open is disallowed in restricted setting␤  in sub restricted at src/RESTRICTED.setting line 1␤  in sub open at src/RESTRICTED.setting line 9␤  in block <unit> at <tmp> line 1␤␤»
19:23 Util OK, obviously I cannot have Camelia show it to you, but we (at the hackathon) get this error from .print:
19:23 Util Too many positionals passed; expected 1 argument but got 2
19:23 Util Is the Failure working-as-designed and just giving a LTA message, or is there a more substantial problem here?
19:23 awwaiid joined #perl6
19:24 moritz m: say Mu.^can('print')
19:24 camelia rakudo-moar 43c176: OUTPUT: «(print)␤»
19:24 moritz Mu has an argumentless print method
19:24 moritz which you can use like this:
19:24 moritz m: 42.print
19:24 camelia rakudo-moar 43c176: OUTPUT: «42»
19:24 Slaffter joined #perl6
19:24 moritz that's inherited to Failure too
19:25 Util moritz: *should* it be inherited intact to Failure, or should we overide .print in Failure to avoid this LTA message?
19:26 rurban joined #perl6
19:27 moritz Util: I don't know what's best
19:27 moritz m: sub f() { fail 42 }; f().print
19:27 camelia rakudo-moar 43c176: OUTPUT: «42␤  in sub f at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
19:27 moritz it seems to blow up on .print() anway
19:27 moritz then I guess we could override it
19:29 Util m: sub f() { fail 42 }; f().print('foo');
19:29 camelia rakudo-moar 43c176: OUTPUT: «Too many positionals passed; expected 1 argument but got 2␤  in block <unit> at <tmp> line 1␤␤»
19:29 Util ^^ That is what is so confusing; we found it when trying to run `p6doc-index build` on a secured dir without `sudo`.
19:31 llfourn joined #perl6
19:34 awwaiid joined #perl6
19:35 TimToady joined #perl6
19:38 moritz should be easy to fix with a print method with a catch-all signature
19:40 awwaiid joined #perl6
19:42 Util moritz: I see. We will play with this . Thanks!
19:45 rurban joined #perl6
19:47 awwaiid joined #perl6
19:47 TimToady joined #perl6
19:48 mcmillhj joined #perl6
19:51 TimToady joined #perl6
19:53 keylet joined #perl6
19:53 keylet m: my %hash = foo => "bar"; say %hash.elems;
19:53 camelia rakudo-moar 92f8ab: OUTPUT: «1␤»
19:53 keylet m: my %hash; say %hash.elems;
19:53 camelia rakudo-moar 92f8ab: OUTPUT: «0␤»
19:54 keylet m: my %hash = foo => "bar"; say so %hash.elems > 1;
19:54 camelia rakudo-moar 92f8ab: OUTPUT: «False␤»
19:54 masak m: say (%).elems
19:54 camelia rakudo-moar 92f8ab: OUTPUT: «0␤»
19:54 keylet m: my %hash = foo => "bar", lorem => "ipsum"; say so %hash.elems > 1;
19:54 camelia rakudo-moar 92f8ab: OUTPUT: «True␤»
19:54 masak that `so` (in both cases) is not needed
19:55 masak because `>` already gives you a Bool
19:55 keylet masak: ok
19:55 * masak .oO( reduce your keypresses! save the environment! )
19:56 keylet m: my %hash = foo => "bar"; say "lorem ipsum %hash dolor sit";
19:56 camelia rakudo-moar 92f8ab: OUTPUT: «lorem ipsum %hash dolor sit␤»
19:56 keylet m: my %hash = foo => "bar"; say "lorem ipsum {%hash} dolor sit";
19:56 camelia rakudo-moar 92f8ab: OUTPUT: «lorem ipsum foo    bar dolor sit␤»
19:56 keylet m: my %hash = foo => "bar"; say "lorem ipsum {%hash} sit amet";
19:56 camelia rakudo-moar 92f8ab: OUTPUT: «lorem ipsum foo    bar sit amet␤»
19:57 masak m: my %hash = foo => "bar"; say %hash.Str.perl
19:57 camelia rakudo-moar 92f8ab: OUTPUT: «"foo\tbar"␤»
19:57 masak yup; that's a tab character between the "foo" and the "bar"
19:57 moritz m: my %hash = foo => "bar"; say "lorem ipsum %hash{} dolor sit";
19:57 camelia rakudo-moar 92f8ab: OUTPUT: «lorem ipsum foo    bar dolor sit␤»
19:57 TimToady joined #perl6
19:57 awwaiid joined #perl6
19:57 * masak prefers the {%hash} form these days
19:59 keylet m: my %hash; say %hash.elems == 0;
19:59 camelia rakudo-moar 92f8ab: OUTPUT: «True␤»
19:59 keylet m: my %hash; say %hash.elems === 0;
19:59 camelia rakudo-moar 92f8ab: OUTPUT: «True␤»
19:59 keylet m: my %hash; say %hash.elems eq 0;
19:59 camelia rakudo-moar 92f8ab: OUTPUT: «True␤»
19:59 keylet it's funny
20:00 masak m: my %hash; say %hash.elems eqv 0;
20:00 camelia rakudo-moar 92f8ab: OUTPUT: «True␤»
20:00 masak m: my %hash; say %hash.elems ~~ 0;
20:00 camelia rakudo-moar 92f8ab: OUTPUT: «True␤»
20:00 keylet is `==` only correct there?
20:00 espadrine joined #perl6
20:00 masak keylet: to a first approximation, "yes" :)
20:01 masak m: my %hash; say %hash.elems
20:01 camelia rakudo-moar 92f8ab: OUTPUT: «0␤»
20:01 masak m: my %hash; say !%hash.elems
20:01 camelia rakudo-moar 92f8ab: OUTPUT: «True␤»
20:01 masak m: my %hash; say !%hash
20:01 camelia rakudo-moar 92f8ab: OUTPUT: «True␤»
20:01 masak that last one is the shortest way to express "is it empty?"
20:01 setty1 joined #perl6
20:02 moritz it's kinda hard to go shorter than a single character :-)
20:02 masak that's why I could say it with such confidence
20:02 masak though... empty string tends to be the shortest quine in many languages :P
20:03 awwaiid joined #perl6
20:03 itaylor57 joined #perl6
20:05 masak m:
20:05 samcv m: use experimental :collation; say  ('ae', 'ar', 'æ').collate
20:05 camelia rakudo-moar 92f8ab: OUTPUT: «(ae ar æ)␤»
20:05 moritz ... and they are banned from all golf contents :-)
20:06 moritz *contests
20:06 masak what's .collate?
20:06 samcv uses unicode collation algorithm
20:06 moritz sorting with the Unicode collation algorithm
20:06 masak ooh
20:06 moritz masak: you should, like, totally read my book :-)
20:06 samcv https://docs.perl6.org/language/experimental#Collation
20:06 masak I most definitely should
20:07 samcv need to update the page. since you can now reverse the sorting of case, but not touch how diacritics/letters themselves are compared as well
20:07 samcv but basically that there
20:07 masak moritz++ # wrote a book
20:07 masak moritz++ # no, wait, two!?
20:08 samcv m: use experimental :collation; say ('ae', 'ar', 'æ', 'AE').collate
20:08 camelia rakudo-moar 92f8ab: OUTPUT: «(ae ar AE æ)␤»
20:08 keylet m: my %hash = foo => "bar"; say "[tag {%hash.fmt('%s="%s"')}][/tag]";
20:08 camelia rakudo-moar 92f8ab: OUTPUT: «[tag foo="bar"][/tag]␤»
20:08 keylet m: my %hash = foo => 100500; say "[tag {%hash.fmt('%s="%s"')}][/tag]";
20:08 camelia rakudo-moar 92f8ab: OUTPUT: «[tag foo="100500"][/tag]␤»
20:08 samcv m: use experimental :collation; say  ('ae', 'ar', 'æ', 'AE','bc','rf', '12').collate
20:08 camelia rakudo-moar 92f8ab: OUTPUT: «(12 ae ar AE bc rf æ)␤»
20:09 samcv working on getting æ sorting in the right place atm. which is complex. which is why i'm testing it here
20:09 samcv so far multiple collation keys for a single codepoint are NYI but the rest is
20:09 samcv though the next step is much more complex :X
20:10 awwaiid joined #perl6
20:13 TEttinger joined #perl6
20:14 samcv :O \o/ making progress
20:14 samcv got (12 ae ar æ AE bc rf) as the collation result for sorting  ('ae', 'ar', 'æ', 'AE','bc','rf', '12') finally
20:14 samcv which i *think* is correct :)
20:14 samcv i mean it looks rigth visually. heh
20:16 samcv right now it uses kind of simplistic things not using actual 'arrays' and only single primary,secondary, tetriary values for each cp, but the code i'm working on now actually uses arrays which will enable fancy stuff like having æ sort with ae as i luckily finally got :)
20:17 rurban1 joined #perl6
20:18 bdmatatu left #perl6
20:21 rurban joined #perl6
20:24 mcmillhj joined #perl6
20:26 rurban1 joined #perl6
20:27 nadim joined #perl6
20:27 awwaiid joined #perl6
20:31 mr-fooba_ joined #perl6
20:31 rurban joined #perl6
20:33 zakharyas joined #perl6
20:34 raschipi samcv: (12 ae ar æ AE bc rf) --> But æ isn't sorting with ae, it's sorting with ar...
20:36 rurban1 joined #perl6
20:41 rurban joined #perl6
20:43 rurban1 joined #perl6
20:44 samcv yeah it is. but ignore that
20:44 samcv haha
20:44 mcmillhj joined #perl6
20:45 samcv that's caused by a different issue, but the fact that it's sorting with the a's means it's working
20:46 raschipi noice
20:46 raschipi you're looking into localized collation rules too? Or just doing the general case?
20:46 samcv general case is first, but i will be looking into localizied as well
20:47 awwaiid joined #perl6
20:48 raschipi Localized collation rules have to follow localized casefolding rules. In Turquish, 'i' and 'I' don't collate togheter.
20:49 samcv the reason æ is sorting after ar is because the first collation key æ has. its tertiary (the case-like one) is different than for a
20:49 samcv slightly
20:49 raschipi It's titlecase?
20:50 kyan joined #perl6
20:50 samcv no. it's just 3 for a and 5 for æ
20:50 samcv i think it's 8 for A or something
20:52 mcmillhj joined #perl6
20:54 awwaiid joined #perl6
20:54 MasterDuke joined #perl6
20:58 Cabanossi joined #perl6
20:58 raschipi samcv++. G'night
20:58 samcv night :)
21:00 rurban joined #perl6
21:01 AlexDaniel joined #perl6
21:06 awwaiid joined #perl6
21:09 rurban1 joined #perl6
21:12 awwaiid joined #perl6
21:14 masak I still want to write a presentation (kind of a whitepaper) about 007
21:16 perlpilot masak: does that move us closer to having macros in Perl 6?   ;-)
21:17 rurban1 left #perl6
21:19 rouking_ What do you guys recommend for web backends with P6?
21:19 rouking_ Guessing no webservers have support for it yet
21:20 lichtkind cheers
21:20 lichtkind moritz ping
21:20 lizmat rouking_: https://github.com/Bailador/Bailador ?
21:20 lichtkind hugs Liz
21:21 lizmat lichtkind o/  long time no see!
21:21 perlpilot rouking_: what lizmat said.  Maybe https://github.com/tokuhirom/p6-Crust if you don't want the webapp frameworky bits
21:22 lichtkind indee lizmat
21:22 lichtkind lizmat, come to HH?
21:22 lizmat most likely not
21:23 lichtkind so i have to come to the amsterdam
21:23 awwaiid joined #perl6
21:24 lizmat lichtkind: I'm afraid so  :-)
21:24 lichtkind lizmat life is so hard
21:25 lichtkind are you involved in perl6doc too?
21:25 lizmat lichtkind: I've done some documentation patches, but that's about it :-)
21:27 masak perlpilot: yes
21:28 masak perlpilot: 007 is primarily a testing-ground for macros for Perl 6
21:30 masak perlpilot: onlly secondarily is it a language in its own regard, and an opportunity for its language designer to grind his own axe ;)
21:32 masak only* ax*; lag
21:33 * masak .oO( language designer rule MCCXXVI: they tell you that not grinding your ax is a good thing, but it turns out you can't not grind your ax )
21:34 awwaiid joined #perl6
21:38 alimon joined #perl6
21:39 lichtkind lizmat, i discovered then im still owner of Perl6::Doc and its so outdated so i ponder what to do with it, any clues what to put in as perl 6 doc first?
21:40 lizmat mark it as "historical" ?
21:40 lichtkind but we can fill in some actual content
21:41 lizmat I think all of the documentation effort is now done for docs.perl6.org
21:41 lizmat and it's hard enough already to get people to document already  :-(
21:43 lichtkind i didnt spoke of the tablets
21:43 lichtkind i mean ther perl 5 module
21:43 lichtkind which still list apocaplypses and stuff
21:43 lichtkind i want to fill ther eoyur stuff
21:43 lichtkind fresh stuff
21:44 lichtkind question is how about it and what are the important bits to start migrate first
21:44 lizmat are we talking about https://metacpan.org/pod/Perl6::Doc ?
21:44 lichtkind yes
21:45 lizmat "As of version 0.40, this distribution has been overhauled and is no longer maintained by Herbert Breunung, who originally took it over from ingy and audreyt."  ??
21:45 lichtkind im still owner since audrey gave me this
21:45 lichtkind yes but hinrik didnt do much either
21:45 lichtkind i already contacted him to get decision
21:46 lichtkind i wna tin it what title say some content of doc.perl6.org
21:46 awwaiid joined #perl6
21:47 lizmat fwiw, it feels to me you're going to put in a lot of work that will not be appreciated
21:47 lizmat fwiw, I would suggest removing it from PAUSE
21:49 prodotiscus joined #perl6
21:51 lichtkind i kdont know what fwiw means but yes that would be my feel to but i rather have some tuits to do another docs module and this could reuse some of the inner workings, just replace some content, which at least was the thought i had
21:51 lizmat for what it's worth
21:51 lichtkind thanks
21:52 awwaiid joined #perl6
21:52 lichtkind but yes i should remove it as soon hinrik answers
21:52 lizmat lichtkind: if you would like to work on documentation, there's still quite some open tickets on doc :-)
21:52 lizmat afaik
21:53 prodotiscus I see my module Dictionary::Create on modules.perl6.org, but travis status is "unknown"
21:53 El_Che stmuk: I got a mac at work (in addition to a Linux and a Windows laptop :) ). I noticed that when installing Rakudo Star you have to drag a Folder to application instead of an icon. Also in Application there is a folder Rakudo instead of a Perl6 app. This is by design? Maybe, as a cli app, Rakudo should be in Application? This is how git behaves.
21:53 lichtkind my focus is rather on making infos better searchable and better conectable, if im fixing stuff in the process its coleteral
21:53 prodotiscus it seems to be wrong, because you can see `build|passed` on https://github.com/prodotiscus/perl6-Dictionary-Create
21:53 prodotiscus what is this?
21:54 lizmat lichtkind: I'd like to see the default WHY method in the setting produce some sort of short text for all of the builtins
21:54 prodotiscus * build|passing
21:54 MasterDuke joined #perl6
21:55 lichtkind lizmat, sounds desirable plus wasnt it the original plan of $larry?
21:55 lizmat that seems likely   :-)
21:55 lizmat m: say Int.WHY
21:55 camelia rakudo-moar 4693ec: OUTPUT: «No documentation available for type 'Int'.␤Perhaps it can be found at https://docs.perl6.org/type/Int␤»
21:55 lizmat that's the current state
21:57 prodotiscus joined #perl6
22:01 masak lichtkind: maybe instead of removing it, might replace it with something that clearly links to docs.perl6.org ?
22:03 awwaiid joined #perl6
22:06 lichtkind masak sounds more helpful
22:07 lichtkind masak gues who i thought of when we discussed gotos in compiler building and dijsktras algorithm
22:09 Geth ¦ doc: 7d9e87c61a | (Steve Mynott)++ | Build.pm
22:09 Geth ¦ doc: Fix RT#131025 which is due to Build.pm failing to install docs under
22:09 Geth ¦ doc:
22:09 Geth ¦ doc: 'share' type path but .perl6 instead due to assumption about order of
22:09 Geth ¦ doc: repo-chain. We now search for 'site' explicitly.
22:09 Geth ¦ doc: review: https://github.com/perl6/doc/commit/7d9e87c61a
22:09 synopsebot6 Link:  https://rt.perl.org/rt3/Public/Bug/Display.html?id=131025
22:11 stmuk El_Che: originally I had the folder as an icon but people complained "it's actually a folder not an icon" so I changed it
22:13 masak lichtkind: ...Dijkstra? :P
22:13 Cabanossi joined #perl6
22:14 lichtkind of nanodijkstra of cours
22:15 lichtkind our dr didnt knew the joke
22:15 awwaiid joined #perl6
22:17 stmuk el_che: https://github.com/rakudo/star/commit/00fd1959016e72ca4ca75b6120a97872385b419b
22:17 stmuk I don't particularly care either way so if you want to revert its fine
22:19 stmuk The reason rakudo is used rather than perl6 is to support alternative implementations
22:20 lichtkind masak, hope i see you bookingland
22:21 awwaiid joined #perl6
22:34 awwaiid joined #perl6
22:34 El_Che stmuk: thx. I'll have a look. Not a lot of experience with what's expected on osx, so maybe those users are right. It just struck me weird
22:36 stmuk I think it's wierd either way
22:38 stmuk it's basically a command line app anyway .. not very useful from clicking on icons
22:40 awwaiid joined #perl6
22:44 SCHAPiE joined #perl6
22:59 TimToady joined #perl6
22:59 travis-ci joined #perl6
22:59 travis-ci Doc build errored. Steve Mynott 'Fix RT#131025 which is due to Build.pm failing to install docs under
22:59 travis-ci https://travis-ci.org/perl6/doc/builds/245983699 https://github.com/perl6/doc/compare/a55e9dd9f00e...7d9e87c61a5f
22:59 travis-ci left #perl6
22:59 synopsebot6 Link:  https://rt.perl.org/rt3/Public/Bug/Display.html?id=131025
22:59 BenGoldberg joined #perl6
23:02 awwaiid joined #perl6
23:02 El_Che stmuk: if I am not mistaken, git just added an uninstall script in /usr/local and chose not to add the icon/map in Applications in Finder
23:05 Ben_Goldberg joined #perl6
23:09 Ben_Goldberg joined #perl6
23:11 stmuk There was feedback (which I didn't find very useful) at https://groups.perlists.pm/sympa/arc/london.pm/2016-02/msg00030.html
23:18 nhywyll joined #perl6
23:20 cdg joined #perl6
23:21 nhywyll joined #perl6
23:23 awwaiid joined #perl6
23:28 awwaiid joined #perl6
23:34 awwaiid joined #perl6
23:39 TEttinger joined #perl6
23:40 awwaiid joined #perl6
23:46 awwaiid joined #perl6
23:51 awwaiid joined #perl6

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

Perl 6 | Reference Documentation | Rakudo