»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
Set by moritz on 22 December 2015.
00:00 lizmat joined 00:02 Actualeyes joined 00:03 rindolf left 00:07 kurahaupo joined 00:10 lizmat left 00:17 rindolf joined 00:18 mr-foobar left 00:22 mr-foobar joined 00:33 AlexDaniel left
tbrowder .tell dwarring Font::AFM, version 1.24.1 works great now! 00:33
yoleaux tbrowder: I'll pass your message to dwarring.
00:37 kst`` is now known as kst 00:38 Cabanossi left 00:39 Cabanossi joined 00:58 BenGoldberg joined 01:01 raschipi joined 01:06 Cabanossi left 01:08 Cabanossi joined 01:12 amerlyq left 01:19 mr-foobar left 01:22 mr-foobar joined 01:25 PerlJam joined
BenGoldberg m: use NativeCall; my \compar_t = Callable but role :: { method sub_signature { :(Pointer,Pointer --> int) } }; 01:31
yoleaux 06:22 EDT <Zoffix> BenGoldberg: `===SORRY!===␤QAST::Block with cuid 1 has not appeared` is a bug and users should never see errors about QAST stuff. In this case, it looks a lot like the error you get when you try to use whatevercode in chained ops, like `5 < *.abs <7` Do you got any of that in your module?
camelia X::Method::NotFound exception produced no message
in block <unit> at <tmp> line 1
BenGoldberg m: gist.github.com/BenGoldberg1/d0764...549f4bc359 01:35
camelia 5===SORRY!5=== Error while compiling <tmp>
An exception occurred while evaluating a constant
at <tmp>:22
Exception details:
Could not find symbol '&Callback'
in block at <tmp> line 22
01:37 Actualeyes left
BenGoldberg m: gist.github.com/BenGoldberg1/d0764...549f4bc359 01:39
camelia ===SORRY!===
QAST::Block with cuid 9 has not appeared
01:40 cdg joined
BenGoldberg .tell Zoffix There is no whatever-anything in the code: gist.github.com/BenGoldberg1/d0764...549f4bc359 01:40
yoleaux BenGoldberg: I'll pass your message to Zoffix.
MasterDuke BenGoldberg: fyi, the message you should have gotten from your first attempt was `No such method 'mixin' for invocant of type 'Perl6::Metamodel::ParametricRoleGroupHOW'`
01:46 ilbot3 left 01:47 ilbot3 joined, ChanServ sets mode: +v ilbot3 01:48 mr-foobar left
BenGoldberg Clearly my code is tickling a lot of bugs. 01:50
Should I rakudobug camelia producing that '...produced no message...' error? 01:51
01:51 mr-foobar joined
BenGoldberg m: my \foo = Callable but role :: { }; 01:53
camelia X::Method::NotFound exception produced no message
in block <unit> at <tmp> line 1
01:54 cioran89 joined 01:57 Zapwai\lettuce left
BenGoldberg Ok, another rakudobug sent. 01:58
02:04 rindolf left
MasterDuke bisectable6: my \foo = Callable but role :: { }; 02:16
bisectable6 MasterDuke, Bisecting by output (old=2015.12 new=aa36842) because on both starting points the exit code is 1
MasterDuke, bisect log: gist.github.com/c4326d71b14fe555e3...3c79f18b26
MasterDuke, (2016-09-27) github.com/rakudo/rakudo/commit/22...0f14b9c05c
MasterDuke bisectable6: old=2016.10 my \foo = Callable but role :: { };
bisectable6 MasterDuke, Bisecting by output (old=2016.10 new=aa36842) because on both starting points the exit code is 1
MasterDuke, bisect log: gist.github.com/8e0c9ae50773c16451...bb30500c68 02:17
MasterDuke, (2017-06-01) github.com/rakudo/rakudo/commit/c8...3cb5fd2068
02:24 MasterDuke left 02:25 MasterDuke joined, cdg left 02:28 aborazmeh joined, aborazmeh left, aborazmeh joined 02:34 titsuki_ left 02:48 noganex_ joined 02:50 curt_ left 02:51 aborazmeh left, noganex left 02:59 Ben_Goldberg joined, BenGoldberg left, Ben_Goldberg is now known as BenGoldberg 03:00 aborazmeh joined, aborazmeh left, aborazmeh joined 03:04 Cabanossi left 03:07 Cabanossi joined
BenGoldberg bisectable6, gist.github.com/BenGoldberg1/d0764...549f4bc359 03:11
bisectable6: gist.github.com/BenGoldberg1/d0764...549f4bc359 03:12
bisectable6 BenGoldberg, It looks like a URL, but mime type is ‘text/html; charset=utf-8’ while I was expecting something with ‘text/plain’ or ‘perl’ in it. I can only understand raw links, sorry.
BenGoldberg bisectable6: gist.githubusercontent.com/BenGold...ck-fail.pl
bisectable6 BenGoldberg, Successfully fetched the code from the provided URL.
BenGoldberg, Bisecting by output (old=2015.12 new=61ecfd5) because on both starting points the exit code is 1
BenGoldberg, bisect log: gist.github.com/5b6fa52548a25ae0cd...31f58f77eb 03:13
BenGoldberg, (2015-12-25) github.com/rakudo/rakudo/commit/07...dc61f84053
BenGoldberg, The result looks a bit unrealistic, doesn't it? Most probably the output is different on every commit (e.g. 「bisect: say rand」)
BenGoldberg Silly bot, it's different on every commit because memory is being corrupted somehow. Probably. 03:18
j: say 'alive'; 03:19
camelia alive
BenGoldberg j: gist.github.com/BenGoldberg1/d0764...549f4bc359
camelia ( no output )
BenGoldberg java.nio.file.NoSuchFileException: blib/Perl6/BOOTSTRAP.jar
in <anon> (gen/jvm/ModuleLoader.nqp:88)
in load_module (gen/jvm/ModuleLoader.nqp:75)
in <anon> (gen/jvm/CORE.setting)
in <anon> (gen/jvm/ModuleLoader.nqp:253)
in load_setting …
03:20
j: gist.github.com/BenGoldberg1/d0764...549f4bc359 03:21
camelia java.nio.file.NoSuchFileException: blib/Perl6/BOOTSTRAP.jar
in <anon> (gen/jvm/ModuleLoader.nqp:88)
in load_module (gen/jvm/ModuleLoader.nqp:75)
in <anon> (gen/jvm/CORE.setting)
in <anon> (gen/jvm/ModuleLoader.nqp:253)
in load_setting …
zengargo1le BenGoldberg: do the bots understand the gist url that isn't pointing to the raw blob? 03:33
03:36 Cabanossi left 03:37 Cabanossi joined
raschipi zengargo1le: No, they complain it isn't raw text. 03:44
03:45 khw left
Geth ecosystem: e110a287cf | (Zoffix Znet)++ (committed using GitHub Web editor) | META.list
Add Proc::Q to ecosystem

  "Queue up and run a herd of Procs": github.com/zoffixznet/perl6-Proc-Q
