00:14:02 | FromDiscord | <nervecenter> In reply to @axlefublr "huh! that's a very": Well to clarify, I'm compiling that module as its own entire executable, the `whenIsMainModule` trick just determines at compile time which module is main, and anything in that block is compiled into the final binary. So I can compile isolated test suites essentially. |
00:14:10 | FromDiscord | <nervecenter> (edit) "`whenIsMainModule`" => "`when isMainModule`" |
00:14:46 | FromDiscord | <axlefublr> In reply to @nervecenter "Well to clarify, I'm": yep, got that! thanks for clarifying :> |
00:14:52 | FromDiscord | <nervecenter> (edit) "In reply to @axlefublr "huh! that's a very": Well to clarify, I'm compiling that module as its own entire executable, the `when isMainModule` trick just determines at compile time which module is main, and anything in that block is compiled into the final binary. So I can compile isolated test suites essentially. ... " added "Without needing to compile the entire project, just what I need to run the tests." |
01:01:38 | * | alexdaguy quit (Quit: w) |
01:14:21 | FromDiscord | <aintea> sent a code paste, see https://play.nim-lang.org/#pasty=fPhYctKz |
01:15:04 | FromDiscord | <aintea> I'm making something that heavily relies on tables and nested tables, and having `result["this"]["this2"]["another_one"]["and_another_one"]` is not the prettiest to be honest |
01:15:10 | FromDiscord | <Elegantbeef> https://nim-lang.org/docs/manual_experimental.html#special-operators |
01:15:17 | FromDiscord | <aintea> that was fast |
01:15:21 | FromDiscord | <Elegantbeef> You can implement a `[]` that takes multiple arguments |
01:15:39 | FromDiscord | <Elegantbeef> So then it's just `result["this", "this2", "another_one", "and_another_one"]` |
01:16:00 | FromDiscord | <aintea> I specifically want it to become `result.this.this2.another_one.and_another_one` |
01:16:28 | FromDiscord | <Elegantbeef> Read the link |
01:16:33 | FromDiscord | <aintea> I'm doing so |
01:19:35 | FromDiscord | <aintea> I find it so interesting nim has a lot to offer but finding what I want is hard |
01:19:43 | FromDiscord | <aintea> Thanks for the help |
01:46:48 | FromDiscord | <Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=Ftftntbm |
01:47:31 | FromDiscord | <Robyn [She/Her]> oh it can't be a proc, damn |
02:04:53 | FromDiscord | <demotomohiro> This works: |
02:04:59 | FromDiscord | <demotomohiro> sent a code paste, see https://play.nim-lang.org/#pasty=tRYYWyBV |
02:15:53 | FromDiscord | <odexine> You can have a dot operator macro |
02:16:10 | FromDiscord | <odexine> Though they’re still experimental |
03:22:55 | * | SchweinDeBurg joined #nim |
03:30:17 | * | zgasma quit (Quit: Lost terminal) |
03:41:40 | FromDiscord | <maxtachine> sent a code paste, see https://play.nim-lang.org/#pasty=pOyNjwAb |
03:42:04 | FromDiscord | <maxtachine> even when I remove the ptr in the cast and the dereference operator |
03:42:11 | FromDiscord | <maxtachine> (edit) "even when I remove the ptr in the cast and the dereference operator ... " added "I get the error" |
03:42:27 | FromDiscord | <maxtachine> (what im trying to do is something called manual mapping) |
03:49:40 | FromDiscord | <odexine> `hDll: ptr` isnt concrete, if youre looking for a void pointer use `hDll: pointer` |
03:49:43 | FromDiscord | <odexine> same with the other one |
03:51:44 | FromDiscord | <maxtachine> oh thanks it fixed it |
06:14:32 | * | greaser|q quit (Remote host closed the connection) |
06:14:55 | * | greaser|q joined #nim |
07:51:54 | Amun-Ra | or 'ptr object' |
07:56:01 | * | ntat joined #nim |
08:35:27 | * | greaser|q quit (Changing host) |
08:35:27 | * | greaser|q joined #nim |
08:35:29 | * | greaser|q is now known as GreaseMonkey |
09:00:56 | * | alexdaguy joined #nim |
09:09:06 | * | tdc joined #nim |
10:34:43 | FromDiscord | <aintea> sent a code paste, see https://play.nim-lang.org/#pasty=vJjsiPBx |
11:00:45 | * | alexdaguy quit (Quit: restarting computah) |
11:04:10 | FromDiscord | <k0ts> You could even say it was quite an Elegant way |
11:17:59 | * | alexdaguy joined #nim |
11:51:43 | FromDiscord | <aintea> And that wouldn't start any Beef within my team of devs because of the readability |
12:00:46 | * | perr_ is now known as perro |
12:52:33 | * | tokyovigilante quit (Ping timeout: 248 seconds) |
12:53:04 | * | tokyovigilante joined #nim |
12:58:03 | * | alexdaguy quit (Ping timeout: 276 seconds) |
13:03:22 | * | alexdaguy joined #nim |
13:07:19 | * | alexdaguy quit (Client Quit) |
14:59:36 | * | coldfeet joined #nim |
15:30:29 | * | tdc quit (Ping timeout: 248 seconds) |
16:49:33 | * | deeo9 quit (Quit: The Lounge - https://thelounge.chat) |
17:46:43 | * | GnuYawk quit (Quit: The Lounge - https://thelounge.chat) |
17:47:02 | * | GnuYawk joined #nim |
18:06:44 | FromDiscord | <dawidek.2137> how to define an extern proc on C backend? the extern pragma seems to be for something else |
18:07:26 | FromDiscord | <dawidek.2137> at least I dont understand why it needs a string argument (unlike exportc etc) |
18:16:29 | FromDiscord | <dawidek.2137> can I generate a c++ extern struct with it's method signatures without emitting code myself? |
18:43:56 | * | Guest96 joined #nim |
18:45:49 | * | Guest96 quit (Client Quit) |
18:46:30 | * | Guest96 joined #nim |
18:47:38 | * | tdc joined #nim |
18:47:47 | * | Guest96 quit (Client Quit) |
20:19:53 | FromDiscord | <maxtachine> sent a code paste, see https://play.nim-lang.org/#pasty=thwjigVd |
20:21:41 | FromDiscord | <thearthurm> Is there a way to do an assignment in an expression, like the := in python? |
20:22:08 | FromDiscord | <maxtachine> i thought := was a golang operator |
20:22:16 | * | coldfeet quit (Remote host closed the connection) |
20:22:46 | FromDiscord | <thearthurm> In reply to @maxtachine "i thought := was": It is, but it's also a way to assign variables in an expression in python |
20:22:52 | FromDiscord | <thearthurm> It's called the walrus operator |
20:23:00 | FromDiscord | <maxtachine> i see https://stackoverflow.com/questions/26000198/what-does-colon-equal-in-python-mean |
20:23:17 | FromDiscord | <thearthurm> `if (x := function()): ...` |
20:23:54 | FromDiscord | <thearthurm> In reply to @maxtachine "i see https://stackoverflow.com/questions/26000198/": I'm going to write my programming language in nim and I'm trying to port over my cli lib |
20:24:23 | FromDiscord | <maxtachine> there doesnt seem to have one in nim |
20:24:38 | FromDiscord | <thearthurm> In reply to @maxtachine "there doesnt seem to": That's fine, we do it the manual way hehehehehe |
20:24:58 | FromDiscord | <thearthurm> Wait, can you unpack a dictionary as keyword arguments? |
20:25:11 | FromDiscord | <maxtachine> dunno |
20:25:14 | FromDiscord | <thearthurm> If not, then I won't even need it |
20:25:44 | FromDiscord | <thearthurm> In reply to @maxtachine "dunno": `func(dictionary)` |
20:26:02 | FromDiscord | <suvan0522> which version of nim do you ppl prefer to use? |
20:26:39 | FromDiscord | <thearthurm> In reply to @suvan0522 "which version of nim": Whichever one I have installed, I'm not sure |
20:26:47 | FromDiscord | <thearthurm> I think it's the latest |
20:26:55 | FromDiscord | <suvan0522> 2.2.0? |
20:28:28 | FromDiscord | <thearthurm> In reply to @suvan0522 "2.2.0?": 2.0.8 apparently |
20:29:08 | FromDiscord | <suvan0522> oh okay |
20:40:24 | FromDiscord | <bostonboston> In reply to @maxtachine "im trying to compile": When I need to do this I install a 32bit version of gcc and in my nim.cfg add a @if that changes gcc.path to the 32bit bin |
20:40:42 | FromDiscord | <bostonboston> `@if i386` that is |
20:47:57 | FromDiscord | <thearthurm> Do we have var args in nim or do I have to pass in a sequence |
20:50:03 | FromDiscord | <maxtachine> In reply to @bostonboston "When I need to": yeah i got it to work |
20:50:17 | FromDiscord | <maxtachine> now i just need to figure out why its doing segfault |
21:00:25 | FromDiscord | <solitudesf> In reply to @thearthurm "Do we have var": i wish there was some place where you could look up this information |
21:00:30 | FromDiscord | <solitudesf> https://nim-lang.org/docs/manual.html#types-varargs |
21:00:55 | FromDiscord | <Elegantbeef> I keep asking the LLMs about Nim and they just talk about matchsticks |
21:05:30 | FromDiscord | <diogenesoftoronto> In reply to @Elegantbeef "I keep asking the": What are your Prompts lol |
21:08:39 | FromDiscord | <Elegantbeef> sent a long message, see https://pasty.ee/QfOOkfDR |
21:14:42 | * | ftajhii quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
21:23:21 | * | ftajhii joined #nim |
21:36:48 | FromDiscord | <thearthurm> In reply to @solitudesf "i wish there was": My phone is really slow because I don't have good Internet, people respond much faster and I can ask a follow up question instead of waiting another 2 minutes for each search, and then another 2 minutes for each link to load |
21:37:07 | FromDiscord | <thearthurm> Discord works just fine, but my browser is super sluggish |
21:55:17 | * | ntat quit (Quit: Leaving) |
22:04:44 | FromDiscord | <maxtachine> In reply to @Elegantbeef "I keep asking the": Lmfao |
22:19:07 | * | krux02 joined #nim |
22:36:55 | * | tdc quit (Ping timeout: 260 seconds) |
22:40:30 | FromDiscord | <axlefublr> In reply to @Elegantbeef "I keep asking the": lmaoooo |
22:53:52 | FromDiscord | <aintea> In reply to @thearthurm "`if (x := function()):": `if (let x = func(); x) == y:` |
22:54:15 | FromDiscord | <thearthurm> In reply to @aintea "`if (let x =": Oh sweet :0 |
22:55:03 | FromDiscord | <aintea> sent a code paste, see https://play.nim-lang.org/#pasty=kDzMKrUv |
22:56:48 | FromDiscord | <aintea> Everything is possible with Nim |
22:57:07 | FromDiscord | <aintea> Except having fun debugging your macros |
22:57:21 | FromDiscord | <fabric.input_output> print debugging always works |
22:57:37 | FromDiscord | <aintea> Yeah but wondering why it expands in the wrong way is a nightmare |
22:57:56 | FromDiscord | <fabric.input_output> print the prior steps |
23:39:13 | * | Jjp137 quit (Ping timeout: 252 seconds) |
23:47:01 | * | Jjp137 joined #nim |