<< 17-05-2025 >>

01:20:55*xet7 quit (Remote host closed the connection)
01:22:41FromDiscord<tapeda> sent a code paste, see https://play.nim-lang.org/#pasty=oBaYngIb
01:23:04FromDiscord<tapeda> (edit) "https://play.nim-lang.org/#pasty=cDmwvdmv" => "https://play.nim-lang.org/#pasty=KJkGaHdt"
01:26:33FromDiscord<tapeda> uh don't mind the indentation I don't want to edit cause it spams the bridges, but now any call like !addtwo(2) should error and !addtwo(a=2) is fine
01:34:17FromDiscord<tapeda> warning: "why?" not found: https://play.nim-lang.org/#pasty=bxHlpdqO
02:00:21*end quit (Ping timeout: 248 seconds)
02:02:04*bcksl quit (Ping timeout: 245 seconds)
03:01:16*bcksl joined #nim
03:06:00*end joined #nim
03:19:31*jjido quit (Quit: My laptop has gone to sleep. ZZZzzz…)
06:02:01*tokyovigilante_ joined #nim
06:02:50*tokyovigilante quit (Ping timeout: 252 seconds)
06:02:50*tokyovigilante_ is now known as tokyovigilante
06:11:40*tokyovigilante_ joined #nim
06:12:54*tokyovigilante quit (Ping timeout: 276 seconds)
06:12:55*tokyovigilante_ is now known as tokyovigilante
06:22:34*nils` quit (Ping timeout: 252 seconds)
06:45:32*ntat joined #nim
07:00:34*nils` joined #nim
08:51:01*andy-turner joined #nim
08:53:30*Jjp137_ joined #nim
08:53:43*Jjp137_ quit (Remote host closed the connection)
08:53:45*Jjp137 quit (Quit: Leaving)
09:05:22FromDiscord<aintea> In reply to @tapeda "it's easy enough to": I have no idea what is the goal of this
09:06:43FromDiscord<aintea> Oh I see
09:06:51FromDiscord<aintea> But yeah I probably won't try to enforce anything
09:07:13*przmk quit (Remote host closed the connection)
09:07:41*przmk joined #nim
09:08:47*Jjp137_ joined #nim
09:18:49FromDiscord<tauruuuuuus> sent a code paste, see https://play.nim-lang.org/#pasty=TgXirrBk
09:19:07FromDiscord<tauruuuuuus> I would have expected that the second part of the condition would not be evaluated if the first part is false
09:29:54FromDiscord<aintea> len is runtime
09:30:23FromDiscord<aintea> if the size is defined at compile time it makes no sense to check + you should have a variable where the length defined at compile time is held
09:41:21FromDiscord<aintea> wait no it's not
09:44:04FromDiscord<aintea> sent a code paste, see https://play.nim-lang.org/#pasty=ROBOAmSa
09:44:13FromDiscord<aintea> :EmojiCatPlot:
09:55:33FromDiscord<lainlaylie> it makes sense to me, the whole condition has to be typechecked first
09:55:46FromDiscord<lainlaylie> you probably need a nested when
09:56:26*jjido joined #nim
10:38:19FromDiscord<tauruuuuuus> sent a code paste, see https://play.nim-lang.org/#pasty=NxPjgdHV
10:38:21FromDiscord<tauruuuuuus> (edit) "https://play.nim-lang.org/#pasty=nioVcgHb" => "https://play.nim-lang.org/#pasty=JznpOCNl"
10:38:58FromDiscord<tauruuuuuus> (edit) "https://play.nim-lang.org/#pasty=oICNrtka" => "https://play.nim-lang.org/#pasty=FYLzhIFO"
10:56:25FromDiscord<lainlaylie> lol
11:44:22*xet7 joined #nim
11:49:41*jjido quit (Quit: My laptop has gone to sleep. ZZZzzz…)
12:07:04*xtr00 quit (Ping timeout: 245 seconds)
12:07:54*xtr00 joined #nim
12:11:16*xtr00 quit (Read error: Connection reset by peer)
12:16:41*xtr00 joined #nim
12:21:09*xtr00 quit (Ping timeout: 248 seconds)
12:22:26*xtr00 joined #nim
12:45:29FromDiscord<helwastaken> why does nim depend on the string header when i compile my program standalone and pass both to the linker and compiler the freestanding target (`--target=x86_64-freestanding-none`)
12:45:51FromDiscord<helwastaken> yes i know i need to replace none with gnu but is there any way to not make my program depend on string?
13:03:05FromDiscord<Robyn [She/Her]> In reply to @aintea "if the size is": for `array` you'd use `N` i believe?
13:03:47FromDiscord<Robyn [She/Her]> ah no it's `I`
13:03:52FromDiscord<Robyn [She/Her]> `arrType.I`
13:06:59FromDiscord<aintea> No idea
13:07:30FromDiscord<aintea> You're the one that should know you're always here
13:07:36FromDiscord<aintea> :nim2:
13:08:45FromDiscord<Robyn [She/Her]> In reply to @aintea "You're the one that": I'm just looking at the stdlib def
13:09:11FromDiscord<aintea> 5 hours of debugging can save me 5 mins of reading documentation
13:09:25FromDiscord<aintea> I also love the fact that the stdlib is so well documented
13:11:15FromDiscord<Robyn [She/Her]> In reply to @aintea "I also love the": Ehh it's better than nothing, just glancing at the signature and having basic knowledge helps
13:11:36FromDiscord<Robyn [She/Her]> you can access generic params of types by accessing it via name
13:12:17FromDiscord<Robyn [She/Her]> so if you have `a: seq[byte | char]` you can do ,`typeof(a).T`
13:12:30FromDiscord<Robyn [She/Her]> and it'll either return `byte` or `char|
13:12:37FromDiscord<Robyn [She/Her]> (edit) "`char|" => "`char`"
13:13:16*xet7 quit (Ping timeout: 272 seconds)
13:35:05*xtr00 quit (Read error: Connection reset by peer)
13:38:23*andy-turner quit (Quit: Leaving)
13:38:56*xtr00 joined #nim
13:55:23FromDiscord<demotomohiro> In reply to @helwastaken "why does nim depend": How about to download Nim source code and grep "string.h" to find stdlib or compiler code adds it?↵Or try `--os:any`.↵If you try to use `--os:standalone` or `--os:any`, this code might helps, but it is written for GCC and doesn't try to avoid including string.h.↵https://github.com/demotomohiro/MinimumNimPico/blob/main/src/uartReg.nims
13:56:43FromDiscord<helwastaken> In reply to @demotomohiro "How about to download": oh yeah i use os standalone
13:58:54*andy-turner joined #nim
14:01:33FromDiscord<helwastaken> hm constructing a struct makes my program wanna import string.h
14:05:59FromDiscord<helwastaken> sent a code paste, see https://play.nim-lang.org/#pasty=SfmmJAUI
14:06:09FromDiscord<helwastaken> backend is zig's c compiler
14:06:56FromDiscord<helwastaken> the backend needs string.h probably cause it does some struck memory stuff
14:33:47FromDiscord<demotomohiro> In reply to @helwastaken "<@288750616510201856> this is the": I don't know much about zig's C compiler.↵You don't need to use both `-d:release` and `-d:danger`. `-d:danger` alone optimize code and removes runtime checks.↵Also you don't need to use both `--gc:none` and `--mm:none`. `--mm:none` alone should stop Nim's garbage collecter and memory management systems.
14:35:32FromDiscord<helwastaken> In reply to @demotomohiro "I don't know much": i know that was just the last compile options i used after a series of tests
14:35:41FromDiscord<helwastaken> still my problem is that structs dont work
14:49:21FromDiscord<helwastaken> changing `Test = object` to `Test = ref object` fixes it i guess
14:51:38FromDiscord<helwastaken> yeah
14:51:38FromDiscord<helwastaken> so
14:51:41FromDiscord<helwastaken> in nimcache
14:51:50FromDiscord<helwastaken> when you dont use ref object nim tries to use memset
14:53:50FromDiscord<demotomohiro> Using `ref` means it is allocated on the heap and you probably need to use `-d:malloc` so that Nim use malloc to allocate heap when `--os:standalone` used. But is `malloc` implemented on your freestanding environment?
14:54:33FromDiscord<helwastaken> im gonna be using this for reverse engineering not embedded
14:54:43*xet7 joined #nim
14:55:13FromDiscord<helwastaken> also i know it allocates it on the heap but why does it use memset for stack allocation
14:55:26FromDiscord<helwastaken> (edit) "allocation" => "initialization"
14:57:38FromDiscord<demotomohiro> Nim always 0 initialize all variables unless you use `noinit` pragma.
14:57:48FromDiscord<demotomohiro> https://nim-lang.org/docs/manual.html#statements-and-expressions-var-statement
15:02:31FromDiscord<helwastaken> In reply to @demotomohiro "Nim always 0 initialize": ok ye that works
15:02:45FromDiscord<helwastaken> i just mark the struct noinit and manually assigne values to it's fields
15:03:50FromDiscord<helwastaken> i need to re-read the manual because im pretty sure last time i used nim it didnt auto initialize which was version 1.4 i think
15:07:33*Jjp137_ quit (Ping timeout: 248 seconds)
15:07:52*Jjp137_ joined #nim
15:53:16*xet7 quit (Ping timeout: 276 seconds)
16:13:54*xet7 joined #nim
16:18:29*Jjp137_ quit (Quit: Leaving)
16:24:28*xet7 quit (Ping timeout: 276 seconds)
16:32:23*Jjp137_ joined #nim
17:06:35*xet7 joined #nim
17:10:39*Jjp137_ quit (Ping timeout: 260 seconds)
17:55:36*Jjp137 joined #nim
18:23:52*bcksl quit (Ping timeout: 252 seconds)
18:25:05*end quit (Ping timeout: 244 seconds)
18:41:04*bcksl joined #nim
18:59:41*end joined #nim
19:13:40*jjido joined #nim
19:41:44*drewr quit (Ping timeout: 260 seconds)
20:27:57*ntat quit (Quit: leaving)
20:31:23*drewr joined #nim
20:45:15*andy-turner quit (Quit: Leaving)
21:11:24FromDiscord<summarity> sent a long message, see https://pasty.ee/CFxFDNvy
21:47:32FromDiscord<griffith1deadly> In reply to @summarity "FML, spent hours debugging": who needs expandMacros when treeRepr and dumpAstGen exists
22:47:37*mal`` quit (Ping timeout: 252 seconds)
22:50:14*mal`` joined #nim
23:19:35FromDiscord<aintea> I asked chatgpt to make the macro I wanted to make but that I'm too lazy to code
23:19:52FromDiscord<aintea> happy to see even one of the most advanced LLMs can't make a working NIm macro either
23:26:06FromDiscord<tauruuuuuus> chatgpt is really bad at coding nim tho
23:26:20FromDiscord<tauruuuuuus> claude is miles ahead on that
23:34:06*xet7 quit (Quit: Leaving)
23:39:07FromDiscord<aintea> Is there any way I can use claude without registering a phone number
23:52:36*jjido quit (Quit: My laptop has gone to sleep. ZZZzzz…)