<< 15-10-2021 >>

01:17:04*Gustavo6046 quit (Remote host closed the connection)
01:17:07*Gustavo6046_ joined #nim
01:20:22*Gustavo6046_ is now known as Gustavo6046
01:25:17*Gustavo6046_ joined #nim
01:25:25*Gustavo6046 quit (Ping timeout: 252 seconds)
01:28:07*Gustavo6046_ is now known as Gustavo6046
02:38:31*Freneticks quit (Ping timeout: 252 seconds)
02:40:58*Freneticks joined #nim
02:51:39*arkurious quit (Quit: Leaving)
04:06:01*supakeen quit (Quit: WeeChat 3.3)
04:06:31*supakeen joined #nim
04:38:36NimEventerNew Nimble package! chacha20 - ChaCha20 stream cipher, see https://git.sr.ht/~ehmry/chacha20
04:41:01FromDiscord<Rika> Oh are they a cryptographer
04:43:32FromDiscord<that_dude> Is it possible to remove a variable name from a scope so It doesn't actually get used later? I have a temp var at the start which is used to set up a global/exported let once its done with it's calculations
04:44:03FromDiscord<that_dude> (edit) "it's" => "its"
04:44:05FromDiscord<Elegantbeef> throw it in a `block` is the easiest
04:44:22FromDiscord<Elegantbeef> Alternatively use expressions
04:44:31FromDiscord<Elegantbeef> What's the code?
04:44:45FromDiscord<that_dude> And that wont cause issues with the exporting/global part?
04:45:07FromDiscord<that_dude> sent a code paste, see https://paste.rs/0Ps
04:45:18FromDiscord<Elegantbeef> Ah yea block will work or `std/collect`
04:45:28FromDiscord<that_dude> Cool
04:45:44FromDiscord<Elegantbeef> `std/sugar`'s collect sorry
04:46:01FromDiscord<that_dude> I just thought that if I define all_actions in the block it will get removed once the block ends
04:46:11FromDiscord<Elegantbeef> It will
04:46:37FromDiscord<that_dude> The issue is that I need all_actions to stick around after the block
04:46:40FromDiscord<Elegantbeef> https://play.nim-lang.org/#ix=3BMC
04:47:17FromDiscord<Elegantbeef> https://play.nim-lang.org/#ix=3BME
04:47:22FromDiscord<Elegantbeef> There are the two solutions
04:47:25FromDiscord<that_dude> Thanks will look into that. I haven't really ever used sugar
04:50:15FromDiscord<that_dude> Where could I find more info about how let can be used that way? (In the way it's shaped like a proc)
04:50:41FromDiscord<Elegantbeef> It's just an expression
04:50:52FromDiscord<Elegantbeef> https://nim-lang.org/docs/manual.html#statements-and-expressions-if-expression
04:50:58FromDiscord<Elegantbeef> all of them are listed there
04:51:18FromDiscord<that_dude> Ah thanks
05:23:12*rockcavera quit (Remote host closed the connection)
06:51:18*PMunch joined #nim
08:20:44*max22- joined #nim
08:40:12FromDiscord<zidsal> big thanks to whoever fixed the choosenim 1.6 windows issue now I can be on bleeding edge!
08:45:25PMunchHmm, does jsony work during compile-time?
08:45:38PMunchThe slowest part of Futhark is parsing the Opir output..
08:46:16FromDiscord<Elegantbeef> there is `toStaticJson`
08:46:40PMunchWell I need to parse JSON during compile-time
08:46:44PMunchNot create it
08:47:03FromDiscord<Elegantbeef> Ah then i think it'll just work since it's not using any low level ops
08:57:49FromDiscord<haxscramper> It just scans string and mutates `i: var int` when scanning json
09:02:41*Vladar joined #nim
09:07:35PMunchDamn it..
09:07:46PMunchI converted my code to use packedjson
09:08:04PMunchAnd I just get this error: /home/peter/.nimble/pkgs/packedjson-0.2.2/packedjson.nim(104, 41) Error: cannot generate code for: mSlice
09:13:11PMunchFor jsony I need to define everything as types..
10:26:12PMunchI wonder if jsony will be any faster..
10:26:31FromDiscord<Kiloneie> can you not use echo at compile time ? i mean it works, but there is no output anywhere...
10:26:46PMunchEcho on compile-time works just fine
10:27:08PMunchAnd it echos while you're compiling, so it might get bunched up with the hints and such
10:27:19PMunchAfter all I'm not really serialising the data, I'm just working directly with the JSON data structures..
10:27:41FromDiscord<Kiloneie> ah yeh, there it is hidden like hell
10:30:46FromDiscord<Kiloneie> it dissapears after recompilation of the same program
10:33:11*max22- quit (Remote host closed the connection)
10:33:51*max22- joined #nim
10:33:51PMunchYup, because Nim sees that you don't have to recompile and just skips it
10:37:25PMunchOkay Yardanico, Futhark now compiles Sciter
10:37:41PMunchTakes about half a minute on my machine to do the wrapping though
10:37:49PMunchAlthough most of that is in the JSON parsing stage
10:43:12FromDiscord<Yardanico> oh, interesting, will check later today! I assume I can save the output somewhere?
10:43:17FromDiscord<Yardanico> of the resulting Nim file
10:43:56PMunchIt does that automatically ;)
10:44:04PMunchBoth the JSON output and the Nim output
10:44:18PMunchIn the cache folder, and re-uses them if you don't change the options
10:58:52*stkrdknmibalz joined #nim
11:07:08PMunchOh man, the JSON output Opir spits out is so messy :P
11:19:59PMunchIs packedjson supposed to work at compile-time?
11:24:28FromDiscord<MrOkram> Hello, i'm trying to run NimScan on a really low powered device (Router with only 100MB of RAM and 2 core ARM CPU), and i keep running out of threads mid scan, any way to remedy this or should i just accept defeat ? https://media.discordapp.net/attachments/371759389889003532/898531768565641316/unknown.png
11:26:46PMunchTry to set the --threads option to NimScan?
11:30:20FromDiscord<MrOkram> Yup, tried it both off and on
11:30:33PMunchOff and on?
11:30:40PMunchIt is an option to control how many threads to use..
11:32:44FromDiscord<MrOkram> sent a code paste, see https://play.nim-lang.org/#ix=3BOc
11:32:52FromDiscord<MrOkram> (edit) "https://play.nim-lang.org/#ix=3BOc" => "https://play.nim-lang.org/#ix=3BOd"
11:33:46PMunchYeah that's not what I was talking about
11:33:53PMunchDoes it even build with --threads:off?
11:34:30FromDiscord<MrOkram> Surprisingly yes, it does, and it works, then runs out of "threads" again...
11:35:25PMunchAgain, try setting the --threads option to NimScan to something low, maybe even just set it to 1 to try
11:35:27FromDiscord<MrOkram> Correction, my mistake, it doesn't build with threads off
11:39:01PMunchAs I would have expected
11:39:21PMunchBut yeah, try to pass --threads to the program instead, specifying a low amount of threads
11:39:23FromDiscord<MrOkram> In reply to @PMunch "Again, try setting the": Damn, i missed that option totally, tried it now, with 1 thread set it still somehow runs out of threads to create..
11:41:09PMunchHmm, maybe you can't have more than one thread on your hardware? Sounds a bit weird
11:42:45FromDiscord<MrOkram> In reply to @PMunch "Hmm, maybe you can't": Well, it's a low end ADSL router, was happy it even worked to begin with \:)
11:42:52FromDiscord<Rika> Set it to zero and see if your computer implodes into a black hole
11:43:33PMunchYeah it's cool that you can even use Nim on it :)
11:43:58PMunchI mean you can use Nim on pretty much everything, but the fact that you could grab a random program and have it at least run is pretty cool
11:46:45FromDiscord<MrOkram> In reply to @Rika "Set it to zero": Happy to report that with 0 threads set it just does nothing, lmao
11:46:59FromDiscord<Rika> That’s hilarious
11:48:24PMunchYes it has a `for i in 1..maxThreads: threads.add ...` and then it runs `threads.join`
11:48:31PMunchSo with 0 threads it wouldn't do anything
11:48:54FromDiscord<MrOkram> Haha, amazing
11:49:06FromDiscord<enthus1ast> MrOkram is it really necessary to use threads for port scanning?
11:49:12FromDiscord<enthus1ast> why not use async for this?
11:49:51FromDiscord<MrOkram> Well, i just wanted a done solution tbh, something that i could just grab and run, didn't expect to run into these kinds of problems
11:50:53FromDiscord<MrOkram> Tbh, it still works, and it can do it's job, i'll just have to limit the port range to the one i need, not let it do a full port scan
11:52:15PMunchIt's a bit weird that it fails with that error though
11:52:27PMunchYou would think it starts all the threads first
11:52:53FromDiscord<Rika> Needs a “run on the main thread” option mapped to threads = 0
11:53:57*max22- quit (Ping timeout: 265 seconds)
12:06:02*supakeen quit (Quit: WeeChat 3.3)
12:06:55*supakeen joined #nim
12:14:55FromDiscord<enthus1ast> @MrOkram\: i hacked a async portscanner just for you
12:15:25FromDiscord<enthus1ast> https://play.nim-lang.org/#ix=3BOo
12:16:05FromDiscord<enthus1ast> it is a hack, though. Expect dragons
12:17:32FromDiscord<MrOkram> Thanks man! Really appreciate it !
12:21:03*Gustavo6046 quit (Read error: Connection reset by peer)
12:21:47*sagax quit (Quit: Konversation terminated!)
12:28:18FromDiscord<Yardanico> In reply to @MrOkram "Well, i just wanted": Do you need NimScan specifically?
12:28:32FromDiscord<Yardanico> I mean, if you want to do port scanning fast, almost nothing beats masscan
12:28:55FromDiscord<Yardanico> And it's async and doesn't use threads so it's pretty light on resources
12:29:03FromDiscord<Yardanico> That said it's written in C :)
12:29:34FromDiscord<MrOkram> Hmm, i might give it a shot, but doubt it'll work that well on 100MB of RAM \:)
12:30:07FromDiscord<Yardanico> It will
12:30:10FromDiscord<MrOkram> In reply to @Yardanico "Do you need NimScan": And nope, just something that'll scan a specific IP for open ports, and is lightweight so it can be used on embedded devices like routers and ONT's
12:30:47FromDiscord<Yardanico> yeah I think masscan should be good enough for you, I just hope you're not creating a botnet XD
12:30:47FromDiscord<enthus1ast> but you will not build a botnet right?
12:31:08FromDiscord<MrOkram> In reply to @enthus1ast "but you will not": I can't guarantee that
12:31:12FromDiscord<MrOkram> (edit) "In reply to @enthus1ast "but you will not": I can't guarantee that ... " added "\:)"
12:31:28FromDiscord<enthus1ast> botnets are fun and stuff, but think of the poor admins (like me) that have to clean the mess
12:31:48FromDiscord<enthus1ast> (and are too lazy and have no time, to patch everything ;) )
12:33:20PMunchAt this rate Nim will just be the #1 malware language :P
12:34:06FromDiscord<MrOkram> In reply to @PMunch "At this rate Nim": Well, Windows defender already doesn't like it... So i wouldn't be surprised honestly
12:35:19PMunchI mean I can see why people want to use it, it is a pretty nice language to write malware in I guess
12:35:43PMunchBut it's a shame if Windows will just block it for everyone else just trying to use it for less nefarious purposes..
12:36:22FromDiscord<enthus1ast> we need a "shikata ga nai" like encoder for the nim compiler
12:36:33FromDiscord<enthus1ast> so that there is nothing to pick up
12:37:52PMunchshikata ga nai?
12:40:59FromDiscord<enthus1ast> this is a shellcode encoder (build into metasploit framework) that did a good job to avoid antivirus detection
12:42:46PMunchAah, so it basically obfuscates the binary so that it no longer fingerprints as malware?
12:42:58FromDiscord<enthus1ast> yes
12:43:06PMunchThat's one way to ensure that Nim will be the #1 malware :P
12:43:42PMunchAh sweet, I think I have gotten the Discord Bot Bridge thing modified enough to work now :)
12:44:19FromDiscord<enthus1ast> well we already have term rewriting macros; and https://github.com/Yardanico/nim-strenc
12:45:00*rockcavera joined #nim
12:45:01*rockcavera quit (Changing host)
12:45:01*rockcavera joined #nim
12:45:31PMunchOh shit, that's true
12:46:29FromDiscord<enthus1ast> i can understand, malware writing is fun, (and half of my project folder is full of self written "malware") but i would never use them, it's just a hobby for me
12:46:51PMunchDamn, that Hint mention reminds me that I really want to have custom hints..
12:54:26*PMunch quit (Quit: Leaving)
12:55:09FromDiscord<enthus1ast> currently i clone the good old bifrost\:
12:55:16FromDiscord<enthus1ast> bifrostClone.png https://media.discordapp.net/attachments/371759389889003532/898554619658137640/bifrostClone.png
13:03:08*arkurious joined #nim
13:05:19*max22- joined #nim
13:37:49FromDiscord<qb> Do we got a cool cross platform hotkey library which doesn't requires the window focus?
13:40:27FromDiscord<enthus1ast> i've started to wrap libuihook, but its not finished
13:40:36FromDiscord<enthus1ast> only tested it on windows though
13:41:30FromDiscord<enthus1ast> maybe i can release it, could be already enough for your usecase
13:43:40FromDiscord<qb> just looking for some `if keypressed(foo):` which doesn't cares about the window focus 😛
13:44:04FromDiscord<qb> theres nothing done how it seems in x11
13:44:24FromDiscord<enthus1ast> libuihook can do this
13:44:28FromDiscord<enthus1ast> but its a c library
13:45:14nrds<Prestige99> I believe there are programs for x11 that can do it, unless you mean doing it for things _other_ than x11?
13:45:54FromDiscord<enthus1ast> @qb\: but as i said, its not done, i had troubles with the varargs
13:45:55FromDiscord<enthus1ast> https://gist.github.com/enthus1ast/2f9c16de5814636e2fdd983902e1f262
13:46:53FromDiscord<enthus1ast> https://github.com/kwhat/libuiohook
13:49:29FromDiscord<hugogranstrom> In reply to @qb "just looking for some": Keylogger? 🥴
13:49:43FromDiscord<Rika> thonkl
13:50:17FromDiscord<qb> 😄 are keyloggers still a thing in 2021
13:50:23FromDiscord<Rika> yes
13:51:22FromDiscord<qb> Well if I would write one I wouldn't focus on the smart linux guys
13:52:37FromDiscord<qb> https://tronche.com/gui/x/xlib/input/XQueryKeymap.html looks promising but seems like it isn't wrapped in the nim x11 wrappers
13:53:15FromDiscord<qb> nvm got it https://github.com/nim-lang/x11/blob/master/x11/xlib.nim#L1723
13:53:53nrds<Prestige99> https://github.com/baskerville/sxhkd might be useful to look into
14:02:38FromDiscord<jmgomez> sent a long message, see http://ix.io/3BPa
14:02:44*kayabaNerve quit (Ping timeout: 268 seconds)
14:04:37FromDiscord<juan_carlos> I think all yes (?), but some answers are kinda advanced.
14:07:12*kayabaNerve joined #nim
14:08:10FromDiscord<Rika> c++ classes in nim are still kinda funkyy
14:08:47FromDiscord<Rika> nim doesnt handle stuff that arent refs wrt. memory afaik
14:09:56FromDiscord<jmgomez> What do you mean with funky, can you be more specific? So, I guuess you could easily create the object in C++ and use it in Nim
14:09:58FromDiscord<./Network> Use sxhkd.
14:10:05FromDiscord<./Network> I use it with bspwm.
14:10:50*tinytoes is now known as tinystoat
14:14:16FromDiscord<Rika> In reply to @./Network "Use sxhkd.": who are you talking to
14:14:23FromDiscord<Rika> oh i missed the link
14:14:25FromDiscord<Rika> nevermind
14:16:28*kayabaNerve quit (Ping timeout: 252 seconds)
14:19:04FromDiscord<qb> In reply to @hugogranstrom.nim "Keylogger? 🥴": For the logs: https://play.nim-lang.org/#ix=3BPh
14:19:20FromDiscord<qb> In reply to @qb "just looking for some": For the logs: https://play.nim-lang.org/#ix=3BPh
14:23:13*kayabaNerve joined #nim
14:29:38*rockcavera quit (Remote host closed the connection)
15:04:09FromDiscord<treeform> Is there a way to get the path used for staticRead, both getProjectPath and currentSourcePath are not it?
15:06:13FromDiscord<enthus1ast> i think the path that getProjectPath returns changes when you wrap it in a template
15:06:47FromDiscord<treeform> I see that might be my issues.
15:06:58FromDiscord<treeform> I think I got it to work with currentSourcePath().parentDir ?
15:07:01FromDiscord<enthus1ast> i use this construct in nimja to get a path to the current executable dir
15:07:06FromDiscord<enthus1ast> https://github.com/enthus1ast/nimja/blob/master/src/nimja/sharedhelper.nim
15:07:30FromDiscord<treeform> thanks!
15:07:42FromDiscord<enthus1ast> [Edit](https://discord.com/channels/371759389889003530/371759389889003532/898587772275789906): i use this construct in nimja to get a path to the current ~~executable~~ script dir
15:19:11*Gustavo6046 joined #nim
15:22:32FromDiscord<Fancy> Hello
15:24:54FromDiscord<Fancy> I saw that nim had support for javascript, does it also have full support for the html canvas api?
15:24:58FromDiscord<tandy> sent a code paste, see https://play.nim-lang.org/#ix=3BPR
15:29:22FromDiscord<Rika> tandy: split that into other objects
15:29:44FromDiscord<Rika> artist object, music metadata object, group metadata, release metadata, services
15:29:45FromDiscord<Rika> etc
15:29:48FromDiscord<tandy> i cant↵(@Rika)
15:29:49FromDiscord<tandy> https://github.com/metabrainz/listenbrainz-server/blob/63826071c819aba376018e68985298a8af8bcb29/data/model/listen.py
15:29:55FromDiscord<tandy> im building a representation of this
15:30:22FromDiscord<Rika> what do you mean "cant"
15:30:29FromDiscord<Rika> are you interfacing with python
15:30:49FromDiscord<tandy> like i need to build json from the type↵(@Rika)
15:30:52FromDiscord<tandy> using jsony
15:31:10FromDiscord<tandy> so id rather not deviate from their representations for ease of development / maintainability
15:31:22FromDiscord<Rika> then break at 80 columns
15:31:25FromDiscord<Rika> (or less)
15:31:38FromDiscord<Rika> or 120, you choose
15:31:43FromDiscord<Rika> but no more than 120 i would say
16:09:16*Gustavo6046 quit (Ping timeout: 245 seconds)
16:11:56*Gustavo6046 joined #nim
16:16:24*max22- quit (Quit: Leaving)
16:16:45FromDiscord<tandy> hm ok il do that
16:21:18FromDiscord<tandy> `UserTimelineEventMetadata = Union[RecordingRecommendationMetadata, NotificationMetadata]`
16:21:23FromDiscord<tandy> is this possibel in nim ?
16:22:13FromDiscord<tandy> i know you can achieve something likethis by doing `object: RecordingRecommendationMetadata | NotificationMetadata`
16:25:58*SebastianM joined #nim
16:26:05FromDiscord<tandy> `UserTimelineEventMetadata = RecordingRecommendationMetadata | NotificationMetadata` this seems to work?
16:28:06FromDiscord<leorize> that's called a typeclass, it's a generic type at compile-time and cannot be used as a concrete type
16:28:29FromDiscord<leorize> in Nim you have to whip out case objects if you want a sum type
16:28:48FromDiscord<leorize> or if you feel experimental enough, you can use this\: https://github.com/alaviss/union
16:30:43SebastianMHey guys just downloaded nim 1.6 nightly from github and tried to compile fibonacci function with tcc. I get tcc: error: undefined symbol "fabs". With old nim version 1.3.7 it compiles and works with the same tcc. Is there a way to fix it somehow?
16:32:11FromDiscord<tandy> oh damn
16:36:31FromDiscord<tandy> sent a code paste, see https://play.nim-lang.org/#ix=3BQh
16:36:35FromDiscord<tandy> i get a nimsuggest warning if i do
16:40:26FromDiscord<leorize> they're exported if the type is exported
16:40:42FromDiscord<tandy> oh ofc
16:43:03FromDiscord<tandy> but even then i cant overwrite a field hmm
16:43:12FromDiscord<tandy> like so
16:43:15FromDiscord<tandy> sent a code paste, see https://play.nim-lang.org/#ix=3BQk
16:43:42FromDiscord<leorize> yea you gotta give them different names
16:45:10FromDiscord<tandy> `metadata: APIListen | APIFollowEvent | APINotificationEvent` this is a lot easier
16:45:55FromDiscord<leorize> you can use my union library if you're brave enough
16:45:58FromDiscord<leorize> it does exactly that
16:46:54FromDiscord<leorize> but yea, this should have been a language feature
16:49:11FromDiscord<tandy> i would if it wasnt for the fact that these are api bindings
16:49:14FromDiscord<tandy> might be a little overkill
16:49:30FromDiscord<tandy> agree, would make pythoninterop a lil easier
16:49:46FromDiscord<tandy> have you tried making an RFC?
16:51:30FromDiscord<leorize> I haven't, mainly due to a lack of time
16:51:59FromDiscord<tandy> fair, hope you can get round to it \:)
17:00:33*rockcavera joined #nim
17:00:33*rockcavera quit (Changing host)
17:00:33*rockcavera joined #nim
17:32:52NimEventerNew thread by DMisener: Nim access to OSX cut and paste buffer:, see https://forum.nim-lang.org/t/8504
17:40:41*SebastianM quit (Remote host closed the connection)
17:41:08*neurocyte0132889 joined #nim
17:41:08*neurocyte0132889 quit (Changing host)
17:41:08*neurocyte0132889 joined #nim
17:52:55NimEventerNew thread by Orlean: Question about procedure parameters, see https://forum.nim-lang.org/t/8505
18:05:11*neurocyte0132889 quit (Ping timeout: 264 seconds)
18:15:15*Zevv left #nim (#nim)
18:16:57NimEventerNew thread by Orlean: How to overload procedure correctly?, see https://forum.nim-lang.org/t/8506
18:50:52*Vladar quit (Quit: Leaving)
18:51:05NimEventerNew thread by Orlean: How to get n-th symbol of utf-8 string, see https://forum.nim-lang.org/t/8507
18:51:21FromDiscord<reilly> Say I have two enum types defined in the same file, and they both contain an enum with the same name. How can I, in another file, specify which enum type I want to refer to?
18:54:21FromDiscord<reilly> sent a code paste, see https://play.nim-lang.org/#ix=3BQT
19:00:00FromDiscord<haxscramper> I think you can do `module.EnumName.EnumField`
19:00:14FromDiscord<juan_carlos> Use the full name.
19:01:22*mahlon quit (Quit: PotatoTech)
19:02:14FromDiscord<treeform> In reply to @reilly "Say I have two": New version of nim will fix this. It will infer the enum you want. But that is not out yet. Use the full name. EnumOne.OptionB should work but you need to export EnumOne as well.
19:17:28FromDiscord<reilly> Neither `EnumName.EnumField` nor `module.EnumName.EnumField` work. Both fail to compile because, if I'm interpreting the message correctly, it's trying to treat `EnumName` like an object, and it doesn't have any field named `EnumField`.
19:20:36FromDiscord<reilly> Okay, looks like my problem was actually something a little weirder. Not sure exactly what, but I know how to make it go away.
19:28:13FromDiscord<reilly> sent a code paste, see https://play.nim-lang.org/#ix=3BR5
19:28:25FromDiscord<reilly> (edit) "https://play.nim-lang.org/#ix=3BR5" => "https://play.nim-lang.org/#ix=3BR6"
19:28:29FromDiscord<reilly> Accidentally pressed enter, oops. Edited.
19:28:54FromDiscord<reilly> (edit) "https://play.nim-lang.org/#ix=3BR6" => "https://play.nim-lang.org/#ix=3BR7"
19:30:21FromDiscord<reilly> It's not obvious to me what the issue is. The error isn't super helpful either.
19:43:53FromDiscord<tandy> oh nevermind, this doesnt compile
19:48:04FromDiscord<treeform> In reply to @reilly "Actually, what *is* going": you probably want ` igBegin("Hello, world!", flags = NoResize)`
19:48:12FromDiscord<tandy> [leorize](https://matrix.to/#/@leorize:envs.net)\: does union work with jsony?
19:58:50*rockcavera quit (Remote host closed the connection)
20:04:11FromDiscord<reilly> In reply to @treeform "you probably want `": Well, I'm trying to use that `gWindowF()` template as some syntax sugar, so I need to be able to pass in flags that way.
20:15:42FromDiscord<reilly> Apparently I just can't name the template argument `flags`.
20:19:04FromDiscord<Elegantbeef> Yea i assume you're doing `flags = flags` which the template will replace with it's `flags` parameters
20:19:24FromDiscord<Elegantbeef> Templates are dumb when it comes to symbol replacing
20:32:45FromDiscord<leorize> you might have to write a custom serializer
20:35:35FromDiscord<Elegantbeef> leorize do you have an `unpackIt` equivlent?
20:36:41FromDiscord<Elegantbeef> Just curious as it'd help the Nim -\> json side
20:36:55FromDiscord<Elegantbeef> also assume you remember what my unpackit did
20:36:55FromDiscord<leorize> not atm
20:37:07FromDiscord<leorize> please pr one \:)
20:37:33FromDiscord<leorize> I'm crunching nim-sys so it will take a bit before I can get back to union
20:37:47FromDiscord<leorize> there's still a lot of ergonomics that has to be solved \:(
20:38:11FromDiscord<Elegantbeef> Yea i may make the PR, but idk still trying to get the nimVM to work in wasm
21:21:01FromDiscord<tandy> Dam
21:43:53*stkrdknmibalz quit (Ping timeout: 264 seconds)
21:59:55*rockcavera joined #nim
21:59:56*rockcavera quit (Changing host)
21:59:56*rockcavera joined #nim
22:09:54nrds<Prestige99> Hey impbox, you around? Running into a weird issue with chipmunk's body userData property. I may have bound it incorrectly, or something. If you look here: https://git.einheit.tech/EinheitTechnologies/shade/src/branch/example/platformer/src/shadepkg/game/physicsbody.nim#L73
22:10:34nrds<Prestige99> I'm assigning it to the object's address, and want to use it later, but it seems that's actually unsafe (I believe the address must change)
22:10:56FromDiscord<impbox [ftsf]> Are they ref objects?
22:11:02nrds<Prestige99> Yes
22:11:08FromDiscord<impbox [ftsf]> refObj[].addr i think
22:11:24nrds<Prestige99> the parent here https://git.einheit.tech/EinheitTechnologies/shade/src/branch/example/platformer/src/shadepkg/game/physicsbody.nim#L107 is not nil, but when I try to access it, I get an illegal store access error
22:11:27FromDiscord<impbox [ftsf]> But I'm not 100% sure
22:11:27nrds<Prestige99> ok I'll try that
22:11:57nrds<Prestige99> ah same issue, yeah
22:15:05nrds<Prestige99> Wonder if this is a bug
22:23:31FromDiscord<Elegantbeef> Impbox i've found exactly where the NimVm feels like stop working!
22:23:34FromDiscord<Elegantbeef> Though it's fucking unclear how
22:28:56FromDiscord<impbox [ftsf]> \o/
22:29:02FromDiscord<impbox [ftsf]> Progress
22:32:17nrds<Prestige99> Not sure why the addr of the result would be different than the final object. It shouldn't change, right?
22:37:47nrds<Prestige99> Weird, even if I just take an instance of my ref object and echo repr myObj[].addr I get an illegal storage access error
22:57:23nrds<Prestige99> Narrowed it down. https://git.einheit.tech/EinheitTechnologies/shade/src/branch/example/platformer/examples/platformer/king.nim#L82 Adding either of these children to the result, triggers the illegal storage access error when trying to echo the addr of the result
22:57:31nrds<Prestige99> just not entirely sure why, yet
23:17:28*mahlon joined #nim
23:19:43FromDiscord<Elegantbeef> So interestingly it seems it's just `gcSafe` causing an issue
23:25:09FromDiscord<Elegantbeef> @impbox [ftsf]\: ehhh https://streamable.com/bqsa3w
23:26:35nrds<Prestige99> nice
23:26:58nrds<Prestige99> that's so cool
23:27:36FromDiscord<Elegantbeef> Indeed, some nice magic 🙂
23:29:01FromDiscord<impbox [ftsf]> Whee!
23:29:20FromDiscord<impbox [ftsf]> Afk atm but i take it it's working?
23:29:26FromDiscord<Elegantbeef> it oddly caused by annotating a proc with `closure`
23:29:28FromDiscord<Elegantbeef> Yep
23:29:39FromDiscord<impbox [ftsf]> In the nico code?
23:29:48FromDiscord<Elegantbeef> Nah in nimscripter
23:29:55FromDiscord<impbox [ftsf]> Interesting
23:30:17FromDiscord<impbox [ftsf]> So cool it works! Awesome work beef!
23:30:21FromDiscord<Elegantbeef> To be fair there isnt any reason to annotate it with closure but iirc it was annotated with closure in the VM
23:30:35FromDiscord<Elegantbeef> Thanks
23:33:22FromDiscord<Elegantbeef> Eventually i'll feel comfortable moving this to the master branch, but need to write tests and have the API solidified, personally I dont like having to do `isFile = false` so think i'm going to use a distinct for `NimScriptFile` and `NimScriptPath`