<< 05-03-2024 >>

01:35:21FromDiscord<bosinski2023> what can check when a dylib can loaded, but the symbol is not found ? i tried `std/dynlib` and get :↵`dynlib.nim(64) raiseInvalidLibrary↵Error: unhandled exception: could not find symbol: avx2_sadbw_sumbytes [LibraryError]`↵but when i look into the dynlib, i can see the function-symbols ?
01:35:36FromDiscord<bosinski2023> (edit) "what can ... check" added "i"
01:35:45FromDiscord<bosinski2023> (edit) "what can i check when a dylib can ... loaded," added "be"
01:36:14FromDiscord<Elegantbeef> Use the error code to get the OS message
01:36:32FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=KsvOFCAgbMdC
01:36:33FromDiscord<Elegantbeef> Whoops
01:37:37FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=ELTLOSSefbRd
01:41:10FromDiscord<bosinski2023> sent a code paste, see https://play.nim-lang.org/#pasty=tiZefBhPBHHj
01:41:28FromDiscord<Elegantbeef> Why are you echoing the error code?
01:41:30FromDiscord<bosinski2023> (edit) "https://play.nim-lang.org/#pasty=DMkaAPHIABtR" => "https://play.nim-lang.org/#pasty=peexwFRjaoSx"
01:41:45FromDiscord<Elegantbeef> That's pretty much useless
01:42:14FromDiscord<bosinski2023> In reply to @Elegantbeef "Why are you echoing": 'cos that what was in your answer
01:42:24FromDiscord<Elegantbeef> No it's not
01:42:34FromDiscord<Elegantbeef> I got the message for the error code
01:42:46FromDiscord<Elegantbeef> If that error message is quite literally "0" we've got greater problems
01:43:40FromDiscord<bosinski2023> In reply to @Elegantbeef "If that error message": `echo osErrorMsg e.errorCode`does not compile ?
01:44:04FromDiscord<Elegantbeef> https://nim-lang.org/docs/oserrors.html
01:44:15FromDiscord<Elegantbeef> I wouldn't lie to you the code exists
01:54:03FromDiscord<bosinski2023> sent a code paste, see https://play.nim-lang.org/#pasty=cejFiHqLKphj
01:54:41FromDiscord<Elegantbeef> Oh I did lie to you
01:54:47FromDiscord<Elegantbeef> You need to convert it apparently
01:54:56FromDiscord<Elegantbeef> OsErrorCode(e.errorCode)\`
01:56:14FromDiscord<bosinski2023> In reply to @Elegantbeef "OsErrorCode(e.errorCode)\`": thx, that what i´found out, but there is no msg,, its ""
01:56:24FromDiscord<Elegantbeef> Lol
01:56:25FromDiscord<Elegantbeef> Well uhh yea
01:56:36FromDiscord<Elegantbeef> You've got no better information and I don't know how to print more
01:56:40FromDiscord<bosinski2023> In reply to @Elegantbeef "Well uhh yea": so now i'm fucked ?
01:57:39FromDiscord<bosinski2023> the name of the function is "mangled" in the sĺibs symbol-table is appears as "Z19avx2_sumbytes" ?
01:57:56FromDiscord<bosinski2023> (edit) "sĺibs" => "libs"
01:58:25FromDiscord<bosinski2023> (edit) "is" => "it"
01:58:54FromDiscord<Elegantbeef> Are you attempting to import your own Nim library?
01:59:02FromDiscord<bosinski2023> (edit) "the name of the function is "mangled" in the libs symbol-table it appears as "Z19avx2_sumbytes" ? ... " added "should i be worried, i expected `avx2_sumbytes` ?"
01:59:40FromDiscord<bosinski2023> In reply to @Elegantbeef "Are you attempting to": no, i compiled it, but via clang not vieá the compile-pragma..
01:59:51FromDiscord<bosinski2023> (edit) "vieá" => "via"
02:00:35FromDiscord<Elegantbeef> Is it C++ or C?
02:01:02FromDiscord<bosinski2023> In reply to @Elegantbeef "Is it C++ or": cpp but i could make it C - maybe -
02:01:24FromDiscord<Elegantbeef> If you use C++ it likely mangles names
02:04:59FromDiscord<bosinski2023> In reply to @Elegantbeef "If you use C++": i tried to prove the mangled-name with dynlib.checkedSymAddr - not found..#
02:05:05FromDiscord<bosinski2023> (edit) "found..#" => "found.."
02:05:14FromDiscord<bosinski2023> (edit) "prove" => "probe"
02:08:19*LuxuryMode quit (Quit: Connection closed for inactivity)
02:25:16*xet7 quit (Remote host closed the connection)
02:33:12FromDiscord<bosinski2023> In reply to @Elegantbeef "If you use C++": ok, i added a `extern "C"` and i can use the cpp-function. But the probe via `std/dynlib` asking for symbol `_avx2_sumbytes` or `avx_sumbytes` both fail ?
02:33:37FromDiscord<bosinski2023> (edit) "In reply to @Elegantbeef "If you use C++": ok, i added a `extern "C"` and i can use the cpp-function. But the probe via `std/dynlib` asking for symbol `_avx2_sumbytes` or `avx_sumbytes` both ... fail" added " still"
02:39:17*xet7 joined #nim
02:42:55FromDiscord<leorize> I mean, it's in the code?↵(@Robyn [She/Her])
02:43:56FromDiscord<leorize> why would not having enough data a problem?
02:44:03FromDiscord<leorize> just ask them to get more and try again
02:46:13FromDiscord<leorize> did you look at any sans-io library before writing this?
02:46:29FromDiscord<leorize> I think you should learn the general pattern used for those first
02:54:24FromDiscord<Elegantbeef> An intermediate step for any api like this is to just use exceptions and then later replace them with bottled up values for the event
03:02:28FromDiscord<bosinski2023> sent a code paste, see https://play.nim-lang.org/#pasty=JOONjQEkLCoC
03:03:09FromDiscord<Elegantbeef> You can write a macro to process the AST in any direction you want
03:03:14FromDiscord<Elegantbeef> Aslong as the macro gets the AST you want
03:05:19FromDiscord<bosinski2023> In reply to @Elegantbeef "Aslong as the macro": hmm, not sure i understand this one 🙂 i can identify a fn that come from 'intrinsic.h' and i would mark the hot-loop, where i want to replace my fns - with a user-defined pragma. Does that ake sense ?
03:05:32FromDiscord<bosinski2023> (edit) "come" => "comes"
03:05:43FromDiscord<bosinski2023> (edit) "the" => "my"
03:05:53FromDiscord<bosinski2023> (edit) "ake" => "make"
03:13:29FromDiscord<Elegantbeef> You can inspect the procedure so you could
03:13:51FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=CgZFheuubEda
03:13:55FromDiscord<Elegantbeef> `import std/macros`\
03:21:22FromDiscord<bosinski2023> sent a code paste, see https://play.nim-lang.org/#pasty=FdyvLRfZgJiJ
03:21:44FromDiscord<Elegantbeef> If you use a typed macro yes
03:22:30FromDiscord<bosinski2023> In reply to @Elegantbeef "If you use a": great, i'll look in the docs for 'typed macro'
03:26:36FromDiscord<bosinski2023> ..
03:28:27FromDiscord<Elegantbeef> You will always have to have a macro above your code
03:30:34FromDiscord<bosinski2023> In reply to @Elegantbeef "You will always have": i'd mark the fn with a macro or maybe a block where the replacement shall happen ? but `loadI` is just a overload - and i want to revert it into the 'intrinsic'-form..
03:31:08FromDiscord<bosinski2023> (edit) "replacement" => "replacements" | "'intrinsic'-form.." => "'intrinsic'-form..↵is that 'above your code' ?"
03:31:39FromDiscord<bosinski2023> (edit) "In reply to @Elegantbeef "You will always have": i'd mark the fn with a macro or maybe a block where the replacements shall happen ? but `loadI` is just a overload - and i want to revert it into the 'intrinsic'-form..↵is that ... 'above" added "what u mean by"
03:31:42FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=SAfkufdOAnhD
03:32:35FromDiscord<bosinski2023> In reply to @Elegantbeef "I mean you'd have": yes, exactly - and the macro then sees the nim-code in the block and can do the substitutions..
03:42:47*krux02 quit (Remote host closed the connection)
03:46:25FromDiscord<Elegantbeef> https://play.nim-lang.org/#pasty=NbnxDmBFvTUp to set you up for success 😛
04:03:14FromDiscord<bosinski2023> sent a long message, see https://pasty.ee/FBismyHYMKhr
04:04:26FromDiscord<bosinski2023> (edit) "https://pasty.ee/uJVMenPqQaqr" => "https://pasty.ee/IiRNLVwwOPaL"
04:08:32*hernan quit (Read error: Connection reset by peer)
04:08:47*hernan joined #nim
05:15:26*Epsilon left #nim (#nim)
06:03:37*advesperacit joined #nim
06:19:56*rockcavera quit (Remote host closed the connection)
06:43:50*azimut quit (Ping timeout: 260 seconds)
07:04:36FromDiscord<ezquerra> sent a code paste, see https://play.nim-lang.org/#pasty=mxeKYGVlhaKS
07:11:25FromDiscord<Elegantbeef> You need to use `wasMoved` int 2.0
07:11:54FromDiscord<Elegantbeef> wasMoved zeros and destructors destroy
07:17:00FromDiscord<ezquerra> So insated of `storage.memalloc = nil` I should do `wasMoved(storage.memalloc)`? Can you point me to some docs that explain it?
07:17:40FromDiscord<ezquerra> (edit) "insated" => "instead"
07:18:11FromDiscord<Elegantbeef> Look at the destructor docs
07:18:11FromDiscord<Elegantbeef> there is a `=wasMoved` hook now
07:18:15FromDiscord<Elegantbeef> That's what you 0 memory with in 2.0
07:18:46NimEventerNew thread by sls1005: Artificial AST, see https://forum.nim-lang.org/t/11148
07:19:29FromDiscord<ezquerra> Ah, so you mean that I should do a `when (NimMajor, NimMinor, NimPatch) >= (2, 0, 0)` and in it declare a wasMoved instead of a =destroy, which should remain in the else clause of the when, right?
07:19:40FromDiscord<Elegantbeef> You declare both
07:19:44FromDiscord<Elegantbeef> `=wasMoved` zeros
07:19:49FromDiscord<Elegantbeef> `=destroy` destroys
07:21:19FromDiscord<ezquerra> OK, thank you, I'll read the docs. So far I've been adding features to arraymancer that build on top of its core. This is the first time I've gone a bit deeper so I don't really know this code yet 😅
07:21:42FromDiscord<ezquerra> I'll ask again later if I need it 🙂
07:41:56FromDiscord<morgan> sent a code paste, see https://play.nim-lang.org/#pasty=tHChdFDzaFXX
07:42:33FromDiscord<morgan> it goes away if i comment out the const define
07:45:12FromDiscord<Elegantbeef> There is no way to instantiate that generic
07:46:08FromDiscord<morgan> yeah i was guessing it was something like that
07:46:32FromDiscord<Elegantbeef> Why do you not just do `cstring"clap.audio-ports"` or make a proc like `myStr` that takes a `static string` and ensures it's \<= 16 bytes
07:48:06FromDiscord<morgan> oh i guess i could unpointer a cstring
07:48:30FromDiscord<Elegantbeef> I mean you can do `proc myStr(s: static string): array[16, char]`
07:48:54FromDiscord<Elegantbeef> then you can do `myStr"...."` and emit `['.', '.', '.', '.', '\0', ....]`
07:50:19FromDiscord<morgan> oh fancy
10:39:25FromDiscord<A2> I'm having trouble using `--mm:orc` or `--mm:arc` in combination with the C++ backend (nim 1.6)↵↵Is this a known unsupported feature? Anyone know of a trick to make it work?
10:39:57FromDiscord<A2> I want to use ORC or ARC because I want to use [this](https://github.com/nim-lang/threading) channels implementation.↵↵I can explain more about why if anyone is curious... but I guess that is enough information to talk about my C++ / ORC problem
10:51:12FromDiscord<A2> 🤦 setting `--exceptions:cpp` in addition to `--backend:cpp` fixes it
10:51:18FromDiscord<A2> thanks 🦆
12:27:11FromDiscord<MDuardo> How do you build and run a project in Nimble?↵I read the docs and I believe I'm doing something wrong
12:28:09FromDiscord<MDuardo> Have never used Nimble to build something, all my projects were made with loose files
12:29:27FromDiscord<nnsee> In reply to @MDuardo "How do you build": well, what exactly are you doing?
12:29:36FromDiscord<odexine> nimble build doesnt work?
12:30:51FromDiscord<nnsee> sent a code paste, see https://play.nim-lang.org/#pasty=jDFVtYFQKiXN
12:31:12FromDiscord<nnsee> and a corresponding `src/fastcube.nim` file that gets built when I do `nimble build`
12:33:13FromDiscord<MDuardo> Throws me an error↵(@odexine)
12:33:59FromDiscord<MDuardo> But even in the default Nimble template doesn't work, haven't changed anything
12:34:08FromDiscord<nnsee> what error exactly?
12:35:46FromDiscord<MDuardo> Wait, I managed to fix it↵Just renamed the folder
12:36:03FromDiscord<MDuardo> The folder can't be named Nim?
12:37:54FromDiscord<nnsee> ah yes
12:37:57FromDiscord<nnsee> no, it can't
12:49:47FromDiscord<MDuardo> At first I was thinking "it doesn't have any sense" but now I get it
13:10:47*azimut joined #nim
13:22:34*krux02 joined #nim
13:37:51NimEventerNew Nimble package! sat - A SAT solver written in Nim., see https://github.com/nim-lang/sat
14:27:57NimEventerNew Nimble package! cppconst - Nim wrapper for C++ const-qualified types., see https://github.com/sls1005/nim-cppconst
14:27:57NimEventerNew Nimble package! nimAdif - An Amateur Data Interchange Format (ADIF) formatter and parser., see https://github.com/clzls/nimAdif
14:30:51*disso-peach joined #nim
14:42:30FromDiscord<Robyn [She/Her]> In reply to @leorize "just ask them to": I did, but also this is enough data
14:42:47FromDiscord<Robyn [She/Her]> In reply to @leorize "did you look at": I did not, I should probably look at those
15:23:39*ntat joined #nim
15:44:59*krux02 quit (Quit: Leaving)
16:20:41*derpydoo joined #nim
16:44:18*rockcavera joined #nim
16:48:14*tiorock joined #nim
16:48:14*rockcavera quit (Killed (zinc.libera.chat (Nickname regained by services)))
16:48:14*tiorock is now known as rockcavera
16:52:56*rockcavera quit (Ping timeout: 260 seconds)
16:53:15*rockcavera joined #nim
17:15:17*tiorock joined #nim
17:15:17*tiorock quit (Changing host)
17:15:17*tiorock joined #nim
17:15:17*rockcavera is now known as Guest8214
17:15:17*Guest8214 quit (Killed (silver.libera.chat (Nickname regained by services)))
17:15:17*tiorock is now known as rockcavera
17:17:29*tiorock joined #nim
17:17:29*tiorock quit (Changing host)
17:17:29*tiorock joined #nim
17:17:29*rockcavera quit (Killed (zinc.libera.chat (Nickname regained by services)))
17:17:29*tiorock is now known as rockcavera
17:22:47FromDiscord<treeform> In reply to @heysokam "why would treeform use": Its probably speed, I don't know in that use case, but Nim has significant function call overhead (See: https://github.com/nim-lang/Nim/issues/23347 ) Basically after every function call it does a thread safe if branch, which is very slow on windows with gcc. Because vmath is used in very tight loops, i should probably make every function call a template call instead.
17:23:51FromDiscord<treeform> In reply to @toma400 "Yeah, I used exactly": I am glad you like it. Thanks!
17:28:42FromDiscord<treeform> In reply to @alex.boisvert "I'm using the jsony": JavaScript strings are actually utf16 not utf8, maybe you have some conversion issue? You usually have to re-encode a js string into a nim string and can't just cast it.
17:33:06*rockcavera quit (Remote host closed the connection)
17:33:27FromDiscord<treeform> In reply to @A2 "Anyone have experience with": mummy web server also has first class support for web sockets.
17:35:03*fallback quit (Remote host closed the connection)
17:50:26*rockcavera joined #nim
18:06:34*derpydoo quit (Quit: derpydoo)
18:24:02FromDiscord<Robyn [She/Her]> Should my API return the amount of bytes read from a given array? Hm...
18:33:29FromDiscord<Robyn [She/Her]> The langserver is saying `undeclared field: 'isErr' for type io.Result [type declared in /home/chronos/Projects/ModernNet/src/modernnet/io.nim(27, 3)]nim(nimsuggest chk)` even though the code is completely valid since that's a template I implemented, even after a restart and killing the langserver + nimsuggest a few times...
18:57:48*tc424 quit (Quit: ZNC - http://znc.in)
18:58:02*tc424 joined #nim
19:02:39FromDiscord<morgan> sent a code paste, see https://play.nim-lang.org/#pasty=mNRDvvGpVqLl
19:03:09FromDiscord<morgan> it's erroring on the get proc on the last line
19:03:26FromDiscord<morgan> (edit) "proc" => "member variable"
19:04:58FromDiscord<leorize> yes↵(@Robyn [She/Her])
19:06:46FromDiscord<Robyn [She/Her]> In reply to @leorize "yes (<@524288464422830095>)": Oh I can't find any example implementations of sans-io, I was trying to look for a small lib that implements it, do you have any libraries you'd recommend me to look at?
19:07:01FromDiscord<Robyn [She/Her]> I know curious and h4 implement in Python I believe, but they seem pretty big,
19:07:03FromDiscord<Robyn [She/Her]> (edit) "big," => "big"
19:17:15*fallback joined #nim
19:21:51*derpydoo joined #nim
19:31:52FromDiscord<aintea> sent a code paste, see https://play.nim-lang.org/#pasty=yKAXAWcmaHhi
19:32:07FromDiscord<aintea> (edit) "https://play.nim-lang.org/#pasty=rgrzBrOVQbIz" => "https://play.nim-lang.org/#pasty=aOHIepWLDewB"
19:34:55FromDiscord<morgan> In reply to @morganalyssa "so i'm not very": i am confused↵> A subtle issue with procedural types is that the calling convention of the procedure influences the type compatibility: procedural types are only compatible if they have the same calling convention. As a special extension, a procedure of the calling convention `nimcall` can be passed to a parameter that expects a proc of the calling convention `closure`.
19:35:14FromDiscord<demotomohiro> In reply to @aintea "Hey, I have this": Probably it is a bug in Nim compiler.
19:35:50FromDiscord<aintea> Should I fill an issue on the github ?
19:37:05FromDiscord<demotomohiro> In reply to @morganalyssa "i am confused >": I tried to explain about calling convention: https://internet-of-tomohiro.netlify.app/nim/faq.en.html#procedures-what-is-a-calling-conventionqmark
19:38:36FromDiscord<demotomohiro> In reply to @aintea "Should I fill an": If you get still an error on devel Nim and there is not issue related to the error.
19:39:31FromDiscord<morgan> sent a code paste, see https://play.nim-lang.org/#pasty=iVngKpecCeMx
19:39:35*ntat quit (Quit: Leaving)
19:41:38*rockcavera quit (Remote host closed the connection)
19:42:37FromDiscord<demotomohiro> In reply to @morganalyssa "ok ill check it": It is not a problem of calling convention. type of `info` parameter is different.
19:43:20FromDiscord<morgan> ah
19:43:39FromDiscord<morgan> good catch
19:44:06FromDiscord<morgan> that fixed it
19:45:32FromDiscord<demotomohiro> You better to understand about calling convension if you are using C library and targets 32bit windows.
19:46:00FromDiscord<morgan> i don't think im going to bother supporting 32 bit anything
19:49:04FromDiscord<saffage> In reply to @aintea "Hey, I have this": `Stack[T].none` returns a value of type `Option[Stack[T]]`, not a type
19:50:29FromDiscord<demotomohiro> If you assign wrong calling convention, it is undefined behavier.↵But your program might works correctly even if you assing wrong calling convention on some platforms that uses single calling convention.
19:54:45FromDiscord<demotomohiro> In reply to @saffage "`Stack[T].none` returns a value": That is because `none` is a procedure return a value.
19:55:05FromDiscord<saint.___.> @morgan Are you wrapping CLAP with nim?
19:55:33FromDiscord<morgan> yes
19:56:03FromDiscord<morgan> i was going to wrap cplug but i decided it would be easier to wrap clap and use the existing c++ clap wrappers
19:56:13NimEventerNew thread by mszs: Mutation testing based on macros?, see https://forum.nim-lang.org/t/11159
19:56:26FromDiscord<saffage> In reply to @demotomohiro "That is because `none`": yes, so you can't it for type definition
19:56:37FromDiscord<saffage> (edit) "In reply to @demotomohiro "That is because `none`": yes, so you can't it for ... type" added "a"
19:57:13FromDiscord<saint.___.> In reply to @morganalyssa "i was going to": This is awesome!
19:57:32FromDiscord<saint.___.> Is clap hard to figure out? I'm looking at it right now seems a bit complicated
19:57:39FromDiscord<saint.___.> but I'm sure it's easier than VST
19:57:54*rockcavera joined #nim
19:58:49FromDiscord<saint.___.> Are you talking about https://github.com/Tremus/CPLUG
19:58:51FromDiscord<morgan> well i've been going thru the example plugin, and implementing types as i need them
19:58:53FromDiscord<morgan> and yes
19:58:56FromDiscord<morgan> that cplug
19:59:01FromDiscord<saint.___.> Gotcha
19:59:35FromDiscord<saint.___.> Youre using futhark?
19:59:41FromDiscord<morgan> yep
20:00:04FromDiscord<saint.___.> Oh wait clap is c++ right
20:00:06FromDiscord<morgan> the thing that turned me off from cplug was needing to use objective c for au and mac standalone. which i could do, but it's more work, and i think i could do all that without it but i don't know that stuff well enough to try
20:00:10FromDiscord<morgan> clap seems to be c
20:00:10*junaid_ joined #nim
20:00:47FromDiscord<saint.___.> Oh cool
20:00:56FromDiscord<saint.___.> So futhark should take care of most of the stuff for you
20:01:56FromDiscord<morgan> yea i just want to have ide errors and autocomplete and some sort of arrays instead of pointers, cstring instead of char pointers, etc
20:02:27FromDiscord<morgan> futhark only defines something if you haven't already, so you can write nicer defs
20:02:54FromDiscord<morgan> i have about 300 lines of defined stuff so far
20:08:19*om3ga quit (Ping timeout: 246 seconds)
20:21:35*derpydoo quit (Quit: derpydoo)
20:49:42FromDiscord<morgan> ok so i want to avoid having a plain `pointer` for the later user declared type which im pretty sure is where saved state would go. i'm trying to set up a forward declaration, but it doesn't seem to be working. i can't find any example of it being used for an object
20:52:23FromDiscord<morgan> sent a code paste, see https://play.nim-lang.org/#pasty=XifRzhWKPNlf
20:52:46FromDiscord<morgan> but with roughly that i get an error about redefining it
21:04:48*junaid_ quit (Remote host closed the connection)
21:12:33FromDiscord<Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=DklXKZphspUE
21:12:41FromDiscord<morgan> damn
21:21:50FromDiscord<morgan> In reply to @chronos.vitaqua "You can't forward declare": i tried doing it with a generic, but i have to declare a version that ends with a T because that's what it's called in c and what futhark is checking if it exists, and a version without because i don't want to have a T at the end of every type i use. and it seemed to work on the T version but i got an error with the alias
21:23:29FromDiscord<Robyn [She/Her]> Fair, not sure how I could help so sorry
21:24:24FromDiscord<morgan> https://media.discordapp.net/attachments/371759389889003532/1214684966223478814/image.png?ex=65fa0287&is=65e78d87&hm=fe54873f56032ffaf1a0af21500be0e140a936851a23d2e0fb7da0b402a96a84&
21:27:54FromDiscord<Robyn [She/Her]> In reply to @morganalyssa "": How would that help at all?
21:28:10FromDiscord<Robyn [She/Her]> That's still making you provide a generic to it
21:28:46FromDiscord<morgan> i could do ClapPlugin[MyPluginDataType]
21:29:02FromDiscord<morgan> forward declared types would really be the best solution tho
21:29:13FromDiscord<Robyn [She/Her]> You'd do something like `ClapPlugin = ClapPluginT[MyPlugin]` in the file that defines `MyPlugin` probably, byt cyclic imports aren't allowed in Nim
21:29:24FromDiscord<Robyn [She/Her]> (edit) "byt" => "but"
21:29:47FromDiscord<Robyn [She/Her]> Hey termer, are you here? I'm looking at `methttp` but not sure how a statically allocated http request object would work in a multithreaded environment
21:30:31termer你好
21:30:41termerevery thread has stack memory, yeah?
21:30:48termerstatic doesn't mean global
21:30:53FromDiscord<Robyn [She/Her]> I'd imagine so
21:30:55*def- quit (Quit: -)
21:31:28*def- joined #nim
21:31:37termeryou can just put it on the stack and make sure it's still alive when you're using it
21:31:58termerit's not really ready for production though, just so you know
21:32:01FromDiscord<Robyn [She/Her]> I'm not sure how that'd work with `cps` if there's multiple requests
21:32:23termerso you have a loop per accepted connection, with the request object before the loop
21:32:27termerhold on'
21:32:44FromDiscord<Robyn [She/Her]> In reply to @termer "it's not really ready": Yeah that's fair, might just inspiration from your library even if I don't use it though
21:32:52FromDiscord<Robyn [She/Her]> In reply to @termer "hold on'": Alright
21:34:29*def- quit (Client Quit)
21:34:44termerhttps://git.termer.net/termer/nim-sys-fun/src/branch/master/src/nim_sys_fun.nim
21:35:19termerrequest and response object per connection handler
21:35:21FromDiscord<huantian> In reply to @morganalyssa "": i have no idea how to help but music plugins in nim sounds cool
21:35:26termerafter each request, both objects are reset
21:35:28FromDiscord<Robyn [She/Her]> Gitea instance 👀
21:35:43termerMy gitea is for the things that aren't portfolio and for private code
21:35:48termerand mirrors
21:35:49FromDiscord<Robyn [She/Her]> Fair
21:35:52termerbask in the glory
21:35:53*def- joined #nim
21:42:11FromDiscord<Robyn [She/Her]> Okay I think this makes some sense to me, thanks! What do you mean when you say `methttp` isn't production ready? Any bugs? Or is it just untested?
21:46:27FromDiscord<Robyn [She/Her]> Ah also termer, your library structure isn't correct, you should put `http_` into the `src/methttp` folder
21:46:44FromDiscord<Robyn [She/Her]> Probably should delete `methttp.nim` too
21:48:40termerthe lib isn't correct cause I just put shit I was working on in a folder in the lib and on git to have it there
21:48:41termerit's not done
21:49:07termerThere's one problem with the parser right now, which is that it doesn't accept all valid header values
21:49:12FromDiscord<Robyn [She/Her]> Yeah fair enough
21:49:18termerneed to fix the stuff it checks for
21:49:30FromDiscord<Robyn [She/Her]> In reply to @termer "There's one problem with": Ah fair enough
21:49:39termerotherwise, it's "production-ready", just incomplete
21:50:00termerI'll consider it ready for actual use when it has a chunked body and multipart body parser, and also a response parser
21:50:16termerright now it's just benchmark fodder
21:50:25termerwhich is fine, it does run really fast
21:51:18*azimut quit (Remote host closed the connection)
21:51:23FromDiscord<Robyn [She/Her]> Fair, let me know when it is complete, I'm interested in it aha
21:51:51*azimut joined #nim
21:52:35termerwill do
21:52:44termerby the way, you should join the nimworks channel on Matrix or IRC
21:53:06termerCPS draft just got added to the 'skull compiler
21:53:08termerexciting stuff
21:55:35FromDiscord<Robyn [She/Her]> In reply to @termer "by the way, you": I'm already there I believe! Definitely in the cps channel
21:55:42termeraha
21:55:45FromDiscord<Robyn [She/Her]> In reply to @termer "CPS draft just got": Oh? What does that mean?
21:55:57termerIt means coroutines in the lang without macro
21:56:25termerwhich is something I've been wishing Nim would do for as long as I've known about CPS
21:56:30FromDiscord<Robyn [She/Her]> I did join the nimworks channel and was following Nimskull's development, but I like the changes Nim is doing and would rather follow that for now
21:56:45termerrace to IC
21:56:58FromDiscord<Robyn [She/Her]> In reply to @termer "It means coroutines in": So the functions that transforms Nim's AST to continuations is gone? Hm
21:57:00termerthere is no race to CPS though since only one party seems to care about async
21:57:04FromDiscord<Robyn [She/Her]> In reply to @termer "race to IC": Lol
21:57:21FromDiscord<Robyn [She/Her]> In reply to @termer "there is no race": Yeah, since I found out about cps it definitely seems a bit nicer than async
21:57:36termerI mean, async as in concurrency without threads
21:57:39termernot async/await
21:57:46termerAnd yeah, the transformation macro will no longer be needed when the draft is finalized
21:57:51termerit'll be built into the lang
21:58:10termerkind of like how Rust has async/await built into the lang but the runtime you use is up to you
22:03:06termerAlso, has anyone else dealt with nimsuggest crashes with the new tooling?
22:03:24termerIt's been really inconsistent for me, crashing often and not automatically restarting until I restart VSCode
22:11:55FromDiscord<Elegantbeef> supposedly choosenim can cause issues atleast with zombie processes
22:26:56FromDiscord<Robyn [She/Her]> In reply to @termer "I mean, async as": Yeah I know
22:27:12termerElegantbeef How so
22:27:22FromDiscord<Robyn [She/Her]> In reply to @termer "And yeah, the transformation": I wonder if cps will still be maintained for Nim
22:27:40FromDiscord<Robyn [She/Her]> In reply to @termer "Elegantbeef How so": Choosenim uses proxy binaries which mess stuff up for some reason
22:27:42termerProbably not in the longrun
22:27:49FromDiscord<Robyn [She/Her]> There's a GitHub issue tracking that on the repo J believe
22:27:52FromDiscord<Robyn [She/Her]> I believe
22:27:56termerit has a long history of being held back by compiler bugs in nim
22:28:06termerbut someone may maintain it separately
22:35:41FromDiscord<Robyn [She/Her]> Makes sense
22:36:07FromDiscord<Robyn [She/Her]> My only reason I wouldn't want to move to Nimskull is you'd lose support for a lot of Nim libraries
22:36:30FromDiscord<Robyn [She/Her]> Which is an issue when Nim doesn't have much of an ecosystem anyway
22:37:05termerI almost never use Nim libs in my stuff lol
22:37:13termerat least not a lot
22:38:08termerI think most libs would be easy to port
22:39:21FromDiscord<Robyn [She/Her]> They probably would yeah
22:39:39FromDiscord<Robyn [She/Her]> In reply to @termer "I almost never use": I do when I can to avoid duplication of work
22:39:58FromDiscord<Robyn [She/Her]> Hm, maybe I should keep up with Nimskull again, just really wish there was a discord bridge :p
22:42:24FromDiscord<zumi.dxy> I should probably try that↵have they ported ARC/ORC or are they sticking with refc?
22:43:18termerThey're using ARC and ORC
22:43:23termerthey removed refc if I remember correctly
22:43:29termerthey definitely removed the other GCs
22:43:34FromDiscord<zumi.dxy> ah↵cool, cool
22:43:43FromDiscord<zumi.dxy> Even `none`?
22:43:49termerProbably not
22:44:00termerTheir current big goal is to slim down the lang and create a specification and improve tests
22:44:11FromDiscord<zumi.dxy> Is their stdlib more `none`-friendly?
22:44:19termerNo, but why would you want to use that anyway
22:44:21termeruse ARC instead
22:44:25FromDiscord<girvo> In reply to @termer "Their current big goal": Once they get there, I'm interested.
22:44:44FromDiscord<girvo> And yeah even on constrained embedded targets `none` is a waste of time
22:44:44termergirvo Progress is being made, but it's gradual and hard to track
22:45:03termer`none` is basically "I want to write C again"
22:45:09termerwhich nobody using Nim says
22:45:14FromDiscord<zumi.dxy> In reply to @girvo "And yeah even on": I mean I did get `arc` to work on constrained hardware
22:45:27FromDiscord<girvo> In reply to @termer "which nobody using Nim": Amusingly, including the C programmers we hired and taught to use Nim
22:45:39termersounds about right
22:45:58FromDiscord<zumi.dxy> In reply to @termer "which nobody using Nim": but then we shouldn't be advertising "GC optional" then :p
22:46:06termerARC isn't a GC
22:46:13termerthat's why they changed the compiler switch from gc to mm
22:46:19termerARC is basically what Rust does
22:46:21FromDiscord<girvo> Tbh I agree with that haha. I know the argument that ARC isn't a gc, but still
22:46:35FromDiscord<zumi.dxy> Well, the term "GC" itself has baggage
22:46:36termerbut yeah, advertising GC-optional is misleading
22:46:41FromDiscord<girvo> True on all fronts
22:46:44FromDiscord<girvo> GC is a wonky term
22:46:52FromDiscord<zumi.dxy> stack is a form of GC if you think about it
22:47:07FromDiscord<zumi.dxy> but too bad in most people's minds GC == java or go GC
22:47:09termerCollect implies collecting things actively, usually in quantities of more than 1
22:47:21termerThe implication is a runtime that finds things and deallocates them
22:47:25FromDiscord<Robyn [She/Her]> So termer, are you mostly using Nimskull then? Or do you still use Nim?
22:47:33termerusing Nim still right now
22:47:48termerworking with skull a little though
22:47:51FromDiscord<zumi.dxy> I do wonder how exactly 'skull will differ from nim
22:48:05termerread its github, it explains its vision pretty well
22:48:19termerbasically it wants to be more narrow in scope and have a spec
22:48:44termerOne of Nim's major handicaps from the skull perspective is that it has a million undocumented, half-baked features
22:48:53FromDiscord<zumi.dxy> they've even endeavoured to clean up the commit logs
22:48:54FromDiscord<Robyn [She/Her]> In reply to @termer "working with skull a": Fair
22:49:18termerWhen I have a bit more time, I'll start contributing to skull
22:49:26FromDiscord<Robyn [She/Her]> Fair
22:49:37termeras far as I'm concerned, the only way I can justify using a lang with even fewer users than Nim is to be able to maintain parts of it myself if I need to
22:49:52FromDiscord<zumi.dxy> I do hope it doesn't fall victim to design by committee↵then again that's probably not a guarantee that "not designed by committee == consistent"
22:50:54FromDiscord<Robyn [She/Her]> In reply to @termer "as far as I'm": Understandable
22:51:03termerthere are only a handful of people who work on the compiler and make decisions about it right now, and its direction is pretty good
22:51:37FromDiscord<morgan> In reply to @termer "as far as I'm": yeah ages back i used a lang with probably only a few active users, and eventually the only person working on it, since it was not bootstrapped and written in a lang i didn;t know, they stopped working on it and i got burnt out
22:51:41termerit seems like each person working on it is an expert in the part that he's working on
22:51:56FromDiscord<morgan> i wrote a half baked package manager for that lang because it did not have one
22:52:16termerIt's a big gamble to work in a niche lang
22:52:20FromDiscord<morgan> and i think part of why i got burnt out is it felt like i was doing a ton of work that nobody would ever use
22:52:25termerNim is luck to have hooked Status lol
22:52:33termer*is lucky
22:52:46termermorgan The way I see it, it's experience that's portable
22:52:51FromDiscord<morgan> nim has active users, and has active devs from what i can tell, it's doing much much better than that lang
22:52:52FromDiscord<morgan> oh for sure
22:53:26termerNim could be doing much much better if it actually chose a direction to go
22:53:27FromDiscord<morgan> i picked nim to learn because i wanted something similar, since that lang was kinda like a wrapper around c, with powerful macro stuff
22:53:37FromDiscord<morgan> yea
22:53:37termerit's so good it managed to get a lot of people using it without a proper specialization
22:53:40termerthat says something
22:53:44termerso it could do way better
22:53:59FromDiscord<zumi.dxy> I wonder if OpenD will have similar work done to it as Skull does
22:54:08FromDiscord<morgan> i think part of it is getting a big player involved, like rust has mozilla
22:54:16termerDefinitely
22:54:19FromDiscord<morgan> that basically forces a bunch of people to use it and contribute to it
22:54:25FromDiscord<morgan> and makes it more relevant to others
22:54:42termerRust's whole safety idea was new though, and the people using it and the foundation managed to market the hell out of it
22:54:48FromDiscord<Robyn [She/Her]> I wonder if Nimskull will do that
22:54:56termerBlazingly fast (as fast as C++, more or less)
22:54:59FromDiscord<zumi.dxy> And relentless evangelism :p
22:55:12FromDiscord<morgan> (edit) "stuff" => "stuff. and because python was an early lang in all that i've used, so the syntax really works well for me"
22:55:21FromDiscord<zumi.dxy> so much so that when people think memory safe, they think of rust now
22:55:27termertalking about """language speed""" is pretty retarded unless you're dealing with scripting langs anyway lol
22:55:28FromDiscord<morgan> yea
22:55:43FromDiscord<zumi.dxy> "the other options (with GC!!) suck so we'll forget about them"
22:55:47termerMemory-safe, blazingly fast... what else could a developer ask for??
22:55:55FromDiscord<morgan> i think the most important speed is the speed of naively written code
22:56:13termerThe most important speed is cocaine, but nobody likes to talk about that
22:56:18FromDiscord<zumi.dxy> > what else could a developer ask for??↵↵B u s t l i n g c o m m u n i t y
22:56:30termer*Vibrant, inclusive community
22:56:34FromDiscord<zumi.dxy> one that reaches critical mass so quickly
22:56:45FromDiscord<morgan> like if it's 4 am and you're half asleep, whatever comes to mind then, rather than something you spend weeks tweaking, that's the important speed metric imo
22:57:01FromDiscord<zumi.dxy> and when it gets to critical mass, the term I like to use is "Cool Now"
22:57:08termerit's really disappointing how much a compiler's optimizer does for speed
22:57:10FromDiscord<morgan> like assembly is very fast but it's so much harder to write that it's not feasible
22:57:13FromDiscord<zumi.dxy> anything can happen when something becomes "Cool Now"
22:57:26FromDiscord<girvo> I agree with the bulk of the decisions they've made so far, so it's promising
22:57:27termerassembly can be plenty slow if you don't know how to write good logic lol
22:57:35FromDiscord<morgan> well yea
22:58:24termergirvo "I agree with the bulk of the decisions they've made so far, so it's promising" Rust or Skull?
22:58:36FromDiscord<girvo> Skull
22:58:41FromDiscord<girvo> Rust I'm the opposite lol
22:58:58FromDiscord<girvo> At least wrt. decisions in the last couple years
22:59:33FromDiscord<Robyn [She/Her]> Rust is kinda something you have to force yourself to like until it's genuine imo
22:59:41FromDiscord<morgan> sent a long message, see https://pasty.ee/RuZjaukAmRmR
22:59:45FromDiscord<zumi.dxy> I chose Nim because its code feels plenty readable without a bunch of overhead↵Lot of into(), unwrap(), etc. etc.
22:59:48termerYeah I really like the direction Skull is going, and its intermediate representation should be working in a few weeks
22:59:58FromDiscord<zumi.dxy> (edit) "overhead↵Lot" => "overhead↵Doesn't have a lot"
23:00:06termerinto is kicking my ass right now, I'm not used to functional casts basically
23:00:10FromDiscord<girvo> Basically once Hoare left, they started down paths that I think are silly -- but then I also understand why they made them
23:00:13FromDiscord<girvo> https://graydon2.dreamwidth.org/307291.html
23:00:21FromDiscord<zumi.dxy> I have given NIR a spin recently↵it was interesting
23:00:27termeralso I wanna kill anyone who uses unwrap when pattern matching should be used
23:00:35FromDiscord<zumi.dxy> Curious to see what skull's IR looks like
23:00:36termerso much software crashing because of lazy devs
23:00:51FromDiscord<zumi.dxy> In reply to @termer "also I wanna kill": sometimes you don't actually want safe nulls ;)
23:00:54FromDiscord<Robyn [She/Her]> In reply to @zumi.dxy "I chose Nim because": I originally chose Nim because I was a Python dev who wanted to branch out and disliked the other langs, Nim was a blessing :P
23:01:00FromDiscord<Elegantbeef> It's called MIR like the space station 😄
23:01:28FromDiscord<zumi.dxy> and yeah Nim, "quite pythonic"↵but it's clear that it's much more than Python
23:01:37termerdidn't the original proposal acronym for NIR look like a funny word
23:01:42termerI vaguely remember this on an RFC
23:01:47FromDiscord<zumi.dxy> like I said Nim tricked me into using basically Pascal lmao
23:01:51FromDiscord<morgan> i considered learning rust years ago, but i wanted to use it to write audio plugins, and there was no library which could do it for audio unit, i didn't want to write c++. then i contributed to surge and got somewhat numb to the pain of writing c++. and it was raw opengl that made me say screw juce lol
23:02:02FromDiscord<zumi.dxy> In reply to @termer "didn't the original proposal": It's got a G in it lmao
23:02:10FromDiscord<Elegantbeef> I don't know if funny how I'd describe it
23:02:12termerok I wasn't dreaming
23:02:15FromDiscord<Elegantbeef> is how\
23:02:18FromDiscord<Robyn [She/Her]> Yeah, I remember struggling with shifting myself away from classes and using Nim's style of OOP↵(@zumi.dxy)
23:02:29FromDiscord<Robyn [She/Her]> I struggle with changing how I think for some reason
23:02:30FromDiscord<Elegantbeef> Imagine using OOP
23:02:35FromDiscord<zumi.dxy> UFCS spoils me
23:02:37termerThe circumstance and the resulting comment sure was funny
23:02:48FromDiscord<Elegantbeef> Robyn's a boomer confirmed
23:03:01FromDiscord<zumi.dxy> if people want a language that "changes the way I think about programming", well there you go
23:03:05termerI was was done with OOP pretty quickly
23:03:08termertired of that shit
23:03:25FromDiscord<Elegantbeef> Yea just use traits and have slower code!
23:03:31termermorgan I recently switched from Go to Rust for a network thingy
23:03:40FromDiscord<Elegantbeef> Fucking hell I hate that Nim's OOP beats traitor's dispatch
23:03:41FromDiscord<zumi.dxy> the separation of proc and func is also made pretty clear to me since then↵even if I mostly just use proc
23:03:42termerwait, what's slow about traits Elegantbeef
23:03:55FromDiscord<Robyn [She/Her]> Nope, just probably an undiagnosed autistic, if my friends pestering me about getting tested unironically says anything
23:04:05termerThey don't use dynamic dispatch, at least in Rust, unless you need runtime polymorphism
23:04:15FromDiscord<Elegantbeef> Jesus robyn I made a joke I don't need your whole medical file
23:04:24FromDiscord<Elegantbeef> Termer my runtime traits are slower than OOp
23:04:26termerRobyn I've pondered the same about myself, which is funny
23:04:28FromDiscord<Elegantbeef> Well Nim's OOP
23:04:34termermore like pOOP
23:04:41FromDiscord<Robyn [She/Her]> It's not even on a medical file, hence undiagnosed \:P
23:05:19FromDiscord<Elegantbeef> Of course though I have static traits as well which means stack allocated generic interfaces that beat Nim's OOP 😄
23:05:19FromDiscord<Robyn [She/Her]> To undiagnosed mental conditions! 🍻↵(<@709044657232936960_termer=5b=49=52=43=5d>)
23:05:33termerI'm very grateful that there was enough Rust in the wild before 2021 to make ChatGPT useful for it
23:05:35termerotherwise I'd be very lost
23:05:41FromDiscord<zumi.dxy> oh man, crossbridge mentions...
23:05:50termerIRC WINS AGAIN
23:05:55FromDiscord<Elegantbeef> Why learn a language when you can just ask a LLM for it
23:06:00FromDiscord<zumi.dxy> I got chatgpt to translate a bit of C to Rust
23:06:07FromDiscord<zumi.dxy> it did pretty well
23:06:15FromDiscord<Elegantbeef> The only thing that IRC wins is the year 2000
23:06:31FromDiscord<zumi.dxy> it compiles so I should be home and dry right↵that's what everyone tells me
23:06:40FromDiscord<zumi.dxy> in rust, to compile is to be correct
23:06:41termerunless you use unwrap
23:06:54FromDiscord<zumi.dxy> or unsafe{}
23:07:13FromDiscord<Elegantbeef> Or just break the typesystem
23:07:15termerunsafe is a boogeyman
23:07:19FromDiscord<zumi.dxy> oh sure, you can just grep for unsafe and optimize later :p
23:07:23FromDiscord<zumi.dxy> and unwrap
23:07:26FromDiscord<zumi.dxy> and clone
23:07:28termerunwrap is the real killer
23:07:30termerevery single time
23:07:47FromDiscord<zumi.dxy> in nim you've got↵idk↵ptr, pointer, cast, nil, ...
23:07:49FromDiscord<Elegantbeef> https://github.com/Speykious/cve-rs
23:07:50FromDiscord<Robyn [She/Her]> \~\~dynval\~\~
23:07:59termerdynval is the ultimate Nim construct
23:08:06FromDiscord<Robyn [She/Her]> https://git.termer.net/termer/nim-dynval
23:08:07FromDiscord<zumi.dxy> In reply to @Elegantbeef "https://github.com/Speykious/cve-rs": that bit's amazing
23:08:15FromDiscord<zumi.dxy> "NO COMPILER BUGS DON'T COUNT"
23:08:27termerIf compiler bugs counted, Nim would be in trouble
23:08:42termerRobyn The original version of that I made used the dot operator and tables to make things into tables too
23:08:43FromDiscord<zumi.dxy> re dynval: Finally, Nim for Python users :p
23:08:45FromDiscord<Elegantbeef> It's not really a compiler bug
23:08:47FromDiscord<Elegantbeef> It's the type system working as intended
23:09:06termerNim wasn't complete until it had type coercion
23:09:29FromDiscord<Robyn [She/Her]> Hm...↵(<@709044657232936960_termer=5b=49=52=43=5d>)
23:09:29termerit was patently useless until I could multiply a string containing the number 5
23:09:34FromDiscord<Elegantbeef> The rust type system's design opens up for these issues and there is no resolution since it's "correct"
23:09:43FromDiscord<zumi.dxy> lmao
23:09:45FromDiscord<Robyn [She/Her]> Even Python isn't as bad with `"1" == 1`
23:09:52FromDiscord<zumi.dxy> not so infallible ay?
23:09:53termerbut JAVASCIRPT IS
23:09:54FromDiscord<Robyn [She/Her]> It's JS \:P
23:10:05termerI based its coercion on JS, not Python
23:10:09FromDiscord<Elegantbeef> Well the math makes these cases from my understanding
23:10:13termersurprisingly, Python is pretty sane with its coercion
23:10:20FromDiscord<Robyn [She/Her]> Yeah, it's a god awful language aha↵(<@709044657232936960_termer=5b=49=52=43=5d>)
23:10:31FromDiscord<Robyn [She/Her]> Duck typed, not none typed \:P↵(<@709044657232936960_termer=5b=49=52=43=5d>)
23:10:32FromDiscord<Elegantbeef> yea `[1, 2, 3] 5` is `[5, 10, 15]` right?
23:10:40FromDiscord<Elegantbeef> Fucking `` operator
23:10:42FromDiscord<Elegantbeef> Always out to troll
23:10:50termerI don't know what that means
23:11:01FromDiscord<Robyn [She/Her]> In Python it's `[1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3]`
23:11:09FromDiscord<Elegantbeef> I know
23:11:11termerwhat is that
23:11:14FromDiscord<Elegantbeef> I was insulting python's `` operator as it makes no sense
23:11:26termerI have no idea what that operator is
23:11:26FromDiscord<Elegantbeef> Termer it's the go old asterix bridge bug
23:11:29FromDiscord<Robyn [She/Her]> Oh
23:11:30FromDiscord<Elegantbeef> good old\
23:11:39FromDiscord<Robyn [She/Her]> Multiplication↵(<@709044657232936960_termer=5b=49=52=43=5d>)
23:11:41FromDiscord<Elegantbeef> We say \
23:11:42termeroh what
23:11:46FromDiscord<Elegantbeef> You see sadness
23:11:48FromDiscord<Robyn [She/Her]> Multiplication/repeat
23:11:57FromDiscord<Robyn [She/Her]> Depending on data type in Python
23:12:03termerI know about as much Go as I do Python, which is not a lot
23:12:08termerbasically I just use them when I need to
23:12:18FromDiscord<Elegantbeef> I mean Go is designed to be simple
23:12:25FromDiscord<Elegantbeef> So everyone that can write code knows Go
23:12:32termerwhich is why I've written some
23:12:46termerI've spent less than 2 hours total reading about Go before writing applications in it lol
23:12:56FromDiscord<zumi.dxy> inb4 a link to the infamous "Lies We Keep Telling Ourselves" blog post
23:12:57FromDiscord<Elegantbeef> That was me with Odin
23:13:02FromDiscord<Elegantbeef> Odin is... odd
23:13:06termerI ignore Odin
23:13:07FromDiscord<zumi.dxy> oddin
23:13:16termerI ignore things that steal thunder from my dear Nim
23:13:23termerwhich is why I ignore Zig and Odin
23:13:28FromDiscord<Elegantbeef> I wanted to try it as it's another pascallian language, but it's got questionable design
23:13:38termerOdin's claim to fame is that it's actually used
23:13:40FromDiscord<Elegantbeef> I also disagree with Bill's views on a few things
23:13:50FromDiscord<zumi.dxy> I've tried Zig but I got stuck trying to understand its build system
23:13:56FromDiscord<zumi.dxy> for some reason
23:14:09FromDiscord<Elegantbeef> Right but it's also presently slow in an apples to apples Clang Nim vs. Odin build 😄
23:14:23termerAt least Zig is trying to make a real compiler
23:14:24FromDiscord<Elegantbeef> Atleast in my binary tree example odin was twice as slow
23:14:45FromDiscord<Elegantbeef> I hate bills "Self hosting a compiler is a masturbatory venture"
23:14:51FromDiscord<Robyn [She/Her]> Is Nimskull going to make a native backend or something? \:p
23:14:53FromDiscord<zumi.dxy> also what new language doesn't use "fn" as the keyword signifying functions? :p
23:14:59FromDiscord<Robyn [She/Her]> ...what?
23:15:25FromDiscord<Elegantbeef> Yea gingerbill views selfhosting a compiler as a pointless endeavour just to fondle yourself
23:15:33*advesperacit quit ()
23:15:35termerRobyn Not on the roadmap according to the GitHub
23:15:39FromDiscord<Elegantbeef> Meanwhile it makes contribution easier and more inviting
23:15:41FromDiscord<Robyn [She/Her]> What is that supposed to mean, it's supposed to lower the barrier for contribution and hopefully show flaws in the language itself
23:15:54termerHow can someone who made a lang out of annoyance from C++ think that also making your compiler self-sufficient is useless?
23:15:56FromDiscord<zumi.dxy> i get that having a self hosting compiler can make it a bit of a pain to get started on things that don't have it
23:16:05FromDiscord<Elegantbeef> Hey gingerbill also thinks git sub modules are better than package managers 😄
23:16:07FromDiscord<zumi.dxy> (edit) "it" => "a compiler"
23:16:14FromDiscord<zumi.dxy> ew git submodules
23:16:15termerElegantbeef That's just a C dev opinion
23:16:19FromDiscord<zumi.dxy> why do they have to be a pain
23:16:27FromDiscord<zumi.dxy> it has no reason to be a pain
23:16:28termerGit submodules are great
23:16:34termerbut hard to deal with, yeah
23:16:37FromDiscord<zumi.dxy> and yet they're useful
23:16:46FromDiscord<Elegantbeef> They can be great but I would not use them for dependencies
23:16:55FromDiscord<Elegantbeef> I use a submodule for my wasm3 bindings for instance
23:16:58termerI use them for things that don't have package managers
23:17:00FromDiscord<Robyn [She/Her]> Makes sense, supposedly it would be easier to make a backend in the future, though? I remember a year or so now I was messing around↵(<@709044657232936960_termer=5b=49=52=43=5d>)
23:17:01termerand C libs
23:17:04FromDiscord<Elegantbeef> But I would not use it for a Nim dependency
23:17:11termerRobyn MIR should make it easier to do that
23:17:35termerRight now I'm using Git submodules to put protobuf definition files in various projects
23:17:39termerit works pretty well for that
23:17:55termerprotobuf in one repo, submodule it in for server and client
23:18:05FromDiscord<Elegantbeef> Ugh protobuf
23:18:13termerprotobuf makes life easier
23:18:34FromDiscord<girvo> In reply to @Elegantbeef "Of course though I": which lets be real, who needs anything else 😉
23:18:34FromDiscord<Elegantbeef> Sure but I dislike schemaful stuffs as it tickles my brain in the wrong way
23:18:47termergo back to JS boy
23:18:48FromDiscord<girvo> I wish we'd used protobuf
23:18:53FromDiscord<girvo> We're using messagepack instead
23:18:54FromDiscord<Elegantbeef> Hell I wrote a silly binary format the other day which is practically messagepack
23:18:59termermsgpack looks good on paper
23:19:05termergood to JSON users, that is
23:19:08FromDiscord<girvo> it's... decent
23:19:13termerit's a good solution to a bad way of doing things
23:19:21FromDiscord<girvo> Because we have to take API JSON output for our device configs
23:19:24FromDiscord<Robyn [She/Her]> Fun↵(<@709044657232936960_termer=5b=49=52=43=5d>)
23:19:25FromDiscord<Elegantbeef> Bleh schemas are bad if you ask me
23:19:39FromDiscord<Robyn [She/Her]> Why are schemas bad?
23:19:43FromDiscord<Elegantbeef> Cause I'm not doing IPC
23:19:44termeryou don't write protocols meant to be consumed by others and updated then
23:19:51FromDiscord<girvo> And yoink it to the the TCP server, which sends it as messagepack to the devices
23:19:57FromDiscord<Elegantbeef> I'm aiming at serialising game saves
23:20:04FromDiscord<girvo> Oh man we _need_ schemas, coz shit breaks lol
23:20:10FromDiscord<Elegantbeef> In a migration way without having to maintain a fucking schema
23:20:17FromDiscord<Robyn [She/Her]> Fair \:p
23:20:22termerI'd use SQLite for save files or some native serialization
23:20:24FromDiscord<girvo> Our schema is currently a `lithium_message` nim package that exports a `DeviceConfig` type lmao
23:20:33termerbut native serialization sucks if you need to read it from something outside the lang you serialized it in
23:20:36FromDiscord<girvo> And we rely on `jsony` and `msgpack4nim` to do the right things
23:20:40FromDiscord<Elegantbeef> I'm not going to use a database to save game saves
23:20:46FromDiscord<Robyn [She/Her]> In reply to @Robyn "Makes sense, supposedly it": Oh wow this breaks (the ping)
23:20:50FromDiscord<Elegantbeef> This is local game saves why would I do something so silly
23:20:51termerElegantbeef umad?
23:20:59termersqlite is easy to read, that's why
23:21:10FromDiscord<Elegantbeef> Lol
23:21:21termerI just use JSON if I don't need anything special and it's not gonna be consumed by something else
23:21:24FromDiscord<Elegantbeef> Let's save a games world data inside of a database
23:21:31termerdepends on your game
23:21:48termerbut schemas are really useful
23:21:54FromDiscord<Elegantbeef> I mean I can use sqlite but we're talking about basic grid based levels, and I have intense NIH
23:22:01termerElegantbeef One benefit of using SQLite is that you can use traditional DB migrations
23:22:13termerthat's helpful for updating game data between versions
23:22:19FromDiscord<Elegantbeef> Right but it also is larger and has a dependency
23:22:33FromDiscord<Elegantbeef> I can use migrations if I export field names and implement procs to handle specific types
23:22:42termeryou can
23:22:50termerif you have time for bespoke everything, then do what you want
23:22:55FromDiscord<Elegantbeef> `Float` -\> `Int` for `MyType` is done trivally
23:24:05FromDiscord<Elegantbeef> I did really like this idea for save data but it falls apart a bit cause you cannot `when` inside enums https://github.com/beef331/nimtrest/blob/master/vershun.nim#L43-L58
23:24:30FromDiscord<Elegantbeef> Though one could probably use a macro
23:24:45FromDiscord<girvo> In reply to @Elegantbeef "Though one could probably": Rewrite all the ~~things~~ terms!
23:25:40termerElegantbeef Write your next game in Java
23:26:05FromDiscord<Elegantbeef> Ah termer realises I also have an undiagnosed medical condition
23:26:30termerNim is the most autistic shit, I expect the rate of ASD to be significantly higher here than most places
23:26:40FromDiscord<girvo> Most likely
23:26:56FromDiscord<Elegantbeef> But why are you telling me to use Java for my next project?
23:27:05termerCause it was funny
23:27:14FromDiscord<Elegantbeef> I see
23:27:15FromDiscord<girvo> To make you wanna die I guess
23:27:26termerI wrote 3 games in Java
23:27:29FromDiscord<Elegantbeef> It'd take a lot to do that
23:27:40FromDiscord<Elegantbeef> Maybe java would do that
23:27:49termerIt took me a few hours and learning how to render custom components with Swing 8)
23:28:14FromDiscord<Elegantbeef> What a coincidence it took me a few hours to implement my GUI system 😄
23:28:21termersounds about right
23:28:34termerAlso learned that Java has a midi engine in it
23:29:44FromDiscord<Elegantbeef> It runs on 300000 trillion devices so of course
23:30:07termerElegantbeef https://static.termer.net/download/313p9pxlld/smash_and_bash_die.webm
23:30:30FromDiscord<Elegantbeef> Nintendo is coming for you
23:30:51FromDiscord<girvo> Does Yuzu's death mean _nothing_ to you???
23:30:54FromDiscord<Elegantbeef> I do have to say I'm happy my game is atleast 2% more game looking than that shitpost
23:31:01FromDiscord<girvo> fr ninty's lawyers scare me lol
23:31:05FromDiscord<zumi.dxy> > java has a midi engine↵the coolest thing about it is that it autogenerates its own fallback sf2
23:31:10FromDiscord<zumi.dxy> soundfont
23:31:19termerI couldn't figure out how to force it to repaint without moving the mouse, so when you're playing, it traps your mouse in the center of the window and moves it back and forth every 16ms
23:31:34FromDiscord<zumi.dxy> it's got a cheap sound but it's got its charm
23:31:56FromDiscord<zumi.dxy> you're supposed to use it with actually good soundfonts however
23:32:26FromDiscord<zumi.dxy> (edit) "it's got a cheap sound ... but" added "(as a fallback does)"
23:33:52termerElegantbeef https://static.termer.net/download/o6fjpfuz6a/%E5%9C%96%E7%89%87.png
23:34:22termerimagine this with midi never gonna give you up
23:36:23termerhttps://static.termer.net/download/vl35n1yywm/%E5%9C%96%E7%89%87.png
23:36:30termerJava's the only language that can accomplish this
23:36:44FromDiscord<Elegantbeef> Termer really is a 4channer
23:37:05FromDiscord<girvo> what in the adhd...
23:37:37termerlong, really good story
23:37:52termerElegantbeef My roots do not define me.
23:38:31FromDiscord<Elegantbeef> You might not have the sins of your father but you do have the sins of your past
23:38:47termerthis is very wise, very wise indeed
23:39:28termerlistening to really good stereo midi of Bizarre Love Triangle
23:57:57FromDiscord<girvo> termer: whats the protobuf story on Nim? Been a bit since I looked
23:58:39FromDiscord<Elegantbeef> Pmunch does have a nice lib that does not require protoc