00:04:15 | * | skippy8 quit (Quit: WeeChat 4.5.2) |
00:16:06 | FromDiscord | <heysokam> In reply to @aintea "Does anyone know where": I actively avoid #internals, github and forums to not see those conversations. You might want to do the exact opposite to find them |
00:43:20 | * | xet7 joined #nim |
00:49:51 | * | xet7 quit (Remote host closed the connection) |
00:51:23 | * | xet7 joined #nim |
02:06:03 | * | xet7 quit (Remote host closed the connection) |
02:23:41 | FromDiscord | <heysokam> was there any pragma similar to `{.warning: "msg".}` but for errors? |
02:24:28 | FromDiscord | <Elegantbeef> Yes error |
02:32:06 | FromDiscord | <heysokam> ty |
04:27:00 | * | alexdaguy joined #nim |
04:41:02 | * | skippy8 joined #nim |
05:26:00 | FromDiscord | <devlop_gaming> Is there a data type that can store a list of elements that i can use as a type in a tuple? |
05:44:57 | * | nils` quit (Ping timeout: 276 seconds) |
06:09:11 | * | xet7 joined #nim |
06:50:21 | * | ntat joined #nim |
07:49:30 | FromDiscord | <nnsee> In reply to @devlop_gaming "Is there a data": ... a seq? |
07:55:33 | FromDiscord | <nnsee> In reply to @devlop_gaming "Is there a data": https://play.nim-lang.org/#pasty=nsnTnzSF |
08:12:36 | * | nils` joined #nim |
08:31:06 | FromDiscord | <lainlaylie> is there any data type that cant be used as a type in a tuple? |
08:33:23 | FromDiscord | <bosinski2023> In reply to @lainlaylie "is there any data": no, all datatypes can be used in a tuple.. |
08:35:53 | FromDiscord | <lainlaylie> that's what i thought.. |
09:58:27 | FromDiscord | <tomo_kimpesa> the double dots |
10:02:03 | * | ntat quit (Quit: leaving) |
10:12:23 | FromDiscord | <devlop_gaming> In reply to @nnsee "... a seq?": What I'm trying to so is seq[tuple[string, seq[string]]] |
10:20:21 | FromDiscord | <lainlaylie> it works if you use the correct syntax. what problem are you facing? |
11:15:43 | FromDiscord | <nnsee> In reply to @devlop_gaming "What I'm trying to": that works fine too. https://play.nim-lang.org/#pasty=wVoVPxQH |
11:16:04 | FromDiscord | <nnsee> note that for code clarity's sake, you might want to create an object with named fields instead of a tuple. something like https://play.nim-lang.org/#pasty=brLJkxph |
11:22:05 | FromDiscord | <nnsee> In reply to @nnsee "that works fine too.": note that the type here is optional if you're not using named fields. omitting the type works as well: https://play.nim-lang.org/#pasty=qeJlWmsp |
11:22:12 | FromDiscord | <nnsee> what issues are you having? @devlop_gaming |
13:33:25 | * | ntat joined #nim |
13:47:49 | FromDiscord | <Robyn [She/Her]> In reply to @lainlaylie "is there any data": `void` |
13:48:04 | FromDiscord | <Robyn [She/Her]> In reply to @tomo_kimpesa "the double dots": slices work in tuples just fine |
14:06:00 | * | beholders_eye joined #nim |
14:10:50 | FromDiscord | <griffith1deadly> In reply to @battery.acid.bubblegum "`void`": you wrong at this point |
14:15:13 | FromDiscord | <Robyn [She/Her]> In reply to @griffith1deadly "you wrong at this": try `tuple[val: void]()` |
14:20:11 | FromDiscord | <lainlaylie> In reply to @battery.acid.bubblegum "`void`": is void a data type 🤔🤔🤔 |
14:29:46 | FromDiscord | <tomo_kimpesa> lol assigning void to a tuple type is so funny |
14:35:51 | FromDiscord | <jseb> i was wondering, but void is not a type in Nim, don't know how to « emulate » this (or even if it has the slighest interest) |
14:43:44 | FromDiscord | <odexine> well if you define type by "has a typedesc" then void is a type in nim |
14:43:49 | FromDiscord | <odexine> void isnt an object i guess |
14:43:56 | FromDiscord | <odexine> you can assign void to a generic just fine |
14:45:18 | FromDiscord | <jseb> even in C, void is used only for documenting the function |
14:46:13 | FromDiscord | <jseb> (edit) "even in C, void is used only for documenting the function ... " added "(« returns nothing » explicitely in prototype)" |
14:48:23 | FromDiscord | <tomo_kimpesa> I wonder if there are still old school C programmers who still prefers int return over void. |
14:49:33 | FromDiscord | <tomo_kimpesa> I know so many OGs from the dawn of C are still around. |
14:50:39 | FromDiscord | <jseb> int return over void ? |
14:51:45 | FromDiscord | <tomo_kimpesa> yeah before C89, there was no void |
14:52:20 | FromDiscord | <jseb> sent a code paste, see https://play.nim-lang.org/#pasty=IHWufrva |
14:52:54 | FromDiscord | <tomo_kimpesa> i bet if you look at some old C games made for the MegaDrive, you'd see it a lot. |
14:53:04 | FromDiscord | <Robyn [She/Her]> In reply to @jseb "may be (if you": void already exists in Nim |
14:53:10 | FromDiscord | <jseb> In reply to @tomo_kimpesa "yeah before C89, there": oh i didn't knew. I've begun with C89 and the last edition of the K&R |
14:53:11 | FromDiscord | <Robyn [She/Her]> You just can't instantiate it |
14:53:13 | FromDiscord | <tomo_kimpesa> (edit) "i bet if you look at some old C games ... made" added "source code" |
14:53:21 | FromDiscord | <Robyn [She/Her]> (for obvious reasons) |
14:53:52 | FromDiscord | <odexine> In reply to @tomo_kimpesa "yeah before C89, there": implicit int return when not specified my beloved |
16:00:16 | * | alexdaguy quit (Quit: w) |
16:31:30 | * | przmk quit (Ping timeout: 252 seconds) |
16:32:38 | * | przmk joined #nim |
16:39:17 | FromDiscord | <devlop_gaming> In reply to @nnsee "note that the type": I see my problem now |
16:41:22 | * | beholders_eye quit (Ping timeout: 244 seconds) |
16:43:34 | * | beholders_eye joined #nim |
16:47:50 | * | disso-peach quit (Quit: Leaving) |
16:53:07 | * | nils` quit (Ping timeout: 252 seconds) |
17:20:38 | * | beholders_eye quit (Ping timeout: 244 seconds) |
18:37:32 | * | nils` joined #nim |
18:37:36 | FromDiscord | <devlop_gaming> sent a code paste, see https://play.nim-lang.org/#pasty=rhDcBeQF |
19:12:56 | * | ntat quit (Quit: leaving) |
19:30:42 | FromDiscord | <dawidek.2137> Only procs with a return type return a type |
20:07:08 | FromDiscord | <devlop_gaming> So how am I supposed to spawn a thread for a proc that doesn't return a type? |
20:19:45 | FromDiscord | <nnsee> In reply to @devlop_gaming "I see my problem": you're welcome? |
20:21:32 | FromDiscord | <devlop_gaming> In reply to @nnsee "you're welcome?": I didn't name the fields |
20:22:09 | FromDiscord | <Elegantbeef> You use `spawn` then you use `sync()` |
20:22:14 | FromDiscord | <devlop_gaming> In reply to @nnsee "you're welcome?": I forgot I can't just define tuples like this tuple[type1, type2] |
20:22:38 | FromDiscord | <nnsee> it's always worth reading the manual |
20:22:38 | FromDiscord | <ajusa> Is there a preferred way to add plugins to a Nim program? Lua, Wren, nimscript, dlls come to mind. Is one much better than the other? I'm leaning towards beef's nimscripter |
20:22:54 | FromDiscord | <Elegantbeef> I prefer wasm myself |
20:23:07 | FromDiscord | <devlop_gaming> In reply to @nnsee "it's always worth reading": I already know how tuples work I'm just not used to named tuples |
20:23:12 | FromDiscord | <nnsee> In reply to @ajusa "Is there a preferred": wasm is the hot trendy choice. i'm guessing lua would work great as well |
20:23:15 | FromDiscord | <Elegantbeef> Is there a preferred way of doing that? Not really I did some work on wasm3 bindings years ago and it's usable, but eh |
20:23:41 | FromDiscord | <Elegantbeef> I would not really suggest nimscripter as it locks you into a relatively bleh language and runtime |
20:28:59 | FromDiscord | <nnsee> In reply to @devlop_gaming "I already know how": the syntax is described in the manual. you don't have to name the fields if you don't want to. https://play.nim-lang.org/#pasty=mDyHmuIL |
20:29:55 | FromDiscord | <Elegantbeef> Reading is for chumps |
20:30:31 | FromDiscord | <devlop_gaming> In reply to @nnsee "the syntax is described": But what if I didn't want to initialize that tuple with a value yet |
20:31:53 | FromDiscord | <nnsee> use var instead of let and omit the initialization |
20:31:59 | FromDiscord | <nnsee> and simply assign the value later |
20:34:34 | FromDiscord | <ajusa> In reply to @Elegantbeef "Is there a preferred": Completely forgot about wasm. I'll look into how to interop with that from Nim, thanks! |
20:41:34 | * | kavenjane joined #nim |
21:29:49 | * | kavenjane quit () |
21:30:06 | * | kavenjane joined #nim |
21:58:23 | * | beholders_eye joined #nim |
22:13:48 | FromDiscord | <heysokam> sent a code paste, see https://play.nim-lang.org/#pasty=JsdXNhXy |
22:14:21 | FromDiscord | <heysokam> I also tried `typedesc[extras.TextureUsage | wgpu.TextureUsage]`, but didn't work either |
22:14:54 | FromDiscord | <heysokam> _I've used this style of template before without issues, just never with two typedescs resolving to the same type_ |
22:19:09 | * | beholders_eye quit (Ping timeout: 272 seconds) |
22:19:52 | FromDiscord | <heysokam> actually, nvm. `RenderAttachment` is a separate enum value, not a mix of 2. the definition is in hex 🙈 |
22:20:35 | * | beholders_eye joined #nim |
22:25:08 | * | skippy8 quit (Quit: WeeChat 4.5.2) |
22:30:56 | * | michaeldperez joined #nim |
22:41:11 | FromDiscord | <heysokam> is there a way to print an object with some basic formatting implicit?↵`.repr` and `$` both create a single line, which is not very readable |
22:49:54 | * | beholders_eye quit (Ping timeout: 252 seconds) |
22:51:53 | * | michaeldperez quit (Quit: michaeldperez) |