<< 01-06-2025 >>

00:04:43*amadaluzia quit (Quit: ZNC 1.9.1 - https://znc.in)
01:03:58FromDiscord<nasuray> I offer in my library option 2 AND `--dir,=dir1,dir2`
01:36:14FromDiscord<litlighilit> easy. a nimble pkg\: https\:&#47;&#47;github.com&#47;beef331&#47;fungus↵(@hawkey5212)
01:36:27*amadaluzia joined #nim
02:17:23FromDiscord<DetermiedNim1> whatever happened to that link 😭
02:24:49FromDiscord<Elegantbeef> https://github.com/beef331/fungus
02:24:56FromDiscord<Elegantbeef> What a nice little package
04:11:03*xet7 quit (Remote host closed the connection)
05:29:25*kenran joined #nim
05:56:53FromDiscord<DetermiedNim1> Yeah I bet whoever made it is really cool
06:06:48*kenran quit (Remote host closed the connection)
06:08:09FromDiscord<Phil> In reply to @aintea "But it is a": Huh, ppersonally I like macro'ing a decent amount, overall its just preparing the code snippets you want and shaping the data so you can fill those code-snippets in as intended.↵It's kind of like generating HTML in a sense
06:08:18*kenran joined #nim
06:50:57*kenran quit (Remote host closed the connection)
07:01:07FromDiscord<rakgew> sorry for the lack of clarity. it would be in the app.↵I usually use `cligen.dispatch` to pass a proc to be used as the cli app entry point. but it seems there is no way to pass the version string `fromNimble` in there.↵(@heysokam)
07:02:17FromDiscord<rakgew> but since cligen provides that proc, I assume it is expected to be used in cligen context.
07:08:15FromDiscord<rakgew> huh, I think I found it\: type `ClCfg` apparently takes a version, and if I use `dispatchCf` instead of `dispatch`I can pass the version.. \:fingers\_crossed\:
07:16:12FromDiscord<rakgew> hm, not quite. now it does compile, but I get↵`Error unhandled exception index out of bounds, the container is empty`↵back to debugging..
07:17:43*kenran joined #nim
07:19:54FromDiscord<hawkey5212> In reply to @litlighilit "easy. a nimble pkg\:": Looks cool, but it should just already exist in the language. For things like this, there are probably going to be 5 different packages solving a problem that should just be a language feature
07:23:37*andy-turner joined #nim
07:26:20FromDiscord<rakgew> agreed, would be nice if it was directly in the language.↵cligen I used in quite a few of my small helper tools (and it works nicely there), as I can point it to a proc and it uses its args and doc to generate common cli app behavior, without me implementing that boilerplate. up to now I just did not need the version in there.
07:58:11*amadaluzia_ joined #nim
08:00:24*amadaluzia quit (Ping timeout: 260 seconds)
08:00:59*derpydoo joined #nim
08:51:29*amadaluzia_ quit (Ping timeout: 248 seconds)
10:06:01FromDiscord<aintea> In reply to @nasuray "I offer in my": Yeah in the end I will offer option 1 and 2 since they are compatible
10:33:13*derpydoo quit (Quit: derpydoo)
10:38:03*xet7 joined #nim
11:29:20FromDiscord<rakgew> when I get a↵`Error: unhandled exception: index out of bounds, the container is empty [IndexDefect]`↵is there a way to find out which container is at fault?↵have thrown some `echo` into the cligen macros, but I still have not found the source of the problem.
11:41:49*xet7 quit (Remote host closed the connection)
12:21:13FromDiscord<leorize> isn't there usually a stack trace?
12:21:39*przmk quit (Remote host closed the connection)
12:22:06*przmk joined #nim
12:54:23FromDiscord<rakgew> sent a code paste, see https://play.nim-lang.org/#pasty=uLkGzzvH
12:56:57FromDiscord<rakgew> and in /home/user/.choosenim/toolchains/nim-2.2.4/lib/system.nim I do not find anything, that is called alignTable.
12:58:06FromDiscord<rakgew> ah wait apparently there is a `alignTable` inside cligen/textUt.nim (which does not appear in the stack trace) I will have a read there
13:03:38FromDiscord<rakgew> ok it seems to happen inside `align table`, now I have a new pointer to search from.
13:25:08FromDiscord<nasuray> In reply to @rakgew "sorry for the lack": Did you not modify like I said above by setting the version string ?
13:30:16FromDiscord<rakgew> sent a code paste, see https://play.nim-lang.org/#pasty=nOvYOrwe
13:32:48FromDiscord<nasuray> Ya I would just modify the existing one unless you have a use case that requires multiple ClCfg objects. Because it's probably not initialized correctly when you create it that way
13:35:05FromDiscord<rakgew> aha, yes they use it differently in the test than I did - I will try that right away.
13:38:07FromDiscord<rakgew> yay - that works - thank you so much @nasuray !
13:38:58FromDiscord<rakgew> tbh, I was not aware at all, that there was a clcfg already initialized.
13:43:45FromDiscord<nasuray> In reply to @rakgew "tbh, I was not": Ya in the past when I've needed more than two I just copy the existing object then modify it. You can also see the defaults it is initialized with at the top of `cligen/cligen.nim`
13:45:57*alexdaguy joined #nim
13:45:58FromDiscord<rakgew> I see, thank you. glad now, I do not need to resort to hacky workarounds and can use cligen as is.
14:05:56*andy-turner_ joined #nim
14:07:11*andy-turner quit (Read error: Connection reset by peer)
14:12:59*andy-turner_ quit (Remote host closed the connection)
14:13:17*andy-turner_ joined #nim
14:23:17*andy-turner_ quit (Read error: Connection reset by peer)
14:23:26*andy-turner_ joined #nim
14:32:06*SchweinDeBurg quit (Quit: WeeChat 4.7.0-dev)
14:37:36*SchweinDeBurg joined #nim
14:52:16*fabricio joined #nim
15:24:00*beholders_eye joined #nim
15:30:46FromDiscord<rasmolaxsus> sent a long message, see https://pasty.ee/mZRRlXCu
15:32:38FromDiscord<rasmolaxsus> (edit) "https://pasty.ee/cPAaFcLv" => "https://pasty.ee/vqmMuRWm"
15:37:27FromDiscord<heysokam> sent a long message, see https://pasty.ee/ocmMSOUq
15:44:36*alexdaguy quit (Quit: ded)
15:58:27FromDiscord<lainlaylie> when the manual and an llm disagree, you should assume the manual is correct. (side note: what is nim-docs.readthedocs and why does it exist?)↵↵it's possible to define macros to be called as pragmas on (at least) variable definitions and proc definitions. what kind of statement did you want to call your macro on?
16:01:13*beholders_eye quit (Ping timeout: 245 seconds)
16:14:16*andy-turner_ quit (Read error: Connection reset by peer)
16:14:36*andy-turner_ joined #nim
16:25:30*derpydoo joined #nim
16:31:28*przmk_ joined #nim
16:31:49*przmk quit (Ping timeout: 248 seconds)
16:31:49*przmk_ is now known as przmk
16:32:57*derpydoo quit (Quit: derpydoo)
17:35:05*skippy8 joined #nim
17:38:30*andy-turner_ quit (Read error: Connection reset by peer)
17:38:48*andy-turner_ joined #nim
18:31:53*ftajhii quit (Remote host closed the connection)
18:40:43*ftajhii joined #nim
18:45:31FromDiscord<aintea> the LLM is always wrong
18:45:49FromDiscord<aintea> neither claude, deepseek nor chatgpt can do correct Nim macros that are beyond what you can do with templates
18:55:01FromDiscord<Elegantbeef> That's just why you never use an LLM
18:55:20FromDiscord<aintea> LLMs are cool for spotting micro mistakes if you explain well enough
18:55:26FromDiscord<aintea> and writing unit tests
18:55:42FromDiscord<Elegantbeef> Bleh
18:56:34FromDiscord<griffith1deadly> think of llm's like bad juniors
18:58:22FromDiscord<Elegantbeef> It's too easy to go for the joke "that's funny cause I don't think of them at all"
19:01:55FromDiscord<aintea> how do I specifically want nimble to execute on test and not others
19:02:48FromDiscord<Elegantbeef> Don't name them `t.nim` 😄
19:03:16FromDiscord<Elegantbeef> https://nim-lang.github.io/nimble/create-packages.html#nimble-test
19:23:22*kenran quit (Remote host closed the connection)
19:29:46*andy-turner joined #nim
19:29:59*andy-turner_ quit (Read error: Connection reset by peer)
20:20:03FromDiscord<DetermiedNim1> sent a code paste, see https://play.nim-lang.org/#pasty=nHdgbUlf
20:20:54FromDiscord<Elegantbeef> `int` != `cint`
20:21:20FromDiscord<DetermiedNim1> ooooooooh wait im stupid
20:21:25FromDiscord<DetermiedNim1> thank you
20:22:41FromDiscord<DetermiedNim1> yeah that works perfectly now
20:23:11FromDiscord<Elegantbeef> But really you don't need the `testArrRet` cause you can just export the variable
20:23:21FromDiscord<DetermiedNim1> oh really
20:23:22*andy-turner_ joined #nim
20:23:23FromDiscord<DetermiedNim1> cool
20:23:27FromDiscord<DetermiedNim1> uh also
20:23:32*andy-turner quit (Read error: Connection reset by peer)
20:24:01FromDiscord<DetermiedNim1> is it possible to get the size of the array from c or do i just have to have a separate variable for the size
20:24:33FromDiscord<Elegantbeef> A decayed array is decayed so no you cannot get the size without providing it
20:40:34FromDiscord<rasmolaxsus> In reply to @lainlaylie "when the manual and": i guess, i try to learn complex stuff with llm's, so i guess this is one of the places i shouldnt rely on it. Alright, but yeah i want to call it on a proc definitions so that is fine.
21:18:41FromDiscord<mythnus3> sent a code paste, see https://play.nim-lang.org/#pasty=KxrqaZcO
21:20:45FromDiscord<mythnus3> sent a code paste, see https://play.nim-lang.org/#pasty=ajiFIPmX
21:28:47FromDiscord<mythnus3> never mind, it was a problem with me using `include` instead of `import`
21:28:59FromDiscord<mythnus3> (edit) "`include`" => "`import`" | "`import`" => "`include`"
21:35:55*andy-turner_ quit (Quit: Leaving)
21:55:38*dv^_^ quit (Quit: dv^_^)
21:57:01*dv^_^ joined #nim
22:23:19*fabricio quit (Quit: WeeChat 3.5)
22:29:39*dv^_^ quit (Quit: dv^_^)
22:31:06*dv^_^ joined #nim
23:15:11*skippy8 quit (Quit: WeeChat 4.5.2)