»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
Set by moritz on 22 December 2015.
AlexDaniel m: say 1.WHAT 00:04
camelia (Int)
AlexDaniel BenGoldberg: because this? ↑
00:05 mcmillhj joined
BenGoldberg m: my int $x = 1; say $x.WHAT; 00:05
camelia (Int)
AlexDaniel hm
wait…
m: multi foo(Int) { ‘boxed’ }; multi foo(int) { ‘native’ }; say foo(1)
camelia boxed
AlexDaniel I'm getting “native” here… 00:06
c: all multi foo(Int) { ‘boxed’ }; multi foo(int) { ‘native’ }; say foo(1)
committable6 AlexDaniel, gist.github.com/674f621559c4475095...196ceae4dc
AlexDaniel bisect: all multi foo(Int) { ‘boxed’ }; multi foo(int) { ‘native’ }; say foo(1)
bisectable6 AlexDaniel, Bisecting by output (old=2015.12 new=86e7b2b) because on both starting points the exit code is 0
AlexDaniel blargh
bisect: multi foo(Int) { ‘boxed’ }; multi foo(int) { ‘native’ }; say foo(1)
bisectable6 AlexDaniel, bisect log: gist.github.com/3b76312cfb21e40120...a2237687c2
AlexDaniel, (2017-06-08) github.com/rakudo/rakudo/commit/cc...15f4103752
AlexDaniel, Bisecting by output (old=2015.12 new=86e7b2b) because on both starting points the exit code is 0
AlexDaniel, bisect log: gist.github.com/c492e405d214e16f64...2e07a3e7b8
AlexDaniel, (2017-06-08) github.com/rakudo/rakudo/commit/cc...15f4103752
AlexDaniel BenGoldberg: there's a comment under that commit that seems to be relevant 00:08
00:09 mcmillhj left
AlexDaniel so a literal is always an Int 00:09
m: multi foo(Int) { ‘boxed’ }; multi foo(int) { ‘native’ }; say foo(1)
camelia boxed
AlexDaniel m: multi foo(Int) { ‘boxed’ }; multi foo(int) { ‘native’ }; say foo(int.new(1)) 00:10
camelia boxed
AlexDaniel yeah, okay, you have to use a variable…
00:12 Cabanossi left 00:14 Cabanossi joined 00:20 xerx left 00:24 lookatme joined
lookatme morning 00:24
00:31 dj_goku left
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:37
BenGoldberg Got it. 00:38
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:40
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:45
timotimo github.com/timo/p6profiler-tools/c...7c1cf677b6 - 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
and with that i disappear into bed
01:01 mcmillhj joined 01:08 mcmillhj left
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:11
01:15 Actualeyes joined 01:16 aborazmeh joined, aborazmeh left, aborazmeh joined
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 converting
Foo[Int]
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 No such method 'Foo[Str]' for invocant of type 'Bar'
in block <unit> at <tmp> line 1
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
yoleaux MasterDuke: I'll pass your message to Util.
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 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 01:46 ilbot3 left 01:48 raschipi joined, ilbot3 joined, ChanServ sets mode: +v ilbot3 01:50 raschipi left
awwaiid Util: github.com/perl6/roast/pull/97 and 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:54
Util: Here is the direct link to the colon wiki page, thelackthereof.org/Perl6_Colons (though my server is being flaky, it'll be back eventually) 01:57
02:09 mcmillhj left 02:25 noganex_ joined, Unavowed_ left 02:27 Unavowed joined, noganex left
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
BenGoldberg, Output on both points: «256»
02:36 Unavowed left 02:39 Unavowed joined
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
BenGoldberg, Output on both points: «256»
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 } );
bisectable6 BenGoldberg, On both starting points (old=2015.12 new=86e7b2b) the exit code is 0 and the output is identical as well
BenGoldberg, Output on both points: «0»
BenGoldberg j: my role a[$b] { }; constant c = a[:()]; dd c 02:41
camelia ===SORRY!===
setcodeobj can only be used with a CodeRef
BenGoldberg j: my role a[$b] { }; constant c = a.^parameterize: :(); dd c 02:42
camelia a[Signature]
02:44 awwaiid left, AlexDaniel left 02:46 awwaiid joined 02:51 awwaiid left, awwaiid joined, lookatme left 02:52 lookatme joined 02:55 kurahaupo_ joined 02:56 awwaiid left 02:57 Cabanossi left, awwaiid joined, kurahaupo left 02:58 Cabanossi joined 03:02 awwaiid left, kurahaupo_ left, awwaiid joined 03:07 awwaiid left 03:08 awwaiid joined 03:12 awwaiid left 03:14 KDr2_ joined 03:19 awwaiid joined 03:24 awwaiid left 03:27 Cabanossi left, dj_goku joined 03:28 Cabanossi joined 03:41 awwaiid joined, Cabanossi left 03:42 Cabanossi joined 03:45 awwaiid left 03:46 awwaiid joined 03:47 pilne left 03:51 awwaiid left 03:54 khw left 04:09 wamba joined, awwaiid joined 04:14 awwaiid left, awwaiid joined 04:18 awwaiid left 04:25 awwaiid joined 04:29 awwaiid left 04:36 awwaiid joined 04:44 awwaiid left 04:46 aborazmeh left, mr-foobar joined 04:50 bwisti left 04:51 curan joined 04:56 Cabanossi left 04:58 Cabanossi joined 05:00 rurban joined, rurban left 05:01 xtreak joined 05:06 awwaiid joined 05:14 petercom1and is now known as petercommand, petercommand left, petercommand joined, awwaiid left 05:15 awwaiid joined 05:16 aindilis` left 05:30 TimToady left 05:32 cog_ left 05:37 astj left 05:38 astj joined 05:41 astj left, astj joined 05:43 TimToady joined 05:48 TimToady left 05:49 mr-foobar left 05:52 wamba left 05:55 Cabanossi left 05:58 Cabanossi joined, TimToady joined 06:00 mr-foobar joined, BenGoldberg left 06:05 ufobat joined 06:27 Cabanossi left 06:28 Cabanossi joined 06:39 xtreak left, xtreak joined 06:42 xtreak left 06:43 xtreak joined 06:49 xtreak left 06:53 rurban joined 07:05 wamba joined 07:11 scimon joined 07:25 Cabanossi left
keylet m: say 'string'[-1]; 07:27
camelia 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;
keylet m: say 'string'[0];
camelia string
keylet m: say 'string'[2]; 07:28
camelia Index out of range. Is: 2, should be in 0..0
in block <unit> at <tmp> line 1
07:28 Cabanossi joined
keylet m: say 'string'.Arr; 07:28
camelia No such method 'Arr' for invocant of type 'Str'
in block <unit> at <tmp> line 1
keylet is there an alternative to Python's 'string'[-2] to get `n` ?
07:29 dakkar joined
moritz m: say 'string'.substr(*-2, 1) 07:33
camelia n
keylet m: say 'string'.substr(*-1, 1) 07:39
camelia g
keylet thank you moritz
m: say ''.substr(*-1, 1) 07:43
camelia Start argument to substr out of range. Is: -1, should be in 0..0;
in block <unit> at <tmp> line 1
keylet m: my Str $foo = ''; say so $foo eq '' or $foo.substr(*-1, 1) ne ' ' 07:44
camelia WARNINGS for <tmp>:
Useless use of "ne" in expression ".substr(*-1, 1) ne ' '" in sink context (line 1)
True
keylet m: my Str $foo = ''; say so $foo eq '' or $foo.substr(*-1, 1) ne ' ';
camelia WARNINGS for <tmp>:
Useless use of "ne" in expression ".substr(*-1, 1) ne ' '" in sink context (line 1)
True
moritz m: say ''.substr(*-1, 1) // ''
camelia
keylet say so '' ne ' '; 07:45
evalable6 True
07:46 wamba left 07:58 zakharyas joined 08:03 keylet left, jonas1 joined 08:08 abraxxa joined
scimon Well good news. I'm consistently breaking travis. travis-ci.org/Scimon/perl6-build-t.../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
And it breaks.
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:09
08:15 lowbro joined, lowbro left, lowbro joined 08:25 Cabanossi left 08:27 cog_ joined 08:28 zakharyas left, Cabanossi joined 08:30 rurban1 joined 08:31 zakharyas joined, rurban2 joined 08:34 rurban left 08:35 rurban1 left 08:36 |oLa| joined 08:46 [ptc] joined 08:51 cog_ left, keylet joined
keylet m: my Int $count = 5; say "[m{$count.Str}]"; 08:52
camelia [m5]
08:52 TEttinger left 08:56 ufobat left, ufobat joined 09:12 Cabanossi left 09:13 Cabanossi joined
keylet m: my Str $foo where $_ ne 'bar' = 'test'; 09:13
camelia ( no output )
keylet m: my Str $foo where $_ ne 'bar' = 'test'; $foo = 'a';
camelia ( no output )
keylet m: my Str $foo where $_ ne 'bar' = 'test'; $foo = 'a'; $foo = 'bar';
camelia Type check failed in assignment to $foo; expected <anon> but got Str ("bar")
in block <unit> at <tmp> line 1
keylet m: sub test (Str $foo where not $_ ~~ /[ ' || "]/) { return $foo; }; 09:15
camelia 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
keylet m: sub test (Str $foo where not $_ ~~ /[ ' || "]/) { return $foo; }
camelia 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
keylet glot.io/snippets/er1g8lv9rz 09:18
look, it's wonderful! :)
09:28 wamba joined
timotimo m: sub test (Str $foo where none(/[' || "]/)) { return $foo }; test("yo"); test("yo'yo") 09:30
camelia 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
timotimo m: sub test (Str $foo where none(/<['"]>/)) { return $foo }; test("yo"); test("yo'yo")
camelia 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
timotimo m: sub test (Str $foo where .contains(none("'", '"'))) { say $foo }; test("yo"); test("yo'yo") 09:31
camelia 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
keylet it should be escaped
with \
timotimo no need if you use a character class
keylet m: sub test (Str $foo where none(/[\' || \"]/)) { return $foo }; test("yo"); test("yo'yo")
camelia 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
keylet timotimo: ok
timotimo and you can also use no regex at all for this
keylet ------> e.WHAT === Str ?? $title !! $title.Str, ⏏$new = True, $without-tab = True); 09:33
Variable '$new' is not declared
should I use 'my' there?
timotimo you can
or put a "my $new" in the line before it
keylet a have a method: method append (Str $innerText, Bool $new?, Bool $without-tab?) 09:34
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
lookatme no, that is python way 09:36
keylet self!append($title.WHAT === Str ?? $title !! $title.Str, True, True);
it that a Perl way? 09:37
* is
timotimo docs.perl6.org/type/Signature#Sign...e_Literals
lookatme Declare named parameter `(:$new)`, then call with `(:new)`
tadzik the trailing True-s look a bit like WinAPI way to me
timotimo that is indeed a perl way. there's also the perl way for named arguments that works a bit differently
tadzik it should also take 7 undefs 09:38
timotimo yeah, they do, tadzik
also the function needs to have its name end in Ex
nobody uses non-Ex functions todays
09:39 lookatme left 09:40 lookatme joined
lookatme bye ~~ 09:42
09:42 lookatme left 09:52 rurban2 left, itaylor57 left 10:04 cog_ joined 10:05 itaylor57 joined 10:10 domidumont joined 10:16 mcmillhj joined 10:21 mcmillhj left
scimon 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
I'm also going to try a docker build at some point.
10:28 cog_ left 10:31 mcmillhj joined 10:35 mcmillhj left 10:45 mcmillhj joined 10:50 mcmillhj left 10:53 MasterDuke left 10:55 rurban joined
scimon (doing the zef install for all 4 at once also fails) 10:56
10:57 keylet left 11:01 [particle] left, [particle] joined 11:05 cog_ joined 11:06 prodotiscus joined
scimon I have opened an issue withTravis about the fun I'm having. 11:16
11:19 mcmillhj joined 11:21 eveo joined
zengargoyle scimon++ 11:21
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.
Geth ecosystem: 0a3f06fc31 | prodotiscus++ | META.list
Add Dictionary::Create to ecosystem

See github.com/prodotiscus/perl6-Dictionary-Create
11:23
zengargoyle i've tried with no sudo (but still a script) and it still fails.
scimon eveo: I'll get rid of them. I've been using mi6 to gen my modules and that's what it adds.
zengargoyle but it fails in the zef install part before getting to the final script.
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:25 mcmillhj left
scimon going back to all in one bit. Removed script and sudo section and added 2017.06 as a perl6 version. 11:27
And now going on lunch. 11:28
zengargoyle i've run a few pared down cases from zengargoyle/p6-TestMe,
prodotiscus I'm trying to `zef install Dictionary::Create` now, but zef says `===> Searching for: Dictionary::Create` and don't find it 11:29
* doesn't
is it ok?
eveo buggable: eco dictionary
buggable eveo, Search::Dict 'a fast binary search of dictionary like files': github.com/zengargoyle/p6-Search-Dict
eveo prodotiscus: what distro is that module in? Are you sure it exists? 11:30
prodotiscus you can see, a added it to ecosystem
but it is my first module upload, so I could do somthing wrong
11:31 Ven joined
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 github.com/prodotiscus/perl6-Dictionary-Create [14:23] <+Geth> ¦ ecosystem: review: github.com/perl6/ecosystem/commit/0a3f06fc31
11:31 Ven is now known as Guest71719, Guest71719 is now known as Ven``
eveo prodotiscus: try again. You can just tried to update it before the ecosystem got update 11:31
Ven`` m: for $s.comb { say $s.substr(0, ++$).parse-base(16); } 11:32
camelia 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
eveo tried to install it I mean
Ven`` m: $s = '0234234'; for $s.comb { say $s.substr(0, ++$).parse-base(16); }
camelia 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
Ven`` *sigh*
m: my $s = '0234234'; for $s.comb { say $s.substr(0, ++$).parse-base(16); }
camelia 0
2
35
564
9026
144419
2310708
prodotiscus eveo: try zef install again?
zengargoyle prodotiscus: `zef search Dictionary::Create` finds it now. :)
prodotiscus ok, thank you :) 11:33
Ven`` I don't understand that m:
eveo prodotiscus: yes, last eco update should've run at 28m
Ven`` I don't seem to mutate the string...
fwiw, without parse-base:
m: my $s = '0234234'; for $s.comb { say $s.substr(0, ++$); }
camelia 0
02
023
0234
02342
023423
0234234
Ven`` it works without the .parse-base
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
Ven`` prodotiscus: ??
I know what m: does – I mean I don't understand the results I get.
prodotiscus Ven``: I thought you do not understand what `m:` does, sorry :)
Ven`` I wasn't clear, my bad 11:35
eveo m: say '0234234'.parse-base: 16
camelia 2310708
eveo Ven``: looks right? What part confuses you?
parsebase treats the numeral in the string as being in base 16 above 11:36
m: say 2310708.base: 16
camelia 234234
Ven`` oh, I must be behind on my local version.
It stops after the first iteration
m: my $s = '0x098647820001114a00000000'; for $s.comb { say $s.substr(0, ++$).parse-base(16); } 11:37
camelia 0
Cannot convert string to number: malformed base-16 number in '030⏏5x' (indicated by ⏏)
in block <unit> at <tmp> line 1
Ven`` oh, maybe the exception isn't printed because of the say in the REPL
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)
in travis, *it works* ...
eveo Ven``: You can use :16($foo) to parse all the weird stuff like 0x prefixes
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.
eveo Might be...
zengargoyle travis-ci.org/zengargoyle/p6-TestM.../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.
zengargoyle mine passed the osx also...
eveo Hmm... Wonder if it's the proc regression that crashes 11:42
You could try 2017.05 rakudo instead of latest
Though IIRC it crashes less on OSX than on Linux
Oh wait no, that was for another already fixed bug 11:43
buggable: eco mustach 11:44
buggable eveo, Template::Mustache 'A logic-free, cross-language templating format': github.com/softmoth/p6-Template-Mustache
eveo don't see it do any proc piping, but maybe zef does 11:46
anyway, yeah, trying 2017.05 rakudo instead of latest is worth a try. 11:47
eveo &
11:47 eveo left
scimon I'll add it to the list :) 11:47
Ven`` nope, evne with the new version, the REPL doesn't show the failure 11:48
11:49 AlexDaniel joined
Ven`` m: say 'a'.group-by(2); 11:50
camelia No such method 'group-by' for invocant of type 'Str'
in block <unit> at <tmp> line 1
Ven`` the REPL is acting weird...
11:55 pmurias joined 12:03 DesertJellyFish is now known as philanthrope
zengargoyle .tel eveo 2017.05 passed the install --depsonly 12:05
.tell eveo 2017.05 passed the install --depsonly
yoleaux zengargoyle: I'll pass your message to eveo.
zengargoyle scimon: ^^^
12:05 eveo joined, philanthrope is now known as ibouvousaime 12:06 araraloren joined
eveo zengargoyle: scimon OK, then it could well be the proc issue. The ticket is this and should be fixed this or next week. rt.perl.org/Ticket/Display.html?id=131592 12:06
yoleaux 12:05Z <zengargoyle> eveo: 2017.05 passed the install --depsonly
eveo Ven``: what perl6 version are you on? 12:07
Ven`` eveo: I just pull'd && made
eveo maybe I should do another toaster run for latest IO changes
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
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. :)
eveo Ven``: that indicates the REPL fails to sink that for loop and the Failure never expldoes
eveo builds latest and greatest 12:09
Ven`` well, many a failure
it doesn't sink each iteration
zengargoyle is starting to get the hang of using `hub` and `travis` CLI tools for the never ending quest of browser avoidance.
Ven`` I get it twice, even... 12:10
ohhh, I get it now.
eveo ?
Ven`` I get, all in a row, all the failures from the previous `for` loops
when I didn't get any failure.
eveo Yeah, you get that warning when an unhandled Failure gets GCed
Ven`` yes, but I'd expect `for { buggy code here }` to fail there and then 12:11
not to wait until the next GC run to DESTROY them
eveo It's not buggy. It's failury
12:11 nadim joined
eveo So handle your Failures then :P 12:11
Ven`` why isn't the content of my for sink'd? 12:12
eveo Because it's a bug in REPL
Ven`` fair enough then
eveo Actually, no
Works fine for me.
Ven``: what exactly are you running that you get no explosions?
12:12 ibouvousaime is now known as DesertJellyfish
eveo When I run my $s = '0x098647820001114a00000000'; for $s.comb { say $s.substr(0, ++$).parse-base(16); } it explodes 12:13
Ven`` eveo: gist.github.com/vendethiel/1fb3998...91c499feea
12:13 KDr2_ left
eveo Ah, I had `say` in mine 12:14
m: my $s = '0x098647820001114a00000000'; for $s.comb { $s.substr(0, ++$).parse-base(16); }
camelia Cannot convert string to number: malformed base-16 number in '030⏏5x' (indicated by ⏏)
in block <unit> at <tmp> line 1
eveo m: for 1 { +'x' }; $ = $ 12:15
camelia WARNINGS for <tmp>:
Useless use of "+" in expression "+'x'" in sink context (line 1)
eveo mc: for 1 { +'x' }; $ = $
committable6 eveo, ¦2015.12: «WARNINGS for /tmp/rFF2_jEaGn:␤Useless use of "+" in expression "+'x'" in sink context (line 1)»
araraloren evening 12:16
Ven`` eveo: can you confirm the bug (failures not sunk) without the `say`?
12:16 rurban left
eveo Ven``: 1 sec 12:18
m: for 1 { ^2 .map: &say }
camelia ===SORRY!===
Cannot find method 'count' on object of type NQPMu
eveo ^ other bugs are interfering with my research :) 12:19
Ven`` oh. :o 12:20
eveo Ven``: filed: rt.perl.org/Ticket/Display.html?id=131622 12:21
It's not just the REPL, but a general thing
m: &say.^name
camelia ( no output )
eveo m: &say.^name.say
camelia Sub
12:22 wamba left
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?
Ven`` eveo++
omg, a timotimo! hi. 12:23
12:23 mr-foobar left
timotimo yo ven 12:23
12:25 TimToady left
eveo And ticket for the count method thing: rt.perl.org/Ticket/Display.html?id=131623 12:25
Juerd timotimo: That could be a nice addition for gist.github.com/Juerd/ae574b87d40a66649692 even
eveo timotimo: sounds a fine idea for a module :)
That's the whole point of Decoder/Encoder innit? User-lang dec./enc. 12:26
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 :)
timotimo yup
eveo \o
12:27 eveo left
jnthn And yeah, but we need to write some kind of implementation of the roles that acts as a "composite" 12:27
timotimo right, the "first decode this file as gzip, but the contents are utf8 encoded strings" 12:28
12:29 wamba joined, mcmillhj joined
Juerd timotimo: $foo.decode("gzip").decode([ ::Inf => [ ::uint32 => "utf-8" ] ])? :) 12:30
jnthn But decode is spec'd as blob => str 12:31
Juerd jnthn: I'm ignoring that part :)
jnthn Which is why it'd more need a composition :)
Juerd personally doesn't see any conceptual difference between unpacking/packing and decoding/encoding 12:32
utf-8 is just another way to pack an integer
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
*call to
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
12:34 mcmillhj left
timotimo not quite 12:34
because when you naively just compose these you have different output to input types in between 12:35
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:36
12:39 mr-foobar joined 12:42 TimToady joined, prodotiscus left 12:47 TimToady left 12:48 TimToady joined 12:53 TimToady left 12:56 mcmillhj joined, Cabanossi left 12:57 TimToady joined 12:58 Cabanossi joined 13:00 cpage_ left 13:01 rindolf joined 13:04 mr-foobar left 13:13 cpage_ joined 13:16 raschipi joined 13:17 tyilanmenyn joined 13:18 tyil left 13:25 mr-foobar joined 13:28 Ven`` left 13:36 |oLa|1 joined 13:37 Grauwolf left, |oLa| left, Grauwolf joined 13:39 |oLa| joined 13:43 |oLa|1 left 13:45 curan left, firstdayonthejob joined, |oLa|1 joined 13:46 jonas1 left 13:49 |oLa| left 13:51 |oLa| joined 13:54 |oLa|1 left 14:03 user3 joined
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
multi MAIN(:$help) { say 'Usage etc'}
multi MAIN('help') { callsame MAIN '--help'}
This works for "perl6 p.6 --help" but not for "perl6 p.6 help"
I've tried a number of variations on callsame MAIN ... but I can't get it right 14:05
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.
user3 yes, of course
geekosaur user3, when invoking MAIN within perl6, it would need to be :help not '--help' 14:08
user3 both work
oops
14:09 awwaiid left
user3 not sure 14:09
[Coke] also, "say $?USAGE" could be the body for both.
14:09 rurban joined
[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.
[Coke] multi MAIN('help') { MAIN :help }
14:10 awwaiid joined
user3 trying it... 14:10
[Coke] m: say $?USAGE 14:11
camelia 5===SORRY!5=== Error while compiling <tmp>
Variable '$?USAGE' is not declared
at <tmp>:1
------> 3say 7⏏5$?USAGE
[Coke] m: multi MAIN('eek') { ... } ; say $?USAGE
camelia 5===SORRY!5=== Error while compiling <tmp>
Variable '$?USAGE' is not declared
at <tmp>:1
------> 3multi MAIN('eek') { ... } ; say 7⏏5$?USAGE
[Coke] m: sub MAIN('eek') { ... } ; say $?USAGE
camelia 5===SORRY!5=== Error while compiling <tmp>
Variable '$?USAGE' is not declared
at <tmp>:1
------> 3sub MAIN('eek') { ... } ; say 7⏏5$?USAGE
[Coke] wonders if the docs on $?USAGE need .. removing
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:13
[Coke] can you nopaste your source? 14:14
(and the command line you used)
14:14 awwaiid left 14:15 rurban1 joined
user3 well, my source is just the 2 lines above, with the modification your suggested for the 2nd line 14:15
[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
what version of perl6 are you using?
gist.github.com/coke/7bd482ccea894...a220dce5fa 14:17
Util The hackathon has started; see: 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
user3 This is Rakudo version 2017.04.3-176-g824cfa3 built on MoarVM version 2017.04-56-g8ad18b8 implementing Perl 6.c
Util MasterDuke: Yes, anyone can come! (awwaiid says so!)
14:18 rurban left
scimon Enjoy folks. 14:19
user3 This is my source: multi MAIN(:$help) { say 'Usage etc' }; multi MAIN('help') { callsame MAIN :help}
[Coke] why callsame?
user3 And I get precisely this whey I run perl6 p.6 help
Usage etc
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
[Coke]: I'm learning p.6 and I try different commands
*I'm learning perl 6
[Coke] "Very often, a re-dispatch passes the same argument along that the caller received, so there is a special routine for that: callsame"
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
[Coke] so, remove 'callsame', and it works.
14:21 awwaiid joined
user3 wow 14:21
that works now
why is callsame useful for, exactly? 14:22
*what
raschipi user3: when you don't actually know the name you have been called with
[Coke] user3: perl6.party/post/Perl6-But-Heres-M...with-Maybe
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:25 Cabanossi left 14:26 awwaiid left
[Coke] user3: so maybe "nextwith :help" might be appropriate. 14:27
(nope, that has no output. hurm.)
14:28 Cabanossi joined, nadim left
user3 it would be cleaner to avoid re-using the name "MAIN" in the second form 14:29
that is, nextwith would be cleaner (if it worked) 14:30
Util eveo, Ulti: Regarding the not-to-be-introspected Junctions from yesterday; 14:31
Brian's code that is parsing .perl instead of introspection is in 18m58s-20m12s of:
www.youtube.com/watch?v=D16wa-gnFwE
14:32 eveo joined
eveo Util: do you know the timecode where it's mentioned? 14:32
14:32 awwaiid joined
Util 18m58s-20m12s , as I said :^) 14:33
eveo Ah, right :D 14:34
14:34 AlexDani` joined
Util The slide that show his code is up for that 74 seconds. 14:34
[Coke] did not realize there were two Brian Duggans
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, AlexDaniel left
eveo m:sub foo("foo") {}; &foo.signature.params[0].constraints[0].^name.say 14:36
evalable6 Junction
eveo mc: sub foo("foo") {}; &foo.signature.params[0].constraints[0].^name.say
committable6 eveo, ¦2015.12: «Junction»
14:37 lichtkind joined
eveo why ain't it just a Str 14:37
I bet there's some perf to gain right there and then
14:37 bwisti joined, awwaiid left
moritz looks like a bug to me 14:37
eveo mc: sub foo(1) {}; &foo.signature.params[0].constraints[0].^name.say
committable6 eveo, ¦2015.12: «Junction»
14:37 dogbert11 left
eveo Yeah 14:37
14:38 awwaiid joined
[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
user3 [Coke]: it's samewith, not nextwith 14:39
it works now
eveo Yup: github.com/rakudo/rakudo/blob/86e7...ter.pm#L96
Mistery solved \o/ 14:40
14:42 awwaiid left 14:44 awwaiid joined
[Coke] eveo check the # of elems, and only all() if >1 ? 14:46
eveo mhm 14:47
Well... dunno. Is this stuff used in core somewhere?
The "always get a junction" is nice than variable return type 14:48
Not my area of expertise, so I'll leave it for someone else :)
[Coke] user3: oh, right, because callwith requires it to have been a matching candidate to start with.
(ditto nextwith)
user3++ 14:49
14:49 awwaiid left 14:52 wamba left, aindilis joined
Util eveo, Ulti: Brian just showed me his slides; the code is on #33,#34 of bduggan.github.io/meta-perl6-cli/ 14:54
14:55 dha joined, dha left
eveo Util: yeah, I found where the junction is made 14:55
github.com/rakudo/rakudo/blob/86e7...ter.pm#L96
14:55 dha joined, dha left 14:56 rurban1 left 14:57 wamba joined
zengargoyle Util++ mice talk. 14:58
eveo giggles 14:59
gah, Glot.IO is still on v2017.01 15:01
Makes my shiny use of ≥ crash :/ 15:02
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 15:05 awwaiid joined
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:08
15:10 Cabanossi left
perlpilot raschipi: "is it possible?" questions almost always have an affirmative answer with Perl ;) 15:11
15:11 rurban joined
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 :)
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)
eveo raschipi: you're not meant to. Whether it's easy or impossible is irrelevant.
m: say gather <a b c>.any».take 15:13
camelia (a b c)
15:13 Cabanossi joined
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:13
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:14
15:16 user3 left
eveo It'll likely be -> ;; $_? is raw { #`(Block|72808472) ... } more often than not. 15:17
15:18 awwaiid left
eveo New blog post: "Perl 6: Seqs, Drugs, And Rock'n'Roll": perl6.party/post/Perl-6-Seqs-Drugs...ock-n-Roll 15:19
15:21 awwaiid joined, raiph left 15:23 AlexDani` is now known as AlexDaniel, nadim left 15:24 raiph joined
Xliff Can someone tell me why I am getting "Missing block (apparently claimed by expression) 15:25
" in this block: gist.github.com/Xliff/f5a310aa0672...b8fba50c40
15:26 awwaiid left
eveo Xliff: don't see anything wrong with that code 15:26
geekosaur er?
Xliff eveo: That's what I thought... nevertheless, there is still an error.
15:27 khw joined
eveo Xliff: prove it :) 15:27
geekosaur isn't the given itself wrong?
Xliff It is surrounded by "for $*REPO.repo-chain { ... }"
AlexDaniel yea, given what?
eveo Ah yeah :)
Xliff: remove the `given` block
Xliff What is wrong with the given? I thought that form would assume $_
eveo entirely
geekosaur Xliff, given *binds* $_ 15:28
15:28 user3 joined
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
Xliff figgers
geekosaur which expression is your block, as written
eveo Xliff: and you don't need to, since you already have `for` aliasing it for you
m: for ^3 { when 2 { .say } } 15:29
camelia 2
15:29 eveo left 15:30 cdg joined
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
multi MAIN() { say 'this'}; multi MAIN(:$help) { say 'that' }
??? 15:32
15:32 awwaiid joined
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)
user3 but the 1st form is more "narrow"
moritz user3: if you say multi MAIN(:$help!) { }, it'll be called
15:34 nadim joined
user3 ok 15:34
Xliff Thanks eveo++ and geekosaur++ 15:35
15:35 cdg_ joined 15:37 awwaiid left, lowbro left 15:38 awwaiid joined 15:39 cdg left
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:39
15:41 domidumont left
Xliff Why "Texas" in "Texas Equivalents"? 15:42
15:42 awwaiid left
zengargoyle everything's bigger in Texas... 15:42
moritz in texas, everything is bigger
raschipi Because they're bigger, like everything in Texas
Xliff LOL
moritz and << is bigger than «
Xliff I get it now. :P
And y'all couldn't just say "Larger Equivalents" right? 15:43
Coz it just wasn't "big" enough? :)
raschipi In Brazil, they can be called Operadores de Itu.
zengargoyle not punny enough.
Xliff zengargoyle: that too.
15:44 bdmatatu joined 15:49 awwaiid joined
Util zengargoyle, perlpilot : cool! I am glad you both liked it. Thanks for saying so. 15:49
moritz Util: the slides looked pretty good. Would've loved to have been there 15:50
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:51 abraxxa left
zengargoyle hack.p6c.org/~util/talks/ 15:53
15:53 awwaiid left
raschipi zengargoyle: is cocaine also a ploy to get people hooked into metric units? 15:53
zengargoyle so says the first slide of the talk. www.youtube.com/watch?v=EUXclZ_d0DQ 15:54
15:54 awwaiid joined, zakharyas left 15:56 lichtkind left
[Coke] (I think texas is also meant to evoke the USASCII-only world at the opposite end of unicode on the spectrum) 15:57
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.
15:59 awwaiid left 16:01 scimon left
rightfold zengargoyle: we could do a little quiz 16:04
For example: how many meters in a kilometer?
Or this tricky one: how many milliliters in a centiliter?
raschipi How many yards in a meter? 16:05
rightfold How many bytes in a kilobyte? :trollface:
16:05 awwaiid joined
zengargoyle double the celsius, subtract 1/10th (floor) add 32. 16:05
rightfold Convert via Kelvin
geekosaur rankine :p 16:06
16:07 donaldh left
rightfold :sadpepe: 16:07
16:09 lichtkind joined 16:10 nadim left, awwaiid left 16:11 Cabanossi left
zengargoyle wonders if p6 needs a number class that has an associated unit and makes sure all calculations are cromulent. :P 16:12
16:12 mcmillhj left
rightfold Meh, units 16:13
Why not go full symbolic computation, making units just normal unbound variables
16:13 Cabanossi joined, wamba left
zengargoyle i think somebody did a p5 moose thingy that did that. some physics type person. 16:13
16:15 ufobat left 16:16 awwaiid joined
perlpilot zengargoyle: if you search the logs for this channel you'll find the topic of "numbers with units" has come up before :) 16:16
zengargoyle heh 16:17
zengargoyle wonders if `units` or some other unit-y type program has a library that could be nativecallable.... 16:18
16:20 awwaiid left, mcmillhj joined 16:21 |oLa| left
rightfold It's not had 16:21
hard*
There's a simple PureScript library that does this
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:23
16:25 mcmillhj left 16:26 awwaiid joined 16:28 dakkar left 16:30 araraloren left 16:36 pilne joined 16:37 awwaiid left 16:38 awwaiid joined 16:39 go|dfish left, mcmillhj joined 16:41 pilne is now known as CodeSnow 16:43 awwaiid left 16:44 mcmillhj left 16:48 bdmatatu left 16:50 mcmillhj joined 16:52 kurahaupo joined 16:53 kurahaupo_ joined, kurahaupo_ left, kurahaupo left 16:54 kurahaupo joined, zakharyas joined, awwaiid joined 16:55 mcmillhj left 16:56 Cabanossi left 16:57 Cabanossi joined 16:59 domidumont joined 17:03 llfourn left
Geth doc: a55e9dd9f0 | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Type/Iterator.pod6
Document Iterator.count-only and .bool-only
17:04
17:05 llfourn joined, mcmillhj joined 17:06 awwaiid left 17:07 AlexDaniel left 17:13 awwaiid joined 17:18 awwaiid left, rurban1 joined 17:21 rurban left 17:24 zakharyas left 17:25 wamba joined 17:27 Cabanossi left, Cabanossi joined 17:32 wamba left 17:33 wamba joined 17:35 |oLa| joined 17:36 awwaiid joined 17:37 go|dfish joined, rurban joined
user3 More questions about "multi MAIN". 17:38
I put the following in a file p.6 and invoke it as "perl6 p.6 help" or "perl6 p.6 --help" (works correctly):
multi MAIN(:$help!) { say 'this' }; multi MAIN('help') { samewith :help}
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
multi MAIN('help'(:$help!)) { say 'this' }
17:39 zapwai joined
user3 ??? 17:39
17:39 rurban1 left
Ulti user3 what was the command line you wanted? 17:39
user3 perl6 p6 help or perl6 p6 --help 17:40
Ulti command help thing <--- something like that?
so you want both
user3 i want both to work, yes
Ulti then yeah you just have a main target with :$help and another with 'help' 17:41
does that not work?
user3 heres the error message:
Ulti tries out locally
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
it just prints the default Usage message
Ulti user3: gist.github.com/MattOates/eaa7d6bd...76c9c9cd71 17:44
that works for me locally ^
user3 is it the one you tried: multi MAIN('help'(:$help!)) { say 'this' } 17:46
I'm uncertain about the syntax to use, I'm new to perl 6 17:47
17:48 awwaiid left 17:50 awwaiid joined 17:54 awwaiid left 17:55 travis-ci joined
travis-ci Doc build errored. Zoffix Znet 'Document Iterator.count-only and .bool-only' 17:55
travis-ci.org/perl6/doc/builds/245874829 github.com/perl6/doc/compare/c128b...5e9dd9f00e
17:55 travis-ci left, awwaiid joined 18:00 awwaiid left 18:06 ramortegui joined, ramortegui left, awwaiid joined 18:09 konsolebox left 18:12 awwaiid left 18:13 |oLa|1 joined, |oLa| left, awwaiid joined 18:14 konsolebox joined 18:18 awwaiid left 18:19 awwaiid joined 18:23 awwaiid left 18:26 bdmatatu joined 18:30 domidumont left, awwaiid joined 18:32 domidumont joined 18:35 llfourn left 18:37 awwaiid left 18:40 awwaiid joined 18:44 user3 left, awwaiid left 18:45 rurban left 18:46 awwaiid joined 18:47 llfourn joined 18:48 andrzejku joined 18:50 awwaiid left 18:52 awwaiid joined 18:56 awwaiid left, Cabanossi left 18:57 awwaiid joined 18:58 Cabanossi joined 19:02 llfourn left, awwaiid left 19:03 awwaiid joined 19:09 awwaiid left, awwaiid joined 19:16 andrzejku left 19:17 awwaiid left 19:20 andrzejku joined
Util m: my $fh = open "/expected/to/fail", :w; $fh.print("hi"); $fh.close; 19:23
camelia 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
Util OK, obviously I cannot have Camelia show it to you, but we (at the hackathon) get this error from .print:
Too many positionals passed; expected 1 argument but got 2
Is the Failure working-as-designed and just giving a LTA message, or is there a more substantial problem here?
19:23 awwaiid joined
moritz m: say Mu.^can('print') 19:24
camelia (print)
moritz Mu has an argumentless print method
which you can use like this:
m: 42.print
camelia 42
19:24 Slaffter joined
moritz that's inherited to Failure too 19:24
19:25 domidumont left
Util moritz: *should* it be inherited intact to Failure, or should we overide .print in Failure to avoid this LTA message? 19:25
19:26 Slaffter left, rurban joined, TimToady left
moritz Util: I don't know what's best 19:27
m: sub f() { fail 42 }; f().print
camelia 42
in sub f at <tmp> line 1
in block <unit> at <tmp> line 1
moritz it seems to blow up on .print() anway
then I guess we could override it
19:27 awwaiid left
Util m: sub f() { fail 42 }; f().print('foo'); 19:29
camelia Too many positionals passed; expected 1 argument but got 2
in block <unit> at <tmp> line 1
19:29 rindolf left
Util ^^ That is what is so confusing; we found it when trying to run `p6doc-index build` on a secured dir without `sudo`. 19:29
19:31 llfourn joined 19:34 awwaiid joined 19:35 TimToady joined
moritz should be easy to fix with a print method with a catch-all signature 19:38
19:38 awwaiid left 19:40 awwaiid joined 19:41 rurban left
Util moritz: I see. We will play with this . Thanks! 19:42
19:44 TimToady left 19:45 rurban joined, mcmillhj left 19:46 awwaiid left 19:47 awwaiid joined, TimToady joined 19:48 mcmillhj joined 19:51 awwaiid left, TimToady left, TimToady joined 19:53 keylet joined
keylet m: my %hash = foo => "bar"; say %hash.elems; 19:53
camelia 1
keylet m: my %hash; say %hash.elems;
camelia 0
keylet m: my %hash = foo => "bar"; say so %hash.elems > 1; 19:54
camelia False
masak m: say (%).elems
camelia 0
keylet m: my %hash = foo => "bar", lorem => "ipsum"; say so %hash.elems > 1;
camelia True
masak that `so` (in both cases) is not needed
because `>` already gives you a Bool 19:55
keylet masak: ok
masak .oO( reduce your keypresses! save the environment! )
19:55 TimToady left
keylet m: my %hash = foo => "bar"; say "lorem ipsum %hash dolor sit"; 19:56
camelia lorem ipsum %hash dolor sit
keylet m: my %hash = foo => "bar"; say "lorem ipsum {%hash} dolor sit";
camelia lorem ipsum foo bar dolor sit
keylet m: my %hash = foo => "bar"; say "lorem ipsum {%hash} sit amet";
camelia lorem ipsum foo bar sit amet
masak m: my %hash = foo => "bar"; say %hash.Str.perl 19:57
camelia "foo\tbar"
masak yup; that's a tab character between the "foo" and the "bar"
moritz m: my %hash = foo => "bar"; say "lorem ipsum %hash{} dolor sit";
camelia lorem ipsum foo bar dolor sit
19:57 TimToady joined, awwaiid joined
masak prefers the {%hash} form these days 19:57
keylet m: my %hash; say %hash.elems == 0; 19:59
camelia True
keylet m: my %hash; say %hash.elems === 0;
camelia True
19:59 itaylor57 left
keylet m: my %hash; say %hash.elems eq 0; 19:59
camelia True
keylet it's funny
masak m: my %hash; say %hash.elems eqv 0; 20:00
camelia True
masak m: my %hash; say %hash.elems ~~ 0;
camelia True
keylet is `==` only correct there?
20:00 espadrine joined
masak keylet: to a first approximation, "yes" :) 20:00
m: my %hash; say %hash.elems 20:01
camelia 0
masak m: my %hash; say !%hash.elems
camelia True
masak m: my %hash; say !%hash
camelia True
masak that last one is the shortest way to express "is it empty?"
20:01 setty1 joined
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 awwaiid left
masak though... empty string tends to be the shortest quine in many languages :P 20:02
20:03 awwaiid joined, itaylor57 joined
masak m: 20:05
samcv m: use experimental :collation; say ('ae', 'ar', 'æ').collate
camelia (ae ar æ)
moritz ... and they are banned from all golf contents :-)
*contests 20:06
masak what's .collate?
samcv uses unicode collation algorithm
moritz sorting with the Unicode collation algorithm
masak ooh
moritz masak: you should, like, totally read my book :-)
samcv docs.perl6.org/language/experimental#Collation
masak I most definitely should
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
but basically that there
masak moritz++ # wrote a book
moritz++ # no, wait, two!?
samcv m: use experimental :collation; say ('ae', 'ar', 'æ', 'AE').collate 20:08
camelia (ae ar AE æ)
keylet m: my %hash = foo => "bar"; say "[tag {%hash.fmt('%s="%s"')}][/tag]";
camelia [tag foo="bar"][/tag]
keylet m: my %hash = foo => 100500; say "[tag {%hash.fmt('%s="%s"')}][/tag]";
camelia [tag foo="100500"][/tag]
samcv m: use experimental :collation; say ('ae', 'ar', 'æ', 'AE','bc','rf', '12').collate
camelia (12 ae ar AE bc rf æ)
20:09 awwaiid left
samcv working on getting æ sorting in the right place atm. which is complex. which is why i'm testing it here 20:09
so far multiple collation keys for a single codepoint are NYI but the rest is
though the next step is much more complex :X
20:10 awwaiid joined 20:13 mcmillhj left, TEttinger joined, [ptc] left
samcv :O \o/ making progress 20:14
got (12 ae ar æ AE bc rf) as the collation result for sorting ('ae', 'ar', 'æ', 'AE','bc','rf', '12') finally
which i *think* is correct :)
i mean it looks rigth visually. heh 20:15
20:15 awwaiid left
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:16
20:17 rurban1 joined 20:18 bdmatatu left 20:20 rurban left 20:21 tyilanmenyn is now known as tyil, rurban joined 20:24 rurban1 left, mcmillhj joined 20:26 rurban1 joined 20:27 raiph left, nadim joined 20:28 awwaiid joined 20:29 mcmillhj left 20:30 rurban left 20:31 mr-fooba_ joined, rurban joined 20:33 mr-foobar left, zakharyas joined
raschipi samcv: (12 ae ar æ AE bc rf) --> But æ isn't sorting with ae, it's sorting with ar... 20:34
20:34 rurban1 left 20:36 rurban1 joined 20:39 rurban left 20:40 awwaiid left 20:41 rurban joined 20:42 rurban1 left 20:43 rurban1 joined
samcv yeah it is. but ignore that 20:44
haha
20:44 mcmillhj joined
samcv that's caused by a different issue, but the fact that it's sorting with the a's means it's working 20:45
raschipi noice 20:46
you're looking into localized collation rules too? Or just doing the general case?
samcv general case is first, but i will be looking into localizied as well 20:47
20:47 rurban left, awwaiid joined
raschipi Localized collation rules have to follow localized casefolding rules. In Turquish, 'i' and 'I' don't collate togheter. 20:48
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
slightly
raschipi It's titlecase?
20:49 mcmillhj left 20:50 kyan joined
samcv no. it's just 3 for a and 5 for æ 20:50
i think it's 8 for A or something
20:52 mcmillhj joined, awwaiid left 20:54 awwaiid joined, MasterDuke joined 20:56 zakharyas left, Cabanossi left, kaare_ left 20:58 Cabanossi joined
raschipi samcv++. G'night 20:58
samcv night :)
20:58 alimon left 20:59 awwaiid left 21:00 rurban joined 21:01 AlexDaniel joined 21:02 raschipi left 21:03 andrzejku left 21:04 rurban1 left 21:06 awwaiid joined 21:09 rurban1 joined 21:11 awwaiid left 21:12 awwaiid joined 21:13 rurban left
masak I still want to write a presentation (kind of a whitepaper) about 007 21:14
21:16 mcmillhj left
perlpilot masak: does that move us closer to having macros in Perl 6? ;-) 21:16
21:16 awwaiid left 21:17 rurban1 left
rouking_ What do you guys recommend for web backends with P6? 21:19
Guessing no webservers have support for it yet
lichtkind cheers 21:20
moritz ping
lizmat rouking_: github.com/Bailador/Bailador ?
lichtkind hugs Liz
lizmat lichtkind o/ long time no see! 21:21
perlpilot rouking_: what lizmat said. Maybe github.com/tokuhirom/p6-Crust if you don't want the webapp frameworky bits
lichtkind indee lizmat 21:22
lizmat, come to HH?
lizmat most likely not
lichtkind so i have to come to the amsterdam 21:23
21:23 awwaiid joined
lizmat lichtkind: I'm afraid so :-) 21:24
lichtkind lizmat life is so hard
are you involved in perl6doc too? 21:25
lizmat lichtkind: I've done some documentation patches, but that's about it :-)
masak perlpilot: yes 21:27
21:27 awwaiid left
masak perlpilot: 007 is primarily a testing-ground for macros for Perl 6 21:28
perlpilot: onlly secondarily is it a language in its own regard, and an opportunity for its language designer to grind his own axe ;) 21:30
only* ax*; lag 21:32
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:33
21:34 awwaiid joined 21:36 wamba left 21:38 alimon joined
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:39
21:40 awwaiid left
lizmat mark it as "historical" ? 21:40
lichtkind but we can fill in some actual content
lizmat I think all of the documentation effort is now done for docs.perl6.org 21:41
and it's hard enough already to get people to document already :-(
lichtkind i didnt spoke of the tablets 21:43
i mean ther perl 5 module
which still list apocaplypses and stuff
i want to fill ther eoyur stuff
fresh stuff
question is how about it and what are the important bits to start migrate first 21:44
lizmat are we talking about metacpan.org/pod/Perl6::Doc ?
lichtkind yes
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
yes but hinrik didnt do much either
i already contacted him to get decision
21:46 MasterDuke left
lichtkind i wna tin it what title say some content of doc.perl6.org 21:46
21:46 awwaiid joined
lizmat fwiw, it feels to me you're going to put in a lot of work that will not be appreciated 21:47
fwiw, I would suggest removing it from PAUSE
21:49 prodotiscus joined 21:50 awwaiid left
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
lichtkind thanks
21:52 awwaiid joined
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 :-)
afaik
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.
lichtkind my focus is rather on making infos better searchable and better conectable, if im fixing stuff in the process its coleteral
prodotiscus it seems to be wrong, because you can see `build|passed` on github.com/prodotiscus/perl6-Dictionary-Create
what is this?
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
lichtkind lizmat, sounds desirable plus wasnt it the original plan of $larry? 21:55
21:55 pmurias left
lizmat that seems likely :-) 21:55
m: say Int.WHY
camelia No documentation available for type 'Int'.
Perhaps it can be found at docs.perl6.org/type/Int
»
lizmat that's the current state
21:56 prodotiscus left 21:57 prodotiscus joined
masak lichtkind: maybe instead of removing it, might replace it with something that clearly links to docs.perl6.org ? 22:01
22:01 awwaiid left 22:03 awwaiid joined
lichtkind masak sounds more helpful 22:06
masak gues who i thought of when we discussed gotos in compiler building and dijsktras algorithm 22:07
22:08 MasterDuke left
Geth doc: 7d9e87c61a | (Steve Mynott)++ | Build.pm
Fix RT#131025 which is due to Build.pm failing to install docs under

  'share' type path but .perl6 instead due to assumption about order of
repo-chain. We now search for 'site' explicitly.
22:09
synopsebot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=131025
22:09 awwaiid left 22:10 Cabanossi left
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:11
masak lichtkind: ...Dijkstra? :P 22:13
22:13 Cabanossi joined 22:14 prodotiscus left, setty1 left
lichtkind of nanodijkstra of cours 22:14
our dr didnt knew the joke 22:15
22:15 awwaiid joined
stmuk el_che: github.com/rakudo/star/commit/00fd...72385b419b 22:17
I don't particularly care either way so if you want to revert its fine
The reason rakudo is used rather than perl6 is to support alternative implementations 22:19
lichtkind masak, hope i see you bookingland 22:20
22:20 awwaiid left 22:21 awwaiid joined 22:23 kyan left 22:27 TimToady left, awwaiid left 22:31 espadrine left 22:32 SCHAPiE left 22:34 awwaiid joined
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:34
stmuk I think it's wierd either way 22:36
it's basically a command line app anyway .. not very useful from clicking on icons 22:38
22:39 awwaiid left 22:40 awwaiid joined 22:44 SCHAPiE joined, alimon left 22:55 awwaiid left 22:56 |oLa|1 left 22:59 TimToady joined, travis-ci joined
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.org/perl6/doc/builds/245983699 github.com/perl6/doc/compare/a55e9...9e87c61a5f
22:59 travis-ci left
synopsebot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=131025 22:59
22:59 BenGoldberg joined 23:02 awwaiid joined
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:02
23:05 Ben_Goldberg joined, BenGoldberg left, Ben_Goldberg is now known as BenGoldberg 23:06 awwaiid left 23:09 Ben_Goldberg joined, BenGoldberg left, Ben_Goldberg is now known as BenGoldberg
stmuk There was feedback (which I didn't find very useful) at groups.perlists.pm/sympa/arc/londo...00030.html 23:11
23:18 nhywyll joined 23:20 cdg joined, nhywyll left 23:21 nhywyll joined 23:22 cdg_ left 23:23 awwaiid joined 23:24 cdg left 23:26 BenGoldberg left 23:27 awwaiid left 23:28 awwaiid joined 23:33 awwaiid left 23:34 awwaiid joined 23:35 cpage_ left 23:37 TEttinger left 23:39 awwaiid left, TEttinger joined 23:40 awwaiid joined 23:45 awwaiid left 23:46 awwaiid joined 23:50 awwaiid left 23:51 awwaiid joined 23:55 leego_ is now known as leego