00:18:01 | FromDiscord | <Elegantbeef> @System64 ~ Flandre Scarlet just to confirm the vsbf dumper error was because you did something to the file? It's not due to vsbf's ouput? |
00:18:18 | FromDiscord | <Elegantbeef> Or was the issue you were talking about was something else |
00:39:17 | * | tanami_ quit (Ping timeout: 248 seconds) |
00:39:25 | * | tanami joined #nim |
00:53:54 | FromDiscord | <steschuser (steschuser)> no love for X509 support? ;\_; |
00:54:12 | FromDiscord | <Elegantbeef> "PRs welcome" |
00:55:04 | FromDiscord | <System64 ~ Flandre Scarlet> sent a code paste, see https://play.nim-lang.org/#pasty=SRLrXknr |
00:56:02 | FromDiscord | <System64 ~ Flandre Scarlet> Here is an exported file https://media.discordapp.net/attachments/371759389889003532/1339762042273534065/test2.kxp?ex=67afe622&is=67ae94a2&hm=ddcca1bd14560d853e8392c659b7b2aff001c3c9488556af77bb219ef50cc023& |
00:56:24 | FromDiscord | <Elegantbeef> Would be best if I could also get code that could replicate the file |
00:56:33 | FromDiscord | <Elegantbeef> Just to see if it's an encoding issue or dumping issue |
00:59:46 | FromDiscord | <System64 ~ Flandre Scarlet> sent a code paste, see https://play.nim-lang.org/#pasty=cASYWZSc |
01:00:18 | FromDiscord | <Elegantbeef> Oh so it's just a dumper issue |
01:00:32 | FromDiscord | <Elegantbeef> Bad traversal logic in my code then |
01:00:35 | FromDiscord | <System64 ~ Flandre Scarlet> (edit) "https://play.nim-lang.org/#pasty=jKcxAXWm" => "https://play.nim-lang.org/#pasty=AvThNXuL" |
01:01:02 | FromDiscord | <System64 ~ Flandre Scarlet> Another bug ready to be squished! |
01:08:54 | * | SchweinDeBurg quit (Quit: WeeChat 4.6.0-dev) |
01:16:43 | FromDiscord | <Elegantbeef> @System64 ~ Flandre Scarlet how many modules are being saved here? |
01:16:45 | FromDiscord | <Elegantbeef> Seems like there are 5? |
01:18:06 | * | SchweinDeBurg joined #nim |
01:21:51 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @Elegantbeef "Seems like there are": yes |
01:26:22 | FromDiscord | <Elegantbeef> Oh heh I never updated the dumper for when I left leb128 encoded single bytes |
01:28:57 | FromDiscord | <Elegantbeef> Well thanks again 0.1.18 is out with a fix that should be right |
01:29:10 | FromDiscord | <Elegantbeef> Do check the data if you can just to make sure it looks right to you đ |
01:30:26 | FromDiscord | <Elegantbeef> There is something nice that a simple dumper can be made in 130 loc with a little code from the decoder |
01:30:36 | FromDiscord | <Elegantbeef> Makes me happy that anyone could feasibly walk the untyped data |
01:54:23 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @Elegantbeef "Do check the data": https://media.discordapp.net/attachments/371759389889003532/1339776721829761024/dump.txt?ex=67aff3ce&is=67aea24e&hm=04c49b96b214ca60ffa186812111ce0e28ea5b36d974ea38545e43433fb88e62& |
02:09:34 | FromDiscord | <Elegantbeef> @System64 ~ Flandre Scarlet yea I mean is that 'right'? đ |
02:11:43 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @Elegantbeef "<@380360389377916939> yea I mean": Yes, those are arrays of bytes, so I guess it's the intended behavior? |
02:42:42 | FromDiscord | <amadaluzia> hey!â”â”i am learning nim as part of learning how to use EWW (for wayland widgets) and the program i am using has a feature which uses sockets |
02:42:55 | FromDiscord | <amadaluzia> the issue is that i want to listen to the socket but get the relevant json |
02:43:19 | FromDiscord | <amadaluzia> i've looked at std/net and it seems i can't find a solution |
02:47:11 | FromDiscord | <Elegantbeef> @amadaluzia `newSocket` on the port that is expected then just read fro mit |
03:13:47 | * | PMunch_ joined #nim |
03:16:00 | * | PMunch__ quit (Ping timeout: 272 seconds) |
03:29:02 | * | ensyde joined #nim |
03:30:54 | FromDiscord | <explosiveend> i'm trying to use the `argparse` library in my nim project (installed using `nimble install argparse`), but i still can't use `nimble run` b/c it doesn't recognize the `import argparse`. is there something else i'm supposed to do? |
03:31:19 | FromDiscord | <Elegantbeef> did you `requires "argparse >= the.version.ithas"`? |
03:31:35 | FromDiscord | <explosiveend> what file would i do that in? |
03:31:44 | FromDiscord | <Elegantbeef> Your .nimble |
03:32:41 | FromDiscord | <explosiveend> ah i hadn't, thanks lol |
03:34:15 | FromDiscord | <explosiveend> also should i run `nimble setup`? reading the docs for it and don't really understand its purpose |
03:34:54 | FromDiscord | <Elegantbeef> I've never used it myself |
03:35:51 | FromDiscord | <explosiveend> oh, prob not needed then |
03:40:10 | FromDiscord | <explosiveend> last question, i'm tryna make a cli tool; is there a way to pass args / flags to `nimble run` that get passed to the program? e.g. `nimble run calculate --a=3`, where `calculate` is a `cmdArgument` to the main program? |
03:40:54 | FromDiscord | <explosiveend> (edit) "last question, i'm tryna make a cli tool; is there a way to pass args / flags to `nimble run` that get passed to the program? e.g. `nimble run calculate --a=3`, where `calculate` is a `cmdArgument` ... to" added "and `a` is a `cmdLongOption`" |
03:41:34 | FromDiscord | <explosiveend> or should i just use `nim c -r myProj.nim [args] --flags` |
03:41:55 | FromDiscord | <explosiveend> (edit) "should" => "do" | "just" => "have to" | "myProj.nim" => "src/myProj.nim" |
03:46:43 | FromDiscord | <explosiveend> nvm found out i can use `nimble run -- [args]` |
03:54:28 | FromDiscord | <lainlaylie> nimble setup generates a nimble.paths file with --path directives and includes it in your config.nims |
03:54:41 | FromDiscord | <lainlaylie> this lets you compile your program with `nim c` |
04:17:51 | FromDiscord | <nasuray> In reply to @amadaluzia "hey! i am": Is the program hyprland? I use nim to glue data from hyprland sockets to EWW |
04:18:03 | FromDiscord | <amadaluzia> niri |
04:20:03 | FromDiscord | <amadaluzia> its the same case here but this time with JSON |
04:20:49 | FromDiscord | <nasuray> If it's helpful this is how I get data from the hyprland socket. one of which is json based https://git.dayl.in/daylin/hyprman/src/commit/9f2be2c4ac037c19b10e46edd631d2443f599d70/src/hyprland.nim#L40 |
04:21:36 | FromDiscord | <nasuray> I just keep reading data in a while loop till I get nothing then break |
04:21:54 | FromDiscord | <Elegantbeef> Should likely use a selector |
05:26:18 | * | PMunch__ joined #nim |
05:29:43 | * | PMunch_ quit (Ping timeout: 268 seconds) |
06:17:28 | * | ntat joined #nim |
08:06:33 | * | ntat quit (Quit: Leaving) |
08:58:43 | FromDiscord | <aintea> In reply to @emanresu3 "I see a `std/threadpool`": I think it is deprecated, when you compile it will tell you it's deprecated and will suggest you use something else with suggestions |
09:57:07 | * | ntat joined #nim |
10:55:39 | * | ntat quit (Quit: Leaving) |
11:16:54 | * | beholders_eye joined #nim |
12:24:06 | * | PMunch_ joined #nim |
12:26:29 | * | PMunch__ quit (Ping timeout: 248 seconds) |
13:28:45 | * | ntat joined #nim |
13:33:36 | * | ensyde quit (Quit: WeeChat 4.5.1) |
13:50:27 | * | om3ga quit (Ping timeout: 268 seconds) |
14:03:11 | FromDiscord | <System64 ~ Flandre Scarlet> I have a questionâ”Can zigcc let me target MacOS from Linux? |
15:08:35 | FromDiscord | <janakali> In reply to @sys64 "I have a question": in theory - yes, but you need apple sdk, I tried zigcc with macos target and it fails with error trying to find macos frameworks |
15:08:58 | FromDiscord | <janakali> also see https://github.com/ziglang/zig/issues/10513 for relevant include paths |
15:27:21 | FromDiscord | <emanresu3> But I would have like to do with async-await, maybe there was a way to do `Promise.all()` in Nim but I don't find it. One forum post had something about it but the forum is not loading posts for me idk why |
15:27:23 | FromDiscord | <emanresu3> sent a code paste, see https://play.nim-lang.org/#pasty=GjogacVw |
16:04:36 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @janakali "in theory - yes,": Sounds like a nightmare to do |
16:14:48 | FromDiscord | <System64 ~ Flandre Scarlet> Variants vs inheritence, which is better? |
16:14:59 | FromDiscord | <odexine> most people will point you to variants first |
16:16:49 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @odexine "most people will point": Oh my... Should I rewrite the entire code of my synth? |
16:17:03 | FromDiscord | <odexine> no not necessarily |
16:17:24 | FromDiscord | <odexine> the answer is dependent on requirements |
16:17:54 | FromDiscord | <System64 ~ Flandre Scarlet> The modular system uses inheritence, method overloading and polymorphism |
16:19:04 | FromDiscord | <System64 ~ Flandre Scarlet> And each module calls the synthesize() method of the previous one |
16:31:05 | FromDiscord | <bubbly_avocado_86424> did anyone happen to build experience with https://avaloniaui.net/showcase ? |
16:46:57 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @odexine "the answer is dependent": I would need quite a lot of case statements with variants, but I would benifit from cache-friendly structuresâ”But it is easier to develop with inheritence |
16:47:50 | FromDiscord | <odexine> id say if youre not experiencing performance issues now then stay as is |
16:50:48 | FromDiscord | <System64 ~ Flandre Scarlet> Sounds not critical for nowâ”Well, it will probably start to lag if you have like 256 filtersâ”But who would do this? |
17:27:06 | FromDiscord | <aintea> the testers |
17:27:37 | FromDiscord | <odexine> a lot of people will do dumb shit |
17:27:54 | FromDiscord | <odexine> not necessarily because theyre dumb |
20:37:01 | FromDiscord | <Phil> Speak for yourself |
20:37:57 | FromDiscord | <Phil> I do my best and still end up doing dumb shit ~~like trying multithreading without a phd~~, that speaks volumes on its own |
20:38:02 | FromDiscord | <Elegantbeef> Phil comes in here with "The report of my intelligence was an exaggeration" |
20:38:14 | FromDiscord | <Phil> Hottest and freshest of takes at the same time |
20:38:21 | FromDiscord | <Phil> Basically still in the oven and baking |
20:50:44 | * | rockcavera joined #nim |
21:10:12 | FromDiscord | <.bobbbob> sent a long message, see https://pasty.ee/kZpmnuFl |
21:10:31 | FromDiscord | <.bobbbob> btw does nim have inheritance for variant types? not that I want to use it haha |
21:26:27 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @.bobbbob "if youre extending some": My synth is modular https://media.discordapp.net/attachments/371759389889003532/1340071684350414879/2025-02-13_14-51-01.mp4?ex=67b10682&is=67afb502&hm=48f053d0ca2413b4a9fddc68e56ca1cc5bc983924ba3b51468389676c6c5ae7e& |
21:27:22 | FromDiscord | <fabric.input_output> synthular |
21:27:41 | * | ntat quit (Quit: Leaving) |
21:39:44 | FromDiscord | <System64 ~ Flandre Scarlet> I hope it will be able to yell a laser harp sound one day |
21:46:45 | * | coldfeet joined #nim |
21:52:02 | FromDiscord | <threefour> Is there an implementation of what Go calls a `RWMutex` in Nim's stdlib that I'm not seeing? |
21:53:05 | FromDiscord | <threefour> (Multiple read, synchronous write mutex) |
21:54:04 | FromDiscord | <threefour> (edit) "(Multiple" => "(Concurrent" |
22:40:07 | FromDiscord | <nocturn9x> sent a code paste, see https://play.nim-lang.org/#pasty=QLwJCsHD |
22:40:13 | FromDiscord | <nocturn9x> I am extremely confused as to what exactly is happening |
22:46:49 | FromDiscord | <nocturn9x> ah yep I figured it out |
22:47:04 | FromDiscord | <nocturn9x> I was indexing an array by `ply` and it went OOB |
22:47:05 | FromDiscord | <nocturn9x> classic |
22:51:54 | * | tiorock joined #nim |
22:51:54 | * | rockcavera is now known as Guest1396 |
22:51:54 | * | Guest1396 quit (Killed (osmium.libera.chat (Nickname regained by services))) |
22:51:54 | * | tiorock is now known as rockcavera |
22:53:10 | FromDiscord | <user2m> sent a code paste, see https://play.nim-lang.org/#pasty=GbtsudNE |
22:54:01 | * | tiorock joined #nim |
22:54:01 | * | rockcavera is now known as Guest4377 |
22:54:01 | * | Guest4377 quit (Killed (tantalum.libera.chat (Nickname regained by services))) |
22:54:01 | * | tiorock is now known as rockcavera |
22:54:13 | FromDiscord | <nocturn9x> you sure the error is happening at the del call and not before |
22:54:29 | FromDiscord | <nocturn9x> it seems to me that the thing that's failing is the indexing of `socket_pool` by `session_id` |
22:54:41 | FromDiscord | <nocturn9x> probably want to check with `hasKey` first |
22:55:40 | FromDiscord | <nocturn9x> have you nailed down exactly which line is failing? If so, how? |
22:55:46 | FromDiscord | <nocturn9x> Have you tried getting a stacktrace |
22:56:56 | FromDiscord | <nocturn9x> also also, keep in mind that `initTable` creates an object |
22:56:58 | FromDiscord | <nocturn9x> it's not a reference |
22:57:05 | FromDiscord | <nocturn9x> so you might not be accessing the table you think you are |
22:57:23 | FromDiscord | <nocturn9x> if you want a reference instead of something passed by value, consider `newTable` |
22:57:47 | FromDiscord | <nocturn9x> (edit) "stacktrace" => "stacktrace?" |
22:58:20 | FromDiscord | <nocturn9x> (assuming you just created a reproducible snippet and that the table isn't actually global, if it is then it shouldn't matter, but then I can't see how nim considers that to be `gcsafe`) |
23:02:50 | * | coldfeet quit (Quit: Lost terminal) |
23:04:20 | FromDiscord | <user2m> sent a code paste, see https://play.nim-lang.org/#pasty=FkkBbztv |
23:04:35 | FromDiscord | <nocturn9x> In reply to @user2m "socket_pool is a global": ok so you're casting to gcsafe |
23:04:47 | FromDiscord | <nocturn9x> it's a thing I literally just now got rid of in my engine |
23:04:47 | FromDiscord | <nocturn9x> because it's kinda bad |
23:05:05 | FromDiscord | <nocturn9x> you're telling the compiler your code can be treated as if it were not accessing a global GC'ed memory block |
23:05:06 | FromDiscord | <nocturn9x> but it is |
23:05:10 | FromDiscord | <nocturn9x> that can lead to problems, as it is now |
23:05:30 | FromDiscord | <nocturn9x> can you perhaps refactor it such that it doesn't do that? |
23:05:45 | FromDiscord | <nocturn9x> pass the state around in some way, maybe as a heap reference |
23:10:47 | FromDiscord | <user2m> In reply to @nocturn9x "can you perhaps refactor": Hmm I'm not really sure how to do this other than using a global to store all the ws. can you point me to some resources? |
23:11:03 | FromDiscord | <nocturn9x> well you could have threads communicate via channels |
23:11:33 | FromDiscord | <user2m> In reply to @nocturn9x "well you could have": I'm deploying to a single threaded vps - would that still work? |
23:12:09 | FromDiscord | <user2m> Also the framework I'm using is prologue which is async |
23:12:31 | FromDiscord | <nocturn9x> ah, I see |
23:12:37 | FromDiscord | <nocturn9x> then you likely want some equivalent of channels but async |
23:12:43 | FromDiscord | <nocturn9x> I've never really dabbled in nim async tbh |
23:13:15 | FromDiscord | <nocturn9x> I recently wrote my own crude thread pool implementation to clean up some of my old, inefficient code based on `createThread` and found them very pleasant to use |
23:13:22 | FromDiscord | <nocturn9x> simple, does what it says on the tin and not much more |
23:13:52 | FromDiscord | <nocturn9x> I would be surprised if the underlying event loop library you're using didn't support some similar primitive |
23:14:27 | FromDiscord | <nocturn9x> I do have quite a bit of experience in writing coroutine runners in python and the synchronization primitives are generally the easiest things to write |
23:14:31 | FromDiscord | <nocturn9x> locks, queues, channels, events, etc. |
23:14:59 | FromDiscord | <nocturn9x> I/O is usually the annoying bit, since you start dealing with the real world :P |
23:22:44 | FromDiscord | <Elegantbeef> @user2m `var ConnectionPool` is not a valid generic parameter |
23:23:07 | FromDiscord | <Elegantbeef> Like that turns into `ConnectionPool` and you lose any varness |