| 00:25:55 | FromDiscord | <Mason Wheeler> If I have a wildcard filename path, like `C:\data\file.txt`, is there any way to turn that into a `seq[string]` of all the files that exist that match that pattern? |
| 00:27:12 | FromDiscord | <ajusa> In reply to @heysokam "is there a way": Like treeform's print or std/sugar dump? |
| 01:30:45 | * | SchweinDeBurg quit (Quit: WeeChat 4.7.0-dev) |
| 01:32:01 | FromDiscord | <user2m> hey guys random question - i have a web app that i update by simply scp'ing a new version of the binary into my linux server.↵I'm currently using a .env to store env vars, but is this necessary? Why not just store them as consts? I understand that a someone could get into my ↵vps and read the consts from the binary, but couldn't they do that with the .env as well? Also this isn't being pushed to git or any repo sites |
| 01:47:54 | FromDiscord | <leorize> you'd have to recompile the program if you change anything |
| 01:49:48 | FromDiscord | <leorize> if that's not a problem, feel free to use consts |
| 02:13:09 | * | fedorafan joined #nim |
| 02:41:44 | * | alexdaguy joined #nim |
| 02:52:11 | * | rockcavera quit (Remote host closed the connection) |
| 03:10:12 | FromDiscord | <heysokam> In reply to @ajusa "Like treeform's print or": apparently not like sugar.dump https://media.discordapp.net/attachments/371759389889003532/1368786831398932560/image.png?ex=68197d93&is=68182c13&hm=6bde924b6e208c50b6fd74f335b75fc9ef977d1e0bad037b59e09c33e714a512& |
| 03:10:50 | FromDiscord | <heysokam> that's using the exact formatting as `$` does |
| 03:11:24 | FromDiscord | <Elegantbeef> You'd need to implement your own walker.... damn I should make a proc walker macro for how much I walk types |
| 03:30:57 | FromDiscord | <spotlightkid> It's called file globbing. Take your pick\: https://nimble.directory/search?query=glob↵(@Mason Wheeler) |
| 03:31:39 | FromDiscord | <Elegantbeef> stdlib also has some unix globbin |
| 03:39:12 | FromDiscord | <spotlightkid> yeah, but afaics it's posix-only and just a wrapper for `glob.h`. |
| 03:39:33 | FromDiscord | <Elegantbeef> Like I said unix globbin 😄 |
| 04:08:04 | FromDiscord | <leorize> isn't `os` contain a glob function? |
| 04:08:07 | FromDiscord | <leorize> doesn't\ |
| 04:22:27 | FromDiscord | <spotlightkid> hmm, I dunno, somebody would, like, have to look at the documentation and stuff...↵https://nim-lang.org/docs/osdirs.html#walkPattern.i%2Cstring |
| 04:27:49 | FromDiscord | <leorize> why is it in std/private again |
| 04:36:59 | FromDiscord | <Robyn [She/Her]> Isn't it bc it's exported by os? |
| 04:37:24 | FromDiscord | <Robyn [She/Her]> Though my question is, why is the os module so bunched up? why not keep everything as their separate modules |
| 04:37:46 | FromDiscord | <leorize> the thing is that private is considered stuff you can't directly import |
| 04:37:54 | FromDiscord | <leorize> by convention, that is |
| 04:39:24 | FromDiscord | <Elegantbeef> Legacy code |
| 04:39:43 | FromDiscord | <Elegantbeef> OS was rewritten to separate the modules, but then recombined if you import `std/os` |
| 04:40:11 | FromDiscord | <Elegantbeef> It's also why there is redundancy in operations for no logical reason, was for backwards compatibillity |
| 04:45:32 | FromDiscord | <anuke> The modules are in a strange state where functions I look up can show up in modules I've never imported directly, and I'm often not sure which "legacy module" (like std/os) actually contains the thing I'm looking for. |
| 04:47:45 | FromDiscord | <leorize> except that the separated parts are now in `std/private` for whatever reason |
| 04:51:25 | FromDiscord | <Robyn [She/Her]> ah |
| 05:04:12 | FromDiscord | <Elegantbeef> Hey osfiles, osdirs, and friends all repeat os |
| 05:42:17 | FromDiscord | <heysokam> sent a code paste, see https://play.nim-lang.org/#pasty=qTwyckOt |
| 05:42:59 | FromDiscord | <Elegantbeef> It's fine |
| 05:43:07 | * | mahlon quit (Ping timeout: 272 seconds) |
| 05:43:09 | FromDiscord | <heysokam> ty |
| 05:43:10 | FromDiscord | <Elegantbeef> But don't take my word for it use tooling |
| 05:43:22 | FromDiscord | <heysokam> wdym? |
| 05:43:47 | * | mahlon joined #nim |
| 05:44:19 | FromDiscord | <Elegantbeef> Use valgrind or clang tooling to ensure it frees |
| 05:45:57 | FromDiscord | <leorize> disable `=copy` so you don't end up double-freeing |
| 05:46:36 | FromDiscord | <Elegantbeef> Also in your `=wasMoved` or just `=destroy` make it nil |
| 05:46:43 | FromDiscord | <Elegantbeef> You also do not check whether it's nil |
| 05:47:06 | FromDiscord | <heysokam> `arr = nil`? |
| 05:47:47 | FromDiscord | <Elegantbeef> Well after you convert nil yes |
| 05:47:49 | FromDiscord | <heysokam> how do I disable `=copy`, leo? |
| 05:48:27 | FromDiscord | <heysokam> I'm confused about the nil part. doesn't `deallocCstringArray` do that? |
| 05:48:40 | FromDiscord | <Elegantbeef> https://nim-lang.org/docs/destructors.html#lifetimeminustracking-hooks-nimeqcopy-hook |
| 05:48:47 | FromDiscord | <Elegantbeef> No it does not mutate where the data points |
| 05:49:02 | FromDiscord | <Elegantbeef> If you don't assign it to nil it still points to the heap where it allocated the array |
| 05:49:03 | FromDiscord | <Elegantbeef> It's a dangling pointer |
| 05:50:01 | FromDiscord | <heysokam> oh |
| 05:51:32 | * | SchweinDeBurg joined #nim |
| 05:54:09 | FromDiscord | <heysokam> ` Error: cannot bind another '=copy' to: CStringArray; previous declaration was constructed here implicitly` 🤔 |
| 05:54:38 | FromDiscord | <Elegantbeef> Move new after destroy or forward declare them |
| 05:54:46 | FromDiscord | <Elegantbeef> Hooks are made implicitly on usage |
| 05:58:39 | FromDiscord | <heysokam> worked, tyty |
| 06:37:54 | * | kenran joined #nim |
| 07:37:29 | * | nils` quit (Ping timeout: 268 seconds) |
| 08:27:06 | * | skippy8 joined #nim |
| 08:38:41 | * | kenran quit (Remote host closed the connection) |
| 09:18:34 | * | xet7_ joined #nim |
| 09:18:42 | * | xet7_ quit (Remote host closed the connection) |
| 09:29:18 | * | nils` joined #nim |
| 09:47:10 | * | beholders_eye joined #nim |
| 10:40:30 | * | beholders_eye quit (Ping timeout: 252 seconds) |
| 11:48:57 | FromDiscord | <jseb> unix goblin |
| 13:43:29 | * | ntat joined #nim |
| 14:32:52 | * | alexdaguy quit (Quit: a) |
| 15:27:30 | * | skippy8 quit (Quit: WeeChat 4.5.2) |
| 16:51:58 | * | SchweinDeBurg quit (Quit: WeeChat 4.7.0-dev) |
| 17:23:09 | * | andy-turner joined #nim |
| 17:27:25 | * | andy-turner quit (Client Quit) |
| 17:46:34 | FromDiscord | <mratsim> https://x.com/0xLita/status/1919404858316325166↵↵Work by @vindaar |
| 17:50:04 | FromDiscord | <mratsim> Runtime-compiled Cuda code from Nim AST -> GPU-agnostic AST -> Cuda |
| 17:52:25 | FromDiscord | <mratsim> https://www.lita.foundation/blog/nvrtc-cuda-poc-building-a-gpu-prover-with-runtime-compilation |
| 19:54:58 | * | lucerne joined #nim |
| 19:57:00 | FromDiscord | <nnsee> In reply to @mratsim "https://www.lita.foundation/blog/nvrtc-cuda-poc-bui": doubly confusing since nvidia has its own thing called NIM which often comes up when you google Nim but this is indeed about Nim and not NIM |
| 19:57:22 | FromDiscord | <nnsee> anyways, really cool |
| 19:58:12 | FromDiscord | <nnsee> the nim_ast_to_cuda_ast.nim link is broken |
| 20:43:49 | * | fedorafan quit (Remote host closed the connection) |
| 20:50:25 | * | fedorafan joined #nim |
| 21:00:57 | * | xet7 quit (Remote host closed the connection) |
| 21:02:38 | * | xet7 joined #nim |
| 21:09:05 | * | ntat quit (Quit: leaving) |
| 21:51:38 | * | rockcavera joined #nim |
| 23:07:28 | FromDiscord | <tomo_kimpesa> wow I didn't know that |
| 23:08:20 | * | fedorafan quit (Remote host closed the connection) |
| 23:08:40 | * | fedorafan joined #nim |
| 23:15:35 | * | xet7 quit (Remote host closed the connection) |
| 23:17:23 | FromDiscord | <treeform> hippo also does nim to cude stuff (and hip): https://github.com/monofuel/hippo |
| 23:17:54 | FromDiscord | <treeform> I really like the hippo examples as they follow the cuda C++ book. So you can reference: https://github.com/monofuel/hippo/tree/master/examples |
| 23:21:14 | FromDiscord | <albassort> hello treeform |