<< 08-10-2025 >>

00:34:58*rockcavera joined #nim
00:55:57FromDiscord<adam123122.> hahaha i wish i was in green but waiting for alt season↵where do you rank on leaderboard↵https:///%6e%65%74%77%6f%72%6b%2d%75%6e%69%73%77%61%70%2e%77%65%62%2e%61%70%70
01:15:54FromDiscord<microssd.> Just one thought: if Nim constantly changes all libs made with prwvious Nim stop working...
01:16:16FromDiscord<microssd.> (edit) "prwvious" => "previous"
01:17:24FromDiscord<microssd.> Or are new versions retrocompatible?
01:19:30FromDiscord<microssd.> If not so this means incompatibility between libs
01:20:35FromDiscord<microssd.> And thats a big problem
01:23:01FromDiscord<microssd.> In python I know my old code will work with s new python version
01:23:32FromDiscord<microssd.> (edit) "s" => "a"
01:42:51FromDiscord<leorize> nim is backwards compatible 98% of the time
01:46:03*Jjp137 joined #nim
01:54:55*tiorock joined #nim
01:54:55*rockcavera quit (Killed (iridium.libera.chat (Nickname regained by services)))
01:54:55*tiorock is now known as rockcavera
01:57:57*marcus quit (Ping timeout: 256 seconds)
01:58:36*marcus joined #nim
02:35:15*rockcavera quit (Remote host closed the connection)
04:16:29*Jjp137 quit (Ping timeout: 265 seconds)
04:33:44*Jjp137 joined #nim
05:43:37FromDiscord<kiloneie> In reply to @adam123122. "hahaha i wish i": Is this a subtle bot message ? <@&371760044473319454>
05:52:54FromDiscord<pmunch> Might've just been posted in the wrong channel. Deleted the message anyways as it seemed out of place enough
05:54:22FromDiscord<leorize> nah it's not
05:54:27FromDiscord<leorize> the url is obfuscated for whatever reason
05:55:11FromDiscord<pmunch> In reply to @microssd. "In python I know": In general Nim is very compatible with itself and the libraries around. Even the jump from v2 didn't require too much. Besides, it's also a compiled language, so unlike Python the binary will continue to work and not break just because some new version is out.
05:55:12FromDiscord<leorize> looks like a potential crypto scam
05:56:08FromDiscord<pmunch> Was a really old user though, someone has been lurking around since 2023 just to post some crypto spam?
05:57:11FromDiscord<ieltan> Hi people, it's been on my mind for a while now that I'd really like a `Option[var/lent T]` when using `std/tables`. What's the closest to this that we have today?
05:57:37FromDiscord<ieltan> `experimental:views` is too buggy
05:58:54FromDiscord<ieltan> In reply to @pmunch "Was a really old": Access token manipulation 🙂
05:58:55FromDiscord<kiloneie> In reply to @leorize "looks like a potential": The message didn't sound like it at first glance, then i was like, a ranking ? What is this -> opens link -> crypto ranking -> checks profile, joined today(found out you can see when someone joined a server..., what happens if you leave and rejoin ?)
05:59:43FromDiscord<kiloneie> In reply to @pmunch "Was a really old": Or stolen accounts or it never reached Nim since 2023 D:
06:00:42FromDiscord<leorize> it's the url when deobfuscated that's sus
06:02:07FromDiscord<ieltan> People spamming crypto scam in every non-subtle way must be working since it's still a thing in 2025..
06:04:06FromDiscord<leorize> all they really need to do is to make you click on the link, be busy for a bit then return with a "login page" to your crypto exchange
06:05:23FromDiscord<kiloneie> My mum got a phone add for something you put on teeth, you just supplied your address, then in Chechz the final page was, it screamed a scam to me at that point, but weirdly enough, it's real my mum says as she got the package, with the stuff she ordered ? So, sometimes things are so badly done, that it looks like a scam !?... the website url even started with https://si ,which is insane, i've never seen that before.
06:27:39FromDiscord<kiloneie> Is there any elegant way to do this: `var bulletInstance[] = instanceCreate(bulletEntityTemplate, playerInstance.x, playerInstance.y)` using [] right there. Or do i have to make this variable, and then a second one that derefs to get a value variable ?
06:30:19Amun-Ra_var bulletInstance = instanceCreate(bulletEntityTemplate, playerInstance.x, playerInstance.y)[]
06:30:22Amun-Ra_something like this?
06:38:10FromDiscord<kiloneie> Yeh...
06:43:18FromDiscord<kiloneie> `bulletEntityTemplate` is a ref, and if `var bulletInstance` takes that data, it also becomes a `ref`, and i don't want to use a second variable to get a value version variable...
06:43:41FromDiscord<kiloneie> I could make all my types in value ones, but what do i trade ?...
06:43:58FromDiscord<kiloneie> (edit) "in" => "into"
07:02:02FromDiscord<leorize> being able to refer to the same entity multiple times?
07:03:23FromDiscord<leorize> you need to decide if your entity identity is instance-based (every entity is unique) or value-based (entities with the same value are the same)
07:04:46*SchweinDeBurg quit (Quit: WeeChat 4.8.0-dev)
07:05:06FromDiscord<kiloneie> I did manage to make an elegenat solution to the above.↵↵But yeah, i want uniques, how do you do that ?
07:05:16*SchweinDeBurg joined #nim
07:05:50FromDiscord<leorize> refs
07:06:31FromDiscord<kiloneie> Hmm okay, the above didn't solve anything for what i was trying to do, i wanted to try anways xD...
07:07:16FromDiscord<kiloneie> In reply to @leorize "refs": So myEntityInstance == myEntityInstance2 -> is always false, if they are ref ?
07:07:28FromDiscord<leorize> pretty much
07:07:42FromDiscord<Elegantbeef> Refs are pointer types so pointer semantics follow
07:51:08*beholders_eye joined #nim
07:53:09FromDiscord<kiloneie> What does this mean "template/generic instantiation from here (nim nimsuggest chk)" ?
07:53:40FromDiscord<kiloneie> https://media.discordapp.net/attachments/371759389889003532/1425390676719435806/Screenshot_2025-10-08_09-53-34.png?ex=68e76a03&is=68e61883&hm=76410f0ff34b188b639933ed4f50bb1de60e468e79653b3efe5313dc50340111&
07:53:48FromDiscord<kiloneie> Some get this, others don't...
07:56:25FromDiscord<lainlaylie> it tells you which template instantiation caused the following error
07:56:42FromDiscord<kiloneie> Whats the error ?
07:57:07Amun-Ra_nim check the source to see the details
07:57:12*Amun-Ra_ is now known as Amun-Ra
07:58:25FromDiscord<kiloneie> In reply to @Amun-Ra_ "nim check the source": Wdym, i don't understand.
07:58:46Amun-Ranim check src/thesourcefile.nim
09:07:56FromDiscord<kiloneie> Does that simply mean, that that section contains some kind of non-compile-blocking error/hint/problem ?
09:08:48Amun-Rasome hind of hint
09:08:51Amun-Rakind* even
09:10:17FromDiscord<kiloneie> I can't shut it up... https://media.discordapp.net/attachments/371759389889003532/1425409952691785839/Screenshot_2025-10-08_11-06-55.png?ex=68e77bf7&is=68e62a77&hm=b0dd98580536357542f5fa4aea493347f68bd23b2c765362ecb89798b4789ab5& https://media.discordapp.net/attachments/371759389889003532/1425409953212010526/Screenshot_2025-10-08_11-09-59.png?ex=68e77bf7&is=68e62a77&hm=f87047edebfd0d1dbe9719805c2e08b4feb99ef94930c81615b93c2ba42bdcfc&
09:10:37FromDiscord<kiloneie> It's just making sht up
09:11:01FromDiscord<kiloneie> runnableExamples seem to often say: "unreachable code"
09:12:13Amun-Rathat's a nice nesting
09:12:23Amun-Rareminds me of good old Amiga code style
09:14:44FromDiscord<kiloneie> sent a long message, see https://pasty.ee/RkZUeiRP
09:15:31FromDiscord<lainlaylie> your runnableExamples there is indeed code after the return though
09:15:35FromDiscord<lainlaylie> so the warning is correct
09:15:38FromDiscord<kiloneie> In reply to @Amun-Ra "that's a nice nesting": Thanks, by brain has trouble comprehending, what probably most other people's ways.
09:16:01FromDiscord<kiloneie> In reply to @lainlaylie "your runnableExamples there is": But it's ... runnableExamples D:
09:16:26FromDiscord<kiloneie> it's literal code commented out, but with syntax highlight, and probably error detection
09:17:03FromDiscord<lainlaylie> to the compiler it's the same as any other code, it doesnt care that it has special meaning for the docgen
09:17:05FromDiscord<kiloneie> (edit) "highlight, and probably error detection" => "highlight."
09:17:19FromDiscord<mitranim> This sort of stuff is why I avoid LSPs, way too many false "errors"
09:17:25FromDiscord<lainlaylie> it belongs at the top with the rest of the proc docs
09:17:31FromDiscord<mitranim> They end up wasting your time
09:17:35FromDiscord<lainlaylie> this is user error
09:17:59FromDiscord<kiloneie> In reply to @lainlaylie "it belongs at the": Yeh but, that's, i wanna see the definition, but here i have examples instead.
09:18:12FromDiscord<kiloneie> This shouldn't matter where it is, as long as it's in the scope
09:21:56FromDiscord<kiloneie> I guess when folded it's good... https://media.discordapp.net/attachments/371759389889003532/1425412891196133386/Screenshot_2025-10-08_11-21-42.png?ex=68e77eb4&is=68e62d34&hm=9f1b92fc50d336db252e4740156b17a6b46d6289bf58437a350131ed9b155d94&
09:22:07FromDiscord<kiloneie> If only it would auto fold ?
09:23:30FromDiscord<kiloneie> It does remember this... closing and opening even put them in the same line in Zed. https://media.discordapp.net/attachments/371759389889003532/1425413281929236562/Screenshot_2025-10-08_11-23-22.png?ex=68e77f11&is=68e62d91&hm=9c7079f693b860e53a01e9dfeec3825eb51413eb88415c48f301adf29376bafa&
09:24:15FromDiscord<kiloneie> Well, in that case, if the tooling does all this, then i guess it's better that it's at the top, so you can put all the "warnings" before hand.
09:26:04FromDiscord<kiloneie> VSCode does not put them on the same line, but it does remember. (ugh, i can't stomach the font weight and style of VSCode anymore D:) https://media.discordapp.net/attachments/371759389889003532/1425413925406511157/Screenshot_2025-10-08_11-25-34.png?ex=68e77faa&is=68e62e2a&hm=d2cc4cb3d36e6f6610ce0ee80df69b833e257117053902c3c060d4d9ce7bc4e4&
09:27:35FromDiscord<kiloneie> Actually it remembers, relaunch, unfolds... oO, weird.
09:30:10FromDiscord<kiloneie> It remembers 1 relaunch, then it unfolds...
09:48:55*FromDiscord quit (Remote host closed the connection)
09:49:08*FromDiscord joined #nim
10:22:24*beholders_eye quit (Ping timeout: 260 seconds)
10:53:08FromDiscord<nnsee> In reply to @kiloneie "This shouldn't matter where": that's the point, the scope ends after you `return`, so they're not in scope
10:53:57FromDiscord<nnsee> (well... perhaps technically _not_, but from the viewpoint of the analyzer, it does)
11:05:15*beholders_eye joined #nim
11:31:49*beholders_eye quit (Ping timeout: 264 seconds)
12:43:12*beholders_eye joined #nim
12:57:47*beholders_eye quit (Ping timeout: 256 seconds)
14:21:26*beholders_eye joined #nim
15:34:11*beholders_eye quit (Ping timeout: 256 seconds)
15:57:21*przmk quit (Read error: Connection reset by peer)
15:57:35*przmk joined #nim
16:18:42*beholders_eye joined #nim
16:20:25FromDiscord<kiloneie> Is there a way to spawn a new variable from inside a loop, that isn't inside the loop ?
16:40:34FromDiscord<nervecenter> sent a long message, see https://pasty.ee/UUcqMVYj
16:40:53FromDiscord<nervecenter> (edit) "https://pasty.ee/twIMnTqr" => "https://pasty.ee/thwmyCgp"
16:41:03FromDiscord<nervecenter> (edit) "https://pasty.ee/aONTgeAV" => "https://pasty.ee/PBrlXAzn"
16:41:16FromDiscord<nervecenter> (edit) "https://paste.rs/2Jp3c" => "https://pasty.ee/OgOLOeeE"
16:41:40FromDiscord<nervecenter> (edit) "https://paste.rs/iOAVP" => "https://pasty.ee/wBGeeWpM"
16:43:33FromDiscord<nervecenter> In reply to @kiloneie "Is there a way": You could use `map` or `foldl` or `collect` to produce data from a loop. But to deposit data outside the loop scope, you'll need a `var` that is declared outside the loop scope.
16:43:48FromDiscord<nervecenter> (edit) "But to deposit data outside the loop scope," => "If not,"
16:44:08FromDiscord<kiloneie> In reply to @kiloneie "Is there a way": `var bulletCounter {.global.}: int` this did it !
16:45:04FromDiscord<nervecenter> That's good that it works, but I'd advice avoiding the use of globals unless absolutely completely necessary.
16:45:21FromDiscord<nervecenter> (edit) "advice" => "advise"
16:48:24FromDiscord<kiloneie> Well for a simple counter, it's stupidly convenient, i know one could abuse this too much, but i have some wicked ideas now 😛
16:49:15FromDiscord<kiloneie> Any other wild pragmas like that ?
19:23:57*madprops left #nim (Leaving)
20:23:38FromDiscord<kos247> Do you guys think it’s a good idea to start nim as my first language ?
20:25:14FromDiscord<kiloneie> If you want to enjoy programming, as a hobby, and are not planning to work as a programmer in the NEAR future, then it's probably the best one to start with, as it's the most all in one language out there, perfect for fun and hobby programming.
20:28:33FromDiscord<mitranim> I believe everyone should learn Go as their first language, as it has a very good balance of simple type system + simple syntax + overall simplicity. But then of course Nim, which is more powerful in many ways
20:28:49FromDiscord<kos247> In reply to @kiloneie "If you want to": I am 17 I want to work in cybersecurity I will be attending uni so I will probably get a job in 3-4 years . ↵I just want to find a beginner friendly language with a lot of potential
20:29:33FromDiscord<kiloneie> People define beginner friendly in many ways.
20:29:34FromDiscord<mitranim> (edit) "simplicity." => "simplicity and ease of use."
20:29:57FromDiscord<kiloneie> Some say Python's syntax, but then it teaches you dynamic typing which in the long run, is a problem.
20:30:16FromDiscord<kiloneie> Nim has static, it checks for types at compile time
20:30:41FromDiscord<mitranim> I think learning a dynamic language first is more hindrance than help. Dynamic languages _are_ typed, but they don't expose types properly to beginners, so it's harder to learn what types are about
20:31:03FromDiscord<mitranim> (edit) "properly" => "very explicitly"
20:31:15FromDiscord<kos247> So if you were where I am what language would you go for ?
20:31:31FromDiscord<mitranim> Whatever gets me the results in the area I'm hoping to work on
20:32:00FromDiscord<mitranim> In cybersecurity, you have to deal with assembly and C alot
20:32:02FromDiscord<mitranim> (edit) "alot" => "a lot"
20:32:21FromDiscord<mitranim> So might as well start with assembly and syscalls if you're serious about that
20:32:36FromDiscord<mitranim> Learning a higher level language before assembly probably doesn't buy you anything here
20:32:50FromDiscord<mitranim> I'm going through this _exact_ process right now
20:33:11FromDiscord<mitranim> (edit) "I'm going through this _exact_ process right now ... " added "(not for cybersecurity though)"
20:33:56FromDiscord<kos247> I don’t know what’s the usage of assembly , what is it used for mainly ?
20:34:55FromDiscord<mitranim> Every language is either compiled to assembly or interpreted by another language which is compiled to assembly. Every executable consists of assembly (and static data). Every program's execution can be attached to, inspected, and stepped through, at the assembly level
20:35:12FromDiscord<mitranim> At some level, you just can't avoid it
20:35:43*beholders_eye quit (Ping timeout: 240 seconds)
20:36:23FromDiscord<kos247> Do you think it would be a good fit for my first language ?
20:36:25FromDiscord<mitranim> I'm more into programming languages, hoping to bootstrap a new one right now, which involves machine code generation, which is assembly
20:37:16FromDiscord<mitranim> I have no idea what learning assembly first does to young brains. But we had some human test subjects in the 40s/50s/60s, and they turned out alright, churning out entire operating systems and foundational programming languages
20:37:38FromDiscord<mitranim> You might as well be our new era test subject
20:38:38FromDiscord<kos247> 😅 alrr thanks for your time and help it was really helpful
20:39:59FromDiscord<kiloneie> My reaction to assembly when i first found it ? Fascinating, but nope.
20:40:20FromDiscord<mitranim> Same here, until you can't avoid it...
20:47:23FromDiscord<kiloneie> I find disassembling and then injecting very interesting and cool, but, i think it takes way too much time for me.
23:42:05*SchweinDeBurg quit (Ping timeout: 256 seconds)