<< 17-07-2025 >>

02:12:03FromDiscord<janakali> sent a long message, see https://pasty.ee/gmNBBHmO
02:26:25*redj joined #nim
02:33:39*tiorock joined #nim
02:33:39*tiorock quit (Changing host)
02:33:39*tiorock joined #nim
02:33:39*rockcavera quit (Killed (tantalum.libera.chat (Nickname regained by services)))
02:33:39*tiorock is now known as rockcavera
02:36:28FromDiscord<leorize> choosenim reuses `.nimble/bin`, so it couldn't use junctions
03:02:26FromDiscord<janakali> but it doesn't have to reuse `.nimble/bin`↵And IMO, it should not overwrite nimble-installed binaries
03:25:36FromDiscord<leorize> the author believed that it was a good choice at the time
05:36:02*skippy8 joined #nim
06:40:50*jjido joined #nim
07:14:15*andy-turner joined #nim
07:35:52*ntat joined #nim
07:48:24*nils` quit (Ping timeout: 260 seconds)
07:56:54*jjido quit (Quit: My laptop has gone to sleep. ZZZzzz…)
08:09:10FromDiscord<pmunch> There's nothing stopping us from improving choosenim by the way. If people want to spend the time and energy to do it go ahead 🙂
09:12:39*nils` joined #nim
10:09:23*rockcavera quit (Remote host closed the connection)
10:28:54*xutaxkamay quit (Quit: ZNC 1.8.2+deb3.1+deb12u1 - https://znc.in)
10:30:40*xutaxkamay joined #nim
10:32:25*nils` quit (Quit: nils`)
11:20:40*ntat quit (Quit: Leaving)
11:31:53FromDiscord<pmunch> Hmm, the new Nimble updates seems to be creating a lot of strange issues https://github.com/nim-lang/nimble/issues/1429
11:36:25FromDiscord<jmgomez> See the coment I left, the spinner was rolled back a while ago. You need to update
11:39:02*xutaxkamay quit (Quit: ZNC 1.8.2+deb3.1+deb12u1 - https://znc.in)
11:40:26*xutaxkamay joined #nim
12:13:11FromDiscord<pmunch> Ah.. I guess I'll catch it once a new stable Nim release is made
12:48:41*jjido joined #nim
13:01:48*jjido quit (Quit: My laptop has gone to sleep. ZZZzzz…)
13:08:01*end quit (Ping timeout: 248 seconds)
13:09:00*bcksl quit (Ping timeout: 272 seconds)
13:12:08*beholders_eye joined #nim
13:14:25*jjido joined #nim
13:19:14*jjido quit (Quit: My laptop has gone to sleep. ZZZzzz…)
13:32:20*jjido joined #nim
13:33:50*bcksl joined #nim
13:40:47*jjido quit (Quit: My laptop has gone to sleep. ZZZzzz…)
13:40:58*end joined #nim
14:19:47strogon14the spinner issue really had me scratching my head for several hours, because I wasn't getting the output I was expecting from my custom nimble tasks.
14:57:01FromDiscord<TFed> How to iterate JsonNode?
14:58:23FromDiscord<TFed> is there an iterator or something?
14:59:25FromDiscord<TFed> or at least iterate keys of a current Node, ignoring all sub lists and tuples.
15:00:30FromDiscord<TFed> sent a code paste, see https://play.nim-lang.org/#pasty=fCxVJfGg
15:01:41*przmk4 quit (Quit: Ping timeout (120 seconds))
15:01:52FromDiscord<TFed> for (key, value) in jsonNode\:↵ echo i↵{"foo"\: "bar"}↵{"math"\: {"pi"\: 3.14}}
15:02:02*przmk4 joined #nim
15:02:47FromDiscord<TFed> sent a code paste, see https://play.nim-lang.org/#pasty=MeawiEXK
15:03:11FromDiscord<TFed> sent a code paste, see https://play.nim-lang.org/#pasty=aiHBNnUW
15:13:07FromDiscord<TFed> i can make the iterator on my own if i can get sequence of keys for example
15:14:52*jjido joined #nim
15:18:51FromDiscord<spotlightkid> TFed\: https://play.nim-lang.org/#pasty=nTOPGLOz
15:24:29FromDiscord<Laylie> either remove the parentheses around `(key, value)` or explicitly call `pairs`\: https://wandbox.org/permlink/3R90aMNXvoaD0NzG
15:26:00FromDiscord<Laylie> the JsonNode iterators are listed here\: https://nim-lang.org/docs/json.html#15
15:26:43FromDiscord<Laylie> Implicit invocation of items/pairs is documented here\: https://nim-lang.org/docs/manual.html#iterators-and-the-for-statement-implicit-itemsslashpairs-invocations
15:39:43*amadaluzia joined #nim
15:42:16FromDiscord<TFed> works, thank you, thank you so much, i thought i will need to reinvent the wheel...🧐😌
15:43:56*amadaluzia quit (Client Quit)
15:44:46*amadaluzia joined #nim
15:50:30*amadaluzia quit (Quit: ZNC 1.10.0 - https://znc.in)
15:51:22*amadaluzia joined #nim
15:51:37*amadaluzia quit (Remote host closed the connection)
15:52:31*amadaluzia joined #nim
16:35:56*def- quit (Server closed connection)
16:36:07*def- joined #nim
16:37:15FromDiscord<planetis_m> sent a long message, see https://pasty.ee/Ojkiyiua
16:59:51*jjido quit (Quit: My laptop has gone to sleep. ZZZzzz…)
17:04:59FromDiscord<hawkey5212> sent a long message, see https://pasty.ee/tXHTzwKH
17:15:07*jjido joined #nim
17:17:54*beholders_eye quit (Ping timeout: 272 seconds)
17:55:32FromDiscord<lainlaylie> this is all a bit abstract as haven't seen any of the relevant code, but the core issue is that nim by default allows you to use and return variables that have not been explicitly assigned. the problem becomes more obvious with the presence of the implicit `result`, yes, but this is just a symptom.
17:55:40FromDiscord<lainlaylie> (edit) "this is all a bit abstract as ... haven't" added "we"
17:56:25FromDiscord<hawkey5212> > use and return variables that have not been explicitly assigned↵↵e.g. the `it` variable from `mapIt`?
17:57:30FromDiscord<lainlaylie> sent a code paste, see https://play.nim-lang.org/#pasty=WKfxlGHe
18:02:57*beholders_eye joined #nim
18:03:07FromDiscord<lainlaylie> btw i just read about therac 25... terrifying
18:15:37*ntat joined #nim
18:23:04*redj quit (Ping timeout: 260 seconds)
18:24:21*redj joined #nim
18:35:06FromDiscord<Elegantbeef> @lainlaylie Why do we need software engineers?!
18:35:06FromDiscord<Elegantbeef> Anyone who is not a certified engineer is not a software engineer, sorry silicon valley
18:36:37FromDiscord<hawkey5212> In reply to @lainlaylie "no, i mean things": I see what is meant by not liking the `default(T)` syntax.↵↵...are you telling me that `var x: SomeType` is more than just a declaration, but also initialises it with the default value?!
18:36:56FromDiscord<Elegantbeef> Yes cause pointers exist
18:37:31FromDiscord<Elegantbeef> default/0 initialized is the defacto default now to ensure you do not have random data
18:37:38FromDiscord<hawkey5212> how does "pointers exist" mean "declaration => initialisation with default"?
18:38:15FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=FMAtFexR
18:38:39FromDiscord<hawkey5212> why not just "use of uninitialised variable"? implicitly initialising it is... well, it's certainly an _interesting_ way to go about it.
18:38:44FromDiscord<Elegantbeef> If you want to have issues you can use the `{.nonit.}` pragma
18:39:02FromDiscord<Elegantbeef> Well the experimental strictdefs does enforce that
18:39:08FromDiscord<Elegantbeef> `var a : T` is an error
18:39:56FromDiscord<hawkey5212> sent a code paste, see https://play.nim-lang.org/#pasty=lbKtlFsm
18:39:57FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=RDzFijPz
18:40:57FromDiscord<Elegantbeef> I didn't design Nim 😄↵But one compelling thing is `var acc: seq[T]` or `var acc: int` inside of a loop is nice albeit not overly beneficial
18:43:52FromDiscord<leorize> automatic default init does have it's upsides, but requires a programming model that makes full use of it
18:44:04FromDiscord<leorize> automatic default init does have its upsides, but requires a programming model that makes full use of it
18:46:32FromDiscord<hawkey5212> sent a code paste, see https://play.nim-lang.org/#pasty=zRPaXGpJ
18:47:31FromDiscord<Elegantbeef> There really aren't many surprises from default init
18:47:39FromDiscord<Elegantbeef> That's entirely the point
18:47:54FromDiscord<Elegantbeef> You define a value it's the default value you carry on as if nothing matters
18:49:14FromDiscord<leorize> if you compare nim to rust you'll be disappointed
18:49:29FromDiscord<leorize> nim doesn't follow the same model as rust, it's more adhoc like Go if anything
18:49:33*jjido quit (Quit: My laptop has gone to sleep. ZZZzzz…)
18:56:02FromDiscord<lainlaylie> in conclusion, strictDefs eliminates a major source of bugs
18:56:14FromDiscord<lainlaylie> but some people didn't like it so we're stuck with those bugs
19:01:00FromDiscord<lainlaylie> sent a code paste, see https://play.nim-lang.org/#pasty=wHsvncWj
19:12:29FromDiscord<planetis_m> Don't make me see rust, because I've eaten and I will vomit. That you find `?` good style and high quality is your opinion. I respect it, but I stand by mine, that result leads to better code.
19:16:01FromDiscord<janakali> In reply to @lainlaylie "but some people didn't": iirc the pushback was because strictdefs causes a lot of noise in the form of warnings. And if a warning comes from a code you don't control - you're stuck with it.
19:17:27FromDiscord<janakali> also don't forget that it's implemented and you can opt-in to use strictdefs in your projects, it's just not a default anymore
19:18:19FromDiscord<lainlaylie> that's exactly the problem: because it's no longer going to be default, libraries will have little incentive to update to play nice with it, and then i can't enable it in projects or even individual modules that use such libraries without getting warning spam
19:18:20FromDiscord<planetis_m> Don't read more into it, result is just convenience so you don't have to find a stupid name for your return variable. Then the programming style (structured programming) guides you to avoid return/break/continue when possible. Although I am not a purist and don't use flags everywhere, just a general guideline
19:22:36FromDiscord<hawkey5212> what do you mean by "structured programming"?
19:23:11FromDiscord<planetis_m> best example I can think of, is when there're multiple nested if/elif/else statements. Don't avoid writing "spaghetti" code because it "looks bad" to uncle bob. It helps comprehension immensely to explicitly declare all possible states, instead of hiding them with early returns.
19:23:58*ntat quit (Quit: Leaving)
19:25:57FromDiscord<hawkey5212> based on that, "structured programming" is just a buzzword for "writing readable code".
19:29:39FromDiscord<planetis_m> well it was a thing back in time, when programmers decided that goto is bad, and before they invented break/continue.
19:32:01FromDiscord<hawkey5212> also: what's wrong with `?` in rust? what do you like to see in terms of handling errors as you progress through a function?
19:34:19FromDiscord<hawkey5212> Also, I don't see how implicit variables, and implicit setting of variables helps make code more readable, unless I'm reading into what your saying incorrectly.
21:29:41*andy-turner quit (Quit: Leaving)
21:31:49*skippy8 quit (Quit: WeeChat 4.6.3)
21:35:11*rockcavera joined #nim
21:51:19*jjido joined #nim
22:15:23*tiorock joined #nim
22:15:23*tiorock quit (Changing host)
22:15:23*tiorock joined #nim
22:15:24*rockcavera is now known as Guest2215
22:15:24*Guest2215 quit (Killed (calcium.libera.chat (Nickname regained by services)))
22:15:24*tiorock is now known as rockcavera
22:17:30*tiorock joined #nim
22:17:30*tiorock quit (Changing host)
22:17:30*tiorock joined #nim
22:17:30*rockcavera quit (Killed (osmium.libera.chat (Nickname regained by services)))
22:17:30*tiorock is now known as rockcavera
22:22:14*Lord_Nightmare quit (Killed (ozone (No Spam)))
22:22:57*Lord_Nightmare joined #nim
22:30:00*amadaluzia quit (Quit: ZNC 1.10.0 - https://znc.in)
22:31:13*beholders_eye quit (Ping timeout: 245 seconds)
22:33:55*tiorock joined #nim
22:33:55*rockcavera is now known as Guest7369
22:33:55*tiorock is now known as rockcavera
22:36:00*tiorock joined #nim
22:36:00*rockcavera is now known as Guest8421
22:36:00*Guest8421 quit (Killed (calcium.libera.chat (Nickname regained by services)))
22:36:00*tiorock is now known as rockcavera
22:36:06FromDiscord<kapendev> Nothing really, I think. Rust people do tend to abuse option and result types though when they could just return a falsy value.
22:37:41*Guest7369 quit (Ping timeout: 248 seconds)
22:40:43FromDiscord<kapendev> Or handle the error instead of passing it up.
23:12:15*birle quit (Read error: Connection reset by peer)
23:22:20*rockcavera quit (Remote host closed the connection)
23:55:09*amadaluzia joined #nim