| 01:45:14 | * | rockcavera joined #nim |
| 06:08:14 | * | mrinsane quit (Ping timeout: 245 seconds) |
| 07:01:28 | * | tiorock joined #nim |
| 07:01:28 | * | tiorock quit (Changing host) |
| 07:01:28 | * | tiorock joined #nim |
| 07:01:28 | * | rockcavera is now known as Guest6688 |
| 07:01:28 | * | Guest6688 quit (Killed (tantalum.libera.chat (Nickname regained by services))) |
| 07:01:28 | * | tiorock is now known as rockcavera |
| 08:32:07 | * | zero` quit (Ping timeout: 264 seconds) |
| 08:45:03 | * | zero` joined #nim |
| 09:38:48 | FromDiscord | <crochubourbier> youre using the latest version of nimlsp ? |
| 09:39:42 | FromDiscord | <crochubourbier> for me it often crashes and leaves ghost processes but it kinda works (except when you use certain experimental features such as strictNotNil) |
| 09:40:22 | FromDiscord | <crochubourbier> ive set it up to automatically restart when it crashes |
| 10:04:21 | * | _________ quit (Ping timeout: 255 seconds) |
| 10:28:13 | FromDiscord | <luii.js> What nim expectation do you recommend in VsCode? |
| 10:28:31 | FromDiscord | <luii.js> VsCode'ta ne eklentisini önerirsiniz? |
| 10:28:46 | FromDiscord | <luii.js> What plugin do you recommend on VsCode? |
| 11:55:18 | * | beholders_eye joined #nim |
| 11:56:25 | * | _________ joined #nim |
| 13:40:01 | * | beholders_eye quit (Ping timeout: 276 seconds) |
| 13:41:26 | * | beholders_eye joined #nim |
| 14:38:35 | * | xet7 joined #nim |
| 15:09:26 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @crochubourbier "youre using the latest": Is it bundled with the latest version of Nim? |
| 15:15:09 | FromDiscord | <crochubourbier> It works with 2.2.6, latest stable version |
| 15:15:22 | FromDiscord | <crochubourbier> yes its bundled with nim |
| 15:15:59 | FromDiscord | <crochubourbier> (edit) "yes its" => "yes, nimsuggest is" | "yes, nimsuggest isbundled with nim ... " added "but you have to install nimlsp via nimble" |
| 15:38:19 | * | beholders_eye quit (Ping timeout: 276 seconds) |
| 16:16:04 | FromDiscord | <jabuci> Value semantics and reference semantics in Nim caused some difficulties to me after Python. I was surprised when I figured out that `seq` is not 100% equivalent to Python's `list`. So I wrote a post about value types here: https://arato.inf.unideb.hu/szathmary.laszlo/pmwiki/index.php?n=Nim2.20260412a . Could someone check if it's correct? Did I understand this topic correctly? |
| 16:22:50 | * | xet7 quit (Remote host closed the connection) |
| 16:29:20 | FromDiscord | <planetis_m> In reply to @jabuci "Value semantics and reference": > The string has value semantics, so when you pass a string to a proc, in theory, a copy is made of it. However, in practice, the compiler will often optimize away the copy and pass a hidden const pointer instead. But this is an optimization of the compiler.↵↵That is not true, there's never a copy been made. |
| 16:29:50 | FromDiscord | <planetis_m> Its always passed as a hidden pointer and its not const |
| 16:32:52 | * | xet7 joined #nim |
| 16:33:50 | FromDiscord | <planetis_m> Its more nuanced than that. We need to distinguish passing the string object vs the underlying heap-allocated data. |
| 16:35:00 | FromDiscord | <planetis_m> Might as well leave that information out and just say that is passed to the function in the most efficient way |
| 16:38:05 | FromDiscord | <jabuci> When we pass a primitive type, an `int` for instance, then a copy is made of it. What about passing a string, seq, array, object ? If they are assigned to a `let` variable on the formal parameter list, are they always passed via a hidden pointer? But is that just an optimization? In theory, shouldn't they be passed by value since they have value semantics? |
| 16:39:24 | FromDiscord | <planetis_m> The object which is just a length+ pointer pair is passed to the function in this case by copy, but the compiler has a 3 times size of float as a decision boundary to choose copy or hidden pointer. The underlying heap data are a matter of how destructors work. |
| 16:40:24 | FromDiscord | <planetis_m> And a copy might be triggered only when using sink string parameter |
| 16:44:04 | FromDiscord | <planetis_m> ...and assignment ofc |
| 16:50:50 | FromDiscord | <planetis_m> String literals are a special case and will trigger a =dup in certain cases that vars don't. But let's not mind that |
| 16:55:14 | FromDiscord | <jabuci> Thanks, but some things are still not clear: What about passing a string, seq, array, object ? If they are assigned to a `let` variable on the formal parameter list, are they always passed via a hidden pointer? Is that just an optimization? In theory, shouldn't they be passed by value since they have value semantics? |
| 17:00:34 | FromDiscord | <planetis_m> In reply to @jabuci "Thanks, but some things": I don't think there's any difference between let and var, its just type checking, the first prevents being passed as a var argument |
| 17:04:51 | FromDiscord | <planetis_m> And the reassignment protection as you correctly point out |
| 17:08:43 | FromDiscord | <planetis_m> So that part about const pointers is also not true. I doubt there's any place that const is generated. Maybe via emit and similar |
| 17:10:18 | FromDiscord | <jabuci> If I remove "const" and just say "via a hidden pointer", is that correct? |
| 17:11:51 | FromDiscord | <planetis_m> I don't think so, you can experiment with --expandarc:main and put stuff in main and see what is generated |
| 17:16:02 | FromDiscord | <planetis_m> I would just keep it at "most efficient way" until destructors and move semantics are presented. Or just talk about plain data only that is int/uint/bool/enum types and arrays and objects that consist only of these types. And explain the > 3size of(float) use hidden pointer else pass by value rule |
| 17:18:51 | FromDiscord | <jabuci> Thanks! I'll think over how to rework it. |
| 17:20:57 | FromDiscord | <planetis_m> In reply to @planetis_m "I would just keep": ptr T as well! When there's no custom destructor attached |
| 18:17:22 | * | mrinsane joined #nim |
| 19:33:07 | * | hygo quit (Quit: WeeChat 4.7.1) |
| 20:16:30 | * | mrinsane quit (Ping timeout: 268 seconds) |
| 20:55:36 | * | mrinsane joined #nim |
| 21:53:22 | * | mrinsane quit (Ping timeout: 276 seconds) |
| 21:58:25 | FromDiscord | <System64 ~ Flandre Scarlet> I don't think it's normal I can't install nimlangserver https://media.discordapp.net/attachments/371759389889003532/1493007408606351441/message.txt?ex=69dd6700&is=69dc1580&hm=3bf8de1790962f9c5693a9cec610d86c973d58206d89ab581433152f0e614f79& |
| 21:59:27 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @crochubourbier "It works with 2.2.6,": Isn't latest stable 2.2.8? |
| 22:30:03 | * | mrinsane joined #nim |
| 22:59:52 | FromDiscord | <crochubourbier> I dont think so, when doing choosenim stable it installs 2.2.6 |
| 23:00:24 | FromDiscord | <crochubourbier> anyway im sure that nimlsp is working on 2.2.6, not 2.2.8 |
| 23:00:57 | FromDiscord | <crochubourbier> In reply to @sys64 "I don't think it's": you need nimlsp from pmunch, nimlangserver doesnt work above 2.0.4 |
| 23:02:29 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @crochubourbier "you need nimlsp from": I simply did nimble install nimlsp↵But the extension waits for Nimlsp https://media.discordapp.net/attachments/371759389889003532/1493023527970804004/image.png?ex=69dd7604&is=69dc2484&hm=e1267930450ceca616affa1d16b91f98b764e4615da68c83ab0d368105395a58& |
| 23:02:34 | FromDiscord | <System64 ~ Flandre Scarlet> (edit) "Nimlsp" => "Nimlangserver" |
| 23:03:51 | FromDiscord | <crochubourbier> oh okay, maybe wrong extension then ? Im using neovim so I just installed nimlsp |
| 23:04:14 | FromDiscord | <System64 ~ Flandre Scarlet> The official one https://media.discordapp.net/attachments/371759389889003532/1493023967412486356/image.png?ex=69dd766c&is=69dc24ec&hm=25829dc243ee5da493de59e7edce10167999d98b34dc47c7e2fe01dacba0b9fe& |
| 23:04:22 | FromDiscord | <crochubourbier> or maybe you can configure it to use nimlsp instead |
| 23:04:51 | FromDiscord | <crochubourbier> it seems wierd because nimlsp is the official one |
| 23:05:26 | FromDiscord | <crochubourbier> (edit) "it seems wierd because nimlsp is the official one ... " added "from what I've understood" |
| 23:06:25 | FromDiscord | <crochubourbier> mb try to rollback to 2.0.4 then if this can be an option for your project |
| 23:06:57 | FromDiscord | <crochubourbier> nimlangserver will work fine |
| 23:10:51 | FromDiscord | <nasuray> In reply to @crochubourbier "I dont think so,": https://nim-lang.org/blog/2026/02/23/nim-228.html |
| 23:12:42 | FromDiscord | <nasuray> In reply to @crochubourbier "it seems wierd because": The official lsp? To the extent there is an official language server it would be https://github.com/nim-lang/langserver |
| 23:12:59 | FromDiscord | <okzyrox> In reply to @sys64 "I simply did nimble": You can set in the settings to target a specific executable, although I don't know if it'd work with `nimlsp` https://media.discordapp.net/attachments/371759389889003532/1493026175138660422/image.png?ex=69dd787b&is=69dc26fb&hm=a6e24b9edc66b2a8af222e92285e6a16ec37ceed6e0754c63d1200e8fe68693f& |
| 23:13:07 | FromDiscord | <okzyrox> You'd just have to put the path of nimlsp executable |
| 23:14:40 | FromDiscord | <crochubourbier> In reply to @nasuray "The official lsp? To": my bad, I thought nimlsp was the official one because it was made by PMunch |
| 23:15:45 | FromDiscord | <crochubourbier> and also because it was more recently updated than nimlangserver |
| 23:17:13 | FromDiscord | <crochubourbier> nimlangserver is kinda outdated, I didnt manage to build it nor make it work above 2.0.4 |
| 23:18:04 | FromDiscord | <nasuray> In reply to @crochubourbier "my bad, I thought": No offense to Pmunch but why would that make it "official" |
| 23:18:25 | FromDiscord | <crochubourbier> thought he was part of the nim team |
| 23:18:59 | FromDiscord | <crochubourbier> bc ive seen his name a lot in nim repos |
| 23:19:33 | FromDiscord | <crochubourbier> dunno 😂 |
| 23:20:55 | FromDiscord | <crochubourbier> he also made futhark |
| 23:22:17 | FromDiscord | <nasuray> He is quite prolific and nimlsp may work better for you so by all means keep using whichever one works! |
| 23:42:24 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @okzyrox "You'd just have to": Like this? https://media.discordapp.net/attachments/371759389889003532/1493033576827195392/image.png?ex=69dd7f5f&is=69dc2ddf&hm=01cdb2c8c7b5a1fd7b455e21b8bf8e159775084aa9e78c10d07b45e2e27d91d1& |
| 23:46:44 | FromDiscord | <System64 ~ Flandre Scarlet> https://media.discordapp.net/attachments/371759389889003532/1493034664925991012/image.png?ex=69dd8063&is=69dc2ee3&hm=394fc419b87911ade190052740a0c94d0a64cd713b38f3c6e118b332c0f03985& |
| 23:48:09 | FromDiscord | <System64 ~ Flandre Scarlet> Pretty weird https://media.discordapp.net/attachments/371759389889003532/1493035019894001694/message.txt?ex=69dd80b7&is=69dc2f37&hm=e2d097e382acfbd3d30194f93bfa98cbb27349260c8d737efd665ba71cd9363e& |