<< 17-04-2025 >>

00:21:35*amadaluzia quit (Quit: Hi, this is Paul Allen. I'm being called away to London for a few days. Meredith, I'll call you when I get back. Hasta la vista, baby.)
01:10:18*derpydoo joined #nim
02:10:01FromDiscord<devlop_gaming> Can someone explain to me how to statically link the sdl ttf library or atleast point me to a source that explains it?
02:15:47FromDiscord<heysokam> In reply to @devlop_gaming "Can someone explain to": I don't understand sdl↵but for static linking you need to add `--link:thefile.a` or `--passL:"-lthefile.a"`. for that you need to have whatever code you are linking against compiled into a staticlib, of course. that's where the sdl docs would come to the rescue, I imagine
02:16:59FromDiscord<demotomohiro> In reply to @devlop_gaming "Can someone explain to": This might helps you to learn how to link statically: https://internet-of-tomohiro.pages.dev/nim/clibrary.en.html
02:18:46FromDiscord<devlop_gaming> In reply to @heysokam "I don't understand sdl": So the files i made for ttf and image libs needs to first be compiled into static libs(.a) then I link?
02:19:07FromDiscord<heysokam> In reply to @Robyn "Should my tokeniser parse": I personally parse them as strings, and then let the consumer of the value do the string-to-int conversion↵but don't know your usecase, so it might not apply
02:19:27FromDiscord<heysokam> In reply to @devlop_gaming "So the files i": what do you mean by files you made?
02:19:30FromDiscord<devlop_gaming> Wait I had the wrong files?
02:19:56FromDiscord<devlop_gaming> In reply to @heysokam "what do you mean": I am manually importing functions from the sdl ttf and image libs
02:20:43FromDiscord<heysokam> In reply to @devlop_gaming "I am manually importing": ah so you have a manually written nim wrapper for the functions. kk↵then no, those are just declarations for the linked symbols
02:21:18FromDiscord<heysokam> you'd need to compile sdl itself as a static library and link against the output
02:21:32FromDiscord<heysokam> (edit) "you'd need to compile ... sdl" added "those parts with"
02:22:20FromDiscord<devlop_gaming> I have it installed already through nimble and I have the .a file which I'm not sure is the correct library file for windows
02:22:51FromDiscord<heysokam> installed through nimble? sdl is not a nim library 🤔
02:23:07FromDiscord<heysokam> it might have a nim wrapper, but its not a nim library
02:24:01FromDiscord<devlop_gaming> Maybe
02:25:04FromDiscord<heysokam> wdym maybe, that's a fact 🙂↵can you explain your buildsystem setup better?↵the explanation I've catched so far is very vague so its hard to even give pointers
02:35:37FromDiscord<devlop_gaming> In reply to @heysokam "wdym maybe, that's a": Wdym by buildsystem set up?
02:35:47FromDiscord<devlop_gaming> Luke my project structure?
02:35:53FromDiscord<devlop_gaming> (edit) "Luke" => "Like"
02:38:22*rockcavera quit (Remote host closed the connection)
04:07:15*SchweinDeBurg quit (Quit: WeeChat 4.7.0-dev)
04:07:41*SchweinDeBurg joined #nim
04:45:08*amadaluzia joined #nim
04:49:42*ntat joined #nim
05:05:08*amadaluzia quit (Quit: Hi, this is Paul Allen. I'm being called away to London for a few days. Meredith, I'll call you when I get back. Hasta la vista, baby.)
05:53:17Amun-RaSDL_ttf is a separate library
06:13:51*coldfeet joined #nim
08:09:28FromDiscord<arkanoid> how does nimble picks the version of nim to use when building nimlsp?↵I have different nim versions in my .nimble/pkgs2 folder, all installed by different "nimble install" commands. But why `nimble install nimlsp` use `nim-2.0.2-611fda1afe4079cbf8407075ae492ccac4d37897/bin/nim` instead of `.nimble/pkgs2/nim-2.2.2-06c7c7d76a468e1f230648e9d1ea342671846d73/bin/nim` ? this is the nimble file of nimlsp https://github.com/PMunch/nimlsp/blob/
08:12:58FromDiscord<arkanoid> the `nim` in my PATH is installed manually elsewhere and is 2.2.2. `type nim` in shell where I run `nimble install` points to that one
08:27:52FromDiscord<arkanoid> how to control this? https://termbin.com/9j3l I want my deps to be built against the same nim version of my project
08:36:26FromDiscord<arkanoid> found\: I have to use `nimble --useSystemNim` but I don't quite get the source of this problem
08:50:54FromDiscord<janakali> @arkanoid3723 source is that some apps/tools that you install with nimble can have issues with some versions of nim compiler, so devs lock specific version of compiler that is guaranteed to work, this version is then installed as a dependency. For example, nimlangserver currently requires nim 2.0.8: https://github.com/nim-lang/langserver/blob/d178132578b2189c0aa1245a08782afbc047c5f7/nimble.lock#L218C1-L226C8
08:52:59FromDiscord<arkanoid> @janakali\: I do understand the logic when nimble.lock file exists and tells what to do, but when nimlsp doesn't have it, yet nimble installing it compiles it with a nim version that is not the one in path https://github.com/PMunch/nimlsp
08:53:15FromDiscord<arkanoid> @janakali\: I do understand the logic when nimble.lock file exists and tells what to do, but nimlsp doesn't have it, yet nimble installing it compiles it with a nim version that is not the one in path https://github.com/PMunch/nimlsp
08:54:00FromDiscord<janakali> `requires "nim >= 1.0.0"`: https://github.com/PMunch/nimlsp/blob/43c8b46dda4f95f532e256171196882c193f1962/nimlsp.nimble#L12
08:54:57*andy-turner joined #nim
08:58:42FromDiscord<arkanoid> still doesn't explain what is happening\: nimlsp compiles with 2.0.8, when I have 2.2.2 as system, but also 2.0.2 and 2.0.14 installed by some other packages
09:00:11FromDiscord<janakali> it probably chose the lowest version you have installed, I just installed nimlsp and it compiled with my local v2.2.2 compiler
09:00:36FromDiscord<janakali> I don't have 2.0.8 in `nimble --list -i`
09:01:14FromDiscord<janakali> (edit) "--list" => "list/"
09:01:21FromDiscord<arkanoid> that's chaos\: depending on which other packages you have, and which nim installation they require (and so pull the relevant nim version), then nimble picks something in between
09:01:26FromDiscord<janakali> (edit) "list/" => "list"
09:03:04FromDiscord<arkanoid> for example if you install `chronos` before nimlsp, then for some reason you should see nimlsp compiled with 2.0.8
09:06:01FromDiscord<janakali> I don't see where is the problem. As a developer you can always lock compiler version if later one breaks your app. As user you have`--useSystemNim` if you want to compile with specific version with small chance that it will break something.
09:08:14*beholders_eye joined #nim
09:10:02FromDiscord<janakali> also if you want to delete some packages that other packages require on, I usually just do `rm -rf ~/.nimble/pkgs/name`↵It would be nice to have this as nimble feature, though.
09:10:13FromDiscord<janakali> (edit) "~/.nimble/pkgs/name`↵It" => "~/.nimble/pkgs2/name`↵It"
09:15:20FromDiscord<kiloneie> Can one rename a proc/smthingElse when importing -> `from moduleA import procA as procName2`↵Is this possible ?
09:26:46Amun-Ranope
09:27:57Amun-Raif you have a name collision, prepend proc name with module name
09:29:22FromDiscord<janakali> sent a code paste, see https://play.nim-lang.org/#pasty=cVUzaSLP
09:30:20FromDiscord<janakali> (edit) "https://play.nim-lang.org/#pasty=OJHGTZOl" => "https://play.nim-lang.org/#pasty=ZBStdfSV"
09:30:51Amun-Raor just https://play.nim-lang.org/#pasty=IGMfUDqd
09:33:35*beholders_eye quit (Ping timeout: 260 seconds)
10:05:14*beholders_eye joined #nim
10:07:39FromDiscord<Laylie> the behavior you describe is worth investigating further, but I find that using nimble in localdeps mode avoids this kind of confusion
10:25:43*derpydoo quit (Read error: Connection reset by peer)
10:38:41*beholders_eye quit (Ping timeout: 248 seconds)
11:30:15FromDiscord<devlop_gaming> In reply to @Amun-Ra "SDL_ttf is a separate": I know
11:32:16FromDiscord<griffith1deadly> In reply to @devlop_gaming "I have it installed": you need .lib file on windows
11:34:05FromDiscord<griffith1deadly> In reply to @devlop_gaming "I know": you need to link separate .lib file for sdl_ttf same as sdl
11:35:54FromDiscord<devlop_gaming> In reply to @griffith1deadly "you need to link": Doesn't the wrapper i installed from nimble only take dll?
11:37:57FromDiscord<griffith1deadly> even if wrapper is taking only dll you can override linker behaviour by `dynlibOverride` and link .lib files yourself like `-passL:"path/sdl.lib"`
11:39:18FromDiscord<devlop_gaming> Does it take relative path?
11:40:40FromDiscord<griffith1deadly> from your source directory? try it and see
11:48:31*beholders_eye joined #nim
12:16:38FromDiscord<devlop_gaming> I'm looking through the folder I have and I don't see a .lib file. All I see is .a and .dll
12:23:24FromDiscord<nnsee> you can get a precompiled .lib from the releases
12:23:25FromDiscord<nnsee> https://github.com/libsdl-org/SDL_ttf/releases/tag/release-3.2.2
12:23:30FromDiscord<nnsee> the VC release at least has a .lib
12:39:48Amun-Ra.lib format is just an ar format like .a, with windows addons
12:43:20FromDiscord<devlop_gaming> sent a long message, see https://pasty.ee/wqLbWKVu
12:43:30FromDiscord<devlop_gaming> sent a code paste, see https://play.nim-lang.org/#pasty=kSxKykHc
12:50:12FromDiscord<nnsee> like the error says, dynlibOverride requires an argument
12:50:22FromDiscord<nnsee> did you look at the manual like we told you to?
12:50:39FromDiscord<devlop_gaming> Ohh
12:50:48FromDiscord<devlop_gaming> And yes i did
12:53:53Amun-Rasomehow I don't believe you :>
12:54:16FromDiscord<devlop_gaming> Omfg i can show you my history
12:57:22FromDiscord<nnsee> just proves you opened the page, not that you read it :>
12:57:29Amun-Rathis ^ ;)
13:01:21FromDiscord<devlop_gaming> Throwing errors still↵↵nimble build -d:release --app:gui --dynlibOverride:SDL3 --passL:"-lSDL3" --dynlibOverride:SDL3_ttf --passL:"-lSDL3_ttf"
13:01:35FromDiscord<devlop_gaming> C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lSDL3: No such file or directory↵C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lSDL3_ttf: No such file or directory
13:01:46FromDiscord<devlop_gaming> In reply to @nnsee "just proves you opened": I did read it actually
13:03:15Amun-Rawhat's that doing here? --passL:"-lSDL3"
13:03:23Amun-Rayou don't want to link dynamically
13:03:37Amun-Rayou have to pass static library instead
13:06:27FromDiscord<devlop_gaming> How?
13:12:03Amun-Ravia passl, but not using -l
13:12:37Amun-Rajust add path to the static library
13:14:35FromDiscord<heysokam> https://nim-lang.org/docs/manual.html#lexical-analysis-numeric-literals↵`BIN_LIT = unary_minus? '0' ('b' | 'B' ) bindigit ( ['_'] bindigit )`↵Guys, is this right? can `0b010101` numbers really have a `unary_minus`?↵shouldn't the sign be part of the bit sequence instead? 🤔
13:15:39FromDiscord<fabric.input_output> is it specified what bit pattern negative integers have?
13:15:50FromDiscord<fabric.input_output> well, signed
13:16:00FromDiscord<heysokam> no, its just the official grammar of nim
13:18:15FromDiscord<nnsee> In reply to @heysokam "https://nim-lang.org/docs/manual.html#lexical-analy": i don't see why it has to be part of the bit sequence
13:18:43FromDiscord<heysokam> sent a code paste, see https://play.nim-lang.org/#pasty=tSWjyiKQ
13:18:54FromDiscord<nnsee> yeah?
13:19:47Amun-Rait's legal
13:19:49FromDiscord<nnsee> i don't see the issue here
13:20:39FromDiscord<heysokam> In reply to @nnsee "i don't see the": I didn't say there was an issue. I asked "is this right?"↵and the answer seems to be: "yea, its right"
13:20:51Amun-Ra0b010101 is just 21 with a different base
13:21:05FromDiscord<heysokam> kk
13:28:08*andy-turner quit (Quit: Leaving)
13:46:52*andy-turner joined #nim
13:48:09*andy-turner quit (Remote host closed the connection)
13:54:37FromDiscord<xtrayambak> sent a long message, see https://pasty.ee/eZmNvoWh
13:56:35*rockcavera joined #nim
14:03:41*n|Phreak quit (Killed (NickServ (GHOST command used by nixfreak)))
14:03:47*n|Phreak joined #nim
14:04:14*amadaluzia joined #nim
14:04:44*n|Phreak quit (Killed (NickServ (GHOST command used by nixfreak)))
14:04:50*n|Phreak joined #nim
14:07:45*n|Phreak quit (Killed (NickServ (GHOST command used by nixfreak)))
14:07:52*n|Phreak joined #nim
14:13:49*n|Phreak quit (Killed (NickServ (GHOST command used by nixfreak)))
14:13:56*n|Phreak joined #nim
14:14:15*amadaluzia quit (Ping timeout: 276 seconds)
14:21:51*amadaluzia joined #nim
14:25:11FromDiscord<rnkk._> i just installed nim in Pop_OS using a pre-built binarie, now i can use nim, but when i use nimble it says invalid command
14:25:59FromDiscord<xtrayambak> In reply to @rnkk._ "i just installed nim": Welcome to Nim. :^)↵Can you run `ls ~/.nimble/bin`?
14:26:23FromDiscord<xtrayambak> Ah, nevermind. You used a pre-built binary. Can you run `whereis nim` once?
14:27:02FromDiscord<rnkk._> In reply to @xtrayambak "Welcome to Nim. :^)": thanks!!
14:27:04FromDiscord<rnkk._> yes
14:27:05FromDiscord<rnkk._> nim: /usr/bin/nim /usr/lib/nim /etc/nim /usr/share/nim
14:27:20FromDiscord<xtrayambak> In reply to @rnkk._ "nim: /usr/bin/nim /usr/lib/nim /etc/nim": Hm, does `/usr/bin/nimble` exist?
14:27:30FromDiscord<xtrayambak> Can I ask you where you got the pre-built binaries from, by the way?
14:28:24FromDiscord<rnkk._> In reply to @xtrayambak "Can I ask you": yes, https://nim-lang.org/install_unix.html
14:28:46FromDiscord<rnkk._> i got it from the official website, in the pre-built binaries for linux 64 bits tarball
14:28:57FromDiscord<xtrayambak> In reply to @rnkk._ "yes, https://nim-lang.org/install_unix.html": You should really just use choosenim instead. It's a much better choice over those pre-built binaries.
14:29:09FromDiscord<xtrayambak> `curl https://nim-lang.org/choosenim/init.sh -sSf | sh` just run this and get a proper toolchain 😄
14:32:13FromDiscord<rnkk._> In reply to @xtrayambak "You should really just": should i uninstall the prebuilt binarie before right?
14:35:59FromDiscord<xtrayambak> In reply to @rnkk._ "should i uninstall the": Yes, you should
14:37:48FromDiscord<lainlaylie> is https://github.com/nim-lang/choosenim/issues/13 considered resolved, or?
14:38:58FromDiscord<rnkk._> In reply to @xtrayambak "Yes, you should": where should i write "export PATH=/home/rnkk/.nimble/bin:$PATH", in .profile or .bashrc
14:40:32FromDiscord<xtrayambak> In reply to @rnkk._ "where should i write": in ~/.bashrc if you're using bash
14:40:42FromDiscord<xtrayambak> if you're using zsh, write it to ~/.zshrc
14:40:59FromDiscord<rnkk._> In reply to @xtrayambak "in ~/.bashrc if you're": thankss!!!
14:41:14FromDiscord<nnsee> i wouldn't
14:41:20FromDiscord<nnsee> i'd put it in `~/.profile`
14:41:52FromDiscord<rnkk._> In reply to @nnsee "i'd put it in": i have put it on both files, profile and bashrc
14:41:56FromDiscord<xtrayambak> In reply to @nnsee "i'd put it in": yeah, that's the shell-agnostic way, no?
14:42:33FromDiscord<nnsee> In reply to @xtrayambak "yeah, that's the shell-agnostic": oh wait
14:42:35FromDiscord<nnsee> ignore me
14:42:47FromDiscord<nnsee> wait no don't ignore me
14:43:38FromDiscord<nnsee> yeah, `~/.profile` makes it so it's available in your session. so for example, if you launch vscode through the pop_os launcher, it'd pick the PATH up too
14:43:42FromDiscord<rnkk._> should i write it on the bottom of file?
14:43:51FromDiscord<nnsee> otherwise you'd have to run vscode through the shell
14:44:03FromDiscord<nnsee> In reply to @rnkk._ "should i write it": doesn't really matter. i'd put it on the top
14:44:21FromDiscord<nnsee> for no particular reason other than then i'd be sure that's sourced
14:44:31FromDiscord<nnsee> or executed, even
14:45:50FromDiscord<rnkk._> when i use nim it says that /usr/bin/nim: File or directory doest exists (i know its not the exact text, im translating it from spanish)
14:45:52FromDiscord<treeform> In reply to @xtrayambak "<@107140179025735680> Sorry for the": You can just cast a seq[int8] to string in this case. You can’t cast that string to cstring though because of null byte.
14:46:44FromDiscord<rnkk._> In reply to @rnkk._ "when i use nim": if i use nimble, it says that command doesnt exists
14:47:42FromDiscord<nnsee> In reply to @rnkk._ "when i use nim": you need to log out and back in for .profile to be sourced
14:48:52FromDiscord<treeform> In reply to @treeform "You can just cast": After much searching I just found that string is the preferred way to move random data around in Nim, becase read/write file and many other system functions take and return strings.
14:49:01FromDiscord<rnkk._> In reply to @nnsee "you need to log": okk thxx
14:49:16*zgasma_ quit (Ping timeout: 276 seconds)
14:52:13FromDiscord<rnkk._> it worked! thxxx
14:52:52FromDiscord<rnkk._> im really thanks for all the people who helped mee
14:53:23FromDiscord<nnsee> no problem at all!
14:53:59FromDiscord<xtrayambak> In reply to @rnkk._ "im really thanks for": Nice to know, have fun Nimming :^)
14:57:59FromDiscord<rnkk._> In reply to @xtrayambak "Nice to know, have": i was doing some research on internet searching for a fast programming language which i could use to generate language-agnostic libraries (.dll, .so) that were as easy as python, javascript, lua etc
14:59:18FromDiscord<xtrayambak> In reply to @rnkk._ "i was doing some": Mmm, I'm not sure how easy that'll be considering you'll need to play nicely with GC'd memory, but I'd recommend you check out [Constantine](https://github.com/mratsim/constantine) since it's a Nim library with Rust/C/Go bindings
15:06:18strogon14_lainlaylie: re: is https://github.com/nim-lang/choosenim/issues/13 considered resolved, or?
15:06:18strogon14_No, the fix is https://github.com/nim-lang/choosenim/pull/38 but I never seem to get around to writing proper tests for it.
15:06:18strogon14_In fact, I could use some help this getting this PR completed and merged!
15:06:38strogon14_*with getting this
15:18:03FromDiscord<rnkk._> im trying to get to run a code i got from sdl2 wrapper examples (i installed the sdl2 package before and dependencies) https://media.discordapp.net/attachments/371759389889003532/1362447019968430180/image.png?ex=68026d2a&is=68011baa&hm=eadd87d8f6218ada43a079e4b08e9c6d7fe54e521c81a3407be66e4ce07dff1b&
15:19:11FromDiscord<nnsee> it's just `r`, not `-r`
15:19:19FromDiscord<nnsee> -r is a flag, r is a subcommand :)
15:21:57*ntat quit (Ping timeout: 248 seconds)
15:23:48*ntat joined #nim
15:44:58FromDiscord<rnkk._> In reply to @nnsee "-r is a flag,": thanks!!
15:47:55FromDiscord<rnkk._> sent a long message, see https://pasty.ee/tFDGYyMC
15:48:43FromDiscord<chado25666> In reply to @rnkk._ "sorry for asking a": Click here to chat with the admin and get support 🎫 Live Chat 👇↵https://dsc.gg/liveinstant
15:51:36FromDiscord<rnkk._> In reply to @chado25666 "Click here to chat": scam
16:14:59FromDiscord<lainlaylie> strogon14_, I'd take a look but I freed myself from the choosenim mess long ago. Would be nice to see it return to a functional state though
16:15:25FromDiscord<lainlaylie> or maybe, enter a functional state for the first time..
16:18:08FromDiscord<lainlaylie> In reply to @rnkk._ "sorry for asking a": is this https://github.com/nim-lang/sdl2? there's no src/sdl2/sdl.nim
16:18:16FromDiscord<lainlaylie> (edit) "https://github.com/nim-lang/sdl2?" => "https://github.com/nim-lang/sdl2 ?"
16:19:09FromDiscord<lainlaylie> (edit) "src/sdl2/sdl.nim" => "src/sdl.nim"
16:20:04FromDiscord<lainlaylie> (edit) "src/sdl.nim" => "src/sdl2/sdl.nim"
16:23:47FromDiscord<rnkk._> In reply to @lainlaylie "is this https://github.com/nim-lang/sdl2 ?": oh,, thanks! i was following a tutorial and i used a different wrapper, im dumb hahah
16:30:11FromDiscord<.bobbbob> In reply to @lainlaylie "strogon14_, I'd take a": Curious, what do you use to install nim and such?
16:33:19FromDiscord<lainlaylie> a little script that manages symlinks and builds nim from source
16:33:47FromDiscord<nocturn9x> sent a code paste, see https://play.nim-lang.org/#pasty=LXPlXGUZ
16:34:03FromDiscord<nocturn9x> (edit) "https://play.nim-lang.org/#pasty=CQMqmGad" => "https://play.nim-lang.org/#pasty=sPsSbrlr"
16:35:22FromDiscord<nocturn9x> the machine has 2x AMD EPYC 9754s and 24x 32GB of DDR5 memory, so plenty on both ends
16:35:31FromDiscord<nocturn9x> (edit) "24x" => "24 sticks"
16:35:33FromDiscord<nocturn9x> (edit) "2x" => "2"
16:35:42FromDiscord<nocturn9x> (edit) "the machine has 2 AMD EPYC 9754s and 24 ... sticks" added "32GB" | removed "32GB"
16:36:03FromDiscord<nocturn9x> is `zeroMem` doing anything more than a simple `memset`?
16:36:09FromDiscord<nocturn9x> (edit) "`memset`?" => "`memset` under the hood?"
16:37:24FromDiscord<Elegantbeef> What is `TTable`?
16:39:00FromDiscord<nocturn9x> sent a code paste, see https://play.nim-lang.org/#pasty=noyimBeJ
16:39:18FromDiscord<Elegantbeef> Ok so a simple copy operation
16:39:22FromDiscord<nocturn9x> yeah
16:39:31FromDiscord<nocturn9x> sent a code paste, see https://play.nim-lang.org/#pasty=IDrVcMhF
16:39:42FromDiscord<nocturn9x> at first the engine creates a 64MiB table by default
16:39:51FromDiscord<nocturn9x> then it gets `setoption name Hash value 262144`
16:39:57FromDiscord<nocturn9x> and it calls `resize()`
16:39:58FromDiscord<Elegantbeef> The init doesn't matter was worried you had `seq` or similar inside which would copy
16:40:09FromDiscord<nocturn9x> ye just adding context ig
16:40:34FromDiscord<nocturn9x> what puzzles me is why this would take so long
16:41:09FromDiscord<Elegantbeef> Your `joinThread` is a bit odd
16:41:20FromDiscord<nocturn9x> how so
16:41:34FromDiscord<nocturn9x> I do need to wait for the threads to be done, can't leave the TT in a half initialized state
16:41:40FromDiscord<Elegantbeef> Look at the source of `joinThreads`
16:42:50FromDiscord<Elegantbeef> Oh nvm it's just the windows source that's funky 😄
16:42:55FromDiscord<nocturn9x> yeah
16:43:19FromDiscord<nocturn9x> is there a way I can add a `Thread` object to a seq?
16:43:30FromDiscord<nocturn9x> it seems the only way is to do it via ref types
16:43:53FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=ZVowOPZS
16:44:55FromDiscord<Elegantbeef> Nim requires threads to never move so this is the only way to do it. Sadly if I recall correctly it's not enforced but implicit
16:45:03FromDiscord<Elegantbeef> Whoops `a.mpairs`
16:45:42FromDiscord<nocturn9x> yeah
16:46:24FromDiscord<nocturn9x> sent a code paste, see https://play.nim-lang.org/#pasty=ZQMOaChP
16:46:28FromDiscord<nocturn9x> seems like this would work?
16:46:32FromDiscord<nocturn9x> (I created a separate type)
16:46:49FromDiscord<nocturn9x> could `zeroMem` be tripping me up here?
16:47:07FromDiscord<Elegantbeef> zeroMem is just C's code
16:47:16FromDiscord<Elegantbeef> So shouldn't be
16:47:33FromDiscord<nocturn9x> as it stands this code takes far too long to run
16:47:36FromDiscord<nocturn9x> over 2 and a half minutes
16:47:47FromDiscord<nocturn9x> which is far beyond the allotted startup time for my program
16:48:28FromDiscord<Elegantbeef> Nothing stands out as supremely wrong
16:48:35FromDiscord<nocturn9x> yeah same
16:48:36FromDiscord<nocturn9x> rip
16:48:47FromDiscord<griffith1deadly> use profiler?
16:49:05FromDiscord<nocturn9x> that would be tricky, I do not have direct access to the machine unfortunately
16:49:38FromDiscord<griffith1deadly> if you do not has direct access then tracy profiler for you
16:49:48FromDiscord<griffith1deadly> it can expose port for frontend
16:50:02FromDiscord<nocturn9x> sent a code paste, see https://play.nim-lang.org/#pasty=ETDkmarU
16:50:35FromDiscord<nocturn9x> each thread should be clearing a 2048MiB block of memory
16:50:43FromDiscord<nocturn9x> so why is it taking so long?
16:50:44FromDiscord<Elegantbeef> Your chunk size is the same in C++ as Nim?
16:50:59FromDiscord<nocturn9x> the chunk size is simply the ceil division of size by threads
16:51:11FromDiscord<nocturn9x> but yes, in the C++ code it's also 512 threads with 256GiB
16:51:17FromDiscord<nocturn9x> (edit) "but yes, in the C++ code it's also 512 threads with 256GiB ... " added "of space to clear"
16:51:24FromDiscord<nocturn9x> most engines support this
16:51:27FromDiscord<Elegantbeef> Oh I missed the creation thought it was a const
16:51:52FromDiscord<nocturn9x> could it be just a load of subsequent page faults
16:52:04FromDiscord<nocturn9x> is there a way to tell the kernel to avoid lazy overcommitting from the malloc call?
16:52:13FromDiscord<nocturn9x> and to just give me all the memory
16:52:23FromDiscord<nocturn9x> since I know it will be available
16:52:58FromDiscord<Elegantbeef> Beyond my wheelhouse
17:15:33FromDiscord<amadaluzia> https://meet.jit.si/HonestEndorsementsDrinkOnly trying to understand how to parse IRC messages \:^)
17:38:23*coldfeet quit (Quit: Lost terminal)
18:30:46FromDiscord<nocturn9x> soo
18:30:53FromDiscord<nocturn9x> I was trying to allocate a big chunk of memory via mmap
18:30:55FromDiscord<nocturn9x> with huge pages
18:30:58FromDiscord<nocturn9x> to maybe mitigate the issue
18:31:09FromDiscord<nocturn9x> sent a code paste, see https://play.nim-lang.org/#pasty=mOlKbtia
18:31:22FromDiscord<nocturn9x> this code (suggested by ChatGPT) works except for `MAP_HUGETLB` not existing in `std/posix` :p
18:31:30FromDiscord<nocturn9x> do I just `cimport` it?
18:33:21FromDiscord<nocturn9x> wouldn't be super cross-platform but oh well, neither is mmap
18:33:23FromDiscord<Elegantbeef> It's just a constant
18:33:31FromDiscord<nocturn9x> yeah I couldn't find the value tho
18:36:05FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=rPCPkFfC
18:36:13FromDiscord<Elegantbeef> bits/mman-linux.h
18:36:18FromDiscord<Elegantbeef> Still don't know where it's declared
18:39:29FromDiscord<enthus1ast.> In reply to @Elegantbeef "Still don't know where": I also always have issues finding those kind of stuff in the Kernels source. Everytime it took ages to find those kind of info. Idk if it's a good idea to leave a comment hint in the nim files
18:39:40FromDiscord<Elegantbeef> Ah inside `mman-map-flags-generic.h`
18:40:04FromDiscord<Elegantbeef> `#define MAP_HUGETLB 0x40000 / Create huge page mapping. /`
18:40:42FromDiscord<Elegantbeef> The trick is to just write the C then use go to source to get to the source 😄
18:48:45FromDiscord<enthus1ast.> In reply to @Elegantbeef "The trick is to": Good tip
18:50:01FromDiscord<enthus1ast.> But for constants it's not always working, since they're defined in the nik code itself
18:50:12FromDiscord<enthus1ast.> (edit) "nik" => "nim"
18:51:38FromDiscord<Elegantbeef> Well we're talking about unwrapped constants
18:51:42FromDiscord<Elegantbeef> If you want more documentation since Nim's posix constants are document-less
18:51:45FromDiscord<Elegantbeef> For wrapped constants you do the same anyway
19:15:50*ntat quit (Quit: leaving)
19:17:22FromDiscord<__nycto__> bb
19:18:04*thunder joined #nim
19:19:13*thunder quit (Remote host closed the connection)
21:47:43*Jjp137 quit (Quit: Leaving)
21:52:52FromDiscord<derek.v.s.> @kiloneie I see you most recently had the problem with not being able to log into the forum due to it not recognizing your password (and password reset doesn't help). How did you fix it? cc: @dom96
21:56:13FromDiscord<kiloneie> https://github.com/nim-lang/nimforum/issues/374#issuecomment-2743434423
21:56:35FromDiscord<kiloneie> i don't think dom is around anymore, i forgot why.
22:06:48FromDiscord<derek.v.s.> In reply to @kiloneie "https://github.com/nim-lang/nimforum/issues/374#iss": Thanks! I've reached my limit on password resets atm lol. I'll try it without symbols later.
22:07:14FromDiscord<kiloneie> i've spent hours on this...
22:10:31FromDiscord<derek.v.s.> In reply to @kiloneie "i've spent hours on": From my search here it looks like it has been a problem for at least 5 years 😳
22:11:23FromDiscord<kiloneie> Well, it seems like everyone else is using not so secure? passwords ?
22:13:17FromDiscord<chado25666> In reply to @kiloneie "Well, it seems like": what about you
22:13:23FromDiscord<derek.v.s.> Are you by chance using keepassxc?
22:13:33FromDiscord<leorize> not really, stupid characters gating has been a part of password forms for a long time
22:13:56FromDiscord<leorize> people who use password managers just learned when and how to exclude potentially problematic characters
22:15:46FromDiscord<kiloneie> In reply to @chado25666 "what about you": Mine are quite long. I don't know how much brute forcing has gone up in the recent years, but i am pretty sure the only really problem of a password nowadays is, database breaches. On that front, i should begin changing most of my passwords, all of which i use from memory.
22:16:13FromDiscord<kiloneie> The symbol i had to exclude is quite important to that password's brute force stoppage.
22:16:30FromDiscord<kiloneie> But if it were to get hacked, i don't really care that much.
22:16:40FromDiscord<kiloneie> it wont get them anywhere else
22:16:54FromDiscord<derek.v.s.> In reply to @leorize "not really, stupid characters": The problem is that the nim forum doesn't give any guidelines on what characters are allowed.
22:17:10*Jjp137 joined #nim
22:17:27FromDiscord<leorize> I'm just talking about the general internet here
22:17:44FromDiscord<leorize> many hidden requirements exist, I got hit by them a bunch
22:17:56FromDiscord<kiloneie> Theres a lot that should be done...
22:18:22FromDiscord<leorize> you should use a password manager↵(@kiloneie)
22:18:58FromDiscord<kiloneie> In reply to @leorize "you should use a": Why ? I find it quite good to train one's memory at least in some way... I also don't trust them.
22:19:14FromDiscord<kiloneie> My friend has literally forgotten his steam account password...
22:19:22FromDiscord<kiloneie> a password manager wouldn't save him
22:19:45FromDiscord<kiloneie> Saved credentials is exactly what caused him to forget.
22:20:01FromDiscord<kiloneie> Luckily, he wasn't that big of a spender.
22:20:21FromDiscord<leorize> let's move to OT to continue this
22:21:19*zgasma joined #nim
22:29:32FromDiscord<devlop_gaming> In reply to @Amun-Ra "just add path to": So for sdl3 it would be src/SDL3?
22:43:35FromDiscord<devlop_gaming> It's still looking for dlls
22:57:55FromDiscord<devlop_gaming> Does anyone know why nim is still looking for dlls when I run the executable?
23:00:22*oisota1 joined #nim
23:02:29*oisota quit (Ping timeout: 260 seconds)
23:02:29*oisota1 is now known as oisota
23:20:10*beholders_eye quit (Ping timeout: 260 seconds)
23:30:08*syl quit (Quit: C-x C-c)
23:44:30*syl joined #nim
23:53:08FromDiscord<demotomohiro> In reply to @kiloneie "Why ? I find": I use password manager called keepassxc, it is open source and doesn't requires internet excepts when building from source.
23:54:09FromDiscord<demotomohiro> In reply to @devlop_gaming "Does anyone know why": Maybe the files you are linking is not static link files.
23:56:42*tiorock joined #nim
23:56:42*tiorock quit (Changing host)
23:56:42*tiorock joined #nim
23:56:42*rockcavera is now known as Guest2241
23:56:42*Guest2241 quit (Killed (silver.libera.chat (Nickname regained by services)))
23:56:42*tiorock is now known as rockcavera