00:00:02 | * | jmdaemon quit (Ping timeout: 252 seconds) |
00:04:00 | FromDiscord | <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:50 | FromDiscord | <bostonboston> Compile time function that reads the file Into a const? |
00:25:51 | FromDiscord | <stoneface86> `slurp` |
00:27:11 | FromDiscord | <stoneface86> gives you a const string though that you can use like an array |
00:44:53 | * | jmdaemon joined #nim |
01:21:24 | NimEventer | New thread by amadan: Github action to build documentation, see https://forum.nim-lang.org/t/10616 |
01:36:44 | arkanoid | trying 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:09 | FromDiscord | <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:59 | arkanoid | PMunch: hello! thanks for your answer on the github issue. I'll try to improve nimlsp troubleshooting and answer you asap |
09:21:19 | PMunch | Of course :) |
09:30:36 | NimEventer | New 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:41 | arkanoid | PMunch: tail -f /tmp/nimlsp/*.log works, but it doesn't log crashes. The log is truncated before the SIGSEGV, for example. |
09:31:37 | arkanoid | sorry, I mean /tmp/nimlsp-<pid>/nimlsp.log |
09:33:05 | PMunch | Ah yes, that is true |
09:33:50 | PMunch | But it shouldn't be hard to then replay the file and see the SIGSEGV |
09:41:26 | arkanoid | sure, 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:53 | PMunch | Definitely, 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:05 | arkanoid | PMunch: I'm reading the new "Found project file" line and it correctly follows the different roots of the import branches. Nice! |
10:00:28 | arkanoid | I'm testing it by opening src and tests files |
10:11:36 | arkanoid | PMunch: logrunner nimlsp_debug nimlsp.log on a log that ended up with SIGSEGV, doesn't SIGSEGV |
10:22:23 | arkanoid | I'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:34 | arkanoid | I've found the description here https://nim-lang.org/docs/nimsuggest.html#nimsuggest-invocation-specifying-the-location-of-the-query |
11:04:00 | PMunch | dirtyfile is the temporary file |
11:04:29 | PMunch | When you open a file and make a change nimlsp will write a dirtyfile with these changes that it passes to nimsuggest |
11:04:46 | PMunch | The original file is used to handle relative imports and such, but the content is grabbed from the dirtyfile |
11:05:37 | PMunch | Strange that it doesn't SIGSEGV |
11:10:51 | arkanoid | PMunch: I've replicated the issue with full strace, it's something related to nimlsp looking for dirtyfiles that have been already unlinked |
11:12:42 | PMunch | Hmm |
11:13:26 | PMunch | Is it a specific command that fails? |
11:14:28 | PMunch | I don't think it ever deletes these files |
11:14:41 | PMunch | They just get cleared whenever tmp gets cleared |
11:16:27 | PMunch | Hmm, might be some kind of race condition |
11:16:49 | PMunch | Oh wait, in didClose it does delete these files |
11:18:04 | arkanoid | I 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:51 | arkanoid | also, 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:40 | PMunch | Quite possible |
11:23:07 | PMunch | OR crlf vs. lf |
11:23:29 | PMunch | Try `diff f1.nim dirtyfile.nim` |
11:24:20 | arkanoid | PMunch: https://termbin.com/1k4a |
11:24:58 | PMunch | Yeah, just a newline missing in one of them |
11:25:05 | PMunch | Shouldn't matter |
11:25:37 | arkanoid | yeah, that's not the problem |
11:27:26 | PMunch | Annoying that the recording doesn't crash.. |
11:27:31 | * | jmdaemon quit (Ping timeout: 264 seconds) |
11:27:41 | PMunch | If it did you could easily run nimlsp under gdb and see exactly where |
11:31:00 | arkanoid | well, the strace clearly says "write(2, "SIGSEGV: Illegal storage access. (Attempt to read from nil?)\n", 61) = 61" |
11:31:24 | arkanoid | which point to querying nimsuggest with missing dirtyfile |
11:31:49 | PMunch | Well, it points to some kind of memory error |
11:33:15 | * | enyc quit (Server closed connection) |
11:33:31 | * | enyc joined #nim |
11:33:36 | PMunch | Hold on, I'll create a small test for you |
11:34:12 | arkanoid | wait, let me try stracing the logrunner |
11:34:44 | arkanoid | no, it does close correctly with exit code 0 |
11:35:22 | PMunch | That sounds to me like a weird timing thing.. |
11:36:09 | arkanoid | I can share with you the strace of nimlsp running from vscode extension |
11:36:40 | arkanoid | the one generated by opening/closing tabs manually without "replacing" existing view, to avoid race conditions |
11:37:31 | arkanoid | and the generated nimlsp.log |
11:40:02 | arkanoid | steps: 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:24 | PMunch | Okay, pushed a branch arkanoid171, try that and see if it still crashes |
11:41:00 | arkanoid | I have strace.log and nimlsp-<pid> folder of this to send you, if it helps |
11:41:15 | arkanoid | thanks! compiling now |
11:43:56 | PMunch | Please send over those logs |
11:46:16 | arkanoid | crash captured with the newly compiled nimlsp_debug. let me pack those |
12:57:33 | NimEventer | New 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:50 | PMunch | Hmm, 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:39 | om3ga | Hi! is there any chance to disable -O3? I specified --opt:none, but compiler still adds -O3 |
17:18:00 | om3ga | or maybe because of --d:danger |
17:18:53 | Amun-Ra | hmm, add --passc=-O0? |
17:20:29 | Amun-Ra | danger sets opt=speed iirc |
17:20:48 | om3ga | :\ |
17:20:55 | Amun-Ra | so… |
17:20:56 | om3ga | yeah, you're right. I see |
17:21:13 | Amun-Ra | changing gcc.options.speed should work |
17:21:22 | om3ga | what if I disable all runtime checks manually? |
17:22:06 | om3ga | --checks:off |
17:22:08 | Amun-Ra | om3ga: https://github.com/nim-lang/Nim/blob/devel/config/nim.cfg#L263-L272 |
17:22:21 | Amun-Ra | override default speed flags |
17:22:57 | om3ga | Amun-Ra thank you! |
17:23:07 | Amun-Ra | :) |
17:23:46 | om3ga | great, 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:58 | NimEventer | New 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 |