<< 06-03-2021 >>

00:20:25*Jesin quit (Quit: Leaving)
00:26:01*Jjp137 quit (Read error: No route to host)
00:26:33*Jjp137 joined #nim
00:29:58*Jesin joined #nim
00:46:41*Gustavo6046 quit (Ping timeout: 258 seconds)
00:54:13saemHi folks.
00:54:38FromDiscord<ElegantBeef> Yellow
00:54:55FromDiscord<Yardanico> fellow
00:55:06FromDiscord<ElegantBeef> nimion
00:55:27FromDiscord<Yardanico> #FFC200
00:55:40saemIn terms of figuring out what's being worked on in the compiler, I look at recent commits and PRs by various peeps. Making sense of it is challenging admittedly.
00:56:51FromDiscord<ElegantBeef> Hey yard i see you starred dusty, could i bother you to build it/run it to test the performance on your pc?
00:57:07FromDiscord<Yardanico> I couldn't actually run it
00:57:07FromDiscord<ElegantBeef> I need to track down why the one build i sent to someone was running at 40fps on a cpu better than mine
00:57:22FromDiscord<ElegantBeef> On linux?
00:57:36FromDiscord<ElegantBeef> Oh
00:57:39FromDiscord<ElegantBeef> Devel issue with nico
00:57:39FromDiscord<Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=2RPJ
00:57:43FromDiscord<Yardanico> classical
00:58:17FromDiscord<Yardanico> maybe
00:58:55FromDiscord<ElegantBeef> On my cpu i get > 150fps or around .005ms
00:58:58FromDiscord<Yardanico> is there any workaround?
00:59:03FromDiscord<ElegantBeef> Move to stable
00:59:14FromDiscord<Yardanico> anything other than that? :D
00:59:25FromDiscord<ElegantBeef> Devel caused the sdl2 inputs to completely break
00:59:31FromDiscord<Yardanico> and did you (I mean you and other nico people) figure out the commit?
00:59:31FromDiscord<ElegantBeef> I suppose i could ship a binary
00:59:33FromDiscord<Yardanico> that broke it
00:59:54FromDiscord<ElegantBeef> Well it seems like it's a commit related to enum/collisions
01:00:19FromDiscord<Yardanico> well if no one checks we'll get a stable release with broken nico :P
01:00:34FromDiscord<ElegantBeef> I did make an issue for impbox
01:00:43FromDiscord<ElegantBeef> But yea i'll take a whirl at finding it
01:02:06*Gustavo6046 joined #nim
01:02:44FromDiscord<Yardanico> nvm I can do it myself
01:02:48FromDiscord<Yardanico> the repro is pretty easy to do
01:02:59FromDiscord<ElegantBeef> Ok
01:03:28FromDiscord<Yardanico> wonder why nico defines its own sdl scancode enum if it uses sdl2_nim ?
01:03:35FromDiscord<Yardanico> its the same enum
01:03:38FromDiscord<ElegantBeef> probably js backend
01:03:46FromDiscord<Yardanico> oh okay
01:04:06FromDiscord<ElegantBeef> Which impbox plans on axing at some point so probably will die soon ๐Ÿ˜„
01:04:18FromDiscord<Yardanico> so on 1.4.4 everything works fine?
01:04:34FromDiscord<ElegantBeef> Yep
01:04:58FromDiscord<Yardanico> time to `git bisect`
01:05:22FromDiscord<Yardanico> https://media.discordapp.net/attachments/371759389889003532/817563473667686471/unknown.png
01:06:49PrestigeHm why can I not import exitprocs
01:06:58FromDiscord<Yardanico> std/exitprocs
01:06:59FromDiscord<ElegantBeef> `std`
01:07:08FromDiscord<Yardanico> newer stdlib modules only exist in the std namespace
01:07:13FromDiscord<ElegantBeef> Cmon prestige no importing system modules without `std`
01:07:16FromDiscord<Yardanico> also old ones can be improted with it too, so it's better to just start using std :)
01:07:21FromDiscord<Yardanico> (edit) "improted" => "imported"
01:07:28PrestigeShouldn't I not need to require it if it's in system?
01:07:43FromDiscord<Yardanico> it's not in system
01:07:54FromDiscord<Yardanico> there's https://nim-lang.org/docs/system.html#addQuitProc%2Cproc%29 but it's deprecated because you need to use std/exitprocs instead
01:09:00FromDiscord<ElegantBeef> Wonder if a "Hint: importing a system module without `std` is no longer suggested" would make life better
01:09:01PrestigeI see no indication in the docs that I need to do that, also import std/exitprocs still says it can't be found. Is this not available on stable?
01:09:13FromDiscord<Yardanico> what stable?
01:09:21Prestigelatest stable
01:09:30Prestige1.4.4
01:09:35FromDiscord<ElegantBeef> !eval import std/exitprocs
01:09:37NimBot<no output>
01:09:44FromDiscord<Yardanico> ๐Ÿฅด
01:10:00FromDiscord<Yardanico> @ElegantBeef here's your answer
01:10:04FromDiscord<Yardanico> 979148e863c4142a00632059f3e2a57f4ab0f960
01:10:15FromDiscord<Yardanico> https://github.com/nim-lang/Nim/pull/15935
01:10:16FromDiscord<ElegantBeef> !eval echo NimVersion
01:10:18NimBot1.4.4
01:10:32Prestigeweird, maybe a nimsuggest issue then. Getting errors from my editor, but it compiles
01:10:43FromDiscord<ElegantBeef> Remember the editor is not to be trusted
01:10:50FromDiscord<ElegantBeef> It's a liar attempting to backstab you
01:10:51Prestigeunfortunately..
01:11:07FromDiscord<Yardanico> maybe you have an older nimsuggest somehow?
01:11:17FromDiscord<ElegantBeef> Want to see good tooling failure open up a C# project and do `var event = 10`
01:11:18saemOr it's looking in the wrong place?
01:11:31FromDiscord<flywind> In reply to @Yardanico "979148e863c4142a00632059f3e2a57f4ab0f960": so the issue is https://github.com/nim-lang/Nim/issues/16462
01:11:37FromDiscord<Yardanico> @flywind yeah probably
01:11:41FromDiscord<Yardanico> but might be different
01:12:00FromDiscord<Yardanico> In our case the thing is that "except" in the import statement doesn't hide the type
01:12:20FromDiscord<flywind> I see
01:12:28FromDiscord<Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=2RPR
01:13:05*grobe0ba quit (Quit: ZNC 1.7.5 - https://znc.in)
01:13:17*grobe0ba joined #nim
01:13:29FromDiscord<Yardanico> I'll comment in that issue but it might be a different bug
01:13:47PrestigeApparently I was pointing to an older version of nimlsp I was debugging, seems good now
01:14:18FromDiscord<ElegantBeef> Ah so it wasnt the toolings fault it was the tools fault ๐Ÿ˜›
01:14:24Prestige:)
01:16:54FromDiscord<Yardanico> @ElegantBeef https://github.com/nim-lang/Nim/issues/16462#issuecomment-791825468
01:19:15FromDiscord<Yardanico> anyway @ElegantBeef you lied and there's a workaround :P https://media.discordapp.net/attachments/371759389889003532/817566965874163742/unknown.png
01:19:18FromDiscord<Yardanico> time to test dusty with devel
01:19:59FromDiscord<ElegantBeef> I did lie, i said use stable ๐Ÿ˜›
01:20:46FromDiscord<ElegantBeef> Averaged fps in the top and in console a frametime is printed
01:21:03FromDiscord<Yardanico> https://media.discordapp.net/attachments/371759389889003532/817567422146936852/unknown.png
01:21:04FromDiscord<Yardanico> yeah I see
01:21:13FromDiscord<ElegantBeef> Ok so works fine
01:21:16FromDiscord<Yardanico> https://media.discordapp.net/attachments/371759389889003532/817567469756874774/unknown.png
01:21:20FromDiscord<ElegantBeef> What's your CPU?
01:21:25FromDiscord<Yardanico> only uses 1 core though
01:21:31FromDiscord<Yardanico> Ryzen 7 3700X
01:21:46FromDiscord<ElegantBeef> The repo is setup to make 4 threads
01:22:11FromDiscord<ElegantBeef> It has to be using all 4 for that fps
01:22:16FromDiscord<Yardanico> but the cpu usage is at ~100%
01:22:18FromDiscord<Yardanico> not 400%
01:22:53FromDiscord<Yardanico> how do I change the thread count? I see `ThreadCount` but it has some alien math :D
01:22:59FromDiscord<ElegantBeef> Chunksize
01:23:04FromDiscord<ElegantBeef> A smaller base 8 value
01:23:10FromDiscord<Yardanico> 128?
01:23:11FromDiscord<ElegantBeef> welll base 2
01:23:14FromDiscord<ElegantBeef> Yea that'd work
01:23:43FromDiscord<ElegantBeef> That all should be calculated off threadsize but was hard coding it for testing math across different chunk sizes
01:23:43FromDiscord<Yardanico> yeah that works https://media.discordapp.net/attachments/371759389889003532/817568090639695912/unknown.png
01:23:47FromDiscord<Yardanico> also the fps becomes higher the more sand I have
01:23:49FromDiscord<Yardanico> XD
01:23:53FromDiscord<ElegantBeef> It's an average
01:24:01FromDiscord<Yardanico> now cpu is loaded at 1200%
01:24:09FromDiscord<Yardanico> https://media.discordapp.net/attachments/371759389889003532/817568196391337984/unknown.png
01:24:13FromDiscord<ElegantBeef> Nice
01:24:30FromDiscord<Yardanico> no key to clear? :P
01:24:33FromDiscord<ElegantBeef> enter
01:24:37FromDiscord<ElegantBeef> or c to erase
01:24:39FromDiscord<Yardanico> and in the terminal there's this https://media.discordapp.net/attachments/371759389889003532/817568325705007104/unknown.png
01:24:41FromDiscord<Yardanico> with full screen of sand
01:24:45FromDiscord<ElegantBeef> Nice
01:24:58FromDiscord<Yardanico> and with empty screen https://media.discordapp.net/attachments/371759389889003532/817568404055523328/unknown.png
01:25:01FromDiscord<Yardanico> i didn't lie when I said it's slower
01:25:14FromDiscord<ElegantBeef> That's weird
01:25:17FromDiscord<dom96> Ooh. You making a sand game?
01:25:19FromDiscord<ElegantBeef> Nah
01:25:30FromDiscord<ElegantBeef> Made a sand simulation to compete against a C++ programmer in another server ๐Ÿ˜„
01:25:48FromDiscord<Rika> petty
01:26:03FromDiscord<ElegantBeef> Nah i did it originally just for a small hour long challenge
01:26:03FromDiscord<Yardanico> https://media.discordapp.net/attachments/371759389889003532/817568675657678888/unknown.png
01:26:21FromDiscord<ElegantBeef> But then i learned he multithreaded it so i had to for fun
01:27:51FromDiscord<Yardanico> lets see if it gets faster with LTO PGO and march=native ๐Ÿฅด
01:27:59FromDiscord<ElegantBeef> Lol
01:28:11FromDiscord<ElegantBeef> My windows build was at like 50fps on his pc so clearly something is fucked
01:28:24FromDiscord<Yardanico> his CPU?
01:28:33FromDiscord<ElegantBeef> some i9 variant
01:28:38FromDiscord<ElegantBeef> So should be higher than mine
01:29:13FromDiscord<ElegantBeef> Even with only 8 threads being used
01:29:17*wasted_youth2 joined #nim
01:29:25FromDiscord<ElegantBeef> I did also send a 64 chunk size one which should've given more perf but barely any
01:29:56FromDiscord<Yardanico> oh yeah the debug PGO'd build is damn slow xD
01:30:03FromDiscord<Yardanico> (it's needed to actually generate the profiling data)
01:30:07FromDiscord<ElegantBeef> Yep
01:30:21FromDiscord<Yardanico> https://media.discordapp.net/attachments/371759389889003532/817569760061292584/unknown.png
01:30:56FromDiscord<Yardanico> winxp vibes https://media.discordapp.net/attachments/371759389889003532/817569905385537576/unknown.png
01:31:15FromDiscord<ElegantBeef> uhh
01:31:19FromDiscord<Yardanico> also sorry for asking such a personal question, but why do you use 1-space indentation in your .nimble file? :D
01:31:33FromDiscord<ElegantBeef> That was autogenerated by impbox
01:31:36FromDiscord<Yardanico> huh
01:31:51FromDiscord<ElegantBeef> Nicoboot autogenerates a nico project
01:31:55FromDiscord<Yardanico> I know
01:32:00FromDiscord<Yardanico> didn't know it was 1-space
01:33:05FromDiscord<Yardanico> yeah the FPS really grows
01:33:15FromDiscord<Yardanico> with an empty screen its at ~160-170, with a full one - ~220-230
01:33:33FromDiscord<ElegantBeef> Doesnt make any sense
01:33:45FromDiscord<Yardanico> ยฏ\_(ใƒ„)_/ยฏ
01:33:54FromDiscord<Yardanico> both the terminal and the app show that
01:33:55FromDiscord<Yardanico> so they're not lying
01:34:11FromDiscord<ElegantBeef> Well i could be mis calculating the frametime
01:34:20FromDiscord<Rika> inb4 reversed
01:34:34FromDiscord<ElegantBeef> Well it's clearly smooth just a question of how smooth ๐Ÿ˜›
01:34:54FromDiscord<Yardanico> smooth enough with my 16 threads :P
01:34:59FromDiscord<Yardanico> but I wouldn't want to see it run on a 2-core CPU
01:35:44FromDiscord<ElegantBeef> A 2 core cpu wouldnt even work with this algorithim
01:35:50FromDiscord<Yardanico> why?
01:36:12FromDiscord<ElegantBeef> Well it'd work but it wouldnt be ideal
01:36:15FromDiscord<Yardanico> yes
01:36:23FromDiscord<Yardanico> time to spend some time with powder toy
01:36:55FromDiscord<ElegantBeef> Basically you want threads equal to 1/4 the count of chunks
01:37:23FromDiscord<ElegantBeef> Since i checkboard them into a grid so that race conditions can only happen if particles fly at greater than half a chunk's width in a single iteration
01:38:07FromDiscord<ElegantBeef> Which is why thread count has that funky formula
01:41:47FromDiscord<ElegantBeef> Really i should use `cpuinfo` to get the perfect number of threads on startup
01:42:34FromDiscord<Yardanico> nonon
01:42:51FromDiscord<ElegantBeef> yesyesye
01:42:53FromDiscord<Yardanico> @ElegantBeef https://nim-lang.org/docs/osproc.html#countProcessors
01:43:05FromDiscord<Yardanico> ah right
01:43:09FromDiscord<Yardanico> cpuinfo is a module anyway
01:43:18FromDiscord<ElegantBeef> Yes that's what i meant
01:43:27FromDiscord<Yardanico> but does it return number of cores or threads?
01:43:36FromDiscord<ElegantBeef> well what you linked internally calls it
01:43:55FromDiscord<Yardanico> yes I just mean if the behaviour is the same across OSes
01:44:03FromDiscord<Yardanico> on linux for me it seems to return 16 correctly
01:44:14*njoseph quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
01:44:32FromDiscord<ElegantBeef> It seems like it's properly implemented
01:44:35*njoseph joined #nim
01:44:47FromDiscord<Yardanico> that's unheard of!
01:44:48FromDiscord<Yardanico> /s
01:45:17FromDiscord<Yardanico> what are hpux and irix :D https://media.discordapp.net/attachments/371759389889003532/817573516420841482/unknown.png
01:45:27FromDiscord<ElegantBeef> i dont even know those unix impls ๐Ÿ˜›
01:45:31FromDiscord<Yardanico> ah, HP-UX and SGI IRIX
01:45:39FromDiscord<Yardanico> https://en.wikipedia.org/wiki/IRIX final release in 2006
01:46:18FromDiscord<Yardanico> that code was added 7 years ago https://media.discordapp.net/attachments/371759389889003532/817573772554534912/unknown.png
01:56:34leorize[m]does nim even accept hp-ux as a target?
01:57:41FromDiscord<Yardanico> that's the only define for hpux that exists in the code base :D
01:58:30FromDiscord<Yardanico> it's not even in the OsPlatform list https://github.com/nim-lang/Nim/blob/devel/lib/system/platforms.nim#L40
02:09:48FromDiscord<ElegantBeef> @Yardanico well now the thread count is dynamically calculated
02:22:30*lritter quit (Ping timeout: 256 seconds)
02:23:07*lritter joined #nim
02:38:31FromDiscord<fenrave> are there any plans for threads:on to be the default
02:41:36leorize[m]yes, but it's deterred until orc is stabilized I think
02:42:10leorize[m]we will probably want Isolated[T] to be finalized also
02:46:30FromDiscord<impbox> looks like nim is adding `.exe` onto the end of `clang.exe:` eg. `--clang.exe:emcc`: results in `Requested command not found: \'emcc.exe -c -w`, is there a way to disable it trying to add .exe? emcc exists but emcc.exe does not
02:50:35leorize[m]are you on windows?
02:50:39FromDiscord<impbox> yep
02:51:08leorize[m]there's no way out, sadly
02:52:30leorize[m]what nim version are you using?
02:52:41FromDiscord<impbox> ahh i can specify emcc.bat and it'll use that
02:52:56FromDiscord<impbox> 1.4.0
02:53:31*krux02 quit (Remote host closed the connection)
02:53:35leorize[m]sure .bat works
03:02:23*theelous3 quit (Read error: Connection reset by peer)
03:15:02FromDiscord<impbox> in a compilation nims file eg. `nim c foo.nim` it looks at `foo.nims` for settings, is there a way I can get the string "foo" eg. I have a line `switch("passL", "-o foo.html --shell-file shell_minimal.html -s USE_SDL=2")` but i'd like the "foo.html" to use whatever the output name is. so if i do `nim c -o:bar foo.nim` it'll have ``switch("passL", "-o bar.html --shell-file shell_minimal.html -s USE_SDL=2")`
03:15:21FromDiscord<impbox> not sure where to find documentation for what's possible with these nims files if any exists
03:17:18leorize[m]wouldn't `-o` be passed by Nim?
03:18:19leorize[m]and there's std/compilesettings too if you need to get the value
03:20:34FromDiscord<impbox> hmm maybe. i'll try thanks
03:21:20FromDiscord<impbox> yes it does, thanks =)
03:32:35FromDiscord<impbox> hmm can you use a nimscript as nim.cfg?
03:33:24FromDiscord<impbox> for a whole directory rather than a single nim file
03:33:45leorize[m]config.nims is what you're looking for
03:34:05FromDiscord<impbox> ahh thank you
03:34:19FromDiscord<impbox> i had a feeling it existed
03:34:38FromDiscord<impbox> i feel like it should probably be documented in https://nim-lang.org/docs/nimc.html
03:36:34FromDiscord<exelotl> I think `projectName()` is what you're looking for r.e. getting the name of the main file
03:36:38FromDiscord<exelotl> https://nim-lang.org/docs/nimscript.html#projectName
03:37:07FromDiscord<impbox> @exelotl hmm perhaps, though i'm not sure what is considered to be a "project"
03:37:51FromDiscord<exelotl> I'm pretty sure it is just the "foo" in "nim c foo.nim"
03:38:50FromDiscord<impbox> @exelotl yep, you're correct
03:39:25FromDiscord<impbox> that works nicely, thanks
03:41:17FromDiscord<impbox> using both projectName and compileSettings I can get a nice default and allow overriding with -o
04:00:52*asdflkj quit (Ping timeout: 265 seconds)
04:22:42*spiderstew joined #nim
04:24:31*spiderstew_ quit (Ping timeout: 272 seconds)
04:32:35*Stephen[m]2 joined #nim
04:43:33*abm quit (Read error: Connection reset by peer)
06:04:49*vicfred quit (Quit: Leaving)
06:58:57*waleee-cl quit (Quit: Connection closed for inactivity)
07:07:32*lritter quit (Ping timeout: 256 seconds)
07:36:15*gpanders quit (Ping timeout: 268 seconds)
07:37:05*gpanders joined #nim
08:46:56*maier joined #nim
09:00:53*maier quit (Ping timeout: 256 seconds)
09:09:48*superbia joined #nim
10:36:11*krux02 joined #nim
10:47:21*Gustavo6046 quit (Ping timeout: 265 seconds)
11:03:36*blackpawn quit (Ping timeout: 240 seconds)
11:08:26*blackpawn joined #nim
11:08:44xaceproc foobar(): int = (_, result) = execCmdEx(...) # undecleared identifier '_' -- is there no way i can get it work like this?
11:14:27liblq-devyou can do `result = execCmdEx(โ€ฆ)[0]`
11:14:29liblq-dever, `[1]`
11:15:32xaceah, thats right, tyo
11:15:36m4r35n357OK, today's question, is there a way of emulating "void pointers" in nim to pass model-specific data to a general method? I've experimented with object types, but the model data object has to be defined in a separate file from the general method, and is invisible despite using an asteisk, and is invisible to the
11:15:56m4r35n357general method
11:16:22m4r35n357hoep that make some sense
11:20:24FromDiscord<Clyybber> @timotheecour Hey, you there?
11:29:27*maier joined #nim
11:42:11liblq-devm4r35n357: check out generics https://nim-lang.org/docs/manual.html#generics
11:45:41*johannes_ joined #nim
11:46:36*johannes_ is now known as kenran
11:51:06m4r35n357liblq-dev, the docslook a bit opaque to my inexperienced eyes, but I'll have a go . . . cheers
11:52:31liblq-devbasically it allows you to use any arbitrary type as a special kind of parameter to a procedure, another type, etc
11:52:41liblq-devit's similar to C++ templates although much simpler in execution
11:52:53m4r35n357hmm, everything I have tried, including putting [T] in declaration and formal parameter, leads to "Error: undeclared identifier: 'Parameters'"
11:53:35liblq-devcan you show me the code?
11:53:39m4r35n357liblq-dev, it sounds like what I need, but I can't make it fit with my code (I don't know any c++)
11:53:51m4r35n357liblq-dev, I can, let me think how to present it
11:54:16liblq-devalr i'm here to help
11:56:04m4r35n357I think it might take a couple of stages, first here is everything in one file: https://pastebin.com/YbVUfm1S
11:57:09liblq-devok, so what do you need to generic-ize here?
11:57:30m4r35n357the Parameters object (was a tuple before I started doing this bit) needs to be with the physical model, and the solve method needs to be in an "integrator" module
11:57:50m4r35n357the physical model is h(), uq(), up() plot()
11:57:57m4r35n357and the parameters, of course
11:58:45m4r35n357I can post some c that does the thing I want to achieve (this is a port of working code), if that would help
11:58:46liblq-devyeah, is there anything that prevents you from putting the solve proc in a separate file and importing it?
11:59:25liblq-devgenerally i'd split the code into 3 modules if you need that โ€“ physical_model.nim, integrator.nim, main.nim
11:59:29m4r35n357the solve method is general code that needs to be called from arbitrary models
11:59:45m4r35n357so it can't know anything about the nature of the parameters
12:00:24m4r35n357the solve in c is here: https://github.com/m4r35n357/ODE-Playground/blob/dual/dual.c
12:00:47m4r35n357and the model is here: https://github.com/m4r35n357/ODE-Playground/blob/dual/h-newton.c
12:01:06m4r35n357that is probably the best way to describe what I am trying to achieve
12:01:32FromDiscord<Rika> inb4 concepts time
12:01:34m4r35n357it is what a typical integrator package needs to do to support user-defined models
12:01:37liblq-devso you want Parameters to be any arbitrary user-supplied type?
12:01:49m4r35n357yep ;)
12:02:20liblq-dev`proc solve*[T](args: seq[string], p: var T, uq, up, output: proc(p: var T, _: float))`
12:02:26m4r35n357in c I use a void pointer in solve(), and cast back in the client (model) code
12:02:51liblq-devi merged the three `uq, up, output` procs into a single type because they all have the same signature (parameters are `var T, float`)
12:03:01liblq-devbut that's the general idea
12:03:17m4r35n357liblq-dev, OK cheers, I need to use my brain now ;)
12:03:21liblq-devthen you can pass any arbitrary type to the `p` parameter
12:03:32liblq-devand the compiler will "instantiate" the procedure with that type
12:03:46liblq-devwhich basically means re-writing it so that the actual type you pass in is used
12:04:37m4r35n357that sounds like what I need, I'll give it a go (for some reason cut 'n' paste doesn't work in xchat these days!)
12:16:43*maier quit (Ping timeout: 245 seconds)
12:20:21*kenran quit (Quit: leaving)
12:37:43m4r35n357liblq-dev, got a bit messy with my "current" code, so I went back to the code (all in one file) that I posted, and applied the signature you posted (needed to alter symplectic() too). Now I'm getting an indentation error . . . can't work out what I did wrong: https://pastebin.com/scfM1axZ
12:39:11m4r35n357here is the diff if that helps . . . https://pastebin.com/jraqqq0W
12:42:18m4r35n357liblq-dev, OK I see what I did ;)
12:42:54m4r35n357but after restoring the "=" I get: Error: typeless parameters are obsolete
12:43:08m4r35n357I will attempt to restore the parameters . . .
12:48:30liblq-devyou still need to give `up, uq` types
12:48:51liblq-devso `uq, up: proc (var T, _: float)`
12:49:08liblq-devyou can replace the _ with `h` since that's what you had previously
12:50:53m4r35n357I think I have done that, if I understand you meaning
12:51:41m4r35n357here is what I have now: https://pastebin.com/JwjQMk5s
12:52:49m4r35n357not sure what I am not doing
12:55:13liblq-devyeah that's what i meant
12:55:36m4r35n357so it should compile like that?
12:56:23m4r35n357the error message is a bit wordy, but it seems to not like the "plot" function parameter to solve()
12:58:13FromDiscord<shirleyquirk> first type mismatch at position: 5โ†ต required type for output: proc (p: var T, _: float){.closure.}โ†ต but expression 'plot' is of type: proc (p: Parameters, t: float){.gcsafe, locks: 0.}
12:58:14liblq-devwell, what's the error?
12:58:36liblq-dev`plot` accepts a `Parameters` instead of a `var Parameters`
12:58:54liblq-devyou need to change that
12:59:14m4r35n357yes, have just done that ;)
13:00:09m4r35n357but I don't think I have done it properly, as I am getting a compilation error . .
13:00:43m4r35n357liblq-dev, AHA! missing bracket
13:01:24m4r35n357liblq-dev, and now it works! I can put the stuff into module files now!
13:01:36m4r35n357thanks for the help
13:02:12liblq-devnp
13:02:52m4r35n357that was pretty hairy, I went into object types, ref objects etc, nice that it works with my tuple
13:04:42m4r35n357but now I have used generics in Nim for the first time so that is a good thing
13:15:31m4r35n357liblq-dev, just confirming that everything is now working with three files, the model calling a dual module and a symplectic module, nice! thx again for the help
13:15:48liblq-devcool to see that it works!
13:17:24m4r35n357yep, now I have example code in Nim for the future, for pretty much anything that needs operator overloading (the killer feature for me)
13:45:51*^Q-Master^ quit (Ping timeout: 246 seconds)
13:56:42*superbia quit (Quit: WeeChat 3.0)
14:03:43*j joined #nim
14:16:19*Q-Master joined #nim
14:21:12*Q-Master quit (Ping timeout: 246 seconds)
14:24:16*tane joined #nim
14:25:22xace`sorted(data, cmp = proc (a, b: mytipe): int { if formatTime(a.startTime) < formatTime(b.startTime): result = -1 elif formatTime(a.startTime) > formatTime(b.startTime): result = 1 else: result = 0 } )` # gives me got <int literal(-1)> but expected 'seq[mytype]', what am i doing wrong?
14:33:45*Q-Master joined #nim
14:38:23*D_ quit (Ping timeout: 245 seconds)
14:39:29*D_ joined #nim
14:44:05Oddmongeri have written a module, with a test function for it. So for testing, i have put test() in the module, but is it possible to execute ยซ test() ยป only if the source is called directly, and not as a module ?
14:44:21*Vladar joined #nim
14:46:01xacehttps://play.nim-lang.org/#ix=2RT4 here is an easier example of my problem. how do I get the sorted() function working? i need to call my own lambda function because the actual data needs to be pre-processed before the comparison is made
14:48:05leorize[m]xace: remove the curly braces
14:48:39Oddmongerto be clearer,with Lua i would do like that: if not package.loaded[modname] then โ€ฆ (with modname got from arg[0] )
14:48:44leorize[m]though I wouldn't recommend `sorted()` unless you need a copy
14:49:20leorize[m]Oddmonger: `when isMainModule: test()`?
14:49:28xaceleorize[m]: my only requirement is that i can "reformat". if you have a better suggestion than sorted i'd be happy yo switch
14:50:17Oddmongerreally, isMainModule exists ?! Whoo, thank you leorize[m] !
14:51:08leorize[m]xace: wdym by "reformat"?
14:51:23Oddmongeri was searching in nim pragmas something like ยซ {.isMain.} ยป
14:51:45leorize[m]xace: `sort()` is the mutable variant of `sorted()` that works directly on the buffer, which will save you some allocations
14:52:20*j quit (Quit: K-Lined)
14:52:41*j joined #nim
14:53:29xaceleorize[m]: from what i can tell `sort()` doesnt allow my to pass on my own comparison function. I need my comparisong function to run formatTime() on the input paramters
14:53:45leorize[m]you need to transform the array?
14:54:11xaceleorize[m]: well only for the comparison, but then i need the data back in its current form
14:54:47leorize[m]https://nim-lang.org/docs/algorithm.html#sort%2CopenArray%5BT%5D%2Cproc%28T%2CT%29 <- it does take a proc
14:55:13*jess quit (Quit: K-Lined)
14:55:41xacejesus, ive been browsing that page for a while and still didnt run into that variant for sort
15:19:00ForumUpdaterBotNew thread by SebastianM: How to embed objects in another objects, see https://forum.nim-lang.org/t/7584
15:54:22*xet7 joined #nim
16:06:19*asdflkj joined #nim
16:07:00*asdflkj quit (Client Quit)
16:19:36m4r35n357Any devs around? I have spt
16:19:41m4r35n357yuk!
16:20:20m4r35n357I have spotted what _looks like_ a compiler "oddity". Not sure if it is a bug or feature.
16:21:39leorize[m]what did you find?
16:21:46m4r35n357I have a function that was (mistakenly on my part) being called from a module I imported (I have now moved it).
16:22:36m4r35n357Not only should it not have been in scope (AFAICT), but it overrode a local "let" variable of the same name
16:23:26leorize[m]can you create a reproducible sample?
16:23:27m4r35n357The diff I made is at https://github.com/m4r35n357/ODE-Playground/commit/8f0d6e4f970ef2716f1b3dbcb2dfb4e36ef0943d
16:23:49m4r35n357you should be able to expand it to see the module function and the "let" variable
16:24:09m4r35n357expand symplectic.nim
16:24:31m4r35n357is that useful?
16:24:44*abm joined #nim
16:25:25leorize[m]so what's the issue?
16:25:26m4r35n357I moved a call to a function h(...) from symplectic.nim to h_newton.nim, where it belongs
16:25:41m4r35n357how was the function called previously?
16:26:06m4r35n357It is not defined in symplectic.nim, and in any case it has no asterisk appended
16:26:22m4r35n357and it overrides a local float with the same name
16:26:26leorize[m]generic binding I believe
16:26:56m4r35n357shouldn't the compiler have noticed the name clash?
16:27:22leorize[m]overloading triggered on this one
16:27:38leorize[m]it's quite normal
16:27:43m4r35n357BTW I am not an expert and "generic binding" is something I would have to look up
16:27:59m4r35n357so you can nuke local variables with impunity?
16:28:41leorize[m]!eval var a = 0; proc a(i: int): int = a; echo a(10); echo a
16:28:42NimBotCompile failed: /usercode/in.nim(1, 17) Error: redefinition of 'a'; previous declaration here: /usercode/in.nim(1, 5)
16:28:54leorize[m]hmm
16:30:22leorize[m]!eval var a = 0; proc a(i: int): int = i; echo a(10); echo a
16:30:23NimBotCompile failed: /usercode/in.nim(1, 17) Error: redefinition of 'a'; previous declaration here: /usercode/in.nim(1, 5)
16:31:19leorize[m]m4r35n357: the term is known as `mixin` in Nim's manual
16:32:03m4r35n357OK so it is a feature ;) Dangerous in the wrong hands (mine!)
16:32:05FromDiscord<Yardanico> Oh leorize this is a common gotcha with the eval
16:32:45FromDiscord<Yardanico> Ah I thought you wanted a proc
16:33:06FromDiscord<Yardanico> !eval var a = 0; let b = proc(i: int): int = (i); echo b(10); echo a
16:33:08NimBotCompile failed: /usercode/in.nim(1, 41) Error: expression 'i' is of type 'int' and has to be used (or discarded)
16:33:41leorize[m]I guess it didn't error in a generic due to template instantiation
16:33:46FromDiscord<Yardanico> !eval var a = 0; let b = proc(i: int): int = (result = i); echo b(10); echo a
16:33:48NimBotCompile failed: /usercode/in.nim(1, 59) Error: undeclared identifier: 'b'
16:34:51m4r35n357leorize[m], the function is not anything generic AFAICT, it is very literal. The only generic thing is one parameter, p
16:35:22m4r35n357p is a tuple
16:36:00*Gustavo6046 joined #nim
16:36:09FromDiscord<Yardanico> That makes it a generic :)
16:36:13leorize[m]it's not your function, it's about how generics is done in the compiler
16:36:35m4r35n357Dunno if this helps, but the local variable "h" is used correctly, despite sharing a name with the function
16:36:40leorize[m]I think generics still largely share the instantiation code with templates
16:36:43*xet7 quit (Remote host closed the connection)
16:37:05m4r35n357The code was 100% working before and after my "fix"
16:38:16leorize[m]which makes the `h` variable binds locally (gensym-ed), but `h` in a "function call" state become a mixin-able symbol
16:40:18m4r35n357The main issue from my POV is that it seems to break encapsulation (client code "leaking" into called module code). Am I just repeating myself now? ;)
16:40:54leorize[m]see `bind` in the manual
16:40:58m4r35n357OK
16:41:16leorize[m]which has the property of forced binding at the referenced scope
16:41:52leorize[m]you shouldn't need it most of the time though
16:43:55m4r35n357Well I certainly didn't need it here ;)
16:48:35m4r35n357I think that means that I don't have to use any parameters at all to call "outer level" functions, like f() from within a called module
16:48:56m4r35n357which will certainly shorten the parameter list for solve()
16:50:05leorize[m]yes, though concepts is intended to be the type checked variant for this
16:50:13m4r35n357the fact that this behaviour seems to be triggered by making an unrelated parameter generic is even more confusing to me
16:51:08m4r35n357but going back to the non-generic version to check is not going to help, because it was all in one file at the time
16:51:14leorize[m]in a way it can be classified รก a bug :p
16:51:22leorize[m]as*
16:52:17m4r35n357leorize[m], OK well since I don't fully understand the issue and have fixed it anyway, I'd better leave it now, thanks for looking at this for me
16:56:02m4r35n357OK I just tested one thing, I made a 0-parameter function test() in my calling code, and the compiler says it is undefined in symplectic. So h() is "special" somehow?
17:00:36*himu joined #nim
17:13:23leorize[m]yes, since it was referencing the generic parameter
17:23:46m4r35n357leorize[m], ah OK, I see
17:24:49*waleee-cl joined #nim
17:31:43FromDiscord<zidsal> I'm trying to generate a `$` proc for the types I generated with a macro. When I echo result.repr the returned result is valid nim code however when I run it I getโ†ต` Error: illformed AST: v: races` is there an easy way to debug this?
17:33:19*xet7 joined #nim
17:36:37leorize[m]use treeRepr
17:37:33leorize[m] post your tree somewhere and I can help taking a look at it
17:44:13FromDiscord<zidsal> @leorize https://pastebin.com/SUVTTHH5 I've made a super stripped down version I'm going make the nim code by hand and see what dumpTree looks like
17:47:10leorize[m]params has to be a list of identdefs
17:52:34*xet7 quit (Remote host closed the connection)
17:53:24*xet7 joined #nim
17:58:43*kenran joined #nim
17:59:17ForumUpdaterBotNew thread by Mrhdias: How to segment the code into different files? , see https://forum.nim-lang.org/t/7585
18:10:09FromDiscord<zidsal> @leorize thanks that did the trick
18:32:40FromDiscord<Clyybber> @Araq https://github.com/nim-lang/Nim/pull/17277 :)
18:42:31*j is now known as jess
18:54:02FromDiscord<Quant> I am a trader at a prop trading firm. some1 msg me if you can code and want to work on some algos
18:57:04FromDiscord<Recruit_main707> @Quant you may wanna create a forum thread, it will be easier to keep in contact and find people
19:16:20*vicfred joined #nim
19:25:22*himu quit (Quit: Konversation terminated!)
19:25:48*Perkol joined #nim
19:30:37*muffindrake joined #nim
19:41:29*kenran quit (Remote host closed the connection)
19:41:44*maier joined #nim
19:45:17FromDiscord<Recruit_main707> he left :(
19:48:01FromDiscord<Unaimend> So if I want that people get the latest version of my package I always have to create a new git tag and update my nimble file?
19:48:45FromDiscord<Unaimend> Would't that mean that I end up with tag numbers in the hundreds or am I missing sth?
19:49:09FromDiscord<Rika> That's what most software does I believe
19:49:23FromDiscord<Rika> Not abnormal to have hundreds of tags I think
19:54:38FromGitter<deech> How do I debug a macro that expands to an ill-typed AST? `expandMacros` doesn't work.
19:55:05leorize[m]add an echo result at the end? :p
19:55:22FromGitter<deech> In the macro?
19:55:26leorize[m]yea
19:55:28FromDiscord<konsumlamm> In reply to @Unaimend "Would't that mean that": just don't create a new tag for every small change ยฏ\_(ใƒ„)_/ยฏ
19:55:53FromDiscord<Unaimend> but then people would get an old version wouldnt they?
19:56:17leorize[m]@Unaimend what's the issue with hundreds of tags?
19:56:34FromDiscord<konsumlamm> In reply to @Unaimend "but then people would": can't they wait for the enxt update?
19:56:40leorize[m]it's not like they take up space or anything
19:56:50FromDiscord<Yardanico> yeah, tags are just named commits aren't they
19:56:57FromDiscord<konsumlamm> i'm just saying you don't need to make a new release for every commit or something like that
19:57:08leorize[m]you absolutely can :p
19:57:22leorize[m]see any of disruptek's software
19:57:35FromDiscord<Unaimend> In reply to @konsumlamm "i'm just saying you": Yeah sure, but especially at the beginning most of my changes are breaking changes ๐Ÿ™‚
19:57:56leorize[m]just go wild while you're not 1.0 yet
19:57:58FromGitter<deech> leorize, that worked.
19:58:08FromDiscord<konsumlamm> people can always use the github HEAD too, if they want the latest version
19:58:17leorize[m]never use that
19:58:28FromDiscord<Unaimend> In reply to @leorize "never use that": why not ?
19:58:43leorize[m]nimble don't understand that and you'll always get the outdated version while developing
19:59:11FromDiscord<konsumlamm> ๐Ÿค”
19:59:19FromDiscord<konsumlamm> RIP
19:59:25leorize[m]so nimble fetch this HEAD once, cache it
19:59:38FromDiscord<konsumlamm> sounds like a bug that should be fixed
19:59:49leorize[m]then never updates it
20:01:43FromDiscord<Unaimend> In reply to @konsumlamm "sounds like a bug": Yeah, I would agree
20:02:27leorize[m]it's simply impossible given the way nimble "installs" stuff rn
20:02:56leorize[m]you can of course use the much better nimph :p
20:13:21FromDiscord<Unaimend> so we have to package managers now?
20:13:39FromDiscord<Unaimend> if nimph is just better why are not officially using this one?
20:14:20FromDiscord<gcao> sent a code paste, see https://paste.rs/sFm
20:14:33FromDiscord<gcao> (edit) "https://play.nim-lang.org/#ix=2RVG" => "https://paste.rs/FVj"
20:15:15leorize[m]nim has that feature actually
20:15:38FromDiscord<gcao> really? let me compile and run it
20:16:13leorize[m]@Unaimend it never got the promotion it deserves: https://github.com/disruptek/nimph
20:16:23leorize[m]and ofc it doesn't help that it's creator is now banned
20:16:35leorize[m]@gcao well the syntax is a bit different, wait a bit
20:16:52FromDiscord<Unaimend> disruptek is banned?
20:17:11FromDiscord<Unaimend> This is the second guy from which I heard that he was banned
20:17:21*maier quit (Ping timeout: 264 seconds)
20:17:44FromDiscord<Unaimend> In reply to @leorize "<@287576619718279178> it never got": Do you know why he was banned?
20:18:42FromDiscord<Unaimend> In reply to @leorize "<@287576619718279178> it never got": Cant tag you in oftopic, so do you know why he was banned?
20:19:10leorize[m]personal insults at dom96 on Nim's public channels
20:19:20FromGitter<ynfle> @gcao https://play.nim-lang.org/#ix=2RVO
20:19:24FromDiscord<Unaimend> ahh ok, seems reasonable
20:19:39*lritter joined #nim
20:21:17leorize[m]@gcao https://play.nim-lang.org/#ix=2RVQ
20:21:45leorize[m]you can do it like ynfle if you want to cast from a pointer or smt
20:22:23FromDiscord<gcao> @yanfa @leorize thank you. that's great. I should be able to improve my code with this new knowledge ๐Ÿ˜„
20:23:49FromDiscord<Unaimend> is there anyway to incorporate git hub wiki and nim docs?
20:24:05FromDiscord<Unaimend> (edit) "is there anyway to incorporate git hub wiki and nim docs? ... " added "i.e how do you guys document your packages"
20:24:30*Perkol quit (Remote host closed the connection)
20:24:52leorize[m]I generate docs into github pages
20:25:31leorize[m]https://alaviss.github.io/nim-sys/ <- something like that
20:26:12leorize[m]https://github.com/alaviss/nim-sys/blob/master/.github/workflows/ci.yml#L76 <- here's the automation if you're interested
20:26:16FromDiscord<Unaimend> In reply to @leorize "https://alaviss.github.io/nim-sys/ <- something lik": But this is really fcking ugly
20:27:01leorize[m]you can write your own css and stuff
20:27:09FromDiscord<Unaimend> But I will still do it this way I think and then just add wiki pages for more elaborate example
20:27:11leorize[m]I'm lazy so I just use the default styles
20:28:38liblq-dev"ugly" doesn't necessarily have to refer to layout.
20:28:42liblq-dever, styling.
20:28:46FromDiscord<Unaimend> We should probably standardize so stuff ASAP, if not we will probably have 100 different solutions by NIM 2.0
20:28:56FromDiscord<Yardanico> AAAAAAAAAAAAAAAAAAAAAA
20:28:57leorize[m]you can also inquiry @haxscramper for his docgen once it's done, which IIRC should be more flexible and can help you produce markdown
20:28:58FromDiscord<Yardanico> WHY NIM
20:28:59liblq-devi'm pretty sure they're referring to the fact that theindex.html blows.
20:28:59FromDiscord<Yardanico> NIM
20:29:02FromDiscord<Yardanico> NEW INDENTED MODULA
20:29:03FromDiscord<Yardanico> AAAAAAAAAAAAAAAAAA
20:29:16liblq-devyard are you ok
20:29:24liblq-devshould i call an ambulance
20:29:25FromDiscord<Unaimend> I think there activated a trigger ๐Ÿ˜„
20:29:28FromDiscord<Yardanico> why do people scream NIM
20:29:30FromDiscord<Yardanico> NIIIIIIIIIIIIIIIIIIM
20:29:31leorize[m]@Unaimend you can't standardize when all of them sucks :p
20:29:58liblq-devah some people are just like that
20:30:00liblq-devi see people writing LUA all over the place
20:30:05FromDiscord<Yardanico> but why
20:30:08FromDiscord<Yardanico> they don't write PYTHON do they
20:30:13FromDiscord<Yardanico> JAVASCRIPTY
20:30:14FromDiscord<Yardanico> (edit) "JAVASCRIPTY" => "JAVASCRIPT"
20:30:15FromDiscord<Unaimend> nim deserves to be screamed so everybody knows about it
20:30:21FromDiscord<Unaimend> maybe i am from the COBOL age
20:31:15liblq-devlet's scream RUST and GO too
20:31:22liblq-devlet's do that to every single language out there
20:31:27liblq-deveven ENGLISH
20:31:53leorize[m]go's logo is GO so it seems appropriate
20:31:58FromDiscord<dom96> That is actually a good question
20:32:05FromDiscord<dom96> I often wonder why people write NIM
20:32:20FromDiscord<dom96> Guess because acronyms are typically 3 letters?
20:33:08leorize[m]maybe because it doesn't map into any commonly known english word so they thought it's an acronym?
20:33:10FromDiscord<Unaimend> I have actually now idea why mind wanted to press shift there
20:34:06FromDiscord<Unaimend> My is was like "My mind is telling me no, but my body, my body is telling me PRESS SHIFT"
20:34:12FromDiscord<Unaimend> (edit) "is" => "it"
20:35:01FromDiscord<Unaimend> In reply to @leorize "<@287576619718279178> you can't standardize": welcome to my live as a bioinformatician
20:35:42FromDiscord<Unaimend> we everything is "standardized" by consensus
20:35:57FromDiscord<Yardanico> that's better than nothing :P
20:36:00FromDiscord<Unaimend> (edit) "we" => "where"
20:36:14leorize[m]that's how it is done everywhere I believe
20:37:08FromDiscord<Unaimend> We cant have to much standards if we have no standards at all https://media.discordapp.net/attachments/371759389889003532/817858349659848754/4a5001b7beea096457f480c8808572428b-09-roll-safe.png
20:37:53FromDiscord<Unaimend> (edit) "much" => "many"
20:38:44FromDiscord<Unaimend> What would also be nice if my documentation could would actually be checked for errors automatically
20:39:14FromDiscord<Unaimend> (edit) "could" => "code"
20:39:39leorize[m]runnableExamples?
20:40:23FromDiscord<Yardanico> yep that exists
20:41:04FromDiscord<Unaimend> In reply to @Yardanico "yep that exists": So I probably should read the nim doc page
20:44:10FromDiscord<Unaimend> In reply to @leorize "runnableExamples?": is this documented somewhere?
20:44:53leorize[m]I'm not sure
20:45:00FromDiscord<konsumlamm> https://nim-lang.github.io/Nim/system.html#runnableExamples%2Cstring%2Cuntyped
20:45:23*maier joined #nim
20:45:36leorize[m]Nim has a documentation organization issue
20:46:27FromDiscord<Unaimend> Shouldnt this be mentioned in the Doc Gen Toolguide โ†ตhttps://nim-lang.org/docs/docgen.html
20:49:19FromDiscord<Unaimend> so not sure if this a good idea, but could I use includ to put each runnableExample in its own file . So my proc heads dont get cluttered with documentation?
20:49:58*maier quit (Ping timeout: 260 seconds)
20:50:45leorize[m]then you'll have to use yet another poorly documented feature which i would not recommend
20:51:09FromDiscord<konsumlamm> In reply to @Unaimend "Shouldnt this be mentioned": ye, probably
20:52:00FromDiscord<Unaimend> In reply to @leorize "then you'll have to": ๐Ÿ˜‚
20:52:03FromDiscord<konsumlamm> In reply to @Unaimend "so not sure if": you mean one file per proc? that doesn't sound like a scalable approach
20:52:14FromDiscord<Unaimend> In reply to @konsumlamm "you mean one file": yeah, thats true
20:52:45leorize[m]it's doable if you write it in reStructuredText
20:53:18FromDiscord<Unaimend> In reply to @leorize "it's doable if you": does this work with runnableExample?
20:53:51leorize[m]no, you need a special feature in Nim's code blocks directive
20:54:32FromDiscord<konsumlamm> your examples shouldn't be too big anyway, so i don't really see the problem
20:55:44FromDiscord<Unaimend> Yeah but it adds up and makes the file navigation a little bit more annoying I suppose.
20:56:57leorize[m]you need a text editor with folding support I guess
20:57:06FromDiscord<Unaimend> So would anybody be interested in writing a tutorial on how to properly document nim code and maybe also integrate it into git, I could do it alone but then it surely would take longer
20:57:18FromDiscord<Unaimend> In reply to @leorize "you need a text": I totally forgot that I have those things
20:57:39FromDiscord<Unaimend> Even added my nvim config so folding levels are saved
20:57:46FromDiscord<Unaimend> (edit) "added" => "edited"
21:01:15FromDiscord<konsumlamm> In reply to @Unaimend "So would anybody be": what does that have to do with git?
21:01:37FromDiscord<Unaimend> I mean the git workflow for automatic generating github pages documenation for packages
21:02:05FromDiscord<konsumlamm> ah, that's a nice idea
21:03:05FromDiscord<Unaimend> But I have never worked on all those things so I could use a little help
21:03:48*^Q-Master^ joined #nim
21:04:11*Q-Master quit (Read error: Connection reset by peer)
21:05:17*NimBot joined #nim
21:22:02*xet7 quit (Remote host closed the connection)
21:46:20*maier joined #nim
21:50:44*maier quit (Ping timeout: 260 seconds)
22:29:27FromDiscord<Hi02Hi> What happened to nimble.directory ? Im getting a 502
22:31:26FromDiscord<Yardanico> works fine for me
22:32:06FromDiscord<Yardanico> it's an unofficial (or semi-official) website though, you might want to ask federico3 if you have problems with it (he made it and hosts it)
22:33:00federico3Hi02Hi: 502 on a specific page?
22:33:30FromDiscord<Hi02Hi> wierd, its working now
22:34:27FromDiscord<Hi02Hi> it was the main page before
22:36:32federico3aha it restarted 11 mins ago
22:53:06FromDiscord<ajusa> Anyone know what I'm doing wrong here? First time using async/await in Nim: https://play.nim-lang.org/#ix=2RWO
22:55:37FromDiscord<Solitude> await works only in {.async.} procedures
22:55:38FromDiscord<Solitude> https://nim-lang.org/docs/asyncnet.html#examples-chat-server
22:55:48FromDiscord<Solitude> https://nim-lang.org/docs/asyncdispatch.html
22:58:40FromDiscord<ajusa> Cool, thanks! I wrapped everything in a `main` proc, and called waitFor on it which should be what I need!
22:59:01FromDiscord<queersorceress> is there an existing package or module that implements a worker thread as a queue that i can perform inter-thread communication with? i'm not 100% clear if that fits inside of nim's threading model or not, as the docs don't really click with me. it looks like the `taskqueue` and `threadproxy` packages might do what i'm looking for, but it doesn't seem all that clear to me.
23:01:53FromDiscord<queersorceress> this is slightly complicated as i'm working in an environment where i don't control the threads i'm on, so i need to dispatch work to a single worker thread to safely perform certain types of operations (like file i/o) while i wait for the results, using a queue seems like the easiest way but i'm not sure i see any existing solutions -- as i really don't want to implement this myself.
23:09:37*maier joined #nim
23:13:00*maier quit (Client Quit)
23:13:56*robertmeta quit (Ping timeout: 240 seconds)
23:13:56*sirn quit (Ping timeout: 240 seconds)
23:16:00*robertmeta joined #nim
23:16:06*sirn joined #nim
23:16:38*vicfred quit (Quit: Leaving)
23:33:40PrestigeHas anyone tried making a treesitter grammar for Nim? I'm not see anything, at least
23:41:05*tane quit (Quit: Leaving)
23:48:33FromDiscord<Unaimend> So what is the recommend nim ui framework at the moment?
23:49:04FromDiscord<konsumlamm> bold of you to assume there is one /s
23:53:18FromDiscord<Unaimend> In reply to @konsumlamm "bold of you to": So I plan on writing a program to draw graphs(as defined in graph theory, not real analysis)
23:54:30FromDiscord<konsumlamm> son't ask me, idk shit about ui frameworks
23:54:34FromDiscord<konsumlamm> don't
23:54:38*vicfred joined #nim
23:54:41FromDiscord<Unaimend> As far as is see there is fidget, nim-lang/ui or NiGui
23:54:54FromDiscord<Unaimend> but nim-lang/ui did not see any love for quite some time
23:55:07PrestigeThere are qt and gtk bindings
23:57:22FromDiscord<ElegantBeef> You also have plotting programs
23:57:23FromDiscord<ajusa> fidget is undergoing a v2 rewrite afaik, so you might want to wait on that (not sure if it has already started).โ†ตI've tried NiGui, and I liked it. It would probably be good for simpler GUI apps. If you want to make something that is super cross platform, then the qt bindings are pretty good
23:57:26FromDiscord<ElegantBeef> libraries
23:57:56*Jjp137 quit (Ping timeout: 240 seconds)
23:57:58FromDiscord<ElegantBeef> Ah i fell for the first use of the word graphs ๐Ÿ˜„