<< 27-10-2025 >>

00:00:37*beholders_eye quit (Ping timeout: 264 seconds)
00:02:17*beholders_eye joined #nim
00:07:13FromDiscord<jm_sts> In reply to @kiloneie "It only told me,": Compilers are like girlfriends. They say one thing but they mean another, and you only learn to understand them through pain and suffering
00:08:59krunshjajajjjaj
00:45:12*beholders_eye quit (Ping timeout: 260 seconds)
02:31:34krunshdoes anyone know, if there's a proyect in nim like puppeteer o playwright?
02:47:52*krunsh quit (Ping timeout: 256 seconds)
03:03:12*cjaburto joined #nim
03:12:09*cjaburto quit (Quit: WeeChat 4.7.1)
03:17:19*krunsh joined #nim
04:51:01*krunsh quit (Quit: "good night!")
07:12:46*zero` quit (Ping timeout: 256 seconds)
07:59:47FromDiscord<wakanakisarazu> Guys, I'm building a UNIX supporting Init system in Nim, what would y'all like to see and how should I go about this?
08:07:24FromDiscord<aethrvmn> Are you looking at dinit or openrc or smth? Thats pretty cool
08:07:25FromDiscord<aethrvmn> Are you building from dinit or openrc or smth? Thats pretty cool↵(@wakanakisarazu)
08:07:58FromDiscord<wakanakisarazu> No, it's built from scratch in Nim, although the actual PID 1 system is forked from tinyinit
08:08:10FromDiscord<wakanakisarazu> In C
08:09:08FromDiscord<wakanakisarazu> It is inspired from OpenRC tho. ↵↵It's multi stage, Stage 1, Stage 2 and optionally a Stage 3 (a script usually)
08:10:38FromDiscord<wakanakisarazu> Stage 1 works on non initramfs systems at the moment, Stage 2 is still a W. I. P ↵It will use a declaration based config system made in Lua.
08:10:40FromDiscord<wakanakisarazu> https://github.com/Tayzonxperia/TetoRC
08:14:51FromDiscord<Robyn [She/Her]> In reply to @wakanakisarazu "Stage 1 works on": You should embed the Nim VM instead 😛
08:15:41FromDiscord<wakanakisarazu> In reply to @battery.acid.bubblegum "You should embed the": Nim VM? You mean the compile time VM? Why, so It can compile more Nim while its running? Lmao
08:15:56FromDiscord<wakanakisarazu> I am actually planning on making embedding Lua a option tho
08:16:07FromDiscord<wakanakisarazu> Best Lua module for Nim?
08:21:36FromDiscord<Robyn [She/Her]> In reply to @wakanakisarazu "Nim VM? You mean": Nah, you can actually embed the VM in an application so you can run Nim code at runtime, see Nimscripter: https://github.com/beef331/nimscripter↵idk if it still works though hah
08:22:38FromDiscord<ayex> micropython might be a nice alternative, too.↵↵syntax is often more easy to learn (or already known) for newcomers than for lua.
08:22:39FromDiscord<wakanakisarazu> In reply to @battery.acid.bubblegum "Nah, you can actually": Can't I just call the system Nim program tho? I'll look into this, although I think I'm gonna use Lua for the module system
08:23:15FromDiscord<Robyn [She/Her]> In reply to @wakanakisarazu "Best Lua module for": https://github.com/glassesneo/spellua seems to be this? but you can also roll your own using Futhark on Lua
08:23:29FromDiscord<wakanakisarazu> In reply to @ayex "micropython might be a": Indeed, I just don't want too much bloat in the init system, but since it's split up into stages and .so libs it should be good
08:23:30FromDiscord<Robyn [She/Her]> https://github.com/PMunch/Futhark
08:24:00FromDiscord<wakanakisarazu> In reply to @battery.acid.bubblegum "https://github.com/glassesneo/spellua seems to be": Alr, yeah because I need a way to talk to the Lua interpreter from Nim
08:24:11FromDiscord<Robyn [She/Her]> In reply to @wakanakisarazu "Can't I just call": Well, calling the Nim compiler to execute a config file is like calling a C compiler in your plugin system :P
08:25:07FromDiscord<wakanakisarazu> In reply to @battery.acid.bubblegum "Well, calling the Nim": Yeah, that's why I'm gonna use Lua. ↵It will run of a complex declaration based config system, although will support regular INI as well
08:30:00FromDiscord<aethrvmn> Are you building an OS?
08:39:04FromDiscord<wakanakisarazu> In reply to @aethrvmn "Are you building an": I'm building a Init system
08:39:34FromDiscord<wakanakisarazu> I also plan to make a Linux distro but I won't start working on that until the init is ready
08:44:43FromDiscord<mitranim> If you plan to get there by whipping bots all day long, Nim might be a poor choice since bots are bad at Nim
08:45:10FromDiscord<mitranim> Might as well use C
08:50:03FromDiscord<Robyn [She/Her]> In reply to @wakanakisarazu "Yeah, that's why I'm": If you embed the Nim VM, though, it's usable as a scripting language :)
08:50:12FromDiscord<Robyn [She/Her]> but it's too much trouble most likely
09:24:23FromDiscord<systemblue2010> In reply to @kiloneie "What am i missing": are you make gui?
09:24:50FromDiscord<systemblue2010> In reply to @kiloneie "What am i missing": your work look like GUI(vertical, top, bottom)(
09:24:52FromDiscord<Robyn [She/Her]> Kiloneie is working on a game engine
09:25:44FromDiscord<systemblue2010> oh game engine
09:26:29FromDiscord<systemblue2010> what engine?
09:26:31FromDiscord<systemblue2010> binding? or
09:26:38FromDiscord<systemblue2010> nim-native engine
09:28:30FromDiscord<systemblue2010> I think nim developer should develop data-science, sicence, math librarys↵because nim is fast, low-level python, ↵so python that need speed and performance is data-science, sci-math librarys
09:29:20FromDiscord<systemblue2010> I heard a opnion about Nim prefer developers↵Python developers prefer Nim but↵C dev's don't ↵because they hate python syntax
09:29:56FromDiscord<systemblue2010> (edit) "Nim" => " developers who" | "developers↵Python" => "nim↵Python"
09:30:17Amun-Racan confirm, many C devs, esp fresh ones, love {} and write sloppy formatted code
09:30:27*beholders_eye joined #nim
09:30:46FromDiscord<systemblue2010> In reply to @Amun-Ra "can confirm, many C": yes they love semi colon and brace
09:31:25FromDiscord<systemblue2010> so Nim must target Python dev's who want fast, low-level, competible with C but easy
09:31:48Amun-Rafrom all the py/nim syntax features I think most ppl dislike whitespace indents
09:31:59FromDiscord<systemblue2010> but you must know that Nim is hard to learn without learn C
09:32:36FromDiscord<systemblue2010> yes I hate whitespace indents too
09:32:45FromDiscord<systemblue2010> but I just fix my brain and hands to nim
09:32:56Amun-Raand I love them :>
09:33:26Amun-RaI'm not a fan of two space indents but I can't switch to four spaces in nim code, it's already too late
09:37:05FromDiscord<kiloneie> In reply to @systemblue2010 "are you make gui?": Game engine, using sdl2(will transition to sdl 3 soon). Just my own... heavily inspired by GameMaker, and a bit by Godot Engine...
09:38:00FromDiscord<systemblue2010> In reply to @kiloneie "Game engine, using sdl2(will": can I see that?
09:38:04FromDiscord<kiloneie> I will open source is one day, right now, i don't want any attention, just like how my Discord status is permanently offline. I've had a few experiences of people abusing being able to see my status.
09:38:05FromDiscord<systemblue2010> and add you friend?
09:38:26FromDiscord<systemblue2010> so then I want to heard news about your game engine
09:39:03FromDiscord<systemblue2010> and is the game engine 2D or 3D?
09:39:15FromDiscord<ayex> same here, in my own projects I always go with 4 spaces - far easier to read for my eyes.↵(<@709044657232936960_=41mun-=52a=5b=49=52=43=5d>)
09:39:22FromDiscord<kiloneie> If you want a game engine on top of sdl, that already exists -> https://vladar4.github.io/nimgame2/ (he left i think..., but good stuff)
09:39:30FromDiscord<kiloneie> It's 2D
09:39:48FromDiscord<systemblue2010> your engine is 2D?
09:39:50FromDiscord<systemblue2010> great
09:39:54FromDiscord<aethrvmn> You could make a mailing list for the engine or whatever↵(@kiloneie)
09:39:59FromDiscord<kiloneie> This is meant for my game, that will probably take 5+ years. You may see glimpses of my progress in either main or offtopic from time to time.
09:40:02FromDiscord<systemblue2010> I'm finding 2D game engine to be my GUI framework
09:40:20FromDiscord<systemblue2010> um...
09:40:33FromDiscord<systemblue2010> and then can I add you friend?
09:41:17FromDiscord<kiloneie> You can add me whenever, i just don't know what that will do, i am 100% offline all the time as a status.
09:41:46FromDiscord<systemblue2010> yes it's okay
09:42:22FromDiscord<aethrvmn> There are libs like datamancer and arraymancer for data/ml, and there are other maths libs↵(@systemblue2010)
09:43:12FromDiscord<aethrvmn> I'm trying to reason if it makes sense to use macros to do integrals and derivatives too, but idk enough about macros currently
09:43:32FromDiscord<finnt730> question↵when I use Nim, and compile to JS↵does it work with https://nim-lang.org/docs/db_mysql.html#DbConn as well?↵if so that would be pretty neat
09:44:18FromDiscord<systemblue2010> In reply to @finnt730 "question when I use": oh web nim user cool
09:44:21FromDiscord<kiloneie> This is what you can see so far, movement, create event, collisions(broken atm, am now using image origin properly, so i need to adjust for that...), moving bullets, damage the walls, destroy them. https://media.discordapp.net/attachments/371759389889003532/1432303900391641162/Screenshot_2025-10-27_10-43-00.png?ex=69009074&is=68ff3ef4&hm=2ad670a883068282c6d890fd4f0d1f458e2c44e2d101a6f6f362c01f9fd38014&
09:44:30FromDiscord<kiloneie> And that awful image i drew...
09:44:38FromDiscord<kiloneie> It looked better up close <.<
09:44:43FromDiscord<systemblue2010> In reply to @kiloneie "This is what you": is it for arcade?
09:44:49FromDiscord<finnt730> In reply to @systemblue2010 "oh web nim user": not really↵but I am getting sick of Sequal Ace on mac lol
09:45:16FromDiscord<finnt730> so if I can make a simple web interface, or a JS script that I can import a lot of DB stuff with it, it would be neat
09:45:33FromDiscord<finnt730> and JS because it is easy to run within the docker container
09:45:54FromDiscord<kiloneie> In reply to @systemblue2010 "is it for arcade?": No, this is the start of a game, that will be, let's say, a far cry away from Among Us. heavily inspired by Warcraft 3 parasite/metastasis custom maps/mods, and later Space Station 13.
09:47:28FromDiscord<kiloneie> Basically Space Station 13, but more focused on survival, than your wacko job.
09:47:38FromDiscord<kiloneie> Combat oriented.
09:47:41FromDiscord<systemblue2010> make nice game
09:47:51FromDiscord<systemblue2010> I can't wait to play it
09:48:02FromDiscord<systemblue2010> is it run on linux?
09:48:21FromDiscord<kiloneie> I am making it on Pop OS COSMIC, so yes.
09:50:23FromDiscord<systemblue2010> oh
09:50:27FromDiscord<systemblue2010> Pop!_OS
09:50:39FromDiscord<systemblue2010> the coolest linux distro
09:50:49FromDiscord<systemblue2010> I'd used it before
09:51:42FromDiscord<kiloneie> This is their new, now in beta(started using it in alpha), desktop environment.
09:53:34FromDiscord<systemblue2010> In reply to @finnt730 "question when I use": no it doesn't work
09:54:40FromDiscord<finnt730> 👍 good to know
09:54:55FromDiscord<finnt730> perhaps I will make a native implementation then
09:57:05FromDiscord<systemblue2010> In reply to @finnt730 "perhaps I will make": how about using node-js database library
09:57:10FromDiscord<systemblue2010> or
09:57:25FromDiscord<systemblue2010> write with nim-c and compile it to WASM
10:04:06FromDiscord<aethrvmn> Wrap node-js in nim↵(@systemblue2010)
10:04:19FromDiscord<aethrvmn> Wrap node-js db lib in nim
10:04:28FromDiscord<Robyn [She/Her]> https://github.com/juancarlospaco/nodejs brrr
10:05:08FromDiscord<Robyn [She/Her]> In reply to @finnt730 "perhaps I will make": Could also also compile a MySQL client to WASM and embed it with appropriate bindings :>
10:06:46FromDiscord<finnt730> I will look into it more↵there is also the option to use Datagrip rom Jetbrains, but I am not sure how I can use a compressed DB with that↵thanks for the help, regardless 🙂
10:06:56FromDiscord<finnt730> when home I will check things out
10:06:59FromDiscord<systemblue2010> who mention me?
10:07:35FromDiscord<finnt730> ¯\_(ツ)_/¯
10:36:43*przmk quit (Read error: Connection reset by peer)
10:36:57*przmk joined #nim
12:17:33*ainema joined #nim
12:21:26*zero` joined #nim
12:26:17*fallback quit (Quit: IRCNow and Forever!)
12:32:59*vsantana joined #nim
12:36:32*fallback joined #nim
13:30:05*krunsh joined #nim
15:30:35*ainema left #nim (#nim)
15:49:39FromDiscord<anuke> sent a long message, see https://pasty.ee/wAAAXuib
15:54:16FromDiscord<anuke> e.g. `rand(10f..0f)` return correct values, but crashes if not run with -d:danger
15:55:02FromDiscord<anuke> (edit) "e.g. `rand(10f..0f)` return correct values, but crashes if not run with -d:danger ... " added "due to range checks"
15:58:54*hygo joined #nim
16:18:13FromDiscord<Robyn [She/Her]> In reply to @anuke "Is there a way": you could use the patch file Nim script function or whatever it's called, but atp I recommend just making your own copy of random.nim with your changes
16:19:20FromDiscord<Robyn [She/Her]> In reply to @anuke "e.g. `rand(10f..0f)` return correct": you could possibly push range checks off via the pragma before the callsite, then pop it after the function has been called?
16:19:37FromDiscord<Robyn [She/Her]> not sure the exact syntax though
16:59:55FromDiscord<amun0666> it works as expected
17:03:09*adigitoleo quit (Ping timeout: 264 seconds)
17:04:26*adigitoleo joined #nim
17:15:47FromDiscord<heysokam> In reply to @anuke "Is there a way": Function overloading fixes your issue better
17:22:01FromDiscord<anuke> I have at least a hundred usages of RNG calls in my codebase, I'll try the patch approach. Changing the callsite everywhere isn't viable and I don't see how overloading helps when it is called internally in the file
17:24:42*beholders_eye quit (Ping timeout: 240 seconds)
17:26:42*beholders_eye joined #nim
17:38:06*beholders_eye quit (Ping timeout: 256 seconds)
17:39:57*beholders_eye joined #nim
18:32:56*hygo_ joined #nim
18:35:04FromDiscord<.tokyovigilante> Am finally beginning to understand memory management, but just to confirm, if I have an Object thus: `type MyObject = object`, i get an implicit `=destroy` but if I create my own one it's overridden. I can then use `type MyObjectRef = ref MyObject` where I would want to use a ref type. ↵However if I create a ref object directly: `type MyObjectRef = ref object`, I can't create a `=destroy` hook just for the ref object? eg. `=dest
18:35:34FromDiscord<.tokyovigilante> (edit) "Am finally beginning to understand memory management, but just to confirm, if I have an Object thus: `type MyObject = object`, i get an implicit `=destroy` but if I create my own one it's overridden. I can then use `type MyObjectRef = ref MyObject` where I would want to use" => "sent" | "ref type. ↵However if I create a ref object directly: `type MyObjectRef = ref object`, I can't create a `=destroy` hook just for the r
18:37:36*hygo quit (*.net *.split)
18:38:27*krunsh quit (Quit: WeeChat 4.7.1)
18:39:19*krunsh joined #nim
18:50:02*beholders_eye quit (Ping timeout: 244 seconds)
20:33:17*vsantana quit (Ping timeout: 250 seconds)
21:06:21*beholders_eye joined #nim
22:04:58*krunsh quit (Quit: WeeChat 4.7.1)
22:18:02*TheTechRobo quit (Ping timeout: 256 seconds)
22:26:01FromDiscord<heysokam> In reply to @anuke "I have at least": are you calling functions from external modules where you cannot control the imports?↵if not, then create a `random.nim` file that has `import std/random as std_random; export std_random.whateverYouNeed`, and import your modified `./random` file instead of `std/random`↵That way overloading will work without touching anything else
22:26:56FromDiscord<heysokam> The only reason why overloading would not work is if you have no control of the import list where rand is being called
22:29:53*TheTechRobo joined #nim
22:31:04FromDiscord<heysokam> sent a long message, see https://pasty.ee/KzbimhCk
22:38:46FromDiscord<nasuray> In reply to @anuke "I have at least": https://nim-lang.org/docs/nimscript.html#patchFile%2Cstring%2Cstring%2Cstring this can patch a single module
23:10:26FromDiscord<anuke> In reply to @heysokam "are you calling functions": If std/random uses the 'wrong' rand internally, is that still fixable through overloads? I was of the impression that it is not
23:10:57FromDiscord<Elegantbeef> @anuke Nim chooses the module's symbols over imported if it helps any
23:12:03FromDiscord<anuke> Right, so it would not work there