00:34:30 | * | Jjp137 quit (Quit: Leaving) |
00:36:17 | * | Jjp137 joined #nim |
00:39:28 | * | oisota quit (Ping timeout: 272 seconds) |
00:39:46 | * | oisota joined #nim |
00:40:07 | * | marcus quit (Ping timeout: 272 seconds) |
00:40:40 | * | marcus joined #nim |
00:52:54 | * | madprops joined #nim |
00:53:33 | madprops | the mimetypes library from python identifies nim files as video/vnd.nokia.interleaved-multimedia |
01:09:41 | * | switchy joined #nim |
01:46:47 | FromDiscord | <System64 ~ Flandre Scarlet> sent a code paste, see https://play.nim-lang.org/#pasty=OujlfKRA |
01:51:37 | * | tiorock joined #nim |
01:51:37 | * | tiorock quit (Changing host) |
01:51:37 | * | tiorock joined #nim |
01:51:37 | * | rockcavera is now known as Guest3274 |
01:51:37 | * | Guest3274 quit (Killed (erbium.libera.chat (Nickname regained by services))) |
01:51:37 | * | tiorock is now known as rockcavera |
03:20:40 | FromDiscord | <lainlaylie> the surest way is to try it and find out |
03:42:34 | * | beholders_eye quit (Ping timeout: 252 seconds) |
04:17:42 | * | xet7 quit (Ping timeout: 268 seconds) |
04:30:03 | * | xet7 joined #nim |
04:35:14 | FromDiscord | <user2m> sent a code paste, see https://play.nim-lang.org/#pasty=hfPZKiAr |
04:37:36 | * | tiorock joined #nim |
04:37:36 | * | tiorock quit (Changing host) |
04:37:36 | * | tiorock joined #nim |
04:37:36 | * | rockcavera is now known as Guest2027 |
04:37:36 | * | Guest2027 quit (Killed (silver.libera.chat (Nickname regained by services))) |
04:37:36 | * | tiorock is now known as rockcavera |
04:39:43 | * | tiorock joined #nim |
04:39:43 | * | tiorock quit (Changing host) |
04:39:43 | * | tiorock joined #nim |
04:39:43 | * | rockcavera is now known as Guest7320 |
04:39:43 | * | tiorock is now known as rockcavera |
04:40:06 | FromDiscord | <heysokam> Is it possible to iterate through a `cstring` without using GC'ed memory?↵_`cstring.items` uses the gc_ |
04:40:39 | FromDiscord | <heysokam> I imagine I'd have to create a custom iterator, but curious if its doable with cstring somehow |
04:41:43 | FromDiscord | <lainlaylie> In reply to @user2m "Is there a tutorial": did you compile with -d:useMalloc? |
04:42:40 | FromDiscord | <Elegantbeef> It doesn't use the gc |
04:42:55 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=EEOgOtHI |
04:43:09 | * | Guest7320 quit (Ping timeout: 260 seconds) |
04:43:23 | FromDiscord | <user2m> In reply to @lainlaylie "did you compile with": I believe I tried that on my prod instance and it didn't solve the issue |
04:43:47 | FromDiscord | <lainlaylie> not for solving the issue, it's for valgrind to be able to track memory |
04:44:49 | FromDiscord | <user2m> In reply to @lainlaylie "not for solving the": ahh ok I can try that |
04:45:16 | FromDiscord | <leorize> here's the arcane chant to use AddressSanitizer if you're interested\: `-d:useMalloc --passC:-fno-omit-frame-pointer --passC:-mno-omit-leaf-frame-pointer --passC:-fsanitize=address --passL:-fsanitize=address` |
04:45:43 | FromDiscord | <leorize> just put that in and run the result |
04:45:50 | FromDiscord | <leorize> it's faster than valgrind |
04:46:10 | FromDiscord | <leorize> you might need `--cc:clang`, but if you want gcc then install `libasan` if your distro provides it |
04:46:25 | FromDiscord | <leorize> well not just faster, more accurate, too |
04:47:50 | FromDiscord | <heysokam> @ElegantBeef does `echo` use the GC? maybe the error is misleading me to the character, but its echo 🤔 |
04:47:58 | FromDiscord | <Elegantbeef> Yes it does |
04:48:06 | FromDiscord | <heysokam> that'd explain it |
04:48:08 | FromDiscord | <user2m> In reply to @leorize "here's the arcane chant": Are there any docs on AddressSanitizer I ran across this term but have no idea what is? Apologies if this is well known, this is my first time digging into memory like this |
04:48:17 | FromDiscord | <Elegantbeef> `stdout.write` |
04:48:35 | FromDiscord | <Elegantbeef> remember `echo` calls `$` for all arguments |
04:49:10 | FromDiscord | <leorize> https://clang.llvm.org/docs/AddressSanitizer.html↵(@user2m) |
04:49:18 | FromDiscord | <leorize> https://github.com/google/sanitizers/wiki/AddressSanitizer |
04:49:31 | FromDiscord | <Elegantbeef> Leo doesn't put a stamp on anything unless it's been sanitized |
04:49:40 | FromDiscord | <Elegantbeef> He soaks everything in hand sanitizer |
04:50:04 | FromDiscord | <leorize> that's why my code takes forever to be released |
04:50:12 | FromDiscord | <Elegantbeef> Yea that's why |
04:50:13 | FromDiscord | <leorize> all that alcohol doesn't bode well with paper |
04:50:45 | FromDiscord | <Elegantbeef> My code takes forever cause I do daft things like wrap my vsbf code into a library |
04:56:43 | FromDiscord | <user2m> In reply to @leorize "https://clang.llvm.org/docs/AddressSanitizer.html (": Thank you! |
04:58:18 | FromDiscord | <leorize> note that none of the tools will catch logical leaks |
05:00:27 | FromDiscord | <leorize> if your trouble is caused by allocating too much and never free because you left it in some table or seq that's in use, then only something like heaptrack can detect it\: https://invent.kde.org/sdk/heaptrack |
05:01:43 | FromDiscord | <Elegantbeef> Just download more ram it's easier |
05:13:53 | FromDiscord | <user2m> In reply to @leorize "here's the arcane chant": Ok so I've compiled for asan - do I just run the application in staging? Will there be some sort of output? |
05:25:41 | FromDiscord | <leorize> there will be output on normal exit about leaks↵(@user2m) |
05:25:58 | FromDiscord | <leorize> if there are memory corruption bugs, then the software would crash with some output, too |
05:27:47 | * | ntat joined #nim |
05:28:45 | FromDiscord | <user2m> In reply to @leorize "there will be output": Ok what do you mean by normal exit? I'm currently just stopping the app using ctrl + c in the terminal is that considered normal exit? |
05:29:41 | FromDiscord | <user2m> In reply to @leorize "if there are memory": Ok that's insteresting - this seems to be faster than valgrind so maybe I can capture the output in a log and use supervisord to restart the app when it crashes |
05:34:49 | FromDiscord | <leorize> I can't remember if LSan would run if the program was terminated by a signal |
05:35:50 | FromDiscord | <leorize> nope |
05:35:56 | FromDiscord | <leorize> I just tested |
05:38:57 | FromDiscord | <leorize> if your app reaches `quit()` or end of main it'd be normal↵(@user2m) |
05:39:11 | FromDiscord | <leorize> if not you should add some endpoint to call `quit` |
06:24:08 | * | ntat quit (Remote host closed the connection) |
06:37:32 | FromDiscord | <heysokam> how does the `nimvm` communicate/transfer data with the compiler? |
06:42:17 | * | ntat joined #nim |
06:45:57 | FromDiscord | <Elegantbeef> It writes to PNode |
07:13:31 | FromDiscord | <heysokam> but I mean, how does it write to it? |
07:14:05 | FromDiscord | <heysokam> does it have access to the ast memory directly somehow? |
07:17:48 | FromDiscord | <leorize> it is the AST |
07:18:16 | FromDiscord | <leorize> nim version of the VM use PNode as storage for everything |
07:20:03 | FromDiscord | <heysokam> that's now what I mean↵The VM needs to have access to the data somehow, I'm just asking about how that data is accessed |
07:20:41 | FromDiscord | <leorize> it's PNode |
07:20:56 | FromDiscord | <heysokam> then how are pnodes passed between each other? |
07:21:18 | FromDiscord | <heysokam> even if the shape is a pnode, the data still needs to be communicated |
07:21:27 | FromDiscord | <leorize> the only difference between a `NimNode` and `int` is the instruction used to read/write them |
07:22:21 | FromDiscord | <heysokam> then how does the VM access `int`s that are part of the compiler's runtime? |
07:22:25 | FromDiscord | <leorize> CT data has a PNode representation, and the VM read/write straight to itt |
07:22:28 | FromDiscord | <heysokam> they still need to be accessed |
07:22:32 | FromDiscord | <leorize> wdym compiler's runtime? |
07:22:41 | FromDiscord | <heysokam> the compiler runs, that's a runtime |
07:23:27 | FromDiscord | <heysokam> during the compiler runtime, the VM exists somehow somewhere, and can execute the comptime code of the user |
07:23:40 | FromDiscord | <heysokam> the vm needs to access the data. How? |
07:23:41 | FromDiscord | <leorize> right |
07:23:51 | FromDiscord | <leorize> so AST is compiled into bytecode + data store |
07:24:13 | FromDiscord | <leorize> data store is just a bunch of PNode with the exact representation of it in Nim's source code |
07:24:31 | FromDiscord | <heysokam> so it is serialized and read by the vm? |
07:24:48 | FromDiscord | <leorize> yes, all data ops are serialized |
07:26:04 | FromDiscord | <heysokam> how is that data transfered? |
07:26:21 | FromDiscord | <leorize> so if you add into a seq, it turns into PNode.addChildren(), for example |
07:26:35 | FromDiscord | <leorize> the compiler use registers for this |
07:26:43 | FromDiscord | <leorize> there's a register bank |
07:27:13 | FromDiscord | <leorize> the rules for getting data is simple, just pick it up from regA after the code finish running |
07:28:00 | FromDiscord | <heysokam> I'm just trying to understand how the data is transfered, that's all. You are getting really lost in complexity, leorize. I'm asking for a much much simpler question |
07:28:19 | FromDiscord | <leorize> I don't know what do you mean by transfered, that is |
07:28:24 | FromDiscord | <heysokam> eg: the bytecode is written to a file, the VM reads it |
07:29:12 | FromDiscord | <heysokam> eg: the bytecode is written to process-shared memory (if that's even a thing, I have no clue) and the VM modifies that memory directly |
07:29:14 | FromDiscord | <heysokam> etc |
07:29:40 | FromDiscord | <leorize> bytecode is written into a seq |
07:29:55 | FromDiscord | <heysokam> and how does the VM access the seq? |
07:29:55 | FromDiscord | <leorize> VM is just a function that read instruction by instruction |
07:30:19 | FromDiscord | <leorize> a simple while interpreter loop |
07:30:21 | FromDiscord | <heysokam> ic, tyty |
08:10:52 | * | xet7 quit (Ping timeout: 244 seconds) |
08:19:20 | * | ntat quit (Quit: Leaving) |
08:23:03 | * | xet7 joined #nim |
08:49:01 | * | ntat joined #nim |
09:17:08 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @lainlaylie "the surest way is": I pass a pointer now, to be sure it does what I actually want to do |
09:19:32 | FromDiscord | <System64 ~ Flandre Scarlet> The fact I can now query the pins makes this module EXTREMELY powerful! https://media.discordapp.net/attachments/371759389889003532/1350035612354347069/image.png?ex=67d54624&is=67d3f4a4&hm=8011c25df732c279e4a759b634719dffa63c6baa95f85d30cede8f32ffa97d63& |
09:59:57 | * | beholders_eye joined #nim |
10:27:59 | * | rockcavera quit (Remote host closed the connection) |
10:32:32 | FromDiscord | <griffith1deadly> In reply to @sys64 "The fact I can": will you make treesitter integration for syntax highlights? |
10:50:12 | * | beholders_eye quit (Ping timeout: 246 seconds) |
11:14:41 | FromDiscord | <enthus1ast.> In reply to @sys64 "The fact I can": Looks cool, but wat is this? |
11:14:48 | FromDiscord | <enthus1ast.> (edit) "wat" => "what" |
11:26:00 | * | ntat quit (Read error: Connection reset by peer) |
11:31:32 | * | ntat joined #nim |
11:44:16 | FromDiscord | <aintea> Any idea why treesitter is SO slow at parsing a Nim file ? https://media.discordapp.net/attachments/371759389889003532/1350072032179781732/xk4hrzv.png?ex=67d5680f&is=67d4168f&hm=1cc0dbcf04f7d6df910bf3bb060e4b39d80dab7023f00f1fbbdfab9f0e3a9358& |
11:53:39 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @griffith1deadly "will you make treesitter": https://github.com/BalazsJako/ImGuiColorTextEdit↵I'll use this |
11:54:02 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @enthus1ast. "Looks cool, but what": Kurumi XP, one wavetable generator to rule them all |
12:18:15 | * | ntat quit (Read error: Connection reset by peer) |
12:24:53 | * | ntat joined #nim |
12:37:48 | FromDiscord | <enthus1ast.> so a digital music instrument? |
12:38:02 | * | ntat quit (Quit: leaving) |
12:38:40 | * | minimi joined #nim |
12:40:57 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @enthus1ast. "so a digital music": Kinda, you can export waveforms / samples for use in other softwares |
12:41:50 | * | ntat joined #nim |
12:42:29 | * | beholders_eye joined #nim |
12:48:05 | * | ntat quit (Quit: leaving) |
13:26:56 | * | coldfeet joined #nim |
13:37:54 | * | ntat joined #nim |
13:51:35 | FromDiscord | <System64 ~ Flandre Scarlet> I hate how Windows defender flags my software... |
14:16:28 | FromDiscord | <ayex> yes - I can't stand it either. especially when the program is a dead-simple harmless utility and it gets flagged as "malicious" instead of just "unknown". 🤔 |
14:40:39 | FromDiscord | <madonuko> docs for nimsutils finally up (<https://fyralabs.github.io/nimsutils/>)↵[nim-documentation-generator](https://github.com/marketplace/actions/nim-documentation-generator) is such a life saver |
14:47:55 | FromDiscord | <odexine> In reply to @aintea "Any idea why treesitter": i believe the treesitter rules are complicated as hell, prolly the cause for the speed |
14:54:08 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @ayex "yes - I can't": I dunno what to do against that sadly |
15:06:46 | FromDiscord | <ayex> sent a long message, see https://pasty.ee/FPuUnaxB |
15:18:13 | FromDiscord | <narimiran> In reply to @sys64 "I hate how Windows": time to change your software!!↵↵and by 'software', i mean: OS. |
15:54:01 | FromDiscord | <madonuko> In reply to @Elegantbeef "You have to be": https://github.com/nim-lang/Nim/issues/24780 |
15:54:41 | FromDiscord | <madonuko> well… I'm proud of myself for discovering another bug in nim |
15:54:47 | FromDiscord | <madonuko> :nim1: |
16:21:34 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @narimiran "time to change your": I'm on Linux↵But someone tested my software on Windows, the AV was not happy |
16:22:03 | FromDiscord | <narimiran> In reply to @madonuko "well… I'm proud of": I'm not proud of you for using Nim 2.1.9 |
16:23:58 | FromDiscord | <madonuko> In reply to @narimiran "I'm not proud of": I thought I was using my system nim (which should update when I update my system); turns out I've been using choosenim so I never updated |
16:26:22 | FromDiscord | <enthus1ast.> In reply to @madonuko "docs for nimsutils finally": pretty logging: https://github.com/status-im/nim-chronicles↵ ? |
16:26:56 | FromDiscord | <madonuko> In reply to @enthus1ast. "pretty logging: https://github.com/status-im/nim-c": I don't think this works in VM? |
16:27:16 | FromDiscord | <enthus1ast.> Idk but it's pretty |
16:27:28 | FromDiscord | <madonuko> very much |
16:28:29 | FromDiscord | <madonuko> the logging implementations in `nimsutils` works under nimscripts (which is the entire point of `nimsutils`, it's called `nimsutils` because it's utilities for nimscript) |
16:28:38 | FromDiscord | <madonuko> and yeah just tested that, it doesn't work in VM |
16:43:49 | * | ntat quit (Quit: Leaving) |
16:57:43 | * | ntat joined #nim |
17:04:01 | * | ntat quit (Quit: Leaving) |
17:05:44 | * | ntat joined #nim |
17:16:12 | * | coldfeet quit (Quit: Lost terminal) |
17:16:34 | * | ntat quit (Quit: Leaving) |
17:47:33 | * | beholders_eye quit (Ping timeout: 248 seconds) |
17:59:20 | * | ntat joined #nim |
19:08:25 | * | ntat quit (Quit: Leaving) |
19:28:31 | * | GnuYawk quit (Quit: The Lounge - https://thelounge.chat) |
19:28:52 | * | GnuYawk joined #nim |
20:00:24 | * | coldfeet joined #nim |
20:47:16 | * | ntat joined #nim |
21:30:17 | * | coldfeet quit (Quit: Lost terminal) |
21:54:47 | * | ntat quit (Quit: leaving) |
23:28:08 | * | derpydoo joined #nim |
23:41:24 | * | derpydoo quit (Remote host closed the connection) |
23:44:33 | * | derpydoo joined #nim |