🦋 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:01 caterfxo left 00:08 markoong left, genevino joined 00:28 vike left 00:41 wamba left 00:47 poohmaan left 00:52 caterfxo joined 00:53 devmikey left 01:01 kanliot left, Kaiepi left, Kaiepi joined, vike joined 01:03 benlittle left 01:06 benlittle joined 01:08 Kaiepi left 01:13 Kaiepi joined
Geth doc: Kaiepi++ created pull request #3305:
Add type smiley to the glossary
01:18
01:21 Altai-man_ joined 01:23 sena_kun left 01:31 NODE left 01:36 Benett joined 01:41 aborazmeh left 01:47 NODE joined 01:48 upupbb-user2 left, molaf left 01:53 PacoLinux left 01:55 caterfxo left 02:01 molaf joined 02:11 sivoais left, rbt left 02:12 rbt joined, TeamBlast joined 02:13 cooper joined 02:23 lichtkind left, sivoais joined
cpan-raku New module released to CPAN! Data::Record (0.1.3) by 03KAIEPI 02:23
Kaiepi ^ optimizations for lists 02:25
02:25 rbt left, rbt joined 02:56 k-man left 03:22 sena_kun joined 03:23 Altai-man_ left 03:30 NODE left 03:31 NODE joined 03:38 oodani_ left 03:39 oodani joined 03:57 pilne left 03:59 jcallen joined 04:00 jcallen left 04:03 NODE left 04:04 NODE joined 04:07 caterfxo joined 04:13 jcallen joined 04:22 upupbb-user3 joined 04:24 Actualeyes joined 04:35 regreg joined 04:54 PavelB left 04:57 k-man joined 05:02 Xliff joined 05:21 Altai-man_ joined, cpan-raku left, cpan-raku joined, cpan-raku left, cpan-raku joined 05:22 sauvin joined 05:23 sena_kun left
Xliff \o 05:29
tellable6 hey Xliff, you have a message: gist.github.com/26d07ddf84734621d8...689ff72c66
Xliff .tell japhb Ooh! Thanks. I'm snagging this! ;) 05:30
tellable6 Xliff, I'll pass your message to japhb
05:41 Xliff left 05:52 xelxebar_ joined 05:54 Actualeyes left, Actualeyes joined
jdv79 m: {:foo({})}.duckmap(-> $_ where Str {}) 06:00
camelia Odd number of elements found where hash initializer expected:
Only saw: "foo"
in block <unit> at <tmp> line 1
jdv79 is that a bug or what is the problem there exactly?
also 06:01
m: {:foo({:a})}.duckmap(-> $_ where Str {})
camelia ( no output )
jdv79 ?...
06:15 upupbb-user3 left 06:16 k-man left 06:22 PacoLinux joined, holli__ joined
Geth doc/master: 5 commits pushed by (Ben Davies)++, (Juan Julián Merelo Guervós)++ 06:24
06:27 k-man joined 06:28 Actualeyes left, Actualeyes joined 06:44 Sgeo_ joined 06:45 wamba joined 06:48 Sgeo__ left 06:59 Manifest0 left 07:02 Manifest0 joined 07:05 poohman joined 07:14 wamba left 07:22 sena_kun joined 07:23 Altai-man_ left 07:25 Black_Ribbon left 07:26 poohman left 07:28 veesh_ joined 07:29 veesh left 07:30 veesh_ is now known as veesh 07:32 poohman joined 07:36 pecastro joined 07:37 Actualeyes left, Actualeyes joined 08:01 prd79 joined, prd79 left 08:02 poohman left 08:08 poohman joined 08:14 wamba joined 08:28 rindolf joined 08:42 tinita left 08:52 tinita joined 08:55 holli__ left 09:01 poohman left 09:16 poohman joined 09:21 Altai-man_ joined 09:22 daxim left 09:24 sena_kun left 09:26 daxim joined 09:28 Sgeo__ joined 09:31 holli__ joined, Sgeo_ left 09:38 wamba left 09:54 daxim left
Kaiepi .tell jmerelo, can you take a look at github.com/Raku/doc/pull/3301 and github.com/Raku/doc/pull/3279 ? 09:56
tellable6 Kaiepi, I'll pass your message to jmerelo
09:59 daxim joined 10:04 natrys joined 10:08 chloekek joined 10:19 Kaiepi left 10:20 Kaiepi joined, wamba joined 10:21 holli__ left
lgtaube dn.se 10:21
sorry, wrong window 10:22
10:28 __jrjsmrtn__ joined 10:29 abraxxa left, _jrjsmrtn left, abraxxa joined 10:31 rbt left 10:32 rbt joined 10:39 pilne joined 10:49 MasterDuke left 10:50 aborazmeh joined, aborazmeh left, aborazmeh joined 11:00 Aukai left 11:04 abraxxa left 11:05 abraxxa joined 11:06 hungryd56 joined 11:09 Sgeo_ joined 11:12 Sgeo__ left 11:21 sena_kun joined 11:23 Altai-man_ left 11:24 Actualeyes left, Actualeyes joined 11:40 rindolf left, lichtkind joined 11:42 rindolf joined 11:43 mowcat joined 11:44 molaf left 11:48 Xliff joined 11:52 Sgeo__ joined 11:55 Sgeo_ left 12:03 markoong joined 12:22 aborazmeh left
cpan-raku New module released to CPAN! Interval (0.0.1) by 03ELIZABETH 12:24
12:25 holli__ joined, markong joined 12:29 wamba left, markoong left
lizmat jdv79's question yesterday inspired me: ^^ modules.raku.org/dist/Interval 12:30
12:36 molaf joined
chloekek I wrote a blog post about how I built the infrastructure for building Raku modules with Nix: foldr.nl/raku-nix.html 12:45
tadzik chloekek: nice :) 12:46
so what static site generator did you settle on? 12:47
lizmat weekly: Building Raku modules with Nix
notable6 lizmat, Noted! (weekly)
lizmat weekly: foldr.nl/raku-nix.html
notable6 lizmat, Noted! (weekly) 12:48
chloekek tadzik: 60 lines of Raku. 12:49
github.com/chloekek/website/blob/m...build.raku 12:50
It’s very barebones, doesn’t yet generate a home page or index or RSS feed.
12:52 poohman left
chloekek I really like WordPress, in part because it supports comments, but I dislike hosting it. 12:53
12:58 hungryd56 left 12:59 hungrydonkey joined 13:01 Doc_Holliwould joined 13:03 holli__ left, poohman joined
Doc_Holliwould installs Folding@Home 13:09
13:13 markoong joined, markong left 13:14 natrys left 13:17 natrys joined, MasterDuke joined 13:21 Altai-man_ joined 13:23 sena_kun left 13:32 hungryd87 joined 13:35 hungrydonkey left 13:37 abraxxa left 13:45 molaf left 13:46 Sgeo_ joined 13:49 Sgeo__ left
poohman hello all, 13:51
m: my sub filtered(Int $a) returns Bool {if ($a%5) {return True;}};[0..25].grep(filtered)
camelia 5===SORRY!5=== Error while compiling <tmp>
Calling filtered() will never work with declared signature (Int $a --> Bool)
at <tmp>:1
------> 3{if ($a%5) {return True;}};[0..25].grep(7⏏5filtered)
poohman Can I use any function as a matcher for grep? 13:52
If yes, can any one help with an example
or should an &filtered be used 13:53
m: my sub filtered(Int $a) returns Bool {if ($a%5) {return True;}};[0..25].grep(&filtered)
camelia Type check failed for return value; expected Bool but got Slip (Empty)
in sub filtered at <tmp> line 1
in block <unit> at <tmp> line 1
poohman m: my sub filtered(Int $a) returns Bool {if ($a%5) {return Bool:True;}};[0..25].grep(&filtered) 13:54
camelia 5===SORRY!5=== Error while compiling <tmp>
Invalid type smiley ':True' used, only ':D', ':U' and ':_' are allowed
at <tmp>:1
------> 3eturns Bool {if ($a%5) {return Bool:True7⏏5;}};[0..25].grep(&filtered)
expecting any of:
poohman m: my sub filtered(Int $a) returns Bool {if ($a%5) {return 1;}};[0..25].grep(&filtered) 13:55
camelia Type check failed for return value; expected Bool but got Slip (Empty)
in sub filtered at <tmp> line 1
in block <unit> at <tmp> line 1
poohman m: my sub filtered(Int $a) returns Bool {if ($a%5) {return 1;}else{return 0;}};[0..25].grep(&filtered)
camelia Type check failed for return value; expected Bool but got Int (0)
in sub filtered at <tmp> line 1
in block <unit> at <tmp> line 1
poohman m: my sub filtered(Int $a) returns Bool {if ($a%5) {return True;}else{return False;}};[0..25].grep(&filtered) 13:56
camelia ( no output )
poohman m: my sub filtered(Int $a) returns Bool {if ($a%5) {return True;}else{return False;}};say [0..25].grep(&filtered)
camelia (1 2 3 4 6 7 8 9 11 12 13 14 16 17 18 19 21 22 23 24)
13:57 aborazmeh joined, aborazmeh left, aborazmeh joined
jnthn You can just write `so $a % 5` instead of the if/else 13:58
poohman m: my sub filtered(Int $a) returns Bool {so $a %% 5}};say [0..25].grep(&filtered) 14:00
camelia 5===SORRY!5=== Error while compiling <tmp>
Unexpected closing bracket
at <tmp>:1
------> 3ltered(Int $a) returns Bool {so $a %% 5}7⏏5};say [0..25].grep(&filtered)
poohman m: my sub filtered(Int $a) returns Bool {so $a %% 5};say [0..25].grep(&filtered)
camelia (0 5 10 15 20 25)
poohman Thanks Jonathan
rypervenche m: say 'biangbiang noodles'.uniparse 14:03
camelia Unrecognized character name [biangbiang noodles]
in block <unit> at <tmp> line 1
rypervenche Ah, Unicode 13.0 isn't fully in Rakudo yet :P 14:04
jdv79 lizmat: neat 14:08
m: {:foo({})}.duckmap(-> $_ where Str {}) 14:09
camelia Odd number of elements found where hash initializer expected:
Only saw: "foo"
in block <unit> at <tmp> line 1
jdv79 seems a bug, no?
MasterDuke m: {:foo({})}.duckmap(-> $_ {}) 14:14
camelia ( no output )
MasterDuke m: {:foo({})}.map(-> $_ where Str {})
camelia Constraint type check failed in binding to parameter '$_'; expected anonymous constraint to be met but got Pair (:foo(${}))
in block <unit> at <tmp> line 1
14:15
jnthn Hm, is duckmap one of the things that attempts to replicate structure? 14:19
14:31 aborazmeh left 14:38 hungryd87 left, hungrydonkey joined
Altreus Is there a value that means "undefine this, whatever the type?" 14:39
(academic question; they're ints so 0 is fine) 14:41
MasterDuke Nil 14:46
14:48 hungryd85 joined 14:49 hungrydonkey left
poohman [0..5].map(*.say) 14:51
evalable6 0
1
2
3
4
5
poohman [0..5].say 14:52
evalable6 [0 1 2 3 4 5]
poohman [0..5].map(*.say)
evalable6 0
1
2
3
4
5
Altreus o
poohman how can I write this to a file 14:53
Altreus m: my Int $x = 1; say $x; $x = Nil; say $x;
camelia 1
(Int)
Altreus :O
that's magic
I like this
poohman [0..5].map($fh.say(*)) 14:54
does not work
chloekek p6: my $fh = $*OUT; [0..5].map({ $fh.say($_) })
camelia 0
1
2
3
4
5
MasterDuke m: my Int $a is default(3) = 4; say $a; $a = Nil; say $a # Altreus 14:55
camelia 4
3
poohman chloekek:i thought I tried something similar
wait
MasterDuke Nil resets to default. the default default is the type object 14:56
poohman chloekek : It works I didnt have the braces
how do the braces help? 14:57
chloekek p6: my $fh = $*OUT; $fh.say($_) for [0..5]
camelia 0
1
2
3
4
5
chloekek [0..5]map($fh.say($_)) calls $fh.say with $_ as an argument, then passes the return value of say to map
[0..5].map({ $fh.say($_) }) passes a block to map
poohman chloekek: thanks 14:58
15:17 markoong left 15:18 markoong joined
uzl[m] I wrote a blog about Raku containers (uzluisf.gitlab.io/posts/2020/04/03...ntainers/) as a way to get myself more accustomed with them. Any feedback is welcome. 15:21
15:22 sena_kun joined 15:23 Altai-man_ left 15:24 ufobat__ joined 15:26 patrickb joined 15:27 stoned75 left 15:28 ufobat_ left 15:35 benlittle left 15:37 benlittle joined
poohman m: $a="2,633.43"; say $a.Numeric 15:41
camelia 5===SORRY!5=== Error while compiling <tmp>
Variable '$a' is not declared
at <tmp>:1
------> 3<BOL>7⏏5$a="2,633.43"; say $a.Numeric
poohman m:my $a="2,633.43"; say $a.Numeric
evalable6 (exit code 1) Cannot convert string to number: trailing characters after number in '032⏏04,633.43' (indicated by ⏏)
in block <unit> at /tmp/EE9rVRrmai line 1
poohman Is there any simple function to do this? or should I remove the comma 15:44
chloekek p6: my $a = '2,633.43'; say +S:g/,// given $a 15:46
camelia 5===SORRY!5=== Error while compiling <tmp>
Unrecognized regex metacharacter , (must be quoted to match literally)
at <tmp>:1
------> 3my $a = '2,633.43'; say +S:g/7⏏5,// given $a
chloekek p6: my $a = '2,633.43'; say +S:g/','// given $a
camelia 2633.43
chloekek Not aware of a function for this.
poohman chloekek: Thanks 15:47
uzl[m] m: my $a="2_633.43"; say $a.Numeric 15:49
camelia 2633.43
uzl[m] m: my $a= 2_633.43; say $a.Numeric 15:50
camelia 2633.43
MasterDuke modules.raku.org/dist/Intl::CLDR:g...tur.com%3E might be useful 15:53
16:00 chloekek left 16:19 Xliff left 16:22 benlittle left 16:23 benlittle joined 16:33 daxim left 16:34 poohman left 16:38 daxim joined 16:52 wamba joined 16:54 xinming_ joined 16:57 xinming left 17:21 Altai-man_ joined, hungryd85 left, chloekek joined 17:22 hungrydonkey joined 17:23 sena_kun left
cpan-raku New module released to CPAN! Data::Record (0.2.0) by 03KAIEPI 17:27
Kaiepi ^ adds typings for flat, repeated lists such as (1,'a',2,'b'...)!
17:29 Tirifto joined 17:37 Exodist left 17:40 finsternis joined 17:48 dansolo42 left, dansolo42 joined 17:49 dansolo42 left, dansolo42 joined 17:52 gordonfish joined 18:02 hungrydonkey left 18:26 aborazmeh joined, aborazmeh left, aborazmeh joined, xinming_ left, sauvin left 18:27 kensanata joined 18:28 xinming_ joined, samcv joined 18:39 Tirifto left 18:43 wildtrees[m] joined 18:45 daxim left
wildtrees[m] how can I chain a {$_ + 2) as foo here 'c'.ord.foo.chr ? 18:45
18:49 daxim joined 18:50 rindolf left 18:53 wamba left
chloekek p6: say 'c'.ord.succ.succ.chr 18:53
camelia e
18:54 poohman joined
chloekek p6: say 'c'.ord.map(* + 2).chr 18:55
camelia
[Coke] m: 'c'.ord.map(*+2)>>.chr.say 18:56
camelia (e)
[Coke] ... "ish"
chloekek p6: say 'c'.ords.map((* + 2).chr).join 18:57
camelia e
Geth doc/master: 4 commits pushed by (JJ Merelo)++ 19:03
19:06 Tirifto joined
patrickb ping tadzik 19:07
tellable6 2020-03-31T23:13:04Z #raku <rba> patrickb: Updated rakubrew.org to v9. (remind me that I have to automate it SOON.)
2020-04-03T02:38:01Z #raku-dev <vrurg> patrickb Would you pls have a look at R#3591? Not all nqp runners are exe files yet, as it turns out. :)
linkable6 R#3591 [open]: github.com/rakudo/rakudo/issues/3591 [JVM][Windows][build][severe] Rakudo JVM backend build broken on Windows
patrickb rba: Thanks!
19:16 PacoLinux left 19:22 sena_kun joined 19:23 Altai-man_ left, chloekek left
wildtrees[m] so is there something like map to chain subroutines into a method call chain , that doesn't turn the result into a list? I think I remember seeing something before, but I forgot what it was 19:33
19:34 wamba joined
AlexDaniel` can't you just use parens? 19:35
19:35 wamba left, wamba joined
AlexDaniel` m: say ‘c’.ord.&{$_ + 2}.chr 19:36
camelia e
AlexDaniel` you can do this too
19:36 lucasb joined
wildtrees[m] p6: say 'c'.ord.({$_ + 2}).chr #like this? 19:36
camelia No such method 'CALL-ME' for invocant of type 'Int'
in block <unit> at <tmp> line 1
AlexDaniel` m: say ‘c’.ord.&(* + 2).chr
camelia e
AlexDaniel` no I mean like 19:37
m: m: say (‘c’.ord + 2).chr
camelia e
wildtrees[m] AlexDaniel: ok yea that &{} chaining seems to be what I am after 19:38
19:38 melezhik joined 19:42 regreg left
AlexDaniel` wildtrees: why do you need it? What are you trying to do? 19:44
20:00 melezhik left 20:05 benlittle left
wildtrees[m] p6: "hello".comb.map(*.ord.&{$_ + 2}.chr).join('') # <-- AlexDaniel , just playing around 20:06
camelia ( no output )
wildtrees[m] * p6: say "hello".comb.map(*.ord.&{$_ + 2}.chr).join('')
p6: say "hello".comb.map(*.ord.&{$_ + 2}.chr).join('') 20:07
camelia jgnnq
20:11 Tirifto left 20:20 Tirifto joined 20:23 chloekek joined
chloekek Would be nice to have a periodic table of operators for 6.d. 20:23
Would be nice to have a periodic table of operators for 6.d. 20:25
I think the latest one is from 2009.
It doesn’t even mention the radioactive isotopes, such as ⚛️++ 20:26
20:27 kensanata left 20:28 aborazmeh left 20:38 benlittle joined 20:45 [Sno] left 20:46 wamba left 20:47 [Sno] joined 20:51 xinming_ left 20:52 xinming_ joined 21:03 Tirifto left 21:05 daxim left 21:10 daxim joined 21:20 kensanata joined 21:21 aborazmeh joined, aborazmeh left, aborazmeh joined, Altai-man_ joined 21:22 markong joined, markoong left 21:23 sena_kun left 21:28 |oLa| joined 21:30 |oLa| left 21:41 markoong joined 21:45 markong left 21:48 natrys left 21:50 poohman left 21:56 chloekek left 22:03 PacoLinux joined 22:06 lichtkind left 22:08 kensanata left 22:09 lgtaube left 22:10 markong joined 22:13 markoong left 22:16 markoong joined, markong left 22:23 caterfxo left 22:25 caterfxo joined, lgtaube joined 22:26 lichtkind joined 22:40 Altai-man_ left 22:41 vike left, rbt left, rbt joined
tbrowder m: my %h = a => 1; my $h = %h; say %h; say $h; 22:55
camelia {a => 1}
{a => 1}
tbrowder help: i'm doing essentally the same thing as above in my code but the hash isn't getting its value assigned to the $h. do i need to coerce or $h or something? 22:58
ok, i lied. i didn't use the correct syntax for Data::Dump. 23:03
23:12 xinming_ left 23:13 xinming_ joined 23:15 patrickb left 23:29 vike joined 23:41 xelxebar left 23:42 pecastro left 23:45 xinming_ left, lucasb left 23:46 xinming_ joined 23:49 xelxebar joined 23:58 hungrydonkey joined, xelxebar_ left