00:23:45 | FromDiscord | <Arkanoid> I reduced the error I'm dealing with to a minimum example. I get an error in VM if I try to echo a closure, and a GCC compiler error if I try to repr it |
00:24:23 | FromDiscord | <Arkanoid> @nnsee seems down again (error 500) |
00:25:18 | FromDiscord | <Arkanoid> sent a code paste, see https://paste.rs/wRAZr |
00:25:37 | FromDiscord | <Elegantbeef> Closures cannot be consts |
00:26:18 | FromDiscord | <Arkanoid> yes I know. I've already solved this in the general context, but the error I get from this problem its not up to Nim level |
00:27:59 | FromDiscord | <Elegantbeef> It's an established issue that has not been resolved |
00:28:26 | FromDiscord | <Elegantbeef> Someone just needs to ensure that the environment is nil at declaration and emit a "const Closure procedures cannot have an environment" |
00:29:06 | FromDiscord | <Elegantbeef> Bung was working on it but did not understand how to properly do it |
00:29:29 | FromDiscord | <Arkanoid> this one? https://github.com/nim-lang/Nim/issues/20545 |
00:29:59 | FromDiscord | <Elegantbeef> Well the two PRs |
00:30:49 | FromDiscord | <Arkanoid> but why const pass can't have closure? Is it a VM limitation, or I am missing the logic that makes it impossible |
00:31:26 | FromDiscord | <Elegantbeef> A closure has GC'd memory having a constant with GC'd memory is just not allowed |
00:31:38 | * | raynei joined #nim |
00:31:41 | FromDiscord | <Elegantbeef> There is a caveat for `seq` and `string` though |
00:32:18 | FromDiscord | <Elegantbeef> What is the runtime implementation of a const closure, can the environment be mutated? |
00:32:28 | FromDiscord | <Elegantbeef> It's quite an ambiguous concept |
00:33:01 | FromDiscord | <Elegantbeef> It's not too dissimilar to having `ref` being `const` |
00:33:38 | FromDiscord | <Arkanoid> got it, const pass can't trace the memory usage of the closure. You'd need to handle memory manually there I guess |
00:33:51 | FromDiscord | <Elegantbeef> That's not really the issue |
00:35:05 | FromDiscord | <Arkanoid> let me wrap my head around this for a minute then |
00:35:16 | FromDiscord | <Arkanoid> thanks for the explanation, as always |
00:35:38 | FromDiscord | <Elegantbeef> Gc'd memory being `const` is very much 'what do you expect to happen here, it makes little sense' |
00:37:14 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=VyViDLpVBLMN |
00:38:11 | * | madprops_ is now known as madprops |
00:38:12 | * | madprops quit (Changing host) |
00:38:12 | * | madprops joined #nim |
00:38:28 | FromDiscord | <Elegantbeef> Though even if Nim had stack allocated closures the premise of a const closure makes little sense as it requires runtime information to be able to use it |
00:39:47 | FromDiscord | <Elegantbeef> But maybe I'm silly and a const closure makes sense 😄 |
00:47:34 | FromDiscord | <leorize> nim does have stack closure to a degree iirc |
00:51:52 | * | krux02 quit (Remote host closed the connection) |
00:53:28 | FromDiscord | <Elegantbeef> I think the docs allude to that but I do not think there is any implementation of that |
00:53:31 | FromDiscord | <Elegantbeef> But I could be wrong |
01:05:30 | FromDiscord | <leorize> it's definitely not impossible, at least |
01:24:34 | * | raynei quit (Ping timeout: 264 seconds) |
01:31:18 | * | antranigv quit (Ping timeout: 260 seconds) |
01:37:07 | * | antranigv joined #nim |
01:47:03 | FromDiscord | <odinshat> Is Atlas necessary? Is it just Nims way of doing virtualenvs like in Python? |
01:49:06 | FromDiscord | <odinshat> Is Atlas like PyVirtualEnv? |
01:51:53 | FromDiscord | <leorize> kinda |
02:29:56 | * | raynei joined #nim |
02:51:52 | * | SchweinDeBurg quit (Quit: WeeChat 4.3.0-dev) |
04:19:18 | FromDiscord | <odinshat> To learn Nim I thought I'd dive straight to something immediately useful - a basic Lemmy bot that grabbed news form an RSS feed and posted to Lemmy. Is that something Nim is good/ok for? Or is it like trying to build a web scraper in Assembly? ↵↵It looks like it should be simple....thougts? |
04:20:20 | FromDiscord | <4zv4l> it should be simple↵Nim has good libraries for that |
04:23:52 | FromDiscord | <4zv4l> I would recommend:↵- fetch rss/post Lemmy: https://github.com/treeform/puppy↵- parse xml: https://github.com/ba0f3/xml.nim |
04:25:22 | FromDiscord | <odinshat> Excellent - thank you! \:) |
04:33:08 | FromDiscord | <␀ Array 🇵🇸 🍉> if targeting js then using js's fetch would be better no?↵(@4zv4l) |
04:45:23 | * | SchweinDeBurg joined #nim |
04:46:29 | FromDiscord | <4zv4l> oh I didnt know he's targetting js |
04:46:42 | FromDiscord | <4zv4l> (edit) "targetting" => "targeting" |
04:48:11 | FromDiscord | <␀ Array 🇵🇸 🍉> idk if he is lol↵(@4zv4l) |
05:34:22 | FromDiscord | <srabb> how do i go to #gamedev on matrix |
06:02:39 | FromDiscord | <Elegantbeef> #gamedev |
06:04:46 | * | raynei quit (Ping timeout: 264 seconds) |
06:09:52 | FromDiscord | <varriount> @_araq Come across any interesting CS papers recently? |
06:24:07 | * | azimut quit (Ping timeout: 240 seconds) |
07:03:25 | * | antranigv quit (Ping timeout: 264 seconds) |
07:38:16 | * | advesperacit joined #nim |
07:40:04 | FromDiscord | <_araq> hundreds of AI related papers but nothing to bring Nim forward |
08:46:03 | FromDiscord | <nnsee> In reply to @Arkanoid "<@961485620075720734> seems down again": interesting |
08:46:06 | FromDiscord | <nnsee> will take a look |
08:48:04 | FromDiscord | <nnsee> it seems up to me |
08:48:17 | FromDiscord | <nnsee> and last errors are from last night before i fixed postgres |
08:48:29 | FromDiscord | <nnsee> oh, i think i know what it might be... some threads are nonfunctional |
08:48:41 | FromDiscord | <nnsee> there's 32 of them so |
08:49:12 | FromDiscord | <Elegantbeef> > some threads are nonfunctional↵> Hey that's Phil's entire view of Nim threading! |
08:49:13 | FromDiscord | <Elegantbeef> Damn it |
08:49:16 | FromDiscord | <Elegantbeef> Too lazy to fix it live with the shitty joke |
08:51:27 | FromDiscord | <nnsee> lmao |
09:12:53 | FromDiscord | <Phil> In reply to @Elegantbeef "> some threads are": I say some threads are non-functional?↵I say some thread-constellations leak memory like the traitors they are! |
09:13:09 | FromDiscord | <Elegantbeef> Speaking of traitors time to use tratior |
09:13:10 | FromDiscord | <Phil> (Notable thread + async) |
09:13:14 | FromDiscord | <Elegantbeef> traitor even |
09:14:51 | * | khazakar quit (Quit: Connection closed for inactivity) |
09:19:12 | FromDiscord | <nnsee> I don't understand how CONNECTION_OK is in scope here https://github.com/treeform/pg/blob/master/src/pg.nim#L31 |
09:19:34 | FromDiscord | <nnsee> I am also importing db_connector/db_postgres yet that's not defined for me |
09:19:50 | FromDiscord | <nnsee> oh, wait, `include` |
09:21:08 | FromDiscord | <Elegantbeef> You could also do `import db_postgres{.all.}` |
09:21:13 | FromDiscord | <Elegantbeef> Atleast in theory |
09:23:54 | FromDiscord | <nnsee> eh i just did `import db_connector/[db_postgres, postgres]` |
09:29:20 | FromDiscord | <nnsee> sent a long message, see https://pasty.ee/kTogkIpvABOc |
09:31:19 | FromDiscord | <Elegantbeef> `assert` is compiled out in release so ya |
09:32:44 | FromDiscord | <nnsee> well yeah but that just means the code proceeds trying to use the connection for db operations even though the connection is bad |
09:33:01 | FromDiscord | <nnsee> it should at least try to call `pqreset` on it first |
09:34:44 | FromDiscord | <Elegantbeef> I do not know anything about these libraries so yes do the proper thing 😛 |
09:36:12 | FromDiscord | <nnsee> well I think the PGconn object is passed as a pointer to the postgres C library, which _does_ set that field to `BAD`, so I should be fine? |
09:37:52 | FromDiscord | <Elegantbeef> Crickets |
09:47:19 | Amun-Ra | is there a way for nim doc to include all exports into since doc file and not list exports at the bottom of the page? |
09:47:41 | Amun-Ra | I don't want to have a single large .nim just bc of the docs |
09:48:01 | Amun-Ra | and include won't work as I have several include files that import from each other |
09:50:25 | Amun-Ra | and the import and export list is rather long: https://retro.rocks/tmp/nlibsdl2/ |
09:51:59 | FromDiscord | <Elegantbeef> I assume with these wrappings you cannot just import specific Nim modules? |
09:52:34 | Amun-Ra | no |
09:53:13 | Amun-Ra | I have an include tree that represents original include file structure |
09:53:51 | Amun-Ra | putting all these types and consts to single file would require specific placement |
09:54:08 | Amun-Ra | C before A, A before B, etc. |
09:55:54 | Amun-Ra | plus I have a low lever wrapper that I do not expose to the user, and high level one in separate nim file, I can't include all the types in both; I can join low level with high level into single file tho |
09:57:24 | Amun-Ra | I think the only way to go with current doc target is to have single nim file with all the types and single nim file with all the procs |
09:58:12 | Amun-Ra | is it worth it for the sake of doc page to look complete? hmm |
09:58:37 | FromDiscord | <Elegantbeef> No |
10:02:34 | Amun-Ra | you're right |
10:37:35 | NimEventer | New thread by Solo-Leveler: Nim safety features like Zig & Rust?, see https://forum.nim-lang.org/t/10910 |
11:02:47 | NimEventer | New thread by domogled: Import compiler, see https://forum.nim-lang.org/t/10911 |
12:52:10 | FromDiscord | <takemichihanagaki3129> Guys, I have a question. This may sound dumb, but is ARC/ORC a borrow checker? |
12:52:35 | FromDiscord | <takemichihanagaki3129> https://forum.nim-lang.org/t/10910#72675↵Araq said that Nim has a Borrow checker, is he referring to it? |
12:53:21 | FromDiscord | <Phil> I mean, it'd be how I'd have described it in a sense.↵Just that instead of blocking your compilation, nim uses it to infer whether to do copies or not |
12:53:42 | FromDiscord | <Phil> That's as far as my understanding of it goes at least. |
12:54:00 | FromDiscord | <takemichihanagaki3129> Interesting... |
12:54:25 | FromDiscord | <Phil> It's the same kind of logic through which you can claim C++ to have a borrow checker though - You just do ref-counting and free when there's no ref's around |
12:55:23 | FromDiscord | <takemichihanagaki3129> I always thought it was a separated concern.↵I mean, I don't see people referring to RAII or Swift MM as a borrowing checker.↵That was my confusion. |
12:55:35 | FromDiscord | <takemichihanagaki3129> (edit) "concern.↵I" => "concept.↵I" |
12:55:50 | FromDiscord | <takemichihanagaki3129> (edit) "Swift" => "Swift's" |
12:56:30 | FromDiscord | <Phil> You might want to ask internals about the clearer distinction there.↵Might be the combination of nim inferring copies in some scenarios (to generally make life easier but which will screw you sometimes) |
12:56:40 | FromDiscord | <Phil> (edit) "You might want to ask internals about the clearer distinction there.↵Might be the combination of nim inferring copies in some scenarios (to generally make life easier but which will screw you sometimes) ... " added "together with ref-counting" |
12:57:53 | FromDiscord | <takemichihanagaki3129> In reply to @isofruit "You might want to": Alright, I'll ask there! |
13:05:13 | FromDiscord | <tobin6579> The first 10 people to Invest $50 will earn $750 within 12 hours... Ask me how↵ 👇👇👇👇👇👇↵https://t.me/+FGhsj-vpp7dmZDc0 |
13:05:51 | FromDiscord | <takemichihanagaki3129> In reply to @tobin6579 "The first 10 people": <@&371760044473319454> |
13:08:54 | NimEventer | New thread by AntonioFS: 'can have side effects' error., see https://forum.nim-lang.org/t/10913 |
13:14:17 | * | jmdaemon quit (Ping timeout: 256 seconds) |
13:55:10 | * | azimut joined #nim |
14:23:33 | * | fallback quit (Ping timeout: 256 seconds) |
14:25:14 | FromDiscord | <luteva> sent a code paste, see https://play.nim-lang.org/#pasty=tEfYiRGMlKVZ |
14:35:35 | PMunch | A bit wonky, but this works: `default(MyArray)[0].typeof` |
14:46:25 | FromDiscord | <demotomohiro> sent a code paste, see https://play.nim-lang.org/#pasty=kSUyMYErMuWS |
15:07:52 | * | raynei joined #nim |
15:10:33 | FromDiscord | <fullvaluerider> Those are two different T's |
15:21:16 | * | cvoxel joined #nim |
15:21:56 | FromDiscord | <odexine> T is an arbitrary name you give to the generic param |
15:22:21 | FromDiscord | <odexine> if you replace T with anything else it would work the same |
15:22:43 | FromDiscord | <odexine> ah, seems like array does use T in the name |
15:22:59 | FromDiscord | <odexine> i assume it's because it's a magic that it doesn't work |
15:27:34 | FromDiscord | <demotomohiro> https://nim-lang.org/docs/system.html#array↵`array` has I and T like generics but I guess it actually magic and not generic. |
15:45:25 | * | raynei quit (Ping timeout: 264 seconds) |
15:53:24 | * | fallback joined #nim |
15:55:07 | * | antranigv joined #nim |
16:08:22 | * | raynei joined #nim |
16:27:25 | * | raynei quit (Ping timeout: 264 seconds) |
16:28:55 | * | azimut quit (Ping timeout: 240 seconds) |
16:29:19 | * | azimut joined #nim |
17:18:45 | * | rockcavera joined #nim |
17:47:57 | NimEventer | New thread by arnetheduck: Chronos 4.0, see https://forum.nim-lang.org/t/10914 |
17:54:36 | * | azimut quit (Remote host closed the connection) |
17:55:11 | * | azimut joined #nim |
18:25:29 | * | raynei joined #nim |
18:56:17 | * | SchweinDeBurg quit (Quit: WeeChat 4.3.0-dev) |
19:31:39 | * | adigitoleo quit (*.net *.split) |
19:31:54 | * | adigitoleo joined #nim |
19:32:00 | * | adigitoleo quit (Max SendQ exceeded) |
19:32:07 | * | adigitoleo joined #nim |
19:53:50 | * | krux02 joined #nim |
19:56:47 | FromDiscord | <soic> does anyone have issues with nimlangserver in Neovim? I keep getting random "compiler errors" that don't actually exist if I try to compile the program |
19:56:53 | FromDiscord | <soic> Matrix.png https://media.discordapp.net/attachments/371759389889003532/1199805038751653988/Matrix.png?ex=65c3e084&is=65b16b84&hm=8797e4c29cf34f532c3cb8f0fb3fd0d22f763c71bd9f2d580e36d0ab892c8bff& |
19:56:53 | FromDiscord | <soic> Matrix 2.png https://media.discordapp.net/attachments/371759389889003532/1199805041926733915/Matrix_2.png?ex=65c3e085&is=65b16b85&hm=c0c49455ba5ca31adf0f16f256a61bc2949b42cc681dffcfc8435fb49cc98523& |
19:57:11 | * | raynei quit (Ping timeout: 256 seconds) |
19:58:29 | FromDiscord | <soic> [Edit](https://discord.com/channels/371759389889003530/371759389889003532/1199805015527796877): does anyone have issues with nimlangserver in Neovim? I keep getting completely nonsense "compiler errors" that don't actually exist if I try to compile the program |
19:59:01 | FromDiscord | <soic> I obviously tried updating all of my plugins, nimlangserver and restarting neovim but neither of those worked |
20:05:23 | FromDiscord | <spacelucy> hey, i'm having some problems installing nimlsp |
20:05:36 | FromDiscord | <spacelucy> basically, i run `nimble install nimlsp` and it gives me this |
20:06:15 | FromDiscord | <spacelucy> image.png https://media.discordapp.net/attachments/371759389889003532/1199807398177673337/image.png?ex=65c3e2b7&is=65b16db7&hm=dfbc9f0141dfba51fca3f96a318e712c9cad5028896b0c52d9af5244d968d49b& |
20:06:15 | FromDiscord | <spacelucy> some issue with nimsuggest i think |
20:06:38 | FromDiscord | <spacelucy> but i have nimsuggest installed |
20:06:39 | FromDiscord | <spacelucy> image.png https://media.discordapp.net/attachments/371759389889003532/1199807499876966522/image.png?ex=65c3e2cf&is=65b16dcf&hm=3f9a02c52d89d92b9a4eddb77fad0629239ff87da5d4ce77d34d72db925870cf& |
20:14:54 | FromDiscord | <soic> I also tried installing nimlsp but gave up and used nimsuggest instead |
20:15:30 | FromDiscord | <spacelucy> how? |
20:15:44 | FromDiscord | <spacelucy> i'm just trying to remember how to get syntax highlighting working in neovim |
20:15:58 | FromDiscord | <spacelucy> i did it before in the past but i can't remember what i did |
20:19:39 | FromDiscord | <soic> I installed it using \:Mason in neovim |
20:20:05 | FromDiscord | <soic> I would try to help you but I'm not sure about what I did too lmao |
20:20:15 | FromDiscord | <spacelucy> lol |
20:20:15 | FromDiscord | <spacelucy> its okay |
20:20:25 | FromDiscord | <spacelucy> nimlangserver installs with Mason |
20:20:30 | FromDiscord | <spacelucy> but nimlsp fails |
20:20:56 | FromDiscord | <soic> yeah, same thing for me |
20:21:17 | FromDiscord | <spacelucy> image.png https://media.discordapp.net/attachments/371759389889003532/1199811182337462373/image.png?ex=65c3e63d&is=65b1713d&hm=eaf072ba29fb7cf9d1ad28952b4d801c5b24738a6803b8df4fba49a17dd7310c& |
20:21:35 | FromDiscord | <soic> oh |
20:21:37 | FromDiscord | <soic> I use treesitter |
20:23:35 | FromDiscord | <spacelucy> i'll try that |
20:38:26 | FromDiscord | <luteva> sent a code paste, see https://play.nim-lang.org/#pasty=QrfjqOHureCR |
20:46:31 | FromDiscord | <Elegantbeef> It's not static it's a variable |
20:51:03 | FromDiscord | <spacelucy> yay |
20:51:09 | FromDiscord | <spacelucy> \:TSInstall nim worked |
20:51:40 | FromDiscord | <soic> nice |
20:53:04 | FromDiscord | <luteva> i know it is a variabl, yes. but it is in a static block. so i thought that if the compile can calculate the value of 'index' at the time the 'get()' is called, it should be ok, right? |
20:53:24 | FromDiscord | <luteva> (edit) "that" => "that:" | "compile" => "compiler" |
20:53:58 | FromDiscord | <Elegantbeef> Nope |
20:54:09 | FromDiscord | <luteva> 😦 |
20:54:13 | FromDiscord | <Elegantbeef> Static parameters have to be static static |
20:55:40 | FromDiscord | <luteva> ok so there's nothing but using a const for that? |
20:55:58 | FromDiscord | <luteva> (which then can't be reset) |
20:56:08 | FromDiscord | <Elegantbeef> A const, a literal, a static evaluatable expression, anything static |
20:56:50 | FromDiscord | <Elegantbeef> The issue is that `bleh.get` depends on that runtime `int` which means if it is 1 or 0 it changes the `typeof(myTup.get(ind))` |
20:57:13 | FromDiscord | <Elegantbeef> Nim is statically typed meaning that expression is just wrong |
20:57:42 | FromDiscord | <luteva> ok thx! |
20:58:42 | FromDiscord | <Elegantbeef> The only way you can get a tuple's fields using a runtime delimited index is if you have a chain of `if ind == x` or the tuple is homogeneously typed |
21:05:19 | FromDiscord | <luteva> ok thanks! |
21:15:25 | * | raynei joined #nim |
23:02:09 | * | jmdaemon joined #nim |
23:23:46 | * | dza quit (Quit: ) |
23:26:00 | * | dza joined #nim |
23:47:11 | FromDiscord | <piman_discriminator_1010> what's a good quick to set up GUI library |
23:49:19 | FromDiscord | <Elegantbeef> owlkettle |
23:59:46 | FromDiscord | <piman_discriminator_1010> something that doesn't require msys2 or GTK? |