<< 09-11-2023 >>

00:00:02*jmdaemon quit (Ping timeout: 252 seconds)
00:04:00FromDiscord<System64 ~ Flandre Scarlet> Is it possible to include a binary file as a const array? https://media.discordapp.net/attachments/371759389889003532/1171963361072783400/image.png?ex=655e96ef&is=654c21ef&hm=9a7bff61c76263191d614a1045d2a37e53c273490c84065b86c030ff9af593d5&
00:18:50*jkl quit (Server closed connection)
00:19:11*jkl joined #nim
00:21:10*krux02 joined #nim
00:21:50FromDiscord<bostonboston> Compile time function that reads the file Into a const?
00:25:51FromDiscord<stoneface86> `slurp`
00:27:11FromDiscord<stoneface86> gives you a const string though that you can use like an array
00:44:53*jmdaemon joined #nim
01:21:24NimEventerNew thread by amadan: Github action to build documentation, see https://forum.nim-lang.org/t/10616
01:36:44arkanoidtrying to figure out what's wrong between nim and vscode is a mess
01:39:13*lucasta quit (Quit: Leaving)
01:51:02*oprypin quit (Server closed connection)
01:51:12*oprypin joined #nim
02:35:09FromDiscord<bostonboston> Vscode is perfect, it's clearly nim's, or even your fault
02:54:20*edr quit (Quit: Leaving)
03:05:04*xet7 quit (Ping timeout: 258 seconds)
03:07:27*krux02 quit (Remote host closed the connection)
03:17:19*xet7 joined #nim
06:57:27*ox is now known as oz
07:23:44*PMunch joined #nim
09:20:59arkanoidPMunch: hello! thanks for your answer on the github issue. I'll try to improve nimlsp troubleshooting and answer you asap
09:21:19PMunchOf course :)
09:30:36NimEventerNew thread by didlybom: Modifying the value of a procedure argument (without making the input argument var), see https://forum.nim-lang.org/t/10617
09:30:41arkanoidPMunch: tail -f /tmp/nimlsp/*.log works, but it doesn't log crashes. The log is truncated before the SIGSEGV, for example.
09:31:37arkanoidsorry, I mean /tmp/nimlsp-<pid>/nimlsp.log
09:33:05PMunchAh yes, that is true
09:33:50PMunchBut it shouldn't be hard to then replay the file and see the SIGSEGV
09:41:26arkanoidsure, I'll move to replay as soon as I know I'm not dealing with that heisenbug that hit me yesterday. Btw thanks for the debug instruction, I think it's worth documenting them in the nimlsp Readme.md
09:42:53PMunchDefinitely, the replay functionality is very new and untested, but if it works well now I'll document it :)
09:48:11*antranigv quit (Server closed connection)
09:48:32*antranigv joined #nim
10:00:05arkanoidPMunch: I'm reading the new "Found project file" line and it correctly follows the different roots of the import branches. Nice!
10:00:28arkanoidI'm testing it by opening src and tests files
10:11:36arkanoidPMunch: logrunner nimlsp_debug nimlsp.log on a log that ended up with SIGSEGV, doesn't SIGSEGV
10:22:23arkanoidI'm trying to reproduce the SIGSEGV with nimsuggest manually, and I kinda thing it is related to missing dirtyfile.nim, but unsure. What is the task of dirtyfile?
10:34:34arkanoidI've found the description here https://nim-lang.org/docs/nimsuggest.html#nimsuggest-invocation-specifying-the-location-of-the-query
11:04:00PMunchdirtyfile is the temporary file
11:04:29PMunchWhen you open a file and make a change nimlsp will write a dirtyfile with these changes that it passes to nimsuggest
11:04:46PMunchThe original file is used to handle relative imports and such, but the content is grabbed from the dirtyfile
11:05:37PMunchStrange that it doesn't SIGSEGV
11:10:51arkanoidPMunch: I've replicated the issue with full strace, it's something related to nimlsp looking for dirtyfiles that have been already unlinked
11:12:42PMunchHmm
11:13:26PMunchIs it a specific command that fails?
11:14:28PMunchI don't think it ever deletes these files
11:14:41PMunchThey just get cleared whenever tmp gets cleared
11:16:27PMunchHmm, might be some kind of race condition
11:16:49PMunchOh wait, in didClose it does delete these files
11:18:04arkanoidI can see that dirtyfiles are created and deleted within same /tmp/nimlsp-<pid> folder in tab opened/closed on .nim file inside vscode
11:18:15*fallback quit (Server closed connection)
11:19:51arkanoidalso, not sure yet why, but md5sum between the original .nim and the copied dirtyfile.nim doesn't match. Might just possibly be an ending newline
11:20:51*fallback joined #nim
11:22:40PMunchQuite possible
11:23:07PMunchOR crlf vs. lf
11:23:29PMunchTry `diff f1.nim dirtyfile.nim`
11:24:20arkanoidPMunch: https://termbin.com/1k4a
11:24:58PMunchYeah, just a newline missing in one of them
11:25:05PMunchShouldn't matter
11:25:37arkanoidyeah, that's not the problem
11:27:26PMunchAnnoying that the recording doesn't crash..
11:27:31*jmdaemon quit (Ping timeout: 264 seconds)
11:27:41PMunchIf it did you could easily run nimlsp under gdb and see exactly where
11:31:00arkanoidwell, the strace clearly says "write(2, "SIGSEGV: Illegal storage access. (Attempt to read from nil?)\n", 61) = 61"
11:31:24arkanoidwhich point to querying nimsuggest with missing dirtyfile
11:31:49PMunchWell, it points to some kind of memory error
11:33:15*enyc quit (Server closed connection)
11:33:31*enyc joined #nim
11:33:36PMunchHold on, I'll create a small test for you
11:34:12arkanoidwait, let me try stracing the logrunner
11:34:44arkanoidno, it does close correctly with exit code 0
11:35:22PMunchThat sounds to me like a weird timing thing..
11:36:09arkanoidI can share with you the strace of nimlsp running from vscode extension
11:36:40arkanoidthe one generated by opening/closing tabs manually without "replacing" existing view, to avoid race conditions
11:37:31arkanoidand the generated nimlsp.log
11:40:02arkanoidsteps: open vscode with no nim file opened (nimlsp not running). Open empty hello.nim file (nimlsp starts). Close hello.nim tab (hello.nim dirtyfile deleted). Start strace log on nimlsp pid. Open "gdal_c.nim" tab (dirtyfile created). Close "gdal_c.nim" tab (dirtyfile deleted). Open "gdal_raw.nim" file (dirtifile created). SIGSEGV
11:40:24PMunchOkay, pushed a branch arkanoid171, try that and see if it still crashes
11:41:00arkanoidI have strace.log and nimlsp-<pid> folder of this to send you, if it helps
11:41:15arkanoidthanks! compiling now
11:43:56PMunchPlease send over those logs
11:46:16arkanoidcrash captured with the newly compiled nimlsp_debug. let me pack those
12:57:33NimEventerNew thread by michaelplotke: Nimble install error wanted ... got -1, see https://forum.nim-lang.org/t/10619
13:03:42*xaltsc quit (Read error: Connection reset by peer)
13:05:28*xaltsc joined #nim
13:23:04*rockcavera joined #nim
14:05:54*edr joined #nim
14:53:50PMunchHmm, anyone have a recommendation for a library to draw graphs on an OpenGL context like GLArea from Gtk?
15:14:11*PMunch quit (Quit: Leaving)
16:59:40*lucasta joined #nim
17:17:39om3gaHi! is there any chance to disable -O3? I specified --opt:none, but compiler still adds -O3
17:18:00om3gaor maybe because of --d:danger
17:18:53Amun-Rahmm, add --passc=-O0?
17:20:29Amun-Radanger sets opt=speed iirc
17:20:48om3ga:\
17:20:55Amun-Raso…
17:20:56om3gayeah, you're right. I see
17:21:13Amun-Rachanging gcc.options.speed should work
17:21:22om3gawhat if I disable all runtime checks manually?
17:22:06om3ga--checks:off
17:22:08Amun-Raom3ga: https://github.com/nim-lang/Nim/blob/devel/config/nim.cfg#L263-L272
17:22:21Amun-Raoverride default speed flags
17:22:57om3gaAmun-Ra thank you!
17:23:07Amun-Ra:)
17:23:46om3gagreat, thanks
17:32:25*krux02 joined #nim
17:32:36*krux02 quit (Remote host closed the connection)
18:37:51*TheLink quit (Server closed connection)
18:38:11*TheLink joined #nim
19:05:00*arkanoid quit (Ping timeout: 240 seconds)
19:36:39*lucasta quit (Quit: Leaving)
19:56:43*neceve joined #nim
20:52:07*xet7 quit (Remote host closed the connection)
20:57:15*om3ga quit (Server closed connection)
20:58:58NimEventerNew thread by Isofruit: What are drawbacks of using forward declarations with "include" as a "module interface"-mechanism?, see https://forum.nim-lang.org/t/10622
21:00:28*om3ga joined #nim
21:02:33*xet7 joined #nim
21:36:46*neceve quit (Ping timeout: 255 seconds)
23:56:42*jmdaemon joined #nim