🦋 Welcome to the MAIN() IRC channel of the Raku Programming Language (raku.org). Log available at irclogs.raku.org/raku/live.html . If you're a beginner, you can also check out the #raku-beginner channel!
Set by lizmat on 6 September 2022.
jdv i find it interesting that codesections asked if anyone wanted to join the grants commitee and i replied and i never heard back after that 00:31
fire and forget what that's what you get i guess:) 00:32
00:33 Manifest0 left 02:01 hulk joined 02:02 kylese left 02:15 hulk left, kylese joined
antononcube @tbrowder I implemented the Bulgarian numeric word forms generation tonight (in “Lingua::NumericWordForms”.) So, my interest in "Lingua::Number" is no more than 12%. 03:11
04:20 sivoais joined 05:30 Sgeo left 05:48 soverysour joined, soverysour left, soverysour joined 05:53 soverysour left 06:07 thaewrapt left 06:33 melezhik joined
melezhik o/ 06:33
I've started to work on abother Sparky post related to kubernetets, if someone is interested , the draft is here - dev.to/melezhik/sparky-hacking-min...d7b8e500ac 06:34
06:42 Chanakan left
ab5tract wayland76: why would the use of | be a requirement for using RakuAST? Your code could have used unshift, for example 06:43
tellable6 ab5tract, I'll pass your message to wayland76
06:45 soverysour joined 06:58 melezhik left 07:08 merp joined 07:26 soverysour left 07:30 soverysour joined, soverysour left, soverysour joined 07:42 melezhik joined 07:56 dakkar joined 07:57 Manifest0 joined 08:05 soverysour left 08:11 wayland76 joined 08:12 sena_kun joined 08:16 jpn joined 08:25 soverysour joined 08:29 melezhik left 08:46 sena_kun left 08:53 soverysour left 09:01 haxxelotto joined 09:19 soverysour joined 09:30 thaewrapt joined 09:35 thaewrapt left 09:36 thaewrapt joined 09:47 thaewrapt left 09:51 soverysour left 09:55 soverysour joined, soverysour left, soverysour joined 09:58 thaewrapt joined 10:03 thaewrapt left 10:16 thaewrapt joined 10:21 thaewrapt left 10:25 kylese left 10:30 kylese joined 10:32 thaewrapt joined 10:38 thaewrapt left 10:46 soverysour left 10:49 soverysour joined, soverysour left, soverysour joined, thaewrapt joined 10:53 soverysour left 10:54 thaewrapt left, haxxelotto left 10:55 haxxelotto joined 11:00 soverysour joined 11:03 haxxelotto left 11:04 haxxelotto joined, thaewrapt joined
librasteve [Coke]: ahhhh - sorry I have been juggling Chrome-Safari-Firefox and then did a hard reset on them to rule out a browser cache issue for $day-job ... you are quite right, that it is usually just a one off ... red face 11:05
tellable6 2024-06-04T22:09:27Z #raku <[Coke]> librasteve It should show up once and never again. It was designed to be as minimal as possible. Can you be more specific about what's annoying?
11:07 bdju left 11:10 thaewrapt left 11:12 jpn left 11:14 jpn joined
tbrowder [Coke]: i agree with yr doc chng. i just commented. 11:16
11:18 thaewrapt joined 11:19 jpn left
tbrowder fyi, my interest in that link thing, which i haven't tested yet, is how the link to another pod document will render with pdf documents. i need to discuss that with david warring. that may then be worth a small note in the link section. 11:22
what i'm looking for is how to "include" a pod document in another. that can be done mechanically with one's own tools. maybe i'm looking for a new formatting code for pod 2.0 to do that 11:27
*done now mechanically 11:28
11:30 jpn joined
librasteve wayland76: on tables, you may want to look at raku.land/zef:librasteve/Dan (essentially DataFrames for raku) - don't know if that's any use since dataframes are column oriented and the current implementation is not to type check ... 11:32
11:34 haxxelotto left
... that means if you go my \s = Series.new( data => [1, 3, 5, NaN, 6, 8], index => <a b c d e f>, name => 'john' ); say s.dtype;, then it will give back s.data.are; in this case Num.... 11:35
11:37 thaewrapt left
... the general design idea is to have a pure raku DataFrame than can then be imported into a Pandas or Polars dataframe wholesale. 11:43
now, if memory serves I did sketch out some ideas on how to wrap up Dan series and dataframes to control types - best examples are conf.raku.org/talk/171 at around 17:32 11:45
anyway not sure if that is any use at all to your question ... it sounds like Captures are a cool way to do that 11:48
11:49 thaewrapt joined 12:03 eseyman left 12:04 manu_ joined 12:05 manu_ is now known as eseyman 12:09 thaewrapt left 12:19 thaewrapt joined 12:44 teatime left 12:45 teatime joined
[Coke] tbrowder: I think you might want P<>? 12:55
tbrowder hm, let see... 13:32
13:34 jpn left
tbrowder ah, yes. NYI. one i wanted to implement but life... 13:35
changing in gamma to =place ?
thanks for reminder 13:36
13:40 jpn joined
antononcube @librasteve It seems to me that the package "Data::TypeSystem" can be used to check data-frames column types. Here is a demo -- a tabular dataset is made then it is transposed into a data frame: 13:45
cdn.discordapp.com/attachments/633...34ced&
tbrowder when using a JSON::Fast hash key $k with value , say, "0", how can i coerce it to its Int value? 14:04
lizmat +.value? 14:05
tbrowder m: my $a = "0"; say $a.value
camelia No such method 'value' for string '0'. Did you mean 'values'?
in block <unit> at <tmp> line 1
tbrowder m: my $a = "0"; say +$a.value 14:06
camelia No such method 'value' for string '0'. Did you mean 'values'?
in block <unit> at <tmp> line 1
lizmat in that case: +$a 14:07
got confused by your mention of a hash
tbrowder m: my $a = "0"; say +$a
camelia 0
lizmat m: my $a = "0"; say +$a
camelia 0
tbrowder thanks!
lizmat m: my $a = "0"; dd +$a
camelia 0
lizmat m: my $a = "0"; dd (+$a).^name 14:08
camelia "Int"
tbrowder 👍
hm, i need to assign the int value to an actual int var. 14:12
m: my $s = "0"; my $n = +$s;
camelia ( no output )
tbrowder m: my $s = "0"; my $n = +$s; say $n 14:13
camelia 0
tbrowder hm, that does work! gut! 14:14
in my code i was looking at the wrong set of keys,, 14:17
duh...
trying to simplify with: $k .=+ and i get err msg "expecting dotty method or postfix 14:25
m: my $k = "0"; $k .=+ 14:26
camelia ===SORRY!=== Error while compiling <tmp>
Missing required term after infix
at <tmp>:1
------> my $k = "0"; $k .=⏏+
expecting any of:
dotty method or postfix
tbrowder m: my $k = "0"; +($k); say $k 14:27
camelia WARNINGS for <tmp>:
0
Useless use of "+" in expression "+($k)" in sink context (line 1)
tbrowder m: my $k = "0"; $k .= +$k; say $k 14:28
camelia ===SORRY!=== Error while compiling <tmp>
Missing required term after infix
at <tmp>:1
------> my $k = "0"; $k .=⏏ +$k; say $k
expecting any of:
dotty method or postfix
dakkar `prefix:<+>` is a multi sub, not a method, so you can't call it with the dot 14:29
tbrowder m: my $k = "0"; $k = +$k; say $k;
camelia 0
dakkar but you can call the `Numeric` method
tbrowder best i can do
dakkar m: my $k='010'; $k .= Numeric; say $k
camelia 10
tbrowder dakkar, thanks! 14:30
dakkar just grepping the source 😁
tbrowder yeah, docs need a tweak there with practical example 14:31
14:39 soverysour left 14:40 haxxelotto joined 15:01 bdju joined 15:05 soverysour joined, soverysour left, soverysour joined 15:09 soverysour left 15:43 jpn left 16:22 soverysour joined 16:34 soverysour left, soverysour joined 16:37 dakkar left 16:48 wayland joined, wayland76 left 17:07 rir joined 17:51 sena_kun joined
[Coke] Anyone has a suggestion, PRs welcome on raku/docs 17:52
18:06 jpn joined 18:17 abraxxa-home joined 18:20 abraxxa-home left 18:21 abraxxa-home joined
tbrowder wilco 18:34
m: my $a = 00_00; $a .= Numeric; say $a 18:37
camelia Potential difficulties:
Leading 0 has no meaning. If you meant to create an octal number, use
'0o' prefix; like, '0o0_00'. If you meant to create a string, please
add quotation marks.
at <tmp>:1
------> my $a = 00_00…
tbrowder m: my $a = 00_00; say $a.^name 18:38
camelia Potential difficulties:
Leading 0 has no meaning. If you meant to create an octal number, use
'0o' prefix; like, '0o0_00'. If you meant to create a string, please
add quotation marks.
at <tmp>:1
------> my $a = 00_00…
19:08 haxxelotto left
tbrowder m: my $a = 100_000; say $a.^name 19:11
camelia Int
tbrowder m: my $a = 100_000.0; say $a.^name 19:12
camelia Rat
tbrowder m: my $a = 10_0.0; say $a.^name 19:13
camelia Rat
19:15 soverysour left 19:40 jpn left 19:50 Xliff joined
Xliff Good evening! 19:50
Is there a way to have coercion AND a subset?
So if I create a subset like so: my subset UBInt of Int where * ~~ 0 .. 255 19:51
Can I still do "UBInt() $a"? 19:52
m: my subset UBInt of Int where * ~~ 0 .. 255; sub a (UBInt() $b) { say $b }; a(π) 19:54
camelia 3
Xliff :O
20:04 soverysour joined 20:08 soverysour left 20:27 Xliff left 21:35 abraxxa-home left 22:17 Sgeo joined 22:33 sena_kun left 23:14 wayland left