<< 30-03-2025 >>

00:31:07FromDiscord<.tokyovigilante> sent a code paste, see https://paste.rs/afQQ2
00:31:25FromDiscord<.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:27FromDiscord<.tokyovigilante> Also TIL "fancy enums" are actually called Algebraic Data Types. Really should have done that comp sci degree...
00:35:19FromDiscord<.tokyovigilante> sent a code paste, see https://paste.rs/hk77T
00:48:38FromDiscord<.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:22FromDiscord<.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:54FromDiscord<Elegantbeef> Well no↵(@.tokyovigilante)
01:20:00FromDiscord<Elegantbeef> People now call anything with ML/Rust like 'Enum's as ADT but in reality ADT covers tuples, structs, tagged unions, ....
01:21:14FromDiscord<Elegantbeef> What does this mean?↵(@.tokyovigilante)
01:25:53FromDiscord<.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:34FromDiscord<Elegantbeef> Hmph perhaps a `T.init (time: ..., x: ...)`
01:26:40FromDiscord<Elegantbeef> I mean perhaps that's needed
01:28:09FromDiscord<Elegantbeef> Though you should be able to do `T.init(time = ..., x =...)`
02:02:14FromDiscord<litlighilit> As I tested, the higher, lower part is `(3, 680740752671262260)`↵↵maybe `mulx_u64` gives wrong result?↵(@bosinski2023)
03:10:10FromDiscord<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:09FromDiscord<.tokyovigilante> Thanks, will give it a roll shortly.
03:15:39*rockcavera quit (Remote host closed the connection)
03:22:09FromDiscord<Elegantbeef> Notice now that's the wrong @nycto
03:23:02FromDiscord<__nycto__> Ooooo, I do love that
04:33:07FromDiscord<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:41FromDiscord<Elegantbeef> Use `typedesc` as the first parameter
04:33:52FromDiscord<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:03FromDiscord<heysokam> In reply to @Elegantbeef "Use `typedesc` as the": that only solves the 2nested case, right? or am i missing your point
04:35:12FromDiscord<Elegantbeef> It solves N number of cases
04:35:22FromDiscord<heysokam> have a simple example?
04:42:24FromDiscord<Elegantbeef> sent a code paste, see https://paste.rs/J5hYq
04:43:39FromDiscord<heysokam> I see
04:43:57FromDiscord<heysokam> Yea, the modules solution is a lot clearer, I'm afraid 😦
04:44:29FromDiscord<Elegantbeef> Both suck, but so do namespaces so alas
04:44:56FromDiscord<heysokam> namespaces are good for clarity/explicitness, though
04:45:43FromDiscord<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:29FromDiscord<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:12FromDiscord<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:27FromDiscord<Elegantbeef> I don't know about nimble but `--path` is for that
06:04:40FromDiscord<Elegantbeef> I think there is a localdeps command
06:04:43FromDiscord<heysokam> Yeah but that solves the local part
06:04:57FromDiscord<heysokam> I was thinking about the publishing the package part
06:06:31FromDiscord<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:33FromDiscord<heysokam> I might do the subdir url part, yea↵do you have a tiny example of how that could work?
06:07:55FromDiscord<nasuray> https://nim-lang.github.io/nimble/use-packages.html
06:08:46FromDiscord<nasuray> There is a short section on subdirs on that page.
06:09:10FromDiscord<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:15FromDiscord<heysokam> oh didn't know about `subdir`. tyty
06:10:03FromDiscord<Elegantbeef> Odd that it's a query parameter what if my git forge uses query parameters and `subdir` is one of them! 😛
06:10:57FromDiscord<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:01FromDiscord<nasuray> In reply to @Elegantbeef "Odd that it's a": Throw away that git forge
06:12:17FromDiscord<nasuray> I specifically utilized the subdir approach because I dislike how nimble treats hybrid packages that are used as dependencies.
06:12:41FromDiscord<heysokam> how does it do it?
06:16:06FromDiscord<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:06FromDiscord<heysokam> oh I see. yea makes sense if the binary is not tools, but in your case it makes no sense
06:18:25FromDiscord<heysokam> is the path of the subdir relative to the root's srcDir?
06:18:42FromDiscord<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:59FromDiscord<nasuray> In reply to @heysokam "is the path of": I think?
06:19:45FromDiscord<heysokam> yea nimble for localdev is pain 😦
06:19:59FromDiscord<heysokam> worked great, but now its in a really weird state
06:20:08FromDiscord<heysokam> unless it was fixed recently and I missed it
06:24:05FromDiscord<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:10FromDiscord<Elegantbeef> `line.scanf("$i.$i.$i", major, min, patch)` 😄
06:25:50FromDiscord<heysokam> what about the `-name+build` optional parts at the end?
06:26:13FromDiscord<Elegantbeef> The what? 😄
06:26:49FromDiscord<heysokam> https://github.com/heysokam/confy/blob/f5b4d5d0f81114778f3feb3cf38433ed5a92b0e5/src/confy/tools/version.ts#L60
06:26:52FromDiscord<Elegantbeef> that's `line.scanf("$i.$i.$i$+", major, min, patch, otherGubbons)`
06:27:00FromDiscord<Elegantbeef> I was mostly joking wit h the "the what"
06:27:03FromDiscord<heysokam> but its optional
06:27:33FromDiscord<heysokam> both could or could-not be there, but still need capturing to their relevant spot
06:27:50FromDiscord<Elegantbeef> Right the above does the trick
06:29:05FromDiscord<heysokam> sent a code paste, see https://paste.rs/bhivk
06:29:19FromDiscord<Elegantbeef> Whoops `$.`
06:29:42FromDiscord<Elegantbeef> God damn it it's `$`
06:29:51FromDiscord<heysokam> its major.minor.patch.?-name-valid?+build-valid
06:30:07FromDiscord<Elegantbeef> Right after parsing it you now need to ensure the `otherGubbons` is valid
06:30:22FromDiscord<Elegantbeef> But who uses the other gubbons, bad people that's who
06:30:31FromDiscord<heysokam> I do for dev builds
06:30:45FromDiscord<Elegantbeef> You really set me up for an easy "I rest my case"
06:30:55FromDiscord<heysokam> 😄
06:31:22FromDiscord<heysokam> can scanf have optional parts where they are resolved to `""` if they are not there?
06:31:32FromDiscord<Elegantbeef> Yes you can write your own matchers
06:31:46FromDiscord<Elegantbeef> `$` for instance can match to a 0 length string
06:31:59FromDiscord<heysokam> well, that's what the "use the given regex" part entered the chat. I don't want to reinvent
06:32:41FromDiscord<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:35FromDiscord<heysokam> Is there any real alternative to exceptions?
07:51:26*cmc75 joined #nim
07:53:01cmc75Hello!
07:53:01cmc75Has 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:17FromDiscord<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:52FromDiscord<morgan (ping with reply)> In reply to @heysokam "Is there any real": result types which store the error in the return value
08:10:14FromDiscord<Elegantbeef> Nope converters are hellish creations
08:10:20FromDiscord<morgan (ping with reply)> darn
08:11:49FromDiscord<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:52FromDiscord<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:14FromDiscord<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:24FromDiscord<morgan (ping with reply)> i might open a proposal for that
08:14:42FromDiscord<Elegantbeef> Would be nicer if converters didn't exist 😄
08:14:51FromDiscord<Elegantbeef> Converters are hell on earth for dispatching
08:18:52FromDiscord<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:23FromDiscord<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:33FromDiscord<morgan (ping with reply)> yea that's fair
08:20:46FromDiscord<heysokam> I'd argue not even templates, but just for context
08:20:49FromDiscord<morgan (ping with reply)> im removing the converter i added that i thought would fix it at least
08:21:23FromDiscord<morgan (ping with reply)> i have some for int to float conversion for math that i think are worth keeping
08:21:43FromDiscord<heysokam> oof, then 100% be explicit for that
08:21:51FromDiscord<heysokam> math issues are hell to track
08:22:03FromDiscord<morgan (ping with reply)> yeah i guess that makes sense
08:22:38FromDiscord<morgan (ping with reply)> i like the idea of not needing to change up code to use it with vector math
08:22:58FromDiscord<morgan (ping with reply)> i could set up macros for generating math with conversions built in
08:23:13FromDiscord<morgan (ping with reply)> and maybe also set up a compile option to disable them
08:23:16FromDiscord<heysokam> you can always create `func ` for that
08:23:32FromDiscord<heysokam> I believe they can be overloaded
08:23:41FromDiscord<morgan (ping with reply)> yes
08:24:20FromDiscord<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:45FromDiscord<heysokam> are you aware of `treeform/vmath` btw?
08:24:52FromDiscord<morgan (ping with reply)> probably
08:24:57FromDiscord<heysokam> he already did all of that
08:25:14FromDiscord<morgan (ping with reply)> i had already written some of this and decided to stick it off in its own library
08:25:26FromDiscord<heysokam> ic
08:25:58FromDiscord<heysokam> might be worth contributing the missing parts to vmath. its the most used math library on nim, afaik
08:26:04FromDiscord<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:29Amun-Rabeastarss: that's data protection api, you'd have to export backup dpapi keys
08:26:40FromDiscord<beastarss> wdym?
08:27:08Amun-Rawdim by what?
08:27:13FromDiscord<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:40FromDiscord<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:52FromDiscord<beastarss> but i dont know if peopel have reverse engineered that encryption and recreated it
08:28:10FromDiscord<heysokam> do I need to add `func f (thing :var T)` to an argument if `T` is a `ref object`? 🤔
08:28:24Amun-Rabeastarss: ah, I mean it's designed to work that way; unless there's a bug somewhere
08:57:44*derpydoo joined #nim
09:01:45FromDiscord<heysokam> Was there any existing `turn any object into string` function already in stdlib?
09:02:00FromDiscord<heysokam> No need for fancy formatting, its just for print debugging
09:06:41FromDiscord<odexine> `repr`?
09:32:48FromDiscord<heysokam> sent a code paste, see https://paste.rs/gp40K
09:33:22FromDiscord<heysokam> (edit) "https://paste.rs/vBsaT" => "https://paste.rs/OJEWZ"
09:37:13*rockcavera joined #nim
09:37:40Amun-Radon't use "new" for custom proc
09:40:49Amun-Rathat example wasn't compileable, I added a few things: https://dpaste.com/B8BJUXU9K
09:42:25Amun-Raplay.nim returns 500 on upload
09:49:14FromDiscord<heysokam> ah it seems like it was using an enum instead of a typedesc
09:49:38FromDiscord<heysokam> I've done that `new` custom before, and it worked. but I never used an enum
09:49:50FromDiscord<heysokam> I guess it didn't overload 🤔
09:50:26Amun-RaI used new once for a single arg proc and it shot me in the foot ;)
09:53:10FromDiscord<heysokam> I've used it a lot. but always with typedesc
09:58:20FromDiscord<heysokam> new is not the problem
09:58:25FromDiscord<heysokam> it still segfaults
09:58:42FromDiscord<heysokam> what else did you change, Amun-Ra?
10:01:32*ntat quit (Quit: leaving)
10:08:57FromDiscord<heysokam> ok, it was none of that. it was `const dbg = debugEcho` 🤦‍♂️
10:09:05FromDiscord<heysokam> the code was fine
10:11:03FromDiscord<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:33FromDiscord<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:48FromDiscord<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:54FromDiscord<kapendev> This is just how nim works. Kinda similar to Haxe lang.
11:51:25*amadaluzia joined #nim
11:52:32FromDiscord<zumi.dxy> at first it would seem like "oh, how lame"↵but it is actually its superpower
11:53:24FromDiscord<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:21FromDiscord<zumi.dxy> if you really care about implementation detail: <https://github.com/arnetheduck/nlvm>
12:02:35FromDiscord<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:56FromDiscord<lainlaylie> the executables produced by nim do not require the user to have a c compiler installed
12:04:50FromDiscord<lainlaylie> there is much else to be said but i'll leave it to someone more tactful than me...
12:06:16FromDiscord<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:22FromDiscord<lainlaylie> no
12:06:31FromDiscord<kapendev> Even with C you need an extra linker program.
12:06:44FromDiscord<emanresu3> My operating system comes with a C compiler so I never notice this issue
12:07:32FromDiscord<lainlaylie> if you go spend a week writing c programs you'll quickly see that nim is in fact quite good
12:12:40FromDiscord<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:16FromDiscord<atlas1905> I see that to have gcc work in Windows, one further needs MinGW 🙂
12:19:42FromDiscord<odexine> MinGW provides gcc in the first place
12:21:57FromDiscord<atlas1905> Ok, so for the 92 MiB nim 2.2.2 I installed the 173 MiB dependency MinGW and gcc in it
12:21:59FromDiscord<odexine> I believe you can use msvc if you really want to
12:22:07FromDiscord<atlas1905> And still the same error of compiler not found
12:22:30FromDiscord<odexine> Did you restart your shell because your PATH doesn’t update unless you do
12:23:55FromDiscord<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:15FromDiscord<odexine> Does calling gcc manually work
12:24:38FromDiscord<atlas1905> Nope, here is the problem...
12:25:15FromDiscord<atlas1905> Does this damn thing require an OS reboot 🙂
12:27:00FromDiscord<rakgew> usually a change of path env var just needs a new shell start on win
12:27:20FromDiscord<rakgew> any shell started befor will not know about the change anv var
12:34:36FromDiscord<heysokam> This is a major usability issue on Windows
12:35:15FromDiscord<heysokam> Thats the very reason I started creating `confy` and `get.Lang`, in order to remove the platform dependent pain points
12:35:32FromDiscord<atlas1905> In reply to @heysokam "This is a major": I completely agree
12:35:41FromDiscord<heysokam> For experienced devs... sure, non issue. For new people, it sucks majorly
12:37:35FromDiscord<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:43FromDiscord<heysokam> pretty much, yea
12:38:20FromDiscord<lainlaylie> so are we still at trying to get gcc on path? or is there another problem?
12:38:26FromDiscord<heysokam> beginner phase is the most difficult phase, and people treat it like its nothing
12:38:43FromDiscord<atlas1905> In reply to @lainlaylie "so are we still": Still there, haha
12:38:56FromDiscord<heysokam> @atlas1905 how far on the main instructions are you?
12:39:07FromDiscord<heysokam> also, installing manually or with choosenim?
12:39:37FromDiscord<atlas1905> Uncompressed manually from 2.2.2 zip file. I love portable softwares
12:39:51FromDiscord<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:02FromDiscord<heysokam> In reply to @atlas1905 "Uncompressed manually from 2.2.2": very not recommend, because of mingw
12:40:15FromDiscord<heysokam> use choosenim and then use `finalize.exe`
12:40:29FromDiscord<atlas1905> In reply to @lainlaylie "how did you add": I added it to user PATH variable
12:40:44FromDiscord<lainlaylie> and restarted cmd and it's not there?
12:40:53FromDiscord<atlas1905> Yes
12:41:05FromDiscord<lainlaylie> is this a standalone cmd or are you inside vscode or something?
12:41:06FromDiscord<heysokam> can you run it manually from the path?
12:41:25FromDiscord<heysokam> like `path/to/nim.exe --version`
12:41:50FromDiscord<heysokam> also, I insist on choosenim
12:42:15FromDiscord<atlas1905> In reply to @lainlaylie "is this a standalone": Standalone, from Win OS
12:42:56FromDiscord<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:05FromDiscord<lainlaylie> does mingw show up when you do `echo %PATH%`?
12:43:38FromDiscord<atlas1905> In reply to @lainlaylie "does mingw show up": Yes, "c:\MinGW\bin\;"
12:44:27FromDiscord<atlas1905> It is right at the end. Maybe OS needs restart, but I cannot restart now
12:44:28FromDiscord<lainlaylie> truly vexing
12:44:34FromDiscord<lainlaylie> it shouldn't need a restart
12:44:59FromDiscord<atlas1905> Maybe i should add nim to the system variable PATH, not the user one?
12:45:10FromDiscord<lainlaylie> no need
12:48:03FromDiscord<zumi.dxy> In reply to @lainlaylie "it shouldn't need a": at most a log-out and then a log back in
12:48:45FromDiscord<odexine> It shouldn’t need that either
12:49:08FromDiscord<lainlaylie> i mean, it's there when we do `echo %PATH%`, that means it's there, right?
12:49:19FromDiscord<lainlaylie> is gcc.exe in fact in `c:\MinGW\bin`?
12:50:23FromDiscord<emanresu3> do `gcc --version` and `nim --version` both work now?
12:52:39FromDiscord<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:08FromDiscord<lainlaylie> `var t: T` does not give you default values
12:53:27FromDiscord<heysokam> what about `var t = T()`
12:53:28FromDiscord<odexine> Defaults and zeroed are different
12:53:36FromDiscord<lainlaylie> In reply to @heysokam "what about `var t": yes default values
12:53:47FromDiscord<heysokam> well that's not what I'm finding
12:53:51FromDiscord<heysokam> am I missing something?
12:53:57FromDiscord<lainlaylie> please show code
12:55:13FromDiscord<atlas1905> sent a long message, see https://paste.rs/Qk49m
12:55:29FromDiscord<lainlaylie> uh...
12:55:39FromDiscord<heysokam> sent a code paste, see https://paste.rs/mbnod
12:57:14FromDiscord<heysokam> (edit) "https://paste.rs/w63vT" => "https://paste.rs/yG3ba"
12:57:44FromDiscord<heysokam> (edit) "https://paste.rs/3XZTG" => "https://paste.rs/tjmHe"
12:57:58FromDiscord<heysokam> it works if I do `.default`, but I always thought that was not needed
12:58:09FromDiscord<odexine> Build target doesn’t set the default for config
12:58:22FromDiscord<heysokam> never coded much after they got into release, so not sure if doing something dummy
12:58:44FromDiscord<lainlaylie> my brain is not registering this formatting...
12:58:49FromDiscord<heysokam> In reply to @odexine "Build target doesn’t set": it did at some point
12:58:54FromDiscord<odexine> In reply to @lainlaylie "my brain is not": It takes a while
12:59:17FromDiscord<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:30FromDiscord<heysokam> well, they sure are confusing
13:00:47FromDiscord<heysokam> I was assuming `T()` is equivalet to `T.default()`, but its not behaving the same
13:00:54FromDiscord<lainlaylie> sent a code paste, see https://paste.rs/SGeEL
13:01:15FromDiscord<heysokam> Well, I might have changed and pasted a fixed version
13:01:22FromDiscord<heysokam> but at some point it was not behaving
13:03:08FromDiscord<heysokam> oh i see
13:03:54FromDiscord<heysokam> so apparently initializing `BuildTarget` with just `result.other = blabla; etc`, and not setting `result.cfg` does make them empty
13:05:00FromDiscord<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:12FromDiscord<lainlaylie> if i understood that correctly, yes, `result` is initially zero, not default
13:05:25FromDiscord<heysokam> yea, that's what tripped me
13:05:38FromDiscord<odexine> Same semantics of variables yes
13:06:57FromDiscord<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:32FromDiscord<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:46FromDiscord<kapendev> Does Nim have bindings to the C std?
14:36:51*coldfeet joined #nim
14:44:00FromDiscord<heysokam> Some of the Nim stdlib uses C's functions internally. But its only parts and not exposed
14:44:19FromDiscord<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:43FromDiscord<kapendev> Ah, thanks.↵Random, but Tsoding will not be happy about this if he ever tries Nim without GC hehe.
15:09:32FromDiscord<fabric.input_output> strings literals are a bit annoying otherwise it's pretty easy
15:44:45*derpydoo joined #nim
15:57:32FromDiscord<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:05FromDiscord<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:46FromDiscord<TFed> hi, there is there an official way to install the nim on guix?
18:57:57FromDiscord<TFed> a channel or smth
18:58:58FromDiscord<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:39FromDiscord<TFed> because it looks like guix and nim are not talking with each other🤔
19:10:40FromDiscord<TFed> all examples or code i find outdated in period of 2 or 3 years
19:10:40FromDiscord<TFed> guix install gave me nim 1.6.2 by default😕 so i had to isntall it on my own
19:10:40FromDiscord<TFed> all examples or code i that found was a bit outdated some 2 or 3 years
19:13:47FromDiscord<TFed> would be great if there are any guix users, that got some tips for nim 🙂
19:15:36FromDiscord<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:25FromDiscord<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:22FromDiscord<TFed> yup true, i'm installing it now
19:39:22FromDiscord<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:50FromDiscord<TFed> so maybe i missed smth, but yeah after full upgrade, 2.2.2 is actually showed up in the package list
19:43:42FromDiscord<TFed> probably i need to upgrade and reconfigure system few more times, to get to latest versions
19:43:45FromDiscord<TFed> probably i need to upgrade and reconfigure system few more times, to get to the latest versions
19:43:51FromDiscord<TFed> probably i needed to upgrade and reconfigure system few more times, to get to the latest versions
19:51:31FromDiscord<TFed> thanks anyway, i just was worring cuz i didn't had time for it 😄
19:51:35FromDiscord<TFed> everything works
19:58:29*xet7 quit (Quit: Leaving)
20:04:51*xet7 joined #nim
20:14:35FromDiscord<TFed> actually it started to return the same error
20:14:39FromDiscord<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:00FromDiscord<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)