02:07:26 | * | rockcavera quit (Remote host closed the connection) |
03:51:04 | * | alexdaguy joined #nim |
04:13:39 | * | ntat joined #nim |
05:04:55 | FromDiscord | <heysokam> sent a code paste, see https://play.nim-lang.org/#pasty=jyFxRDiD |
05:06:09 | FromDiscord | <leorize> it said what it said |
05:06:16 | FromDiscord | <leorize> you deref a nil |
05:09:35 | FromDiscord | <heysokam> but there is no alloc? |
05:10:04 | FromDiscord | <leorize> you don't have to alloc to deref nil |
05:10:28 | FromDiscord | <heysokam> I don't follow |
05:10:32 | FromDiscord | <leorize> it will be a lot easier if you can link the code |
05:11:39 | FromDiscord | <heysokam> In reply to @leorize "it will be a": https://github.com/heysokam/mini.nim/blob/c9bac0ff9b26bf5d3f9d7487a64c883ab21aa4d7/src/mini/codegen/c.nim#L101 |
05:12:03 | FromDiscord | <heysokam> It reports that line, but its actually failing in every usage of `Module` |
05:12:17 | FromDiscord | <heysokam> if that line wasn't there, it would also fail |
05:12:31 | FromDiscord | <heysokam> with the same error, but on a different location |
05:12:42 | FromDiscord | <Elegantbeef> Stack corruption |
05:12:59 | FromDiscord | <heysokam> but how/why? 🤔 |
05:14:41 | FromDiscord | <Elegantbeef> Perhaps it's an issue with Nim and named return optimisation |
05:16:51 | FromDiscord | <leorize> feels a bit weird |
05:17:05 | FromDiscord | <leorize> the code is not tricky, so codegen bug is unexpected |
05:17:19 | FromDiscord | <leorize> sokam\: try adding `--linedir:off` and see what clang tells you |
05:20:43 | FromDiscord | <heysokam> @leorize same as before, but reports the C code instead of nim symbols https://media.discordapp.net/attachments/371759389889003532/1376792211093721098/e.txt?ex=68369d2a&is=68354baa&hm=26678e7f4d392327599b08683002dddba074898023bafbc75b4ca6bb9ede4922& |
05:21:21 | FromDiscord | <leorize> oh wow this is wild |
05:21:40 | FromDiscord | <Elegantbeef> eq copy erroring on strings |
05:22:07 | FromDiscord | <Elegantbeef> Compiler error or stack corruption, that is the question |
05:23:07 | FromDiscord | <leorize> I don't see FFI so unlikely |
05:24:21 | FromDiscord | <leorize> try `--opt:none` I guess |
05:24:33 | FromDiscord | <leorize> weed out UB |
05:24:56 | FromDiscord | <heysokam> sent a code paste, see https://play.nim-lang.org/#pasty=ITkWSRQf |
05:27:19 | FromDiscord | <leorize> can you upload `@mmini@[email protected]` and `@mmini@[email protected]`? |
05:27:40 | FromDiscord | <heysokam> yep, sec |
05:28:14 | FromDiscord | <leorize> `@mmini@[email protected]` and `@mmini@[email protected]` specifically |
05:28:14 | FromDiscord | <Elegantbeef> Imagine the bridge dying in the middle of talking |
05:28:24 | FromDiscord | <leorize> ikr |
05:28:40 | FromDiscord | <heysokam> https://media.discordapp.net/attachments/371759389889003532/1376794211713814589/mminiscodegen.nim.c?ex=68369f07&is=68354d87&hm=870a1b3046a5c5d072660f86c122d577d2f6aad93fd41db0fedc8bf542227bf9& https://media.discordapp.net/attachments/371759389889003532/1376794212019867719/mminiscodegensc.nim.c?ex=68369f07&is=68354d87&hm=e8e675b10e422a66882d994828751bd41f28056aa65f6ec926841002eb3a4e22& |
05:29:53 | FromDiscord | <heysokam> oh wait, you said `types` |
05:30:09 | FromDiscord | <leorize> nope you got the right files |
05:30:13 | FromDiscord | <leorize> found your issue |
05:30:29 | FromDiscord | <leorize> https://github.com/heysokam/mini.nim/blob/c9bac0ff9b26bf5d3f9d7487a64c883ab21aa4d7/src/mini/codegen/types.nim#L20-L25 |
05:30:33 | FromDiscord | <leorize> guess what you forgot to do? |
05:30:56 | FromDiscord | <heysokam> no |
05:30:57 | FromDiscord | <Elegantbeef> Heh |
05:31:02 | FromDiscord | <heysokam> hence why I asked |
05:31:09 | FromDiscord | <Elegantbeef> `result = a` |
05:31:46 | FromDiscord | <leorize> nim mutable borrows are not very safe |
05:32:06 | FromDiscord | <Elegantbeef> `--strictDefs:on` then suddenly error is caught at CTE |
05:32:36 | FromDiscord | <heysokam> In reply to @leorize "nim mutable borrows are": had no idea. great to know |
05:32:46 | FromDiscord | <Elegantbeef> But then all your `var a: A` code fails compilation and you need to do `var a = A.default` |
05:33:00 | FromDiscord | <leorize> don't let anyone tell you that nim is memory-safe, it's not \:p |
05:33:58 | FromDiscord | <heysokam> where is `strictDefs` documented? can't find it on the `nimc` page 🤔 |
05:34:14 | FromDiscord | <Elegantbeef> https://nim-lang.org/docs/manual_experimental.html#strict-definitions-and-nimout-parameters |
05:34:24 | FromDiscord | <heysokam> I'm all for the most strict compiler, so happy to apply that |
05:34:48 | FromDiscord | <Elegantbeef> Well it's a bit annoying like I said you have to now do `var a = T.default` instead of `var a: T` |
05:35:02 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=PQyjlaVQ |
05:35:15 | FromDiscord | <heysokam> oh that's really epic |
05:35:21 | FromDiscord | <heysokam> why is it experimental? |
05:35:29 | FromDiscord | <Elegantbeef> Cause it breaks code |
05:35:35 | FromDiscord | <Elegantbeef> And it's against what most people like |
05:35:51 | FromDiscord | <heysokam> kk. I prefer it, so should be good |
05:35:53 | FromDiscord | <Elegantbeef> Being able to do `var accumulator: seq[T]` is nice |
05:36:31 | FromDiscord | <Elegantbeef> Araq was going to make it the default but there was some response that it's not great cause it breaks code |
05:40:19 | FromDiscord | <heysokam> wait, is it not a cli option? |
05:42:55 | FromDiscord | <heysokam> oh, its actually: `--experimental:strictDefs`. it doesn't work as a cli arg |
05:46:43 | FromDiscord | <leorize> you can try `--warningAsError:ProveInit` |
05:47:30 | FromDiscord | <heysokam> what is `ProveInit`? |
05:47:40 | FromDiscord | <heysokam> never seen that warning |
05:48:29 | FromDiscord | <leorize> https://play.nim-lang.org/#pasty=NGuRjmzE |
05:48:36 | FromDiscord | <leorize> switch to the compile view and you'll see the warning |
05:51:44 | FromDiscord | <heysokam> oh that's very useful. is that not what my code should have reported? 🤔 |
06:00:31 | * | thunder joined #nim |
06:05:55 | * | thunder quit (Quit: Leaving) |
06:11:27 | * | ntat quit (Quit: leaving) |
06:17:57 | * | Amun-Ra quit (Ping timeout: 248 seconds) |
06:24:39 | FromDiscord | <heysokam> what function should I use to filter some fields of an enum, turn the values into strings, and then apply to a const sequence, without needing a for loop?↵I'm currently using `const thing = @["one", "two"].mapIt("thing."&it)`, but I want the values to be coming from the enum instead |
06:27:28 | * | ntat joined #nim |
06:31:00 | FromDiscord | <heysokam> const thing = nim.TMsgKind.items.toSeq↵ .filterIt(it.symbolName.startsWith("warn"))↵ .mapIt("--warningAsError:" & $it) |
06:32:56 | FromDiscord | <heysokam> sent a code paste, see https://play.nim-lang.org/#pasty=bBqCzrHz |
07:00:17 | * | skippy8 joined #nim |
07:23:47 | * | Amun-Ra joined #nim |
07:40:43 | FromDiscord | <Arseniy> /rules |
09:31:13 | FromDiscord | <hamdy34> In reply to @hamdy34 "when settings a debugger": Stepping works only if I compile with GCC but then name mangling messes up inspecting variables directly in the editor. If I compile with clang, there are not `pdb` files generated and this error shows up, I'm compiling `-g --debugger:native` |
10:00:28 | * | beholders_eye joined #nim |
10:22:10 | * | skippy8 quit (Quit: WeeChat 4.5.2) |
10:39:21 | FromDiscord | <griffith1deadly> In reply to @hamdy34 "Stepping works only if": use lldb |
11:11:16 | * | beholders_eye quit (Ping timeout: 276 seconds) |
11:19:36 | FromDiscord | <xtrayambak> sent a code paste, see https://play.nim-lang.org/#pasty=KiFHAlPH |
11:27:45 | FromDiscord | <nnsee> In reply to @xtrayambak "Is there a way": something like this? https://stackoverflow.com/a/74077789 |
11:29:00 | FromDiscord | <xtrayambak> In reply to @nnsee "something like this? https://stackoverflow.com/a/74": Yep, thanks. |
11:29:02 | FromDiscord | <xtrayambak> seems to work |
11:29:15 | FromDiscord | <nnsee> which solution are you using specifically? |
11:29:17 | FromDiscord | <nnsee> just interested |
11:29:24 | FromDiscord | <xtrayambak> In reply to @nnsee "which solution are you": hlaaftana's solution |
11:29:36 | FromDiscord | <xtrayambak> I'm doing really silly stuff and it absolutely requires me to pass static strings |
11:43:40 | FromDiscord | <hamdy34> In reply to @griffith1deadly "use lldb": breakpoints don't work at all with lldb with neither gcc nor clang |
11:43:55 | FromDiscord | <hamdy34> I think mostly because I'm on windows |
11:44:21 | FromDiscord | <hamdy34> breakpoints only work on gcc with gdb |
11:45:50 | FromDiscord | <hamdy34> clang does not generate the main.pdb file I expected like when I compile C++ |
12:06:03 | * | PMunch__ joined #nim |
12:06:38 | * | PMunch__ quit (Remote host closed the connection) |
12:08:27 | * | PMunch_ quit (Ping timeout: 244 seconds) |
12:33:03 | FromDiscord | <aintea> sent a code paste, see https://play.nim-lang.org/#pasty=JILQMxJs |
12:33:57 | FromDiscord | <aintea> (edit) removed "sent" | removed "code paste, see https://play.nim-lang.org/#pasty=AafxhbKt" |
12:34:21 | FromDiscord | <aintea> (edit) "senta ... " added "code paste, see https://play.nim-lang.org/#pasty=VEYqdFRX" |
13:00:09 | FromDiscord | <griffith1deadly> In reply to @aintea "Why is it that": case stmt list is special in ast |
13:00:24 | FromDiscord | <aintea> how sad |
13:00:33 | FromDiscord | <janakali> sent a code paste, see https://play.nim-lang.org/#pasty=ndhegFJS |
13:00:48 | FromDiscord | <aintea> We need unsafe macros that do not require the body of the macro to be valid Nim |
13:01:19 | FromDiscord | <aintea> I am thirsty for power |
13:02:45 | FromDiscord | <griffith1deadly> you can make `match` a macros and map body to case stmt manually |
13:05:47 | FromDiscord | <griffith1deadly> In reply to @hamdy34 "breakpoints don't work at": with my experience gdb works good only with gcc and mingw, lldb with clang and visual studio debugger with vcc |
13:07:46 | FromDiscord | <griffith1deadly> i dont know about extension variants, i use only with command line |
13:07:52 | FromDiscord | <hamdy34> only gdb + gcc worked with breakpoints, lldb + clang does not work on windows, and both gcc and clang does not work with vs debugger. Only the breakpoints though |
13:08:12 | FromDiscord | <hamdy34> the only issue with gdb + gcc is name mangling |
13:08:46 | FromDiscord | <griffith1deadly> In reply to @hamdy34 "the only issue with": https://github.com/cooldome/Nim-gdb |
13:08:48 | FromDiscord | <hamdy34> I still don't know how to make it use vcc but that's the last thing I have not tried |
13:08:51 | FromDiscord | <griffith1deadly> isnt that helps? |
13:09:28 | FromDiscord | <griffith1deadly> or any new version of that (old repo, i remember something new) |
13:09:50 | FromDiscord | <hamdy34> no not really |
13:09:59 | FromDiscord | <griffith1deadly> https://github.com/nim-lang/Nim/blob/devel/bin/nim-gdb |
13:10:02 | FromDiscord | <griffith1deadly> it's |
13:13:54 | FromDiscord | <griffith1deadly> In reply to @hamdy34 "I still don't know": `--cc:vcc` and make sure you have installed visual studio |
13:14:34 | FromDiscord | <griffith1deadly> and vcc can be weird with compile errors compared to clang and gcc |
13:14:52 | FromDiscord | <griffith1deadly> like long string embedding with staticRead |
13:22:31 | FromDiscord | <hamdy34> vcc is working way better than gcc |
13:23:16 | FromDiscord | <hamdy34> debug starts quickly, no weird line jumps, compiles slightly faster (I assume they use clang under the hood) |
13:23:50 | FromDiscord | <hamdy34> name mangling still happens I can't just hover over variables in the editor but at least it does not error out when I hover |
13:25:04 | FromDiscord | <hamdy34> names are readable at least, my vars a, b, c, d, and e shows as a_1, b_1, c_1, d_1, and e_1 which is acceptable https://media.discordapp.net/attachments/371759389889003532/1376914103385329737/image.png?ex=68370eb0&is=6835bd30&hm=706ac950d06de22b2ce0656bbf39df5e7f8575b33232ddbe587a75b43ad09e3a& |
13:29:15 | FromDiscord | <griffith1deadly> In reply to @hamdy34 "debug starts quickly, no": vcc == msvc which is different abi that clang and gcc |
13:29:30 | * | beholders_eye joined #nim |
13:30:39 | FromDiscord | <griffith1deadly> clang has msvc abi and clang-cl exists that just wrapper around msvc and clang |
13:31:08 | FromDiscord | <griffith1deadly> but for clang with msvc you need download special version |
13:32:06 | FromDiscord | <griffith1deadly> for big projects clang produce faster and smaller binaries than msvc |
13:32:18 | FromDiscord | <griffith1deadly> but msvc still default abi for windows |
13:32:40 | FromDiscord | <hamdy34> I plan to default to clang for release and use msvc for debug because it works better on windows + vscode |
13:33:10 | FromDiscord | <hamdy34> still, nim compiles way too slow |
13:33:56 | FromDiscord | <hamdy34> The actual compilation step doesn't seem to take more than 1 or 2 seconds, but this step takes 4-5 seconds for some reason https://media.discordapp.net/attachments/371759389889003532/1376916332217630852/image.png?ex=683710c3&is=6835bf43&hm=e66c921798cc943060deeffbe1ced100394453688780ae03135157a1930ef598& |
13:34:10 | FromDiscord | <hamdy34> then the debugger adds 3~4 seconds to start? |
13:36:09 | FromDiscord | <griffith1deadly> all time between `Hint:` and messages prefixes with `[cc]` is nim compilation, `Hint:` is nim vm for parsing .nims compile config, then macros, then nim to c/cpp, `[cc]` is c/cpp compiler |
13:36:14 | FromDiscord | <hamdy34> for comparsion, pure C++ project generated by cmake which runs `ninja` to compile takes 1 or 2 seconds and the debugger starts almost instantly |
13:36:31 | FromDiscord | <griffith1deadly> In reply to @griffith1deadly "all time between `Hint:`": this can be more hard pipeline but in general it is |
13:38:11 | FromDiscord | <hamdy34> is the next version of nim (nim3 or nimony) going to be any faster though? |
13:38:36 | FromDiscord | <hamdy34> maybe futhark is adding some overhead let me check without it |
13:38:56 | FromDiscord | <griffith1deadly> more-more faster because of incremental compilation and as i remember there will be no nim vm, there will be plugins mechanism |
13:40:25 | FromDiscord | <hamdy34> I'm looking forward to that |
13:40:32 | FromDiscord | <hamdy34> nim seems like the perfect language for gamedev |
13:40:59 | FromDiscord | <hamdy34> feels like supercharged lua with a lot of C++ control |
13:41:05 | FromDiscord | <griffith1deadly> nim is perfect language for all use cases, but not very polished currently |
13:41:14 | FromDiscord | <griffith1deadly> for example tooling is very bad |
13:41:29 | FromDiscord | <hamdy34> yeah I got used to setting up my vscode for C++ |
13:41:33 | FromDiscord | <hamdy34> so it wasn't that bad |
13:41:33 | FromDiscord | <griffith1deadly> like lsp/nimsuggest, but in general just nimsuggest |
13:42:19 | * | xutaxkamay_ joined #nim |
13:42:38 | FromDiscord | <griffith1deadly> In reply to @hamdy34 "nim seems like the": also nim can be used with unreal/godot/whatever you want |
13:42:56 | FromDiscord | <griffith1deadly> nimforue/gtextnim and like so |
13:43:06 | FromDiscord | <hamdy34> If it can compile to C, I can throw at anything |
13:43:43 | FromDiscord | <griffith1deadly> for example i do some cheats for unreal engine with c++ backend and internal use case with sdk generators for c++ with importcpp |
13:43:43 | * | xutaxkamay quit (Ping timeout: 245 seconds) |
13:43:44 | * | xutaxkamay_ is now known as xutaxkamay |
13:43:44 | FromDiscord | <griffith1deadly> :nim1: |
13:43:54 | FromDiscord | <hamdy34> anyway, how far are we from nim 3? |
13:44:04 | FromDiscord | <hamdy34> end of year? |
13:44:15 | FromDiscord | <griffith1deadly> i think it's like a year or two |
13:44:37 | FromDiscord | <griffith1deadly> because we need port entire stdlib and keep compability with packages |
13:44:46 | FromDiscord | <griffith1deadly> as i remember by forum |
13:46:07 | FromDiscord | <hamdy34> I found this https://media.discordapp.net/attachments/371759389889003532/1376919397318398066/IMG_20250527_164553.jpg?ex=6837139e&is=6835c21e&hm=56b489bd7e2c90a80d8ce7c3455abea6e227bc4545c8f71c355f6bebb3a6e117& |
13:46:37 | FromDiscord | <hamdy34> That was published 3rd of May so a few weeks ago |
13:47:20 | FromDiscord | <griffith1deadly> :nim1: |
13:47:41 | FromDiscord | <griffith1deadly> also nim 3 will have new gc algorithm |
13:48:08 | FromDiscord | <griffith1deadly> that by default can be used with threads normally without nim 2 faults |
14:00:54 | FromDiscord | <griffith1deadly> https://github.com/nim-lang/Nim/pull/24968/commits/9d436123da00987436c354c5a965792eaf115592 |
14:01:08 | FromDiscord | <griffith1deadly> seems like nim devel already provide nimony |
14:01:23 | FromDiscord | <griffith1deadly> https://forum.nim-lang.org/t/13014 |
14:18:39 | * | beholders_eye quit (Quit: WeeChat 4.5.1) |
14:28:12 | * | beholders_eye joined #nim |
15:34:07 | FromDiscord | <aintea> You're telling me we're getting Nim 3 this autumn |
15:34:10 | FromDiscord | <aintea> Insane |
15:35:46 | FromDiscord | <aintea> I really want to participate to developing Nim but I have no idea where to start |
15:36:29 | FromDiscord | <aintea> Most issues opened on the github are really low level and not about the stdlib |
15:40:44 | FromDiscord | <lainlaylie> depending on which part of the compiler youre working on it can feel a lot like macro development |
15:41:02 | FromDiscord | <lainlaylie> i've made exactly one (1) contribution to nim itself and it was a stdlib bug that i personally was running into |
15:41:35 | FromDiscord | <aintea> Also since Nimony might release soon enough (according to the image above) should I continue making a rustlings-like learning support ? |
15:42:18 | FromDiscord | <aintea> Do you know if the language will 100% change or will the things that change be minor (so we'll keep the basics such as var, let, const, func, proc, if/else, case, etc...) |
15:43:20 | FromDiscord | <lainlaylie> i think our mighty godking made a forum post explaining the compatibility plan but my impression is the idea is for nimony to eventually reach a high level of compatibility with nim 2 |
15:47:11 | FromDiscord | <lainlaylie> btw i would love to see some documentation on this claimed autum release date |
15:48:31 | FromDiscord | <lainlaylie> https://nim-lang.org/araq/nimony.html |
15:50:02 | FromDiscord | <hamdy34> I plan to use nim as a "better c" so I don't care much about a complete std as long as nimony works well |
15:50:36 | FromDiscord | <lainlaylie> nim is certainly better than c but im not sure if its a better c |
15:51:05 | FromDiscord | <hamdy34> yes but it integrates well with C as far as I tested |
15:51:23 | FromDiscord | <hamdy34> I wanted nothing but SDL headers converted to nim with futhark |
15:51:50 | FromDiscord | <hamdy34> Any missing functionality I can implement directly in a .c source file and use it in a nim binding |
15:52:49 | FromDiscord | <lainlaylie> no doubt |
15:56:49 | FromDiscord | <lainlaylie> In reply to @leorize "guess what you forgot": another bug that would have been caught if strictDefs was made default. sad! |
16:09:18 | FromDiscord | <aintea> In reply to @hamdy34 "I plan to use": Think of Nim as a baby of Rust and Python |
16:09:23 | FromDiscord | <aintea> The best of both worlds |
16:09:39 | FromDiscord | <aintea> Security, extensibility, fast to execute and fast to write |
16:10:00 | FromDiscord | <aintea> with Nim 3 I think it will be even more true |
16:14:16 | FromDiscord | <litlighilit> +1↵I recently tried implementing `match` just like Python's, but `case` with non-`of` node children are forbidden↵(@aintea) |
16:14:17 | FromDiscord | <Elegantbeef> Just use a `static string` 😄 |
16:14:41 | FromDiscord | <hamdy34> In reply to @aintea "Think of Nim as": coming from C++ and Lua, it also seems to have the best of both worlds |
16:14:42 | FromDiscord | <aintea> no, doesn't look good |
16:14:54 | FromDiscord | <aintea> I know it would be the same but I can't bother to use static strings |
16:15:30 | FromDiscord | <aintea> In reply to @hamdy34 "coming from C++ and": I really think it is more of a rust since the default memory management (ORC) really resembles borrowing and ownership (if it is not the exact same) |
16:17:51 | FromDiscord | <litlighilit> And... may `end` be excluded of keywords? Not used anyway.↵e.g. it stops `print(end="")` from compiling. (you cannot declare a identifier named `end`) 😅 |
16:18:14 | FromDiscord | <Elegantbeef> "PRs welcome" |
16:19:20 | FromDiscord | <litlighilit> well, hope araq approve.↵Just ask in advance if `end` remains for some reasons. |
16:19:35 | FromDiscord | <Elegantbeef> Nope it was for syntax skins |
16:22:19 | FromDiscord | <aintea> I have a PR |
16:22:29 | FromDiscord | <aintea> How about we remove `:` and replace it by `{` |
16:22:40 | FromDiscord | <Elegantbeef> No that's dumb |
16:22:41 | FromDiscord | <aintea> no closing curly bracket |
16:22:46 | FromDiscord | <aintea> just an opening one |
16:22:59 | FromDiscord | <Elegantbeef> Makes sets and table constructors ambiguous! |
16:23:10 | FromDiscord | <aintea> I forgot they were used for that |
16:23:14 | FromDiscord | <aintea> it was a joke also |
16:23:29 | FromDiscord | <aintea> I almost never use pre-filled tables |
16:23:43 | FromDiscord | <Elegantbeef> Well it's technically an array constructor |
16:24:09 | FromDiscord | <Elegantbeef> `{'a': 100, 'b': 200}` makes a `array[2, (char, int)]` so it's not useless |
16:35:47 | FromDiscord | <heysokam> In reply to @litlighilit "And... may `end` be": use `End` |
16:37:44 | FromDiscord | <marciojalber> Hello, I installed nim on my machine (Windows 11), but nimble doesn't run. When I run it, it takes about 3 seconds and returns to the prompt with no response. Can anyone help me? |
16:38:10 | FromDiscord | <heysokam> In reply to @aintea "Why is it that": because `of` is not a statement, and `thing:` opens a block, which wants a statement |
16:38:27 | FromDiscord | <heysokam> (edit) "statement" => "list of statements" |
16:39:32 | FromDiscord | <heysokam> In reply to @marciojalber "Hello, I installed nim": how are you running it? and how did you install it? |
16:52:13 | FromDiscord | <Robyn [She/Her]> In reply to @litlighilit "+1 I recently tried": make a typed macro and make `of` an infix function in that scope... can `of` be overridden? idk |
17:01:06 | * | alexdaguy quit (Quit: aaa) |
17:14:37 | FromDiscord | <aintea> I take back everything I said about macros |
17:14:40 | FromDiscord | <aintea> They are so good |
17:17:53 | FromDiscord | <lainlaylie> they are as good as the skill of the person writing them |
17:19:14 | Amun-Ra | they are way better than the person writing them |
17:50:31 | * | beholders_eye quit (Quit: WeeChat 4.5.1) |
18:33:15 | FromDiscord | <marciojalber> In reply to @heysokam "how are you running": Eu baixei o pacote do site https://nim-lang.org/install_windows.html, descompactei em C:\ e adicionei a pasta do nim\bin às variáveis de ambiente. Quando eu digito nim --version funciona, mas quando eu digito nimble --version nao funciona. Trava o console por 3 segundos e volta sem resposta |
18:33:27 | FromDiscord | <marciojalber> (edit) "Eu baixei o pacote do site" => "I downloaded the package from" | "descompactei em" => "unzipped it to" | "e adicionei a pasta do" => "and added the" | "às variáveis de ambiente. Quando eu digito" => "folder to the environment variables. When I type" | "funciona, mas quando eu digito" => "it works, but when I type" | "nao funciona. Trava o" => "it doesn't work. It freezes the" | "por" => "for" | "segundos e volta sem respost |
18:35:11 | FromDiscord | <sOkam (alt)> is it possible for an object to contain a field whose type is that same object, without using ref/ptr? |
18:36:15 | FromDiscord | <pmunch> Nope |
18:36:22 | FromDiscord | <pmunch> It would be infinitely big |
18:36:56 | FromDiscord | <marciojalber> The problem is that I didn't even use it to compile or download dependencies. I can't even check the version (nimble --version). I believe there may be some Windows protection, but I couldn't solve it. |
18:37:24 | FromDiscord | <pmunch> @marciojalber sounds very much like some AV blocking it |
18:40:04 | FromDiscord | <sOkam (alt)> can the root object be nonref while the field is a ref? |
18:42:57 | FromDiscord | <griffith1deadly> In reply to @eebahn "can the root object": yes |
18:46:25 | FromDiscord | <sOkam (alt)> it does compile, it seems. that's useful ↵https://play.nim-lang.org/#pasty=dQVOMsid |
18:48:38 | FromDiscord | <marciojalber> In reply to @pmunch "<@383292674192703498> sounds very much": True, there is a V Sentinel Agent running and can't stop the service. I'll check later on another machine. For now, thanks |
19:02:08 | FromDiscord | <nnsee> In reply to @marciojalber "True, there is a": unfortunately, there are a lot of false positives for nim binaries on windows |
19:03:14 | FromDiscord | <nnsee> windows doesn't seem to like mingw specifically. using msvc reduces the false positive detection rate drastically |
19:17:50 | * | beholders_eye joined #nim |
19:48:23 | * | ntat quit (Quit: leaving) |
19:57:35 | Amun-Ra | if only msvc was as easy to use as mingw |
19:58:21 | Amun-Ra | has anyone tested whether packing an exe with upx helps reducing false positives? |
20:09:56 | FromDiscord | <heysokam> In reply to @Amun-Ra "has anyone tested whether": I tested with zigcc, and the answer is yes it removes them↵the issue seems to be with mingw-nim |
20:14:28 | Amun-Ra | hmm |
20:18:15 | FromDiscord | <heysokam> you can test yourself with the typescript bootstrapper used by confy, which compiles Nim with zigcc:↵https://github.com/heysokam/confy/tree/master/src/caller↵haven't tested the code on windows just yet, but I made it cross-platform so in theory it should "just work" 🤞 |
20:18:46 | FromDiscord | <nnsee> In reply to @Amun-Ra "if only msvc was": isn't it literally just --cc:vcc? |
20:32:47 | * | amadaluzia joined #nim |
20:38:12 | Amun-Ra | nnsee: the last time I used msvc was a long time ago and it required to run special .cmd in order to setup the env |
20:40:58 | FromDiscord | <pmunch> What does "Scanning" mean for Nimble? |
21:09:34 | * | amadaluzia quit (Ping timeout: 260 seconds) |
21:09:58 | * | amadaluzia joined #nim |
22:18:20 | * | rockcavera joined #nim |
23:03:35 | * | xet7 joined #nim |
23:04:17 | FromDiscord | <Robyn [She/Her]> In reply to @aintea "I take back everything": macros are good when they add to the elegance of code |
23:04:27 | FromDiscord | <Robyn [She/Her]> bad when your code is more macro than not |
23:04:41 | FromDiscord | <Robyn [She/Her]> also bad when it tries to do too much at on |
23:04:43 | FromDiscord | <Robyn [She/Her]> once |
23:21:15 | * | beholders_eye quit (Ping timeout: 252 seconds) |
23:46:23 | FromDiscord | <aintea> I mean instantiating a tree with a macro is good |
23:46:39 | FromDiscord | <aintea> Especially with the indented nature of Nim |
23:46:52 | FromDiscord | <aintea> Also I take back everything I said about macros |
23:46:57 | FromDiscord | <aintea> They are awful and I hate them |
23:49:38 | FromDiscord | <zumi.dxy> "you'll love templates and macros until you read a stack trace" |
23:52:19 | FromDiscord | <griffith1deadly> In reply to @zumi.dxy ""you'll love templates and": LMAO |
23:52:24 | FromDiscord | <griffith1deadly> so true |