00:00:16 | FromDiscord | <heysokam> In reply to @phobikinesis "hello i just started": consider [confy](https://github.com/heysokam/confy) for this goal. it was made with cross compilation as a main priority |
00:00:50 | FromDiscord | <heysokam> if you dont want to use it, then https://github.com/enthus1ast/zigcc is your second best option |
00:02:00 | FromDiscord | <heysokam> the manual way of setting up mingw is subpar, plus it only works for windows. with zigcc as the compiler you get full support from all targets to all targets |
00:09:00 | * | Jjp137 quit (Quit: Leaving) |
00:17:55 | * | Jjp137 joined #nim |
01:10:22 | * | rockcavera joined #nim |
01:41:01 | * | ftajhii joined #nim |
03:25:13 | * | alexdaguy joined #nim |
03:31:54 | * | Jjp137 quit (Quit: Leaving) |
03:32:05 | * | Jjp137 joined #nim |
04:21:11 | * | tiorock joined #nim |
04:21:11 | * | tiorock quit (Changing host) |
04:21:11 | * | tiorock joined #nim |
04:21:11 | * | rockcavera is now known as Guest3076 |
04:21:11 | * | Guest3076 quit (Killed (zirconium.libera.chat (Nickname regained by services))) |
04:21:12 | * | tiorock is now known as rockcavera |
04:23:17 | * | tiorock joined #nim |
04:23:17 | * | rockcavera is now known as Guest3171 |
04:23:17 | * | Guest3171 quit (Killed (platinum.libera.chat (Nickname regained by services))) |
04:23:17 | * | tiorock is now known as rockcavera |
05:13:55 | FromDiscord | <TӨMΛ ☠> What is a value of uninitialised variable? E.g. will `var token: string` be `""` or `None`? |
05:15:10 | FromDiscord | <TӨMΛ ☠> I'm trying to check if the variable was initialised eventually within the program flow, but somewhat I can't think of how to do it |
05:16:46 | FromDiscord | <Elegantbeef> `token != default(string)` or just `token != ""` |
06:05:00 | * | rez joined #nim |
06:10:50 | FromDiscord | <TӨMΛ ☠> Thank you 🙏 |
06:24:29 | * | alexdaguy quit (Quit: rip laptop) |
06:46:19 | * | rez quit (Quit: much snoozes...) |
07:55:47 | * | andy-turner joined #nim |
08:13:51 | FromDiscord | <Phil> In reply to @aintea "WAIT I CAN USE": 😄 This is how I write macros all the time. The macro is just the frontend within which things are wired together, the actual work is all done in procs |
08:14:03 | FromDiscord | <Phil> (edit) "In reply to @aintea "WAIT I CAN USE": 😄 This is how I write macros all the time. The macro is just the frontend within which things are wired together, the actual work ... is" added "(validating the input, writing the output)" |
09:26:19 | * | andy-turner quit (Read error: Connection reset by peer) |
09:26:26 | * | andy-turner joined #nim |
09:32:29 | * | andy-turner quit (Read error: Connection reset by peer) |
09:32:42 | * | andy-turner joined #nim |
09:33:10 | * | tiorock joined #nim |
09:33:10 | * | tiorock quit (Changing host) |
09:33:10 | * | tiorock joined #nim |
09:33:10 | * | rockcavera is now known as Guest8879 |
09:33:10 | * | Guest8879 quit (Killed (osmium.libera.chat (Nickname regained by services))) |
09:33:10 | * | tiorock is now known as rockcavera |
09:33:36 | * | andy-turner quit (Max SendQ exceeded) |
09:34:06 | * | andy-turner joined #nim |
09:35:15 | * | tiorock joined #nim |
09:35:15 | * | rockcavera is now known as Guest6284 |
09:35:15 | * | Guest6284 quit (Killed (tungsten.libera.chat (Nickname regained by services))) |
09:35:15 | * | tiorock is now known as rockcavera |
09:54:28 | * | andy-turner quit (Read error: Connection reset by peer) |
09:54:29 | * | andy-turner_ joined #nim |
10:02:09 | * | andy-turner_ quit (Read error: Connection reset by peer) |
10:07:28 | FromDiscord | <TӨMΛ ☠> sent a code paste, see https://play.nim-lang.org/#pasty=ZQAwlTzf |
10:25:33 | FromDiscord | <janakali> https://nim-lang.org/docs/strutils.html#cmpIgnoreCase%2Cstring%2Cstring↵for a second question: get a list of files with `walkDir.toseq()`, then try to match them with `cmpIgnoreCase` in text file order.↵That's not very efficient, but should be fine in most cases. If you need something faster - normalize both filenames to lowercase and use hashtables for lookups. |
10:26:13 | FromDiscord | <janakali> that's what I'd do |
10:32:58 | FromDiscord | <TӨMΛ ☠> That's very useful proc, thank you 🙏 |
10:54:48 | * | kenran joined #nim |
10:57:09 | * | ShallowPeak joined #nim |
11:01:49 | FromDiscord | <TӨMΛ ☠> Okay it's actually wildly useful, I set up very clean and minimalistic check. Thank you once again ^^ |
11:11:23 | * | ShallowPeak left #nim (#nim) |
11:12:04 | * | tiorock joined #nim |
11:12:04 | * | tiorock quit (Changing host) |
11:12:04 | * | tiorock joined #nim |
11:12:04 | * | rockcavera quit (Killed (iridium.libera.chat (Nickname regained by services))) |
11:12:04 | * | tiorock is now known as rockcavera |
11:14:11 | * | tiorock joined #nim |
11:14:11 | * | rockcavera is now known as Guest9745 |
11:14:11 | * | tiorock is now known as rockcavera |
11:17:07 | * | Guest9745 quit (Ping timeout: 252 seconds) |
12:56:07 | * | kenran quit (Remote host closed the connection) |
12:59:08 | * | kenran joined #nim |
13:04:31 | FromDiscord | <heysokam> How would I wrap a C union with Nim? |
13:05:32 | FromDiscord | <heysokam> sent a code paste, see https://play.nim-lang.org/#pasty=cTMzKOUO |
13:09:05 | FromDiscord | <leorize> sent a code paste, see https://play.nim-lang.org/#pasty=IJxstdeB |
13:09:51 | FromDiscord | <heysokam> ty |
13:11:57 | FromDiscord | <heysokam> are nim variants compatible with C tagged unions?↵how are they created internally? |
13:14:30 | FromDiscord | <heysokam> sent a code paste, see https://play.nim-lang.org/#pasty=CqQUEUWs |
13:18:40 | * | amadaluzia joined #nim |
13:29:34 | * | kenran quit (Remote host closed the connection) |
13:31:21 | * | kenran joined #nim |
13:44:43 | * | xet7 joined #nim |
13:51:20 | * | beholders_eye joined #nim |
13:56:33 | * | amadaluzia_ joined #nim |
13:56:45 | * | amadaluzia quit (Read error: Connection reset by peer) |
14:00:17 | * | kenran quit (Remote host closed the connection) |
14:19:17 | FromDiscord | <leorize> no↵(@heysokam) |
14:19:41 | FromDiscord | <leorize> if you dig into the codegen I have no doubt you can create equivalent C |
14:20:12 | FromDiscord | <leorize> but a problem here is that the format is not well-specified |
14:20:17 | FromDiscord | <leorize> so you risk it being pulled under you in the future |
14:20:35 | FromDiscord | <leorize> just use accessors to access them on C side if you need to |
14:21:00 | FromDiscord | <sOkam (alt)> wdym by accessors? |
14:21:47 | FromDiscord | <leorize> `Triangle get_triangle()` and co. |
14:22:09 | FromDiscord | <sOkam (alt)> also to clarify, I'm writing the C myself, just want to keep compatibility in mind |
14:23:57 | FromDiscord | <leorize> then just generate whatever that can implement the code you want |
14:25:31 | FromDiscord | <sOkam (alt)> yea, but I'm looking at C tagged unions for the first time, after used to nim and zig, and wanted to see if I can design the C side in a nice and compatible way |
14:26:25 | FromDiscord | <leorize> I'm not sure what's the goal here |
14:31:47 | FromDiscord | <sOkam (alt)> design a C api that I can then easily wrap for nim |
14:32:24 | FromDiscord | <sOkam (alt)> where the C side will use tagged unions |
14:36:43 | FromDiscord | <leorize> you can represent any tagged union in C in nim |
14:37:00 | FromDiscord | <leorize> just don't use the native object variants |
14:48:09 | FromDiscord | <sOkam (alt)> kk |
14:54:58 | FromDiscord | <aintea> Finally finished the library, I now can go back to make a new side project that I will not finish |
15:02:23 | FromDiscord | <hawkey5212> In reply to @leorize "no (<@186489007247589376>)": Coming to nim from rust, the lack of associated data on enum variants is something that I sorely miss. |
15:29:49 | FromDiscord | <heysokam> In reply to @aintea "Finally finished the library,": You are being brutally hard on yourself. Coding takes a long time |
15:30:05 | FromDiscord | <aintea> I know, but I never finish projects lmao |
15:30:16 | FromDiscord | <aintea> I know it's a recurring problem amongst developers and I know that |
15:30:24 | FromDiscord | <aintea> but a library is a side project too so I guess I finally finished it |
15:32:15 | FromDiscord | <heysokam> In reply to @aintea "I know it's a": Finishing long work is a recurring problem amongst people, not devs |
15:32:33 | FromDiscord | <heysokam> It just so happens that coding takes a ton of time, so its evidently clear here |
15:33:01 | FromDiscord | <aintea> also the joke is that I wanted to make a todo list CLI app, and I needed a library that didn't exist so I made one and the library itself is 12x more work that the CLI app |
15:33:35 | FromDiscord | <heysokam> If you are working consistently every day, or every week even, you are already doing what 90% don't... so have some patience 🙂 |
15:34:11 | FromDiscord | <heysokam> In reply to @aintea "also the joke is": Yea, I'm aware. I was just pointing at your self-targeted language, since your words shape what you feel |
15:34:42 | FromDiscord | <aintea> yeah it was more on the joke tone |
15:34:48 | FromDiscord | <aintea> but I appreciate your words |
15:40:54 | FromDiscord | <leorize> my tip is to just put goals up so you can finish enough of something |
15:57:28 | * | beholders_eye quit (Ping timeout: 245 seconds) |
16:07:45 | * | amadaluzia_ quit (Ping timeout: 248 seconds) |
16:14:19 | * | amadaluzia joined #nim |
16:33:00 | * | beholders_eye joined #nim |
17:14:50 | * | beholders_eye quit (Ping timeout: 272 seconds) |
18:11:37 | FromDiscord | <hamdy34> In reply to @aintea "also the joke is": I'm literally learning how to create my own programming language just because I got bored writing C++ |
18:21:21 | * | beholders_eye joined #nim |
18:59:00 | FromDiscord | <rakgew> does anybody know in cligen, how I can attach the app version?↵so that it comes up, when the cli app is run with `--version`.↵currently I cannot find it in the docs and am unable to understand from the source where to attach the version. |
18:59:08 | FromDiscord | <rakgew> I can use their proc `fromNimble` to get the version from the nimble file, which works nicely - but where would the version need to go? |
20:30:09 | * | beholders_eye quit (Ping timeout: 260 seconds) |
20:44:56 | FromDiscord | <heysokam> In reply to @rakgew "does anybody know in": on your app, or on the compiler? |
20:45:02 | FromDiscord | <heysokam> the question is a bit unclear |
21:53:52 | FromDiscord | <aintea> In reply to @hamdy34 "I'm literally learning how": That's so funny honestly |
21:54:36 | FromDiscord | <aintea> "let me do that side quest real quick" and then that side quest is 5 times the size of the main story |
22:04:47 | FromDiscord | <explosiveend> In reply to @aintea "also the joke is": ayy, `nclap` looks nicee, might give it a try on one of my cli projects |
22:05:16 | FromDiscord | <explosiveend> In reply to @hawkey5212 "Coming to nim from": gotta start enjoying that enum + obj variant combo til that RFC gets through :pain: |
22:05:52 | FromDiscord | <explosiveend> unless u try like `fusion` or whatever |
22:06:09 | FromDiscord | <explosiveend> dont remmeber if they have smth for that |
22:06:18 | FromDiscord | <explosiveend> (edit) "remmeber" => "remember" |
22:06:44 | FromDiscord | <hawkey5212> In reply to @explosiveend "gotta start enjoying that": I honestly don't have much confidence in the project as a whole, if I'm being honest. It's one of those things that just doesn't make sense in a "modern" lang to not have. |
22:09:29 | FromDiscord | <explosiveend> ? |
22:09:33 | FromDiscord | <explosiveend> did bro change his mind 😭 |
22:16:53 | FromDiscord | <Phil> In reply to @aintea "I know, but I": Projects are never finished |
22:16:55 | FromDiscord | <Phil> There's always something |
22:17:31 | FromDiscord | <Phil> scope-creep is eternal |
22:20:25 | FromDiscord | <aintea> In reply to @isofruit "Projects are never finished": Unfortunately |
22:20:44 | FromDiscord | <aintea> But it is a pleasure to work on my library, except when I have to macro |
22:23:54 | FromDiscord | <aintea> In reply to @explosiveend "ayy, `nclap` looks nicee,": Have fun using it, if you have anything to say ping me or open an issue |
22:38:00 | * | adigitoleo quit (Ping timeout: 256 seconds) |
22:40:06 | * | adigitoleo joined #nim |
22:52:29 | * | oprypin quit (Quit: Bye) |
22:52:39 | * | oprypin joined #nim |
22:54:19 | FromDiscord | <nasuray> In reply to @rakgew "I can use their": You set it on the clCfg object. So `clCfg.version = "0.1.0"` |
22:58:26 | FromDiscord | <nasuray> In reply to @rakgew "does anybody know in": The tests for cligen are also a great resource for how to do various things with it https://github.com/c-blake/cligen/blob/master/test/Version.nim#L11 |
23:00:01 | * | marcus quit (Remote host closed the connection) |
23:00:43 | * | marcus joined #nim |
23:25:43 | FromDiscord | <aintea> sent a code paste, see https://play.nim-lang.org/#pasty=LaCLJaCr |
23:26:11 | FromDiscord | <aintea> (edit) "https://play.nim-lang.org/#pasty=KzEMVrrX" => "https://play.nim-lang.org/#pasty=SsKhRvrC" |
23:27:25 | FromDiscord | <lainlaylie> i think the latter is more conventional, the former feels like file2 onwards should be positional arguments |
23:28:40 | * | amadaluzia quit (Quit: ZNC 1.9.1 - https://znc.in) |
23:29:36 | * | amadaluzia joined #nim |