<< 17-02-2025 >>

00:25:10*fallback quit (Read error: Connection reset by peer)
00:47:40FromDiscord<lainlaylie> that was i can define only `<` for my custom type and get a `>` for free
00:47:48FromDiscord<lainlaylie> (edit) "was" => "way"
00:48:25FromDiscord<lainlaylie> it's also a cute demonstration of templates
00:48:33FromDiscord<fl4shk> yes true
00:48:36FromDiscord<fl4shk> that's a good point
00:54:33*fallback joined #nim
00:57:25*SchweinDeBurg quit (Quit: WeeChat 4.6.0-dev)
01:02:35*PMunch_ joined #nim
01:04:17*PMunch__ quit (Ping timeout: 248 seconds)
01:24:55FromDiscord<konsumlamm> unfortunately, because `>` is defined as a template, it also means that any side effects of the arguments are reversed
01:25:32*SchweinDeBurg joined #nim
01:25:40FromDiscord<konsumlamm> see https://play.nim-lang.org/#pasty=gHiKtgqP for an example
01:43:54FromDiscord<fl4shk> How does one apply a custom pragma to objects within a `macro`
01:43:56FromDiscord<fl4shk> (edit) "`macro`" => "`macro`?"
01:44:54FromDiscord<fl4shk> (edit) "to objects" => "in variable declarations"
02:03:11FromDiscord<Elegantbeef> legacy code↵(@aintea)
03:05:50FromDiscord<Ade Ope> sent a long message, see https://pasty.ee/cLWqavRg
03:28:05FromDiscord<lainlaylie> <@&371760044473319454>
03:32:04*tiorock joined #nim
03:32:04*rockcavera is now known as Guest2320
03:32:04*tiorock is now known as rockcavera
03:34:08*tiorock joined #nim
03:34:08*rockcavera quit (Killed (erbium.libera.chat (Nickname regained by services)))
03:34:08*tiorock is now known as rockcavera
03:35:54*Guest2320 quit (Ping timeout: 252 seconds)
03:42:51*rockcavera quit (Remote host closed the connection)
06:33:58*alexdaguy quit (Read error: Connection reset by peer)
06:39:39*Lord_Nightmare joined #nim
06:42:06*Lord_Nightmare quit (Client Quit)
06:45:40*Lord_Nightmare joined #nim
07:41:12*ursa-major quit (Remote host closed the connection)
07:41:12*robertmeta quit (Remote host closed the connection)
07:41:12*adigitoleo quit (Remote host closed the connection)
07:41:13*casaca quit (Remote host closed the connection)
07:41:13*noeontheend quit (Remote host closed the connection)
07:41:14*Freneticks quit (Remote host closed the connection)
07:41:15*tmpod quit (Remote host closed the connection)
07:41:15*mronetwo quit (Write error: Broken pipe)
07:41:16*johuck quit (Remote host closed the connection)
07:41:34*noeontheend joined #nim
07:41:35*tmpod joined #nim
07:41:37*mronetwo joined #nim
07:41:37*adigitoleo joined #nim
07:41:39*casaca joined #nim
07:41:54*robertmeta joined #nim
07:41:54*ursa-major joined #nim
07:41:54*johuck joined #nim
07:41:56*Freneticks joined #nim
08:01:46FromDiscord<Robyn [She/Her]> @user2m Have you tried compiling your code with asan?
08:39:12*nyeaa49284230101 quit (Quit: The Lounge - https://thelounge.chat)
08:40:24*nyeaa49284230101 joined #nim
08:43:43*xutaxkamay quit (Ping timeout: 268 seconds)
08:51:56*xutaxkamay joined #nim
08:59:06FromDiscord<nirokayyy> sent a code paste, see https://play.nim-lang.org/#pasty=KUlXpaEl
08:59:07FromDiscord<nirokayyy> sent a code paste, see https://play.nim-lang.org/#pasty=OtJTAIFJ
08:59:31FromDiscord<nirokayyy> thank you for any help in advance :3
09:12:49FromDiscord<lainlaylie> needs to be `longVariableName[] = false`
09:13:09FromDiscord<lainlaylie> templates might be able to help you
09:19:53FromDiscord<nirokayyy> In reply to @lainlaylie "needs to be `longVariableName[]": this compiles!↵is there a way to omit the `[]`? as this breaks backwards compatibility for code written with the old system, where `websitegeneratorGenerateSelfClosingTags = false` would have been used↵↵can you please elaborate on what you mean with templates?
09:23:38FromDiscord<nirokayyy> i know there is `ref` in Nim; i dont know much about it, would using `ref` be a better solution? is it even the same? 🥴
09:25:16*KingofGamer joined #nim
09:30:31*KingofGamer quit (Quit: Client closed)
09:32:37*KingofGamer joined #nim
09:34:58*KingofGamer quit (Client Quit)
09:40:32Amun-Ramake w when `some_new_system_condition`: var[] = false else: var = fale
09:42:00FromDiscord<lainlaylie> sent a code paste, see https://play.nim-lang.org/#pasty=xHAdLlmc
09:42:07FromDiscord<lainlaylie> refs are not a good solution here
09:46:43FromDiscord<nirokayyy> sent a code paste, see https://play.nim-lang.org/#pasty=aIOsmZQF
10:33:39*beholders_eye joined #nim
12:27:31*om3ga joined #nim
14:23:24FromDiscord<blashyrk> sent a code paste, see https://play.nim-lang.org/#pasty=kDGeaMzJ
14:27:02FromDiscord<aintea> yes, you call it normally
14:27:04FromDiscord<aintea> `a dot b`
14:27:13FromDiscord<aintea> `dot` refers to the function
14:27:52FromDiscord<aintea> so `a ``\`dot`\`` b`
14:28:04FromDiscord<aintea> is equal to `a(dot(b))`
14:34:30FromDiscord<blashyrk> sent a code paste, see https://play.nim-lang.org/#pasty=XbnFggYK
14:39:29Amun-Ra"dot(a,b)" or a.dot(b)" or "a.dot b"
14:45:05FromDiscord<demotomohiro> In reply to @blashyrk "Does nim support custom": You can use only specific characters as operators: https://nim-lang.org/docs/manual.html#lexical-analysis-operators
14:49:25FromDiscord<enthus1ast.> @nirokayyy i can recommend my nimja library ( https://github.com/enthus1ast/nimja ) for a static site generator (shameless plug)
15:00:06*ntat joined #nim
15:23:02FromDiscord<zumi.dxy> can confirm
15:23:36FromDiscord<zumi.dxy> (i still want the safe string interpolator tho 😛)
15:23:36FromDiscord<zumi.dxy> \
15:23:53FromDiscord<zumi.dxy> (i still want the safe interpolator tho 😛)
15:24:19FromDiscord<zumi.dxy> (but tbf, "escaping" very much depends where I'm escaping to, so)
16:00:18*PMunch__ joined #nim
16:03:10*PMunch_ quit (Ping timeout: 252 seconds)
16:24:07FromDiscord<blashyrk> Is there any overhead when using a single field object (_not_ ref object) over that field's type directly? Can I read somewhere on Nim's objects memory layout?
16:29:14FromDiscord<fl4shk> In reply to @fl4shk "How does one apply": I would like to call attention to this question of mine again
16:29:31FromDiscord<fl4shk> In reply to @blashyrk "Is there any overhead": have you considered examining the C code output?
16:29:36FromDiscord<fl4shk> turns out that there's no overhead, really
16:29:48FromDiscord<fl4shk> In reply to @enthus1ast. "<@279697404259991552> i can recommend": that sounds like something of interest to me
16:29:58FromDiscord<fl4shk> I was thinking of starting a blog :P
16:30:56FromDiscord<fl4shk> but... I might go with writing my own generator
16:31:30FromDiscord<fl4shk> In reply to @fl4shk "turns out that there's": At least if I'm understanding correctly
16:39:33FromDiscord<fl4shk> In reply to @fl4shk "I would like to": this is apparently due to me not doing `PragmaExpr` checks!
16:39:46FromDiscord<fl4shk> I'll fix it
16:57:31FromDiscord<fl4shk> okay, fixed
17:12:35FromDiscord<blashyrk> sent a code paste, see https://play.nim-lang.org/#pasty=pQcEwWaV
17:12:52FromDiscord<blashyrk> (edit) "https://play.nim-lang.org/#pasty=ngMgPpHk" => "https://play.nim-lang.org/#pasty=QUmOJapV"
17:13:26FromDiscord<blashyrk> (edit) "https://play.nim-lang.org/#pasty=owRXfHXT" => "https://play.nim-lang.org/#pasty=YQrlaeSu"
17:13:44FromDiscord<blashyrk> (edit) "https://play.nim-lang.org/#pasty=vzlCifRW" => "https://play.nim-lang.org/#pasty=JLasvWVI"
17:50:58FromDiscord<blashyrk> https://github.com/nim-lang/Nim/issues/21350 this appears to be a non-resolvable situation currently
17:51:21FromDiscord<blashyrk> Other than removing {.noInit.} and {.requiresInit.} and eating the perf cost elsewhere
18:04:04FromDiscord<aintea> When managing memory manually, are there tools to help detect memory leaks like the flags in the gcc compiler ?
18:18:34FromDiscord<blashyrk> sent a code paste, see https://play.nim-lang.org/#pasty=lAfnIwSy
18:18:59*coldfeet joined #nim
18:33:08FromDiscord<blashyrk> sent a code paste, see https://play.nim-lang.org/#pasty=IwZEkLxr
18:33:46FromDiscord<blashyrk> (edit) "https://play.nim-lang.org/#pasty=YilGYyYh" => "https://play.nim-lang.org/#pasty=teuIqATm"
18:45:56FromDiscord<solitudesf> In reply to @blashyrk "Wait is it really": https://nim-lang.org/docs/manual_experimental.html#view-types↵enable this and tell us when it breaks
18:52:26FromDiscord<blashyrk> Thanks
18:59:25*coldfeet quit (Quit: Lost terminal)
19:16:21*coldfeet joined #nim
19:22:13FromDiscord<Elegantbeef> @blashyrk you can always do a bit of unsafety if you want to
19:22:35FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=mujPUhVh
19:24:15FromDiscord<Elegantbeef> Can always error the `=sink`, `=copy` and `=dup` hooks to atleast give some safety 😄
19:36:32FromDiscord<albassort> would it be possible to implement direct threading in nim using nim func / procs?
19:36:45FromDiscord<albassort> (edit) "direct" => "indirect"
19:36:54FromDiscord<albassort> i have some very memory unsafe ideas
19:40:07*PMunch_ joined #nim
19:42:23*PMunch__ quit (Ping timeout: 244 seconds)
19:51:27*ntat_ joined #nim
19:51:54*ntat quit (Ping timeout: 244 seconds)
19:52:53*ntat_ is now known as ntat
19:54:31*coldfeet quit (Quit: Lost terminal)
19:57:04FromDiscord<Elegantbeef> If you believe hard enough, probably
20:00:11FromDiscord<albassort> do you know if anyone else is stupid enough to mull around writing a macro for Forth that compiles to indirec threaded code
20:01:04FromDiscord<albassort> it would be much simpler to have bytecode tho ;-;
21:13:33*Zevv joined #nim
21:36:01*rockcavera joined #nim
21:52:52*ftajhii joined #nim
22:01:04*ntat quit (Quit: Leaving)
22:56:23FromDiscord<albassort> no you c ant because jumps and gotos are not a thing in nim, so you would end up with some kind of non-indirect thread but closer to tokenized htreading
22:56:32FromDiscord<albassort> (edit) "htreading" => "threading"
22:56:59FromDiscord<albassort> you might be able to get direct threading working but mprotect() is gonna kill anll performance
23:34:04FromDiscord<that_dude.> https://forum.nim-lang.org/t/8963
23:34:36FromDiscord<that_dude.> Technically I think gotos exist, but they are enum based for state machines