<< 08-06-2025 >>

00:25:42FromDiscord<Robyn [She/Her]> because the parser for Nim hardcodes functions that can be used as operators↵(@aintea)
00:57:50*beholders_eye joined #nim
01:04:49*socrates1298 joined #nim
01:14:24*beholders_eye quit (Ping timeout: 272 seconds)
01:18:32FromDiscord<.tokyovigilante> What’s the state of AI agents for Nim? Worth anything? I’m using nimauggest/nim-langserver with helix and it’s fairly slow and unreliable. Is something like Claude with LSP-AI any better?
01:24:57*beholders_eye joined #nim
01:30:04FromDiscord<Robyn [She/Her]> In reply to @.tokyovigilante "What’s the state of": never heard of LSP AI before, but AIs aren't too great at Nim
01:30:38FromDiscord<Robyn [She/Her]> they can follow the basic rules that are shared with most langs, but not the more intricate parts of Nim, or the more non-standard/recently introduced stuff
01:32:01*beholders_eye quit (Ping timeout: 248 seconds)
01:37:34FromDiscord<.tokyovigilante> In reply to @battery.acid.bubblegum "they can follow the": Thanks, figured as much. LSP-AI is just an LSP server that uses AI as a backend, so you can use it with whatever editor. Would probably be happy with a more efficient/effective nimsuggest
01:39:23FromDiscord<Robyn [She/Her]> no sweat, and yeah wouldn't we all... Nimony should help tooling in leaps and bounds, at least
01:42:52FromDiscord<known2010> please make korean channel!
01:43:07FromDiscord<known2010> Im korean but there is no korean channel in nim
01:44:13FromDiscord<known2010> and also this is my first nim program ↵coreutils nim https://media.discordapp.net/attachments/371759389889003532/1381086380247089212/message.txt?ex=68463c6c&is=6844eaec&hm=dccc29396cfe9e6e36f41aedec3b144e1bdf9c7fc0c0bd3233e4e94cf829afc6&
01:44:19FromDiscord<known2010> this is echo
01:45:31FromDiscord<Robyn [She/Her]> you should send your code in a codeblock or on https://play.nim-lang.com/
01:45:41FromDiscord<Robyn [She/Her]> (edit) "https://play.nim-lang.com/" => "https://play.nim-lang.org/"
01:46:25FromDiscord<Robyn [She/Her]> In reply to @known2010 "please make korean channel!": moderation would probably be an issue since i don't think we have any korean speaking mods
02:03:12*amadaluzia quit (Quit: ZNC 1.9.1 - https://znc.in)
05:28:33*socrates1298 quit (Remote host closed the connection)
06:43:48FromDiscord<heysokam> sent a long message, see https://pasty.ee/AfhpzSlw
06:45:34FromDiscord<heysokam> Both options = nimble support, of course↵I'm just wondering what could be more intuitive for others to find/use
07:47:31FromDiscord<Phil> Monorepo in this case seems like it'd allow for a better dev experience for you, the creator
08:35:14FromDiscord<aintea> In reply to @.tokyovigilante "Thanks, figured as much.": Lmao what's that joje
08:35:18FromDiscord<aintea> (edit) "joje" => "joke"
08:35:24FromDiscord<aintea> LSP-AI ?
08:35:40FromDiscord<aintea> Are people actually tired of using an actual LSP and reading the docs ?
08:37:33FromDiscord<.tokyovigilante> In reply to @aintea "Are people actually tired": Nah, just hoping for a bit more than my combo of helix, nimsuggest and nim-langserver are currently delivering
08:37:56FromDiscord<aintea> Oh no, the tooling in Nim is bad
08:38:08FromDiscord<aintea> Somehow I made it less bad and I don't know how
08:38:17FromDiscord<aintea> The LSP doesn't crash every now and then
08:38:27FromDiscord<aintea> (edit) "The LSP doesn't crash ... every" added "anymore"
08:38:27FromDiscord<.tokyovigilante> I realise the answer is "fix the the tooling", not AI, I'm just too dumb to do the first thing
08:38:40FromDiscord<aintea> You're not too dumb
08:38:50FromDiscord<aintea> I don't even know how I did it and it's not even 100% fixed
08:39:05FromDiscord<aintea> We just have to wait until Nim 3 which should be released later this year
08:39:18FromDiscord<.tokyovigilante> luckily, `:restart-lsp` exists
08:39:24FromDiscord<.tokyovigilante> I am pretty excited about that
08:40:27FromDiscord<.tokyovigilante> orthogonally, is there a better way to express something like `if bitand(family.queueFlags, ord(VK_QUEUE_GRAPHICS_BIT) == VK_QUEUE_GRAPHICS_BIT):`
08:41:15FromDiscord<.tokyovigilante> where `VK_QUEUE_GRAPHICS_BIT` looks like it should be the same type as `family.queueFlags` but isn't?
10:05:52*redj_ joined #nim
10:06:18*GnuYawk10 joined #nim
10:06:26*Freneticks_ joined #nim
10:06:30*noeontheend_ joined #nim
10:06:33*tmpod_ joined #nim
10:09:13*robertmeta_ joined #nim
10:14:20*redj quit (*.net *.split)
10:14:21*GnuYawk1 quit (*.net *.split)
10:14:22*tmpod quit (*.net *.split)
10:14:22*Freneticks quit (*.net *.split)
10:14:23*robertmeta quit (*.net *.split)
10:14:23*noeontheend quit (*.net *.split)
10:14:24*tmpod_ is now known as tmpod
10:14:24*Freneticks_ is now known as Freneticks
10:14:24*robertmeta_ is now known as robertmeta
10:14:24*noeontheend_ is now known as noeontheend
10:14:24*GnuYawk10 is now known as GnuYawk1
10:32:30*przmk_ quit (Remote host closed the connection)
10:32:42FromDiscord<.tokyovigilante> sent a code paste, see https://play.nim-lang.org/#pasty=VaAjqdFC
10:32:48*przmk_ joined #nim
10:36:04FromDiscord<lainlaylie> youre supposed to be able to do that with strictDefs or whatever it is on
10:36:09FromDiscord<janakali> @.tokyovigilante yes, but you need to use all possible values or add an `else` branch
10:36:11FromDiscord<lainlaylie> otherwise just use case expression
10:37:25FromDiscord<janakali> sent a code paste, see https://play.nim-lang.org/#pasty=sbAkLTic
10:37:43FromDiscord<.tokyovigilante> ah yup, cool
10:38:05FromDiscord<janakali> (edit) "https://play.nim-lang.org/#pasty=XeewJrGE" => "https://play.nim-lang.org/#pasty=hpLvBqmD"
10:41:45FromDiscord<.tokyovigilante> sent a code paste, see https://play.nim-lang.org/#pasty=VedHkhME
10:41:58FromDiscord<.tokyovigilante> Now Vulkan is much angrier at me, thanks!
10:42:35FromDiscord<.tokyovigilante> You guys are the real AI 🙂
10:46:33FromDiscord<lainlaylie> there's no comparison, we actually know what we're talking about (usually)
11:09:11*disso-peach joined #nim
11:27:04*disso-peach quit (Ping timeout: 265 seconds)
12:19:35FromDiscord<Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=RJlONWsE
12:19:53FromDiscord<Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=pANMAOTt
12:20:14FromDiscord<Robyn [She/Her]> In reply to @lainlaylie "there's no comparison, we": yip yip
12:20:26FromDiscord<Robyn [She/Her]> p sure I've been using Nim since 2021
14:16:25*fabricio joined #nim
14:22:09*nils` quit (Ping timeout: 248 seconds)
14:58:57*end quit (Ping timeout: 248 seconds)
14:59:00*bcksl quit (Ping timeout: 272 seconds)
15:15:09*socrates1298 joined #nim
15:15:19*socrates1298 quit (Client Quit)
15:29:38*bcksl joined #nim
15:34:40*end joined #nim
15:40:01*ntat joined #nim
15:45:06FromDiscord<heysokam> In reply to @isofruit "Monorepo in this case": you bring a really good idea with the monorepo↵could have it in a folder acting as a separate independent git folder, and then split the tree if its ever needed↵dx for me is better merged into one repo or monorepo, but was wondering what's more intuitive for others in their perspective
15:47:11FromDiscord<heysokam> In reply to @.tokyovigilante "orthogonally, is there a": enum sets, most likely
15:49:53*derpydoo joined #nim
16:06:34*derpydoo quit (Quit: derpydoo)
16:14:02FromDiscord<heysokam> Does the nim compiler allow passing different flags to different files being compiled?↵I have strict flags for my app, but I found a case where the stdlib doesn't match them, and deactivating the flag for all of my code would be less than ideal 😦
16:17:39FromDiscord<heysokam> sent a code paste, see https://play.nim-lang.org/#pasty=OMPXyiSk
16:20:20FromDiscord<heysokam> `result = default(T)` adding this to the stdlib code seems to fix it
16:40:20Amun-Raheysokam: localpassc pragma
16:40:41Amun-Rahttps://nim-lang.org/docs/manual.html#implementation-specific-pragmas-localpassc-pragma
16:42:40FromDiscord<heysokam> In reply to @Amun-Ra "https://nim-lang.org/docs/manual.html#implementatio": > but only for the C/C++ file that is produced from the Nim module the pragma resides in:↵the code that triggers it is in stdlib, not my code
16:45:10Amun-Raif that function is easy to extract, make your own module
16:50:06FromDiscord<heysokam> that wouldn't answer the question, only hack around it
17:05:26*rockcavera quit (Remote host closed the connection)
17:17:01*amadaluzia joined #nim
17:19:58Amun-Rathe answer is (afaik): "computer says no"
17:21:54FromDiscord<heysokam> I sent a PR to the stdlib with the one line fix. Not much hope in getting merged, but it was a one line change after all 🤷‍♂️
17:23:51Amun-Rawhat are you trying to achieve btw?
17:24:05Amun-RaI mean in terms of XYZ problem I'm asking about Z
17:26:05FromDiscord<heysokam> adding `--warningAsError:ProveInit` to my code, and the compiler not failing because the stdlib has a non-proven-init case
17:27:29FromDiscord<heysokam> blanket disabling ProveInit for everything pretty much defeats the option entirely 😦
17:29:58FromDiscord<heysokam> sent a code paste, see https://play.nim-lang.org/#pasty=URKzTyxI
17:34:02Amun-RaI'd sent PR to fix the issue in stdli
17:34:05Amun-Rastdlib
17:34:12Amun-Rathere are way too many warnings in stdlib
17:35:54Amun-Rawould {.push.} import {.pop.} work?
17:38:49FromDiscord<heysokam> 🤷‍♂️
17:39:23FromDiscord<Robyn [She/Her]> In reply to @Amun-Ra "there are way too": yeahhh, the compiler pushes forward but the stdlib falls behind a bit :p
17:39:24*nils` joined #nim
17:40:45FromDiscord<Robyn [She/Her]> hmm i don't think it's possible, but is there some way to override what a symbol points to in the compiler without smth like patchFile?
18:57:15madpropshttps://harambe.merkoba.com/post/01jx8eep9z
18:57:24madpropsworked on first try :)
19:15:14madpropshttps://github.com/madprops/diaysi/blob/main/diaysi.nim
19:37:03*fabricio quit (Ping timeout: 245 seconds)
20:15:08*ntat quit (Quit: leaving)
20:19:25*fabricio joined #nim
20:30:36*fabricio quit (Ping timeout: 276 seconds)
20:50:47FromDiscord<heysokam> sent a code paste, see https://play.nim-lang.org/#pasty=vMtKozem
20:51:34*amadaluzia quit (Quit: ZNC 1.9.1 - https://znc.in)
20:55:57FromDiscord<heysokam> I feel like I'm going crazy. Is that code wrong, or is this a bug?
20:58:03FromDiscord<heysokam> oh, it works as intended if I dont pass `.high` 🤔
20:58:33Amun-Rathat's not a bug
20:59:29FromDiscord<heysokam> wdym?
20:59:55FromDiscord<heysokam> if its not a bug, how is my code wrong?
21:00:18FromDiscord<heysokam> specially if not passing `.high` or `.low` works correctly, but not those values
21:00:37FromDiscord<heysokam> (edit) removed "not" | "passing ... `.high`" added "anything other than"
21:01:00Amun-Raah, you mean it returns nan and not -inf
21:01:53FromDiscord<thezipcreator> sent a code paste, see https://play.nim-lang.org/#pasty=hcicpnBr
21:03:31FromDiscord<thezipcreator> like what can't be instantiated
21:03:38FromDiscord<heysokam> In reply to @thezipcreator "why does trying to": those errors are cryptic at first. but its saying that you need to disambiguate the T
21:03:49FromDiscord<thezipcreator> wdym
21:03:55FromDiscord<heysokam> `getData[MyType](thing)`
21:04:08FromDiscord<heysokam> because it does not know that `thing` is `MyType`
21:04:39FromDiscord<thezipcreator> sent a code paste, see https://play.nim-lang.org/#pasty=ubmbdlql
21:04:52Amun-Rahaysokam: you should get RangeDefect error when passing values < 0.0
21:04:53FromDiscord<heysokam> it depends on how you are calling it, that advice is very ambiguous. but that's what that message means, in rough terms
21:05:00FromDiscord<thezipcreator> (`self` is an `Object`)
21:05:07FromDiscord<thezipcreator> what exactly is ambiguous
21:05:15FromDiscord<heysokam> my advice
21:05:34FromDiscord<thezipcreator> like `T` is filled in with `Graphics` and the first param is filled with ufcs
21:05:36FromDiscord<heysokam> because that message is generic, so I can't narrow it more
21:05:44FromDiscord<heysokam> the error message i mean
21:06:14FromDiscord<heysokam> In reply to @thezipcreator "like `T` is filled": then try not using ufcs for the call. it might be getting confused
21:06:32FromDiscord<heysokam> if that doesn't work, then the issue might be somewhere else
21:06:37FromDiscord<thezipcreator> oh that works↵I don't understand why
21:06:44FromDiscord<thezipcreator> does ufcs work the same way as D?
21:06:52FromDiscord<heysokam> don't know D
21:07:14FromDiscord<thezipcreator> like in D the compiler would just rewrite it so it's the first param so it'd be semantically equivalent
21:07:20FromDiscord<heysokam> In reply to @Amun-Ra "haysokam: you should get": I dont get an error on < 0.0, and instead get the value literally
21:07:37FromDiscord<heysokam> both `inf` and `nan` return themselves deterministically
21:08:29Amun-RaI get inf or float.high and DefectError on float.low
21:08:44FromDiscord<heysokam> In reply to @thezipcreator "like in D the": the compiler would need to be semantically aware of what you said before doing that
21:08:48FromDiscord<lainlaylie> sent a code paste, see https://play.nim-lang.org/#pasty=IVmymCIo
21:09:04FromDiscord<heysokam> that's the main quirk of ufcs, sometimes its not easy to solve ambiguities
21:09:23FromDiscord<thezipcreator> so is the nim compiler just too stupid in this case
21:09:36FromDiscord<heysokam> no, it just prioritizes something else
21:09:36FromDiscord<thezipcreator> cos equivalent code works in D
21:09:45FromDiscord<thezipcreator> I'm not sure what else it's prioritizing
21:10:00FromDiscord<heysokam> probably array syntax, or command syntax
21:11:18FromDiscord<heysokam> also, consider `ref` instead of `ptr` for those objects
21:11:26FromDiscord<lainlaylie> https://nim-lang.org/docs/manual.html#procedures-method-call-syntax
21:11:35FromDiscord<lainlaylie> see last few paragraphs of linked section
21:11:46Amun-Raheysokam: https://play.nim-lang.org/#pasty=ojCQuDYX
21:12:47FromDiscord<thezipcreator> In reply to @lainlaylie "https://nim-lang.org/docs/manual.html#procedures-me": ah
21:13:04FromDiscord<thezipcreator> I feel like using `[]` for generics was not a good choice but whatever
21:14:25FromDiscord<heysokam> have to disagree↵`<Graphics>` is much less readable, and this is an edge case that call syntax solves well
21:15:07FromDiscord<heysokam> and what else is left for generic instantiation? `{}`, used for sets? or `()` for so many other things? 😦
21:15:23FromDiscord<thezipcreator> D uses `!()` (the `()` can usually be omitted for most things)↵also imo `<>` is just as readable with syntax highlighting (altho I don't really like how it clashes with the lesser than/greater than operators)
21:15:36FromDiscord<lainlaylie> one thing you can do is to pass un-inferrable generic parameters as typedesc instead
21:16:14FromDiscord<thezipcreator> like `Vector!float` looks nice imo
21:17:41FromDiscord<heysokam> point being, all of these options need lookahead due to the nature of ufcs, and call syntax solves it well↵I figure the D devs really wanted that syntax and compromised, but the nim devs didn't
21:17:59FromDiscord<heysokam> (edit) "point being, all of these options need ... lookahead" added "semantic"
21:18:57FromDiscord<heysokam> `!` is not a bad idea to use, I like the concept of it since nim uses that symbol very little
21:19:06FromDiscord<heysokam> (edit) "`!` is not a bad idea to use, I like the concept of it since nim uses that symbol very little ... " added "due to the `not` keyw"
21:19:21FromDiscord<thezipcreator> tbh that kinda feels the opposite of what it should be given that nim only uses ufcs for `.` calls, meanwhile D actually has member functions
21:19:35FromDiscord<thezipcreator> so you'd think nim would care more about ufcs
21:21:05FromDiscord<heysokam> nim uses `.` for arbitrary user-defined operators
21:21:15FromDiscord<heysokam> nobody uses them, but they are legal
21:23:21FromDiscord<heysokam> sent a code paste, see https://play.nim-lang.org/#pasty=pdhXeElk
21:48:56FromDiscord<heysokam> Opened an issue to report the `random.rand[float]` bug↵https://github.com/nim-lang/Nim/issues/24983
22:31:03*fabricio joined #nim
22:33:46fabriciogot a program that parses some xml sax style and for some reason `-d:useMalloc` makes it use half the memory if does when I don't use it with `--mm:arc` and `--mm:orc`
22:34:05fabricios/if does/it does
22:40:00fabricioonly garbage collected thing I'm using are StringTableRefs
23:17:09*drewr quit (Ping timeout: 248 seconds)