<< 29-04-2023 >>

00:02:02*Mister_Magister quit (Excess Flood)
00:03:18*Mister_Magister joined #nim
00:08:38*Mister_Magister quit (Excess Flood)
00:09:08*Mister_Magister joined #nim
00:09:41FromDiscord<Nlits (Ping on reply)> Is there any not half-broken RST packages/modules for nim?
00:15:33FromDiscord<Nlits (Ping on reply)> In reply to @Dudugz "Why? If you're talking": i use flask session, and it is entirely cookie based, so it lets the browser manage it instead of the backend having too
00:16:34FromDiscord<Dudugz> Hmm
00:17:18FromDiscord<Dudugz> So basically any user can overwrite session data, pretty smart -q
00:18:32FromDiscord<Nlits (Ping on reply)> In reply to @Dudugz "So basically any user": what do you mean overwrite? I mean it is cookie based, so it automatically gives a per-user, auto-expiring, secure data storage place
00:19:53FromDiscord<Dudugz> I mean what i mean, if the cookies are in the user's browser he can do whatever he wants with them, delete them, try to decrypt them to see the data and maybe modify them.
00:20:17*lucas_ta joined #nim
00:20:22FromDiscord<Dudugz> For simple things it's not a problem so I'm referring to data that the user shouldn't be able to manipulate.
00:20:40*lucasta quit (Ping timeout: 252 seconds)
00:21:21FromDiscord<Dudugz> Usually express-session creates a key in the cookies that will be used in the backend to get the user's session and session data.
00:23:56FromDiscord<Nlits (Ping on reply)> In reply to @Dudugz "I mean what i": Well, I mean, try to decrypt them. This issue is relevant for frontend and backend storage
00:24:46FromDiscord<Dudugz> No, the frontend does not have access to the backend data, the express session is fully handled in the API, the only thing that stays in the browser cookies is the session id
00:46:32*lucas_ta quit (Remote host closed the connection)
00:46:52*lucas_ta joined #nim
00:47:04*lucas_ta quit (Client Quit)
01:08:45*TakinOver quit (Ping timeout: 240 seconds)
01:11:28*rockcavera quit (Remote host closed the connection)
02:04:06*derpydoo joined #nim
03:16:48*beholders_eye quit (Ping timeout: 248 seconds)
04:56:45*arkurious quit (Quit: Leaving)
04:59:11*nyeaa492842301 quit (Quit: The Lounge - https://thelounge.chat)
05:00:17*nyeaa492842301 joined #nim
05:46:07*krydos quit (Write error: Broken pipe)
05:56:27NimEventerNew Nimble package! catppuccin - Catppuccin colors for nim., see https://github.com/catppuccin/nim
06:07:48FromDiscord<huantian> I wanna switch to catppuchin for my desktop theme at some point
06:07:48FromDiscord<huantian> Love me some pastel colors
06:07:48FromDiscord<huantian> And cute kitties
06:12:39FromDiscord<qb> sent a code paste, see https://play.nim-lang.org/#ix=4uvx
06:13:36NimEventerNew thread by kiakranthi: Can I download Nim on my iOS or Android device?, see https://forum.nim-lang.org/t/10143
06:23:00FromDiscord<Elegantbeef> Yea that's probably ideal↵(@qb)
06:23:25FromDiscord<Elegantbeef> You can technically also use `cast[ptr UncheckedArray[byte]](dst.addr).toOpenArray(0, sizeof(dst))`
06:43:32FromDiscord<Gumbercules> In reply to @Elegantbeef "You can technically also": Lol
06:44:28FromDiscord<Elegantbeef> Hey i'm not going to not say you can use an openarray
06:44:28FromDiscord<Elegantbeef> Strict aliasing be damned!
06:46:10FromDiscord<Gumbercules> Getting a bit long in the tooth is all
06:46:45FromDiscord<Elegantbeef> Yea i generally make a template that aliases `toOpenArray` to just `toOa`
06:47:55FromDiscord<Gumbercules> Not a bad idea. I wish the cast syntax was a bit less verbose but I suppose that can probably be solved in a similar fashion
06:48:49FromDiscord<Elegantbeef> Indeed `dst.castToPArr(byte).toOa(sizeof(dst))` is cooking with diesel
06:49:48FromDiscord<Elegantbeef> I guess that maybe should be `dst.addr` but I am envisioning an overload that takes a non pointer and gets `addr`
06:51:04*TakinOver joined #nim
07:00:04FromDiscord<Gabben> Is it written somewhere that ORC will not insert a cycle collector into non-cycle types?
07:01:30FromDiscord<Elegantbeef> Indeed
07:01:44FromDiscord<Elegantbeef> That's what `{.acyclic.}` is for
07:02:11FromDiscord<Elegantbeef> When you generate a type that can be cyclic but you're not using that way
07:07:30*FromDiscord quit (Remote host closed the connection)
07:07:42*FromDiscord joined #nim
07:08:45FromDiscord<Gabben> sent a code paste, see https://play.nim-lang.org/#ix=4uvE
07:10:29FromDiscord<Elegantbeef> It should not be there if it's not cyclical
07:10:43FromDiscord<Elegantbeef> For a non cyclical type it should be identical to `arc`
07:48:09*Notxor joined #nim
08:03:05*azimut joined #nim
08:40:34*xet7 joined #nim
08:52:30FromDiscord<Ecorous> finally got round to it <https://github.com/nim-lang/Nim/pull/21754>
09:39:43NimEventerNew thread by Cnerd: Ed25519 signing for nim, see https://forum.nim-lang.org/t/10144
09:45:00FromDiscord<planetis> Is there an easy way to get any performance measure about the execution of a macro?
11:05:08*derpydoo quit (Read error: Connection reset by peer)
11:09:15FromDiscord<nwb^3> i've just encountered some different behavior on windows/linux with a newAsyncSocket
11:09:30FromDiscord<nwb^3> i'm trying to bind an outgoing connection to an egress interface ip
11:09:42FromDiscord<nwb^3> this works in linux and not in windows, remote_socket.bindAddr(Port(0),"172.16.1.111")
11:09:48FromDiscord<nwb^3> im not sure why
11:10:07FromDiscord<nwb^3> similar code in python/powershell etc works fine in windows
11:10:29FromDiscord<nwb^3> anyone run into this before?
11:10:48FromDiscord<nwb^3> the exception msg on connect is pretty vague (Connection error: An invalid argument was supplied.)
11:13:37FromDiscord<nwb^3> ignore me ... i've just gone crazy i think
11:13:38FromDiscord<nwb^3> proc bindAddr(socket: Socket, port = Port(0), address = "") {.
11:17:46FromDiscord<nwb^3> nope issue still stands :/
12:07:29*mahlon quit (Ping timeout: 265 seconds)
12:11:49*Notxor_ joined #nim
12:15:00*Notxor quit (Remote host closed the connection)
12:15:00*xet7 quit (Ping timeout: 253 seconds)
12:18:09*def-- joined #nim
12:20:12*systemds1cks joined #nim
12:20:58*tanami_ joined #nim
12:31:13*Mister_Magister_ joined #nim
12:32:46*redj_ joined #nim
12:33:53FromDiscord<0xV01> sent a code paste, see https://play.nim-lang.org/#ix=4uwH
12:34:09*def- quit (Quit: -)
12:34:09*def-- is now known as def-
12:39:01*tanami quit (Ping timeout: 320 seconds)
12:39:24*systemdsucks quit (Ping timeout: 320 seconds)
12:40:11*Mister_Magister quit (Ping timeout: 305 seconds)
12:40:11*redj quit (Ping timeout: 305 seconds)
12:40:11*Mister_Magister_ is now known as Mister_Magister
12:42:11*lucasta joined #nim
12:44:47*mahlon joined #nim
12:49:14*redj_ is now known as redj
14:24:42*lucas_ta joined #nim
14:26:40*lucasta quit (Ping timeout: 248 seconds)
14:29:18*xet7 joined #nim
14:31:34*systemds1cks is now known as systemdsucks
14:45:56FromDiscord<ajusa> Are channels stable in Nim? It seems like https://github.com/nim-lang/threading/issues/24 implies they might still have bugs, and I noticed stuff like mummy uses deques with locks instead
14:49:41*junaid_ joined #nim
15:19:22*xet7 quit (Quit: Leaving)
15:34:58*azimut quit (Ping timeout: 240 seconds)
15:59:48FromDiscord<sOkam!> Is there a way to execute some code only once during compilation time, but ignore it otherwise?
16:00:43*junaid_ quit (Write error: Broken pipe)
16:03:14*arkurious joined #nim
16:09:26*arkurious quit (Quit: Leaving)
16:11:53FromDiscord<Chronos [She/Her]> In reply to @sOkam! "Is there a way": Why would it be executed multiple times?
16:26:50FromDiscord<sOkam!> In reply to @Hourglass, When the Hour Strikes "Why would it be": because runtime code is executed on every run?
16:27:23FromDiscord<Chronos [She/Her]> In reply to @sOkam! "because runtime code is": Ah okay I get you
16:27:55FromDiscord<Chronos [She/Her]> sent a code paste, see https://play.nim-lang.org/#ix=4uxJ
16:28:24FromDiscord<Chronos [She/Her]> Note that anything in the static block is ran in NimScript
16:32:39FromDiscord<sOkam!> ty, that's very helpful ✍️
16:38:58FromDiscord<Chronos [She/Her]> Of course ^^
16:58:29*azimut joined #nim
17:20:23FromDiscord<sOkam!> how do you execute nimscript inside a `static:` block though?
17:27:28FromDiscord<Yardanico> In reply to @sOkam! "how do you execute": NimScript is just the name for Nim that's run with the Nim VM
17:27:48FromDiscord<Yardanico> But it's not the best name actually
17:27:58FromDiscord<Yardanico> Since NimScript is exactly the subset of Nim that also has system/nimscript available for it
17:28:04FromDiscord<Yardanico> Can you just show your usecase?
17:30:14FromDiscord<sOkam!> In reply to @Yardanico "Can you just show": Running cargo from inside this file, to avoid needing a nimble task dedicated to it↵but `exec` is not available. neither is `withDir` or any other nimscript proc i tried https://media.discordapp.net/attachments/371759389889003532/1101923409811746888/compile.nim
17:30:31FromDiscord<Yardanico> look, let me explain
17:30:50FromDiscord<Yardanico> stuff that you run in .nims or .nimble is actually NimScript because it automatically imports system/nimscript
17:30:58FromDiscord<Yardanico> but stuff that you run with static/const is not nimscript, it doesn't have those available
17:31:03FromDiscord<Yardanico> but you can use some of the normal std/os procs
17:31:13FromDiscord<sOkam!> ic ty
17:31:28FromDiscord<Yardanico> <https://github.com/Yardanico/telenim/blob/master/examples/userbot.nim#L91>
17:31:45FromDiscord<Yardanico> you can use `gorgeEx` for compile-time
17:32:05FromDiscord<Yardanico> nowadays std/os' exec procs should also work, lemme check
17:33:02FromDiscord<sOkam!> how do you check for `-d:debug` or `-d:release` on nimble files or nimscript?↵seems like both are marked as false, so my checks for them are failing 🤔
17:33:48FromDiscord<Yardanico> In reply to @Yardanico "nowadays std/os' exec procs": yeah you can just use execCmdEx from std/osproc since it's hooked in VM
17:33:53FromDiscord<Yardanico> <https://github.com/nim-lang/Nim/blob/devel/compiler/vmops.nim#L335> the actual code that hooks it
17:34:05FromDiscord<Yardanico> In reply to @sOkam! "how do you check": there's no such thing as -d:debug
17:34:05FromDiscord<sOkam!> In reply to @Yardanico "yeah you can just": handy, ty ✍️
17:34:54FromDiscord<Yardanico> there's -d:release and -d:danger, -d:debug is not a thing in default Nim, it seems to be only used as a define for building the compiler in debug mode
17:34:58FromDiscord<sOkam!> well, its the same deal. how do you check for debug or release (even if -d:debug doesn't exist) from inside nims?
17:34:59FromDiscord<Yardanico> but it's not something that's a convention
17:35:17FromDiscord<Yardanico> In reply to @sOkam! "well, its the same": just check if it's defined?
17:35:56FromDiscord<sOkam!> you mean its failing because im checking for defined(debug)?
17:36:02FromDiscord<Yardanico> yes
17:36:07FromDiscord<Yardanico> there's no such default thing as -d:debug
17:36:08FromDiscord<sOkam!> ic, kk
17:36:13FromDiscord<Yardanico> this will just work in nims
17:36:14FromDiscord<Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=4uy0
17:36:35FromDiscord<Yardanico> release and danger are special defines, they're specifically handled by the compiler
17:36:49FromDiscord<Yardanico> but -d:debug is just a normal define, it's not actually implicitly added to nim programs if you're compiling in debug mode
17:37:00FromDiscord<Yardanico> so the usual way to check for debug is `when not defined(release)` in .nim code
17:38:53FromDiscord<sOkam!> makes sense. no wonder my code was failing
17:40:20*junaid_ joined #nim
18:05:17*junaid_ quit (Write error: Broken pipe)
18:14:09*xet7 joined #nim
18:26:01FromDiscord<sOkam!> sent a code paste, see https://play.nim-lang.org/#ix=4uy7
18:26:24FromDiscord<Yardanico> it should work, at least on devel
18:26:24FromDiscord<Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=4uy8
18:26:28FromDiscord<Yardanico> otherwise use gorgeEx I guess
18:26:31FromDiscord<sOkam!> (edit) "https://play.nim-lang.org/#ix=4uy7" => "https://play.nim-lang.org/#ix=4uy9"
18:26:40FromDiscord<sOkam!> yes, im on stable though
18:27:14FromDiscord<sOkam!> In reply to @Yardanico "otherwise use gorgeEx I": is that a pragma?
18:27:27FromDiscord<Yardanico> no, it's a proc
18:27:28FromDiscord<Yardanico> in system
18:27:34FromDiscord<sOkam!> kk
18:36:05*xet7 quit (Remote host closed the connection)
19:01:19FromDiscord<arkanoid> I need an idea on how to draw/rasterize a polygon on a 2d matrix (single channel image). Pixie would work well but it doesn't support single channel images, and using multi-channel a single channel would waste a lot of precious memory (I'm doing scientific simulation)
19:04:25FromDiscord<arkanoid> I need a very fast solution. I could surely wrap my own lib or rewrite pixie, but I was wondering if you know a good starting point for solving this problem with nim
19:06:44FromDiscord<arkanoid> I need to specify that I need a filled polygon, not just the border (stroke)
19:21:26*junaid_ joined #nim
19:32:24*Notxor_ quit (Remote host closed the connection)
19:34:33*Notxor joined #nim
19:37:22*lucas_ta quit (Remote host closed the connection)
19:41:13FromDiscord<kcvinker> sent a code paste, see https://paste.rs/7Ue
19:41:33FromDiscord<Yardanico> In reply to @kcvinker "Hi this is my": can you show the full code?
19:41:49FromDiscord<Yardanico> like where you actually call newFoo and baz
19:42:36FromDiscord<Yardanico> because maybe you're calling baz on a variable of type `Foo` that's not initialied with newFoo
19:42:54FromDiscord<Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=4uyr
19:43:11FromDiscord<kcvinker> @Yardanico Oh I see. Let me check
19:48:50FromDiscord<kcvinker> @Yardanico Yes, you were right. It worked.
19:49:06FromDiscord<kcvinker> Thank you @Yardanico
19:49:42*Notxor_ joined #nim
19:49:42*Notxor quit (Write error: Connection reset by peer)
19:56:53FromDiscord<sOkam!> sent a code paste, see https://play.nim-lang.org/#ix=4uyt
19:57:15FromDiscord<Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=4uyu
19:57:23FromDiscord<Yardanico> .nimble file isn't affected by your program configs since they're applied to the nim file
19:57:29FromDiscord<Yardanico> .nimble file is used for packaging
19:57:43FromDiscord<sOkam!> but im using nimble for my compilation setup
19:57:57FromDiscord<Yardanico> well, i don't think this is going to work
19:58:06FromDiscord<sOkam!> so i want it to run a debug build path when debug, and a release build when release
19:58:42FromDiscord<sOkam!> if it was just nim code, then it would be no issue. but it needs to build other things on release/debug too at the same time
19:59:23FromDiscord<sOkam!> is there no way to give nimble a --d:release flag by default, that can be accessed in the nimble file in some way?
20:09:56FromDiscord<Elegantbeef> Build by default does release
20:10:15FromDiscord<Elegantbeef> The nimble file doesnt get defines afaik
20:11:17FromDiscord<Yardanico> yes
20:19:48FromDiscord<sOkam!> how do i control the buildsystem from nimble then?
20:24:57FromDiscord<Yardanico> In reply to @sOkam! "how do i control": ||you don't||
20:25:00FromDiscord<Yardanico> (joke, I just don't know)
20:28:13FromDiscord<sOkam!> feels like a feature that should be in nimble, tbh 🤔
20:28:43FromDiscord<sOkam!> i guess i assumed its so basic, that i just got gigaconfused when it didn't work
20:28:59FromDiscord<Yardanico> nimble is mainly for dependency management, isn't it
20:29:13FromDiscord<Yardanico> why can't you just define different tasks in your nimble file that'd run the compiler with a define
20:29:21FromDiscord<Yardanico> and then do all the other config stuff based on those defines in nims
20:29:53FromDiscord<sOkam!> because i have like 10 examples, and doing that would require creating 30 tasks
20:30:24FromDiscord<sOkam!> and the 10 number will increase, as i keep evolving the lib with newer things from other tutorials or webgpu samples
20:30:56FromDiscord<Yardanico> In reply to @sOkam! "because i have like": why?
20:31:03FromDiscord<Yardanico> you can just have a task that'll compile all examples
20:31:12FromDiscord<Yardanico> what do you need to specify in the config anyway?
20:31:31FromDiscord<sOkam!> building wgpu with release or debug, and linking to the respective `.a` file
20:32:00FromDiscord<sOkam!> i figure if i can get a `static:` block to build wgpu, it would remove the issue 🤔
20:32:20FromDiscord<Yardanico> In reply to @sOkam! "building wgpu with release": but why do you need to even have that for each example specifically?
20:32:27FromDiscord<Yardanico> you can have one .nims file for all example files in a folder
20:32:38FromDiscord<Yardanico> just name it `config.nims` and place it in the same folder with all example nim files
20:32:45FromDiscord<Yardanico> it'll be applied to all nim files then
20:32:58FromDiscord<sOkam!> In reply to @Yardanico "but why do you": i don't have it separate for each example. but if i go the manually-defined release/debug separate tasks, then it would be like a mess
20:33:02FromDiscord<Yardanico> In reply to @sOkam! "i figure if i": using static for that would not be the greatest idea
20:33:11FromDiscord<Yardanico> In reply to @sOkam! "i don't have it": I still don't get the issue
20:33:12FromDiscord<Yardanico> look
20:33:22FromDiscord<sOkam!> In reply to @Yardanico "just name it `config.nims`": that's what i have, ye. unless im not quite getting what you mean
20:33:57FromDiscord<Yardanico> 1) Create a `config.nims` in your examples folder and write code for linking with either debug or release wgpu↵2) In Nimble, define two tasks - one for building examples in debug, other for release, and in those tasks just iterate over all .nim files in examples folder and build them
20:34:03FromDiscord<Yardanico> why would there be a mess because of this?
20:34:03FromDiscord<sOkam!> In reply to @Yardanico "using static for that": why not? wgpu needs to be compiled externally anyway, and the link pragmas expect the correct lib to exist
20:35:02*Jjp137 quit (Quit: Leaving)
20:35:06FromDiscord<sOkam!> In reply to @Yardanico "1) Create a `config.nims`": i believe i have #1↵but #2 means i would be forced to run all examples at once
20:35:48FromDiscord<Yardanico> In reply to @sOkam! "i believe i have": why?
20:35:59FromDiscord<Yardanico> why do you want to have a nimble task to _run_ examples?
20:36:16FromDiscord<sOkam!> how else do you run the examples?
20:36:28FromDiscord<Yardanico> you use nimble to just build them all, and then just run manually?
20:36:36FromDiscord<Yardanico> I just don't understand why do you want to run them directly from nimble
20:36:38FromDiscord<Yardanico> they're examples after all
20:36:50FromDiscord<Yardanico> they're meant to be tinkered with or copied by users of the library, why would you need a task to run all examples
20:37:01FromDiscord<sOkam!> i don't understand why not, if nimble also handles the buildsystem 🤔
20:37:25FromDiscord<Yardanico> i'm not talking about nimble itself, i'm just speaking from practicality perspective
20:37:28FromDiscord<sOkam!> not saying my appraoch is good. im just not understanding what you mean
20:37:43FromDiscord<Yardanico> In reply to @Yardanico "1) Create a `config.nims`": with this you just build all examples
20:37:49FromDiscord<Yardanico> and then what you have are all the binary compiled files
20:37:53FromDiscord<Yardanico> that you can just run manually to run the examples
20:37:59FromDiscord<Yardanico> so why would you need nimble tasks to run them
20:38:21FromDiscord<sOkam!> im not following what you mean tbh
20:38:25FromDiscord<Yardanico> I'm not either
20:38:54FromDiscord<sOkam!> the lib is here https://github.com/heysokam/wgpu if it helps seeing the actual usecase
20:38:55FromDiscord<Yardanico> as I understand, you want to have examples, and you want nimble to compile them automatically. I just described how you could do that. but why would you want nimble to automatically run the compiled binaries after compiling them?
20:39:32FromDiscord<Yardanico> okay, if you reaally want to do what you want, you can do it
20:39:33FromDiscord<sOkam!> In reply to @Yardanico "as I understand, you": the examples are just `nim c -r` for ergonomics
20:39:37FromDiscord<Yardanico> you need to remember one thing
20:40:04FromDiscord<Yardanico> `.nimble` files are just NimScript, and `task` is just a template defined by system/nimscript
20:40:08FromDiscord<Yardanico> you can just create tasks programmaticaly
20:40:09FromDiscord<Yardanico> (edit) "programmaticaly" => "programmatically"
20:40:28FromDiscord<Yardanico> for binName in xxx: task xxx
20:41:21FromDiscord<sOkam!> i thought of that, yeah. but i figured it was overkill if i could just give them simple names and depend on defines
20:41:42FromDiscord<Yardanico> but how would defines make it so you won't have to define 100 tasks if you have 100 examples?
20:41:57FromDiscord<sOkam!> i will try the static approach, since the library user that doesn't build an example will need it anyway 🤔
20:42:22FromDiscord<Yardanico> In reply to @sOkam! "i will try the": if you mean adding static in your library itself to auto-build wgpu - I don't think that's a good idea
20:42:36FromDiscord<Yardanico> it'll make it harder for users who want to build wgpu by themselves, via other build process
20:42:39FromDiscord<sOkam!> In reply to @Yardanico "but how would defines": because wgpu needs to be built with the correct flags, since its separate to nimble
20:42:40*junaid_ quit (Remote host closed the connection)
20:43:09FromDiscord<sOkam!> In reply to @Yardanico "it'll make it harder": they can fork and make it non-static
20:43:23FromDiscord<sOkam!> i don't want to support dynamic building, at least not currently
20:43:32FromDiscord<Yardanico> generally having a library that does external binary execution at compile-time sounds like a really weird idea
20:43:36FromDiscord<sOkam!> just like i prefer staticglfw over nimgl/glfw
20:44:03FromDiscord<Yardanico> In reply to @sOkam! "just like i prefer": yes, but that just uses nim itself for compiling C code
20:44:13FromDiscord<Yardanico> it doesn't do gorgeEx("gcc xxx")
20:44:17FromDiscord<sOkam!> i wish i could do just that, but wgpu is rust
20:45:10FromDiscord<Yardanico> also what about caching
20:45:25FromDiscord<sOkam!> wdym?
20:45:31*Jjp137 joined #nim
20:45:33FromDiscord<sOkam!> don't know much about it
20:46:58FromDiscord<Yardanico> In reply to @sOkam! "don't know much about": every time the user changes anything in any code that imports your library, your gorgeEx will run again
20:47:15*xet7 joined #nim
20:48:10FromDiscord<sOkam!> In reply to @Yardanico "every time the user": cargo has a chaching system, i think? even if you rerun it, it doesn't rebuild everything
20:48:23FromDiscord<Yardanico> yes, but it'll still get called and check if any files got modified and all that
20:48:39FromDiscord<Yardanico> but yeah, I digress, if you want it done that way, do it that way
20:48:39FromDiscord<sOkam!> that takes like less than a second in my crappy pc though
20:49:36FromDiscord<sOkam!> i understand the issue is the different lang, and linking static to it. but i can't think of a better solution without delegating the whole buildsystem setup to the user (which is not intuitive to do, even if doable)
20:50:03FromDiscord<sOkam!> the only good solution was if wgpu was written in C, but its rust
20:54:02FromDiscord<Elegantbeef> I have not used wgpu is there much reason to make it easy to use the debug version?
20:55:15FromDiscord<Elegantbeef> Worth noting one could use an environmental variable to get debug if they wanted
20:55:41FromDiscord<Elegantbeef> `WGPU_BUILD="debug" nimble build` is an ok compromise i'd say
21:00:53FromDiscord<sOkam!> In reply to @Elegantbeef "I have not used": backtraces on the static code are a big deal ye. at least from what i found so far
21:01:18FromDiscord<Yardanico> but are those a problem for a user of your wgpu binding?
21:01:24FromDiscord<Yardanico> i mean, what kind of errors we're talking about
21:01:42FromDiscord<Yardanico> it'd be extremely weird if wgpu would not return a proper error code and instead crash inside of its own code
21:03:15FromDiscord<sOkam!> i don't understand the lib enough to answer that
21:03:28FromDiscord<sOkam!> from my experience they are important. how much or how little... i have no idea yet
21:04:15FromDiscord<sOkam!> the lib does have a way to get error codes. but i also found the backtraces important at some points
21:05:03FromDiscord<Yardanico> but is there a reason you need debug mode for backtraces?
21:05:05FromDiscord<sOkam!> i would give you examples, but i don't remember them. golfish brain issues 🐠
21:05:12FromDiscord<Yardanico> they're just debug info that shouldn't incur any runtime cost
21:05:32FromDiscord<Yardanico> you can build a library in release mode with debugging info, that won't make it slower since stack traces are done natively through gdb etc
21:05:51FromDiscord<sOkam!> In reply to @Yardanico "but is there a": when i started building the lib i didn't have them, and all symbols were hiddne
21:06:02FromDiscord<sOkam!> (edit) "hiddne" => "hidden until i built debug"
21:06:08FromDiscord<Yardanico> yes, so you can probably just use some flags to build it in release mode with debug info enabled
21:06:17FromDiscord<sOkam!> (edit) "In reply to @Yardanico "but is there a": when i started building the lib i didn't have them, and all symbols were hidden ... until" added "in gdb"
21:07:10FromDiscord<Yardanico> but yeah, I don't know wgpu
21:07:51FromDiscord<sOkam!> all of this would be solved if nimble took defines from --d switches. i almost had it working, but i kept chasing a bug that turned out to be because of that
21:08:43FromDiscord<Yardanico> it should never take defines from -d switches in nims files
21:08:52FromDiscord<Yardanico> because it's supposed to be a layer above that
21:09:02FromDiscord<sOkam!> also, i figure nim devs agree with you on the not using static block for that usecase, since gorge is not executing any of the bash commands i give it inside that block
21:09:17FromDiscord<Yardanico> that's only because you're executing it incorrectly probably
21:09:22FromDiscord<Yardanico> it runs a binary, not a shell command
21:09:29FromDiscord<Yardanico> so to run a shell command you need to actually call the shell with the command
21:09:35FromDiscord<sOkam!> oh
21:11:03FromDiscord<sOkam!> sent a code paste, see https://play.nim-lang.org/#ix=4uyH
21:11:26FromDiscord<Yardanico> ?
21:11:32FromDiscord<Yardanico> yes
21:11:33FromDiscord<sOkam!> doesn't do anything
21:11:39FromDiscord<Yardanico> `man bash`
21:11:46FromDiscord<Yardanico> https://media.discordapp.net/attachments/371759389889003532/1101979158944420011/image.png
21:11:53FromDiscord<sOkam!> i tried with -c too
21:12:03FromDiscord<Yardanico> if you want it to output anything - of course it won't
21:12:07FromDiscord<Yardanico> since you're literally `discard`ing the output
21:12:33FromDiscord<Yardanico> gorgeEx returns the error code and the output
21:12:37FromDiscord<Yardanico> but you just `discard` it
21:12:41FromDiscord<sOkam!> oh it doesnt output to stdout by default with that? kk
21:13:00FromDiscord<Yardanico> obviously it doesn't, how would it be useful otherwise if you wanted to get some output from a command
21:13:20FromDiscord<sOkam!> ive never used gorge, so how could i know
21:13:29FromDiscord<Yardanico> you used execCmdEx that behaves the same
21:13:31FromDiscord<sOkam!> i've only used execShellCmd so far
21:13:41FromDiscord<sOkam!> and/or exec
21:14:02FromDiscord<sOkam!> execCmdEx failed
21:14:16FromDiscord<Yardanico> ?
21:14:37FromDiscord<Yardanico> also, playground down again
21:15:16FromDiscord<Yardanico> ah right, execCmdEx doesn't work on 1.6.12 in ct, that's why you said it failed
21:15:32FromDiscord<Yardanico> just use devel so you won't need to do any porting when 2.0 comes out
21:15:34FromDiscord<sOkam!> execShellCmd doesn't work either
21:16:44FromDiscord<sOkam!> In reply to @Yardanico "just use devel so": problem is that im already doing non-standard things, and I had mystery issues in the past that got fixed by `choosenim update devel`, so i don't want to be chasing double the amount of issues, since the code is so weird to begin with
21:16:53FromDiscord<Yardanico> yes, so just always use devel :P
21:17:01FromDiscord<Yardanico> In reply to @sOkam! "execShellCmd doesn't work either": you see, all those commands rely on using C APIs, that's why they don't work at compile-time
21:17:22FromDiscord<sOkam!> ic
21:17:33FromDiscord<Yardanico> gorgeEx was specifically made to be used on CT so it has special code handling in the compiler, and on devel execCmdEx is specifically handled by the VM in the vmops file I linked
21:17:50FromDiscord<sOkam!> makes sense
21:18:15FromDiscord<Elegantbeef> Something something NimVM + libffi here 😛
21:18:39FromDiscord<Yardanico> yeah i know that it exists
21:18:45FromDiscord<Yardanico> do you actually use nim compiled with libffi?
21:18:54FromDiscord<Elegantbeef> Nah
21:19:13FromDiscord<Yardanico> it's probably in the same ballpark as using .nimcfg file extension
21:19:41FromDiscord<Elegantbeef> I doubt anyone actually uses an libffi enabled compiler
21:19:49FromDiscord<Elegantbeef> Seems like it was mainly a timothee thing
21:20:17FromDiscord<Yardanico> yeah, that's why I mentioned .nimcfg, it's only ever used by coro.nimcfg in stdlib
21:20:25FromDiscord<Yardanico> github has no other files that are named .nimcfg
21:20:38FromDiscord<Yardanico> and yes, I checked all nimble packages too
21:35:12*Batzy_ is now known as Batzy
22:03:04*lucasta joined #nim
22:13:37*beholders_eye joined #nim
22:31:44*azimut quit (Ping timeout: 240 seconds)
22:33:18*Notxor_ quit (Remote host closed the connection)
23:02:58*xet7_ joined #nim
23:03:50*xet7_ quit (Remote host closed the connection)
23:03:55*xet7 quit (Quit: Leaving)
23:04:31*xet7 joined #nim
23:04:40*beholders_eye quit (Ping timeout: 252 seconds)
23:08:22*xet7 quit (Remote host closed the connection)
23:08:46*xet7 joined #nim
23:10:36*xet7 quit (Remote host closed the connection)
23:11:04*xet7 joined #nim
23:26:55FromDiscord<Chronos [She/Her]> I'm thinking of using nimkernel by dom as a base for my WASM OS idea honestly, i definitely won't complete it, but it'll be interesting to see if it can even work in theory
23:27:08FromDiscord<Chronos [She/Her]> It'll just suck to implement a file system :p
23:47:56FromDiscord<MasterAki> Does Nim's createDir support long path names when prefixed with "\\?\" ? I try but get this response: ↵↵Error: unhandled exception: The filename, directory name, or volume label syntax is incorrect.↵Additional info: \\? [OSError]
23:48:23FromDiscord<MasterAki> (edit) ""\\?\"" => ""\\\\?\""
23:51:34*jmdaemon joined #nim
23:54:59*xet7 quit (Remote host closed the connection)
23:57:06*mal`` quit (Quit: Leaving)