🦋 Welcome to Raku! raku.org/ | evalbot usage: 'p6: say 3;' or /msg camelia p6: ... | irclog: colabti.org/irclogger/irclogger_log/raku
Set by ChanServ on 14 October 2019.
00:02 mowcat left 00:28 thundergnat left 00:39 wildtrees left 00:41 xinming joined, wildtrees joined 01:19 sena_kun joined 01:21 Altai-man_ left 01:30 markoong joined, markoong left 01:33 wildtrees left 02:03 AlexDaniel joined, AlexDaniel left, AlexDaniel joined 02:47 hungrydonkey joined 02:56 molaf left 03:09 molaf joined 03:18 Altai-man_ joined 03:21 sena_kun left 03:33 pilne left 03:51 hungryd44 joined 03:55 hungrydonkey left 04:37 aborazmeh joined, aborazmeh left, aborazmeh joined, ensamvarg joined 04:41 MasterDuke left 05:19 sena_kun joined 05:21 Altai-man_ left 05:32 molaf left 05:45 sauvin joined 05:52 Altai-man_ joined 05:55 sena_kun left 06:04 TeamBlast joined 06:09 cxreg joined 06:10 simcop2387 joined, simcop2387 left, simcop2387 joined 06:11 wamba joined 06:27 sena_kun joined 06:29 Altai-man_ left 06:43 hungrydonkey joined 06:44 hungryd44 left 06:52 hungrydonkey left, hungrydonkey joined 06:54 TeamBlast left 06:55 TeamBlast joined 07:10 aborazmeh left 07:12 aluaces joined 07:16 TeamBlast left, TeamBlast joined 07:18 Altai-man_ joined 07:21 sena_kun left 07:41 ensamvarg left 07:48 hungryd99 joined 07:49 hungrydonkey left 07:54 hungryd99 left 07:59 hungrydonkey joined 08:01 hungrydonkey left 08:02 hungrydonkey joined 08:03 rindolf joined 08:08 cpan-raku left, cpan-raku joined, cpan-raku left, cpan-raku joined 08:31 hungrydonkey left 08:40 dakkar joined 08:51 ufobat joined 08:58 chloekek joined 09:02 [Sno] left 09:19 sena_kun joined 09:21 Altai-man_ left 09:28 [Sno] joined, xfix joined
xfix p6: say 2 + 2 * 2; 09:29
camelia 6
xfix i find it interesting that the command is still `p6` when it's not Perl 6 anymore 09:30
raku: say 2 + 2 * 2
evalable6 6
09:30 ensamvarg joined
lizmat xfix: we deem backward compatibility to be important :-) 09:32
xfix fair, although the channel topic could be updated
lizmat good poing
*point
09:32 hungrydonkey joined
lizmat turns out I don't have the rights to do that 09:33
moritz ^^ ?
xfix raku: say Q[@A`DO world!]~|<HeLhg> 09:35
evalable6 Hello world!
09:38 pecastro joined
moritz 10:40 -ChanServ(ChanServ@services.)- You are not authorized to (de)op moritz on #raku. 09:40
tadzik Anarchy in the IRC :) 09:42
chloekek p6: say ‘Ⓐ’.charss 09:43
camelia No such method 'charss' for invocant of type 'Str'. Did you mean any of these?
chars
chrs

in block <unit> at <tmp> line 1
chloekek p6: say ‘Ⓐ’.chars
camelia 1
chloekek True anarchy: make this return 2. 😈
xfix that's Raku for you, it uses graphemes by default :)
lizmat m: say "😈".uninames 09:44
camelia (SMILING FACE WITH HORNS)
xfix raku: say '🏴‍☠️'.chars
evalable6 1
lizmat m: say "😈".encode
camelia utf8:0x<F0 9F 98 88>
xfix raku: say ‘Ⓐ’.uninames 09:45
evalable6 (CIRCLED LATIN CAPITAL LETTER A)
xfix well, i guess it's a single codepoint too
raku: for my $x (1, 2, 3) { say "This shouldn't compile: $x" } 09:47
evalable6 (exit code 1) 04===SORRY!04=== Error while compiling /tmp/AhSdzM5SWc
This appears to be Perl code
at /tmp/AhSdzM5SWc:1
------> 03for 08⏏04my $x (1, 2, 3) { say "This shouldn't co
synthmeat what, that's supposed to be emojis combined to jollyroger?
xfix 🏴‍☠️ is a pirate flag
synthmeat nice. TIL.
xfix raku: say '🏴󠁧󠁢󠁷󠁬󠁳󠁿'.chars 09:48
evalable6 1
xfix raku: say '🏴󠁧󠁢󠁷󠁬󠁳󠁿'.encode
evalable6 utf8:0x<F0 9F 8F B4 F3 A0 81 A7 F3 A0 81 A2 F3 A0 81 B7 F3 A0 81 AC F3 A0 81 B3 F3 A0 81 BF>
xfix raku: say '🏴󠁧󠁢󠁷󠁬󠁳󠁿'.uninames 09:49
evalable6 (WAVING BLACK FLAG TAG LATIN SMALL LETTER G TAG LATIN SMALL LETTER B TAG LATIN SMALL LETTER W TAG LATIN SMALL LETTER L TAG LATIN SMALL LETTER S CANCEL TAG)
xfix raku: say join ' ', '🏴󠁧󠁢󠁷󠁬󠁳󠁿'.uninames
evalable6 WAVING BLACK FLAG TAG LATIN SMALL LETTER G TAG LATIN SMALL LETTER B TAG LATIN SMALL LETTER W TAG LATIN SMALL LETTER L TAG LATIN SMALL LETTER S CANCEL TAG
xfix raku: say join ' | ', '🏴󠁧󠁢󠁷󠁬󠁳󠁿'.uninames
evalable6 WAVING BLACK FLAG | TAG LATIN SMALL LETTER G | TAG LATIN SMALL LETTER B | TAG LATIN SMALL LETTER W | TAG LATIN SMALL LETTER L | TAG LATIN SMALL LETTER S | CANCEL TAG
chloekek p6: say(chr(0xE000)) 10:07
camelia
chloekek p6: say(chr(0xE000).uninames) 10:08
camelia (<private-use-E000>)
xfix p6: say chr(0xD800) 10:12
camelia Error encoding UTF-8 string: could not encode Unicode Surrogate codepoint 55296 (0xD800)
in block <unit> at <tmp> line 1
xfix p6: say chr(0xD800).uninames 10:13
camelia (<surrogate-D800>)
xfix p6: say chrs 0xD801, 0xDC37 10:14
camelia Error encoding UTF-8 string: could not encode Unicode Surrogate codepoint 55297 (0xD801)
in block <unit> at <tmp> line 1
10:19 natrys joined, hungrydonkey left 10:20 sarna left 10:22 sarna joined 10:28 kawaii joined 10:29 hungrydonkey joined 10:38 hungryd70 joined 10:39 hungrydonkey left 10:43 hungryd70 left 10:45 hungrydonkey joined 10:55 ufobat_ joined 10:58 ufobat left 11:02 aluaces left 11:03 aluaces joined
kawaii Hi, I'm a little confused about some code I have here. I send some data to a remote API and then use the same API to add some reactions (emojis) to the message - after this I then start a tap on the event supply for the message I created but it's picking up the two add-reaction() events from the first block of code. www.irccloud.com/pastebin/R3ukTWoV/ 11:03
am I misunderstanding something about how `start react` works?
my initial thought was that the event supply was sending historical events, but this isn't the case 11:04
surely since I am `awaiting` that first block of code, there's no way the latter half is running at all, is there? at least not until the first finishes
lizmat is not immediately seeing it, jnthn might 11:05
Altreus I feel better when the grown-ups also can't immediately see what's happening :D 11:06
jnthn kawaii: Certainly all the stuff in the `.then` block will have run before the `react` block is started (and you can probably confirm that by logging something before the `start react` line) 11:07
Altreus here's where the supply happens github.com/shuppet/p6-api-discord/...e.pm6#L150
I'm pretty sure I've used a live supply
jnthn Note that `start react` is "fire and forget", so if that were your full program it'd just exit (I'm guessing it's not) 11:08
Altreus it's not
I haven't hit him with the "post the whole code" learning stick enough yet
I think the tap on the line I just linked to might also be better as a start react whenever ... maybe? 11:10
vague memories of being told only to use a tap if I know I need to use a tap
jnthn Sorry, bit distracted debugging a pathalogical parser backtracking case at $dayjob... 11:18
11:18 Altai-man_ joined 11:19 xelxebar joined
Altreus fun stuff derailed by real work :( 11:19
story of my career
11:21 sena_kun left 11:22 aborazmeh joined, aborazmeh left, aborazmeh joined 12:04 vike left 12:30 xelxebar left 12:32 xelxebar joined 12:34 cpan-raku left, cpan-raku joined, cpan-raku left, cpan-raku joined 13:07 aborazmeh left 13:09 mensvaga joined 13:14 Doc_Holliwood left 13:19 sena_kun joined 13:21 Altai-man_ left 13:27 lucasb joined 13:47 aborazmeh joined, aborazmeh left, aborazmeh joined 14:15 rypervenche joined 14:17 ensamvarg left 14:28 wamba left 14:32 mowcat joined 14:38 wamba joined 14:47 Itaipu_ left
lizmat reluctantly clickbaits rakudoweekly.blog/2020/03/16/2020-...od-friend/ 15:07
El_Che mm 15:14
it's was a nice text, lizmat 15:17
15:18 Altai-man_ joined 15:21 sena_kun left 15:55 aborazmeh_ joined, aborazmeh_ left, aborazmeh_ joined 15:56 Manifest0 joined 16:00 Itaipu joined
El_Che is this sarcasm or is it just me: twitter.com/ThePerlShop/status/123...20450?s=20 16:01
Grinnz doesn't seem like it to me? 16:02
16:02 wildtrees joined
El_Che it's me then :) 16:02
and that's a good thing :)
wildtrees to whom it may concern: page docs.raku.org/language/performance needs a s/#perl6/#raku/ :) 16:03
[Coke] doesn't seem like sarcasm to me. Seems like a small factual update. 16:04
El_Che not that there is something wrong with a little sarcasm :)
[Coke] wildtrees: can you open an issue at github.com/Raku/doc/issues? (A pr with updates would be awesome, but an issue helps too)
chloekek Changing the title of a book is probably very difficult. 16:05
It would have to be a completely new book, not just a new print of a book.
El_Che chloekek: I don't think so, but it would require editing inside
chloekek Apparently the author is working on it. 16:06
16:08 chloekek left 16:10 sena_kun joined 16:12 Altai-man_ left
tbrowder hi, #raku people 16:13
question: is there any way to publish a raku module in our ecosystem that uses a p5 module? 16:14
i.e., can zef install p6 modules from cpan? 16:16
what about dependent linux executables?
s/p6/p5/ 16:17
AlexDaniel tbrowder: you can publish it, zef won't do anything automatically 16:20
16:24 Itaipu_ joined 16:25 Itaipu left
tbrowder ok, thnx 16:29
16:36 aborazmeh left, aborazmeh_ is now known as aborazmeh 16:51 renormalist joined
wildtrees m: my @a = (1,2,3) ; say [Z] (@a,@a,@a) ; 16:53
camelia ((1 1 1) (2 2 2) (3 3 3))
lizmat El_Che: it's you
wildtrees you can fold the zip operator over a list of arrays, how nice :)
AlexDaniel wildtrees: not exactly 16:54
16:54 vike joined
AlexDaniel I mean, you can 16:54
but is it nice?
El_Che lizmat: good, like I said above 16:55
wildtrees it's not exactly doing that in the code I passed to camelia bot? 16:56
lizmat El_Che: I just wanted to confirm a good thing :-)
AlexDaniel wildtrees: well, here: 16:58
m: my @a = 1,2,3; my @b = @a,@a,@a; dd @b; say [Z] @b
camelia Array @b = [[1, 2, 3], [1, 2, 3], [1, 2, 3]]
((1 1 1) (2 2 2) (3 3 3))
AlexDaniel m: my @a = 1,2,3; my @b = @a,@a; dd @b; say [Z] @b
camelia Array @b = [[1, 2, 3], [1, 2, 3]]
((1 1) (2 2) (3 3))
AlexDaniel m: my @a = 1,2,3; my @b = @a; dd @b; say [Z] @b
camelia Array @b = [1, 2, 3]
((1 2 3))
AlexDaniel hmmm, hold on, it's the @b itself that is wrong?
ah wait 16:59
m: my @a = 1,2,3; my @b = @a,; dd @b; say [Z] @b
camelia Array @b = [[1, 2, 3],]
((1 2 3))
AlexDaniel there
wildtrees m: my @a = 1,2,3 ; dd @a ; 17:00
camelia Array @a = [1, 2, 3]
wildtrees m: my @a = 1,2,3 ; my @b = @a ; dd @b ; 17:01
camelia Array @b = [1, 2, 3]
AlexDaniel wildtrees: docs.raku.org/language/traps#Using...t_of_lists 17:02
wildtrees: the way [ ] DWIMs is nice but it's a design flaw
you should be alright as long as you know about it though
17:05 Voldenet joined, Voldenet left, Voldenet joined 17:19 aborazmeh left 17:21 sena_kun left 17:33 skyl4rk joined
rypervenche Hmm, I'm guesing that completely changing the cover is too difficult, but I feel that "Raku" should be the main name of the O'Reilly book. I hope to see that in a future version. 17:34
17:36 sena_kun joined, dakkar left 17:41 squashable6 joined 17:48 MasterDuke joined 17:54 aborazmeh joined, aborazmeh left, aborazmeh joined 17:59 chloekek joined 18:02 hungrydonkey left 18:20 stoned75 joined 18:21 mensvaga left
wildtrees m: <a b c>.map: *.say 18:25
camelia a
b
c
18:26 sauvin left
wildtrees is there like a foreach or something instead of map when I just want effects but don't care about the return result? like mapM_ from haskell? 18:26
Geth doc: 0116351a5a | (Stoned Elipot)++ | doc/Type/Any.pod6
correct plural form
18:27
linkable6 Link: docs.raku.org/type/Any
jnthn wildtrees: Just use map in a void context, or force the void context by writing `sink <a b c>.map: *.say` 18:28
18:31 [Sno] left 18:36 natrys left
sena_kun releasable6: status 18:38
releasable6 sena_kun, Next release in ≈11 days and ≈0 hours. 2 blockers. Changelog for this release was not started yet
sena_kun, Details: gist.github.com/ce2c49e3257087346f...8cce920879
18:49 theangryepicbana joined 18:51 theangryepicbana left 18:59 holyghost joined 19:07 Woodi left 19:08 Woodi joined 19:09 caterfxo left 19:11 Doc_Holliwood joined 19:14 hankache joined
hankache hello #raku 19:14
tellable6 2020-02-26T21:10:56Z #raku-dev <rba> hankache: Still like to know what you fixed to build Rakudo Star on Windows. As I'm getting the same error.
hey hankache, you have a message: gist.github.com/414ec05f8d812bc818...3d20d919c5
19:17 stoned75 left
chloekek Is there a way to get positional arguments into a hash without repeating their names? 19:17
In Perl 5 I could write: my %hash = ( foo => shift, bar => shift ); 19:18
I could do that in Raku but it’d be a variadic function: sub f(*@c) { my %hash = <foo bar> Z @c }. 19:19
19:21 sena_kun left
Altreus that sounds messy 19:22
You could make a multi function where the positional form calls the named form 19:23
19:24 kawaii left
AlexDaniel chloekek: you can still do that if you want 19:25
ah that's what you said in the last message :)
this almost works: 19:26
m: sub f(|c($foo, $bar)) { dd $foo; say c.pairs }; f 42, 50
camelia 42
(0 => 42 1 => 50)
chloekek p6: sub f($foo, $bar) { say MY:: }; f(1, 2) 19:31
camelia PseudoStash.new(($! => Nil, $*DISPATCHER => (Mu), $*NEXT-DISPATCHER => (Mu), $/ => Nil, $_ => (Any), $bar => 2, $foo => 1, $¢ => Nil))
Doc_Holliwood m: sub foo( $bar, $baz ) { my %h = :$bar, :$baz; }; dd foo('BAR', 'BAZ') 19:33
camelia Hash %h = {:bar("BAR"), :baz("BAZ")}
Doc_Holliwood chloekek: this? ^^
AlexDaniel “without repeating their names” :)
chloekek Still have to write the argument names twice, but that’s better than bar => $bar :) 19:34
tadzik well, you can probably still use @_ and shift like in Perl 5, for the most part :) 19:35
19:35 sena_kun joined
tadzik m: sub foo(*@args) { my %h = foo => @args.shift, bar => @args.shift; say %h.perl }; foo('bar', 'baz') 19:36
camelia {:bar("baz"), :foo("bar")}
AlexDaniel m: sub f($foo, $bar) { dd $_ for &?ROUTINE.signature.params }; f 42, 50
camelia Parameter $foo = $foo
Parameter $bar = $bar
tadzik oh that's just lovely AlexDaniel :D
AlexDaniel but then what? Look it up by name in MY:: ?
tadzik it's a good lead
you can eval them :>
Grinnz MY::? /me has ExtUtils::MakeMaker flashbacks 19:37
tadzik OH::MY
hrm, I seem to recall a time when you could declare a sub with no signature and it'd work Perl5 style... do I misremember? 19:39
now it doesn't compile as it assumes the signature is ()
AlexDaniel m: sub f($foo, $bar) { say $_, ‘ – ’, ::(.name) for &?ROUTINE.signature.params }; f 42, 50
camelia $foo – 42
$bar – 50
tadzik AlexDaniel++
AlexDaniel still not a hash though 19:40
but that's much easier to figure out
m: sub f($foo, $bar) { dd &?ROUTINE.signature.params.map({.name => ::(.name)}).hash }; f 42, 50 19:43
camelia Hash % = {("\$bar") => 50, ("\$foo") => 42}
AlexDaniel maybe there's a shorter way
btw I don't know why it puts () around keys
6c: sub f($foo, $bar) { dd &?ROUTINE.signature.params.map({.name => ::(.name)}).hash }; f 42, 50
committable6 AlexDaniel, gist.github.com/d99f4633f7c372e033...07cd8732d6 19:44
AlexDaniel riiiiiight
bisect: sub f($foo, $bar) { dd &?ROUTINE.signature.params.map({.name => ::(.name)}).hash }; f 42, 50
bisectable6 AlexDaniel, Bisecting by output (old=2015.12 new=945a4d8) because on both starting points the exit code is 0
AlexDaniel, bisect log: gist.github.com/50efe65176d9bc8413...53db7e2bdc
AlexDaniel, (2020-01-06) github.com/rakudo/rakudo/commit/08...0c9087c687
AlexDaniel c: 08aec410ef6^,08aec410ef6 ("\$foo") => 42 19:47
committable6 AlexDaniel, ¦08aec410ef6^,08aec41: «WARNINGS for /tmp/5smSwNEVBz:␤Useless use of "=>" in expression "(\"\\$foo\") => 42" in sink context (line 1)␤»
AlexDaniel c: 08aec410ef6^,08aec410ef6 (‘$foo’ => 42).raku.say
committable6 AlexDaniel, ¦08aec410ef6^: «"\$foo" => 42␤» ¦08aec41: «("\$foo") => 42␤»
AlexDaniel R#3555 19:48
linkable6 R#3555 [open]: github.com/rakudo/rakudo/issues/3555 [LTA][regression] pair.raku adds unnecessary parens
wildtrees what does ~= do in raku? 19:55
Altreus x = x ~ y 19:56
same as += except for ~
19:57 aborazmeh left 20:07 hankache left 20:09 lizmat joined 20:15 rouking joined
rouking It looks like the download instructions on raku.org are out of sync with the directory structure on rakudo.org 20:15
the correct link is rakudo.org/dl/star/rakudo-star-2020.01.tar.gz 20:16
The instructions have "downloads" instead of "dl" there 20:17
20:19 wamba left 20:25 molaf joined, mensvaga joined
matiaslina uploaded an image: 2020-03-17-172716_460x236_scrot.png (39KB) < matrix.org/_matrix/media/r0/downlo...ZulWsEXzst > 20:27
20:39 dogbert17 joined 20:41 wildtrees left 20:43 wildtrees joined 20:46 wildtrees left, wildtrees joined 20:56 Black_Ribbon joined
AlexDaniel` Matias: heh 21:00
wildtrees how do I check if an instance of an object is a certain class hierarchy or does a certain role at runtime? 21:01
lizmat m: say Int ~~ Numeric 21:02
camelia True
21:02 [Sno] joined
lizmat wildtrees: aka ~~ it 21:02
m: say 42 ~~ Int
camelia True
lizmat m: say 42 ~~ Rat
camelia False
matiaslina AlexDaniel: Oops. Wrong room. 21:03
sry!
AlexDaniel` Matias: surprisingly on IRC it did upload the image :) But of course deletions don't work 21:04
21:13 lizmat left, lizmat joined
matiaslina Yeah, the bridge sends the public link. Really don't know if irc supports deletion of messages 21:17
21:20 sena_kun left 21:26 rindolf left 21:27 ufobat_ left 21:35 sena_kun joined 21:37 TeamBlast left, TeamBlast joined
lizmat this feels like an interesting problem to fix with a Supply: twitter.com/AlanSwithenbank/status...4734449665 21:41
Grinnz instinctually thinks "show code" 21:43
21:45 rouking left 21:52 chloekek left 22:06 sivoais joined 22:25 __jrjsmrtn__ joined 22:29 dotdotdot left 22:30 dotdotdot joined
guifa Let’s say someone wanted to do have a “use Fortran;” statement in a block, and have the entire block evaluated as if it were Fortran. I know how to set up the grammar and actions, but I’m not sure how to set up the slangy part. (I know how to do it if, for instance, it were going to be “fortran { … }”, as there’s a few examples of doing that with, e.g. SQL) 22:36
22:36 lucasb left
guifa The P5 model is a bit overwhelming for me to follow 22:36
MasterDuke guifa: i think Slang::Tuxic might be a simple example of doing what you're talking about 22:44
guifa Hmm that just seems to modify a few tokens. Could I go so far as to modify the TOP token? 22:55
23:20 sena_kun left 23:23 mowcat left 23:27 hungrydonkey joined
MasterDuke i don't actually know, i've never worked with slangs at all 23:35
23:35 sena_kun joined 23:43 TeamBlast left 23:44 TeamBlast joined 23:59 agentzh joined, agentzh left, agentzh joined