<< 06-06-2022 >>

00:23:02*krux02 quit (Remote host closed the connection)
00:31:04NimEventerNew thread by Cmc: Announce: LimDB, a fast, persistent table with LMDB under the hood, see https://forum.nim-lang.org/t/9210
00:53:17FromDiscord<👾 br4n_d0n> How do you get the length of a tuple?
00:53:55FromDiscord<Elegantbeef> `typetraits.len`
00:53:58FromDiscord<Elegantbeef> sorry `tupleLen`
00:54:27FromDiscord<Elegantbeef> They're static sized so it doesnt serve much purpose but it's there
00:55:25FromDiscord<👾 br4n_d0n> Well, I'm sending in a tuple to a proc that accepts a generic so I may not know the length
00:55:52FromDiscord<Elegantbeef> Generics arent type erased
00:56:30FromDiscord<👾 br4n_d0n> Huh?
00:57:31FromDiscord<Elegantbeef> Generic procedures generic parameters are known at instantiation so there is no lost information
01:00:25FromDiscord<Elegantbeef> Code example of what youre doing would be great
01:04:34FromDiscord<👾 br4n_d0n> sent a code paste, see https://paste.rs/lrB
01:04:55FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3ZuG
01:06:03FromDiscord<👾 br4n_d0n> (edit) "https://paste.rs/Lzs" => "https://play.nim-lang.org/#ix=3ZuH"
01:08:10FromDiscord<👾 br4n_d0n> Can you explain why you used when in this instance?
01:08:28FromDiscord<Elegantbeef> `when` is for compile time
01:08:43FromDiscord<👾 br4n_d0n> ah
01:11:44FromDiscord<👾 br4n_d0n> Well, since I have your attention @ElegantBeef how would I go about forcing `` val `` to be a tuple of 3 values?
01:15:49FromDiscord<Elegantbeef> sent a code paste, see https://paste.rs/d76
01:15:50FromDiscord<Elegantbeef> Think that should work
01:16:59FromDiscord<Rika> I noticed https://forum.nim-lang.org/profile/georgeethan got marked as spammer
01:17:06FromDiscord<Rika> Was this automated or intentional?
01:39:22FromDiscord<👾 br4n_d0n> What would be the best way to iterate over all of a proc's parameters?
01:41:18FromDiscord<huantian> Uh don’t?
01:41:27FromDiscord<huantian> Maybe use a varargs?
01:42:43FromDiscord<Elegantbeef> If you really need to a macro is the best bet
01:46:56FromDiscord<👾 br4n_d0n> sent a code paste, see https://play.nim-lang.org/#ix=3ZuL
01:47:05FromDiscord<Elegantbeef> Yes like huan said varargs
01:47:47FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3ZuM
01:48:40FromDiscord<👾 br4n_d0n> But won't that allow max to accept less than or more than 4?
01:48:53FromDiscord<Elegantbeef> Yes
01:49:13FromDiscord<👾 br4n_d0n> I'm trying to force it to be exactly 4
01:49:40FromDiscord<Elegantbeef> Sounds like manual code
01:49:45FromDiscord<👾 br4n_d0n> lol
01:50:02FromDiscord<👾 br4n_d0n> I was hoping for language sugar
01:50:26FromDiscord<huantian> You can do varargs and assert the length ig
01:50:33FromDiscord<huantian> But that won’t be compile time
01:50:39FromDiscord<Elegantbeef> sent a code paste, see https://paste.rs/v84
01:50:54FromDiscord<Elegantbeef> Like i said you can use a macro if you musst
01:51:01FromDiscord<Elegantbeef> But it's just a "why would you want to"
01:51:49FromDiscord<👾 br4n_d0n> So does the assert make it a macro?
01:51:56FromDiscord<Elegantbeef> No
01:52:08FromDiscord<Elegantbeef> Macros are how Nim does deep introspection
01:58:47FromDiscord<Elegantbeef> sent a code paste, see https://paste.rs/vim
01:58:55FromDiscord<Elegantbeef> replace `in` with the module name if you're running it
02:00:58FromDiscord<Elegantbeef> Can do it smarter now that i think about it
02:04:22FromDiscord<👾 br4n_d0n> Yeah, you weren't kidding; that's overly complicated for this unless I "really" needed it
02:04:51FromDiscord<Elegantbeef> sent a code paste, see https://paste.rs/MMb
02:07:46FromDiscord<Elegantbeef> The thing about Nim though is you can relatively easily get sugar if you know what you're doing 😄
02:09:53FromDiscord<👾 br4n_d0n> That's the problem though, I don't know what I'm doing 😆
02:14:29FromDiscord<Elegantbeef> Yep until you know what you're doing you should stay away from macros
02:14:51FromDiscord<Elegantbeef> Like patito the other day was using a macro instead of a template for no reason aside from "macro do the dew"
02:17:08FromDiscord<👾 br4n_d0n> Lol, that's kind of like "when in doubt, use a macro"
02:17:22FromDiscord<Elegantbeef> Yea dont do that
02:18:23FromDiscord<Elegantbeef> You can do a lot of introspection with just procedures, so simplest tool is best
02:19:48FromDiscord<👾 br4n_d0n> Hopefully I'll be able to get to a point where I can understand all of this with relative ease, but until then, I appreciate everyone putting up with me
03:17:11FromDiscord<!Patitotective> In reply to @Elegantbeef "Like patito the other": beef...↵this code is too cursed https://github.com/Patitotective/ImThemes/blob/main/src/editview.nim#L261↵i dont know what to do
03:17:39*arkurious quit (Quit: Leaving)
03:20:25FromDiscord<Elegantbeef> Jesus fucking christ
03:20:27FromDiscord<Elegantbeef> You know you can do for loops right? 😄
03:20:39FromDiscord<Elegantbeef> The bottom half of that just iterates over the enum values
03:21:00FromDiscord<!Patitotective> In reply to @Elegantbeef "The bottom half of": smart
03:22:33FromDiscord<Elegantbeef> the top half seems to mostly be `for x in app.prevThemeStyle.fields: when x is float32`
03:23:45FromDiscord<!Patitotective> hmmmm, since i dont want all fields i could define an array with the ones i want and filter it 🤔
03:23:49FromDiscord<!Patitotective> (edit) "it" => "them"
03:27:10FromDiscord<Elegantbeef> or you know `for name, val in app.prevThemeStyle.fieldPairs: when name in ["alpha", "disabledAlpha", "windowPadding", ..]`
03:27:20FromDiscord<Elegantbeef> Yes
04:24:43*rockcavera quit (Remote host closed the connection)
06:10:31NimEventerNew thread by AMoura: Understand C++ binding with OpenCV., see https://forum.nim-lang.org/t/9211
06:50:03FromDiscord<IzanamiのMegumi> var's cant start with a number, right?
06:50:12FromDiscord<IzanamiのMegumi> I tried naming mine 1Number and it didnt work
06:50:27FromDiscord<Elegantbeef> numbers are an invalid symbol starting character
06:50:28FromDiscord<Elegantbeef> same with `_`
06:50:41FromDiscord<IzanamiのMegumi> yeah I figured that out
06:51:28FromDiscord<IzanamiのMegumi> just did the calculator thing
06:51:32FromDiscord<IzanamiのMegumi> pretty cool
06:55:39FromDiscord<Tuatarian> not a nim question but
06:56:00FromDiscord<Tuatarian> if I have an array of length 5 with entries either 0, 1 or 2, how do I generate all permutations of that array?
06:56:22FromDiscord<Tuatarian> counting them is not hard, but I'm not sure how to go about generating them efficiently
06:56:31FromDiscord<Elegantbeef> Nim has permutations in algorithim iirc
06:56:43FromDiscord<Tuatarian> oh didn't even bother to check lmao
06:57:04*xet7 joined #nim
06:57:22FromDiscord<Tuatarian> oh I see this
06:57:37FromDiscord<Tuatarian> I know how to do this but my problem is slightly different I think
06:57:52FromDiscord<Tuatarian> unless...
06:58:41FromDiscord<Tuatarian> can I just do array of `[0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2]`, iterate through all permutations, take just the first 5 elems, and remove all duplicates?
06:59:10FromDiscord<Tuatarian> this could happen at compile time theoretically so speed should be not an issue
06:59:15FromDiscord<Tuatarian> but is there a better way?
07:00:34NimEventerNew Nimble package! fidgetty - Widget library built on Fidget written in pure Nim and OpenGL rendered, see https://github.com/elcritch/fidgets
07:04:19FromDiscord<Elegantbeef> `deduplicate`
07:25:42FromDiscord<Tuatarian> right but you're still wasting a lot of computations right?
07:26:05FromDiscord<Tuatarian> 15! >>> 3^5
07:26:29FromDiscord<Tuatarian> even ignoring the deduplication
07:26:32FromDiscord<Elegantbeef> You can do it at compile time
07:26:46FromDiscord<Tuatarian> in this case yeah
07:27:02FromDiscord<Elegantbeef> I dont even get what you're doing
07:27:10FromDiscord<Elegantbeef> Why is your data set repeating the same numbers multiple time
07:27:18FromDiscord<Tuatarian> antiwordle solver
07:27:31FromDiscord<Tuatarian> 0 = grey, 1 = yellow, 2 = red/green
07:27:43FromDiscord<Tuatarian> but I think this could show up in more general cases
07:28:19FromDiscord<Tuatarian> the abstract question ig is if I hve an array of n elements where each element is an integer in 0..m, how can I generate all states of that array efficiently?
07:28:39FromDiscord<Tuatarian> in this particular case I can just do it at compile time so I don't have to think about it too much
07:28:44FromDiscord<Elegantbeef> You use the permutations from algorithims
07:28:58FromDiscord<Tuatarian> doesn't permutations find all orders of a set?
07:29:23FromDiscord<Tuatarian> the array can be `[0, 0, 0, 0, 0]` or `[2, 2, 2, 2, 2]` or anything in between
07:29:26FromDiscord<Tuatarian> not all elements need to appear
07:29:26FromDiscord<Elegantbeef> Yes
07:29:54FromDiscord<Tuatarian> not sure if there's a better way to do this particular problem but I fee like there has to be
07:32:05FromDiscord<Elegantbeef> > not all elements need to appear↵This makes no sense
07:32:19FromDiscord<Tuatarian> ok so I have an array of length 5
07:32:24FromDiscord<Tuatarian> elements are some enum
07:33:05FromDiscord<Tuatarian> I want to find all configs of that array for all values of that enum
07:33:16FromDiscord<Tuatarian> I'm explaining this badly I think
07:34:00FromDiscord<Tuatarian> lets say I have an array of length 2 who's values are either 0 or 1
07:34:10FromDiscord<Tuatarian> I want to find all possible states of that array / all permutations of that array
07:34:33FromDiscord<Tuatarian> so `[0, 0]` `[1, 0]` `[1, 1]` `[0, 1]`
07:34:57FromDiscord<Tuatarian> neither 0 nor 1 necessarily have to appear in the array
07:35:37FromDiscord<Elegantbeef> That's not really a permutation, that's all valid collections, there is probably a proper term but idk
07:35:54FromDiscord<Tuatarian> sure
07:36:19FromDiscord<Tuatarian> not super sure of the correct terminology
07:37:26*jjido joined #nim
07:41:53FromDiscord<NimYT> hm
07:42:14FromDiscord<Elegantbeef> Hm indeed
07:42:25FromDiscord<NimYT> i just type my name
07:42:29FromDiscord<NimYT> on the invite link
07:42:33FromDiscord<NimYT> and this appears
07:42:52FromDiscord<NimYT> Hmmmmm what is this server for?
07:43:00FromDiscord<Elegantbeef> The Nim programming langauge
07:43:14FromDiscord<Tuatarian> lmao
07:43:28FromDiscord<NimYT> ok
07:43:33FromDiscord<Tuatarian> it's a good programming langauge
07:43:41FromDiscord<NimYT> i must say i am not disappointed
07:44:08FromDiscord<Tuatarian> also beef you migrated to irc?
07:44:15FromDiscord<Elegantbeef> No matrix
07:44:18FromDiscord<Tuatarian> oh I see
07:44:22FromDiscord<Tuatarian> why?
07:44:29FromDiscord<Elegantbeef> Cause discord is fucking shit?
07:44:35FromDiscord<Tuatarian> it is?
07:44:50FromDiscord<Tuatarian> I just don't have the desktop app installed so it doesn't bombard me with noises
07:44:53FromDiscord<Elegantbeef> Proprietary software that has no interest in allowing you have control
07:44:55FromDiscord<Tuatarian> web ver is fine for me at least
07:45:09FromDiscord<Tuatarian> fair
07:45:37FromDiscord<Tuatarian> I'm not a super foss guy though, don't mind proprietary software inherently but lack of control is irritating
07:49:41FromDiscord<Elegantbeef> Anyway you just do the good old switch a flag per each element
07:50:32FromDiscord<Elegantbeef> I'm too tired to write the actual code, but yea iterate over each row moving throw each element then each child element until you get to the end
07:55:07FromDiscord<Tuatarian> oh I see
07:55:35FromDiscord<Tuatarian> wow that's an apcs level easy question no idea why I didn't come up with that lmao
07:55:46FromDiscord<Tuatarian> (edit)
08:00:41FromDiscord<d4rckh> How do you handle uploading files from IRC?
08:00:45FromDiscord<d4rckh> and viewing
08:00:52FromDiscord<d4rckh> I think this is offtopic
08:00:53FromDiscord<Elegantbeef> URLs
08:01:03FromDiscord<d4rckh> i see
08:01:18FromDiscord<d4rckh> do you use one of those screenshot utilities that upload your picture as soon as you take it?,
08:01:21FromDiscord<d4rckh> (edit) "it?," => "it?"
08:01:30FromDiscord<Elegantbeef> I dont use IRC
08:01:32FromDiscord<Elegantbeef> So nope
08:04:14FromDiscord<d4rckh> I might give it a try
08:04:59madpropsi don't see any image links here
08:12:21FromDiscord<d4rckh> https://media.discordapp.net/attachments/371759389889003532/983282182166577202/logo.svg
08:13:41madprops"XML Parsing Error: no root element found"
08:36:11*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
09:10:32*toluene quit (Ping timeout: 255 seconds)
09:13:01*toluene joined #nim
09:26:17*krux02 joined #nim
09:27:40*sagax quit (Read error: Connection reset by peer)
09:36:52*vicecea quit (Remote host closed the connection)
09:37:22*vicecea joined #nim
09:38:01FromDiscord<Andreas> sent a code paste, see https://play.nim-lang.org/#ix=3Zwe
09:38:27FromDiscord<Andreas> (edit) "https://play.nim-lang.org/#ix=3Zwe" => "https://paste.rs/MOv"
09:38:36FromDiscord<Andreas> (edit) "https://play.nim-lang.org/#ix=3Zwf" => "https://paste.rs/E1k"
09:42:01FromDiscord<demotomohiro> #define`
09:42:59FromDiscord<demotomohiro> `#define` macros dont exist in shared library.
09:44:15FromDiscord<demotomohiro> It is preprocessor macros.
09:44:59FromDiscord<Andreas> @demotomohiro c2nim ? to the rescue ?
09:46:21*PMunch joined #nim
09:46:33FromDiscord<demotomohiro> I don't know whether c2nim supports preprocessor macros.
09:48:20FromDiscord<Andreas> prbly. https://github.com/nim-lang/c2nim/blob/master/doc/c2nim.rst#id19 there is a #def-directive , ty i'll try that
09:48:33FromDiscord<Andreas> (edit) "#def-directive" => "`#def-directive`"
10:12:13FromDiscord<retkid> ]check
10:12:17FromDiscord<retkid> ]check
10:33:58*jmdaemon quit (Ping timeout: 244 seconds)
10:50:12*PMunch quit (Quit: leaving)
11:00:50NimEventerNew Nimble package! cdecl - Nim helper for using C Macros, see https://github.com/elcritch/cdecl
11:21:12*adium quit (Ping timeout: 246 seconds)
11:33:25FromDiscord<System64 ~ Flandre Scarlet> does Nim's JSON parser support arrays?
11:38:32*sagax joined #nim
11:48:52FromDiscord<Yardanico> what
12:10:03*jjido joined #nim
12:25:23*vicecea quit (Remote host closed the connection)
12:25:51*vicecea joined #nim
12:49:27*arkurious joined #nim
13:02:19*kayabaNerve_ joined #nim
13:04:10*kayabaNerve quit (Ping timeout: 240 seconds)
13:22:46*adium joined #nim
13:31:52FromDiscord<d4rckh> In reply to @System64 "does Nim's JSON parser": yes you can create one like this `let jsonArray = %[]` and append other json nodes to it using add: `jsonArray.add %{"id": 0}`
13:56:51*vicfred joined #nim
14:00:18*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
14:24:12FromDiscord<d4rckh> sent a code paste, see https://play.nim-lang.org/#ix=3Zx8
14:24:14FromDiscord<d4rckh> im using pixie for
14:24:17FromDiscord<d4rckh> (edit) "im using pixie for ... " added "saving a screenshot"
14:24:29FromDiscord<d4rckh> im not sure what the reason is
14:24:34FromDiscord<d4rckh> but it wont save anything
14:24:43FromDiscord<d4rckh> and the function will basically running at writeLine
14:24:46FromDiscord<d4rckh> like it wont run any code past it
14:24:49FromDiscord<d4rckh> no errors thrown
14:25:52FromDiscord<d4rckh> (edit) "https://play.nim-lang.org/#ix=3Zx8" => "https://play.nim-lang.org/#ix=3Zx9"
14:25:56FromDiscord<d4rckh> (edit) "https://play.nim-lang.org/#ix=3Zx9" => "https://play.nim-lang.org/#ix=3Zxa"
14:34:11FromDiscord<d4rckh> actually, it gets stuck forever at decodeImage
14:38:08*xet7 quit (Remote host closed the connection)
15:05:13*rockcavera joined #nim
15:05:13*rockcavera quit (Changing host)
15:05:13*rockcavera joined #nim
15:21:08*caliente00 is now known as firq
15:21:18FromDiscord<System64 ~ Flandre Scarlet> In reply to @d4rckh "yes you can create": and can I turn it into a seq or something?
15:21:45FromDiscord<d4rckh> yes
15:21:50FromDiscord<d4rckh> loop it and create it
15:22:42FromDiscord<System64 ~ Flandre Scarlet> ah alright
15:22:51FromDiscord<System64 ~ Flandre Scarlet> impossible to cast?
15:24:27FromDiscord<Yardanico> In reply to @System64 "impossible to cast?": "cast" is only used for unsafe operations to treat memory bits as some other type
15:24:36FromDiscord<Yardanico> but yes just use https://nim-lang.org/docs/json.html#getElems%2CJsonNode%2Cseq%5BJsonNode%5D
15:24:48FromDiscord<Yardanico> and if you want to get a seq of native nim types, use it together with mapIt or something
15:27:37FromDiscord<System64 ~ Flandre Scarlet> oh alright
15:28:02FromDiscord<System64 ~ Flandre Scarlet> and then using a loop would be simpler
15:45:51FromDiscord<Zoom> Do we have any TUI widget libraries besides jjv360/nim-termui ? I need a selectable list.
15:48:34FromDiscord<Yardanico> https://github.com/enthus1ast/illwillWidgets ?
16:05:03*xet7 joined #nim
16:18:42*rockcavera quit (Ping timeout: 246 seconds)
17:11:51*koltrast_ quit (Quit: ZNC - http://znc.in)
17:41:16*pro joined #nim
17:46:52NimEventerNew thread by Clavismax: Is there a smarter way to change only one field value of a tuple?, see https://forum.nim-lang.org/t/9212
17:56:49FromDiscord<Luckayla> Good morning all.
17:57:20*koltrast joined #nim
18:08:00FromDiscord<eyecon> Do we have anything that merges two tables? Not `CountTable` but vanilla table.
18:16:05FromDiscord<Andreas> In reply to @eyecon "Do we have anything": nope, `merge` is only for `CountTable` so you should loop..
18:16:34FromDiscord<Andreas> (edit) "In reply to @eyecon "Do we have anything": nope, `merge` is only for `CountTable` so you should loop.. ... " added "or write a `.merge`-proc fot std/table"
18:16:50FromDiscord<Andreas> (edit) "fot" => "for"
18:18:22FromDiscord<huantian> There’s no standard way to merge two tables imo
18:25:35*PMunch joined #nim
18:33:09FromDiscord<Andreas> In reply to @huantian "There’s no standard way": right, i would'nt know either, so than loop over the Maps, compare Keys/Values and update as you need..
18:38:48FromDiscord<Rika> which table would have precedence if there are two keys that match? or do we exploit that keys can have many values?
18:38:53FromDiscord<Rika> if there was a merge, i meant
18:40:33FromDiscord<Andreas> In reply to @Rika "*if there was a": hmm, i believed both tables were created by the user, so you'd know how which Table has preference over the other,, if not well than i'd go from left to right ?
18:40:46FromDiscord<Andreas> (edit) removed "how"
18:41:16*derpydoo joined #nim
18:42:00FromDiscord<Andreas> (edit) "In reply to @Rika "*if there was a": hmm, i believed both tables were created by the user, so you'd know which Table has preference over the other,, if not well than i'd go from ... left?" added "right to" | "to" => "? left(receiving updates, prbly. destructive if keys match) + merge(" | "?" => ")"
18:42:15FromDiscord<Andreas> (edit) "match) + merge(" => "match).merge("
18:47:59FromDiscord<Andreas> sent a long message, see http://ix.io/3ZyY
18:48:19FromDiscord<Andreas> (edit) "http://ix.io/3ZyY" => "http://ix.io/3ZyZ"
19:02:42FromDiscord<Luckayla> Just got turned onto nim from the python community funnily enough
19:02:51FromDiscord<Luckayla> Getting an environment set up to play around with it
19:03:39FromDiscord<eyecon> Thanks, guess I was just thinking about the happy path... Surely there's much to consider if there's a clash
19:09:48FromDiscord<d4rckh> is there any built in function for parsing file paths?
19:14:02FromDiscord<d4rckh> nvm found
19:15:27*koltrast_ joined #nim
19:15:28*koltrast quit (Ping timeout: 246 seconds)
19:20:17*koltrast_ quit (Ping timeout: 255 seconds)
19:20:45*koltrast joined #nim
19:32:49*Guest98 joined #nim
19:33:08*Guest98 quit (Client Quit)
20:21:40*rockcavera joined #nim
20:21:40*rockcavera quit (Changing host)
20:21:40*rockcavera joined #nim
20:32:44FromDiscord<jmgomez> sent a code paste, see https://play.nim-lang.org/#ix=3Zzz
20:43:05*jjido joined #nim
20:48:54FromDiscord<Luckayla> so question, some of the nim learning resources use `echo "Etc", "etc"` and others use `echo("etc", "etc")` , sometimes they are intermixed with each other. Functionally, is there a difference? or is this just syntactic sugar for calling functions (procs?)
20:50:01FromDiscord<Rika> sugar
20:53:22NimEventerNew thread by Levlan: Solving cubic equations, see https://forum.nim-lang.org/t/9213
20:59:31FromDiscord<Luckayla> thanks
21:00:53FromDiscord<!Patitotective> can i set an object field with an string?↵like `myObj[field] = val`↵or do i need a template?
21:08:23FromDiscord<Rika> is this string statically computable
21:08:31*derpydoo quit (Quit: derpydoo)
21:10:08FromDiscord<blashyrk> @jmgomez https://nim-lang.org/1.0.6/manual.html#implementation-specific-pragmas-custom-annotations
21:10:52FromDiscord<!Patitotective> In reply to @Rika "is this string statically": yes
21:13:51FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3ZzI
21:30:28*pro quit (Quit: pro)
21:42:21*arkurious quit (Quit: Leaving)
21:42:26*dtomato joined #nim
21:48:16FromDiscord<Alea> Is it significantly slower to iterate over a table than a list?
21:52:02FromDiscord<Alea> I know it's slower, but how much?
21:54:05FromDiscord<Alea> I do see something about an indexmap structure which might work best for this
21:55:19FromDiscord<Alea> https://nim-lang.org/docs/tables.html#OrderedTable seems to be similar, but I'm not sure if the implementation is the same
21:57:17*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
21:59:07FromDiscord<Generic> depending on your application you could also have both
21:59:21FromDiscord<Generic> it takes a bit more memory but could be worth it
21:59:36FromDiscord<Generic> you'd have to store the index inside the seq inside the table for quick deletions
21:59:45FromDiscord<jmgomez> sent a code paste, see https://play.nim-lang.org/#ix=3ZzS
22:00:04FromDiscord<Generic> (edit) "index inside" => "indices for"
22:01:10*toluene quit (Ping timeout: 272 seconds)
22:04:03*jjido joined #nim
22:14:38FromDiscord<Elegantbeef> Well you cannot emit functions in typedefs
22:15:00FromDiscord<Elegantbeef> @jmgomez\: consider looking at https://github.com/beef331/constructor/blob/master/src/constructor/defaults.nim
22:15:58FromDiscord<Elegantbeef> @Alea\: iterating a table shouldnt be much slower than iterating a seq asssuming you're using the `pairs` iterator
22:19:44*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
22:20:33FromDiscord<Elegantbeef> https://github.com/nim-lang/Nim/blob/version-1-6/lib/pure/collections/tables.nim#L694-L698 like the only difference is the `if isFilled` part
22:23:52*toluene joined #nim
22:28:27FromDiscord<!Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=3ZA3
22:28:44FromDiscord<Elegantbeef> Why are you using a string directly?
22:29:16FromDiscord<!Patitotective> because i read the properties from a json file
22:29:35FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3ZA4
22:29:36FromDiscord<Elegantbeef> Ok
22:29:56FromDiscord<Elegantbeef> This is for properties?
22:30:04FromDiscord<!Patitotective> yea
22:30:16FromDiscord<Elegantbeef> Well i mean loading the values from a format
22:30:34FromDiscord<Elegantbeef> You're doing this backwards i presume but ymmv
22:31:48FromDiscord<!Patitotective> the idea is that you can publish your theme (in a json file) and then other person can get an `ImGuiStyle` from it
22:31:50FromDiscord<!Patitotective> (edit) "the idea is that you can publish your theme (in a json file) and then other person can get an `ImGuiStyle` ... from" added "obj"
22:34:52FromDiscord<Elegantbeef> No need for macros here
22:34:52FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3ZA7
22:35:23FromDiscord<Elegantbeef> `for name, field in result.fieldpairs` sorry
22:36:00FromDiscord<!Patitotective> smart thanks
22:36:38FromDiscord<Elegantbeef> Macros run at compile time so they cannot solve this issue without generating the above
22:59:29*lumo_e joined #nim
23:16:27*PMunch quit (Quit: leaving)
23:21:02*wallabra quit (Ping timeout: 250 seconds)
23:50:49*wallabra joined #nim