»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_log/perl6 | UTF-8 is our friend! 🦋
Set by Zoffix on 25 July 2018.
00:03 netrino_ joined 00:05 netrino left 00:15 abraxxa left 00:19 Manifest0 left 00:23 natrys left 00:24 Manifest0 joined 00:27 fake_space_whale joined 00:31 comborico1611 left 00:36 kurahaupo left 00:37 kurahaupo joined 00:51 aborazmeh left 00:58 buffet left, buffet joined, sftp_ joined 00:59 sftp left, sftp_ is now known as sftp 01:00 lizmat joined 01:08 raschipi joined 01:13 Manifest0 left, raschipi left 01:18 Manifest0 joined 01:19 ddddddd left 01:26 Manifest0 left
Xliff m: .say for 1, 2, 3, 'a' 01:27
evalable6 1
2
3
a
01:32 Manifest0 joined 01:33 zacts joined, netrino_ left 01:46 Manifest0 left 01:53 Manifest0 joined 02:42 cpup joined, Manifest0 left 02:47 Manifest0 joined 02:51 zacts left 03:03 Manifest0 left
Xliff m: role X { method y { … }}; class Y does X { method y { say "yes" } }; Y.new.y 03:06
evalable6 yes
Xliff ^^ Voldenet
Voldenet well, it certainly is shorter 03:07
I mean, by using Y instead of :: 03:08
03:08 Manifest0 joined
Xliff m: role X { method y { … }}; class Y does role :: { method y { say "yes" } }; Y.new.y 03:09
evalable6 (exit code 1) 04===SORRY!04=== Error while compiling /tmp/SNN66u0O7h
Invalid…
Xliff, Full output: gist.github.com/b4f889014c894f2fc6...d9ac9f0fe6
Xliff Why the requirement of '::' 03:10
Roles can be lexically scoped.
Voldenet it's one-time use case anyway
Xliff m: role X { method y { … }}; class :: does X { method y { say "yes" } }.new.y 03:11
evalable6 yes
Xliff *shrug*
Voldenet My specific use case is event handlers - I've got a few methods "on-success", "on-fail", "on-queue" in role 03:16
holyghost Xliff : you do .new.y so you call on the instance, to be exact 03:20
Voldenet : maybe look at a system such as libsigc++, using slots for your roles 03:21
it's a library built for callbacks and what not 03:22
03:24 fake_space_whale left
holyghost You might say it's LISP CLOS OOP slots and lambda calculus for event functionality 03:27
03:33 vrurg left
Voldenet I'm doing something similar, but I'm not going to decouple event calling from the calling class for the sake of simplicity 03:33
03:53 vrurg joined 03:54 Cabanoss- joined, [joker] left 03:55 Cabanossi left, Cabanoss- is now known as Cabanossi 04:02 sauvin joined 04:07 Manifest0 left 04:12 Manifest0 joined 04:32 molaf joined 04:51 mojca joined, mojca left, mojca joined 04:52 Manifest0 left 04:55 atroxaper joined, mojca1 joined 04:56 mojca left 04:57 Manifest0 joined
holyghost .tell Xliff I've sent you some email, please respond 05:00
yoleaux holyghost: I'll pass your message to Xliff.
05:02 mojca1 left 05:10 mojca joined, mojca left, mojca joined, mojca left, mojca joined, mojca left, mojca joined 05:14 mojca left 05:16 Manifest0 left 05:23 Manifest0 joined 05:44 vrurg left 05:46 Manifest0 left 05:52 Manifest0 joined 05:56 atroxaper left 06:24 Manifest0 left 06:30 lizmat left 06:31 Manifest0 joined 06:35 [particle] left 06:52 ufobat_ joined
Xliff Anyone seen this? Unknown type NativeCall::Types::void used in native call. 06:53
yoleaux 05:00Z <holyghost> Xliff: I've sent you some email, please respond
Xliff .tell holyghost Sure. I'll get back to you.
yoleaux Xliff: I'll pass your message to holyghost.
06:53 cpan-p6 left 06:54 cpan-p6 joined, cpan-p6 left, cpan-p6 joined 06:56 ufobat__ left 06:57 jmerelo joined
jmerelo releasable6: status 06:57
releasable6 jmerelo, Next release will happen when it's ready. 2 blockers. 61 out of 245 commits logged (⚠ 51 warnings)
jmerelo, Details: gist.github.com/f031e46eb692e76cca...51ccb4a95f
Xliff .tell holyghost Done. 06:58
yoleaux Xliff: I'll pass your message to holyghost.
07:14 atroxaper joined 07:42 Manifest0 left 07:48 Manifest0 joined 07:56 jmerelo left 07:58 rindolf joined 08:04 lizmat joined 08:06 woolfy joined 08:19 lizmat left 08:26 molaf left, lizmat joined 08:27 Manifest0 left 08:31 cpage left 08:33 Manifest0 joined 08:42 molaf joined 08:48 Manifest0 left 08:53 Manifest0 joined 08:54 lichtkind left 09:01 Black_Ribbon left 09:03 rindolf left 09:06 lichtkind joined 09:09 rindolf joined 09:13 aborazmeh joined, aborazmeh left, aborazmeh joined 09:14 pminten joined 09:20 Xliff left 09:24 ufobat_ left 09:25 lichtkind left 09:27 pminten left 09:30 sena_kun joined 09:41 lichtkind joined 09:42 molaf left 10:01 Manifest0 left 10:05 Manifest0 joined 10:12 mowcat joined 10:14 lichtkind left 10:15 atroxaper left 10:18 mowcat left 10:24 Manifest0 left 10:31 Manifest0 joined
sena_kun kawaii, ping? 11:05
kawaii sena_kun: pong! 11:06
sena_kun kawaii, hi! As a release manager, do you have an access to release files like moarvm|nqp-2019.03.tar.gz? If they are stored somewhere besides a dead server, and if not can be build them? 11:07
kawaii let me check, AlexDaniel gave me access to a single server _somewhere_, but I fear it might be the dead one
sena_kun thanks 11:08
kawaii sena_kun: yeah seems so, my key was added to www.p6c.org but that's it, sorry :/ 11:09
sena_kun users keep getting issues on attempt to get a release or upgrade one, which is pretty damn bad, so I thought maybe we can get at least latest release on the backup server
kawaii, can we/you build one?
I think we have rakudo star release re-created, so likely just need to upload to a new server to match old url 11:10
but no idea what to do with the normal ones
kawaii sena_kun: have you tried asking over at the moarvm channel if they have any of the old files? 11:11
sena_kun kawaii, not yet, but I won't interfere with you. :) 11:12
kawaii I've just nudged them since i'm waiting for moarvm 2019.04 anyway
lizmat nine is looking at the last reproducibility issues and would rather have a little more time to figure out whether changes to MoarVM are needed 11:13
kawaii: ^^
kawaii lizmat: thank you for the update :)
lizmat yw :-) 11:14
holyghost tell .Xliff thanks a lot, I'm back on your VM :-) 11:16
yoleaux 06:53Z <Xliff> holyghost: Sure. I'll get back to you.
06:58Z <Xliff> holyghost: Done.
ugexe I've put my github p6c ecosystem mirror as the preferred choice instead of ecosystem-api.p6c.org in zef 0.7.4 11:17
sena_kun ugexe++
11:19 lichtkind joined
holyghost .tell Xliff I better use CPAN for NetBSD::X software as your box in the ecosystem won't pull it as you said, I really need to have packages for netbsd pkgsrc later on 11:22
yoleaux holyghost: I'll pass your message to Xliff.
11:23 aborazmeh left
holyghost They also need a Perl6 maintainer, which I might do on my own or with some help 11:23
11:23 ccntrq left 11:26 atroxaper joined
holyghost macports also needs one IIRC 11:28
11:37 ccntrq joined 11:38 pecastro joined
holyghost Is there anyone who can give me webspace for putting GNU software on it ? I have these 2 and 20GB tarballs of my old yellowcouh.org server, but it was too expensive to support any longer 11:39
just a login and a webserver 11:40
s/yellowcouh/yellowcouch 11:42
ok nm :-) 11:43
.tell Xliff I'm going to upload my old server home directories to my holyghost account, they should be cherished as it's all my software during 10 years 11:44
yoleaux holyghost: I'll pass your message to Xliff.
holyghost .tell Xliff they're tarballs home-X.tar.gz, thanks for looking :-) 11:45
yoleaux holyghost: I'll pass your message to Xliff.
11:52 aindilis left 11:54 aindilis joined
El_Che sena_kun: my pkgs are just a wrapper around /opt/rakudo-pkg in case you need to test something against a specific version 12:05
12:05 Manifest0 left
El_Che holyghost: if it's code put it on github or gitlab? 12:05
sena_kun El_Che, I was more interesting in ways to get binaries back so users could install/update their releases instead of getting an error about "It will be fixed on 23th". :| 12:06
timotimo uh oh, dockerhub had passwords leaked 12:07
El_Che sena_kun: you need binaries histories? homebrew has rakudo binaries (next to rakudo star), rakudo-pkg has linux binaries. Windows is problematic 12:10
12:10 Manifest0 joined
El_Che timotimo: new password has 748bit entropy :) 12:14
12:15 Manifest0 left 12:16 sena_kun left, AlexDaniel left 12:17 AlexDaniel joined, cpan-p6 left 12:18 cpan-p6 joined, cpan-p6 left, cpan-p6 joined 12:20 Manifest0 joined
El_Che .tell jmerelo 14:07 < timotimo> uh oh, dockerhub had passwords leaked 12:33
yoleaux El_Che: I'll pass your message to jmerelo.
El_Che ^--- tyil
tyil El_Che: already aware of it :>
I've already rolled out new dockerhub creds at work as well 12:34
El_Che tyil: just to be sure :) 12:35
tyil yes, thanks for the headsup either way ^_^
12:45 MasterDuke joined 12:46 MasterDuke left, MasterDuke joined, netrino joined 12:48 netrino_ joined 12:51 netrino left 13:03 kurahaupo_ joined 13:06 kurahaupo left, leont joined 13:08 Manifest0 left 13:13 Manifest0 joined
AlexDaniel rba: you should also join #perl6-dev 13:44
rba: also, you probably know about this already, but in case you need to read past discussions: colabti.org/irclogger/irclogger_logs/perl6-dev 13:45
13:52 aborazmeh joined, aborazmeh left, aborazmeh joined 13:55 lucasb joined 14:11 Garland_g joined 14:13 ayerhart left, aborazmeh left 14:15 ayerhart joined 14:20 leont left
rba AlexDaniel: joined. yet not able to be every minute in irc. currenty I've configured my bouncer to get notifications. 14:22
14:22 Manifest0 left, abraxxa joined 14:25 grumble left 14:27 Manifest0 joined, kurahaupo_ left 14:28 zacts joined 14:30 ayerhart left, grumble joined 14:31 ayerhart joined 14:34 ayerhart left 14:37 ayerhart joined 14:43 kaare_ left 14:47 kaare_ joined 14:52 kaare__ joined 14:55 kaare_ left, patrickb joined 15:01 kaare__ left, kaare__ joined
AlexDaniel rba: sure, that's fine. People also use .tell if they want to make sure that the message is delivered 15:04
.tell rba very important message :)
yoleaux AlexDaniel: I'll pass your message to rba.
15:16 comborico1611 joined 15:26 mowcat joined
comborico1611 Good tennis match on. 15:26
15:28 Manifest0 left 15:29 mowcat left 15:30 anser joined
gfldex lolibloggedalittle: gfldex.wordpress.com/2019/04/27/pa...mutations/ 15:32
moritz lolitweetedalittle about it :D 15:34
15:35 SCHAPiE left, Manifest0 joined 15:44 SCHAPiE joined 15:46 leont joined 15:50 [particle] joined 15:51 ayerhart left 15:58 ayerhart joined 15:59 ayerhart left, ayerhart joined 16:10 cpan-p6 left, netrino joined 16:11 netrino_ left, cpan-p6 joined, cpan-p6 left, cpan-p6 joined 16:29 Black_Ribbon joined 16:33 raschipi joined 16:35 zacts left 16:39 zacts joined 16:47 zacts left 16:49 anser left 16:57 domidumont joined 16:59 woolfy left
kybr i'd like to make a foo that works when i say 1.foo ; is that easy? 17:01
17:01 Manifest0 left
kybr do i inject a method into Cool somehow? or is there a common way to do this 17:02
ugexe m: use MONKEY-TYPING; augment class Int { method foo { say 1 } }; 1.foo
evalable6 1
ugexe m: sub foo($a) { say $a }; 1.&foo; 17:03
evalable6 1
cpan-p6 New module released to CPAN! Scheduler::DelayBetween (1.3.1) by 03ATROXAPER 17:05
17:06 Manifest0 joined
atroxaper Scheduler cue with fixed delay *between* code runs. github.com/atroxaper/p6-Scheduler-DelayBetween 17:09
kybr ugexe: that works great! 17:13
my foo is for numeric things, so i augment Num, Rat, Int, etc. should I be augmenting some common ancestor? 17:18
ugexe ideally yes (i believe), but it doesn't work like that yet 17:20
17:22 leont left 17:23 lizmat left
MasterDuke Real? 17:26
17:26 comborico1611 left
MasterDuke oh, Numeric would be better. but i don't know if you can augment roles 17:27
17:28 jmerelo joined
MasterDuke m: use MONKEY; role A {}; augment role A { method foo() { say "foo" } }; # looks like no 17:29
evalable6 (exit code 1) 04===SORRY!04=== Error while compiling /tmp/dm3ox4SGLI
Cannot …
MasterDuke, Full output: gist.github.com/415ed9043b80e78b7d...ee04670c2e
kybr m: use MONKEY-TYPING; augment class Rat { method foo { say self } }; 1.2.foo 17:31
evalable6 1.2
kybr m: use MONKEY-TYPING; augment class Real { method foo { say self } }; 1.2.foo 17:32
evalable6 (exit code 1) 04===SORRY!04=== Error while compiling /tmp/pHJibR6t6g
Cannot …
kybr, Full output: gist.github.com/d20b40e8828d9c43af...ad1d4e0cf4
kybr Numeric and Real are 'closed'
xinming m: my %h = (:a<1 2 3>, :b<4 5 6>, :c<7 8>); 17:34
evalable6
xinming what is the perl6 way to convert this hash to a list of pairs which is like :a<1>, :a<2>, :a<3>, :b<4>, :b<5>, :b<6>, :c<7>, :c<8> ?? 17:35
jmerelo xinming: off the top of my head, duckmap, but I would have to think it out 17:36
yoleaux 12:33Z <El_Che> jmerelo: 14:07 < timotimo> uh oh, dockerhub had passwords leaked
xinming jmerelo: I believe there is a easy way to do that as I say in perl6. 17:37
jmerelo m: my %h = (:a<1 2 3>, :b<4 5 6>, :c<7 8>); %h.duckmap( { $_.key X @{$_.values} } ).say 17:38
evalable6 (exit code 1) 04===SORRY!04=== Error while compiling /tmp/7vUaOUWcO0
Unsuppo…
jmerelo, Full output: gist.github.com/a3c77b6f295840fd8e...0a34ce439e
jmerelo m: my %h = (:a<1 2 3>, :b<4 5 6>, :c<7 8>); say gather for %h.kv -> ($key, @value ) { for @value -> $v { take $key, $v } } 17:40
evalable6 (exit code 1) Cannot unpack or Capture `c`.
To create a Capture, add parentheses: \(...)
I…
jmerelo, Full output: gist.github.com/b7d0cf9d96bfa3d18e...ca6268fc21
xinming m: my %h = :a<1 2>, :b<4 5 6>; (%h<>:k.map: { my $k = $_; %h{$_}.map({ $k => $_ }) }).perl.say;
evalable6 ((:a(IntStr.new(1, "1")), :a(IntStr.new(2, "2"))).Seq, (:b(IntStr.new(4, "4")), :b(IntStr.new(5, "5")), :b(IntStr.new(6, "6"))).Seq).Seq
jmerelo m: my %h = (:a<1 2 3>, :b<4 5 6>, :c<7 8>); say gather for %h.keys -> $k { for %h{$k} -> $v { take $key, $v } } 17:41
xinming Yes, seems the X
evalable6 (exit code 1) 04===SORRY!04=== Error while compiling /tmp/t3MgK6v8VB
Variable '$key' is not declared
at /tmp/t3MgK6v8VB:1
------> 03%h.keys -> $k { for %h{$k} -> $v { take 08⏏04$key, $v } }
jmerelo m: my %h = (:a<1 2 3>, :b<4 5 6>, :c<7 8>); say gather for %h.keys -> $k { for %h{$k} -> $v { take $k, $v } }
evalable6 ((b (4 5 6)) (c (7 8)) (a (1 2 3)))
jmerelo m: my %h = (:a<1 2 3>, :b<4 5 6>, :c<7 8>); say gather for %h.keys -> $k { for @{%h{$k}} -> $v { take $k, $v } }
evalable6 (exit code 1) 04===SORRY!04=== Error while compiling /tmp/JtBAZfTelq
Unsuppo…
jmerelo, Full output: gist.github.com/42ccc7f6ae6d9853b6...e74d6fd71d
jmerelo m: my %h = (:a<1 2 3>, :b<4 5 6>, :c<7 8>); say gather for %h.keys -> $k { for %h{$k}<> -> $v { take $k, $v } }
evalable6 ((c 7) (c 8) (b 4) (b 5) (b 6) (a 1) (a 2) (a 3))
jmerelo m: my %h = (:a<1 2 3>, :b<4 5 6>, :c<7 8>); say gather for %h.keys -> $k { for %h{$k}<> -> $v { take $k => $v } } 17:42
evalable6 (b => 4 b => 5 b => 6 a => 1 a => 2 a => 3 c => 7 c => 8)
jmerelo xinming: ^^^
xinming: there's probably an easier way of doing it with duckmap, but can't think of it right now. 17:43
gfldex m: my %h = (:a<1 2 3>, :b<4 5 6>, :c<7 8>); say gather for %h.kv -> $k, @v { take $k => .item for @v };
evalable6 (b => 4 b => 5 b => 6 a => 1 a => 2 a => 3 c => 7 c => 8)
jmerelo gfldex++ Much nicer
xinming m: my %h = :a<1 2>, :b<4 5 6>; (%h<>:k.map: { $_ X @(%h{$_}) }).perl.say; 17:44
evalable6 ((("a", IntStr.new(1, "1")), ("a", IntStr.new(2, "2"))).Seq, (("b", IntStr.new(4, "4")), ("b", IntStr.new(5, "5")), ("b", IntStr.new(6, "6"))).Seq).Seq
xinming jmerelo: I tried figured out using X
but thanks for your version too.
m: my %h = :a<1 2>, :b<4 5 6>; my @res = (%h<>:k.map: { $_ X @(%h{$_}) }); @res.perl; 17:45
evalable6
xinming m: my %h = :a<1 2>, :b<4 5 6>; my @res = (%h<>:k.map: { $_ X @(%h{$_}) }); @res.perl.say;
evalable6 [(("a", IntStr.new(1, "1")), ("a", IntStr.new(2, "2"))).Seq, (("b", IntStr.new(4, "4")), ("b", IntStr.new(5, "5")), ("b", IntStr.new(6, "6"))).Seq]
xinming m: my %h = :a<1 2>, :b<4 5 6>; my @res = (%h<>:k.map: { $_ X @(%h{$_}) })[]; @res.perl.say;
evalable6 [(("b", IntStr.new(4, "4")), ("b", IntStr.new(5, "5")), ("b", IntStr.new(6, "6"))).Seq, (("a", IntStr.new(1, "1")), ("a", IntStr.new(2, "2"))).Seq]
17:47 leont joined 17:52 andrzejku joined 17:54 kurahaupo joined 17:59 zacts joined 18:01 Kaypie left 18:18 jmerelo left 18:24 leont left 18:37 APic left, APic joined 18:40 zakharyas joined 18:51 kurahaupo left, kurahaupo joined 18:53 domidumont left 19:02 molaf joined
xinming m: my %h = <*> => <a b c>; 19:08
evalable6
xinming How do we flat this hash into a list <* a b c> ?
m: my %h = <*> => <a b c>; %h.list.perl.say; 19:09
evalable6 ("*" => $("a", "b", "c"),)
xinming The value will always be itemized.
m: my %h = <*> => <a b c>; (%h<>:pair.map: *.key, *.value.list).perl.say;
evalable6 (exit code 1) Cannot map a Failure using '{ ... }, { ... }'
Did a * (Whatever) get absorbed by a list?
in block <unit> at /tmp/1NB5xIA058 line 1
raschipi m: my %h = <*> => <a b c>; say %h.kv 19:10
evalable6 (* (a b c))
raschipi m: my %h = <*> => <a b c>; say %h.kv.map(*.slip) 19:11
evalable6 (exit code 1) No such method 'slip' for invocant of type 'Str'. Did you mean any of these?
Slip
flip
sin
skip

