00:31:07 | FromDiscord | <.tokyovigilante> sent a code paste, see https://paste.rs/afQQ2 |
00:31:25 | FromDiscord | <.tokyovigilante> How would I go about exporting this? getting `/home/ryan/Projects/Develop/Tsunami/src/tsunami/ui/wayland/listeners/pointer.nim(41, 37) Error: undeclared field: 'init'` |
00:33:27 | FromDiscord | <.tokyovigilante> Also TIL "fancy enums" are actually called Algebraic Data Types. Really should have done that comp sci degree... |
00:35:19 | FromDiscord | <.tokyovigilante> sent a code paste, see https://paste.rs/hk77T |
00:48:38 | FromDiscord | <.tokyovigilante> Hmm, seems I just can't have the field names in there. ie `let event = InputEvent PointerMotion.init(int(time), pointerX, pointerY)` works |
00:49:22 | FromDiscord | <.tokyovigilante> However have in fact stitched myself up as these need to pass through a C library, so I should have just used a C union to start with... <sigh>. Seems I'm doomed to just reimplement SDL after all |
01:06:04 | * | n|Phreak quit (Ping timeout: 260 seconds) |
01:18:54 | FromDiscord | <Elegantbeef> Well no↵(@.tokyovigilante) |
01:20:00 | FromDiscord | <Elegantbeef> People now call anything with ML/Rust like 'Enum's as ADT but in reality ADT covers tuples, structs, tagged unions, .... |
01:21:14 | FromDiscord | <Elegantbeef> What does this mean?↵(@.tokyovigilante) |
01:25:53 | FromDiscord | <.tokyovigilante> I'd defined a named tuple (time, x, y) but then trying to create an instance using the names didn't compile |
01:26:34 | FromDiscord | <Elegantbeef> Hmph perhaps a `T.init (time: ..., x: ...)` |
01:26:40 | FromDiscord | <Elegantbeef> I mean perhaps that's needed |
01:28:09 | FromDiscord | <Elegantbeef> Though you should be able to do `T.init(time = ..., x =...)` |
02:02:14 | FromDiscord | <litlighilit> As I tested, the higher, lower part is `(3, 680740752671262260)`↵↵maybe `mulx_u64` gives wrong result?↵(@bosinski2023) |
03:10:10 | FromDiscord | <Elegantbeef> Well thanks @.tokyovigilante added the ability for optional defaults https://github.com/beef331/fungus?tab=readme-ov-file#optional-fields Nycto (James) you may like this 😄 |
03:15:09 | FromDiscord | <.tokyovigilante> Thanks, will give it a roll shortly. |
03:15:39 | * | rockcavera quit (Remote host closed the connection) |
03:22:09 | FromDiscord | <Elegantbeef> Notice now that's the wrong @nycto |
03:23:02 | FromDiscord | <__nycto__> Ooooo, I do love that |
04:33:07 | FromDiscord | <heysokam> If I wanted to have syntax such as: `const thing = find.some.thing()`↵Is there a way to avoid `find` and `some` to be separate files that export each other?↵_Looking for a namespace-like solution, basically_↵Is there such a thing in Nim? 🤔 |
04:33:41 | FromDiscord | <Elegantbeef> Use `typedesc` as the first parameter |
04:33:52 | FromDiscord | <lainlaylie> In reply to @nixfreak "So atlas is not": im pretty sure atlas is in 2.2.2. if youre using choosenim this is just a case of choosenim not making a shim for atlas.↵with that said, atlas and nimble get a lot of changes between nim releases so it's a good idea to install them separately |
04:35:03 | FromDiscord | <heysokam> In reply to @Elegantbeef "Use `typedesc` as the": that only solves the 2nested case, right? or am i missing your point |
04:35:12 | FromDiscord | <Elegantbeef> It solves N number of cases |
04:35:22 | FromDiscord | <heysokam> have a simple example? |
04:42:24 | FromDiscord | <Elegantbeef> sent a code paste, see https://paste.rs/J5hYq |
04:43:39 | FromDiscord | <heysokam> I see |
04:43:57 | FromDiscord | <heysokam> Yea, the modules solution is a lot clearer, I'm afraid 😦 |
04:44:29 | FromDiscord | <Elegantbeef> Both suck, but so do namespaces so alas |
04:44:56 | FromDiscord | <heysokam> namespaces are good for clarity/explicitness, though |
04:45:43 | FromDiscord | <heysokam> `find_some_thing()` does the job too, but cannot be non-namespaced ever |
04:57:07 | * | amadaluzia quit (Quit: ZNC 1.8.2 - https://znc.in) |
05:08:29 | FromDiscord | <beastarss> does anyone know if dpapi is a good library? i heard you can only unencrypt it on the same machine that encrypted it, but is it easy to circumvent that? |
05:48:12 | * | derpydoo joined #nim |
06:03:12 | FromDiscord | <heysokam> what could I do to manage multiple nim packages from one folder as a monorepo where each package is inside a subfolder?↵does nimble have support for that? |
06:04:27 | FromDiscord | <Elegantbeef> I don't know about nimble but `--path` is for that |
06:04:40 | FromDiscord | <Elegantbeef> I think there is a localdeps command |
06:04:43 | FromDiscord | <heysokam> Yeah but that solves the local part |
06:04:57 | FromDiscord | <heysokam> I was thinking about the publishing the package part |
06:06:31 | FromDiscord | <nasuray> You can setup multiple binaries with namedBin or you can keep them in standalone subdirectories with their own nimble files and specify the subdir in the URL |
06:07:33 | FromDiscord | <heysokam> I might do the subdir url part, yea↵do you have a tiny example of how that could work? |
06:07:55 | FromDiscord | <nasuray> https://nim-lang.github.io/nimble/use-packages.html |
06:08:46 | FromDiscord | <nasuray> There is a short section on subdirs on that page. |
06:09:10 | FromDiscord | <nasuray> I actually use both of these techniques to install tools associated with a library https://github.com/daylinmorgan/hwylterm/blob/main/tools/tools.nimble |
06:09:15 | FromDiscord | <heysokam> oh didn't know about `subdir`. tyty |
06:10:03 | FromDiscord | <Elegantbeef> Odd that it's a query parameter what if my git forge uses query parameters and `subdir` is one of them! 😛 |
06:10:57 | FromDiscord | <heysokam> perfect! that's exactly the idea @nasuray. tyty 🙏 https://media.discordapp.net/attachments/371759389889003532/1355786346190471319/image.png?ex=67ea31ee&is=67e8e06e&hm=880c79578d784f5d307176797626303ce06c8ca75e02c74d82f7d401d75b3a74& |
06:11:01 | FromDiscord | <nasuray> In reply to @Elegantbeef "Odd that it's a": Throw away that git forge |
06:12:17 | FromDiscord | <nasuray> I specifically utilized the subdir approach because I dislike how nimble treats hybrid packages that are used as dependencies. |
06:12:41 | FromDiscord | <heysokam> how does it do it? |
06:16:06 | FromDiscord | <nasuray> When you define both srcDir and bin (or namedBin) it will both install src files for import and compile any modules. But if I'm just using library code I don't want to compile some binary I don't use. |
06:17:06 | FromDiscord | <heysokam> oh I see. yea makes sense if the binary is not tools, but in your case it makes no sense |
06:18:25 | FromDiscord | <heysokam> is the path of the subdir relative to the root's srcDir? |
06:18:42 | FromDiscord | <nasuray> I also exclusively use nimble in local deps mode, so really I need to submit a patch to `nimble install` to ignore binaries with some flag. |
06:18:59 | FromDiscord | <nasuray> In reply to @heysokam "is the path of": I think? |
06:19:45 | FromDiscord | <heysokam> yea nimble for localdev is pain 😦 |
06:19:59 | FromDiscord | <heysokam> worked great, but now its in a really weird state |
06:20:08 | FromDiscord | <heysokam> unless it was fixed recently and I missed it |
06:24:05 | FromDiscord | <heysokam> does nim's regex support named groups?↵I want to implement the semver spec, which has recommended regex already written. But don't know which to pick↵https://semver.org (around the bottom) |
06:25:10 | FromDiscord | <Elegantbeef> `line.scanf("$i.$i.$i", major, min, patch)` 😄 |
06:25:50 | FromDiscord | <heysokam> what about the `-name+build` optional parts at the end? |
06:26:13 | FromDiscord | <Elegantbeef> The what? 😄 |
06:26:49 | FromDiscord | <heysokam> https://github.com/heysokam/confy/blob/f5b4d5d0f81114778f3feb3cf38433ed5a92b0e5/src/confy/tools/version.ts#L60 |
06:26:52 | FromDiscord | <Elegantbeef> that's `line.scanf("$i.$i.$i$+", major, min, patch, otherGubbons)` |
06:27:00 | FromDiscord | <Elegantbeef> I was mostly joking wit h the "the what" |
06:27:03 | FromDiscord | <heysokam> but its optional |
06:27:33 | FromDiscord | <heysokam> both could or could-not be there, but still need capturing to their relevant spot |
06:27:50 | FromDiscord | <Elegantbeef> Right the above does the trick |
06:29:05 | FromDiscord | <heysokam> sent a code paste, see https://paste.rs/bhivk |
06:29:19 | FromDiscord | <Elegantbeef> Whoops `$.` |
06:29:42 | FromDiscord | <Elegantbeef> God damn it it's `$` |
06:29:51 | FromDiscord | <heysokam> its major.minor.patch.?-name-valid?+build-valid |
06:30:07 | FromDiscord | <Elegantbeef> Right after parsing it you now need to ensure the `otherGubbons` is valid |
06:30:22 | FromDiscord | <Elegantbeef> But who uses the other gubbons, bad people that's who |
06:30:31 | FromDiscord | <heysokam> I do for dev builds |
06:30:45 | FromDiscord | <Elegantbeef> You really set me up for an easy "I rest my case" |
06:30:55 | FromDiscord | <heysokam> 😄 |
06:31:22 | FromDiscord | <heysokam> can scanf have optional parts where they are resolved to `""` if they are not there? |
06:31:32 | FromDiscord | <Elegantbeef> Yes you can write your own matchers |
06:31:46 | FromDiscord | <Elegantbeef> `$` for instance can match to a 0 length string |
06:31:59 | FromDiscord | <heysokam> well, that's what the "use the given regex" part entered the chat. I don't want to reinvent |
06:32:41 | FromDiscord | <heysokam> it took me like 1h to have that ts file finalized and tested. I bet you reinventing that'd have been a few hours minimum |
07:03:58 | * | alexdaguy joined #nim |
07:16:07 | * | ntat joined #nim |
07:40:35 | FromDiscord | <heysokam> Is there any real alternative to exceptions? |
07:51:26 | * | cmc75 joined #nim |
07:53:01 | cmc75 | Hello! |
07:53:01 | cmc75 | Has anyone successfully used the -d:useNimRtl flag to have Nim dynamic libraries? I am getting an error "can have an unlisted effect: RootEffect" when using nativsockets and other "unlisted effect" or "unlisted exception" errors depending on what I include. |
07:54:40 | * | derpydoo quit (Quit: derpydoo) |
08:03:18 | * | cmc75 quit (Quit: Client closed) |
08:09:17 | FromDiscord | <morgan (ping with reply)> is there a way to set priority of converters? i have bool to an object of 3 bools and vice versa, with and for both, nim doesn't know whether to convert to bool or object of 3 bools to do the and |
08:09:52 | FromDiscord | <morgan (ping with reply)> In reply to @heysokam "Is there any real": result types which store the error in the return value |
08:10:14 | FromDiscord | <Elegantbeef> Nope converters are hellish creations |
08:10:20 | FromDiscord | <morgan (ping with reply)> darn |
08:11:49 | FromDiscord | <Elegantbeef> Well there are roughly 3 solutions to errory code. Results, multiple return values, global error value(Exceptions are this really just with a bit of niceties) |
08:12:52 | FromDiscord | <morgan (ping with reply)> the issue im running into is with using a hashset of vec3s, maybe i can override the hash calculation so it doesn't do it for me with it doing all 3 components in parallel |
08:14:14 | FromDiscord | <morgan (ping with reply)> anyways, it would be nice if converters could have a `{.lowpriority.}` on them, or a priority value, to determine which goes first |
08:14:24 | FromDiscord | <morgan (ping with reply)> i might open a proposal for that |
08:14:42 | FromDiscord | <Elegantbeef> Would be nicer if converters didn't exist 😄 |
08:14:51 | FromDiscord | <Elegantbeef> Converters are hell on earth for dispatching |
08:18:52 | FromDiscord | <heysokam> @morgan (ping with reply) converters will bite you in the ass. just a forewarning↵they are hidden control flow that might affect you in ways you don't expect.. and good luck hunting that one converter you forgot it even existed↵I also started on nim with the idea that they are cool, until I had to fix a recurring bug and it ended up being caused by a converter affecting more than I intended |
08:20:23 | FromDiscord | <heysokam> Its better to not hide the conversion. And if you have issues with your api getting ugly because of that, then offer some `inline` functions or `templates` that do that for the user of the external api |
08:20:33 | FromDiscord | <morgan (ping with reply)> yea that's fair |
08:20:46 | FromDiscord | <heysokam> I'd argue not even templates, but just for context |
08:20:49 | FromDiscord | <morgan (ping with reply)> im removing the converter i added that i thought would fix it at least |
08:21:23 | FromDiscord | <morgan (ping with reply)> i have some for int to float conversion for math that i think are worth keeping |
08:21:43 | FromDiscord | <heysokam> oof, then 100% be explicit for that |
08:21:51 | FromDiscord | <heysokam> math issues are hell to track |
08:22:03 | FromDiscord | <morgan (ping with reply)> yeah i guess that makes sense |
08:22:38 | FromDiscord | <morgan (ping with reply)> i like the idea of not needing to change up code to use it with vector math |
08:22:58 | FromDiscord | <morgan (ping with reply)> i could set up macros for generating math with conversions built in |
08:23:13 | FromDiscord | <morgan (ping with reply)> and maybe also set up a compile option to disable them |
08:23:16 | FromDiscord | <heysokam> you can always create `func ` for that |
08:23:32 | FromDiscord | <heysokam> I believe they can be overloaded |
08:23:41 | FromDiscord | <morgan (ping with reply)> yes |
08:24:20 | FromDiscord | <morgan (ping with reply)> i wrote macros so i could more easily overload a ton of stuff https://media.discordapp.net/attachments/371759389889003532/1355819924341391500/image.png?ex=67ea5133&is=67e8ffb3&hm=fef9909364b5dc888e1d7e86486eeafa22d16b99182eefadee1e2b689eaaa78b& |
08:24:45 | FromDiscord | <heysokam> are you aware of `treeform/vmath` btw? |
08:24:52 | FromDiscord | <morgan (ping with reply)> probably |
08:24:57 | FromDiscord | <heysokam> he already did all of that |
08:25:14 | FromDiscord | <morgan (ping with reply)> i had already written some of this and decided to stick it off in its own library |
08:25:26 | FromDiscord | <heysokam> ic |
08:25:58 | FromDiscord | <heysokam> might be worth contributing the missing parts to vmath. its the most used math library on nim, afaik |
08:26:04 | FromDiscord | <morgan (ping with reply)> i had also previously written a 2d array which is part of this library, mostly because i'd had issues with another library that i used for that, which had caused perf issues |
08:26:29 | Amun-Ra | beastarss: that's data protection api, you'd have to export backup dpapi keys |
08:26:40 | FromDiscord | <beastarss> wdym? |
08:27:08 | Amun-Ra | wdim by what? |
08:27:13 | FromDiscord | <morgan (ping with reply)> In reply to @heysokam "might be worth contributing": also this is up on nimble as vecray (vector and array) |
08:27:40 | FromDiscord | <beastarss> im asking like, can people easily crack dpapi encryption? cause as i said, i want it so that only the computer that encrypts the data can decrypt it |
08:27:52 | FromDiscord | <beastarss> but i dont know if peopel have reverse engineered that encryption and recreated it |
08:28:10 | FromDiscord | <heysokam> do I need to add `func f (thing :var T)` to an argument if `T` is a `ref object`? 🤔 |
08:28:24 | Amun-Ra | beastarss: ah, I mean it's designed to work that way; unless there's a bug somewhere |
08:57:44 | * | derpydoo joined #nim |
09:01:45 | FromDiscord | <heysokam> Was there any existing `turn any object into string` function already in stdlib? |
09:02:00 | FromDiscord | <heysokam> No need for fancy formatting, its just for print debugging |
09:06:41 | FromDiscord | <odexine> `repr`? |
09:32:48 | FromDiscord | <heysokam> sent a code paste, see https://paste.rs/gp40K |
09:33:22 | FromDiscord | <heysokam> (edit) "https://paste.rs/vBsaT" => "https://paste.rs/OJEWZ" |
09:37:13 | * | rockcavera joined #nim |
09:37:40 | Amun-Ra | don't use "new" for custom proc |
09:40:49 | Amun-Ra | that example wasn't compileable, I added a few things: https://dpaste.com/B8BJUXU9K |
09:42:25 | Amun-Ra | play.nim returns 500 on upload |
09:49:14 | FromDiscord | <heysokam> ah it seems like it was using an enum instead of a typedesc |
09:49:38 | FromDiscord | <heysokam> I've done that `new` custom before, and it worked. but I never used an enum |
09:49:50 | FromDiscord | <heysokam> I guess it didn't overload 🤔 |
09:50:26 | Amun-Ra | I used new once for a single arg proc and it shot me in the foot ;) |
09:53:10 | FromDiscord | <heysokam> I've used it a lot. but always with typedesc |
09:58:20 | FromDiscord | <heysokam> new is not the problem |
09:58:25 | FromDiscord | <heysokam> it still segfaults |
09:58:42 | FromDiscord | <heysokam> what else did you change, Amun-Ra? |
10:01:32 | * | ntat quit (Quit: leaving) |
10:08:57 | FromDiscord | <heysokam> ok, it was none of that. it was `const dbg = debugEcho` 🤦♂️ |
10:09:05 | FromDiscord | <heysokam> the code was fine |
10:11:03 | FromDiscord | <heysokam> sent a code paste, see https://paste.rs/AjeBP |
10:55:17 | * | coldfeet joined #nim |
11:34:41 | * | coldfeet quit (Quit: Lost terminal) |
11:39:40 | * | derpydoo quit (Quit: derpydoo) |
11:46:33 | FromDiscord | <atlas1905> I was checking out nim and tried to compile first a simple program. I got "Error: invocation of external compiler program failed.". Why does nim need an external compiler and does not compile on its own? |
11:49:48 | FromDiscord | <lainlaylie> 1. because it's easier to piggyback off decades of c compiler development than to reinvent the wheel↵2. because it's easier to do c and c++ interop if you compile to those languages |
11:50:54 | FromDiscord | <kapendev> This is just how nim works. Kinda similar to Haxe lang. |
11:51:25 | * | amadaluzia joined #nim |
11:52:32 | FromDiscord | <zumi.dxy> at first it would seem like "oh, how lame"↵but it is actually its superpower |
11:53:24 | FromDiscord | <lainlaylie> unless one is doing c interop, the fact that nim compiles to c is nothing more than an implementation detail. don't worry about it and just write some code |
11:54:21 | FromDiscord | <zumi.dxy> if you really care about implementation detail: <https://github.com/arnetheduck/nlvm> |
12:02:35 | FromDiscord | <atlas1905> For more advanced users, this probably is a superpower, but for me as a beginner is a nuisance to download something that is not self sufficient and to quickly find out I have to download another software just to make the first one work. Hundreds of megs or gigs of dependencies just to compile the simplest program, when on the first page it says: "Nim generates native dependency-free executables, not dependent on a virtual machine, whic |
12:03:56 | FromDiscord | <lainlaylie> the executables produced by nim do not require the user to have a c compiler installed |
12:04:50 | FromDiscord | <lainlaylie> there is much else to be said but i'll leave it to someone more tactful than me... |
12:06:16 | FromDiscord | <atlas1905> In fact, what I was thinking is that nim itself does not produce all the good things, the gcc does. Isn't this the case? |
12:06:22 | FromDiscord | <lainlaylie> no |
12:06:31 | FromDiscord | <kapendev> Even with C you need an extra linker program. |
12:06:44 | FromDiscord | <emanresu3> My operating system comes with a C compiler so I never notice this issue |
12:07:32 | FromDiscord | <lainlaylie> if you go spend a week writing c programs you'll quickly see that nim is in fact quite good |
12:12:40 | FromDiscord | <kapendev> But yeah, I kinda think nlvm (from the link above) is a better idea than compiling to C too. I mean C interop is easy in any systems lang.↵Yeah, I know, unpopular opinion 🙂 |
12:18:16 | FromDiscord | <atlas1905> I see that to have gcc work in Windows, one further needs MinGW 🙂 |
12:19:42 | FromDiscord | <odexine> MinGW provides gcc in the first place |
12:21:57 | FromDiscord | <atlas1905> Ok, so for the 92 MiB nim 2.2.2 I installed the 173 MiB dependency MinGW and gcc in it |
12:21:59 | FromDiscord | <odexine> I believe you can use msvc if you really want to |
12:22:07 | FromDiscord | <atlas1905> And still the same error of compiler not found |
12:22:30 | FromDiscord | <odexine> Did you restart your shell because your PATH doesn’t update unless you do |
12:23:55 | FromDiscord | <atlas1905> Somehow the PATH variable was not updated for me. But I updated it manually with the bin directory of MinGW and reopened cmd, still not working |
12:24:15 | FromDiscord | <odexine> Does calling gcc manually work |
12:24:38 | FromDiscord | <atlas1905> Nope, here is the problem... |
12:25:15 | FromDiscord | <atlas1905> Does this damn thing require an OS reboot 🙂 |
12:27:00 | FromDiscord | <rakgew> usually a change of path env var just needs a new shell start on win |
12:27:20 | FromDiscord | <rakgew> any shell started befor will not know about the change anv var |
12:34:36 | FromDiscord | <heysokam> This is a major usability issue on Windows |
12:35:15 | FromDiscord | <heysokam> Thats the very reason I started creating `confy` and `get.Lang`, in order to remove the platform dependent pain points |
12:35:32 | FromDiscord | <atlas1905> In reply to @heysokam "This is a major": I completely agree |
12:35:41 | FromDiscord | <heysokam> For experienced devs... sure, non issue. For new people, it sucks majorly |
12:37:35 | FromDiscord | <atlas1905> In reply to @heysokam "For experienced devs... sure,": Moreover, one cannot reach the experienced state if one cannot get past the beginning phase 🙂 |
12:37:43 | FromDiscord | <heysokam> pretty much, yea |
12:38:20 | FromDiscord | <lainlaylie> so are we still at trying to get gcc on path? or is there another problem? |
12:38:26 | FromDiscord | <heysokam> beginner phase is the most difficult phase, and people treat it like its nothing |
12:38:43 | FromDiscord | <atlas1905> In reply to @lainlaylie "so are we still": Still there, haha |
12:38:56 | FromDiscord | <heysokam> @atlas1905 how far on the main instructions are you? |
12:39:07 | FromDiscord | <heysokam> also, installing manually or with choosenim? |
12:39:37 | FromDiscord | <atlas1905> Uncompressed manually from 2.2.2 zip file. I love portable softwares |
12:39:51 | FromDiscord | <lainlaylie> how did you add it to path? i just tried adding a new entry to my user Path via system properties -> environment variables and it showed up immediately after restarting cmd |
12:40:02 | FromDiscord | <heysokam> In reply to @atlas1905 "Uncompressed manually from 2.2.2": very not recommend, because of mingw |
12:40:15 | FromDiscord | <heysokam> use choosenim and then use `finalize.exe` |
12:40:29 | FromDiscord | <atlas1905> In reply to @lainlaylie "how did you add": I added it to user PATH variable |
12:40:44 | FromDiscord | <lainlaylie> and restarted cmd and it's not there? |
12:40:53 | FromDiscord | <atlas1905> Yes |
12:41:05 | FromDiscord | <lainlaylie> is this a standalone cmd or are you inside vscode or something? |
12:41:06 | FromDiscord | <heysokam> can you run it manually from the path? |
12:41:25 | FromDiscord | <heysokam> like `path/to/nim.exe --version` |
12:41:50 | FromDiscord | <heysokam> also, I insist on choosenim |
12:42:15 | FromDiscord | <atlas1905> In reply to @lainlaylie "is this a standalone": Standalone, from Win OS |
12:42:56 | FromDiscord | <atlas1905> In reply to @heysokam "also, I insist on": Yes, nim.exe executes from the current directory. Nim is not in th PATH |
12:43:05 | FromDiscord | <lainlaylie> does mingw show up when you do `echo %PATH%`? |
12:43:38 | FromDiscord | <atlas1905> In reply to @lainlaylie "does mingw show up": Yes, "c:\MinGW\bin\;" |
12:44:27 | FromDiscord | <atlas1905> It is right at the end. Maybe OS needs restart, but I cannot restart now |
12:44:28 | FromDiscord | <lainlaylie> truly vexing |
12:44:34 | FromDiscord | <lainlaylie> it shouldn't need a restart |
12:44:59 | FromDiscord | <atlas1905> Maybe i should add nim to the system variable PATH, not the user one? |
12:45:10 | FromDiscord | <lainlaylie> no need |
12:48:03 | FromDiscord | <zumi.dxy> In reply to @lainlaylie "it shouldn't need a": at most a log-out and then a log back in |
12:48:45 | FromDiscord | <odexine> It shouldn’t need that either |
12:49:08 | FromDiscord | <lainlaylie> i mean, it's there when we do `echo %PATH%`, that means it's there, right? |
12:49:19 | FromDiscord | <lainlaylie> is gcc.exe in fact in `c:\MinGW\bin`? |
12:50:23 | FromDiscord | <emanresu3> do `gcc --version` and `nim --version` both work now? |
12:52:39 | FromDiscord | <heysokam> is `T.default()` required to get the default values of a type populated? 🤔↵I thought they were assumed to be there always on creation |
12:53:08 | FromDiscord | <lainlaylie> `var t: T` does not give you default values |
12:53:27 | FromDiscord | <heysokam> what about `var t = T()` |
12:53:28 | FromDiscord | <odexine> Defaults and zeroed are different |
12:53:36 | FromDiscord | <lainlaylie> In reply to @heysokam "what about `var t": yes default values |
12:53:47 | FromDiscord | <heysokam> well that's not what I'm finding |
12:53:51 | FromDiscord | <heysokam> am I missing something? |
12:53:57 | FromDiscord | <lainlaylie> please show code |
12:55:13 | FromDiscord | <atlas1905> sent a long message, see https://paste.rs/Qk49m |
12:55:29 | FromDiscord | <lainlaylie> uh... |
12:55:39 | FromDiscord | <heysokam> sent a code paste, see https://paste.rs/mbnod |
12:57:14 | FromDiscord | <heysokam> (edit) "https://paste.rs/w63vT" => "https://paste.rs/yG3ba" |
12:57:44 | FromDiscord | <heysokam> (edit) "https://paste.rs/3XZTG" => "https://paste.rs/tjmHe" |
12:57:58 | FromDiscord | <heysokam> it works if I do `.default`, but I always thought that was not needed |
12:58:09 | FromDiscord | <odexine> Build target doesn’t set the default for config |
12:58:22 | FromDiscord | <heysokam> never coded much after they got into release, so not sure if doing something dummy |
12:58:44 | FromDiscord | <lainlaylie> my brain is not registering this formatting... |
12:58:49 | FromDiscord | <heysokam> In reply to @odexine "Build target doesn’t set": it did at some point |
12:58:54 | FromDiscord | <odexine> In reply to @lainlaylie "my brain is not": It takes a while |
12:59:17 | FromDiscord | <odexine> In reply to @heysokam "it did at some": I’m not sure what the semantics are for default() but it’s definitely different to T() in that case |
13:00:30 | FromDiscord | <heysokam> well, they sure are confusing |
13:00:47 | FromDiscord | <heysokam> I was assuming `T()` is equivalet to `T.default()`, but its not behaving the same |
13:00:54 | FromDiscord | <lainlaylie> sent a code paste, see https://paste.rs/SGeEL |
13:01:15 | FromDiscord | <heysokam> Well, I might have changed and pasted a fixed version |
13:01:22 | FromDiscord | <heysokam> but at some point it was not behaving |
13:03:08 | FromDiscord | <heysokam> oh i see |
13:03:54 | FromDiscord | <heysokam> so apparently initializing `BuildTarget` with just `result.other = blabla; etc`, and not setting `result.cfg` does make them empty |
13:05:00 | FromDiscord | <heysokam> even if the type declares defaults, it seems to ignore them if you don't initialize that field of the object or the objects constructor itself |
13:05:12 | FromDiscord | <lainlaylie> if i understood that correctly, yes, `result` is initially zero, not default |
13:05:25 | FromDiscord | <heysokam> yea, that's what tripped me |
13:05:38 | FromDiscord | <odexine> Same semantics of variables yes |
13:06:57 | FromDiscord | <lainlaylie> `var t: T` and `var t = default(T)` are the same except that the former ignores default values↵one example of `T()` and `default(T)` being different is when T is a ref object |
13:20:32 | FromDiscord | <heysokam> is `one &= two` the best way to merge two sequences of strings in place? |
13:32:30 | * | alexdaguy quit (Quit: ded) |
14:19:35 | * | ntat joined #nim |
14:30:46 | FromDiscord | <kapendev> Does Nim have bindings to the C std? |
14:36:51 | * | coldfeet joined #nim |
14:44:00 | FromDiscord | <heysokam> Some of the Nim stdlib uses C's functions internally. But its only parts and not exposed |
14:44:19 | FromDiscord | <heysokam> in general, the answer is nope. but its easy to wrap |
14:54:18 | * | Guest36 joined #nim |
14:54:57 | * | Guest36 quit (Client Quit) |
14:56:43 | FromDiscord | <kapendev> Ah, thanks.↵Random, but Tsoding will not be happy about this if he ever tries Nim without GC hehe. |
15:09:32 | FromDiscord | <fabric.input_output> strings literals are a bit annoying otherwise it's pretty easy |
15:44:45 | * | derpydoo joined #nim |
15:57:32 | FromDiscord | <System64 ~ Flandre Scarlet> Hi! I have a question about SDL3↵Is it possible to statically link it? |
15:57:59 | * | coldfeet quit (Quit: Lost terminal) |
16:28:05 | FromDiscord | <System64 ~ Flandre Scarlet> Oh, maybe with dynlibOverride |
17:35:54 | * | nils` joined #nim |
17:43:29 | * | derpydoo quit (Quit: derpydoo) |
18:38:13 | * | xet7 quit (Quit: Leaving) |
18:57:46 | FromDiscord | <TFed> hi, there is there an official way to install the nim on guix? |
18:57:57 | FromDiscord | <TFed> a channel or smth |
18:58:58 | FromDiscord | <TFed> [Edit](https://discord.com/channels/371759389889003530/371759389889003532/1355979332530606161): hi there! Is there an official way to install the nim on guix? |
19:01:14 | * | xet7 joined #nim |
19:10:39 | FromDiscord | <TFed> because it looks like guix and nim are not talking with each other🤔 |
19:10:40 | FromDiscord | <TFed> all examples or code i find outdated in period of 2 or 3 years |
19:10:40 | FromDiscord | <TFed> guix install gave me nim 1.6.2 by default😕 so i had to isntall it on my own |
19:10:40 | FromDiscord | <TFed> all examples or code i that found was a bit outdated some 2 or 3 years |
19:13:47 | FromDiscord | <TFed> would be great if there are any guix users, that got some tips for nim 🙂 |
19:15:36 | FromDiscord | <TFed> i can handle it,🧐↵↵guix is just new thing to me, so this is why i was asking if there are some packages i can find.. |
19:31:25 | FromDiscord | <demotomohiro> I'm not guix user but I searched Nim on guix web site and found: https://packages.guix.gnu.org/packages/nim/2.2.2/↵It seems guix has latest stable Nim. |
19:39:22 | FromDiscord | <TFed> yup true, i'm installing it now |
19:39:22 | FromDiscord | <TFed> probably i did something wrong, because when you are installing guix, you are installing one stable version that can have outdated packages, after installation you have update system and all packages to latest versions |
19:39:50 | FromDiscord | <TFed> so maybe i missed smth, but yeah after full upgrade, 2.2.2 is actually showed up in the package list |
19:43:42 | FromDiscord | <TFed> probably i need to upgrade and reconfigure system few more times, to get to latest versions |
19:43:45 | FromDiscord | <TFed> probably i need to upgrade and reconfigure system few more times, to get to the latest versions |
19:43:51 | FromDiscord | <TFed> probably i needed to upgrade and reconfigure system few more times, to get to the latest versions |
19:51:31 | FromDiscord | <TFed> thanks anyway, i just was worring cuz i didn't had time for it 😄 |
19:51:35 | FromDiscord | <TFed> everything works |
19:58:29 | * | xet7 quit (Quit: Leaving) |
20:04:51 | * | xet7 joined #nim |
20:14:35 | FromDiscord | <TFed> actually it started to return the same error |
20:14:39 | FromDiscord | <TFed> fatal error\: as\: unknown host architecture (can't determine which assembler to run)↵fatal error\: as\: unknown host architecture (can't determine which assembler to run)↵fatal error\: as\: unknown host architecture (can't determine which assembler to run) |
20:26:00 | FromDiscord | <TFed> it was my mistake i installed gcc-toolchain that add it's own assembler that conflicts wirh cc-tools... |
20:44:27 | * | ntat quit (Quit: leaving) |
22:01:44 | * | Guest10 joined #nim |
22:02:10 | * | Guest10 quit (Client Quit) |