00:03:24 | FromDiscord | <yummy_licorice> In reply to @saint._._. "What library are you": Mir |
00:03:34 | FromDiscord | <yummy_licorice> It's a Wayland server library |
00:16:12 | * | beholders_eye quit (Ping timeout: 276 seconds) |
00:28:08 | * | FromDiscord quit (Remote host closed the connection) |
00:28:21 | * | FromDiscord joined #nim |
00:30:25 | * | ftajhii joined #nim |
01:34:19 | * | SchweinDeBurg joined #nim |
01:41:54 | * | bcksl quit (Quit: \) |
01:41:54 | * | end quit (Quit: end) |
01:43:13 | * | bcksl joined #nim |
01:45:41 | * | end joined #nim |
01:56:25 | * | tokyovigilante_ joined #nim |
01:56:57 | * | tokyovigilante quit (Ping timeout: 276 seconds) |
01:56:57 | * | tokyovigilante_ is now known as tokyovigilante |
02:29:15 | FromDiscord | <albassort> i know there is field pairs but is there a keypairs for objects? |
02:29:30 | FromDiscord | <albassort> i need to get arbitrary fields by name |
02:30:00 | FromDiscord | <Elegantbeef> `fieldpairs` |
02:30:13 | FromDiscord | <albassort> sounds slow doing it this way |
02:31:14 | FromDiscord | <albassort> i know there is an abitrary field getter, i've seen it |
02:34:29 | FromDiscord | <albassort> there are only macros |
02:34:34 | FromDiscord | <albassort> sadge |
02:34:41 | FromDiscord | <Elegantbeef> This is at runtime? |
02:36:51 | FromDiscord | <albassort> yeah |
02:37:00 | FromDiscord | <albassort> but the use case could be evalulated at compiletime |
02:37:02 | FromDiscord | <Elegantbeef> So then how does a macro help |
02:37:30 | FromDiscord | <albassort> i just want to have 2 objects, one and set all the fields to the same values if the names are the same |
02:37:42 | FromDiscord | <Elegantbeef> So why do you need a macro use field pairs |
02:38:15 | FromDiscord | <albassort> thats a lot of iterations |
02:38:26 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=FurSMnza |
02:38:30 | FromDiscord | <Elegantbeef> There is no runtime iteration here |
02:38:42 | FromDiscord | <albassort> thats a lot of iterations |
02:38:48 | FromDiscord | <albassort> at least like 10 |
02:38:49 | FromDiscord | <Elegantbeef> There is no iteration |
02:39:03 | FromDiscord | <albassort> hm |
02:39:04 | FromDiscord | <Elegantbeef> If you can point to iteration in there I'll point to a invisible pink pony |
02:39:20 | FromDiscord | <Robyn [She/Her]> In reply to @Elegantbeef "There is no iteration": Not even on the VM? But even still it doesn't seem like it'd be a major slow point |
02:39:34 | FromDiscord | <albassort> its not i just dont l;ike it |
02:39:35 | FromDiscord | <Robyn [She/Her]> If it is, probably should reevaluate your type instead |
02:39:36 | FromDiscord | <albassort> (edit) "l;ike" => "like" |
02:39:37 | FromDiscord | <Elegantbeef> `fields` and `fieldPairs` unrolls |
02:39:56 | FromDiscord | <Robyn [She/Her]> In reply to @albassort "its not i just": ...then deal with it :P |
02:39:57 | FromDiscord | <albassort> well roll it back up silly |
02:40:13 | FromDiscord | <Robyn [She/Her]> that's all that can be said tbh :p |
02:43:10 | FromDiscord | <Elegantbeef> In the end the most you can do is like a forloopstmt macro that does the exact same thing but with more code |
02:43:40 | FromDiscord | <Elegantbeef> `fields` and `fieldPairs` are some of the best type introspection features of Nim, straight to the point and very readable |
02:49:56 | FromDiscord | <yummy_licorice> In reply to @yummy_licorice "Hmm so I could": yea as expected nimterop doesnt work |
02:50:23 | FromDiscord | <yummy_licorice> this was the output |
02:50:37 | FromDiscord | <yummy_licorice> sent a code paste, see https://play.nim-lang.org/#pasty=BUfFYxcy |
02:50:47 | FromDiscord | <yummy_licorice> 😠|
02:53:38 | FromDiscord | <yummy_licorice> c2nim segfaults which is odd |
03:03:13 | * | def- quit (Ping timeout: 248 seconds) |
03:04:40 | * | def- joined #nim |
03:28:49 | * | def- quit (Ping timeout: 248 seconds) |
03:30:32 | * | def- joined #nim |
03:49:38 | * | rockcavera quit (Remote host closed the connection) |
04:39:45 | * | zgasma quit (Quit: leaving) |
04:58:29 | * | SchweinDeBurg quit (Ping timeout: 248 seconds) |
05:00:28 | * | SchweinDeBurg joined #nim |