<< 19-10-2025 >>

00:44:58*beholders_eye joined #nim
01:26:17FromDiscord<lan_maneiro> is nimlangserver that slow? it takes like 10 seconds to load suggestions...
02:01:30*beholders_eye quit (Ping timeout: 248 seconds)
02:31:58FromDiscord<janakali> in my experience langserver takes ~3s to start on opening new file,↵↵After that, suggestions are almost instant in neovim, but very slow in vscode for some reason.
03:09:31FromDiscord<microssd.> in Python I have venv, what do I have in nim to isolate things?
03:12:35*SchweinDeBurg quit (Quit: WeeChat 4.8.0-dev)
03:15:45*SchweinDeBurg joined #nim
03:47:37FromDiscord<janakali> @microssd. `nimble -l` and atlas https://github.com/nim-lang/atlas
03:47:54FromDiscord<janakali> (edit) "and" => "or"
04:20:47FromDiscord<microssd.> can I install atlas with nimble?
04:38:12FromDiscord<nasuray> In reply to @microssd. "can I install atlas": Yes
04:39:42FromDiscord<microssd.> thanks
04:46:14FromDiscord<janakali> In reply to @microssd. "can I install atlas": atlas should come bundled with nim
04:46:27FromDiscord<microssd.> hmmm... it cant find the package
04:47:52FromDiscord<janakali> try:↵`nimble install https://github.com/nim-lang/atlas`
04:50:17FromDiscord<microssd.> In reply to @janakali "try: `nimble install https://github.com/nim-lang/at": Error: cannot open file: compiler/ast
04:52:33FromDiscord<janakali> ah, then it means you can't install it with nimble 🙁↵did you install Nim with apt ?
04:52:45FromDiscord<microssd.> yes
04:53:14FromDiscord<janakali> can you check if atlas is already installed
04:53:25FromDiscord<microssd.> one sec
04:54:53FromDiscord<microssd.> In reply to @janakali "can you check if": looks like it's not, atlas --version gives an error
04:56:46FromDiscord<janakali> then Ubuntu maintainers didn't bundle atlas with Nim and we need to open issue somewhere.↵if you install Nim with grabnim, Atlas is bundled and available straight away:↵https://forum.nim-lang.org/t/13132
04:57:06FromDiscord<lainlaylie> In reply to @janakali "ah, then it means": that just indicates a broken nim installation, nimble builds atlas just fine
04:57:23FromDiscord<microssd.> I'm trying it on a VM
04:58:05FromDiscord<microssd.> I have build-essential
05:01:39FromDiscord<microssd.> but on my desktop, I dont have atlas either and I installed nim with choosenim or something like it
05:02:13FromDiscord<microssd.> with grabnim how do you update?
05:02:48FromDiscord<microssd.> I have 2.2.4
05:03:07FromDiscord<janakali> update nim or grabnim itself?
05:03:35FromDiscord<microssd.> what's the current nim version?
05:03:56FromDiscord<janakali> 2.2.4
05:05:21FromDiscord<janakali> In reply to @microssd. "but on my desktop,": choosenim doesn't have atlas either, it was fixed, but fix is not in release yet.↵https://github.com/nim-lang/choosenim/issues/80
05:05:23FromDiscord<microssd.> I installed it with choosenim following the instruction on the nim website, I don't have atlas
05:05:47FromDiscord<microssd.> ok
05:06:26FromDiscord<microssd.> with nimble -l I got a lot of dependency errors on my VM
05:06:48FromDiscord<microssd.> when trying to use xmltools
05:07:30FromDiscord<microssd.> maybe I don't know how to setup
05:14:21FromDiscord<janakali> sent a code paste, see https://play.nim-lang.org/#pasty=CbWvDhiP
05:15:22FromDiscord<lainlaylie> In reply to @microssd. "Error: cannot open file:": ubuntu's nim package is missing the computer directory in /usr/lib/nim, building atlas works again if you clone nim and copy compiler/ into there
05:15:57FromDiscord<lainlaylie> (obviously, don't do this and just use a proper packaging of nim)
05:16:15FromDiscord<lainlaylie> (edit) "computer" => "compiler"
05:16:16FromDiscord<microssd.> ok
07:47:23FromDiscord<TӨMΛ ☠> sent a code paste, see https://play.nim-lang.org/#pasty=NbNXsYbR
08:12:33FromDiscord<janakali> sent a code paste, see https://play.nim-lang.org/#pasty=pCJqokrc
08:12:42FromDiscord<janakali> (edit) "https://play.nim-lang.org/#pasty=nAPKVCuh" => "https://play.nim-lang.org/#pasty=ZkmXvUQp"
08:15:52FromDiscord<TӨMΛ ☠> 2.2.4, I only downgraded Nimble because of issues I had
08:16:36FromDiscord<TӨMΛ ☠> I guess I could upgrade zippy, for some reason I have a bit older version
08:19:58FromDiscord<TӨMΛ ☠> ....actually, this is why it doesn't work
08:23:00FromDiscord<TӨMΛ ☠> Okay I think I know what is the issue, I may have two zippy versions, one which is quite old, but installed because of dependencies
08:23:29FromDiscord<TӨMΛ ☠> Not sure how to swap the default version though
08:23:35FromDiscord<kiloneie> Im gonna ask here as well: How would i read the size of say a .png file format's dimensions, without loading it's pixels ?
08:23:36FromDiscord<TӨMΛ ☠> (edit) "Not sure how to swap the default version ... though" added "for the compilation"
08:29:56FromDiscord<rakgew> usually I mention the version of a dependency in .nimble file, like\:↵`requires "cligen == 1.9.2"`↵(@TӨMΛ ☠)
08:33:56FromDiscord<wakanakisarazu> Guys, I'm building a Init system in Nim, using the POSIX imports, what would you like in it?
08:56:01FromDiscord<TӨMΛ ☠> In reply to @rakgew "usually I mention the": I did that, but not sure if this works for compilation? For libraries it does, but I have `requires` in my .nimble file and the app compiles on old zippy anyway (which is funny because Nico and Pixie disallow me uninstalling old zippy, but then they kinda both can use newer version? but if I want to uninstall Pixie, another dependencies come screaming that they need Pixie this time)
08:56:08FromDiscord<TӨMΛ ☠> Or maybe it should be .nims, hmm, lemme try that
08:56:34FromDiscord<TӨMΛ ☠> (edit) "lemme try that" => "I don't get how exactly they differ"
08:56:54FromDiscord<TӨMΛ ☠> (edit) "get how exactly they differ" => "know sometimes what kind of thing should go where"
09:20:58*beholders_eye joined #nim
09:24:03FromDiscord<lainlaylie> you need to make sure the compiler is actually using the version resolved by nimble, e.g. by doing `nimble setup`
09:24:24FromDiscord<lainlaylie> also can just use local deps mode `-l` and avoid the whole problem
09:26:45FromDiscord<lainlaylie> In reply to @kiloneie "Im gonna ask here": probably by reading this https://en.wikipedia.org/wiki/PNG#Critical_chunks
09:39:48FromDiscord<TӨMΛ ☠> I was thinking it could be good reason for me to work through Atlas, but not sure if I want to dig into another rabbit hole...↵Either way this is for small script that just packages the game, so I find it both reassuring and irritating because of that. It's good I don't need to resolve it asap (as it doesn't affect my game whatsoever) but I also wish I could just one-click resolve this easily
09:41:19FromDiscord<nevillegg> Will use nim later
09:41:37FromDiscord<TӨMΛ ☠> In reply to @lainlaylie "also can just use": The small problem here might be that you can only have one .nimble file per directory, and I have two files that are run↵One that is game file, using Nico - which afaik uses old zippy - and zipping script file that should use newer zippy
09:41:38FromDiscord<nevillegg> Looks cool language
09:42:19FromDiscord<TӨMΛ ☠> Probably should just go with making Python file instead of all this nonsense but wanted to keep it limited to one language dependency for ease of use 😢
09:42:22FromDiscord<lainlaylie> oh, you have conflicting dependencies in the same project. i assumed it was some issue with unrelated projects polluting the global nimbledeps
09:42:47FromDiscord<TӨMΛ ☠> Yeah, I realised it just now when `nimble install` yielded me that you can't have two .nimble files
09:43:14FromDiscord<TӨMΛ ☠> But tbh I still don't know why they can't work independently
09:46:19FromDiscord<lainlaylie> kind of a workaround but could you put the script with its .nimble in a subdirectory
09:46:27FromDiscord<lainlaylie> so the two sets of dependencies dont interact
09:55:30FromDiscord<TӨMΛ ☠> Sadly it seems to not work with .nimble file at all 😢 it still yields me the same error which means it uses the default old zippy version
09:56:38FromDiscord<nocturn9x> uhhh
09:56:46FromDiscord<nocturn9x> does nim not have a built-in btree set?
09:57:07FromDiscord<nocturn9x> a hash set is not appropriate for my purposes
09:57:51FromDiscord<nocturn9x> not because I need order, but rather because btree sets are generally implemented as linked lists of single nodes or page-sized arrays, which makes memory usage a lot more predictable and doesn't require alloc+copy on reallocation
09:58:00FromDiscord<nocturn9x> and given I'd be handling many millions of entries, I can't afford that
09:58:43FromDiscord<nocturn9x> I know there's `btrees`, but it doesn't seem to care about uniqueness
10:00:13FromDiscord<nocturn9x> ig I could use https://github.com/narimiran/sorta and ignore the values
10:07:25FromDiscord<nocturn9x> I'll make do with a hash set for now and cross my fingers xd
10:43:25*przmk quit (Remote host closed the connection)
10:43:53*przmk joined #nim
12:11:43*rockcavera joined #nim
12:25:39FromDiscord<nocturn9x> sent a code paste, see https://play.nim-lang.org/#pasty=DrwkXuva
12:25:40FromDiscord<nocturn9x> (edit) "https://play.nim-lang.org/#pasty=gNWmQHey" => "https://play.nim-lang.org/#pasty=gxkiLdok"
12:25:42FromDiscord<nocturn9x> love compiler bugs
12:25:43FromDiscord<nocturn9x> :|
12:29:49FromDiscord<nocturn9x> sent a code paste, see https://play.nim-lang.org/#pasty=RqRqGToY
12:30:52FromDiscord<nocturn9x> it doesn't error out for the empty atomic
12:34:22FromDiscord<nocturn9x> I'll report it
12:38:36FromDiscord<nocturn9x> https://github.com/nim-lang/Nim/issues/25231 :P
12:51:10FromDiscord<nocturn9x> has anyone had any experience with `cpuTime()` returning nonsense values?
12:51:33FromDiscord<nocturn9x> I am calling it before starting a bunch of threads and then again after several seconds of processing, yet the values I get are `0.015993784 0.018303903`
12:51:49FromDiscord<nocturn9x> suggesting the process spent 0.02 seconds executing? does `cpuTime()` not measure idle time or something?
12:51:57FromDiscord<nocturn9x> (edit) "idle" => "idle/sleep"
12:54:16FromDiscord<nocturn9x> using `epochTime()` obviously works fine
12:54:26FromDiscord<nocturn9x> but it's subject to the wall clock which is ehh not ideal
13:23:03FromDiscord<kiloneie> This is not possible ? https://media.discordapp.net/attachments/371759389889003532/1429459833366511779/Screenshot_2025-10-19_15-22-28.png?ex=68f637b6&is=68f4e636&hm=deb9937d34eeef408cd3efd796c426ab57d80f578d49e3359df43a2922d7d232&
14:34:50Amun-Raso many ".." in imports that could be just one entry in config.nims
14:35:54Amun-Raor are those files outside src dir?
14:36:15Amun-Rakiloneie: what's not possible?
14:37:29FromDiscord<kiloneie> In reply to @Amun-Ra "or are those files": https://media.discordapp.net/attachments/371759389889003532/1429478568601059328/Screenshot_2025-10-19_16-37-19.png?ex=68f64929&is=68f4f7a9&hm=b34c5b84c15a6f9cdd966003ca95bbd42e3df2e1d81a28ec66864cfee9069fae&
14:38:31FromDiscord<kiloneie> In reply to @Amun-Ra "<@398205119583485964>: what's not possible?": Eh, i am sure i would have to overload the Hash proc, then ALL the Sets routines, in order to have a HashSet[typedesc[Entity]], and so... nope, just going HashSet[string] instead, and if i mess up with a string, then i will mess up.
14:40:03Amun-Rayou can import starting from the source root up
14:40:25Amun-Raimport foo/bar/baz instread of ".." / …
14:42:22Amun-RaI mean "import BuiltIn/App/appFoo" etc.
14:42:55FromDiscord<kiloneie> I have no idea what you are trying to say...
14:46:10FromDiscord<kiloneie> Top level imports. If you see "..", it's because the module is not top level. https://media.discordapp.net/attachments/371759389889003532/1429480749027033158/Screenshot_2025-10-19_16-45-46.png?ex=68f64b31&is=68f4f9b1&hm=84e16b93099d1b496b5e039fadba3bf47134e70017f0b0f04619039bac0981d5&
14:47:07Amun-RaI can't see those images rn, my laptop memory is failing (bloody soldered chips) and firefox borks every start; time to get new one
14:47:56Amun-Ratbh it doesn't matter whether it's top level or not - you can start the import part from the source root
14:49:24Amun-Ra(just my $0.02) ;)
14:50:43FromDiscord<kiloneie> sent a code paste, see https://play.nim-lang.org/#pasty=vmjBPcSv
15:16:33*zgasma quit (Quit: Lost terminal)
15:57:18FromDiscord<aethrvmn> In reply to @kiloneie "I have no idea": https://stackoverflow.com/questions/76028551/nim-import-from-project-root-directory
15:57:23FromDiscord<aethrvmn> I think this is relevant
15:57:27FromDiscord<alaa1646> sent a long message, see https://pasty.ee/tCZDqiuF
15:57:54FromDiscord<kiloneie> <@&371760044473319454> ? I am not clicking that.
16:06:23FromDiscord<xtrayambak> In reply to @kiloneie "<@&371760044473319454> ? I am": Yeaaaahhhh, that's spam.
16:11:31FromDiscord<xtrayambak> sent a code paste, see https://play.nim-lang.org/#pasty=wIkcexKf
16:40:47FromDiscord<tauruuuuuus> Codegendecl is indeed the way to go, what are you doing with it?
16:44:59Amun-Rano, not this way
16:47:04Amun-Ra(I mean not via importc)
16:53:51*derpydoo joined #nim
17:48:36*derpydoo quit (Quit: derpydoo)
19:04:21*beholders_eye quit (Ping timeout: 252 seconds)
19:16:09*rockcavera is now known as Guest3658
19:16:09*tiorock joined #nim
19:16:10*Guest3658 quit (Killed (calcium.libera.chat (Nickname regained by services)))
19:16:10*tiorock is now known as rockcavera
19:51:37*switchy quit (Ping timeout: 264 seconds)
20:01:14*beholders_eye joined #nim
20:03:58*switchy joined #nim
20:26:21FromDiscord<lan_maneiro> In reply to @janakali "in my experience langserver": is neovim beginner friendly?
20:29:36Amun-Radepends
21:16:54*derpydoo joined #nim
22:52:45*derpydoo quit (Quit: derpydoo)
23:52:49*beholders_eye quit (Ping timeout: 264 seconds)