🦋 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:09
mowcat left
00:14
mowcat joined
00:17
pmurias left
00:28
dogbert17 left,
dogbert17 joined
00:30
hungrydonkey joined
00:50
ZZZzz left
00:55
Doc_Holliwood left
00:56
titsuki left
|
|||
rypervenche | Is it possible to pull two values out of a hash at once? I'm currently pulling one out with: @data»<date> . Is there some way to do this without needing to use @data twice? | 00:59 | |
oh | 01:00 | ||
I just figured it out. Just do @data»<date day-of-week> | |||
01:06
mowcat left
01:08
mowcat joined
01:09
kktt007 joined
01:12
daxim left,
mowcat left
01:14
mowcat joined
01:17
mowcat left
01:19
daxim joined,
mowcat joined
01:24
mowcat left
01:27
mowcat joined
01:29
mowcat left
01:32
mowcat joined
01:34
sena_kun joined
|
|||
guifa | rypervenche: don’t you love how nicely slices are implemented? :-) | 01:35 | |
01:35
Altai-man_ left
|
|||
rypervenche | Although it's returning an array of arrays and I'd like it to be an array of strings. I'll have to figure out how to change it. | 01:38 | |
01:43
unicodable6 joined,
tellable6 joined
01:44
evalable6 joined,
linkable6 left
01:46
linkable6 joined
|
|||
guifa | how are you making it? It should provide a list of the hash values | 01:49 | |
m: my %hash = a => 1, b => 2, c => 3; say %hash<a b c>.WHAT; say %hash<a b c>[0].WHAT | 01:50 | ||
camelia | (List) (Int) |
||
rypervenche | No, I think it's normal. I'm doing this from an array of hashes. | 01:57 | |
I guess I'll have to do something like two for loops to change the inner arrays into strings. | |||
guifa | Don’t forget about the hyper operator, it can be useful at times for that | 02:05 | |
m: say %hash<a b c>».Str | 02:06 | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Variable '%hash' is not declared. Did you mean any of these? &hash Hash at <tmp>:1 ------> 3say 7⏏5%hash<a b c>».Str |
||
guifa | err | ||
m: my %hash = a => 1, b => 2, c => 3; say %hash<a b c>».Str | |||
camelia | (1 2 3) | ||
rypervenche | m: my %hash = %( :date("2020-02-28"), :day-of-week("Tue") ); my @data = %hash xx 3; say @data>><date day-of-week>; | ||
camelia | ((2020-02-28 Tue) (2020-02-28 Tue) (2020-02-28 Tue)) | ||
rypervenche | I'd like to make "2020-02-28 Tue" a string, and therefore have a list of those strings. | 02:07 | |
guifa | aaaaah you want to combing them | ||
m: my %hash = %( :date("2020-02-28"), :day-of-week("Tue") ); my @data = %hash xx 3; say @data.map(*.<date day-of-week>.join: ‘ ‘); | 02:08 | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Unable to parse expression in curly single quotes; couldn't find final "’" (corresponding starter was at line 1) at <tmp>:1 ------> 3ata.map(*.<date day-of-week>.join: ‘ ‘);7⏏5<EOL> … |
||
guifa | ahm | ||
m: my %hash = %( :date("2020-02-28"), :day-of-week("Tue") ); my @data = %hash xx 3; say @data.map(*.<date day-of-week>.join: ' '); | |||
camelia | (2020-02-28 Tue 2020-02-28 Tue 2020-02-28 Tue) | 02:09 | |
rypervenche | I may be doing this all wrong, but yeah. Trying to sort by date and also have the day-of-week available for printing in sorted order. | ||
Ahhhh, good ol' map always doing what I need. | |||
guifa | I don’t know the whole of what you’re doing, but you can sort on just a key. | 02:11 | |
m: my @list = %(:4a, :1b), %(:1a, :6b), %(:3a, :9b), %(:0a, :5b); say @list.sort(*<a>) | |||
camelia | ({a => 0, b => 5} {a => 1, b => 6} {a => 3, b => 9} {a => 4, b => 1}) | ||
02:13
ufobat_ joined
|
|||
rypervenche | I'm trying to count how many of each date and then print the date and day-of-week along with that number. I was thinking of throwing that string in a bag and then maniulating the string afterward to get the right order of text. | 02:14 | |
s/that number/the count/ | |||
02:17
ufobat left
02:18
Maylay left
02:24
molaf left
02:25
titsuki joined
02:35
cooper left
02:37
cooper joined,
molaf joined
02:42
wbn_ is now known as wbn
02:43
wbn left,
wbn joined
02:45
Maylay joined
|
|||
rypervenche | guifa: Got it working. Thanks a bunch. That was useful information. | 03:00 | |
03:15
mowcat left
03:17
mowcat joined
03:19
raven__ joined,
mowcat left
03:22
darkstardev13 left
03:33
Altai-man_ joined
03:35
cpan-raku left,
cpan-raku joined,
cpan-raku left,
cpan-raku joined
03:36
sena_kun left
04:06
gabiruh left
04:33
kktt007 left
04:40
titsuki left
04:50
lostinfog left
05:07
gabiruh joined
05:33
molaf left
05:34
sena_kun joined
05:35
Altai-man_ left
05:47
rindolf joined
05:52
cognomin_ joined
05:53
aborazmeh left
05:55
cognominal left
06:06
jmerelo joined
06:10
Doc_Holliwood joined
06:19
xelxebar left,
xelxebar joined
06:34
sauvin joined,
sauvin left
06:38
sauvin joined
06:51
[Sno] left
06:55
Sgeo left,
Sgeo joined
07:02
NODE left
07:04
NODE joined
07:16
Itaipu_ joined
07:17
Itaipu left
07:19
Doc_Holliwood left
07:21
Itaipu_ left
07:22
orinthe joined
07:24
Itaipu joined
07:26
a3f left,
a3f joined
07:33
[Sno] joined,
Altai-man_ joined
07:34
Itaipu_ joined
07:36
sena_kun left,
Itaipu left
07:39
kensanata joined
07:44
jmerelo left
08:06
NODE left
08:08
NODE joined
08:19
wamba joined
08:34
zostay left,
zostay joined
08:35
kawaii left,
mrsolo left
08:36
jhill left
08:37
mrsolo joined,
kawaii joined,
NODE left
08:38
jhill joined
08:39
NODE joined
08:40
jmerelo joined
08:48
NODE left
08:54
domidumont joined
09:01
wamba left,
NODE joined
09:02
domidumont left
09:05
Doc_Holliwood joined
09:06
domidumont joined,
reach_satori left
09:07
dakkar joined
09:10
domidumont1 joined
09:14
domidumont left
09:34
sena_kun joined
09:35
Altai-man_ left
09:40
domidumont1 left,
domidumont joined
09:42
pecastro joined,
domidumont left
09:43
domidumont joined
09:49
Doc_Holliwood left
09:52
Black_Ribbon left
09:59
reach_satori joined
|
|||
cpan-raku | New module released to CPAN! Syslog::Parse (0.0.1) by 03JMERELO | 10:07 | |
10:32
Doc_Holliwood joined
10:46
kensanata left
11:02
domidumont left
11:03
daxim left
11:09
daxim joined
11:16
mowcat joined
11:30
Doc_Holliwood left
11:33
Altai-man_ joined
11:35
sena_kun left
11:39
Doc_Holliwood joined
11:42
NODE left
11:44
NODE joined
11:51
pmf[m] left,
awwaiid left
11:53
awwaiid joined,
pmf[m] joined
12:05
hungryd21 joined
12:06
hungrydonkey left,
hungryd21 left,
hungrydonkey joined
12:07
hungrydonkey left,
titsuki joined
12:16
matiaslina left
12:17
matiaslina joined
12:27
Doc_Holliwood left
12:29
wamba joined
12:33
Itaipu_ left
12:37
kensanata joined
|
|||
SmokeMachine | first end to end execution! with a lot of stuff not implemented yet... www.irccloud.com/pastebin/qa7CbOM3/ | 12:46 | |
12:46
cpan-raku left,
cpan-raku joined,
cpan-raku left,
cpan-raku joined
12:48
NODE left
|
|||
jjatria | Quick question. Constants in Raku code: SNAKE_CASE or KEBAB-CASE? | 12:51 | |
12:58
wamba left,
Doc_Holliwood joined
13:02
NODE joined
13:09
wamba joined
|
|||
tyil | I prefer underscores simply because I'm already holding shift anyway | 13:10 | |
but it's completely up to you :) | |||
cpan-raku | New module released to CPAN! Syslog::Parse (0.0.2) by 03JMERELO | 13:26 | |
jjatria | m: constant FOO-BAR-2 = ':(' | 13:29 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> Missing initializer on constant declaration at <tmp>:1 ------> 3constant FOO-BAR7⏏5-2 = ':(' |
||
13:29
lucasb joined
|
|||
dakkar | m: my \a=1; | 13:32 | |
camelia | ( no output ) | ||
dakkar | m: my \a-1=1; | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Term definition requires an initializer at <tmp>:1 ------> 3my \a7⏏5-1=1; |
||
dakkar | m: my $a-1=1; | ||
camelia | Use of uninitialized value of type Any in numeric context in block <unit> at <tmp> line 1 Cannot modify an immutable Int (-1) in block <unit> at <tmp> line 1 |
||
dakkar | jjatria: two interesting things here! ① the syntax for identifiers is not what we were expecting ② sigil-less and sigilled identifiers produce different error messages | 13:33 | |
13:34
sena_kun joined
|
|||
jjatria | Not what we were expecting indeed! | 13:34 | |
13:36
Altai-man_ left
|
|||
jnthn | This is so $foo-1 is actually the - operator | 13:36 | |
13:37
Doc_Holliwood left
|
|||
jjatria | Yeah, I thought that might be the case. In a way it makes my life easier, since I have fewer decisions to make :) | 13:37 | |
13:37
_jrjsmrtn joined
13:38
__jrjsmrtn__ left
13:41
kensanata left
13:44
reach_satori left
13:48
NODE left
13:49
NODE joined
14:14
MasterDuke left
|
|||
SmokeMachine | Now it's getting the properties... :) www.irccloud.com/pastebin/CovYBkUl/ | 14:19 | |
14:21
jmerelo left
14:36
Doc_Holliwood joined
14:39
pmurias joined
|
|||
SmokeMachine | www.irccloud.com/pastebin/FAxmIRji/ | 14:41 | |
I still need to implement the quantifiers... | 14:44 | ||
14:45
aborazmeh joined,
aborazmeh left,
aborazmeh joined,
wamba left
14:48
veesh_ joined
14:49
veesh left,
veesh_ is now known as veesh
14:56
kensanata joined
15:01
wamba joined,
veesh left,
veesh_ joined
15:02
veesh_ is now known as veesh
15:05
aborazmeh left
15:11
pmurias left
15:31
wamba left
15:32
wamba joined
15:33
Altai-man_ joined
15:35
sena_kun left
15:36
pmurias joined
15:47
molaf joined
15:56
ctilmes joined
16:00
wamba left
16:03
reach_satori joined
16:04
wamba joined
16:08
pmurias left
16:40
Doc_Holliwood left
16:48
patrickb joined
17:00
titsuki left
|
|||
SmokeMachine | one more end to end example: gist.github.com/FCO/43a8f3b9d5aea0...c16f835094 | 17:04 | |
17:21
Kaiepi left,
Kaiepi joined
17:27
dakkar left
17:31
Kaiepi left
17:32
Kaiepi joined
17:34
sena_kun joined,
ctilmes left
17:35
Altai-man_ left
17:36
domidumont joined
17:39
ctilmes joined
17:42
pecastro left
17:45
wamba left
|
|||
Voldenet | m: sub a(:$x, :$y) { say $x, $y }; sub b(:$z, :$r) { say $z, $r }; sub c(|e) { a(|(e<x y>:kv.Hash)); b(|(e<z r>:kv.Hash)); }; c(:x, :y, :z) | 17:45 | |
camelia | TrueTrue True(Any) |
||
Voldenet | isn't `|(e<x y>:kv.Hash)` needlessly verbose? | ||
17:46
MrETH joined,
Itaipu joined,
MrETH left,
[Sno] left
|
|||
SmokeMachine | Voldenet: hi! have you seen my new examples working? | 17:47 | |
lizmat | m: sub a(:$x, :$y, *%_) { say $x, $y }; sub b(:$z, :$r, *%_) { say $z, $r }; sub c(|e) { a(|e); b(|e) }; c(:x, :y, :z) # Voldenet | 17:51 | |
camelia | TrueTrue True(Any) |
||
lizmat | Voldenet: in other words, let subs a and b eat all extra nameds | ||
Voldenet: if this is about using subs in a class, then maybe making them private methods would be clearer ? | 17:52 | ||
Voldenet | that looks a lot better, thanks | 17:59 | |
and no, they're not methods in the class, it's a whole mess of a script at the moment :D | 18:00 | ||
I wonder… | |||
m: sub a(:$x, :$y, |) { say $x, $y }; sub b(:$z, :$r, |) { say $z, $r }; sub c(|e) { a(|e); b(|e) }; c(:x, :y, :z) | |||
camelia | TrueTrue True(Any) |
||
Voldenet | ha, obviously | ||
lizmat | that would also eat additional positionals, which you probably don't want ? | ||
Voldenet | I don't mind - all subs take named arguments | 18:02 | |
lizmat | which means you would like to be informed at compilation that you mistyped ":$a" by forgetting the ":" ? | 18:03 | |
.oO( been there, done that :-) |
|||
18:05
kensanata left
|
|||
Voldenet | I shouldn't have written so many arguments to subs in the first place and should've used a few configuration classes in the first place | 18:08 | |
18:08
domidumont left
|
|||
Voldenet | but it's too late, I like quick and dirty tools because they're quick to write and dirty to debug | 18:08 | |
lizmat | well, I hope you have multi-letter variable names in there somewhere :-) | 18:09 | |
Voldenet | SmokeMachine: I have now, but the question - will it work on any supplies at the end? Widely loved csv/tsv/windows events logs await | 18:15 | |
(just asking - it's possible to convert most of things into json anyway) | 18:19 | ||
SmokeMachine | Voldenet: it will be possible to write a interface to interpret your Supply data... | ||
Voldenet | Cool and good | ||
SmokeMachine | Voldenet: it will convert anything to raku struct | 18:20 | |
18:29
Doc_Holliwood joined
18:40
chloekek joined
18:43
ctilmes left
18:48
MasterDuke joined,
rindolf left
18:52
wamba joined
18:55
rindolf joined
19:09
pecastro joined
19:19
vike left
|
|||
Geth | ¦ problem-solving: lizmat assigned to jnthn Issue Should $foo ~~ Failure mark Failure in $foo as handled? github.com/Raku/problem-solving/issues/161 | 19:21 | |
19:25
reach_satori_ joined,
reach_satori left,
vike joined,
sauvin left
19:32
kent\n left
19:33
Altai-man_ joined
19:34
kent\n joined
19:35
sena_kun left
19:38
withp joined
|
|||
withp | how would one declare a statically typed constant Map from Regexes onto Function handles (all of which take the same args and have the same return type) ? | 19:41 | |
19:42
wamba left
|
|||
Geth | ecosystem: 08190b3894 | (Jonathan Stowe)++ | META.list Renamed Perl6-Noise-Gang |
19:47 | |
20:01
Kaiepi left,
Kaiepi joined
20:04
cfa joined
|
|||
Geth | ¦ problem-solving: lizmat assigned to jnthn Issue Allow single-element Map/Hash to be treated as a Pair github.com/Raku/problem-solving/issues/162 | 20:11 | |
20:13
cognominal joined
|
|||
lizmat | A new Rakudo Star! dist.tyil.nl/raku/rakudo-star/ | 20:14 | |
Doc_Holliwood | is luca ferrari in the house? | ||
liz, just so you know, I am Herbert Bollermann | 20:15 | ||
lizmat | aaah... ok :-) | ||
tyil++ | 20:16 | ||
tyil | ^_^ | ||
Doc_Holliwood | Is Luca Ferrari in the house? | ||
20:16
cognomin_ left
|
|||
Doc_Holliwood | That name is just as made up as Herbert Bollermann :D | 20:16 | |
lizmat | hmmm... raku.org/downloads needs some adjustments | 20:17 | |
.oO( o what a tangled web we weave ) |
|||
20:19
wamba joined
20:23
grayrider joined
20:35
wamba left
|
|||
withp | Ah nevermind my trouble was apparently in thinking that s/STUFF// was an object of type Regex, which it does not appear to be. REPL is a wonderful thing. | 20:37 | |
[Coke] | I just wrote sub foo ($args) = { ... }; and it took me 2 minutes to realize what the bug was. | 20:38 | |
lizmat | m: sub foo ($args) = { ... } | 20:43 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> Missing block at <tmp>:1 ------> 3sub foo ($args)7⏏5 = { ... } expecting any of: new name to be defined |
||
lizmat | hmmm... error looks pretty awesome to me :-) | ||
20:48
[Sno] joined
|
|||
SmokeMachine | new example using the new & operator www.irccloud.com/pastebin/PniCkltA/ | 21:13 | |
21:19
rindolf left
|
|||
[Coke] | lizmat: oh, yes, totally my fault, not raku's | 21:23 | |
Geth | ¦ problem-solving: lizmat assigned to jnthn Issue Implement Adverb::Eject in core github.com/Raku/problem-solving/issues/163 | 21:24 | |
21:34
sena_kun joined
21:35
Altai-man_ left
21:45
pmurias joined
22:19
lucasb left
22:21
patrickb left
22:46
Black_Ribbon joined
22:55
aborazmeh joined,
aborazmeh left,
aborazmeh joined
23:06
Doc_Holliwood left
|
|||
tbrowder | hi, folk! | 23:12 | |
anyone here use homebrew for osx? if so do you recommend it to an osx noob? | 23:14 | ||
cpan-raku | New module released to CPAN! Email::MIME (2.0.2) by 03RBT | ||
23:16
aborazmeh left
23:17
pmurias left
23:21
MasterDuke left
|
|||
[Coke] | I've been happy with macports, if you want a second opinion. | 23:27 | |
but I know many folks who are happy homebrew users (including many p5ers) | 23:28 | ||
23:30
pecastro left
23:33
Altai-man_ joined
23:35
sena_kun left
23:48
aborazmeh joined,
aborazmeh left,
aborazmeh joined
|
|||
cfa | fwiw, i also like macports but have nothing against homebrew | 23:48 | |
also, afternoon all | 23:49 | ||
tbrowder | supposedly with homebrew i can get the gnu tools with same behavior as on linux as opposed to rhe bsd-like in normal osx | 23:51 | |
cfa | tbrowder: coretools, gmake etc? | 23:52 | |
tbrowder | that's what i think they advertise | ||
i'll check more closely. i got the advert for them when i was looking foe emacs on mac... | 23:54 | ||
my son is giving me an old mac mini i plan to use with a large screen tv, and do a little rakuing with it on the side ;-) | 23:55 | ||
vrurg | tbrowder: if memory serves me right, homebrew has much lesser number of ports. | 23:56 | |
23:56
titsuki joined
|
|||
tbrowder | ah, that may be a deal breaker... | 23:57 | |
cfa | the supposed advantage of homebrew over macports is that it leverages a lot of system-installed libraries | ||
whereas macports tends to build its own, which in some cases are duplicates | |||
the advantage is that everything is consistent and sandboxed | |||
tbrowder | ok, thnx, i guess it will be a new learning experience. so macports are from bsd people? | 23:59 |