Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
--- Log opened Mon Aug 16 16:37:02 2021
16:37 -!- gfldex [~dex@ip5f5ab722.dynamic.kabel-deutschland.de] has joined #raku-beginner
16:37 [Users #raku-beginner]
16:37 [@lizmat] [ gfldex]
16:37 -!- Irssi: #raku-beginner: Total of 2 nicks [1 ops, 0 halfops, 0 voices, 1 normal]
16:37 -!- Channel #raku-beginner created Mon Aug 16 16:35:55 2021
16:37 -!- Irssi: Join to #raku-beginner was synced in 0 secs
16:37 -!- lizmat changed the topic of #raku-beginner to: This channel is intended for people just starting with the Raku Programming Language (https://raku.org).
16:39 -!- RakuIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
16:40 -!- dakkar [~dakkar@host-87-5-114-102.retail.telecomitalia.it] has joined #raku-beginner
16:43 -!- lizmat changed the topic of #raku-beginner to: This channel is intended for people just starting with the Raku Programming Language (https://raku.org). This channel is being logged for historical purposes.
16:45 < gfldex> bridge test
16:46 < gfldex> bridge test
16:48 -!- discord-raku-bot [~RakuIRC@ip5f5ab722.dynamic.kabel-deutschland.de] has joined #raku-beginner
16:49 < gfldex> bridge test
17:01 -!- discord-raku-bot [~RakuIRC@ip5f5ab722.dynamic.kabel-deutschland.de] has quit [Remote host closed the connection]
17:01 -!- discord-raku-bot [~RakuIRC@ip5f5ab722.dynamic.kabel-deutschland.de] has joined #raku-beginner
17:01 < gfldex> bridge test
17:02 < discord-raku-bot> <gfldex#8222> tset egdirb
17:02 -!- TempIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
17:02 < discord-raku-bot> <gfldex#8222> \o/ irc bridge works on both ways
18:13 < discord-raku-bot> <MrDispatch#7943> bridge test fail: unknown message.
18:14 <@lizmat> meh
18:14 < discord-raku-bot> <MrDispatch#7943> ERROR, ERROR, ERRROOOOOUUUUR ...
18:14 <@lizmat> more meh
18:43 -!- dakkar [~dakkar@host-87-5-114-102.retail.telecomitalia.it] has quit [Ping timeout: 248 seconds]
23:37 -!- [Coke] [~coke@cpe-104-228-9-26.nycap.res.rr.com] has joined #raku-beginner
23:38 < [Coke]> Looks like this isn't under the irc-bridges yet on the discord side.
--- Day changed Tue Aug 17 2021
09:43 -!- dakkar [~dakkar@host-87-5-114-102.retail.telecomitalia.it] has joined #raku-beginner
11:22 * lizmat looks for a bridge
14:35 < discord-raku-bot> <Hydrazer#4827> noice
18:36 -!- dakkar [~dakkar@host-87-5-114-102.retail.telecomitalia.it] has quit [Ping timeout: 245 seconds]
21:12 -!- neither [~neither@46.104.128.110] has joined #raku-beginner
21:15 < neither> hi, hi! I have a numeric variable how can I check if it's an integer? For example the result of a square root operation. I'm doing `Int($v) == $v`, is this prefferable in the language? I looked at the documentation and find `is-int` method but it says it's for Range objects
21:17 < neither> To make it not an XY problem I'm checking if a number is a square like 196
21:27 < discord-raku-bot> <gfldex#8222> m:say (1, 1/1, 1.1, 2)».Rat».&{ .denominator == 1 };
21:27 < discord-raku-bot> <gfldex#8222> m: say (1, 1/1, 1.1, 2)».Rat».&{ .denominator == 1 };
21:29 < gfldex> neither: it depends if you want to check for some typed that type checks against Int or if you are looking for a test that does Numeric
21:29 < gfldex> if you start with a string, you can use a Regex ofc.
21:31 -!- discord-raku-bot [~RakuIRC@ip5f5ab722.dynamic.kabel-deutschland.de] has quit [Remote host closed the connection]
21:31 -!- discord-raku-bot [~RakuIRC@ip5f5ab722.dynamic.kabel-deutschland.de] has joined #raku-beginner
21:32 < discord-raku-bot> <gfldex#8222> m: say 'eval bot test';
21:33 < neither> gfldex I don't understand your first message but thanks for denominator and regex ideas.
21:37 < gfldex> If you got a float that is really close to an integer, things might get hairy.
21:38 < neither> oh yeah
21:38 < neither> m: say 4.0000000000000001e0 == 4
21:39 < gfldex> The eval bot is running on the Discord side in this channel.
21:39 < neither> (i thought this is evaluated in here sorry.)
21:39 < gfldex> I should be able to fix this tho.
21:45 -!- discord-raku-bot [~RakuIRC@ip5f5ab722.dynamic.kabel-deutschland.de] has quit [Remote host closed the connection]
21:46 -!- discord-raku-bot [~RakuIRC@ip5f5ab722.dynamic.kabel-deutschland.de] has joined #raku-beginner
21:46 < gfldex> m: say 'eval test from irc';
22:53 -!- neither [~neither@46.104.128.110] has quit [Quit: Connection closed]
--- Day changed Wed Aug 18 2021
09:20 -!- dakkar [~dakkar@host-87-5-114-102.retail.telecomitalia.it] has joined #raku-beginner
10:39 -!- guer [~guer@c-2acfe655.031-360-73746f40.bbcust.telenor.se] has joined #raku-beginner
10:57 -!- guer [~guer@c-2acfe655.031-360-73746f40.bbcust.telenor.se] has quit [Quit: Ping timeout (120 seconds)]
15:10 -!- guer [~guer@vpnpool189-17.anst.uu.se] has joined #raku-beginner
15:46 -!- guer [~guer@vpnpool189-17.anst.uu.se] has quit [Quit: Ping timeout (120 seconds)]
15:59 -!- guer [~guer@vpnpool189-17.anst.uu.se] has joined #raku-beginner
16:05 -!- guer [~guer@vpnpool189-17.anst.uu.se] has quit [Quit: Ping timeout (120 seconds)]
18:48 -!- dakkar [~dakkar@host-87-5-114-102.retail.telecomitalia.it] has quit [Ping timeout: 248 seconds]
22:02 -!- sgrs_ [~sgrs@191.34.234.70] has joined #raku-beginner
22:02 -!- sgrs_ [~sgrs@191.34.234.70] has quit [Client Quit]
--- Day changed Thu Aug 19 2021
17:15 -!- discord-raku-bot [~RakuIRC@ip5f5ab722.dynamic.kabel-deutschland.de] has quit [Remote host closed the connection]
17:17 -!- discord-raku-bot [~RakuIRC@ip5f5ab722.dynamic.kabel-deutschland.de] has joined #raku-beginner
--- Day changed Fri Aug 20 2021
12:24 -!- lizmat [~textual@ipv4-wenzperl.connected.by.freedominter.net] has quit [Quit: Textual IRC Client: www.textualapp.com]
12:25 -!- lizmat [~textual@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
23:04 -!- neither [~neither@176.220.122.215] has joined #raku-beginner
23:05 < neither> hi, hi! Is there a way I can pass operator by its name or sub form to hyper metaoperator?
23:06 < neither> So that `@arr >>&infix:<~>>>"N"` or similar works?
23:07 < neither> I have the infix operator in a variable
23:27 < neither> Wrapping it with square brackets seem to work!
23:35 -!- neither [~neither@176.220.122.215] has quit [Quit: Connection closed]
--- Day changed Sat Aug 21 2021
08:24 -!- neither [~neither@5.177.236.38] has joined #raku-beginner
09:00 -!- neither17 [~neither@5.177.237.42] has joined #raku-beginner
09:00 -!- neither17 [~neither@5.177.237.42] has quit [Client Quit]
09:02 -!- neither [~neither@5.177.236.38] has quit [Ping timeout: 248 seconds]
--- Day changed Sun Aug 22 2021
16:16 -!- Poohmaan [~Poohmaan@117.98.171.39] has joined #raku-beginner
16:18 < Poohmaan> Hello all, how can I use negation in regexes, for example, I want to capture anything which is not a digit excluding the minus sign
16:19 < Poohmaan> I tried \D-[-], but that does not seem to work the way I want
16:27 -!- Poohmaan [~Poohmaan@117.98.171.39] has quit [Quit: Connection closed]
16:39 -!- Poohmaan [~Poohmaan@117.98.171.39] has joined #raku-beginner
16:39 < Poohmaan> Or <[\D] - [-]>
16:40 -!- Poohmaan [~Poohmaan@117.98.171.39] has quit [Client Quit]
16:43 -!- Poohmaan [~Poohmaan@117.98.171.39] has joined #raku-beginner
16:45 -!- Poohmaan [~Poohmaan@117.98.171.39] has quit [Client Quit]
16:47 -!- Poohmaan [~Poohmaan@117.98.171.39] has joined #raku-beginner
16:48 -!- Poohmaan [~Poohmaan@117.98.171.39] has quit [Client Quit]
16:49 -!- Poohmaan [~Poohmaan@117.98.171.39] has joined #raku-beginner
16:50 -!- Poohmaan [~Poohmaan@117.98.171.39] has quit [Client Quit]
16:50 -!- Poohmaan [~Poohmaan@117.98.171.39] has joined #raku-beginner
16:51 -!- Poohmaan [~Poohmaan@117.98.171.39] has quit [Client Quit]
17:02 -!- poohman [~poohman@117.98.171.39] has joined #raku-beginner
17:03 -!- poohman [~poohman@117.98.171.39] has quit [Read error: Connection reset by peer]
17:03 -!- poohman [~poohman@117.98.171.39] has joined #raku-beginner
17:04 -!- poohman [~poohman@117.98.171.39] has quit [Remote host closed the connection]
19:28 -!- poohman [~poohman@117.98.171.39] has joined #raku-beginner
19:29 -!- poohman [~poohman@117.98.171.39] has quit [Read error: Connection reset by peer]
19:31 -!- poohman [~poohman@117.98.171.39] has joined #raku-beginner
19:32 -!- poohman [~poohman@117.98.171.39] has quit [Read error: Connection reset by peer]
--- Day changed Mon Aug 23 2021
08:50 < discord-raku-bot> <Nemokosch#9980> Why did bots take over in this channel?
08:50 < discord-raku-bot> <Nemokosch#9980> 😦
09:03 < discord-raku-bot> <Nemokosch#9980> and anyway, from what I know, negating regexes is a pretty bad thing to do
09:36 -!- dakkar [~dakkar@host-87-5-114-102.retail.telecomitalia.it] has joined #raku-beginner
10:50 -!- dakkar [~dakkar@host-87-5-114-102.retail.telecomitalia.it] has quit [Ping timeout: 240 seconds]
10:50 -!- dakkar [~dakkar@host-87-5-114-102.retail.telecomitalia.it] has joined #raku-beginner
18:31 -!- dakkar [~dakkar@host-87-5-114-102.retail.telecomitalia.it] has quit [Ping timeout: 248 seconds]
20:56 < discord-raku-bot> <Hydrazer#4827> m:```
20:56 < discord-raku-bot> <Hydrazer#4827> my $str = '123-$#@GaWEf';
20:56 < discord-raku-bot> <Hydrazer#4827> say $str ~~ m:g/<-[\d-]>/;
20:56 < discord-raku-bot> <Hydrazer#4827> ```
21:02 < lizmat> m:
21:02 < lizmat> m: foo
21:02 < lizmat> hmmm... we need camelia here as well
--- Day changed Tue Aug 24 2021
09:53 -!- dakkar [~dakkar@host-87-5-114-102.retail.telecomitalia.it] has joined #raku-beginner
14:03 -!- TempIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has quit [Remote host closed the connection]
14:03 -!- TempIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
15:24 -!- Netsplit *.net <-> *.split quits: RakuIRCLogger
15:28 -!- Netsplit over, joins: RakuIRCLogger
16:52 -!- pyl3r [~pyl3r@146.185.32.212] has joined #raku-beginner
16:53 < pyl3r> Hello, I've been having problems installing zef, anyone else facing the same problems?
17:11 -!- pyl3r [~pyl3r@146.185.32.212] has quit [Quit: Ping timeout (120 seconds)]
17:12 -!- pyl3r [~pyl3r@146.185.32.212] has joined #raku-beginner
17:15 -!- pyl3r [~pyl3r@146.185.32.212] has quit [Client Quit]
18:00 -!- pyl3r [~pyl3r@94.187.0.168] has joined #raku-beginner
18:08 -!- pyl3r [~pyl3r@94.187.0.168] has quit [Quit: Ping timeout (120 seconds)]
18:37 -!- dakkar [~dakkar@host-87-5-114-102.retail.telecomitalia.it] has quit [Ping timeout: 240 seconds]
20:51 -!- pyl3r [~pyl3r@94.187.0.168] has joined #raku-beginner
20:51 -!- pyl3r [~pyl3r@94.187.0.168] has quit [Client Quit]
20:58 < [Coke]> nope. Can you describe the issue?
21:12 < lizmat> I think the issue is handled at: https://www.reddit.com/r/rakulang/comments/panzcr/issues_with_installing_zef/
21:35 -!- neither [~neither@176.220.122.148] has joined #raku-beginner
21:48 -!- TempIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has quit [Remote host closed the connection]
21:48 -!- TempIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
23:22 -!- neither [~neither@176.220.122.148] has quit [Quit: Connection closed]
--- Day changed Wed Aug 25 2021
09:48 -!- dakkar [~dakkar@host-87-5-114-102.retail.telecomitalia.it] has joined #raku-beginner
15:45 -!- randomnick [~randomnic@157.40.255.255] has joined #raku-beginner
15:46 -!- randomnick [~randomnic@157.40.255.255] has quit [Client Quit]
15:53 < discord-raku-bot> <Sky#0464> in https://rosettacode.org/wiki/Identity_matrix#Raku `[1, |(0 xx $n-1)], *.rotate(-1) ... *[*-1]` is used to generate an identity matrix, how does `*[*-1]` work here? I thought the `*` at end meant infinity in ranges and sequences, and last element of infinity doesn't make much sense...
16:02 < lizmat> * is more about "Whatever" generally, than Infinity
16:03 < lizmat> if something is bound in some other way, then * just indicates to what it is bound, and [*-1] then indicates the last element
16:04 < discord-raku-bot> <Sky#0464> in that case `*[*-1]` is basically a function returning the last element?
16:04 < lizmat> yes
16:05 < lizmat> say *[*-1]( (1,2,3) ) # 3
16:08 < discord-raku-bot> <Sky#0464> okay, https://docs.raku.org/language/operators#infix_... says "If the endpoint is not *, it's smartmatched against each generated element and the sequence is terminated when the smartmatch succeeded. The final element is excluded of the sequence if a sequence operator variant with a final caret is used, it is included otherwise.". so, the last element is being treated as a boolean here, and the list stops
16:08 < discord-raku-bot> <Sky#0464> makes a lot more sense, thanks!
16:10 < lizmat> yw!
18:35 -!- dakkar [~dakkar@host-87-5-114-102.retail.telecomitalia.it] has quit [Quit: e via, verso nuove avventure]
21:23 -!- TempIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has quit [Remote host closed the connection]
21:23 -!- TempIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
21:34 -!- TempIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has quit [Remote host closed the connection]
21:35 -!- TempIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
21:38 -!- mjgardner [sid182628@charlton.irccloud.com] has joined #raku-beginner
21:58 -!- sjn [sjn@sprocket.nvg.ntnu.no] has joined #raku-beginner
22:52 -!- TempIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has quit [Remote host closed the connection]
22:52 -!- TempIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
--- Day changed Thu Aug 26 2021
11:18 -!- TempIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has quit [Remote host closed the connection]
11:18 -!- TempIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
11:26 -!- TempIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has quit [Remote host closed the connection]
11:26 -!- TempIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
11:33 -!- TempIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has quit [Remote host closed the connection]
11:33 -!- TempIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
11:38 -!- TempIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has quit [Remote host closed the connection]
11:38 -!- TempIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
20:43 -!- rakugest [~rakugest@179.215.180.176] has joined #raku-beginner
20:44 -!- rakugest [~rakugest@179.215.180.176] has left #raku-beginner []
20:45 -!- discord-raku-bot [~RakuIRC@ip5f5ab722.dynamic.kabel-deutschland.de] has quit [Remote host closed the connection]
20:46 -!- discord-raku-bot [~RakuIRC@ip5f5ab722.dynamic.kabel-deutschland.de] has joined #raku-beginner
--- Day changed Sat Aug 28 2021
00:10 -!- pisa [~pisa@47.244.45.129] has joined #raku-beginner
00:23 -!- pisa [~pisa@47.244.45.129] has quit [Quit: Connection closed]
06:09 -!- lizmat_ [~textual@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
06:11 -!- RakuIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has quit [Ping timeout: 268 seconds]
06:12 -!- TempIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has quit [Ping timeout: 240 seconds]
06:12 -!- lizmat [~textual@ipv4-wenzperl.connected.by.freedominter.net] has quit [Ping timeout: 250 seconds]
10:58 -!- lizmat_ [~textual@ipv4-wenzperl.connected.by.freedominter.net] has quit [Quit: Textual IRC Client: www.textualapp.com]
10:58 -!- lizmat [~textual@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
10:58 -!- RakuIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
11:00 -!- TempIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
15:10 -!- mmat [~mmat@modemcable022.31-22-96.mc.videotron.ca] has joined #raku-beginner
16:05 -!- TempIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has quit [Ping timeout: 250 seconds]
18:12 -!- mmat [~mmat@modemcable022.31-22-96.mc.videotron.ca] has quit [Quit: Connection closed]
18:31 -!- neither [~neither@5.177.234.50] has joined #raku-beginner
20:49 -!- neither [~neither@5.177.234.50] has quit [Ping timeout: 248 seconds]
21:24 -!- TempIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
23:20 -!- rakuUser [~gabriel@2804:14c:bf48:8f8a:7271:bcff:febf:e654] has joined #raku-beginner
--- Day changed Sun Aug 29 2021
03:50 -!- discord-raku-bot [~RakuIRC@ip5f5ab722.dynamic.kabel-deutschland.de] has quit [Remote host closed the connection]
03:51 -!- discord-raku-bot [~RakuIRC@ip5f5ab722.dynamic.kabel-deutschland.de] has joined #raku-beginner
05:56 -!- rakuUser [~gabriel@2804:14c:bf48:8f8a:7271:bcff:febf:e654] has quit [Quit: Leaving.]
10:16 -!- neither [~neither@37.155.111.224] has joined #raku-beginner
11:54 -!- neither [~neither@37.155.111.224] has quit [Quit: Ping timeout (120 seconds)]
12:03 -!- neither [~neither@37.155.111.224] has joined #raku-beginner
12:19 -!- neither [~neither@37.155.111.224] has quit [Quit: Ping timeout (120 seconds)]
12:23 -!- neither [~neither@37.155.111.224] has joined #raku-beginner
14:13 -!- neither [~neither@37.155.111.224] has quit [Quit: Connection closed]
14:53 -!- neither [~neither@37.155.111.224] has joined #raku-beginner
16:38 -!- neither [~neither@37.155.111.224] has quit [Ping timeout: 248 seconds]
16:50 -!- neither [~neither@37.155.111.224] has joined #raku-beginner
20:01 -!- neither [~neither@37.155.111.224] has quit [Ping timeout: 250 seconds]
20:11 -!- neither [~neither@46.106.93.153] has joined #raku-beginner
23:14 -!- neither [~neither@46.106.93.153] has quit [Quit: Connection closed]
--- Day changed Mon Aug 30 2021
00:50 -!- discord-raku-bot [~RakuIRC@ip5f5ab722.dynamic.kabel-deutschland.de] has quit [Ping timeout: 240 seconds]
00:50 -!- discord-raku-bot [~RakuIRC@ip5f5ab722.dynamic.kabel-deutschland.de] has joined #raku-beginner
02:57 -!- pisa [~pisa@36.18.37.240] has joined #raku-beginner
03:39 -!- pisa [~pisa@36.18.37.240] has quit [Quit: Connection closed]
06:07 -!- dominix [~dominix@248.83.90.202.dsl.dyn.mana.pf] has joined #raku-beginner
06:08 -!- dominix [~dominix@248.83.90.202.dsl.dyn.mana.pf] has quit [Quit: Connection closed]
13:23 -!- RakuIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has quit [Ping timeout: 250 seconds]
13:24 -!- RakuIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
19:38 < discord-raku-bot> <Anton Antonov#7232> What is the best way of checking that an array is an array hashes or it can be coerced into one? Right now I am using `try { my Hash @arr-of-hashes = @arr }; if !$ { die ... }` , but that might be seen as too cumbersome and/or not direct enough...
19:41 < discord-raku-bot> <Anton Antonov#7232> What is the best way of checking that an array is an array hashes or it can be coerced into one? Right now I am using `try { my Hash @arr-of-hashes = @arr }; if !$ { die ... }` , but that might be seen as too cumbersome and/or not direct enough and/or slow...
20:06 -!- qwert123 [~qwert123@ip-86.net-89-3-14.rev.numericable.fr] has joined #raku-beginner
20:06 < qwert123> Hello :)
20:06 < qwert123> I've just installed rakudo
20:07 < discord-raku-bot> <rakuUser#9187> m:
20:07 < discord-raku-bot> <rakuUser#9187> ```
20:07 < discord-raku-bot> <rakuUser#9187> my Str @str-array;
20:07 < discord-raku-bot> <rakuUser#9187> my Hash @hash-array;
20:07 < discord-raku-bot> <rakuUser#9187> say "is \@str-array an Array of Hashes? ", @str-array.^name eq "Array[Hash]";
20:07 < discord-raku-bot> <rakuUser#9187> say "is \@hash-array an Array of Hashes? ", @hash-array.^name eq "Array[Hash]";
20:07 < discord-raku-bot> <rakuUser#9187> ```
20:08 < discord-raku-bot> <rakuUser#9187> m:
20:08 < discord-raku-bot> <rakuUser#9187> my Str @str-array;
20:08 < discord-raku-bot> <rakuUser#9187> my Hash @hash-array;
20:08 < discord-raku-bot> <rakuUser#9187> say "is \@str-array an Array of Hashes? ", @str-array.^name eq "Array[Hash]";
20:08 < discord-raku-bot> <rakuUser#9187> say "is \@hash-array an Array of Hashes? ", @hash-array.^name eq "Array[Hash]";
20:08 < qwert123> when I run "raku", I have "bash: raku : commande introuvable" that is "unfindable command"
20:09 < discord-raku-bot> <rakuUser#9187> one way that i can think of. it is this one
20:09 < qwert123> when I run "perl6"
20:09 < qwert123> I have "Unhandled exception: Failed to write string to stream: broken pipe"
20:10 < qwert123> I don't find anything about that in the Web
20:11 < [Coke]> How did you install raku?
20:11 < [Coke]> and what OS are you on?
20:11 < [Coke]> and does 'perl6 --version' work?
20:12 -!- rakuUser [~rakuUser@179.215.180.176] has joined #raku-beginner
20:13 < qwert123> apt install rakudo
20:14 < qwert123> 'perl6 --version' gives the same error
20:14 < qwert123>
20:18 < qwert123> I didn't want to write bold
20:19 < qwert123> OS : linux
20:21 < discord-raku-bot> <rakuUser#9187> i think this is even better
20:21 < discord-raku-bot> <rakuUser#9187> m:
20:21 < discord-raku-bot> <rakuUser#9187> my Str @str-array;
20:21 < discord-raku-bot> <rakuUser#9187> my Hash @hash-array;
20:21 < discord-raku-bot> <rakuUser#9187> @str-array.isa(Array[Hash]);
20:21 < discord-raku-bot> <rakuUser#9187> @hash-array.isa(Array[Hash]);
20:21 < discord-raku-bot> <rakuUser#9187> i think this is even better
20:21 < discord-raku-bot> <rakuUser#9187> m:
20:21 < discord-raku-bot> <rakuUser#9187> my Str @str-array;
20:21 < discord-raku-bot> <rakuUser#9187> my Hash @hash-array;
20:21 < discord-raku-bot> <rakuUser#9187> @str-array.isa(Array[Hash]);
20:21 < discord-raku-bot> <rakuUser#9187> @hash-array.isa(Array[Hash]);
20:22 < discord-raku-bot> <rakuUser#9187> m:
20:22 < discord-raku-bot> <rakuUser#9187> my Str @str-array;
20:22 < discord-raku-bot> <rakuUser#9187> my Hash @hash-array;
20:22 < discord-raku-bot> <rakuUser#9187> say @str-array.isa(Array[Hash]);
20:22 < discord-raku-bot> <rakuUser#9187> say @hash-array.isa(Array[Hash]);
20:22 < qwert123> I have also 'at <unknown>:1 (/usr/share/perl6/runtime/CORE.setting.moarvm:print_exception)'
20:22 < discord-raku-bot> <Anton Antonov#7232> <@!256545253111234581> Thank you! Looks good and better!
20:49 < [Coke]> I'm guessing your apt install is giving you an old/broken version. You could try using the Rakudo * installation, or the dockerfile, or building from source. (or reporting the error up through the maintainer of the apt version)
20:53 < qwert123> Thank you very much :), I'll try that
21:03 -!- qwert123 [~qwert123@ip-86.net-89-3-14.rev.numericable.fr] has left #raku-beginner []
21:57 -!- discord-raku-bot [~RakuIRC@ip5f5ab722.dynamic.kabel-deutschland.de] has quit [Remote host closed the connection]
21:57 -!- discord-raku-bot [~RakuIRC@ip5f5ab722.dynamic.kabel-deutschland.de] has joined #raku-beginner
--- Day changed Tue Aug 31 2021
03:12 -!- rakuUser [~rakuUser@179.215.180.176] has quit [Quit: Connection closed]
06:03 -!- discord-raku-bot [~RakuIRC@ip5f5ab722.dynamic.kabel-deutschland.de] has quit [Remote host closed the connection]
06:04 -!- discord-raku-bot [~RakuIRC@ip5f5ab722.dynamic.kabel-deutschland.de] has joined #raku-beginner
10:19 -!- neither [~neither@94.235.65.224] has joined #raku-beginner
10:46 -!- neither12 [~neither@94.235.65.224] has joined #raku-beginner
10:46 -!- neither12 [~neither@94.235.65.224] has quit [Client Quit]
10:46 -!- neither81 [~neither@94.235.65.224] has joined #raku-beginner
10:46 -!- neither81 [~neither@94.235.65.224] has quit [Client Quit]
10:48 -!- neither [~neither@94.235.65.224] has quit [Ping timeout: 244 seconds]
11:20 -!- lizmat_ [~textual@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
11:20 -!- lizmat_ [~textual@ipv4-wenzperl.connected.by.freedominter.net] has quit [Client Quit]
11:20 -!- lizmat_ [~textual@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
11:23 -!- lizmat [~textual@ipv4-wenzperl.connected.by.freedominter.net] has quit [Ping timeout: 252 seconds]
11:23 -!- TempIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has quit [Ping timeout: 240 seconds]
11:24 -!- lizmat_ [~textual@ipv4-wenzperl.connected.by.freedominter.net] has quit [Ping timeout: 245 seconds]
11:27 -!- lizmat [~textual@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
11:29 -!- TempIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
11:38 -!- neither [~neither@94.235.65.224] has joined #raku-beginner
13:24 -!- neither [~neither@94.235.65.224] has quit [Ping timeout: 240 seconds]
13:37 -!- neither [~neither@94.235.65.224] has joined #raku-beginner
13:49 -!- lizmat [~textual@ipv4-wenzperl.connected.by.freedominter.net] has quit [Quit: Textual IRC Client: www.textualapp.com]
13:50 -!- lizmat [~textual@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
13:50 -!- lizmat [~textual@ipv4-wenzperl.connected.by.freedominter.net] has quit [Client Quit]
13:51 -!- lizmat [~textual@89.205.138.64] has joined #raku-beginner
13:53 -!- TempIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has quit [Ping timeout: 245 seconds]
13:54 -!- lizmat [~textual@89.205.138.64] has quit [Client Quit]
13:54 -!- lizmat [~textual@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
13:55 -!- TempIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
15:06 -!- rakuUser [~rakuUser@179.215.180.176] has joined #raku-beginner
15:28 -!- neither [~neither@94.235.65.224] has quit [Ping timeout: 252 seconds]
16:02 -!- neither [~neither@94.235.65.224] has joined #raku-beginner
16:27 -!- neither55 [~neither@94.235.65.224] has joined #raku-beginner
16:28 -!- neither [~neither@94.235.65.224] has quit [Ping timeout: 244 seconds]
17:37 -!- neither55 [~neither@94.235.65.224] has quit [Ping timeout: 244 seconds]
19:22 -!- rakuUser [~rakuUser@179.215.180.176] has quit [Quit: Ping timeout (120 seconds)]
19:32 -!- rakuUser [~rakuUser@179.215.180.176] has joined #raku-beginner
23:29 -!- rakuUser [~rakuUser@179.215.180.176] has quit [Quit: Connection closed]
--- Day changed Wed Sep 01 2021
00:15 -!- rakuUser [~rakuUser@179.215.180.176] has joined #raku-beginner
00:19 -!- rakuUser [~rakuUser@179.215.180.176] has quit [Client Quit]
00:19 -!- rakuUser [~rakuUser@179.215.180.176] has joined #raku-beginner
02:57 -!- rakuUser [~rakuUser@179.215.180.176] has quit [Quit: Connection closed]
17:14 -!- rakuUser [~rakuUser@179.215.180.176] has joined #raku-beginner
21:16 -!- discord-raku-bot [~RakuIRC@ip5f5ab722.dynamic.kabel-deutschland.de] has quit [Remote host closed the connection]
--- Log closed Wed Sep 01 21:24:21 2021
--- Log opened Wed Sep 01 21:39:34 2021
21:39 -!- gfldex [~dex@ip5f5ab722.dynamic.kabel-deutschland.de] has joined #raku-beginner
21:39 -!- Topic for #raku-beginner: This channel is intended for people just starting with the Raku Programming Language (https://raku.org). This channel is being logged for historical purposes.
21:39 -!- Topic set by lizmat [~textual@ipv4-wenzperl.connected.by.freedominter.net] [Mon Aug 16 16:43:12 2021]
21:39 [Users #raku-beginner]
21:39 [ [Coke]] [ lizmat ] [ RakuIRCLogger] [ sjn ]
21:39 [ gfldex] [ mjgardner] [ rakuUser ] [ TempIRCLogger]
21:39 -!- Irssi: #raku-beginner: Total of 8 nicks [0 ops, 0 halfops, 0 voices, 8 normal]
21:39 -!- Channel #raku-beginner created Mon Aug 16 16:35:55 2021
21:40 -!- Irssi: Join to #raku-beginner was synced in 32 secs
21:52 -!- discord-raku-bot [~RakuIRC@ip5f5ab722.dynamic.kabel-deutschland.de] has joined #raku-beginner
--- Day changed Thu Sep 02 2021
05:13 -!- rakuUser [~rakuUser@179.215.180.176] has quit [Quit: Connection closed]
06:20 -!- aleksb [~aleksb@202-159-174-62.tpgi.com.au] has joined #raku-beginner
09:40 -!- aleksb [~aleksb@202-159-174-62.tpgi.com.au] has quit [Quit: Connection closed]
11:22 -!- lizmat [~textual@ipv4-wenzperl.connected.by.freedominter.net] has quit [Quit: Textual IRC Client: www.textualapp.com]
11:23 -!- lizmat [~textual@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
11:23 -!- TempIRCLogger__ [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
11:25 -!- TempIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has quit [Ping timeout: 244 seconds]
14:15 -!- rakuUser [~rakuUser@179.215.180.176] has joined #raku-beginner
16:24 -!- neither [~neither@5.177.228.185] has joined #raku-beginner
17:08 -!- neither [~neither@5.177.228.185] has quit [Ping timeout: 244 seconds]
20:02 -!- neither [~neither@5.177.228.185] has joined #raku-beginner
20:32 -!- neither64 [~neither@5.177.228.185] has joined #raku-beginner
20:33 -!- neither64 [~neither@5.177.228.185] has quit [Client Quit]
20:47 -!- neither31 [~neither@5.177.228.185] has joined #raku-beginner
20:48 < discord-raku-bot> <Nemokosch#9980> hello, what's the idiomatic way to count the occurences of a certain character in Raku?
20:56 < lizmat> m: dd ("foo" ~~ m:g/o/).elems # would be a way
21:51 < discord-raku-bot> <gfldex#8222> m: say + "banana".indices('a');
21:54 < lizmat> gfldex++
21:54 < lizmat> forgot all about indices :-)
22:29 -!- neither [~neither@5.177.228.185] has quit [Ping timeout: 244 seconds]
22:29 -!- neither31 [~neither@5.177.228.185] has quit [Ping timeout: 245 seconds]
--- Day changed Fri Sep 03 2021
04:01 -!- rakuUser [~rakuUser@179.215.180.176] has quit [Quit: Connection closed]
08:16 -!- yjh [~yjh@071-084-181-214.res.spectrum.com] has joined #raku-beginner
08:17 < yjh> Hello. Is this the right place to be to ask about a problem installing a module?
12:10 -!- mjgardner [sid182628@charlton.irccloud.com] has quit []
12:11 -!- mjgardner [sid182628@id-182628.ilkley.irccloud.com] has joined #raku-beginner
12:28 -!- rakuUser [~rakuUser@179.215.180.176] has joined #raku-beginner
15:30 < discord-raku-bot> <Anton Antonov#7232> Is there a function or idiom that lets me get a Hash without specified elements. I.e. something like : `my %h = {a=>1,b=>8,c=>4}; %h.key-drop<a c>` would return `{b=>8}`.
15:31 < discord-raku-bot> <Anton Antonov#7232> I know I can use `my %h1 = %h; %h1<a c>:delete; %h1` .
15:38 < lizmat> do a c need to be removed from the hash? or just not part of the return value?
15:38 < discord-raku-bot> <Anton Antonov#7232> The latter, just not part of the returned value.
15:40 < lizmat> something like: my %h = :42a, :666b, :12c; dd (%h{%h.keys.grep(* ne "a"|"b")}:p).hash ?
15:41 < lizmat> if you would be happy with a list of Pairs, you can drop the outer ().hash
15:44 < discord-raku-bot> <Anton Antonov#7232> Thanks, Liz. This does what I want: `%h{%h.keys.grep(* !(elem) <a b>)}:p` .
15:44 < discord-raku-bot> <Anton Antonov#7232> Thanks, Liz! This does what I want: `%h{%h.keys.grep(* !(elem) <a b>)}:p` .
15:45 < lizmat> you could also use ∉ instead of !(elem) :-)
15:46 < discord-raku-bot> <Morfent#9811> if you're using setty ops...
15:46 < discord-raku-bot> <Morfent#9811> m:```
15:46 < discord-raku-bot> <Morfent#9811> my %h = a=>1, b=>8, c=>4;
15:46 < discord-raku-bot> <Morfent#9811> say %(%h{%h (-) <a b>}:p)
15:46 < discord-raku-bot> <Morfent#9811> ```
15:47 < discord-raku-bot> <Anton Antonov#7232> Ah, I know, I have hard time entering it, and, *to me*, in Raku `!(elem)` looks more readable.
15:47 < lizmat> sure :-)
15:47 < discord-raku-bot> <Anton Antonov#7232> <@!210313526928080896> Yes, I like that.
15:49 < discord-raku-bot> <Anton Antonov#7232> @lizmat In Mathematica I do prefer using `∈` and `∉`.
15:59 < discord-raku-bot> <Nemokosch#9980> what is `%h{}` for?
15:59 < lizmat> it's called the zen-slice... it is basically the same as %h but %h{} can be interpolated in a double quoted string
15:59 < discord-raku-bot> <Anton Antonov#7232> <@!297037173541175296> For getting a elements / values out of a dictionary/hash.
16:00 < lizmat> ah, I thought the empty {} was meant :-)
16:00 < discord-raku-bot> <Anton Antonov#7232> Liz, I think it is...
16:05 < discord-raku-bot> <Nemokosch#9980> hm?
16:31 < discord-raku-bot> <Anton Antonov#7232> How can I merge an arbitrary list of hashes? Is there some reduction operation for `%a , %b` ?
16:31 < discord-raku-bot> <Anton Antonov#7232> How can I merge an arbitrary list of hashes? Is there some reduction operation for `my %c = %a , %b` ?
16:32 < discord-raku-bot> <Anton Antonov#7232> Of course, I can always use a `for` loop.
16:38 < lizmat> what's wrong with my %c = %a, %b ?
16:50 < discord-raku-bot> <Anton Antonov#7232> @lizmat `my %c = %a, %b` is fine for two hashes. Let us consider having an array of hashes, e.g. `my Hash @arr = [ %( ...]`. I would like to merge all hashes in that array into one hash. I can use `my %hres = do for @arr -> %h {%hres = %hres , %h}`, but I was wondering can I use something like `[,] @arr` .
16:53 < lizmat> perhaps: my @a is List = {:42a},{:666b},{:777c}; dd @a; my %h = @a; dd %h
16:54 < lizmat> my %h = @a does the right thing if there are no containers involved
16:54 < lizmat> if it has to be an Array, then something like: my @a = {:42a},{:666b},{:777c}; dd @a; my %h = @a.map: *<>; dd %h
16:55 < lizmat> basically de-containerizing the elements of the array
16:58 < discord-raku-bot> <Anton Antonov#7232> Lizmat, these are great options -- I will study them. Thanks!
17:00 < yjh> Is there a reason %?RESOURCES<libraries/sha1> would return a path with filename extension 'lib' instead of 'dll' on windows?
17:02 < lizmat> that feels... odd
19:50 < discord-raku-bot> <gfldex#8222> m:```
19:50 < discord-raku-bot> <gfldex#8222> my %h = :1a, :8b, :4c;
19:50 < discord-raku-bot> <gfldex#8222> dd %h.grep(*.key ne 'a'|'b').hash;
19:50 < discord-raku-bot> <gfldex#8222> ```
20:08 < [Coke]> the lib vs. dll question is "why am I getting a static library instead of a dynamic one?"
20:08 < [Coke]> ?
--- Log closed Sat Sep 04 02:00:02 2021
--- Log opened Sat Sep 04 02:00:16 2021
02:00 -!- gfldex [~dex@ip5f5ab722.dynamic.kabel-deutschland.de] has joined #raku-beginner
02:00 -!- Topic for #raku-beginner: This channel is intended for people just starting with the Raku Programming Language (https://raku.org). This channel is being logged for historical purposes.
02:00 -!- Topic set by lizmat [~textual@ipv4-wenzperl.connected.by.freedominter.net] [Mon Aug 16 16:43:12 2021]
02:00 [Users #raku-beginner]
02:00 [ [Coke]] [ gfldex] [ lizmat] [ mjgardner] [ rakuUser] [ sjn]
02:00 -!- Irssi: #raku-beginner: Total of 6 nicks [0 ops, 0 halfops, 0 voices, 6 normal]
02:00 -!- RakuIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
02:00 -!- TempIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
02:00 -!- Channel #raku-beginner created Mon Aug 16 16:35:55 2021
02:00 -!- discord-raku-bot [~RakuIRC@ip5f5ab722.dynamic.kabel-deutschland.de] has joined #raku-beginner
02:00 -!- Irssi: Join to #raku-beginner was synced in 34 secs
04:17 -!- rakuUser [~rakuUser@179.215.180.176] has quit [Quit: Connection closed]
07:45 -!- yjh [~yjh@071-084-181-214.res.spectrum.com] has joined #raku-beginner
07:50 -!- yjh [~yjh@071-084-181-214.res.spectrum.com] has left #raku-beginner []
19:22 -!- neither [~neither@5.177.237.246] has joined #raku-beginner
19:54 -!- neither [~neither@5.177.237.246] has quit [Quit: Ping timeout (120 seconds)]
19:56 -!- neither [~neither@5.177.237.246] has joined #raku-beginner
20:28 -!- neither [~neither@5.177.237.246] has left #raku-beginner []
22:21 -!- discord-raku-bot [~RakuIRC@ip5f5ab722.dynamic.kabel-deutschland.de] has quit [Excess Flood]
22:22 -!- discord-raku-bot [~RakuIRC@ip5f5ab722.dynamic.kabel-deutschland.de] has joined #raku-beginner
--- Day changed Sun Sep 05 2021
20:58 -!- discord-raku-bot [~RakuIRC@ip5f5ab722.dynamic.kabel-deutschland.de] has quit [Remote host closed the connection]
20:58 -!- discord-raku-bot [~RakuIRC@ip5f5ab722.dynamic.kabel-deutschland.de] has joined #raku-beginner
--- Day changed Mon Sep 06 2021
09:05 < discord-raku-bot> <Nemokosch#9980> Hello, how should one interpolate a quoting construct in another quoting construct? Like shell quoting inside a string.
09:50 -!- dakkar [~dakkar@home.thenautilus.net] has joined #raku-beginner
10:09 < discord-raku-bot> <lakmatiol#8020> do you mean sth like
10:09 < discord-raku-bot> <lakmatiol#8020> ```perl
10:09 < discord-raku-bot> <lakmatiol#8020> "the uname is $(qx{uname})"
10:09 < discord-raku-bot> <lakmatiol#8020> ```
10:15 < lizmat> "foo bar { do whatever code in here } baz"
10:21 < discord-raku-bot> <Nemokosch#9980> something like that, yes
10:21 < discord-raku-bot> <Nemokosch#9980> so it will require double paranthesizing, no matter what?
10:23 < lizmat> well, maybe, if you could use a sub like "run" you could do something like:
10:23 < lizmat> say "foo &run(<echo bar>, :out).out.slurp()"
10:24 < lizmat> or wrap that into a sub of your own and call that :-)
10:25 < lizmat> sub doit(@a)nsub doit(@a) { run(@a, :out).out.slurp }; say "foo &doit(<echo bar>)"
10:26 < lizmat> sub doit(@a) { run(@a, :out).out.slurp }; say "foo &doit(<echo bar>)"
10:50 < discord-raku-bot> <sjn 🇳🇴#0644> What are you specifically trying to achieve?
10:55 < discord-raku-bot> <Nemokosch#9980> interpolating command output in a string?
10:56 < discord-raku-bot> <Nemokosch#9980> this isn't an XY problem, this is really what I'm trying to achieve and I'm curious what is the idiomatic way among the many possible solutions
11:02 < discord-raku-bot> <sjn 🇳🇴#0644> my $output = qx<echo "foo">;
12:09 -!- lizmat_ [~textual@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
12:10 -!- TempIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has quit [Remote host closed the connection]
12:10 -!- TempIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
12:13 -!- lizmat [~textual@ipv4-wenzperl.connected.by.freedominter.net] has quit [Ping timeout: 245 seconds]
12:16 -!- lizmat_ [~textual@ipv4-wenzperl.connected.by.freedominter.net] has quit [Quit: Textual IRC Client: www.textualapp.com]
12:16 -!- lizmat [~textual@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
13:50 -!- TempIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has quit [Remote host closed the connection]
13:51 -!- TempIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
14:33 < discord-raku-bot> <Nemokosch#9980> what if the command output should be a part of a longer string?
14:34 < lizmat> say "longer string $output"
14:50 < discord-raku-bot> <Nemokosch#9980> and one without a temporary variable? ^^
14:51 < lizmat> say "longer string { qx<echo foo> }"
15:01 < discord-raku-bot> <Nemokosch#9980> so it does require some double bracketing
15:11 < sjn> yes, double quotes generally means interpolation allowed inside
15:17 < discord-raku-bot> <sjn 🇳🇴#0644> e.g. `say "Kernel is { qx[uname -s] }";` vs. `say 'Kernel is { qx[uname -s] }';`
17:08 < discord-raku-bot> <Anton Antonov#7232> How can I find the filenames in the resources directory of module / package? The documentation here https://docs.raku.org/language/variables#%?RESOURCES just says :
17:08 < discord-raku-bot> <Anton Antonov#7232> > The %?RESOURCES variable is not implemented as a plain Hash, but as an instance of the Distribution::Resources type, so do not expect to see all available resource files in a distribution by printing or by using other ways to inspect its value. Instead, use the API described above to access particular files.
17:25 < dakkar> Anton: https://github.com/search?q=%22%24%3FRESOURCES%22+language%3ARaku&type=Code&ref=advsearch&l=Raku&l= may give you some examples / inspiration
17:25 < dakkar> (it would be nicer if github's code search understood sigils…)
17:28 < discord-raku-bot> <Anton Antonov#7232> @dakkar Thanks, I am looking into those search results now...
17:29 -!- dakkar [~dakkar@home.thenautilus.net] has quit [Remote host closed the connection]
17:29 -!- dakkar [~dakkar@home.thenautilus.net] has joined #raku-beginner
17:29 -!- dakkar [~dakkar@home.thenautilus.net] has quit [Remote host closed the connection]
17:29 -!- dakkar [~dakkar@home.thenautilus.net] has joined #raku-beginner
17:30 < dakkar> (wow, my irc client dies when I click a link… that's new)
17:31 < dakkar> Anton: short version: add a file at `resources/mything.txt`, mention it in `META6.json` like `"resources":["mything.txt"]`, then read it via `$?RESOURCES<mything.txt>.slurp` or similar
17:32 < dakkar> the bit of documentatino you quoted just means "don't expect to see all files by calling `keys`"
17:33 < dakkar> also, dammit, it's `%?RESOURCES` not `$?RESOURCES`… /me is still thinking in Perl5
17:37 < discord-raku-bot> <Anton Antonov#7232> @dakkar I am familiar with what you describe -- accessing the resource files content by explicitly specifying the individual file names. My question is: Can I find the resource file names programmatically? (Not specifying them manually.)
17:37 < dakkar> no, that is explicitly not a thing you can do
17:40 < discord-raku-bot> <Anton Antonov#7232> @dakkar Ok. good to know! Thanks!
18:59 -!- dakkar [~dakkar@home.thenautilus.net] has quit [Ping timeout: 250 seconds]
20:33 < discord-raku-bot> <gfldex#8222> m:```
20:33 < discord-raku-bot> <gfldex#8222> class __px {}
20:33 < discord-raku-bot> <gfldex#8222> multi postcircumfix:<{ }>(__px, @a) { "interpolation of @a[]" }
20:33 < discord-raku-bot> <gfldex#8222> constant term:<&px> = __px;
20:33 < discord-raku-bot> <gfldex#8222> say "&px<1 2 3>"
20:33 < discord-raku-bot> <gfldex#8222> ```
20:34 < discord-raku-bot> <gfldex#8222> <@!297037173541175296> ^^^
20:35 < discord-raku-bot> <gfldex#8222> This is slightly evil tho.
21:11 < discord-raku-bot> <Nemokosch#9980> what is this?
21:38 -!- TempIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has quit [Remote host closed the connection]
21:38 -!- TempIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
22:11 < discord-raku-bot> <gfldex#8222> <@!297037173541175296> This a trick to get function call semantics combined with subscripts that can be used in quotes.
22:12 < discord-raku-bot> <gfldex#8222> m:```
22:12 < discord-raku-bot> <gfldex#8222> sub px(@a) { "interpolation of @a[]" }
22:12 < discord-raku-bot> <gfldex#8222> say "&px<1 2 3>";
22:12 < discord-raku-bot> <gfldex#8222> ```
22:12 < discord-raku-bot> <gfldex#8222> You can't use a sub directly. At least not without parentheses.
22:13 < discord-raku-bot> <Nemokosch#9980> so yours works because you actually override an operator for a dummy class?
22:14 < discord-raku-bot> <gfldex#8222> yes, and use a term that looks like a sub-reference.
22:14 < discord-raku-bot> <gfldex#8222> I didn't expect that to work tho. Rakudo is full of surprises. :)
22:16 < discord-raku-bot> <Nemokosch#9980> 😂
22:17 < discord-raku-bot> <Nemokosch#9980> so this line
22:17 < discord-raku-bot> <Nemokosch#9980> ```
22:17 < discord-raku-bot> <Nemokosch#9980> constant term:<&px> = __px;
22:17 < discord-raku-bot> <Nemokosch#9980> ```
22:17 < discord-raku-bot> <Nemokosch#9980> is important here
22:17 < discord-raku-bot> <gfldex#8222> indeed
22:18 < discord-raku-bot> <Nemokosch#9980> does it require the "sigil"?
22:18 < discord-raku-bot> <gfldex#8222> yes, or the quote construct would take it as verbatim
22:20 < discord-raku-bot> <Nemokosch#9980> so there needs to be something to remind Rakudo that some interpolation is going on
22:20 < discord-raku-bot> <Nemokosch#9980> makes sense
22:30 < discord-raku-bot> <gfldex#8222> I can't find this in Roast. So it might be more then just slightly evil. I shall open a problem solving issue.
23:52 [Users #raku-beginner]
23:52 [ [Coke] ] [ gfldex] [ mjgardner ] [ sjn ]
23:52 [ discord-raku-bot] [ lizmat] [ RakuIRCLogger] [ TempIRCLogger]
23:52 -!- Irssi: #raku-beginner: Total of 8 nicks [0 ops, 0 halfops, 0 voices, 8 normal]
23:52 [Users #raku-beginner]
23:52 [ [Coke] ] [ gfldex] [ mjgardner ] [ sjn ]
23:52 [ discord-raku-bot] [ lizmat] [ RakuIRCLogger] [ TempIRCLogger]
23:52 -!- Irssi: #raku-beginner: Total of 8 nicks [0 ops, 0 halfops, 0 voices, 8 normal]
--- Day changed Tue Sep 07 2021
06:57 -!- Netsplit *.net <-> *.split quits: sjn
06:57 -!- sjn [sjn@sprocket.nvg.ntnu.no] has joined #raku-beginner
10:10 -!- dakkar [~dakkar@home.thenautilus.net] has joined #raku-beginner
13:29 -!- TempIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has quit [Remote host closed the connection]
13:29 -!- TempIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
18:35 -!- dakkar [~dakkar@home.thenautilus.net] has quit [Ping timeout: 252 seconds]
20:35 < discord-raku-bot> <Nemokosch#9980> Hello again, this time I simply brought Python
20:35 < discord-raku-bot> <Nemokosch#9980> ```py
20:35 < discord-raku-bot> <Nemokosch#9980> answer in ('yes', 'no', 'maybe', 'whatever')
20:35 < discord-raku-bot> <Nemokosch#9980> ```
20:35 < discord-raku-bot> <Nemokosch#9980> so I'd like to do something like this in Raku
20:35 < discord-raku-bot> <Nemokosch#9980> how do I do it?
20:35 < lizmat> $answer (elem) <yes no maybe whatever>
20:36 < lizmat> or: $answer ∈ <yes no maybe whatever>
20:36 < discord-raku-bot> <Nemokosch#9980> oh so it works without extra quoting
20:37 < discord-raku-bot> <Nemokosch#9980> thanks; I still got the quotes wrong here and there
20:37 < lizmat> <foo bar baz> is the equivalent of ('foo','bar','baz')
20:43 < discord-raku-bot> <Nemokosch#9980> yes, I'm supposed to know that... actually sometimes I get confused by the gist output
20:45 < lizmat> gist is just that: it's a gist, it's not code :-)
20:46 < discord-raku-bot> <Nahita#3882> m:```
20:46 < discord-raku-bot> <Nahita#3882> say <yes no maybe whatever>.raku;
20:46 < discord-raku-bot> <Nahita#3882> ```
20:47 < lizmat> ("yes", "no", "maybe", "whatever")
20:47 < lizmat> actually, this is shorter:
20:47 < lizmat> dd <yes no maybe whatever>
20:48 < lizmat> it calls .raku on whatever you give it, and does some more introspection
23:42 < discord-raku-bot> <gfldex#8222> m:```
23:42 < discord-raku-bot> <gfldex#8222> multi sub infix:<in>(\needle, List \l) { l.first(needle) ?? True !! False }
23:42 < discord-raku-bot> <gfldex#8222> multi sub infix:<in>(\needle, Iterable \l) { l.list.first(needle) ?? True !! False }
23:42 < discord-raku-bot> <gfldex#8222> multi sub infix:<in>(\needle, Str \s) { s.contains(needle) ?? True !! False }
23:42 < discord-raku-bot> <gfldex#8222> say 'foo' in 'foobar';
23:42 < discord-raku-bot> <gfldex#8222> say 'foo' in 'barbuzz';
23:42 < discord-raku-bot> <gfldex#8222> say '1' in <1 2 3>;
23:42 < discord-raku-bot> <gfldex#8222> say '1' in <0 2 3>;
23:42 < discord-raku-bot> <gfldex#8222> ```
23:42 < discord-raku-bot> <gfldex#8222> <@!297037173541175296> if you really like the in operation, you can define a new operator ofc. ^^^
--- Day changed Wed Sep 08 2021
00:18 < discord-raku-bot> <Nemokosch#9980> cool 😎 😄
01:39 < discord-raku-bot> <avuserow#1203> You can also use junctions: `$answer eq any(<yes no maybe whatever>)`
01:54 < discord-raku-bot> <Nemokosch#9980> also cool
01:54 < discord-raku-bot> <Nemokosch#9980> however...
01:54 < discord-raku-bot> <Nemokosch#9980> ```perl
01:54 < discord-raku-bot> <Nemokosch#9980> constant \choices = {1 => ('old', "old_$basis-postfix"), 2 => ('new', 'old'), 3 => ('new', 'old', "old_$basis-postfix")};
01:54 < discord-raku-bot> <Nemokosch#9980> if $choice.Str (elem) '1'..'3' {
01:54 < discord-raku-bot> <Nemokosch#9980> run 'meld', slip(choices{$choice});
01:54 < discord-raku-bot> <Nemokosch#9980> }
01:54 < discord-raku-bot> <Nemokosch#9980> ```
01:55 < discord-raku-bot> <Nemokosch#9980> this really hurt my brain
01:56 < discord-raku-bot> <Nemokosch#9980> first of all, $choice came from prompt and it was some IntStr hybrid that fails on the (elem) operator without conversion. How should I more reasonably check for it?
01:56 < discord-raku-bot> <Nemokosch#9980> And why does it pass for a hash index as expected if it fails the (elem) check?
01:57 < discord-raku-bot> <Nemokosch#9980> The more troublesome thing is, choices{$choice} is a scalar list apparently
01:57 < discord-raku-bot> <Nemokosch#9980> it took me a lot of time to figure this problem out
01:58 < discord-raku-bot> <Nemokosch#9980> slip comes to save the day but how can I have the elements as normal, list-lists?
07:13 < discord-raku-bot> <Util#9950> <@!297037173541175296> We more reasonably check for membership in a hash by just looking the key up in the hash.
07:13 < discord-raku-bot> <Util#9950> In your code, this neatly dovetails with the need in the next line to use the looked-up value.
07:13 < discord-raku-bot> <Util#9950> Also dovetailing, an `if` statement can alias the result of its condition, and you want a "normal" list, so how about:
07:13 < discord-raku-bot> <Util#9950> constant $basis-postfix = 'Foo'; # Added to make example compile
07:13 < discord-raku-bot> <Util#9950> my $choice = 3; # Added to make example compile
07:13 < discord-raku-bot> <Util#9950> constant \choices = {
07:13 < discord-raku-bot> <Util#9950> 1 => ('old', "old_$basis-postfix"),
07:13 < discord-raku-bot> <Util#9950> 2 => ('new', 'old'),
07:13 < discord-raku-bot> <Util#9950> 3 => ('new', 'old', "old_$basis-postfix"),
07:13 < discord-raku-bot> <Util#9950> };
07:13 < discord-raku-bot> <Util#9950> if choices{$choice} -> @meld_params {
07:13 < discord-raku-bot> <Util#9950> run 'meld', |@meld_params;
07:15 < discord-raku-bot> <Util#9950> ```
07:15 < discord-raku-bot> <Util#9950> constant $basis-postfix = 'Foo'; # Added to make example compile
07:15 < discord-raku-bot> <Util#9950> my $choice = 3; # Added to make example compile
07:15 < discord-raku-bot> <Util#9950> constant \choices = {
07:15 < discord-raku-bot> <Util#9950> 1 => ('old', "old_$basis-postfix"),
07:15 < discord-raku-bot> <Util#9950> 2 => ('new', 'old'),
07:15 < discord-raku-bot> <Util#9950> 3 => ('new', 'old', "old_$basis-postfix"),
07:15 < discord-raku-bot> <Util#9950> };
07:15 < discord-raku-bot> <Util#9950> if choices{$choice} -> @meld_params {
07:15 < discord-raku-bot> <Util#9950> run 'meld', |@meld_params;
07:15 < discord-raku-bot> <Util#9950> }
07:15 < discord-raku-bot> <Util#9950> else {
07:15 < discord-raku-bot> <Util#9950> say "Choice $choice was not valid. Please choose from {choices.keys.sort.join(',')}";
07:15 < discord-raku-bot> <Util#9950> }
07:17 -!- Util [~bruce@047-013-182-182.res.spectrum.com] has joined #raku-beginner
08:46 < discord-raku-bot> <Nemokosch#9980> You know, I'm not sure how much that check was meant for the hash. It was more for the type of the choice (and there is only this one type so far)
10:08 -!- dakkar [~dakkar@home.thenautilus.net] has joined #raku-beginner
11:39 -!- discord-raku-bot [~RakuIRC@ip5f5ab722.dynamic.kabel-deutschland.de] has quit [Remote host closed the connection]
11:40 -!- discord-raku-bot [~RakuIRC@ip5f5ab722.dynamic.kabel-deutschland.de] has joined #raku-beginner
18:39 -!- dakkar [~dakkar@home.thenautilus.net] has quit [Ping timeout: 265 seconds]
18:50 -!- zacts [~zak@user/zacts] has joined #raku-beginner
18:50 < zacts> hi
18:50 < zacts> what resources are there for a complete beginner to learn raku?
18:51 -!- lizmat_ [~textual@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
18:51 -!- RakuIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has quit [Remote host closed the connection]
18:52 -!- RakuIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
18:55 -!- lizmat [~textual@ipv4-wenzperl.connected.by.freedominter.net] has quit [Ping timeout: 252 seconds]
18:56 -!- lizmat_ [~textual@ipv4-wenzperl.connected.by.freedominter.net] has quit [Client Quit]
18:56 -!- lizmat [~textual@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
18:58 < gfldex> zacts: https://raku.org/resources/ got a section called For Newcomers
18:59 < gfldex> please note the distinction between between Newcomers and Beginners. I'm a Raku Beginner since 2008 myself.
19:31 < zacts> thanks gfldex
--- Day changed Thu Sep 09 2021
00:17 -!- zacts [~zak@user/zacts] has quit [Quit: leaving]
00:18 -!- lizmat [~textual@ipv4-wenzperl.connected.by.freedominter.net] has quit [Read error: Connection reset by peer]
00:18 -!- lizmat [~textual@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
00:19 -!- TempIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has quit [Ping timeout: 260 seconds]
00:20 -!- RakuIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has quit [Ping timeout: 265 seconds]
00:37 -!- RakuIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
00:39 -!- TempIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
10:04 -!- dakkar [~dakkar@home.thenautilus.net] has joined #raku-beginner
10:21 -!- TempIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has quit [Remote host closed the connection]
10:21 -!- TempIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
10:23 -!- TempIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has quit [Remote host closed the connection]
10:23 -!- TempIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
18:34 -!- dakkar [~dakkar@home.thenautilus.net] has quit [Quit: e via, verso nuove avventure]
--- Day changed Sat Sep 11 2021
13:14 -!- hamza79 [~hamza@202.47.36.67] has joined #raku-beginner
13:14 < hamza79> Hey
13:16 < hamza79> I am interested in Raku. How is it as Functional programming language coming from Haskell, ML and Lisp
13:54 -!- hamza79 [~hamza@202.47.36.67] has quit [Quit: Connection closed]
15:40 < discord-raku-bot> <lakmatiol#8020> pointfree composition is a lot less common, and I would suggest against recursion for most operations, but just about everything is an expression, and you get first class functions and metaprogramming. No linked lists either.
15:41 < discord-raku-bot> <lakmatiol#8020> the type system is surprisingly powerful, but closer to CL (though unlike CL checkable at compile time to some extent0 than haskell/ML
15:41 < discord-raku-bot> <lakmatiol#8020> the type system is surprisingly powerful, but closer to CL (though unlike CL checkable at compile time to some extent) than haskell/ML
15:41 < discord-raku-bot> <lakmatiol#8020> the type system is surprisingly powerful, but closer to CL (though unlike CL checkable at compile time to a larger extent) than haskell/ML
19:04 < discord-raku-bot> <unixcat64#4715> Hi all. Is there a Raku version of Perl's IPC::Cmd?
19:04 < discord-raku-bot> <unixcat64#4715> Or a Raku way of doing the same things?
19:10 < lizmat> there's of course Inline::Perl5
19:11 < lizmat> but I'm unsure of the semantics of IPC::Cmd: possbly Proc::Async (in core) does all the necessary stuff for you already ?
19:11 < lizmat> https://docs.raku.org/type/Proc::Async
19:22 -!- lizmat_ [~textual@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
19:26 -!- lizmat [~textual@ipv4-wenzperl.connected.by.freedominter.net] has quit [Ping timeout: 260 seconds]
19:48 < discord-raku-bot> <unixcat64#4715> thank you lizmat, I'll check it out
19:55 -!- lizmat_ [~textual@ipv4-wenzperl.connected.by.freedominter.net] has quit [Quit: Textual IRC Client: www.textualapp.com]
19:56 -!- lizmat [~textual@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
22:51 < discord-raku-bot> <unixcat64#4715> is there a Raku/Perl6 language server?
22:53 < discord-raku-bot> <unixcat64#4715> I haven't found one via Google
23:02 < [Coke]> What do you mean "language server"?
23:02 < [Coke]> website where you can run code interactively?
23:12 < [Coke]> if so, https://raku.org/resources/, look for "Practice Online"
--- Day changed Sun Sep 12 2021
00:26 -!- TempIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has quit [Remote host closed the connection]
00:26 -!- TempIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
01:06 < discord-raku-bot> <unixcat64#4715> Coke, no I mean as in Language Server Protocol
04:03 < [Coke]> What's that?
04:05 < [Coke]> https://microsoft.github.io/language-server-protocol/ ? I don't think so. Comma is the only IDE, and it's based on IntelliJ.
04:06 < [Coke]> (that wouldn't preclude it, I don't think, but no, I don't think LSP support exists)
15:51 < discord-raku-bot> <unixcat64#4715> Coke: fair enough. Raku is still a baby yet, so I'm sure there will be LSP support eventually
16:19 < discord-raku-bot> <Anton Antonov#7232> Yesterday was experimenting with regex extractions from a large set of files. I found that using a regex with 3 captions is ~20 slower than using a version of it with only 1 caption. Is this expected and/or documented somewhere? E.g. `XMLSearch0` is ~20 times slower than `XMLSearch1`:
16:19 < discord-raku-bot> <Anton Antonov#7232> ```
16:19 < discord-raku-bot> <Anton Antonov#7232> my regex XMLSearch0 {
16:19 < discord-raku-bot> <Anton Antonov#7232> <header>=('<FactData>')
16:19 < discord-raku-bot> <Anton Antonov#7232> $<data>=(<-[<>]>*)
16:19 < discord-raku-bot> <Anton Antonov#7232> <ender>=('</FactData>')
16:19 < discord-raku-bot> <Anton Antonov#7232> }
16:19 < discord-raku-bot> <Anton Antonov#7232> my regex XMLSearch1 {
16:19 < discord-raku-bot> <Anton Antonov#7232> '<FactData>'
16:19 < discord-raku-bot> <Anton Antonov#7232> $<data>=(<-[<>]>*)
16:19 < discord-raku-bot> <Anton Antonov#7232> '</FactData>'
16:19 < discord-raku-bot> <Anton Antonov#7232> }
16:19 < discord-raku-bot> <Anton Antonov#7232> Yesterday I was experimenting with regex extractions from a large set of files. I found that using a regex with 3 captions is ~20 slower than using a version of it with only 1 caption. Is this expected and/or documented somewhere? E.g. `XMLSearch0` is ~20 times slower than `XMLSearch1`:
16:19 < discord-raku-bot> <Anton Antonov#7232> ```
16:19 < discord-raku-bot> <Anton Antonov#7232> my regex XMLSearch0 {
16:19 < discord-raku-bot> <Anton Antonov#7232> <header>=('<FactData>')
16:19 < discord-raku-bot> <Anton Antonov#7232> $<data>=(<-[<>]>*)
16:19 < discord-raku-bot> <Anton Antonov#7232> <ender>=('</FactData>')
16:19 < discord-raku-bot> <Anton Antonov#7232> }
16:19 < discord-raku-bot> <Anton Antonov#7232> my regex XMLSearch1 {
16:19 < discord-raku-bot> <Anton Antonov#7232> '<FactData>'
16:19 < discord-raku-bot> <Anton Antonov#7232> $<data>=(<-[<>]>*)
16:19 < discord-raku-bot> <Anton Antonov#7232> '</FactData>'
16:19 < discord-raku-bot> <Anton Antonov#7232> }
16:19 < discord-raku-bot> <Anton Antonov#7232> ```
--- Day changed Mon Sep 13 2021
02:01 < discord-raku-bot> <bancorn#1984> howdy! setup rakubrew, raku, and zef. tried a simple thing, installing HTTP::Tiny. wondered if this says anything obv to y'all:
02:01 < discord-raku-bot> <bancorn#1984> ```
02:01 < discord-raku-bot> <bancorn#1984> [~/src/blockchain/tezos/raku]$ rm -rf /Users/jared/.zef/store/d31ded9e8b0651bd8babec0fcc39ff0a24625d51.tar.gz/
02:01 < discord-raku-bot> <bancorn#1984> [~/src/blockchain/tezos/raku]$ zef install HTTP::Tiny
02:01 < discord-raku-bot> <bancorn#1984> ===> Searching for: HTTP::Tiny
02:01 < discord-raku-bot> <bancorn#1984> ===> Testing: HTTP::Tiny:ver<0.1.8>:auth<zef:jjatria>
02:01 < discord-raku-bot> <bancorn#1984> [HTTP::Tiny] The spawned command 'touch' exited unsuccessfully (exit code: 1, signal: 0)
02:01 < discord-raku-bot> <bancorn#1984> [HTTP::Tiny] in method mirror at /Users/jared/.zef/store/store/d31ded9e8b0651bd8babec0fcc39ff0a24625d51.tar.gz/lib/HTTP/Tiny.rakumod (HTTP::Tiny) line 185
02:01 < discord-raku-bot> <bancorn#1984> [HTTP::Tiny] in block <unit> at t/mirror.t line 55
02:01 < discord-raku-bot> <bancorn#1984> ===> Testing [FAIL]: HTTP::Tiny:ver<0.1.8>:auth<zef:jjatria>
02:01 < discord-raku-bot> <bancorn#1984> Aborting due to test failure: HTTP::Tiny:ver<0.1.8>:auth<zef:jjatria> (use --force-test to override)
02:01 < discord-raku-bot> <bancorn#1984> [~/src/blockchain/tezos/raku]$ zef --version
02:06 < discord-raku-bot> <bancorn#1984> I got it.. aborted due to a test failure. But doing a `--force-test` override let it install, and use a method
06:06 -!- Netsplit *.net <-> *.split quits: [Coke]
06:06 -!- [Coke] [~coke@cpe-104-228-9-26.nycap.res.rr.com] has joined #raku-beginner
09:43 < discord-raku-bot> <avuserow#1203> Looks like the failure is in the `mirror` method. I would expect that to fail for you. (Or maybe the test was trying to mirror something where it didn't have permissions)
09:46 -!- dakkar [~dakkar@home.thenautilus.net] has joined #raku-beginner
12:08 < discord-raku-bot> <gfldex#8222> <@!694526400488669234> Did you try Grammar::Debugger to check if it parses differently?
12:09 < discord-raku-bot> <Anton Antonov#7232> <@!195453211409121280> No, I have not. I will try that. (I just installed `Grammar::Profiler::Simple` for more-or-less the same reasons.)
17:07 < [Coke]> If we want LSP support, should probably open a ticket in the "problem solving" repo
18:40 -!- dakkar [~dakkar@home.thenautilus.net] has quit [Ping timeout: 265 seconds]
20:14 < discord-raku-bot> <Nemokosch#9980> It would be nice 🙂
20:15 < discord-raku-bot> <Nemokosch#9980> By the way... I want to do some sed-style substitution. What characters do I need to escape? How much does it differ from sed?
20:18 < discord-raku-bot> <avuserow#1203> in regexes, there's three kinds of characters, roughly:
20:18 < discord-raku-bot> <avuserow#1203> * alphanumeric - defaults to literal meaning, escaped has special meaning
20:18 < discord-raku-bot> <avuserow#1203> * symbols - defaults to special meaning, must be quoted or escaped to match the literal character
20:18 < discord-raku-bot> <avuserow#1203> * whitespace - defaults to ignored, must be quoted or escaped to match the literal character
20:19 < discord-raku-bot> <avuserow#1203> alphanumeric includes underscore, so it's probably 1:1 with the `\w` character class
20:20 < discord-raku-bot> <Nemokosch#9980> thank you very much 🙂 it's more logical than sed where ( ) + would go to the first group. I will pay attention to that
20:22 < discord-raku-bot> <avuserow#1203> yeah, raku grammars and regexes are great. much more consistent even if it's difficult to unlearn the old habits of other tools
20:22 < discord-raku-bot> <Nemokosch#9980> also Raku uses $1 $2 $3 over \1 \2 \3 right? like Perl I think
20:23 < discord-raku-bot> <avuserow#1203> https://docs.raku.org/language/regexes - might be of interest
20:23 < discord-raku-bot> <avuserow#1203> and yes, raku uses the numeric variables, though I think it starts counting from 0.
20:24 < discord-raku-bot> <avuserow#1203> m: "foobar" ~~ /(o)/; say $0; say $1;
20:24 < discord-raku-bot> <avuserow#1203> probably needs a `:g` flag to get the second match, I keep forgetting that
20:24 < discord-raku-bot> <Nemokosch#9980> so $0 is not the whole matching string? that's strange
20:26 < discord-raku-bot> <avuserow#1203> well, `$0 $1 etc` are equivalent to `$/[0] $/[1] etc`, and that object is the result, so you're indexing into the list of matches
20:27 < discord-raku-bot> <Nemokosch#9980> where is the whole string then? 😄
20:28 < discord-raku-bot> <lakmatiol#8020> matching on a string will return a list of all matching substrings, captures are stored elsewhere
20:30 < discord-raku-bot> <avuserow#1203> [Coke]: definitely a good idea. if we want editor integration then LSP is the way to go these days since you get support for basically every editor with one implementation.
20:31 < discord-raku-bot> <Nemokosch#9980> okay so it was indeed the whole matching string actually 🤔
20:32 < discord-raku-bot> <avuserow#1203> ah, yeah, in my example I was only matching a single character at a time
20:32 < discord-raku-bot> <Nemokosch#9980> that coincided with the capture group
20:32 < discord-raku-bot> <avuserow#1203> m: "foobar" ~~ m:g/(o)/; dd $/; # I should've written something more like this
20:33 < discord-raku-bot> <avuserow#1203> m: "foobar" ~~ m:g/(o); say $0; say $1;
20:33 < discord-raku-bot> <avuserow#1203> m: "foobar" ~~ m:g/(o)/; say $0; say $1;
20:33 < discord-raku-bot> <avuserow#1203> like that. ☝️
20:34 < discord-raku-bot> <Nemokosch#9980> I'm quite confused at this point, it's time to try it out xD
20:35 < discord-raku-bot> <avuserow#1203> so $0 $1 etc are Match objects. this makes it easy to get other details beyond just the text, like the character positions and the original string. definitely give it a try
20:36 < discord-raku-bot> <avuserow#1203> and if you just want the text, you can do `$0.Str`. I find this a bit less ergonomic than perl and I keep forgetting it, but it's way more powerful. and I wouldn't be surprised if there's some better way to get the match text
20:39 < discord-raku-bot> <Nemokosch#9980> Gotcha
20:40 < discord-raku-bot> <Nemokosch#9980> It makes sense but it's definitely different from what I used to in sed and also in Python
20:40 < discord-raku-bot> <Nemokosch#9980> It makes sense but it's definitely different from what I'm used to in sed and also in Python
20:47 < discord-raku-bot> <lakmatiol#8020> this is pretty close to python, just think of it like using findall by default and getting the list as a result in $/
21:21 < discord-raku-bot> <Nemokosch#9980> when exactly can parentheses be left off? I just realized that $fh.seek(0) worked for me while $fh.seek 0 didn't
21:24 < discord-raku-bot> <avuserow#1203> assuming you don't need them for precedence purposes, you can leave them off for function calls, and method calls with no arguments. method calls with arguments need them.
21:25 < discord-raku-bot> <avuserow#1203> method calls without parens can also be written as: `$fh.seek: 0`
21:25 < discord-raku-bot> <Nemokosch#9980> wow 👀
21:26 < discord-raku-bot> <Nemokosch#9980> also while we are at it - can I call seek like a bare function or am I going too far? seek($fh, 0) or something similar
21:27 < discord-raku-bot> <avuserow#1203> only if `seek` is defined as a function in addition to a method. looking at https://docs.raku.org/routine/seek, I only see it available as `method`, so not that one
21:28 < discord-raku-bot> <avuserow#1203> functions like `join`, `split`, `push`, `pop`, are available as both though, so you can write: `(1..10).join(", ")` or `join(", ", 1..10)`
21:29 < discord-raku-bot> <avuserow#1203> if you look at https://docs.raku.org/routine/join, you can see `sub join($separator, *@list)` . maybe best just to `ctrl+f sub` on those pages.
21:30 < discord-raku-bot> <Nemokosch#9980> that's where the question emerged from 😄
21:31 < discord-raku-bot> <avuserow#1203> yeah, no magic here, just code defined as both methods and subroutines. 🙂
21:46 < discord-raku-bot> <Nemokosch#9980> Sorry for the question overload, I'm trying to do a little text processing
21:47 < discord-raku-bot> <Nemokosch#9980> I have the following scenario: there is a C file that contains a certain preprocessor instruction (#if CPX for the matter) and the inside is always Pascal code
21:47 < discord-raku-bot> <Nemokosch#9980> I have certain substitutions for turning the Pascal code into C code
21:48 < discord-raku-bot> <Nemokosch#9980> and I can match the inside of this preprocessor instruction
21:48 < discord-raku-bot> <Nemokosch#9980> how can I substitute the matching part for the result of my own substitution set if I don't want to do that all inline?
21:51 < discord-raku-bot> <Nemokosch#9980> I suppose I should iterate over the matchings and then make some kind of call on them
21:53 < discord-raku-bot> <avuserow#1203> if you have one match object at a time, then you can use Match.replace-with: https://docs.raku.org/type/Match#method_replace-with
21:54 < discord-raku-bot> <avuserow#1203> I suspect if you tried to use it on several match objects, it would get confused on the lengths. you could manage those offsets yourself, or maybe you can do a while loop with your regex
21:55 < discord-raku-bot> <avuserow#1203> another idea is to use `split` on the document, and keep the delimiters. then you can operate on each chunk and join it back together
21:57 < discord-raku-bot> <avuserow#1203> m: my $s = "a-b-c-d"; my @parts = $s.split("-", :v); for @parts {$_ = "_" if $_ eq "-"}; $s = join "", @parts; say $s; # long-winded way to replace dashes with underscores
21:57 < discord-raku-bot> <Nemokosch#9980> Oh, I think I found something...
21:57 < discord-raku-bot> <Nemokosch#9980> s// can apparently handle function calls 👀
21:57 < discord-raku-bot> <avuserow#1203> oof, discord ate some of my underscores. `my $s = "a-b-c-d"; my @parts = $s.split("-", :v); for @parts {$_ = "_" if $_ eq "-"}; $s = join "", @parts; say $s;`
21:58 < discord-raku-bot> <avuserow#1203> oh yeah that's always an option too 🙂
21:58 < discord-raku-bot> <Nemokosch#9980> That's a pretty badass option actually 😄
21:59 < discord-raku-bot> <Nemokosch#9980> I like how one can get used to these pleasant surprises with Raku
22:13 < discord-raku-bot> <Nemokosch#9980> and I should use $/.Str as an argument probably
22:13 < discord-raku-bot> <Nemokosch#9980> or well, $/ but eventually I will only act on the matching string I think
22:54 < discord-raku-bot> <Nemokosch#9980> How do I pass a parameter as rw?
22:56 < discord-raku-bot> <Nemokosch#9980> hm, or maybe my function declaration should mark this and then it would work?
22:57 < discord-raku-bot> <Nemokosch#9980> seems like that's the right approach
--- Day changed Tue Sep 14 2021
00:20 < discord-raku-bot> <Nemokosch#9980> hm, wait
00:20 < discord-raku-bot> <Nemokosch#9980> subst doesn't set $/
00:45 < discord-raku-bot> <Nemokosch#9980> ooh okay... now this wasn't very intuitive...
00:46 < discord-raku-bot> <Nemokosch#9980> the replacement can be a string that can interpolate all random values stuck in $0 or $/
00:46 < discord-raku-bot> <Nemokosch#9980> that's not the same as using a string _inside a callable_ where those variables DO get updated
00:47 < discord-raku-bot> <Nemokosch#9980> not very obvious when all the difference between an interpolated string and a callable is a pair of brackets
01:36 < discord-raku-bot> <Nemokosch#9980> Anyways, I was quite satisfied with the outcome 😄
01:37 < discord-raku-bot> <Nemokosch#9980> I have learned a lot and if I were to do this by hand, it would have taken not less time. The file was several thousands of lines and the relevant parts were all over the place
10:10 -!- dakkar [~dakkar@home.thenautilus.net] has joined #raku-beginner
11:33 -!- lizmat_ [~textual@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
11:37 -!- lizmat [~textual@ipv4-wenzperl.connected.by.freedominter.net] has quit [Ping timeout: 245 seconds]
11:37 -!- lizmat_ is now known as lizmat
11:37 -!- lizmat [~textual@ipv4-wenzperl.connected.by.freedominter.net] has quit [Client Quit]
11:37 -!- lizmat [~textual@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
13:05 -!- lizmat [~textual@ipv4-wenzperl.connected.by.freedominter.net] has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
13:08 -!- TempIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has quit [Ping timeout: 260 seconds]
13:09 -!- lizmat [~textual@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
13:10 -!- TempIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
18:48 -!- dakkar [~dakkar@home.thenautilus.net] has quit [Ping timeout: 268 seconds]
19:06 < discord-raku-bot> <lakmatiol#8020> is there a way go from <a b c d> to `(<0 a>, <1 b>, <2 c>, <3 d>)`
19:06 < discord-raku-bot> <lakmatiol#8020> .kv seems correct, but it doesn't group them and grouping them manually seems counterproductive
19:08 < lizmat> ^Inf Z <a b c d>
19:09 < discord-raku-bot> <lakmatiol#8020> oh, that's clever
19:09 < discord-raku-bot> <lakmatiol#8020> thanks
19:09 < lizmat> yw
--- Day changed Wed Sep 15 2021
00:54 -!- RakuIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has quit [Ping timeout: 252 seconds]
00:55 -!- TempIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has quit [Ping timeout: 268 seconds]
00:56 -!- lizmat [~textual@ipv4-wenzperl.connected.by.freedominter.net] has quit [Ping timeout: 260 seconds]
01:00 -!- lizmat [~textual@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
01:00 -!- TempIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
01:01 -!- RakuIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
10:00 -!- dakkar [~dakkar@home.thenautilus.net] has joined #raku-beginner
15:34 < discord-raku-bot> <Anton Antonov#7232> What does this declaration within a class mean: `has $.var0 of Str;` ? Is it the same as `has Str $.var0;` ?
15:37 < lizmat> yeah, at least the BUILDPLAN for that class looks identical :-)
15:37 < discord-raku-bot> <Anton Antonov#7232> @lizmat Thank you!
15:48 < discord-raku-bot> <Anton Antonov#7232> What is the most concise way to "transpose" a hash of hashes? I.e. from (h1) `{female => {died => 127, survived => 339}, male => {died => 682, survived => 161}}` to obtain (h2) `{died => {female => 127, male => 682}, survived => {female => 339, male => 161}}`? I can, of course, use for-loop / map, etc., but I strongly suspect there are better solutions...
15:52 < lizmat> my %h2 = %h1.map: { .key => .value<died> }
15:53 < lizmat> ah, no
15:56 * lizmat draws a blank on not using a .map :-)
16:39 < discord-raku-bot> <gfldex#8222> m:```
16:39 < discord-raku-bot> <gfldex#8222> my %h1 = female => {died => 127, survived => 339}, male => {died => 682, survived => 161};
16:39 < discord-raku-bot> <gfldex#8222> say %h1{*;'died'}:kv;
16:39 < discord-raku-bot> <gfldex#8222> ```
16:40 < discord-raku-bot> <gfldex#8222> That one needs v6.* to work. Also, this is just the first step.
16:41 < gfldex> lizmat: this is a usecase for https://gist.github.com/gfldex/381b402a5356bd97fb2ff7194a25dd96
16:41 < gfldex> the {**}:deepkv case
16:43 < discord-raku-bot> <gfldex#8222> m:```
16:43 < discord-raku-bot> <gfldex#8222> use v6.*;
16:43 < discord-raku-bot> <gfldex#8222> my %h1 = female => {died => 127, survived => 339}, male => {died => 682, survived => 161};
16:43 < discord-raku-bot> <gfldex#8222> say %h1{*;'died'}:kv;
16:43 < discord-raku-bot> <gfldex#8222> ```
16:47 < discord-raku-bot> <gfldex#8222> actually, we got fixed dimensions, so we should not need the hyperwhatever
16:49 < discord-raku-bot> <Nahita#3882> what is the meaning of a variable without a twigil declared with `has`? e.g. `class A { has $val }`.
16:50 < discord-raku-bot> <Nahita#3882> I saw it in this answer: https://stackoverflow.com/questions/62968829/returning-a-raw-scalar-container-from-at-pos-method-rather-than-a-proxy-insta/62969222#62969222
16:51 < discord-raku-bot> <Nahita#3882> I saw it in this answer: https://stackoverflow.com/a/62969222
16:52 < discord-raku-bot> <Anton Antonov#7232> <@!195453211409121280> With raku(do) version 2021.06 I get `%res{*;'died'} --> (682 127)`, i.e. I cannot use `kv`.
16:56 < discord-raku-bot> <gfldex#8222> <@!694526400488669234> you need to add `use v6.*` to get the .e_PREVIEW, but the june release might also be to old
16:57 < discord-raku-bot> <gfldex#8222> m:```
16:57 < discord-raku-bot> <gfldex#8222> my %h1 = female => {died => 127, survived => 339}, male => {died => 682, survived => 161};
16:57 < discord-raku-bot> <gfldex#8222> say (%h1{*;*}:kv).flat.rotor(3)».[1,0,2]».map({ $^a => $^b => $^c});
16:57 < discord-raku-bot> <gfldex#8222> ```
16:57 < discord-raku-bot> <gfldex#8222> m:```
16:57 < discord-raku-bot> <gfldex#8222> use v6.*;
16:57 < discord-raku-bot> <gfldex#8222> my %h1 = female => {died => 127, survived => 339}, male => {died => 682, survived => 161};
16:57 < discord-raku-bot> <gfldex#8222> say (%h1{*;*}:kv).flat.rotor(3)».[1,0,2]».map({ $^a => $^b => $^c});
16:57 < discord-raku-bot> <gfldex#8222> ```
16:57 < discord-raku-bot> <Anton Antonov#7232> <@!195453211409121280> Ok, thanks -- I was looking into what "rakudo star" means...
16:58 < discord-raku-bot> <gfldex#8222> that's how far I got. I don't think we got an easy way to assign that directly to a Hash. At least it gives me an idea what `%h{**} = (survived => male => 161) (died => male => 682) (died => female => 127) (survived => female => 339)` would mean.
17:08 < discord-raku-bot> <gfldex#8222> m:```
17:08 < discord-raku-bot> <gfldex#8222> use v6.*;
17:08 < discord-raku-bot> <gfldex#8222> my %h1 = female => {died => 127, survived => 339}, male => {died => 682, survived => 161};
17:08 < discord-raku-bot> <gfldex#8222> my %h2;
17:08 < discord-raku-bot> <gfldex#8222> for (%h1{*;*}:kv).flat.rotor(3)».[1,0,2] -> [ $k1, $k2, $v ] {
17:08 < discord-raku-bot> <gfldex#8222> %h2{||[$k1, $k2]} = $v;
17:08 < discord-raku-bot> <gfldex#8222> }
17:08 < discord-raku-bot> <gfldex#8222> say %h2;
17:08 < discord-raku-bot> <gfldex#8222> ```
17:08 < discord-raku-bot> <gfldex#8222> there you go :)
17:09 < discord-raku-bot> <gfldex#8222> I didn't know that `||<key1 key2>` worked.
17:10 < discord-raku-bot> <gfldex#8222> <@!694526400488669234> The following blogpost might help to understand what is going on. This is a case where we need to change to order of keys in a deepkey. https://gfldex.wordpress.com/2021/07/11/contextual-addition/
17:22 -!- discord-raku-bot [~RakuIRC@ip5f5ab722.dynamic.kabel-deutschland.de] has quit [Remote host closed the connection]
17:22 -!- discord-raku-bot [~RakuIRC@ip5f5ab722.dynamic.kabel-deutschland.de] has joined #raku-beginner
17:23 -!- discord-raku-bot [~RakuIRC@ip5f5ab722.dynamic.kabel-deutschland.de] has quit [Remote host closed the connection]
17:23 -!- discord-raku-bot [~RakuIRC@ip5f5ab722.dynamic.kabel-deutschland.de] has joined #raku-beginner
18:48 -!- dakkar [~dakkar@home.thenautilus.net] has quit [Ping timeout: 252 seconds]
19:01 < discord-raku-bot> <Nahita#3882> here is another for-loop based solution:
19:01 < discord-raku-bot> <Nahita#3882> m:```
19:01 < discord-raku-bot> <Nahita#3882> my %h1 := {female => {died => 127, survived => 339}, male => {died => 682, survived => 161}};
19:01 < discord-raku-bot> <Nahita#3882> my %h-new;
19:01 < discord-raku-bot> <Nahita#3882> for %h1.values.first.keys X %h1.keys -> ($new-key, $current-key) {
19:01 < discord-raku-bot> <Nahita#3882> %h-new{$new-key}{$current-key} = %h1{$current-key}{$new-key};
19:01 < discord-raku-bot> <Nahita#3882> }
19:01 < discord-raku-bot> <Nahita#3882> say %h-new;
19:01 < discord-raku-bot> <Nahita#3882> ```
19:03 < discord-raku-bot> <Nahita#3882> `%h1.values.first.keys` gets the keys of each inner hash (`died, survived`) and then it is cross producted with the current keys (`female, male`) to help form the transposed hash.
--- Day changed Thu Sep 16 2021
00:52 -!- Polyinsecure [~Polyinsec@180.244.135.66] has joined #raku-beginner
01:15 -!- Polyinsecure [~Polyinsec@180.244.135.66] has quit [Quit: Leaving]
10:14 -!- dakkar [~dakkar@home.thenautilus.net] has joined #raku-beginner
12:11 -!- lizmat_ [~textual@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
12:12 -!- TempIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has quit [Ping timeout: 268 seconds]
12:13 -!- RakuIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has quit [Ping timeout: 265 seconds]
12:13 -!- lizmat [~textual@ipv4-wenzperl.connected.by.freedominter.net] has quit [Ping timeout: 268 seconds]
13:41 -!- lizmat_ [~textual@ipv4-wenzperl.connected.by.freedominter.net] has quit [Quit: Textual IRC Client: www.textualapp.com]
13:42 -!- lizmat [~textual@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
14:08 -!- RakuIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
14:11 -!- TempIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
18:42 -!- dakkar [~dakkar@home.thenautilus.net] has quit [Ping timeout: 260 seconds]
18:59 < discord-raku-bot> <Anton Antonov#7232> Very good! Thank you!
23:39 -!- [Coke] [~coke@cpe-104-228-9-26.nycap.res.rr.com] has quit [Read error: Connection reset by peer]
--- Day changed Fri Sep 17 2021
09:05 -!- lizmat [~textual@ipv4-wenzperl.connected.by.freedominter.net] has quit [Read error: Connection reset by peer]
09:05 -!- lizmat [~textual@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
10:52 -!- RakuIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has quit [Remote host closed the connection]
10:52 -!- RakuIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
--- Day changed Sat Sep 18 2021
22:05 -!- TempIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has quit [Remote host closed the connection]
22:05 -!- TempIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
22:06 -!- TempIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has quit [Remote host closed the connection]
22:07 -!- TempIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
23:44 < discord-raku-bot> <Hydrazer#4827> how do you convert a number from base b to base 10 with a variable? i tried doing ```pl
23:44 < discord-raku-bot> <Hydrazer#4827> my $base = 6;
23:44 < discord-raku-bot> <Hydrazer#4827> my $num = "12345";
23:44 < discord-raku-bot> <Hydrazer#4827> say :6($num);
23:44 < discord-raku-bot> <Hydrazer#4827> say :$base($num);
23:44 < discord-raku-bot> <Hydrazer#4827> ``` and im getting ```
23:44 < discord-raku-bot> <Hydrazer#4827> 1865
23:44 < discord-raku-bot> <Hydrazer#4827> No such method 'CALL-ME' for invocant of type 'Pair'
23:44 < discord-raku-bot> <Hydrazer#4827> in block <unit> at file0.code line 4
23:44 < discord-raku-bot> <Hydrazer#4827> ```
23:45 < discord-raku-bot> <Hydrazer#4827> how do you convert a number from base b to base 10 with a variable? i tried doing ```pl
23:45 < discord-raku-bot> <Hydrazer#4827> my $base = 6;
23:45 < discord-raku-bot> <Hydrazer#4827> my $num = "12345";
23:45 < discord-raku-bot> <Hydrazer#4827> say :6($num);
23:45 < discord-raku-bot> <Hydrazer#4827> say :$base($num);
23:45 < discord-raku-bot> <Hydrazer#4827> ``` and im getting ```
23:45 < discord-raku-bot> <Hydrazer#4827> 1865
23:45 < discord-raku-bot> <Hydrazer#4827> No such method 'CALL-ME' for invocant of type 'Pair'
23:45 < discord-raku-bot> <Hydrazer#4827> in block <unit> at file0.code line 4
23:45 < discord-raku-bot> <Hydrazer#4827> ``` would like both outputs to be the same
23:46 < discord-raku-bot> <Hydrazer#4827> how do you convert a number from base b to base 10 with a variable? i tried doing ```pl
23:46 < discord-raku-bot> <Hydrazer#4827> my $base = 6;
23:46 < discord-raku-bot> <Hydrazer#4827> my $num = "12345";
23:46 < discord-raku-bot> <Hydrazer#4827> say :6($num);
23:46 < discord-raku-bot> <Hydrazer#4827> say :$base($num);
23:46 < discord-raku-bot> <Hydrazer#4827> ``` and im getting ```
23:46 < discord-raku-bot> <Hydrazer#4827> 1865
23:46 < discord-raku-bot> <Hydrazer#4827> No such method 'CALL-ME' for invocant of type 'Pair'
23:46 < discord-raku-bot> <Hydrazer#4827> in block <unit> at file0.code line 5
23:46 < discord-raku-bot> <Hydrazer#4827> ``` would like both outputs to be the same
--- Day changed Sun Sep 19 2021
00:12 < discord-raku-bot> <Nemokosch#9980> not sure if this syntax will work, there is the parse-base function though
00:13 < discord-raku-bot> <Nemokosch#9980> https://docs.raku.org/routine/parse-base
00:14 < discord-raku-bot> <Hydrazer#4827> oh nice
00:35 -!- colemanx [~coleman@2605:a601:5529:1e00:54f0:de2:7ad9:462c] has joined #raku-beginner
01:19 < colemanx> Hello, everyone! I'm reading Raku Fundamentals 2nd ed. The async chapter has this example code https://envs.sh/pg
01:19 < colemanx> The for loop, it's not synchronously executed, it seems.
01:20 < colemanx> How does that work? Are "for" sometimes sync and sometimes async?
01:20 < colemanx> If you have this book, the code is page 70
07:57 -!- zacts [~zak@user/zacts] has joined #raku-beginner
16:21 < discord-raku-bot> <Rogue#2017> It's not that the for loop is async, it's just that the loop is setting up some async stuff
16:21 < discord-raku-bot> <Rogue#2017> `.tap` returns immediately but sets up some code to run whenever something comes down the Supply
18:32 < colemanx> Is there a sigil and twigil suitable for printing? I'd like to print it out and stick it on my wall :)
18:32 < colemanx> a sigil and twigil cheatsheet, i mean
18:34 < lizmat> https://raw.githubusercontent.com/perl6/mu/master/docs/Perl6/Cheatsheet/cheatsheet.txt perhaps ?
18:34 < colemanx> This looks perfect, thanks
18:35 < colemanx> Comes out to exactly one page it seems! :)
18:35 < lizmat> yeah, it has been tweaked for that
18:36 < lizmat> mind you, it has some parts that are NYI, such as some of the SCOPE DECLARATORS
18:37 < colemanx> NYI?
18:37 < lizmat> Not Yet Implemented
18:37 < lizmat> and it misses things like the set operators, react / whenever. supply
18:37 < lizmat> but it's a good start :-)
18:37 < colemanx> Well, it's a start
18:38 < colemanx> thanks a bundle
18:38 < lizmat> yw
19:29 < colemanx> An edit: IRC link in the cheetsheet needs to be updated to Libera
19:30 < lizmat> colemanx: good catch
19:35 < lizmat> fixed with https://github.com/Raku/mu/commit/f95bcf3377
23:56 < zacts> I <3 cheatsheets
23:56 < zacts> I have one for awk as well
23:56 < zacts> I think they're increadibly useful
--- Day changed Mon Sep 20 2021
05:15 -!- randomHuman [~randomHum@047-034-211-132.res.spectrum.com] has joined #raku-beginner
05:15 < randomHuman> hi
05:16 < randomHuman> bye people
05:16 -!- randomHuman [~randomHum@047-034-211-132.res.spectrum.com] has quit [Client Quit]
10:11 -!- dakkar [~dakkar@home.thenautilus.net] has joined #raku-beginner
18:40 -!- dakkar [~dakkar@home.thenautilus.net] has quit [Ping timeout: 246 seconds]
21:47 -!- gabriel80546 [~gabriel80@179.215.180.176] has joined #raku-beginner
22:14 -!- gabriel80546 [~gabriel80@179.215.180.176] has quit [Quit: Connection closed]
--- Day changed Tue Sep 21 2021
10:11 -!- dakkar [~dakkar@home.thenautilus.net] has joined #raku-beginner
10:15 -!- lizmat_ [~textual@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
10:16 -!- TempIRCLogger__ [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
10:17 -!- RakuIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has quit [Ping timeout: 268 seconds]
10:17 -!- lizmat [~textual@ipv4-wenzperl.connected.by.freedominter.net] has quit [Ping timeout: 240 seconds]
10:17 -!- TempIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has quit [Ping timeout: 265 seconds]
10:17 -!- RakuIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
10:17 -!- lizmat_ [~textual@ipv4-wenzperl.connected.by.freedominter.net] has quit [Client Quit]
10:17 -!- lizmat [~textual@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
17:19 < discord-raku-bot> <Nemokosch#9980> hello, I have the following task
17:20 < discord-raku-bot> <Nemokosch#9980> I have two ordered files with lines of data, I need to compare them
17:26 < discord-raku-bot> <Nemokosch#9980> What I did the last time with Python was taking an iterator for both sides of the comparison and call next depending on the current positions, so much like a merge
17:52 < lizmat> what should be the outcome of the comparison? a Bool ?
17:54 < discord-raku-bot> <Nemokosch#9980> it should show the differences at least
17:56 < discord-raku-bot> <Nemokosch#9980> at the end of the day, the lines will have a key-value structure and there will be 4 different outcomes for each row: a) only left b) only right c) complete match d) different value to the key
17:57 < discord-raku-bot> <Nemokosch#9980> we don't care about c) but the rest is needed
18:28 < lizmat> is the order important ?
18:30 < discord-raku-bot> <Nemokosch#9980> not really; the only important thing is that we shouldn't detect matchable rows as extra rows
18:37 -!- dakkar [~dakkar@home.thenautilus.net] has quit [Ping timeout: 265 seconds]
18:37 < lizmat> what about duplicates ?
18:41 < discord-raku-bot> <Nemokosch#9980> There will be no duplicates
18:45 < lizmat> make a hash of the lines in the first file, check the lines of the second file with that hash
18:47 < discord-raku-bot> <Nemokosch#9980> Isn't that a bit costly when I have a 5 digit number of "records"?
22:07 < discord-raku-bot> <avuserow#1203> lines() is lazy, maybe that would get you what you need to mimic the python solution?
22:39 < discord-raku-bot> <Nemokosch#9980> that's what I'm going to try
22:39 < discord-raku-bot> <Nemokosch#9980> I was curious whether I miss something obvious
--- Day changed Wed Sep 22 2021
10:12 -!- dakkar [~dakkar@home.thenautilus.net] has joined #raku-beginner
10:35 < discord-raku-bot> <Anton Antonov#7232> How can I use `reduce` , or similar operation, with initial value? Something like `reduce( $op, $init, $list)`.
10:36 -!- lizmat_ [~textual@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
10:36 -!- TempIRCLogger__ [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has quit [Remote host closed the connection]
10:37 -!- lizmat [~textual@ipv4-wenzperl.connected.by.freedominter.net] has quit [Read error: Connection reset by peer]
10:37 -!- TempIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
10:37 -!- lizmat_ [~textual@ipv4-wenzperl.connected.by.freedominter.net] has quit [Client Quit]
10:37 -!- lizmat [~textual@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
10:39 -!- RakuIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has quit [Remote host closed the connection]
10:39 -!- RakuIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
11:15 < discord-raku-bot> <Morfent#9811> m:```
11:15 < discord-raku-bot> <Morfent#9811> use v6;
11:15 < discord-raku-bot> <Morfent#9811> sub foldl1(&f, @xs) { @xs.reduce: &f }
11:15 < discord-raku-bot> <Morfent#9811> sub foldl(&f, $init, @xs) { foldl1 &f, ($init, |@xs) }
11:15 < discord-raku-bot> <Morfent#9811> say foldl &infix:</>, 64, (8, 8);
11:15 < discord-raku-bot> <Morfent#9811> ```
11:16 < discord-raku-bot> <Morfent#9811> <@!694526400488669234>
11:17 < discord-raku-bot> <Morfent#9811> the `&reduce` with its `+list` parameter might be more readable in some cases
11:18 < discord-raku-bot> <Anton Antonov#7232> <@!210313526928080896> Ok, using my own fold/reduce definition is good. Thanks!
11:20 < discord-raku-bot> <Anton Antonov#7232> <@!210313526928080896> Of course, it should have occurred to me to use slip, `($init, |@list)`...
11:33 < discord-raku-bot> <Anton Antonov#7232> This statement made read the documentation more carefully around `+list`. So, this works : `‌‌reduce( &infix:<+>, 1..5, 1000)` .
11:33 < discord-raku-bot> <Anton Antonov#7232> This statement made read the documentation more carefully around `+list`. So, this works : `‌‌reduce( &infix:<+>, 1..5, 1000)` , i.e. it is what I asked for.
12:30 -!- discord-raku-bot [~RakuIRC@ip5f5ab722.dynamic.kabel-deutschland.de] has quit [Remote host closed the connection]
12:30 -!- discord-raku-bot [~RakuIRC@ip5f5ab722.dynamic.kabel-deutschland.de] has joined #raku-beginner
14:11 < discord-raku-bot> <Nemokosch#9980> btw I definitely like this simple sentinel-approach for iterators more than throwing an exception as it is in Python
14:11 < discord-raku-bot> <Nemokosch#9980> when iterating two things together, this is much more comfortable
14:49 -!- codesections [~codesecti@codesections.com] has joined #raku-beginner
16:19 < discord-raku-bot> <Nemokosch#9980> By the way
16:20 < discord-raku-bot> <Nemokosch#9980> how do I check whether any of the given iterators reached the end?
18:05 -!- discord-raku-bot [~RakuIRC@ip5f5ab722.dynamic.kabel-deutschland.de] has quit [Remote host closed the connection]
18:06 -!- discord-raku-bot [~RakuIRC@ip5f5ab722.dynamic.kabel-deutschland.de] has joined #raku-beginner
18:41 -!- dakkar [~dakkar@home.thenautilus.net] has quit [Ping timeout: 252 seconds]
23:26 < discord-raku-bot> <gfldex#8222> <@!297037173541175296> WIth `IterationEnd`, which you should never acutally encounter. Iterators are quite internal and not part of the language spec.
23:29 -!- discord-raku-bot [~RakuIRC@ip5f5ab722.dynamic.kabel-deutschland.de] has quit [Remote host closed the connection]
23:29 -!- discord-raku-bot [~RakuIRC@ip5f5ab722.dynamic.kabel-deutschland.de] has joined #raku-beginner
23:33 < discord-raku-bot> <Nemokosch#9980> It's important enough to be able to use iterators actually
23:33 < discord-raku-bot> <Nemokosch#9980> and something that has an implementable interface shouldn't be that internal
--- Day changed Thu Sep 23 2021
00:03 < codesections> Nemokosch#9980, I agree that Iterators aren't **that** internal (and they _are_ well documented/have a stable API, unlike something that genuinely `.is-implementation-detail`). But still gfldex is right that it's pretty rare to need to do much with Iterat**ors**; even when you're implementing your own classes, you can typically implement
00:03 < codesections> Iterat**able**, and let the Iterator methods use the default implementations.
00:05 < codesections> m: class C does Iterable { has @.inner handles <iterator> }; my $a = C.new: :inner[1,2,3]; say $a.map(* × 2)
00:06 < codesections> er, do we not have an eval-bot in #raku-beginner ?
00:07 < gfldex> codesections: the eval bot still only serves from the Discord side of the bridge.
00:08 < codesections> Aha, fair enough
00:20 < discord-raku-bot> <Nemokosch#9980> I didn't need to _implement_ iterators but I needed to call the given interface myself
00:21 < discord-raku-bot> <Nemokosch#9980> This definitely isn't a taboo in most languages I know. It's not often needed but definitely a legitimate usage.
00:23 < discord-raku-bot> <Nemokosch#9980> if you have a more comfortable way to lazily diff two (essentially) csv files that are ordered in advance, please go ahead, this is the solution I could came up with for Python back in the day and so far I have nothing better
02:54 < codesections> There are a lot of ways to do something like that, depending on the exact usecase. From what you've said so far, I'd probably be inclined to zip the two lazy lists together and then diff each line one at a time. See https://docs.raku.org/language/operators#index-entry-Zip_operator But I'd be happy to give thought to a more specific solution if
02:54 < codesections> you'd care to share more details (either here or on StackOverflow – everyone who answers/moderates the [raku] tag is very welcoming)
03:56 < discord-raku-bot> <avuserow#1203> I thought about suggesting zip with lines, but then you don't have a way to re-synchronize in the case where a line is added.
03:57 < discord-raku-bot> <avuserow#1203> <@297037173541175296> did you post the python version somewhere? Curious if I'm understanding the problem correctly
05:22 -!- zacts [~zak@user/zacts] has quit [Quit: leaving]
07:35 -!- codesections [~codesecti@codesections.com] has quit [Quit: Ping timeout (120 seconds)]
07:36 -!- codesections [~codesecti@codesections.com] has joined #raku-beginner
09:05 < discord-raku-bot> <Nemokosch#9980> I think we have the same thought in mind
09:24 < discord-raku-bot> <Nemokosch#9980> The exact thing I had to do with Python was a bit more convoluted so I'm gonna turn it a bit more theoretical so please treat it as a pseudocode. The lines have a key-value structure conceptually, that's the basis of saying whether one line is extra or they are differing.
09:24 < discord-raku-bot> <Nemokosch#9980> ```py
09:24 < discord-raku-bot> <Nemokosch#9980> def diff_lines(left_iter, right_iter):
09:24 < discord-raku-bot> <Nemokosch#9980> try:
09:24 < discord-raku-bot> <Nemokosch#9980> left_line = next(left_iter)
09:24 < discord-raku-bot> <Nemokosch#9980> right_line = next(right_iter)
09:24 < discord-raku-bot> <Nemokosch#9980> while True:
09:24 < discord-raku-bot> <Nemokosch#9980> cmp_result = compare_keys(left_line, right_line)
09:24 < discord-raku-bot> <Nemokosch#9980> if cmp_result < 0:
09:24 < discord-raku-bot> <Nemokosch#9980> print('Announce extra line on the left side')
09:24 < discord-raku-bot> <Nemokosch#9980> left_line = next(left_iter)
09:24 < discord-raku-bot> <Nemokosch#9980> elif cmp_result > 0:
09:24 < discord-raku-bot> <Nemokosch#9980> print('Announce extra line on the right side')
09:24 < discord-raku-bot> <Nemokosch#9980> right_line = next(right_iter)
09:26 < discord-raku-bot> <Nemokosch#9980> I think this is enough to grasp the supposed behavior. This solution isn't precise because the left_line can take a step when the right_iter is exhausted so it's possible that we lose one line but that doesn't add to the point
09:34 < discord-raku-bot> <gfldex#8222> `.lines` on a filehandle is a `Seq` so there is your bottled up iterator. `Z` will also return a `Seq`
09:35 < discord-raku-bot> <gfldex#8222> m:```
09:35 < discord-raku-bot> <gfldex#8222> for $*PROGRAM.open.lines Z $*PROGRAM.open.lines -> [$left, $right] {
09:35 < discord-raku-bot> <gfldex#8222> say $left, $right;
09:35 < discord-raku-bot> <gfldex#8222> }
09:35 < discord-raku-bot> <gfldex#8222> ```
09:36 < discord-raku-bot> <gfldex#8222> :-/
09:36 < discord-raku-bot> <Nemokosch#9980> I know that but how do you tell Z that certain subsequent lines shouldn't be matched against each other but should be considered as extra?
09:38 < discord-raku-bot> <gfldex#8222> m: Seq.^methods.grep(*.name eq 'pop').say;
09:38 < discord-raku-bot> <Nemokosch#9980> this is on point
09:39 < discord-raku-bot> <gfldex#8222> `Seq` got `.skip`
09:40 < discord-raku-bot> <Nemokosch#9980> without zipping them then, right?
09:44 < discord-raku-bot> <gfldex#8222> Alas, `.skip` is not a mutator. So there is some wrapping required.
09:46 < discord-raku-bot> <Nemokosch#9980> Well this is a bit too cryptic for me 😅
09:53 < discord-raku-bot> <Nemokosch#9980> Actually I think I succeeded with iterators but it was rather painful for exactly one reason: IterationEnd is Mu
09:53 < discord-raku-bot> <Nemokosch#9980> if it was any normal value (literally haha), it would have been no big deal
10:02 < discord-raku-bot> <gfldex#8222> ```
10:02 < discord-raku-bot> <gfldex#8222> my @left = $*PROGRAM.open.lines;
10:02 < discord-raku-bot> <gfldex#8222> while @left {
10:02 < discord-raku-bot> <gfldex#8222> @left.shift if (True, False).roll;
10:02 < discord-raku-bot> <gfldex#8222> try put @left.shift;
10:02 < discord-raku-bot> <gfldex#8222> }
10:02 < discord-raku-bot> <gfldex#8222> ```
10:03 < discord-raku-bot> <gfldex#8222> <@!297037173541175296> You assign the `Seq` to an `Array` and then use the mutators on the `Array` to manipulate the iterator of the `Seq` indirectly.
10:04 < discord-raku-bot> <Nemokosch#9980> is this lazy?
10:07 < discord-raku-bot> <gfldex#8222> To answer that question would require to understand https://github.com/rakudo/rakudo/blob/master/src/core.c/Array.pm6#L184
10:07 -!- dakkar [~dakkar@home.thenautilus.net] has joined #raku-beginner
10:09 < discord-raku-bot> <gfldex#8222> It does use `IterationBuffer` so it looks to me as if it would be lazy in chunks. lizmat can likely shed more light on this then me.
10:10 < discord-raku-bot> <Nemokosch#9980> because yes, given the files with like 20k lines, slurping them and doing something afterwards, it would still be okay and dead simple
10:10 < lizmat> that is lazy
10:11 < discord-raku-bot> <Nemokosch#9980> but it's more than just a hypothetical that the files can get big and we have more time than memory in this case
10:11 < lizmat> also, since $*PROGRAM is an IO::Path, you don't need the .open
10:12 < discord-raku-bot> <Nemokosch#9980> interesting that something with an Array interface can be lazy 😮
10:13 < discord-raku-bot> <gfldex#8222> Sadly, I don't have a text file bigger then 64GB to test if it does fill all the RAMz. :)
10:13 < discord-raku-bot> <Nemokosch#9980> 64 GB, heh
10:14 < discord-raku-bot> <Nemokosch#9980> I managed to get the Python script that acted upon ~ 100 MB files dead on a 4 GB VM
10:15 < discord-raku-bot> <Nemokosch#9980> probably trying to sort the records real-time wasn't a marvelous idea 🙂
10:15 < discord-raku-bot> <Morfent#9811> m:```
10:15 < discord-raku-bot> <Morfent#9811> use v6;
10:15 < discord-raku-bot> <Morfent#9811> .say for Array(gather for 1..3 { .say; .take })
10:15 < discord-raku-bot> <Morfent#9811> ```
10:15 < discord-raku-bot> <Morfent#9811> er
10:15 < discord-raku-bot> <Morfent#9811> that's not how i test what i wanna test
10:16 < discord-raku-bot> <Morfent#9811> m:```
10:16 < discord-raku-bot> <Morfent#9811> use v6;
10:16 < discord-raku-bot> <Morfent#9811> .say for gather for 1..3 { .say; .take }
10:16 < discord-raku-bot> <Morfent#9811> ```
10:17 < discord-raku-bot> <Morfent#9811> m:```
10:17 < discord-raku-bot> <Morfent#9811> use v6;
10:17 < discord-raku-bot> <Morfent#9811> .say for my @ = gather for 1..3 { .say; .take }
10:17 < discord-raku-bot> <Morfent#9811> ```
10:18 < discord-raku-bot> <Morfent#9811> m:```
10:18 < discord-raku-bot> <Morfent#9811> use v6;
10:18 < discord-raku-bot> <Morfent#9811> .say for my @ = lazy gather for 1..3 { .say; .take }
10:18 < discord-raku-bot> <Morfent#9811> ```
10:18 < discord-raku-bot> <Morfent#9811> there we go
10:20 < discord-raku-bot> <gfldex#8222> We spend great afford to be able to be lazy. :)
10:21 < discord-raku-bot> <Nemokosch#9980> Not gonna lie, it's annoying that all languages I know have iterators some way and they somehow always get to mess it up with a useless interface to it lol
10:21 < discord-raku-bot> <Nemokosch#9980> I'm starting to think the Java interface actually isn't bad
10:22 < discord-raku-bot> <Nemokosch#9980> no matter how ugly this hasNext next combo sounds
10:23 < discord-raku-bot> <Nemokosch#9980> with this nice `try` statement prefix, even the Python interface could be decent in Raku
10:31 < discord-raku-bot> <gfldex#8222> The irc-bridge bot basically lives of `try`-statements. :)
10:31 -!- discord-raku-bot [~RakuIRC@ip5f5ab722.dynamic.kabel-deutschland.de] has quit [Remote host closed the connection]
10:32 -!- discord-raku-bot [~RakuIRC@ip5f5ab722.dynamic.kabel-deutschland.de] has joined #raku-beginner
13:56 -!- Guest28 [~Guest28@c-71-58-227-202.hsd1.pa.comcast.net] has joined #raku-beginner
13:58 -!- Guest28 [~Guest28@c-71-58-227-202.hsd1.pa.comcast.net] has left #raku-beginner []
15:53 < discord-raku-bot> <avuserow#1203> So from a higher order perspective, you kind of want a zip function that takes a comparator function to determine whether to consume from the left side, right side, or both. Basically you'd pass in your compare_keys function
16:19 < discord-raku-bot> <Nemokosch#9980> yes, kinda
18:36 -!- dakkar [~dakkar@home.thenautilus.net] has quit [Ping timeout: 246 seconds]
--- Day changed Fri Sep 24 2021
10:20 -!- RakuIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has quit [Remote host closed the connection]
10:40 -!- RakuIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
21:46 < discord-raku-bot> <Anton Antonov#7232> How can I optimize (get faster execution times) for the following code:
21:46 < discord-raku-bot> <Anton Antonov#7232> ```
21:46 < discord-raku-bot> <Anton Antonov#7232> my @chars =['a' ... 'z'].roll(4);
21:46 < discord-raku-bot> <Anton Antonov#7232> my %init = @chars[*- 1] => %(ROOT0 => 1e0);
21:46 < discord-raku-bot> <Anton Antonov#7232> my %res = reduce(-> %a, $x { { $x => %a.push((ROOT2 => 1e0)) } }, (%init, |@chars[^(*- 1)].reverse));
21:46 < discord-raku-bot> <Anton Antonov#7232> ```
21:46 < discord-raku-bot> <Anton Antonov#7232> it produces `%res` like this:
21:46 < discord-raku-bot> <Anton Antonov#7232> ```
21:46 < discord-raku-bot> <Anton Antonov#7232> {g => {ROOT2 => 1, q => {ROOT2 => 1, l => {ROOT2 => 1, c => {ROOT0 => 1}}}}}
21:46 < discord-raku-bot> <Anton Antonov#7232> ```
23:55 < discord-raku-bot> <gfldex#8222> '@' ~ discord-user(694526400488669234.Str) With a nested structure you might be better of with custom classes then with Hash. As I understand it, reduce will copy ever growing Hashes into even bigger Hashes.
23:58 < discord-raku-bot> <Anton Antonov#7232> '@' ~ discord-user(195453211409121280.Str) Thanks! I tried that first -- having a tree of objects. I thought moving to hashes would speed-up things. (Here is a more detailed description, in case you are curious: https://github.com/antononcube/Raku-ML-TriesWithFrequencies#implementation-notes )
--- Day changed Sat Sep 25 2021
00:02 < discord-raku-bot> <Anton Antonov#7232> '@' ~ discord-user(195453211409121280.Str) Thanks! I tried that first -- having a tree of objects. I thought moving to hashes would speed-up things. (Here is a more detailed description, in case you are curious: https://github.com/antononcube/Raku-ML-TriesWithFrequencies#implementation-notes )
00:02 < discord-raku-bot> <Anton Antonov#7232> '@' ~ discord-user(195453211409121280.Str) Your comment makes re-examine my object-based implementation...
00:43 < discord-raku-bot> <lakmatiol#8020> how would I go about checking if a string contains an uppercase letter, `[A-Z]` is not a valid raku regex, `[A..Z]` doesn't seem to do what I need it to
00:45 < discord-raku-bot> <Morfent#9811> m:```
00:45 < discord-raku-bot> <Morfent#9811> use v6;
00:45 < discord-raku-bot> <Morfent#9811> say m:g/ <upper> / given 'abCdeFgh';
00:45 < discord-raku-bot> <Morfent#9811> ```
00:45 < discord-raku-bot> <Morfent#9811> m:```
00:45 < discord-raku-bot> <Morfent#9811> use v6;
00:45 < discord-raku-bot> <Morfent#9811> say so m:g/ <upper> / given 'abCdeFgh';
00:45 < discord-raku-bot> <Morfent#9811> ```
00:47 < discord-raku-bot> <Morfent#9811> m:```
00:47 < discord-raku-bot> <Morfent#9811> use v6;
00:47 < discord-raku-bot> <Morfent#9811> say so m:1st/ <upper> / given 'abCdeFgh';
00:47 < discord-raku-bot> <Morfent#9811> ```
00:48 < discord-raku-bot> <Morfent#9811> m:```
00:48 < discord-raku-bot> <Morfent#9811> use v6;
00:48 < discord-raku-bot> <Morfent#9811> say so m:1st/ <.upper> / given 'abCdeFgh';
00:48 < discord-raku-bot> <Morfent#9811> ```
00:48 < discord-raku-bot> <Morfent#9811> '@' ~ discord-user(207089259730042881.Str) this is one way
00:52 < discord-raku-bot> <Morfent#9811> m: ```
00:52 < discord-raku-bot> <Morfent#9811> say so m:1st/ <[ A..Z ]> / given 'abCdeFgh';
00:52 < discord-raku-bot> <Morfent#9811> ```
00:53 < discord-raku-bot> <Morfent#9811> m: ```
00:53 < discord-raku-bot> <Morfent#9811> use v6;
00:53 < discord-raku-bot> <Morfent#9811> say so m:1st/ <[ A..Z ]> / given 'abCdeFgh';
00:53 < discord-raku-bot> <Morfent#9811> ```
00:53 < discord-raku-bot> <Morfent#9811> m:```
00:53 < discord-raku-bot> <Morfent#9811> use v6;
00:53 < discord-raku-bot> <Morfent#9811> say so m:1st/ <[ A..Z ]> / given 'abCdeFgh';
00:53 < discord-raku-bot> <Morfent#9811> ```
00:53 < discord-raku-bot> <Morfent#9811> this will match ascii A-Z specifically
02:21 < discord-raku-bot> <lakmatiol#8020> Thanks
10:27 -!- Compl [~Compl@103.136.251.65] has joined #raku-beginner
10:28 -!- Compl [~Compl@103.136.251.65] has quit [Client Quit]
20:54 -!- colemanx [~coleman@2605:a601:5529:1e00:54f0:de2:7ad9:462c] has quit [Remote host closed the connection]
20:55 -!- colemanx [~coleman@2605:a601:5529:1e00:cdbb:95d3:8b86:ab4d] has joined #raku-beginner
--- Day changed Sun Sep 26 2021
10:25 -!- lizmat_ [~textual@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
10:26 -!- RakuIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has quit [Ping timeout: 265 seconds]
10:26 -!- TempIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has quit [Ping timeout: 265 seconds]
10:28 -!- lizmat [~textual@ipv4-wenzperl.connected.by.freedominter.net] has quit [Ping timeout: 252 seconds]
10:40 < discord-raku-bot> <lakmatiol#8020> according to docs, push takes a `\value`
10:40 < discord-raku-bot> <lakmatiol#8020> ```perl
10:40 < discord-raku-bot> <lakmatiol#8020> my @u;
10:40 < discord-raku-bot> <lakmatiol#8020> dd @u.push(3|6) # [any(3, 6)]
10:40 < discord-raku-bot> <lakmatiol#8020> ```yet this adds the whole junction as a single value, whereas if you do
10:40 < discord-raku-bot> <lakmatiol#8020> ```perl
10:40 < discord-raku-bot> <lakmatiol#8020> my @u;
10:40 < discord-raku-bot> <lakmatiol#8020> sub p-ush(@a, \value) {@a.push(value)}
10:40 < discord-raku-bot> <lakmatiol#8020> dd p-ush(@u, 5|6) #any([5, 6], [5, 6])
10:40 < discord-raku-bot> <lakmatiol#8020> ```
10:40 < discord-raku-bot> <lakmatiol#8020> how come?
10:54 < discord-raku-bot> <Nemokosch#9980> the odd behavior is the second one I think
10:55 < discord-raku-bot> <Nemokosch#9980> confer
10:55 < discord-raku-bot> <Nemokosch#9980> ```perl
10:55 < discord-raku-bot> <Nemokosch#9980> > 5|6
10:55 < discord-raku-bot> <Nemokosch#9980> any(5, 6)
10:55 < discord-raku-bot> <Nemokosch#9980> > sub inspect(\value) {
10:55 < discord-raku-bot> <Nemokosch#9980> * dd value;
10:55 < discord-raku-bot> <Nemokosch#9980> * }
10:55 < discord-raku-bot> <Nemokosch#9980> &inspect
10:55 < discord-raku-bot> <Nemokosch#9980> > inspect(5|6)
10:55 < discord-raku-bot> <Nemokosch#9980> 5
10:55 < discord-raku-bot> <Nemokosch#9980> 6
10:55 < discord-raku-bot> <Nemokosch#9980> any(Nil, Nil)
10:57 < discord-raku-bot> <lakmatiol#8020> the second one makes sense, for every element of the junction, the p-ush gets called
10:58 < discord-raku-bot> <lakmatiol#8020> the first one doesn't thread through the junction as it should if it actually takes `Any \value`
11:00 < discord-raku-bot> <Nemokosch#9980> > for every element of the junction, the p-ush gets called
11:00 < discord-raku-bot> <Nemokosch#9980> that's pretty unintuitive in itself I think xD
11:02 < discord-raku-bot> <Nemokosch#9980> I mean okay, Junction doesn't derive from Any, right? Still, `5|6` isn't "two elements", that's conceptually wrong.
11:07 < discord-raku-bot> <lakmatiol#8020> that's how junctions should work
11:08 < discord-raku-bot> <lakmatiol#8020> now yes, I am using a junction in a strange way
11:10 < discord-raku-bot> <lakmatiol#8020> but nevertheless, `5|6` is `any(5, 6)`, which means that when calling `@u.push` on it, it should be `any(@u.push(5), @u.push(6))`
11:13 -!- lizmat_ [~textual@ipv4-wenzperl.connected.by.freedominter.net] has quit [Quit: Textual IRC Client: www.textualapp.com]
11:13 -!- lizmat [~textual@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
11:13 -!- RakuIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
11:15 -!- TempIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
11:16 < discord-raku-bot> <Nemokosch#9980> Hm, interesting, I'm gonna look this up
11:16 < discord-raku-bot> <Nemokosch#9980> I think the agreeable behavior is much more the first one
11:30 < discord-raku-bot> <Nemokosch#9980> > which means that when calling @u.push on it, it should be any(@u.push(5), @u.push(6))
11:30 < discord-raku-bot> <Nemokosch#9980> where is this written down?
11:57 < discord-raku-bot> <lakmatiol#8020> well, `multi method push(Array:D: \value --> Array:D)` is the candidate that gets called, and `Any \value` cannot take Mu or Junction, so the call should get threaded through the junction.
11:57 < discord-raku-bot> <lakmatiol#8020> > Junctions are very special objects. They fall outside the Any hierarchy, being only, as any other object, subclasses of Mu. That enables a feature for most methods: autothreading. Autothreading happens when a junction is bound to a parameter of a code object that doesn't accept values of type Junction. Instead of producing an error, the signature binding is repeated for each value of the junction.
11:58 < discord-raku-bot> <lakmatiol#8020> from https://docs.raku.org/type/Junction
13:11 < discord-raku-bot> <Nemokosch#9980> I see it nowhere written that the supposed behavior for arrays would be to put all elements one after the other
13:11 < discord-raku-bot> <Nemokosch#9980> That's not even concurrency aware
13:12 < discord-raku-bot> <Nemokosch#9980> [3]|[6] would at least make sense
13:14 < discord-raku-bot> <Nemokosch#9980> Although that's arguably more an issue with using push in the first place which mutates an object 🤔
13:59 < discord-raku-bot> <lakmatiol#8020> yeah, its probably not meant to work with mutable objects
13:59 < discord-raku-bot> <lakmatiol#8020> nevertheless, it does mean that the push signature in the docs is wrong
13:59 < discord-raku-bot> <lakmatiol#8020> since a method with that signature should thread through the junction
21:45 -!- justsomeguy [~justsomeg@user/justsomeguy] has joined #raku-beginner
--- Day changed Mon Sep 27 2021
01:08 -!- justsomeguy [~justsomeg@user/justsomeguy] has left #raku-beginner [WeeChat 3.2]
10:11 -!- dakkar [~dakkar@home.thenautilus.net] has joined #raku-beginner
11:59 -!- lizmat_ [~textual@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
12:03 -!- lizmat [~textual@ipv4-wenzperl.connected.by.freedominter.net] has quit [Ping timeout: 252 seconds]
12:08 -!- lizmat_ [~textual@ipv4-wenzperl.connected.by.freedominter.net] has quit [Quit: Textual IRC Client: www.textualapp.com]
12:09 -!- lizmat [~textual@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
12:18 < discord-raku-bot> <Nemokosch#9980> Yes, you have a point, something isn't consistent
18:35 -!- dakkar [~dakkar@home.thenautilus.net] has quit [Ping timeout: 265 seconds]
--- Day changed Tue Sep 28 2021
10:14 -!- dakkar [~dakkar@home.thenautilus.net] has joined #raku-beginner
10:36 -!- dakkar [~dakkar@home.thenautilus.net] has quit [Remote host closed the connection]
10:37 -!- dakkar [~dakkar@home.thenautilus.net] has joined #raku-beginner
15:42 -!- whaaat [~whaaat@69.sub-174-198-75.myvzw.com] has joined #raku-beginner
15:43 < whaaat> is anyone available who can help me get started?
15:58 < discord-raku-bot> <Nemokosch#9980> what is your programming background?
15:59 < whaaat> I have an associate's in computer programming
15:59 < whaaat> pretty rusty though
16:00 < discord-raku-bot> <Nemokosch#9980> I mean it makes a difference whether it's a first language for you or it isn't
16:03 < whaaat> it's not a first language
16:04 < discord-raku-bot> <Nemokosch#9980> For me, it helps when I have some little tasks to solve and try to just look for it in the raku docs or google
16:04 < discord-raku-bot> <Nemokosch#9980> if you don't have ideas, https://theweeklychallenge.org/ can help
16:04 < discord-raku-bot> <Nemokosch#9980> Rosetta Code too
16:06 < whaaat> thanks
16:19 -!- whaaat [~whaaat@69.sub-174-198-75.myvzw.com] has quit [Quit: Connection closed]
18:37 -!- dakkar [~dakkar@home.thenautilus.net] has quit [Ping timeout: 252 seconds]
--- Day changed Wed Sep 29 2021
10:14 -!- dakkar [~dakkar@home.thenautilus.net] has joined #raku-beginner
16:37 < discord-raku-bot> <Anton Antonov#7232> Assume that 1) I execute a script multiple times without changing it, and 2) the script starts with a call to `srand` , say `srand(332)` . Does 2) guarantee that the subsequent calls of random commands in the script (using `roll`, `pick`, or `rand`) and Hash-objects creation commands would produce the same results during each execution of the script?
16:38 < discord-raku-bot> <Anton Antonov#7232> I strongly suspect that Hash-objects creation is not influenced by `srand`.
17:08 -!- discord-raku-bot [~RakuIRC@ip5f5ab722.dynamic.kabel-deutschland.de] has quit [Remote host closed the connection]
17:10 -!- discord-raku-bot [~RakuIRC@ip5f5ab722.dynamic.kabel-deutschland.de] has joined #raku-beginner
18:54 -!- dakkar [~dakkar@home.thenautilus.net] has quit [Ping timeout: 264 seconds]
--- Day changed Thu Sep 30 2021
10:08 -!- dakkar [~dakkar@home.thenautilus.net] has joined #raku-beginner
18:41 -!- dakkar [~dakkar@home.thenautilus.net] has quit [Quit: e via, verso nuove avventure]
19:17 -!- Netsplit *.net <-> *.split quits: discord-raku-bot
19:17 -!- discord-raku-bot [~RakuIRC@ip5f5ab722.dynamic.kabel-deutschland.de] has joined #raku-beginner
20:41 -!- colemanx [~coleman@2605:a601:5529:1e00:cdbb:95d3:8b86:ab4d] has quit [Read error: Connection reset by peer]
20:43 -!- coleman-x [~coleman@2605:a601:5529:1e00:5f1e:ac3e:dd2b:96dd] has joined #raku-beginner
22:12 -!- [Coke] [~coke@cpe-104-228-9-26.nycap.res.rr.com] has joined #raku-beginner
22:12 < [Coke]> Hello, folks
22:56 < coleman-x> hi
--- Day changed Fri Oct 01 2021
02:03 -!- coleman-x [~coleman@2605:a601:5529:1e00:5f1e:ac3e:dd2b:96dd] has quit [Quit: Leaving]
02:03 -!- coleman-x [~coleman@2605:a601:5529:1e00:5f1e:ac3e:dd2b:96dd] has joined #raku-beginner
04:14 < discord-raku-bot> <Hydrazer#4827> howdy
08:14 -!- Netsplit *.net <-> *.split quits: lizmat, Util
08:16 -!- lizmat [~textual@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
08:17 -!- Util [~bruce@047-013-182-182.res.spectrum.com] has joined #raku-beginner
15:25 -!- [Coke] is now known as CokeZero
15:25 -!- CokeZero is now known as [Coke]
18:31 -!- coleman-x [~coleman@2605:a601:5529:1e00:5f1e:ac3e:dd2b:96dd] has quit [Quit: Leaving]
--- Day changed Sat Oct 02 2021
02:52 -!- [Coke] [~coke@cpe-104-228-9-26.nycap.res.rr.com] has quit [Read error: Connection reset by peer]
02:52 -!- [Coke] [~coke@cpe-104-228-9-26.nycap.res.rr.com] has joined #raku-beginner
19:39 -!- Guest2385 [~Guest23@82-169-44-157.biz.kpn.net] has joined #raku-beginner
19:40 -!- Guest2385 [~Guest23@82-169-44-157.biz.kpn.net] has quit [Client Quit]
22:26 -!- colemanx [~coleman@2605:a601:5529:1e00:7d2:e800:d632:e0a2] has joined #raku-beginner
--- Day changed Sun Oct 03 2021
06:15 -!- codesections5 [~codesecti@codesections.com] has joined #raku-beginner
06:20 -!- Netsplit *.net <-> *.split quits: codesections
06:20 -!- codesections5 is now known as codesections
06:28 -!- mjgardner [sid182628@id-182628.ilkley.irccloud.com] has quit [Ping timeout: 252 seconds]
06:46 -!- mjgardner [sid182628@id-182628.ilkley.irccloud.com] has joined #raku-beginner
06:46 -!- gfldex [~dex@ip5f5ab722.dynamic.kabel-deutschland.de] has quit [Ping timeout: 252 seconds]
--- Log closed Sun Oct 03 06:46:49 2021
--- Log opened Sun Oct 03 06:47:01 2021
06:47 -!- gfldex_ [~dex@ip5f5ab722.dynamic.kabel-deutschland.de] has joined #raku-beginner
06:47 -!- Topic for #raku-beginner: This channel is intended for people just starting with the Raku Programming Language (https://raku.org). This channel is being logged for historical purposes.
06:47 -!- Topic set by lizmat [~textual@ipv4-wenzperl.connected.by.freedominter.net] [Mon Aug 16 16:43:12 2021]
06:47 [Users #raku-beginner]
06:47 [ [Coke] ] [ colemanx ] [ gfldex ] [ lizmat ] [ RakuIRCLogger] [ TempIRCLogger]
06:47 [ codesections] [ discord-raku-bot] [ gfldex_] [ mjgardner] [ sjn ] [ Util ]
06:47 -!- Irssi: #raku-beginner: Total of 12 nicks [0 ops, 0 halfops, 0 voices, 12 normal]
06:47 -!- gfldex [~dex@ip5f5ab722.dynamic.kabel-deutschland.de] has quit [Ping timeout: 252 seconds]
06:47 -!- Channel #raku-beginner created Mon Aug 16 16:35:55 2021
06:47 -!- Irssi: Join to #raku-beginner was synced in 36 secs
08:57 -!- a [~a@189.62.46.58] has joined #raku-beginner
08:58 -!- a [~a@189.62.46.58] has quit [Client Quit]
10:32 -!- lizmat_ [~textual@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
10:32 -!- TempIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has quit [Ping timeout: 240 seconds]
10:33 -!- RakuIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has quit [Ping timeout: 240 seconds]
10:35 -!- lizmat [~textual@ipv4-wenzperl.connected.by.freedominter.net] has quit [Ping timeout: 252 seconds]
11:06 -!- lizmat_ [~textual@ipv4-wenzperl.connected.by.freedominter.net] has quit [Quit: Textual IRC Client: www.textualapp.com]
11:06 -!- lizmat [~textual@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
11:06 -!- RakuIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
11:07 -!- TempIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
11:08 -!- You're now known as gfldex
11:15 -!- Guest17 [~Guest17@78.107.92.124] has joined #raku-beginner
11:21 -!- Guest17 [~Guest17@78.107.92.124] has quit [Quit: Client closed]
11:29 -!- lizmat_ [~textual@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
11:30 -!- RakuIRCLogger_ [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
11:30 -!- TempIRCLogger__ [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
11:31 -!- RakuIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has quit [Ping timeout: 252 seconds]
11:31 -!- lizmat [~textual@ipv4-wenzperl.connected.by.freedominter.net] has quit [Ping timeout: 245 seconds]
11:31 -!- TempIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has quit [Ping timeout: 252 seconds]
11:32 -!- lizmat_ [~textual@ipv4-wenzperl.connected.by.freedominter.net] has quit [Client Quit]
11:32 -!- lizmat [~textual@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
--- Day changed Mon Oct 04 2021
09:29 -!- CIAvash [~ciavash@2001:470:69fc:105::264] has joined #raku-beginner
10:05 -!- dakkar [~dakkar@home.thenautilus.net] has joined #raku-beginner
15:54 -!- DuckBill [~DuckBill@cpe-66-65-94-118.nyc.res.rr.com] has joined #raku-beginner
15:56 < DuckBill> How can I get started learning & using Raku
15:56 -!- DuckBill [~DuckBill@cpe-66-65-94-118.nyc.res.rr.com] has quit [Client Quit]
15:57 -!- DuckBill [~DuckBill@cpe-66-65-94-118.nyc.res.rr.com] has joined #raku-beginner
15:59 < [Coke]> Do you prefer books, online resources, interactive testing...
15:59 < [Coke]> https://raku.org/resources/ - "for newcomers
16:00 < DuckBill> I used to do some programming in Perl 4 & know what Perl 5 is
16:01 < DuckBill> Yes to online resources, Sure Why not? to interactive testing
16:02 < [Coke]> You may be interested in https://docs.raku.org/language.html - look for "Perl to Raku" for a few articles.
16:03 -!- DuckBill [~DuckBill@cpe-66-65-94-118.nyc.res.rr.com] has quit [Quit: Connection closed]
16:10 < discord-raku-bot> <Anton Antonov#7232> @DuckBill Do you have any specific problem area in mind? I think it helps to learn Raku in that way. I personally chose Raku three years ago because of its great way of specifying, programming, and managing parsing with grammars and corresponding interpretations.
16:10 < discord-raku-bot> <Anton Antonov#7232> 1) Because of this I read book by Moritz, "Parsing with Perl 6 Regexes and Grammars: A Recursive Descent into Parsing".
16:10 < discord-raku-bot> <Anton Antonov#7232> 2) Then I much of Foy's book "Learning Perl 6: Keeping the Easy, Hard, and Impossible Within Reach". Right now, I often read chapters of JJ Merelo's book "Raku Recipes: A Problem-Solution Approach". And of course I read/browse https://docs.raku.org all the time.
16:10 < discord-raku-bot> <Anton Antonov#7232> @DuckBill Do you have any specific problem area in mind? I think it helps to learn Raku in that way. I personally chose Raku three years ago because of its great way of specifying, programming, and managing parsing with grammars and corresponding interpretations.
16:10 < discord-raku-bot> <Anton Antonov#7232> 1) Because of this I read book by Moritz, "Parsing with Perl 6 Regexes and Grammars: A Recursive Descent into Parsing".
16:10 < discord-raku-bot> <Anton Antonov#7232> 2) Then I much of Foy's book "Learning Perl 6: Keeping the Easy, Hard, and Impossible Within Reach".
16:10 < discord-raku-bot> <Anton Antonov#7232> 3) Right now, I often read chapters of JJ Merelo's book "Raku Recipes: A Problem-Solution Approach".
16:10 < discord-raku-bot> <Anton Antonov#7232> 4) And of course I read/browse https://docs.raku.org all the time.
16:10 < discord-raku-bot> <Anton Antonov#7232> @DuckBill Do you have any specific problem area in mind? I think it helps to learn Raku in that way. I personally chose Raku three years ago because of its great way of specifying, programming, and managing parsing with grammars and corresponding interpretations.
16:10 < discord-raku-bot> <Anton Antonov#7232> 1) Because of this I read the book by Moritz, "Parsing with Perl 6 Regexes and Grammars: A Recursive Descent into Parsing".
16:10 < discord-raku-bot> <Anton Antonov#7232> 2) Then I much of Foy's book "Learning Perl 6: Keeping the Easy, Hard, and Impossible Within Reach".
16:10 < discord-raku-bot> <Anton Antonov#7232> 3) Right now, I often read chapters of JJ Merelo's book "Raku Recipes: A Problem-Solution Approach".
16:10 < discord-raku-bot> <Anton Antonov#7232> 4) And of course I read/browse https://docs.raku.org all the time.
16:10 < discord-raku-bot> <Anton Antonov#7232> @DuckBill Do you have any specific problem area in mind? I think it helps to learn Raku in that way. I personally chose Raku three years ago because of its great way of specifying, programming, and managing parsing with grammars and corresponding interpretations.
16:10 < discord-raku-bot> <Anton Antonov#7232> 1) Because of this I read the book by Moritz, "Parsing with Perl 6 Regexes and Grammars: A Recursive Descent into Parsing".
16:10 < discord-raku-bot> <Anton Antonov#7232> 2) Then read I much of Foy's book "Learning Perl 6: Keeping the Easy, Hard, and Impossible Within Reach".
16:10 < discord-raku-bot> <Anton Antonov#7232> 3) Right now, I often read chapters of JJ Merelo's book "Raku Recipes: A Problem-Solution Approach".
16:10 < discord-raku-bot> <Anton Antonov#7232> 4) And of course I read/browse https://docs.raku.org all the time.
16:12 < discord-raku-bot> <Anton Antonov#7232> @DuckBill " I used to do some programming in Perl 4 & know what Perl 5 is" -- sorry, I missed that statement. It is very likely my book path above is not applicable to you...
18:37 -!- dakkar [~dakkar@home.thenautilus.net] has quit [Ping timeout: 245 seconds]
21:12 -!- discord-raku-bot [~RakuIRC@ip5f5ab722.dynamic.kabel-deutschland.de] has quit [Remote host closed the connection]
21:14 -!- discord-raku-bot [~RakuIRC@ip5f5ab722.dynamic.kabel-deutschland.de] has joined #raku-beginner
--- Day changed Tue Oct 05 2021
10:08 -!- dakkar [~dakkar@home.thenautilus.net] has joined #raku-beginner
10:12 -!- Netsplit *.net <-> *.split quits: TempIRCLogger__
10:24 -!- TempIRCLogger__ [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
18:34 -!- dakkar [~dakkar@home.thenautilus.net] has quit [Ping timeout: 245 seconds]
20:10 -!- [Coke] [~coke@cpe-104-228-9-26.nycap.res.rr.com] has quit [Ping timeout: 252 seconds]
20:13 -!- [Coke] [~coke@172.58.235.35] has joined #raku-beginner
--- Day changed Wed Oct 06 2021
05:19 -!- CIAvash [~ciavash@2001:470:69fc:105::264] has quit [Ping timeout: 265 seconds]
05:37 -!- CIAvash [~ciavash@2001:470:69fc:105::264] has joined #raku-beginner
10:07 -!- dakkar [~dakkar@home.thenautilus.net] has joined #raku-beginner
12:22 -!- lizmat_ [~textual@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
12:22 -!- RakuIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
12:23 -!- TempIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
12:24 -!- RakuIRCLogger_ [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has quit [Ping timeout: 252 seconds]
12:24 -!- TempIRCLogger__ [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has quit [Ping timeout: 252 seconds]
12:24 -!- lizmat [~textual@ipv4-wenzperl.connected.by.freedominter.net] has quit [Ping timeout: 252 seconds]
12:25 -!- lizmat_ [~textual@ipv4-wenzperl.connected.by.freedominter.net] has quit [Client Quit]
12:25 -!- lizmat [~textual@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
18:29 -!- melezhik [~melezhik@c-73-32-143-85.hsd1.tx.comcast.net] has joined #raku-beginner
18:35 -!- melezhik [~melezhik@c-73-32-143-85.hsd1.tx.comcast.net] has quit [Ping timeout: 245 seconds]
18:47 -!- dakkar [~dakkar@home.thenautilus.net] has quit [Ping timeout: 245 seconds]
19:05 -!- discord-raku-bot [~RakuIRC@ip5f5ab722.dynamic.kabel-deutschland.de] has quit [Remote host closed the connection]
19:06 -!- discord-raku-bot [~RakuIRC@ip5f5ab722.dynamic.kabel-deutschland.de] has joined #raku-beginner
19:11 -!- melezhik [~melezhik@mobile-107-77-219-9.mobile.att.net] has joined #raku-beginner
19:21 -!- melezhik [~melezhik@mobile-107-77-219-9.mobile.att.net] has quit [Quit: Ping timeout (120 seconds)]
19:22 -!- melezhik [~melezhik@mobile-107-77-219-9.mobile.att.net] has joined #raku-beginner
19:23 -!- melezhik [~melezhik@mobile-107-77-219-9.mobile.att.net] has quit [Client Quit]
20:18 -!- [Coke]_ [~coke@172.58.236.208] has joined #raku-beginner
20:20 -!- [Coke] [~coke@172.58.235.35] has quit [Ping timeout: 245 seconds]
22:32 -!- [Coke]_ is now known as [Coke]
--- Day changed Thu Oct 07 2021
02:00 -!- Petr [~Petr@31.128.204.239] has joined #raku-beginner
02:00 < Petr> sorry.. raku is used in production?
02:03 -!- Petr [~Petr@31.128.204.239] has quit [Quit: Connection closed]
02:04 -!- Petr [~Petr@31.128.204.239] has joined #raku-beginner
02:20 -!- Petr [~Petr@31.128.204.239] has left #raku-beginner []
10:03 -!- dakkar [~dakkar@home.thenautilus.net] has joined #raku-beginner
12:38 -!- satyavvd [~satyavvd@inet-160-34-89-247.oracle-ocna.com] has joined #raku-beginner
17:45 -!- dakkar [~dakkar@home.thenautilus.net] has quit [Read error: Connection reset by peer]
17:45 -!- dakkar [~dakkar@home.thenautilus.net] has joined #raku-beginner
18:31 -!- dakkar [~dakkar@home.thenautilus.net] has quit [Quit: e via, verso nuove avventure]
18:49 -!- satyavvd [~satyavvd@inet-160-34-89-247.oracle-ocna.com] has quit [Ping timeout: 265 seconds]
23:23 -!- mjgardner [sid182628@id-182628.ilkley.irccloud.com] has quit [Ping timeout: 268 seconds]
23:29 -!- mjgardner [sid182628@ilkley.irccloud.com] has joined #raku-beginner
--- Day changed Fri Oct 08 2021
05:01 -!- Guest2356 [~Guest23@14-0-230-020.static.pccw-hkt.com] has joined #raku-beginner
05:24 -!- Guest2356 [~Guest23@14-0-230-020.static.pccw-hkt.com] has left #raku-beginner []
10:57 -!- mfiano [~mfiano@li1282-157.members.linode.com] has joined #raku-beginner
10:57 < mfiano> Hello all. I'm a newbie exploring the terrain...coming from CL :)
10:59 < lizmat> mfiano: welcome!
10:59 < mfiano> Thanks!
10:59 < mfiano> I was told this language is semantically very similar to CL
11:00 < mfiano> So I'm going to play around with it to see how I like it.
15:20 -!- CIAvash [~ciavash@2001:470:69fc:105::264] has quit [Read error: Connection reset by peer]
15:23 -!- CIAvash [~ciavash@2001:470:69fc:105::264] has joined #raku-beginner
16:58 < [Coke]> Hope you like it, let us know.
--- Day changed Sat Oct 09 2021
00:49 -!- colemanx [~coleman@2605:a601:5529:1e00:7d2:e800:d632:e0a2] has quit [Quit: Leaving]
01:29 -!- Petr [~Petr@31.128.217.232] has joined #raku-beginner
01:29 -!- Petr [~Petr@31.128.217.232] has quit [Client Quit]
05:35 < mfiano> Hi again
05:36 < mfiano> I haven't given up completely yet, as it was mentioned I might be able to use raw FFI calls.
05:36 < mfiano> (see #raku discussion yesterday)
05:38 < mfiano> I am currently wondering what the majority of people are using Raku for these days. Historically Perl has been mostly used for text processing and cgi scripts (which I suppose is a subset of the former). I am told Raku is more suitable to other tasks, and while I know it is a general-purpose language, I'm still curious what most people use it for these days.
08:48 < gfldex> I mostly use it to blog about. :)
08:48 < gfldex> And shell scripting.
15:46 -!- discord-raku-bot [~RakuIRC@ip5f5ab722.dynamic.kabel-deutschland.de] has quit [Remote host closed the connection]
15:46 -!- discord-raku-bot [~RakuIRC@ip5f5ab722.dynamic.kabel-deutschland.de] has joined #raku-beginner
15:50 -!- discord-raku-bot [~RakuIRC@ip5f5ab722.dynamic.kabel-deutschland.de] has quit [Remote host closed the connection]
15:50 -!- discord-raku-bot [~RakuIRC@ip5f5ab722.dynamic.kabel-deutschland.de] has joined #raku-beginner
22:41 -!- [Coke]_ [~coke@172.58.236.208] has joined #raku-beginner
22:41 -!- [Coke] [~coke@172.58.236.208] has quit [Read error: Connection reset by peer]
--- Day changed Sun Oct 10 2021
00:26 < discord-raku-bot> <Hydrazer#4827> does someone know a better way to get a list of i^i up to n? right now i have ```pl
00:26 < discord-raku-bot> <Hydrazer#4827> my $num = 5;
00:26 < discord-raku-bot> <Hydrazer#4827> my @arr = [1..$num] Z** [1..$num];
00:26 < discord-raku-bot> <Hydrazer#4827> ```
00:26 < discord-raku-bot> <Hydrazer#4827> does someone know a cooler way to get a list of i^i up to n? right now i have ```pl
00:26 < discord-raku-bot> <Hydrazer#4827> my $num = 5;
00:26 < discord-raku-bot> <Hydrazer#4827> my @arr = [1..$num] Z** [1..$num];
00:26 < discord-raku-bot> <Hydrazer#4827> ```
00:27 < discord-raku-bot> <Hydrazer#4827> does someone know a cooler way to get a list of squares up to n? right now i have ```pl
00:27 < discord-raku-bot> <Hydrazer#4827> my $num = 5;
00:27 < discord-raku-bot> <Hydrazer#4827> my @arr = [1..$num] Z** [1..$num];
00:27 < discord-raku-bot> <Hydrazer#4827> ```
00:27 < discord-raku-bot> <Hydrazer#4827> does someone know a cooler way to get a list of i^i up to n? right now i have ```pl
00:27 < discord-raku-bot> <Hydrazer#4827> my $num = 5;
00:27 < discord-raku-bot> <Hydrazer#4827> my @arr = [1..$num] Z** [1..$num];
00:27 < discord-raku-bot> <Hydrazer#4827> ```
01:22 -!- [Coke]_ is now known as [Coke]
04:40 < discord-raku-bot> <normanrockwellesque#6606> not sure how cool it is, but gather/take seems pretty nice:
04:40 < discord-raku-bot> <normanrockwellesque#6606> ```
04:40 < discord-raku-bot> <normanrockwellesque#6606> my $num = 5;
04:40 < discord-raku-bot> <normanrockwellesque#6606> my @arr = gather { take $_ ** $_ for 1..$num }
04:40 < discord-raku-bot> <normanrockwellesque#6606> ```
04:41 < discord-raku-bot> <normanrockwellesque#6606> I tried getting something working with the sequence `...` operator but was unsuccessful... 😓
12:43 < discord-raku-bot> <Nemokosch#9980> something like
12:43 < discord-raku-bot> <Nemokosch#9980> ```perl
12:43 < discord-raku-bot> <Nemokosch#9980> my $num = 5;
12:43 < discord-raku-bot> <Nemokosch#9980> my @arr = 1..$num.map(*^2);
12:43 < discord-raku-bot> <Nemokosch#9980> ```
12:43 < discord-raku-bot> <Nemokosch#9980> maybe?
12:43 < discord-raku-bot> <Nemokosch#9980> something like
12:43 < discord-raku-bot> <Nemokosch#9980> ```perl
12:43 < discord-raku-bot> <Nemokosch#9980> my $num = 5;
12:43 < discord-raku-bot> <Nemokosch#9980> my @arr = 1..$num.map(* **2);
12:43 < discord-raku-bot> <Nemokosch#9980> ```
12:43 < discord-raku-bot> <Nemokosch#9980> maybe?
12:56 < lizmat> my @arr = (1..$num).map(* ** 2) # precedence
12:58 < discord-raku-bot> <lakmatiol#8020> that takes the second power, it would be `(1..$num).map: {$_ ** $_}` as far as I can tell
13:44 < discord-raku-bot> <Nahita#3882> "list comprehension" is yet another way: `[$_ ** $_ for 1..$n]`
13:45 < discord-raku-bot> <Nahita#3882> or with states: `1, {state $x = 1; ++$x ** $x } ... *`
13:46 < discord-raku-bot> <Nahita#3882> or more unreadable & assuming 0^0 = 0 because why not: `0, -> *@_ { +@_ ** +@_ } ... *`
13:46 < discord-raku-bot> <Nahita#3882> or more unreadable & assuming `0**0 = 0` because why not: `0, -> *@_ { @_ ** @_ } ... *`
13:47 < discord-raku-bot> <Nemokosch#9980> oh right, didn't pay attention
13:48 < discord-raku-bot> <Nemokosch#9980> but the general idea would be the same, with {$_ ** $_}, I guess
13:48 < discord-raku-bot> <Nemokosch#9980> but the general idea would be the same, with {$\_ ** $\_}, I guess
14:39 < discord-raku-bot> <lakmatiol#8020> this is really easy in apl, but we don't get a join operator
14:39 < discord-raku-bot> <lakmatiol#8020> ```
14:39 < discord-raku-bot> <lakmatiol#8020> *⍨⍳10
14:39 < discord-raku-bot> <lakmatiol#8020> 1 4 27 256 3125 46656 823543 16777216 387420489 1E10
14:39 < discord-raku-bot> <lakmatiol#8020> ```
14:39 < discord-raku-bot> <lakmatiol#8020> this is really easy in apl, but we don't get a join metaoperator
14:39 < discord-raku-bot> <lakmatiol#8020> ```
14:39 < discord-raku-bot> <lakmatiol#8020> *⍨⍳10
14:39 < discord-raku-bot> <lakmatiol#8020> 1 4 27 256 3125 46656 823543 16777216 387420489 1E10
14:39 < discord-raku-bot> <lakmatiol#8020> ```
14:43 < discord-raku-bot> <Nemokosch#9980> don't forget that APL is for array manipulation and pretty much only that
14:43 < discord-raku-bot> <lakmatiol#8020> yeah, a join metaop would still be nice
14:43 < discord-raku-bot> <lakmatiol#8020> yeah, a join metaop would still be nice though
15:14 < discord-raku-bot> <Nemokosch#9980> What would it do?
15:15 -!- mfiano [~mfiano@li1282-157.members.linode.com] has left #raku-beginner [too much discord bot noise]
16:43 < discord-raku-bot> <unixcat64#4715> can't install Inline::Perl5 module with zef on Windows
17:34 < discord-raku-bot> <Nahita#3882> same here!
17:35 < discord-raku-bot> <Nahita#3882> same here
17:35 < discord-raku-bot> <Nahita#3882> i was going to try NumPy etc.
17:35 < discord-raku-bot> <unixcat64#4715> I get `Failed to find dependencies: perl:from<native>`
17:36 < discord-raku-bot> <Nahita#3882> oh I thought Inline::Python, sorry :p
17:36 < discord-raku-bot> <Nahita#3882> I couldn't install that one; but let me also try Perl5 now
17:36 < discord-raku-bot> <Nahita#3882> oh I mistakenly read Inline::Python, sorry :p
17:37 < discord-raku-bot> <Nahita#3882> Same error!
17:44 < discord-raku-bot> <unixcat64#4715> @Nahita#3882 Try it with `zef install Inline::Perl5 --exclude="perl" --force-build`
17:46 < discord-raku-bot> <unixcat64#4715> I still get errors tho
17:47 < discord-raku-bot> <Nahita#3882> yeah a lot of tests failed and it aborted at the end...
17:52 < discord-raku-bot> <hyperreal#4715> I submitted an issue on Inline::Perl5's github repo
19:44 < discord-raku-bot> <gfldex#8222> m: say (1..5)».&{ $^a ** $^a };
19:45 < discord-raku-bot> <gfldex#8222> `».` <-- most favourite Raku feature of mine
21:14 < discord-raku-bot> <hyperreal#4715> what does `>>.` do?
21:16 < discord-raku-bot> <gfldex#8222> It calls the following method or callable on each element of a list.
21:19 < discord-raku-bot> <Nemokosch#9980> it's sort of a "feature abuse" though 😄
21:23 < discord-raku-bot> <Nemokosch#9980> after all, the hyper operators can do much more than that
21:23 < discord-raku-bot> <Nemokosch#9980> you could pass in a list of functions
21:24 < discord-raku-bot> <hyperreal#4715> nice 🙂
23:23 -!- Petr [~Petr@31.128.204.132] has joined #raku-beginner
23:28 -!- Petr [~Petr@31.128.204.132] has left #raku-beginner []
--- Day changed Mon Oct 11 2021
03:00 -!- bda [~bda@pool-108-17-113-203.pitbpa.fios.verizon.net] has joined #raku-beginner
04:46 -!- bda [~bda@pool-108-17-113-203.pitbpa.fios.verizon.net] has quit [Ping timeout: 252 seconds]
07:06 -!- hkdtam [~hkdtam@13.66.204.139] has joined #raku-beginner
09:19 -!- Netsplit *.net <-> *.split quits: discord-raku-bot
09:30 -!- discord-raku-bot [~RakuIRC@ip5f5ab722.dynamic.kabel-deutschland.de] has joined #raku-beginner
13:47 -!- bda [~bda@pool-108-17-113-203.pitbpa.fios.verizon.net] has joined #raku-beginner
16:20 -!- lizmat_ [~textual@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
16:21 -!- TempIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has quit [Remote host closed the connection]
16:21 -!- TempIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
16:24 -!- lizmat [~textual@ipv4-wenzperl.connected.by.freedominter.net] has quit [Ping timeout: 245 seconds]
16:29 -!- lizmat_ is now known as lizmat
16:29 -!- lizmat [~textual@ipv4-wenzperl.connected.by.freedominter.net] has quit [Quit: Textual IRC Client: www.textualapp.com]
16:30 -!- lizmat [~textual@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
16:54 < discord-raku-bot> <hyperreal#4715> what's the best way to check the platform (Linux, macOS, or Win32) in Raku?
17:08 < discord-raku-bot> <Morfent#9811> `$*DISTRO.name` and `$*VM.osname` will give a name of some sort
17:08 < discord-raku-bot> <Morfent#9811> m:```
17:08 < discord-raku-bot> <Morfent#9811> say $*DISTRO.name
17:08 < discord-raku-bot> <Morfent#9811> ```
17:08 < discord-raku-bot> <Morfent#9811> boo
17:08 < discord-raku-bot> <Morfent#9811> ```
17:08 < discord-raku-bot> <Morfent#9811> bastille% raku -e 'say $*DISTRO.name'
17:08 < discord-raku-bot> <Morfent#9811> openbsd
17:08 < discord-raku-bot> <Morfent#9811> ```
17:09 < discord-raku-bot> <Morfent#9811> not sure on what its value will be on linux, but on os x it's `darwin`
17:09 < discord-raku-bot> <Morfent#9811> windows can have a handful of values, but `$*DISTRO.is-win` takes care of that
17:35 < discord-raku-bot> <Nemokosch#9980> Ubuntu 20.04
18:00 < discord-raku-bot> <Morfent#9811> convenient 🙂
18:46 -!- RakuIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has quit [Remote host closed the connection]
18:46 -!- RakuIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
21:51 -!- bda [~bda@pool-108-17-113-203.pitbpa.fios.verizon.net] has quit [Ping timeout: 252 seconds]
21:58 -!- bda [~bda@pool-108-17-113-203.pitbpa.fios.verizon.net] has joined #raku-beginner
23:31 -!- bda [~bda@pool-108-17-113-203.pitbpa.fios.verizon.net] has quit [Ping timeout: 250 seconds]
--- Day changed Tue Oct 12 2021
00:12 -!- bda [~bda@pool-173-71-174-119.pitbpa.fios.verizon.net] has joined #raku-beginner
00:37 -!- bda [~bda@pool-173-71-174-119.pitbpa.fios.verizon.net] has quit [Ping timeout: 260 seconds]
03:32 -!- lizmat_ [~textual@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
03:34 -!- mjgardner [sid182628@ilkley.irccloud.com] has quit [Ping timeout: 260 seconds]
03:35 -!- mjgardner [sid182628@id-182628.ilkley.irccloud.com] has joined #raku-beginner
03:35 -!- lizmat [~textual@ipv4-wenzperl.connected.by.freedominter.net] has quit [Ping timeout: 265 seconds]
05:34 -!- hkdtam [~hkdtam@13.66.204.139] has quit [Quit: Client closed]
05:48 -!- RakuIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has quit [Ping timeout: 252 seconds]
08:34 -!- Netsplit *.net <-> *.split quits: TempIRCLogger, discord-raku-bot
08:38 -!- hkdtam [~hkdtam@13.66.204.139] has joined #raku-beginner
08:56 -!- TempIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
08:56 -!- discord-raku-bot [~RakuIRC@ip5f5ab722.dynamic.kabel-deutschland.de] has joined #raku-beginner
09:23 -!- discord-raku-bot [~RakuIRC@ip5f5ab722.dynamic.kabel-deutschland.de] has quit [Remote host closed the connection]
09:24 -!- discord-raku-bot [~RakuIRC@ip5f5ab722.dynamic.kabel-deutschland.de] has joined #raku-beginner
09:40 < discord-raku-bot> <Nemokosch#9980> Will this work if the outer level is infinitely long?
09:48 < discord-raku-bot> <Morfent#9811> seems `|**` is a bit more like `flat` than i'd hoped:
09:48 < discord-raku-bot> <Morfent#9811> ```
09:48 < discord-raku-bot> <Morfent#9811> bastille% raku -e 'say (1..*).rotor(3).rotor(3).&(|**).head(9)'
09:48 < discord-raku-bot> <Morfent#9811> (1 2 3 4 5 6 7 8 9)
09:48 < discord-raku-bot> <Morfent#9811> bastille% raku -e 'say (1..*).rotor(3).rotor(3).map(|*).head(9)'
09:48 < discord-raku-bot> <Morfent#9811> ((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))
09:48 < discord-raku-bot> <Morfent#9811> bastille% raku -e 'say (1..*).rotor(3).rotor(3).map(&slip).head(9)'
09:48 < discord-raku-bot> <Morfent#9811> ((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))
09:48 < discord-raku-bot> <Morfent#9811> ```
10:06 < discord-raku-bot> <Nemokosch#9980> ```perl
10:06 < discord-raku-bot> <Nemokosch#9980> > (1..*).map(*.&pqn).head(10).map(|*)
10:06 < discord-raku-bot> <Nemokosch#9980> ((1 1) (1 2) (2 1) (1 3) (2 2) (3 1) (1 4) (2 3) (3 2) (4 1) (1 5) (2 4) (3 3) (4 2) (5 1) (1 6) (2 5) (3 4) (4 3) (5 2) (6 1) (1 7) (2 6) (3 5) (4 4) (5 3) (6 2) (7 1) (1 8) (2 7) (3 6) (4 5) (5 4) (6 3) (7 2) (8 1) (1 9) (2 8) (3 7) (4 6) (5 5) (6 4) (7 3) (8 2) (9 1))
10:06 < discord-raku-bot> <Nemokosch#9980> ```
10:06 < discord-raku-bot> <Nemokosch#9980> well, this may be okay for me
10:07 < discord-raku-bot> <Nemokosch#9980> pqn takes n and lists the tuples of p,q>0 where p+q=n
10:07 < discord-raku-bot> <Nemokosch#9980> ```perl
10:07 < discord-raku-bot> <Nemokosch#9980> > (1..*).map(&pqn).head(10).map(|*)
10:07 < discord-raku-bot> <Nemokosch#9980> ((1 1) (1 2) (2 1) (1 3) (2 2) (3 1) (1 4) (2 3) (3 2) (4 1) (1 5) (2 4) (3 3) (4 2) (5 1) (1 6) (2 5) (3 4) (4 3) (5 2) (6 1) (1 7) (2 6) (3 5) (4 4) (5 3) (6 2) (7 1) (1 8) (2 7) (3 6) (4 5) (5 4) (6 3) (7 2) (8 1) (1 9) (2 8) (3 7) (4 6) (5 5) (6 4) (7 3) (8 2) (9 1))
10:07 < discord-raku-bot> <Nemokosch#9980> ```
10:09 < discord-raku-bot> <Nemokosch#9980> pretty cool actually
10:09 -!- RakuIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
10:09 -!- lizmat_ [~textual@ipv4-wenzperl.connected.by.freedominter.net] has quit [Quit: Textual IRC Client: www.textualapp.com]
10:09 -!- TempIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has quit [Remote host closed the connection]
10:09 -!- lizmat [~textual@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
10:10 -!- TempIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
12:13 -!- hkdtam [~hkdtam@13.66.204.139] has quit [Ping timeout: 256 seconds]
12:18 -!- bda [~bda@pool-108-17-113-203.pitbpa.fios.verizon.net] has joined #raku-beginner
15:03 -!- bda [~bda@pool-108-17-113-203.pitbpa.fios.verizon.net] has quit [Ping timeout: 250 seconds]
18:38 -!- melezhik [~melezhik@c-73-32-143-85.hsd1.tx.comcast.net] has joined #raku-beginner
19:06 -!- melezhik [~melezhik@c-73-32-143-85.hsd1.tx.comcast.net] has quit [Ping timeout: 264 seconds]
--- Day changed Wed Oct 13 2021
00:21 -!- joeyxl [~joeyxl@104.158.53.80] has joined #raku-beginner
00:21 < joeyxl> hello everyone, this is the right spot for me
00:38 -!- joeyxl [~joeyxl@104.158.53.80] has quit [Quit: Connection closed]
02:13 -!- discord-raku-bot [~RakuIRC@ip5f5ab722.dynamic.kabel-deutschland.de] has quit [Remote host closed the connection]
02:14 -!- discord-raku-bot [~RakuIRC@ip5f5ab722.dynamic.kabel-deutschland.de] has joined #raku-beginner
02:14 -!- discord-raku-bot [~RakuIRC@ip5f5ab722.dynamic.kabel-deutschland.de] has quit [Remote host closed the connection]
02:16 -!- discord-raku-bot [~RakuIRC@ip5f5ab722.dynamic.kabel-deutschland.de] has joined #raku-beginner
09:24 -!- [Coke]_ [~coke@172.58.236.208] has joined #raku-beginner
09:31 -!- Netsplit *.net <-> *.split quits: mjgardner
09:31 -!- Netsplit *.net <-> *.split quits: TempIRCLogger, [Coke], RakuIRCLogger
09:37 -!- mjgardner [sid182628@id-182628.ilkley.irccloud.com] has joined #raku-beginner
09:53 -!- RakuIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
09:53 -!- TempIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
10:27 -!- Netsplit *.net <-> *.split quits: mjgardner, TempIRCLogger
10:33 -!- mjgardner [sid182628@id-182628.ilkley.irccloud.com] has joined #raku-beginner
10:43 -!- dakkar [~dakkar@home.thenautilus.net] has joined #raku-beginner
11:20 -!- hkdtam [~hkdtam@13.66.204.139] has joined #raku-beginner
11:28 -!- dakkar [~dakkar@home.thenautilus.net] has quit [Quit: e via, verso nuove avventure]
11:59 -!- CIAvash [~ciavash@2001:470:69fc:105::264] has quit [Quit: Bridge terminating on SIGTERM]
12:03 -!- CIAvash [~ciavash@2001:470:69fc:105::264] has joined #raku-beginner
13:51 -!- lizmat_ [~textual@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
13:51 -!- TempIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
13:52 -!- RakuIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has quit [Remote host closed the connection]
13:52 -!- RakuIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
13:54 -!- lizmat [~textual@ipv4-wenzperl.connected.by.freedominter.net] has quit [Ping timeout: 245 seconds]
13:57 -!- lizmat_ [~textual@ipv4-wenzperl.connected.by.freedominter.net] has quit [Quit: Textual IRC Client: www.textualapp.com]
13:57 -!- lizmat [~textual@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
14:52 -!- hkdtam [~hkdtam@13.66.204.139] has quit [Quit: Client closed]
15:37 -!- [Coke]_ is now known as [Coke]
17:13 -!- melezhik17 [~melezhik@c-73-32-143-85.hsd1.tx.comcast.net] has joined #raku-beginner
17:14 -!- melezhik17 is now known as melezhik
17:22 -!- melezhik [~melezhik@c-73-32-143-85.hsd1.tx.comcast.net] has quit [Quit: Ping timeout (120 seconds)]
18:37 -!- [Coke]_ [~coke@172.58.236.208] has joined #raku-beginner
18:39 -!- [Coke] [~coke@172.58.236.208] has quit [Ping timeout: 245 seconds]
19:06 -!- [Coke]_ is now known as [Coke]
20:02 -!- discord-raku-bot [~RakuIRC@ip5f5ab722.dynamic.kabel-deutschland.de] has quit [Remote host closed the connection]
20:02 -!- discord-raku-bot [~RakuIRC@ip5f5ab722.dynamic.kabel-deutschland.de] has joined #raku-beginner
20:03 < discord-raku-bot> <Nemokosch#9980> I'm starting to understand the "Krňávek principle"
20:03 < discord-raku-bot> <Nemokosch#9980> ie using "andthen" all over the place
20:03 < discord-raku-bot> <Nemokosch#9980> it kills the parantheses
20:06 -!- discord-raku-bot [~RakuIRC@ip5f5ab722.dynamic.kabel-deutschland.de] has quit [Remote host closed the connection]
20:07 -!- discord-raku-bot [~RakuIRC@ip5f5ab722.dynamic.kabel-deutschland.de] has joined #raku-beginner
--- Day changed Thu Oct 14 2021
16:47 -!- melezhik [~melezhik@c-73-32-143-85.hsd1.tx.comcast.net] has joined #raku-beginner
17:55 -!- melezhik [~melezhik@c-73-32-143-85.hsd1.tx.comcast.net] has quit [Quit: Ping timeout (120 seconds)]
18:08 -!- CIAvash [~ciavash@2001:470:69fc:105::264] has quit [Quit: Bridge terminating on SIGTERM]
18:13 -!- CIAvash [~ciavash@2001:470:69fc:105::264] has joined #raku-beginner
--- Day changed Fri Oct 15 2021
00:13 -!- cialandro [~cialandro@h106.22.214.67.dynamic.ip.windstream.net] has joined #raku-beginner
00:14 -!- cialandro [~cialandro@h106.22.214.67.dynamic.ip.windstream.net] has quit [Client Quit]
13:37 -!- mahafyi [~mahafyi@45.119.28.169] has joined #raku-beginner
14:29 -!- cialandro [~cialandro@8.23.139.51] has joined #raku-beginner
14:29 -!- cialandro [~cialandro@8.23.139.51] has quit [Quit: Connection closed]
20:51 -!- RakuIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has quit [Remote host closed the connection]
20:52 -!- RakuIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
22:48 -!- RakuIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has quit [Remote host closed the connection]
22:49 -!- RakuIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
--- Day changed Sat Oct 16 2021
04:08 -!- mjgardner [sid182628@id-182628.ilkley.irccloud.com] has quit [Ping timeout: 268 seconds]
04:08 -!- mjgardner_ [sid182628@ilkley.irccloud.com] has joined #raku-beginner
06:20 -!- Guest75 [~Guest75@softbank060105107139.bbtec.net] has joined #raku-beginner
06:20 -!- Guest75 [~Guest75@softbank060105107139.bbtec.net] has left #raku-beginner []
08:38 -!- mahafyi [~mahafyi@45.119.28.169] has quit [Ping timeout: 245 seconds]
15:08 -!- mahafyi [~mahafyi@45.119.28.109] has joined #raku-beginner
19:47 < discord-raku-bot> <andrew.solomon#4672> hello! This is day 1 of Raku for me. I'm running the interactive shell (Built on MoarVM version 2021.09) and I'm wondering if there's anything like "help" I can call.
19:48 < lizmat> andrew.solomon: what would expect "help" to say ?
19:50 < discord-raku-bot> <andrew.solomon#4672> well, I'd start with something like
19:50 < discord-raku-bot> <andrew.solomon#4672> ```
19:50 < discord-raku-bot> <andrew.solomon#4672> help(1);
19:50 < discord-raku-bot> <andrew.solomon#4672> ```
19:50 < discord-raku-bot> <andrew.solomon#4672> In the hope that I would understand what the `perl` method is for. ie.
19:50 < discord-raku-bot> <andrew.solomon#4672> ```
19:50 < discord-raku-bot> <andrew.solomon#4672> 1.perl;
19:50 < discord-raku-bot> <andrew.solomon#4672> ```
19:52 < discord-raku-bot> <andrew.solomon#4672> For context - this is where I found it https://en.wikipedia.org/wiki/Variadic_function#In_Raku
19:53 < discord-raku-bot> <gfldex#8222> m: sub help { say 'https://docs.raku.org/language.html' }; help;
19:55 < discord-raku-bot> <gfldex#8222> I guess we could wire `rakudoc` into `help` in the REPL.
21:02 < discord-raku-bot> <andrew.solomon#4672> ok, so the question I should have asked... what's the `perl` method for?
21:02 < discord-raku-bot> <andrew.solomon#4672> ok, so the question I should have asked... what does the `perl` method do?
21:10 < discord-raku-bot> <lakmatiol#8020> I am pretty sure it's an older variant of the `.raku` method, which returns an expression which would evaluate to a given object when possible
21:47 < [Coke]> m: say (3+2).raku
21:47 < [Coke]> ... there's no bot here, oops.
22:03 < discord-raku-bot> <lakmatiol#8020> m: say (3+2).raku
--- Day changed Sun Oct 17 2021
06:29 -!- mahafyi [~mahafyi@45.119.28.109] has quit [Quit: Ping timeout (120 seconds)]
13:28 -!- mahafyi [~mahafyi@182.50.71.121] has joined #raku-beginner
19:18 -!- mfiano [~mfiano@li1282-157.members.linode.com] has joined #raku-beginner
19:19 < mfiano> The Raku documentation has to be the best documentation I've seen for a programming language. This language just keeps growing on me :)
19:19 < lizmat> 2
19:20 < mfiano> I spent the last week reading a very poorly-written book that was recommended to me as an introduction. I regret that
19:20 < lizmat> oops ww
19:27 < mfiano> The amount of thought and flexibility that went into signature objects is just amazing. I read that lengthy section today
19:27 < mfiano> (of the docs)
19:29 < mfiano> Now reading the Containers section, and it already cleared up some misconceptions I had about how it worked under the hood. The writing style of the documentation is superb for an old dummy like me :)
21:54 < discord-raku-bot> <Petr#9247> "Think Raku" - very good also )
--- Day changed Mon Oct 18 2021
04:15 -!- mahafyi [~mahafyi@182.50.71.121] has quit [Ping timeout: 252 seconds]
06:14 -!- mahafyi [~mahafyi@49.204.138.149] has joined #raku-beginner
--- Log closed Mon Oct 18 06:30:37 2021
--- Log opened Mon Oct 18 06:30:50 2021
06:30 -!- gfldex [~dex@ip5f5ab722.dynamic.kabel-deutschland.de] has joined #raku-beginner
06:30 -!- Topic for #raku-beginner: This channel is intended for people just starting with the Raku Programming Language (https://raku.org). This channel is being logged for historical purposes.
06:30 -!- Topic set by lizmat [~textual@ipv4-wenzperl.connected.by.freedominter.net] [Mon Aug 16 16:43:12 2021]
06:30 [Users #raku-beginner]
06:30 [ [Coke] ] [ discord-raku-bot] [ mahafyi ] [ RakuIRCLogger] [ Util]
06:30 [ CIAvash ] [ gfldex ] [ mfiano ] [ sjn ]
06:30 [ codesections] [ lizmat ] [ mjgardner_] [ TempIRCLogger]
06:30 -!- Irssi: #raku-beginner: Total of 13 nicks [0 ops, 0 halfops, 0 voices, 13 normal]
06:30 -!- Channel #raku-beginner created Mon Aug 16 16:35:55 2021
06:31 -!- Irssi: Join to #raku-beginner was synced in 29 secs
09:53 -!- dakkar [~dakkar@home.thenautilus.net] has joined #raku-beginner
11:12 -!- RakuIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has quit [Remote host closed the connection]
11:12 -!- RakuIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
11:23 < mfiano> What does the root object Mu stand for/mean?
11:25 < lizmat> Most Undefined
11:25 < mfiano> Thanks. Also what does the U type smiley stand for?
11:25 < lizmat> Undefined
11:26 < lizmat> I guess that's really a holdover from Perl :-)
11:26 < mfiano> The docs mention not to confused defined with definite. So does the D smiley stand for Defined then? I had assumed Definite
11:26 < lizmat> I guess nowadays it would be a :T for type object, and :I for instantiated :-)
11:27 < lizmat> definite
11:27 < lizmat> m: sub a(Failure:D) { }; a Failure.new
11:27 < lizmat> well, that works :-)
11:28 < lizmat> say Failure.new.defined # False
11:28 < mfiano> Right, Failure is a special case. I just find it odd that :U is not symmetrical like :I[ndefinite] :)
11:28 < lizmat> any class can be a special case, if they override the .defined and .Bool methods :-)
11:28 < mfiano> Right
11:29 < discord-raku-bot> <Nemokosch#9980> what's the difference between defined and definite then?
11:30 < lizmat> basically, definite means that it is not a type object, that it is an instance
11:30 < lizmat> .defined is *usually* the same, but can be overridden
11:30 < mfiano> https://docs.raku.org/type/Signature
11:30 < mfiano> search for "definedness"
11:30 < lizmat> say Failure.new.DEFINITE # True
11:31 < lizmat> say Failure.new.defined # False
11:31 < discord-raku-bot> <Nemokosch#9980> what is a "type object" then?
11:32 < lizmat> class Foo {} # Foo is a type object
11:32 < lizmat> class Foo { }; my $foo = Foo.new; # $foo is an instantiated object of type Foo
11:33 < lizmat> everything in Raku is an object, or has an object representing it (e.g. in the case of native integers)
11:34 < discord-raku-bot> <Nemokosch#9980> hm, this terminology doesn't sound too helpful or even useful
11:38 < mfiano> An instance and a type smartmatch to a type. This is not always what you want in a signature object, so you can use type smiley's to choose either definite or indefinite objects.
11:42 < mfiano> # Str ~~ Str # True
11:43 < mfiano> # Str ~~ Str:D # False
11:43 < mfiano> If you add a type constraint to an optional parameter for example, and it is not supplied as an argument and doesn't have a default value, it receives the type object as its value
11:44 < mfiano> There are many cases where this is not what you want
11:51 -!- mahafyi [~mahafyi@49.204.138.149] has quit [Ping timeout: 252 seconds]
12:26 < discord-raku-bot> <Nemokosch#9980> > If you add a type constraint to an optional parameter for example, and it is not supplied as an argument and doesn't have a default value, it receives the type object as its value
12:26 < discord-raku-bot> <Nemokosch#9980> what the hell, why?
12:29 < mfiano> Because all parameters have values, even if they are un-used in the body block
12:29 < mfiano> This goes in hand with the Smalltalk inspiration of everything being an object
12:36 < discord-raku-bot> <Nemokosch#9980> "everything is an object" fundamentally applies to Python and Javascript as well, I don't think it follows that an unused value should get an incompatible random value
12:36 < discord-raku-bot> <Nemokosch#9980> In this regard, the None and undefined values seem much more fitting
12:37 < mfiano> Sure, but they came a few decades later :-)
12:38 < discord-raku-bot> <Nemokosch#9980> Raku also came a few decades later 😄
12:38 < mfiano> and Smalltalk got it from Lisp
12:38 < discord-raku-bot> <Nemokosch#9980> I mean, just because it's in Smalltalk, I don't think it automatically turns into reasonable behavior
12:39 < discord-raku-bot> <Nemokosch#9980> and the quoted part (about the type object being implicitly the default value) sounds like plain madness to me
12:40 < mfiano> Maybe lizmat or somebody can explain why it is reasonable. My opinion is probably too biased to explain it properly, having used Lisp for more than 20 years.
12:41 < discord-raku-bot> <Nemokosch#9980> It would make more sense in Javascript as a prototype based language but then again, "undefined means missing" still makes more sense than shifting between an "instance object" and a "type object" back and forth which are conceptionally different
12:41 < lizmat> my Int $a; say $a; # Nemokosch: what do you expect that to say ?
12:42 < discord-raku-bot> <Nemokosch#9980> either 0 or an equivalent to undefined, I leave this up to one's temperament
12:42 < mfiano> I guess my Lispy answer to that would be: Nil
12:42 < mfiano> But I know its (Int)
12:42 < lizmat> say Int.defined # what do you expect that to say
12:43 < discord-raku-bot> <Nemokosch#9980> I don't feel like I need that so I can't answer
12:44 < lizmat> well, Int is "an equivalent to undefined" in Raku
12:44 < lizmat> as are all type objects
12:44 < discord-raku-bot> <Nemokosch#9980> the question is: why? it's on a different conceptual level
12:45 < discord-raku-bot> <Nemokosch#9980> the Int type shouldn't be of Int type
12:45 < discord-raku-bot> <Nemokosch#9980> and that's what it suggests
12:46 < discord-raku-bot> <Nemokosch#9980> let's approach this differently, from the pragmatic side
12:47 < discord-raku-bot> <Nemokosch#9980> when is this the behavior that one wants for a lacking Int value?
12:47 < lizmat> well, actually, Int is an instance of Perl6::Metamodel::ClassHOW
12:48 < lizmat> well, it expresses an unfulfilled expectation
12:48 < mfiano> If you supply a type constraint it can't be undefined, or the bottom type, or anything by definition.
12:48 < mfiano> If you don't supply a type constraint, it becomes Any
12:49 < lizmat> my Int $a; say $a # if that would say anything but (Int), it would mean that type checking is broken, as you've indicated you wanted to constrain to Int types
12:49 < lizmat> if you really want to make lack of a value an issue, you should constrain to instances
12:50 < lizmat> my Int:D $a # Variable definition of type Int:D needs to be given an initializer
12:50 < mfiano> Well said
12:51 < discord-raku-bot> <Nemokosch#9980> > well, it expresses an unfulfilled expectation
12:51 < discord-raku-bot> <Nemokosch#9980> That's what None, Nil, undefined all express without setting an unintuitive type structure
12:53 < lizmat> my Int:D $a = Nil # Type check failed in assignment to $a; expected Int:D but got Int (Int) (perhaps Nil was assigned to a :D which had no default?)
12:54 < discord-raku-bot> <Nemokosch#9980> I've never been a big fan of static typing "for the sake of it", I feel we are bumping into conceptional issues again
12:54 < lizmat> my Int:D $a is default(42) = Nil; say $a # 42
12:54 < lizmat> my Int:D $a is default(42); say $a # 42
12:55 < lizmat> Nemokosch: I guess we can agree that we disagree on the sensibility of of Raku types / constraints / signature binding works
12:55 < lizmat> but I think you're about 18 years late in this discussion
12:56 < discord-raku-bot> <Nemokosch#9980> it's important to draw attention to questionable decisions as well though
12:57 < discord-raku-bot> <Nemokosch#9980> > if that would say anything but (Int), it would mean that type checking is broken, as you've indicated you wanted to constrain to Int types
12:57 < discord-raku-bot> <Nemokosch#9980> this seems to be the only argument and well, this argument is very implementation-oriented
12:57 < lizmat> Nemokosch: a Pull Request tells more than a thousand words
12:58 < lizmat> if you think it should be different, please make an issue in the problem solving repo
12:58 < lizmat> https://github.com/raku/problem-solving
13:02 < discord-raku-bot> <Nemokosch#9980> so just to get this straight
13:03 < discord-raku-bot> <Nemokosch#9980> ```perl
13:03 < discord-raku-bot> <Nemokosch#9980> my Int $a;
13:03 < discord-raku-bot> <Nemokosch#9980> ```
13:03 < discord-raku-bot> <Nemokosch#9980> on this, I can call .new
13:04 < lizmat> yes
13:04 < discord-raku-bot> <Nemokosch#9980> that's pretty interesting by itself if this isn't a prototype-based language but okay, apparently you can call .new on any integer value
13:04 -!- samebchase [~thelounge@51.15.68.182] has joined #raku-beginner
13:05 < lizmat> you can call .new on anything in Raku, even native types :-)
13:05 < discord-raku-bot> <Nemokosch#9980> ```perl
13:05 < discord-raku-bot> <Nemokosch#9980> > $a.^name
13:05 < discord-raku-bot> <Nemokosch#9980> Int
13:05 < discord-raku-bot> <Nemokosch#9980> ```
13:05 < discord-raku-bot> <Nemokosch#9980> wait for a second
13:06 < mfiano> True.new # False :-)
13:06 < discord-raku-bot> <Nemokosch#9980> do instance objects straight up cover the whole interface of a type object then?
13:06 < lizmat> well, enums are special in that respect :-)
13:07 < lizmat> mfiano: but that's effectively Bool.new
13:07 < discord-raku-bot> <Nemokosch#9980> if they do, it can work consistently at the end of the day
13:08 < lizmat> instance objects *can* cover up the whole interface if they want to, yes
13:08 < lizmat> it all depends whether the class has different multi-methods for instantiated invocants and type object as the invocant
13:08 < lizmat> (or handles that in code inside an only method)
13:11 < discord-raku-bot> <Nemokosch#9980> I mean, it seems like the approach is the other way around than I imagined
13:12 < discord-raku-bot> <Nemokosch#9980> it's much more like everything is a kind of prototype
13:13 < lizmat> you could argue that, yes
13:16 < discord-raku-bot> <Nemokosch#9980> or maybe it's more fitting to say given the context, value objects can "collapse into" the corresponding type object?
13:18 < discord-raku-bot> <Nemokosch#9980> when True.new works and returns False, is it more like a conversion from True to Bool or True itself "does Bool"?
13:19 < lizmat> actually, I never considered calling .new on Enums... so I would need to think a out that
13:32 < mfiano> Hmm, I could use some clarification on a section of the class tutorial: https://docs.raku.org/language/classtut#The_also_declarator
13:33 < mfiano> In reading that, it is unclear to me what prefixing "also" actually does, or if it is no different than simply "is ..."
13:34 -!- camelia [~p6eval@camelia.detonation.org] has joined #raku-beginner
13:34 < mfiano> Oh I see, it is inside the block
13:34 < mfiano> Hmm, not sure what this solves.
13:35 < mfiano> m: say "Hi, camelia!"
13:35 < camelia> rakudo-moar 1d8bf66a5: OUTPUT: «Hi, camelia!␤»
13:38 < lizmat> mfiano: I don't recall why "also" still exists, but I think it has to do with giving you some compile time flexibility in deciding on class hierarchy
13:38 < mfiano> That makes sense.
13:38 < lizmat> morirz++
13:48 -!- mahafyi [~mahafyi@182.50.71.121] has joined #raku-beginner
13:51 < discord-raku-bot> <Morfent#9811> m:```
13:51 < discord-raku-bot> <Morfent#9811> role Lazy {
13:51 < discord-raku-bot> <Morfent#9811> # use ...;
13:51 < discord-raku-bot> <Morfent#9811> also is #`[...] Int;
13:51 < discord-raku-bot> <Morfent#9811> };
13:51 < discord-raku-bot> <Morfent#9811> say Lazy.new;
13:51 < discord-raku-bot> <Morfent#9811> ```
13:51 < discord-raku-bot> <Morfent#9811> lazy module loading in the case of roles
13:52 < lizmat> if you call .new on a Role, It will get punned into an anonymous class with the same name, and have .new called on that
13:58 < discord-raku-bot> <Morfent#9811> i wonder if i can take advantage of this in `Data::Record`...
13:58 < discord-raku-bot> <Morfent#9811> that module takes forever to precomp
15:29 < discord-raku-bot> <Morfent#9811> another way to defer module loading is `role ...[::T] does T` parameterized by a `require`d type
15:30 < discord-raku-bot> <Morfent#9811> that helps according to `raku --stagestat`, but parsing still takes a long time
15:30 < discord-raku-bot> <Morfent#9811> maybe the module's too monolithic
15:32 < discord-raku-bot> <Morfent#9811> that helps according to `raku --stagestats`, but parsing still takes a long time
16:39 -!- mjgardner_ is now known as mjgardner
18:51 -!- dakkar [~dakkar@home.thenautilus.net] has quit [Ping timeout: 264 seconds]
20:25 < gfldex> mfiano, Nemokosch#9980 please note that (almost) any assumption can be broken in Raku
20:25 < gfldex> consider: (my $oddject = Metamodel::ClassHOW.new_type(name => "")).&{.^add_method('FALLBACK', method ($name) { 'cheating' }); .^compose};
21:30 < discord-raku-bot> <Nemokosch#9980> oddject xD
--- Day changed Tue Oct 19 2021
01:14 -!- colemanx [~coleman@2605:a601:5529:1e00:2193:8b23:d8ca:2779] has joined #raku-beginner
01:15 < colemanx> Hello everyone. I've written a grammar, and it seems to have pinned a cpu, and my program doesn't finish.
01:16 < colemanx> Here is the github gist: https://envs.sh/AN
01:17 < colemanx> There is some sample data attached there, as well. I am familiar with regex, but not sure why the program doesn't finish.
01:20 < [Coke]> what are you passing as the path?
01:22 < [Coke]> oh, data.
01:30 < [Coke]> I recommend using Grammar::Debugger.
01:30 < [Coke]> if you install that and use it in your program, you can see that it matches the first sep, and then tries to match an item and immediately goes into the weeds
01:40 < [Coke]> also: "item" is apparently special, don't use that as a name.
01:41 < [Coke]> once it starts parsing, you start getting errors about wrong number of args because it's trying to give it to a different item.
01:42 < [Coke]> https://gist.github.com/coke/f1d594983af0ae826b7f4c3cbc235608
01:56 < colemanx> Thank you, I was afk for a bit, but I'll install Grammar:Debugger
04:13 -!- mahafyi [~mahafyi@182.50.71.121] has quit [Ping timeout: 260 seconds]
07:05 -!- mahafyi [~mahafyi@49.204.138.149] has joined #raku-beginner
07:52 < CIAvash> .tell colemanx your main issue is `\s*`, which should be `\s+`, but also `\w+` won't match punctuation. Also you can match the whole file with grammar, no need to match line by line: `grammar Row { token TOP { <line>+ }; token line { <sep> [ <cell> ** 5 %% <sep> ] \n? }; token sep { '|' }; token cell { <-[|]>+ }; }`. you can make cell `<-[|\n]>`, and remove ` ** 5` if cells are not supposed to have newlines.
10:12 -!- dakkar [~dakkar@home.thenautilus.net] has joined #raku-beginner
11:50 -!- mahafyi [~mahafyi@49.204.138.149] has quit [Ping timeout: 260 seconds]
17:16 -!- kiky [~kiky@79.133.158.218] has joined #raku-beginner
17:16 -!- kiky [~kiky@79.133.158.218] has quit [Client Quit]
17:58 -!- mahafyi [~mahafyi@182.50.71.121] has joined #raku-beginner
18:51 -!- dakkar [~dakkar@home.thenautilus.net] has quit [Ping timeout: 258 seconds]
19:29 < colemanx> I have ended up using .split to just solve the problem without grammars. But I will try again on my next parsing problem
19:30 < colemanx> I am reshaping a lot of my company's documentation this sprint, and little scripts are saving my life :)
19:30 < colemanx> I like Raku regexes, I am just not used to writing them, yet
20:46 -!- mahafyi [~mahafyi@182.50.71.121] has quit [Ping timeout: 258 seconds]
22:43 -!- melezhik43 [~melezhik@c-73-32-143-85.hsd1.tx.comcast.net] has joined #raku-beginner
22:48 -!- melezhik43 [~melezhik@c-73-32-143-85.hsd1.tx.comcast.net] has quit [Client Quit]
--- Day changed Wed Oct 20 2021
05:53 -!- mahafyi [~mahafyi@49.204.138.149] has joined #raku-beginner
08:14 -!- Util [~bruce@047-013-182-182.res.spectrum.com] has quit [Ping timeout: 268 seconds]
08:21 -!- Util [~bruce@047-013-182-182.res.spectrum.com] has joined #raku-beginner
09:00 -!- sjn_ [sjn@sprocket.nvg.ntnu.no] has joined #raku-beginner
09:09 -!- sjn [sjn@sprocket.nvg.ntnu.no] has quit [Ping timeout: 260 seconds]
10:01 -!- dakkar [~dakkar@home.thenautilus.net] has joined #raku-beginner
12:05 -!- mahafyi [~mahafyi@49.204.138.149] has quit [Ping timeout: 260 seconds]
12:56 -!- Util [~bruce@047-013-182-182.res.spectrum.com] has quit [Ping timeout: 264 seconds]
13:03 -!- Util [~bruce@047-013-182-182.res.spectrum.com] has joined #raku-beginner
14:53 -!- mahafyi [~mahafyi@45.119.28.111] has joined #raku-beginner
15:56 < discord-raku-bot> <RaycatWhoDat#0001> ^
18:38 -!- dakkar [~dakkar@home.thenautilus.net] has quit [Ping timeout: 258 seconds]
23:34 -!- sjn_ is now known as sjn
--- Day changed Thu Oct 21 2021
00:37 -!- cialandro [~cialandro@8.9.231.168] has joined #raku-beginner
00:38 -!- cialandro [~cialandro@8.9.231.168] has quit [Client Quit]
04:23 -!- mahafyi [~mahafyi@45.119.28.111] has quit [Ping timeout: 258 seconds]
06:06 -!- mahafyi [~mahafyi@49.204.138.149] has joined #raku-beginner
06:40 -!- mahafyi [~mahafyi@49.204.138.149] has quit [Ping timeout: 260 seconds]
08:05 -!- coleman-x [~coleman@2605:a601:5529:1e00:3f9e:cb1:df42:c6f3] has joined #raku-beginner
08:07 -!- colemanx [~coleman@2605:a601:5529:1e00:2193:8b23:d8ca:2779] has quit [Ping timeout: 245 seconds]
09:54 -!- dakkar [~dakkar@home.thenautilus.net] has joined #raku-beginner
13:43 -!- mahafyi [~mahafyi@45.119.28.111] has joined #raku-beginner
16:11 -!- TempIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has quit [Remote host closed the connection]
16:16 -!- lizmat [~textual@ipv4-wenzperl.connected.by.freedominter.net] has quit [Quit: Textual IRC Client: www.textualapp.com]
18:14 -!- melezhik [~melezhik@c-73-32-143-85.hsd1.tx.comcast.net] has joined #raku-beginner
18:30 -!- melezhik [~melezhik@c-73-32-143-85.hsd1.tx.comcast.net] has quit [Quit: Ping timeout (120 seconds)]
18:45 -!- dakkar [~dakkar@home.thenautilus.net] has quit [Quit: e via, verso nuove avventure]
19:08 -!- melezhik [~melezhik@c-73-32-143-85.hsd1.tx.comcast.net] has joined #raku-beginner
19:14 -!- melezhik [~melezhik@c-73-32-143-85.hsd1.tx.comcast.net] has quit [Quit: Ping timeout (120 seconds)]
19:47 -!- TempIRCLogger [~RakuIRC@89.205.139.200] has joined #raku-beginner
19:53 -!- lizmat [~textual@89.205.139.200] has joined #raku-beginner
20:55 -!- TempIRCLogger [~RakuIRC@89.205.139.200] has quit [Remote host closed the connection]
20:56 -!- lizmat [~textual@89.205.139.200] has quit [Quit: Textual IRC Client: www.textualapp.com]
22:44 -!- lizmat [~textual@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
22:44 -!- TempIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
--- Day changed Fri Oct 22 2021
04:18 -!- [Coke] [~coke@172.58.236.208] has quit [Ping timeout: 268 seconds]
04:21 -!- [Coke] [~coke@172.58.235.233] has joined #raku-beginner
04:26 -!- mahafyi [~mahafyi@45.119.28.111] has quit [Ping timeout: 260 seconds]
04:56 < discord-raku-bot> <mori#6536> how can i make rakudo stop creating ~/.raku folder
04:56 < discord-raku-bot> <mori#6536> i want to use XDG spec for it
17:06 < discord-raku-bot> <Rogue#2017> I think `--rakudo-home=XXX`
23:31 -!- Netsplit *.net <-> *.split quits: samebchase, discord-raku-bot, mfiano
23:31 -!- mfiano [~mfiano@li1282-157.members.linode.com] has joined #raku-beginner
23:31 -!- discord-raku-bot [~RakuIRC@ip5f5ab722.dynamic.kabel-deutschland.de] has joined #raku-beginner
23:31 -!- samebchase [~thelounge@51.15.68.182] has joined #raku-beginner
23:59 -!- discord-raku-bot [~RakuIRC@ip5f5ab722.dynamic.kabel-deutschland.de] has quit [Remote host closed the connection]
23:59 -!- discord-raku-bot [~RakuIRC@ip5f5ab722.dynamic.kabel-deutschland.de] has joined #raku-beginner
--- Day changed Sat Oct 23 2021
00:48 -!- melezhik [~melezhik@mobile-107-77-220-131.mobile.att.net] has joined #raku-beginner
00:54 -!- melezhik [~melezhik@mobile-107-77-220-131.mobile.att.net] has quit [Ping timeout: 244 seconds]
04:15 -!- melezhik [~melezhik@c-73-32-143-85.hsd1.tx.comcast.net] has joined #raku-beginner
04:20 -!- mjgardner [sid182628@ilkley.irccloud.com] has quit [Read error: Connection reset by peer]
04:22 -!- mjgardner [sid182628@id-182628.ilkley.irccloud.com] has joined #raku-beginner
04:24 -!- melezhik [~melezhik@c-73-32-143-85.hsd1.tx.comcast.net] has quit [Quit: Connection closed]
04:32 -!- mjgardner [sid182628@id-182628.ilkley.irccloud.com] has quit [Ping timeout: 258 seconds]
04:36 -!- mjgardner [sid182628@ilkley.irccloud.com] has joined #raku-beginner
--- Day changed Sun Oct 24 2021
01:19 -!- discord-raku-bot [~RakuIRC@ip5f5ab722.dynamic.kabel-deutschland.de] has quit [Remote host closed the connection]
01:19 -!- discord-raku-bot [~RakuIRC@ip5f5ab722.dynamic.kabel-deutschland.de] has joined #raku-beginner
19:41 < discord-raku-bot> <Anton Antonov#7232> Hi! I think there should be a more direct and concise way to do following check: `‌‌[and] ['dfd', 1, 2, NaN, 32, Whatever].map({ $_ ~~ Numeric or $_ ~~ NaN })` . I want to verify that the elements of an array are one of two possible classes/objects. I tried coming up with an `.all` statement without much success. E.g. `[1, 2, 32, NaN] ~~ (Numeric | NaN)`.
19:41 < discord-raku-bot> <Anton Antonov#7232> Hi! I think there should be a more direct and concise way to do the following check: `‌‌[and] ['dfd', 1, 2, NaN, 32, Whatever].map({ $_ ~~ Numeric or $_ ~~ NaN })` . I want to verify that the elements of an array are one of two possible classes/objects. I tried coming up with an `.all` statement without much success. E.g. `[1, 2, 32, NaN] ~~ (Numeric | NaN)`.
19:41 < discord-raku-bot> <Anton Antonov#7232> Hi! I think there should be a more direct and concise way to do the following check: `‌‌[and] ['dfd', 1, 2, NaN, 32].map({ $_ ~~ Numeric or $_ ~~ NaN })` . I want to verify that the elements of an array are one of two possible classes/objects. I tried coming up with an `.all` statement without much success. E.g. `[1, 2, 32, NaN] ~~ (Numeric | NaN)`.
19:55 < discord-raku-bot> <Bearhug#1761> ```perl
19:55 < discord-raku-bot> <Bearhug#1761> > [1,2,32,NaN].all ~~ (Numeric | NaN)
19:55 < discord-raku-bot> <Bearhug#1761> True
19:55 < discord-raku-bot> <Bearhug#1761> > [1,'s',32,NaN].all ~~ (Numeric | NaN)
19:55 < discord-raku-bot> <Bearhug#1761> False
19:55 < discord-raku-bot> <Bearhug#1761> > [].all ~~ (Numeric | NaN)
19:55 < discord-raku-bot> <Bearhug#1761> True
19:55 < discord-raku-bot> <Bearhug#1761> ```
20:07 < discord-raku-bot> <Anton Antonov#7232> Hi! I think there should be a more direct and concise way to do the following check: `‌‌[and] ['dfd', 1, 2, NaN, 32].map({ $_ ~~ Numeric or $_ ~~ NaN })` . I want to verify that the elements of an array are one of two possible classes/objects. I tried coming up with an `.all` statement without much success. E.g. `[1, 2, 32, NaN].all ~~ (Numeric | NaN)`.
20:11 < discord-raku-bot> <Anton Antonov#7232> @Bearhug#1761 No, that does not work -- I tried that. (I pasted incorrect code in my question above, it is corrected now.) To see that it does not work try this: `‌‌['dfd', 1, 2, 32, NaN].all ~~ (Str | Numeric | NaN)` .
20:12 < discord-raku-bot> <Anton Antonov#7232> @Bearhug#1761 No, that does not work -- I tried that. (I pasted incorrect code in my question above, it is corrected now.) To see that it does not work try this: `‌‌['dfd', 1, 2, 32, NaN].all ~~ (Str | Numeric | NaN)` . (Gives `False`.)
20:52 < discord-raku-bot> <gfldex#8222> m: say NaN.WHAT;
20:53 < discord-raku-bot> <gfldex#8222> @Anton Antonov#7232 NaN is not a typeobject. You have to use `.isNaN` .
20:55 < discord-raku-bot> <gfldex#8222> m:```
20:55 < discord-raku-bot> <gfldex#8222> subset StrNumeric where * ~~ Str | Numeric;
20:55 < discord-raku-bot> <gfldex#8222> say ('dfd', 1, 2, NaN, 32).all ~~ StrNumeric;
20:55 < discord-raku-bot> <gfldex#8222> ```
20:55 < discord-raku-bot> <gfldex#8222> Any fancy type check is best placed inside a subset.
20:58 < discord-raku-bot> <Morfent#9811> `['dfd', 1, 2, 32, NaN].all ~~ (Str | Numeric | NaN)` doesn't work because it expands to `(.all ~~ Str) | (.all ~~ Numeric) | (.all ~~ NaN)`
21:00 < discord-raku-bot> <Anton Antonov#7232> @Morfent#9811 Thanks, that clarifies it.
--- Day changed Mon Oct 25 2021
06:16 -!- fpittel [~fpittel@50-206-250-254-static.hfc.comcastbusiness.net] has joined #raku-beginner
06:17 -!- fpittel [~fpittel@50-206-250-254-static.hfc.comcastbusiness.net] has quit [Client Quit]
09:52 -!- dakkar [~dakkar@home.thenautilus.net] has joined #raku-beginner
15:47 -!- erniogi [~erniogi@fp9f1cc3c3.tkyc626.ap.nuro.jp] has joined #raku-beginner
15:48 -!- erniogi [~erniogi@fp9f1cc3c3.tkyc626.ap.nuro.jp] has quit [Client Quit]
15:55 -!- aitron [~aitron@188.170.196.154] has joined #raku-beginner
15:56 -!- aitron [~aitron@188.170.196.154] has quit [Client Quit]
15:56 -!- aitron [~aitron@188.170.196.154] has joined #raku-beginner
17:44 -!- aitron [~aitron@188.170.196.154] has quit [Read error: Connection reset by peer]
17:50 -!- aitron [~aitron@188.170.196.154] has joined #raku-beginner
17:56 -!- aitron [~aitron@188.170.196.154] has quit [Quit: Quit]
17:56 -!- aitron [~aitron@188.170.196.154] has joined #raku-beginner
18:00 -!- aitron [~aitron@188.170.196.154] has quit [Client Quit]
18:33 -!- dakkar [~dakkar@home.thenautilus.net] has quit [Ping timeout: 244 seconds]
18:51 < coleman-x> Is there any limitation - in principle - to what a Raku grammar can parse?
18:51 < coleman-x> My understanding is that Raku itself can be parsed with a Raku grammar.
18:51 < coleman-x> Is that true?
18:58 < lizmat> yes, that's how the Rakudo is set up, yes
19:34 < coleman-x> amazing :)
19:49 < lizmat> and yet another Rakudo Weekly News hits the Net: https://rakudoweekly.blog/2021/10/25/2021-43-thank-you/
22:01 < discord-raku-bot> <Anton Antonov#7232> coleman-x You might want to be interested to see this repository: https://github.com/drforr/perl6-Perl6-Parser
22:02 < discord-raku-bot> <Anton Antonov#7232> coleman-x You might want to be interested to see this repository: https://github.com/drforr/perl6-Perl6-Parser
22:07 < discord-raku-bot> <Anton Antonov#7232> coleman-x You might be interested to see this repository: https://github.com/drforr/perl6-Perl6-Parser
--- Day changed Tue Oct 26 2021
10:19 -!- dakkar [~dakkar@home.thenautilus.net] has joined #raku-beginner
15:11 -!- discord-raku-bot [~RakuIRC@ip5f5ab722.dynamic.kabel-deutschland.de] has quit [Remote host closed the connection]
15:11 -!- discord-raku-bot [~RakuIRC@ip5f5ab722.dynamic.kabel-deutschland.de] has joined #raku-beginner
17:20 -!- coleman-x [~coleman@2605:a601:5529:1e00:3f9e:cb1:df42:c6f3] has quit [Quit: Leaving]
18:38 -!- dakkar [~dakkar@home.thenautilus.net] has quit [Ping timeout: 260 seconds]
23:05 -!- discord-raku-bot [~RakuIRC@ip5f5ab722.dynamic.kabel-deutschland.de] has quit [Remote host closed the connection]
23:05 -!- discord-raku-bot [~RakuIRC@95.90.183.34] has joined #raku-beginner
23:16 < [Coke]> are the dupes coming from the discord bot itself or the users?
23:17 < lizmat> gfldex might know
23:18 < discord-raku-bot> <avuserow#1203> Maybe how edits are sent to irc?
23:18 < gfldex> Those dupes can be caused by edits of already posted lines.
23:18 < gfldex> I don't really have a sound solution.
23:20 < [Coke]> ah, I didn't noticed the last one was different.
23:21 < lizmat> gfldex: don't the lines have some kind of ID that you could use to .squish on ?
23:22 < gfldex> That would require to delay forwarding a message. How long shoult it wait? Edits can happen hours later.
23:23 < lizmat> no I mean, don't send edits ?
23:23 < lizmat> but yeah, I see your point
23:23 * lizmat goes afk&
23:24 < gfldex> That could cause confusion because the IRC side can refer to a message that doesn't quite exist on the discord side.
23:27 < [Coke]> maybe tag the message with [EDIT]?
23:27 < [Coke]> but edits seems a perfectably good reason to send near-dupes. no worries
23:28 < gfldex> No reason not to give it a try.
--- Day changed Wed Oct 27 2021
10:03 -!- dakkar [~dakkar@home.thenautilus.net] has joined #raku-beginner
13:12 -!- Netsplit *.net <-> *.split quits: dakkar, [Coke], codesections, mjgardner, CIAvash, lizmat, RakuIRCLogger, samebchase, camelia, discord-raku-bot, (+1 more, use /NETSPLIT to show all of them)
13:15 -!- tbrowder [sid168924@lymington.irccloud.com] has joined #raku-beginner
13:15 -!- dakkar [~dakkar@home.thenautilus.net] has joined #raku-beginner
13:15 -!- discord-raku-bot [~RakuIRC@95.90.183.34] has joined #raku-beginner
13:15 -!- mjgardner [sid182628@ilkley.irccloud.com] has joined #raku-beginner
13:15 -!- samebchase [~thelounge@51.15.68.182] has joined #raku-beginner
13:15 -!- [Coke] [~coke@172.58.235.233] has joined #raku-beginner
13:15 -!- lizmat [~textual@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
13:15 -!- sjn [sjn@sprocket.nvg.ntnu.no] has joined #raku-beginner
13:15 -!- camelia [~p6eval@camelia.detonation.org] has joined #raku-beginner
13:15 -!- RakuIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
13:15 -!- CIAvash [~ciavash@2001:470:69fc:105::264] has joined #raku-beginner
13:15 -!- codesections [~codesecti@codesections.com] has joined #raku-beginner
13:44 -!- [Coke]_ [~coke@172.58.235.233] has joined #raku-beginner
13:52 -!- Netsplit *.net <-> *.split quits: [Coke]
15:11 -!- [Coke]_ is now known as [Coke]
18:33 -!- dakkar [~dakkar@home.thenautilus.net] has quit [Ping timeout: 260 seconds]
--- Day changed Thu Oct 28 2021
05:13 -!- melezhik [~melezhik@c-73-32-143-85.hsd1.tx.comcast.net] has joined #raku-beginner
05:17 -!- melezhik [~melezhik@c-73-32-143-85.hsd1.tx.comcast.net] has quit [Client Quit]
--- Log closed Thu Oct 28 05:31:30 2021
--- Log opened Thu Oct 28 05:31:43 2021
05:31 -!- gfldex [~dex@ip5f5ab74b.dynamic.kabel-deutschland.de] has joined #raku-beginner
05:31 -!- Topic for #raku-beginner: This channel is intended for people just starting with the Raku Programming Language (https://raku.org). This channel is being logged for historical purposes.
05:31 -!- Topic set by lizmat [~textual@ipv4-wenzperl.connected.by.freedominter.net] [Mon Aug 16 16:43:12 2021]
05:31 [Users #raku-beginner]
05:31 [ [Coke] ] [ codesections] [ mfiano ] [ samebchase] [ TempIRCLogger]
05:31 [ camelia] [ gfldex ] [ mjgardner ] [ sjn ] [ Util ]
05:31 [ CIAvash] [ lizmat ] [ RakuIRCLogger] [ tbrowder ]
05:31 -!- Irssi: #raku-beginner: Total of 14 nicks [0 ops, 0 halfops, 0 voices, 14 normal]
05:31 -!- Channel #raku-beginner created Mon Aug 16 16:35:55 2021
05:32 -!- Irssi: Join to #raku-beginner was synced in 33 secs
10:08 -!- dakkar [~dakkar@home.thenautilus.net] has joined #raku-beginner
14:35 -!- discord-raku-bot [~RakuIRC@ip5f5ab74b.dynamic.kabel-deutschland.de] has joined #raku-beginner
18:29 -!- dakkar [~dakkar@home.thenautilus.net] has quit [Quit: e via, verso nuove avventure]
22:26 -!- RakuIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has quit [Remote host closed the connection]
22:26 -!- RakuIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
22:27 -!- TempIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has quit [Remote host closed the connection]
22:28 -!- TempIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
--- Day changed Fri Oct 29 2021
05:34 -!- melezhik76 [~melezhik@c-73-32-143-85.hsd1.tx.comcast.net] has joined #raku-beginner
05:34 -!- melezhik76 is now known as melezhik2
05:41 -!- melezhik2 [~melezhik@c-73-32-143-85.hsd1.tx.comcast.net] has quit [Quit: Ping timeout (120 seconds)]
07:55 -!- [Coke] [~coke@172.58.235.233] has quit [Ping timeout: 260 seconds]
11:45 -!- mfiano [~mfiano@li1282-157.members.linode.com] has quit [Quit: WeeChat 3.2]
13:38 -!- [Coke] [~coke@172.58.239.101] has joined #raku-beginner
18:34 -!- mjgardner [sid182628@ilkley.irccloud.com] has quit [Ping timeout: 244 seconds]
18:36 -!- mjgardner [sid182628@id-182628.ilkley.irccloud.com] has joined #raku-beginner
--- Log closed Sat Oct 30 02:00:02 2021
--- Log opened Sat Oct 30 02:05:15 2021
02:05 -!- gfldex [~dex@95.90.183.75] has joined #raku-beginner
02:05 -!- Topic for #raku-beginner: This channel is intended for people just starting with the Raku Programming Language (https://raku.org). This channel is being logged for historical purposes.
02:05 -!- Topic set by lizmat [~textual@ipv4-wenzperl.connected.by.freedominter.net] [Mon Aug 16 16:43:12 2021]
02:05 [Users #raku-beginner]
02:05 [ [Coke] ] [ codesections ] [ lizmat ] [ samebchase] [ TempIRCLogger]
02:05 [ camelia] [ discord-raku-bot] [ mjgardner ] [ sjn ] [ Util ]
02:05 [ CIAvash] [ gfldex ] [ RakuIRCLogger] [ tbrowder ]
02:05 -!- Irssi: #raku-beginner: Total of 14 nicks [0 ops, 0 halfops, 0 voices, 14 normal]
02:05 -!- Channel #raku-beginner created Mon Aug 16 16:35:55 2021
02:05 -!- Irssi: Join to #raku-beginner was synced in 33 secs
17:45 -!- [Coke] [~coke@172.58.239.101] has quit [Ping timeout: 246 seconds]
17:50 -!- [Coke] [~coke@172.58.236.252] has joined #raku-beginner
18:14 -!- superboot [~agentgasm@user/superboot] has joined #raku-beginner
21:49 -!- [Coke] [~coke@172.58.236.252] has quit [Ping timeout: 246 seconds]
22:13 -!- [Coke] [~coke@172.58.236.252] has joined #raku-beginner
--- Day changed Sun Oct 31 2021
02:35 -!- melezhik [~melezhik@c-73-32-143-85.hsd1.tx.comcast.net] has joined #raku-beginner
02:43 -!- melezhik [~melezhik@c-73-32-143-85.hsd1.tx.comcast.net] has quit [Quit: Ping timeout (120 seconds)]
02:46 -!- melezhik [~melezhik@c-73-32-143-85.hsd1.tx.comcast.net] has joined #raku-beginner
02:03 -!- melezhik [~melezhik@c-73-32-143-85.hsd1.tx.comcast.net] has quit [Ping timeout: 245 seconds]
04:15 -!- superboot [~agentgasm@user/superboot] has quit [Quit: leaving]
06:00 -!- [Coke] [~coke@172.58.236.252] has quit [Ping timeout: 264 seconds]
07:39 -!- [Coke] [~coke@172.58.236.196] has joined #raku-beginner
21:27 -!- ramiroencinas [~ramiroenc@127.red-88-16-14.dynamicip.rima-tde.net] has joined #raku-beginner
21:29 -!- ramiroencinas [~ramiroenc@127.red-88-16-14.dynamicip.rima-tde.net] has quit [Quit: Connection closed]
21:30 -!- ramiroencinas [~ramiroenc@127.red-88-16-14.dynamicip.rima-tde.net] has joined #raku-beginner
21:30 -!- ramiroencinas [~ramiroenc@127.red-88-16-14.dynamicip.rima-tde.net] has quit [Client Quit]
22:40 -!- gabriel80546 [~gabriel80@179.215.180.176] has joined #raku-beginner
22:40 < gabriel80546> how to use 1..8 in a for loop?
22:41 < [Coke]> m: for 1..8 { $_.say }
22:41 < camelia> rakudo-moar 580b3ba79: OUTPUT: «1␤2␤3␤4␤5␤6␤7␤8␤»
22:41 < [Coke]> m: my $a; for 1..8 -> $c { $a+=$c }; say $a;
22:41 < camelia> rakudo-moar 580b3ba79: OUTPUT: «36␤»
22:41 < gabriel80546> thank you very much
22:41 < [Coke]> np
--- Day changed Mon Nov 01 2021
00:09 < discord-raku-bot> <lakmatiol#8020> I am slightly confused: how come it matches only when the two is in {}, I thought that was just a way to substitute raku expressions into the regex
00:09 < discord-raku-bot> <lakmatiol#8020> ```perl
00:09 < discord-raku-bot> <lakmatiol#8020> > '12345671' ~~ /(. ** {2}).+$0/
00:09 < discord-raku-bot> <lakmatiol#8020> 「12345671」
00:09 < discord-raku-bot> <lakmatiol#8020> 0 => 「1」
00:09 < discord-raku-bot> <lakmatiol#8020> > '12345671' ~~ /(. ** 2).+$0/
00:09 < discord-raku-bot> <lakmatiol#8020> Nil
00:09 < discord-raku-bot> <lakmatiol#8020> ```
00:09 < discord-raku-bot> <lakmatiol#8020> I am slightly confused: how come it matches only when the 2 is in {}, I thought that was just a way to substitute raku expressions into the regex
00:09 < discord-raku-bot> <lakmatiol#8020> ```perl
00:09 < discord-raku-bot> <lakmatiol#8020> > '12345671' ~~ /(. ** {2}).+$0/
00:09 < discord-raku-bot> <lakmatiol#8020> 「12345671」
00:09 < discord-raku-bot> <lakmatiol#8020> 0 => 「1」
00:09 < discord-raku-bot> <lakmatiol#8020> > '12345671' ~~ /(. ** 2).+$0/
00:09 < discord-raku-bot> <lakmatiol#8020> Nil
00:09 < discord-raku-bot> <lakmatiol#8020> ```
00:30 < discord-raku-bot> <lakmatiol#8020> also, do capture groups in lookaheads and lookbehinds not work?
00:33 -!- melezhik [~melezhik@c-73-32-143-85.hsd1.tx.comcast.net] has joined #raku-beginner
00:40 -!- melezhik [~melezhik@c-73-32-143-85.hsd1.tx.comcast.net] has quit [Ping timeout: 245 seconds]
00:41 -!- gabriel80546 [~gabriel80@179.215.180.176] has quit [Quit: Connection closed]
02:26 < discord-raku-bot> <gfldex#8222> @lakmatiol#8020 `$/` and thus `$0` are not automatically populated within a regex. They come to existence in any block or outside the regex. You can force that by having a block inside the regex.
02:28 < discord-raku-bot> <gfldex#8222> m: say '12345671' ~~ / $<ref> = [ . ** 1 ] .+ $<ref> /;
02:29 < discord-raku-bot> <gfldex#8222> m: say '123456712' ~~ / $<ref> = [ . ** 2 ] .+ $<ref> /;
02:29 < discord-raku-bot> <gfldex#8222> Also, your example is wrong. :)
05:13 -!- lizmat_ [~textual@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
05:13 -!- RakuIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has quit [Ping timeout: 265 seconds]
05:14 -!- TempIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has quit [Ping timeout: 260 seconds]
05:14 -!- lizmat [~textual@ipv4-wenzperl.connected.by.freedominter.net] has quit [Ping timeout: 260 seconds]
07:49 < discord-raku-bot> <lakmatiol#8020> ah, I see
07:51 < discord-raku-bot> <lakmatiol#8020> `/(.)$0 ** {$p - 1}/`but this regex works as it should
07:51 < discord-raku-bot> <lakmatiol#8020> ```
07:51 < discord-raku-bot> <lakmatiol#8020> > my $p = 3;
07:51 < discord-raku-bot> <lakmatiol#8020> 3
07:51 < discord-raku-bot> <lakmatiol#8020> > 'aaa'~~ /(.)$0 ** {$p - 1}/
07:51 < discord-raku-bot> <lakmatiol#8020> 「aaa」
07:51 < discord-raku-bot> <lakmatiol#8020> 0 => 「a」
07:51 < discord-raku-bot> <lakmatiol#8020> > 'aab'~~ /(.)$0 ** {$p - 1}/
07:51 < discord-raku-bot> <lakmatiol#8020> Nil
07:51 < discord-raku-bot> <lakmatiol#8020> > 'aabbba'~~ /(.)$0 ** {$p - 1}/
07:51 < discord-raku-bot> <lakmatiol#8020> 「bbb」
07:51 < discord-raku-bot> <lakmatiol#8020> 0 => 「b」
07:51 < discord-raku-bot> <lakmatiol#8020> 0 => 「b」
07:51 < discord-raku-bot> <lakmatiol#8020> ```
09:26 -!- RakuIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
09:26 -!- lizmat_ [~textual@ipv4-wenzperl.connected.by.freedominter.net] has quit [Quit: Textual IRC Client: www.textualapp.com]
09:26 -!- TempIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
09:26 -!- lizmat [~textual@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
09:55 -!- dakkar [~dakkar@home.thenautilus.net] has joined #raku-beginner
10:14 < discord-raku-bot> <gfldex#8222> @lakmatiol#8020 Because the contained block forces `$/` to be set.
10:21 < discord-raku-bot> <gabriel80546#9187> @gfldex#8222 hi
10:22 < discord-raku-bot> <gabriel80546#9187> i want to use a predicate on a for loop
10:22 < discord-raku-bot> <gabriel80546#9187> for (1..7) but only the even numbers
10:23 < lizmat> for 2,4...6 # note the ... dots instead of ..
10:24 < discord-raku-bot> <gabriel80546#9187> m: for (2,4..6) { $_.say }
10:24 < lizmat> m: for 2,4...10 { .say }
10:24 < camelia> rakudo-moar 580b3ba79: OUTPUT: «2␤4␤6␤8␤10␤»
10:25 < lizmat> *must* use 3 dots, not 2
10:25 < discord-raku-bot> <gabriel80546#9187> m: for (2,4...6) { .say }
10:25 < discord-raku-bot> <gabriel80546#9187> thank you very much
10:25 < lizmat> I guess we need to smarten up Camela to recognize the bridged requests
10:25 < lizmat> *Camelia
10:27 < discord-raku-bot> <gabriel80546#9187> i love this comunity always trying to improve
10:28 < lizmat> if you look here, you'll see that the log parser already knows about discord bridges :-)
10:28 < discord-raku-bot> <gabriel80546#9187> yeah that is very cool 🙂
10:29 < discord-raku-bot> <gabriel80546#9187> i think i have contributed to the android raku
10:30 < discord-raku-bot> <gabriel80546#9187> in a question on stackoverflow
10:30 < discord-raku-bot> <gabriel80546#9187> but i am too busy on my work to contribute
10:30 < discord-raku-bot> <gabriel80546#9187> im so sorry
10:31 < lizmat> gabriel80546: don't worry :-)
10:31 < lizmat> we all do what we can :-)
10:31 < discord-raku-bot> <gabriel80546#9187> maybe i donate money when i possible for me
10:37 < lizmat> https://logs.liz.nl/raku-beginner/live.html is the link I forgot to post :-)
13:44 -!- dszz [~dszz@210-131-148-215.kanagawa.ap.gmo-isp.jp] has joined #raku-beginner
13:45 < dszz> hi
14:03 -!- dszz [~dszz@210-131-148-215.kanagawa.ap.gmo-isp.jp] has quit [Quit: Connection closed]
14:20 < [Coke]> hi
14:37 < lizmat> And yet another Rakudo Weekly news hits the Net: https://rakudoweekly.blog/2021/11/01/2021-44-1000-rakoons/
15:18 -!- Resol [~Resol@S01061056119ccd94.cg.shawcable.net] has joined #raku-beginner
15:24 -!- Resol [~Resol@S01061056119ccd94.cg.shawcable.net] has quit [Quit: Connection closed]
18:42 -!- dakkar [~dakkar@home.thenautilus.net] has quit [Ping timeout: 268 seconds]
20:00 -!- melezhik [~melezhik@c-73-32-143-85.hsd1.tx.comcast.net] has joined #raku-beginner
20:39 -!- melezhik [~melezhik@c-73-32-143-85.hsd1.tx.comcast.net] has quit [Quit: Ping timeout (120 seconds)]
21:31 -!- melezhik [~melezhik@c-73-32-143-85.hsd1.tx.comcast.net] has joined #raku-beginner
21:36 -!- melezhik [~melezhik@c-73-32-143-85.hsd1.tx.comcast.net] has quit [Quit: Connection closed]
23:28 -!- melezhik [~melezhik@c-73-32-143-85.hsd1.tx.comcast.net] has joined #raku-beginner
23:39 -!- melezhik [~melezhik@c-73-32-143-85.hsd1.tx.comcast.net] has quit [Quit: Ping timeout (120 seconds)]
--- Day changed Tue Nov 02 2021
02:46 -!- melezhik [~melezhik@c-73-32-143-85.hsd1.tx.comcast.net] has joined #raku-beginner
02:56 -!- melezhik [~melezhik@c-73-32-143-85.hsd1.tx.comcast.net] has quit [Quit: Connection closed]
10:14 -!- dakkar [~dakkar@home.thenautilus.net] has joined #raku-beginner
18:35 -!- dakkar [~dakkar@home.thenautilus.net] has quit [Ping timeout: 268 seconds]
19:50 -!- melezhik [~melezhik@c-73-32-143-85.hsd1.tx.comcast.net] has joined #raku-beginner
20:12 -!- melezhik [~melezhik@c-73-32-143-85.hsd1.tx.comcast.net] has quit [Quit: Ping timeout (120 seconds)]
20:22 -!- melezhik [~melezhik@c-73-32-143-85.hsd1.tx.comcast.net] has joined #raku-beginner
20:50 * lizmat clickbaits https://rakudoweekly.blog/2021/11/01/2021-44-1000-rakoons/
21:09 -!- melezhik [~melezhik@c-73-32-143-85.hsd1.tx.comcast.net] has quit [Ping timeout: 260 seconds]
23:17 -!- melezhik [~melezhik@c-73-32-143-85.hsd1.tx.comcast.net] has joined #raku-beginner
23:36 -!- melezhik [~melezhik@c-73-32-143-85.hsd1.tx.comcast.net] has quit [Ping timeout: 268 seconds]
--- Day changed Wed Nov 03 2021
00:17 -!- melezhik [~melezhik@c-73-32-143-85.hsd1.tx.comcast.net] has joined #raku-beginner
00:24 -!- melezhik [~melezhik@c-73-32-143-85.hsd1.tx.comcast.net] has quit [Quit: Ping timeout (120 seconds)]
02:07 -!- melezhik [~melezhik@c-73-32-143-85.hsd1.tx.comcast.net] has joined #raku-beginner
02:11 -!- melezhik [~melezhik@c-73-32-143-85.hsd1.tx.comcast.net] has quit [Client Quit]
17:15 -!- melezhik [~melezhik@c-73-32-143-85.hsd1.tx.comcast.net] has joined #raku-beginner
17:37 -!- melezhik [~melezhik@c-73-32-143-85.hsd1.tx.comcast.net] has quit [Quit: Ping timeout (120 seconds)]
17:38 -!- melezhik [~melezhik@c-73-32-143-85.hsd1.tx.comcast.net] has joined #raku-beginner
17:45 -!- melezhik is now known as MyButterfliable
17:49 -!- MyButterfliable is now known as melezhik
17:49 -!- melezhik [~melezhik@c-73-32-143-85.hsd1.tx.comcast.net] has quit [Quit: Connection closed]
17:50 -!- melezhik [~melezhik@c-73-32-143-85.hsd1.tx.comcast.net] has joined #raku-beginner
17:56 -!- melezhik [~melezhik@c-73-32-143-85.hsd1.tx.comcast.net] has quit [Quit: Connection closed]
17:57 -!- MyButterfliable [~MyButterf@c-73-32-143-85.hsd1.tx.comcast.net] has joined #raku-beginner
17:58 -!- MyButterfliable [~MyButterf@c-73-32-143-85.hsd1.tx.comcast.net] has quit [Client Quit]
17:58 -!- melezhik [~melezhik@c-73-32-143-85.hsd1.tx.comcast.net] has joined #raku-beginner
18:27 -!- melezhik [~melezhik@c-73-32-143-85.hsd1.tx.comcast.net] has quit [Ping timeout: 268 seconds]
18:34 -!- melezhik [~melezhik@c-73-32-143-85.hsd1.tx.comcast.net] has joined #raku-beginner
18:41 -!- melezhik [~melezhik@c-73-32-143-85.hsd1.tx.comcast.net] has quit [Quit: Ping timeout (120 seconds)]
19:30 -!- gabriel80546 [~gabriel80@179.215.180.176] has joined #raku-beginner
19:31 < gabriel80546> my script is not working
19:31 < gabriel80546> script ->
19:31 < gabriel80546> #!/usr/bin/env perl6
19:31 < gabriel80546> my $key = run 'xmodmap', '-e', '"keycode 66 = Shift_L Shift_R"', :out;
19:31 < gabriel80546> say "saida: -> ", $key.out.get;
19:31 < gabriel80546> output ->
19:32 < gabriel80546> xmodmap: unknown command on line commandline:1
19:32 < gabriel80546> xmodmap: 1 error encountered, aborting.
19:32 < gabriel80546> saida: -> Nil
19:33 < gabriel80546> im sorry for posting that
19:34 < gabriel80546> but i think the documentation didn't help me
19:36 < gabriel80546> xmodmap is a command that exists
19:36 < gabriel80546> gabriel@adriano:~$ which xmodmap
19:36 < gabriel80546> gabriel@adriano:~$ which xmodmap
19:36 < gabriel80546> '''/usr/bin/xmodmap
19:38 < gabriel80546> my bad also the out of xmodmap is empty anyways
19:45 < gabriel80546> i will try shell or spawn
19:46 < [Coke]> ... you're running xmodmap, or the error wouldn't be coming.
19:47 < [Coke]> so what's the issue?
19:47 < [Coke]> m: run 'notacommand';
19:47 < camelia> rakudo-moar ab02205ed: OUTPUT: «The spawned command 'notacommand' exited unsuccessfully (exit code: 1, signal: 0)␤ in block <unit> at <tmp> line 1␤␤»
19:48 < gabriel80546> shell works
19:49 < gabriel80546> script ->
19:49 < gabriel80546> #!/usr/bin/env perl6
19:49 < gabriel80546> my $key = shell ("xmodmap -e 'keycode 66 = Shift_L Shift_R'");
19:49 < gabriel80546> say "\$key", $key
19:49 < gabriel80546> output ->
19:49 < gabriel80546> $keyProc.new(in => IO::Pipe, out => IO::Pipe, err => IO::Pipe, exitcode => 0, signal => 0, pid => 4511, command => ("xmodmap -e 'keycode 66 = Shift_L Shift_R'",))
19:50 < gabriel80546> [Coke]
19:50 < gabriel80546> i run what you said
19:50 < gabriel80546> > run 'notacommand'
19:50 < gabriel80546> Proc.new(in => IO::Pipe, out => IO::Pipe, err => IO::Pipe, exitcode => 1, signal => 0, pid => Nil, command => ("notacommand",))
19:51 < gabriel80546> >
19:52 < [Coke]> if you try to do anything with that result, you'll get the error shown above. even "sink run 'notacommand'" will trigger it
19:52 < [Coke]> you can see the exitcode is 1, though.
19:52 < [Coke]> In the one that worked, you had single quotes around the arg to xmodmap. in the one that didn't, you had double quotes.
19:53 < [Coke]> You probably don't even need the quotes in the first one, because you're using run. the args are already split up in the arguments to run, you don't need to protect them.
19:54 < gabriel80546> i am curious how it would work with run
19:55 < gabriel80546> now it works
19:56 < gabriel80546> you are absolutly right
19:56 < gabriel80546> script ->
19:56 < gabriel80546> #!/usr/bin/env perl6
19:56 < gabriel80546> my $key = run "xmodmap", "-e", "keycode 66 = Shift_L Shift_R", :out;
19:56 < gabriel80546> say "\$key ", $key.out.get;
19:56 < gabriel80546> output ->
19:56 < gabriel80546> $key Nil
19:56 < gabriel80546> that is the output that i expected
19:57 < gabriel80546> thank you very much
20:21 -!- melezhik [~melezhik@c-73-32-143-85.hsd1.tx.comcast.net] has joined #raku-beginner
20:28 < [Coke]> sure!
20:28 -!- melezhik [~melezhik@c-73-32-143-85.hsd1.tx.comcast.net] has quit [Ping timeout: 268 seconds]
21:43 -!- MyButterfliable [~MyButterf@c-73-32-143-85.hsd1.tx.comcast.net] has joined #raku-beginner
21:51 -!- MyButterfliable [~MyButterf@c-73-32-143-85.hsd1.tx.comcast.net] has quit [Quit: Ping timeout (120 seconds)]
21:52 -!- melezhik [~melezhik@c-73-32-143-85.hsd1.tx.comcast.net] has joined #raku-beginner
22:07 -!- melezhik [~melezhik@c-73-32-143-85.hsd1.tx.comcast.net] has quit [Quit: Ping timeout (120 seconds)]
22:08 -!- melezhik [~melezhik@c-73-32-143-85.hsd1.tx.comcast.net] has joined #raku-beginner
22:14 -!- melezhik [~melezhik@c-73-32-143-85.hsd1.tx.comcast.net] has quit [Quit: Ping timeout (120 seconds)]
22:21 -!- melezhik [~melezhik@c-73-32-143-85.hsd1.tx.comcast.net] has joined #raku-beginner
22:42 -!- melezhik [~melezhik@c-73-32-143-85.hsd1.tx.comcast.net] has quit [Ping timeout: 268 seconds]
23:29 -!- melezhik [~melezhik@c-73-32-143-85.hsd1.tx.comcast.net] has joined #raku-beginner
23:46 -!- melezhik [~melezhik@c-73-32-143-85.hsd1.tx.comcast.net] has quit [Quit: Ping timeout (120 seconds)]
--- Day changed Thu Nov 04 2021
01:21 -!- gabriel80546 [~gabriel80@179.215.180.176] has quit [Quit: Connection closed]
02:54 -!- MyButterfliable [~MyButterf@c-73-32-143-85.hsd1.tx.comcast.net] has joined #raku-beginner
02:56 -!- MyButterfliable [~MyButterf@c-73-32-143-85.hsd1.tx.comcast.net] has quit [Client Quit]
03:04 -!- MyButterfliable [~MyButterf@c-73-32-143-85.hsd1.tx.comcast.net] has joined #raku-beginner
03:04 -!- MyButterfliable [~MyButterf@c-73-32-143-85.hsd1.tx.comcast.net] has quit [Client Quit]
09:53 -!- dakkar [~dakkar@home.thenautilus.net] has joined #raku-beginner
14:59 -!- melezhik [~melezhik@c-73-32-143-85.hsd1.tx.comcast.net] has joined #raku-beginner
15:22 -!- melezhik [~melezhik@c-73-32-143-85.hsd1.tx.comcast.net] has quit [Quit: Ping timeout (120 seconds)]
15:24 -!- melezhik [~melezhik@c-73-32-143-85.hsd1.tx.comcast.net] has joined #raku-beginner
15:38 -!- melezhik [~melezhik@c-73-32-143-85.hsd1.tx.comcast.net] has quit [Quit: Ping timeout (120 seconds)]
16:05 -!- melezhik [~melezhik@c-73-32-143-85.hsd1.tx.comcast.net] has joined #raku-beginner
16:18 -!- melezhik [~melezhik@c-73-32-143-85.hsd1.tx.comcast.net] has quit [Ping timeout: 256 seconds]
16:48 -!- melezhik [~melezhik@c-73-32-143-85.hsd1.tx.comcast.net] has joined #raku-beginner
16:58 -!- melezhik [~melezhik@c-73-32-143-85.hsd1.tx.comcast.net] has quit [Quit: Ping timeout (120 seconds)]
17:09 -!- melezhik [~melezhik@c-73-32-143-85.hsd1.tx.comcast.net] has joined #raku-beginner
17:32 -!- melezhik [~melezhik@c-73-32-143-85.hsd1.tx.comcast.net] has quit [Quit: Connection closed]
17:33 -!- dakkar [~dakkar@home.thenautilus.net] has quit [Ping timeout: 260 seconds]
18:11 -!- camelia [~p6eval@camelia.detonation.org] has quit [Read error: Connection reset by peer]
18:19 -!- camelia [~p6eval@camelia.detonation.org] has joined #raku-beginner
18:24 -!- camelia [~p6eval@camelia.detonation.org] has quit [Ping timeout: 245 seconds]
19:08 -!- camelia [~p6eval@camelia.detonation.org] has joined #raku-beginner
19:21 -!- melezhik57 [~melezhik@c-73-32-143-85.hsd1.tx.comcast.net] has joined #raku-beginner
19:29 -!- melezhik57 [~melezhik@c-73-32-143-85.hsd1.tx.comcast.net] has quit [Quit: Connection closed]
23:12 -!- RakuIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has quit [Remote host closed the connection]
23:13 -!- RakuIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
--- Day changed Fri Nov 05 2021
02:51 < discord-raku-bot> <Hydrazer#4827> is there a cons operator? or should i just use the flatten prefix? ```pl
02:51 < discord-raku-bot> <Hydrazer#4827> my @arr = 1..5;
02:51 < discord-raku-bot> <Hydrazer#4827> say [5, |@arr];
02:51 < discord-raku-bot> <Hydrazer#4827> ```
03:01 -!- melezhik34 [~melezhik@c-73-32-143-85.hsd1.tx.comcast.net] has joined #raku-beginner
03:06 < [Coke]> m: my @a=1..5; @a.unshift: 5; dd @a
03:06 < camelia> rakudo-moar 3ef09a72e: OUTPUT: «Array @a = [5, 1, 2, 3, 4, 5]␤»
03:08 < [Coke]> raku gives shift/unshift/pop/push for adding/removing from the ends, splice, but your way is also fine.
03:16 < discord-raku-bot> <Hydrazer#4827> yeah i guess that would work too
03:21 -!- melezhik34 [~melezhik@c-73-32-143-85.hsd1.tx.comcast.net] has quit [Quit: Ping timeout (120 seconds)]
09:36 < discord-raku-bot> <gfldex#8222> m:```
09:36 < discord-raku-bot> <gfldex#8222> sub infix:«|<<»(\a, \e) {
09:36 < discord-raku-bot> <gfldex#8222> Proxy.new(FETCH => method { |a, |e },
09:36 < discord-raku-bot> <gfldex#8222> STORE => method (\e) {})
09:36 < discord-raku-bot> <gfldex#8222> but role { method sink { a.push: e } };
09:36 < discord-raku-bot> <gfldex#8222> }
09:36 < discord-raku-bot> <gfldex#8222> my @a = 1,2,3;
09:36 < discord-raku-bot> <gfldex#8222> @a |<< 4;
09:36 < discord-raku-bot> <gfldex#8222> dd @a;
09:36 < discord-raku-bot> <gfldex#8222> my @b = @a |<< 5;
09:36 < discord-raku-bot> <gfldex#8222> dd @a, @b;
09:36 < discord-raku-bot> <gfldex#8222> ```
09:37 < discord-raku-bot> <gfldex#8222> @Hydrazer#4827 We wont stop you from defining your own operator. We are very liberal. :)
12:02 -!- dakkar [~dakkar@home.thenautilus.net] has joined #raku-beginner
12:17 -!- dakkar [~dakkar@home.thenautilus.net] has quit [Quit: e via, verso nuove avventure]
15:07 -!- TempIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has quit [Remote host closed the connection]
15:08 -!- TempIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
16:23 -!- [Coke] [~coke@172.58.236.196] has quit [Ping timeout: 260 seconds]
16:57 -!- [Coke] [~coke@172.58.239.67] has joined #raku-beginner
--- Day changed Sat Nov 06 2021
14:06 -!- discord-raku-bot [~RakuIRC@ip5f5ab74b.dynamic.kabel-deutschland.de] has quit [Remote host closed the connection]
14:56 -!- discord-raku-bot [~RakuIRC@ip5f5ab74b.dynamic.kabel-deutschland.de] has joined #raku-beginner
19:07 < discord-raku-bot> <Hydrazer#4827> ah i needed to use token on calc-op instead of rule
19:54 < discord-raku-bot> <Hydrazer#4827> im trying to use grammars but im not really understanding why using .*? in place of <random> works here ```pl
19:54 < discord-raku-bot> <Hydrazer#4827> grammar Calc {
19:54 < discord-raku-bot> <Hydrazer#4827> token TOP {^^ [<random> <calc-op> <random>] * $$}
19:54 < discord-raku-bot> <Hydrazer#4827> proto token calc-op {*}
19:54 < discord-raku-bot> <Hydrazer#4827> token calc-op:sym<sub> {
19:54 < discord-raku-bot> <Hydrazer#4827> <num> <minus> <num>
19:54 < discord-raku-bot> <Hydrazer#4827> }
19:54 < discord-raku-bot> <Hydrazer#4827> token num {<whitespace> \d+ <whitespace>}
19:54 < discord-raku-bot> <Hydrazer#4827> token minus {<whitespace> "-" <whitespace>}
19:54 < discord-raku-bot> <Hydrazer#4827> token whitespace {\s*}
19:54 < discord-raku-bot> <Hydrazer#4827> token random {.*?}
19:54 < discord-raku-bot> <Hydrazer#4827> }
19:54 < discord-raku-bot> <Hydrazer#4827>
19:54 < discord-raku-bot> <Hydrazer#4827> Calc.parse("a3 - 3e a;3;42;34;;3-24");
19:55 < discord-raku-bot> <Hydrazer#4827> ```
19:55 < discord-raku-bot> <Hydrazer#4827> 「3 - 3」
19:55 < discord-raku-bot> <Hydrazer#4827> num => 「3 」
19:55 < discord-raku-bot> <Hydrazer#4827> whitespace => 「」
19:55 < discord-raku-bot> <Hydrazer#4827> whitespace => 「 」
19:55 < discord-raku-bot> <Hydrazer#4827> ...
19:55 < discord-raku-bot> <Hydrazer#4827> ``` vs
19:55 < discord-raku-bot> <Hydrazer#4827> ```
19:55 < discord-raku-bot> <Hydrazer#4827> Nil
19:55 < discord-raku-bot> <Hydrazer#4827> ```
21:01 < CIAvash> Hydrazer: I guess `ratcheting` is involved, changing `TOP` and `random` from `token` to `regex` works.
21:27 -!- melika [~melika@91.99.254.114] has joined #raku-beginner
22:32 -!- melika [~melika@91.99.254.114] has quit [Quit: Connection closed]
--- Day changed Sun Nov 07 2021
00:44 < discord-raku-bot> <Hydrazer#4827> ok cool
19:42 < discord-raku-bot> <klebs#2209> hi folks! what happens if we don't write "use v6" at the top of our scripts? is that bad to do? why is the default behavior (of not including "use v6") potentially undesirable?
20:35 < discord-raku-bot> <gfldex#8222> @klebs#2209 proper operation systems actually look into the first block of a file to determine the mime-type.
22:30 -!- A26F64 [~A26F64@cpe-74-69-167-143.stny.res.rr.com] has joined #raku-beginner
22:39 < discord-raku-bot> <Rogue#2017> It was originally there to differentiate between Perl 5 and Perl 6 source
22:39 < discord-raku-bot> <Rogue#2017> Since, at the time, Raku was called Perl 6 and was simply going to be the next version of Perl
22:40 < discord-raku-bot> <Rogue#2017> It's not really important anymore, unless you want to specify a minor version like 6.e
22:40 < discord-raku-bot> <Rogue#2017> It's not really important anymore, unless you want to specify a minor version like 6.d
22:41 < discord-raku-bot> <Rogue#2017> which you'd want to do if you're using something that was not implemented as of the previous release
22:41 < discord-raku-bot> <Rogue#2017> which you'd want to do if you're using some featurethat was not implemented as of the previous release
22:41 < discord-raku-bot> <Rogue#2017> which you'd want to do if you're using some feature that was not implemented as of the previous release
22:43 < A26F64> I'm wondering if someone could recommend a clear and direct tutorial explaining how to place packages, modules, classes, subsets, etc. into separate files and then import them. The official documentation, while generally very informative and thorough, is not particularly clear on that from my perspective.
22:43 < discord-raku-bot> <gfldex#8222> Please note that v6 does not default to v6.c. This versioning is intentional an will allow us to incorporate backward compatibility breaking changes.
22:44 < A26F64> In Perl packages are placed in files and identified with the `package` keyword. Raku is (I am to understand) not that simple.
22:49 < A26F64> There's quite a bit of discussion in the documentation about actually using the elements of a module once defined. But practically nothing about where to put the things. The "modules" page could be far more explicit. Something about META6.json and compunits and the `-I` flag and who knows what else.
22:53 < A26F64> I thought (after wasting a lot of time going through the documentation and general searches with a detour through Synopsis 11) that perhaps I had things working. But then I discovered that specifying a filesystem file in META6.json's `provides` attribute just seems to load the whole file without respect to the module name used as the corresponding
22:53 < A26F64> key and now I don't know what to do.
--- Day changed Mon Nov 08 2021
00:27 < discord-raku-bot> <klebs#2209> thanks folks 👍
00:27 < discord-raku-bot> <klebs#2209> thanks!
00:31 < discord-raku-bot> <klebs#2209> what is an example of this? does the "use v6;" provide more information than the shebang? it doesn't seem like it to me. I somewhat like writing "use v6;" -- it is in my muscle memory. I'm just not sure if there is a reason I actually need it. It seems cleaner to not need it, is it not?
00:40 < [Coke]> .
00:41 < [Coke]> it's hard to tell if that's a new send or an edit: use v6 is a holdover from when it might be mistaken for perl 5 code; it doesn't do anything in raku itself. use v6.x uses a specific version of the language
02:20 < discord-raku-bot> <klebs#2209> @Coke gotcha -- thank you everybody! -- it is all clear to me now 🙂
03:10 < discord-raku-bot> <klebs#2209> how do we write something like this? ```raku
03:10 < discord-raku-bot> <klebs#2209> my @arr = <
03:10 < discord-raku-bot> <klebs#2209> file1
03:10 < discord-raku-bot> <klebs#2209> file2
03:10 < discord-raku-bot> <klebs#2209> file3
03:10 < discord-raku-bot> <klebs#2209> file4
03:10 < discord-raku-bot> <klebs#2209> >;
03:10 < discord-raku-bot> <klebs#2209> sub get-lines($fname) {
03:10 < discord-raku-bot> <klebs#2209> $fname.IO.lines.elems
03:10 < discord-raku-bot> <klebs#2209> }
03:10 < discord-raku-bot> <klebs#2209> my @counts = @arr>>.get-lines;
03:10 < discord-raku-bot> <klebs#2209> say @counts;
03:10 < discord-raku-bot> <klebs#2209> ```
03:10 < discord-raku-bot> <klebs#2209> basically, what i mean to do is apply some function as a transformation to each member of the array
03:12 < discord-raku-bot> <klebs#2209> until now, i have been writing a "do for"
03:12 < discord-raku-bot> <klebs#2209> ie,```
03:12 < discord-raku-bot> <klebs#2209> my @counts = do for @arr {
03:12 < discord-raku-bot> <klebs#2209> get-lines($_)
03:12 < discord-raku-bot> <klebs#2209> };
03:12 < discord-raku-bot> <klebs#2209> ```
03:13 < discord-raku-bot> <klebs#2209> i have a feeling there is a shorthand for this -- does anybody know what it is?
03:17 < A26F64> Would `@arr.map({ get-lines($_) });` not be appropriate?
03:36 < discord-raku-bot> <klebs#2209> thanks, it is definitely an upgrade -- there is something in the back of my mind i think i have seen somewhere which is one line, may use >> and does not explicitly need $_
03:39 < [Coke]> @arr.map(*.get-lines)
03:39 < [Coke]> slightly shorter; uses a whatevercode instead of a block.
03:39 < [Coke]> afk
03:47 < A26F64> That's very clean but it fails for me as `get-lines` is not a method of Str. `@arr.map(*.IO.lines.elems)` should work (but that's not calling an independent function as requested).
03:51 -!- mjgardner [sid182628@ilkley.irccloud.com] has quit [Read error: Connection reset by peer]
04:05 -!- mjgardner [sid182628@id-182628.ilkley.irccloud.com] has joined #raku-beginner
04:18 -!- mjgardner [sid182628@id-182628.ilkley.irccloud.com] has quit [Ping timeout: 268 seconds]
04:21 -!- mjgardner [sid182628@ilkley.irccloud.com] has joined #raku-beginner
04:33 < discord-raku-bot> <avuserow#1203> Something like `@arr.>>&get-lines` ?
04:34 < discord-raku-bot> <avuserow#1203> Something like `@arr>>.&get-lines` ?
04:36 < A26F64> And by which means `@arr.map(*.&get-lines)` also works.
04:44 < A26F64> (Though the hyper operators are not strictly equivalent to ordinary `.map` as "all hyper operators are candidates for parallelism".)
05:03 -!- mjgardner [sid182628@ilkley.irccloud.com] has quit [Ping timeout: 268 seconds]
05:04 -!- mjgardner [sid182628@id-182628.ilkley.irccloud.com] has joined #raku-beginner
05:22 -!- A26F64 [~A26F64@cpe-74-69-167-143.stny.res.rr.com] has quit [Quit: Connection closed]
--- Log closed Mon Nov 08 07:04:59 2021
--- Log opened Mon Nov 08 07:05:13 2021
07:05 -!- gfldex [~dex@ip5f5ab74b.dynamic.kabel-deutschland.de] has joined #raku-beginner
07:05 -!- Topic for #raku-beginner: This channel is intended for people just starting with the Raku Programming Language (https://raku.org). This channel is being logged for historical purposes.
07:05 -!- Topic set by lizmat [~textual@ipv4-wenzperl.connected.by.freedominter.net] [Mon Aug 16 16:43:12 2021]
07:05 [Users #raku-beginner]
07:05 [ [Coke] ] [ codesections ] [ lizmat ] [ samebchase] [ TempIRCLogger]
07:05 [ camelia] [ discord-raku-bot] [ mjgardner ] [ sjn ] [ Util ]
07:05 [ CIAvash] [ gfldex ] [ RakuIRCLogger] [ tbrowder ]
07:05 -!- Irssi: #raku-beginner: Total of 14 nicks [0 ops, 0 halfops, 0 voices, 14 normal]
07:05 -!- Channel #raku-beginner created Mon Aug 16 16:35:55 2021
07:05 -!- Irssi: Join to #raku-beginner was synced in 27 secs
07:12 -!- Netsplit *.net <-> *.split quits: CIAvash, codesections
07:13 -!- codesections [~codesecti@codesections.com] has joined #raku-beginner
07:16 -!- CIAvash [~ciavash@2001:470:69fc:105::264] has joined #raku-beginner
07:45 < discord-raku-bot> <Morfent#9811> you shouldn't need the `WhateverCode` in this case: `@arr.map(&get-lines)`
08:35 < discord-raku-bot> <klebs#2209> oh nice! thanks everybody for the answers. i'll be able to use bits and pieces of your replies for lots of new code (to be written) 🙂
08:35 < discord-raku-bot> <klebs#2209> !!! i think the syntax i had in the back of my mind used the &
08:36 < discord-raku-bot> <klebs#2209> i think the syntax i had in the back of my mind used the ampersand! that, i think, is the cleanest way
08:36 < discord-raku-bot> <klebs#2209> but the whatever code inside the map is also a great trick i didn't know
08:36 < discord-raku-bot> <klebs#2209> you folks are the best 🙂
08:39 < discord-raku-bot> <klebs#2209> i love that i can use this syntax with [+] to reduce the array
08:39 < discord-raku-bot> <klebs#2209> ie ``` say [+] @arr>>.&get-lines;```
08:40 < discord-raku-bot> <klebs#2209> brilliant syntax. raku is the best.
09:54 -!- dakkar [~dakkar@home.thenautilus.net] has joined #raku-beginner
14:42 -!- melezhik [~melezhik@c-73-32-143-85.hsd1.tx.comcast.net] has joined #raku-beginner
14:42 -!- melezhik [~melezhik@c-73-32-143-85.hsd1.tx.comcast.net] has quit [Client Quit]
15:42 -!- melezhik [~melezhik@c-73-32-143-85.hsd1.tx.comcast.net] has joined #raku-beginner
16:25 -!- melezhik [~melezhik@c-73-32-143-85.hsd1.tx.comcast.net] has quit [Quit: Ping timeout (120 seconds)]
17:04 -!- A26F64 [~A26F64@cpe-74-69-167-143.stny.res.rr.com] has joined #raku-beginner
18:36 -!- dakkar [~dakkar@home.thenautilus.net] has quit [Ping timeout: 244 seconds]
21:04 < lizmat> and yet another Rakudo Weekly hits the Net: https://rakudoweekly.blog/2021/11/08/2021-45-two-commas/
21:28 -!- A26F64 [~A26F64@cpe-74-69-167-143.stny.res.rr.com] has quit [Quit: Connection closed]
22:09 < discord-raku-bot> <Quibono#1716> Hello.
22:11 < discord-raku-bot> <Quibono#1716> Is there any information related to how the grammars work
22:12 < discord-raku-bot> <Quibono#1716> Ah nvm I found the page for them.
--- Day changed Tue Nov 09 2021
05:44 -!- Netsplit *.net <-> *.split quits: codesections, [Coke], mjgardner, TempIRCLogger, CIAvash, lizmat, samebchase, RakuIRCLogger, camelia, Util, (+3 more, use /NETSPLIT to show all of them)
05:46 -!- Netsplit over, joins: CIAvash, codesections, mjgardner, discord-raku-bot, [Coke], TempIRCLogger, RakuIRCLogger, camelia, lizmat, Util (+3 more)
10:10 -!- dakkar [~dakkar@home.thenautilus.net] has joined #raku-beginner
10:50 -!- hkdtam [~hkdtam@13.66.204.139] has joined #raku-beginner
13:18 -!- A26F64 [~A26F64@cpe-74-69-167-143.stny.res.rr.com] has joined #raku-beginner
13:19 -!- A26F64 [~A26F64@cpe-74-69-167-143.stny.res.rr.com] has quit [Client Quit]
14:35 -!- A26F64 [~A26F64@cpe-74-69-167-143.stny.res.rr.com] has joined #raku-beginner
15:56 -!- [Coke] [~coke@172.58.239.67] has quit [Ping timeout: 256 seconds]
15:59 -!- [Coke] [~coke@172.58.239.67] has joined #raku-beginner
16:24 -!- ramiroencinas [~ramiroenc@127.red-88-16-14.dynamicip.rima-tde.net] has joined #raku-beginner
17:16 -!- ramiroencinas [~ramiroenc@127.red-88-16-14.dynamicip.rima-tde.net] has quit [Quit: Connection closed]
17:26 -!- [Coke]_ [~coke@172.58.239.67] has joined #raku-beginner
17:28 -!- [Coke] [~coke@172.58.239.67] has quit [Ping timeout: 246 seconds]
17:28 -!- [Coke]_ is now known as [Coke]
18:37 -!- dakkar [~dakkar@home.thenautilus.net] has quit [Ping timeout: 240 seconds]
19:19 -!- A26F64 [~A26F64@cpe-74-69-167-143.stny.res.rr.com] has quit [Quit: Connection closed]
20:11 -!- melezhik [~melezhik@c-73-32-143-85.hsd1.tx.comcast.net] has joined #raku-beginner
20:38 -!- melezhik [~melezhik@c-73-32-143-85.hsd1.tx.comcast.net] has quit [Quit: Ping timeout (120 seconds)]
20:43 -!- TempIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has quit [Ping timeout: 256 seconds]
20:45 -!- RakuIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has quit [Ping timeout: 268 seconds]
20:45 -!- lizmat [~textual@ipv4-wenzperl.connected.by.freedominter.net] has quit [Ping timeout: 268 seconds]
20:47 -!- lizmat [~textual@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
20:48 -!- RakuIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
21:00 -!- Netsplit *.net <-> *.split quits: discord-raku-bot
21:16 -!- melezhik [~melezhik@c-73-32-143-85.hsd1.tx.comcast.net] has joined #raku-beginner
21:23 -!- melezhik [~melezhik@c-73-32-143-85.hsd1.tx.comcast.net] has quit [Quit: Ping timeout (120 seconds)]
21:31 -!- melezhik [~melezhik@c-73-32-143-85.hsd1.tx.comcast.net] has joined #raku-beginner
21:39 -!- melezhik [~melezhik@c-73-32-143-85.hsd1.tx.comcast.net] has quit [Quit: Ping timeout (120 seconds)]
22:30 -!- discord-raku-bot [~RakuIRC@95.90.183.75] has joined #raku-beginner
23:47 -!- A26F64 [~A26F64@cpe-74-69-167-143.stny.res.rr.com] has joined #raku-beginner
23:57 -!- melezhik [~melezhik@c-73-32-143-85.hsd1.tx.comcast.net] has joined #raku-beginner
--- Day changed Wed Nov 10 2021
00:08 -!- melezhik [~melezhik@c-73-32-143-85.hsd1.tx.comcast.net] has quit [Quit: Ping timeout (120 seconds)]
00:15 -!- A26F64 [~A26F64@cpe-74-69-167-143.stny.res.rr.com] has quit [Quit: Connection closed]
00:16 -!- melezhik [~melezhik@c-73-32-143-85.hsd1.tx.comcast.net] has joined #raku-beginner
00:42 -!- melezhik [~melezhik@c-73-32-143-85.hsd1.tx.comcast.net] has quit [Ping timeout: 240 seconds]
01:31 -!- hkdtam [~hkdtam@13.66.204.139] has quit [Quit: Client closed]
01:33 -!- melezhik [~melezhik@c-73-32-143-85.hsd1.tx.comcast.net] has joined #raku-beginner
01:55 -!- melezhik [~melezhik@c-73-32-143-85.hsd1.tx.comcast.net] has quit [Ping timeout: 256 seconds]
05:35 < discord-raku-bot> <ionsolo#0792> there is a book too!!
07:28 -!- hkdtam [~hkdtam@13.66.204.139] has joined #raku-beginner
10:05 -!- dakkar [~dakkar@home.thenautilus.net] has joined #raku-beginner
13:13 -!- hkdtam [~hkdtam@13.66.204.139] has quit [Quit: Client closed]
14:20 -!- dakkar [~dakkar@home.thenautilus.net] has quit [Read error: Connection reset by peer]
14:21 -!- dakkar [~dakkar@home.thenautilus.net] has joined #raku-beginner
18:01 -!- dakkar [~dakkar@home.thenautilus.net] has quit [Remote host closed the connection]
19:45 -!- A26F64 [~A26F64@cpe-74-69-167-143.stny.res.rr.com] has joined #raku-beginner
19:45 -!- A26F64 [~A26F64@cpe-74-69-167-143.stny.res.rr.com] has left #raku-beginner []
--- Day changed Thu Nov 11 2021
01:24 -!- tbrowder [sid168924@lymington.irccloud.com] has quit [Ping timeout: 260 seconds]
01:27 -!- mjgardner [sid182628@id-182628.ilkley.irccloud.com] has quit [Ping timeout: 264 seconds]
02:11 -!- tbrowder [sid168924@lymington.irccloud.com] has joined #raku-beginner
02:24 -!- mjgardner [sid182628@ilkley.irccloud.com] has joined #raku-beginner
09:46 -!- dakkar [~dakkar@home.thenautilus.net] has joined #raku-beginner
10:42 -!- dakkar [~dakkar@home.thenautilus.net] has quit [Remote host closed the connection]
10:43 -!- dakkar [~dakkar@home.thenautilus.net] has joined #raku-beginner
14:42 -!- tbrowder_ [sid168924@id-168924.lymington.irccloud.com] has joined #raku-beginner
14:42 -!- mjgardner [sid182628@ilkley.irccloud.com] has quit [Ping timeout: 240 seconds]
14:42 -!- tbrowder [sid168924@lymington.irccloud.com] has quit [Ping timeout: 260 seconds]
14:42 -!- tbrowder_ is now known as tbrowder
14:43 -!- mjgardner [sid182628@2a03:5180:f:3::2:c964] has joined #raku-beginner
15:17 -!- mjgardner [sid182628@2a03:5180:f:3::2:c964] has quit [Ping timeout: 264 seconds]
15:19 -!- tbrowder [sid168924@id-168924.lymington.irccloud.com] has quit [Ping timeout: 250 seconds]
15:23 -!- tbrowder [sid168924@lymington.irccloud.com] has joined #raku-beginner
15:34 -!- mjgardner [sid182628@ilkley.irccloud.com] has joined #raku-beginner
17:01 -!- melezhik [~melezhik@c-73-32-143-85.hsd1.tx.comcast.net] has joined #raku-beginner
17:12 -!- melezhik [~melezhik@c-73-32-143-85.hsd1.tx.comcast.net] has quit [Ping timeout: 260 seconds]
18:34 -!- dakkar [~dakkar@home.thenautilus.net] has quit [Quit: e via, verso nuove avventure]
18:39 -!- A26F64 [~A26F64@cpe-74-69-167-143.stny.res.rr.com] has joined #raku-beginner
19:50 -!- hkdtam [~hkdtam@13.66.204.139] has joined #raku-beginner
20:04 -!- melezhik [~melezhik@c-73-32-143-85.hsd1.tx.comcast.net] has joined #raku-beginner
20:15 -!- melezhik [~melezhik@c-73-32-143-85.hsd1.tx.comcast.net] has quit [Quit: Connection closed]
21:08 -!- hkdtam [~hkdtam@13.66.204.139] has quit [Quit: Client closed]
21:51 -!- A26F64 [~A26F64@cpe-74-69-167-143.stny.res.rr.com] has quit [Quit: Connection closed]
22:47 -!- melezhik [~melezhik@c-73-32-143-85.hsd1.tx.comcast.net] has joined #raku-beginner
22:59 -!- melezhik [~melezhik@c-73-32-143-85.hsd1.tx.comcast.net] has quit [Quit: Ping timeout (120 seconds)]
--- Day changed Fri Nov 12 2021
03:20 -!- melezhik [~melezhik@c-73-32-143-85.hsd1.tx.comcast.net] has joined #raku-beginner
03:28 -!- melezhik [~melezhik@c-73-32-143-85.hsd1.tx.comcast.net] has quit [Quit: Ping timeout (120 seconds)]
05:43 -!- Netsplit *.net <-> *.split quits: codesections, [Coke], mjgardner, CIAvash, lizmat, RakuIRCLogger, samebchase, camelia, discord-raku-bot, Util, (+2 more, use /NETSPLIT to show all of them)
05:49 -!- mjgardner [sid182628@ilkley.irccloud.com] has joined #raku-beginner
05:49 -!- tbrowder [sid168924@lymington.irccloud.com] has joined #raku-beginner
05:49 -!- discord-raku-bot [~RakuIRC@95.90.183.75] has joined #raku-beginner
05:49 -!- RakuIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
05:49 -!- lizmat [~textual@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
05:49 -!- [Coke] [~coke@172.58.239.67] has joined #raku-beginner
05:49 -!- CIAvash [~ciavash@2001:470:69fc:105::264] has joined #raku-beginner
05:49 -!- codesections [~codesecti@codesections.com] has joined #raku-beginner
05:49 -!- camelia [~p6eval@camelia.detonation.org] has joined #raku-beginner
05:49 -!- Util [~bruce@047-013-182-182.res.spectrum.com] has joined #raku-beginner
05:49 -!- samebchase [~thelounge@51.15.68.182] has joined #raku-beginner
05:49 -!- sjn [sjn@sprocket.nvg.ntnu.no] has joined #raku-beginner
13:10 -!- CIAvash [~ciavash@2001:470:69fc:105::264] has quit [Quit: Bridge terminating on SIGTERM]
13:28 -!- CIAvash [~ciavash@2001:470:69fc:105::264] has joined #raku-beginner
17:19 -!- subzer0d [~subzer0d@198.148.71.65] has joined #raku-beginner
17:19 -!- subzer0d [~subzer0d@198.148.71.65] has quit [Client Quit]
19:54 -!- melezhik [~melezhik@c-73-32-143-85.hsd1.tx.comcast.net] has joined #raku-beginner
20:14 -!- melezhik [~melezhik@c-73-32-143-85.hsd1.tx.comcast.net] has quit [Ping timeout: 245 seconds]
21:35 -!- melezhik56 [~melezhik@c-73-32-143-85.hsd1.tx.comcast.net] has joined #raku-beginner
21:35 -!- melezhik56 is now known as melezhik2
22:08 -!- melezhik2 [~melezhik@c-73-32-143-85.hsd1.tx.comcast.net] has quit [Ping timeout: 256 seconds]
22:47 -!- TempIRCLogger [~RakuIRC@ipv4-wenzperl.connected.by.freedominter.net] has joined #raku-beginner
--- Day changed Sat Nov 13 2021
02:13 -!- melezhik18 [~melezhik@c-73-32-143-85.hsd1.tx.comcast.net] has joined #raku-beginner
02:16 -!- melezhik18 [~melezhik@c-73-32-143-85.hsd1.tx.comcast.net] has quit [Client Quit]
15:27 -!- casey [~casey@c-24-130-74-194.hsd1.ca.comcast.net] has joined #raku-beginner
17:09 -!- A26F64 [~A26F64@cpe-74-69-167-143.stny.res.rr.com] has joined #raku-beginner
18:10 -!- casey [~casey@c-24-130-74-194.hsd1.ca.comcast.net] has quit [Quit: Connection closed]
21:44 -!- A26F64 [~A26F64@cpe-74-69-167-143.stny.res.rr.com] has quit [Quit: Connection closed]
21:55 -!- SmokeMachine [sid19088@tinside.irccloud.com] has joined #raku-beginner
--- Day changed Sun Nov 14 2021
05:10 -!- Flwyd [~Flwyd@c-174-63-75-106.hsd1.vt.comcast.net] has joined #raku-beginner
06:14 < Flwyd> Is there a syntax for getting a method reference as a callable? In the same way that $x.map(&foo) passes subroutine foo to map, I'd like to pass a bound method, e.g. $x.map(&$y.bar).
06:16 < Flwyd> (The only thing I've found which works is invoking the method in a block: $x.map({ $y.bar($^a) }). This works, but it seems like Raku would have a way to treat a method as a first-class object.
07:19 < CIAvash> Flwyd: you can do it with `^find_method`. `Y.^find_method('bar')`. And if `$x` doesn't contain objects of type `Y`, then you need to pass the object to the method: `Y.^find_method('bar').assuming: $y`. I don't think there is any other way, because the first parameter of a method is the invocant.
07:26 < Flwyd> Interesting, thanks. `<foo bar baz>.map: Str.^find_method('uc')` for a concrete example.
07:50 -!- mjgardner [sid182628@ilkley.irccloud.com] has quit [Ping timeout: 264 seconds]
07:53 -!- mjgardner [sid182628@ilkley.irccloud.com] has joined #raku-beginner
11:06 < discord-raku-bot> <Nemokosch#9980> btw uc exists as a sub as well
11:06 < discord-raku-bot> <Nemokosch#9980> So you wouldn't have to do this in this concrete case
14:39 -!- A26F64 [~A26F64@cpe-74-69-167-143.stny.res.rr.com] has joined #raku-beginner
14:44 -!- sm2 [~sm1@2601:44:8701:9420::76d] has joined #raku-beginner
14:53 < CIAvash> If they wanted to just call a method, then they could just write `<foo bar baz>.map: *.method_name`. Their original question suggested something else.
15:32 -!- sm2 [~sm1@2601:44:8701:9420::76d] has quit [Ping timeout: 265 seconds]
15:56 -!- sm2 [~sm1@2601:44:8701:9420::76d] has joined #raku-beginner
16:03 -!- sm2 [~sm1@2601:44:8701:9420::76d] has quit [Ping timeout: 265 seconds]
16:24 -!- sm2 [~sm1@2601:44:8701:9420::76d] has joined #raku-beginner
17:43 -!- sm2 [~sm1@2601:44:8701:9420::76d] has quit [Ping timeout: 265 seconds]
18:12 -!- sm2 [~sm1@2601:44:8701:9420::76d] has joined #raku-beginner
19:54 -!- sm2 [~sm1@2601:44:8701:9420::76d] has quit [Ping timeout: 264 seconds]
20:25 -!- sm2 [~sm1@2601:44:8701:9420::76d] has joined #raku-beginner
20:39 -!- sm2 [~sm1@2601:44:8701:9420::76d] has quit [Ping timeout: 265 seconds]
22:53 -!- A26F64 [~A26F64@cpe-74-69-167-143.stny.res.rr.com] has quit [Quit: Connection closed]
23:27 -!- sm2 [~sm1@2601:44:8701:9420::76d] has joined #raku-beginner
23:52 -!- sm2 [~sm1@2601:44:8701:9420::76d] has quit [Ping timeout: 265 seconds]
--- Day changed Mon Nov 15 2021
00:09 -!- sm2 [~sm1@2601:44:8701:9420::76d] has joined #raku-beginner
00:18 -!- sm2 [~sm1@2601:44:8701:9420::76d] has quit [Ping timeout: 245 seconds]
01:49 -!- melezhik [~melezhik@c-73-32-143-85.hsd1.tx.comcast.net] has joined #raku-beginner
01:57 -!- melezhik [~melezhik@c-73-32-143-85.hsd1.tx.comcast.net] has quit [Ping timeout: 256 seconds]
02:16 -!- [Coke] [~coke@172.58.239.67] has quit [Ping timeout: 250 seconds]
02:18 -!- sm2 [~sm1@2601:44:8701:9420::76d] has joined #raku-beginner
02:20 -!- [Coke] [~coke@172.58.238.187] has joined #raku-beginner
02:35 -!- sm2 [~sm1@2601:44:8701:9420::76d] has quit [Ping timeout: 268 seconds]
02:49 -!- sm2 [~sm1@2601:44:8701:9420::76d] has joined #raku-beginner
04:17 -!- sm2 [~sm1@2601:44:8701:9420::76d] has quit [Ping timeout: 268 seconds]
04:34 -!- sm2 [~sm1@2601:44:8701:9420::76d] has joined #raku-beginner
04:56 -!- sm2 [~sm1@2601:44:8701:9420::76d] has quit [Ping timeout: 268 seconds]
06:45 -!- sm2 [~sm1@2601:44:8701:9420::76d] has joined #raku-beginner
07:19 -!- sm2 [~sm1@2601:44:8701:9420::76d] has quit [Ping timeout: 245 seconds]
07:58 -!- Netsplit *.net <-> *.split quits: samebchase
07:59 -!- samebchase [~thelounge@51.15.68.182] has joined #raku-beginner
09:04 -!- sm2 [~sm1@2601:44:8701:9420::76d] has joined #raku-beginner
09:28 -!- sm2 [~sm1@2601:44:8701:9420::76d] has quit [Ping timeout: 250 seconds]
09:48 -!- sm2 [~sm1@2601:44:8701:9420::76d] has joined #raku-beginner
10:10 -!- sm2 [~sm1@2601:44:8701:9420::76d] has quit [Ping timeout: 268 seconds]
10:30 -!- sm2 [~sm1@2601:44:8701:9420::76d] has joined #raku-beginner
10:41 -!- sm2 [~sm1@2601:44:8701:9420::76d] has quit [Ping timeout: 265 seconds]
11:50 -!- discord-raku-bot [~RakuIRC@95.90.183.75] has quit [Remote host closed the connection]
11:51 -!- discord-raku-bot [~RakuIRC@ip5f5ab74b.dynamic.kabel-deutschland.de] has joined #raku-beginner
12:05 -!- sm2 [~sm1@2601:44:8701:9420::76d] has joined #raku-beginner
12:24 -!- sm2 [~sm1@2601:44:8701:9420::76d] has quit [Ping timeout: 265 seconds]
12:39 -!- sm2 [~sm1@2601:44:8701:9420::76d] has joined #raku-beginner
13:03 -!- sm2 [~sm1@2601:44:8701:9420::76d] has quit [Ping timeout: 250 seconds]
13:50 -!- sm2 [~sm1@2601:44:8701:9420::76d] has joined #raku-beginner
13:56 -!- sm2 [~sm1@2601:44:8701:9420::76d] has quit [Ping timeout: 268 seconds]
14:13 -!- sm2 [~sm1@2601:44:8701:9420::76d] has joined #raku-beginner
14:32 -!- sm2 [~sm1@2601:44:8701:9420::76d] has quit [Ping timeout: 250 seconds]
14:52 -!- sm2 [~sm1@2601:44:8701:9420::76d] has joined #raku-beginner
16:35 -!- sm2 [~sm1@2601:44:8701:9420::76d] has quit [Ping timeout: 265 seconds]
17:56 -!- A26F64 [~A26F64@cpe-74-69-167-143.stny.res.rr.com] has joined #raku-beginner
20:22 -!- sm2 [~sm1@2601:44:8701:9420::76d] has joined #raku-beginner
20:31 < lizmat> and yet another Rakudo Weekly News hits the Net: https://rakudoweekly.blog/2021/11/15/2021-46-cro-once-again/
21:11 -!- A26F64 [~A26F64@cpe-74-69-167-143.stny.res.rr.com] has quit [Quit: Connection closed]
--- Day changed Tue Nov 16 2021
01:27 -!- melezhik [~melezhik@c-73-32-143-85.hsd1.tx.comcast.net] has joined #raku-beginner
01:28 -!- melezhik [~melezhik@c-73-32-143-85.hsd1.tx.comcast.net] has quit [Client Quit]
06:12 -!- ajr [~andrew@cpe-172-91-111-232.socal.res.rr.com] has joined #raku-beginner
07:41 -!- ajr [~andrew@cpe-172-91-111-232.socal.res.rr.com] has quit [Quit: leaving]
13:18 -!- sm2 [~sm1@2601:44:8701:9420::76d] has quit [Ping timeout: 250 seconds]
14:51 -!- A26F64 [~A26F64@cpe-74-69-167-143.stny.res.rr.com] has joined #raku-beginner
17:24 < discord-raku-bot> <Nemokosch#9980> what's the idiomatic way to split a string by words?
17:25 < [Coke]> m: "this string".words.say
17:25 < camelia> rakudo-moar 505ffbfa1: OUTPUT: «(this string)␤»
17:25 < [Coke]> m: dd "this string".words #better formatted
17:25 < camelia> rakudo-moar 505ffbfa1: OUTPUT: «("this", "string").Seq␤»
17:27 < lizmat> of course, that is dividing by whitespace, which you may not consider to be "words"
17:28 < lizmat> m: dd "this: string!".comb( / \w+ / )
17:28 < camelia> rakudo-moar 505ffbfa1: OUTPUT: «("this", "string").Seq␤»
17:28 < lizmat> if you'd like the other interpretation of "words"
18:19 < discord-raku-bot> <Nemokosch#9980> thankies
20:43 -!- ajr [~andrew@47.151.137.150] has joined #raku-beginner
21:05 -!- ajr [~andrew@47.151.137.150] has quit [Ping timeout: 256 seconds]
21:17 -!- ajr [~andrew@47.151.137.150] has joined #raku-beginner
21:22 -!- ajr [~andrew@47.151.137.150] has quit [Ping timeout: 260 seconds]
21:49 -!- ajr [~andrew@47.151.137.150] has joined #raku-beginner
21:53 -!- ajr [~andrew@47.151.137.150] has quit [Ping timeout: 250 seconds]
22:03 < discord-raku-bot> <Nemokosch#9980> And how do I get all the regex matches to a certain pattern?
22:04 < [Coke]> ?
22:05 < discord-raku-bot> <Nemokosch#9980> like matchAll in Javascript
22:07 < lizmat> m: .say for "foo" ~~ m:g/./ # this perhaps?
22:07 < camelia> rakudo-moar 505ffbfa1: OUTPUT: «「f」␤「o」␤「o」␤»
22:08 < lizmat> m: .say for "foo".match(/./, :g) # or this ?
22:08 < camelia> rakudo-moar 505ffbfa1: OUTPUT: «「f」␤「o」␤「o」␤»
22:11 -!- ajr [~andrew@47.151.137.150] has joined #raku-beginner
22:12 < discord-raku-bot> <Nemokosch#9980> are they the same thing?
22:32 < discord-raku-bot> <Nemokosch#9980> okay, I went with ~~ m:g//
22:32 < discord-raku-bot> <Nemokosch#9980> this sets $/
22:33 < discord-raku-bot> <Nemokosch#9980> so the iteration of $/ (which really looks like a list) is strange in this case
22:33 < discord-raku-bot> <Nemokosch#9980> maybe this is because of the sigil