🦋 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.
00:03 Sgeo joined 00:20 Manifest0 left 00:58 jpn joined 01:05 jpn left 01:51 jpn joined 01:55 jpn left 02:36 hulk joined, kylese left 02:46 jpn joined 02:51 jpn left 02:59 constxqt_ left 03:05 mcmillhj left 03:09 sjn left 03:15 hulk left, kylese joined 03:19 sjn joined 03:30 edr left
[Coke] looping over a 900K line csv file with $csv.getline is slow. Any suggestions on a different method? 03:32
ugh. part of this advent article is "hey, this is slow, but we're clever and can work around it." 03:36
....and getting a segfault in raku. 03:38
*sigh* 03:41
I feel like if I lean into the "workaround" aspect here, it's just going to make us look bad. 03:53
04:04 nebuchadnezzar left 04:19 Summer joined
[Coke] anyone want to review the article before I hand it off to liz? Nearly done. 04:36
05:43 jmcgnh left 05:49 Summer left 05:53 jmcgnh joined 06:06 jpn joined 06:11 jpn left 06:17 Summer joined 06:39 teatime left 06:41 teatime joined 07:07 jpn joined 07:12 jpn left 07:35 nebuchadnezzar joined 07:55 verzit joined 08:02 dbonnafo2 left 08:12 Summer left 08:46 vrurg left 08:53 constxqt_ joined 08:55 Manifest0 joined 08:58 Summer joined 09:08 dakkar joined 09:19 verzit left 09:21 constxqt_ left 09:35 jpn joined 09:42 Sgeo left 09:46 jpn_ joined 09:47 verzit joined 09:49 verzit_ joined, jpn left 09:52 verzit left 09:54 jpn_ left 09:56 jpn joined 10:00 sena_kun joined 10:01 jpn_ joined, jpn left 10:13 jpn_ left 10:48 jpn joined 10:52 jpn left 11:10 jpn joined 11:16 jpn left 11:17 jpn left 11:19 verzit_ left 11:22 verzit_ joined
ab5tract [Coke] I know the feeling :) 11:34
it's slow, but is it at least lazy and thus memory efficient? 11:35
you can always play up the positive
lizmat has played with a bit and got it down from 9.82 to 3.00 11:51
and learned that Text::CSV objects are *not* thread-safe 11:52
if that could be made to be threadsafe, it should go down to about 2.4s 11:53
12:16 xinming left 12:18 xinming joined
Geth advent/main: 1401fcb8fb | (Elizabeth Mattijsen)++ (committed using GitHub Web editor) | raku-advent-2023/authors.md
Schedule Coke's post on the 17th
lizmat only 5 slots left in the Raku Advent Calendar: if you feel like writing a post, now is the time! 12:23
if you feel comfortable writing it in markdown, rather than in WordPress directly, that's also possible: /me will take care of editing / posting 12:24
12:33 edr joined 13:23 jpn joined 13:31 jpn left 13:38 jpn joined
librasteve [Coke] you can do this: 13:49
use Dan; use Dan::Polars; my \sw = DataFrame.new; sw.read_csv("test_data/dfStarwars.csv").show;
then Dan::Polars will use the Rust Polars read csv function ... but the setup overhead is high (needs rust, cargo, etc) and probably detract from the main thrust of your tale 13:51
14:16 vrurg joined 14:37 Sgeo joined
jdv what in the world does "!cursor_start_cur cannot restart a cursor" mean? 14:58
gist.github.com/jdv/70520031234f7b...0197320136 15:02
[Coke] if I am editing an advent article, do I need to save my work? 15:15
ah, hopefully re-hit "Schedule" seems to have done it and not actually published it 15:17
lizmat: mentioning it here in case you want more eyes on it, I added in your suggested code (Thanks!), and have edited the article on wordpress. Also caught a few other things I missed when editing the file at midnight last night. :) 15:19
nemokosch jdv: you just stomped onto something I have been complaining about so much 15:28
the godforsaken shared namespace that grammar-ish things (like the <print> token) and usual methods use 15:29
thank you very much, I'm stealing the gist
16:00 swaggboi left
lizmat m: "foo" ~~ / .+ /; $/.print # shorter golf 16:11
camelia !cursor_start_cur cannot restart a cursor
in block <unit> at <tmp> line 1
16:13 swaggboi joined
lizmat m: "foo" ~~ / .+ /; $/.Any::print # workaround 16:27
camelia foo
16:34 [Coke] left 16:39 verzit_ left
jdv ih, no. thats not good. 17:07
17:29 dakkar left 17:36 jpn left 17:54 jpn joined 17:58 Voldenet_ joined 17:59 Voldenet left, Voldenet_ is now known as Voldenet 18:07 [Coke] joined 18:12 Voldenet left, Voldenet_ joined, Voldenet_ is now known as Voldenet 18:30 mcmillhj joined 18:40 [Coke] left 18:42 [Coke] joined 18:44 jpn left 19:28 Summer left, Summer joined 19:59 Summer left, Summer joined 20:17 verzit_ joined 20:29 Summer left 20:30 Summer joined 20:41 jpn joined 20:45 jpn left 21:00 Summer left, Summer joined 21:09 jpn joined 21:15 jpn left 21:17 Xliff left 21:25 jpn joined 21:31 Summer left, Summer joined 21:32 jpn left 21:56 jpn joined 21:57 mcmillhj left 21:58 verzit_ left 22:01 Summer left 22:02 Summer joined, jpn left 22:17 defaultxr joined
defaultxr hi, is it possible to expand a variable within a docstring? i'd like to do something like "#= The supported options are %options.keys" and have %options.keys expand to the value of that expression 22:22
22:32 Summer left, Summer joined
librasteve "#= The supported options are {%options.keys}" 22:43
oh - you mean rakudoc I guess ... sorry that may not work then 22:45
defaultxr ah, yes, that didn't seem to work :( thanks though. do you know if it's something that is possible? or is there some way to set a function's docstring dynamically, i.e. other than with the #= syntax? i'm trying to document the possible options for one of my MAIN() function's arguments. 22:49
23:03 Summer left, Summer joined
japhb defaultxr: See github.com/Raku-MUGS/MUGS-UI-TUI/b...#L195-L235 for how I factored a similar problem 23:13
Not by setting the docstring dynamically, but by overriding USAGE
defaultxr ohhh, good idea! yes, i think something like that would work for me. thanks! 23:14
japhb That has the advantage of being able to factor out both common options and common argument *values* 23:15
defaultxr: You're quite welcome! :-)
23:22 sena_kun left 23:33 Summer left 23:34 Summer joined 23:57 mcmillhj joined