This channel is intended for people just starting with the Raku Programming Language ( Logs are available at
Set by lizmat on 8 June 2022.
aruniecrisps I figured out what happened, i just forced linked the pg lib to /usr/local 00:08
@SmokeMachine so here's what I'm doing, i'm making an PR to the Moneys library that handles currency more properly 00:35
I'm making a separate currency enum type 00:50
SmokeMachine Is there a link for the mr? I got curious 01:08
aruniecrisps It's preliminary work right now, I'm making changes as we speak 01:18
02:10 Manifest0 left 04:43 CIAvash joined 08:25 hudo_ joined 08:26 CIAvash left 08:28 teatwo left
librasteve SmokeMachine: yes … your example shows the case where you inflate/deflate a column of objects eg with amount + currency and store as json (i think). that’s ok if there is a mix of currencies. my question is can you show an example where the class has currency attribute but this is always (eg) USD so then only the amount values are stored (eg) as a decimal 09:01
i’m curious because i imagine a list (or maybe a time series) of Physics::Measure objects where i have class Measure { has Real $.value; has Unit $.unit … } 09:04
but typically I want to store a column of measurements all with the same Unit 09:05
like a list of daily weights all in kg 09:06
09:52 teatime joined 10:25 teatime left 10:59 Manifest0 joined 12:21 hudo_ left 12:48 habere-et-disper joined
SmokeMachine librasteve: Do you mean something like this? 12:52
habere-et-disper m: 1..* ==> grep *.is-prime ==> head(10) 12:55
camelia ( no output )
habere-et-disper  m: 1..* ==> grep *.is-prime ==> head(10) ==> say() 12:56
camelia (2 3 5 7 11 13 17 19 23 29)
habere-et-disper  m: 1..* ==> grep *.is-prime ==> head: 10 ==> say()
camelia ===SORRY!=== Error while compiling <tmp>
at <tmp>:1
------> 31..* ==> grep *.is-prime ==> head:⏏ 10 ==> say()
expecting any of:
colon pair
habere-et-disper Why is it that the shortcut form using colon is problematic here ? 12:57
I see that just deleting it works ! 13:06
m: 1..* ==> grep *.is-prime ==> head 10 ==> say()
camelia (2 3 5 7 11 13 17 19 23 29)
librasteve smokemachine: oh yes, perfect! thanks … 13:10
SmokeMachine :) 13:11
librasteve: Are you planing to use something like that somewhere? 13:14
librasteve habere: the colon form head: 10 is a method call syntax
maybe you need to add a *.head …? 13:15
habere-et-disper Interesting, thanks. I think of head(10) and head: 10 as forming an equivalence when there is but one passed parameter but I guess that's just with method chains. 13:17
librasteve SmokeMachine: i am considering the challenge from anton to make a time series of Measures … in my head, there are two parts, one is to do the inflate / deflate thing (where you can hold the units constant) and then there’s the storage layer … so now i am wondering if there’s an angle to use a raku Dan data frame as a column store under Red … as a parallel to various Sql to eg Pandas mapping tools 13:21
in the Python world
SmokeMachine librasteve: That sounds interesting... 13:26
please let me know if I can help somehow
librasteve so I see that Red is possibly a good approach for a common inflate / deflate model since anyway I need somtpething like 13:27
class TimeSeries { has Time @.t-series is column; has Mass @.m-series is column ... inflate/deflate blah; } 13:30
anyway just at the inception stage right now ... too many things!
thanks! 13:31
SmokeMachine :+1 13:32
librasteve another question - can Red use a non-SQL store like a csv? 13:34
SmokeMachine not yet... :(
but it's kinda possible to implement a Red::Driver that could do that 13:36
librasteve is that thoroughly documented? 13:37
I guess for a csv there are SQL libs out there you can make a new Red::Driver from 13:39
SmokeMachine :) 13:41
I suppose you can... :) 13:42
Not sure if it cem help, but I've been working on this custom Driver for MySQL: 13:43
librasteve Similarly to Spark, Polars uses the SQLContext to manage SQL queries ... 13:44
^^ this 13:45
that'll give me a big goal for the rest of 2024 then 13:46
SmokeMachine please, let me know if I can help somehow 13:47
librasteve will do! 13:48
14:02 habere-et-disper left
habere: I just tried your example 15:10
m: 1..* ==> grep *.is-prime ==> *.head: 10 ==> say()
Raku eval Exit code: 1 ===SORRY!=== Error while compiling /home/glot/main.raku Only routine calls or variables that can '.push' may appear on either side of feed operators. at /home/glot/main.raku:1 ------> 1..* ==> grep *.is-prime ==> *⏏.head: 10 ==> say()
librasteve [looks like Discord swallowed the (*)]
I think the error msg says it pretty clearly 15:11
ab5tract m: 1..* ==> grep *.is-prime ==> map *.head: 10 ==> say() 15:40
camelia (...)
ab5tract m: 1..* ==> grep *.is-prime ==> with *.head(10) ==> say() 15:41
camelia ===SORRY!=== Error while compiling <tmp>
Undeclared routine:
with used at line 1
ab5tract moves to repl
anyway, the colon argument dispatch syntax is indeed reserved for method calls 15:42
antononcube Can someone point out to me a repository or file with a Windows GitHub actions with testing. (For a Raku package/module.) 16:09
17:10 Tirifto left 17:14 Tirifto joined 18:11 hudo_ joined
librasteve m: say(head 10, (grep .is-prime, (1..))) 18:38
Raku eval Exit code: 1 ===SORRY!=== Error while compiling /home/glot/main.raku Undeclared routine: head used at line 1
librasteve m: say(head(10, (grep .is-prime, (1..)))) 18:39
Raku eval Exit code: 1 ===SORRY!=== Error while compiling /home/glot/main.raku Undeclared routine: head used at line 1
librasteve hmph - works in my repl (anyway I was just hoping to illustrate that pipes ==> are sugar for backwards call chains) 18:41
aruniecrisps Started work on a tree-sitter-raku project: 21:42
gfldex m: 1..* ==> grep(*.is-prime) ==> head(10) ==> say(); 21:57
camelia (2 3 5 7 11 13 17 19 23 29)
22:05 hudo_ left 22:19 habere-et-disper joined
habere-et-disper Can I ask raku programmatically how many operators it has? There seem to be 150+. 22:19
23:05 habere-et-disper left
antononcube @habere-et-disper I had a similar question recently, (about Raku's keywords), and I was told to look into the localization "L10N" or similar. 23:19