00:49:46 | FromDiscord | <gbolahan> sent a long message, see http://ix.io/4GLP |
01:28:31 | FromDiscord | <odexine> In reply to @sys64 "Did someone already tried": I’m pretty sure many programs that use the SQLite library were tested on Linux first yes |
01:38:13 | FromDiscord | <michaelb.eth> In reply to @gbolahan "During nimble install nimble": I'm confused, why are you trying to install nimble with nimble?↵↵Also, have you tried installing Nim with choosenim instead of brew? |
01:41:32 | FromDiscord | <gbolahan> In reply to @michaelb.eth "I'm confused, why are": I was trying to see if I just needed to install a newer version of nimble (expected it to run till I got that error). I haven’t tied using choosenim. What's the expectation?↵↵PS: I did not hace any error when I used brew |
01:42:58 | FromDiscord | <raynei486> I feel like it's some sort of version incompatibility going on |
01:43:11 | FromDiscord | <raynei486> something in the standard library moved places and the older version isn't following |
01:43:34 | FromDiscord | <raynei486> (edit) "following" => "catching on" |
01:44:33 | FromDiscord | <michaelb.eth> In reply to @gbolahan "I was trying to": for now, I suggest `brew uninstall nim` and install choosenim, adding `export PATH=${HOME}/.nimble/bin:${PATH}` to your .bashrc or whatever |
01:45:17 | FromDiscord | <gbolahan> I’ll give that a try now |
01:46:15 | FromDiscord | <michaelb.eth> you can then try `nimble install nimlangserver` and see if you can get get VSCode talking to that; I don't use VSCode, instead I use Emacs and works well with lsp-mode for Emacs |
01:46:28 | FromDiscord | <michaelb.eth> (edit) "you can then try `nimble install nimlangserver` and see if you can get get VSCode talking to that; I don't use VSCode, instead I use Emacs and ... works" added "it" |
01:47:19 | FromDiscord | <michaelb.eth> note: nimlangserver is an alternative to `nimlsp`, but both work these days afaik, but with Emacs I've have a better experience with nimlangserver |
02:06:13 | FromDiscord | <gbolahan> Just downloaded it. Still no luck |
02:06:30 | FromDiscord | <gbolahan> (edit) "downloaded" => "installed" |
02:08:10 | FromDiscord | <gbolahan> I guess this is the time I move to Emacs. trouble with proper server response will slow me down faster than getting familiar with a new editor |
02:08:35 | FromDiscord | <gbolahan> In reply to @michaelb.eth "you can then try": Do you have your config on github? |
02:08:59 | FromDiscord | <michaelb.eth> which config? |
02:10:42 | FromDiscord | <gbolahan> In reply to @michaelb.eth "which config?": For emacs. I don’t know how emacs works, so I assumed it would be similar to vim where I have to do some configurations |
02:11:19 | FromDiscord | <Elegantbeef> There are emacs and vim distros which are pretty nice |
02:11:19 | FromDiscord | <Elegantbeef> Though I've never used emacs myself |
02:11:19 | FromDiscord | <Elegantbeef> I do presently use astronvim |
02:11:21 | FromDiscord | <odexine> Why would switching editor help? |
02:11:50 | FromDiscord | <Elegantbeef> Magic pixies solve all the problems |
02:12:07 | FromDiscord | <Elegantbeef> Changing to `nimlangserver` in any editor will result in the same thing that michael is talking about |
02:12:43 | FromDiscord | <Elegantbeef> As an aside I absolutely hate that Micheal and Michael are both names, pick a lane |
02:15:17 | FromDiscord | <odexine> I do not acknowledge Micheal to be a real name what the fuck |
02:17:02 | FromDiscord | <raynei486> In reply to @gbolahan "I guess this is": doom emacs is nice↵I personally like turning its vim keys off tho |
02:17:46 | FromDiscord | <Elegantbeef> Micheal is Gaelic, Michael is from Hebrew, as Gaels originate in the British isles, it's the correct one for English. Fite me 😄 |
02:17:53 | FromDiscord | <Elegantbeef> Even more bad commas |
02:18:53 | FromDiscord | <gbolahan> In reply to @odexine "Why would switching editor": I'm having troubles with the nim server on vscode. I can go to type definition for most files. Sometime it works, most times it doesn’t. Really slow my work |
02:19:07 | FromDiscord | <Elegantbeef> So change to nimlangserver |
02:19:25 | FromDiscord | <Elegantbeef> https://github.com/saem/vscode-nim#nim-lanugage-server-integration-experimental |
02:26:27 | * | edr quit (Quit: Leaving) |
02:29:23 | FromDiscord | <michaelb.eth> sent a code paste, see https://paste.rs/6q4iY |
02:31:36 | FromDiscord | <michaelb.eth> However, if you've not used Emacs previously, there's going to be a learning curve that may not be what you want when you're just trying to get started with Nim. |
02:33:31 | FromDiscord | <Elegantbeef> Vim might have the "how to exit it" meme. Emacs has the "Whoops I just started the intergrated doom and now no longer want to program. Wait now my PC is flying" |
02:34:24 | * | azimut quit (Ping timeout: 246 seconds) |
02:36:39 | FromDiscord | <gbolahan> In reply to @michaelb.eth "However, if you've not": You are right. I just think if I can not get the language server to work with vscode, I'd rather deal with the learning curve of nim than look for where a procedure was defined in a new and very large codebase |
04:49:27 | FromDiscord | <Phil> In reply to @sys64 "Well, even on a": Because the issue is very highly unlikely with the OS, but the way you're interacting with it.↵At least that would've been my first guess and where I'd be doing research.↵I mean you got the error message, you can always try to provide a custom proc to generate an sqlite connection |
05:12:12 | FromDiscord | <odexine> i'd like to know the repro. code |
05:24:46 | FromDiscord | <Phil> Of System64's problem? |
05:41:23 | * | rockcavera quit (Remote host closed the connection) |
06:03:44 | * | advesperacit joined #nim |
06:07:52 | * | PMunch joined #nim |
06:22:25 | FromDiscord | <griffith1deadly> In reply to @chronos.vitaqua "Anyone know what'd be": raw nanovg |
06:26:38 | FromDiscord | <Chronos [She/Her]> No idea what that is |
07:19:47 | NimEventer | New thread by fsh: Range[a..b] semantics is a bit unclear to me, see https://forum.nim-lang.org/t/10492 |
07:29:16 | * | krux02 joined #nim |
07:39:41 | FromDiscord | <odexine> the first few ones seem to be an implicit generics problem |
08:03:03 | * | LyndsySimon quit (Server closed connection) |
08:03:12 | * | LyndsySimon joined #nim |
08:08:43 | FromDiscord | <Elegantbeef> Taking only a short look almost all seem to be due to implicit generics |
08:15:17 | * | syl quit (Quit: C-x C-c) |
08:16:46 | * | syl joined #nim |
08:41:38 | FromDiscord | <System64 ~ Flandre Scarlet> Is it normal I have this segfault?↵Seems it's not on my side https://media.discordapp.net/attachments/371759389889003532/1153611849011564614/message.txt |
08:42:38 | FromDiscord | <System64 ~ Flandre Scarlet> It works fine on Windows |
08:44:57 | FromDiscord | <mratsim> In reply to @sys64 "Is it normal I": I think there is a bug in httpbeast multithreading, a ref object was passed around and the ref was incremented or something |
08:45:12 | FromDiscord | <mratsim> try --mm:atomicRef just in case |
08:45:47 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @mratsim "try --mm:atomicRef just in": Is it based on ARC? |
08:47:58 | FromDiscord | <Chronos [She/Her]> I'd assume atomic ref is based on refc tbh judging by the name |
08:48:16 | FromDiscord | <Elegantbeef> Nope it's atomic ref counted arc |
08:48:21 | FromDiscord | <Chronos [She/Her]> Oh huh |
08:48:28 | FromDiscord | <mratsim> yes it's arc-based |
08:49:07 | FromDiscord | <Chronos [She/Her]> Does that actually fix the issues to do with threading and arc? Meaning that data shared between threads is memory safe? Or am I misunderstanding |
08:50:21 | FromDiscord | <mratsim> In reply to @chronos.vitaqua "Does that actually fix": it might |
08:50:31 | FromDiscord | <Chronos [She/Her]> Hm |
08:50:32 | FromDiscord | <mratsim> I would have to see, many subtelties |
08:50:42 | FromDiscord | <System64 ~ Flandre Scarlet> Again https://media.discordapp.net/attachments/371759389889003532/1153614132076093470/message.txt |
08:50:44 | FromDiscord | <Chronos [She/Her]> Fair, I also wonder if it hurts speed |
08:50:46 | FromDiscord | <Elegantbeef> It prevents a double free when you share refs across threads |
08:50:55 | FromDiscord | <Elegantbeef> It hurts speed mainly on older processors |
08:51:31 | FromDiscord | <Elegantbeef> If you are just reading from data and do not need to free you can send the ref as a pointer |
08:51:43 | FromDiscord | <Elegantbeef> Free it on the main thread and own it that way |
08:51:49 | FromDiscord | <Elegantbeef> Or use Gcref |
08:53:05 | FromDiscord | <System64 ~ Flandre Scarlet> Might it be because pointer size are different between gcc and Nim? |
08:53:27 | FromDiscord | <Elegantbeef> You get an error if that's the case |
08:57:22 | FromDiscord | <System64 ~ Flandre Scarlet> Weird I have this segfault then |
09:16:31 | FromDiscord | <System64 ~ Flandre Scarlet> I tried MarkAndSweep garbage collection, but I have an incredible amout of lag |
09:25:15 | FromDiscord | <mratsim> In reply to @sys64 "I tried MarkAndSweep garbage": mark and sweep cannot deal with threads. |
09:25:52 | FromDiscord | <mratsim> The lag is probably due to `false sharing`. But that's the best case. |
09:27:32 | FromDiscord | <System64 ~ Flandre Scarlet> sent a long message, see http://ix.io/4GNb |
09:28:21 | FromDiscord | <mratsim> In reply to @sys64 "OOF What should I": does `--mm:atomicArc` help? |
09:28:43 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @mratsim "does `--mm:atomicArc` help?": No |
09:29:52 | FromDiscord | <mratsim> how easy it is for you to create a minimal reproducible example? |
09:30:59 | FromDiscord | <System64 ~ Flandre Scarlet> It will be quite hard, but I have a repo with the code |
09:31:16 | FromDiscord | <ringabout> Maybe use `refc` or use the latest version of httpbeast, which mitigated some problems regarding ORC. |
09:31:37 | PMunch | Damn, Nim is pretty tiny.. |
09:31:46 | PMunch | Oh wait.. |
09:31:50 | FromDiscord | <mratsim> yeah seems like there are some issues:↵↵- https://github.com/dom96/httpbeast/issues/90↵- https://github.com/dom96/httpbeast/issues/80 |
09:32:23 | PMunch | Never mind, I was checking the choosenim shim :P |
09:32:32 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @ringabout "Maybe use `refc` or": Is that the latest version? ``[email protected]`` |
09:32:37 | PMunch | I mean it's still pretty small, 8.7M on my machine |
09:32:46 | FromDiscord | <mratsim> use https://github.com/dom96/httpbeast/pull/89 the `initSettings` function. |
09:33:44 | FromDiscord | <ringabout> In reply to @sys64 "Is that the latest": Nope, https://github.com/dom96/httpbeast/issues/91 it isn't properly tagged. You might need the head version of httpbeast |
09:34:28 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @ringabout "Nope, https://github.com/dom96/httpbeast/issues/91 ": Oh, so I have to add ``#head`` in the Nimble? |
09:34:38 | FromDiscord | <ringabout> I suppose so., |
09:36:51 | FromDiscord | <System64 ~ Flandre Scarlet> sent a code paste, see https://play.nim-lang.org/#ix=4GNg |
09:44:49 | * | ntat joined #nim |
09:59:06 | FromDiscord | <odexine> In reply to @PMunch "Never mind, I was": Lol |
10:10:08 | FromDiscord | <Phil> @System64 ~ Flandre Scarlet Seeing that you had a connection pool of like 10.000 connections was actually quite funny 😄 |
10:10:24 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @isofruit "<@380360389377916939> Seeing that you": Yeah 🤣 |
10:11:02 | FromDiscord | <Phil> Like a casual 3 orders of magnitude larger than most enterprises even need db connections for |
10:11:11 | FromDiscord | <Phil> (edit) "3" => "2" |
10:12:34 | FromDiscord | <System64 ~ Flandre Scarlet> Wooops! My bad then!↵Btw why is my game running way faster on Linux than Windows? |
10:13:04 | FromDiscord | <odexine> ~~windows is just that bad~~ could be any reason |
10:13:21 | FromDiscord | <odexine> Not uncommon for games to work better on Linux than on windows |
10:13:48 | FromDiscord | <System64 ~ Flandre Scarlet> sent a code paste, see https://play.nim-lang.org/#ix=4GNn |
10:14:43 | FromDiscord | <System64 ~ Flandre Scarlet> sent a code paste, see https://play.nim-lang.org/#ix=4GNo |
10:19:19 | FromDiscord | <odexine> NGL it’s a miracle that even worked normally on windows because the CPU time procedure is defined as floating point seconds |
10:19:30 | FromDiscord | <odexine> And TPS delay is defined as floating point milliseconds |
10:24:55 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @odexine "NGL it’s a miracle": And it differs on Linux? |
10:25:11 | FromDiscord | <odexine> No |
10:28:05 | FromDiscord | <odexine> It’s probably better to use monotimes and (nanosecond, or microsecond even) integers to keep the floats out |
10:30:21 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @odexine "It’s probably better to": Oh alright↵kinda strange it works fine on Windows |
10:30:51 | FromDiscord | <odexine> Not sure why |
10:32:25 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @odexine "It’s probably better to": And for the sleep command? |
10:33:14 | FromDiscord | <odexine> Sleep takes an integer in the first place |
10:40:58 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @odexine "Sleep takes an integer": I think sleep is in miliseconds? |
10:41:09 | FromDiscord | <odexine> Integer division |
10:43:22 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @odexine "Integer division": wdym? |
10:43:33 | FromDiscord | <odexine> Just divide the number? |
10:43:44 | FromDiscord | <odexine> Have microseconds? Divide by 1000 |
10:45:26 | FromDiscord | <System64 ~ Flandre Scarlet> Oh alright↵Microseconds might be enough for a game |
10:47:28 | FromDiscord | <Phil> Given that you only really notice ms when it comes to visual fidelity, yeah seems fair |
11:09:27 | * | ntat quit (Quit: leaving) |
11:11:07 | FromDiscord | <System64 ~ Flandre Scarlet> sent a code paste, see https://play.nim-lang.org/#ix=4GNz |
11:14:33 | FromDiscord | <odexine> typeof game.infos.timestart? |
11:15:01 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @odexine "typeof game.infos.timestart?": It's a MonoTime |
11:15:11 | FromDiscord | <System64 ~ Flandre Scarlet> same for timeFinish |
11:16:05 | FromDiscord | <odexine> sent a code paste, see https://paste.rs/EebqR |
11:16:34 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @odexine "sleep(delta.inMilliseconds)": And should I keep the if statement? |
11:16:56 | FromDiscord | <odexine> i dont know what that if statement is checking |
11:17:18 | FromDiscord | <odexine> what happened to TPS_DELAY? |
11:17:31 | FromDiscord | <odexine> why's the code so different? |
11:17:47 | FromDiscord | <odexine> why are you sleeping for the delta? |
11:18:09 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @odexine "why are you sleeping": I want to have only 60 ticks per seconds |
11:19:33 | FromDiscord | <odexine> your code is going to give you 1 tick per 60 seconds |
11:19:44 | FromDiscord | <odexine> wait |
11:19:49 | FromDiscord | <odexine> it's just weird |
11:20:03 | FromDiscord | <odexine> what happened to the old code with the TPS_DELAY?? |
11:20:09 | FromDiscord | <System64 ~ Flandre Scarlet> I changed it |
11:20:10 | FromDiscord | <odexine> why didnt you just directly convert that |
11:20:47 | FromDiscord | <System64 ~ Flandre Scarlet> I should divide TPS_DELAY by 1000? |
11:20:57 | FromDiscord | <odexine> what |
11:21:02 | FromDiscord | <odexine> wait here |
11:21:22 | FromDiscord | <System64 ~ Flandre Scarlet> Wdym? |
11:22:28 | FromDiscord | <odexine> sent a code paste, see https://play.nim-lang.org/#ix=4GNG |
11:23:11 | FromDiscord | <odexine> or if you want you can make the delay a Duration and use the Duration functions |
11:30:34 | * | azimut joined #nim |
11:34:55 | FromDiscord | <System64 ~ Flandre Scarlet> I can do that too |
11:36:18 | PMunch | Does Nim itself need `-lm` for anything? |
11:43:02 | FromDiscord | <odexine> std/math |
11:45:28 | PMunch | Apart from that |
11:46:42 | FromDiscord | <System64 ~ Flandre Scarlet> sent a code paste, see https://play.nim-lang.org/#ix=4GNL |
11:47:04 | FromDiscord | <odexine> ?????????????????????????????? |
11:47:31 | FromDiscord | <odexine> sent a code paste, see https://play.nim-lang.org/#ix=4GNN |
11:47:52 | FromDiscord | <System64 ~ Flandre Scarlet> This is something similar, no? |
11:48:15 | FromDiscord | <odexine> there's a reason i wrote it the way i did |
11:48:22 | FromDiscord | <odexine> well |
11:48:29 | FromDiscord | <odexine> ig its irrelevant other than code readability |
11:48:45 | FromDiscord | <odexine> i dont feel like reading that anymore so you have fun |
11:49:29 | FromDiscord | <odexine> perhaps print the deltas you're getting and see if they look :sane" |
11:49:31 | FromDiscord | <odexine> (edit) ":sane"" => ""sane"" |
11:55:11 | FromDiscord | <requiresupport> any libs that allow creation of password protected archives? pref something with no C dependencies |
12:15:04 | * | PMunch quit (Quit: Leaving) |
12:16:22 | * | derpydoo joined #nim |
12:23:07 | NimEventer | New thread by Araq: The secret of Nim, see https://forum.nim-lang.org/t/10493 |
12:27:09 | NimEventer | New thread by CircArgs: Concepts and openArray, see https://forum.nim-lang.org/t/10494 |
12:36:59 | * | PMunch joined #nim |
12:45:37 | FromDiscord | <enthus1ast> @requiresupport\: not that i know of, zippy does not support encryption (yet?) |
12:46:17 | FromDiscord | <requiresupport> yeah that's the one I'm eyeing, last I checked it didn't unless something got updated |
12:46:40 | FromDiscord | <requiresupport> (edit) |
12:46:52 | FromDiscord | <enthus1ast> nope |
12:47:32 | FromDiscord | <requiresupport> I guess I can manually encrypt the archive 🤔 |
12:48:23 | FromDiscord | <enthus1ast> when you're the only one that need to decrypt it sure |
12:56:13 | FromDiscord | <Chronos [She/Her]> How does encryption of archives work exactly? Is there a link for it? |
12:56:16 | FromDiscord | <Chronos [She/Her]> For implementation of it |
13:05:41 | FromDiscord | <enthus1ast> idk if there even is a real standard for zip |
13:08:07 | FromDiscord | <Chronos [She/Her]> Fair |
13:10:09 | FromDiscord | <ShalokShalom (ShalokShalom)> Dolphin, my file manager, gives me options to encrypt 7zip and zip |
13:10:27 | FromDiscord | <ShalokShalom (ShalokShalom)> All other file archive formats that it offers, have no such option |
13:10:48 | FromDiscord | <ShalokShalom (ShalokShalom)> Screenshot\_20230919\_150928.png https://media.discordapp.net/attachments/371759389889003532/1153679584684933212/Screenshot_20230919_150928.png |
13:10:56 | FromDiscord | <ShalokShalom (ShalokShalom)> I dont know, which Nim implementation would support that. |
13:11:34 | FromDiscord | <Chronos [She/Her]> Zippy doesn't have that but it possibly could if it's implemented, I'd be interested at taking a crack at it but no idea how/where to start |
13:12:27 | FromDiscord | <nnsee> https://pkware.cachefly.net/webdocs/APPNOTE/APPNOTE-6.3.9.TXT |
13:12:34 | FromDiscord | <nnsee> ctrl-f _encryption_ |
13:12:36 | FromDiscord | <ShalokShalom (ShalokShalom)> I guess at some reference implementation? |
13:13:35 | FromDiscord | <nnsee> sorry, that was an older version |
13:13:38 | FromDiscord | <nnsee> https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT |
13:14:55 | FromDiscord | <Chronos [She/Her]> In reply to @ShalokShalom (ShalokShalom) "I guess at some": Not sure where to find that lol |
13:15:09 | FromDiscord | <Chronos [She/Her]> In reply to @nnsee "https://pkware.cachefly.net/webdocs/casestudies/APP": Guessing this is a reference on how it should be implemented? |
13:15:51 | FromDiscord | <ShalokShalom (ShalokShalom)> It seems like 7zip has this build in. |
13:17:22 | FromDiscord | <nnsee> In reply to @chronos.vitaqua "Guessing this is a": yeah, it's the zip file reference which details how encryption works |
13:17:31 | FromDiscord | <nnsee> this is the "ultimate truth" |
13:18:07 | FromDiscord | <Chronos [She/Her]> Interesting |
13:18:17 | FromDiscord | <Chronos [She/Her]> Also wordy lol |
13:18:41 | FromDiscord | <nnsee> it's pretty concise as far as standards go |
13:20:08 | FromDiscord | <ShalokShalom (ShalokShalom)> Sorry, I meant 7z. |
13:20:24 | FromDiscord | <ShalokShalom (ShalokShalom)> And yeah, but .zip and .7z can do that out of the box |
13:20:47 | FromDiscord | <ShalokShalom (ShalokShalom)> I would have thought, that is an afterthought by some third party tools, but I was wrong. |
13:21:05 | FromDiscord | <ShalokShalom (ShalokShalom)> [Edit](https://discord.com/channels/371759389889003530/371759389889003532/1153682002504069262): And yeah, both .zip and .7z can do that out of the box |
13:45:21 | FromDiscord | <voidwalker> https://github.com/dom96/nimbox/tree/master - anyone have any idea where termbox.h is supposed to go ? Or does it need other files as well ? |
13:46:35 | PMunch | voidwalker, wild guess is that you're supposed to install it via your package manager |
13:52:09 | FromDiscord | <voidwalker> welp, t he AUR package is broken |
13:52:38 | * | PMunch quit (Quit: Leaving) |
13:52:48 | FromDiscord | <voidwalker> it seems termbox2 is the proper replacement, but that doesn't seem to be wrapped for nim |
13:53:32 | FromDiscord | <jmgomez> sent a code paste, see https://play.nim-lang.org/#ix=4GOs |
14:14:05 | NimEventer | New thread by void09: High level TUI framework (or wrapper of), see https://forum.nim-lang.org/t/10495 |
14:16:59 | FromDiscord | <swag_1337> erm are there any dimscord forks for selfbots? |
14:23:35 | FromDiscord | <odexine> no |
14:24:08 | FromDiscord | <odexine> if you're daring you can ask the dedicated dimscord server |
14:55:02 | FromDiscord | <sOkam! 🫐> In reply to @jmgomez "Updated the `Why Nim`": great write ✍️ |
15:04:21 | FromDiscord | <_gumbercules> In reply to @jmgomez "Updated the `Why Nim`": IC has been in the works for multiple years at this point |
15:05:07 | FromDiscord | <Chronos [She/Her]> What's the challenges with implementing IC? |
15:05:25 | FromDiscord | <Chronos [She/Her]> From a clueless outsider point of view |
15:05:26 | FromDiscord | <_gumbercules> I think there are a few things in there you're giving Nim a bit too much credit for, but overall it's not a bad explanation as to why. |
15:06:12 | FromDiscord | <_gumbercules> In reply to @chronos.vitaqua "What's the challenges with": I imagine the reason that it's complicated, in the case of Nim anyway, is because of macros |
15:06:41 | FromDiscord | <_gumbercules> But I don't really know because I don't work on the compiler - the idea behind IC is to only need to recompile what has changed |
15:08:45 | FromDiscord | <Chronos [She/Her]> Hm fair |
15:08:45 | FromDiscord | <_gumbercules> most compilers have a few phases - first they parse, then they lex, then they do semantic analysis then they will produce a syntax tree or some IR and then they'll generally generate some code from that |
15:09:22 | FromDiscord | <_gumbercules> so IC would involve (I imagine) caching results from various stages of this compilation pipeline so that they can be reused later |
15:09:34 | FromDiscord | <Chronos [She/Her]> Wouldn't a reasonable solution be to generate a hash of the file, and output some file that stores the generated AST + that hash? |
15:09:44 | FromDiscord | <Chronos [She/Her]> And if that hash changed, then to regenerate the AST? |
15:09:52 | FromDiscord | <_gumbercules> and I imagine the complexity arises when programs munge the AST Nim prodcues via macros |
15:09:54 | FromDiscord | <Chronos [She/Her]> THo idk nim internals so |
15:10:06 | * | xaltsc joined #nim |
15:10:14 | FromDiscord | <Chronos [She/Her]> In reply to @_gumbercules "and I imagine the": Fair |
15:10:19 | FromDiscord | <Chronos [She/Her]> Also compile-time logic |
15:10:33 | FromDiscord | <_gumbercules> I don't even want to guess at solutions because people that know the Nim compiler have been working on IC since prior to Nimskull even being a thought |
15:11:11 | FromDiscord | <_gumbercules> and after all that time I don't think we're any closer to IC than we were then besides having tried and failed a bunch of times |
15:11:24 | FromDiscord | <_gumbercules> so in that case maybe we are closer but it's not a very transparent thing so 🤷 |
15:11:47 | FromDiscord | <_gumbercules> last I heard the approach that had been being worked on needed to be scrapped and it was back to the drawing board |
15:11:53 | FromDiscord | <jmgomez> In reply to @_gumbercules "IC has been in": that's marketing material only 😛 |
15:11:57 | FromDiscord | <_gumbercules> but maybe things have progressed since then - I'm not sure |
15:12:21 | FromDiscord | <_gumbercules> In reply to @jmgomez "that's marketing material only": haha yeah - just trying to be realistic |
15:12:30 | FromDiscord | <jmgomez> IC kinda works when mm:none 😛 Im trying to help here and there. The issue right now is that it is too slow |
15:13:12 | FromDiscord | <_gumbercules> haha I'm just saying I've heard it before 😛 |
15:13:21 | FromDiscord | <_gumbercules> IC is almost ready |
15:13:23 | FromDiscord | <_gumbercules> IC is almost working |
15:13:29 | FromDiscord | <_gumbercules> IC is just around the corner |
15:21:29 | * | LuxuryMode joined #nim |
15:26:33 | * | krux02 quit (Remote host closed the connection) |
15:38:51 | * | ntat joined #nim |
15:42:19 | * | jmdaemon quit (Ping timeout: 264 seconds) |
16:00:47 | NimEventer | New thread by rajmac: Ggplotnim and lapack, see https://forum.nim-lang.org/t/10496 |
16:24:36 | FromDiscord | <.aingel.> Is IC a priority? |
16:25:44 | FromDiscord | <leorize> it was |
16:25:56 | FromDiscord | <leorize> probably still is |
16:49:45 | FromDiscord | <ezquerra> In reply to @jmgomez "IC kinda works when": How can you enable it? |
16:51:59 | FromDiscord | <jmgomez> In reply to @ezquerra "How can you enable": `--ic` or `--incremental:on` but rembember to also do `--mm: none` it should work for small programs like that. But again is quite slow |
16:52:09 | FromDiscord | <jmgomez> (edit) "again" => "again," |
16:52:30 | FromDiscord | <jmgomez> (edit) "is" => "it's" |
16:53:03 | * | def- quit (Quit: -) |
16:53:21 | * | def- joined #nim |
16:54:01 | FromDiscord | <inv2004> sent a code paste, see https://play.nim-lang.org/#ix=4GPp |
16:54:14 | NimEventer | New thread by Levlan: Just installed nim 2.0 and vscodium can't run a nim program, see https://forum.nim-lang.org/t/10497 |
17:03:40 | * | rockcavera joined #nim |
17:09:40 | * | krux02 joined #nim |
17:26:16 | FromDiscord | <_gumbercules> In reply to @inv2004 "Hi, I have a": probably because you could blow the stack - I'm not sure what the implementation of `decode` looks like |
17:26:44 | FromDiscord | <inv2004> In reply to @_gumbercules "probably because you could": but I suppose it is applicable for non-gc too |
17:27:07 | FromDiscord | <_gumbercules> sure but by default Nim is garbage collected |
17:27:55 | FromDiscord | <inv2004> yep, it is from anonimongo - it is just some bson parser - I think it is ok to be recusive here, but I still cannot get the reason for non-gcsafe |
17:28:24 | FromDiscord | <_gumbercules> could ask in #internals probably more likely to get an answer there from someone who works on the compiler |
17:35:35 | NimEventer | New thread by DMisener: New OSX weirdness - extraneous ld warning, see https://forum.nim-lang.org/t/10498 |
17:35:55 | FromDiscord | <jmgomez> I think the reason is that you need to mark it manually because the compiler cant analyze it properly because of its recursion nature |
17:36:16 | FromDiscord | <jmgomez> (edit) "recursion" => "recursive" |
17:54:18 | arkanoid | I have a little endian hex encoded bytes, and I want to turn them into an int. For example "0100" little-endian is "0001" big-endian and then 1u16. This seems the right function, but it doesn't handle little-endianess https://nim-lang.org/docs/strutils.html#parseHexInt%2Cstring. How would you perform the endian conversion on hex strings? |
18:00:52 | FromDiscord | <leorize> I think you can just read it into a number and endian-swap that number |
18:31:49 | * | rockcavera quit (Remote host closed the connection) |
18:38:26 | Amun-Ra | or reverse the string then parse |
18:38:42 | Amun-Ra | first method proposed is faster |
18:41:05 | * | xmachina quit (Quit: WeeChat 4.0.4) |
18:44:26 | FromDiscord | <leorize> that wouldn't be correct |
18:44:27 | * | xmachina joined #nim |
18:44:38 | FromDiscord | <leorize> a hex character is only 4 bits |
18:48:58 | Amun-Ra | ah, hex, I saw "0001" and assumed binary |
18:59:54 | * | xmachina quit (Quit: WeeChat 4.0.4) |
19:01:33 | * | ntat quit (Quit: leaving) |
19:21:37 | * | def- quit (Quit: -) |
19:22:00 | * | def- joined #nim |
19:22:12 | * | ttkap quit (Ping timeout: 240 seconds) |
19:30:20 | * | ttkap joined #nim |
19:32:05 | FromDiscord | <.aingel.> For futhark how do I do "--passL:"-l<library name>" |
19:32:30 | FromDiscord | <.aingel.> sent a code paste, see https://play.nim-lang.org/#ix=4GQd |
19:32:38 | FromDiscord | <.aingel.> I guess in compile right |
19:32:48 | FromDiscord | <Elegantbeef> You can either pass it as a command line argument, in a config, or in a passl pragma |
19:34:11 | FromDiscord | <.aingel.> oh okay |
19:35:45 | * | xmachina joined #nim |
19:37:10 | FromDiscord | <.aingel.> Do you know what syspath is in futhark? |
19:37:19 | FromDiscord | <.aingel.> What is syspath vs path |
19:37:31 | FromDiscord | <Elegantbeef> sys path is your include path |
19:38:31 | FromDiscord | <.aingel.> And path? |
19:38:44 | FromDiscord | <.aingel.> I thought path was the include path |
19:38:45 | FromDiscord | <.aingel.> for headers |
20:03:35 | FromDiscord | <.aingel.> So without using pkg-config, is there a way to tell what -l flag to use to include a library? |
20:18:45 | * | azimut quit (Ping timeout: 246 seconds) |
20:18:48 | FromDiscord | <.aingel.> How do I send stdout for c interop? |
20:21:00 | FromDiscord | <.aingel.> Like the stdout file |
20:23:07 | FromDiscord | <raynei486> write to stdout? |
20:23:33 | * | azimut joined #nim |
20:26:27 | FromDiscord | <.aingel.> Well I have to pass a filehandle to a function |
20:26:32 | FromDiscord | <.aingel.> A file |
20:26:36 | FromDiscord | <.aingel.> And it will write it to that |
20:26:42 | FromDiscord | <Elegantbeef> So pass `stdout` |
20:26:49 | FromDiscord | <.aingel.> How do I pass that to c |
20:26:53 | FromDiscord | <.aingel.> just putting stdout doesn't work |
20:26:55 | FromDiscord | <.aingel.> from nim |
20:30:08 | FromDiscord | <Elegantbeef> PS if you elaborate what "doesn't work" entails people can help |
20:30:14 | FromDiscord | <.aingel.> Sorry |
20:30:34 | FromDiscord | <.aingel.> `discard xmlDocDump(cast[ptr structsfile](stdout), doc);` |
20:30:36 | FromDiscord | <.aingel.> I had to do it this way |
20:32:40 | FromDiscord | <.aingel.> By not working I guess I was getting a type mismatch on compile, when I just tried to pass stdout into the c wrapped function xmlDocDump (wrapped by futhark) |
20:32:58 | FromDiscord | <.aingel.> But yeah I just checked what the compiler was type it wanted and casted it, and it worked |
20:34:51 | * | azimut quit (Ping timeout: 246 seconds) |
20:38:09 | * | rockcavera joined #nim |
20:39:20 | FromDiscord | <raynei486> e.g. post errors? |
20:46:36 | * | azimut joined #nim |
20:57:28 | FromDiscord | <Langosta> === |
21:06:17 | * | derpydoo quit (Ping timeout: 260 seconds) |
21:18:50 | FromDiscord | <millymox> sent a long message, see http://ix.io/4GQB |
21:29:38 | FromDiscord | <.aingel.> How do I access an array element using c interop? |
21:29:57 | * | advesperacit quit () |
21:32:54 | FromDiscord | <.aingel.> Like the data I get back from the c function is an array (pointer to the array). How do I access elements within that array in nim? |
21:32:55 | Amun-Ra | if you have just a ptr type make it ptr UncheckedArray[type] |
21:34:00 | FromDiscord | <.aingel.> Right |
21:34:23 | FromDiscord | <.aingel.> Okay that seems to have worked! |
21:56:51 | NimEventer | New thread by jlhouchin: Mindset Nim, see https://forum.nim-lang.org/t/10499 |
22:11:18 | FromDiscord | <manaravak> Just discovered nim. Was curious if there is a way to call nim code from JS/TS. I have some hobby projects using electron vue3 and it'd be nice to build out some modules in a language that is much faster (fluid simulation stuff). Thought it might be nice to port some code over as a way to try out nim. |
22:31:27 | arkanoid | manaravak, it depends on your target platform |
22:32:37 | FromDiscord | <manaravak> In reply to @arkanoid "<@190955381990621185>, it depends on": Right now just Windows. |
22:58:23 | * | redj joined #nim |
23:11:07 | * | def- quit (Quit: -) |
23:11:43 | * | def- joined #nim |
23:20:20 | NimEventer | New thread by Millymox: How to bind and utilize JavaScripts “new” operator while passing args, see https://forum.nim-lang.org/t/10500 |
23:43:39 | * | attah_ joined #nim |
23:44:43 | * | attah quit (Ping timeout: 264 seconds) |
23:44:43 | * | attah_ is now known as attah |
23:51:31 | * | attah quit (Ping timeout: 258 seconds) |
23:51:34 | * | attah_ joined #nim |
23:52:02 | * | attah_ is now known as attah |
23:57:09 | * | azimut quit (Ping timeout: 246 seconds) |