<< 22-01-2025 >>

00:03:24FromDiscord<yummy_licorice> In reply to @saint._._. "What library are you": Mir
00:03:34FromDiscord<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:15FromDiscord<albassort> i know there is field pairs but is there a keypairs for objects?
02:29:30FromDiscord<albassort> i need to get arbitrary fields by name
02:30:00FromDiscord<Elegantbeef> `fieldpairs`
02:30:13FromDiscord<albassort> sounds slow doing it this way
02:31:14FromDiscord<albassort> i know there is an abitrary field getter, i've seen it
02:34:29FromDiscord<albassort> there are only macros
02:34:34FromDiscord<albassort> sadge
02:34:41FromDiscord<Elegantbeef> This is at runtime?
02:36:51FromDiscord<albassort> yeah
02:37:00FromDiscord<albassort> but the use case could be evalulated at compiletime
02:37:02FromDiscord<Elegantbeef> So then how does a macro help
02:37:30FromDiscord<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:42FromDiscord<Elegantbeef> So why do you need a macro use field pairs
02:38:15FromDiscord<albassort> thats a lot of iterations
02:38:26FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=FurSMnza
02:38:30FromDiscord<Elegantbeef> There is no runtime iteration here
02:38:42FromDiscord<albassort> thats a lot of iterations
02:38:48FromDiscord<albassort> at least like 10
02:38:49FromDiscord<Elegantbeef> There is no iteration
02:39:03FromDiscord<albassort> hm
02:39:04FromDiscord<Elegantbeef> If you can point to iteration in there I'll point to a invisible pink pony
02:39:20FromDiscord<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:34FromDiscord<albassort> its not i just dont l;ike it
02:39:35FromDiscord<Robyn [She/Her]> If it is, probably should reevaluate your type instead
02:39:36FromDiscord<albassort> (edit) "l;ike" => "like"
02:39:37FromDiscord<Elegantbeef> `fields` and `fieldPairs` unrolls
02:39:56FromDiscord<Robyn [She/Her]> In reply to @albassort "its not i just": ...then deal with it :P
02:39:57FromDiscord<albassort> well roll it back up silly
02:40:13FromDiscord<Robyn [She/Her]> that's all that can be said tbh :p
02:43:10FromDiscord<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:40FromDiscord<Elegantbeef> `fields` and `fieldPairs` are some of the best type introspection features of Nim, straight to the point and very readable
02:49:56FromDiscord<yummy_licorice> In reply to @yummy_licorice "Hmm so I could": yea as expected nimterop doesnt work
02:50:23FromDiscord<yummy_licorice> this was the output
02:50:37FromDiscord<yummy_licorice> sent a code paste, see https://play.nim-lang.org/#pasty=BUfFYxcy
02:50:47FromDiscord<yummy_licorice> 😭
02:53:38FromDiscord<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