<< 30-05-2026 >>

00:01:19*shanoaice quit (Quit: The Lounge - https://thelounge.chat)
00:01:56*shanoaice joined #nim
00:12:28*nisstyre quit (Ping timeout: 244 seconds)
00:26:16*nisstyre joined #nim
02:28:24*zodman quit (Quit: WeeChat 4.8.2)
02:28:39*zodman joined #nim
02:39:59*rockcavera joined #nim
04:02:01FromDiscord<jubalrahl> Hello all! Can I write nim code to compile to a COM object for a vb6 application to use?
04:47:57*SchweinD2 quit (Quit: WeeChat 4.8.0-dev)
05:04:13*xet7 quit (Remote host closed the connection)
05:05:43*xet7 joined #nim
05:20:48FromDiscord<Phil> In reply to @beastieboard "Tbh I think i": The fundamental problem you'll run into that for parsing all of nim, which is a lot because keep in mind how methods, generic procs, normal procs and macros work, you'll be relying on nimsuggest. And nimsuggest is just rough around the edges.
05:21:21FromDiscord<Phil> (edit) "edges." => "edges.↵I have some hope that nimony will provide an improvement there, but who knows when that'll be released"
05:21:36FromDiscord<Phil> (edit) "procs" => "procs, templates"
05:25:30FromDiscord<Phil> sent a long message, see https://pasty.ee/nCTBFmuv
05:56:44FromDiscord<shalokshalom> In reply to @beastieboard "Tbh I think i": Do it for #nimony
05:58:17FromDiscord<shalokshalom> That's the version of the language, that is supposed to make the development of a proper LSP possible (among other things)↵↵Nim has always had that problem with LSPs, for (partly) inherent design flaws of the compiler infrastructure - Nimony is a simpler version of the language, improving on that a lot.
06:35:51*SchweinDeBurg joined #nim
06:36:11*SchweinD1 joined #nim
06:40:00*SchweinDeBurg quit (Ping timeout: 248 seconds)
07:01:20*tiorock joined #nim
07:01:20*tiorock quit (Changing host)
07:01:20*tiorock joined #nim
07:01:20*rockcavera is now known as Guest3431
07:01:20*Guest3431 quit (Killed (uranium.libera.chat (Nickname regained by services)))
07:01:20*tiorock is now known as rockcavera
07:15:47*Skippy8 joined #nim
07:34:48*emery quit (Read error: Connection reset by peer)
07:39:22*emery joined #nim
08:33:40*przmk_ quit (Remote host closed the connection)
08:35:15FromDiscord<mratsim> sent a long message, see https://pasty.ee/cXYpunQQ
08:35:41*przmk_ joined #nim
09:25:43*beholders_eye joined #nim
09:34:43*Skippy8 quit (Ping timeout: 244 seconds)
09:35:46*xet7 quit (Remote host closed the connection)
09:39:16*Skippy8 joined #nim
09:44:58*xet7 joined #nim
09:49:11FromDiscord<crochubourbier> Hello, I'm trying to understand how symbol resolving works in macros, so basically from what I understood `bindSym` searchs for the symbol in the scope of the file in which the macro is defined (not the caller's scope), and if you use `ident` instead it resolves at callsite, but what should I do if I want it to lookup in both locations ? for example first lookup into the macro's file scope, then if it fails to `bindSym`, lookup in the c
09:49:23FromDiscord<crochubourbier> (edit) "Hello, I'm trying to understand how symbol resolving works in macros, so basically from what I understood `bindSym` searchs for the symbol in the scope of the file in which the macro is defined (not the caller's scope), and if you use `ident` instead it resolves at callsite, but what should I do if I want it to lookup in both locations ? for example first lookup into the macro's file scope, then if it fails to `bindSym`, lookup
09:49:34*emery quit (Read error: Connection reset by peer)
09:49:46FromDiscord<crochubourbier> (edit) "Hello, I'm trying to understand how symbol resolving works in macros, so basically from what I understood `bindSym` searchs for the symbol in the scope of the file in which the macro is defined (not the caller's scope), and if you use `ident` ... instead" added "or `genSym`"
09:49:57FromDiscord<crochubourbier> (edit) removed "`genSym`"
09:50:02*emery joined #nim
09:50:05FromDiscord<crochubourbier> (edit) removed "or"
09:51:07FromDiscord<crochubourbier> (edit) "Hello, I'm trying to understand how symbol resolving works in macros, so basically from what I understood `bindSym` searchs for the symbol in the scope of the file in which the macro is defined (not the caller's scope), and if you use `ident` instead it resolves at callsite, but what should I do if I want it to lookup in both locations ? for example first lookup into the macro's file scope, then if it fails to `bindSym`, lookup
09:55:57FromDiscord<crochubourbier> Why I want to do this: I want to create a function that parses arguments into a given object type, so depending on the type of each field that we will call `T`, call the `parseT` function to parse it, so if this is a basic type like `int`, it should just use the already defined parseInt, but if it's a custom user defined type, lets say `MyObject` , the user should explicitely define a `parseMyObject` function himself beforehand
09:56:09FromDiscord<crochubourbier> (edit) "this:" => "this (to contextualize):"
09:57:08FromDiscord<crochubourbier> (edit) "Why I want to do this (to contextualize): I want to create a function that parses arguments into a given object type, so depending on the type of each field that we will call `T`, ... call`parseInt`" added "it would" | "parseInt," => "`parseInt` from `strutils` for example,"
09:57:16FromDiscord<crochubourbier> (edit) "Why I want to do this (to contextualize): I want to create" => "sent" | "function that parses arguments into a given object type, so depending on the type of each field that we will call `T`, it would call the `parseT` function to parse it, so if this is a basic type like `int`, it should just use the already defined `parseInt` from `strutils` for example, but if it's a custom user defined type, lets say `MyObject` , the user s
10:00:29FromDiscord<crochubourbier> Maybe it's cleaner to just require the user to import `strutils` himself and always use `ident` instead of `bindSym`
10:00:38FromDiscord<crochubourbier> (edit) "Maybe it's cleaner to just require the user to import `strutils` himself ... and" added "at callsite"
10:10:52FromDiscord<planetis_m> In reply to @crochubourbier "Maybe it's cleaner to": https://nim-lang.github.io/Nim/macros.html#BindSymRule
10:12:03FromDiscord<crochubourbier> In reply to @planetis_m "https://nim-lang.github.io/Nim/macros.html#BindSymR": OK, so `brOpen`
10:15:07FromDiscord<crochubourbier> hmm, it doesnt work, I used `bindSym("parse" & typeName, brOpen)` but it doesn't look into the caller's scope
10:16:09FromDiscord<crochubourbier> my bad, i deleted my msg, it works
10:21:42FromDiscord<crochubourbier> No, it doesn't work, I dont understand, I tried `bindSym("parse" & typeName, brOpen/brForceOpen)` but it doesn't find the function defined in the caller's scope
10:30:21FromDiscord<crochubourbier> sent a code paste, see https://play.nim-lang.org/#pasty=HZKHGBaa
10:37:41FromDiscord<planetis_m> okay then best solution is to import stutils, dont make your users do it instead
10:38:05FromDiscord<crochubourbier> I have to re-export it then, for it to work, because the user has to have it in scope
10:39:08FromDiscord<crochubourbier> (edit) "I have to re-export it then, for it to work, ... becauseI" added "and use `ident` instead of `bindsym`" | "and use `ident` instead of `bindsym`because ... thecustom" added "I want to also handle" | "becauseI want to also handlethe ... userdefined" added "custom" | "has to have it in scope" => "defined functions"
10:39:33FromDiscord<planetis_m> I dont know if a stab assert false function could force it open
10:39:38FromDiscord<crochubourbier> and I also dont quite understand what brOpen does then
10:40:10FromDiscord<crochubourbier> brClosed just takes the first symbol and brOpen resolves overloads, thats all ?
10:41:24FromDiscord<crochubourbier> why would we want to not resolve overloads in the first place ? I dont understand why brOpen is not the default in that case
10:43:34FromDiscord<crochubourbier> In reply to @planetis_m "I dont know if": what do you mean by "stab assert false" function ? wouldnt it just panic the program ?
10:43:45*Skippy8 quit (Ping timeout: 252 seconds)
10:45:20*Skippy8 joined #nim
10:46:49FromDiscord<planetis_m> yes probably
11:03:27*Skippy8 quit (Ping timeout: 257 seconds)
11:13:15FromDiscord<mratsim> In reply to @crochubourbier "OK, so `brOpen`": mixin in template is brOpen.↵↵Or use untyped macro
11:13:48FromDiscord<crochubourbier> In reply to @mratsim "mixin in template is": duuude, I completely forgot about mixin
11:14:03FromDiscord<mratsim> In reply to @crochubourbier "OK, so `brOpen`": also an "undeclared identifier" in macro where you pass an untyped body doesn't mean anything besides, I can't compile
11:14:04*Skippy8 joined #nim
11:14:06FromDiscord<crochubourbier> (edit) "mixin" => "mixin, thanks"
11:14:26FromDiscord<mratsim> it's a terrible error message that eat the root cause quite foten
11:14:53FromDiscord<mratsim> In reply to @crochubourbier "No, it doesn't work,": have fun too: https://github.com/nim-lang/Nim/issues/8677
11:15:04FromDiscord<mratsim> and be aware of the dreadful "generic sandwich"
11:15:11FromDiscord<crochubourbier> In my specific use case I had to use typed, because I need some metadata, but I think `mixin` will do the trick
11:15:45FromDiscord<crochubourbier> (edit) "metadata," => "metadata for other stuff in the same macro,"
11:16:05FromDiscord<mratsim> In reply to @crochubourbier "In my specific use": sometimes an extra export fixes stuff
11:16:14FromDiscord<mratsim> the root of all evil in Nim: https://github.com/nim-lang/Nim/issues/11225
11:16:23FromDiscord<mratsim> (it's only partially fixed)
11:16:58FromDiscord<crochubourbier> Yeah, I considered re-exporting strutils, but it may be cleaner to just use mixin ?
11:17:28FromDiscord<mratsim> just import std/strutils where you use it unless it's user facing then yeah you need reexport
11:17:44FromDiscord<mratsim> mixin assumes the consumer will have the symbol when it's time to resolve it at call site
11:18:24*Skippy8 quit (Ping timeout: 252 seconds)
11:19:58FromDiscord<crochubourbier> oh, you're right, it doesnt fix my problem because I build the identifier name dynamically, and mixin works only for statically known names if im not mistaking
11:20:28FromDiscord<crochubourbier> re-exporting seems to be the best solution then
11:20:35*Skippy8 joined #nim
11:21:33FromDiscord<crochubourbier> (im relying on experimental:dynamicBindSym)
11:45:16*Skippy8 quit (Ping timeout: 250 seconds)
12:00:13*xet7 quit (Remote host closed the connection)
12:07:50FromDiscord<asviest> In reply to @crochubourbier "No, it doesn't work,": It bug, I made issue about it two years ago:↵https://github.com/nim-lang/Nim/issues/23320
12:08:04FromDiscord<asviest> (edit) "In reply to @crochubourbier "No, it doesn't work,": It ... bug," added "is"
12:08:07*beholders_eye quit (Ping timeout: 264 seconds)
14:05:52FromDiscord<tar> debian trixie is still stable until in 400+ days according 5.148.187.105/bts/ thus i want to backport (official bpo) nim and chawan. but failing to build nim on trixie… i wont be online for a while but anyone who wanta to help is more than welcome…
14:47:54*Skippy8 joined #nim
14:53:49*beholders_eye joined #nim
15:15:30*Skippy8 quit (Ping timeout: 248 seconds)
15:22:13*xet7 joined #nim
15:38:15*oculux quit (K-Lined)
15:40:45*zero` joined #nim
15:44:46FromDiscord<pigeonowo> Hey people! I am new here and would like to ask, what you people are building with nim?
15:45:45FromDiscord<_timurski> plasma physics simulations
15:48:09FromDiscord<pigeonowo> Ooo that sounds interesting! Is there also visualisation involved? What is the goal with that?
16:07:34*Skippy8 joined #nim
16:14:13*Skippy8 quit (Ping timeout: 264 seconds)
17:18:11FromDiscord<_timurski> i'm using nim for it bcs it doesn't need to be realtime but still fast + i like nim, and yeah there is a lot of visualization. these images are from a c++ sim i wrote but the future nim one will produce similar results (but at a higher fidelity) https://media.discordapp.net/attachments/371759389889003532/1510331499113742397/Screenshot_2026-05-30_at_10.18.05_AM.png?ex=6a1c6d51&is=6a1b1bd1&hm=fa1e254f499b6f1a3009c5f3ea90dcc1ba0b74f5afd0b1b5d1b