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.
03:05 razetime joined 03:39 teatime joined 03:50 kjp left 03:53 kjp joined 04:09 razetime left 04:55 jgaz left 04:56 razetime joined 05:17 razetime left 05:51 razetime joined 07:46 siavash joined 08:05 razetime left 08:15 teatime left, teatime joined 08:24 razetime joined 09:04 razetime left 09:08 razetime joined 09:45 razetime left 10:12 razetime joined 10:23 razetime left 11:12 razetime joined 12:41 razetime left 13:21 NemokoschKiwi joined 13:23 NemokoschKiwi left 13:28 siavash left
thowe The book "Raku Recipes: A Problem-Solution Approach" which is about $50 on amazon is only $15 direct from apress... Don't know if it is any good, but I picked it up yesterday. 15:06
rantanplan thowe, i have read that book last year to see some more examples of Raku's diverse syntax in many smaller examples. i liked it. but there's also the raku fundamentals book, which i recommend to read first. 15:10
thowe I have that one too
15:11 rantanplan is now known as snonux
antononcube @thowe Quoting myself here: > @voidzero In case your prefer recipe or case studies books: > 1. "Raku Fundamentals: A Primer with Examples, Projects, and Case Studies", www.amazon.com/Raku-Fundamentals-E...1484261089 > 2."Raku Recipes: A Problem-Solution Approach", www.amazon.com/Raku-Recipes-Proble...1484262573 15:19
@thowe And quoting myself again (clickbait style): > @voidzero If you want to "graduate" from using 3rd or 4th generation programming languages into a 21st century AI-infused programming experience, then read: > 1. "Workflows with LLM functions", rakuforprediction.wordpress.com/20...functions/ > and > 2. "Number guessing games: PaLM vs ChatGPT", 15:21
rakuforprediction.wordpress.com/20...s-chatgpt/
thowe I have no preference. I Own "learning Perl6", Perl 6 Fundamentals, parsing with Perl6 regex and grammars... I've been doing reading off and on for a while, but actually wrote some Raku for work this week to help with a data correlation and audit project.
The first time I actually just wrote some Raku for me instead of book exercises. 15:22
antononcube @thowe If you any data analysis and data science work with Raku, please proclaim it. (And preferably, extensively document it.) 15:23
* "If you do any data analysis ..." 15:24
thowe I wouldn't dignify the little script I wrote by calling it science. 15:35
this is about the level I get to 99% of the time other than some very specific larger projects: gist.github.com/thowe/acb52de3de3a...381a516557 15:42
The fact that I don't have to deal with external integer math libraries is so nice for me 15:54
antononcube @thowe So, your are converting the result of an SQL query into a Hash of Hashes, right? 15:56
Meaning, you are in my camp. (And not in the one created and curated by@librasteve .) 15:58
thowe for this case, yeah, but merging it with other data... I needed sort of a temp hierarchical database. 15:59
presenting a collation of an audit for my bookkeeper and other billing guy to use to make some other decisions. 16:03
antononcube Hm... again, it seems to be a workflow that belongs to set of Raku packages for data manipulation I made. See "Data::Reshapers" and "Data::Summarizers". 16:07
librasteve to be clear the raku Dan family of modules is still experimental and not as ready for real use as the Data:: stuff that you mention ... it would probably be practical to build (via PR) on the current implementation - but there is a lot of data science /analysis functions that are missing and you would have to build these 16:14
my current focus is Dan::Polars since that is super fast, but I have not been able to build more than about 1/3 of the features due to the large set of features in the Polars library 16:16
antononcube Performance is important. I have not compared the performance of the Raku “Data::*” packages to other systems… 16:18
librasteve well - Dan::Polars is certainly test driveable and you can judge the speed for yourself using the example provided - I am also happy to hear requests from folks (via Issues) and to add features that are in demand first 16:20
hopefully I will be able to apply some tuits over the coming few days
16:26 jgaz joined
antononcube @librasteve For performance comparisons -- do you mean the tests and data here? github.com/librasteve/raku-Dan-Polars 16:35
librasteve yeah - raku-Dan-Polars/bin/h2oai-db-benchmark-grouping.raku is the general H2O AI benchmark for DataFrame grouping and the one you can check 16:45
the official metric requires 2e9 iterations (2 billion) - i have run 1e6 OK on my machine - so we are not yet in a position to compare properly with production implementations and will need a boost in hardware (AWS?) to 32 cores and a LOT of RAM to get there (which is what the others use btw) 16:47
even in the long term we will not be able to touch Rust since there is some Raku overhead, but I am hopeful that we will be able to surpass Python Polars on core library artificial benchmarks with some judicious paralyzation (but this is a long way off and we need to complete the functional build first) 16:50
the basis idea is that raku manages a set of proxy objects over in Polars (which is native Rust) ... SOOO things get a lot slower if you need to move data over to the raku side 16:51
sorry ... must dash
thowe I don't understand why I would use an external module for that stuff... It just looks like a fancy name on top of nested data structures, which I can do in my sleep. What am I missing? 17:19
antononcube @thowe I am not sure who you are targeting with your comment. 🙂 17:25
@thowe There are (at least) two perspectives in the Raky ecosystem for data transformations: 1) One targets performance, and hence uses special classes and data structures, 2) The other "prefers" non-intrusive data transformations that use built-in Raku data structures. 17:28
@thowe Your comment belongs makes me think you have the mindset close to the 2nd approach.
thowe well, I looked at Dan::Polars, but I also don't know why anything I did in my little script would be an example of the need for a fancy library. Arrays of hashes of hashes, etc... or any permutation of that kind of thing is something I work with often to manipulate data around for different types of consumption. I didn't think/know there was some academic vocabulary around it. 17:31
antononcube The 2nd approach attempts considers datasets (or data frames) to be "naturally" kept in 1) arrays of hashes , 2) hashes of hashes, 3) arrays of arrays, or 4) hashes of arrays. More or less the datasets (data frames) are just tabular data put in obvious Raku data structures. 17:33
thowe I often have to change them around quickly, build them recursively, whatever. Should I be calling them "data frames"? That would make me feel fancy. 17:34
antononcube @thowe " Arrays of hashes of hashes, etc... or any permutation of that kind of thing is something I work with often to manipulate data around for different types of consumption. [...]" -- Yes, your are the target user of the packages "Data::Reshapers", "Data::Summarizers", "Data::TypeSystem", and a few others. You are not the "immediate" target user of "Dan::Polaris". 17:35
"Data frames" are mostly for for tabular data. If your data is ragged then I would not call it a data frame. 17:37
@thowe Here are certain intuitive definitions of datasets and data frames (I use): - A dataset is a table that as a data structure is most naturally interpreted as an array of hashes, each hash representing a row in the table. - A data frame is a table that as a data structure is most naturally interpreted as an array of hashes, each hash representing a column in the table. 17:39
thowe array of hashes is a common pattern I use, but it's rarely that simple. And sometimes it has to be a tree of any size, like here... github.com/thowe/MoPieNg/blob/mast...rk.pm#L204 17:41
that's just Perl, but I find Raku much the same only more 17:42
sometimes I do it just to tabulate, which is also something I did in my example. I don't really know any data science, so if I am doing any it is by accident. 17:44
antononcube @thowe Ok. As I mentioned I am very curios about your data gathering and manipulation uses cases.
@thowe My minimalist perspective on data wrangling with Raku is spelled out in the section "Datum fundamentum" here : rakuforprediction.wordpress.com/20...with-raku/ 17:45
@thowe The way I see it, Data Wrangling (DW) is a part of Data Science (DS), but definitely not "the whole thing.' Most of the workflows and functionalities I am interested in are DW facilitating DS. Of course, DW can be also done without doing DS. 17:49
thowe My use cases tend to be whatever someone else is trying to know... "How many of this kind of service that also does this thing do we have that is older than [date] and excludes residential customers?" "I don't know, give me a minute to see what data is available that may indicate those things and how to compare it." or "if we stopped providing this service and removed all the equipment and overhead that we have to run it, would the savings 17:53
try to put some initial numbers together; make me coffee"
Often I am asking myself these things as I am often the only one that would be thinking in these terms 17:54
antononcube This is some sort of Data Acquisition (DA) tasks or workflows. I make conversational agents that answer these kind of questions. 17:55
thowe what's a conversational agent?
antononcube (Using mostly Raku...)
@thowe Agh... there is a short and long answer. 🙂 Here is a link to the long one: archive.fosdem.org/2022/schedule/e...quisition/ 17:57
librasteve thowe - thanks for the explanations - if you were happy in perl and do not want to use a formal DataFrame model, then using raku the way you are already sounds good to me 17:59
my Dan pet, partly done project is to bring the tools that Data Scientists use into the raku space - the vast majority of these folk use Python and the Pandas library. if you would like to hear what I have to say on this, here are my slides from a previous raku conference talk rakujourney.wordpress.com/2022/08/...rc-slides/ 18:02
thowe Well, I mean, I always found it a fun way to spend the day. If there's an entire academic discipline around it I might be really interested to know about it. I'm not trying to dismiss any of this and say "I'm good".. What I am saying is "wait, is what I'm doing a deeper thing I could do better by knowing something I don't know?"
am I a "data scientist impostors" ? :) 18:03
librasteve I think of Python / Pandas as "popular but showing it's age" ... for highly structured tabular data where performance is key, then it still has the edge 18:04
antononcube @thowe > what's a conversational agent? A conversational agent for data wrangling is a software program that allows users to interact with data in a more natural way, without having to learn complex programming languages or write code manually. Users can simply ask the conversational agent to perform data wrangling tasks, such as cleaning, transforming, and analyzing data. The conversational agent will 18:05
then translate these natural language commands into data wrangling code (of Mathematica, Python, R, Raku) and, optionally, execute them. This aims to improve the productivity, accuracy of data-related activities.
librasteve what Anton is doing with raku is really interesting and much more forward looking. it uses the strengths of raku (the hash of arrays type manipulations) and is already good to pick up and use ... 18:06
nemokosch did you generate the answer?
sussy
thowe OK, well apparently this is this weekend's rabbit hole... thanks ;) 18:10
nemokosch Watch out with Anton Antonoc 18:12
*Antonov
antononcube Yes, I did! I did read though and made few changes. (E.g. adding the programming languages.)
nemokosch Yeah, that part was particularly suspicious 18:14
jgaz I'm trying to load my own .rakumod file for the first time and not meeting with success. I have PRG.rakumod in the same directory. It has `unit module PRG` set and the class PRG is exported. My main code (again, same dir) has `use PRG` set. I get a "could not find PRG in..." error. 18:44
lizmat short answer: add -I. 18:46
you need to tell Raku where to find modules that are not installed
jgaz Add -I where?
lizmat raku -I. yourscript.raku
nemokosch if you want it in your code, you can add use lib '.'; or somethinh 18:47
jgaz okay, nemokosch, that worked. 18:48
thanks
lizmat fwiw, I think "use lib" is a holdover from the past, and shouldn't be used anymore, and possibly deprecated 18:49
nemokosch a fun gamble indeed: let's nerf the case people would normally want so that some niche cases can work
jgaz nemokosch, so is there a third path here where I don't have to pass -I as a runtime argument and I don't use `use lib`? 18:56
lizmat install the module, treat it like something you would publish 18:57
App::Mi6 will help you with that
nemokosch I don't think so
jgaz ok, I'll look at that. 18:58
nemokosch Those who created this situation should answer these questions
thowe is there not an environment variable that you can add a dir to a path? 19:11
nemokosch RAKULIB iirc
scullucs Am I right to be surprised that Raku evaluates as True "symlink-to-file".IO.f -- and similarly, True for "symlink-to-dir".IO.d? 19:47
I was expecting only "symlink-to-whatever".IO.l to be True. 19:48
Also, it would be nice to have an IO prodicate to identify sockets. 19:54
navigates the hoops. 19:55
lucs (a predicate* too) 19:57
antononcube @lucs Are you applying/seeing these on a concrete file? What is access modes striings? On what operation system? 20:01
20:15 teatime left, teatime joined
scullucs On Linux. For example: having 「drwxr-xr-x ⋯ root root ⋯ SBo」 and 「lrwxrwxrwx ⋯ lucs users ⋯fooo -> SBo」, 「"fooo".IO.d"」 evaluates to True. 20:17
(spurious double-quote there, sorry) 20:24
20:34 teatwo joined 20:37 teatime left
antononcube @lucs Someone else should look into this. (And reproduce it.) 20:55
scullucs To reproduce: gist.github.com/lucs/a6e2b728fb5a9...52a2654201 21:17
thowe spurt? 22:13
nemokosch what do you mean?
thowe I was just reading the code pasted... Never saw .spurt before. I was amused 22:14
nemokosch 🙂 22:19
scullucs Yeah, very practical 🙂 22:21
antononcube @thowe Occasional amusing features / names / keywords is most likely a required or at least expected feature for programmign languge with Raku's pedigree. 22:32