|
01:20
kylese left,
hulk joined
02:15
hulk left,
kylese joined
03:22
lichtkind__ joined
03:24
lichtkind_ left
03:44
runesicle joined
|
|||
| Geth | docker: f9a08f038e | AntonOks++ | 6 files Bump to 2026.03 [skip workflow] |
03:48 | |
|
03:57
runesicle left
04:12
Aedil joined
04:16
Aedil left
04:19
Aedil joined
07:06
sibl joined
07:07
Sgeo left
07:47
annamalai left
07:48
sibl left,
annamalai joined,
sibl joined
08:03
dakkar joined
08:04
sibl left,
sibl joined
08:12
Aedil left
|
|||
| disbot2 | <simon_sibl> I do a lot of silly action with csv file, I have a 10 lines raku file that parse 2 csv file and basically merge them with a simple condition, isnt there a cli tool that would do that ? or the 10 lines script is probably more flexible ? | 09:50 | |
| timo | @simon_sibl maybe this does what you want? miller.readthedocs.io/en/latest/ | 09:58 | |
| disbot2 | <simon_sibl> wow nice, thank you ! indeed thats very handy cli for that | 10:01 | |
| timo | it looks very very powerful, with everything that implies :) | 10:02 | |
|
10:06
Aedil joined
|
|||
| timo | apparently I used it with this script before to analyze NFAs run during core setting compilation: mlr --icsv --ocsvlite head -n 10000000 then filter '$eos == 0x32aea9' then put -s entry=0 '$len = $offset - $orig_offset + 1; $entry = @entry; @entry += 1' then cut -f nfa,entry,orig_offset,offset,len,nfa then repeat -f len then put -s curpos=-1 'if (@curpos == -1) { $pos = fmtnum($orig_offset, "%d"); | 10:13 | |
| @curpos = $orig_offset + 1 } else { $pos = fmtnum(@curpos, "%d"); if (@curpos == $offset) { @curpos = -1; } else { @curpos += 1; }; }' then cut -f pos then uniq -c -f pos then sort -n -f count core_setting_nfa_stats.csv.zst | zstd -v -17 > what_position_how_often.csv.zst | |||
|
10:17
annamalai left,
annamalai joined
10:26
sorenson left
10:27
sorenson joined
|
|||
| Geth | CCR/main: f2704a9113 | (Elizabeth Mattijsen)++ | 39 files Remaster pmichaud's blog bposts on pmthium |
10:53 | |
| lizmat wonders if Crag is able to convert gas prices in $/gallon to ā¬/liter | 11:06 | ||
| and vice-versa | 11:07 | ||
| but is too lazy to figure it out herself :-) | |||
| Geth | CCR/main: c277384487 | (Elizabeth Mattijsen)++ | Remaster/Patrick Michaud/README.md Fix index rendering issue |
11:09 | |
| timo | lizmat: it's supposed to be able to do that, yeah | 12:49 | |
| lizmat | hmmm... maybe we should run a Crag bot on the channel :-) | ||
|
13:05
sibl left,
sibl joined
14:02
sp1983 joined
|
|||
| sp1983 | tell: El_Che I've tested your aarch64 rpm - sparky.sparrowhub.io/report/test-u...ault/28545 looks good to me | 14:04 | |
| tellable6 | sp1983, I'll pass your message to El_Che | ||
|
14:08
sp1983 left
|
|||
| disbot2 | <librasteve> yes | 14:10 | |
| <antononcube> Can we have a non-vi-users channel first? | 14:11 | ||
| <antononcube> @librasteve This reminds me -- did you make crag available within Raku sessions? | 14:14 | ||
| <antononcube> I remember we discussed it, but I do not think I filed a GitHub issue for that. | |||
| <librasteve> ^<20 USD / gallon> in 'EUR / litre' | 14:15 | ||
| <librasteve> thanks for the reminder ⦠sadly I have not done that (yet) | 14:16 | ||
| <librasteve> one way of thinking about crag is that itās a pioneer for a new Raku slang ⦠but I havenāt really got my head around that | 14:17 | ||
| <librasteve> in the example above. maybe the gland can eliminate the need for ^<> | 14:19 | ||
| <antononcube> Here the CLI of the Raku package "WWW::WolframAlpha" is used: > wolfram-alpha convert 20 gallons to liters 75.71 L (liters) | |||
| <antononcube> You can see the "official" result here: www.wolframalpha.com/input?i=conve...+to+liters | |||
|
14:21
sibl left
|
|||
| disbot2 | <antononcube> Ha! 20 gallons is "ā 1.1 Ć average volume of the human body ( ā 66.4 L )". I am not sure is that an average US human body or a "world-wide" human body. | 14:23 | |
| <librasteve> ok I have a short alternative- will try to release that later today | 14:26 | ||
| <librasteve> short term | |||
| <antononcube> Unfortunately, Wolfram|Alpha cannot give a proper answer to: > How many bananas would you need to power a house? | 14:30 | ||
| <librasteve> $be = ?^<banana energy in kcal> | 14:36 | ||
| <librasteve> $hp = ?^<average house power in kW> | 14:37 | ||
| <librasteve> $hp / ($be / ^<1 day>) #348 | |||
| <librasteve> please can someone make @simon_sibl an editor in the Whaterables wiki (in the raku GH org)? | 14:40 | ||
| <antononcube> I think the house powering with bananas is based on their radioactivity (having potassium.) | 14:41 | ||
| <librasteve> (?^<banana mass in kg> * c**2) / ^<1 day> | 14:44 | ||
| <librasteve> the answer is 83 million houses for a day | 14:46 | ||
| <antononcube> what-if.xkcd.com/158/ | 14:48 | ||
|
15:01
orangebot joined
15:22
soverysour joined,
soverysour left,
soverysour joined
15:25
Aedil left
15:26
soverysour left
15:29
soverysour joined,
soverysour left,
soverysour joined
15:31
Aedil joined
|
|||
| lizmat | People complaining about the price of gas in the US: | 15:38 | |
| % crag '^<2.5 EUR / litre> in "USD / gallon"' | |||
| 13.12USD / gallon | |||
| that's what we pay in the NL for gas | |||
| ugexe | yeah but how much do you pay for insulin? | 15:45 | |
| we need cheap gas prices to drive to canada and mexico for healthcare | 15:47 | ||
| lizmat | I guess that makes sense... if you're a diabetic with a driver's license :-) | 15:49 | |
| which I understand is quite a big group in the US :-( | |||
| disbot2 | <librasteve> lizmat \o/ | 16:03 | |
| <librasteve> I guess you want US gallons ⦠āus-gallonā ⦠Crag picks the default depending on your locale | 16:09 | ||
| <librasteve> are you using en_uk (if you donāt mind me asking)? ⦠guess I should add a warn during install | 16:11 | ||
| [Coke] | My once-a-day insulin is pretty expensive, and I have what is considered good insurance. | 16:20 | |
| ... though it did go down a bit under the last administration and has held there. 520USD for 3 months. (top of year, I pay all of that - as I reach the deductible & total out of pocket, the cost per quarter to me is reduced) | 16:26 | ||
| as little as 2 years ago, that was more like 1300USD | |||
|
16:31
dakkar left
|
|||
| disbot2 | <librasteve> yeah the NHS has its problems ... but its easy to forget the upside | 16:34 | |
|
16:44
soverysour left
|
|||
| [Coke] | m: put 2026-1953 | 16:52 | |
| camelia | 73 | ||
| lizmat | % crag '^<2.5 EUR / litre> in "USD / us-gallon"' | 17:03 | |
| 10.93USD / us-gallon | |||
| ok, so gas is less than 3x as expensive than in the US | |||
| disbot2 | <librasteve> I am reviewing the way Physics::Unit checks locale and sets up 'us-' or 'imp-' as the default btw | 17:06 | |
| [Coke] | huh. ziptbl.com is nifty: shares data directly in the URL: ziptbl.com/#d=eNoFwbcBACAMwLA9t3jA...WN8wFxQAZX | 17:07 | |
| lizmat | interesting... also from a surveillance point of view | 17:08 | |
| as the URL is considered (trappable) metadata | |||
| [Coke] | don't have to store it on a server, anyone with the link can view the data... Wouldn't use it for anything I needed secure, but perhaps a nice way to dump a bunch of json data. | 17:09 | |
| disbot2 | <librasteve> that's wild (the way they encode the data) | ||
| [Coke] tries a BUNCH of json data... | |||
| ok, too big to shove all the blin results into. :) (it works, but the resulting url is 5000140 bytes. | 17:11 | ||
|
17:11
soverysour joined,
soverysour left,
soverysour joined
|
|||
| disbot2 | <librasteve> lol | 17:12 | |
|
17:12
david7832 joined
|
|||
| [Coke] | down from 40755394 on the original JSON | 17:12 | |
| lizmat | and if you zip the blin results? | 17:13 | |
| just OOC | |||
| disbot2 | <librasteve> I figure that only GB (maybe australia, canada, india?) wants imperial gallons | ||
| <librasteve> - any feedback welcome | 17:14 | ||
| [Coke] | gzip is 3886990 | ||
| I do not wish imperial anything (except pints when drinking) | |||
|
17:14
runesicle joined
|
|||
| lizmat | I guess that's what you get for using something like base64 instead | 17:15 | |
| [Coke] | bz2 better at 3056874 | ||
| lizmat | zip and then express in base62 | ||
| *64 | |||
| [Coke] | Yup. Nifty but probably just a toy. | ||
| david7832 | seems surveillance isn't even an issue: the data in the URL is after the # , so it doesn't even become part of the request (see link "How it works") | 17:16 | |
| tellable6 | 2026-03-29T14:09:04Z #raku <librasteve_> david7832: my understanding is that the current push to RakuAST will open the door to revisit the whole 007 macro experiments | ||
| [Coke] | Might be nifty for something like the Text::CSV results. | ||
| david7832: at time of use, sure. they have to get the URL somehow | |||
| lizmat | on further reading, looks like the data never makes it over the line... interesting | 17:17 | |
| disbot2 | <librasteve> if only they could use unicode props in the fragment | 17:22 | |
| <librasteve> (more chars = better encoding), right? | |||
| lucs | My rakubrew installation appears to have made `rakubrew` a shell function, not an executable found in the PATH. | 17:37 | |
| So, not sure why, but when in Raku I do something like "shell rakubrew" or "run rakubrew", I get a "command not found" or a "spawned command 'rakubrew home' exited unsuccessfully". | |||
| Any way to have it be an executable found in the path instead? | |||
| lizmat invokes patrickb | 17:38 | ||
| lucs | (Er, copy/paste error: just "... command 'rakubrew'", not "... command 'rakubrew home'") | 17:39 | |
| patrickb | lucs: rakubrew mode env | ||
| lucs | Hmm... My MODE file does say 'env'... | 17:40 | |
| patrickb | but I'm pretty sure this won't change how rakubrew is invoked, only how raku and scripts are invoked | 17:41 | |
| lucs | And 'rakubrew mode' does report 'env'. | 17:42 | |
| patrickb | yeah then it already is in env mode. | ||
| you could change the .bashrc invocation to just be a export PATH=... thing | 17:43 | ||
| but possibly rakubrew will complain that the hook is Missing | 17:44 | ||
| lucs | Not sure how I decided to use this, but I currently have `eval "$($RAKUBREW_HOME/bin/rakubrew init Zsh)"` (I'm in zsh, eh.) | 17:45 | |
| I'll try to figure out what init does. | 17:46 | ||
| Only 49,842 lines in the rakubrew scrip t :~( | 17:47 | ||
| *script | 17:48 | ||
| disbot2 | <librasteve> lizmat: your local (unless it is 'en_GB') will now select us-gallons by default (need to reinstall Physics::Unit and Physics::Measure) - sorry | 17:53 | |
| patrickb | lucs better look at the repo. That script is a Perl packed version. | 17:55 | |
| disbot2 | <librasteve> may take a few minutes for zef to index them | ||
| lucs | patrickb: Yeah, just realized, thanks. | 17:56 | |
| patrickb | github.com/Raku/App-Rakubrew/blob/...ell/Zsh.pm | ||
| in short, the shell hook allows rakubrew to call shell functions in the users shell. e.g. change PATH. | 17:57 | ||
| lucs | Is it correct to say then that `eval "$($RAKUBREW_HOME/bin/rakubrew init Zsh)"` must be run in any new shell session? (I think that may be my problem.) | 17:58 | |
| patrickb | that rakubrew shell function retrieves shell code to run in the users shell | 17:59 | |
| github.com/Raku/App-Rakubrew/blob/...rew.pm#L77 | |||
| that's the core of the messy stuff. | |||
| looking at the comment a few lines down seem to indicate you can run without the shell hook if you switch to shim mode | |||
| lucs: I believe so, yes. | 18:00 | ||
| that eval creates that shell function | |||
| github.com/Raku/App-Rakubrew/blob/...Zsh.pm#L75 | 18:01 | ||
| that's the hook itself | |||
| afk for a while | |||
| lucs | Thanks for the pointers. | ||
| patrickb | but do shoot me any questions you have. I'll answer when I have a free moment. | ||
| timo | fwiw, the fragment part of an URL isn't sent to the server by the browser, only if there's some javascript on the page that decides to send it | 18:07 | |
| there's many pages like zerobin for example that put something there that should not go to the server for this reason | |||
| this is also what the new kernel panic screen on linux has, a huge qr code that links to a static web application that decodes and displays the data for you | 18:08 | ||
| lizmat | feels like we should have something like that for Raku as well | 18:10 | |
| disbot2 | <librasteve> @antononcube ... thanks for suggesting to make App::Crag callable from within a Raku script ... I have had a look at this | 18:18 | |
| <antononcube> I wanted to do an examples and comparisons with unit calculations. In a Jupyter notebook. | 18:19 | ||
| <librasteve> problem is that App::Crag is a layer designed to be called from the command line and/or as a REPL and tbh to make it just a plain module is gonna be a megahack ... I cannot work out a way to do it that is not perverse | |||
| <librasteve> otoh, we can easily go my $res = qqx(crag '0.1+0.2'); | 18:21 | ||
| timo | not sure what exactly the "something like that" should be | ||
| the kernel panic qr code thing is because when your kernel paniced you can't copy&paste or save to disk your output | |||
| disbot2 | <librasteve> is that something you can add as a Jupyter::Chatbook "shortcut" | 18:22 | |
| SmokeMachine | lizmat: I didnāt know about roles not having their variables (my English is missing while I write this sentence). I tried using `has`, but when I tried accessing %types from inside the role, it errored I was trying accessing %!types⦠:( but if I declare my %types before the role, that works⦠| 18:23 | |
| lizmat: I didnāt know about roles not having their variables (my English is missing while I write this sentence). I tried using `has`, but when I tried accessing %types from inside the role, it errored I was trying accessing %!types⦠:( but if I declare my %types before the role, that works⦠| 18:25 | ||
| lizmat | SmokeMachine: have considered parameterizing the role with the prefix ? | ||
|
18:27
sibl joined
|
|||
| SmokeMachine | lizmat: that works as well, thanks! glot.io/snippets/hh8ma9c73o | 18:27 | |
| lizmat | no, not like that :-) | 18:28 | |
| that will just give each concretization its own %types | |||
| SmokeMachine | But I still think that the original code shouldnāt break on Grammar, and try to use %!types when I declared %types is confusing. | 18:29 | |
| lizmat: So, how did you mean? | |||
| lizmat: and yes, you are correct: glot.io/snippets/hh8ma9c73o | 18:31 | ||
| lizmat | gist.github.com/lizmat/d0cc2c3195d...05e4623b4b | ||
| with possibly an error message if there was already a class with a given prefix ? | 18:32 | ||
| note that the gist contains a race condition on the binding to the hash | 18:36 | ||
| but with a very small chance, only if two thread decide at the same time to consume the tole | 18:37 | ||
| *treads | |||
| *threads | |||
| grrr | |||
| SmokeMachine | That was my first try⦠(github.com/FCO/IdClass/commit/e501...debd7L168) but I wanted it to be possible to be dynamic and it was conflicting with the method option⦠then I removed it⦠| 18:39 | |
|
18:46
soverysour left
18:47
soverysour joined
19:28
tejr left,
tejr joined
|
|||
| disbot2 | <antononcube> Yes, there can be a special "Jupyter::Chatbook" magic cell that invokes "crag". For example: %% crag (?^<banana mass in kg> * c**2) / ^<1 day> | 19:35 | |
| <antononcube> This is similar to the crag-slang idea. | 19:36 | ||
| <librasteve> that seems like a good solution - tx! | 19:48 | ||
|
19:48
sibl left
|
|||
| disbot2 | <librasteve> I will bring the crag DSL up my priority list | 19:49 | |
|
19:51
silug left
19:54
silug joined
20:03
Aedil left
|
|||
| lucs | patrickb: I tried simplifying my rather complicated shell spawning setup, but have the same problem. | 20:06 | |
| patrickb: Tell me, does this work for you?: `raku -e 'shell rakubrew'` | |||
| Um, and anyone else having set up rakubrew, does that work for you? | 20:07 | ||
| librasteve_ | www.irccloud.com/pastebin/FSb8CxrN | 20:09 | |
| TLDR: nope | |||
| timo | i think it was meant to be "rakubrew" rather than just rakubrew | 20:11 | |
| librasteve_ | www.irccloud.com/pastebin/MrioQMZx | 20:13 | |
| TLDR: kinda | |||
| www.irccloud.com/pastebin/yKYgdsMN | 20:14 | ||
| seems that `rakubrew init` is not fixing that ⦠otherwise rakubrew is working fine for me (in macOS) | 20:15 | ||
| [Coke] | shell('rakubrew') would work if it weren't an alias. | ||
| try 'which rakubrew' in your shell and see what it emits. | |||
| librasteve_ | ^^ www.irccloud.com/pastebin/8hSejdxQ | 20:16 | |
| lucs | [Coke]: `which rakubrew` shows me its function definition, similar to that librasteve_ paste. | 20:18 | |
| [Coke] | Yup. So that isn't going to work in a shell() call | 20:19 | |
| I'd expect to look just like: /bin/sh -c rakubrew | |||
| sorry, function, not alias. | |||
| patrickb | lucs: does rakubrew run when you call it with it's full path? (i.e. not the shell function) | ||
| You can also try passing the same args that the shell function would pass. | 20:20 | ||
| lucs | patrickb: It complains like librasteve_'s paste: www.irccloud.com/pastebin/MrioQMZx | ||
|
20:21
soverysour left
|
|||
| [Coke] | you can't call a shell function from raku's shell | 20:21 | |
| patrickb | $HOME/.rakubrew/bin/rakubrew internal_hooked Zsh "" | ||
| It's rakubrew complaining it's missing the shell hook. | 20:22 | ||
| [Coke] | raku -e 'shell("/Users/coke/.rakubrew/bin/rakubrew internal_hooked Zsh")' | ||
| patrickb | With the above command you call it just like the hook itself would do the call which should make the error disappear. | 20:23 | |
| To make rakubrew work without the shell hook you need to switch to shim mode. | |||
| rakubrew mode shim | |||
| Then calling `$HOME/.rakubrew/bin/rakubrew` without the "internal_hooked" stuff should not error. | 20:27 | ||
| github.com/Raku/App-Rakubrew/blob/...rew.pm#L82 | 20:29 | ||
| That's the place where that message is emitted. | 20:30 | ||
| lucs | patrickb: Will try that out, soon (neighbour having problem I need to help with). | 20:33 | |
| patrickb | lucs: Having reread your original question, I think you have two options: using shell mode, or replicating the shell hook in your raku code. | ||
| But do note, that rakubrew is technically unable to tweak your PATH when you call it from raku code. (That's basically what the error message is about.) | 20:36 | ||
| When you want to keep env mode and just want to `download`, or reconfigure rakubrew or some such, then passing `internal_hooked Sh` should do the trick. | 20:40 | ||
| It's an interesting use case. | 20:41 | ||
| I'm afk again. Good night everyone! | |||
| [Coke] realizes he missed a bunch of earlier sends from lucs, so probably sounded very tone deaf in what he was saying - sorry about that. | 20:57 | ||
| lucs | [Coke]: Hey, no problem. | 21:05 | |
| Turns out that "you can't call a shell function from raku's shell" is pretty enlightening actually. | |||
| [Coke] | \o/ | 21:06 | |
| lucs | And if I go back to the 'x' part of what could be called my 'xy' problem, the only functionality of rakubrew that I'm needing is to be able to shell out and run a specific version of Raku. | 21:14 | |
| And that is easy to do by tweaking the PATH from with the Raku code, based on the RAKUBREW_HOME envvar. | |||
|
21:17
orangebot left
|
|||
| timo | I honestly would have expected you can call a shell function with the shell command. but if it's something like "exec" to update some env vars, it wouldn't do you much good since the shell it ran in will just exit right after that, undoing all your work | 21:41 | |
| [Coke] | well, looks like most of us are using zsh, and shell() doesn't use that, does it? | 21:42 | |
| right, it's hardcoded to /bin/sh -c | 21:43 | ||
|
21:46
johnjay joined
|
|||
| timo | "you can't call a zsh function with rakudo's /bin/sh" doesn't really sound like something we can do much to fix :P | 21:48 | |
| switching rakudo's "shell" over to use $SHELL would be a fantastic way to make everything break for every user of not-sh-compatible shells in any case | 21:49 | ||
| i remember when i changed my login shell to fish and couldn't start my desktop environment any more because something somewhere decided to try using my login shell to run some of its scripts during startup | |||
| david7832 | Any one here have an idea on this (multi dispatch based on container type)? irclogs.raku.org/raku-beginner/2026-04-02.html | 22:02 | |
| timo | i think you might want a slurpy array parameter here | 22:09 | |
| m: sub withslurp(*@a) { .raku.say for @a }; withslurp((1,2,3)); withslurp($[1,2,3]); withslurp([1,2,3]) | |||
| camelia | 1 2 3 $[1, 2, 3] 1 2 3 |
||
| timo | here the middle one has just one element when doing the for loop | 22:10 | |
| david7832 | Good idea. But I guess then every case will have to be handled by that subroutine? Because once I add a multi with signature ($a), this scalar multi almost always wins over the slurpy multi: | 22:19 | |
| m: multi sub bc($a) { print 'have $ - '; $a.say; }; multi sub bc(*@a) { say 'have *@: '; .say for @a }; bc([1,2,3]); bc($[1,2,3]); bc("hello"); bc(1,2,3); | |||
| camelia | have $ - [1 2 3] have $ - [1 2 3] have $ - hello have *@: 1 2 3 |
||
| david7832 | Actually, I think you nailed it. This combination works very nicely: | 22:28 | |
| sub esc-one($elem) { '"' ~ $elem ~ '"' } | |||
| sub esc(*@a) { do esc-one($_) for @a } | |||
| m: sub esc-one($elem) { '"' ~ $elem ~ '"' }; sub esc(*@a) { do esc-one($_) for @a }; say esc(5); say esc([1,2,3]); say esc($[1,2,3]); say esc([[1,2],[3,4]]); say esc($[[1,2],[3,4]]) | 22:30 | ||
| camelia | ("5") ("1" "2" "3") ("1 2 3") ("1 2" "3 4") ("1 2 3 4") |
||
|
22:44
Sgeo joined
23:21
wayland76 joined
23:32
hulk joined
23:33
kylese left
23:40
david7832 left
23:51
lichtkind__ left
23:53
runesicle left
|
|||