<< 11-03-2026 >>

00:14:38*amadaluzia quit (Read error: Connection reset by peer)
00:49:17FromDiscord<.tokyovigilante> Is there a good pattern form merging asyncdispatch and Windows events? I want to be able to call `runForever()` in my main thread then process UI events asynchronously. I can just watch the Wayland file descriptor for this on Linux but `MsgWaitForMultipleObjects` blocks too it seems.
00:49:35FromDiscord<.tokyovigilante> (edit) "form" => "for"
01:31:36*mrinsane quit (Ping timeout: 264 seconds)
02:14:45*tokyovigilante quit (Ping timeout: 245 seconds)
03:14:32*rockcavera quit (Remote host closed the connection)
04:04:39*mrinsane joined #nim
05:21:38FromDiscord<indelusionalizationary> In reply to @nnsee "what metric do you": bro, I mean... writing an OS kernel (like linux), OS level utilities (like GNU provides) and even desktop applications for mac, windows or (at least and most importantly for me) linux. I explored android studio and saw, there's an option with cpp too other than java and kotlin ones.
05:22:31FromDiscord<indelusionalizationary> In reply to @nnsee "and nim is, by": am I provided with proper tools to manage memory and do all the things required if I turn off GC?
05:31:14*mrinsane quit (Ping timeout: 252 seconds)
06:50:10FromDiscord<nnsee> In reply to @indelusionalizationary "bro, I mean... writing": you can do all of that very successfully with nim
06:50:57FromDiscord<nnsee> In reply to @indelusionalizationary "am I provided with": generally, you don't want to "turn off GC" but rather use a deterministic memory management mode such as ARC
06:51:35FromDiscord<nnsee> https://nim-lang.org/blog/2020/10/15/introduction-to-arc-orc-in-nim.html
08:07:11FromDiscord<asviest> sent a long message, see https://pasty.ee/OXfZBuEx
08:10:32FromDiscord<asviest> In reply to @.tokyovigilante "Is there a good": Pooling works on all OSs
08:19:02FromDiscord<asviest> sent a long message, see https://pasty.ee/aJKUZVZQ
08:22:20*hygo quit (Quit: WeeChat 4.6.3)
08:34:39FromDiscord<indelusionalizationary> in simple words, I just want a language that I can make my own- replacing c/cpp & rust. ↵I have listed all I could: Nim, D, V, Crystal, Zig, Hare, Odin. ↵My optional but important goal is that if it's not too hard to learn (list rust) and my primary and main goals are that a dev (when gets good at writing it) can writing anything that a dev can with c/cpp, rust. ↵I don't have a problem with rust, in fact I'm currently
08:45:17FromDiscord<asviest> In reply to @indelusionalizationary "in simple words, I": So, what’s the issue? Try building a project in Nim or Zig to see if you like the syntax, features, and design choices. If you're wondering whether you can do anything with them— just give it a try. If you find something impossible, just patch the Nim or Zig compiler and open a pull request. I’m not sure about Zig, but the Nim compiler code is quite readable.
08:47:43FromDiscord<shalokshalom> In reply to @asviest "I’m not an expert": I feel like OS kernel development needs an even better control over memory, or at least discipline. Theoretically possible.
08:54:46FromDiscord<indelusionalizationary> sent a long message, see https://pasty.ee/mNcddrZN
08:55:15FromDiscord<nnsee> In reply to @asviest "I don't think anyone": some would argue that the lack of distinction between an array and a pointer is not a flaw but rather a feature
08:56:03FromDiscord<indelusionalizationary> In reply to @nnsee "some would argue that": i was about to point it out, thank god i stayed quiet.
08:56:25FromDiscord<indelusionalizationary> (edit) "stayed" => "stood"
08:57:03FromDiscord<kapendev> It's a high level feature
08:59:07FromDiscord<kapendev> Something similar happens with languages that have slices, but there you have arrays that decay to slices. You don't want that sometimes lol
09:00:17FromDiscord<kapendev> Like accidentally passing the whole buffer instead of a part of it.
09:27:54*mrinsane joined #nim
09:32:34*mrinsane quit (Ping timeout: 276 seconds)
09:33:10FromDiscord<pmunch> Hmm, is it not possible to GC_ref a string?
09:45:21*beholders_eye joined #nim
09:46:14FromDiscord<asviest> In reply to @kapendev "It's a high level": Yeah, it’s a high-level feature, just like goto... I mean, goto lets you easily break out of a nested loop or do something like if (error) goto handleErrors;. If we look at block/break, it’s basically just a polished and constraint version of goto. Does that make goto high-level? That’s not how it works.
10:37:06FromDiscord<kapendev> It's not different than automatic casting
10:38:24FromDiscord<kapendev> You have a problem with that?
13:28:04*mrinsane joined #nim
13:32:29*mrinsane quit (Ping timeout: 252 seconds)
14:00:25FromDiscord<mr_rowboto> sent a long message, see https://pasty.ee/hepbpBnj
14:00:44FromDiscord<mr_rowboto> (edit) "https://pasty.ee/QISQhREv" => "https://pasty.ee/mCRbbDvO"
14:01:00FromDiscord<mr_rowboto> (edit) "https://pasty.ee/ETOkiwiL" => "https://pasty.ee/jOPfszGb"
14:01:18FromDiscord<mr_rowboto> Be sure to check the OSDev wiki: https://wiki.osdev.org/Main_Page
14:03:29FromDiscord<mr_rowboto> And please, PLEASE... PLEASE work on hacking together a cross-compiler or at least a reproducible environment (using docker, nix, or whatever) that can output non os-dependant binaries first. There are plenty of tutorials out there.
14:04:04FromDiscord<mr_rowboto> (edit) "whatever)" => "whatever tool)"
14:04:19FromDiscord<mr_rowboto> (edit) "os-dependant" => "os-dependent"
14:06:47FromDiscord<olfactoryhallucinations> Here's an example of someone writing their own OS using Nim and getting quite far: https://github.com/khaledh/fusion
14:42:48nisstyreI just looked at the code and see C files...
14:43:41nisstyresurely it needs to compile it down without the C runtime at least, since you won't have stdlib
14:46:27FromDiscord<nnsee> i don't see C files apart from what's in `include`
14:47:00nisstyrethat's what I was referring to
14:47:05nisstyrebut it makes sense you'd need that
14:47:35nisstyreTIL nim has inline assembly
15:03:41FromDiscord<tewesday> Nim seems extremely flexible much like C\C++ but with some modern conveniences and shorter syntax
15:05:00FromDiscord<tewesday> Is there an example of using nim with memory arenas?
15:09:56nisstyreyou would just statically allocate an array of bytes and use that, or use malloc or mmap
15:10:20nisstyreworks well if you have a lot of uniformly sized data
15:11:42FromDiscord<tewesday> ARC can be used with that as long as the scope is global, so it doesn't get cleaned up right?
15:12:37FromDiscord<tewesday> the pool would not get cleaned up by ARC
15:13:05nisstyrejust use a global array of data if you don't need to expand it
15:13:25nisstyrekind of kills one of the benefits of arenas though
15:13:36nisstyrewhich is that you free the data all at once
15:13:57FromDiscord<tewesday> Right
15:13:58nisstyreI don't see why that wouldn't still work with ARC though
15:14:05nisstyrejust make sure the scope is correct
15:14:35nisstyreand also how do you pass in the allocator function to other places?
15:14:42nisstyredepends highly on your use case
15:15:09FromDiscord<tewesday> Just trying to make sure I understand that ARC won't ever surprise me by deallocating the arena or from the arena as long as the arena is in scope
15:15:49nisstyreshouldn't but if you have pointers to other stuff in it you might have problems
15:16:33FromDiscord<tewesday> Yeah that makes sense
15:38:25Amun-Rajust compiled my nim project with filcc, works like a charm
15:57:13FromDiscord<Robyn [She/Her]> In reply to @Amun-Ra "just compiled my nim": `filcc`? what's that?
15:57:31FromDiscord<Robyn [She/Her]> huh fun
15:58:33*xet7 quit (Ping timeout: 248 seconds)
15:59:32FromDiscord<Robyn [She/Her]> It looks pretty neat, honestly
15:59:53*beholders_eye quit (Ping timeout: 252 seconds)
16:03:44FromDiscord<nervecenter> In reply to @Amun-Ra "just compiled my nim": Kinda redundant since the whole point of Nim's compiler is to generate correct bounds checking and lifetimes out of the gate, but cool?
16:04:03FromDiscord<nervecenter> Double-safe programs
16:10:41*xet7 joined #nim
16:12:55*hygo joined #nim
16:16:51FromDiscord<indelusionalizationary> In reply to @mr_rowboto "Hi, I've taught OSDev": why zig and not nim?
16:19:25*beholders_eye joined #nim
16:23:44FromDiscord<nnsee> memory allocation is a bit more deliberate in zig which is attractive for osdev stuff
16:24:28FromDiscord<mr_rowboto> sent a long message, see https://pasty.ee/KAsTEgPD
16:32:19*Artea quit (Read error: Connection reset by peer)
16:36:08FromDiscord<mr_rowboto> sent a long message, see https://pasty.ee/tkRmHVba
17:10:56*mrinsane joined #nim
17:31:21*shrikant joined #nim
17:35:42*shrikant quit (Ping timeout: 255 seconds)
17:37:35*shrikant joined #nim
17:42:00*shrikant quit (Ping timeout: 255 seconds)