<< 31-05-2024 >>

00:00:01FromDiscord<Elegantbeef> `let x = y` can copy
00:00:22FromDiscord<Robyn [She/Her]> Nice, it works :)
00:00:39FromDiscord<Robyn [She/Her]> No I meant for copying the tree
00:02:41FromDiscord<Elegantbeef> Cause it's the same asst
00:02:43FromDiscord<Elegantbeef> ast\
00:02:47FromDiscord<Elegantbeef> Cause Nim uses pointers
00:03:31FromDiscord<Robyn [She/Her]> And the body is being modified after the fact?
00:03:31*beholders_eye quit (Read error: Connection reset by peer)
00:03:46FromDiscord<Elegantbeef> No it's semantically resolved in the first branch
00:04:18FromDiscord<Elegantbeef> In the second branch it's already checked so it's not resemmed and the compiler accepts the `Error` into `ok`
00:09:03*beholders_eye joined #nim
00:10:14*beholders_eye quit (Read error: Connection reset by peer)
00:12:41FromDiscord<Robyn [She/Her]> Aah
00:16:25*beholders_eye joined #nim
00:17:49*def- joined #nim
00:22:27FromDiscord<Robyn [She/Her]> I think a better name for `unpackIt` is needed
00:34:04FromDiscord<Robyn [She/Her]> I wonder if I should make an `init` macro to provide the basic initialisation functionality
00:36:29FromDiscord<Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=XsUsTUGf
00:36:47FromDiscord<Robyn [She/Her]> I don't like the idea of overloading `()` but it might be the best way
00:37:01FromDiscord<Robyn [She/Her]> Alternatively I could just name it `init`
00:37:21FromDiscord<Robyn [She/Her]> Not sure which one is more idiomatic for Nim
00:37:40FromDiscord<Elegantbeef> `init` works better
00:39:32*SchweinDeBurg joined #nim
00:41:43*beholders_eye quit (Read error: Connection reset by peer)
00:42:29*beholders_eye joined #nim
00:44:56*beholders_eye quit (Read error: Connection reset by peer)
00:47:46FromDiscord<Robyn [She/Her]> Good point
00:48:02FromDiscord<Robyn [She/Her]> I do need to use `new` for ref sum types though, hm
00:48:07FromDiscord<Robyn [She/Her]> Eh, not my problem for now
00:50:53*beholders_eye joined #nim
01:14:43FromDiscord<zumi.dxy> sent a code paste, see https://play.nim-lang.org/#pasty=IuzDOpVS
01:25:25FromDiscord<Robyn [She/Her]> What's the recommended way to slice a string without copying? I want to be able to store it in a type, but iirc codegen issues with views are an issue rn
01:27:44FromDiscord<Elegantbeef> `toOpenArray`
01:27:48FromDiscord<Elegantbeef> The answer is there are no view types
01:27:58FromDiscord<Elegantbeef> so you take a `ptr` and ensure the life times our cry
01:28:00FromDiscord<Elegantbeef> or cry\
01:28:43FromDiscord<Robyn [She/Her]> Hm...
01:28:50FromDiscord<zumi.dxy> `lent` doesn't work yet?
01:29:00FromDiscord<Robyn [She/Her]> What does lent do?
01:29:14FromDiscord<Elegantbeef> Lent works but you cannot hold onto it
01:29:16FromDiscord<Elegantbeef> just like var
01:29:27FromDiscord<Elegantbeef> It's a copy on storage operation since there is no lifetime tracking
01:30:04FromDiscord<Robyn [She/Her]> Hm
01:32:19FromDiscord<Robyn [She/Her]> Is it expensive to slice a string? I could return an offset instead which would mean I could pass around `openArray[char]` freely without losing the original string and having to copy often
01:32:31FromDiscord<Elegantbeef> It copies the slice
01:32:56FromDiscord<Robyn [She/Her]> Ah
01:33:26FromDiscord<Robyn [She/Her]> Well, `toOpenArray(offset, myStr.len - 1)` should be fine to avoid copying right?
01:33:43FromDiscord<Elegantbeef> Except you cannot hold onto `openArray[char]` in a field
01:34:05FromDiscord<Robyn [She/Her]> I'll just pass around a `var string` in parameters, which would allow me to avoid the need to store it
01:34:24FromDiscord<Robyn [She/Her]> As long as I have access to the original string (I always will), an offset is more than enough
01:37:58*lucasta quit (Quit: Leaving)
01:43:47*beholders_eye quit (Read error: Connection reset by peer)
01:45:47*SchweinDeBurg quit (Quit: WeeChat 4.4.0-dev)
01:52:59*fallback quit (Read error: Connection reset by peer)
01:58:49*fallback joined #nim
02:09:33*krux02 quit (Remote host closed the connection)
02:19:09*def- quit (Quit: -)
02:19:43*def- joined #nim
02:22:41*def- quit (Client Quit)
02:53:24FromDiscord<Robyn [She/Her]> `Error: invalid type: 'openArray[char]' for let` pain
03:04:23*def- joined #nim
03:30:35*fallback quit (Read error: Connection reset by peer)
03:40:00*SchweinDeBurg joined #nim
03:40:20FromDiscord<albassort> @leorize0713 encase you're curious where the direction im going with this project its:↵Im binding sequoria because im blown away by it, seriously impressed with the quality of code. I'm going to be binding it by writing a bunch of super high level high configuration rust functions that only take in c-compatible paramaters arrays, string, and ints. Not exposing the low-level api, but making simple tools the average person needs.
03:40:28FromDiscord<albassort> how does that sound
03:40:51FromDiscord<albassort> @Robyn [She/Her] way in on this i value ur opinion because you're my age
03:41:30FromDiscord<albassort> (edit) "way" => "weigh"
03:46:53FromDiscord<leorize> sequoia is pretty good, rpm is even using it now
03:47:03FromDiscord<leorize> (rpm is the fedora/red hat package manager)
03:51:52FromDiscord<leorize> though I'll remind you that you should only be trying to do gpg because you want to interop with ecosystems already using gpg (like verifying packages or something)
03:52:34FromDiscord<leorize> the gpg model is very outdated for today's internet and other format rose up to replace it for the encryption/signing use cases
03:57:25FromDiscord<albassort> no
03:57:57FromDiscord<albassort> its not outdated for our time, if what you're describing to me is correct, an engineer in 1975 would laugh at you for the design of gpgme
03:58:26FromDiscord<albassort> that is simply bad design
03:58:42FromDiscord<albassort> theres nothing new or old about it\
03:58:42FromDiscord<albassort> (edit) "it\" => "it"
03:58:56FromDiscord<Elegantbeef> > weigh in on this i value ur opinion because you're my age↵What a weird statement 😄
03:59:39FromDiscord<albassort> why don't you weigh in then beef
04:00:14FromDiscord<Elegantbeef> Make the high level wrapper wherever is easiest
04:00:23FromDiscord<Elegantbeef> If it's easier to use cbindgen and do it in Nim, then do it that way
04:01:02FromDiscord<albassort> beef, i thought rust had this by default
04:01:08FromDiscord<albassort> i dont actually know anything about rust
04:01:15FromDiscord<Elegantbeef> Had what by default?
04:01:20FromDiscord<albassort> the ability to importc
04:01:25FromDiscord<Elegantbeef> It does
04:01:35FromDiscord<Elegantbeef> cbindgen generates C headers for CFFI
04:01:38FromDiscord<Elegantbeef> From rust
04:02:35FromDiscord<albassort> i thought by compiling it as a library it already had something i could import
04:02:52FromDiscord<albassort> https://dev.to/dumblepytech1/the-way-integrate-rust-into-nim-40p3
04:03:27FromDiscord<Elegantbeef> I mean sure if you want to define the ABI and have no safety you can use any library without a C header
04:03:47FromDiscord<Elegantbeef> The C header formalises the ABI and since it's generated from Rust code gives you type safety
04:03:49FromDiscord<albassort> understood. I would like a c header
04:03:55FromDiscord<albassort> instead of shooting in blank
04:04:09FromDiscord<Elegantbeef> cbindgen lets you generate headers from rust code
04:04:21FromDiscord<Elegantbeef> Wishes we had this for Nim in a way that wasn't hacky like seeya
04:04:34FromDiscord<albassort> yes i understood the point after pointed out the different haha
04:05:55FromDiscord<xkonti> sent a code paste, see https://play.nim-lang.org/#pasty=xvFyQhno
04:05:58FromDiscord<Elegantbeef> Hell until some commit in devel Nim's ABI caused RVO even in cdecls 😄
04:06:11FromDiscord<Elegantbeef> No references cannot be constants
04:06:30FromDiscord<Elegantbeef> Turn that into a `table` then at runtime do `myTable[] = theConst`
04:06:42FromDiscord<Elegantbeef> Only use `ref` if you want reference semantics
04:07:14FromDiscord<xkonti> I see. The resulting table is quite large so I'll try the `myTable[] = theConst` trick. Thanks!
04:07:37FromDiscord<Elegantbeef> Are you mutating the table?
04:08:00FromDiscord<Elegantbeef> Ostensibly you're not
04:10:50FromDiscord<xkonti> Oooh so nice to see `ostensibly` being actually used 😍↵↵The table isn't mutated but it contains several megs of data and a few hundred items inside (which are not refs).
04:11:09FromDiscord<Elegantbeef> I over use a few select amount of words
04:11:27FromDiscord<Elegantbeef> Well then yea you can move it into the reference
04:15:05FromDiscord<xkonti> sent a code paste, see https://play.nim-lang.org/#pasty=AgVZaZlU
04:15:23FromDiscord<Elegantbeef> Lol that's so wrong it's not funny
04:15:27FromDiscord<Elegantbeef> `[]` is the dereference operator
04:15:49FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=LOWCOFle
04:17:46FromDiscord<xkonti> Uh oh. That's why `[]` looked familiar. Duh. Doesn't it mean that the `myConst` is being copied into `glyphsBlocky` and because of that I have 2 copies of it in RAM?
04:18:17FromDiscord<Elegantbeef> You could likely use some codegen hacks to get that in static memory
04:20:16FromDiscord<Elegantbeef> Actually... Nim's sequence literals are CoW so that might be fine
04:24:34FromDiscord<xkonti> sent a code paste, see https://play.nim-lang.org/#pasty=bEXTdOWp
04:24:53FromDiscord<Elegantbeef> Const's are compiled into the binary's data section
04:26:35FromDiscord<xkonti> Oh right. What the hell am I thinking. Clearly I'm not used to this kind of low-level programming. I know it's pretty far from the real low level, but for me it's low enough 😅↵↵I guess I'll deal with it being the way it is for now 🙂
04:26:42FromDiscord<xkonti> I don't like "hacks" 😛
04:27:02FromDiscord<Elegantbeef> Hmph actually seq literals do not do that CoW optimisation, only strings
04:28:09FromDiscord<Elegantbeef> Well the least hacky you can do is `ptr Table[string, string]`
04:28:19FromDiscord<Elegantbeef> That's not ideal of course using unsafe mechanisms
04:29:27FromDiscord<xkonti> Hmm... I might actually try that... This wouldn't get propagated far as it's instantly hidden behind some safe procs...
04:31:04FromDiscord<Elegantbeef> I do wonder, why do you even need this reference?
04:32:41FromDiscord<xkonti> sent a code paste, see https://play.nim-lang.org/#pasty=bsEELwJr
04:33:39FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=OOLrmiZX
04:33:41FromDiscord<Elegantbeef> Whoops
04:34:06FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=XWegPpcY
04:34:56FromDiscord<Elegantbeef> Then you do like `state.getCharacter(character, font)` and have no need for this large trap filled table to be exposed
04:36:17*xet7 quit (Remote host closed the connection)
04:38:40FromDiscord<xkonti> Ok. I'll pause this conversation here. I'll see how the current approach works and if I will ever need to pass the thing around.
04:39:12FromDiscord<Elegantbeef> Here we can see someone regretting asking a question whilst I was around
04:56:55*fallback joined #nim
05:08:46FromDiscord<pmunch> In reply to @zumi.dxy "<@392962235737047041> tried your labelledtry": Hmm, good question. Haven't tried it on 2.0.4. I'll give it a go and see if I can figure out what's going on
05:46:49*fallback quit (Read error: Connection reset by peer)
06:11:37NimEventerNew Nimble package! shobiz - Simple structured console messages for Nim applications., see https://github.com/logavanc/shobiz
06:27:39*PMunch joined #nim
06:41:40FromDiscord<pmunch> In reply to @zumi.dxy "<@392962235737047041> tried your labelledtry": Turns out my original test couldn't run inside a procedure 😛 You're playing with very untested stuff here. But I fixed it now, should work better now
07:10:16FromDiscord<ebahi> didn't know this was possible https://media.discordapp.net/attachments/371759389889003532/1245997763561521202/sQq0v2O.png?ex=665ac958&is=665977d8&hm=db500355fc8079082853aa8a2c1fc7d9b83c855b07f6482b264052d133b0bf2b&
07:15:04*ntat joined #nim
07:18:34FromDiscord<zumi.dxy> In reply to @pmunch "Turns out my original": ahh lmao↵yeah that's understandable
07:20:45FromDiscord<zumi.dxy> it compiles now at least, thanks!
07:21:07FromDiscord<zumi.dxy> now to figure out how to use it with {.raises: [].}
07:24:37FromDiscord<pmunch> In reply to @ebahi "didn't know this was": Didn't know what was possible?
07:25:28FromDiscord<nnsee> spaces
07:25:50FromDiscord<nnsee> before this, they wrote code strictly with no spaces
07:26:07PMunchAnd now they're making up for it by putting spaces everywhere?
07:30:11FromDiscord<nnsee> indeed
07:33:17FromDiscord<ebahi> In reply to @PMunch "And now they're making": it looks good to my eyes
07:34:00FromDiscord<Elegantbeef> are your eyes open?
07:34:04FromDiscord<pmunch> You might have to see an optometrist
07:34:11FromDiscord<pmunch> Just kidding, to each their own
07:35:06FromDiscord<ebahi> i always kinda liked how assembly looked but to each their own
07:51:04*fallback joined #nim
07:55:47FromDiscord<.bobbbob> could random "IndexDefect: index out of bounds, the container is empty" be caused by that bug which is fixed in devel and is recommended to use -d:useMalloc to fix?
07:56:18FromDiscord<.bobbbob> what are the advantages and disadvantages for -d:useMalloc anyways?
07:57:03FromDiscord<.bobbbob> also what's the link to the bug report for that anyways
08:05:12PMunchThat is very unlikely
08:05:22PMunchIndexDefect is often a bug in your code
08:10:56FromDiscord<.bobbbob> In reply to @.bobbbob "what are the advantages": yeah that's what I figured, you know the answer to this though?
08:17:58FromDiscord<ieltan> sent a long message, see https://pasty.ee/LncOBCjU
08:18:04PMunchTo what causes the IndexDefect in your code?
08:18:35PMunchOh sorry, replies don't show up clearly on IRC
08:19:05PMunchI think @ieltan summed it up nicely
08:19:20FromDiscord<.bobbbob> In reply to @ieltan "advantage: you don't use": I see, thanks
08:19:26PMunchPros and cons, mostly speed vs. compatibility
08:19:35FromDiscord<.bobbbob> In reply to @PMunch "To what causes the": Trying to hunt it down haha, it's a weird transient error
08:19:51PMunchDon't you get a stack trace?
08:22:00FromDiscord<.bobbbob> I run a website and people have been complaining about a problem for a while but I've never been able to replicate it, no idea what causes it
08:24:13PMunchSounds like you need some logging :P
08:25:18PMunchIndexDefects are typically caused by things like `somecollection[0]` without checking whether `somecollection` actually has any data, or by `somecollection[indexfromuser]` without verifying that `indexfromuser` is valid.
08:56:55FromDiscord<ieltan> Funny how this comes up
08:58:11FromDiscord<ieltan> I was thinking about how to deal with this issue because I'm not a fan of the repeated `if t.hasKey(k)` ceremony
08:59:17FromDiscord<ieltan> There's that function that returns a default when a key is missing but still
09:10:08PMunchThat shouldn't raise an IndexError though, but a KeyError
09:10:27PMunchIndexDefect rather
09:10:37PMunchIt's for arrays and such
09:28:55FromDiscord<ieltan> oops, my bad
09:29:57*beholders_eye joined #nim
10:36:56*gshumway quit (Quit: .)
10:41:04*gshumway joined #nim
10:53:13FromDiscord<Robyn [She/Her]> In reply to @albassort "<@524288464422830095> weigh in on": Hm?- i don't have many thoughts in general ehe
11:04:11*beholders_eye quit (Ping timeout: 264 seconds)
11:58:45*beholders_eye joined #nim
12:12:10*beholders_eye quit (Ping timeout: 255 seconds)
12:24:15*krux02 joined #nim
12:42:05*nils` quit (Quit: nils`)
13:05:34FromDiscord<Robyn [She/Her]> Hm, I'm trying `getTypeInst` on a symbol, and it's returning the alias of the type rather than what it's supposed to point to
13:07:50FromDiscord<Robyn [She/Her]> `getImpl` isn't helping here, either
13:10:22PMunch`getTypeImpl`?
13:11:35FromDiscord<Robyn [She/Her]> In reply to @PMunch "`getTypeImpl`?": Return an empty node
13:13:05FromDiscord<Robyn [She/Her]> (edit) "Return" => "Returns"
13:13:09FromDiscord<Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=XeTzyCpd
13:13:20FromDiscord<griffith1deadly> In reply to @chronos.vitaqua "`getImpl` isn't helping here,": as i know `getImpl` give `nil` on primitives
13:13:52FromDiscord<Robyn [She/Her]> `Stipes` is a `Table[string, Table[string, tuple[value, field: NimNode]]`
13:14:07FromDiscord<griffith1deadly> sent a code paste, see https://play.nim-lang.org/#pasty=GssroeVN
13:14:57FromDiscord<Robyn [She/Her]> In reply to @griffith1deadly "as i know `getImpl`": It's not a primitive, the type is `ParseResult = Result[tuple[idx: AstIndex, offset: int], string]` (`Result` is my own type)
13:15:26FromDiscord<Robyn [She/Her]> I'm passing an instance of `ParseResult` around, but I need the symbol of `Result`
13:22:07*PMunch quit (Remote host closed the connection)
13:33:52*PMunch joined #nim
13:35:38*beholders_eye joined #nim
13:42:05*PMunch quit (Quit: Leaving)
14:00:15*lucasta joined #nim
14:03:31FromDiscord<Robyn [She/Her]> `/data/data/com.termux/files/home/Napkins-Combinator/main.nim(178, 11) Error: cannot use symbol of kind 'var' as a 'field'` https://play.nim-lang.org/#pasty=WXDYyTYM :/
14:03:39FromDiscord<Robyn [She/Her]> This error makes zero sense to me
14:16:49FromDiscord<thesherwood> What's the SOTA for generating nim bindings for C libraries?
14:17:15FromDiscord<solitudesf> In reply to @chronos.vitaqua "`/data/data/com.termux/files/home/Napkins-Combinato": tuple field in parseOk template has the same name as template parameter
14:17:57FromDiscord<solitudesf> so it gets substituted unsuccessfully
14:46:01FromDiscord<Robyn [She/Her]> Ooooh, thanks Solitude!
14:50:43FromDiscord<treeform> sent a code paste, see https://play.nim-lang.org/#pasty=cuJyUsdz
14:52:01FromDiscord<pmunch> In reply to @thesherwood "What's the SOTA for": Futhark I'd say, granted I'm a bit biased
14:54:23*beholders_eye quit (Ping timeout: 256 seconds)
14:55:15FromDiscord<thesherwood> In reply to @pmunch "Futhark I'd say, granted": I just saw it and it looks great. Though I'm a complete novice when it comes to linking C libs. So I might ask a few questions shortly. I'm wanting to wrap `tree-sitter`
14:56:55FromDiscord<nocturn9x> In reply to @treeform "Probably means you are": ye ig
14:57:54*krux02 quit (Remote host closed the connection)
15:44:23*lain quit (Ping timeout: 264 seconds)
15:53:55*SchweinDeBurg quit (Quit: WeeChat 4.4.0-dev)
16:15:57FromDiscord<thesherwood> In reply to @pmunch "Futhark I'd say, granted": Heads up that I ran into errors trying `nimble install futhark` on my machine. I assumed this is because my environment is funky because I've been using nimskull as well. But then I tried it on replit (https://replit.com/@theSherwood/ProfuseDarkmagentaAutotote) (`nimble install futhark`) and ran into similar errors with `ldl`.
16:18:24FromDiscord<pmunch> What are the errors? And did you check the README?
16:19:44FromDiscord<System64 ~ Flandre Scarlet> https://github.com/glassesneo/OOlib↵This thing looks so cool!
16:26:41FromDiscord<thesherwood> sent a code paste, see https://play.nim-lang.org/#pasty=MDefwpDQ
16:31:14*lain joined #nim
16:35:52*lucasta quit (Quit: Leaving)
16:38:08*krux02 joined #nim
16:41:12FromDiscord<thesherwood> With clang installed on replit, the futhark installation works fine. Sorry about that
16:53:19*beholders_eye joined #nim
17:09:57FromDiscord<pmunch> Some distros split clang and libclang, maybe you need to install the latter?
17:11:07FromDiscord<pmunch> In reply to @sys64 "https://github.com/glassesneo/OOlib This thing look": Not gonna lie, that actually looks pretty good if you want to do OO programming
17:12:08FromDiscord<System64 ~ Flandre Scarlet> In reply to @pmunch "Not gonna lie, that": https://github.com/YaDev/NimCLS↵There is that too↵I dunno what's the best
17:18:23FromDiscord<thesherwood> sent a code paste, see https://play.nim-lang.org/#pasty=EHaXnGII
17:58:55FromDiscord<pmunch> In reply to @thesherwood "On replit, I've got": Which version of Futhark? Clang should be able to find stdlib.h in more recent versions 🤔
17:59:13FromDiscord<pmunch> Did you set `sysPath` in Futhark by accident?
18:01:45FromDiscord<thesherwood> sent a code paste, see https://play.nim-lang.org/#pasty=yssPBvHm
18:08:06FromDiscord<pmunch> Hmm, that shouldn't fail with that error..
18:08:22FromDiscord<pmunch> Although not sure if that `./` will work
18:09:36*SchweinDeBurg joined #nim
18:09:54FromDiscord<pmunch> What does `clang -print-resource-dir` return on your system?
18:10:27FromDiscord<thesherwood> `/nix/store/j17j4qqf28js718v8pfymvhk6p3l6n38-clang-wrapper-11.1.0/resource-root`
18:11:01FromDiscord<thesherwood> If you have a replit account, you should be able to access the environment here: https://replit.com/@theSherwood/EarlyBlueSpreadsheets
18:47:29FromDiscord<pmunch> I don't, and besides I'm on my phone
18:48:08FromDiscord<pmunch> Clang 11 is really old though..
18:48:39FromDiscord<pmunch> Well, a couple of years
18:48:52FromDiscord<pmunch> But I think we're at 16-17 atm?
18:50:03FromDiscord<thesherwood> Okay. I'll see if I can make that work. Thanks for your help
19:03:39*ntat quit (Quit: Leaving)
19:35:06FromDiscord<albassort> In reply to @chronos.vitaqua "Hm?- i don't have": Head empty
20:03:01*jmdaemon joined #nim
20:07:54*jmdaemon quit (Ping timeout: 252 seconds)
20:20:07*jmdaemon joined #nim
21:07:42FromDiscord<shad.ow> could i use nimscript for dynamic configuration of a nim program ?
21:07:51FromDiscord<shad.ow> i want to use it as the plugin language for my text editor
21:27:34FromDiscord<Robyn [She/Her]> In reply to @albassort "Head empty": Ye
21:27:57FromDiscord<Robyn [She/Her]> In reply to @shad.ow "could i use nimscript": What do you mean by dynamic configuration? But you should look at nimscripter
21:28:06FromDiscord<albassort> In reply to @shad.ow "could i use nimscript": I don't know if there is any good example of that in nim right now
21:28:48FromDiscord<albassort> In reply to @chronos.vitaqua "What do you mean": He means like running lua in a jit with an API from within a program to extend it
21:28:53FromDiscord<Robyn [She/Her]> In reply to @albassort "I don't know if": `config.nims` files
21:29:07FromDiscord<Robyn [She/Her]> In reply to @albassort "He means like running": Oh yeah that can definitely be done, Nimscripter can enable that
21:29:09FromDiscord<albassort> Like emacs lisp
21:29:11FromDiscord<Robyn [She/Her]> It's just pretty slow
21:29:13FromDiscord<shad.ow> In reply to @chronos.vitaqua "Oh yeah that can": i see
21:29:15FromDiscord<shad.ow> In reply to @albassort "Like emacs lisp": yep
21:29:24FromDiscord<Robyn [She/Her]> By enable I mean allow you to do that
21:29:42FromDiscord<albassort> Yeah Nim script while having a cool name isn't actually that cool
21:29:55FromDiscord<Robyn [She/Her]> Nimscript is pretty slow
21:30:13FromDiscord<albassort> Ur script is pretty slow
21:30:29FromDiscord<Elegantbeef> We're talking about config for a text editor, speed really is not the most concerning thing
21:30:37FromDiscord<Elegantbeef> There are entire X window managers written in python
21:30:56FromDiscord<albassort> That's a horrible thing to tell me exist
21:31:03FromDiscord<albassort> I guess I kind of figured it had to exist but I didn't want to know about it
21:31:14FromDiscord<Robyn [She/Her]> In reply to @Elegantbeef "We're talking about config": When you're writing plugins though, I'd imagine it's a concern if it's something that runs every time to you edit
21:31:19FromDiscord<albassort> (edit) "exist" => "exists"
21:31:30FromDiscord<Elegantbeef> They said config, not plugins
21:31:52FromDiscord<Robyn [She/Her]> Fair
21:31:58FromDiscord<Elegantbeef> Robyn you might like this https://play.nim-lang.org/#pasty=yMmzuVJU
21:32:01FromDiscord<albassort> Yeah but from other context clues I think you can tell they didn't actually mean config
21:32:06FromDiscord<Elegantbeef> I had this idea to steal Zig's' comptime
21:32:22FromDiscord<Elegantbeef> Right we should use wasm for plugin systems
21:32:32FromDiscord<Elegantbeef> That way it's language, OS, and arch agnostic
21:32:45FromDiscord<albassort> I agree with this beef
21:32:45FromDiscord<Elegantbeef> Or use a risc-v emulator like @fwsgonzo wrote about recently
21:33:14FromDiscord<albassort> Nah man we should be fucking deploying it using docker and have an entire sub operating system for each and every plugin
21:33:37FromDiscord<Elegantbeef> So you dislike learning about qtile but you have the gall to mention docker
21:33:53FromDiscord<albassort> That was sarcasm haha
21:34:28FromDiscord<albassort> I'm getting to like podman for internal build environments for programs that have very poorly makefiles
21:34:59FromDiscord<albassort> (edit) "I'm getting to like podman for internal build environments for programs that have very poorly ... makefiles" added "made"
21:35:06FromDiscord<Elegantbeef> The amount of times I've had docker builds actually work is like 1 time
21:35:18FromDiscord<Elegantbeef> So if anyone relies on docker files, please make sure they work
21:35:26FromDiscord<albassort> No man don't use
21:35:28FromDiscord<albassort> Docker
21:35:30FromDiscord<albassort> Use podman
21:35:34FromDiscord<albassort> It removes like half of the problems
21:35:38FromDiscord<Elegantbeef> Same shit
21:36:13FromDiscord<albassort> That being said with the amount of problems I have with docker, and I have no ability to fix them because they are so esoteric
21:36:24FromDiscord<albassort> I'm tired of my Linux ecosystem being eaten up by insane sub ecosystems
21:38:41FromDiscord<Robyn [She/Her]> In reply to @Elegantbeef "Robyn you might like": Oh? What's so special about Zig comptime?
21:38:55FromDiscord<Elegantbeef> It let's you create types like that
21:39:00FromDiscord<Robyn [She/Her]> In reply to @Elegantbeef "Right we should use": I third this motion
21:39:28FromDiscord<Robyn [She/Her]> In reply to @Elegantbeef "It let's you create": I still don't get the importance aha
21:39:51FromDiscord<Elegantbeef> You can dynamically make types at compile time then emit them out without relying on a macro
21:40:16FromDiscord<fwsgonzo> you need a decent compiler to emit good RISC-V
21:40:47FromDiscord<fwsgonzo> (edit) "RISC-V" => "RISC-V, same with WASM"
21:42:35FromDiscord<fwsgonzo> aftwards you can live with a decent interpreter of RISC-V, but you practically need JIT for WASM
21:46:42FromDiscord<Elegantbeef> Yea, but the alternative is either a single scripting language or system libraries
21:47:00FromDiscord<Elegantbeef> Both have negatives
21:47:13FromDiscord<Robyn [She/Her]> In reply to @fwsgonzo "aftwards you can live": You don't need a JIT, wasm3 exists after all
21:47:30FromDiscord<Elegantbeef> Think the point was you need a jit for speed
21:47:41FromDiscord<Robyn [She/Her]> In reply to @Elegantbeef "It let's you create": Fair
21:47:56FromDiscord<Robyn [She/Her]> In reply to @Elegantbeef "Think the point was": Aah, isn't Wasm3 still fast for an interpreter?
21:48:40FromDiscord<Elegantbeef> If you feel that, benchmark it
21:49:14FromDiscord<fwsgonzo> I can only recuse myself from that 🙂
21:50:07FromDiscord<fwsgonzo> we really do lack a way to compile directly to a target from inside a program, ignoring TCC
21:50:15FromDiscord<Elegantbeef> The major benefit wasm has over risc-v is it's actively being targeted and supported by compilers
21:50:41FromDiscord<Elegantbeef> risc-v is targeted and supported, but it's userbase is like 3 people and a bird
21:50:58FromDiscord<fwsgonzo> yes, you're kinda forced to target it, especially if you want your language to have a good playground web-app
21:51:55FromDiscord<Elegantbeef> Ponders whether clang can remove everything but the wasm backend
21:52:27FromDiscord<Elegantbeef> Not that it's fast, but if one could strip all the non wasm needed code from clang/llvm it'd debloat it a tinge to ship it
21:53:01FromDiscord<fwsgonzo> some projects ship Zig 🙂
21:54:23FromDiscord<fwsgonzo> but it's grossly practical, it's more techno-dazzling if it's an actual embedded compiler
21:55:12FromDiscord<Elegantbeef> Hey nlvm is only a 40mb appimage 😛
21:55:13FromDiscord<Elegantbeef> No wasi support, but who needs wasi when you're using it for plugins
22:02:17*oprypin_ quit (Quit: Bye)
22:02:28*oprypin joined #nim
22:03:18FromDiscord<Robyn [She/Her]> In reply to @Elegantbeef "If you feel that,": https://github.com/wasm3/wasm3/blob/main/docs/Performance.md I don't need to :)
22:03:37FromDiscord<albassort> In reply to @fwsgonzo "you need a decent": why would you want RISC-V as an internal processing engine?
22:03:45FromDiscord<Robyn [She/Her]> In reply to @Elegantbeef "*Ponders whether clang can": I mean, clang can be compiled to WASM so possibly
22:03:51FromDiscord<albassort> is RISC-V so insanely well designed you should run its entire cpu in your program
22:04:00FromDiscord<albassort> i somehow doubt that physically possible
22:04:55FromDiscord<Robyn [She/Her]> In reply to @albassort "is RISC-V so insanely": Semantics are lower-level and likely can translate a few instructions into whatever would be done on your native platform, probably
22:05:14FromDiscord<albassort> then why not use wasm
22:05:20FromDiscord<albassort> im not understanding the advantage
22:05:26FromDiscord<albassort> or the point at all
22:10:53FromDiscord<Robyn [She/Her]> 🤷‍♀️
22:50:57*jmdaemon quit (Ping timeout: 256 seconds)
22:52:05FromDiscord<Robyn [She/Her]> Oh hey Beef, when I do `getTypeInst` on a variable that used the type alias `ParseResult` (which was `Result[(AstIndex, int), string]`), I couldn't figure out how to get the underlying definition, any clues? This is related to my `unpackIt` macro, I'll post some code now
22:54:46FromDiscord<Elegantbeef> You have to walk the tree
22:55:41FromDiscord<Robyn [She/Her]> What do you mean?
22:55:52FromDiscord<Robyn [She/Her]> `getType` on the tree returned an empty node
22:56:07FromDiscord<Elegantbeef> Well give code I guess
22:59:38FromDiscord<Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=ACoNhlKE
23:00:01*marcus quit (Remote host closed the connection)
23:00:42*marcus joined #nim
23:00:46FromDiscord<Robyn [She/Her]> That's a minimal reproducible example
23:04:08FromDiscord<Elegantbeef> Yea you need to do like `typ.getImpl()` and navigate the tree
23:07:47FromDiscord<albassort> how can i use importc to point to the header and then point to the library file somewhere else
23:09:00FromDiscord<albassort> do i need to passc LD_LIBRARY_PATH=/some/custom/dir
23:09:19FromDiscord<albassort> (passl)?
23:11:08FromDiscord<Elegantbeef> If you're linking using `passL` you do not need to worry about where the library is as long as you do `-LpathToLib`
23:12:55FromDiscord<albassort> like this
23:13:34FromDiscord<albassort> sent a code paste, see https://play.nim-lang.org/#pasty=VpMyTyzb
23:13:41FromDiscord<albassort> (edit) "https://play.nim-lang.org/#pasty=oqkdRUeU" => "https://play.nim-lang.org/#pasty=PLDoDsow"
23:13:53FromDiscord<albassort> (edit) "https://play.nim-lang.org/#pasty=byxtSPqu" => "https://play.nim-lang.org/#pasty=rbHZISsR"
23:13:59FromDiscord<Elegantbeef> Sure
23:14:03FromDiscord<albassort> thank u :)
23:14:08FromDiscord<Elegantbeef> But `-L` takes in a path to where the lib is
23:15:22FromDiscord<albassort> so im getting the impression the header has to have the same name as the library except without the lib
23:15:27FromDiscord<albassort> and also has to be in the dir
23:18:31FromDiscord<Elegantbeef> Nope
23:19:05FromDiscord<Elegantbeef> You can name a header whatever you want as long as the it's in the system path or you provide `-I`
23:19:24FromDiscord<Elegantbeef> Same with `-L` as long as you do `-lmyLibName` you're fine
23:19:38FromDiscord<Elegantbeef> There is absolute include and linking you can do, but those are generally not used
23:20:00FromDiscord<Robyn [She/Her]> In reply to @Elegantbeef "Yea you need to": Aaah okay
23:21:26FromDiscord<Robyn [She/Her]> `typeKind` is `ntyGenericInst`, huh
23:21:39FromDiscord<albassort> In reply to @Elegantbeef "Same with `-L` as": please point me to an example, I don't think I've used headers in this context before
23:21:39FromDiscord<Elegantbeef> Yep welcome to the issue with Nim's typegraph
23:21:42FromDiscord<Robyn [She/Her]> I would've thought it'd be `ntyAlias`
23:21:52FromDiscord<Elegantbeef> Aliases are not aliases if they're generic
23:21:59FromDiscord<Robyn [She/Her]> Uuugh
23:22:09FromDiscord<Elegantbeef> A generic alias is an `tyGenericInst` that points to a `tyGenericInst`
23:22:19FromDiscord<Elegantbeef> Don't worry this causes some types to not be representable!
23:22:28FromDiscord<Elegantbeef> Wait that's a bug not a feature
23:22:49FromDiscord<Elegantbeef> `--passL: "-LsomeLibPath -lmyLibWithoutLibPrefix`
23:23:59FromDiscord<Elegantbeef> `gcc -Iinclude -lnimib ` adds `include` to the include path and links against `libnimib.so` on linux
23:24:15FromDiscord<Elegantbeef> This does not use `-L` so we know the lib is in the system lib path
23:24:24FromDiscord<Robyn [She/Her]> In reply to @Elegantbeef "Don't worry this causes": Really? Eesh
23:24:41FromDiscord<Elegantbeef> Yes Nim's typegraph causes so many issues
23:24:46FromDiscord<Robyn [She/Her]> Why hasn't this been fixed, then? Is it just tricky? Or is it too deeply ingrained in the mess of compiler code?
23:24:56FromDiscord<Elegantbeef> Do I look like Araq?
23:25:04FromDiscord<Robyn [She/Her]> Maybe
23:25:46FromDiscord<albassort> In reply to @Elegantbeef "`--passL: "-LsomeLibPath -lmyLibWithoutLibPrefix`": ahah! yes now that breaks when i typo. Thank you
23:26:08FromDiscord<Elegantbeef> Is this sarcasm
23:28:54FromDiscord<Robyn [She/Her]> Please tell me generic distinct don't have this issue at least?
23:29:02FromDiscord<Robyn [She/Her]> (edit) "distinct" => "distincts"
23:29:19FromDiscord<Elegantbeef> They're either `tyDistinct` that wrap `tyGenericInst` or vice versa
23:34:55FromDiscord<albassort> In reply to @Elegantbeef "Is this sarcasm": one way i debug for issues where a file must be read is to deliberately typo
23:35:17FromDiscord<albassort> if i typo and it continues that means it doesn't care if the file exists or not
23:36:17FromDiscord<Robyn [She/Her]> In reply to @Elegantbeef "They're either `tyDistinct` that": That's not too bad then
23:43:32FromDiscord<Robyn [She/Her]> Making a robust macro is an absolute pain honestly
23:44:05FromDiscord<Elegantbeef> Just load it up with helpful `error` and ensure to copy line information
23:51:29FromDiscord<Robyn [She/Her]> That's what I'm trying to do at least
23:55:10FromDiscord<Robyn [She/Her]> Thanks for the help Beef, got it working :>