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:41 | FromDiscord | <Nlits (Ping on reply)> Is there any not half-broken RST packages/modules for nim? |
00:15:33 | FromDiscord | <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:34 | FromDiscord | <Dudugz> Hmm |
00:17:18 | FromDiscord | <Dudugz> So basically any user can overwrite session data, pretty smart -q |
00:18:32 | FromDiscord | <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:53 | FromDiscord | <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:22 | FromDiscord | <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:21 | FromDiscord | <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:56 | FromDiscord | <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:46 | FromDiscord | <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:27 | NimEventer | New Nimble package! catppuccin - Catppuccin colors for nim., see https://github.com/catppuccin/nim |
06:07:48 | FromDiscord | <huantian> I wanna switch to catppuchin for my desktop theme at some point |
06:07:48 | FromDiscord | <huantian> Love me some pastel colors |
06:07:48 | FromDiscord | <huantian> And cute kitties |
06:12:39 | FromDiscord | <qb> sent a code paste, see https://play.nim-lang.org/#ix=4uvx |
06:13:36 | NimEventer | New thread by kiakranthi: Can I download Nim on my iOS or Android device?, see https://forum.nim-lang.org/t/10143 |
06:23:00 | FromDiscord | <Elegantbeef> Yea that's probably ideal↵(@qb) |
06:23:25 | FromDiscord | <Elegantbeef> You can technically also use `cast[ptr UncheckedArray[byte]](dst.addr).toOpenArray(0, sizeof(dst))` |
06:43:32 | FromDiscord | <Gumbercules> In reply to @Elegantbeef "You can technically also": Lol |
06:44:28 | FromDiscord | <Elegantbeef> Hey i'm not going to not say you can use an openarray |
06:44:28 | FromDiscord | <Elegantbeef> Strict aliasing be damned! |
06:46:10 | FromDiscord | <Gumbercules> Getting a bit long in the tooth is all |
06:46:45 | FromDiscord | <Elegantbeef> Yea i generally make a template that aliases `toOpenArray` to just `toOa` |
06:47:55 | FromDiscord | <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:49 | FromDiscord | <Elegantbeef> Indeed `dst.castToPArr(byte).toOa(sizeof(dst))` is cooking with diesel |
06:49:48 | FromDiscord | <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:04 | FromDiscord | <Gabben> Is it written somewhere that ORC will not insert a cycle collector into non-cycle types? |
07:01:30 | FromDiscord | <Elegantbeef> Indeed |
07:01:44 | FromDiscord | <Elegantbeef> That's what `{.acyclic.}` is for |
07:02:11 | FromDiscord | <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:45 | FromDiscord | <Gabben> sent a code paste, see https://play.nim-lang.org/#ix=4uvE |
07:10:29 | FromDiscord | <Elegantbeef> It should not be there if it's not cyclical |
07:10:43 | FromDiscord | <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:30 | FromDiscord | <Ecorous> finally got round to it <https://github.com/nim-lang/Nim/pull/21754> |
09:39:43 | NimEventer | New thread by Cnerd: Ed25519 signing for nim, see https://forum.nim-lang.org/t/10144 |
09:45:00 | FromDiscord | <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:15 | FromDiscord | <nwb^3> i've just encountered some different behavior on windows/linux with a newAsyncSocket |
11:09:30 | FromDiscord | <nwb^3> i'm trying to bind an outgoing connection to an egress interface ip |
11:09:42 | FromDiscord | <nwb^3> this works in linux and not in windows, remote_socket.bindAddr(Port(0),"172.16.1.111") |
11:09:48 | FromDiscord | <nwb^3> im not sure why |
11:10:07 | FromDiscord | <nwb^3> similar code in python/powershell etc works fine in windows |
11:10:29 | FromDiscord | <nwb^3> anyone run into this before? |
11:10:48 | FromDiscord | <nwb^3> the exception msg on connect is pretty vague (Connection error: An invalid argument was supplied.) |
11:13:37 | FromDiscord | <nwb^3> ignore me ... i've just gone crazy i think |
11:13:38 | FromDiscord | <nwb^3> proc bindAddr(socket: Socket, port = Port(0), address = "") {. |
11:17:46 | FromDiscord | <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:53 | FromDiscord | <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:56 | FromDiscord | <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:48 | FromDiscord | <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:53 | FromDiscord | <Chronos [She/Her]> In reply to @sOkam! "Is there a way": Why would it be executed multiple times? |
16:26:50 | FromDiscord | <sOkam!> In reply to @Hourglass, When the Hour Strikes "Why would it be": because runtime code is executed on every run? |
16:27:23 | FromDiscord | <Chronos [She/Her]> In reply to @sOkam! "because runtime code is": Ah okay I get you |
16:27:55 | FromDiscord | <Chronos [She/Her]> sent a code paste, see https://play.nim-lang.org/#ix=4uxJ |
16:28:24 | FromDiscord | <Chronos [She/Her]> Note that anything in the static block is ran in NimScript |
16:32:39 | FromDiscord | <sOkam!> ty, that's very helpful ✍️ |
16:38:58 | FromDiscord | <Chronos [She/Her]> Of course ^^ |
16:58:29 | * | azimut joined #nim |
17:20:23 | FromDiscord | <sOkam!> how do you execute nimscript inside a `static:` block though? |
17:27:28 | FromDiscord | <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:48 | FromDiscord | <Yardanico> But it's not the best name actually |
17:27:58 | FromDiscord | <Yardanico> Since NimScript is exactly the subset of Nim that also has system/nimscript available for it |
17:28:04 | FromDiscord | <Yardanico> Can you just show your usecase? |
17:30:14 | FromDiscord | <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:31 | FromDiscord | <Yardanico> look, let me explain |
17:30:50 | FromDiscord | <Yardanico> stuff that you run in .nims or .nimble is actually NimScript because it automatically imports system/nimscript |
17:30:58 | FromDiscord | <Yardanico> but stuff that you run with static/const is not nimscript, it doesn't have those available |
17:31:03 | FromDiscord | <Yardanico> but you can use some of the normal std/os procs |
17:31:13 | FromDiscord | <sOkam!> ic ty |
17:31:28 | FromDiscord | <Yardanico> <https://github.com/Yardanico/telenim/blob/master/examples/userbot.nim#L91> |
17:31:45 | FromDiscord | <Yardanico> you can use `gorgeEx` for compile-time |
17:32:05 | FromDiscord | <Yardanico> nowadays std/os' exec procs should also work, lemme check |
17:33:02 | FromDiscord | <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:48 | FromDiscord | <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:53 | FromDiscord | <Yardanico> <https://github.com/nim-lang/Nim/blob/devel/compiler/vmops.nim#L335> the actual code that hooks it |
17:34:05 | FromDiscord | <Yardanico> In reply to @sOkam! "how do you check": there's no such thing as -d:debug |
17:34:05 | FromDiscord | <sOkam!> In reply to @Yardanico "yeah you can just": handy, ty ✍️ |
17:34:54 | FromDiscord | <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:58 | FromDiscord | <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:59 | FromDiscord | <Yardanico> but it's not something that's a convention |
17:35:17 | FromDiscord | <Yardanico> In reply to @sOkam! "well, its the same": just check if it's defined? |
17:35:56 | FromDiscord | <sOkam!> you mean its failing because im checking for defined(debug)? |
17:36:02 | FromDiscord | <Yardanico> yes |
17:36:07 | FromDiscord | <Yardanico> there's no such default thing as -d:debug |
17:36:08 | FromDiscord | <sOkam!> ic, kk |
17:36:13 | FromDiscord | <Yardanico> this will just work in nims |
17:36:14 | FromDiscord | <Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=4uy0 |
17:36:35 | FromDiscord | <Yardanico> release and danger are special defines, they're specifically handled by the compiler |
17:36:49 | FromDiscord | <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:00 | FromDiscord | <Yardanico> so the usual way to check for debug is `when not defined(release)` in .nim code |
17:38:53 | FromDiscord | <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:01 | FromDiscord | <sOkam!> sent a code paste, see https://play.nim-lang.org/#ix=4uy7 |
18:26:24 | FromDiscord | <Yardanico> it should work, at least on devel |
18:26:24 | FromDiscord | <Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=4uy8 |
18:26:28 | FromDiscord | <Yardanico> otherwise use gorgeEx I guess |
18:26:31 | FromDiscord | <sOkam!> (edit) "https://play.nim-lang.org/#ix=4uy7" => "https://play.nim-lang.org/#ix=4uy9" |
18:26:40 | FromDiscord | <sOkam!> yes, im on stable though |
18:27:14 | FromDiscord | <sOkam!> In reply to @Yardanico "otherwise use gorgeEx I": is that a pragma? |
18:27:27 | FromDiscord | <Yardanico> no, it's a proc |
18:27:28 | FromDiscord | <Yardanico> in system |
18:27:34 | FromDiscord | <sOkam!> kk |
18:36:05 | * | xet7 quit (Remote host closed the connection) |
19:01:19 | FromDiscord | <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:25 | FromDiscord | <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:44 | FromDiscord | <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:13 | FromDiscord | <kcvinker> sent a code paste, see https://paste.rs/7Ue |
19:41:33 | FromDiscord | <Yardanico> In reply to @kcvinker "Hi this is my": can you show the full code? |
19:41:49 | FromDiscord | <Yardanico> like where you actually call newFoo and baz |
19:42:36 | FromDiscord | <Yardanico> because maybe you're calling baz on a variable of type `Foo` that's not initialied with newFoo |
19:42:54 | FromDiscord | <Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=4uyr |
19:43:11 | FromDiscord | <kcvinker> @Yardanico Oh I see. Let me check |
19:48:50 | FromDiscord | <kcvinker> @Yardanico Yes, you were right. It worked. |
19:49:06 | FromDiscord | <kcvinker> Thank you @Yardanico |
19:49:42 | * | Notxor_ joined #nim |
19:49:42 | * | Notxor quit (Write error: Connection reset by peer) |
19:56:53 | FromDiscord | <sOkam!> sent a code paste, see https://play.nim-lang.org/#ix=4uyt |
19:57:15 | FromDiscord | <Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=4uyu |
19:57:23 | FromDiscord | <Yardanico> .nimble file isn't affected by your program configs since they're applied to the nim file |
19:57:29 | FromDiscord | <Yardanico> .nimble file is used for packaging |
19:57:43 | FromDiscord | <sOkam!> but im using nimble for my compilation setup |
19:57:57 | FromDiscord | <Yardanico> well, i don't think this is going to work |
19:58:06 | FromDiscord | <sOkam!> so i want it to run a debug build path when debug, and a release build when release |
19:58:42 | FromDiscord | <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:23 | FromDiscord | <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:56 | FromDiscord | <Elegantbeef> Build by default does release |
20:10:15 | FromDiscord | <Elegantbeef> The nimble file doesnt get defines afaik |
20:11:17 | FromDiscord | <Yardanico> yes |
20:19:48 | FromDiscord | <sOkam!> how do i control the buildsystem from nimble then? |
20:24:57 | FromDiscord | <Yardanico> In reply to @sOkam! "how do i control": ||you don't|| |
20:25:00 | FromDiscord | <Yardanico> (joke, I just don't know) |
20:28:13 | FromDiscord | <sOkam!> feels like a feature that should be in nimble, tbh 🤔 |
20:28:43 | FromDiscord | <sOkam!> i guess i assumed its so basic, that i just got gigaconfused when it didn't work |
20:28:59 | FromDiscord | <Yardanico> nimble is mainly for dependency management, isn't it |
20:29:13 | FromDiscord | <Yardanico> why can't you just define different tasks in your nimble file that'd run the compiler with a define |
20:29:21 | FromDiscord | <Yardanico> and then do all the other config stuff based on those defines in nims |
20:29:53 | FromDiscord | <sOkam!> because i have like 10 examples, and doing that would require creating 30 tasks |
20:30:24 | FromDiscord | <sOkam!> and the 10 number will increase, as i keep evolving the lib with newer things from other tutorials or webgpu samples |
20:30:56 | FromDiscord | <Yardanico> In reply to @sOkam! "because i have like": why? |
20:31:03 | FromDiscord | <Yardanico> you can just have a task that'll compile all examples |
20:31:12 | FromDiscord | <Yardanico> what do you need to specify in the config anyway? |
20:31:31 | FromDiscord | <sOkam!> building wgpu with release or debug, and linking to the respective `.a` file |
20:32:00 | FromDiscord | <sOkam!> i figure if i can get a `static:` block to build wgpu, it would remove the issue 🤔 |
20:32:20 | FromDiscord | <Yardanico> In reply to @sOkam! "building wgpu with release": but why do you need to even have that for each example specifically? |
20:32:27 | FromDiscord | <Yardanico> you can have one .nims file for all example files in a folder |
20:32:38 | FromDiscord | <Yardanico> just name it `config.nims` and place it in the same folder with all example nim files |
20:32:45 | FromDiscord | <Yardanico> it'll be applied to all nim files then |
20:32:58 | FromDiscord | <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:02 | FromDiscord | <Yardanico> In reply to @sOkam! "i figure if i": using static for that would not be the greatest idea |
20:33:11 | FromDiscord | <Yardanico> In reply to @sOkam! "i don't have it": I still don't get the issue |
20:33:12 | FromDiscord | <Yardanico> look |
20:33:22 | FromDiscord | <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:57 | FromDiscord | <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:03 | FromDiscord | <Yardanico> why would there be a mess because of this? |
20:34:03 | FromDiscord | <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:06 | FromDiscord | <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:48 | FromDiscord | <Yardanico> In reply to @sOkam! "i believe i have": why? |
20:35:59 | FromDiscord | <Yardanico> why do you want to have a nimble task to _run_ examples? |
20:36:16 | FromDiscord | <sOkam!> how else do you run the examples? |
20:36:28 | FromDiscord | <Yardanico> you use nimble to just build them all, and then just run manually? |
20:36:36 | FromDiscord | <Yardanico> I just don't understand why do you want to run them directly from nimble |
20:36:38 | FromDiscord | <Yardanico> they're examples after all |
20:36:50 | FromDiscord | <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:01 | FromDiscord | <sOkam!> i don't understand why not, if nimble also handles the buildsystem 🤔 |
20:37:25 | FromDiscord | <Yardanico> i'm not talking about nimble itself, i'm just speaking from practicality perspective |
20:37:28 | FromDiscord | <sOkam!> not saying my appraoch is good. im just not understanding what you mean |
20:37:43 | FromDiscord | <Yardanico> In reply to @Yardanico "1) Create a `config.nims`": with this you just build all examples |
20:37:49 | FromDiscord | <Yardanico> and then what you have are all the binary compiled files |
20:37:53 | FromDiscord | <Yardanico> that you can just run manually to run the examples |
20:37:59 | FromDiscord | <Yardanico> so why would you need nimble tasks to run them |
20:38:21 | FromDiscord | <sOkam!> im not following what you mean tbh |
20:38:25 | FromDiscord | <Yardanico> I'm not either |
20:38:54 | FromDiscord | <sOkam!> the lib is here https://github.com/heysokam/wgpu if it helps seeing the actual usecase |
20:38:55 | FromDiscord | <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:32 | FromDiscord | <Yardanico> okay, if you reaally want to do what you want, you can do it |
20:39:33 | FromDiscord | <sOkam!> In reply to @Yardanico "as I understand, you": the examples are just `nim c -r` for ergonomics |
20:39:37 | FromDiscord | <Yardanico> you need to remember one thing |
20:40:04 | FromDiscord | <Yardanico> `.nimble` files are just NimScript, and `task` is just a template defined by system/nimscript |
20:40:08 | FromDiscord | <Yardanico> you can just create tasks programmaticaly |
20:40:09 | FromDiscord | <Yardanico> (edit) "programmaticaly" => "programmatically" |
20:40:28 | FromDiscord | <Yardanico> for binName in xxx: task xxx |
20:41:21 | FromDiscord | <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:42 | FromDiscord | <Yardanico> but how would defines make it so you won't have to define 100 tasks if you have 100 examples? |
20:41:57 | FromDiscord | <sOkam!> i will try the static approach, since the library user that doesn't build an example will need it anyway 🤔 |
20:42:22 | FromDiscord | <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:36 | FromDiscord | <Yardanico> it'll make it harder for users who want to build wgpu by themselves, via other build process |
20:42:39 | FromDiscord | <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:09 | FromDiscord | <sOkam!> In reply to @Yardanico "it'll make it harder": they can fork and make it non-static |
20:43:23 | FromDiscord | <sOkam!> i don't want to support dynamic building, at least not currently |
20:43:32 | FromDiscord | <Yardanico> generally having a library that does external binary execution at compile-time sounds like a really weird idea |
20:43:36 | FromDiscord | <sOkam!> just like i prefer staticglfw over nimgl/glfw |
20:44:03 | FromDiscord | <Yardanico> In reply to @sOkam! "just like i prefer": yes, but that just uses nim itself for compiling C code |
20:44:13 | FromDiscord | <Yardanico> it doesn't do gorgeEx("gcc xxx") |
20:44:17 | FromDiscord | <sOkam!> i wish i could do just that, but wgpu is rust |
20:45:10 | FromDiscord | <Yardanico> also what about caching |
20:45:25 | FromDiscord | <sOkam!> wdym? |
20:45:31 | * | Jjp137 joined #nim |
20:45:33 | FromDiscord | <sOkam!> don't know much about it |
20:46:58 | FromDiscord | <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:10 | FromDiscord | <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:23 | FromDiscord | <Yardanico> yes, but it'll still get called and check if any files got modified and all that |
20:48:39 | FromDiscord | <Yardanico> but yeah, I digress, if you want it done that way, do it that way |
20:48:39 | FromDiscord | <sOkam!> that takes like less than a second in my crappy pc though |
20:49:36 | FromDiscord | <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:03 | FromDiscord | <sOkam!> the only good solution was if wgpu was written in C, but its rust |
20:54:02 | FromDiscord | <Elegantbeef> I have not used wgpu is there much reason to make it easy to use the debug version? |
20:55:15 | FromDiscord | <Elegantbeef> Worth noting one could use an environmental variable to get debug if they wanted |
20:55:41 | FromDiscord | <Elegantbeef> `WGPU_BUILD="debug" nimble build` is an ok compromise i'd say |
21:00:53 | FromDiscord | <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:18 | FromDiscord | <Yardanico> but are those a problem for a user of your wgpu binding? |
21:01:24 | FromDiscord | <Yardanico> i mean, what kind of errors we're talking about |
21:01:42 | FromDiscord | <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:15 | FromDiscord | <sOkam!> i don't understand the lib enough to answer that |
21:03:28 | FromDiscord | <sOkam!> from my experience they are important. how much or how little... i have no idea yet |
21:04:15 | FromDiscord | <sOkam!> the lib does have a way to get error codes. but i also found the backtraces important at some points |
21:05:03 | FromDiscord | <Yardanico> but is there a reason you need debug mode for backtraces? |
21:05:05 | FromDiscord | <sOkam!> i would give you examples, but i don't remember them. golfish brain issues 🐠 |
21:05:12 | FromDiscord | <Yardanico> they're just debug info that shouldn't incur any runtime cost |
21:05:32 | FromDiscord | <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:51 | FromDiscord | <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:02 | FromDiscord | <sOkam!> (edit) "hiddne" => "hidden until i built debug" |
21:06:08 | FromDiscord | <Yardanico> yes, so you can probably just use some flags to build it in release mode with debug info enabled |
21:06:17 | FromDiscord | <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:10 | FromDiscord | <Yardanico> but yeah, I don't know wgpu |
21:07:51 | FromDiscord | <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:43 | FromDiscord | <Yardanico> it should never take defines from -d switches in nims files |
21:08:52 | FromDiscord | <Yardanico> because it's supposed to be a layer above that |
21:09:02 | FromDiscord | <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:17 | FromDiscord | <Yardanico> that's only because you're executing it incorrectly probably |
21:09:22 | FromDiscord | <Yardanico> it runs a binary, not a shell command |
21:09:29 | FromDiscord | <Yardanico> so to run a shell command you need to actually call the shell with the command |
21:09:35 | FromDiscord | <sOkam!> oh |
21:11:03 | FromDiscord | <sOkam!> sent a code paste, see https://play.nim-lang.org/#ix=4uyH |
21:11:26 | FromDiscord | <Yardanico> ? |
21:11:32 | FromDiscord | <Yardanico> yes |
21:11:33 | FromDiscord | <sOkam!> doesn't do anything |
21:11:39 | FromDiscord | <Yardanico> `man bash` |
21:11:46 | FromDiscord | <Yardanico> https://media.discordapp.net/attachments/371759389889003532/1101979158944420011/image.png |
21:11:53 | FromDiscord | <sOkam!> i tried with -c too |
21:12:03 | FromDiscord | <Yardanico> if you want it to output anything - of course it won't |
21:12:07 | FromDiscord | <Yardanico> since you're literally `discard`ing the output |
21:12:33 | FromDiscord | <Yardanico> gorgeEx returns the error code and the output |
21:12:37 | FromDiscord | <Yardanico> but you just `discard` it |
21:12:41 | FromDiscord | <sOkam!> oh it doesnt output to stdout by default with that? kk |
21:13:00 | FromDiscord | <Yardanico> obviously it doesn't, how would it be useful otherwise if you wanted to get some output from a command |
21:13:20 | FromDiscord | <sOkam!> ive never used gorge, so how could i know |
21:13:29 | FromDiscord | <Yardanico> you used execCmdEx that behaves the same |
21:13:31 | FromDiscord | <sOkam!> i've only used execShellCmd so far |
21:13:41 | FromDiscord | <sOkam!> and/or exec |
21:14:02 | FromDiscord | <sOkam!> execCmdEx failed |
21:14:16 | FromDiscord | <Yardanico> ? |
21:14:37 | FromDiscord | <Yardanico> also, playground down again |
21:15:16 | FromDiscord | <Yardanico> ah right, execCmdEx doesn't work on 1.6.12 in ct, that's why you said it failed |
21:15:32 | FromDiscord | <Yardanico> just use devel so you won't need to do any porting when 2.0 comes out |
21:15:34 | FromDiscord | <sOkam!> execShellCmd doesn't work either |
21:16:44 | FromDiscord | <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:53 | FromDiscord | <Yardanico> yes, so just always use devel :P |
21:17:01 | FromDiscord | <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:22 | FromDiscord | <sOkam!> ic |
21:17:33 | FromDiscord | <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:50 | FromDiscord | <sOkam!> makes sense |
21:18:15 | FromDiscord | <Elegantbeef> Something something NimVM + libffi here 😛 |
21:18:39 | FromDiscord | <Yardanico> yeah i know that it exists |
21:18:45 | FromDiscord | <Yardanico> do you actually use nim compiled with libffi? |
21:18:54 | FromDiscord | <Elegantbeef> Nah |
21:19:13 | FromDiscord | <Yardanico> it's probably in the same ballpark as using .nimcfg file extension |
21:19:41 | FromDiscord | <Elegantbeef> I doubt anyone actually uses an libffi enabled compiler |
21:19:49 | FromDiscord | <Elegantbeef> Seems like it was mainly a timothee thing |
21:20:17 | FromDiscord | <Yardanico> yeah, that's why I mentioned .nimcfg, it's only ever used by coro.nimcfg in stdlib |
21:20:25 | FromDiscord | <Yardanico> github has no other files that are named .nimcfg |
21:20:38 | FromDiscord | <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:55 | FromDiscord | <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:08 | FromDiscord | <Chronos [She/Her]> It'll just suck to implement a file system :p |
23:47:56 | FromDiscord | <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:23 | FromDiscord | <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) |