03:49
03:50 troys_ is now known as troys 04:06 klapperl_ joined 04:07 klapperl left 04:10 aborazmeh left
pilne as someone who used to heal in world of warcraft.. herding procs made me think of herding cats, lol. 04:18
04:19 mr-foobar left
BenGoldberg You can get procs to all move in the same direction, or at least work on the same task. Cats, not so much. 04:19
pilne believe me... if i had a nickle for every time i communicated "get your fucking ass out of the fucking fire" in one way or another on that game... i'd be rich enough to be unknown 04:20
04:20 mr-foobar joined
raschipi The usual problem with procs is the exact opposite: they do EXACTLY what you told them to do. 04:23
pilne yeah, computers are funny like that 04:24
raschipi Most of the time, it's the wrong thing. We call it a bug.
pilne unless you are treading into "undefined behavior" territory
raschipi There's not 'undefined behavior' for CPU, everything comes down to that at some point. 04:25
geekosaur ob F0 0F C7 C8
(CPUs have bugs too. also ancient CPUs often didn't control what unassigned opcodes did at all...) 04:26
pilne yeup 04:27
ahhhhh the good old days
raschipi Well, those are defined... by the silicon. The docs and specs might not mention it, but the silicon will do something deterministic.
Well, interrupts aren't deterministic. And the interaction in the bus too. 04:28
geekosaur "deterministic" but often based on the exact stepping. and you couldn't even query that (no such thing as CPUID back then)
raschipi "Which core get's to the varible first" isn't deterministic.
BenGoldberg Also, there are such things as hardware random number generators. What numbers such a generator will produce, are generally the opposite of deterministic. 04:29
geekosaur (also at some point this just turne into trolling...) 04:30
*turns
zengargo1le has wondered why hardware RNG aren't common in everything. if a dongle can do it why not have it already built in?
pilne paranoia 04:31
raschipi Well, almost every IO device will act as a RNG. When there's no dedicated RNG, Linux uses almost all IO it can measure to generate entropy, for example.
zengargo1le: Every TPM module comes with one. You can also turn the sound card into one if you have no other use for it.
zengargo1le i'm thinking of those things that catch cosmic particles hitting one side or the other of some sort of detector type of thing. does TPM use that sort of thing? 04:33
zengargo1le just notices my nick got whacked at some point. 04:35
04:35 zengargo1le is now known as zengargoyle, Cabanossi left 04:37 Cabanossi joined
raschipi zengargoyle: They use a quantum source of entropy: the noise at the base of a reverse biased transistor. It fluctuates randomly because electrons will tunnel through the gap. 04:38
zengargoyle ah, cool. 04:42
may have to read up on that. guess it's still a slow stream of entropy or we would no longer have PRNG at all? 04:45
04:48 BenGoldberg left 04:50 mr-foobar left 04:52 mr-foobar joined
raschipi If you need more, just use more transistors. Transistors are what chips have in abundance. 05:01
TEttinger zengargoyle: intel has a hardware RNG on many of their processors but several linux and/or BSD distros have stopped using it out of concern that it may be intentionally flawed 05:05
fatguy how can i get package and method name from caller ? let say i call method print-it("bla"). from my origin class i need to know where the caller is
TEttinger en.wikipedia.org/wiki/RdRand 05:06
05:17 fatguy left 05:20 Cabanossi left, mr-foobar left
zengargoyle TEttinger++ 05:20
Geth doc: 4f2611be57 | (Samantha McVey)++ | doc/Type/Str.pod6
.subst: give examples on how to use captures

Hopefully this will help others out, as it is somewhat counterintuitive.
05:22
samcv ok. i finally got fed up and added this to the docs XD
zengargoyle rand came up a few days ago and my grep led me to believe that it boils down to libtommath (a bunch of math routines for primes and such) which uses arc4something() or rand() depending on availability.
samcv because i always forgot it
05:22 Cabanossi joined, mr-foobar joined
samcv yeah something like that zengargoyle 05:22
zengargoyle it all seems to still be a good entropy seed to some crypto generator (re-seeded at intervals by some logic) vs some actual true endless fast fount of random bits. :) 05:25
samcv so good then? 05:26
05:26 pilne left
zengargoyle good enough for my Lotto number picks. 05:27
samcv you may know more about the intricacies of random number generating than i do
TEttinger man, that's what I've been up to lately 05:28
I have a pretty fast 64-bit one now with what seems to be decent quality but a lousy period for its amount of state (128 bits) 05:29
2 to the 65 period probably, no lower than 2 to the 64
well, pretty fast for software as in "twice as fast as an LCG, at least with the JVM's weird optimization properties" 05:30
zengargoyle TEttinger: you may know more about the intricacies of random number generating than i do :P 05:32
TEttinger this stuff is fun for me. I have a system set up to repeatedly generate random 24-bit numbers and use them as colors, like here i.imgur.com/fpn0Wrq.png 05:36
if there's a flaw, it's pretty easy to pick up, also in black/white i.imgur.com/4biF98x.png
this series tested various intentionally flawed RNGs i.imgur.com/4H5VXcP.jpg 05:38
samcv i still don't know why .grep(:v ) is the same as default
v
Only return the matched elements (same as not specifying any named parameter at all).
where all greps always have grep -v is reversed 05:39
only return non-matching
so i guess you need :!v ?
zengargoyle worst magic-eye ever.
samcv still odd
TEttinger hehe
hobbs :!v is definitely a face 05:41
with a pencil up its nose, possibly
zengargoyle pencil balanced on pursed lips about to fall. 05:43
05:46 Actualeyes joined 05:49 mr-foobar left 05:51 mr-foobar joined 05:52 wamba joined 05:58 troys is now known as troys_ 05:59 araraloren_ joined 06:03 araraloren left 06:05 webart left 06:07 grondilu joined 06:09 grondilu_ left, atta left, atta joined
zengargoyle is there a better list of bots/commands than found on perl6.org/community/irc? 06:14
samcv see all the users that have voice 06:15
those are bots
so i have `my (%hash, @array) = myfunction; sub myfunction { return %hash, @array } 06:16
i get Odd number of elements found where hash initializer expected:
it works fine when i only have it return a hash
so i guess those are somehow coming together.. ack reminds me of perl 5 horrors i've experienced
i think actually it's `return %hash, @array.sort.unique` so it's likely returning a sequence. that could be what's causing this 06:18
though using .list doesn't improve the situation
zengargoyle i'd try .Array but it's just a guess. 06:19
samcv that's not a method :P
err. wait it is
heh. let me try it
zengargoyle m: (1,2,3).Array
camelia ( no output )
zengargoyle m: (1,2,3).Array.say 06:20
camelia [1 2 3]
samcv ok now something really weird happened
eek. well i'll be back in like 20 mins or so
06:20 nadim joined
zengargoyle tends to slap on a .Array whenever some error pops up (esp. Seq errors). gah, i think i haven't wrapped my head around Seq yet. 06:22
raschipi zengargoyle: That's almost the appropriate way of doing it, but there's an specific method to do it: .cache (docs.perl6.org/routine/cache) 06:28
zengargoyle heh 06:30
method cache(--> TODO)
06:32 webart joined
zengargoyle guess this is more relevant: method cache(PositionalBindFailover:D: --> List:D) 06:32
raschipi The lower section explains what it does: turns an iterator into a list. Just don't call it on infinite or ver long lazy lists. It will eat all of your memory. P6 doesn't do it automatically because it can't know which lists will grow to much and turn out impossible to fit into memory. 06:33
Even if you got infinite memory, it will take infinite time to fill it up.
zengargoyle yeah, favorite recent bug-fix was along the lines of "no longer segfaults, will consume all available memory instead" :) 06:34
just like you told it to. 06:35
06:36 Cabanossi left 06:37 Cabanossi joined
raschipi Seqs are annoying sometimes, but they are very useful. The GC can reap the part that was already dealt with and allow much bigger problems to fit into memory. 06:39
Easier than having to do it by hand.
zengargoyle other than the almost always "X is Y% faster when Z"
nine m: sub func { my %h = a => 1, b => 2; my @a = 1, 2, 3; return %h, @a}; my (%h, @a) := func; say %h; say @a; 06:40
camelia {a => 1, b => 2}
[1 2 3]
nine samcv: ^^^
zengargoyle true, i'm just not used to lazy stuff.
and it tends to bite me in the a** all the time. 06:41
TEttinger abs 06:42
muscular abdominal muscles
zengargoyle nine: is it the bind?
m: sub func { my %h = a => 1, b => 2; my @a = 1, 2, 3; return %h, @a}; my (%h, @a) = unc; say %h; say @a; 06:43
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared routine:
unc used at line 1. Did you mean 'uc', 'func'?
zengargoyle m: sub func { my %h = a => 1, b => 2; my @a = 1, 2, 3; return %h, @a}; my (%h, @a) = func; say %h; say @a;
camelia Odd number of elements found where hash initializer expected:
Found 5 (implicit) elements:
Last element seen: $[1, 2, 3]
in block <unit> at <tmp> line 1
zengargoyle guess so. bind is another thing that i haven't quite internalized yet. 06:45
zengargoyle expected the = to work 06:46
nine zengargoyle: yes 06:50
Collections like hashes and arrays are slurpy on assignment. That's why the hash tries to gobble the array and complains. 06:51
zengargoyle m: sub func { my %h = a => 1, b => 2; my @a = 1, 2, 3, 4; return %h, @a}; my (%h, @a) = func; say %h; say @a; 06:52
camelia Odd number of elements found where hash initializer expected:
Found 5 (implicit) elements:
Last element seen: $[1, 2, 3, 4]
in block <unit> at <tmp> line 1
zengargoyle m: sub func { my %h = a => 1, b => 2; my @a = 1, 2, 3, 4; return %h, @a}; my (%h) = func; say %h; 06:53
camelia Odd number of elements found where hash initializer expected:
Found 5 (implicit) elements:
Last element seen: $[1, 2, 3, 4]
in block <unit> at <tmp> line 1
raschipi m: my @a = 1, 2, 3, 4; my %h = @a; say %h;
camelia {1 => 2, 3 => 4}
raschipi m: my @a = 1, 2, 3, 4, 5; my %h = @a; say %h;
camelia Odd number of elements found where hash initializer expected:
Found 5 (implicit) elements:
Last element seen: 5
in block <unit> at <tmp> line 1
06:53 wamba left
nine Itemized array coming from the "return" vs. plain array. 06:54
zengargoyle i was guessing the pairs prime the return to expect pairs and the array mucked things up 06:55
but guess not.
nine The error message actually tells it quite clearly: Last element seen: $[1, 2, 3, 4] 06:56
zengargoyle ah 06:57
m: my %h = 1 => 2, 3, 4; say %h
camelia {1 => 2, 3 => 4}
zengargoyle m: my %h = 1 => 2, [3, 4]; say %h
camelia Odd number of elements found where hash initializer expected:
Found 3 (implicit) elements:
Last element seen: $[3, 4]
in block <unit> at <tmp> line 1
raschipi m: my %h := 1 => 2, [3, 4]; say %h
camelia Type check failed in binding; expected Associative but got List ($(1 => 2, [3, 4]))
in block <unit> at <tmp> line 1
raschipi This last one is a type check failure, which means we're violating a promise we made to the compiler. 06:59
zengargoyle why is the hash not also itemized?
07:00 darutoko- joined
zengargoyle why is %h not { a => 1, b => 2 } => [ 1, 2, 3 ] 07:01
raschipi P6 doesn't mangle structures like that, it keeps everything tidy. 07:05
Lists don't end um mixed or flatened. 07:06
zengargoyle then it seems (%h,@a) = (%x,@y) should work. 07:07
raschipi Asignement calls a method on the object in the righ hand side, and hash doesn't know what to do with a odd-numbered list. 07:08
On the left hand, even.
zengargoyle m: my ($h, @a) = ( { a => 'b' }, 1 ); say $h; say @a; 07:10
camelia {a => b}
[1]
nine zengargoyle: the sad truth is that hashes are flattened more easily than lists. Feels like a bit of an oversight during the GLR.
zengargoyle m: my ($h, @a) = ( { a => 'b' }, [1,2,3] ); say $h; say @a; 07:11
camelia {a => b}
[[1 2 3]]
zengargoyle nine: gotcha
raschipi Is 6.d the opportunity to fix that? 07:14
zengargoyle hopefully only if they can keep 6.c vs 6.d semantics about the same way p5 only changes if asking for the new stuff. 07:16
zengargoyle still miffed that { use 6.c; ...old-code...} didn't fix my IO breakage.
raschipi I think the idea is to keep everything that asks for 6.c at the top working. 07:17
zengargoyle but not that miffed.
nine The idea is good but object orientation puts a severe limit on that
zengargoyle yeah, best effort is fine by me no matter my complaining. :) 07:18
raschipi Use 6.c inside a block could help with syntax changes, but the objects have global state.
nine It's downright trivial to have the compiler bind to the right await sub depending on the language version. But methods are late bound. It doesn't at all depend on the caller of which method is found but on the object the method is called on. 07:19
raschipi Their dispatch tables are global.
07:19 lizmat joined
zengargoyle yeah,IO is a thing unto itself. 07:20
raschipi zengargoyle: Doesn't have anything to do with IO, :) . It would be the same for any object. 07:21
zengargoyle just breaks my ask for 6.c get 6.c expectations and maybe future compatibility. p5 did the same thing around 5.10 or so bringing about all of the 'experimental' and 'feature' stuff. 07:23
how much legacy do you want to support with minimal tweak of asking for the old behavior? 07:24
raschipi You have to keep in mind that these versions are for the language, for the syntax, but that the breaking changes were made in a library.
The way to fix that would be to create objects with multiple interfaces. 07:25
Adding a :old-model adverb to IO or something. But then, standard handles already start instantiated. 07:26
zengargoyle eh, my breakage was simple IO. but point taken, the boundry is fuzzy.
raschipi It's like the difference between GCC and LibC. 07:28
nine Would be all doable. But what the heck should happen if 6.d code passes an IO::Path object to 6.c code?
zengargoyle and it was really just like one line of testing code.
raschipi nine: croak 07:29
zengargoyle hehe, you can wrap a Python interpreter's object in a p6 object. nothing is impossible! (just not worth it) 07:30
and i'd rather the effort be spent elsewhere ATM anyway.
zengargoyle just musing on how awesome it would be if it actually did do that thing. 07:31
nine Actually it should even be possible for a method to ask for its caller's language version. This is Perl 6 after all ;) It just would be quite bad for performance and for maintainability of the code... 07:34
raschipi nine: I see where the problem is now, the 6.c and 6.d code are from different authors. 07:35
And these methods are intermingled in with the operating system and represent things people just expect to be there. It wouldn't be so hard if people had to set up their IO instead of just using it. 07:36
zengargoyle yeah, i give wide berth when you hit IO or some other systemy thing vs just high-level syntax. 07:37
i hope things settle down by 6.e or 6.f where it becomes "if it worked it still does" (most likely). 07:42
raschipi The good news is that the same companies that are paying for P6 development are the ones paying for P5 development, so they will want the same guarantees eventually. 07:44
nine Well IO was an area that lagged behind the rest of the setting when we released 6.c. There was bound to be some changes. 07:45
07:50 Cabanossi left 07:52 Cabanossi joined 08:02 zengargoyle is now known as zengargoyle_ 08:14 araraloren_ is now known as araraloren 08:19 mr-foobar left 08:22 mr-foobar joined 08:28 setty1 joined 08:31 parv joined
El_Che for Spanish speakers, the Madrid Perl Workshop has live streaming: www.youtube.com/watch?v=JDOykNlrJ5...e=youtu.be (There seems to be 1 on englis hat 15h CET: madrid.pm.org/workshop/page/talks/k....html#top) 08:47
08:47 raschipi left 08:49 mr-foobar left 08:51 mr-foobar joined 08:59 TEttinger left 09:11 pminten joined 09:12 rindolf joined
pminten hi, is it possible to define a custom character class? 09:13
<:L + :N + :P + :S - :Z - [(),=:.~?"%]>
I want to reuse that
because I have a regex / <$that - :Lu> $that * / 09:14
rightfold You can define a custom regex and then use that regex within another regex
Oh I'm not sure you can do that 09:15
pminten yeah, the regex including doesn't work inside char classes so I can't use the set operations 09:16
09:17 TimToady left 09:19 TimToady joined 09:20 mr-foobar left 09:21 mr-foobar joined 09:22 AlexDaniel joined 09:36 setty1 left 09:39 setty1 joined 09:40 kyan left 09:44 vimal2012 joined
samcv is this supposed to work? a.uguu.se/kYCTenCQkEMF_Screenshot_...024931.png 09:51
and if so why. cause it does work. returning itself on initialization
hobbs don't see why it wouldn't 09:53
09:53 lizmat left
samcv m: my $a = foo; sub foo { $a = 100; return $a }; say $a; 09:53
camelia 100
hobbs it's unnecessary (either the function should have its own lexical, or if it's going to assign to an outer one, it doesn't have to also return it) 09:54
but it's the same effect as my %pnamecode; make-name-alias-hash(...); %pnamecode = %pnamecode;
samcv i never declare it inside the sub though
so it must use the outer one 09:55
hobbs yes
samcv m: my $a = foo; sub foo { $a = 100; return 10 }; say $a 09:57
camelia 10
samcv though this also works too
hobbs which is in-scope, it hasn't been assigned to yet (because make-name-alias-hash hasn't returned yet ;) but it's still usable as a container, same as if it didn't have an initialization at all.
I don't know if it's guaranteed, but it's the behavior I'd expect 09:58
samcv anyway thanks for helping me underertasd it
hobbs then when the assignment part of the initialization does complete, it effectively does nothing
10:04 avalenn_ left
hobbs the equivalent code in perl 5 would behave the same, FWIW, so my expectations are already set ;) 10:06
10:06 pminten left 10:09 robertle left 10:20 lizmat joined
nine The declaration of $a happens at compile time, so during compilation of sub foo, it's already known. So indeed foo refers to the container named '$a'. When _running_ the assignment, first sub foo is called, which already assigns to $a and then returns a value which again gets assigned to $a 10:28
10:43 dogbert17_ joined 10:45 dogbert11 left 10:47 parv left 10:49 mr-foobar left 10:53 mr-foobar joined 10:57 vimal2012 left, vimal2012 joined
vimal2012 What is the practical use of sigilless variable? Why would one want to use sigilless variable over sigilled one? 10:59
llfourn vimal2012: I think sometimes it's a decent way to indicate that you don't want to have a variable with a container 11:06
or more simply is read only
m: my \foo = "foo"; foo = "bar";
camelia Cannot modify an immutable Str (foo)
in block <unit> at <tmp> line 1
llfourn so it tells the reader that you aren't going to modify the variable after declaration 11:07
unless there's a particular reason you want to point that I wouldn't use them 11:08
jnthn They're also useful in the cases where you don't want to enforce any kind of context 11:13
my \matching = $fh.lines.grep(&condition).map(&operation); for matching { } # Will iterate the lazy pipeline, discarding values, so using little memory on a large file 11:15
my $matching = $fh.lines.grep(&condition).map(&operation); for $matching { } # Only does one iteration, because $ means item
my @matching = $fh.lines.grep(&condition).map(&operation); for @matching { } # assignment is mostly eager, so will store all the matching lines in @matching before doing the iteration 11:16
This means if you're constructing lazy processing pipelines they are also a pretty good choice.
11:19 curt_ joined 11:20 Cabanossi left, mr-foobar left 11:22 Cabanossi joined 11:23 MARTIMM joined
MARTIMM m:sub s (Str :$str) {say $str.WHAT};s('1') 11:25
evalable6 (exit code 1) Too many positionals passed; expected 0 arguments but got 1
in sub s at /tmp/GVw_XG8kbF line 1
in block <unit> at /tmp/GVw_XG8kbF line 1
11:25 mr-foobar joined
MARTIMM m: sub s (Str :$str) {say $str.WHAT}; s('1'); 11:27
camelia Too many positionals passed; expected 0 arguments but got 1
in sub s at <tmp> line 1
in block <unit> at <tmp> line 1
jnthn :$str is a named argument 11:28
araraloren m:sub s (Str :$str) {say $str.WHAT};s(a => '1') 11:29
evalable6 (exit code 1) Unexpected named argument 'a' passed
in sub s at /tmp/EuwaLPG4p_ line 1
in block <unit> at /tmp/EuwaLPG4p_ line 1
MARTIMM m: sub s (Str :$str) {say $str.WHAT}; s(:str<1>);
camelia (IntStr)
araraloren m:sub s (Str :$str) {say $str.WHAT};s(str => '1')
evalable6 (Str)
11:29 TeamBlast left
MARTIMM @jnthn: thanks, why is it IntStr and not Str 11:30
araraloren m: sub s (Str :$str) {say $str.WHAT};s(str => 1)
camelia Type check failed in binding to parameter '$str'; expected Str but got Int (1)
in sub s at <tmp> line 1
in block <unit> at <tmp> line 1
araraloren m: say <1>.WHAT
camelia (IntStr)
jnthn Because <...> applies val(...) to each of the things it parses
araraloren m: say '1'.WHAT 11:31
camelia (Str)
araraloren It's different things
11:31 TeamBlast joined
MARTIMM @jnthn: looked up val sub and is undertandable that the result of val is IntStr. But I still don't get it when it assigns to Str that the type of tha variable is changed from Str into IntStr. It should coerce 11:35
araraloren m: say <1> ~~ Str;
camelia True
araraloren IntStr is a Str 11:36
jnthn MARTIMM: Types in Perl 6 are constraints, not coercions.
MARTIMM m: IntStr ~~ Str
camelia ( no output )
jnthn m: say IntStr.^mro
camelia ((IntStr) (Int) (Str) (Cool) (Any) (Mu))
MARTIMM m: say IntStr ~~ Str
camelia True
MARTIMM m: say Str ~~ IntStr
camelia False
jnthn IntStr inherits from both Int and Str. The point of this is it can be passed to code that wants a Str or wants an Int 11:37
11:39 curt_ left
araraloren m: sub f(IntStr :$is) { say $is.WHAT; }; try { f(is => "1"); CATCH { say ":("; }; }; f(is => IntStr.new(10, "1")); 11:40
camelia :(
Type check failed in binding to parameter '$is'; expected IntStr but got Str ("1")
in sub f at <tmp> line 1
in block <unit> at <tmp> line 1
araraloren m: sub f(IntStr :$is) { say $is.WHAT; }; f(is => IntStr.new(10, "1"));
camelia (IntStr)
araraloren Oh, It's a error not a exception .
jnthn lunch; bbl 11:41
11:42 ctilmes joined, vimal2012 left
Geth doc: 62137859de | (Jan-Olof Hendig)++ | doc/Language/traps.pod6
Changed incorrect mention of nextsame to callsame. jnthn++
11:43
11:50 mr-foobar left 11:51 Cabanossi left 11:52 Cabanossi joined 11:54 mr-foobar joined
rightfold The syntax highlighting for Perl 6 makes Vim extremely slow. 12:09
Am I using an old version? I am using the version that ships with Vim. 12:10
What should I upgrade to?
El_Che github.com/vim-perl/vim-perl 12:13
rightfold Should I install github.com/vim-perl/vim-perl6?
El_Che that the latest version
not slow at all on Ubuntu 16.04 and 17.04 12:14
rightfold I find this repository confusing.
"Support for Perl 5 and Perl 6 in Vim"
"This is the aggregation of all the various Perl-related syntax and helper files for Perl 5. For Perl 6 files, please see vim-perl6."
El_Che rightfold: this are the notes of my vim setup: nxadm.wordpress.com/2016/08/21/vim...-6-editor/ 12:15
rightfold So I do not have to "see vim-perl6"? 12:16
El_Che I haven't had time to work on synastic-perl6, but it works as is
rightfold: no
rightfold OK
Thanks
El_Che just clone it and you're good to go
rightfold: on a kind-of-related not, atom is nowaways pretty good for perl6 12:17
12:17 Actualeyes left
rightfold I don't want to use Atom. 12:18
El_Che sure, just fyi 12:19
rightfold Thanks :P 12:20
12:21 aborazmeh joined, aborazmeh left, aborazmeh joined
rightfold Oh I should probably install Perl 6 too lol 12:26
Gonna be difficult testing my code otherwise
araraloren I prefer emacs :) 12:35
rightfold m: '-'.IO.spurt('karate') 12:36
camelia karate
12:36 Cabanossi left
rightfold m: '-'.IO.slurp 12:36
camelia No such method 'decode' for invocant of type 'Str'. Did you mean 'encode'?
in block <unit> at <tmp> line 1
rightfold Is '-' only stdout, not stdin?
12:37 Cabanossi joined 12:41 CacoS joined
timotimo rightfold: i've experienced problems when there were comments and it'd make vim hang basically indefinitely m( 12:41
zengargoyle_ rightfold: have you ever checked out nvim? i switched way back when because it was faster at syntax highlighting and checking than vim (around the 7.0 era). 12:42
rightfold oh '-'.IO.lines works, but '-'.IO.slurp doesn't 12:44
zengargoyle_ it was the whole async thing that i think maybe vim 8 does now, highlighting, make/perltidy/perlcritic on write, etc. are threads so no delays.
rightfold I don't use any code analysis or building features in Vim 12:45
My setup is a tiling window manager where one of the terminals houses a file watcher that does the analysis and building
It is less distracting than constantly moving frames and squiggly lines and popups
zengargoyle_ gotcha, nvim still seemed to do highlighting faster or at least in a way that didn't interfere with typing. depends on whether your issue is with slowness or with flakey highlighting as a whole. 12:49
12:49 geekosaur left
zengargoyle_ i do the notify test thing too, but floating stacked windows rule. :P 12:50
zengargoyle_ needs to check out vim 8 again but hasn't had any problem and only smoother experience from nvim. 12:51
12:52 geekosaur joined, kaare_ left 12:57 khw joined
zengargoyle_ wonders if Damien Conway has a set of perl6 vim doodads. some of his p5 vim doodads are freakin' awesome. 12:59
El_Che rightfold: I have pkgs available if you run Ubuntu, Debian, Centos or Fedora: github.com/nxadm/rakudo-pkg/releases/ 13:02
zengargoyle_ El_Che: does atom have vim bindings? i have really been meaning to actually try it for various reasons. 13:03
El_Che zengargoyle_: there are some plugins 13:07
zengargoyle_ heh, El_Che i recognize your blog styling... so i've probably read a few of your posts here and there. :) 13:10
Geth doc: b72d7cbcd1 | (Zoffix Znet)++ | doc/Language/operators.pod6
Improve `orelse` docs

  - More details on what happens to the last arg
  - More details on the expected Callables
  - Add tip this is a useful Failure handler
  - Add code examples
13:12
doc: 7c2d4a5b34 | (Zoffix Znet)++ | doc/Language/operators.pod6
Improve `andthen` docs

  - Add more info on what happens to the last arg
  - Add info on the expected Callable
  - Add a tip that this op is handy for handling Failures
13:17
rightfold With vim-perl it's still slow 13:19
13:20 mr-foobar left 13:23 mr-foobar joined 13:24 rindolf left, titsuki joined 13:26 domidumont joined 13:35 Cabanossi left 13:36 mst left, mst joined 13:37 Cabanossi joined, mcmillhj joined
Geth doc: 945ae9b4a7 | (Zoffix Znet)++ | doc/Language/operators.pod6
Link to &defined from andthen docs

To make it clearer what it checks for
13:47
13:49 aborazmeh left 13:51 domidumont left
MasterDuke c: all '-'.IO.slurp 13:55
13:57 committable6 left 14:00 committable6 joined, ChanServ sets mode: +v committable6
Voldenet MasterDuke: $*IN.slurp would probably work too 14:01
14:02 sergot joined
MasterDuke yeah, that works. but '-'.IO.slurp has changed over time 14:03
14:04 pilne joined 14:05 setty1 left 14:06 jameslenz left 14:07 jameslenz joined 14:11 aborazmeh joined, aborazmeh left, aborazmeh joined 14:12 bisectable6 left, bisectable6 joined, ChanServ sets mode: +v bisectable6 14:15 grondilu left
rightfold I have multi MAIN(IO(Cool) $in = '/dev/stdin', IO(Cool) :$out = '/dev/stdout') now :) 14:15
14:15 grondilu joined
rightfold Instead of '-' 14:15
MasterDuke rightfold: it used to work. i pinged a coupe people in #perl6-dev about it 14:20
rightfold ok :)
MasterDuke c: 2017.03,2017.04.3 say '-'.IO.slurp
committable6 MasterDuke, gist.github.com/3fe6aa0ced80a9a57c...0cc63b324d
rightfold Does this bot use random emoji for stdin? 14:21
MasterDuke it just has a selection of letters, numbers, unicode chars, etc
rightfold ok :) 14:22
MasterDuke github.com/perl6/whateverable/blob/master/stdin 14:23
rightfold ah static
Voldenet Eh, i hate to maintain my own, local git repo with opinionated patches, because of situations when the patches collide with my opinionated changes :<
s/patches/official patches/ 14:24
MARTIMM Back again, I'm a slow learner, I understand what jnthn have said before about following
MasterDuke rightfold: looks like there aren't any tes