This channel is intended for people just starting with the Raku Programming Language (raku.org). Logs are available at irclogs.raku.org/raku-beginner/live.html
Set by lizmat on 8 June 2022.
00:07 jgaz joined 00:32 jgaz left
aruniecrisps @SmokeMachine I have a question about github.com/FCO/Cro-HTTP-Session-Red 01:38
SmokeMachine Please, ask
aruniecrisps what exactly does this error mean? 01:40
cdn.discordapp.com/attachments/768...bfa9d&
SmokeMachine I suppose you have not imported Red… 01:42
aruniecrisps that explains it 01:44
thanks
SmokeMachine Or you could, probably, only import Red::Traits (github.com/FCO/Red/blob/master/lib...umod#L318) 01:46
aruniecrisps Gotcha @SmokeMachine 02:57
Thanks for the help so far! 02:58
I have another question about Red, can it do database migrations?
SmokeMachine I’m working on that… but not yet… :(
Would you like to help on that discussion? github.com/FCO/Red/issues/15 03:00
aruniecrisps Sure! 03:07
10:06 CIAvash joined 10:49 CIAvash left 14:13 MasterDuke joined
doodler8888 As i understand right now, raku doesn't autogenerate signature description for main subroutines with slurpy arrays: sub MAIN(*@targets, Str :$link-location) { for @targets -> $target { my $abs-target = get_abs_path($target); my $final-link-location = $link-location; $final-link-location ~= "/{$abs-target.IO.basename}" if $final-link-location.IO.d; mkdir 15:29
$final-link-location.IO.dirname; symlink $abs-target, $final-link-location; say "Symbolic link created for $abs-target at $final-link-location"; } } Is there any workaround instead of manually creating a description yourself?
aruniecrisps @SmokeMachine what column type does Red translate Str to? 16:32
SmokeMachine It seems to be varchar(256) (github.com/FCO/Red/blob/master/lib...umod#L977) but you can set it to any type you want… 16:35
aruniecrisps Do you think it would be better to map it to text? 16:36
also i'm assuming that you would have to use inflators and deflators for that functionality right?
SmokeMachine No 16:37
has Str $.bla is column{ :type<text> }; 16:38
aruniecrisps ah makes sense
SmokeMachine By no, I mean about inflator deflator… 16:39
aruniecrisps gotcha, i figured i'd suggest text as the default for string becaue it sqlite, maria/mysql and postgres all support it 16:40
SmokeMachine About using text instead of varchar(255), yes… maybe that would make sense… (I don’t really remember why it isn’t that way…)
aruniecrisps i'll open a PR so you can review it
SmokeMachine Thanks 16:41
aruniecrisps I was also looking at Red::Jobber, and i have a couple of questions
SmokeMachine I don’t think that’s working at this point… 16:42
aruniecrisps Never mind then, I'll have a look at it later 16:43
SmokeMachine But what were you going to ask? 16:45
aruniecrisps I was gonna ask whether or not there was a way to have more direct multithreading access in Raku, but it might not be the right question to ask here 16:47
Here's the PR btw
github.com/FCO/Red/pull/572
let me know if anything else needs changing
SmokeMachine Sorry, I’m not with access to my computer… I’ll need to let to take a look later… do you know if the tests are passing? 16:50
aruniecrisps Let me double check 16:52
I'll pull them down
I fixed the tests @SmokeMachine 17:21
How do I generate the sql for a create table using Red? @SmokeMachine 17:29
SmokeMachine Model.^create-table; or schema(Model).create 17:33
aruniecrisps No I mean like how would i generate the SQL output? 17:34
SmokeMachine do you mean as a debug message? $*RED-DEBUG = True; ? 17:35
my $*RED-DEBUG = True;
aruniecrisps yea, for right now I just want to manually migrate my database 17:37
18:02 MasterDuke left 18:16 MasterDuke joined 19:35 MasterDuke left
SmokeMachine did you take a look at that issue thread? 20:02
20:19 bent_fingers joined
aruniecrisps @SmokeMachine not yet i'm reading through it right now while i work on my project 22:24
@SmokeMachine wait i'm wondering what you mean by this isn't possible: github.com/FCO/Red/issues/15#issue...-473252955 23:57