<< 11-12-2023 >>

00:00:35FromDiscord<arathanis> sent a code paste, see https://paste.rs/qqXpk
00:10:30FromDiscord<ElegantBeef> Nah these are compiler generated values they should be constants
00:16:21FromDiscord<arathanis> Might be worth sanity checking just the same
00:17:21FromDiscord<ElegantBeef> Plus it should not matter as it's all the same all the way down
00:17:34FromDiscord<ElegantBeef> I did change it to the cstring hash, but yea same issue
00:19:36*xet7 quit (Remote host closed the connection)
00:23:16FromDiscord<Elegantbeef> Ah the issue was actually the `counted` set
00:23:32FromDiscord<Elegantbeef> Multiple procs might call into an entry
00:23:41FromDiscord<Elegantbeef> As such culling them results in fewer samples
00:24:25FromDiscord<Elegantbeef> image.png https://media.discordapp.net/attachments/371759389889003532/1183564910983118909/image.png?ex=6588cbb8&is=657656b8&hm=eff74cda144249d70505da1a145de77fc583b6a4cb7df45af8e42636246153a1&
00:24:26FromDiscord<Elegantbeef> It looks like something
00:27:21FromDiscord<zectbumo> I was close
00:29:03FromDiscord<zectbumo> (edit) "close" => "close, or at least on to `counted`"
00:30:48*Jjp137 joined #nim
00:32:20FromDiscord<zectbumo> In reply to @omentic "i've been keeping https://gist.github.com/omentic/0": I'd like this one to be included about the single call when assigning multiple vars.↵https://forum.nim-lang.org/t/9132#60046
00:33:49FromDiscord<zectbumo> (I thought you guys cared about speed 😉)
00:37:43FromDiscord<Elegantbeef> We do care about speed but if `var a, b = proc()` is your bottle neck you're in good hands
00:42:51FromDiscord<zectbumo> `var a, b, c, d, e = fetch('http...')` 😬
00:43:13FromDiscord<Elegantbeef> Though an optional hint would benice
00:43:14FromDiscord<Elegantbeef> be nice\
00:43:18FromDiscord<Elegantbeef> PR's welcome
00:43:31FromDiscord<Elegantbeef> In what world is that common code?
00:47:28FromDiscord<zectbumo> the 5 variables is a bit excessive so you're welcome to call it an exaggeration. but it could be for some other reason like `var a,b = parseJson(rpc('getStuff'))`.
00:48:34FromDiscord<zectbumo> maybe you can think of a better example. (use the darkside)
00:48:51FromDiscord<Elegantbeef> I mean like I said an optional hint should exist
00:49:01FromDiscord<Elegantbeef> But it's not a common source of performance loss
01:02:47FromDiscord<JJ> In reply to @zectbumo "`var a, b, c,": hmm wouldn't this break expectations? procs don't have to be pure
01:03:01FromDiscord<JJ> how would you expect `var a, b = random()` to behave?
01:03:03*Mister_Magister quit (Quit: bye)
01:04:57*Mister_Magister joined #nim
01:11:09FromDiscord<Elegantbeef> @JJ does your emulator run any roms yet?
01:11:11FromDiscord<Elegantbeef> I want to see how bad my profiler does 😄
01:18:14FromDiscord<zectbumo> sent a code paste, see https://paste.rs/v7oR5
01:18:44FromDiscord<Elegantbeef> See I read it ias `var a: typeof(random()); var b = random()` ;D
01:18:47FromDiscord<Elegantbeef> There are 3 ways of doing it and none are right
01:19:35FromDiscord<zectbumo> (edit) "https://paste.rs/se8WF" => "https://paste.rs/RNVsi"
01:19:56FromDiscord<Elegantbeef> Either the compiler should error or it should be left as there is no beneficial change it's completely unexpected anyway you look at it
01:20:29FromDiscord<zectbumo> In reply to @Elegantbeef "See I read it": that's the old javascript way
01:21:58FromDiscord<Elegantbeef> The point was more there is no single correct interpretation
01:22:27FromDiscord<zectbumo> and my point is that's "old" thinking 😄
01:22:46FromDiscord<Elegantbeef> How does age have anything to do with it?
01:22:57FromDiscord<Elegantbeef> There are three interpretations from `var a, b = ...`
01:23:21FromDiscord<zectbumo> I like where this is going
01:24:22FromDiscord<Elegantbeef> why is `var (a, b) = (let x = ...; (x, x))` more valid than `var (a, b) = (..., ...)` or `var a: typeof(...); var b = ...` 😄
01:24:28FromDiscord<Elegantbeef> The fact it's ambiguous means it should be an error
01:24:38FromDiscord<Elegantbeef> `tupleOf(..., 3)` is so simple to write
01:25:21FromDiscord<Elegantbeef> `var a, b = ...` probably should only be valid if `... is static`
01:26:09FromDiscord<arathanis> what library has tupleOf defined?
01:26:16FromDiscord<arathanis> (edit) "tupleOf" => "`tupleOf`"
01:26:33FromDiscord<Elegantbeef> None it's 2 lines of macro code
01:27:13FromDiscord<arathanis> ahh
01:27:31FromDiscord<Elegantbeef> Change this so it caches for zect's desired api
01:27:33FromDiscord<Elegantbeef> sent a code paste, see https://paste.rs/G4Cao
01:27:46FromDiscord<zectbumo> sent a long message, see https://paste.rs/5qXSf
01:28:37FromDiscord<Elegantbeef> sent a code paste, see https://paste.rs/B9V5o
01:29:15FromDiscord<Elegantbeef> Anywho this is silly
01:29:52FromDiscord<Elegantbeef> \that should be `result[^1].add` of course
01:30:14FromDiscord<JJ> In reply to @Elegantbeef "<@572634810917322773> does your emulator": currently dying with finals :-/
01:30:30*krux02 quit (Remote host closed the connection)
01:30:32FromDiscord<JJ> won't have time to work on it until, like, february probably
01:30:38FromDiscord<Elegantbeef> Ah no worries 😄
01:30:41FromDiscord<Elegantbeef> Just seen the license you have on it... jeez comrade
01:30:56FromDiscord<JJ> lmfao is that the fafol
01:31:09FromDiscord<JJ> or is that the anti-capitalist one
01:31:23FromDiscord<Elegantbeef> ancap
01:31:29FromDiscord<Elegantbeef> 😛
01:31:37FromDiscord<JJ> lol
01:31:45FromDiscord<zectbumo> what's the license?
01:31:52FromDiscord<JJ> ah yeah i thought that one was very in the spirit of 100 rabbits projects
01:32:01FromDiscord<JJ> In reply to @zectbumo "what's the license?": individuals may use it, corporations may not
01:32:15FromDiscord<JJ> + non profits and educational institutions
01:32:20FromDiscord<JJ> (edit) "+ non profits and educational institutions ... " added "and co-ops"
01:32:42FromDiscord<JJ> of course, this is on a piece of software that is literally a toy 😛
01:32:50FromDiscord<Elegantbeef> Trigger as hard as I can
01:33:14FromDiscord<zectbumo> sent a code paste, see https://paste.rs/kv8uG
01:33:56FromDiscord<zectbumo> In reply to @omentic "individuals may use it,": isn't that called GPLv3 Alegro?
01:56:17FromDiscord<Elegantbeef> What?↵(@zectbumo)
01:56:37FromDiscord<Elegantbeef> `var (a, b, c) = tupleOf(someExpr, 3)`
02:00:15FromDiscord<zectbumo> oh that's the actual macro for what I want. I didn't catch that
02:01:34FromDiscord<zectbumo> (edit) "what" => "the change that" | "want." => "wanted." | "that" => "that. thx"
04:18:29*droidrage joined #nim
05:21:35*rockcavera quit (Remote host closed the connection)
05:22:34FromDiscord<gogolxdong666> Is there any way to create bitstream from hex string?
05:28:56FromDiscord<Elegantbeef> What is a bitstream in Nim's context
05:30:49FromDiscord<gogolxdong666> https://nim-lang.org/docs/bitops.html but from hex string ?
05:31:41FromDiscord<Elegantbeef> https://github.com/sealmove/bitstreams/blob/main/bitstreams.nim with `parseHexStr`?
05:32:56FromDiscord<gogolxdong666> yes
05:34:23FromDiscord<gogolxdong666> sent a code paste, see https://play.nim-lang.org/#ix=html>
05:34:42FromDiscord<gogolxdong666> should output 1
05:39:41FromDiscord<gogolxdong666> sent a code paste, see https://play.nim-lang.org/#ix=html>
05:42:06FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=html>
05:42:10FromDiscord<Elegantbeef> Like i said `parseHexStr`
05:45:16FromDiscord<gogolxdong666> love you😄
05:45:52FromDiscord<Elegantbeef> The feeling is not mutual
05:46:35FromDiscord<odexine> Beef how would you judge the stability of new concepts compared to old concepts
05:46:45FromDiscord<Elegantbeef> Worse
05:47:02FromDiscord<odexine> Legitimately? I thought it was meant to be better because of the restrictions
05:47:21FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=html>
05:47:55FromDiscord<Elegantbeef> Sorry it's `Option[int]` there does not compile
05:49:14FromDiscord<odexine> I guess it’s best to stick to old concepts somehow
05:50:42FromDiscord<Elegantbeef> Seems like it might've been fixed
05:52:08FromDiscord<Elegantbeef> I take it back
05:52:16FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=html>
05:52:24FromDiscord<Elegantbeef> This errors with a generic argument message
05:53:14FromDiscord<Elegantbeef> Unless you're using a macro to make interface like things there is not much benefit to new concepts
05:53:24FromDiscord<Elegantbeef> Until new features get added like the planned generic checking
05:54:09FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=html>
05:54:23FromDiscord<odexine> Okay, I was just thinking about moving a lot of the monad functions from Haskell into Nim x d
05:54:47FromDiscord<odexine> Type classes fit pretty closely to concepts
05:56:36FromDiscord<Elegantbeef> Yea though they're checked
05:57:13FromDiscord<odexine> ? “Though they’re checked” which is
05:57:45FromDiscord<Elegantbeef> Like Rust traits where the use of a typeclass as a parameter prevents any procedures calls that do not match it
05:57:47FromDiscord<Elegantbeef> Atleast iirc
05:57:54FromDiscord<Elegantbeef> I'm not one for haskell as you very well know
05:58:05FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=html>
05:58:30FromDiscord<Elegantbeef> It's honestly not that cryptic, but I also know how the hot dog is made
07:24:35*advesperacit joined #nim
07:56:11FromDiscord<.bobbbob> is anyone familiar with prologue here? Im trying to do app.use(staticFileMiddleware("public")) but that makes the "public" a part of the url also, so I have to go to localhost:8080/public/wtvr/wtvr.png to access the files, how can I make it just be localhost:8080/wtvr/wtvr.png while still having the wtvr folder be in public?
08:02:39FromDiscord<nnsee> In reply to @.bobbbob "is anyone familiar with": I don't have the answer to your question, but as a rule of thumb you should avoid using prologue to serve static files and instead do it via a reverse proxy such as Caddy or nginx (which your prologue app will likely be sitting behind anyways, for TLS etc)
08:03:37FromDiscord<nnsee> IIRC the last time someone asked that question, the answer was "you can't" without running the app from the same dir as your public files
08:05:35FromDiscord<.bobbbob> In reply to @nnsee "IIRC the last time": hm weird, that should be a simple thing and jester does it automatically. And yeah Im planning to have the files served by nginx once it's done but i'd like to be able to do this while testing the code.
08:06:51FromDiscord<nnsee> you can run nginx on your local machine (and I argue you _should_, to catch possible deployment issues early)
08:07:42FromDiscord<.bobbbob> fair enough, thanks for the advice
08:10:25FromDiscord<nnsee> maybe people would disagree with this sentiment, but I feel like the dev environment _should_ mirror the production environment as closely as possible (barring dev workflow enhancements such as debugging, hot code reloading etc) so you don't have to do double work once you start deploying to prod and realize that the set up is so wildly different there
08:12:17FromDiscord<nnsee> sort of unrelated, but my rule of thumb is to avoid serving files from the filesystem programmatically and always let the reverse proxy do it, because it's so much harder to accidentally shoot yourself in the foot (through performance issues, not serving files using gz when possible, accidentally opening yourself up to a path traversal attack, etc)
08:12:27FromDiscord<nnsee> not impossible mind you, just harder
08:25:18FromDiscord<9ih> I appreciate that you can just see the source for the standard library on your pc
08:25:26FromDiscord<9ih> like I know you can do that with C/C++ but this is actually readable
08:47:42*PMunch joined #nim
09:40:29*dtomato quit (Quit: Ping timeout (120 seconds))
09:40:37FromDiscord<Phil> In reply to @.bobbbob "is anyone familiar with": I am familiar with prologue and use it in a medium sized application - I've never used it to serve static files since you should always delegate that to the reverse proxy.
09:40:48*dtomato joined #nim
09:41:53FromDiscord<Phil> That's why I have nimble tasks to set spin up containers of said server locally via docker containers in a docker compose setup
09:42:19*FromDiscord quit (Remote host closed the connection)
09:42:32*FromDiscord joined #nim
09:45:53FromDiscord<nnsee> I generally set up a kubernetes pod definition `.yaml` and do `podman play kube my-dev-stack.yaml`
09:46:39FromDiscord<nnsee> and later i can just do `podman pod start my-dev-stack`
09:53:34FromDiscord<tauruuuuuus> Are there any restrictions on using pragmas (custom ones and not) on `const` stuff?
09:54:16PMunchWell many of them simply wouldn't do much, restrictions or otherwise
09:54:30PMunchconsts are inlined in Nim
09:55:00FromDiscord<Elegantbeef> The restriction is that aside from macros there is no use of them
09:55:22FromDiscord<Elegantbeef> Constants expand when used so you cannot look up custom pragmas on them
09:55:48FromDiscord<tauruuuuuus> I was experimenting with macro pragmas on const blocks, I guess I'll try with regural "lets"
09:56:11FromDiscord<Elegantbeef> Macros will work on const blocks
09:57:43FromDiscord<tauruuuuuus> Sorry I'll give more details, I'm using a macro to modify the AST of a const definition, so that it decorates that def with 1+ non-custom pragmas (mainly codegenDecl stuff)
09:58:08FromDiscord<Elegantbeef> Right consts do not stay alive so you need `let`
09:58:41FromDiscord<tauruuuuuus> thanks a lot for the info!
09:59:29PMunchYou could detect that in your macro though :)
09:59:50PMunchBut yeah, consts don't like long enough to see the codegen step
10:00:20FromDiscord<Elegantbeef> Hell const's do not even live long enough in Nim to detect pragmas
10:00:26FromDiscord<Elegantbeef> They're folded into the call site
10:46:10FromDiscord<tauruuuuuus> I did not know that, lately I've been focusing on some pretty in depth parts of nim, I guess "thanks" to dipping my toes in macro magic
10:46:16FromDiscord<saint.___.> If I want to write a simple parser for a small lang, do I do it with macros, or can I use npeg
10:46:43FromDiscord<saint.___.> I guess I should learn how to use macros since I have no idea how they work atm but I am more familiar with npeg
11:12:57FromDiscord<Phil> the nlvm repl may just be the thing that kills me using my playground project
11:13:36FromDiscord<Phil> I can explore code way better on the fly and even reassign variables which - while not valid for nim itself, when I'm just syntax checking and pushing code for a small PoC around, is really nice
11:19:11FromDiscord<nnsee> In reply to @isofruit "the nlvm repl may": just tried it out, is it supposed to crash the repl entirely when you do something like `let x = a` without `a` being defined? or is that a bug?
11:20:00FromDiscord<Phil> That one I never ran into, I mean expected behaviour would be an error message in the repl instead of a crash
11:20:17FromDiscord<nnsee> oh, the error is there
11:20:26FromDiscord<nnsee> it also crashes after printing it, though
11:20:29FromDiscord<nnsee> https://media.discordapp.net/attachments/371759389889003532/1183730017184788510/image.png?ex=6589657c&is=6576f07c&hm=71dd1628dfc70eea001df9afa8ce2b128e385bfa0d48ef606a73d4d3ce81cc0e&
11:21:20FromDiscord<Phil> nlvm bugreport?
11:21:58FromDiscord<nnsee> should do that, i just don't know how "raw" it is at this point, since it doesn't even seem to be documented when doing `nlvm --help`
11:21:59FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=html>
12:12:46FromDiscord<9ih> just found out how much faster release is compared to debug
12:12:56FromDiscord<9ih> had a ~15 second aoc solution on debug
12:13:01FromDiscord<9ih> 20ms in release
12:16:06FromDiscord<odexine> lol
12:17:06PMunchYeah, the release/debug time diff seems especially egregious on AoC tasks for some reason
12:19:19FromDiscord<Phil> ok 15000ms to 20ms is nuts, that's more than 500x, "normal" speed differences are more along the lines of 10x
12:19:53FromDiscord<9ih> yeah I was surprised
12:21:11FromDiscord<ambient3332> try -d:lto
12:21:17FromDiscord<ambient3332> and -d:danger
12:21:46PMunchI had -d:danger break one of my aoc solutions
12:22:02FromDiscord<ambient3332> floating point math?
12:22:09PMunchDon't remember
12:26:50FromDiscord<9ih> sent a long message, see <!doctype html>
12:27:44FromDiscord<9ih> I know Measure-Command isn't the best benchmarking tool
12:27:47FromDiscord<9ih> (edit) "Measure-Command" => "`Measure-Command`"
12:28:03FromDiscord<9ih> In reply to @ambient3332 "try -d:lto": what's lto?
12:28:09FromDiscord<ambient3332> link time optimization
12:30:53FromDiscord<odexine> In reply to @9ih "I know `Measure-Command` isn't": its close enough
12:30:54FromDiscord<9ih> can't find any docs on that
12:30:54FromDiscord<ambient3332> I adapted AoC template that automatically runs benchmarks https://github.com/amb/aoc-nim/blob/master/aoc.nim#L52
12:30:59FromDiscord<odexine> when the magnitudes are that big it works
12:31:13FromDiscord<9ih> ya
14:13:10*PMunch quit (Quit: Leaving)
14:17:39*edr joined #nim
14:21:51*rockcavera joined #nim
15:37:58FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=html>
15:40:11FromDiscord<odexine> In reply to @isofruit "Man, being 4 layers": try doing as the first example does without the explicit generic in the call to handleRequest?
15:47:11FromDiscord<Phil> sent a long message, see <!doctype html>
15:48:29FromDiscord<9ih> not that important but does Nim have a way to embed assets in the final executable? similar to how C# has it although I guess not that similar since it's a completely different compiled solution, worth asking anyway
15:48:58FromDiscord<Phil> In reply to @9ih "not that important but": read in a file in a static block, or just use static read procs such as slurp
15:49:33FromDiscord<Phil> or was it gorge? Might both be aliases for staticRead
15:49:37FromDiscord<9ih> and could that support multiple megabyte files?
15:49:52FromDiscord<Phil> Never tried but I don't see why it wouldn't
15:50:01FromDiscord<9ih> sick
15:50:15FromDiscord<odexine> prolly yeah but your binary size would be + the size of that file
15:50:27FromDiscord<Phil> Yeah there's no compression going on there
15:50:51FromDiscord<9ih> ya of course, just looking into distributing a single executable for something that uses bundled assets
15:51:42FromDiscord<odexine> In reply to @isofruit "I mean, that works,": i dont really know the context
15:52:06FromDiscord<odexine> i dont see why what i mentioned limits as you mention
15:59:25FromDiscord<Phil> It's just limiting which way you can write the generic.↵You have one way, but there are like at least 2 more ways that seem like they should be valid that I can't all get to work at the same time... maybe I just give up on that
16:08:59FromDiscord<nnsee> In reply to @9ih "and could that support": i've staticRead files with sizes of multiple hundred megabytes
16:09:04FromDiscord<nnsee> you'll be fine
16:11:08NimEventerNew post on r/nim by mcj1m: The nim website and the downloads are insecure, see https://reddit.com/r/nim/comments/18fy1bc/the_nim_website_and_the_downloads_are_insecure/
16:13:25FromDiscord<9ih> In reply to @nnsee "i've staticRead files with": lol nice
16:13:31FromDiscord<9ih> good to know
16:29:13FromDiscord<nnsee> In reply to @NimEventer "New post on r/nim": huh?
16:34:51FromDiscord<leetnewb> In reply to @nnsee "huh?": mitm?
16:35:02FromDiscord<nnsee> seems like it
16:35:13FromDiscord<nnsee> because I honestly can't reproduce
16:35:54FromDiscord<nnsee> someone should ask them for the exact error message
16:36:16FromDiscord<nnsee> In reply to @leetnewb "mitm?": oh, you already did
16:36:42FromDiscord<nnsee> follow up question would be what authority chain the cert they're being served has
16:36:58FromDiscord<nnsee> have to click on the little shield/padlock/whatever and inspect the details
16:37:09FromDiscord<leetnewb> super weird that github is being mitm-ed
16:38:49FromDiscord<nnsee> if they're in a corporate network it might be for NDR purposes, lots of malware is served from github or it's used as a C2
16:39:19*azimut quit (Ping timeout: 240 seconds)
16:43:18FromDiscord<patitotective> I've thinking about this for a while but should I do `requires "karax >= 1.0.0 & < 2.0.0"` for my nimble package dependencies?
17:12:55FromDiscord<parabola> hi y'all, is there any type in nim like size\_t in c or usize in rust?
17:14:14FromDiscord<JJ> uint?
17:15:13FromDiscord<parabola> isn't uint basically the same as unsigned int? i mean it's not as idiomatic as saying size\_t or usize
17:20:10FromDiscord<bostonboston> https://nim-lang.org/docs/ctypes.html#csize_t
17:20:19*PMunch joined #nim
17:22:02PMunchAoC day 11 stream up early today! https://www.twitch.tv/pmunche https://www.youtube.com/watch?v=DQly0b4TjWQ
17:24:26FromDiscord<parabola> should this be used everytime we need to represent any type of size in bytes?↵(@bostonboston)
17:24:59FromDiscord<parabola> seems like a c-compatibility thingy
17:25:19FromDiscord<bostonboston> I have personally never used it, unit/uint32/int always works fine for me
17:25:35FromDiscord<bostonboston> But I'm also not dealing with very large things
17:28:40FromDiscord<parabola> in that regard, we should always use uint for dealing with sizes because its maximum value depends on the platform, instead of for example uint64?
17:30:09FromDiscord<bostonboston> Don't quote me but I remember reading somewhere that the Nim compiler takes care of the size of `int` for you based on architecture so I would assume `uint` is the same
17:32:15FromDiscord<parabola> yeah i know
17:32:17FromDiscord<parabola> thanks
18:14:22FromDiscord<Chronos [She/Her]> In reply to @parabola "isn't uint basically the": Unfortunately Nim doesn't have anything like usize
18:14:33FromDiscord<Chronos [She/Her]> It does have csize_t but, that's mostly for C interop
18:15:46FromDiscord<Chronos [She/Her]> You can always do `type usize = uint` to make `usize` and alias to `uint`, perhaps? Or you could do `type usize = distinct uint` to make it a special type (then you could probably have a converter for making uints work as usizes implicitly)
18:16:10Amun-Rausize shouldn't be distinct
18:16:27Amun-RaI'd go with type usize = BiggestUInt
18:17:40FromDiscord<Chronos [She/Her]> In reply to @Amun-Ra "usize shouldn't be distinct": Why shouldn't it? You'd have to implement the arithmetic operations but, it'd be better I'd imagine for being idiomatic?
18:18:43Amun-Rait's just a type capable of storing any size
18:19:11FromDiscord<Chronos [She/Her]> It's dependent on the platform's natively supported uint in Rust
18:19:15FromDiscord<Chronos [She/Her]> Maybe I'm tainted :p
18:20:21Amun-RaI'm not a fan of rust, I read usize as size_t ;)
18:31:17*PMunch quit (Quit: leaving)
18:51:56FromDiscord<Chronos [She/Her]> Fair
19:34:28*krux02_ joined #nim
20:14:38FromDiscord<parabola> aahh finally someone who doesn't "love" rust↵(<@709044657232936960_=41mun-=52a=5b=49=52=43=5d>)
20:16:10FromDiscord<Chronos [She/Her]> I don't love Rust, just learning the lang and like some things about it-
20:22:01FromDiscord<bostonboston> I could never like rust, syntax is too similar to cpp and rust developers are horrible at naming things
20:22:21FromDiscord<Phil> I mean, there's a fair amount of those here, mostly because of syntax preferences
20:38:54FromDiscord<nnsee> i like rust's iterator and the chaining ops it lets you do
20:39:04FromDiscord<nnsee> (edit) "iterator" => "iteratosr"
21:12:27FromDiscord<Chronos [She/Her]> I do like how it lets you do results and options for error handling tbf
21:15:07FromDiscord<Phil> ... is there a way to get nim doc to not absolutely slaughter my beautiful doc comment formatting?
21:15:53FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=html>
21:16:08FromDiscord<Phil> This is what nim doc turns that into https://media.discordapp.net/attachments/371759389889003532/1183879917524488283/image.png?ex=6589f117&is=65777c17&hm=c34758952a6a87ec866f7fff440fb68a9a5bde71c2b40f0f94958de05b374c8a&
21:27:30FromDiscord<ElegantBeef> @Phil look at matrix 😄
21:28:39FromDiscord<Phil> Check. And I do in fact need that to work because while it isn't necessarily user-facing, it is visible and also a useful for understanding
21:28:47FromDiscord<Phil> (edit) removed "a"
21:34:48FromDiscord<ElegantBeef> Wait why is this 'internal' macro visible?
21:35:10FromDiscord<ElegantBeef> Someone is leaking implementation details
21:35:56FromDiscord<Phil> In reply to @elegantbeef "Wait why is this": Because I also need it in "integration" modules, e.g. those providing better integration with specific libraries, in this case only owlkettle
21:36:08FromDiscord<ElegantBeef> Why?
21:36:41FromDiscord<ElegantBeef> Are you actively using that procedure inside the module?
21:36:58FromDiscord<ElegantBeef> Or is this just a template/macro expansion that you do not know how to get around another way
21:37:05FromDiscord<Phil> Because I'm first solving the general usecase, agnostic of whatever I want to integrate with, and then do more specific stuff for special usecases that need it.↵Owlkettle in this case requires it because I need to split up the code-generation for owlkettle
21:37:40FromDiscord<Phil> Because I need to first generate all my types, then define the App widget, then generate my routing procs
21:38:00FromDiscord<Phil> So I can't do it all in one go unlike how I'd do without said module
21:38:33FromDiscord<ElegantBeef> Right, but are you calling `asEnum` inside your owlkettle module or from your macro module?
21:38:46FromDiscord<Phil> inside the owlkettle module
21:38:55FromDiscord<ElegantBeef> Ok then carry on
21:40:12FromDiscord<ElegantBeef> I wrongly assumed that this was called inside a template and you were hitting a `UnknownIdentifier(asEnum)`
21:40:17FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=html>
21:41:24FromDiscord<Phil> Ah, no, this is more that given the complexity that integrating with owlkettle brought with it, I'm half regarding threadButler as more of a useful base implementation and for decent integration with any kind of framework that has its own event-loop you'll have to write some code to make integration easier.
21:41:59FromDiscord<Phil> Like how with owlkettle I had to set up a global timeout for listening for messages from another thread which can then trigger a redraw etc.
21:42:30FromDiscord<Phil> And how the "handler"-procs specifically on the owlkettle thread need to have access to AppState in order to do anything useful
21:43:58FromDiscord<Phil> So all this stuff is "public" to make it easy to write your own integration module, in the end you'll always either only import the `threadButler` module or `threadButler + threadButler/integrations/<framework>Utils`↵(naming suggestions for the module names or a better name for "integrations" dir are welcome)
21:50:59*azimut joined #nim
22:07:44*xaltsc joined #nim
22:34:21*advesperacit quit ()
23:19:09*Jjp137 quit (Remote host closed the connection)
23:19:38*Jjp137 joined #nim
23:26:43*oddish_ joined #nim
23:30:53*oddish quit (Remote host closed the connection)
23:30:53*oddish_ is now known as oddish
23:46:22FromDiscord<Phil> Thinking it through, the entire "You can have N threads and just pin a name to them and I generate an object variant you can send through a channel to that thread" setup may require me to also generate the "ChannelHub"-type that I was thinking of, including like half a dozen procs to manage said type
23:48:10FromDiscord<Phil> So I can have an object-type that I add one field with a Channel to per thread that you register.↵Or maybe I can get away with storing the channels as pointers in a map, somehow figuring out the object variant that should work with a given channel, typecasting it back and using it to send a message through, that should avoid even more codegeneration as I'm already imo doing too much of that