Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2017-06-28

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:09 raschipi joined #perl6
00:09 AlexDaniel joined #perl6
00:09 Geth ¦ doc: fe2b7eb57a | (Will "Coke" Coleda)++ | htmlify.p6
00:09 Geth ¦ doc: avoid SEGV (no really)
00:09 Geth ¦ doc: review: https://github.com/perl6/doc/commit/fe2b7eb57a
00:15 DeadDelta \o/
00:15 DeadDelta :D
00:16 [Coke] onto the next segfault. :(
00:22 aindilis joined #perl6
00:28 cpage_ joined #perl6
00:31 astj joined #perl6
00:36 zacts joined #perl6
00:37 lookatme morning
00:40 Cabanossi joined #perl6
00:48 cdg joined #perl6
00:49 astj joined #perl6
01:00 travis-ci joined #perl6
01:00 travis-ci Doc build errored. Will "Coke" Coleda 'avoid SEGV (no really)'
01:00 travis-ci https://travis-ci.org/perl6/doc/builds/247750484 https://github.com/perl6/doc/compare/4c00a55a7d09...fe2b7eb57adf
01:00 travis-ci left #perl6
01:13 cyphase 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!
02:10 Cabanossi joined #perl6
02:12 freakcoco joined #perl6
02:17 noganex joined #perl6
02:17 cdg joined #perl6
02:45 pm5 joined #perl6
03:07 vike joined #perl6
03:09 Cabanossi joined #perl6
03:20 * BenGoldberg grumbles that * is too smart for it's own good.  Testing to see whether the user passed in a * as an argument is annoying. :P
03:20 BenGoldberg m: say * === *
03:20 camelia rakudo-moar 9a2127: OUTPUT: «{ ... }␤»
03:21 BenGoldberg m: say * =:= *; # All variants just produce WhateverCode things :P
03:21 camelia rakudo-moar 9a2127: OUTPUT: «{ ... }␤»
03:24 geekosaur m: say * ~~ Whatever
03:24 camelia rakudo-moar 9a2127: OUTPUT: «{ ... }␤»
03:24 geekosaur bah
03:24 geekosaur WhateverCode is ...
03:24 TimToady m: say Whatever.ACCEPTS(*)
03:24 camelia rakudo-moar 9a2127: OUTPUT: «True␤»
03:28 TimToady in general, one should never test for whateverness using a literal *
03:29 TimToady m: given * -> $x { say $x ~~ Whatever }
03:29 camelia rakudo-moar 9a2127: OUTPUT: «True␤»
03:30 TimToady it's also fine if it's already in a variable
03:35 lookatme m: say so * === *
03:35 camelia rakudo-moar 9a2127: OUTPUT: «{ ... }␤»
03:36 TimToady m: say (so * === *)(42,42)
03:36 camelia rakudo-moar 9a2127: OUTPUT: «True␤»
03:36 * TimToady notes that so and not are operators, not listops
03:37 lookatme m: say * eq 42 ("42")
03:37 camelia rakudo-moar 9a2127: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Two terms in a row␤at <tmp>:1␤------> 3say * eq 427⏏5 ("42")␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤        statement end␤        statement modifier…»
03:37 lookatme m: say (* eq 42)("42")
03:37 camelia rakudo-moar 9a2127: OUTPUT: «True␤»
03:40 TimToady things like eq and == are coercive, unlike ===
03:42 lookatme oh
03:43 TimToady m: say (* == 42)("42")
03:43 camelia rakudo-moar 9a2127: OUTPUT: «True␤»
03:43 TimToady m: say (* === 42)("42")
03:43 camelia rakudo-moar 9a2127: OUTPUT: «False␤»
03:47 BenGoldberg m: say given * { when 42 { 'the answer' }; when * { 'star' } }
03:47 camelia rakudo-moar 9a2127: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Unsupported use of bare "say"; in Perl 6 please use .say if you meant to call it as a method on $_, or use an explicit invocant or argument, or use &say to refer to the function as a noun␤at <tmp>:1␤--…»
03:47 BenGoldberg m: say do given * { when 42 { 'the answer' }; when * { 'star' } }
03:47 camelia rakudo-moar 9a2127: OUTPUT: «star␤»
03:47 BenGoldberg m: say do given 42 { when 42 { 'the answer' }; when * { 'star' } }
03:47 camelia rakudo-moar 9a2127: OUTPUT: «the answer␤»
03:47 BenGoldberg m: say do given 'other' { when 42 { 'the answer' }; when * { 'star' } }
03:47 camelia rakudo-moar 9a2127: OUTPUT: «star␤»
03:48 BenGoldberg m: say do given 'other' { when 42 { 'the answer' }; when 'star' { 'star' } }
03:48 camelia rakudo-moar 9a2127: OUTPUT: «False␤»
03:48 TimToady "when *" is equivalent to "default"
03:48 TimToady it always matches
03:49 BenGoldberg What's the clearest way to test whether the user passed in, say, an Int, a Str, or *, while rejecting objects of other types?
03:50 BenGoldberg . o O (when .WHAT === *.WHAT)
03:50 TimToady refactor to a multi
03:51 TimToady or use: where Int | Str | Whatever
03:51 TimToady always test using the Whatever type, never with *
03:51 BenGoldberg m: say do given True { when Int { 42 }; when Str { 'perl6++' }; when Whatever { 'star' } };
03:51 camelia rakudo-moar 9a2127: OUTPUT: «42␤»
03:52 BenGoldberg m: say do given pi { when Int { 42 }; when Str { 'perl6++' }; when Whatever { 'star' } };
03:52 camelia rakudo-moar 9a2127: OUTPUT: «False␤»
03:52 BenGoldberg TimToady++
03:52 * TimToady doesn't know why that returns False though
03:53 BenGoldberg I suppose you're one of those silly people who think that pi is 3, then?
03:54 Cabanossi joined #perl6
03:54 BenGoldberg m: say do given * { when Int { 42 }; when Str { 'perl6++' }; when Whatever { 'star' } };
03:54 camelia rakudo-moar 9a2127: OUTPUT: «star␤»
03:55 TimToady m: my $*TOLERANCE = 1; say pi =~= 3
03:55 camelia rakudo-moar 9a2127: OUTPUT: «True␤»
03:56 BenGoldberg Your're horrible :P
03:56 TimToady m: my $*TOLERANCE = 1; say pi ≅ 3
03:56 camelia rakudo-moar 9a2127: OUTPUT: «True␤»
03:56 BenGoldberg Prettier, but that doesn't make it an Int.
04:02 geekosaur that's not the question, I think. it's not clear why we get False instead of, say, Any
04:02 geekosaur since nothing is done for that case
04:02 BenGoldberg Oh, I see.  Any or Mu or Nil would have made more sense, I suppose.
04:03 TimToady or Slip
04:03 TimToady m: sub (Int() $x) { say $x == 3 }(π)
04:03 camelia rakudo-moar 9a2127: OUTPUT: «True␤»
04:03 * BenGoldberg remembers once asking why the sky was blue, and being told 'raleigh scattering', when his real question was Why *blue*
04:03 geekosaur because nitrogen. and beyond that, you get to flirt with quantum theory
04:05 TimToady well, same reason the sun looks redder through smoke, only less so
04:05 geekosaur nitrogen just happens to have an electron that, when hit with a photon of a particular shade of blue light, will "ring" for a microsecond or so and then spit it back out again in a random direction
04:06 BenGoldberg "Because nitrogen" would have good answer, back when I was asking that originally, since I was thinking numbers (wavelengths and amount of scattering), not mechanisms in general.
04:06 BenGoldberg s/would have/would have been/
04:07 BenGoldberg m: sub foo { slip() }; dd foo;
04:07 camelia rakudo-moar 9a2127: OUTPUT: «Empty␤»
04:07 geekosaur right, but understanding why that particular wavelength gets you into the energy levels of electron orbitals, which we haven't fully solved yet for anything beyond 4He iirc
04:07 BenGoldberg m: sub foo { slip() }; my $x = foo; dd $x;
04:07 camelia rakudo-moar 9a2127: OUTPUT: «Slip $x = Empty␤»
04:08 BenGoldberg m: sub foo { Slip }; my $x = foo; dd $x;
04:08 camelia rakudo-moar 9a2127: OUTPUT: «Slip $x = Slip␤»
04:08 geekosaur although we can observe them spectrographically
04:08 TimToady m: sub foo { slip() }; say foo.defined
04:08 camelia rakudo-moar 9a2127: OUTPUT: «False␤»
04:08 TimToady m: sub foo { Slip.new }; say foo.defined
04:08 camelia rakudo-moar 9a2127: OUTPUT: «False␤»
04:08 BenGoldberg TimToady, Under what circumstances would someone ever *see* a slip object, other than the undefined one?
04:09 TimToady m: sub foo { slip(1) }; say foo.defined
04:09 camelia rakudo-moar 9a2127: OUTPUT: «True␤»
04:09 TimToady slip is only undefined for the empty list
04:09 TimToady well, and the type object
04:10 BenGoldberg m: dd slip().defined
04:10 camelia rakudo-moar 9a2127: OUTPUT: «Bool::False␤»
04:10 BenGoldberg The only undefined Slip is the type object, afaict.
04:11 BenGoldberg (Or I suppose a subclass, but that would be silly(
04:11 TimToady look above, Slip.new is also undefined
04:12 Ben_Goldberg joined #perl6
04:13 BenGoldberg m: my WhenWet does Slip { }; sub foo { return 41, WhenWet.new, 42 }; say foo;
04:13 camelia rakudo-moar 9a2127: OUTPUT: «5===SORRY!5===␤Type 'WhenWet' is not declared␤at <tmp>:1␤------> 3my WhenWet7⏏5 does Slip { }; sub foo { return 41, Whe␤Malformed my␤at <tmp>:1␤------> 3my7⏏5 WhenWet does Slip { }; sub foo { return␤␤»
04:13 BenGoldberg m: class WhenWet does Slip { }; sub foo { return 41, WhenWet.new, 42 }; say foo;
04:13 camelia rakudo-moar 9a2127: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Slip is not composable, so WhenWet cannot compose it␤at <tmp>:1␤»
04:14 geekosaur Slip is not a role, so it would be 'is Slip'
04:14 BenGoldberg m: class Twinkle does Whatever { }; say Twinkle.new;
04:14 camelia rakudo-moar 9a2127: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Whatever is not composable, so Twinkle cannot compose it␤at <tmp>:1␤»
04:14 BenGoldberg m: class Twinkle is Whatever { }; say Twinkle.new;
04:14 camelia rakudo-moar 9a2127: OUTPUT: «*␤»
04:14 BenGoldberg m: class WhenWet is Slip { }; sub foo { return 41, WhenWet.new, 42 }; say foo;
04:14 camelia rakudo-moar 9a2127: OUTPUT: «(41 42)␤»
04:14 geekosaur roles can promote to classes, classes do not demote to roles
04:15 TimToady that's because classes are mutable, while roles are immutable
04:16 geekosaur also I suspect the circularity could become a bit weird
04:16 konsolebox joined #perl6
04:18 BenGoldberg On the subject of 'is', I've got a bit of a problem.  I was hacking away at my copy of NativeCall, and not testing it often enough; now my multi trait_mod:<is>(Routine,:$native!) is not getting exported, and I don't see what I did wrong.
04:18 BenGoldberg Here is the gist of it: https://gist.github.com/BenGoldberg1/3f7b957a5cb0a201fe4962a5f791f86e
04:29 * BenGoldberg is too sleepy to comprehend this tonight.  I will figure this out mañana.
04:37 wamba joined #perl6
04:44 cyphase joined #perl6
04:48 curan joined #perl6
04:48 gfldex-mobil joined #perl6
04:50 cdg_ joined #perl6
04:50 eythian_ joined #perl6
05:00 wamba joined #perl6
05:02 astj_ joined #perl6
05:09 Cabanossi joined #perl6
05:15 epony joined #perl6
05:16 hythm joined #perl6
05:32 xtreak joined #perl6
05:35 ufobat joined #perl6
05:49 xtreak joined #perl6
05:53 wamba joined #perl6
06:02 astj joined #perl6
06:07 moritz DeadDelta: yes, I'll perlbrew an older perl
06:08 moritz that's the solution my subconscious mind came up with during sleep as well :-)
06:08 moritz (and it's kinda an attest to my lack of sleep that I didn't think of it earlier)
06:22 lowbro joined #perl6
06:22 lowbro joined #perl6
06:28 wamba joined #perl6
06:49 cyphase joined #perl6
07:09 eythian joined #perl6
07:09 eythian joined #perl6
07:09 Cabanossi joined #perl6
07:12 cyphase joined #perl6
07:15 domidumont joined #perl6
07:51 cpage_ joined #perl6
07:52 zakharyas joined #perl6
07:54 Cabanossi joined #perl6
07:56 parv joined #perl6
08:02 jonas1 joined #perl6
08:07 TimToady joined #perl6
08:11 d^_^b joined #perl6
08:11 d^_^b joined #perl6
08:19 dakkar joined #perl6
08:39 xtreak joined #perl6
08:54 Cabanossi joined #perl6
09:02 moritz ok, running on an older perl now
09:02 moritz the IR clogs are back up :-)
09:03 moritz ... with Unicody trouble :(
09:04 tadzik :(
09:04 tadzik moritz: what was wrong with the new Perl?
09:04 tadzik I remember seeing a word "leak" here somewhere
09:05 moritz tadzik: memory usage of the fastcgi process grew fast, making the whole machine swap
09:05 moritz (and unresponsive)
09:05 tadzik ugh
09:06 guest__ joined #perl6
09:06 astj joined #perl6
09:25 zakharyas joined #perl6
09:37 bjz joined #perl6
09:42 bjz joined #perl6
09:55 grondilu yeah I can confirm it was terribly difficult to compile the latest perl last night
09:55 grondilu *perl6
10:00 DeadDelta grondilu: morits was compiling perl5 tho. What issues are you having with perl6?
10:00 DeadDelta moritz: the encoding is busted now :) "Geth¦ rakudo/nom: ce20887760"
10:01 wamba joined #perl6
10:02 mscha joined #perl6
10:02 mscha m: my @a = 1,2,3; my $verbose = True; .say for @a if $verbose; # No it isn't...
10:02 camelia rakudo-moar c32d7b: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Missing semicolon␤at <tmp>:1␤------> 2,3; my $verbose = True; .say for @a if 7⏏5$verbose; # No it isn't...␤»
10:03 DeadDelta It is. You're trying to chain two statement modifiers
10:04 grondilu DeadDelta: yesterday compiling rakudo took much longer than usual and lagged my machine
10:07 astj joined #perl6
10:07 skids joined #perl6
10:11 DeadDelta .tell mr_ron yesterday's discussion about natives was wrong. Literals *are* supposed to work work with native multies if they can fit (which they now do, once again, on latest commit)
10:11 yoleaux DeadDelta: I'll pass your message to mr_ron.
10:11 DeadDelta grondilu: no idea. Haven't had such issues.
10:13 lizmat fwiw, /me neither
10:14 DeadDelta New post "Perl 6: Seqs, Drugs, And Rock'n'Roll (Part 2)": https://perl6.party/post/Perl-6-Seqs-Drugs-and-Rock-n-Roll--Part-2
10:14 * lizmat reads
10:15 lizmat s/usecase/use case/
10:15 lizmat (at least according to my dictionary  :-)
10:16 DeadDelta Thanks. Fixed.
10:16 astj joined #perl6
10:16 DeadDelta You likely won't learn anything from that post as you already know all of that better than me :)
10:17 lizmat well, there's one thing I'm not sure about
10:17 lizmat "The Iterator protocol forbids attempting to fetch more values from an Iterator once it generated the IterationEnd value"
10:18 lizmat I'm not sure that's true, I think the behaviour is undefined
10:18 timotimo i like how links have a slightly rounded border when you hover over them
10:18 lizmat jnthn?   ^^^
10:18 timotimo um
10:18 timotimo i do believe we rely on that
10:18 jnthn lizmat: That's true
10:18 timotimo and i seem to recall an instance when some iterator or consumer did not honor that and things exploded violently
10:20 lizmat well, fwiw, I think all of the settings internal iterators you *can* call after IterationEnd and it will still generate IterationEnd
10:20 lizmat most of the time, it's just an effect of the implementation
10:20 jnthn It's fine if things do behave that way
10:20 jnthn It's just that you shouldn't rely on it
10:20 lizmat like needing to remember there's still one value to produce
10:21 lizmat even DeadDelta's example produces IterationEnd after it has produced its first IterationEnd
10:21 timotimo right
10:21 timotimo i find it slightly amusing that the one state variable will end up getting incremented more and more, while the other will stop at 4
10:21 timotimo not important at all, just a tiny detail
10:25 lizmat DeadDelta: s/brievity/brevity/
10:29 DeadDelta Fixed thanks
10:31 FROGGS joined #perl6
10:55 sivoais joined #perl6
11:01 astj joined #perl6
11:06 grondilu joined #perl6
11:07 * grondilu finally received his additional RAM :)
11:07 Voldenet Did anyone make a grammar for C#? I need it for some tiny refactors and analysis (the current version in perl5 I use has gotten a bit /hairy/ and I need to add C#7 features for it)
11:09 Cabanossi joined #perl6
11:13 zacts joined #perl6
11:30 domidumont joined #perl6
11:49 timotimo could it be the c# compiler has a feature that outputs parse data?
11:54 AlexDaniel joined #perl6
11:58 moritz roslyn might have that
12:05 zengargoyle is there a .method on Hash that doesn't create arrays for duplicate keys like .push and .append do?  something better than %stuff = %stuff, %new-stuff;
12:05 DeadDelta zengargoyle: %stuff ,= %new-stuff
12:05 * DeadDelta backlogs a bit
12:06 DeadDelta m: say do given pi { when Int { 42 }; when Str { 'perl6++' }; when Whatever { 'star' } };
12:06 camelia rakudo-moar 597500: OUTPUT: «False␤»
12:07 zengargoyle m: my %h = a => 1, b => 2; my %n = a => 2; %h .= %n; say %h;
12:07 camelia rakudo-moar 597500: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Missing required term after infix␤at <tmp>:1␤------> 3 = a => 1, b => 2; my %n = a => 2; %h .=7⏏5 %n; say %h;␤    expecting any of:␤        dotty method or postfix␤»
12:07 DeadDelta TimToady: ^ that's False because Whatever is a :U and we're going through the Mu.ACCEPS that just type-checks. The `when *` uses a :D Whatever, which does the "anything goes" thing
12:07 zengargoyle m: my %h = a => 1, b => 2; my %n = a => 2; %h ,= %n; say %h;
12:07 camelia rakudo-moar 597500: OUTPUT: «{a => 2, b => 2}␤»
12:07 zengargoyle oh, , not .
12:08 zengargoyle should have guessed that by now. :)
12:09 Cabanossi joined #perl6
12:14 wamba joined #perl6
12:18 DeadDelta .tell BenGoldberg your `is native` export issue is 'cause you got my package EXPORT::DEFAULT my package EXPORT::types. I don't think the `is export` things are additive.
12:18 yoleaux DeadDelta: I'll pass your message to BenGoldberg.
12:18 Voldenet timotimo: well, one could user roslyn to do something similar and roslyn could be used to make such tool, but I want to smuggle as much perl as I can into projects ;)
12:19 DeadDelta .tell BenGoldberg oh maybe they are :/ as this works m: package Foo { my package EXPORT::DEFAULT {}; sub bar is export(:DEFAULT, :meows) { say "hi" } }; import Foo; bar
12:19 yoleaux DeadDelta: I'll pass your message to BenGoldberg.
12:21 ChoHag joined #perl6
12:22 exprosic joined #perl6
12:22 exprosic left #perl6
12:27 perlpilot DeadDelta: Nice article!  It would make a nice Iterator tutorial on docs.perl6.org if there isn't one there already
12:28 DeadDelta Considering even basic docs for Iterator's methods use very confused examples, there probably isn't.
12:29 raschipi joined #perl6
12:32 timotimo DeadDelta: it's spelled monstrosity (had to double-check though)
12:32 raschipi m: say test
12:32 camelia rakudo-moar c7922f: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Undeclared routine:␤    test used at line 1␤␤»
12:32 raschipi m: say "test"
12:32 camelia rakudo-moar c7922f: OUTPUT: «test␤»
12:33 DeadDelta Fixed. Thanks
12:33 zengargoyle yay! `at` parser is working.  modulo squishing actual output into `at` acceptable.  no timezone, seconds, always goes into the future, rejects datetime in the past.
12:34 timotimo np
12:34 timotimo good post!
12:34 zengargoyle think i might try to add a couple of options to be strictly-at or a more liberal
12:42 cdg joined #perl6
12:51 melezhik hi Perl6 gurus!
12:51 DeadDelta Hello.
12:51 melezhik How to create directories in Perl6 recursively? Seems like https://docs.perl6.org/routine/mkdir can't do it
12:51 DeadDelta Yes, it can.
12:52 melezhik ahh
12:52 DeadDelta melezhik: what do you mean by recursively? like mkdir -p?
12:52 melezhik yeah
12:52 melezhik exactly
12:52 DeadDelta Yeah, that'd default behaviour of Perl 6's mkdir
12:52 melezhik ahh, good to know!
12:52 melezhik thanks
12:53 Geth ¦ doc: 9764f5eb14 | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Type/IO/Path.pod6
12:53 Geth ¦ doc: Add more clarifications for mkdir
12:53 Geth ¦ doc:
12:53 Geth ¦ doc: that it's like `mkdir -p`
12:53 Geth ¦ doc: review: https://github.com/perl6/doc/commit/9764f5eb14
12:55 Geth ¦ doc: 6486f4e30d | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Type/IO/Path.pod6
12:55 Geth ¦ doc: Use more elaborate example for mkdir with nested dirs
12:55 Geth ¦ doc: review: https://github.com/perl6/doc/commit/6486f4e30d
12:56 mcmillhj joined #perl6
12:56 Geth ¦ doc: 6d24253dc2 | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Type/IO/Path.pod6
12:56 Geth ¦ doc: Fix typo
12:56 Geth ¦ doc: review: https://github.com/perl6/doc/commit/6d24253dc2
12:57 DeadDelta lizmat: not feeling guilty for sloppy commits like that ^ is my reason :) RE https://github.com/rakudo/rakudo/commit/413eaeebb8659daa70f89981f93a172cdc529a71#commitcomment-22498793
12:59 lizmat DeadDelta: I'm just trying to get ahead so you will be listed 2nd  :-)
12:59 DeadDelta lizmat++
13:04 zengargoyle return $++ if $++ < 4; -- heh, sorta confusing at first glance.
13:05 DeadDelta I like to sprinkle some intermediate/advanced features in my articles to kinda showcase the language and make people want to look up more features
13:06 DeadDelta than just what the article is about
13:08 raschipi What does it do?
13:09 timotimo the trick is that each of the $ is its own anonymous state variable
13:09 timotimo so you'll get ascending numbers but only up to the number 4
13:10 raschipi They will always be incremented toghether, right?
13:10 DeadDelta raschipi: $ is an annonymous state variable. $++ increments it. In return $++ if $++ < 4 uses two state vars to have the effect of `state $x; return $x if $x++ < 4
13:10 DeadDelta raschipi: no, the left one will stop incrementing (and stop being returned) once $++ returns 4
13:10 raschipi Right, thanks. I understood it.
13:11 DeadDelta But it don't matter much in that example, since the method isn't meant to be called forever after the point, just once
13:11 itaipu joined #perl6
13:12 DeadDelta well, not once; zero times. The two vars with bee at 4 and 5 after the last call.
13:13 astj joined #perl6
13:15 zengargoyle it's like those two $++ are $thing-to-return++ and $count-of-things-returned++
13:16 timotimo yeah
13:16 DeadDelta m: dd "ä".subst("a", "x")
13:16 camelia rakudo-moar c7922f: OUTPUT: «"ä"␤»
13:16 * zengargoyle sorta thought $ was scoped to the same statement or something rather than being nope-exactly-this-once-here
13:16 DeadDelta Werid. Locally I get ""x????xCC????x88""
13:16 zengargoyle but i guess i just hadn't seen it used like this.
13:16 timotimo what you're getting locally there is utf8-c8
13:17 DeadDelta timotimo: but why am I?
13:17 DeadDelta It's on 2017.05-297-g608e886
13:18 DeadDelta Oh, I think we've been through this before. This is probably because my setup is busted on this box
13:19 DeadDelta Yeah, works fine in a script, when I don't use command line
13:21 timotimo strange
13:21 DeadDelta Yeah, it's something with encoding in my terminal. I get like chineese dates and stuff.
13:22 DeadDelta Should upgrade in a few months, so it'll be gone
13:22 timotimo huh, we don't do locale-based encoding though?
13:22 DeadDelta dunno. perlbrewed perl5 fails some of its unicode tests too on this box
13:23 * DeadDelta &
13:23 timotimo i really haven't a clue what's wrong there
13:25 raschipi joined #perl6
13:29 raschipi Yay! New P6 version!
13:29 ctilmes joined #perl6
13:30 timotimo oh?
13:30 raschipi I just got 2017.06 from Debian.
13:30 timotimo ah, nice
13:31 El_Che raschipi: unstable?
13:31 El_Che they are really keeping up
13:31 raschipi Yeah, I use unstable with experimental for Perl6.
13:38 gregf_ joined #perl6
13:41 rindolf joined #perl6
13:46 travis-ci joined #perl6
13:46 travis-ci Doc build errored. Zoffix Znet 'Add more clarifications for mkdir
13:46 travis-ci https://travis-ci.org/perl6/doc/builds/247925714 https://github.com/perl6/doc/compare/fe2b7eb57adf...9764f5eb14fd
13:46 travis-ci left #perl6
13:47 Voldenet > curl http://ix.io/y4R | perl6 -e 'lines().say'
13:48 Voldenet malformed utf
13:48 Voldenet it looks like a standard BOM though
13:49 travis-ci joined #perl6
13:49 travis-ci Doc build errored. Zoffix Znet 'Use more elaborate example for mkdir with nested dirs'
13:49 travis-ci https://travis-ci.org/perl6/doc/builds/247926356 https://github.com/perl6/doc/compare/9764f5eb14fd...6486f4e30d9e
13:49 travis-ci left #perl6
13:49 DeadDelta m: Buf[uint8]:0x<ff fe>.decode.say
13:49 camelia rakudo-moar c7922f: OUTPUT: «5===SORRY!5===␤Extra argument not allowed; pair already has argument of 0␤at <tmp>:1␤------> 3Buf[uint8]:0x7⏏5<ff fe>.decode.say␤You can't adverb Buf[uint8]␤at <tmp>:1␤------> 3Buf[uint8]:0x<ff fe>7⏏5.decode.say␤␤»
13:49 DeadDelta m: Buf[uint8]:0x<ff fe>.decode.say
13:49 camelia rakudo-moar c7922f: OUTPUT: «5===SORRY!5===␤Extra argument not allowed; pair already has argument of 0␤at <tmp>:1␤------> 3Buf[uint8]:0x7⏏5<ff fe>.decode.say␤You can't adverb Buf[uint8]␤at <tmp>:1␤------> 3Buf[uint8]:0x<ff fe>7⏏5.decode.say␤␤»
13:49 DeadDelta gggrrr WHY do I always have dumb copy paste issues -_-
13:50 DeadDelta m: Buf[uint8].new(255,254).decode.say
13:50 camelia rakudo-moar c7922f: OUTPUT: «Malformed UTF-8 at line 1 col 1␤  in block <unit> at <tmp> line 1␤␤»
13:50 DeadDelta Voldenet: is bom valid UTF tho?
13:50 travis-ci joined #perl6
13:50 travis-ci Doc build errored. Zoffix Znet 'Fix typo'
13:50 travis-ci https://travis-ci.org/perl6/doc/builds/247926806 https://github.com/perl6/doc/compare/6486f4e30d9e...6d24253dc20f
13:50 travis-ci left #perl6
13:50 Voldenet DeadDelta: I'm sure "file".IO.slurp.say should handle BOM, if that's what you're asking
13:50 DeadDelta Ah
13:51 melezhik How can I add bash/shell script to Perl6 module distro?
13:51 melezhik just having script at bin/script.sh does make Perl6 treat it as shell script
13:51 raschipi DeadDelta: UTF-8 with BOM is valid
13:52 melezhik it tries to run is as Perl6 script
13:52 DeadDelta melezhik: you can put it in resources/ but I don't think it'll be installed in a way that'd make it runnable on user's system,
13:52 raschipi As much as I think it's broken and silly, it's valid.
13:52 melezhik probably I need to set shebang?
13:53 DeadDelta melezhik: what about permissions and PATH?
13:53 melezhik permissions are fine and script is resolvable
13:53 melezhik but it gets treated as Perl6 script
13:53 DeadDelta Voldenet: well, it fails with perl 5 too
13:53 melezhik I am going to set a shebang ... to see if it helps
13:54 DeadDelta melezhik: don't put it in bin
13:54 melezhik ok, where then to put it?
13:54 DeadDelta :|
13:54 melezhik ok, I may go with resource ... not a big deal
13:55 melezhik at least as workaround ...
13:55 zengargoyle i though binary/shell/script etc. you wanted installed along with a module went into 'script'
13:57 DeadDelta raschipi: what's UTF-8 with BOM? When I try to open a file with Voldenet's data in perl5 it dies the same as Perl 6, saying it's not valid utf8
13:57 zengargoyle at least in p5 'script' was the 'install these into the bin directory when installing the module'.  you had to tweak things if you *really* liked to keep your things in 'bin'
13:57 raschipi Windows puts BOMs in the starts of it's files and Unicode gave up and declared it valid.
13:58 * zengargoyle BOM in UTF-8 is an abomination.
13:59 raschipi zengargoyle: I agree, but here is exibit A: http://archive.is/BxgyE
14:00 DeadDelta .tell samcv is BOM supposed to be valid in latest utf8?  Buf[uint8]:0x<ff fe>.decode.say dies. Perl 5 does the same. But here people are saying that it's not supposed to die: https://irclog.perlgeek.de/perl6/2017-06-28#i_14798132
14:00 yoleaux DeadDelta: I'll pass your message to samcv.
14:00 cosimo joined #perl6
14:00 [Coke] ff
14:00 * DeadDelta wonders if we need a "ff" lottery too :)
14:01 raschipi DeadDelta: IMHO, Perl6 should never die because of bad UTF-8, that's a ready-made DoS right there.
14:01 DeadDelta lol
14:01 mst does rakudo even build on DOS?
14:02 raschipi denial-of-service
14:02 zengargoyle raschipi: Windows explains most broken things. :P
14:02 * [Coke] appreciated mst's dad-joke.
14:02 DeadDelta left #perl6
14:03 raschipi Any Perl6 program that deals with input dies right now if someone sends invalid UTF-8
14:03 mst zoffix just left and I was, indeed, making a dad joke
14:03 lizmat I think the DoS issue might make us consider making utf8-c8 the default encoding for everything ?
14:03 raschipi I liked the joke too, but I wanted to register what it meant in case someone got confused
14:04 raschipi Zoffix can't even right now
14:04 troys joined #perl6
14:06 ilmari ZoffOdd?
14:06 [Coke] .tell DeadDelta apparently I need a better system for "did my connection drop"
14:06 yoleaux [Coke]: I'll pass your message to DeadDelta.
14:07 raschipi From the Unicode FAQ: Can a UTF-8 data stream contain the BOM character (in UTF-8 form)? A: Yes, UTF-8 can contain a BOM.
14:07 raschipi http://www.unicode.org/faq/utf_bom.html
14:08 cosimo joined #perl6
14:08 raschipi Found the direct link: http://www.unicode.org/faq/utf_bom.html#bom5
14:09 seatek joined #perl6
14:09 Cabanossi joined #perl6
14:13 zengargoyle maybe we should emit all output with a BOM just in case.
14:15 raschipi lizmat: I think the default should be what's suggested in the Unicode section 3.9, Constraints on Conversion Processes, Best Practices for Using U+FFFD
14:16 lizmat link?
14:16 mr-foobar joined #perl6
14:16 raschipi "At that  point, the converter can emit a single U+FFFD for  the  collected  (but  ill-formed)  code  unit( s)"
14:16 lizmat hope samcv reads this
14:16 raschipi Page 128 of the Unicode standard version 10
14:25 itaipu joined #perl6
14:26 lucasb joined #perl6
14:27 lucasb did anybody noticed that the irclog HTML pages is not displaying unicode characters correctly?
14:27 lucasb is it just on my machine?
14:27 bjz joined #perl6
14:41 bwisti joined #perl6
14:45 [Coke] yes, moritz is aware. running an older version of perl5 to avoid a memory problem in the latest version.
14:45 [Coke] ... someone should offer to rewrite it all in six. :)
14:45 FROGGS joined #perl6
14:51 moritz ... and write a nice tool to clean up encoding mess in the database :-)
14:51 lizmat aaaahhh  the memories   :-)
15:03 Geth ¦ Inline-Python: 70477cfbd4 | Nic++ (committed using GitHub Web editor) | .travis.yml
15:03 Geth ¦ Inline-Python: Fix Travis
15:03 Geth ¦ Inline-Python:
15:03 Geth ¦ Inline-Python: This should fix Travis auto-builds.
15:03 Geth ¦ Inline-Python: review: https://github.com/niner/Inline-Python/commit/70477cfbd4
15:03 Geth ¦ Inline-Python: babb15cc0b | niner++ (committed using GitHub Web editor) | .travis.yml
15:03 Geth ¦ Inline-Python: Merge pull request #24 from nicqrocks/patch-1
15:03 Geth ¦ Inline-Python:
15:03 Geth ¦ Inline-Python: Fix Travis
15:03 Geth ¦ Inline-Python: review: https://github.com/niner/Inline-Python/commit/babb15cc0b
15:06 cihan joined #perl6
15:08 cihan Hallo
15:09 Cabanossi joined #perl6
15:10 perlpilot cihan: greetings
15:10 tinita hi cihan
15:11 tinita grwetings from the german perlworkshop in hamburg
15:11 tinita s/grw/gre/
15:12 FROGGS hi cihan ;o)
15:12 cihan Hehe
15:12 cihan Hi Tina und Froggs :)
15:13 FROGGS welcome to the awesome world of #perl6
15:13 cihan Thanks
15:15 andrzejku joined #perl6
15:20 El_Che hamburg o/
15:21 El_Che hallo!
15:21 El_Che :)
15:21 El_Che how do you wave in ascii
15:21 bjz joined #perl6
15:22 FROGGS well, like you did
15:22 cihan o/
15:22 FROGGS the workshop was awesome, I'm glad that I made it
15:29 El_Che FROGGS: was it mostly in german?
15:29 FROGGS El_Che: aye
15:29 El_Che good exercise
15:30 FROGGS because only two ppl were non native speakers (or listeners in that case)
15:30 FROGGS one of them nwc10, and he has to learn germish anyway ;o)
15:31 astj joined #perl6
15:33 El_Che FROGGS: speaking dutch, I am kind of in a good starting position :)
15:38 FROGGS aye ;o)
15:38 FROGGS stemming distance from dutch to deutsch is pretty low actually
15:39 pmurias joined #perl6
15:41 rindolf joined #perl6
15:42 raschipi That is what leads to the most interesting misunderstandings.
15:46 xzhao joined #perl6
15:51 xzhao joined #perl6
15:52 TEttinger joined #perl6
16:02 user3 joined #perl6
16:06 user3 Path resolution. In the code below, how can I resolve ~/myfile, where ~ is /home/ssss, in order to get /home/ssss/myfile. Instead, this resolves the current working directory (/home/ssss) and prepends it to the original path like this: "/home/ssss/~/myfile".IO
16:06 user3 my $p= IO::Path::Unix.new('~/myfile'); $p.resolve.say;
16:08 raschipi user3: you'll have to do tilde expansion yourself
16:08 nhywyll joined #perl6
16:08 raschipi tilde expansion is a function of the shell
16:09 user3 cant perl6 use $*HOME automatically ?
16:09 raschipi You can use "$*HOME/myfile" instead
16:09 Cabanossi joined #perl6
16:11 raschipi If you want something the shell does, you can call the shell
16:11 user3 ok, we need a perl6 shell then
16:11 user3 just kidding
16:11 raschipi run "echo ~/"
16:11 user3 i think $*HOME will do fine
16:14 setty1 joined #perl6
16:21 astj joined #perl6
16:30 cdg joined #perl6
16:31 user3 by the way, run "echo ~/" doesn't seem to work
16:31 user3 m: run "echo ~/"
16:31 camelia rakudo-moar 864fa7: OUTPUT: «run is disallowed in restricted setting␤  in sub restricted at src/RESTRICTED.setting line 1␤  in sub run at src/RESTRICTED.setting line 14␤  in block <unit> at <tmp> line 1␤␤»
16:31 cdg joined #perl6
16:32 jnthn Needs to be shell "echo
16:32 jnthn oops
16:32 jnthn Needs to be shell "echo ~/"
16:33 user3 yes
16:33 cdg joined #perl6
16:34 raschipi Like the docs say: "Shell escapes are a severe security concern and can cause confusion with unusual file names." That's why P6 doesn't do it.
16:34 epony joined #perl6
16:35 user3 why not design a bash-style perl6 shell?
16:35 user3 would be much better than bash
16:35 Juerd Writing a shell is actually hard
16:36 Juerd And even if you manage to write a pretty good one, you'll find that users can't use it because it does things slightly differently.
16:36 Juerd I'm back at bash, after having used fish for a few months
16:36 raschipi my $proc = shell 'echo ~/', :out; my $captured-output = $proc.out.slurp: :close; say $captured-output.chop
16:37 user3 bash is awkward but gets the job done
16:38 raschipi Now with config management I mostly don't use shell anymore.
16:45 astj joined #perl6
16:52 seatek pointy blocks make me happy - just sharing ;)
16:53 timotimo they are good, eyah
16:55 mr-foobar joined #perl6
16:56 user3 why does this print "mydir/myfile".IO instead of "myvolume/mydir/myfile".IO
16:56 user3 say IO::Path::Unix.new(basename => "myfile", dirname => "mydir", volume => "myvolume/")
16:56 evalable6 user3, rakudo-moar 2a8d1e7ce: OUTPUT: «(exit code 1) Cannot dispatch to method new on IO::Path because it is not inherited or done by IO::Path::Unix␤  in block <unit> at /tmp/5PqCOM2SYG line 1␤»
16:57 robertle joined #perl6
16:59 user3 does volume make sense only under Windows?
16:59 |oLa| joined #perl6
17:00 seatek volume on unix is weird -- just paths really
17:00 seatek you mount volumes into paths
17:01 seatek so for accessing them, you just use paths -- doesn't make much sense with volumes
17:01 * ilmari would argue that windows is weird for having user-visible volumes
17:01 seatek yeah it's inflexible in windows
17:02 seatek yeah docs in IO:Path::Unix say volume on unix will be empty string
17:03 tyil tfw ´ and ¨ arent valid quotes :(
17:05 raschipi Well, windows does work like unix under the hood in the most recent versions. It's just very well hidden.
17:06 cgfbee joined #perl6
17:08 cfa joined #perl6
17:11 user3 basically, Bill Gates paid someone $10k to write the first DOS program, which is a scaled down version of unix, from then on his main paradigm has been to lower expectations by giving as little as possible to his users
17:12 eponym joined #perl6
17:12 cfa morning all.
17:13 cfa bug: 'p6 --profile' segfaults (rakudo 2017.06-102-g864fa7298 on moar 2017.06-29-ga51ba620)
17:13 raschipi DOS is actually more based on CP/M, not Unix
17:13 cfa (encountered on mac, reproduced with a fresh moar install on linux)
17:14 user3 it resembles Unix a lot, except / replaced by \ and LF replaced by CRLF
17:14 user3 in its commands, i mean, it resembles Unix
17:16 user3 in contrast to the Mac
17:16 user3 of the time
17:17 geekosaur both have DEC minicomputer OSes in their background
17:18 user3 Bill Gates = marketing expert
17:20 seatek sales & legal
17:20 raschipi Yeah, they are similar because both were based on systems like  TOPS-10, MULTICS, etc.
17:20 epony checkout xenix
17:28 st_elmo joined #perl6
17:32 user3 the volume is empty on unix, but I used to have a dual boot system with A: for the volume in windows and ~/A for something equivalent to the volume on linux
17:32 user3 that made it a lot easier to convert paths
17:33 araujo joined #perl6
17:33 araujo joined #perl6
17:33 user3 i gather that the folks who decided that the Path volume on unix would be always empty have never had a dual boot system
17:41 seatek you just use paths and forget the volume - then you can make the path be whatever for dual boot, whateve ryou need. you can't (or couldn't ) change the volumen names on windows, though
17:47 mr-fooba_ joined #perl6
17:53 itaipu joined #perl6
17:53 literal_ joined #perl6
17:54 literal_ hello peeps
17:57 literal_ I'm trying to make a "loader" of sorts that will dynamically load up a perl6 file (a handler) and run a function or two. That part it easy enough, but I need the handler to have access to an API in the same program as the loader. Any good articles on something like this?
17:58 bjz joined #perl6
18:00 Voldenet joined #perl6
18:00 Voldenet joined #perl6
18:02 wamba joined #perl6
18:03 timotimo you can set up a dynamic variable before calling into the handler's code
18:03 timotimo the handler can then just access that variable and do whatever it wants with it
18:04 timotimo or pass your API objects as arguments to a common function the handler is supposed to implement
18:04 literal_ hm that's possible
18:04 literal_ but that feels kinda shoddy
18:05 literal_ But if it's less aggravation it's probably better
18:06 itaipu joined #perl6
18:07 DeadDelta joined #perl6
18:08 DeadDelta user3: yeah, volume is totaly ignored in Unix spec
18:08 DeadDelta Unix spec = IO::Spec::Unix
18:10 * DeadDelta backlogs further
18:10 AlexDaniel joined #perl6
18:11 DeadDelta and yeah, we don't do anything shell XYZ does with expanding ~/ to anything. The only weird thing we have is '-'.IO that when .open'ed uses STDOUT/IN, but so far there's a motion to remove that in future language versions
18:12 DeadDelta Note that $*HOME is not guaranteed to be set, so using "$*HOME/whatever" isn't 100% foolproof
18:12 DeadDelta m: %*ENV<HOME>:delete; dd $*HOME
18:12 camelia rakudo-moar 2a8d1e: OUTPUT: «Nil $HOME = Nil␤»
18:16 andrzejku joined #perl6
18:18 seatek literal_: why not just load the API in the "handler"? Or do you need some variable brought over that you set in the API that only your main loader program has set?
18:18 FROGGS joined #perl6
18:19 user3 what is the best way to test if I'm on Linux or Windows
18:20 timotimo m: say $*KERNEL.is-windows
18:20 camelia rakudo-moar 2a8d1e: OUTPUT: «No such method 'is-windows' for invocant of type 'Kernel'␤  in block <unit> at <tmp> line 1␤␤»
18:20 timotimo m: say $*KERNEL.is-win
18:20 camelia rakudo-moar 2a8d1e: OUTPUT: «No such method 'is-win' for invocant of type 'Kernel'␤  in block <unit> at <tmp> line 1␤␤»
18:20 timotimo where was that ...
18:21 geekosaur m: say $*DISTRO.is-win
18:21 camelia rakudo-moar 2a8d1e: OUTPUT: «False␤»
18:21 timotimo ah, distro, yes
18:21 seatek When I need to do questionable things like sharing variables across objects, I usually use a singleton -- usually for stuff like database connections
18:21 user3 good
18:23 user3 say $*DISTRO # OUTPUT: fedora (25.Workstation.Edition)
18:23 evalable6 user3, rakudo-moar 2a8d1e7ce: OUTPUT: «debian (8.jessie)»
18:23 DeadDelta user3: considering your earlier questions, out of curiousity, why do you need to know if you're on Windows?
18:24 user3 ok, but it's funny that the word "win" (in is-win) appears in the output on windows, while "linux" doesnt appear in the output on linux
18:24 DeadDelta Or why you're using IO::Path::Unix instead of regular one
18:24 user3 it's not completely consistent imho
18:24 FROGGS # ubuntu (16.04.2.LTS.Xenial.Xerus)
18:24 DeadDelta hm?
18:24 DeadDelta .is-win gives you a Bool True or False
18:24 * DeadDelta doesn't follow what the word win has to do with anything
18:25 DeadDelta user3: $*KERNEL.say has linux in it
18:26 DeadDelta I get linux (3.2.0.23.generic) from $*DISTRO
18:26 DeadDelta m: $*KERNEL.say
18:26 camelia rakudo-moar 2a8d1e: OUTPUT: «linux (4.4.70.18.9.default)␤»
18:26 seatek debian (9.stretch)
18:26 user3 say $*KERNEL # OUTPUT:  linux (4.11.6.201.fc.25.x.86._.64)
18:26 evalable6 user3, rakudo-moar 2a8d1e7ce: OUTPUT: «linux (3.16.0.4.amd.64)»
18:28 pilne joined #perl6
18:31 sjoshi joined #perl6
18:31 DeadDelta And it's an object, not a string, you can query parts you're interested in with methods
18:32 DeadDelta m: say $*KERNEL.name
18:32 camelia rakudo-moar 2a8d1e: OUTPUT: «linux␤»
18:32 DeadDelta c: HEAD say $*KERNEL.name
18:32 committable6 DeadDelta, ¦HEAD(2a8d1e7): «linux»
18:32 DeadDelta "win32" on win7
18:34 DeadDelta BTW shell 'echo ~/' don't work on Windows, but $*HOME does give you user's home
18:38 user3 isn't Win32 obsolete in this name: class IO::Path::Win32
18:38 user3 Win32 barely still exists lol
18:39 raschipi Windows 10 is still win32
18:39 user3 yeah, but for how long?
18:39 raschipi Forever
18:39 user3 which computer manufactuer is going to keep making 32 bit computers forever?
18:39 raschipi Windows 64 bit is win32 too.
18:40 DeadDelta user3: you don't need to use subclasses of IO::Path other than for testing purposes. Just use IO::Path and it will Do The Right Thing on all OSes
18:40 TEttinger win32 is used to avoid the trademark on Windows
18:41 TEttinger it's a de facto name
18:41 user3 what about windows0000
18:45 FROGGS what is windows0000?
18:46 moritz it's when the windows version will overflow in the year 10k
18:46 FROGGS win32 is the operating system name that many compilers and other things spit out when you ask them... (e.g. cygwin)
18:46 TEttinger doesn't matter if it's an x86 or other architecture
18:47 user3 what are they gonna do when they reach the name Windows 13?
18:47 user3 move directly for 12 to 14?
18:47 user3 *from
18:47 DeadDelta Why?
18:47 TEttinger Windows "Holy cow we still exist"
18:47 user3 recall Apollo 13 !!!!
18:47 lichtkind joined #perl6
18:47 literal_ joined #perl6
18:47 * DeadDelta doesn't recall
18:47 mscha joined #perl6
18:47 TEttinger Windows Existential Crisis
18:47 timotimo bring apollo 13 home!
18:47 * DeadDelta doesn't understand what rocket has to do with Windows
18:48 TEttinger they would avoid 13 for the same reason as 4 I guess
18:48 DeadDelta heh
18:48 DeadDelta stupid humans and there silly superstitions
18:48 TEttinger every culture has unlucky and lucky number associations
18:48 TEttinger well, the ones with numbers
18:49 DeadDelta And that's why the robots will win :)
18:49 DeadDelta left #perl6
18:49 TEttinger *their
18:49 geekosaur microsoft will do what microsoft will do, and the rest of the world will have to deal.
18:49 FROGGS win32 v6.1 would be Windows 7 for example (I think)
18:49 FROGGS (maybe Windows Server 2008 (R2) too)
18:49 FROGGS and the operating systen name does not say anything about the architecture, so the 32 in there is quite meaningless
18:49 FROGGS r: say $*KERNEL.bits
18:49 FROGGS that's what you'd use instead
18:49 FROGGS (outputs 64 here)
18:49 camelia rakudo-{moar,jvm} 2a8d1e: OUTPUT: «64␤»
18:50 FROGGS_ joined #perl6
18:50 mscha m: say [X] [[1,2,3],[4,5,6]]; # correct
18:50 camelia rakudo-moar 2a8d1e: OUTPUT: «((1 4) (1 5) (1 6) (2 4) (2 5) (2 6) (3 4) (3 5) (3 6))␤»
18:50 TEttinger windows 7 is v6.1 for historical compatibility reasons, the same reason why win32 is not useless as a name
18:50 mscha m: say [X*] [[1,2,3],[4,5,6]]; # correct
18:50 camelia rakudo-moar 2a8d1e: OUTPUT: «(4 5 6 8 10 12 12 15 18)␤»
18:50 mscha m: say [X] [[1,2,3],]; # correct
18:50 camelia rakudo-moar 2a8d1e: OUTPUT: «((1 2 3))␤»
18:50 mscha m: say [X*] [[1,2,3],]; # wrong? at least inconsistent, should be (1, 2, 3)
18:50 camelia rakudo-moar 2a8d1e: OUTPUT: «(6)␤»
18:51 TEttinger it looks like that's vector math?
18:52 MasterDuke joined #perl6
18:52 TEttinger multiplying two vectors in an earlier example. but multiplying a vector by a scalar is a scalar for at least one arrangement of the arguments, right?
18:52 timotimo it's not supposed to be, though
18:52 timotimo oh, haha
18:52 timotimo mscha: X is X, so it's comma-fying the list, so you get 1, 2, 3
18:52 timotimo when you use X*, you get multiplication instead of commafication, so you get 1 * 2 * 3
18:53 timotimo that seems consistent to me
18:54 cdg joined #perl6
18:54 Cabanossi joined #perl6
18:54 mscha timotimo: that's not what's happening: [X] [[1,2,3]] is commafying a list with one list
18:54 timotimo no, [X] [[1, 2, 3]] isn't even getting a list of lists passed to it
18:55 timotimo you mean [[1, 2, 3],], right?
18:55 mscha Yes, that's what the code examples have
18:56 timotimo [X] [[1,2,3],] ought to be the same as infix:<X>([1, 2, 3])
18:56 timotimo hmm
18:56 timotimo i think i might see what you mean
18:56 mscha Since it gets 1 argument, should be a no-op
18:57 mscha Actually, I changed my mind about [X] [[1,2,3],] being correct.  It should be: ((1), (2), (3)), not ((1, 2, 3)).
18:57 [Coke] is anyone else seeing xt/space-after-comma.t fail in the doc repo?
19:04 mscha m: say [X] [[1,2],[3,4],[5,6]] # 2×2×2=8 lists of 3 elements
19:04 camelia rakudo-moar 2a8d1e: OUTPUT: «((1 3 5) (1 3 6) (1 4 5) (1 4 6) (2 3 5) (2 3 6) (2 4 5) (2 4 6))␤»
19:05 mscha m: say [X] [[1,2],[3,4]] # 2×2=4 lists of 3 elements
19:05 camelia rakudo-moar 2a8d1e: OUTPUT: «((1 3) (1 4) (2 3) (2 4))␤»
19:05 mscha m: say [X] [[1,2],[3,4]] # 2×2=4 lists of 2 elements, I mean...
19:05 camelia rakudo-moar 2a8d1e: OUTPUT: «((1 3) (1 4) (2 3) (2 4))␤»
19:05 mscha m: say [X] [[1,2]] # should be 2=2 lists of 1 elements, not 1 list of 2 elements
19:05 camelia rakudo-moar 2a8d1e: OUTPUT: «((1 2))␤»
19:05 TimToady m: say [X] [1,2],[3,4]  # outer [] are useless
19:05 camelia rakudo-moar 2a8d1e: OUTPUT: «((1 3) (1 4) (2 3) (2 4))␤»
19:06 mscha m: say [X] [[1,2],] # should be 2=2 lists of 1 elements, not 1 list of 2 elements
19:06 camelia rakudo-moar 2a8d1e: OUTPUT: «((1 2))␤»
19:07 mscha So how do I get what I need?  If have a list of n lists (n ≥ 1), and I want the cross product.
19:07 mscha Works fine for n > 1, but for n = 1 it decides to behave differently.
19:08 timotimo i do believe X will give you flat stuff
19:09 timotimo or is that only Z ...
19:09 timotimo m: say (1, 2, 3) X (9, 9, 9)
19:09 camelia rakudo-moar 2a8d1e: OUTPUT: «((1 9) (1 9) (1 9) (2 9) (2 9) (2 9) (3 9) (3 9) (3 9))␤»
19:09 timotimo it's actually pairs, huh
19:09 timotimo i mean tuples
19:09 timotimo m: say (1, 2, 3) Z (9, 9, 9)
19:09 camelia rakudo-moar 2a8d1e: OUTPUT: «((1 9) (2 9) (3 9))␤»
19:09 bwisti joined #perl6
19:10 TEttinger m: say (1, 2, 3) Z* (9, 9, 9)
19:10 camelia rakudo-moar 2a8d1e: OUTPUT: «(9 18 27)␤»
19:11 timotimo m: say &infix:<,>(1).perl
19:11 camelia rakudo-moar 2a8d1e: OUTPUT: «(1,)␤»
19:12 mscha To be specific, I want the divisors for, say, 2³×3² = 72.
19:12 mscha m: my @prime-powers = (1,2,4,8),(1,3,9); say [X*] @prime-powers;
19:12 camelia rakudo-moar 2a8d1e: OUTPUT: «(1 3 9 2 6 18 4 12 36 8 24 72)␤»
19:12 mscha That works.
19:12 mscha Now I want the prime powers for 2⁴.
19:12 mscha m: my @prime-powers = (1,2,4,8,16),; say [X*] @prime-powers;
19:12 camelia rakudo-moar 2a8d1e: OUTPUT: «(1024)␤»
19:13 mscha (divisors, I mean)
19:13 mscha Oops, that's not what I get.
19:13 mscha So how do I deal with this?
19:13 mscha It's supposed to give me (1,2,4,8,16)
19:16 geekosaur that sounds wrong to me
19:17 geekosaur oh, missed trailing comma. hm
19:19 Geth ¦ doc: 86213a4a23 | (Jan-Olof Hendig)++ | doc/Type/Supply.pod6
19:19 Geth ¦ doc: Added a few code examples
19:19 Geth ¦ doc: review: https://github.com/perl6/doc/commit/86213a4a23
19:26 dwarring joined #perl6
19:53 khw joined #perl6
19:57 astj joined #perl6
19:57 astj joined #perl6
20:10 lizmat joined #perl6
20:10 travis-ci joined #perl6
20:10 travis-ci Doc build errored. Jan-Olof Hendig 'Added a few code examples'
20:10 travis-ci https://travis-ci.org/perl6/doc/builds/248084633 https://github.com/perl6/doc/compare/6d24253dc20f...86213a4a2399
20:10 travis-ci left #perl6
20:21 dubi0us joined #perl6
20:25 DeadDelta joined #perl6
20:26 bjz joined #perl6
20:26 DeadDelta Voldenet: so we do actually handle BOM. You just used the wrong one. utf8 bom is three bytes long
20:26 nullcone joined #perl6
20:26 DeadDelta https://github.com/MoarVM/MoarVM/blob/master/src/strings/utf8.c#L360
20:28 dubi0us joined #perl6
20:34 dubi0us joined #perl6
20:39 Cabanossi joined #perl6
20:39 literal_ joined #perl6
20:40 literal_ Hey guys, when i `require` a file, what's the correct way to call a sub with a known name in there?
20:41 DeadDelta literal_: is it just a sub? There's no module or package in the file?
20:42 literal_ nope, just the sub and possibly other stuff
20:42 literal_ Oh, my bad
20:42 DeadDelta make it `our` and it should just work
20:42 DeadDelta our sub foo {…}
20:42 literal_ yes, the while thing's a module
20:42 DeadDelta ok, does it got `is export` on it? thw sub
20:43 DeadDelta *the sub
20:43 literal_ yes
20:43 sftp joined #perl6
20:43 DeadDelta then run    import ModuleName and it'll be imported
20:43 DeadDelta How it's not a module tho
20:43 DeadDelta ?
20:43 * DeadDelta relocates
20:43 literal_ Sorry, I said wrongly
20:43 literal doppelganger :P
20:43 yoleaux 1 Nov 2016 16:31Z <jnthn> literal: Seems that various occurences of once in Version, Process, Kernel, and Backtrace are vulnerable.
20:43 yoleaux 1 Nov 2016 16:32Z <jnthn> literal: disregard that, tab-o :)
20:44 literal_ the whole deal is a module
20:45 literal_ something along the lines of `unit module MyProject::Handler; sub init(some args...) is export { ... }`
20:46 literal_ oh hey other literal :P
20:48 pmurias joined #perl6
20:48 wamba joined #perl6
21:01 dubi0us joined #perl6
21:02 dubi0us_ joined #perl6
21:14 DeadDelta literal_: ok, is there a reason why you're using `require` instead of just `use`?
21:15 DeadDelta and import MyProject::Handler; after require will import the subs. There's, um, MyProject::Handler::EXPORT::DEFAULT::init() you can call it as too, if you don't wanna import
21:17 literal_ Yeah I'm using require because I don't have a guarantee at compile time as to what the name will be
21:18 dubi0us joined #perl6
21:20 DeadDelta m: my $name = 'Test'; require ::($name); ::('&\qq[$name]::EXPORT::DEFAULT::ok')(1)
21:20 camelia rakudo-moar 2a8d1e: OUTPUT: «ok 1 - ␤»
21:20 DeadDelta Not sure how to `import` with a run-time name. It doesn't like `import ::($name)`
21:23 jnthn import happens at compile time, not runtime
21:23 jnthn use = need + import, approximately
21:23 DeadDelta oh
21:24 dubi0us joined #perl6
21:31 literal_ Yeah hmm
21:32 seatek m: multi a($a, :$b = False, :$c = True) { say 'a' }; multi a($a, :$b = False, :$c = True, UInt :$d) { say 'b' }; a('test', :d(2));
21:32 camelia rakudo-moar 2a8d1e: OUTPUT: «b␤»
21:32 seatek m: class C { multi method a($a, :$b = False, :$c = True) { say 'a' }; multi method a($a, :$b = False, :$c = True, UInt :$d) { say 'b' };}; C.a('test', :d(2));
21:32 camelia rakudo-moar 2a8d1e: OUTPUT: «a␤»
21:32 seatek Is that a bug?
21:33 jnthn No, all methods have an implicit *%_
21:34 seatek hmm. ok
21:41 dubi0us joined #perl6
21:43 seatek So, am I right in thinking then that multi dispatch isn't a good idea for methods unless you're dealing with positional parameters only?
21:43 El_Che I don't agree
21:44 El_Che I have methods that do the same thing but with different input (eg a file and a string)
21:44 El_Che I like that in perl6 I can have multi methods
21:45 El_Che while in e.g. go I need to go with methodForStr and methodForFile
21:45 seatek I do too -- I just wish that they behaved the same between methods and subs
21:45 El_Che I tend to write a prive generic method that is used by both public methods
21:45 El_Che that said, I am only now reading the backlog
21:46 seatek it matches differently between methods and subs
21:46 seatek i thought i was insane, or that there was a bug
21:48 jnthn seatek: It's fine if you're using required named parameters
21:48 jnthn seatek: It's just that they are optional by default
21:48 El_Che what john says :)
21:48 DeadDelta john is always right :)
21:48 El_Che been bitten by that
21:48 DeadDelta ZofBot: all hail john!
21:48 El_Che his beard make him look wise, that's true
21:49 jnthn .oO( who is this john guy and what's he doing with a vowel in his name? )
21:49 DeadDelta :)
21:50 seatek So, multi dispatch will not work as expected with named parameters unless the named parameters are all required. That would make sense with the slurpy bit
21:50 seatek (with methods)
21:51 DeadDelta seatek: no, it works as expected. Nameds just don't participate in multi-dispatch, except for tie breaking and I think the difference you're seeing between the subs is only due to ALL methods have named args, while some subs don't
21:51 * DeadDelta looks at earlier evals above
21:53 DeadDelta Not sure why the chosen canidate differs there
21:54 seatek because theyr'e more like positionals in methods, even when they're named, because of *%_
21:55 DeadDelta Ahhh
21:55 seatek i just tried it as a sub in a last desperate test before i leaped out the window -- and it worked as a sub one
21:55 DeadDelta Nah, I see why
21:56 DeadDelta seatek: in your sub case, the first sub is not a valid candidate because it cannot accept :d named param, so it despatches to the only candidate available: the second sub. In the method case however, the first one does match, so it goes to it
21:56 DeadDelta And it matches because in methods we have *%, so it can take the :d
21:56 DeadDelta m: class C { multi method a($a, :$b = False, :$c = True, UInt :$d) { say 'b' }; multi method a($a, :$b = False, :$c = True) { say 'a' }; };
21:56 camelia rakudo-moar 2a8d1e: ( no output )
21:57 DeadDelta m: class C { multi method a($a, :$b = False, :$c = True, UInt :$d) { say 'b' }; multi method a($a, :$b = False, :$c = True) { say 'a' }; }; C.a('test', :d(2));
21:57 camelia rakudo-moar 2a8d1e: OUTPUT: «b␤»
21:57 DeadDelta And now method goes to b too, because it's first in the list
21:57 seatek yeah there's that extra slurpy bit
21:58 seatek which has the side-effect of making multi dispatch not behave as expected unless you're using required named parameters -- unless you're extrememly familiar with the language and know about that slurpy bit
21:58 DeadDelta I wouldn't place the knowing of *% bit to be that arcane TBH :/
21:58 seatek which i didn't ;)
21:59 DeadDelta Though I don't think we have a full and complete list of how multi dispatch happens.
21:59 DeadDelta Which certainly would be helpful
21:59 seatek that's right there
21:59 seatek no mention in the docs
21:59 DeadDelta We should tell john to do it :)
22:00 DeadDelta lol, john left :P
22:00 seatek it's a weird thing to say though because you'd expect it to be the same... it's a weird edge case... so it might sound funny in docs
22:01 seatek like oh, you can go out and in any door in the house, except the side door on wednesday
22:01 seatek who knew? ;)
22:01 john51 joined #perl6
22:01 DeadDelta It probably depends on your background. If you come from somewhere like Perl 5 where methods are subs, then sure. But otherwise, it doesn't seem strange for there to be difference
22:02 DeadDelta I mean, you have an invocant there at play too. So that right there is already a difference
22:02 seatek i'm just happy the world makes sense again
22:02 DeadDelta :)
22:02 seatek but i would change it ;)
22:03 DeadDelta My spidey senses are telling me there's a very good reasons why methods have implicit *%
22:03 DeadDelta 'cause it's expensive and would've been gone a long time ago :)
22:03 DeadDelta Probably something to do with inheritance or something.
22:04 DeadDelta or them being "latebound" or whatever. Like how you can statically optimize subs but have to wait till runtime to know what you're calling the method on
22:05 jnthn It's to make inheritance and deferring to the base class work out correctly
22:05 DeadDelta Ah
22:05 jnthn Named parameters are primarily for options
22:06 seatek yeah i figure there's super good reasons. it's just some weird little side effect that of course i fall into
22:06 jnthn Many good uses of inheritance delegate to the base class, since that's the safest way to be sure you're doing at least as much as the bae class does
22:06 john51 joined #perl6
22:06 jnthn *base
22:06 jnthn And this means that, provided you are doing it with callsame or similar, you can safely add an extra option to a method in a base class and not have to do changes in the subclasses
22:07 DeadDelta Makes sense.
22:08 jnthn But yeah, the cost of getting *that* right is the surprises that the implicit *%_ bring
22:09 * lizmat wonders where :{} is getting parsed
22:09 DeadDelta It's an op at the end of ...
22:09 DeadDelta s: &circumfix:<:{ }>
22:10 DeadDelta SourceBaby │ DeadDelta, Sauce is at https://github.com/rakudo/rakudo/blob/2a8d1e7/src/core/Hash.pm#L768
22:10 lizmat aaaah
22:10 Geth ¦ doc: 6996421ddc | seatek++ (committed using GitHub Web editor) | doc/Language/functions.pod6
22:10 Geth ¦ doc: multi methods and optional named parameters
22:10 Geth ¦ doc: review: https://github.com/perl6/doc/commit/6996421ddc
22:11 AlexDaniel joined #perl6
22:12 skids joined #perl6
22:14 El_Che the named/unnamed option is a little incoherent, but it's handy
22:15 bjz joined #perl6
22:15 El_Che it can make your api a little incoherent if you don't pay attention is what I mean
22:20 stmuk joined #perl6
22:23 k-man joined #perl6
22:28 linuksz joined #perl6
22:29 linuksz why this code don't work?
22:29 linuksz sub modify ( $var)
22:29 linuksz {
22:29 linuksz $var = 5;
22:29 linuksz }
22:29 linuksz modify 1;
22:29 El_Che is rw
22:30 linuksz i am new to perl 6
22:30 Juerd linuksz: Because $var is a readonly alias. To get a read-write alias, use "sub modify ($var is rw) { ... }"
22:30 El_Che linuksz: sorry I wasn't more verbose. Too much multitasking. Juerd++
22:31 bjz joined #perl6
22:31 Juerd linuksz: This is considered a bad style, though. Instead of having a function modify a variable directly, it's better to have the function return the new value and leave the task of assigning it to a variable to the caller: sub five { return 5 }; my $var = five;
22:31 Juerd linuksz: Besides that, in your code you're trying to assign 5 to the number 1. You can't change literals, they're always read-only.
22:32 El_Che Changing in place make sense eg when you have a big data structure and you want to save memory, imho
22:32 AlexDaniel yea, it is needed sometimes
22:32 linuksz it isn't the code i got problem with, it only an extraction from it to easier understand my problem
22:33 Juerd El_Che: There are always reasons for doing the ugly thing, but they're the exceptions :)
22:33 AlexDaniel that said, if you hava a data structure… that's probably in an object, right? And if so, you can probably change attributes of an object without is rw…
22:33 Juerd El_Che: This is why "is rw" exists, but is not the default
22:34 El_Che I have ugly style in a small production app
22:34 El_Che that won't compile on recent rakudo release
22:34 mcmillhj joined #perl6
22:34 El_Che I think I made a hash is ew
22:34 El_Che is rw
22:34 El_Che :)
22:34 El_Che need to rewrite that
22:34 linuksz my code that i made this extract from, does a few regexp matching, and string replacement on a string.
22:35 El_Che linuksz: I would return a new string
22:35 Juerd linuksz: Unless the string is expected to be huge, it's still better style to return the changed value rather than to change it in place
22:35 linuksz it don't change it in place
22:35 Juerd linuksz: You can get a copy of the variable using "is copy" instead of "is rw".
22:35 El_Che linuksz: it's *way*  readable
22:35 AlexDaniel linuksz: so is there anything wrong with “is rw” or “is copy”?
22:35 AlexDaniel linuksz: https://docs.perl6.org/type/Signature#Parameter_Traits_and_Modifiers
22:36 * Juerd really likes "is copy" and would want that in other languages.
22:36 Juerd Basically I get it in Perl 5, but only as a side-effect of unpacking @_ using assignment :)
22:36 AlexDaniel hehe
22:36 linuksz so if i give it for the subroutine as "is copy", it can modify it, but not globally, it only has effect in the code block?
22:37 linuksz but rw modifies it as it was declared globally?
22:37 AlexDaniel well, kinda, yes
22:38 Juerd linuksz: "is rw" will change the given variable, whereas "is copy" literally makes a copy and leaves the original untouched.
22:38 linuksz but why isn't "is copy" default?
22:39 timotimo because it's extra (expensive) work
22:39 Juerd linuksz: Because most of the time, you just want read-access to the variable. You get a read-only alias. That is, no copies are made, but there's some protection against accidentally writing to the variable.
22:39 BenGoldberg joined #perl6
22:40 Cabanossi joined #perl6
22:40 AlexDaniel joined #perl6
22:40 AlexDaniel also, it makes the code easier to read
22:40 linuksz so if i pass it with "is copy", it will act as default in C, and it is only an enhacement by perl6 ?
22:41 Juerd In most languages that support aliasing or pass by reference, there's no protection against changing the variable. Perl 6 has the protection, and enables that by default. "is rw" just turns the write protection off.
22:41 Juerd linuksz: My C is not good enough to answer that question :)
22:42 Juerd Besides that, C doesn't really have strings or bufs, which are probably the only data types for which "is rw" makes sense anyway :)
22:42 BenGoldberg m: my $test = 42; sub foo($bar) { say $test =:= $bar }; foo($test);
22:42 yoleaux 08:18 EDT <DeadDelta> BenGoldberg: your `is native` export issue is 'cause you got my package EXPORT::DEFAULT my package EXPORT::types. I don't think the `is export` things are additive.
22:42 camelia rakudo-moar 2a8d1e: OUTPUT: «False␤»
22:42 yoleaux 08:19 EDT <DeadDelta> BenGoldberg: oh maybe they are :/ as this works m: package Foo { my package EXPORT::DEFAULT {}; sub bar is export(:DEFAULT, :meows) { say "hi" } }; import Foo; bar
22:43 timotimo rejoice, you can now profile stuff again (if you get moarvm master)
22:43 BenGoldberg m: my $test = 42; sub foo($bar is raw) { say $test =:= $bar }; foo($test);
22:43 camelia rakudo-moar 2a8d1e: OUTPUT: «True␤»
22:43 BenGoldberg m: my $test = 42; sub foo($bar is rw) { say $test =:= $bar }; foo($test);
22:43 camelia rakudo-moar 2a8d1e: OUTPUT: «True␤»
22:43 BenGoldberg m: my $test = 42; sub foo($bar is copy) { say $test =:= $bar }; foo($test);
22:43 camelia rakudo-moar 2a8d1e: OUTPUT: «False␤»
22:44 zengargoyle in that things passed by C are just nubers on a stack (that you now own the location of) C is 'is copy'.
22:45 BenGoldberg Interestingly, without any of 'is rw', 'is copy', etc, it prints False, indicating they are separate objects.
22:45 zengargoyle one of those items might be a pointer which you can deref and use 'is rw'
22:45 El_Che or it may be an explosion :)
22:45 El_Che the readonly default is nice
22:47 seatek i love the ro default - it makes me behave
22:47 zengargoyle except when you want to do a ~~ in a method foo ($/) { ... } in an action class of a grammar. :P
22:48 AlexDaniel joined #perl6
22:48 zengargoyle and i don't think 'is rw' or 'is copy' actually help there anyways...
22:49 zengargoyle neither does a scope with { temp $/; $s ~~ //; ... }
22:49 mcmillhj joined #perl6
22:50 AlexDaniel joined #perl6
22:56 literal_ joined #perl6
23:00 DeadDelta m: my $b = buf8.new: 1, 2, 3; sub foo ($b) { $b.append: 42 }; foo $b; dd $b
23:00 camelia rakudo-moar 2a8d1e: OUTPUT: «Buf[uint8] $b = Buf[uint8].new(1,2,3,42)␤»
23:01 DeadDelta Juerd: ^ there's no protection for mutating the object, like buf
23:01 DeadDelta You simply can't assign to the container
23:01 Juerd DeadDelta: That's why I said "some" protection :)
23:02 timotimo yeah, there's a few immutable things, though
23:02 DeadDelta And is rw doesn't turn the protection off, it requires a writable container
23:02 timotimo like a Blob is the immutable equivalent of Buf
23:02 DeadDelta *doesn't just
23:02 DeadDelta m: -> $ {}(42)
23:02 camelia rakudo-moar 2a8d1e: ( no output )
23:02 DeadDelta m: -> $ is rw {}(42)
23:02 camelia rakudo-moar 2a8d1e: OUTPUT: «Internal error: inconsistent bind result␤  in block <unit> at <tmp> line 1␤␤»
23:02 DeadDelta hahaha
23:03 DeadDelta Well, in a perfect world that would say something about wanting a writable container :)
23:03 DeadDelta m: sub ($x is rw) {}(42)
23:03 camelia rakudo-moar 2a8d1e: OUTPUT: «Parameter '$x' expected a writable container, but got Int value␤  in sub  at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
23:03 Juerd DeadDelta: I'm assuming linuksz is a beginner and intentionally did not want to mention containers
23:04 DeadDelta It's the anon that makes it go weird
23:04 DeadDelta m: sub ($ is rw) {}(42)
23:04 camelia rakudo-moar 2a8d1e: OUTPUT: «Internal error: inconsistent bind result␤  in sub  at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
23:04 [Coke] seatek: 6996421ddc appears to be missing a word
23:04 [Coke] (in docs)
23:05 mcmillhj joined #perl6
23:06 DeadDelta Filed as https://rt.perl.org/Ticket/Display.html?id=131673
23:08 DeadDelta m: my @a = 1, 2, [3, 4]; -> @z is copy { @z.tail.append: 42 }(@a); dd @a
23:08 camelia rakudo-moar 2a8d1e: OUTPUT: «Array @a = [1, 2, [3, 4, 42]]␤»
23:08 DeadDelta Same with `is copy` it won't let you get away with murder :)
23:10 DeadDelta zengargoyle: in those cases, just don't name the parameter $/
23:11 DeadDelta class Actions { method foo ($bar) {} }; will work just fine, you'll simply have to access captures like $bar<foo> instead of just $<foo>
23:11 zacts joined #perl6
23:14 zengargoyle yeah, i just didn't want to go back and change all those $/ into $bar.  but realized .substr would work even better.
23:15 zengargoyle plus i like being able to grep '($/' and find my action methods.
23:15 Geth ¦ doc: d92888310a | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Language/grammars.pod6
23:15 Geth ¦ doc: Show non-$/ var use in actions in example
23:15 Geth ¦ doc:
23:15 Geth ¦ doc: - Already mentioned in the adjacent prose
23:15 Geth ¦ doc: - Also include example that shows you don't have to use `$/.make` and can just make
23:15 Geth ¦ doc: review: https://github.com/perl6/doc/commit/d92888310a
23:21 literal_ joined #perl6
23:21 mcmillhj joined #perl6
23:24 dubi0us joined #perl6
23:37 mcmillhj joined #perl6
23:38 Geth ¦ ecosystem: titsuki++ created pull request #348: Add Chart::Gnuplot to ecosystem' -m 'See https://github.com/titsuki/p
23:38 Geth ¦ ecosystem: review: https://github.com/perl6/ecosystem/pull/348
23:38 Geth ¦ ecosystem: 6427314855 | titsuki++ | META.list
23:38 Geth ¦ ecosystem: Add Chart::Gnuplot to ecosystem' -m 'See https://github.com/titsuki/p6-Chart-Gnuplot'
23:38 Geth ¦ ecosystem: review: https://github.com/perl6/ecosystem/commit/6427314855
23:38 Geth ¦ ecosystem: 1becf943fc | (Itsuki Toyota)++ (committed using GitHub Web editor) | META.list
23:38 Geth ¦ ecosystem: Merge pull request #348 from titsuki/cgnuplot
23:38 Geth ¦ ecosystem:
23:38 Geth ¦ ecosystem: Add Chart::Gnuplot to ecosystem' -m 'See https://github.com/titsuki/p
23:38 Geth ¦ ecosystem: review: https://github.com/perl6/ecosystem/commit/1becf943fc
23:39 dubi0us joined #perl6
23:47 bjz joined #perl6
23:51 Geth ¦ doc: ecd74e95cf | seatek++ (committed using GitHub Web editor) | doc/Language/functions.pod6
23:51 Geth ¦ doc: Coke discovered my missing be
23:51 Geth ¦ doc: review: https://github.com/perl6/doc/commit/ecd74e95cf
23:51 seatek [Coke]: thanks :)
23:53 mcmillhj joined #perl6

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

Perl 6 | Reference Documentation | Rakudo