in block <unit> at /tmp/UctiaXsstP line 1
xinming m: my %h = <*> => <a b c>; my @t = (%h<>:p.map: { .key, |.value.list }); @t.perl.say;
evalable6 [("*", "a", "b", "c"),]
xinming This worked
Though, I'd like to see something sweeter.
raschipi m: my %h = <*> => <a b c>; say %h.kv>>.slip 19:12
evalable6 (exit code 1) No such method 'slip' for invocant of type 'Str'. Did you mean any of these?
Slip
flip
sin
skip

in block <unit> at /tmp/SJydViSsNg line 1
raschipi m: my %h = <*> => <a b c>; say %h.kv>>.?slip
evalable6 (Nil (Nil Nil Nil))
raschipi m: my %h = <*> => <a b c>; say %h.kv.map: {.slip}
evalable6 (exit code 1) No such method 'slip' for invocant of type 'Str'. Did you mean any of these?
Slip
flip
sin
skip

in block <unit> at /tmp/XO_1QQpJev line 1
raschipi m: my %h = <*> => <a b c>; say %h.kv.map: {.?slip}
evalable6 (Nil Nil)
19:13 atroxaper left
xinming m: my %h = <*> => <a b c>; my @t = %h<>:p.map({ |(.key, |.value) }); @t.perl.say; 19:14
evalable6 ["*", "a", "b", "c"]
xinming raschipi: You are still struggling with the slip method. :-) 19:15
Maybe Slip?
m: my @a = <a b c>; @a.Slip.perl.say;
evalable6 slip("a", "b", "c")
xinming :-)
19:16 zacts left
xinming my %h = <*> => <a b c>; say %h.kv>>.?Slip 19:18
evalable6 ((*) (a b c))
xinming my %h = <*> => <a b c>; say %h.kv>>.?Slip.flat 19:19
evalable6 (* a b c)
xinming This is the best version.
my %h = <*> => <a b c>; say %h.kv>>.Slip.flat
evalable6 (* a b c)
raschipi I looked at the docs and didn't notice I was missing the uppercase S 19:20
xinming Yea, Thanks for the idea. 19:21
Your version is much better than mine.
raschipi np 19:22
xinming I think perl6 is the language which makes people think whatever they want, and the tools are there.
raschipi Except logging
m: my %h = <*> => <a b c>; say %h.kv>>.Slip 19:23
evalable6 ((*) (a b c))
19:24 abraxxa left 19:25 lucasb left 19:26 MilkmanDan left 19:27 MilkmanDan joined 19:36 netrino_ joined, netrino left
xinming What is the different between %(:a, :b, :c).kv.perl.say; and %(:a, :b, :c):kv.perl.say; 19:43
I'm kind of confused
Seems, the :kv doesn't take effect at all.
Just realized it 19:44
m: %(:a, :b, :c):this-adverb-does't-exist.perl.say;
evalable6 {:a, :b, :c}
b2gills It should probably warn about an "Unexpected named argument" 19:46
m: {}:this-adverb-does't-exist
evalable6 (exit code 1) Unexpected named argument 'this-adverb-does't-exist' passed
in block <unit> at /tmp/vu4p7tMnci line 1
raschipi m: ():this-adverb-does't-exist 19:48
evalable6 (exit code 1) 04===SORRY!04=== Error while compiling /tmp/d3ldv4CbB1
You can…
raschipi, Full output: gist.github.com/5deb1b05bfb809c505...a9df1cd88e
raschipi m: []:this-adverb-does't-exist
evalable6 (exit code 1) Unexpected named argument 'this-adverb-does't-exist' passed
in block <unit> at /tmp/IVmuCuHuBG line 1
raschipi m: %():this-adverb-does't-exist 19:49
evalable6
19:49 comborico1611 joined
xinming I believe, that the adverb applied to the %() operation. 19:50
raschipi What I find most strange is that it doesn't take :kv 19:52
jnthn I've no idea what it's actually doing, but: %(...) is just sugar for (...).hash, and methods discard unknown named parameters, which is what adverbs are. 20:02
20:02 MilkmanDan left
jnthn Just checked --target=ast, and yes, it's going to .hash 20:04
20:05 MilkmanDan joined 20:17 Manifest0 left 20:20 andrzejku left 20:22 Manifest0 joined 20:23 |oLa| joined 20:26 andrzejku joined, andrzejku left 20:28 ufobat joined 20:30 lichtkind left 20:32 molaf left 20:39 |oLa| left
xinming Is it possible to embed perl6 code in nodejs? 20:39
20:39 ayerhart left 20:40 ayerhart joined 20:44 lichtkind joined 20:48 pmurias joined
pmurias MasterDuke: the truffle backend can load a proper nqp setting (deserializing things and stuff), and a real nqp say works with some ugly uncommited hacks :) 20:49
xinming m: my @t = <a b c>.map: { (<a>, *) }; @t.perl.say;
evalable6 [("a", *), ("a", *), ("a", *)]
xinming What is the * mean?
I know it's 'whatever', What will it do?
pmurias MasterDuke: say("Hello World") should be working with a real setting on ~monday 20:50
xinming m: *.perl.say; 20:51
evalable6
xinming It's strange, how is the '*' be kept
jnthn xinming: It does nothing, it's just a literal Whatever
Whatever is actually just a type, and * is a singleton instance of it. When writing 1..* it's actually a call to `..` with 1 and the * singleton instance 20:52
xinming m: my @t = <a b c>.map: { (<a>, *) }; (@t.map: *[1].perl.say)
evalable6 *
*
*
jnthn It's only cases like `*.foo` and `1 + *` where it's compile-time transformed into a closure
raschipi xinming: You're thinking about Watevercode, which has nothing to do with Whatever, ecept for the name and symbol.
20:52 squashable6 left
jnthn And that behavior actually came *later* than the original notion of a value to mean "whatever" 20:53
You can thus assign behavior to Whatever in your own custom operators, for example
xinming jnthn: So, when translating * to closure, we can't have too complex code for it, right?
raschipi: What I fell strnage is that * is displayed. 20:54
And I don't know how I can get that * in a var.
jnthn xinming: Correct; some operators do not participate in this
raschipi m: my $a = *; say $a.perl;
evalable6 *
20:54 thundergnat joined
thundergnat m: my %h = (:a<1 2 3>, :b<4 5 6>, :c<7 8>); say %h.invert.invert; 20:55
evalable6 (c => 7 c => 8 b => 4 b => 5 b => 6 a => 1 a => 2 a => 3)
thundergnat xinming: ^^^
xinming When I try to perl say the *, It becomes { ... }
jnthn raschipi: Well, in terms of how * + 1 actually works, the * there is compiled into a Whatever literal, and it's only later when we have seen the whole expression that we transform it and the whole thing becoems a WheneverCode :)
20:55 lichtkind left
xinming It's amazing. 20:55
thundergnat: Your version is also elegant. :-) 20:56
there is always more than one way to do it. :-) 20:57
raschipi m: say *.perl;
evalable6 { ... }
thundergnat Just need to sort it if order is important.
jnthn m: say 1,2,3,4 Z+ 2, 3, *; # Z is another operator that is aware of * and treats it specially
20:57 squashable6 joined
evalable6 (3 5 6 7) 20:57
xinming I actually curious how the * can be implemented.
raschipi If you put a dot on it, you'll get Whatevercode instead.
jnthn That one also isn't a compile time thing, it's just part of the logic of the Z op/meta-op 20:58
xinming I know it's already implemented, It just shock me.
jnthn So a * value survives to runtime
raschipi It's not much different from the { $^a %%2 } lambda style. That's not much different from * %% 2 20:59
jnthn m: multi infix:<foo>($a, $b) { "$a, $b" }; multi infix:<foo>($a, Whatever) { "$a, dude" }; say 'nice' foo 'mate'; say 'nice' foo *
evalable6 nice, mate
{ ... }
jnthn Oh hah :)
Yeah, the default is that custom ops do the currying thing :) 21:00
Forgot that :)
xinming m: multi infix:<foo>($a, $b) { "$a, $b" }; multi infix:<foo>($a, Whatever) { "$a, dude" }; say ('nice' foo *)('Test') 21:01
evalable6 nice, Test
xinming I'm still don't know the exact logic here.
But anyway, Will understand in the future. 21:02
jnthn Curiously, there's not actually a way to opt out at the moment.
raschipi m: my @a = 1..Whatever; .say for @a[^10]
evalable6 1
2
3
4
5
6
7
8
9
10
raschipi If P6 is currying over your splat and giving you Whatevercode instead of just Whatever, just use it's full name instead. 21:03
xinming another question, Anyone ever run perl6 in nodejs? :-) 21:07
MasterDuke pmurias++ awesome! as soon as i get some spare tuits i'd like to do more 21:08
21:11 lichtkind joined
pmurias xinming: rakudo.js runs on nodejs 21:13
MasterDuke: great! there should be a fresh delivery of low hanging fruit available now that sixmodely things will be possible :) 21:14
xinming: I develop rakudo.js on node.js and it's specially parceled up for the browser 21:21
xinming pmurias: Thanks, That's better than what I thought. 21:24
Before that, I think I had to wait someone write c-binding 21:25
I'm now npm install rakudo
It's so exciting for this. js+perl6 21:26
It's the combination I dreamed of
raschipi Sorry, xinming: what do you mean by 'c-binding'? 21:29
21:30 lichtkind left
xinming raschipi: I thought, we'll have to wait someone to embed the moarvm to nodejs. :-) 21:31
raschipi Why would you need MoarVM running on nodejs when Perl6 runs directly on nodejs? 21:35
jnthn raschipi: I think the assumption was that Perl 6 would not be doing that. :) 21:38
raschipi Oh, I see now. 21:40
21:44 lichtkind joined
raschipi pmurias told me a while back that compiling Moar to WebASM was another approach that could be taken instead of rakudo.js, and that he didn't see any motive why it wouldn't be viable, and that they're complimentary to each other. 21:48
21:48 zakharyas left 21:49 kaare__ left 21:50 kaare__ joined 21:53 pmurias left 21:54 pecastro left
raschipi I think I upset him. 21:54
xinming raschipi: It's because WebASM are mostly targeted for C/C++, and perl6 needs gc to work. 21:56
I just read pmurias.github.io/rakudo.js-tpc-eu/ , It mentions that 21:57
make: *** No rule to make target 'j-all', needed by 'js-install'. Stop. 21:58
raschipi Moar is written in C. And it performs all the necessary support.
xinming When I try to build rakudo 2019.03, I got that error. 21:59
I try to compile js backends.
Is there a doc on how I can try rakudo.js in cli?
22:00 lichtkind left 22:02 kurahaupo left, kurahaupo joined 22:10 Sgeo__ left, Sgeo__ joined 22:13 lichtkind joined
kawaii any tips for auto generating the 'provides' section of META6.json? I've got rather a lot of endpoints now and don't want to manually keep track of them 22:19
s/don't want to/i'm lazy
22:21 lichtkind left 22:23 kurahaupo left, kurahaupo joined 22:26 patrickb left 22:30 roguelazer left 22:33 roguelazer joined 22:35 lichtkind joined 22:44 kurahaupo left, kurahaupo joined
ugexe say CompUnit::Repository::FileSystem.new(prefix => $*CWD.IO.absolute).distribution.meta<provides> 22:51
evalable6 {}
holyghost . 23:11
cpan-p6 New module released to CPAN! FindBin (0.2.7) by 03LEMBARK 23:24
23:25 Manifest0 left, |Sno| left
kawaii ugexe: thank you! 23:25
23:28 |Sno| joined 23:31 leont joined 23:33 Manifest0 joined 23:58 Just_ joined, |oLa|1 joined 23:59 aborazmeh joined, aborazmeh left, aborazmeh joined