<< 27-05-2026 >>

00:19:42*rockcavera joined #nim
00:36:13FromDiscord<toitle3554> Does anybody have recommendations for macro libraries that can fill in function headers for a known function type?
00:37:10FromDiscord<toitle3554> sent a code paste, see https://play.nim-lang.org/#pasty=AnZNkJCK
00:37:57FromDiscord<toitle3554> (edit) "https://play.nim-lang.org/#pasty=dkNgQaMc" => "https://play.nim-lang.org/#pasty=QMOpRuPM"
00:43:53FromDiscord<ElegantBeef> sent a code paste, see https://play.nim-lang.org/#pasty=lwRWIjGr
02:06:28*rockcavera quit (Remote host closed the connection)
05:52:23*amadaluzia quit (Quit: Gateway shutdown)
05:52:46*amadaluzia joined #nim
06:25:42FromDiscord<randomstranger0812> Uh
06:25:56FromDiscord<randomstranger0812> nimble build hangs...
06:26:34FromDiscord<randomstranger0812> It tries to request releases.json and wont go on
06:32:02FromDiscord<randomstranger0812> Nevermind, something horrible is Happening to our network
07:12:42*Skippy8 joined #nim
07:13:18*Jjp137 quit (Ping timeout: 246 seconds)
07:21:14*Skippy8 quit (Ping timeout: 252 seconds)
07:21:36*Skippy8 joined #nim
07:28:09*Skippy8 quit (Ping timeout: 248 seconds)
08:13:42*beholders_eye joined #nim
08:33:13FromDiscord<crochubourbier> wait, nim playground is still down ?
08:57:13*deavmi quit (Quit: No Ping reply in 180 seconds.)
08:58:22*beholders_eye quit (Ping timeout: 276 seconds)
09:02:36*deavmi joined #nim
09:06:35FromDiscord<crochubourbier> I've seen on the docs that exportc cannot be used on enums and constants, but why is that so ? how am I supposed to interop with C if I cant share enums and constants ?
09:07:03FromDiscord<crochubourbier> I want to create a library in nim and use it in C
09:14:51FromDiscord<crochubourbier> If it's the only option I'll write myself some helper macros, but if someone already faced this problem before I'd be interested in talking about how they handled it
09:24:36*Jjp137 joined #nim
09:40:22*emery quit (Read error: Connection reset by peer)
09:45:01*emery joined #nim
09:51:18*SchweinDeBurg quit (Quit: WeeChat 4.8.0-dev)
09:53:55*SchweinDeBurg joined #nim
09:54:10*SchweinD1 joined #nim
09:54:28*SchweinD2 joined #nim
09:58:07*SchweinDeBurg quit (Ping timeout: 244 seconds)
09:58:42*SchweinD1 quit (Ping timeout: 248 seconds)
10:01:15FromDiscord<vovawlad> Hello, does any of you use https://github.com/nim-lang/langserver with neovim?
10:07:40FromDiscord<amun0666> In reply to @crochubourbier "I've seen on the": Nim's const is a compile time constant, C linking requires a symbol.
10:09:02FromDiscord<amun0666> sent a code paste, see https://paste.rs/0tpDe
10:09:20FromDiscord<amun0666> (edit) "https://paste.rs/TFfAu" => "https://paste.rs/rRUuO"
10:10:55FromDiscord<vovawlad> Also what do you recommend to handle errors when building a lib, exceptions or something else? I saw a lib which more or less emulates the `Result[T, E]` from rust
10:11:22*Skippy8 joined #nim
10:12:24FromDiscord<crochubourbier> In reply to @vovawlad "Also what do you": exceptions is the standard way of handling errors in nim, the raised error types are tracked by the type system
10:12:25FromDiscord<amun0666> You can exportc "let"s.
10:12:40FromDiscord<vovawlad> In reply to @crochubourbier "exceptions is the standard": Alright
10:13:07FromDiscord<amun0666> Yes, exceptions are native nim way of handling errors.
10:13:53FromDiscord<crochubourbier> In reply to @amun0666 "You can exportc "let"s.": Ok, I understand for consts then, but for enums ? why couldn't we say like like map this enum to a C enum ?
10:14:42FromDiscord<crochubourbier> (edit) "map" => "makr" | removed "to" | "this enuma ... C" added "transparent"
10:14:50FromDiscord<crochubourbier> (edit) "makr" => "make"
10:15:52FromDiscord<crochubourbier> because we can already use importc for enums to map it to already defined C enum, so why not the other way around ?
10:16:07FromDiscord<crochubourbier> (edit) "it" => "them"
10:16:19FromDiscord<crochubourbier> (edit) "because we can already use importc for enums to map them to ... already" added "an"
10:16:19FromDiscord<vovawlad> Last question I hope, I'm building a small API, and I use a sqlite db for that, I want to open a connection to the db at the start of the program and only call `db.close()` at the end of the program, nim doesn't support top level defers, so I thought about using `addQuitProc()` but it seems a little bit dirty, I know I can just use a proc and put my "main" code inside but is there a more nim way of doing that?
10:17:18FromDiscord<crochubourbier> In reply to @vovawlad "Last question I hope,": you could overload the `=destroy` proc
10:17:39FromDiscord<crochubourbier> (edit) "`=destroy`" => "``=destroy``"
10:17:40FromDiscord<vovawlad> In reply to @crochubourbier "you could overload the": Oh I didn't thought about that, very nice! Ty
10:17:58FromDiscord<crochubourbier> (edit) "``=destroy``" => "` `=destroy` `"
10:17:59FromDiscord<amun0666> In reply to @crochubourbier "Ok, I understand for": You can export functions, global variables and other runtime objects only.
10:18:17*beholders_eye joined #nim
10:18:25FromDiscord<amun0666> The same way you can't dlsym a struct in C.
10:21:34FromDiscord<crochubourbier> sent a code paste, see https://play.nim-lang.org/#pasty=DlHkbEdJ
10:23:08FromDiscord<amun0666> Yes.
10:24:15FromDiscord<crochubourbier> Ok, I'll just write a helper macro that automates the process then
10:49:42tarzeauwho would be able to help me with the debian package of src:nim ?
10:50:43tarzeauit's now at 2.2.4 (-2) i'd close bugs.debian.org/1074512 ideally with a new version: 2.2.10
10:52:23tarzeauadvantage would be: debian, devuan, ubuntu users get a latest version!
10:52:31FromDiscord<amun0666> I can give you mine debian/ contents.
10:52:40FromDiscord<amun0666> (edit) "mine" => "my"
10:52:41tarzeaumy problem: current pkg 125562048 Sep 23 2025 nim_2.2.4.orig.tar.xz (look at the size)
10:52:50tarzeauand 8287652 Apr 24 05:40 nim-2.2.10.tar.xz
10:53:05*Skippy8 quit (Read error: Connection reset by peer)
10:53:32tarzeau@amun0666 please share...
10:53:34*Skippy8 joined #nim
10:53:42Amun-Ratarzeau: Download https://retro.rocks/tmp/nim-2.2.10.tar.bz2 , unpack, change directory, run ./build.sh
10:55:29tarzeauAmun-Ra: i can already see git command in your rules/ but trying...
10:55:54Amun-Ratarzeau: it'll clone the repo, compile it and build a deb file in ..
10:56:02tarzeauAmun-Ra: the thing is, i will need to generate a nim_2.2.10.orig.tar.xz that can be used to build everything offline. no git no internet
10:56:19Amun-Raah, so you need to remove "-b" from dpkg-buildpackage call
10:56:20tarzeauAmun-Ra: so i'll want to clone the repo, create tarball, debuild it
10:56:31tarzeaui've not run your ./build.sh, but just debuild
10:56:40tarzeaubut yes debuild -S will do the trick
10:56:48Amun-RaI usually use dpkg-buildpackage instead of debuild
10:57:27Amun-Raand I don't remember why… ;)
10:58:04Amun-Rafeel free to report any bugs
10:59:57Amun-RaI usually write rules that way, 1. clone/download+unpack, 2. build
11:06:25tarzeaubecause it's longer/harder to type...
11:06:52tarzeauperfect, thank you :) if that works. do you wish to be co-maintainer?
11:06:58Amun-Rasure :)
11:07:23tarzeauyour name+email address? amun <[email protected]> ?
11:07:51Amun-Rathis is a fake template address in my home intranet
11:07:54tarzeau(non functional email, but i guess that's fine)
11:08:12tarzeauso the q is do you want to use functional email, if so which?
11:08:42Amun-RaI'll be back in ~15 minutes; I'll pm you then
11:08:45tarzeauyou'd end up with a page like this: https://qa.debian.org/developer.php?login=james.cuzella%40lyraphase.com
11:08:53tarzeauperfect! egypt god.
11:08:58Amun-Ra;)
11:36:53*beholders_eye quit (Ping timeout: 244 seconds)
11:56:32FromDiscord<spotlightkid> Is there really no `glob` or `fnmatch` implementation in the stdlib, or did i just not look hard enough?
11:57:24Amun-Rastd/glob?
11:57:42Amun-Rawait
11:57:56Amun-RaI thought it's there
12:01:36FromDiscord<spotlightkid> I thought it might maybe be in nimscript, alas no.
12:12:33FromDiscord<spotlightkid> ah, `glob` is in `posix`, but it's just using the libc implementtaion and you use it via https://nim-lang.org/docs/osdirs.html#walkPattern.i,string↵So not usable in nimscript \:-(
12:22:39*kick455 joined #nim
12:23:03*oculux quit (Ping timeout: 252 seconds)
12:26:37*oculux joined #nim
12:29:43*kick455 quit (Ping timeout: 264 seconds)
12:35:17*deavmi quit (Quit: No Ping reply in 180 seconds.)
12:45:10*kick455 joined #nim
12:46:09*oculux quit (Ping timeout: 252 seconds)
12:52:37*oculux joined #nim
12:55:13*kick455 quit (Ping timeout: 244 seconds)
13:01:49*beholders_eye joined #nim
13:06:24*kick455 joined #nim
13:08:13*oculux quit (Ping timeout: 261 seconds)
13:11:41*oculux joined #nim
13:12:48*kick455 quit (Ping timeout: 253 seconds)
13:50:10tarzeauyay https://buildd.debian.org/status/package.php?p=nim&suite=sid
14:16:06*deavmi joined #nim
14:55:46*Skippy8 quit (Ping timeout: 248 seconds)
14:59:45*Skippy8 joined #nim
15:13:20*Skippy8 quit (Ping timeout: 256 seconds)
16:02:19*emery quit (Read error: Connection reset by peer)
16:02:46*emery joined #nim
16:10:40FromDiscord<vovawlad> Nim is fucking incredible, I rewritten the small API I had in nim from go, and the binary is smaller, faster, and consume way less RAM
16:10:45*beholders_eye quit (Ping timeout: 252 seconds)
16:10:47FromDiscord<vovawlad> Also the code is more compact
16:18:02*Skippy8 joined #nim
16:22:31*Skippy8 quit (Ping timeout: 264 seconds)
16:44:24*Skippy8 joined #nim
16:55:48*beholders_eye joined #nim
17:04:44FromDiscord<nervecenter> In reply to @vovawlad "Nim is fucking incredible,": Nim makes some pretty sensible choices about value semantics and single ownership that make writing higher-level programs a breeze. I'll be talking about these things at NimConf.
17:05:39FromDiscord<nervecenter> It's fairly unique amongst native-compiled languages for its cross-section of choices, most languages just end up stepping on each others' toes.
17:07:56FromDiscord<vovawlad> I feel like nim has become what C++ should have been
17:10:37FromDiscord<.rynte> what is nim conf?
17:14:38*beholders_eye quit (Ping timeout: 273 seconds)
17:28:00FromDiscord<nervecenter> In reply to @.rynte "what is nim conf?": Nim Conference, will be online on YouTube in July. See #nimconf.
17:29:21FromDiscord<.rynte> In reply to @nervecenter "Nim Conference, will be": I should have read more channel names before asking, lol. thanks
17:37:18*Skippy8 quit (Ping timeout: 246 seconds)
17:38:21*Skippy8 joined #nim
17:49:50*beholders_eye joined #nim
18:41:36*Lord_Nightmare quit (Quit: ZNC - http://znc.in)
18:56:42FromDiscord<nasuray> In reply to @nervecenter "Nim Conference, will be": Isn't it in June? https://conf.nim-lang.org/
19:05:24*amadaluzia quit (Read error: Connection reset by peer)
19:10:21*amadaluzia joined #nim
19:15:29*xutaxkamay quit (Ping timeout: 244 seconds)
19:15:33*Skippy8 quit (Ping timeout: 252 seconds)
19:16:25*Skippy8 joined #nim
19:22:18*xutaxkamay joined #nim
20:00:10FromDiscord<nervecenter> In reply to @nasuray "Isn't it in June?": My bad, I was getting dates in my head mixed up.
20:09:25FromDiscord<0ffh> In reply to @vovawlad "I feel like nim": Arguably, C++ should have stayed a research language.↵Unfortunately, people hell-bent on OOP and looking for a faster language discovered and chose to use it.
20:18:08FromDiscord<nervecenter> Path dependence and lock-in
20:18:43FromDiscord<nervecenter> There weren't really better options...iirc both Ada and Pascal were closed source back then, right? Plus most Common Lisp compilers...
20:20:25FromDiscord<nervecenter> Not like that matters, tons of C++ adoption was driven through M$ and Visual Studio
20:29:38FromDiscord<tempestro> The only two usable languages with OOP back then were Java and C++↵You could either rewrite your entire codebase in an entirely different language and get dogshit performance as a reward (the JVM's pretty close to native code nowadays, but it was awful back then), or you could use a language that's backwards compatible, just as fast and could be adopted gradually
20:30:10FromDiscord<tempestro> (edit) "be adopted" => "introduced into the codebase"
20:38:59*Lord_Nightmare joined #nim
21:07:38*Skippy8 quit (Ping timeout: 263 seconds)
21:18:19tarzeauany fans of BASIC, LOGO, or Objective-C ?
21:32:10FromDiscord<0ffh> In reply to @nervecenter "There weren't really better": There were plenty of Pascal compilers, I'm sure some must have been open source. But Pascal is not an OOP language, which is what the early adopters of C++ mostly wanted.
21:33:34FromDiscord<0ffh> In reply to @tempestro "The only two usable": There was a lot of time between C++ and Java.
21:35:00FromDiscord<0ffh> I think your alternatives were Simula, Smalltalk, an maybe Objective-C.
21:42:06*emery quit (Read error: Connection reset by peer)
21:45:00*xet7 quit (Quit: Leaving)
21:46:26*emery joined #nim
21:46:55*rockcavera joined #nim
21:47:55*xet7 joined #nim
22:12:06*beholders_eye quit (Ping timeout: 256 seconds)
22:15:14*oculux quit (Ping timeout: 248 seconds)
22:22:17FromDiscord<raynei486> sent a code paste, see https://play.nim-lang.org/#pasty=IFrpJFLr
22:25:12FromDiscord<raynei486> At first I thought it was because I declared `searchMove` as `func`, but even by changing it to `proc` and forcing side effects it had the same error
22:26:48FromDiscord<raynei486> I tried reproducing this in a scenario without `nimchess` but it seemed to work fine there
22:53:41*pmp-p quit (Killed (NickServ (GHOST command used by pmp-p_)))
22:53:46*pmp-p_ joined #nim
23:16:59*rockcavera quit (Read error: Connection reset by peer)
23:17:41*pmp-p_ quit (Ping timeout: 252 seconds)
23:19:07*rockcavera joined #nim
23:19:08*rockcavera quit (Changing host)
23:19:08*rockcavera joined #nim
23:20:14*pmp-p joined #nim
23:23:51*tiorock joined #nim
23:23:51*tiorock quit (Changing host)
23:23:51*tiorock joined #nim
23:23:51*rockcavera quit (Killed (uranium.libera.chat (Nickname regained by services)))
23:23:51*tiorock is now known as rockcavera
23:25:29*rockcavera quit (Read error: Connection reset by peer)
23:26:15*rockcavera joined #nim
23:26:15*rockcavera quit (Changing host)
23:26:15*rockcavera joined #nim
23:33:57*tiorock joined #nim
23:33:57*tiorock quit (Changing host)
23:33:57*tiorock joined #nim
23:33:57*rockcavera is now known as Guest9055
23:33:57*tiorock is now known as rockcavera
23:34:14*rockcavera quit (Read error: Connection reset by peer)
23:34:33*rockcavera joined #nim
23:34:34*rockcavera quit (Changing host)
23:34:34*rockcavera joined #nim
23:35:19*tiorock joined #nim
23:35:19*tiorock quit (Changing host)
23:35:19*tiorock joined #nim
23:35:19*rockcavera quit (Killed (uranium.libera.chat (Nickname regained by services)))
23:35:19*tiorock is now known as rockcavera
23:36:09*Guest9055 quit (Ping timeout: 245 seconds)
23:42:22*tiorock joined #nim
23:42:23*tiorock quit (Changing host)
23:42:23*tiorock joined #nim
23:42:23*rockcavera quit (Killed (iridium.libera.chat (Nickname regained by services)))
23:42:23*tiorock is now known as rockcavera
23:57:29*rockcavera quit (Read error: Connection reset by peer)
23:57:47*rockcavera joined #nim
23:57:48*rockcavera quit (Changing host)
23:57:48*rockcavera joined #nim