🦋 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:18
librasteve joined
00:23
librasteve left
00:53
librasteve joined
|
|||
disbot2 | <antononcube> "is it better if it's svg instead of webgl?" -- SVG works "out of the box" in Jupyter notebooks. | 00:53 | |
<antononcube> For JavaScript rendering some preliminary "priming" is needed. | |||
<antononcube> "but if I understand, what the notebook needs is some sort of HTML output?" -- HTML works, SVG works, JavaScript with suitable HTML works. Just JavaScript needs certain setup and it is somewhat capricious. | 00:54 | ||
00:57
librasteve left
01:07
Xliff joined
|
|||
Xliff | \o | 01:07 | |
Is there any way to control what objects a role can be applied on? | |||
So 'my $a = "Bleah" but OnlyOnInts' throws an error but 'my $a = 42 but OnlyOnInts' does not? | 01:08 | ||
01:12
librasteve joined
01:17
librasteve left
|
|||
timo | m: role Test { die "only on ints please" unless $?CLASS ~~ Int }; say 99 but Test; say "Hi" but Test | 01:17 | |
camelia | 99 Could not instantiate role 'Test' because it is died with X::AdHoc; exception details: only on ints please in sub at <tmp> line 1 in block <unit> at <tmp> line 1 in block <unit> at <tmp> line 1 |
||
Xliff | \o/ | 01:27 | |
01:30
Xliff left,
librasteve joined
01:32
hulk joined
01:33
kylese left
01:35
librasteve left
02:00
gabiruh joined
02:02
librasteve joined
02:08
librasteve left
02:12
gabiruh left
02:15
hulk left,
kylese joined
02:20
librasteve joined
02:26
librasteve left
02:38
librasteve joined
02:42
librasteve left
02:56
librasteve joined
03:03
librasteve left
03:06
gabiruh joined
03:15
librasteve joined
03:20
librasteve left
03:22
gabiruh left
03:29
gabiruh joined
03:31
librasteve joined
03:36
librasteve left
03:43
gabiruh left
03:45
kylese left
03:47
kylese joined,
librasteve joined
03:57
librasteve left
04:00
gabiruh joined
04:08
gabiruh left
04:16
librasteve joined
04:21
librasteve left
04:33
maylay left
04:35
maylay joined
04:37
librasteve joined
|
|||
timo | weekly: wakelift.de/2025/06/20/can-you-say...hat-again/ | 05:21 | |
notable6 | timo, Noted! (weekly) | ||
05:30
gabiruh joined
05:36
gabiruh left
05:37
librasteve left
05:39
gabiruh joined
05:50
librasteve joined
05:52
gabiruh left
05:54
librasteve left
06:14
librasteve joined
06:23
librasteve left
06:30
librasteve joined,
Aedil left
06:34
gabiruh joined
06:40
gabiruh left
07:10
lichtkind joined
07:36
Sgeo left
07:46
soverysour joined,
soverysour left,
soverysour joined
07:50
soverysour left
08:10
apac joined
08:14
wayland76 joined
08:41
Aedil joined
|
|||
refactus | antononcube: it'd have to use javascript if you want real interactivity. some limited hover effects like highlighting and some kinds of animation could work with just CSS, but as far as I know javascript is mostly the only way to do fully interactive things in HTML or SVG. very few other options exist, like wasm, and they'd probably be even more brittle and poorly supported in jupyter | 08:48 | |
hoping you have scrollback or something, I assume you're gone. if not I guess I can link you here in the irclog later. but anyway what I was hoping to do was write something that'd work for more general use cases but also work in your notebooks. maybe best to write it in a conservative style wrt the javascript, and then worry about whatever special hand-holding jupyter needs afterwards | 08:52 | ||
lizmat | refactus: scrollback is also on irclogs.raku.org/raku/live.html for this channel | ||
refactus | yeah that's what I'll send him a link to later if he misses this | 08:54 | |
lizmat | antononcube is aware of it, I wasn't sure whether you were :-) | ||
refactus | wasn't sure if he actually checks it. I use it all the time if I can't find an answer in the docs, before asking questions here | 09:01 | |
speaking of questions, is there a way to get zef search to only show the most recent version of distributions without having to pipe it through other things? zef search is kind of a usability nightmare in a few different ways, that being one of them | 09:04 | ||
lizmat | eh... not in zef, but perhaps raku.land/zef:lizmat/App::Ecosystems is what you're looking for... | 09:24 | |
still a bit rough around the edges, but maybe that's ok for you | |||
refactus | you have a module for everything, don't you? :) I'll check it out, thanks | 09:29 | |
lizmat | not everything yet :-) | ||
refactus | heh just enough to keep your high score on raku.land like it's an arcade machine | 09:33 | |
lizmat | I'd love it to have raku-community-modules overtake :-) | 09:34 | |
refactus | if that's the goal, you could just donate all your modules like I did | 09:35 | |
lizmat | that won't change much re maintenance for me, sadly | 09:36 | |
refactus | reminds me of another question. if I write a module that might be interesting to others but I have no intention of maintaining it long term, should I give it to raku-community-modules or just not publish it at all? | 09:38 | |
lizmat | I'd say publish it: and when it is used by people, try to hand it off to people that use it: if that fails, move it to raku-community-modules | 09:50 | |
09:55
apac left
|
|||
disbot2 | <librasteve> can i move all my modules to raku community ... maintenance is such a pita | 09:58 | |
lizmat | librasteve are you serious ? | 10:00 | |
disbot2 | <librasteve> <joke> </joke> | 10:02 | |
lizmat | *phew* :-) | ||
refactus | everyone move all your modules into community so lizmat can maintain them, she's bored doesn't have anything to do :D | 10:03 | |
lizmat | ehhh :-) | ||
disbot2 | <librasteve> gonna run out of rakudo issues pretty soon | 10:04 | |
refactus | lol | ||
disbot2 | <librasteve> btw on the "no interest in maintaining", I would say write it but make that evident in the README ... then folks can still benefit from your work, and can choose to avoid rewriting the same thing with a clear understanding of the trade offs | 10:05 | |
refactus | makes sense, I'll make that more clear in future modules. I did eventually put that in the README of one of my modules, but I never ended up publishing it to the ecosystem anyway, it's just bitrotting on github. weird templating system I came up with | 10:09 | |
I don't mind maintaining stuff when I'm active, but the real problem is that I take breaks for years at a time | 10:11 | ||
tbrowder | timo: cool post, but my fav part is term Rakunaut, don't remember seeing it before,imho it's better than any other Raku* term to describe raku-loving people | 10:13 | |
ref Financeapi, i've been misleading y'all on its free tied: you cannot get *all* history on a security with the free account. but it does have the cheapest paid account:10 US | 10:16 | ||
10:18
apac joined
|
|||
tbrowder | *cheapest account of the ones i've investigated. once i get my queries ready, i'll get a paid account for a month and see if i can get full history... | 10:19 | |
refactus | noticed something funny about the national weather service api...temps are in celsius but they're converted from fahrenheit observations, so they all end up with 9ths written in decimal like 17.77777777777778 or 20.555555555555557 | 10:29 | |
but if you convert them back to F and round just a tiny tiny bit for the precision loss, they all turn into whole numbers | 10:31 | ||
lizmat | heh... so the fahrenheit observations are ints ? | 10:35 | |
refactus | yep, that's the only way I know they're taking in the data in F, because it's a mess the way it's reported in C but when I convert, it all turns into ints | 10:44 | |
lizmat | not very accurate, is it :-) | ||
refactus | whole numbers work a little better in fahrenheit than celsius because the units are smaller | 10:45 | |
lizmat | and then one can only wonder whether the value is rounded, or just cut off (so you'd get an average lower temp over the year) | ||
refactus | good question. all I know is if the orange dictator knew about this there'd be a round of executive orders and theats of funding cuts for any institution that didn't use America Units | 10:48 | |
disbot2 | <antononcube> @refactus The packages “JavaScripdt::D3” and “JavaScripdt::Google::Charts” are “conservative” in the sense that they can produce (first and foremost) HTML files with plots. Their usage in notebooks is a primary use case, but they should be useful without the “heavy” notebook technology. | 10:50 | |
refactus | I did think about using something premade. I still might if I get tired of learning SVG and just want to get it done. I kinda hate reducing everything I write to "just plumb this into that" though. I tend to write a lot from scratch because I enjoy it, learn a lot, have full control over it, and minimal dependencies | 11:00 | |
if I were in a hurry I definitely would be reaching for existing tools | 11:02 | ||
11:52
apac left
11:59
librasteve left
12:04
librasteve joined
|
|||
tbrowder | refactus, pls be nice | 12:07 | |
12:09
librasteve left
|
|||
refactus | did I say something unkind? | 12:17 | |
disbot2 | <antononcube> Making a reasonably good graphics package from scratch is not trivial. In many ways, the amount of know-how in the established, old scientific plotting packages cannot be ignored because connecting to them is, relatively, a low hanging fruit. | 12:20 | |
<antononcube> To be clear -- and not "be nice" -- the packages "SVG::Plot" and "Text::Plot" are both cute and pathetic. | 12:21 | ||
12:22
librasteve joined
|
|||
[Coke] | (unmaintained) - as noted, have a prominent note in the readme that it's a proof of concept/please fork/whatever. maybe a clearly not-prod version number | 12:22 | |
12:23
jmcgnh left
|
|||
disbot2 | <antononcube> Well, "Text::Plot" is useful often enough. | 12:23 | |
12:25
jmcgnh_ joined
12:27
jmcgnh_ is now known as jmcgnh
|
|||
refactus | antononcube that's fair. and it's possible our use cases may be very different. I was originally just looking for a way to take some 3d work I was considering doing and make it useful for you also, not even talking about 2d. the 2d stuff right now is just me enjoying hacking on a script that takes weather data and makes some graphs. as a start, drawing some labelled axii, grid lines/points, | 12:30 | |
colors/styles and a legend, with some options to control it all doesn't sound too difficult to me | |||
tbrowder: I'm genuinely confused what you're asking me to be nice about. I didn't realize I said something offensive. | 12:31 | ||
I'm going to take a wild stab here and guess you didn't like "orange dictator". I think it's a highly logical assessment for myriad reasons, but if your point is I shouldn't bring politics here, you're right. I could have just not said it and next time I'll keep it to myself. | 12:48 | ||
disbot2 | <holmdunc> The observablehq.com/plot/ JavaScript library seems nice, as well as the new Svelte recreation of it (svelteplot.dev) that supports fine-grained updates (doesn't need to regenerate the whole SVG when data or user-controls change) | 12:50 | |
tbrowder | yes, pejorative terms for ppl have no place here, thnx | 12:51 | |
i am falling in love with ChatGPT, one of the neat things is its archive of my stuff, much of which i have solved before on my own or reading or help from ppl but can't always find again. a single drawer filing cabinet | 12:54 | ||
12:57
librasteve left
|
|||
disbot2 | <antononcube> @holmdunc "JavaScripdt::D3" uses the same code as Observable Plot. But it might be a good idea to have "JavaScripdt::Observable::Plot" or similar. | 13:04 | |
<antononcube> Same for "SveltePlot" -- based on "D3.js", can iterfaced separately in Raku. | 13:05 | ||
<antononcube> In many ways, though, "JavaScripdt::D3" is doing what "Observable Plot" and "SveltePlot" are doing, but using Raku (not JavaScript.) | 13:08 | ||
13:10
librasteve joined
|
|||
disbot2 | <holmdunc> Yeah it seems like D3 is a big cornerstone. The Svelte stuff is probably quite complicated because it uses its own compiler to add reactivity to the JS language. I am only a casual user of plotting in general, so you undoubtedly know more about what is and isn't a good idea | 13:10 | |
<antononcube> Or most likely I do not, because I am too biased. 🙂 | 13:11 | ||
13:12
yewscion joined
|
|||
disbot2 | <antononcube> Basically, with "JavaScripdt::D3" I am (sort off) implementing Mathematica's plotting functions using D3.js, with the corresponding Raku-flavor. | 13:12 | |
13:15
librasteve left
|
|||
disbot2 | <antononcube> That is both an opinionated and normal approach. The package "JavaScripdt::Google::Charts" is (almost) just a conduit to Google Charts. It was much easier to make, and is should be like that since Google Charts has pre-canned plots. | 13:15 | |
<antononcube> That approach can be repeated for otherJavaScript systems. ("vis.jz", "ObservablePlot", etc.) | 13:17 | ||
<holmdunc> I was listening to some podcast and there were some data visualisation guys debating whether, when showing charts to end-users (e.g. in online newspaper articles), it is overrated for them to be interactive, i.e. static images/SVGs being good enough | 13:20 | ||
<antononcube> I can see why this would be debated. | 13:22 | ||
13:38
librasteve joined
14:08
yewscion left
14:11
yewscion joined
14:20
Sgeo joined
14:22
yewscion left
14:29
yewscion joined
14:33
librasteve left
14:37
librasteve joined
14:41
librasteve left
14:49
librasteve joined
|
|||
timo | thanks tbrowder :) | 15:16 | |
tbrowder | yw, Rakunaut! | 15:19 | |
wow, i just found lizmat's Hash2Class, it looks like a giant missing piece to my current conundrum! | 15:21 | ||
disbot2 | <librasteve> `crag "^<20.555555555555557 °C> .in: 'ºF'" | ||
<librasteve> #69ºF | 15:22 | ||
<librasteve> crag "^<69 °F> .in: 'ºC'" | 15:23 | ||
<librasteve> #20.56ºC crag has default round(0.01) to avoid shenanigans | 15:24 | ||
15:32
soverysour joined,
soverysour left,
soverysour joined
15:41
soverysour left
|
|||
tbrowder | that class rocks bigtime!! (one minor issue filed though) | 15:43 | |
16:22
soverysour joined
|
|||
tbrowder | for some reason it reported bin file ‘rn’ was installed’ so that was the one i tried first. but looking briefly at the code, i don’t see it. looks like ‘rn’ is probably from yr pkg ‘Read::Names’ | 16:22 | |
sorry Random::Names | 16:24 | ||
16:27
soverysour left
16:32
librasteve left
16:38
soverysour joined,
soverysour left,
soverysour joined,
librasteve joined
16:43
soverysour left
16:45
librasteve left
16:48
librasteve joined
16:54
librasteve left
17:06
soverysour joined
17:07
librasteve joined
17:12
soverysour left,
librasteve left
17:20
librasteve joined
17:23
soverysour joined
17:27
librasteve left
17:42
avuserow left
17:44
sorenson left
17:46
sorenson joined
17:53
avuserow joined,
librasteve joined
18:25
soverysour left
18:45
MasterDuke joined
19:01
yewscion left
19:11
yewscion joined
|
|||
tonyo | disbot2: you can clone git@github.com:tony-o/raku-fez and do a `zef install --/test .` | 19:23 | |
tbrowder | refactus: i'b | 19:48 | |
*i've used noas api before, and it's as ugly as Financeapi's. have you reported your issue to them? | 19:49 | ||
my daughter works for noaa and she may be able to help if you need somebody inside the agency | 19:50 | ||
did you know that many of the wx reporting stations they use are provided by private wx hobbyists? and many of them are no longer functional, and missing data are estimated? | 19:53 | ||
20:17
Aedil left
20:31
MasterDuke left
20:33
librasteve left
20:52
librasteve joined
|
|||
erry | lizmat: i made a better video :3 | 20:56 | |
www.youtube.com/watch?v=vIPuL06InGA | |||
20:57
yewscion left
|
|||
[Coke] | any git options to avoid accidentally creating a 'foo.md' and 'FOO.md' in the same dir? | 20:59 | |
21:03
librasteve left
|
|||
tbrowder | a caveat on my wx c | 21:05 | |
*comments | |||
info on wx stations was from some years ago when i was investigating installing a home wx station and getting it approved by noaa. i couldn’t satisfy requirements they had, mainly needing enough clear space to minimize local effects on wind and rainfall. | 21:10 | ||
21:11
ACfromTX left
22:07
librasteve joined
22:12
librasteve left
|
|||
tbrowder | lizmat: when using Hash2Class and its role to create a class from a hash, what is the syntax for exporting it? Will this work: class Foo does Hash2Class is export[...] {} | 22:20 | |
lizmat | class Doo does Hash2Class[...] should do the trick in a module ? | 22:25 | |
tbrowder | so it should have its unique unit class module then? | 22:27 | |
*its own... | 22:28 | ||
testing... | |||
22:29
lichtkind left
22:30
lichtkind joined
22:39
librasteve joined
22:43
lichtkind left
22:44
librasteve left
|
|||
tbrowder | hm, need to rethink that... | 22:44 | |
so: module Quotes contains parent class Quote and its children all using roles Hash2Class | 22:49 | ||
23:05
librasteve joined
23:10
librasteve left
|
|||
tbrowder | ok, that seems to work.. | 23:14 | |
so far... | 23:15 | ||
23:23
librasteve joined
23:28
librasteve left
23:41
librasteve joined
23:46
librasteve left
23:53
xinming left
23:58
librasteve joined
|