01:20:55 | * | xet7 quit (Remote host closed the connection) |
01:22:41 | FromDiscord | <tapeda> sent a code paste, see https://play.nim-lang.org/#pasty=oBaYngIb |
01:23:04 | FromDiscord | <tapeda> (edit) "https://play.nim-lang.org/#pasty=cDmwvdmv" => "https://play.nim-lang.org/#pasty=KJkGaHdt" |
01:26:33 | FromDiscord | <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:17 | FromDiscord | <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:22 | FromDiscord | <aintea> In reply to @tapeda "it's easy enough to": I have no idea what is the goal of this |
09:06:43 | FromDiscord | <aintea> Oh I see |
09:06:51 | FromDiscord | <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:49 | FromDiscord | <tauruuuuuus> sent a code paste, see https://play.nim-lang.org/#pasty=TgXirrBk |
09:19:07 | FromDiscord | <tauruuuuuus> I would have expected that the second part of the condition would not be evaluated if the first part is false |
09:29:54 | FromDiscord | <aintea> len is runtime |
09:30:23 | FromDiscord | <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:21 | FromDiscord | <aintea> wait no it's not |
09:44:04 | FromDiscord | <aintea> sent a code paste, see https://play.nim-lang.org/#pasty=ROBOAmSa |
09:44:13 | FromDiscord | <aintea> :EmojiCatPlot: |
09:55:33 | FromDiscord | <lainlaylie> it makes sense to me, the whole condition has to be typechecked first |
09:55:46 | FromDiscord | <lainlaylie> you probably need a nested when |
09:56:26 | * | jjido joined #nim |
10:38:19 | FromDiscord | <tauruuuuuus> sent a code paste, see https://play.nim-lang.org/#pasty=NxPjgdHV |
10:38:21 | FromDiscord | <tauruuuuuus> (edit) "https://play.nim-lang.org/#pasty=nioVcgHb" => "https://play.nim-lang.org/#pasty=JznpOCNl" |
10:38:58 | FromDiscord | <tauruuuuuus> (edit) "https://play.nim-lang.org/#pasty=oICNrtka" => "https://play.nim-lang.org/#pasty=FYLzhIFO" |
10:56:25 | FromDiscord | <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:29 | FromDiscord | <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:51 | FromDiscord | <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:05 | FromDiscord | <Robyn [She/Her]> In reply to @aintea "if the size is": for `array` you'd use `N` i believe? |
13:03:47 | FromDiscord | <Robyn [She/Her]> ah no it's `I` |
13:03:52 | FromDiscord | <Robyn [She/Her]> `arrType.I` |
13:06:59 | FromDiscord | <aintea> No idea |
13:07:30 | FromDiscord | <aintea> You're the one that should know you're always here |
13:07:36 | FromDiscord | <aintea> :nim2: |
13:08:45 | FromDiscord | <Robyn [She/Her]> In reply to @aintea "You're the one that": I'm just looking at the stdlib def |
13:09:11 | FromDiscord | <aintea> 5 hours of debugging can save me 5 mins of reading documentation |
13:09:25 | FromDiscord | <aintea> I also love the fact that the stdlib is so well documented |
13:11:15 | FromDiscord | <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:36 | FromDiscord | <Robyn [She/Her]> you can access generic params of types by accessing it via name |
13:12:17 | FromDiscord | <Robyn [She/Her]> so if you have `a: seq[byte | char]` you can do ,`typeof(a).T` |
13:12:30 | FromDiscord | <Robyn [She/Her]> and it'll either return `byte` or `char| |
13:12:37 | FromDiscord | <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:23 | FromDiscord | <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:43 | FromDiscord | <helwastaken> In reply to @demotomohiro "How about to download": oh yeah i use os standalone |
13:58:54 | * | andy-turner joined #nim |
14:01:33 | FromDiscord | <helwastaken> hm constructing a struct makes my program wanna import string.h |
14:05:59 | FromDiscord | <helwastaken> sent a code paste, see https://play.nim-lang.org/#pasty=SfmmJAUI |
14:06:09 | FromDiscord | <helwastaken> backend is zig's c compiler |
14:06:56 | FromDiscord | <helwastaken> the backend needs string.h probably cause it does some struck memory stuff |
14:33:47 | FromDiscord | <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:32 | FromDiscord | <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:41 | FromDiscord | <helwastaken> still my problem is that structs dont work |
14:49:21 | FromDiscord | <helwastaken> changing `Test = object` to `Test = ref object` fixes it i guess |
14:51:38 | FromDiscord | <helwastaken> yeah |
14:51:38 | FromDiscord | <helwastaken> so |
14:51:41 | FromDiscord | <helwastaken> in nimcache |
14:51:50 | FromDiscord | <helwastaken> when you dont use ref object nim tries to use memset |
14:53:50 | FromDiscord | <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:33 | FromDiscord | <helwastaken> im gonna be using this for reverse engineering not embedded |
14:54:43 | * | xet7 joined #nim |
14:55:13 | FromDiscord | <helwastaken> also i know it allocates it on the heap but why does it use memset for stack allocation |
14:55:26 | FromDiscord | <helwastaken> (edit) "allocation" => "initialization" |
14:57:38 | FromDiscord | <demotomohiro> Nim always 0 initialize all variables unless you use `noinit` pragma. |
14:57:48 | FromDiscord | <demotomohiro> https://nim-lang.org/docs/manual.html#statements-and-expressions-var-statement |
15:02:31 | FromDiscord | <helwastaken> In reply to @demotomohiro "Nim always 0 initialize": ok ye that works |
15:02:45 | FromDiscord | <helwastaken> i just mark the struct noinit and manually assigne values to it's fields |
15:03:50 | FromDiscord | <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:24 | FromDiscord | <summarity> sent a long message, see https://pasty.ee/CFxFDNvy |
21:47:32 | FromDiscord | <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:35 | FromDiscord | <aintea> I asked chatgpt to make the macro I wanted to make but that I'm too lazy to code |
23:19:52 | FromDiscord | <aintea> happy to see even one of the most advanced LLMs can't make a working NIm macro either |
23:26:06 | FromDiscord | <tauruuuuuus> chatgpt is really bad at coding nim tho |
23:26:20 | FromDiscord | <tauruuuuuus> claude is miles ahead on that |
23:34:06 | * | xet7 quit (Quit: Leaving) |
23:39:07 | FromDiscord | <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…) |