<< 19-07-2026 >>

00:22:58*termer quit (Remote host closed the connection)
00:24:30*termer joined #nim
00:57:09*fallback quit (Quit: IRCNow and Forever!)
01:51:01FromDiscord<11clock> antivirus programs blocking Windows programs is worrying.
01:51:18FromDiscord<11clock> (edit) "antivirus programs blocking Windows ... programs" added "Nim"
01:51:33FromDiscord<11clock> (edit) "antivirus" => "Antivirus"
02:51:31FromDiscord<_timurski> i ran nim code on windows just fine a while ago
02:51:48FromDiscord<_timurski> literally never used windows before and figured out the install process in like 5 minutes and bam had it running
02:52:12FromDiscord<_timurski> though it wasn't opening any files or anything, just a computational program
03:52:05*fallback joined #nim
05:13:03*tokyovigilante quit (Remote host closed the connection)
05:13:44*tokyovigilante joined #nim
05:37:47*trailblazer joined #nim
05:42:58*tokyovigilante quit (Remote host closed the connection)
05:43:37*tokyovigilante joined #nim
05:58:15*tokyovigilante quit (Remote host closed the connection)
05:58:29*tokyovigilante joined #nim
05:59:24*rockcavera joined #nim
06:06:52*syl quit (Quit: C-x C-c)
06:14:22*syl joined #nim
06:38:42*rockcavera quit (Remote host closed the connection)
07:43:04FromDiscord<kapendev> If people use anything that is not windows defender, then it's their problem.
07:46:30FromDiscord<tempestro> > if people use anything that is windows, then it's their problem↵^ftfy
07:47:11FromDiscord<kapendev> It's cleaner
08:15:15*skippy8 joined #nim
09:13:26*skippy8 quit (Ping timeout: 254 seconds)
10:59:16*skippy8 joined #nim
11:15:55FromDiscord<rakgew> compiling nim code targeting win, with zigcc worked very well for me so far, in order to get rid of the snakeoil-false-alerts.↵but of course depending on the "security-solution" being used ymmv↵(@11clock)
12:43:16FromDiscord<11clock> In reply to @tempestro "> if people use": Vast majority of the PC gaming userbase uses Windows, so it's not something I can be dismissive about.
13:14:53FromDiscord<11clock> I ran into an issue. Currently nim is missing the ability to export read-only variables. You can technically use let, sure, but then the module that owns the variable can't update it.
13:15:14FromDiscord<11clock> (edit) "read-only variables." => "variables as read-only."
13:17:06FromDiscord<11clock> One solution I have seen is to export a getter, but that would cause a name collision if the getter and variable shared the same name.
13:48:20FromDiscord<11clock> https://media.discordapp.net/attachments/371759389889003532/1528398083812233307/IMG_3687.png?ex=6a5e2723&is=6a5cd5a3&hm=d536a12fda12c29464042226e9d8c372a9bbefca92d05883fea600fd875a6c4c&
13:51:45FromDiscord<nasuray> In reply to @11clock "One solution I have": Ya that's not allowed
13:58:46FromDiscord<tapeda> What's the use case? I can only imagine it in a 1000 person java team or a library convenience &even then making the 'readonly' explicit with getAge() seems nicer
14:02:49FromDiscord<11clock> In reply to @tapeda "What's the use case?": For my game engine I have a tickCount variable that I want to be easily accessible via a module, but difficult to accidentally write over.
14:10:08FromDiscord<gesee37> In reply to @11clock "For my game engine": you can wrap the tick in a object and then une regular accessor
14:10:22FromDiscord<gesee37> (edit) "une" => "use"
14:15:59FromDiscord<kapendev> sent a code paste, see https://play.nim-lang.org/#pasty=HkwtXmkl
14:20:30FromDiscord<kapendev> How do you make a thread local variable?
14:22:12FromDiscord<11clock> sent a code paste, see https://play.nim-lang.org/#pasty=NVbklLgX
14:22:40FromDiscord<kapendev> Oh true lol. Well, um add `priv_` or something
14:24:29FromDiscord<kapendev> In reply to @kapendev "How do you make": it's a pragma, ok ok
14:39:27*deavmi quit (Quit: Eish, load shedding!)
14:41:22*rockcavera joined #nim
14:42:24*deavmi joined #nim
15:10:31*yeti quit (Quit: \\//_)
15:12:15*yeti joined #nim
15:15:35*jailop joined #nim
15:17:00*jailop quit (Client Quit)
15:18:49*yeti quit (Ping timeout: 252 seconds)
15:24:55*yeti joined #nim
16:19:07FromDiscord<b0rsuk> Do you have a shortcut like "pythonic", or do you just say "idiomatic nim code"?
16:26:42FromDiscord<zumi.dxy> i'd just say "idiomatic nim"
16:27:03FromDiscord<zumi.dxy> or "nim-like" if you want
16:27:20FromDiscord<Laylie> yes, "idiomatic", but i would understand "nimic"
16:29:28FromDiscord<_timurski> nim-esque
16:34:45*yeti quit (Quit: \\//_)
16:35:16*yeti joined #nim
16:35:27*yeti quit (Client Quit)
16:37:05*yeti joined #nim
17:20:05FromDiscord<toitle3554> Has anyone made an operator that can be used like a pipe for indexing, similar to how the dot operator is a pipe for functions?
17:21:12FromDiscord<toitle3554> Was thinking something like `index.-attributes = 3` as an equivalent to `attributes[index] = 3`
17:22:52FromDiscord<toitle3554> gets fussy with how indexing works though; `index.-attributes[1]` will evaluate to `attributes[1][index]` instead of `attributes[index][1]`
17:23:39FromDiscord<toitle3554> (edit) "gets fussy with how indexing works though; `index.-attributes[1]` will evaluate to `attributes[1][index]` instead of `attributes[index][1]` ... " added "when just using a regular operator or template"
17:34:32FromDiscord<_timurski> what's the purpose of this? like in what cases does it make the code more readable
17:35:35FromDiscord<toitle3554> In reply to @_timurski "what's the purpose of": ECS-style stuff; allows you to express an index as having fields
17:37:30FromDiscord<toitle3554> I'm using it for some mesh manipulation stuff; it's more legible to do `vertIndex.-normals` than `normals[vertIndex]`
17:48:11*termer quit (Remote host closed the connection)
17:51:02*termer joined #nim
17:56:59FromDiscord<0ffh> In reply to @toitle3554 "ECS-style stuff; allows you": Why the "-"?
17:57:30FromDiscord<toitle3554> In reply to @0ffh "Why the "-"?": operators starting with `.` have higher priority
17:58:18FromDiscord<toitle3554> could be `./`, `.-`, etc, just needs to be dot-like
17:59:43FromDiscord<toitle3554> a viable alternative would be to just define a template like `normal(i: vertIndex): untyped`every time I want to access an index's 'fields'
18:02:22FromDiscord<_timurski> In reply to @toitle3554 "could be `./`, `.-`,": why not just have it be an actual dot operator `.`?
18:02:27FromDiscord<_timurski> i fele like i'm missing something
18:02:34FromDiscord<_timurski> (edit) "fele" => "feel"
18:02:52FromDiscord<_timurski> oh wait `vertIndex` is a variable
18:14:53*SchweinDeBurg quit (Quit: WeeChat 4.8.0-dev)
18:18:52*trailblazer quit (Quit: Leaving)
18:23:28FromDiscord<11clock> Why does this not work? https://media.discordapp.net/attachments/371759389889003532/1528467326847025362/image.png?ex=6a5e67a0&is=6a5d1620&hm=acc098b19b4fad25ee7c6e426eb60f57ff765060816750ab5fa7aafee9373c8e&
18:29:41FromDiscord<toitle3554> In reply to @11clock "Why does this not": can only do `age=` for an object with an `age` field
18:30:11FromDiscord<toitle3554> (edit) "do" => "implement" | "implement`age=` ... for" added "proc"
18:30:28FromDiscord<11clock> That's unfortunate. I was hoping to not enforce objects when I don't necessarily need them.
18:30:57FromDiscord<toitle3554> actually it doesn't need to be an object with an age field, can be any variable of any type
18:31:56FromDiscord<11clock> Can you give an example? Having trouble understanding. So far the only types I know of are object, ref object, and enum.
18:35:23FromDiscord<DetermiedNim1> var T gives you a mutable reference kind of thing
18:37:40FromDiscord<DetermiedNim1> oh waiy
18:37:48FromDiscord<DetermiedNim1> why do you need procs for this?
18:38:11FromDiscord<DetermiedNim1> can't you just export ageBk
18:39:38FromDiscord<DetermiedNim1> you can do this as well https://media.discordapp.net/attachments/371759389889003532/1528471392276971600/Screenshot_20260719_133927_Termux.jpg?ex=6a5e6b69&is=6a5d19e9&hm=cbe6c7be745515809cb9453a241b72da0879ffd82ae591a600a2c0a451895d16&
18:39:47FromDiscord<DetermiedNim1> ignore the b
18:43:51FromDiscord<11clock> In reply to @determiedmech1 "can't you just export": I have a use case where I want to export the value as read-only, and onlt the module that defines it can modify it.
18:44:00FromDiscord<11clock> (edit) "onlt" => "only"
18:44:24FromDiscord<DetermiedNim1> ah ok
18:44:42FromDiscord<DetermiedNim1> id just export a getAge proc
18:44:46FromDiscord<11clock> sent a code paste, see https://play.nim-lang.org/#pasty=aPhmDvWf
18:44:49FromDiscord<11clock> So I found a way
18:44:53FromDiscord<DetermiedNim1> oh nice
18:46:53*termer quit (Remote host closed the connection)
18:49:47*termer joined #nim
18:53:22FromDiscord<11clock> I find it weird that the template works while the proc doesn't but whatever, got what I wanted.
18:54:42FromDiscord<11clock> Also that a template lets you access a private field like that. I thought it was raw injection.
18:55:01FromDiscord<11clock> (edit) "that." => "that from another module."
19:14:10FromDiscord<11clock> oh nvm, that wasn't working as expected. The getter template was being expanded first