<< 10-06-2025 >>

01:21:33FromDiscord<kapendev> It could prevent some silent bugs in Nim I guess, but probably not an issue if you don't overload a name with 50 different things.
02:49:03FromDiscord<odexine> In reply to @godalming123 "How do you access": You can’t if you use forced qualification
03:23:32FromDiscord<heysokam> In reply to @battery.acid.bubblegum "You should probably drop": hard disagree. all it does is make the code explicit
03:24:54FromDiscord<heysokam> `import A, B, C, D, E` -> `thing(one)` ?? Which `thing` am I calling? no idea without an LSP, IDE or compiler crashing on my misuse of thing because it came from E, but I meant to use it from A
03:39:52*rockcavera quit (Remote host closed the connection)
03:59:07FromDiscord<leorize> note that if you use anything with operators, forcing qualification will break them
04:28:15*ntat joined #nim
05:00:10FromDiscord<heysokam> sent a code paste, see https://play.nim-lang.org/#pasty=auYsvqEK
05:14:47*kenran joined #nim
05:15:05*kenran quit (Remote host closed the connection)
05:55:16Amun-Raheysokam: longer and explicit are not mutual exclusive
06:07:15*ntat quit (Quit: leaving)
06:20:42*ntat joined #nim
07:02:07FromDiscord<janakali> sent a long message, see https://pasty.ee/xQmiiskE
07:02:38FromDiscord<janakali> actually I made it a while ago, but it's now ready for "public beta"
07:10:55FromDiscord<nnsee> In reply to @janakali "I made a thing:": very nice, but what do you mean exactly by `~/../grabnim`
07:11:40FromDiscord<nnsee> is that just a shorthand for `~/.local/share/grabnim`?
07:12:04FromDiscord<janakali> either `~/.local/share/grabnim/` or `%LOCALAPPDATA%/grabnim`↵one for linux/macos/bsd and second is windows
07:12:08FromDiscord<nnsee> ah okay
07:12:25FromDiscord<nnsee> just got confused a bit because `../` means something else in paths :p
07:26:03FromDiscord<pmunch> In reply to @janakali "I made a thing:": Didn't the "choosenim breaks LSP" issue get fixed in the later versions?
07:32:15FromDiscord<janakali> last time I checked pr was still not accepted, because of lack of testing?
07:32:47FromDiscord<janakali> ah, it's been merged over a month ago
07:37:11FromDiscord<janakali> I still believe that shims are buggy and unreliable solution.
07:37:39FromDiscord<nnsee> agreed 100%
07:47:59FromDiscord<Laylie> there has not yet been a choosenim release that includes that fix
07:54:48*nils` quit (Ping timeout: 276 seconds)
07:59:45*end quit (Ping timeout: 268 seconds)
08:00:39*bcksl quit (Ping timeout: 276 seconds)
08:16:52FromDiscord<pmunch> In reply to @janakali "I still believe that": I agree, would it be possible to contribute the junction/symlink fix to choosenim?
08:17:02FromDiscord<pmunch> In reply to @Laylie "there has not yet": Ah I see, well that's easily fixed
08:19:42*tokyovigilante quit (Remote host closed the connection)
08:20:19*bcksl joined #nim
08:23:04*tokyovigilante joined #nim
08:25:19*end joined #nim
08:26:11FromDiscord<janakali> In reply to @pmunch "I agree, would it": in theory - yes, but in practice choosenim is built on shims, and it would not be easy to rewrite big part of it for symlink support.
08:27:03FromDiscord<janakali> I did try to read and understand choosenim codebase for that reason. And it's definitely above MY level.
08:28:44FromDiscord<janakali> (edit) "for" => "with" | "reason." => "idea."
08:52:41*ntat quit (Quit: leaving)
09:29:29FromDiscord<Robyn [She/Her]> In reply to @kapendev "It could prevent some": yeahh, and in the cases where you're using a function with many different overloads, each module usually has a type you know that belongs to thrm
09:30:26FromDiscord<Robyn [She/Her]> In reply to @heysokam "`import A, B, C,": I'd argue that's something you should already know, by either the signature or by the context, if you can't infer it, your code might need some restructuring
09:34:29FromDiscord<heysokam> In reply to @battery.acid.bubblegum "I'd argue that's something": if you "already know it" it means it is in your contextual memory, and needs to be there ocupying space↵explicitly giving the context means you don't need to spend any energy accessing that memory, which frees those mental resources for other more important things
10:09:16*xtr00 quit (Read error: Connection reset by peer)
10:16:06*xtr00 joined #nim
10:23:17*xtr00 quit (Read error: Connection reset by peer)
10:23:52*ntat joined #nim
10:27:04*xtr00 joined #nim
10:49:45*nils` joined #nim
11:08:55*beholders_eye joined #nim
11:35:09*nils` quit (Ping timeout: 276 seconds)
11:43:19FromDiscord<kapendev> In reply to @battery.acid.bubblegum "yeahh, and in the": You can still silently change what `doThis(foo)` does by changing an import.
11:54:22*ntat quit (Quit: leaving)
12:01:14FromDiscord<Robyn [She/Her]> In reply to @heysokam "if you "already know": isn't that already occupying your memory? even if you know where something comes from, ya still got work out the logic behind the function call
12:02:17FromDiscord<Robyn [She/Her]> In reply to @kapendev "You can still silently": if you remove the import and replace it with another, sure, but if you don't remove it, then Nim complains about ambiguity
12:03:11*xtr00 quit (Read error: Connection reset by peer)
12:08:35*xtr00 joined #nim
12:13:58FromDiscord<kapendev> Sure, I'm just trying to find potential "problems".
12:14:11FromDiscord<kapendev> (edit) "find" => "think of"
12:28:15*amadaluzia joined #nim
13:03:51*amadaluzia quit (Ping timeout: 252 seconds)
13:10:35FromDiscord<lainlaylie> it's possible to silently change what a call gets resolved to simply by adding an import if generics of different specificity are involved
13:10:59FromDiscord<lainlaylie> but i don't remember it ever happening to me
13:15:15*ntat joined #nim
13:41:59*nils` joined #nim
13:47:59*nils` quit (Ping timeout: 244 seconds)
14:49:11*nils` joined #nim
15:07:08*amadaluzia joined #nim
15:25:48*amadaluzia quit (Quit: ZNC 1.9.1 - https://znc.in)
15:26:46*amadaluzia joined #nim
16:29:58*beholders_eye quit (Ping timeout: 272 seconds)
16:45:27*beholders_eye joined #nim
16:48:27*amadaluzia quit (Quit: ZNC 1.9.1 - https://znc.in)
16:56:00*amadaluzia joined #nim
17:00:19*amadaluzia quit (Client Quit)
17:01:15*amadaluzia joined #nim
17:11:26*xtr00 quit (Ping timeout: 252 seconds)
17:24:05*beholders_eye quit (Ping timeout: 248 seconds)
17:40:44*xtr00 joined #nim
17:57:40FromDiscord<user2m> sent a code paste, see https://play.nim-lang.org/#pasty=sEWGGoQH
18:11:47FromDiscord<Phil> In reply to @user2m "is it possible to": Use -d:configFilePath to a JSON file that you read in at compiletime
18:11:50FromDiscord<Phil> BOOM, done
18:12:18FromDiscord<user2m> In reply to @isofruit "Use -d:configFilePath to a": my hero
18:12:41FromDiscord<user2m> In reply to @isofruit "Use -d:configFilePath to a": where can i find the documentation on this?
18:14:46FromDiscord<Phil> In reply to @user2m "where can i find": For reading in files at compiletime:↵Look in the nim modules for staticRead (might be named gorge, I forget the more evocative alias for that proc).↵As for reading in that customf lag:↵https://nim-lang.org/docs/manual.html#implementation-specific-pragmas-compileminustime-define-pragmas
18:14:59FromDiscord<Phil> (edit) "customf lag:↵https://nim-lang.org/docs/manual.html#implementation-specific-pragmas-compileminustime-define-pragmas" => "custom flag:↵https://nim-lang.org/docs/manual.html#implementation-specific-pragmas-compileminustime-define-pragmas"
18:15:13FromDiscord<heysokam> gorge is `execCmd`
18:15:19FromDiscord<Phil> Ah, would be more: `-d:compileTimeConfig=PathToMyConfig`
18:15:32FromDiscord<Phil> (edit) "`-d:compileTimeConfig=PathToMyConfig`" => "`-d:compileTimeConfig=Path/To/My/Config`"
18:16:53FromDiscord<Phil> And for parsing the JSON string into an object you can use either std/json or jsony
18:17:12FromDiscord<demotomohiro> I think `-d:MyDebugEchoLib_ShowTime=true`, `-d:MyDebugEchoLib_ShowLocation=false` is simple and you can write them on config files.
18:19:21FromDiscord<Phil> Yeh, overall it might be simpler to define these in a nim.cfg file (which automatically applies the flags) and if you absolutely must, you can define yourself an object that merges all these things together.↵↵That would be more nim-ish, rather than trying to roll your own compile-time config mechanism (which, as you can see, isn't too hard)
18:19:37FromDiscord<Phil> (edit) "things" => "values"
18:20:23FromDiscord<heysokam> I'd go with `-d:mylib.debug_echo_config_show_time`, but agree 100%
18:20:33FromDiscord<heysokam> you can have `.` qualifiers for defines
18:20:50FromDiscord<user2m> In reply to @heysokam "you can have `.`": oh this is cool didn't know that
18:21:16FromDiscord<user2m> In reply to @demotomohiro "I think `-d:MyDebugEchoLib_ShowTime=true`, `-d:MyDe": yeah this is most likely the way
18:21:19FromDiscord<heysokam> there is also `{.strdefine.}` and `{.booldefine.}`, which is great for customizable comptime defaults
18:21:43FromDiscord<heysokam> eg: https://github.com/heysokam/confy/blob/master/src/confy/cfg.nim
18:21:59FromDiscord<user2m> In reply to @heysokam "there is also `{.strdefine.}`": yeah I'm using those now
18:22:06FromDiscord<heysokam> there might be an intdefine too, can't remember
18:22:27FromDiscord<lainlaylie> all the cool kids use `{.define.}`
18:22:56Amun-Rawhat do uncool kids use?
18:23:17FromDiscord<heysokam> `{.undefine.}`
18:23:53FromDiscord<heysokam> part of the `un` trend. kids these days 🤷‍♂️
18:24:05Amun-Ra:P
18:24:35Amun-Ratouché ;)
18:31:17*beholders_eye joined #nim
18:31:38*fallback quit (Ping timeout: 265 seconds)
19:14:26*beholders_eye quit (Ping timeout: 248 seconds)
19:16:09*beholders_eye joined #nim
19:29:41*xet7 quit (Remote host closed the connection)
19:31:05*xet7 joined #nim
19:43:05*xet7 quit (Remote host closed the connection)
19:44:26*xet7 joined #nim
20:01:20*xet7 quit (Quit: Leaving)
20:05:36FromDiscord<enthus1ast.> In reply to @isofruit "For reading in files": slurp
20:21:54*om3ga quit (Ping timeout: 244 seconds)
20:22:50*beholders_eye quit (Ping timeout: 268 seconds)
20:28:37*amadaluzia quit (Quit: ZNC 1.9.1 - https://znc.in)
20:32:39*ntat quit (Quit: leaving)
21:00:39*xet7 joined #nim
21:10:05*xet7 quit (Remote host closed the connection)
21:13:34*xet7 joined #nim
21:52:02*rockcavera joined #nim
22:25:04*redj_ quit (Ping timeout: 276 seconds)