🦋 Welcome to the MAIN() IRC channel of the Raku Programming Language (raku.org). This channel is logged for the purpose of keeping a history about its development | evalbot usage: 'm: say 3;' or /msg camelia m: ... | Log inspection is getting closer to beta. If you're a beginner, you can also check out the #raku-beginner channel! Set by lizmat on 25 August 2021. |
|||
00:07
reportable6 left
00:49
hasrthur joined
00:52
jjido left
00:54
hasrthur left
01:09
reportable6 joined
01:14
eseyman left
01:15
dextercd left
02:15
unicodable6 left,
benchable6 left,
committable6 left,
releasable6 left,
greppable6 left,
reportable6 left,
sourceable6 left,
coverable6 left,
evalable6 left,
nativecallable6 left,
bloatable6 left,
bisectable6 left,
quotable6 left,
tellable6 left,
statisfiable6 left,
notable6 left,
squashable6 left,
shareable6 left
02:16
tellable6 joined,
unicodable6 joined,
benchable6 joined
02:17
reportable6 joined
02:18
squashable6 joined,
statisfiable6 joined,
bisectable6 joined,
releasable6 joined
02:21
clarjon1 left
03:09
simcop2387 left,
perlbot left
03:15
simcop2387 joined
03:16
perlbot joined,
sourceable6 joined
03:17
greppable6 joined,
bloatable6 joined
03:18
notable6 joined
04:15
evalable6 joined
04:16
shareable6 joined
04:18
coverable6 joined
04:41
ProperNoun left,
ProperNoun joined
05:16
nativecallable6 joined
06:08
reportable6 left
06:11
reportable6 joined
06:18
committable6 joined
06:35
linkable6 joined
06:44
xinming joined
07:06
squashable6 left
07:09
squashable6 joined
07:16
quotable6 joined
07:31
epony joined
07:40
seednode99 left
07:41
seednode99 joined
|
|||
Maxdamantus | Does it seem strange that this 243 KiB UTF-8 string requires more than 16 GiB of memory? | 08:15 | |
$ jq -n -j 'range(0, 50000) | [., 768] | implode' | raku -e 'slurp;' | |||
Killed | |||
08:17
squashable6 left
08:19
squashable6 joined
08:20
squashable6 left
|
|||
Maxdamantus | eval: my @a; for 0..50000 { @a.push($_, 0x301); }; @a.chrs; | 08:22 | |
evalable6 | (signal SIGHUP) «timed out after 10 seconds» | ||
MasterDuke | committable6: releases my @a; for 0..50000 { @a.push($_, 0x301); }; @a.chrs; | 08:28 | |
committable6 | MasterDuke, gist.github.com/2fde89e2dc1b1367bb...e05054f85e | 08:38 | |
08:53
lichtkind joined
09:29
jjido joined
09:31
squashable6 joined
10:00
Sgeo left
10:02
jjido left
10:51
hasrthur joined
10:55
hasrthur left
10:58
Guest35 joined
11:00
Guest35 left
11:34
jjido joined
12:07
reportable6 left
12:10
xinming left
|
|||
Voldenet | it doesn't seem strange, printing it out to the terminal is also painfully slow | 12:19 | |
btw, jq uses ; as args separator, not , | 12:22 | ||
so `jq -n -j 'range(0; 50000) | [., 768] | implode' | raku -e 'slurp;'` | 12:23 | ||
gfldex | lolibloggedalittle: gfldex.wordpress.com/2022/01/16/fo...omplexety/ | 12:49 | |
lizmat | s/complexety/complexity/ ? | 12:50 | |
13:03
xinming joined
|
|||
gfldex | fixed, thanks | 13:18 | |
Voldenet | last time i checked things like `sub infix:<notnilor>` really slowed down the script | 13:19 | |
> sub notnilor(\maybenil, \alternative) { … }; .&needle.¬nilor(Empty) | 13:24 | ||
this would be a lot faster to initialize, because grammar doesn't change | |||
moon-child | isn't notnilor just //? | ||
Voldenet | not exactly | 13:25 | |
m: say Any =:= Nil | 13:26 | ||
camelia | False | ||
moon-child | ah, sure | 13:27 | |
but I don't think that matters in this particular case | |||
Voldenet | you can check that it does have very different performance characteristics | 13:29 | |
in fact, having it as operator is a lot faster | 13:30 | ||
nevermind, I read numbers wrong | 13:31 | ||
13:36
monkey_ joined
13:46
xinming left
13:48
xinming joined
|
|||
gfldex | In a module precomp takes care of that and our grammar engine is not optimised at all. | 13:53 | |
Geth | ¦ doc: tbrowder self-assigned Create a tutorial on practical exception handling github.com/Raku/doc/issues/4016 | 13:55 | |
14:01
jjido left
14:08
reportable6 joined
14:39
nebuchad` left
14:51
ProperNoun left
14:52
monkey_ left
|
|||
Anton Antonov | I assume there are at least a few packages/modules that generate Raku module/package folder structure and some of the files. Any links or recommendations? (I found "Ddt" and some related ones...) | 15:11 | |
15:17
xinming left
15:19
xinming joined
15:53
jjido joined
16:11
monkey_ joined
|
|||
tbrowder | discord-raku-bot: are you looking to build new module? if so, see module App::Mi6 | 16:30 | |
highly recommended (with the --zef option) | 16:31 | ||
it's favored by lizmat | |||
lizmat is just lazy :-) | 16:32 | ||
tbrowder | no, energy conserving for more productivity! | ||
it's primarily for use with github. yr mileage may vary with other git servers | 16:35 | ||
Anton Antonov | <@755062053282119803> Thanks! | 16:50 | |
<@755062053282119803> "are you looking to build new module?" -- I want create quickly "disposable" modules that are in fact "data packages". Here by "data package" I mean a Raku module that (1) has certain data in the "resources" folder, (2) has functions for data retrieval and metadata descriptions in the "lib" folder, and (3) likely to have tests for certain invariants that are satisfied by the data. | 16:53 | ||
lizmat | a simple module exposing %?RESOURCES should do the trick ? | 17:03 | |
17:10
monkey_ left,
clarjon1 joined
|
|||
Anton Antonov | @lizmat Yes, I think so. Basically, I am making a conversational agent for data acquisition. After the user has selected the dataset I want the system to generate a data package that makes the use of that dataset convenient. In Raku this means have (most likely) a CSV file in "resources" folder and a module function that reads that CSV file. | 17:11 | |
I think I am repeating myself, but I hope it is more clear I am trying to do... | |||
lizmat | are you going to generate that CSV file ? | 17:12 | |
Anton Antonov: if that is the case, then maybe it makes more sense to generate Raku source-code, and have that pre-compiled | 17:19 | ||
it makes developing and installing such a module a bit of a pain, but it will make startup so much faster :-) | 17:20 | ||
Anton Antonov | @lizmat The dataset it is retrieved with the package `Data::ExampleDatasets`. And yes, pre-compilation would make sense, at least for small dataset. | ||
lizmat | see raku.land/zef:lizmat/uniname-words for this approach | ||
Anton Antonov | The process I after is demonstrated / outlined here: www.youtube.com/watch?v=eJ7355AJSP4#t=885 . | 17:22 | |
BTW, that is what I am working for my FOSDEM22 Raku presentation... | |||
Basically, I am preprogramming the Mathematica-and-Raku conversational agent I presented last year the Wolfram Technology Conference into a "completely Raku" conversational agent. | 17:24 | ||
17:31
hasrthur joined
|
|||
@lizmat I definitely have to use BEGIN in my other conversational-agent-related packages. Thanks for providing an example! | 17:33 | ||
lizmat | you're welcome :-) | ||
17:38
ProperNoun joined
17:46
Kaiepi left
|
|||
Anton Antonov | @lizmat This article of yours is both concise and instructive: opensource.com/article/18/10/how-p...ork-perl-6 | 17:53 | |
18:01
Kaiepi joined
18:04
xinming left
18:07
reportable6 left
|
|||
lizmat | Anton Antonov: thank you | 18:36 | |
tbrowder | i just added a practical example of using CATCH at Raku/doc issue #4016. i would appreciate any comments on it | 18:56 | |
moon-child | tbrowder: it feels a bit contrived to die inline and catch right away. I wasn't initially sure what or where the error handling was | 19:05 | |
what about something like this? ix.io/3Mui/perl6 | |||
19:07
evalable6 left,
linkable6 left
19:09
evalable6 joined
|
|||
tbrowder | moon-child: much better example for sure. my immediate goal was to use the right forms and syntax to fit my real problem. but i think yours is the way to go for the docs (and it looks like an easier drop-in, too). thanks! | 19:10 | |
moon-child | :) | ||
19:10
linkable6 joined
|
|||
Voldenet | tbrowder: i'd ditch nested for | 19:12 | |
tbrowder | why? | 19:13 | |
that's a common idiom for us simple coders | 19:14 | ||
19:14
eseyman joined
19:15
discord-raku-bot left,
discord-raku-bot joined
|
|||
Voldenet | it makes reading, writing and debugging code harder | 19:16 | |
I've changed it a little bit: ix.io/3Mun/perl6 | 19:17 | ||
in real life processing a sheet is long and difficult | |||
lizmat | one note: there's currently a bug in the return value of a scope, if CATCH is the last element of a scope | 19:18 | |
since it doesn't matter where it is located in a scope, I always suggest to put the CATCH block at the start | |||
Voldenet | that makes sense | ||
and it may help people get rid of the assumption that it's like try/catch | 19:19 | ||
tbrowder | Voldenet: ok, i think i see what you mean, and it is more like my actual use. | ||
japhb | Just had failure installing Cairo module on Rakudo HEAD. Currently building again from scratch to see if it's flaky or hard fail. | 19:20 | |
19:20
discord-raku-bot left,
discord-raku-bot joined
|
|||
moon-child | Voldenet: actually processing a sheet involves a graph traversal. I think a nested for-loop is fine in this case, since the interesting computation will happen on cells (rather than rows) anyway | 19:20 | |
Voldenet | + sheet is 2d grid of cells | 19:21 | |
19:21
Kaiepi left
|
|||
moon-child | (or--depends how clever you are. If I were making a spreadsheet, I would make its representation columnar and semi-sparse) | 19:21 | |
19:22
Kaiepi joined
|
|||
Voldenet | if I were making a spreadsheet I'd write rdbms and then ditch the project before even getting into spreadsheet part ;) | 19:24 | |
all important problems were solved before spreadsheets anyway | |||
moon-child | yes | ||
spreadsheets are dumb | |||
still a better operational model than unix™ | 19:25 | ||
tbrowder | i'm not trying to solve the world's probs at the top level, just mine,one at a | 19:26 | |
moon-child | tbrowder: see, that's your mistake | 19:27 | |
tbrowder | time and hope it helps another | ||
moon-child | you're likely to actually _get_ somewhere with that sort of strategy | ||
19:27
Sgeo joined
|
|||
Voldenet | True, to write perfect spreadsheets, you first need to solve world poverty problem | 19:27 | |
moon-child | and what's the point of getting places and doing things?? | ||
Voldenet | seriously though, especially when things are targeted to beginners - smaller function better | 19:28 | |
tbrowder | no srgument here, but this problem is to hide unnecessary stuff from the use | 19:29 | |
but use good practice while doing it if i can | 19:30 | ||
Voldenet | and good CATCHes are good in locating errors as well, encapsulating them in subroutines makes the whole experience smoother later on | ||
tbrowder | thanks for the useful comments. i'll improve the example and ask for review again. | 19:31 | |
Anton Antonov | @moon-child "[...] If I were making a spreadsheet, I would make its representation columnar and semi-sparse" -- Interesting statement. Can you expand on it? | 19:41 | |
19:52
discord-raku-bot left,
discord-raku-bot joined
19:56
discord-raku-bot left
19:57
discord-raku-bot joined
|
|||
tbrowder | note the Perl reader allows for that, but I turn missing or empty cells into '' for convenience | 19:57 | |
at least i plan that for my initial handling. i have to deal with some weird formats from inexperience spreadsheet creators | 19:59 | ||
*inexperienced | 20:00 | ||
with weird cell values sometimes. | |||
or invalid values | |||
moon-child | @Anton Antonov not sure what more there is to say. Columnar means cells which are immediately above or below one another are stored contiguously. Semi-sparse means we make an attempt not to store empty cells | 20:01 | |
tbrowder | anyway, i rearranged Voldenet's example per lizmat's comments, made a few other tweaks, and will update the issue example momentarily... | 20:04 | |
Anton Antonov | @moon-child So, you would use the so called long format? (Which corresponds to a certain sparse array scheme.) | 20:11 | |
moon-child | yes. Column stores rock | 20:12 | |
Anton Antonov | @moon-child Do you consider having heterogenous value types in a column? | 20:13 | |
tbrowder | ok, so updated. notice i was able to eliminate the "next" statements, possibly due to moving the CATCH blocks per lizmat. | ||
moon-child | sure. That would just be a part of the sparse representation | ||
'run of n packed integers; run of m spaces; a string; run of p floats' | |||
tbrowder | yes, the original Excel xlsx files use such a format, and Perl's Spreadsheet::Read preserves it, but I don't | 20:15 | |
moon-child | yeah | 20:16 | |
as I said, I wouldn't make a spreadsheet; but if I _were_ to do so... | |||
tbrowder | anyhoo, interested parties please review doc issue #4016 | 20:17 | |
Voldenet | looks good | 20:18 | |
20:18
discord-raku-bot left,
discord-raku-bot joined
|
|||
Voldenet | I'm not sure whether `say "" ~ .Str` or `say "", .Str` is better | 20:18 | |
moon-child | why do you need more than say .Str? | 20:19 | |
Voldenet | that's an excelent question - have you ever debugged a program where the error is just | ||
"Invalid argument"? :D | |||
without a stack trace, no less | |||
tbrowder | ah, you folks are now point out good hints that would go toward make a good Raku post or a docs chunk ;-D | 20:20 | |
*pointing *making | 20:21 | ||
moon-child | Voldenet: oh, you mean like say "..." ~ .Str | ||
Voldenet | Ah, right | ||
tbrowder | gotta get back to real world | ||
bye | |||
20:22
gfldex left
|
|||
moon-child | not literally an empty string :P | 20:22 | |
tbrowder: cya | |||
20:22
gfldex joined
|
|||
tbrowder | thanks all, cya2 | 20:22 | |
Hydrazer | ~ looks cooler | ||
moon-child | for me , is less mental overhead | ||
20:23
discord-raku-bot left,
discord-raku-bot joined
|
|||
Voldenet | I use ~ more because it works in the context where you need to just pass the string | 20:24 | |
moon-child | yeah. ~ is more general, , is more specific | ||
more specific methods require less context to parse | |||
Voldenet | well I've checked and it more or less doesn't matter | 20:31 | |
github.com/rakudo/rakudo/blob/21a7...rs.pm6#L97 | 20:32 | ||
20:39
hasrthur left
21:10
reportable6 joined
21:15
jjido left
21:19
discord-raku-bot left,
discord-raku-bot joined
21:22
gfldex left,
gfldex joined
21:41
Kaiepi left
|
|||
[Coke] | (columnar data) wonder if we support parquet | 21:42 | |
21:42
Kaiepi joined
21:46
sena_kun left,
sena_kun joined
21:50
Xliff joined
22:08
Sgeo_ joined
22:11
Sgeo left
22:13
discord-raku-bot left,
discord-raku-bot joined
22:17
discord-raku-bot left
22:18
discord-raku-bot joined
22:29
jjido joined
22:40
hasrthur joined
22:49
hasrthur left
22:54
jjido left
23:21
lichtkind left
23:52
Manifest0 left
|