Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2017-10-14

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:01 [equa] uh oh, looks like the string '\\\'' breaks vim perl highlighting
00:02 timotimo comments are also very, very bad for it :(
00:02 timotimo long comments, at least
00:03 [equa] that was fixed in latest version I think
00:03 telex joined #perl6
00:03 araraloren_ joined #perl6
00:03 timotimo oh, nice!
00:03 timotimo i might have to update that
00:03 [equa] I got a lot of issues with it before i updated. vim mainline ships with a very old version of vimperl iirc
00:07 timotimo i somehow have a vim-perl submodule, but inside it the remote is actually the exact same repo and branch that the containing repo has, what have i done?
00:07 araraloren joined #perl6
00:10 araraloren_ joined #perl6
00:10 timotimo huh, the vim-perl one i see here links to vim-perl6 for perl6 support
00:10 timotimo am i looking at the wrong thing?
00:13 araralonre__ joined #perl6
00:17 araraloren_ joined #perl6
00:19 timotimo anyway, i ought to go to bed, seeya!
00:20 araraloren_ joined #perl6
00:24 araralonre__ joined #perl6
00:27 araraloren_ joined #perl6
00:31 araralonre__ joined #perl6
00:33 lizmat joined #perl6
00:34 araraloren_ joined #perl6
00:36 traxex_ joined #perl6
00:37 ryn1x joined #perl6
00:37 araralonre__ joined #perl6
00:41 araralonre__ joined #perl6
00:44 araraloren_ joined #perl6
00:51 araraloren joined #perl6
01:01 araraloren joined #perl6
01:05 araraloren joined #perl6
01:08 araraloren_ joined #perl6
01:12 araraloren joined #perl6
01:15 araraloren_ joined #perl6
01:18 araralonre__ joined #perl6
01:22 AlexDaniel- offtopic: what was the repo with a list of companies that promised to open-source stuff but didn't?
01:23 APic joined #perl6
01:39 TEttinger wall of shame thing?
01:40 bitrauser_ joined #perl6
01:56 ilbot3 joined #perl6
01:56 Topic for #perl6 is now »ö« Welcome to Perl 6! | https://perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:,  or /msg camelia p6: ... | irclog: http://irc.perl6.org or http://colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
01:56 [equa] joined #perl6
02:00 jeromelanteri joined #perl6
02:03 MasterDuke joined #perl6
02:04 Cabanossi joined #perl6
02:07 mson joined #perl6
02:23 cdg joined #perl6
02:32 noganex_ joined #perl6
02:37 ufobat_ joined #perl6
02:43 aindilis joined #perl6
02:53 cdg joined #perl6
03:13 evalable6 joined #perl6
03:33 evalable6 joined #perl6
03:34 Cabanossi joined #perl6
03:48 Cabanossi joined #perl6
03:59 napo1eon joined #perl6
04:06 atroxaper joined #perl6
04:06 traxex joined #perl6
04:07 wander joined #perl6
04:08 kurahaupo_ joined #perl6
04:15 jcallen joined #perl6
04:37 ryn1x joined #perl6
04:59 mson joined #perl6
05:03 Kyo91 joined #perl6
05:03 Cabanossi joined #perl6
05:03 jcallen joined #perl6
05:16 ryn1x joined #perl6
05:17 xtreak joined #perl6
05:26 NotZoffix joined #perl6
05:26 NotZoffix Zoffix, stop messing around!!
05:26 NotZoffix joined #perl6
05:26 NotZoffix Zoffix, stop messing around!!
05:26 NotZoffix joined #perl6
05:26 NotZoffix Zoffix, stop messing around!!
05:26 perigrin oO
05:26 NotZoffix joined #perl6
05:26 NotZoffix Zoffix, stop messing around!!
05:26 NotZoffix joined #perl6
05:26 NotZoffix Zoffix, stop messing around!!
05:34 lizmat joined #perl6
05:37 aborazmeh joined #perl6
05:37 aborazmeh joined #perl6
05:53 cdg joined #perl6
06:08 kaare_ joined #perl6
06:19 atroxaper left #perl6
06:24 ryn1x joined #perl6
06:31 llfourn joined #perl6
06:32 domidumont joined #perl6
06:34 kurahaupo joined #perl6
06:35 kurahaupo joined #perl6
06:36 robertle joined #perl6
06:39 domidumont joined #perl6
06:41 wamba joined #perl6
06:48 Cabanossi joined #perl6
07:01 ryn1x joined #perl6
07:18 setty1 joined #perl6
07:36 xtreak joined #perl6
07:43 xtreak_ joined #perl6
07:47 thunktone joined #perl6
07:56 mr-foobar joined #perl6
08:03 Cabanossi joined #perl6
08:07 Khisanth joined #perl6
08:10 darutoko joined #perl6
08:13 xtreak joined #perl6
08:14 ryn1x joined #perl6
08:24 xtreak joined #perl6
08:27 domidumont joined #perl6
08:28 tyil TEttinger: anything that gets marketed with a "smart" prefix should be avoided
08:32 xtreak joined #perl6
08:33 Cabanossi joined #perl6
08:37 xtreak joined #perl6
08:37 TEttinger "smart suppositories"
08:41 thunktone joined #perl6
08:41 pr1_ joined #perl6
08:42 pr1_ hello, has anyone ever used p6 on Windows on an USB stick?
08:58 aborazmeh joined #perl6
08:58 aborazmeh joined #perl6
09:33 Cabanossi joined #perl6
09:47 xtreak joined #perl6
09:49 ryn1x joined #perl6
09:49 xtreak joined #perl6
09:51 smls joined #perl6
09:53 void1 joined #perl6
10:12 smls joined #perl6
10:13 smls Is it possible that `Lock.protect` malfunctions when called from inside `submethod DESTROY`?
10:14 smls That would explain a weird bug I'm seeing in one of my scripts.
10:14 * smls tries to golf it
10:19 HoboWithAShotgun joined #perl6
10:19 jnthn smls: That's highly unlikely, but remember that just about *anything* can be on the call stack at the point a DESTROY is called.
10:20 jnthn smls: I had a bug in IO::Socket::Async where it deadlocked occasionally because DESTROY ran, tried to take a lock, but another lock was already held by that thread, and it set up a circular wait with another thread.
10:21 pecastro joined #perl6
10:23 jnthn (Which was easily solved by writing my DESTROY as `start $!lock.protect: { ... }` so it scheduled the cleanup work on the pool, where we have a "clean" stack and nothing held
10:25 smls jnthn: https://gist.github.com/smls/dbbc512df13d1bbe9836a53eb3e187f5
10:25 smls That pretty reliably throws "$current-action should be 'foo' but is 'DESTROY'" for me.
10:25 jnthn (Easily solved, but not easily found... :))
10:27 smls jnthn: With `DESTROY { start ... }`, won't the `...` part get an already destroyed object?
10:28 smls i.e. can't do clean-up that relies on attribute values anymore?
10:28 timotimo DESTROY will keep it alive a bit longer
10:28 timotimo there's no other way to properly do destructors in a gc-having language, because of potential resurrections
10:28 smls timotimo: But `start` returns immediately.
10:29 timotimo yes
10:29 timotimo it survives until the next gc run
10:29 timotimo in which case it might be held alive by whatever references the start block's closure
10:29 timotimo i'm not sure if there's something to prevent DESTROY firing multiple times for an object that got resurrected?
10:29 jnthn There is
10:29 jnthn Objects with a DESTROY method are put on a special queue at the point they are created
10:30 smls timotimo:  Ah. So the `start`ed code may not get an already destroyed object then?
10:30 jnthn After each GC run, this queue is walked to see if there are any objects on it that are dead
10:30 jnthn If they are, then they are removed from the queue and and marked
10:30 jnthn So, it's "you only live twice" semantics
10:30 timotimo it's not possible to handle an "already destroyed" object in perl6. unless of course there's a bug, in which case you'll get a segfault, or internal error
10:31 jnthn The next time it becomes unreachable, then it's not in the finalize queue, and so just dies an ordinary death
10:31 jnthn Oh, and since the start block closes over self, you can clear up the attributes just fine that way :)
10:32 smls jnthn: Ah right, closures FTW once again... :)
10:32 jnthn (As in, access them, call any native code, etc.)
10:32 jnthn That's actually the reason I needed the lock in destroy in the first place: calling down to a C library
10:32 jnthn As for the gist...that looks odd
10:36 jnthn smls: ohhh
10:37 jnthn It's the very same problem I just told you about that I had in IO::Socket::Async::SSL I think ;)
10:39 smls Oh.. is the DESTROY calling `.lock` on a thread which already holds that lock, and succeeds because of `Lock` idempotence?
10:39 jnthn Correct :)
10:39 jnthn 'tis a recursive lock
10:40 jnthn Yeah, given that `start atomic-action "DESTROY"` makes it go away, seems very likely
10:41 jnthn At least now I know the coffee started working :)
10:41 smls :)
10:43 xtreak joined #perl6
10:48 Cabanossi joined #perl6
10:52 xinming joined #perl6
10:54 cdg joined #perl6
10:59 ryn1x joined #perl6
11:09 rindolf joined #perl6
11:18 smls jnthn: I openened a doc issue for the DESTROY trap: https://github.com/perl6/doc/issues/1606
11:18 smls In case you want to add someting...
11:24 jnthn Added one more thing, but looks good :)
11:27 eliasr joined #perl6
11:31 ryn1x joined #perl6
11:37 Geth__ joined #perl6
11:41 araraloren joined #perl6
11:43 [equa] joined #perl6
11:48 Cabanossi joined #perl6
11:55 MasterDuke joined #perl6
12:06 Geth joined #perl6
12:11 void1 joined #perl6
12:11 void1 joined #perl6
12:11 Zoffix joined #perl6
12:12 Zoffix PSA: Geth now lives on hack, in /home/geth/geth  There's a service setup, so if a restart of it is needed, you'd just do `sudo service geth restart`
12:12 Zoffix left #perl6
12:14 tyil in a for loop, can I get the current iteration number by some default var, or do I need to add a my $i and just $i++
12:16 jnthn for @things.kv -> $i, $value { }
12:16 moritz you can also do  for @list.kv -> $index, $v { ... }
12:16 * moritz too slow
12:17 tyil thanks :3
12:17 tyil .hug moritz
12:17 * huggable hugs moritz
12:18 tyil dont worry, youre still appreciated
12:19 BenGoldberg joined #perl6
12:23 ShalokShalom_ joined #perl6
12:26 moritz awww
12:38 domidumont joined #perl6
12:43 smls tyil:  You can also use ++$ :
12:43 smls m: for "a".."e" { say ++$ ~ $_ }
12:43 camelia rakudo-moar d56151743: OUTPUT: «1a␤2b␤3c␤4d␤5e␤»
12:43 tyil :o
12:43 tyil now that is fancy
12:43 smls just be aware that it is not specifically tied to the loop, but rather a state variable attached to the block it's in.
12:44 smls $++  also works, if you want to start from 0.
12:44 tyil seems to always return 2 in my loop :(
12:45 timotimo yeah, depending on how the scope is treated, if it's nested or something, for example
12:46 smls tyil: Its state is attached to the block (curly braces) it's in
12:46 timotimo m: for ^3 { for <a b c> { say $++ ~ $_ } }
12:46 camelia rakudo-moar d56151743: OUTPUT: «0a␤1b␤2c␤0a␤1b␤2c␤0a␤1b␤2c␤»
12:46 timotimo see how it goes back to 0 once the outer loop runs again
12:47 timotimo m: for ^3 { state $nom; for <a b c> { say $nom++ ~ $_ } }
12:47 camelia rakudo-moar d56151743: OUTPUT: «0a␤1b␤2c␤3a␤4b␤5c␤6a␤7b␤8c␤»
12:47 ChoHag joined #perl6
12:47 smls tyil:  So if you want it to be a loop counter, you have to put it directly in the loop block, not into a nested block inside the loop block
12:47 timotimo you can give the state variable a name and explicit scope (rather than implicitly hanging onto the innermost scope)
12:48 smls Right, as timotimo demontrated it's really just a short way to declare a state variable and increment it.
12:51 Rawriful joined #perl6
12:57 Aaronepower joined #perl6
12:59 ChoHag Is Zef still the package manager du jour?
13:02 MasterDuke ChoHag: yep
13:03 ChoHag Thanks.
13:03 Cabanossi joined #perl6
13:06 ryn1x joined #perl6
13:08 ChoHag Does it still attempt to byte-compile into read-only directories?
13:09 ChoHag No wait that was the runtime, not the package manager. I think.
13:14 Perl6Robot joined #perl6
13:14 Perl6Robot OHAI!
13:15 Perl6Robot joined #perl6
13:15 Perl6Robot OHAI!
13:15 Perl6Robot joined #perl6
13:15 Perl6Robot OHAI!
13:15 moritz all hail our nwo Perl 6 overrobots!
13:15 moritz *new
13:15 Perl6Robot joined #perl6
13:15 Perl6Robot OHAI!
13:15 Perl6Robot joined #perl6
13:15 Perl6Robot OHAI!
13:17 HoboWithAShotgun m: sub x { return gather { my @a = 1,2,3; take |@a }.flat; }; say x
13:17 camelia rakudo-moar 0d217357a: OUTPUT: «(1 2 3)␤»
13:17 HoboWithAShotgun any way to get rid of the flat at the end?
13:19 moritz m: sub x { return gather { my @a = 1,2,3; .take for @a }}; say x()
13:19 camelia rakudo-moar 0d217357a: OUTPUT: «(1 2 3)␤»
13:19 BenGoldberg m: sub x { |gather { my @a = 1,2,3; take |@a } }; say x
13:19 camelia rakudo-moar 0d217357a: OUTPUT: «((1 2 3))␤»
13:20 BenGoldberg m: sub x { |gather { my @a = 1,2,3; .take for @a } }; say x
13:20 camelia rakudo-moar 0d217357a: OUTPUT: «(1 2 3)␤»
13:20 HoboWithAShotgun exactly ben :)
13:20 BenGoldberg m: sub x { gather { my @a = 1,2,3; .take for @a } }; say x
13:20 camelia rakudo-moar 0d217357a: OUTPUT: «(1 2 3)␤»
13:21 HoboWithAShotgun m: sub x { gather { my @a = 1,2,3; take for @a } }; say x
13:21 camelia rakudo-moar 0d217357a: OUTPUT: «take without parameters doesn't make sense␤  in block  at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
13:22 HoboWithAShotgun m: sub x { gather { my @a = 1,2,3; take * for @a } }; say x
13:22 camelia rakudo-moar 0d217357a: OUTPUT: «(* * *)␤»
13:22 HoboWithAShotgun m: sub x { gather { my @a = 1,2,3; take $_ for @a } }; say x
13:22 camelia rakudo-moar 0d217357a: OUTPUT: «(1 2 3)␤»
13:22 * BenGoldberg thinks we need some sort of .take-all method, and perhaps a matching sub
13:24 HoboWithAShotgun my gut feeling was that .take should just take a list and put its elements in the result analogous to .push
13:25 moritz it's analogous to .push, not to append
13:25 moritz so it's not flat
13:25 HoboWithAShotgun i was surprised by its behaviour
13:25 HoboWithAShotgun m: my @a; my @b = 1,2,3; @a.push( |@b ); @a.say
13:25 camelia rakudo-moar 0d217357a: OUTPUT: «[1 2 3]␤»
13:26 BenGoldberg m: my @a; my @b = 1,2,3; @a.append( @b ); @a.say
13:26 camelia rakudo-moar 0d217357a: OUTPUT: «[1 2 3]␤»
13:27 HoboWithAShotgun and take is like neiter of those
13:28 HoboWithAShotgun m: sub x { return gather { my @a = 1,2,3; take |@a } }; say x
13:28 camelia rakudo-moar 0d217357a: OUTPUT: «((1 2 3))␤»
13:28 moritz m: say gather { take 1, 2, 3; take 4, 5, 6 }
13:28 camelia rakudo-moar 0d217357a: OUTPUT: «((1 2 3) (4 5 6))␤»
13:28 moritz that's pretty much how push works
13:29 moritz my @a; @a.push: (1, 2, 3); @a.push: (4, 5, 6); say @a
13:29 moritz m: my @a; @a.push: (1, 2, 3); @a.push: (4, 5, 6); say @a
13:29 camelia rakudo-moar 0d217357a: OUTPUT: «[(1 2 3) (4 5 6)]␤»
13:29 moritz m: my @a; @a.push: 1, 2, 3; @a.push: (4, 5, 6); say @a
13:29 camelia rakudo-moar 0d217357a: OUTPUT: «[1 2 3 (4 5 6)]␤»
13:29 HoboWithAShotgun m: say gather { take |1, 2, 3; take |4, 5, 6 }
13:29 camelia rakudo-moar 0d217357a: OUTPUT: «((1 2 3) (4 5 6))␤»
13:29 moritz m: my @a; @a.push: 1, 2, 3; @a.push: 4, 5, 6; say @a
13:29 camelia rakudo-moar 0d217357a: OUTPUT: «[1 2 3 4 5 6]␤»
13:29 moritz right, it's a bit different
13:29 HoboWithAShotgun yes, but if i do push(|something) it flattens
13:30 HoboWithAShotgun if i do take |something it doesnt
13:30 mr-fooba_ joined #perl6
13:31 HoboWithAShotgun yes, and since i see take as a sugarcoated .push or maybe .append i was surprised and probably not alone so
13:32 HoboWithAShotgun but hey, this is good for my a new "small discoveries" post over at perlmonks
13:37 BenGoldberg The | prefix is syntactic sugar for doing slip() around the expression.
13:41 ryn1x joined #perl6
13:48 Cabanossi joined #perl6
13:50 buggable New CPAN upload: Config-Parser-toml-1.0.1.tar.gz by TYIL https://cpan.metacpan.org/authors/id/T/TY/TYIL/Perl6/Config-Parser-toml-1.0.1.tar.gz
13:50 buggable New CPAN upload: Config-Parser-yaml-1.0.1.tar.gz by TYIL https://cpan.metacpan.org/authors/id/T/TY/TYIL/Perl6/Config-Parser-yaml-1.0.1.tar.gz
13:55 Zoffix joined #perl6
13:56 Zoffix Nah, there are two variants: prefix:<|> that's just does .Slip on the args and the | in routine args, which slips the args in. There's no slip() involved. If you'd done slip() you'd just pass one positional arg, the Slip
13:57 Zoffix oh
13:58 perigrin Zoffix: Stop messing around!!
13:58 Zoffix m: sub z(|c) { dd c }; my @a = <a b c>; z |@a; z prefix:<|>(@a); z @a.Slip
13:58 camelia rakudo-moar 0d217357a: OUTPUT: «\("a", "b", "c")␤\("a", "b", "c")␤\(slip("a", "b", "c"))␤»
13:58 perigrin (sorry ... couldn't contain myself)
13:58 Zoffix The grammar relies on prefix:<|> to use the prefix:<|> presence to do the magic?
13:58 Zoffix perigrin: ?
13:59 * perigrin goes to find public logs
13:59 perigrin https://irclog.perlgeek.de/perl6/2017-10-14#i_15301161
14:00 Zoffix Ah, yeah, it cheats and rewrites prefix:<|> call: https://github.com/rakudo/rakudo/blob/nom/src/Perl6/Actions.nqp#L6196
14:00 Zoffix I thought it was just matching for `|`
14:00 Zoffix perigrin: it's AlexDaniel messing around with code evals :(
14:00 perigrin Zoffix: it's confusing as hell at 3am (localtime) :)
14:05 Zoffix left #perl6
14:08 melezhik_ joined #perl6
14:11 ryn1x joined #perl6
14:12 HoboWithAShotgun joined #perl6
14:34 BenGoldberg m: sub MONKEY-SEE-NO-EVAL { Bool.pick }; say EVAL '42'
14:34 camelia rakudo-moar 0d217357a: OUTPUT: «42␤»
14:34 BenGoldberg m: sub MONKEY-SEE-NO-EVAL { Bool.pick }; say EVAL "$_" for ^10;
14:34 camelia rakudo-moar 0d217357a: OUTPUT: «0␤1␤2␤3␤4␤5␤6␤7␤8␤9␤»
14:34 BenGoldberg m: sub MONKEY-SEE-NO-EVAL { Bool.pick }; say EVAL "$_" for ^100;
14:34 camelia rakudo-moar 0d217357a: OUTPUT: «0␤1␤2␤3␤4␤5␤6␤7␤8␤9␤10␤11␤12␤13␤14␤15␤16␤17␤18␤19␤20␤21␤22␤23␤24␤25␤26␤27␤28␤29␤30␤31␤32␤33␤34␤35␤36␤37␤38␤39␤40␤41␤42␤43␤44␤45␤46␤47␤48␤49␤50␤51␤5…»
14:35 BenGoldberg m: sub MONKEY-SEE-NO-EVAL { False }; say EVAL "$_" for ^100;
14:35 camelia rakudo-moar 0d217357a: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤EVAL is a very dangerous function!!! (use the MONKEY-SEE-NO-EVAL pragma to override this error,␤but only if you're VERY sure your data contains no injection attacks)␤at <tmp>:1␤------> 3SEE-NO-EV…»
14:35 BenGoldberg m: sub MONKEY-SEE-NO-EVAL { True }; say EVAL "$_" for ^100;
14:35 camelia rakudo-moar 0d217357a: OUTPUT: «0␤1␤2␤3␤4␤5␤6␤7␤8␤9␤10␤11␤12␤13␤14␤15␤16␤17␤18␤19␤20␤21␤22␤23␤24␤25␤26␤27␤28␤29␤30␤31␤32␤33␤34␤35␤36␤37␤38␤39␤40␤41␤42␤43␤44␤45␤46␤47␤48␤49␤50␤51␤5…»
14:36 BenGoldberg m: sub MONKEY-SEE-NO-EVAL { so $++ }; say EVAL "$_" for ^100;
14:36 camelia rakudo-moar 0d217357a: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤EVAL is a very dangerous function!!! (use the MONKEY-SEE-NO-EVAL pragma to override this error,␤but only if you're VERY sure your data contains no injection attacks)␤at <tmp>:1␤------> 3EE-NO-EVA…»
14:36 BenGoldberg m: sub MONKEY-SEE-NO-EVAL { so !$++ }; say EVAL "$_" for ^100;
14:36 camelia rakudo-moar 0d217357a: OUTPUT: «0␤1␤2␤3␤4␤5␤6␤7␤8␤9␤10␤11␤12␤13␤14␤15␤16␤17␤18␤19␤20␤21␤22␤23␤24␤25␤26␤27␤28␤29␤30␤31␤32␤33␤34␤35␤36␤37␤38␤39␤40␤41␤42␤43␤44␤45␤46␤47␤48␤49␤50␤51␤5…»
14:36 BenGoldberg Derp, it's called each time EVAL is seen in the code, not each time the bit with the EVAL in it is run.
14:37 BenGoldberg m: sub MONKEY-SEE-NO-EVAL { so !$++ }; say EVAL "'first'"; say EVAL "'second'"
14:37 camelia rakudo-moar 0d217357a: OUTPUT: «first␤second␤»
14:37 BenGoldberg Oh not.  Hmm.
14:37 darkmorph joined #perl6
14:42 thunktone joined #perl6
15:03 Cabanossi joined #perl6
15:04 Aaronepower joined #perl6
15:17 zakharyas joined #perl6
15:19 ryn1x joined #perl6
15:23 zakharyas joined #perl6
15:52 pilne joined #perl6
15:53 thunktone joined #perl6
15:56 pecastro joined #perl6
15:56 niceperl joined #perl6
15:58 [equa] joined #perl6
16:03 BenGoldberg joined #perl6
16:04 mson joined #perl6
16:04 dogbert17 joined #perl6
16:10 mempko joined #perl6
16:19 ignis__away joined #perl6
16:22 margeas joined #perl6
16:25 thunktone joined #perl6
16:25 pecastro joined #perl6
16:32 nadim joined #perl6
16:33 Cabanossi joined #perl6
16:40 pecastro joined #perl6
17:20 andrzejku joined #perl6
17:21 releasable6 joined #perl6
17:23 andrzejku joined #perl6
17:33 mr-foobar joined #perl6
17:50 nadim joined #perl6
17:52 andrzejku joined #perl6
17:59 mr-fooba_ joined #perl6
18:00 rba_ joined #perl6
18:09 AlexDaniel- joined #perl6
18:09 |oLa| joined #perl6
18:19 thunktone joined #perl6
18:32 HoboWithAShotgun joined #perl6
18:38 Ben_Goldberg joined #perl6
18:48 Cabanossi joined #perl6
18:52 cdg joined #perl6
18:56 |oLa| joined #perl6
18:56 mson joined #perl6
18:58 |oLa|1 joined #perl6
19:16 lizmat joined #perl6
19:23 ryn1x joined #perl6
20:04 Levex joined #perl6
20:13 robertle joined #perl6
20:26 PeterMortensen_ joined #perl6
20:33 Cabanossi joined #perl6
20:34 scovit joined #perl6
20:37 cdg joined #perl6
20:39 scovit Hello, I made some bindings to the DRMAA library just for fun and learning the language, v6.d.PREVIEW in this case. https://github.com/scovit/Scheduler-DRMAA I will add it to the ecosystem, but also like to hear some feedback maybe on the API. I took lot of freedoms.
20:40 scovit If Perl 6 will keep developing in this directions, it will take decades but will do wonders
20:40 |oLa| joined #perl6
20:41 El_Che University Cluster soft?
20:42 timotimo "in order to lunch one, or more jobs", om nom nom jobs
20:43 scovit El_Che to push stuff on those
20:43 timotimo "q:to/⬅ 完/" ♥
20:45 scovit should find more excuses to use unicode :)
20:50 TimToady joined #perl6
20:51 robertle joined #perl6
20:59 ryn1x joined #perl6
21:04 jeek joined #perl6
21:11 jnthn scovit++ # first ecosystem implementation of the Awaitable role that I'm aware :)
21:13 timotimo jnthn: will you push the commit that introduces Sequence? or did you already do it and i missed it?
21:14 HoboWithAShotgun I can't find the code for infix:<.>
21:15 timotimo you mean method invocation?
21:15 HoboWithAShotgun aye
21:15 timotimo it's something in the grammar, not an "operator"
21:15 timotimo in a similar vein, the ! in self!foo is a method called dispatch:<!>
21:15 timotimo well, the grammar turns the syntax into a call to that
21:17 scovit jnthn++ thanks, you are doing an amazing job on concurrency
21:19 jnthn timotimo: Ahh... It's on my machien at the office, so Monday
21:19 jnthn *machine
21:19 jnthn Funnily enough, that's the one that doesn't run like a dog... :)
21:23 timotimo i'm not sure how to interpret that
21:23 timotimo isn't it good that your work machine runs great?
21:39 jnthn timotimo: Yes, it is. Sorry, it was a bad pun on my typo; chien is French for dog :)
21:39 timotimo oh!
21:40 timotimo right, i recently looked that up for some reason
21:41 timotimo i think some pun related to chat vs chien
21:42 timotimo bbiab
21:43 scovit joined #perl6
21:43 PeterMortensen_ joined #perl6
21:43 MasterDuke joined #perl6
21:43 wander joined #perl6
21:48 ryn1x joined #perl6
21:49 HoboWithAShotgun is there a nicer way to get hold of a method object other than .^methods.first({ .name ~~ $b }) ?
21:51 AlexDaniel- what about .^can($name) ?
21:52 jnthn .^lookup($b)
21:52 jnthn If you want the Method object that was declared
21:53 jnthn .^find_method($b) if you want something to invoke
21:53 jnthn Sometimes they give you the same
21:53 jnthn But sometimes not
21:54 jnthn As a rule, if you're introspecting use .^lookup, if you're messing around with intercepting dispatch, use .^find_method
21:54 AlexDaniel- that's also what the docs say here https://docs.perl6.org/type/Metamodel::ClassHOW#(Metamodel::MethodContainer)_method_lookup
21:56 jnthn Yay, docs :)
21:58 AlexDaniel- m: say Nil.WHY
21:58 camelia rakudo-moar d79ac9704: OUTPUT: «No documentation available for type 'Nil'.␤Perhaps it can be found at https://docs.perl6.org/type/Nil␤»
21:58 AlexDaniel- TIL
22:07 HoloIRCUser2 joined #perl6
22:08 |oLa|1 joined #perl6
22:09 AlexDaniel- .seen Skarsnik
22:09 yoleaux I saw Skarsnik 7 Oct 2017 20:49Z in #perl6-dev: <Skarsnik> [Alexdanielable]
22:09 kyan joined #perl6
22:09 HoloIRCUser2 left #perl6
22:10 HoboWithAShotgun this works https://hastebin.com/urudozuhem.php but is too ugly
22:11 HoboWithAShotgun i'd rathere have <  $a^^^parent  > instead of <   $a^^^<parent>    >
22:11 HoboWithAShotgun if that is at all possible with a simple operator
22:11 HoboWithAShotgun since the RHS is a bareword
22:13 geekosaur that would require mutating the grammar, not just tweaking an operator definition
22:15 HoboWithAShotgun that's what i thought. i'd be happy with ^^^$a.parent too but that calls the method
22:15 HoboWithAShotgun can't i just get a hard ref like with \ in p5?
22:16 ryn1x joined #perl6
22:17 HoloIRCUser1 joined #perl6
22:19 HoboWithAShotgun and why by the sweet legs of holy sister mary poppins is there no ^invoke method?
22:21 rba joined #perl6
22:24 geekosaur you may be able to use & there. alternately the value of .^can(mth) is a reference to the method mth
22:26 tyil lizmat: https://www.meetup.com/DomCode/events/244171361/ might be interesting to join to show off some cool stuff in perl 6
22:29 gfldex m: class C { method m {} }; C.new.^can('m')[0].CALL-ME();
22:29 camelia rakudo-moar b6982e689: OUTPUT: «No such method 'CALL-ME' for invocant of type 'Method'␤  in block <unit> at <tmp> line 1␤␤»
22:29 gfldex HoboWithAShotgun: the problem with the .^invoke method is that it's a submethod :->
22:30 HoboWithAShotgun itt doesn't matter, i know have this
22:30 HoboWithAShotgun https://hastebin.com/bakofateke.php
22:30 HoboWithAShotgun way nicer. please try to break it
22:31 ilbelkyr joined #perl6
22:33 Cabanossi joined #perl6
22:35 HoboWithAShotgun someone must come up with a good idea for this guy: https://unicode-table.com/de/2BED/
22:35 HoboWithAShotgun we can call it the christmas tree operator
22:36 tyil makes output on STDOUT green, and on STDERR red
22:37 HoboWithAShotgun :-)
22:40 HoboWithAShotgun m: my $ດຕຖທ = 1; $ດຕຖທ.say
22:40 camelia rakudo-moar bb1df2cb0: OUTPUT: «1␤»
22:41 HoboWithAShotgun m: my $😕😖😗😘 = 1; $😕😖😗😘.say
22:41 camelia rakudo-moar bb1df2cb0: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Name must begin with alphabetic character␤at <tmp>:1␤------> 3my $7⏏5😕😖😗😘 = 1; $😕😖😗😘.say␤    expecting any of:␤        constraint␤        infix␤        infix st…»
22:44 HoboWithAShotgun is the side arrow used in p6? <-
22:45 ryn1x joined #perl6
22:46 HoboWithAShotgun m: say 1 <- 2
22:46 camelia rakudo-moar bb1df2cb0: OUTPUT: «False␤»
22:46 HoboWithAShotgun m: say 2 <- 1
22:46 camelia rakudo-moar bb1df2cb0: OUTPUT: «False␤»
22:47 HoboWithAShotgun what does that do?
22:52 geekosaur that looks to me like it parsed as 1 < -2 and 2 < -1 respectively
22:53 geekosaur note that perl 6 syntax is a bit context dependent, though, so that is bo guarantee that <- doesn't have a special meaning somewhere
22:54 geekosaur (but the only possibility I can think of off the top of my head is one that doesn't make much sense: in a pointy block there is -> and <-> but <- would represent a write-only binding)
22:54 geekosaur *no guarantee
22:54 timotimo funny enough that we call that --> rather than <--
23:08 ilbelkyr joined #perl6
23:09 ilbelkyr joined #perl6
23:18 Cabanossi joined #perl6
23:20 buggable New CPAN upload: App-Bob-0.2.2.tar.gz by TYIL https://cpan.metacpan.org/authors/id/T/TY/TYIL/Perl6/App-Bob-0.2.2.tar.gz
23:20 buggable New CPAN upload: Hash-Merge-0.1.1.tar.gz by TYIL https://cpan.metacpan.org/authors/id/T/TY/TYIL/Perl6/Hash-Merge-0.1.1.tar.gz
23:20 buggable New CPAN upload: IRC-Client-Plugin-Github-0.1.4.tar.gz by TYIL https://cpan.metacpan.org/authors/id/T/TY/TYIL/Perl6/IRC-Client-Plugin-Github-0.1.4.tar.gz
23:20 buggable New CPAN upload: MPD-Client-0.1.3.tar.gz by TYIL https://cpan.metacpan.org/authors/id/T/TY/TYIL/Perl6/MPD-Client-0.1.3.tar.gz
23:23 MasterDuke joined #perl6
23:23 HoboWithAShotgun ha ha : https://imgur.com/a/rlHgg
23:28 void1 joined #perl6
23:31 HoboWithAShotgun i think i'll settle with 𝄆 and |:
23:31 HoboWithAShotgun the symbol means repeat which kinda fits
23:33 |oLa| joined #perl6
23:33 TimToady joined #perl6
23:34 ChoHag joined #perl6
23:54 evalable6 joined #perl6
23:55 ryn1x joined #perl6
23:56 strangemk2 joined #perl6
23:58 ipatrol joined #perl6
23:58 ipatrol Are the things that look like adverbs on protoregexes actual adverbs, or do they just syntactically look like them?

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

Perl 6 | Reference Documentation | Rakudo