🦋 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:00 reportable6 left 00:01 reportable6 joined 01:01 evalable6 left, greppable6 left, shareable6 left, unicodable6 left, tellable6 left, squashable6 left, bisectable6 left, sourceable6 left, notable6 left, benchable6 left, quotable6 left, linkable6 left, statisfiable6 left, committable6 left, bloatable6 left, nativecallable6 left, releasable6 left, reportable6 left, coverable6 left 01:02 linkable6 joined, committable6 joined, bloatable6 joined, benchable6 joined, statisfiable6 joined 01:03 shareable6 joined, quotable6 joined, bisectable6 joined, evalable6 joined, reportable6 joined, squashable6 joined, unicodable6 joined, greppable6 joined 01:04 sourceable6 joined, notable6 joined, releasable6 joined 01:05 coverable6 joined, nativecallable6 joined, tellable6 joined 01:27 wayland76 joined 01:51 guifa_ joined
wayland76 Interesting problem that occurs in my code, but not separately. If I use either "say" or "print" twice in this particular function, then it hangs on the second one. But if I use "shell 'echo blah'", it works. ??? :) Not expecting solutions since I can't come up with a small bit of code that does this, but interesting nonetheless. 02:00
antononcube Consider mentioning the operating system and raku(do)’s version... 🙂 02:46
wayland76 OS: Alpine Linux 3.18.2 (in a docker container). Raku version: 2023.06. MoarVM. Language v6.d 02:48
02:51 linkable6 left, evalable6 left, guifa_ left 02:53 evalable6 joined, linkable6 joined 03:20 razetime joined
wayland76 OK, everyone. At this point I've spent about 8 hours wrestling with this, and I've *finally* found the problem. It's not raku, but it affected raku. When I run docker exec, if I don't pass the -t option, then I don't get all the output. Hope this helps someone someday. 03:34
03:46 yjh joined 03:57 cm left 04:06 cm joined
teatwo wayland76, what does -t do 04:43
05:06 linkable6 left, evalable6 left 05:07 razetime left 05:08 evalable6 joined, linkable6 joined
thebb -t attaches to terminal 05:10
detaching runs it in the background 05:14
05:15 razetime joined 05:39 wayland joined 05:40 wayland76 left 05:50 razetime left 06:00 reportable6 left 06:01 Geth__ joined, Sgeo_ joined, Sgeo left 06:02 reportable6 joined, Geth left 06:18 nebuchad` joined 06:19 cm_ joined 06:21 eseyman_ joined 06:22 [Coke]_ joined 06:25 cm left, [Coke] left, nebuchadnezzar left, eseyman left, cm_ is now known as cm 06:55 eseyman_ is now known as eseyman
wayland teatwo it allocates a terminal inside the docker container to the running program. 06:59
If you want an interactive shell in docker, use: docker exec -it <container> /bin/bash 07:00
07:04 jpn joined 07:21 jpn left 07:42 samebchase left 07:43 samebchase joined 07:45 samebchase left 07:46 samebchase joined 07:54 [Coke] joined 07:55 [Coke]_ left 07:59 razetime joined 08:06 razetime left 08:11 jpn joined 08:18 MoC joined 08:19 tea3po joined 08:20 tea3po left, tea3po joined 08:21 tea3po left, tea3po joined 08:22 teatwo left, tea3po left, tea3po joined 08:23 Geth__ left, Geth joined 08:30 sena_kun joined 08:32 Sgeo_ left 08:38 jpn left 08:39 justache is now known as reddit-bot, reddit-bot is now known as justache 08:55 razetime joined 09:13 jpn joined 09:16 Geth left, Geth joined 09:25 sena_kun left, jpn left 09:28 Geth left, Geth joined 09:37 jpn joined 09:44 p6steve joined
p6steve o/ 09:44
tellable6 2023-02-08T04:45:46Z #raku <deoac> p6steve: macOS Ventura 13.1.  I installed rakudo with the Rakudo Star Bundle.  I used your recipe from #raku-beginner 3 February.
2023-02-11T22:59:11Z #raku <rf> p6steve: stackoverflow.com/questions/754238...ative-call
2023-03-24T19:30:22Z #raku <tonyo> p6steve: github.com/tony-o/raku-fez/blob/di...kumod#L706
2023-03-24T19:34:53Z #raku <tonyo> p6steve: a lot of uses in that code base but you may need to grep
2023-03-24T19:50:01Z #raku <rf> p6steve: github.com/rawleyfowler/JSON-Simd/...rakumod#L8
09:45 p6steve left 09:47 librasteve joined
librasteve i'm using NativeCall and want to be able to pass a CArray like (1,2,3,null,5) via ffi 09:48
anyone know what special C value is for null (I can detect Nil on the raku side but don't know what to write to the CArray item) 09:49
please?
lizmat a CArray is basically a Buf is it not? 09:50
librasteve dunno, here is what works sub se_new_i32(Str, CArray[int32], size_t) returns SeriesC is native($n-path) { * } 09:51
sub carray( $dtype, @items ) { my $output := CArray[$dtype].new(); loop ( my $i = 0; $i < @items; $i++ ) { $output[$i] = @items[$i] } $output } 09:52
^^ i have one of these for each datatype - i64, f32, f64 and so on 09:53
str, bool
when 'i32' { se_new_i32($name, carray( int32, @data), @data.elems) } 09:54
sorry missed this bit
lizmat if it's a native int array at the lowest level, then there are no special values possible, other than 0 maybe? or -1 ? 09:58
librasteve thanks - i continue to research this arcane topic... apparently C does not do NULL values (only NULL pointers which are 0000) ... so maybe this is a feature of the Polars/Arrow library... 10:01
nemokosch in C, it's all just #define NULL 0 10:06
librasteve ironically NaN and Inf "just work"
10:07 _________ left
thank you . please can you explain how to write this in raku so it can be assigned at the $output[$i] line? 10:09
nemokosch for pointers, it says that the type object represents the NULL value
10:09 _________ joined
how that fits for native types that have no type object iirc... 10:09
librasteve this is not for pointers, but for values
nemokosch I think it all boils down to what that 32-bit number represents 10:10
librasteve I have tried already Num, (Num), Nil
nemokosch if it's really just an int in the C code, then it cannot be optional in C either
librasteve ^^^ these get an error This type cannot unbox to a native integer: P6opaque, Str
or
Cannot unbox a type object (Nil) to int. 10:11
nemokosch if it's a pointer semantically then 0 is probably reserved as the null pointer
so this would be my question: what is the meaning of that data?
librasteve well I was thinking maybe its a special char rather like \n
pola-rs.github.io/polars/py-polars...pr.is_null 10:13
this explains the meaning of the data
nemokosch is this like a database? 10:15
lizmat native ints can *only* contain native int values 10:16
any sentinel value *must* be an int value then 10:17
nemokosch that's how it is in C as well, so I wonder what the C API looks like 10:18
arrow.apache.org/docs/format/Colum...null-count 10:21
the underlying data format is a bit tricky; basically there is a bitmask that marks valid positions
so null is not directly represented in the data itself 10:22
librasteve .oO yes that's v. helpful thanks 10:24
guess I need to make a Validity bitmap on the raku side and then pass that as an additional arg to the new and then somehow apply on the rust side - ho hum 10:25
10:46 _________ left 10:48 _________ joined 10:57 librasteve left 11:41 jpn left 12:00 reportable6 left 12:03 reportable6 joined 12:32 razetime left 13:07 jpn joined 13:08 razetime joined 13:13 jpn left 13:22 jpn joined 13:46 xinming left
tbrowder__ .tell ugexe i've updated the doc RESOURCES PR. 13:48
tellable6 tbrowder__, I'll pass your message to ugexe
13:48 xinming joined 14:36 Sgeo joined 14:43 Geth left, Geth joined 15:10 MoC left 15:11 MoC joined, TieUpYourCamel left
antononcube It is a (very serious) attempt to bring the R concpet of "data frame" into Raku. Other efforts like that exist in Python, Julia, and Swift. 15:43
nemokosch I don't think it's about Raku
antononcube So, yes, it is like a database, but should be more powerful.
Well, "Polars" is data frame library for Rust. Steve tries to connect Raku's "Dan" with Rust's "Polars". 15:49
Also, "Polars" has a Python interface. 15:56
Related to that previous note are these two (objective) observations for data wrangling in Raku efforts: - Steve tends to use the awkward, unfinished, clunky (wrong) concepts and tools: Data frames, Python, Rust, Jupyter notebooks - Anton tends to use the (much better) concepts and tools: Datasets, Mathematica, Swift, Mathematica notebooks 15:58
lizmat antononcube: I assume the "clunky (wrong) and tools" are your *opinion*, right? 16:01
nemokosch Swift be like 16:09
antononcube As I mentioned, the conveyed observations are objective. 16:11
16:11 linkable6 left, evalable6 left 16:13 evalable6 joined 16:14 linkable6 joined
In general, I was surprised that someone would take R-data-frame-in-Python route for data wrangling in Raku. I find that route too difficult with too many gotchas. (Meaning, I would personally not take it.) 16:14
Jupyter has been clunky and buggy for many years. It became more swifter and more stable relatively recently. (a pretty much around the time the notebook patents of Wolfram Research started to expire.) 16:16
Rust is unfinished — as far as know it does not have a standard, and until recently only worked via LLVM. (Maybe it still does.) 16:20
16:24 Geth left, Geth joined
My previous two notes sound too serious — I expect it to be fairly obvious that I am biased toward Mathematica, hence, whatever claims for objectivity I make should be taken with some skepticism… 16:27
nemokosch 🤠 16:30
antononcube Speaking again about data wrangling in Raku, for me the duality of the two approaches -- Steve's vs mine -- is very interesting: - If one takes the data frame approach, almost inevitably would look for efficient, external solutions, like "Polars", justifying with performance objectives - If one takes the dataset approach, almost inevitably would try to justify it with minimalism, unintrusiveness, and social 16:39
contracts with the users
16:53 jpn left 17:20 squashable6 left 17:21 bigdata joined 17:23 squashable6 joined, razetime left 17:27 ab5tract left 17:40 sena_kun joined 18:00 reportable6 left 18:02 reportable6 joined
nemokosch what is the difference? 18:11
18:12 leedo left, leedo joined
antononcube Hmm... between the concpets of "data frame" and "dataset" and their projections in Raku, or the justification approaches? 🙂 18:15
I assume you are asking about the latter -- see the sub-section "Dataset vs Data frame" in the section "Datum fundamentum" of this article: rakuforprediction.wordpress.com/20...with-raku/ 18:17
> 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. 18:19
18:19 jcallen left, jcallen joined 18:22 lucs left, lucs joined
nemokosch how would a column be a hash? 18:33
wouldn't that rather be an array
antononcube Data frames can have both column names and row names. So, each column can be seen as an ordered or sorted hash. Alternatively, row-indexes can be seen as the keys (of each column-hash.) 18:55
nemokosch weird
antononcube Not that much! R has ubiquitous element naming of the elements of its data structures: - List elements can have names 19:10
Also, R has formula objects. So, the element naming and formula objects allow R to have some sort of "semi-symbolic" computations. 19:12
19:22 linkable6 left, evalable6 left 19:23 linkable6 joined, evalable6 joined
"Jupyter::Chatbook" teaser (with DALL·E cells): i.imgur.com/Ugj4DPu.png 19:25
19:31 AntonOks47 joined 19:34 AntonOks47 is now known as AntonOks 19:35 AntonOks left 19:43 bigdata left 20:28 MoC left
librasteve my ears are burning - so let me (briefly, for it is late) chime in: 20:34
100% agree
I am truly mad to do this (since I had to learn Data Science and Rust concepts from scratch and it is a hard problem) 20:35
100% agree ... and also we probably need raku to have a way to get to a fast native library or raku will always lose on the performance side 20:37
@nemokosch - this is my intro to DataFrames in raku talk conf.raku.org/talk/171 20:39
the famous examples are R, Pandas (Python) and now Polars (Rust) 20:41
20:44 kawaii left 20:45 kawaii joined
nemokosch this is from last year, right? 20:47
20:49 sjn left, sjn joined 20:50 guifa_ joined 20:53 teatwo joined 20:55 sena_kun left 20:56 tea3po left, teatwo left 20:57 teatwo joined 21:09 AntonOks joined 21:19 jgaz left 21:38 jpn joined 22:03 AntonOks left 22:08 lizmat_ joined 22:12 lizmat left, hythm joined, renormalist left 22:13 renormalist joined 22:30 hythm left 23:30 reportable6 left, sourceable6 left, notable6 left, tellable6 left, coverable6 left, committable6 left, squashable6 left, evalable6 left, releasable6 left, statisfiable6 left, unicodable6 left, benchable6 left, quotable6 left, bisectable6 left, nativecallable6 left, greppable6 left, bloatable6 left, shareable6 left, linkable6 left 23:31 bloatable6 joined, greppable6 joined, quotable6 joined, unicodable6 joined, nativecallable6 joined 23:32 committable6 joined, reportable6 joined, bisectable6 joined 23:33 statisfiable6 joined, releasable6 joined, evalable6 joined, tellable6 joined, notable6 joined, linkable6 joined, coverable6 joined 23:34 benchable6 joined, shareable6 joined, sourceable6 joined, squashable6 joined