01:35:21 | FromDiscord | <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:36 | FromDiscord | <bosinski2023> (edit) "what can ... check" added "i" |
01:35:45 | FromDiscord | <bosinski2023> (edit) "what can i check when a dylib can ... loaded," added "be" |
01:36:14 | FromDiscord | <Elegantbeef> Use the error code to get the OS message |
01:36:32 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=KsvOFCAgbMdC |
01:36:33 | FromDiscord | <Elegantbeef> Whoops |
01:37:37 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=ELTLOSSefbRd |
01:41:10 | FromDiscord | <bosinski2023> sent a code paste, see https://play.nim-lang.org/#pasty=tiZefBhPBHHj |
01:41:28 | FromDiscord | <Elegantbeef> Why are you echoing the error code? |
01:41:30 | FromDiscord | <bosinski2023> (edit) "https://play.nim-lang.org/#pasty=DMkaAPHIABtR" => "https://play.nim-lang.org/#pasty=peexwFRjaoSx" |
01:41:45 | FromDiscord | <Elegantbeef> That's pretty much useless |
01:42:14 | FromDiscord | <bosinski2023> In reply to @Elegantbeef "Why are you echoing": 'cos that what was in your answer |
01:42:24 | FromDiscord | <Elegantbeef> No it's not |
01:42:34 | FromDiscord | <Elegantbeef> I got the message for the error code |
01:42:46 | FromDiscord | <Elegantbeef> If that error message is quite literally "0" we've got greater problems |
01:43:40 | FromDiscord | <bosinski2023> In reply to @Elegantbeef "If that error message": `echo osErrorMsg e.errorCode`does not compile ? |
01:44:04 | FromDiscord | <Elegantbeef> https://nim-lang.org/docs/oserrors.html |
01:44:15 | FromDiscord | <Elegantbeef> I wouldn't lie to you the code exists |
01:54:03 | FromDiscord | <bosinski2023> sent a code paste, see https://play.nim-lang.org/#pasty=cejFiHqLKphj |
01:54:41 | FromDiscord | <Elegantbeef> Oh I did lie to you |
01:54:47 | FromDiscord | <Elegantbeef> You need to convert it apparently |
01:54:56 | FromDiscord | <Elegantbeef> OsErrorCode(e.errorCode)\` |
01:56:14 | FromDiscord | <bosinski2023> In reply to @Elegantbeef "OsErrorCode(e.errorCode)\`": thx, that what i´found out, but there is no msg,, its "" |
01:56:24 | FromDiscord | <Elegantbeef> Lol |
01:56:25 | FromDiscord | <Elegantbeef> Well uhh yea |
01:56:36 | FromDiscord | <Elegantbeef> You've got no better information and I don't know how to print more |
01:56:40 | FromDiscord | <bosinski2023> In reply to @Elegantbeef "Well uhh yea": so now i'm fucked ? |
01:57:39 | FromDiscord | <bosinski2023> the name of the function is "mangled" in the sĺibs symbol-table is appears as "Z19avx2_sumbytes" ? |
01:57:56 | FromDiscord | <bosinski2023> (edit) "sĺibs" => "libs" |
01:58:25 | FromDiscord | <bosinski2023> (edit) "is" => "it" |
01:58:54 | FromDiscord | <Elegantbeef> Are you attempting to import your own Nim library? |
01:59:02 | FromDiscord | <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:40 | FromDiscord | <bosinski2023> In reply to @Elegantbeef "Are you attempting to": no, i compiled it, but via clang not vieá the compile-pragma.. |
01:59:51 | FromDiscord | <bosinski2023> (edit) "vieá" => "via" |
02:00:35 | FromDiscord | <Elegantbeef> Is it C++ or C? |
02:01:02 | FromDiscord | <bosinski2023> In reply to @Elegantbeef "Is it C++ or": cpp but i could make it C - maybe - |
02:01:24 | FromDiscord | <Elegantbeef> If you use C++ it likely mangles names |
02:04:59 | FromDiscord | <bosinski2023> In reply to @Elegantbeef "If you use C++": i tried to prove the mangled-name with dynlib.checkedSymAddr - not found..# |
02:05:05 | FromDiscord | <bosinski2023> (edit) "found..#" => "found.." |
02:05:14 | FromDiscord | <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:12 | FromDiscord | <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:37 | FromDiscord | <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:55 | FromDiscord | <leorize> I mean, it's in the code?↵(@Robyn [She/Her]) |
02:43:56 | FromDiscord | <leorize> why would not having enough data a problem? |
02:44:03 | FromDiscord | <leorize> just ask them to get more and try again |
02:46:13 | FromDiscord | <leorize> did you look at any sans-io library before writing this? |
02:46:29 | FromDiscord | <leorize> I think you should learn the general pattern used for those first |
02:54:24 | FromDiscord | <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:28 | FromDiscord | <bosinski2023> sent a code paste, see https://play.nim-lang.org/#pasty=JOONjQEkLCoC |
03:03:09 | FromDiscord | <Elegantbeef> You can write a macro to process the AST in any direction you want |
03:03:14 | FromDiscord | <Elegantbeef> Aslong as the macro gets the AST you want |
03:05:19 | FromDiscord | <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:32 | FromDiscord | <bosinski2023> (edit) "come" => "comes" |
03:05:43 | FromDiscord | <bosinski2023> (edit) "the" => "my" |
03:05:53 | FromDiscord | <bosinski2023> (edit) "ake" => "make" |
03:13:29 | FromDiscord | <Elegantbeef> You can inspect the procedure so you could |
03:13:51 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=CgZFheuubEda |
03:13:55 | FromDiscord | <Elegantbeef> `import std/macros`\ |
03:21:22 | FromDiscord | <bosinski2023> sent a code paste, see https://play.nim-lang.org/#pasty=FdyvLRfZgJiJ |
03:21:44 | FromDiscord | <Elegantbeef> If you use a typed macro yes |
03:22:30 | FromDiscord | <bosinski2023> In reply to @Elegantbeef "If you use a": great, i'll look in the docs for 'typed macro' |
03:26:36 | FromDiscord | <bosinski2023> .. |
03:28:27 | FromDiscord | <Elegantbeef> You will always have to have a macro above your code |
03:30:34 | FromDiscord | <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:08 | FromDiscord | <bosinski2023> (edit) "replacement" => "replacements" | "'intrinsic'-form.." => "'intrinsic'-form..↵is that 'above your code' ?" |
03:31:39 | FromDiscord | <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:42 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=SAfkufdOAnhD |
03:32:35 | FromDiscord | <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:25 | FromDiscord | <Elegantbeef> https://play.nim-lang.org/#pasty=NbnxDmBFvTUp to set you up for success 😛 |
04:03:14 | FromDiscord | <bosinski2023> sent a long message, see https://pasty.ee/FBismyHYMKhr |
04:04:26 | FromDiscord | <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:36 | FromDiscord | <ezquerra> sent a code paste, see https://play.nim-lang.org/#pasty=mxeKYGVlhaKS |
07:11:25 | FromDiscord | <Elegantbeef> You need to use `wasMoved` int 2.0 |
07:11:54 | FromDiscord | <Elegantbeef> wasMoved zeros and destructors destroy |
07:17:00 | FromDiscord | <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:40 | FromDiscord | <ezquerra> (edit) "insated" => "instead" |
07:18:11 | FromDiscord | <Elegantbeef> Look at the destructor docs |
07:18:11 | FromDiscord | <Elegantbeef> there is a `=wasMoved` hook now |
07:18:15 | FromDiscord | <Elegantbeef> That's what you 0 memory with in 2.0 |
07:18:46 | NimEventer | New thread by sls1005: Artificial AST, see https://forum.nim-lang.org/t/11148 |
07:19:29 | FromDiscord | <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:40 | FromDiscord | <Elegantbeef> You declare both |
07:19:44 | FromDiscord | <Elegantbeef> `=wasMoved` zeros |
07:19:49 | FromDiscord | <Elegantbeef> `=destroy` destroys |
07:21:19 | FromDiscord | <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:42 | FromDiscord | <ezquerra> I'll ask again later if I need it 🙂 |
07:41:56 | FromDiscord | <morgan> sent a code paste, see https://play.nim-lang.org/#pasty=tHChdFDzaFXX |
07:42:33 | FromDiscord | <morgan> it goes away if i comment out the const define |
07:45:12 | FromDiscord | <Elegantbeef> There is no way to instantiate that generic |
07:46:08 | FromDiscord | <morgan> yeah i was guessing it was something like that |
07:46:32 | FromDiscord | <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:06 | FromDiscord | <morgan> oh i guess i could unpointer a cstring |
07:48:30 | FromDiscord | <Elegantbeef> I mean you can do `proc myStr(s: static string): array[16, char]` |
07:48:54 | FromDiscord | <Elegantbeef> then you can do `myStr"...."` and emit `['.', '.', '.', '.', '\0', ....]` |
07:50:19 | FromDiscord | <morgan> oh fancy |
10:39:25 | FromDiscord | <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:57 | FromDiscord | <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:12 | FromDiscord | <A2> 🤦 setting `--exceptions:cpp` in addition to `--backend:cpp` fixes it |
10:51:18 | FromDiscord | <A2> thanks 🦆 |
12:27:11 | FromDiscord | <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:09 | FromDiscord | <MDuardo> Have never used Nimble to build something, all my projects were made with loose files |
12:29:27 | FromDiscord | <nnsee> In reply to @MDuardo "How do you build": well, what exactly are you doing? |
12:29:36 | FromDiscord | <odexine> nimble build doesnt work? |
12:30:51 | FromDiscord | <nnsee> sent a code paste, see https://play.nim-lang.org/#pasty=jDFVtYFQKiXN |
12:31:12 | FromDiscord | <nnsee> and a corresponding `src/fastcube.nim` file that gets built when I do `nimble build` |
12:33:13 | FromDiscord | <MDuardo> Throws me an error↵(@odexine) |
12:33:59 | FromDiscord | <MDuardo> But even in the default Nimble template doesn't work, haven't changed anything |
12:34:08 | FromDiscord | <nnsee> what error exactly? |
12:35:46 | FromDiscord | <MDuardo> Wait, I managed to fix it↵Just renamed the folder |
12:36:03 | FromDiscord | <MDuardo> The folder can't be named Nim? |
12:37:54 | FromDiscord | <nnsee> ah yes |
12:37:57 | FromDiscord | <nnsee> no, it can't |
12:49:47 | FromDiscord | <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:51 | NimEventer | New Nimble package! sat - A SAT solver written in Nim., see https://github.com/nim-lang/sat |
14:27:57 | NimEventer | New Nimble package! cppconst - Nim wrapper for C++ const-qualified types., see https://github.com/sls1005/nim-cppconst |
14:27:57 | NimEventer | New 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:30 | FromDiscord | <Robyn [She/Her]> In reply to @leorize "just ask them to": I did, but also this is enough data |
14:42:47 | FromDiscord | <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:47 | FromDiscord | <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:51 | FromDiscord | <treeform> In reply to @toma400 "Yeah, I used exactly": I am glad you like it. Thanks! |
17:28:42 | FromDiscord | <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:27 | FromDiscord | <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:02 | FromDiscord | <Robyn [She/Her]> Should my API return the amount of bytes read from a given array? Hm... |
18:33:29 | FromDiscord | <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:39 | FromDiscord | <morgan> sent a code paste, see https://play.nim-lang.org/#pasty=mNRDvvGpVqLl |
19:03:09 | FromDiscord | <morgan> it's erroring on the get proc on the last line |
19:03:26 | FromDiscord | <morgan> (edit) "proc" => "member variable" |
19:04:58 | FromDiscord | <leorize> yes↵(@Robyn [She/Her]) |
19:06:46 | FromDiscord | <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:01 | FromDiscord | <Robyn [She/Her]> I know curious and h4 implement in Python I believe, but they seem pretty big, |
19:07:03 | FromDiscord | <Robyn [She/Her]> (edit) "big," => "big" |
19:17:15 | * | fallback joined #nim |
19:21:51 | * | derpydoo joined #nim |
19:31:52 | FromDiscord | <aintea> sent a code paste, see https://play.nim-lang.org/#pasty=yKAXAWcmaHhi |
19:32:07 | FromDiscord | <aintea> (edit) "https://play.nim-lang.org/#pasty=rgrzBrOVQbIz" => "https://play.nim-lang.org/#pasty=aOHIepWLDewB" |
19:34:55 | FromDiscord | <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:14 | FromDiscord | <demotomohiro> In reply to @aintea "Hey, I have this": Probably it is a bug in Nim compiler. |
19:35:50 | FromDiscord | <aintea> Should I fill an issue on the github ? |
19:37:05 | FromDiscord | <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:36 | FromDiscord | <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:31 | FromDiscord | <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:37 | FromDiscord | <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:20 | FromDiscord | <morgan> ah |
19:43:39 | FromDiscord | <morgan> good catch |
19:44:06 | FromDiscord | <morgan> that fixed it |
19:45:32 | FromDiscord | <demotomohiro> You better to understand about calling convension if you are using C library and targets 32bit windows. |
19:46:00 | FromDiscord | <morgan> i don't think im going to bother supporting 32 bit anything |
19:49:04 | FromDiscord | <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:29 | FromDiscord | <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:45 | FromDiscord | <demotomohiro> In reply to @saffage "`Stack[T].none` returns a value": That is because `none` is a procedure return a value. |
19:55:05 | FromDiscord | <saint.___.> @morgan Are you wrapping CLAP with nim? |
19:55:33 | FromDiscord | <morgan> yes |
19:56:03 | FromDiscord | <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:13 | NimEventer | New thread by mszs: Mutation testing based on macros?, see https://forum.nim-lang.org/t/11159 |
19:56:26 | FromDiscord | <saffage> In reply to @demotomohiro "That is because `none`": yes, so you can't it for type definition |
19:56:37 | FromDiscord | <saffage> (edit) "In reply to @demotomohiro "That is because `none`": yes, so you can't it for ... type" added "a" |
19:57:13 | FromDiscord | <saint.___.> In reply to @morganalyssa "i was going to": This is awesome! |
19:57:32 | FromDiscord | <saint.___.> Is clap hard to figure out? I'm looking at it right now seems a bit complicated |
19:57:39 | FromDiscord | <saint.___.> but I'm sure it's easier than VST |
19:57:54 | * | rockcavera joined #nim |
19:58:49 | FromDiscord | <saint.___.> Are you talking about https://github.com/Tremus/CPLUG |
19:58:51 | FromDiscord | <morgan> well i've been going thru the example plugin, and implementing types as i need them |
19:58:53 | FromDiscord | <morgan> and yes |
19:58:56 | FromDiscord | <morgan> that cplug |
19:59:01 | FromDiscord | <saint.___.> Gotcha |
19:59:35 | FromDiscord | <saint.___.> Youre using futhark? |
19:59:41 | FromDiscord | <morgan> yep |
20:00:04 | FromDiscord | <saint.___.> Oh wait clap is c++ right |
20:00:06 | FromDiscord | <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:10 | FromDiscord | <morgan> clap seems to be c |
20:00:10 | * | junaid_ joined #nim |
20:00:47 | FromDiscord | <saint.___.> Oh cool |
20:00:56 | FromDiscord | <saint.___.> So futhark should take care of most of the stuff for you |
20:01:56 | FromDiscord | <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:27 | FromDiscord | <morgan> futhark only defines something if you haven't already, so you can write nicer defs |
20:02:54 | FromDiscord | <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:42 | FromDiscord | <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:23 | FromDiscord | <morgan> sent a code paste, see https://play.nim-lang.org/#pasty=XifRzhWKPNlf |
20:52:46 | FromDiscord | <morgan> but with roughly that i get an error about redefining it |
21:04:48 | * | junaid_ quit (Remote host closed the connection) |
21:12:33 | FromDiscord | <Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=DklXKZphspUE |
21:12:41 | FromDiscord | <morgan> damn |
21:21:50 | FromDiscord | <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:29 | FromDiscord | <Robyn [She/Her]> Fair, not sure how I could help so sorry |
21:24:24 | FromDiscord | <morgan> https://media.discordapp.net/attachments/371759389889003532/1214684966223478814/image.png?ex=65fa0287&is=65e78d87&hm=fe54873f56032ffaf1a0af21500be0e140a936851a23d2e0fb7da0b402a96a84& |
21:27:54 | FromDiscord | <Robyn [She/Her]> In reply to @morganalyssa "": How would that help at all? |
21:28:10 | FromDiscord | <Robyn [She/Her]> That's still making you provide a generic to it |
21:28:46 | FromDiscord | <morgan> i could do ClapPlugin[MyPluginDataType] |
21:29:02 | FromDiscord | <morgan> forward declared types would really be the best solution tho |
21:29:13 | FromDiscord | <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:24 | FromDiscord | <Robyn [She/Her]> (edit) "byt" => "but" |
21:29:47 | FromDiscord | <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:31 | termer | 你好 |
21:30:41 | termer | every thread has stack memory, yeah? |
21:30:48 | termer | static doesn't mean global |
21:30:53 | FromDiscord | <Robyn [She/Her]> I'd imagine so |
21:30:55 | * | def- quit (Quit: -) |
21:31:28 | * | def- joined #nim |
21:31:37 | termer | you can just put it on the stack and make sure it's still alive when you're using it |
21:31:58 | termer | it's not really ready for production though, just so you know |
21:32:01 | FromDiscord | <Robyn [She/Her]> I'm not sure how that'd work with `cps` if there's multiple requests |
21:32:23 | termer | so you have a loop per accepted connection, with the request object before the loop |
21:32:27 | termer | hold on' |
21:32:44 | FromDiscord | <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:52 | FromDiscord | <Robyn [She/Her]> In reply to @termer "hold on'": Alright |
21:34:29 | * | def- quit (Client Quit) |
21:34:44 | termer | https://git.termer.net/termer/nim-sys-fun/src/branch/master/src/nim_sys_fun.nim |
21:35:19 | termer | request and response object per connection handler |
21:35:21 | FromDiscord | <huantian> In reply to @morganalyssa "": i have no idea how to help but music plugins in nim sounds cool |
21:35:26 | termer | after each request, both objects are reset |
21:35:28 | FromDiscord | <Robyn [She/Her]> Gitea instance 👀 |
21:35:43 | termer | My gitea is for the things that aren't portfolio and for private code |
21:35:48 | termer | and mirrors |
21:35:49 | FromDiscord | <Robyn [She/Her]> Fair |
21:35:52 | termer | bask in the glory |
21:35:53 | * | def- joined #nim |
21:42:11 | FromDiscord | <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:27 | FromDiscord | <Robyn [She/Her]> Ah also termer, your library structure isn't correct, you should put `http_` into the `src/methttp` folder |
21:46:44 | FromDiscord | <Robyn [She/Her]> Probably should delete `methttp.nim` too |
21:48:40 | termer | the 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:41 | termer | it's not done |
21:49:07 | termer | There's one problem with the parser right now, which is that it doesn't accept all valid header values |
21:49:12 | FromDiscord | <Robyn [She/Her]> Yeah fair enough |
21:49:18 | termer | need to fix the stuff it checks for |
21:49:30 | FromDiscord | <Robyn [She/Her]> In reply to @termer "There's one problem with": Ah fair enough |
21:49:39 | termer | otherwise, it's "production-ready", just incomplete |
21:50:00 | termer | I'll consider it ready for actual use when it has a chunked body and multipart body parser, and also a response parser |
21:50:16 | termer | right now it's just benchmark fodder |
21:50:25 | termer | which is fine, it does run really fast |
21:51:18 | * | azimut quit (Remote host closed the connection) |
21:51:23 | FromDiscord | <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:35 | termer | will do |
21:52:44 | termer | by the way, you should join the nimworks channel on Matrix or IRC |
21:53:06 | termer | CPS draft just got added to the 'skull compiler |
21:53:08 | termer | exciting stuff |
21:55:35 | FromDiscord | <Robyn [She/Her]> In reply to @termer "by the way, you": I'm already there I believe! Definitely in the cps channel |
21:55:42 | termer | aha |
21:55:45 | FromDiscord | <Robyn [She/Her]> In reply to @termer "CPS draft just got": Oh? What does that mean? |
21:55:57 | termer | It means coroutines in the lang without macro |
21:56:25 | termer | which is something I've been wishing Nim would do for as long as I've known about CPS |
21:56:30 | FromDiscord | <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:45 | termer | race to IC |
21:56:58 | FromDiscord | <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:00 | termer | there is no race to CPS though since only one party seems to care about async |
21:57:04 | FromDiscord | <Robyn [She/Her]> In reply to @termer "race to IC": Lol |
21:57:21 | FromDiscord | <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:36 | termer | I mean, async as in concurrency without threads |
21:57:39 | termer | not async/await |
21:57:46 | termer | And yeah, the transformation macro will no longer be needed when the draft is finalized |
21:57:51 | termer | it'll be built into the lang |
21:58:10 | termer | kind of like how Rust has async/await built into the lang but the runtime you use is up to you |
22:03:06 | termer | Also, has anyone else dealt with nimsuggest crashes with the new tooling? |
22:03:24 | termer | It's been really inconsistent for me, crashing often and not automatically restarting until I restart VSCode |
22:11:55 | FromDiscord | <Elegantbeef> supposedly choosenim can cause issues atleast with zombie processes |
22:26:56 | FromDiscord | <Robyn [She/Her]> In reply to @termer "I mean, async as": Yeah I know |
22:27:12 | termer | Elegantbeef How so |
22:27:22 | FromDiscord | <Robyn [She/Her]> In reply to @termer "And yeah, the transformation": I wonder if cps will still be maintained for Nim |
22:27:40 | FromDiscord | <Robyn [She/Her]> In reply to @termer "Elegantbeef How so": Choosenim uses proxy binaries which mess stuff up for some reason |
22:27:42 | termer | Probably not in the longrun |
22:27:49 | FromDiscord | <Robyn [She/Her]> There's a GitHub issue tracking that on the repo J believe |
22:27:52 | FromDiscord | <Robyn [She/Her]> I believe |
22:27:56 | termer | it has a long history of being held back by compiler bugs in nim |
22:28:06 | termer | but someone may maintain it separately |
22:35:41 | FromDiscord | <Robyn [She/Her]> Makes sense |
22:36:07 | FromDiscord | <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:30 | FromDiscord | <Robyn [She/Her]> Which is an issue when Nim doesn't have much of an ecosystem anyway |
22:37:05 | termer | I almost never use Nim libs in my stuff lol |
22:37:13 | termer | at least not a lot |
22:38:08 | termer | I think most libs would be easy to port |
22:39:21 | FromDiscord | <Robyn [She/Her]> They probably would yeah |
22:39:39 | FromDiscord | <Robyn [She/Her]> In reply to @termer "I almost never use": I do when I can to avoid duplication of work |
22:39:58 | FromDiscord | <Robyn [She/Her]> Hm, maybe I should keep up with Nimskull again, just really wish there was a discord bridge :p |
22:42:24 | FromDiscord | <zumi.dxy> I should probably try that↵have they ported ARC/ORC or are they sticking with refc? |
22:43:18 | termer | They're using ARC and ORC |
22:43:23 | termer | they removed refc if I remember correctly |
22:43:29 | termer | they definitely removed the other GCs |
22:43:34 | FromDiscord | <zumi.dxy> ah↵cool, cool |
22:43:43 | FromDiscord | <zumi.dxy> Even `none`? |
22:43:49 | termer | Probably not |
22:44:00 | termer | Their current big goal is to slim down the lang and create a specification and improve tests |
22:44:11 | FromDiscord | <zumi.dxy> Is their stdlib more `none`-friendly? |
22:44:19 | termer | No, but why would you want to use that anyway |
22:44:21 | termer | use ARC instead |
22:44:25 | FromDiscord | <girvo> In reply to @termer "Their current big goal": Once they get there, I'm interested. |
22:44:44 | FromDiscord | <girvo> And yeah even on constrained embedded targets `none` is a waste of time |
22:44:44 | termer | girvo Progress is being made, but it's gradual and hard to track |
22:45:03 | termer | `none` is basically "I want to write C again" |
22:45:09 | termer | which nobody using Nim says |
22:45:14 | FromDiscord | <zumi.dxy> In reply to @girvo "And yeah even on": I mean I did get `arc` to work on constrained hardware |
22:45:27 | FromDiscord | <girvo> In reply to @termer "which nobody using Nim": Amusingly, including the C programmers we hired and taught to use Nim |
22:45:39 | termer | sounds about right |
22:45:58 | FromDiscord | <zumi.dxy> In reply to @termer "which nobody using Nim": but then we shouldn't be advertising "GC optional" then :p |
22:46:06 | termer | ARC isn't a GC |
22:46:13 | termer | that's why they changed the compiler switch from gc to mm |
22:46:19 | termer | ARC is basically what Rust does |
22:46:21 | FromDiscord | <girvo> Tbh I agree with that haha. I know the argument that ARC isn't a gc, but still |
22:46:35 | FromDiscord | <zumi.dxy> Well, the term "GC" itself has baggage |
22:46:36 | termer | but yeah, advertising GC-optional is misleading |
22:46:41 | FromDiscord | <girvo> True on all fronts |
22:46:44 | FromDiscord | <girvo> GC is a wonky term |
22:46:52 | FromDiscord | <zumi.dxy> stack is a form of GC if you think about it |
22:47:07 | FromDiscord | <zumi.dxy> but too bad in most people's minds GC == java or go GC |
22:47:09 | termer | Collect implies collecting things actively, usually in quantities of more than 1 |
22:47:21 | termer | The implication is a runtime that finds things and deallocates them |
22:47:25 | FromDiscord | <Robyn [She/Her]> So termer, are you mostly using Nimskull then? Or do you still use Nim? |
22:47:33 | termer | using Nim still right now |
22:47:48 | termer | working with skull a little though |
22:47:51 | FromDiscord | <zumi.dxy> I do wonder how exactly 'skull will differ from nim |
22:48:05 | termer | read its github, it explains its vision pretty well |
22:48:19 | termer | basically it wants to be more narrow in scope and have a spec |
22:48:44 | termer | One of Nim's major handicaps from the skull perspective is that it has a million undocumented, half-baked features |
22:48:53 | FromDiscord | <zumi.dxy> they've even endeavoured to clean up the commit logs |
22:48:54 | FromDiscord | <Robyn [She/Her]> In reply to @termer "working with skull a": Fair |
22:49:18 | termer | When I have a bit more time, I'll start contributing to skull |
22:49:26 | FromDiscord | <Robyn [She/Her]> Fair |
22:49:37 | termer | as 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:52 | FromDiscord | <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:54 | FromDiscord | <Robyn [She/Her]> In reply to @termer "as far as I'm": Understandable |
22:51:03 | termer | there 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:37 | FromDiscord | <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:41 | termer | it seems like each person working on it is an expert in the part that he's working on |
22:51:56 | FromDiscord | <morgan> i wrote a half baked package manager for that lang because it did not have one |
22:52:16 | termer | It's a big gamble to work in a niche lang |
22:52:20 | FromDiscord | <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:25 | termer | Nim is luck to have hooked Status lol |
22:52:33 | termer | *is lucky |
22:52:46 | termer | morgan The way I see it, it's experience that's portable |
22:52:51 | FromDiscord | <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:52 | FromDiscord | <morgan> oh for sure |
22:53:26 | termer | Nim could be doing much much better if it actually chose a direction to go |
22:53:27 | FromDiscord | <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:37 | FromDiscord | <morgan> yea |
22:53:37 | termer | it's so good it managed to get a lot of people using it without a proper specialization |
22:53:40 | termer | that says something |
22:53:44 | termer | so it could do way better |
22:53:59 | FromDiscord | <zumi.dxy> I wonder if OpenD will have similar work done to it as Skull does |
22:54:08 | FromDiscord | <morgan> i think part of it is getting a big player involved, like rust has mozilla |
22:54:16 | termer | Definitely |
22:54:19 | FromDiscord | <morgan> that basically forces a bunch of people to use it and contribute to it |
22:54:25 | FromDiscord | <morgan> and makes it more relevant to others |
22:54:42 | termer | Rust'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:48 | FromDiscord | <Robyn [She/Her]> I wonder if Nimskull will do that |
22:54:56 | termer | Blazingly fast (as fast as C++, more or less) |
22:54:59 | FromDiscord | <zumi.dxy> And relentless evangelism :p |
22:55:12 | FromDiscord | <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:21 | FromDiscord | <zumi.dxy> so much so that when people think memory safe, they think of rust now |
22:55:27 | termer | talking about """language speed""" is pretty retarded unless you're dealing with scripting langs anyway lol |
22:55:28 | FromDiscord | <morgan> yea |
22:55:43 | FromDiscord | <zumi.dxy> "the other options (with GC!!) suck so we'll forget about them" |
22:55:47 | termer | Memory-safe, blazingly fast... what else could a developer ask for?? |
22:55:55 | FromDiscord | <morgan> i think the most important speed is the speed of naively written code |
22:56:13 | termer | The most important speed is cocaine, but nobody likes to talk about that |
22:56:18 | FromDiscord | <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:30 | termer | *Vibrant, inclusive community |
22:56:34 | FromDiscord | <zumi.dxy> one that reaches critical mass so quickly |
22:56:45 | FromDiscord | <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:01 | FromDiscord | <zumi.dxy> and when it gets to critical mass, the term I like to use is "Cool Now" |
22:57:08 | termer | it's really disappointing how much a compiler's optimizer does for speed |
22:57:10 | FromDiscord | <morgan> like assembly is very fast but it's so much harder to write that it's not feasible |
22:57:13 | FromDiscord | <zumi.dxy> anything can happen when something becomes "Cool Now" |
22:57:26 | FromDiscord | <girvo> I agree with the bulk of the decisions they've made so far, so it's promising |
22:57:27 | termer | assembly can be plenty slow if you don't know how to write good logic lol |
22:57:35 | FromDiscord | <morgan> well yea |
22:58:24 | termer | girvo "I agree with the bulk of the decisions they've made so far, so it's promising" Rust or Skull? |
22:58:36 | FromDiscord | <girvo> Skull |
22:58:41 | FromDiscord | <girvo> Rust I'm the opposite lol |
22:58:58 | FromDiscord | <girvo> At least wrt. decisions in the last couple years |
22:59:33 | FromDiscord | <Robyn [She/Her]> Rust is kinda something you have to force yourself to like until it's genuine imo |
22:59:41 | FromDiscord | <morgan> sent a long message, see https://pasty.ee/RuZjaukAmRmR |
22:59:45 | FromDiscord | <zumi.dxy> I chose Nim because its code feels plenty readable without a bunch of overhead↵Lot of into(), unwrap(), etc. etc. |
22:59:48 | termer | Yeah I really like the direction Skull is going, and its intermediate representation should be working in a few weeks |
22:59:58 | FromDiscord | <zumi.dxy> (edit) "overhead↵Lot" => "overhead↵Doesn't have a lot" |
23:00:06 | termer | into is kicking my ass right now, I'm not used to functional casts basically |
23:00:10 | FromDiscord | <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:13 | FromDiscord | <girvo> https://graydon2.dreamwidth.org/307291.html |
23:00:21 | FromDiscord | <zumi.dxy> I have given NIR a spin recently↵it was interesting |
23:00:27 | termer | also I wanna kill anyone who uses unwrap when pattern matching should be used |
23:00:35 | FromDiscord | <zumi.dxy> Curious to see what skull's IR looks like |
23:00:36 | termer | so much software crashing because of lazy devs |
23:00:51 | FromDiscord | <zumi.dxy> In reply to @termer "also I wanna kill": sometimes you don't actually want safe nulls ;) |
23:00:54 | FromDiscord | <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:00 | FromDiscord | <Elegantbeef> It's called MIR like the space station 😄 |
23:01:28 | FromDiscord | <zumi.dxy> and yeah Nim, "quite pythonic"↵but it's clear that it's much more than Python |
23:01:37 | termer | didn't the original proposal acronym for NIR look like a funny word |
23:01:42 | termer | I vaguely remember this on an RFC |
23:01:47 | FromDiscord | <zumi.dxy> like I said Nim tricked me into using basically Pascal lmao |
23:01:51 | FromDiscord | <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:02 | FromDiscord | <zumi.dxy> In reply to @termer "didn't the original proposal": It's got a G in it lmao |
23:02:10 | FromDiscord | <Elegantbeef> I don't know if funny how I'd describe it |
23:02:12 | termer | ok I wasn't dreaming |
23:02:15 | FromDiscord | <Elegantbeef> is how\ |
23:02:18 | FromDiscord | <Robyn [She/Her]> Yeah, I remember struggling with shifting myself away from classes and using Nim's style of OOP↵(@zumi.dxy) |
23:02:29 | FromDiscord | <Robyn [She/Her]> I struggle with changing how I think for some reason |
23:02:30 | FromDiscord | <Elegantbeef> Imagine using OOP |
23:02:35 | FromDiscord | <zumi.dxy> UFCS spoils me |
23:02:37 | termer | The circumstance and the resulting comment sure was funny |
23:02:48 | FromDiscord | <Elegantbeef> Robyn's a boomer confirmed |
23:03:01 | FromDiscord | <zumi.dxy> if people want a language that "changes the way I think about programming", well there you go |
23:03:05 | termer | I was was done with OOP pretty quickly |
23:03:08 | termer | tired of that shit |
23:03:25 | FromDiscord | <Elegantbeef> Yea just use traits and have slower code! |
23:03:31 | termer | morgan I recently switched from Go to Rust for a network thingy |
23:03:40 | FromDiscord | <Elegantbeef> Fucking hell I hate that Nim's OOP beats traitor's dispatch |
23:03:41 | FromDiscord | <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:42 | termer | wait, what's slow about traits Elegantbeef |
23:03:55 | FromDiscord | <Robyn [She/Her]> Nope, just probably an undiagnosed autistic, if my friends pestering me about getting tested unironically says anything |
23:04:05 | termer | They don't use dynamic dispatch, at least in Rust, unless you need runtime polymorphism |
23:04:15 | FromDiscord | <Elegantbeef> Jesus robyn I made a joke I don't need your whole medical file |
23:04:24 | FromDiscord | <Elegantbeef> Termer my runtime traits are slower than OOp |
23:04:26 | termer | Robyn I've pondered the same about myself, which is funny |
23:04:28 | FromDiscord | <Elegantbeef> Well Nim's OOP |
23:04:34 | termer | more like pOOP |
23:04:41 | FromDiscord | <Robyn [She/Her]> It's not even on a medical file, hence undiagnosed \:P |
23:05:19 | FromDiscord | <Elegantbeef> Of course though I have static traits as well which means stack allocated generic interfaces that beat Nim's OOP 😄 |
23:05:19 | FromDiscord | <Robyn [She/Her]> To undiagnosed mental conditions! 🍻↵(<@709044657232936960_termer=5b=49=52=43=5d>) |
23:05:33 | termer | I'm very grateful that there was enough Rust in the wild before 2021 to make ChatGPT useful for it |
23:05:35 | termer | otherwise I'd be very lost |
23:05:41 | FromDiscord | <zumi.dxy> oh man, crossbridge mentions... |
23:05:50 | termer | IRC WINS AGAIN |
23:05:55 | FromDiscord | <Elegantbeef> Why learn a language when you can just ask a LLM for it |
23:06:00 | FromDiscord | <zumi.dxy> I got chatgpt to translate a bit of C to Rust |
23:06:07 | FromDiscord | <zumi.dxy> it did pretty well |
23:06:15 | FromDiscord | <Elegantbeef> The only thing that IRC wins is the year 2000 |
23:06:31 | FromDiscord | <zumi.dxy> it compiles so I should be home and dry right↵that's what everyone tells me |
23:06:40 | FromDiscord | <zumi.dxy> in rust, to compile is to be correct |
23:06:41 | termer | unless you use unwrap |
23:06:54 | FromDiscord | <zumi.dxy> or unsafe{} |
23:07:13 | FromDiscord | <Elegantbeef> Or just break the typesystem |
23:07:15 | termer | unsafe is a boogeyman |
23:07:19 | FromDiscord | <zumi.dxy> oh sure, you can just grep for unsafe and optimize later :p |
23:07:23 | FromDiscord | <zumi.dxy> and unwrap |
23:07:26 | FromDiscord | <zumi.dxy> and clone |
23:07:28 | termer | unwrap is the real killer |
23:07:30 | termer | every single time |
23:07:47 | FromDiscord | <zumi.dxy> in nim you've got↵idk↵ptr, pointer, cast, nil, ... |
23:07:49 | FromDiscord | <Elegantbeef> https://github.com/Speykious/cve-rs |
23:07:50 | FromDiscord | <Robyn [She/Her]> \~\~dynval\~\~ |
23:07:59 | termer | dynval is the ultimate Nim construct |
23:08:06 | FromDiscord | <Robyn [She/Her]> https://git.termer.net/termer/nim-dynval |
23:08:07 | FromDiscord | <zumi.dxy> In reply to @Elegantbeef "https://github.com/Speykious/cve-rs": that bit's amazing |
23:08:15 | FromDiscord | <zumi.dxy> "NO COMPILER BUGS DON'T COUNT" |
23:08:27 | termer | If compiler bugs counted, Nim would be in trouble |
23:08:42 | termer | Robyn The original version of that I made used the dot operator and tables to make things into tables too |
23:08:43 | FromDiscord | <zumi.dxy> re dynval: Finally, Nim for Python users :p |
23:08:45 | FromDiscord | <Elegantbeef> It's not really a compiler bug |
23:08:47 | FromDiscord | <Elegantbeef> It's the type system working as intended |
23:09:06 | termer | Nim wasn't complete until it had type coercion |
23:09:29 | FromDiscord | <Robyn [She/Her]> Hm...↵(<@709044657232936960_termer=5b=49=52=43=5d>) |
23:09:29 | termer | it was patently useless until I could multiply a string containing the number 5 |
23:09:34 | FromDiscord | <Elegantbeef> The rust type system's design opens up for these issues and there is no resolution since it's "correct" |
23:09:43 | FromDiscord | <zumi.dxy> lmao |
23:09:45 | FromDiscord | <Robyn [She/Her]> Even Python isn't as bad with `"1" == 1` |
23:09:52 | FromDiscord | <zumi.dxy> not so infallible ay? |
23:09:53 | termer | but JAVASCIRPT IS |
23:09:54 | FromDiscord | <Robyn [She/Her]> It's JS \:P |
23:10:05 | termer | I based its coercion on JS, not Python |
23:10:09 | FromDiscord | <Elegantbeef> Well the math makes these cases from my understanding |
23:10:13 | termer | surprisingly, Python is pretty sane with its coercion |
23:10:20 | FromDiscord | <Robyn [She/Her]> Yeah, it's a god awful language aha↵(<@709044657232936960_termer=5b=49=52=43=5d>) |
23:10:31 | FromDiscord | <Robyn [She/Her]> Duck typed, not none typed \:P↵(<@709044657232936960_termer=5b=49=52=43=5d>) |
23:10:32 | FromDiscord | <Elegantbeef> yea `[1, 2, 3] 5` is `[5, 10, 15]` right? |
23:10:40 | FromDiscord | <Elegantbeef> Fucking `` operator |
23:10:42 | FromDiscord | <Elegantbeef> Always out to troll |
23:10:50 | termer | I don't know what that means |
23:11:01 | FromDiscord | <Robyn [She/Her]> In Python it's `[1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3]` |
23:11:09 | FromDiscord | <Elegantbeef> I know |
23:11:11 | termer | what is that |
23:11:14 | FromDiscord | <Elegantbeef> I was insulting python's `` operator as it makes no sense |
23:11:26 | termer | I have no idea what that operator is |
23:11:26 | FromDiscord | <Elegantbeef> Termer it's the go old asterix bridge bug |
23:11:29 | FromDiscord | <Robyn [She/Her]> Oh |
23:11:30 | FromDiscord | <Elegantbeef> good old\ |
23:11:39 | FromDiscord | <Robyn [She/Her]> Multiplication↵(<@709044657232936960_termer=5b=49=52=43=5d>) |
23:11:41 | FromDiscord | <Elegantbeef> We say \ |
23:11:42 | termer | oh what |
23:11:46 | FromDiscord | <Elegantbeef> You see sadness |
23:11:48 | FromDiscord | <Robyn [She/Her]> Multiplication/repeat |
23:11:57 | FromDiscord | <Robyn [She/Her]> Depending on data type in Python |
23:12:03 | termer | I know about as much Go as I do Python, which is not a lot |
23:12:08 | termer | basically I just use them when I need to |
23:12:18 | FromDiscord | <Elegantbeef> I mean Go is designed to be simple |
23:12:25 | FromDiscord | <Elegantbeef> So everyone that can write code knows Go |
23:12:32 | termer | which is why I've written some |
23:12:46 | termer | I've spent less than 2 hours total reading about Go before writing applications in it lol |
23:12:56 | FromDiscord | <zumi.dxy> inb4 a link to the infamous "Lies We Keep Telling Ourselves" blog post |
23:12:57 | FromDiscord | <Elegantbeef> That was me with Odin |
23:13:02 | FromDiscord | <Elegantbeef> Odin is... odd |
23:13:06 | termer | I ignore Odin |
23:13:07 | FromDiscord | <zumi.dxy> oddin |
23:13:16 | termer | I ignore things that steal thunder from my dear Nim |
23:13:23 | termer | which is why I ignore Zig and Odin |
23:13:28 | FromDiscord | <Elegantbeef> I wanted to try it as it's another pascallian language, but it's got questionable design |
23:13:38 | termer | Odin's claim to fame is that it's actually used |
23:13:40 | FromDiscord | <Elegantbeef> I also disagree with Bill's views on a few things |
23:13:50 | FromDiscord | <zumi.dxy> I've tried Zig but I got stuck trying to understand its build system |
23:13:56 | FromDiscord | <zumi.dxy> for some reason |
23:14:09 | FromDiscord | <Elegantbeef> Right but it's also presently slow in an apples to apples Clang Nim vs. Odin build 😄 |
23:14:23 | termer | At least Zig is trying to make a real compiler |
23:14:24 | FromDiscord | <Elegantbeef> Atleast in my binary tree example odin was twice as slow |
23:14:45 | FromDiscord | <Elegantbeef> I hate bills "Self hosting a compiler is a masturbatory venture" |
23:14:51 | FromDiscord | <Robyn [She/Her]> Is Nimskull going to make a native backend or something? \:p |
23:14:53 | FromDiscord | <zumi.dxy> also what new language doesn't use "fn" as the keyword signifying functions? :p |
23:14:59 | FromDiscord | <Robyn [She/Her]> ...what? |
23:15:25 | FromDiscord | <Elegantbeef> Yea gingerbill views selfhosting a compiler as a pointless endeavour just to fondle yourself |
23:15:33 | * | advesperacit quit () |
23:15:35 | termer | Robyn Not on the roadmap according to the GitHub |
23:15:39 | FromDiscord | <Elegantbeef> Meanwhile it makes contribution easier and more inviting |
23:15:41 | FromDiscord | <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:54 | termer | How can someone who made a lang out of annoyance from C++ think that also making your compiler self-sufficient is useless? |
23:15:56 | FromDiscord | <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:05 | FromDiscord | <Elegantbeef> Hey gingerbill also thinks git sub modules are better than package managers 😄 |
23:16:07 | FromDiscord | <zumi.dxy> (edit) "it" => "a compiler" |
23:16:14 | FromDiscord | <zumi.dxy> ew git submodules |
23:16:15 | termer | Elegantbeef That's just a C dev opinion |
23:16:19 | FromDiscord | <zumi.dxy> why do they have to be a pain |
23:16:27 | FromDiscord | <zumi.dxy> it has no reason to be a pain |
23:16:28 | termer | Git submodules are great |
23:16:34 | termer | but hard to deal with, yeah |
23:16:37 | FromDiscord | <zumi.dxy> and yet they're useful |
23:16:46 | FromDiscord | <Elegantbeef> They can be great but I would not use them for dependencies |
23:16:55 | FromDiscord | <Elegantbeef> I use a submodule for my wasm3 bindings for instance |
23:16:58 | termer | I use them for things that don't have package managers |
23:17:00 | FromDiscord | <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:01 | termer | and C libs |
23:17:04 | FromDiscord | <Elegantbeef> But I would not use it for a Nim dependency |
23:17:11 | termer | Robyn MIR should make it easier to do that |
23:17:35 | termer | Right now I'm using Git submodules to put protobuf definition files in various projects |
23:17:39 | termer | it works pretty well for that |
23:17:55 | termer | protobuf in one repo, submodule it in for server and client |
23:18:05 | FromDiscord | <Elegantbeef> Ugh protobuf |
23:18:13 | termer | protobuf makes life easier |
23:18:34 | FromDiscord | <girvo> In reply to @Elegantbeef "Of course though I": which lets be real, who needs anything else 😉 |
23:18:34 | FromDiscord | <Elegantbeef> Sure but I dislike schemaful stuffs as it tickles my brain in the wrong way |
23:18:47 | termer | go back to JS boy |
23:18:48 | FromDiscord | <girvo> I wish we'd used protobuf |
23:18:53 | FromDiscord | <girvo> We're using messagepack instead |
23:18:54 | FromDiscord | <Elegantbeef> Hell I wrote a silly binary format the other day which is practically messagepack |
23:18:59 | termer | msgpack looks good on paper |
23:19:05 | termer | good to JSON users, that is |
23:19:08 | FromDiscord | <girvo> it's... decent |
23:19:13 | termer | it's a good solution to a bad way of doing things |
23:19:21 | FromDiscord | <girvo> Because we have to take API JSON output for our device configs |
23:19:24 | FromDiscord | <Robyn [She/Her]> Fun↵(<@709044657232936960_termer=5b=49=52=43=5d>) |
23:19:25 | FromDiscord | <Elegantbeef> Bleh schemas are bad if you ask me |
23:19:39 | FromDiscord | <Robyn [She/Her]> Why are schemas bad? |
23:19:43 | FromDiscord | <Elegantbeef> Cause I'm not doing IPC |
23:19:44 | termer | you don't write protocols meant to be consumed by others and updated then |
23:19:51 | FromDiscord | <girvo> And yoink it to the the TCP server, which sends it as messagepack to the devices |
23:19:57 | FromDiscord | <Elegantbeef> I'm aiming at serialising game saves |
23:20:04 | FromDiscord | <girvo> Oh man we _need_ schemas, coz shit breaks lol |
23:20:10 | FromDiscord | <Elegantbeef> In a migration way without having to maintain a fucking schema |
23:20:17 | FromDiscord | <Robyn [She/Her]> Fair \:p |
23:20:22 | termer | I'd use SQLite for save files or some native serialization |
23:20:24 | FromDiscord | <girvo> Our schema is currently a `lithium_message` nim package that exports a `DeviceConfig` type lmao |
23:20:33 | termer | but native serialization sucks if you need to read it from something outside the lang you serialized it in |
23:20:36 | FromDiscord | <girvo> And we rely on `jsony` and `msgpack4nim` to do the right things |
23:20:40 | FromDiscord | <Elegantbeef> I'm not going to use a database to save game saves |
23:20:46 | FromDiscord | <Robyn [She/Her]> In reply to @Robyn "Makes sense, supposedly it": Oh wow this breaks (the ping) |
23:20:50 | FromDiscord | <Elegantbeef> This is local game saves why would I do something so silly |
23:20:51 | termer | Elegantbeef umad? |
23:20:59 | termer | sqlite is easy to read, that's why |
23:21:10 | FromDiscord | <Elegantbeef> Lol |
23:21:21 | termer | I just use JSON if I don't need anything special and it's not gonna be consumed by something else |
23:21:24 | FromDiscord | <Elegantbeef> Let's save a games world data inside of a database |
23:21:31 | termer | depends on your game |
23:21:48 | termer | but schemas are really useful |
23:21:54 | FromDiscord | <Elegantbeef> I mean I can use sqlite but we're talking about basic grid based levels, and I have intense NIH |
23:22:01 | termer | Elegantbeef One benefit of using SQLite is that you can use traditional DB migrations |
23:22:13 | termer | that's helpful for updating game data between versions |
23:22:19 | FromDiscord | <Elegantbeef> Right but it also is larger and has a dependency |
23:22:33 | FromDiscord | <Elegantbeef> I can use migrations if I export field names and implement procs to handle specific types |
23:22:42 | termer | you can |
23:22:50 | termer | if you have time for bespoke everything, then do what you want |
23:22:55 | FromDiscord | <Elegantbeef> `Float` -\> `Int` for `MyType` is done trivally |
23:24:05 | FromDiscord | <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:30 | FromDiscord | <Elegantbeef> Though one could probably use a macro |
23:24:45 | FromDiscord | <girvo> In reply to @Elegantbeef "Though one could probably": Rewrite all the ~~things~~ terms! |
23:25:40 | termer | Elegantbeef Write your next game in Java |
23:26:05 | FromDiscord | <Elegantbeef> Ah termer realises I also have an undiagnosed medical condition |
23:26:30 | termer | Nim is the most autistic shit, I expect the rate of ASD to be significantly higher here than most places |
23:26:40 | FromDiscord | <girvo> Most likely |
23:26:56 | FromDiscord | <Elegantbeef> But why are you telling me to use Java for my next project? |
23:27:05 | termer | Cause it was funny |
23:27:14 | FromDiscord | <Elegantbeef> I see |
23:27:15 | FromDiscord | <girvo> To make you wanna die I guess |
23:27:26 | termer | I wrote 3 games in Java |
23:27:29 | FromDiscord | <Elegantbeef> It'd take a lot to do that |
23:27:40 | FromDiscord | <Elegantbeef> Maybe java would do that |
23:27:49 | termer | It took me a few hours and learning how to render custom components with Swing 8) |
23:28:14 | FromDiscord | <Elegantbeef> What a coincidence it took me a few hours to implement my GUI system 😄 |
23:28:21 | termer | sounds about right |
23:28:34 | termer | Also learned that Java has a midi engine in it |
23:29:44 | FromDiscord | <Elegantbeef> It runs on 300000 trillion devices so of course |
23:30:07 | termer | Elegantbeef https://static.termer.net/download/313p9pxlld/smash_and_bash_die.webm |
23:30:30 | FromDiscord | <Elegantbeef> Nintendo is coming for you |
23:30:51 | FromDiscord | <girvo> Does Yuzu's death mean _nothing_ to you??? |
23:30:54 | FromDiscord | <Elegantbeef> I do have to say I'm happy my game is atleast 2% more game looking than that shitpost |
23:31:01 | FromDiscord | <girvo> fr ninty's lawyers scare me lol |
23:31:05 | FromDiscord | <zumi.dxy> > java has a midi engine↵the coolest thing about it is that it autogenerates its own fallback sf2 |
23:31:10 | FromDiscord | <zumi.dxy> soundfont |
23:31:19 | termer | I 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:34 | FromDiscord | <zumi.dxy> it's got a cheap sound but it's got its charm |
23:31:56 | FromDiscord | <zumi.dxy> you're supposed to use it with actually good soundfonts however |
23:32:26 | FromDiscord | <zumi.dxy> (edit) "it's got a cheap sound ... but" added "(as a fallback does)" |
23:33:52 | termer | Elegantbeef https://static.termer.net/download/o6fjpfuz6a/%E5%9C%96%E7%89%87.png |
23:34:22 | termer | imagine this with midi never gonna give you up |
23:36:23 | termer | https://static.termer.net/download/vl35n1yywm/%E5%9C%96%E7%89%87.png |
23:36:30 | termer | Java's the only language that can accomplish this |
23:36:44 | FromDiscord | <Elegantbeef> Termer really is a 4channer |
23:37:05 | FromDiscord | <girvo> what in the adhd... |
23:37:37 | termer | long, really good story |
23:37:52 | termer | Elegantbeef My roots do not define me. |
23:38:31 | FromDiscord | <Elegantbeef> You might not have the sins of your father but you do have the sins of your past |
23:38:47 | termer | this is very wise, very wise indeed |
23:39:28 | termer | listening to really good stereo midi of Bizarre Love Triangle |
23:57:57 | FromDiscord | <girvo> termer: whats the protobuf story on Nim? Been a bit since I looked |
23:58:39 | FromDiscord | <Elegantbeef> Pmunch does have a nice lib that does not require protoc |