<< 02-10-2023 >>

00:05:52*Mister_Magister quit (Quit: bye)
00:06:13FromDiscord<patitotective> im kind of confused with nim 2.0.0↵i did nimble install on my local library and it installed it on a pkgs2 folder instead of the pkgs folder↵but when i compile with nim 2.0.0 it still uses the pkgs folder version of the library instead of the pkgs2, am i missing something?
00:07:05FromDiscord<patitotective> (edit) "library" => "package"
00:07:18FromDiscord<Elegantbeef> Nimble 0.14 is funny
00:07:18FromDiscord<Elegantbeef> It uses pkgs and pkgs2
00:07:33FromDiscord<patitotective> so should i update my nimble?
00:07:42FromDiscord<Elegantbeef> No you should cry
00:07:47*Mister_Magister joined #nim
00:08:11FromDiscord<patitotective> thats not very reassuring
00:08:33FromDiscord<Elegantbeef> You need to remove the `pkgs` inside your nim config file
00:08:36FromDiscord<Phil> In reply to @patitotective "im kind of confused": My recommendation:↵Make a nimbledeps folder so it uses project local dependencies
00:09:14FromDiscord<Phil> literally just make the folder, nimble scans for that, notice its there and install the required dependencies defined in your nimble file
00:09:42FromDiscord<Phil> (edit) "install" => "installs" | "installsthe required dependencies defined in your nimble file ... " added "into there"
00:10:12FromDiscord<Phil> Doing that and using --path is the thing I've started doing more and found it pretty nice
00:35:57*rockcavera quit (Remote host closed the connection)
00:47:26*rockcavera joined #nim
00:59:35*krux02 quit (Remote host closed the connection)
01:07:57FromDiscord<__nycto__> Question:↵if I’ve got two memory pools that I’m representing as UncheckedArrays, what’s the idiomatic way to move a value between them without calling =copy? Should I just manually call =sink?
01:08:22FromDiscord<__nycto__> (edit) "I’m representing" => "are implemented"
01:08:57FromDiscord<Elegantbeef> `a[ind] = b[ind]`
01:09:25FromDiscord<Elegantbeef> If you want to certainly move you can do `a[ind] = ensureMove b[ind]`
01:10:18FromDiscord<__nycto__> Awesome I’ll give that a try. The first mechanism was calling =copy for me
01:10:43FromDiscord<Elegantbeef> Well Nim copies when a sink cannot be made
01:12:02FromDiscord<__nycto__> Yup — this is a situation where I have more context than the compiler.
01:15:18FromDiscord<my.narco> how to can i write a whole ``seq[uint64]`` to a file?
01:15:37FromDiscord<Elegantbeef> `writeData` in syncio i believe
01:15:51FromDiscord<my.narco> it asks for a pointer
01:15:56FromDiscord<my.narco> how can i convert a seq to ptr?
01:16:13FromDiscord<Elegantbeef> `mySeq[0].addr`
01:16:38FromDiscord<my.narco> https://media.discordapp.net/attachments/371759389889003532/1158210901120385224/image.png?ex=651b6b75&is=651a19f5&hm=7ebf5cd6abd42ed1f55fd081cef5bed71790500646ca8e5e4e1596357fc660ef&
01:16:46FromDiscord<my.narco> it expects a pointer
01:16:51FromDiscord<my.narco> like the type ``pointer``
01:16:58FromDiscord<Elegantbeef> `pointer` is implicitly converted to
01:17:06FromDiscord<sOkam! 🫐> In reply to @my.narco "like the type ``pointer``": `ptr T is pointer == true`
01:17:29FromDiscord<my.narco> sent a code paste, see https://play.nim-lang.org/#ix=4HX6
01:17:37FromDiscord<Elegantbeef> The issue is you didnt supply how much to write
01:17:38FromDiscord<Elegantbeef> `sizeof(uint64) mySeq.len`
01:17:48FromDiscord<my.narco> i gotta stop probramming when its late
01:21:29FromDiscord<Elegantbeef> Remember that'll print the binary data, so if you do not want that you need to do something else
02:16:32FromDiscord<diogenesoftoronto> my cli-app works for the happy path right now there are some improvements to be add but this is not a bad state for this tool right now. I have some bugs to fix and tests to write and a few documentation / ux comforts but it is mostly how i want it to work which is awesome! https://media.discordapp.net/attachments/371759389889003532/1158225978615676998/image.png?ex=651b7980&is=651a2800&hm=6b2f08eabff9771ebc2de8bc5cd79c641eae9b98
02:16:52FromDiscord<diogenesoftoronto> cligen is pretty nice man
02:20:19FromDiscord<diogenesoftoronto> its nice to be back to writing nim after so long
02:37:27FromDiscord<sOkam! 🫐> sent a code paste, see https://paste.rs/iNpcr
03:10:29FromDiscord<odexine> not sure if asan tracks the nim allocator
03:10:36FromDiscord<odexine> rather lsan
03:13:45FromDiscord<Elegantbeef> Tooling does not know the Nim allocator, you need to use `-d:useMalloc`
04:16:03FromDiscord<sOkam! 🫐> ?
04:16:29FromDiscord<sOkam! 🫐> sent a code paste, see https://play.nim-lang.org/#ix=4HXA
04:20:33FromDiscord<odexine> `-d` or `--define` not `--d`?
04:20:42FromDiscord<odexine> i'm surprised that doesnt complain
04:34:36FromDiscord<Elegantbeef> Using orc @sOkam! 🫐 ?
04:57:03FromDiscord<sOkam! 🫐> yeah, why
04:58:49FromDiscord<sOkam! 🫐> the sanitizer is complaining because I have a bunch of objects that I allocate with wgpu and never release because im nub 🤷‍♂️ and i have a massive 2GB ram leak per frame. so yeah, its not nim thats the issue
04:58:57FromDiscord<Elegantbeef> Cause `useMalloc` only works for Orc/ARc
04:59:06FromDiscord<Elegantbeef> Time to use destructors
04:59:28FromDiscord<sOkam! 🫐> how would that work for C objects?
05:00:34FromDiscord<Elegantbeef> you make a `=destroy` that calls the deallocation object
05:00:38FromDiscord<Elegantbeef> deallocation proc
05:00:58FromDiscord<sOkam! 🫐> i understand, but how would that work in practice? what am i supposed to do with it
05:01:07FromDiscord<Elegantbeef> Orc/arc handles it
05:01:11FromDiscord<Elegantbeef> I'm uncertain what you mean
05:01:27FromDiscord<sOkam! 🫐> i heard that you need to X or Y or else hooks don't work
05:01:56FromDiscord<Elegantbeef> You define a hook for your type, it works
05:02:06FromDiscord<sOkam! 🫐> i don't remember what it was, but i remember something being specifically about them needs to be setup in a certain way or else they don't work
05:02:09FromDiscord<Elegantbeef> You do not need to do anything to have a hook invoke other than declare it
05:02:21FromDiscord<Elegantbeef> https://github.com/beef331/nimscripter/blob/dll/src/nimscripter/nimscr.nim#L82-L94
05:02:46FromDiscord<sOkam! 🫐> then why were you saying here in this chat to somebody that "you need to X/Y or else they are not recognized or not work" (paraprhasing)
05:02:47FromDiscord<Elegantbeef> An example of hooks using FFI
05:02:55FromDiscord<Elegantbeef> I never said that
05:03:03FromDiscord<Elegantbeef> Hooks only work on `object` or `distinct` types
05:03:05FromDiscord<Elegantbeef> That's it
05:03:10FromDiscord<sOkam! 🫐> i don't know what said or in which context
05:03:15FromDiscord<sOkam! 🫐> but i remember something
05:03:49FromDiscord<sOkam! 🫐> In reply to @Elegantbeef "Hooks only work on": so you randomnly declare them in whatever file you want?
05:04:05FromDiscord<sOkam! 🫐> they don't need to happen before anything?
05:06:03FromDiscord<sOkam! 🫐> i vividly remember someone saying that their hooks were not being run, and someone answering that they needed to do [insert thing] so that they are recognized before being run, otherwise nim reads the default hooks
05:06:39FromDiscord<arathanis> there are a certain set of hooks that rely on each other and if you don't specify your intention to declare your own ahead of time you will still get an autogenerated one
05:06:59FromDiscord<sOkam! 🫐> how do you declare it ahead of time?
05:07:26FromDiscord<Elegantbeef> They need to be declared in the module with the type
05:07:39FromDiscord<Elegantbeef> And be declared before the type is used
05:07:57FromDiscord<sOkam! 🫐> i see. so there is something specific about them, see
05:08:02FromDiscord<Elegantbeef> If a type is used before a hook is declared your hook is obviously not used
05:08:04FromDiscord<sOkam! 🫐> kk ty ✍️
05:08:15FromDiscord<sOkam! 🫐> because im the type of person to 1000% crash on that
05:08:48FromDiscord<arathanis> you basically have to provide a forward declaration which i think is just a bodyless proc def
05:08:49FromDiscord<arathanis> https://nim-lang.org/docs/destructors.html#lifetimeminustracking-hooks-nimeqtrace-hook
05:09:04FromDiscord<arathanis> this is the section that talks about it, its for `=destroy` and `=trace`
05:09:22FromDiscord<Elegantbeef> My nimscripter example does show how to forward declare them and everything
05:10:04FromDiscord<sOkam! 🫐> in my experiences so far, forward declarations cannot be in a different file than their definition (or at least I haven't found a way to do that) so kinda the same for this specific situation
05:10:50FromDiscord<sOkam! 🫐> will try to do that tomorrow, im giga brainded right now ✍️
05:11:00FromDiscord<Elegantbeef> I mean of course they cannot be in a seperate file
05:11:05FromDiscord<Elegantbeef> Nim is a module based language
05:11:26FromDiscord<Elegantbeef> If you forward declare a proc in module a unless you implement it in module a it'll be a different proc
05:11:39FromDiscord<Elegantbeef> You can use `include` to get around that, but don't use include
05:13:52FromDiscord<sOkam! 🫐> oh i think i know where the leak is from. happened last time without the abstraction↵it must be the texture view/data not being freed each frame
05:41:11*advesperacit joined #nim
05:48:09*azimut quit (Ping timeout: 252 seconds)
05:54:27*rockcavera quit (Remote host closed the connection)
06:08:01*junaid_ joined #nim
06:44:13*PMunch joined #nim
07:07:32*advesperacit quit (Ping timeout: 272 seconds)
07:07:39*advesperacit_ joined #nim
08:20:29*advesperacit_ quit (Ping timeout: 258 seconds)
08:20:48*advesperacit joined #nim
08:32:25*blop_ quit (Ping timeout: 252 seconds)
08:33:35*blop_ joined #nim
08:35:54*PMunch_ joined #nim
08:38:43*PMunch quit (Ping timeout: 264 seconds)
08:44:53*PMunch_ is now known as PMunch
09:09:07*junaid_ quit (Remote host closed the connection)
10:03:49FromDiscord<aintea> sent a code paste, see https://play.nim-lang.org/#ix=4HYr
10:08:56FromDiscord<vindaar> the issue is your explicit usage of `{` and `}` at the beginning/end of the string mess it up
10:09:23FromDiscord<aintea> so I need to `\{` ?
10:09:52FromDiscord<demotomohiro> https://nim-lang.org/docs/strformat.html
10:10:35FromDiscord<demotomohiro> https://nim-lang.org/docs/strformat.html#fmt.t%2Cstaticstring%2Cstaticchar%2Cstaticchar
10:11:00FromDiscord<demotomohiro> You can set custom `openChar`, `closeChar`
10:11:44FromDiscord<demotomohiro> > Parts of the string that are enclosed in the curly braces are interpreted as Nim code. To escape a { or }, double it.
10:12:45FromDiscord<aintea> thanks
10:28:59*junaid_ joined #nim
11:10:01*def- quit (Quit: -)
11:10:18*def- joined #nim
11:15:08*def- quit (Client Quit)
11:15:21*def- joined #nim
11:39:17FromDiscord<jviega> In reply to @heysokam "in my experiences so": You can do it without having to use `include`. In the file you need the prototype, do `proc foo() {.importc.}` And then for the actual declaration in the other file, make sure you're going to get a compatable declaration with `{.exportc, cdecl.}`
12:19:04*rez joined #nim
12:19:25*rez quit (Client Quit)
13:09:36*PMunch quit (Quit: Leaving)
13:40:52*rez joined #nim
13:44:53*rez quit (Client Quit)
13:44:57FromDiscord<sOkam! 🫐> In reply to @jviega "You can do it": neat trick
13:45:19*cnx quit (Ping timeout: 264 seconds)
13:49:27FromDiscord<jviega> Thanks, it only took me like 8 months to come up w/ it 😦
13:53:48*cnx joined #nim
14:02:32*rockcavera joined #nim
14:07:35*junaid_ quit (Remote host closed the connection)
14:11:44NimEventerNew Nimble package! sigui - Easy to use and flexible UI framework in pure Nim, see https://github.com/levovix0/sigui
14:40:59FromDiscord<sOkam! 🫐> @levovix https://github.com/DanielBelmes/vulkan btw
14:41:08FromDiscord<sOkam! 🫐> nimgl/vulkan is beyond outdated
14:58:11FromDiscord<levovix> thanks, didn't know about this package
15:07:31*Guest23 joined #nim
15:08:12*Guest44 joined #nim
15:08:28*Guest23 quit (Client Quit)
15:17:48*junaid_ joined #nim
15:22:58*Guest44 quit (Quit: Client closed)
15:32:12*azimut joined #nim
15:34:49NimEventerNew thread by ingo: System.string, see https://forum.nim-lang.org/t/10524
15:54:25FromDiscord<_gumbercules> One day someone will build a UI framework that is actually a UI framework and not an application framework
15:54:49FromDiscord<_gumbercules> With Nim I mean
15:58:55*junaid_ quit (Remote host closed the connection)
16:13:08FromDiscord<Chronos [She/Her]> Do y'all think Netty (the Nim library) would be compatible with the Raknet standard that MC Bedrock edition uses?
16:13:14FromDiscord<Chronos [She/Her]> Since Netty also uses Raknet, right?
16:14:10FromDiscord<Chronos [She/Her]> All I'd need to do is make sure the packet data is correct for communication
16:15:21FromDiscord<sOkam! 🫐> sent a code paste, see https://play.nim-lang.org/#ix=4HZv
16:16:05FromDiscord<sOkam! 🫐> (edit) "https://play.nim-lang.org/#ix=4HZv" => "https://play.nim-lang.org/#ix=4HZw"
16:16:14*def- quit (Quit: -)
16:16:50*def- joined #nim
16:17:04FromDiscord<jviega> If it's alloc'd normally, then yes the assignment will decref the old data
16:17:05FromDiscord<Elegantbeef> Orc only manages objects with destructors so if your type isnt a `ref` or doesnt have a destructor it doesnt manage it
16:17:33FromDiscord<sOkam! 🫐> kk, didin't know the assignment is what dereferences ✍️
16:17:44FromDiscord<sOkam! 🫐> what would happen in the stack case? how is that managed?
16:18:01FromDiscord<Elegantbeef> It calls the destructor
16:18:29FromDiscord<Elegantbeef> It's not that assignment decrements the counter as much as calling the ref destructor decrements the counter
16:18:46FromDiscord<Elegantbeef> Cause it no longer is referenced
16:18:54FromDiscord<jviega> In a non-refcounting approach btw, it gets cleaned up when the collector notices that no "root" memory cells (global variables, stuff on your stack, etc) point to it anymore.
16:19:25FromDiscord<sOkam! 🫐> there is a default stack collector?
16:19:31FromDiscord<sOkam! 🫐> even in C?
16:19:35FromDiscord<sOkam! 🫐> or did you mean something else
16:19:50FromDiscord<Elegantbeef> There is no stack collector
16:20:20FromDiscord<Elegantbeef> The stack grows and shrinks at the end of the current stack frame
16:20:45FromDiscord<sOkam! 🫐> > In a non-refcounting approach ... it gets cleaned up when the collector....↵That's why i asked about a collector. If we are talking non-rc.... then what's the collector there from?
16:21:26FromDiscord<Elegantbeef> The garbage collector inside refc for ref types
16:21:30FromDiscord<Elegantbeef> for instance
16:21:50FromDiscord<sOkam! 🫐> kk
16:22:01FromDiscord<Elegantbeef> You're talking about garbage collection so of course we're not really talking about stack data
16:22:26FromDiscord<sOkam! 🫐> In reply to @Elegantbeef "The stack grows and": how is the stack data managed on reasignment then? assuming --mm:none or C for a moment
16:22:44FromDiscord<Elegantbeef> Nothing happens
16:22:47FromDiscord<Elegantbeef> you move data from b onto a
16:23:10FromDiscord<sOkam! 🫐> but what about the previous? is it just overwritten and thats it?
16:23:20FromDiscord<Elegantbeef> The stack doesnt need any management
16:23:25FromDiscord<Elegantbeef> Everytime you call a function the stack grows and every time you exit it shrinks
16:23:38FromDiscord<Elegantbeef> Yes the stack does not need any management due to how it works
16:23:39FromDiscord<sOkam! 🫐> yeah but my question is about the why, i believe
16:23:58FromDiscord<sOkam! 🫐> if the data is just overwritten, then that would explain it. im just asking if that's the case
16:24:46FromDiscord<Elegantbeef> The stack is a simple fixed size memory allocation that you write to as you go down there is generally no clearing which is why in C the idiom of `MyStruct val = {}` exists
16:25:06FromDiscord<sOkam! 🫐> kk
16:25:09FromDiscord<Elegantbeef> This is also why many modern languages implicitly clear to 0
16:25:19FromDiscord<Elegantbeef> It's not memory safe to do `MyStruct val;`
16:25:32FromDiscord<Elegantbeef> Since if `MyStruct` has a pointer in it and you dereference it you get random memory
16:25:50FromDiscord<sOkam! 🫐> yeah ik
16:26:49FromDiscord<sOkam! 🫐> In reply to @Elegantbeef "The stack is a": the "going down" of this is confusing though↵is the data overwritten or are new stack allocations done instead?
16:27:38FromDiscord<sOkam! 🫐> (edit) "In reply to @Elegantbeef "The stack is a": the "going down" of this is confusing though↵is the ... data" added "stack"
16:28:21FromDiscord<Elegantbeef> A procedure grows the stack to what it needs when it's called there is no dynamic stack allocations unless you use alloca
16:28:21FromDiscord<Elegantbeef> Never use alloca
16:29:07FromDiscord<sOkam! 🫐> you are asking a bigger question that i don't quite understand the depth of.... my question is much simpler
16:29:26FromDiscord<sOkam! 🫐> is the data overwritten or not? what happens to the old data, in the most stupidest-simplest way to see it?
16:29:37FromDiscord<Elegantbeef> Nothing happens to the old data
16:29:43FromDiscord<sOkam! 🫐> (edit) "asking" => "answering"
16:29:56FromDiscord<sOkam! 🫐> -answering- _typo_
16:30:20FromDiscord<Elegantbeef> That's how the stack works, you write to it, there is no clearing
16:30:29FromDiscord<sOkam! 🫐> then its overwritten?
16:30:54FromDiscord<Elegantbeef> Later on when you go to another stackframe that occupies the same space
16:31:00FromDiscord<sOkam! 🫐> if i have a box of 8 switches, do i flip the switches into new states, or do i ignore this box forever and use another one?
16:31:33FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4HZB
16:31:42FromDiscord<jviega> Stacks are stacks in every programming language ever. You push and pop stuff on the stack, and if you pop a call frame and push a new one one, the same memory gets reused
16:31:46FromDiscord<Elegantbeef> You need to understand there is nothing magical about the stack
16:32:10FromDiscord<sOkam! 🫐> im not asking about those huge questions you are answering, guys
16:32:16FromDiscord<jviega> Like Beef said, 99.9% of languages (the ones where there are letters other than C in the name) will zero out the memory of anything pushed
16:32:17FromDiscord<Elegantbeef> It's a simple memory allocation principle
16:32:29FromDiscord<Elegantbeef> There is another box
16:32:39FromDiscord<Elegantbeef> You never need to worry about where the memory is going on the stack
16:32:48FromDiscord<Elegantbeef> Your memory is only valid until the end of the stack frame
16:32:49FromDiscord<jviega> Not sure I understand what you don't understand and want to know then 🙂
16:32:50FromDiscord<sOkam! 🫐> i know i don't need to worry, im just wondering
16:33:23FromDiscord<Elegantbeef> I don't get what you're asking
16:34:27FromDiscord<Elegantbeef> In the above example calling `doThing` grows the stack by `sizeof(int)` you write `0` to that, then call `echo` which grows the stack frame further. echo exits popping the stack frame smaller, then you exit `doThing` popping it back to the original size, rinse and repeat for `doOtherThing`
16:35:00FromDiscord<Elegantbeef> If this doesnt help your question I don't know what to say
16:40:33FromDiscord<sOkam! 🫐> sent a code paste, see https://play.nim-lang.org/#ix=4HZG
16:41:11FromDiscord<sOkam! 🫐> there is a big difference between using new space and forgetting about the old... than writing to that exact same space
16:41:38FromDiscord<Elegantbeef> `otherThing` uses other memory, `thing` copies the memory from `otherThing`
16:41:46FromDiscord<Elegantbeef> `thing` cannot move in memory
16:42:01FromDiscord<Elegantbeef> It's not a pointer variable it's a variable stuck in the stack
16:42:21FromDiscord<jviega> That's unclear and not a question. Anything on the stack, whether it copies it or not, will go away when your function returns. If you copied it, you may have that copy somewhere else, be it on the heap or farther up the stack
16:42:22FromDiscord<sOkam! 🫐> In reply to @Elegantbeef "`otherThing` uses other memory,": omg beef, please simplify it. im not writting `otherthing` representing a separate variable. its pseudocdoe
16:42:36FromDiscord<jviega> But the local variable and its contents are not directly available to you
16:42:58*junaid_ joined #nim
16:43:04FromDiscord<Elegantbeef> I mean it doesnt matter if `otherThing` is an expression, a variable or a procedure call
16:43:23FromDiscord<sOkam! 🫐> imagine its just data
16:43:31termerCool pic I'm sharing with you guys:
16:43:33termerhttps://static.termer.net/download/tycffypc4n/invisible_bike_still_frame_photo_of_cat_jumping_without_watermark.jpg
16:43:33FromDiscord<sOkam! 🫐> no expression, variable, prodecure call. just data
16:44:04FromDiscord<Elegantbeef> It's a variable assignment, so i already did imagine it as data
16:44:32FromDiscord<sOkam! 🫐> then i understand even less
16:44:33FromDiscord<Elegantbeef> You copy from other thing and that's all there is to it
16:44:55FromDiscord<Elegantbeef> `thing` is just a index inside of a `array[StackSize, byte]`
16:45:01FromDiscord<sOkam! 🫐> its fine, its not the end of the world. i can live without understanding this one. ty for trying to explain it ✍️
16:45:22FromDiscord<Elegantbeef> There isnt much special about what's going on
16:46:05FromDiscord<Elegantbeef> You assign a variable that assignes `stack[thing]`'s data to the data on the right of `=`
16:46:08FromDiscord<jviega> This is a very important concept esp if you're doing C interfacing, sOkam
16:46:25FromDiscord<Elegantbeef> Assignment is just `copyMem(addr a, addr b, sizeof(a))`
16:46:51FromDiscord<Elegantbeef> At-least conceptually
16:46:51*junaid_ quit (Remote host closed the connection)
16:47:01FromDiscord<jviega> The best way to learn it tho is to deal with corrupted stacks perhaps 🙂
16:47:23FromDiscord<Elegantbeef> What a cruel thing to impart on someone
16:47:46FromDiscord<Elegantbeef> "My pointers are randomly changing their values only when I call X function"
16:48:32FromDiscord<jviega> Oh yeah, nothing like C heisenbugs. If they're not this kind of issue, then it's some other issue likely to have deep security implications 🙂
16:48:57FromDiscord<Elegantbeef> Hey buffer overflow is not a security bug, it's an exploit feature!
16:49:51FromDiscord<jviega> I think people would be shocked if they new how often one byte HEAP overflows are actually exploitable.
16:51:25FromDiscord<Elegantbeef> Pascal\: "Wait you're using nil terminated buffers?!"
16:52:29FromDiscord<diogenesoftoronto> Are fixed buffers really fixed?
16:53:14FromDiscord<Elegantbeef> It's in the name they're totally fixed!
16:53:15FromDiscord<Elegantbeef> You ever make a commit message like "Fixed X for realsies this time"?
16:53:18FromDiscord<jviega> That's not a specific enough question, but generally I'd expect it's there in the name
16:55:13FromDiscord<diogenesoftoronto> If you try accessing memory beyond what a fixed buffer gives you your program panics but how do panics actually work? Is it just like quit(1) or something
16:55:34FromDiscord<Elegantbeef> In Nim it's a range defect and it closes the program
16:55:37FromDiscord<Elegantbeef> Well index defect
16:56:18FromDiscord<Elegantbeef> Now if you compile without `--panics:on` you technically can catch the defect, but please don't thanks
16:56:19FromDiscord<jviega> No, that's language and hardware dependent, but generally if you're not in an environment w/ automated bounds checking, the "fixed" buffer isn't a concept under the hood and your write keeps going
16:56:44FromDiscord<Elegantbeef> C's `T a[10]` enters the chat
16:56:52FromDiscord<jviega> Now if you read or write onto a page that doesn't exist, the hardware will usually page fault
16:56:59FromDiscord<jviega> And deliver SIGSEGV
16:57:16FromDiscord<diogenesoftoronto> Usually
16:57:22FromDiscord<diogenesoftoronto> :MeguDed:
16:57:36FromDiscord<Elegantbeef> Implementation defined
16:58:09FromDiscord<jviega> There are all sorts of other conditions too. But a lot of the ways things fail can be due to how what you overwrote is used
17:45:46FromDiscord<my.narco> hooray! https://media.discordapp.net/attachments/371759389889003532/1158459823176831016/image.png?ex=651c5348&is=651b01c8&hm=da596c63f1b34dbc6e037ff2242bce5f3e70e5cf4291a6275e14caa03a0d1a69&
17:58:25FromDiscord<diogenesoftoronto> Too much anime
18:03:23FromDiscord<Chronos [She/Her]> No such thing as too much anime 😎
18:14:52FromDiscord<michaelb.eth> https://media.discordapp.net/attachments/371759389889003532/1158467145588555867/image.png?ex=651c5a1a&is=651b089a&hm=0edf0d9a37d5fc18bf737563995734d05e1a955fa9943a2fe8865bd992b7e1af&
18:16:19FromDiscord<michaelb.eth> whoops, just realized this is main, not offtopic, oh well
18:44:30om3gaHello! Is it possible to mute dlopen warnings for specific shared lib? db_connector/db_mysql tries to load libmysqlclient, then libmariadbclient which I use.
18:46:35FromDiscord<varriount> @juancarlospaco How much effort would it take to set up a GitHub action to run reformatters over PRs (for files like JSON and Markdown) and suggest changes?
18:47:06FromDiscord<varriount> In reply to @om3ga "Hello! Is it possible": What warnings are you getting?
18:47:35om3gavarriount: dlopen(libmysqlclient.dylib, 2): image not found
18:51:01FromDiscord<varriount> Odd, it's using the standard Nim dynlib mechanism, and as far as I know, that doesn't normally emit those messages. What command line are you using to compile things?
18:52:00emeryom3ga: you could link to the libary at compile time like the grownup languages do
18:52:48FromDiscord<michaelb.eth> In reply to @emery "om3ga: you could link": in that case would need to pair with `--dynlibOverride:...` passed to Nim compiler
18:52:51om3gavarriount: --d:nimDebugDlOpen to have info if dynlib failed to load, but since I have mariadbclient, mysqlclient warnings are false positive
18:53:15om3gamichaelb.eth: oh! thanks a lot! I will try
18:54:16FromDiscord<michaelb.eth> ah yeah, if you're happy with dlopen for mariadbclient then maybe `--dynlibOverride:mysqlclient` will be enough
18:56:04om3gagreat, thank you!
18:56:57FromDiscord<juancarlospaco> In reply to @varriount "<@265644131521527808> How much effort": What do you mean ?, something like ?: ↵https://github.com/super-linter/super-linter#super-linter
19:29:04FromDiscord<aintea> sent a code paste, see https://play.nim-lang.org/#ix=4I0f
19:29:41*antranigv joined #nim
19:33:05FromDiscord<Elegantbeef> More context would be better
19:41:25FromDiscord<.aingel.> Whats the standard way to report errors in a nim proc? Exceptions?
19:42:36FromDiscord<Elegantbeef> Exceptions are Nim's choice for error handling you can also use Sentinels, Options, Results, or any other error method though
19:45:59FromDiscord<.aingel.> Gotcha thanks!
19:53:43FromDiscord<aintea> sent a code paste, see https://play.nim-lang.org/#ix=4zIt
19:53:59FromDiscord<aintea> (edit) "https://play.nim-lang.org/#ix=4zIt" => "https://paste.rs/bBMMx"
19:55:15FromDiscord<Elegantbeef> What's the full error?
19:55:55FromDiscord<aintea> sent a code paste, see https://play.nim-lang.org/#ix=4I0j
19:56:12FromDiscord<Elegantbeef> `import std/json` in this module
19:57:02FromDiscord<aintea> no way i forgot to readd it after i removed it
19:57:05FromDiscord<aintea> thanks
19:57:48FromDiscord<Elegantbeef> You likely exported `JsonNode` in one of your other modules
19:57:48FromDiscord<Elegantbeef> But as you didnt export `[]` you only had the type
19:59:45FromDiscord<Elegantbeef> also there is a nice `/` operator inside `std/paths` and `std/os`
19:59:53FromDiscord<Elegantbeef> so you can just do `configpath / "songs_folder"`
20:00:43FromDiscord<Elegantbeef> No clue if this is supposed to support any other os but you also should likely use `getTempDir() / "songs_folder"`
20:07:33FromDiscord<Langosta> Does anybody know any good resources for network programming?
20:07:50FromDiscord<Langosta> I’ve found a few books, but they seem to be very lang specific at times
20:09:41Amun-Rafor C, there's https://beej.us/guide/bgnet/
20:12:07FromDiscord<raynei486> it's not hard to translate it to Nim tbh
20:12:25Amun-Ramhm
20:15:46FromDiscord<michaelb.eth> anyone read Beej's Guide to C Programming?↵I've never really learned C, just picked up stuff here and there, wondering if it's worth the time to work through it or there's a better resource/s
20:18:13Amun-Ralong time ago
20:18:32FromDiscord<varriount> In reply to @juancarlospaco "What do you mean": Pretty much, although the readme for super-linter is unclear as to whether it creates "suggestion" comments in the PR diffs, like this:↵https://github.com/nim-lang/Nim/pull/22701/files/5d92a2aa7e2f6d2eb760c9082f9fd46efa4a8d2e#r1326418741
20:18:45Amun-Rait was frequently recommended on ##C
20:33:10FromDiscord<sOkam! 🫐> In reply to @michaelb.eth "anyone read Beej's *Guide": Modern C
20:33:27FromDiscord<sOkam! 🫐> beej's guide is not bad, but modernc is much better and more complete, imo
20:33:40FromDiscord<sOkam! 🫐> his stuff in networking is pretty good though
20:44:19FromDiscord<.aingel.> So if I make a cpp wrapping for nim, I can have that compiled so when someone installs from nimble, they don't need to use the cpp backend anymore right?
20:44:26FromDiscord<.aingel.> They can use c or whatever else?
20:44:52FromDiscord<.aingel.> (edit) "So if I make ... alibrary," added "nim bindings for" | "wrapping for nim," => "library,"
20:45:21FromDiscord<Elegantbeef> If you use `importcpp` it needs the C++ backend
20:46:18FromDiscord<Elegantbeef> What you need to do is make a stable FFI that can be used by any language to not need the C++ backend
20:46:47FromDiscord<Elegantbeef> Due to how C++ works you pretty much either need to remake a C++ compiler or use a C++ compiler to do a lot of the interop Nim gives you
20:47:36FromDiscord<.aingel.> Whoa um...
20:48:22FromDiscord<.aingel.> Are there any nimble libraries that wrap a cpp library?
20:48:45FromDiscord<.aingel.> So if you include that it forces your whole project to use the cpp compiler?
20:48:50FromDiscord<.aingel.> (edit) "compiler?" => "backend?"
20:49:01FromDiscord<.aingel.> I'm actually doing import c
20:49:22FromDiscord<.aingel.> Because there's a wrapper cpp file that makes a c header for the cpp stuff
20:49:45FromDiscord<.aingel.> So my nim code (for the wrapper) only uses importc, but it links to / compiles cpp
20:49:56FromDiscord<.aingel.> But it doesn't use importcpp
20:49:59FromDiscord<.aingel.> Would that be okay then?
20:52:00FromDiscord<my.narco> what the fuck 😭 https://media.discordapp.net/attachments/371759389889003532/1158506691097276566/image.png?ex=651c7eef&is=651b2d6f&hm=52466a7b7a2a97054810ab92628e7c8a320bc8a6b1ab26b55f3e72c5089fc101&
20:54:04FromDiscord<Elegantbeef> If you use importc on a c header you're not using C++ interop
20:54:12*advesperacit quit ()
20:54:31FromDiscord<Elegantbeef> What the fuck the fuck?
21:00:05*rez joined #nim
21:01:00FromDiscord<Chronos [She/Her]> Hey all, how would I build docs for my library from Nimble?-
21:01:35FromDiscord<michaelb.eth> In reply to @heysokam "beej's guide is not": cool, thanks for the suggestion
21:02:25FromDiscord<michaelb.eth> In reply to @heysokam "Modern C": this one? https://www.manning.com/books/modern-c
21:04:39FromDiscord<raynei486> In reply to @my.narco "what the fuck 😭": building interpreter?
21:05:04FromDiscord<my.narco> In reply to @raynei486 "building interpreter?": building a compiler
21:05:08FromDiscord<sOkam! 🫐> In reply to @michaelb.eth "this one? https://www.manning.com/books/modern-c": yep!
21:05:33FromDiscord<my.narco> In reply to @raynei486 "building interpreter?": kind of like java compiles to javac and jvm runs javac. mine is noli compiles to nolic and nolivm runs nolic
21:06:02FromDiscord<Chronos [She/Her]> Someone spill the secrets to generating docs please 💀
21:06:42FromDiscord<Elegantbeef> `nim doc`
21:07:54FromDiscord<Chronos [She/Her]> For the entire nimble project
21:08:02FromDiscord<sOkam! 🫐> sent a code paste, see https://play.nim-lang.org/#ix=4I0v
21:08:12FromDiscord<Chronos [She/Her]> Thank you :D
21:08:21FromDiscord<Chronos [She/Her]> How does the git.url work?
21:08:28FromDiscord<sOkam! 🫐> your url
21:08:35FromDiscord<sOkam! 🫐> you just place it there 🤷‍♂️
21:08:56FromDiscord<Elegantbeef> https://nim-lang.org/docs/docgen.html
21:08:57FromDiscord<sOkam! 🫐> the {} is not placeholder, is std/strformat
21:09:09FromDiscord<Chronos [She/Her]> Yeah thought so bc of the `&`
21:09:35FromDiscord<sOkam! 🫐> sent a code paste, see https://play.nim-lang.org/#ix=4I0w
21:13:30FromDiscord<Chronos [She/Her]> Thanks sOkam!
21:14:13FromDiscord<michaelb.eth> In reply to @heysokam "yep!": following the links here: https://gustedt.gitlabpages.inria.fr/modern-c/↵there's an edition of the book that can be freely downloaded, and the example code can be freely downloaded (see Download buttons on left side of pages)↵https://inria.hal.science/hal-02383654↵https://inria.hal.science/hal-03345464
21:18:35FromDiscord<raynei486> In reply to @my.narco "kind of like java": interesting, got a repo?
21:18:38FromDiscord<my.narco> well i wrote a decompiler and.... i still cant find the problem! what the fuck, i mustve really done something wrong writing this code generator... https://media.discordapp.net/attachments/371759389889003532/1158513392877850714/image.png?ex=651c852d&is=651b33ad&hm=6f609dcde7d26263c790c4ade4b9f8cabebc019a389ce675bc6e4324e15326f0&
21:18:43FromDiscord<my.narco> In reply to @raynei486 "interesting, got a repo?": ah yeah its private though
21:18:49FromDiscord<my.narco> i will public it actually
21:18:54*rez quit (Quit: much snoozes...)
21:19:37FromDiscord<my.narco> In reply to @raynei486 "interesting, got a repo?": https://github.com/anthony-63/Noli
21:20:29FromDiscord<sOkam! 🫐> In reply to @michaelb.eth "following the links here:": yes, that's the one i read too, the one from hal that's freely available
21:20:41FromDiscord<michaelb.eth> okay, cool, good to hear
21:28:29FromDiscord<raynei486> @my.narco you can simplify a lot of your `exec.nim` with some simple templates
21:28:34FromDiscord<raynei486> a lot of code duplication
21:28:42FromDiscord<my.narco> In reply to @raynei486 "<@811230507408031774> you can simplify": im not sure how to use templates
21:29:27FromDiscord<my.narco> in that context atrleast
21:29:50FromDiscord<Chronos [She/Her]> Is it worth having a distinct type for UUIDs in my library?
21:29:55FromDiscord<Elegantbeef> You also could specific `?` as a operator to do `check_error` if you want to reduce the code noise 😄
21:29:58FromDiscord<Chronos [She/Her]> It doesn't create, parse or generate them
21:30:09FromDiscord<Elegantbeef> Yes
21:30:12FromDiscord<my.narco> In reply to @Elegantbeef "You also could specific": can you write it out for me i still dont understand
21:30:14FromDiscord<Chronos [She/Her]> Alright
21:31:06FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4I0y
21:31:55FromDiscord<Elegantbeef> It's not required but it's a possibillity if you wanted to reduce the `check_error` calls being so obtuse
21:32:04FromDiscord<my.narco> sent a code paste, see https://paste.rs/0V0wb
21:33:36FromDiscord<Chronos [She/Her]> My first library with actual docs! :p
21:33:52FromDiscord<Elegantbeef> `proc next(pu: var NoliPU): (uint64, NoliError)` ah someone really used Odin 😄
21:33:53FromDiscord<Chronos [She/Her]> Just need a github action to build this now oof
21:34:12FromDiscord<Elegantbeef> It's very easy, just steal it from treeform's nimtemplate
21:34:29FromDiscord<my.narco> In reply to @Elegantbeef "`proc next(pu: var NoliPU):": yeah 😆
21:34:35FromDiscord<my.narco> i have alot of time with odin
21:34:40FromDiscord<my.narco> but i have been enjoying nim more
21:35:08FromDiscord<Elegantbeef> Insert Mr.Burns saying excellent here
21:35:11FromDiscord<Chronos [She/Her]> In reply to @Elegantbeef "It's very easy, just": Fair enough, I shall yoink it
21:35:34FromDiscord<Elegantbeef> Technically you also can remove the `()` as `?bleh` is a unary operator
21:35:57FromDiscord<Elegantbeef> @raynei486 might also suggest an example of their other template idea
21:36:12FromDiscord<Elegantbeef> Also you do not need to annotate procs as nimcall
21:36:17FromDiscord<Elegantbeef> That's the default calling convention
21:36:22FromDiscord<Elegantbeef> This isn't odin where that matters much
21:36:47FromDiscord<Elegantbeef> All top level procs unannotated are `nimcall`
21:37:56FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4I0C
21:38:29FromDiscord<Elegantbeef> This means you do not need to do `NoLiVmCallTable[myOpCode.ord()](...)`
21:38:31FromDiscord<Chronos [She/Her]> Ah is `nim-version` something I need to define in my GitHub secrets?
21:38:52FromDiscord<Chronos [She/Her]> Used as `env.nim-version` is the template workflow
21:39:04FromDiscord<Elegantbeef> You just put the yml in the place and then it works
21:39:04FromDiscord<Elegantbeef> Nope chronos
21:39:05FromDiscord<Elegantbeef> You just do `NoliVmCallTable[myOpCode](...)`
21:39:16FromDiscord<Elegantbeef> Well after you point your pages to your gh-pages branch
21:39:33FromDiscord<Chronos [She/Her]> Hm
21:40:05FromDiscord<Chronos [She/Her]> Ah alright I get it now
21:40:08FromDiscord<.aingel.> In reply to @Elegantbeef "If you use importc": But I still need the cpp backend for this since I'm compiling cpp code
21:40:18FromDiscord<.aingel.> And I need the cpp stdlib for example
21:40:18FromDiscord<Chronos [She/Her]> But also my repo names are different from the package name lol, gotta fix that
21:40:27FromDiscord<my.narco> In reply to @Elegantbeef "Also instead of `seq[proc...]`": thank you for all of this
21:40:52FromDiscord<Elegantbeef> You also may want to do `ProcType myProcName` inside the array on the first element
21:41:19FromDiscord<Elegantbeef> This will cause all further elements to convert to that type
21:41:37FromDiscord<sOkam! 🫐> In reply to @.aingel. "But I still need": does that cpp library provide a c api? if so you could wrap that with nim and build the cpp separately into a static library and then link with it↵if not, you could write it↵and if that's not an option, then yeah you need your whole project to use the cpp backend
21:42:03FromDiscord<Elegantbeef> Odin and Nim are actually the only two modern languages I know of that have first class enum indexed arrays 😄
21:42:10FromDiscord<Elegantbeef> Atleast iirc odin has enum indexed arrays
21:42:27FromDiscord<sOkam! 🫐> rust doesn't have them?
21:43:22FromDiscord<my.narco> In reply to @Elegantbeef "This means you do": i never had to do this though
21:43:37FromDiscord<my.narco> sent a code paste, see https://paste.rs/YfLEE
21:43:57FromDiscord<Elegantbeef> No rust hates ordinal enums
21:43:59FromDiscord<raynei486> In reply to @Elegantbeef "<@733059160924749855> might also suggest": I am looking for a type representing arithmetic operators 😅
21:44:05FromDiscord<raynei486> I guess they're just procs?
21:44:07FromDiscord<sOkam! 🫐> you really 1000% are coming from a C-like lang, @my.narco jeez
21:44:07FromDiscord<Elegantbeef> All other langues require manual conversion
21:44:08FromDiscord<.aingel.> In reply to @heysokam "does that cpp library": I have wrote a c api for it
21:44:23FromDiscord<my.narco> In reply to @heysokam "you really 1000% are": ive been writing C since 10 years old :D
21:44:31FromDiscord<sOkam! 🫐> yeah i can see that for sure
21:44:31FromDiscord<.aingel.> When I build the cpp though it still needs the cpp backend
21:44:57FromDiscord<sOkam! 🫐> In reply to @.aingel. "When I build the": how are you building it?
21:45:05FromDiscord<Elegantbeef> They came from Odin, so that's not C like!
21:45:18FromDiscord<my.narco> In reply to @Elegantbeef "They came from Odin,": but before odin i was a C developer
21:45:31FromDiscord<.aingel.> In reply to @heysokam "how are you building": clang++
21:45:43FromDiscord<.aingel.> U know maybe it's cause my c API needs cpp
21:45:48FromDiscord<Elegantbeef> Sorry for your loss
21:45:49FromDiscord<Elegantbeef> Manual memory managment more like RAII exists
21:45:55FromDiscord<.aingel.> But once I build the c api I might not need the cpp backend anymore
21:46:15FromDiscord<sOkam! 🫐> In reply to @.aingel. "clang++": but how are you calling clang++... by `{.compile: ...}` pragmas, by cmake, by their buildsystem... building into a dynamic lib, static lib, etc
21:51:55FromDiscord<.aingel.> In reply to @heysokam "but how are you": ` clang++ -c -o simdjson.cpp cysimdjsonc.cpp -std=c++11`
21:51:56FromDiscord<.aingel.> Like this
21:52:19FromDiscord<.aingel.> And then doing {.include.} for the .o files
21:52:30FromDiscord<.aingel.> (edit) "{.include.}" => "{.link.}"
21:58:31FromDiscord<Chronos [She/Her]> Pain
21:58:33FromDiscord<Chronos [She/Her]> sent a code paste, see https://play.nim-lang.org/#ix=4I0F
21:58:48FromDiscord<Chronos [She/Her]> sent a code paste, see https://play.nim-lang.org/#ix=4I0G
21:59:00FromDiscord<Chronos [She/Her]> That's the related code, not sure how to handle this exactly tbh
21:59:02FromDiscord<Elegantbeef> Oh nice a compiler crash
21:59:03FromDiscord<Elegantbeef> `import std/json` though
21:59:52FromDiscord<Chronos [She/Her]> I have
21:59:56FromDiscord<Chronos [She/Her]> In the actual code I have
22:00:44FromDiscord<raynei486> why is it so hard to generate procedures with templates?
22:03:04FromDiscord<Chronos [She/Her]> Yep i am struggling with this, why do I bother with type safety
22:04:43*def- quit (Quit: -)
22:05:26*def- joined #nim
22:06:55FromDiscord<Chronos [She/Her]> Sigh... Perfect
22:07:48FromDiscord<Chronos [She/Her]> Beef I blame you
22:07:51FromDiscord<Chronos [She/Her]> sent a code paste, see https://paste.rs/rTTmN
22:10:00FromDiscord<Chronos [She/Her]> Putting the import in there fixed it but if they;re using the module, it's obviously already imported :/
22:13:15FromDiscord<.aingel.> can I link cpp compiled .o files and only use the c backend if I'm only using importc?
22:13:18FromDiscord<.aingel.> It doesn't seem to work for me
22:13:20FromDiscord<Langosta> In reply to @Amun-Ra "for C, there's https://beej.us/guide/bgnet/": This is exactly what I sought. Thank you
22:13:50FromDiscord<.aingel.> Oh wait I think I need to use the stdlib as a static library or something
22:14:22FromDiscord<raynei486> In reply to @.aingel. "can I link cpp": c++ mangles its names so maybe that could be an issue
22:19:08FromDiscord<Elegantbeef> It's not↵(@raynei486)
22:21:05FromDiscord<raynei486> sent a code paste, see https://play.nim-lang.org/#ix=4I0Q
22:21:21FromDiscord<raynei486> I'm not sure how to pass an operator into a template
22:21:25FromDiscord<raynei486> or what type it should be
22:21:37FromDiscord<Elegantbeef> `op(1, 2)`
22:23:05FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4I0R
22:23:26FromDiscord<Elegantbeef> Alternatively you can just do `op: untyped`
22:23:28FromDiscord<raynei486> oh 💀
22:23:34FromDiscord<Elegantbeef> sent a code paste, see https://paste.rs/RWo0s
22:24:03FromDiscord<raynei486> damn that's pretty clean
22:24:14FromDiscord<raynei486> almost reminds me of preprocessor
22:26:22*lumo_e joined #nim
22:36:32FromDiscord<.aingel.> In reply to @raynei486 "c++ mangles its names": I think it's the issue that I need to statically-link the std c++
22:36:48FromDiscord<.aingel.> Otherwise it wants to dynamically link it, and therefore i'll have to use the cpp backend
22:37:29*LuxuryMode joined #nim
22:41:39FromDiscord<raynei486> thanks beef
22:41:39FromDiscord<raynei486> sent a code paste, see https://play.nim-lang.org/#ix=4I0S
22:42:00FromDiscord<raynei486> I can open a PR
22:42:10FromDiscord<my.narco> In reply to @raynei486 "<@811230507408031774> This can be": vthank you!
22:59:51FromDiscord<Elegantbeef> For a different VM solution
22:59:56FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4I0V
23:00:00FromDiscord<Elegantbeef> If implemented it would make implementing op codes quite ergonomic
23:00:20FromDiscord<Elegantbeef> But it requires using Macros and they are fun
23:00:21FromDiscord<raynei486> yeah a better macro would be neat
23:00:28FromDiscord<raynei486> but this is the crude solution
23:00:36FromDiscord<raynei486> @my.narco I opened a PR btw
23:00:46FromDiscord<Elegantbeef> Yea the template is fine for getting around the chore
23:01:18FromDiscord<Elegantbeef> Plus if they do not need the procs callable elsewhere they can just embed them directly into the array
23:01:51FromDiscord<Elegantbeef> It doesnt really seem that they need these procedures elsewhere
23:02:45FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4I0W
23:04:58FromDiscord<.aingel.> how do I link with an .so file that I made with g++
23:05:12FromDiscord<.aingel.> I'm trying {.link.} and -passL but doesn't seem to be working
23:05:25FromDiscord<Elegantbeef> Either use Nim's `dynlib` annotation or `--passL:"-lname"`
23:06:24FromDiscord<.aingel.> I tried the passL with -lname
23:06:44FromDiscord<Elegantbeef> Did you also supply `-L` to add your library path to the search path?
23:06:45FromDiscord<.aingel.> if I have it as libjson.so in my current directory should -ljson work?
23:06:54FromDiscord<.aingel.> I put -L as the fullpath of my working dir
23:06:57FromDiscord<Elegantbeef> Yes
23:07:10FromDiscord<.aingel.> nim c --passL:"-L/Users/saint/code/gemmaJSON -ljson" gemmaJSON.nim
23:07:16FromDiscord<.aingel.> So this basically
23:07:45FromDiscord<Elegantbeef> Sure
23:07:54FromDiscord<.aingel.> Doesn't seem to be working though
23:08:00FromDiscord<.aingel.> Can't find the symbols that are referenced there
23:08:07FromDiscord<.aingel.> (edit) "referenced" => "located"
23:08:08FromDiscord<.aingel.> In the lib
23:08:31FromDiscord<Elegantbeef> `nm -gD /your/lib.so`
23:09:52FromDiscord<.aingel.> uh oh
23:09:54FromDiscord<.aingel.> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/nm: error: libcat.so: File format has no dynamic symbol table
23:12:12FromDiscord<.aingel.> `g++-13 -shared -o libjson.so cysimdjsonc.o simdjson.o -static-libstdc++ -static-libgcc`
23:12:21FromDiscord<.aingel.> I'm creating my shared lib this way
23:19:40FromDiscord<demotomohiro> iirc, Linux doesn't search current directory when loading shared lib.
23:34:43FromDiscord<.aingel.> In reply to @demotomohiro "iirc, Linux doesn't search": I can confirm I think its finding it cause if I change the -L dir to a fake one it complains it cant find it and if I change the -ljson to something fake it complains too
23:35:03FromDiscord<.aingel.> Are there any big disadvantages to using the cpp backend?
23:35:19FromDiscord<.aingel.> I'm trying to make this library be able to be used with the c backend instead of having it to be tied to the cpp
23:35:25FromDiscord<.aingel.> Idk if there's a point in that
23:50:10FromDiscord<my.narco> In reply to @raynei486 "<@811230507408031774> I opened a": i merged your PR, thank you very much!
23:50:15FromDiscord<my.narco> this helps me alot with learning