<< 15-08-2026 >>

00:09:14*shanoaice quit (Quit: The Lounge - https://thelounge.chat)
00:09:41*shanoaice joined #nim
00:32:46*Mister_Magister quit (Excess Flood)
00:33:04*Mister_Magister joined #nim
00:35:22FromDiscord<voidwalker1983> anyone here in accounting. I cant search discord about accounting, it returns the word `account` , lame
00:35:50*meinside joined #nim
00:37:13FromDiscord<scoopahdoopah> 🔥
00:40:31*SchweinDeBurg quit (Remote host closed the connection)
00:40:54*SchweinDeBurg joined #nim
02:39:54*SchweinD1 joined #nim
02:42:15*SchweinDeBurg quit (Ping timeout: 248 seconds)
02:45:35*karolyi quit (Remote host closed the connection)
02:45:37*anddam quit (Ping timeout: 262 seconds)
02:45:51*karolyi joined #nim
02:48:26*anddam joined #nim
03:05:46*SchweinD1 quit (Ping timeout: 252 seconds)
03:28:32*strogon14_ quit (Remote host closed the connection)
03:29:41*strogon14 joined #nim
03:52:49*SchweinDeBurg joined #nim
04:35:42*tokyovigilante quit (Remote host closed the connection)
05:25:12*tokyovigilante joined #nim
06:20:46*SchweinDeBurg quit (Remote host closed the connection)
06:20:54*SchweinDeBurg joined #nim
06:43:20*lumidify quit (Ping timeout: 240 seconds)
06:45:30*lumidify joined #nim
07:00:50*SchweinDeBurg quit (Ping timeout: 265 seconds)
07:01:06*Skippy8 joined #nim
07:05:09*tokyovigilante quit (Remote host closed the connection)
07:07:50*SchweinDeBurg joined #nim
07:41:20*SchweinD1 joined #nim
07:44:34*SchweinDeBurg quit (Ping timeout: 260 seconds)
07:51:21*tokyovigilante joined #nim
08:27:17*tokyovigilante quit (Remote host closed the connection)
08:58:46*tokyovigilante joined #nim
09:49:38*beholders_eye joined #nim
10:29:27*midgard quit (Quit: Bye)
10:33:18*midgard joined #nim
12:04:32FromDiscord<pmunch> I'm pretty sure I know the answer to this, but is there a way to get the name of a type in a type hierarchy in Nim?
12:05:02FromDiscord<pmunch> E.g. for type `Something = ref object of Token` to get the name `Something`
13:32:12*rockcavera joined #nim
13:42:55*Skippy8 quit (Ping timeout: 264 seconds)
13:43:05*Skippy8 joined #nim
13:55:03*Skippy8 quit (Ping timeout: 265 seconds)
13:59:46*Skippy8 joined #nim
14:14:07*Skippy8 quit (Ping timeout: 264 seconds)
14:27:49*beholders_eye quit (Ping timeout: 245 seconds)
14:41:07*om3ga quit (Ping timeout: 264 seconds)
14:41:47*om3ga joined #nim
14:46:31*tokyovigilante quit (Ping timeout: 242 seconds)
14:58:31*oculux joined #nim
15:02:26*kick455 quit (Ping timeout: 250 seconds)
15:15:14FromDiscord<gesee37> sent a code paste, see https://paste.rs/wTjKS
15:15:59FromDiscord<gesee37> Maybe there in a better way, but I didn't found it
15:16:27FromDiscord<_timurski> just use a macro
15:16:45FromDiscord<_timurski> does that not work?
15:33:11FromDiscord<_timurski> https://nim-lang.org/docs/macros.html#getTypeInst%2CNimNode
15:42:03*xutaxkamay quit (Read error: Connection reset by peer)
15:42:28*xutaxkamay joined #nim
15:45:28FromDiscord<griffith1deadly> https://nimplay.eu.org/#b=aW1wb3J0IG1hY3JvcwoKdHlwZQogIFRva2VuID0gcmVmIG9iamVjdCBvZiBSb290T2JqCiAgU29tZXRoaW5nID0gcmVmIG9iamVjdCBvZiBUb2tlbgogIAptYWNybyB0eXBlTmFtZVtUOiBUb2tlbl0oc3RhdGVtZW50OiBUKSA9CiAgZWNobyBzdGF0ZW1lbnQuZ2V0VHlwZUluc3QKICAKbGV0IHNvbWV0aGluZyA9IG5ldyhTb21ldGhpbmcpCnR5cGVOYW1lKHNvbWV0aGluZykKCmxldCB0b2tlbiA9IG5ldyhUb2tlbikKdHlwZU5hbWUodG9rZW4p↵↵i think that should work
15:46:39FromDiscord<Robyn [She/Her]> sent a code paste, see https://paste.rs/j62kg
16:00:41FromDiscord<pmunch> sent a code paste, see https://paste.rs/oWiLx
16:01:16FromDiscord<pmunch> In reply to @_timurski "https://nim-lang.org/docs/macros.html#getTypeInst%2": This is compile-time only
16:03:11FromDiscord<_timurski> In reply to @pmunch "This is compile-time only": well the only way to do it at runtime is to store runtime data
16:03:37FromDiscord<_timurski> so depending on your usecase, you'd probably just wanna store an enum or something for that
16:04:02FromDiscord<_timurski> aka basically geese's method
16:04:05FromDiscord<_timurski> (edit) removed ""
16:04:11FromDiscord<_timurski> (edit) "so" => "~~so" | "that" => "that~~"
16:04:19FromDiscord<_timurski> (edit) "data" => "data, which Nim already does for ref objects"
16:05:00*xutaxkamay quit (Read error: Connection reset by peer)
16:05:22*xutaxkamay joined #nim
16:08:06FromDiscord<Robyn [She/Her]> In reply to @pmunch "I was hoping to": Oh you need to get `Something` even though its been downcasted?
16:10:09FromDiscord<Robyn [She/Her]> there's probably some way but idk./..
16:17:04FromDiscord<pmunch> Yeah, I have a parser that returns a tree of Tokens
16:28:51*beholders_eye joined #nim
16:34:23*zkzeroed joined #nim
16:35:47*zkzeroed quit (Client Quit)
16:44:18FromDiscord<griffith1deadly> sent a long message, see https://paste.rs/69Bn5
16:48:48FromDiscord<pmunch> Of course, but then I need to manually construct a massive case statement
16:51:33FromDiscord<pmunch> I think I've looked into this in the past but was unable to find anything..
16:51:51FromDiscord<pmunch> Which is weird, because Nim obviously has the information
16:52:11FromDiscord<pmunch> Well in doesn't necessarily have the names, but that should be possible to add
16:53:13FromDiscord<_timurski> Nim store's the name of a type at runtime as a string?
16:59:07FromDiscord<pmunch> I don't think so
16:59:08FromDiscord<gesee37> In reply to @pmunch "Of course, but then": Nim has some sort of RTTI for inheritance... no ?↵If we just know how it's laid out in memory you could in a really unsafe manner, fetch a pointer to the name
16:59:18FromDiscord<pmunch> But it stores the type
16:59:39FromDiscord<pmunch> I believe the name is gone from the binary
16:59:45FromDiscord<pmunch> Like the actual string
16:59:59FromDiscord<pmunch> To Nim it's just an identifier of some sort
17:00:17FromDiscord<pmunch> Stored relative to the pointer IIRC
17:00:23FromDiscord<_timurski> sent a code paste, see https://paste.rs/UaeUB
17:00:42FromDiscord<_timurski> with nimony plugins this would be crazy simple to automate
17:00:47FromDiscord<_timurski> macros can do it too though
17:00:48FromDiscord<pmunch> Yes, but that also requires that I create methods for all the types
17:00:59FromDiscord<_timurski> i'd add a macro wrapper around my type defs
17:01:06FromDiscord<_timurski> which would generate the stuff automatically
17:01:21FromDiscord<pmunch> Problem is that they're not _my_ typedefs
17:01:33FromDiscord<_timurski> ah yeah
17:01:50FromDiscord<pmunch> I guess I could create the case statement with some grep and sed..
17:01:58FromDiscord<pmunch> Hacky of course
17:02:14FromDiscord<pmunch> Maybe a term rewriting macro..
17:03:29FromDiscord<pmunch> And abuse of the --import flag
17:03:47FromDiscord<pmunch> Well, might not be abuse, not sure what that flag is actually intended for 😅
17:24:05*beholders_eye quit (Ping timeout: 259 seconds)
17:41:35*ftajhii quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
17:43:46*zodman joined #nim
17:51:40*ftajhii joined #nim
18:07:18*Skippy8 joined #nim
18:45:49*beholders_eye joined #nim
18:46:00*Skippy8 quit (Ping timeout: 261 seconds)
19:35:12*beholders_eye quit (Ping timeout: 260 seconds)
19:52:53*termer quit (Remote host closed the connection)
19:54:29*termer joined #nim
20:12:23*Skippy8 joined #nim
20:40:01FromDiscord<enthus1ast.> In reply to @_timurski "with nimony plugins this": Btw is there some good intro or primer to nif/nimony/plugins?
20:41:57FromDiscord<_timurski> nah i haven't even used them but i have just seen some code that gives me a good idea of what they'd allow you to do
20:44:39FromDiscord<enthus1ast.> i've tried to look at them but i did not know where to start, so i read randomly
20:48:00FromDiscord<enthus1ast.> sent a code paste, see https://paste.rs/Xp7AG
20:48:48FromDiscord<_timurski> they need runtime info not comptime
21:01:33FromDiscord<pmunch> Yeah, this is for RTTI
21:24:57FromDiscord<gesee37> In reply to @enthus1ast. "Btw is there some": Struggled with it too
21:25:14FromDiscord<gesee37> Just read the doc and suffer until you make something that works
21:25:41FromDiscord<gesee37> But I think once you understand how it works under de hood, it just clicks
21:28:02FromDiscord<enthus1ast.> Conceptually I get them (I think), it's lowered and lowered through the compile steps and finally emitted. So I would put my plugin on one step I see fit best. But where is the big dialect defined (this i did not found tbh)
21:28:29FromDiscord<enthus1ast.> (edit) "big" => "nif"
21:28:58FromDiscord<enthus1ast.> (edit) "Conceptually I get them (I think), it's lowered and lowered through the compile steps and finally emitted. So I would put my plugin on one step I see fit best. But where is the nif dialect defined (this i did not found tbh) ... " added "so I know what I actually are allowed to create"
21:32:01FromDiscord<gesee37> sent a long message, see https://paste.rs/Y8T61
21:43:14*nariyel quit (Remote host closed the connection)
21:47:21*beholders_eye joined #nim