00:07:12 | * | duuude joined #nim |
00:12:09 | * | nsyd joined #nim |
00:23:41 | * | vicfred quit (Quit: Leaving) |
01:14:11 | * | neurocyte8614492 quit (Ping timeout: 272 seconds) |
01:27:39 | * | duuude quit (Ping timeout: 260 seconds) |
01:28:12 | * | duuude joined #nim |
01:34:17 | FromDiscord | <!Patitotective> š https://media.discordapp.net/attachments/371759389889003532/966874550325346304/ImAppImage.mp4 |
01:34:36 | FromDiscord | <!Patitotective> screenshots dont like to be displayed |
01:37:03 | FromDiscord | <Elegantbeef> `drawAboutModal` taking in a `var App` is fucking comical |
01:38:47 | FromDiscord | <!Patitotective> :[ i-i forget about that things |
01:39:00 | FromDiscord | <!Patitotective> i need nimwarning |
01:39:15 | FromDiscord | <impbox [ftsf]> hmm async http client, seems that requires manually closing it after use yeah or it'll leak files? |
01:39:45 | FromDiscord | <Elegantbeef> Yep |
01:39:50 | FromDiscord | <impbox [ftsf]> aha |
01:40:08 | FromDiscord | <!Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=3VKD |
01:40:18 | FromDiscord | <Elegantbeef> Ok cool |
01:40:28 | FromDiscord | <Elegantbeef> Dont know why you brought up you were |
01:41:17 | FromDiscord | <!Patitotective> i was going to reply to imbox but he sent a message so the message went up and i clicked reply to your message hehe |
01:41:33 | FromDiscord | <impbox [ftsf]> thanks |
01:49:33 | FromDiscord | <ajusa> In reply to @Rika "anyone know a lib": huh I'm looking for one too |
01:50:04 | FromDiscord | <ajusa> but looks like there are three abandoned implementations of reactivex in Nim, which is a bit of a shame as I'm sure macros would make it very fast |
01:50:10 | FromDiscord | <ajusa> like zero-functional |
02:32:05 | NimEventer | New Nimble package! hpx - Nim wrapper for STE||AR HPX, a high performance computing (HPC), distributed memory runtime system, providing parallelism and asynchronous global address space support., see https://github.com/ct-clmsn/nim-hpx/ |
02:42:14 | * | duuude quit (Remote host closed the connection) |
02:48:48 | * | arkurious quit (Quit: Leaving) |
02:49:21 | * | duuude joined #nim |
02:50:05 | * | nsyd quit (Quit: WeeChat 3.5) |
03:35:32 | FromDiscord | <Arathanis> when nimble is set in --localdeps mode how do you get imports to resolve?āµāµI am using VS Code and when nim is in `--localdeps` mode all the installed dependency imports fail in VS code with "cannot open file" error and builds do not work |
03:38:16 | FromDiscord | <Elegantbeef> did it create a folder named `nimbledeps`? |
03:38:25 | FromDiscord | <Elegantbeef> and are all the deps in it |
03:39:20 | FromDiscord | <Arathanis> yes |
03:40:25 | FromDiscord | <Elegantbeef> What module isnt it capable of finding? |
03:40:43 | FromDiscord | <Arathanis> winim |
03:41:15 | FromDiscord | <Arathanis> but i tested with `fusion` as well |
03:41:15 | FromDiscord | <Elegantbeef> Is it in the nimbledeps folder and is it properly cloned? |
03:41:47 | FromDiscord | <Arathanis> https://media.discordapp.net/attachments/371759389889003532/966906637870825512/unknown.png |
03:44:32 | FromDiscord | <impbox [ftsf]> sent a code paste, see https://play.nim-lang.org/#ix=3VKL |
03:45:59 | FromDiscord | <Arathanis> how do you know they aren't interleaving? do the ones in your actual codebase have some kind of output? |
03:46:12 | FromDiscord | <impbox [ftsf]> yeah the real one have output |
03:47:05 | FromDiscord | <impbox [ftsf]> the logs show only "doing thing 1" repeating |
03:47:25 | FromDiscord | <huantian> Donāt await in onReady |
03:47:45 | FromDiscord | <huantian> Or rather donāt await them individually |
03:48:03 | FromDiscord | <huantian> I think you can use `all()` to await both at the same time |
03:48:25 | FromDiscord | <Arathanis> ohhh duh |
03:48:25 | FromDiscord | <huantian> Or just asyncCheck them |
03:48:30 | FromDiscord | <Arathanis> `await` is the same as `waitFor` |
03:48:42 | FromDiscord | <Arathanis> it thinks you want to wait for that to finish |
03:49:00 | FromDiscord | <huantian> Not exactly the same but yes |
03:49:01 | FromDiscord | <impbox [ftsf]> yeah, i want them to run interleaved not wait for each other |
03:49:04 | FromDiscord | <Arathanis> sent a code paste, see https://paste.rs/Mj3 |
03:49:21 | FromDiscord | <Arathanis> so it goes into first, hits the event loop |
03:49:28 | FromDiscord | <Arathanis> but you dont get to second until first finishes |
03:49:55 | FromDiscord | <impbox [ftsf]> yep, i understand, but i'm not sure how to avoid that |
03:49:58 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3VKM |
03:50:07 | FromDiscord | <impbox [ftsf]> i'll try that |
03:51:02 | FromDiscord | <Arathanis> i think you can also use `callSoon` |
03:51:10 | FromDiscord | <Arathanis> but `asyncCheck` causes exceptions when things blow up |
03:51:30 | FromDiscord | <Elegantbeef> Also can just hold onto the futures and pass them up |
03:51:46 | FromDiscord | <Arathanis> uhg i dont want to have to use global dependency installation to make this work, what is going on with this lol |
03:51:50 | FromDiscord | <huantian> In reply to @Arathanis "but `asyncCheck` causes exceptions": Which is good |
03:52:04 | FromDiscord | <impbox [ftsf]> asyncCheck seems to be working \o/ |
03:53:15 | FromDiscord | <Arathanis> In reply to @huantian "Which is good": agreed, though i bet there are edge cases where ignoring failure is fine or preferrable |
03:53:40 | FromDiscord | <huantian> Ignoring failure is fine if you know youāre doing it |
03:53:47 | FromDiscord | <Arathanis> yes |
03:55:43 | * | slowButPresent quit (Quit: leaving) |
04:11:17 | FromDiscord | <Arathanis> seems like it might just be VS Code's extension but i dont remember it behaving this way before |
04:58:10 | FromDiscord | <Rika> In reply to @ajusa "huh I'm looking for": damn thats an old reply lmao, i'm no longer really in need for onw |
05:05:28 | * | duuude quit (Ping timeout: 246 seconds) |
05:06:12 | * | duuude joined #nim |
06:00:44 | FromDiscord | <JSONBash> Is anyone using an arbitrary precision library for decimals? |
06:03:34 | FromDiscord | <Rika> anything to aid in bitops for arbitrary bytes? ex: array[T, byte] or so |
06:04:10 | FromDiscord | <Yardanico> In reply to @Rika "anything to aid in": there was a PR (rejected) trying to add that lib to stdlib, but the code wasn't really ready and there was no RFC |
06:04:13 | FromDiscord | <Yardanico> you can still look at it though' |
06:04:24 | FromDiscord | <Yardanico> if I find it |
06:04:26 | FromDiscord | <Elegantbeef> It's just wrappings over `openArray[byte]` |
06:04:30 | FromDiscord | <Yardanico> yeah |
06:04:36 | FromDiscord | <Elegantbeef> I mean there the nwas a RFC and it was rejected š |
06:04:36 | FromDiscord | <Yardanico> but I assume this is what rika needs |
06:05:01 | FromDiscord | <Yardanico> @Rika https://github.com/archnim/bseq/blob/main/bseq.nim if you want to take a llok |
06:05:02 | FromDiscord | <Yardanico> (edit) "<@259277943275126785>" => "@Rika" | "llok" => "look" |
06:51:51 | FromDiscord | <Yardanico> https://github.blog/changelog/2022-04-21-private-profiles/ since htis chat isn't active right now anyway :) |
06:51:55 | FromDiscord | <Yardanico> "Users now have the ability to turn their GitHub profile āprivateā, which gives users controls over features that share user data across the GitHub platform. " |
06:52:51 | FromDiscord | <Yardanico> (edit) "htis" => "this" |
06:54:08 | FromDiscord | <Elias> How does nim use mingw? I am figuring out how to use futhark on windows and have tried to install this thing https://github.com/llvm/llvm-project/releases/download/llvmorg-13.0.1/LLVM-13.0.1-win64.exe. And also installing clang with pacman in the MSYS terminal that came with mingw |
06:54:27 | FromDiscord | <Elias> (edit) "mingw" => "mingw. But it can still not find libclang" |
06:54:29 | * | PMunch joined #nim |
06:54:29 | FromDiscord | <Yardanico> In reply to @Elias "How does nim use": nim doesn't use mingw specifically, it just calls whatever `gcc` you have in PATH by default |
06:54:46 | FromDiscord | <Yardanico> In reply to @Elias "How does nim use": have you added the bin folder of your installed LLVM to your PATH? |
06:55:30 | FromDiscord | <Elias> Apart from checking "Add to path for all users" I have just added the `lib` folder manually |
06:55:40 | FromDiscord | <Elias> (edit) "Apart from checking "Add to path for all users" ... I" added "(with the installer)" |
06:56:18 | FromDiscord | <Yardanico> you've seen https://github.com/PMunch/futhark#installation right ? |
06:56:22 | FromDiscord | <Yardanico> passL |
06:56:38 | FromDiscord | <Yardanico> i can try myself to see if I can install it via this I guess |
06:57:09 | FromDiscord | <Elias> Actually no, just added it to my nimble file once I heard about it. Then I got problems... |
06:57:15 | FromDiscord | <Elias> Should probably read it |
07:01:02 | FromDiscord | <Yardanico> yeah it just works, I installed LLVM with add to path option, then just `nimble install --passL:"-LC:\LLVM\lib\" futhark` (i installed LLVM to C:\LLVM) |
07:03:33 | FromDiscord | <Elias> https://media.discordapp.net/attachments/371759389889003532/966957414740004884/unknown.png |
07:04:04 | FromDiscord | <Yardanico> try adding \ at the end |
07:04:18 | FromDiscord | <Yardanico> ah, the problem can also be due to Program Files, since there's a space in the name |
07:05:19 | FromDiscord | <Elias> hehe `nimble install --passL:'-L"C:\Program Files\LLVM\lib\"' futhark` |
07:05:27 | FromDiscord | <Elias> maybe? |
07:05:37 | FromDiscord | <Yardanico> i don't know, I don't use windows for development much |
07:05:44 | FromDiscord | <Elias> same |
07:06:16 | FromDiscord | <Elias> just want my project to build on it and then go back to linux when I am done at school |
07:07:26 | FromDiscord | <Elias> But do you get the same project structure errors? |
07:08:58 | FromDiscord | <Yardanico> yes, but those are _warnings_ |
07:09:18 | FromDiscord | <Yardanico> it's due to how futhark repo is structured, nimble doesn't like when you don't follow its hierarchy |
07:10:22 | FromDiscord | <Elias> Ok |
07:10:47 | FromDiscord | <Elias> Either ill come up with some hack or force people to install it straight on C: or something |
07:11:09 | FromDiscord | <Elias> pyautogui perhaps... |
07:15:56 | * | rockcavera quit (Remote host closed the connection) |
07:23:04 | FromDiscord | <Phil> Out of curiosity, compared to just using HTML/CSS/JS, how much more cumbersome is using QT/GTK/whatever android uses? |
07:25:27 | FromDiscord | <Yardanico> it's not usually more "cumbersome", people just tend to use html/css/js nowadays because there are more people working with them |
07:25:27 | FromDiscord | <Phil> Given that I'm feasibly nearing completion of my backend within a couple months, I'm contemplating ideas for my next sideproject and building e.g. a native client for funsies could be interesting. Not that there'd be much of a point, it'd still be basically a webpage, but it would render really fast!āµHowever, if it's multiple times the effort to get stuff working, I'd likely reconsider because that wouldn't really sound like fun. |
07:25:45 | FromDiscord | <Yardanico> Qt has its own QSS that are quite similar to CSS |
07:25:49 | FromDiscord | <Yardanico> and scripting too |
07:25:53 | * | fredrikhr joined #nim |
07:26:07 | FromDiscord | <Yardanico> GTK has stylesheets as well, and you can write GTK apps in e.g. Python (same applies for Qt) |
07:27:49 | FromDiscord | <Phil> So you define elements still, style them with whatever CSS-analogue there is and attach procs to elements to make them interactive? |
07:28:25 | FromDiscord | <Yardanico> more or less, isn't that how almost any UI works? |
07:29:03 | FromDiscord | <Phil> I have no idea, I've only done webdev so I only know how HTML/CSS/JS works and can imagine how a more general abstraction of that would look like |
07:29:17 | PMunch | @Elias, I believe the path handling for Futhark on Windows is a bit broken (I don't have any Windows machines to test it on). Try to install LLVM to a path without spaces, that seems to help. |
07:29:33 | FromDiscord | <Yardanico> https://www.qt.io/product/qt6/qml-book/ch02-start-hello-world |
07:29:47 | FromDiscord | <Rika> In reply to @Isofruit "I have no idea,": XML + style sheets + general programming language |
07:29:57 | PMunch | Once I can find someone on Windows who wants to help out those bugs should be really easy to fix.. |
07:30:07 | FromDiscord | <Rika> Not even XML, just any mark up language |
07:30:53 | FromDiscord | <Yardanico> In reply to @PMunch "Once I can find": i'm on windows right now, if you have time now we can try |
07:31:01 | FromDiscord | <Yardanico> i'm trying to generate sciter bindings with futhar kon windows |
07:31:03 | FromDiscord | <Yardanico> (edit) "futhar kon" => "futhark on" |
07:31:33 | FromDiscord | <Yardanico> I couldn't really succeed with using tdm-gcc's includes - clang seems to fail when parsing them (in opir i mean) |
07:31:41 | FromDiscord | <Yardanico> now trying with clang's includes + windows sdk |
07:31:46 | FromDiscord | <Phil> Wait, QML? Do these things come with their own language ? Oof |
07:31:55 | FromDiscord | <Yardanico> of course, Qt is a really big thing |
07:32:22 | FromDiscord | <Yardanico> they even have their own compiler on top of C++ for Qt specific stuff, and the Qt library generally has tons of different modules |
07:32:30 | FromDiscord | <Yardanico> because a lot of it was written before C++ stdlib got those |
07:33:01 | FromDiscord | <Phil> So basically, assuming I made a native application using, e.g. QT, that would basically be its entirely own separate project which wouldn't really interface with nim, wouldn't it? |
07:33:23 | FromDiscord | <Phil> (edit) "nim," => "nim as it would use its own language," |
07:33:25 | FromDiscord | <Yardanico> you can make Qt apps with Nim, but not the truly native Qt way |
07:33:34 | FromDiscord | <Yardanico> https://github.com/filcuc/nimqml |
07:33:40 | FromDiscord | <Phil> Would it be nim compiling to qml? |
07:33:45 | FromDiscord | <Yardanico> no? |
07:34:12 | FromDiscord | <Yardanico> https://github.com/levovix0/DMusic for example this is made with nimqml + nim |
07:34:30 | PMunch | Yardanico, that would be great! I'm trying to find the issue for Windows trouble |
07:34:33 | FromDiscord | <Yardanico> ah wait maybe actually not nimqml |
07:35:07 | FromDiscord | <Yardanico> they're actually wrapping a small part of qt it seems like https://github.com/levovix0/DMusic/blob/master/src/qt.nim |
07:35:14 | FromDiscord | <Yardanico> In reply to @PMunch "<@177365113899057152>, that would be": what issue specifically? |
07:36:18 | PMunch | Yardanico, that is what I'm trying to find |
07:36:41 | FromDiscord | <Yardanico> well for example i don't know how to quote paths with spaces in `sysPath` on windows :P |
07:36:50 | FromDiscord | <Yardanico> since futhark doesn't quote them then passing to opir |
07:36:56 | FromDiscord | <Yardanico> i guess i can just add " myself in the string |
07:37:06 | * | mahlon quit (Ping timeout: 252 seconds) |
07:37:16 | PMunch | Damn it, now that I think about it it might've just been someone asking here on IRC |
07:37:45 | PMunch | But yes, most of the issues are about escaping paths and how Futhark/Opir hands arguments around |
07:38:13 | FromDiscord | <Phil> I think I'll have to look at this when I get to it. From a glance over e.g. the qtl.nim or other nim files in the repo I don't quite get how the nim code and the qml code work together to build the frontend. Digging into that seems like it might need more than a cursory glance |
07:38:27 | FromDiscord | <Phil> (edit) "qtl.nim" => "qt.nim" |
07:42:09 | FromDiscord | <2F42BBA1> In reply to @Yardanico "https://github.com/levovix0/DMusic for example this": That's impressive damn |
07:42:12 | * | jmdaemon quit (Ping timeout: 250 seconds) |
07:43:19 | PMunch | Huh, never seen that, impressive indeed! |
07:46:59 | FromDiscord | <2F42BBA1> It would be nice to see differences between Python's API and Nim's API. |
07:47:40 | FromDiscord | <TryAngle> do ppl aside from haxscramper already use nimskull? |
07:48:35 | FromDiscord | <2F42BBA1> In reply to @TryAngle "do ppl aside from": I insatlled it yesterday on Linux |
07:48:45 | FromDiscord | <2F42BBA1> (edit) "insatlled" => "installed" |
07:49:12 | FromDiscord | <Predator> Just installed nim |
07:49:14 | FromDiscord | <TryAngle> (edit) "do ppl aside from haxscramper already use nimskull? ... " added "(not meant negative, just curious about the community size)" |
07:49:56 | FromDiscord | <2F42BBA1> If it will work good then I will keep it for now. |
07:50:06 | FromDiscord | <2F42BBA1> Look forward to Windows binaries for it. |
07:50:12 | FromDiscord | <Predator> Can I make a discord bot using Nim lol |
07:50:19 | FromDiscord | <TryAngle> In reply to @Predator "Can I make a": dimscord |
07:50:20 | FromDiscord | <Elias> In reply to @PMunch "<@390570241903689728>, I believe the": Yep, it works when I put it on C: |
07:50:29 | PMunch | @2F42BBA1, it's still close enough to Nim that it can be used with Nim libraries right? |
07:50:42 | FromDiscord | <TryAngle> In reply to @PMunch "@2F42BBA1, it's still close": just wanted to ask the same lol |
07:50:44 | FromDiscord | <Predator> In reply to @TryAngle "dimscord": Sounds cool |
07:50:48 | PMunch | @Predator, yup that's how I'm talking to you |
07:50:55 | FromDiscord | <Elegantbeef> Not all libraries will work it doesnt have async |
07:51:02 | PMunch | Through a IRC <-> Discord bot |
07:51:08 | PMunch | @Elegantbeef, it doesn't have async? |
07:51:17 | PMunch | But, async is just a macro? |
07:51:20 | FromDiscord | <Elegantbeef> Nope they stripped it out due to wanting CPS uses |
07:51:29 | FromDiscord | <TryAngle> what is cps? |
07:51:32 | FromDiscord | <Elegantbeef> used\ |
07:51:50 | PMunch | Ah right, so it would work if you used --import and supplied the Nim standard library async implementation? |
07:51:57 | FromDiscord | <Predator> In reply to @PMunch "@Predator, yup that's how": Very cool |
07:52:00 | PMunch | @TryAngle, Continuation Passing Style |
07:52:10 | FromDiscord | <2F42BBA1> In reply to @PMunch "@2F42BBA1, it's still close": Yeah. At least for my stuff it works. |
07:52:23 | FromDiscord | <Predator> I'm gonna try to make a discord bot in Nim |
07:52:24 | FromDiscord | <TryAngle> In reply to @PMunch "<@147447489316913152>, Continuation Passing Style": doesn't tell me much š„ŗ |
07:52:35 | FromDiscord | <Elias> In reply to @Yardanico "passL": But (trying to make stuff automatic) why does it not work when I put `--passL:"-LC:/LLVM/lib/"` in my nim.cfg file? |
07:52:41 | FromDiscord | <TryAngle> In reply to @Predator "I'm gonna try to": good luck š |
07:52:45 | FromDiscord | <Predator> Thanks |
07:52:46 | FromDiscord | <2F42BBA1> In reply to @Predator "I'm gonna try to": Share the source code. I am shit at writing them xD |
07:52:54 | PMunch | @Elias, right, so Yardanico it seems the first issue is figuring out how to link to libclang :P |
07:53:03 | FromDiscord | <Predator> Haha sure, I've only gone past echo "hello world" but I'll get there |
07:53:33 | FromDiscord | <2F42BBA1> In reply to @Predator "Haha sure, I've only": I wrote simple stuff and a thing to calculate some stuff. |
07:53:43 | FromDiscord | <2F42BBA1> Nim is comfy than Rust. |
07:53:43 | FromDiscord | <Predator> Sweet |
07:53:50 | FromDiscord | <Elegantbeef> https://github.com/nim-works/cps/tree/master/docs#what-is-this-and-why-should-i-care |
07:53:52 | PMunch | @TryAngle, I just gave you some Google-feed, if you find a Google search bar you can feed it those words and it will grow magnificent search results |
07:53:54 | FromDiscord | <Elias> In reply to @PMunch "<@390570241903689728>, right, so Yardanico": How is it done now? Just directly with gcc? |
07:54:02 | PMunch | (Just be sure to water it and give it plenty of sun) |
07:54:07 | FromDiscord | <TryAngle> In reply to @PMunch "<@147447489316913152>, I just gave": hahhaha |
07:54:07 | FromDiscord | <TryAngle> sure |
07:54:21 | FromDiscord | <Elegantbeef> Or tryangle read my link |
07:54:31 | FromDiscord | <TryAngle> ok will do both ty š„ŗ |
07:55:39 | PMunch | @Elias, which nim.cfg? It is only Opir which needs libclang, once that is compiled you don't need to use passL any more |
07:56:10 | PMunch | Your project doesn't depend on libclang unless it's being built from source (and you can always ship the cache as well). |
07:56:24 | FromDiscord | <Elias> The one in my project root (laziness) |
07:56:49 | PMunch | Yeah that one won't have any effect on the compilation of Opir (which is part of the Futhark package) |
07:57:00 | FromDiscord | <Elias> Aah |
07:57:55 | PMunch | Basically Futhark comes with a tool called Opir. Opir links to libclang and reads C files and spits out a JSON definition. Then Futhark (a Nim macro) reads this JSON output and generates Nim code. |
07:58:07 | FromDiscord | <Elias> sent a code paste, see https://play.nim-lang.org/#ix=3VLo |
07:58:20 | PMunch | When installing Futhark it will build Opir, and that's when it needs to link to libclang |
07:58:25 | FromDiscord | <Elias> In reply to @PMunch "Basically Futhark comes with": Ok, then I understand |
07:59:11 | PMunch | Nimble build disables packages that aren't listed in the .nimble file. So in order to use Futhark you must list Futhark as a dependency to use nimble build. |
07:59:56 | FromDiscord | <Elias> So, if I understand. The problem is that libclang can be anywhere on a windows machine since it has no package manager. And therefore there needs to be installed and passed manually (for now) |
08:00:08 | FromDiscord | <Elias> (edit) "there" => "it" |
08:00:14 | FromDiscord | <Elias> (edit) "manually" => "manually?" |
08:00:43 | FromDiscord | <Elias> (edit) "So, if I understand. The problem is that libclang can ... be" added "(potentially)" |
08:01:10 | PMunch | Yes |
08:01:12 | PMunch | Kinda |
08:02:20 | FromDiscord | <TryAngle> so cps basically schrinks the stack to a more "linear" form instead of tree?āµand nimcps does that for u instead of thinking about that yourself? |
08:02:40 | FromDiscord | <Elias> In reply to @PMunch "Yes": Tried looking, but could not find a cli installer for llvm. If that existed it would be helpful for running stuff to predefined paths. |
08:03:02 | PMunch | On Linux you have the LD_LIBRARY_PATH, which is the path where it will go and look for dynamic libraries. You (typically) install things with your package manager, and the dynamic libraries are placed in this folder and everything which wants to use that library can find it there. On Windows you just install things into semi-random folders and the loading technique is (to the best of my knowledge) a mix of anarchy and chaos. |
08:03:20 | FromDiscord | <Elias> In reply to @PMunch "On Linux you have": yep |
08:03:44 | FromDiscord | <Elegantbeef> Well it gives you a lot of power to represent more complex things relatively simplyāµ(@TryAngle) |
08:04:07 | FromDiscord | <TryAngle> and I read it is already in library form for nim as macros, why rewrite nim as a fork bc of that? |
08:04:26 | FromDiscord | <Elegantbeef> That's not the reason to fork nim |
08:04:31 | FromDiscord | <Elegantbeef> That's the reason to remove async from the stdlib |
08:04:38 | FromDiscord | <TryAngle> ah I see ok |
08:04:53 | FromDiscord | <Elegantbeef> They nimskull people pretty explicitly state why they're a fork |
08:04:58 | FromDiscord | <Elegantbeef> There is no mystery |
08:05:21 | FromDiscord | <Elias> What I have done so far is make a script that tries a nimble build (in the random case everything works with some preinstalled clang) and if (when) it fails, it downloads and run the llvm installer. After that I tried running `nimble install --passL:"-LC:\LLVM\lib\" futhark` from the script but had some escaping problems.. |
08:05:42 | FromDiscord | <Elias> (edit) |
08:06:02 | FromDiscord | <Elias> (edit) "I tried running" => "it tries to run" |
08:06:38 | FromDiscord | <Elias> The problem is if someone does not install it in ``C:\LLVM` |
08:06:47 | FromDiscord | <Elias> (edit) "in" => "at" |
08:06:52 | FromDiscord | <Elias> (edit) "``C:\LLVM`" => "`C:\LLVM`" |
08:06:52 | * | Gustavo6046 quit (Quit: Goodbye! Leave messages at my XMPP @ [email protected] or my Discord Gustavo6046#9009 or possibly my Mastodon [email protected] ā I don't check my email often since it's full of crap, but in any case, [email protected]) |
08:12:53 | FromDiscord | <tandy> \:o |
08:13:05 | FromDiscord | <Elegantbeef> There's the response i've waited all day forr š |
08:13:18 | FromDiscord | <Elegantbeef> Bit of a slow burn that one |
08:32:09 | * | dtomato quit (Quit: Ping timeout (120 seconds)) |
09:15:18 | FromDiscord | <Tanguy> To be fair, a big chunk of the async is actually in the compiler, not the stdlib (the closure iterator transformation)āµAnd it does have bugs / inefficiencies |
09:16:02 | FromDiscord | <Tanguy> Having a full macro (like CPS afaict) would be very nice, since we could improve it outside of the compiler release schedule |
09:17:06 | PMunch | Oh sure, but I assume closure iterators haven't been removed from NimSkull? |
09:17:22 | FromDiscord | <Elegantbeef> No they've not been |
09:17:50 | FromDiscord | <Elegantbeef> Knowing them they'll consider making them stack allocators to try to make them faster |
09:18:41 | FromDiscord | <Tanguy> That seems a bit pointless (as far as async goes), since most async procedures will call other async procedures, so you have to use the heap |
09:19:11 | FromDiscord | <Elegantbeef> I mean closures al to gether |
09:19:18 | FromDiscord | <Elegantbeef> They've removed the stdlib's async macro |
09:20:28 | FromDiscord | <Elegantbeef> I've been toying with them recently and they've let me down a bit |
09:20:46 | FromDiscord | <Rika> Just like how theyāve been let down by Nim? |
09:20:59 | FromDiscord | <Tanguy> With nimskull or with closures? |
09:21:07 | FromDiscord | <Elegantbeef> Closures |
09:21:41 | FromDiscord | <Elegantbeef> I'm technically apart of Nimskull, though i've never actually used it's compiler |
09:22:20 | FromDiscord | <Elegantbeef> Eh rika i've got a few benchmarks and aside from me being dumb there are some oddities |
09:22:45 | FromDiscord | <Elegantbeef> image.png https://media.discordapp.net/attachments/371759389889003532/966992444900130816/image.png |
09:22:54 | FromDiscord | <Elegantbeef> The latter one here is \~10% faster |
09:23:05 | FromDiscord | <Elegantbeef> But who the fuck wants to manually move iterators |
09:23:22 | FromDiscord | <Tanguy> Thanks to move? |
09:23:37 | FromDiscord | <Rika> If weāre talking about iterators then Iām assuming theyāre gonna improve over time of course |
09:24:01 | FromDiscord | <Elegantbeef> Yea my hypothesis is it moves the iterator's environment which moves the ownership of the string instead of copying it |
09:24:19 | FromDiscord | <Elegantbeef> Well they're closure iterators š |
09:24:30 | FromDiscord | <Rika> Thatās what I meant |
09:24:49 | FromDiscord | <Elegantbeef> Perhaps, it's odd that the Nim stdlib doesnt have a `asClosure` equivlent |
09:25:16 | FromDiscord | <Rika> You can always implement it as well no? |
09:25:27 | FromDiscord | <Elegantbeef> I mean i did implement it |
09:25:33 | FromDiscord | <Elegantbeef> It gives a lot of nice functionality |
09:25:47 | FromDiscord | <Tanguy> Yeah, in big async programs you spend half your time copying buffers to each async proc, a bit annoyingāµBut sink is supposed to work on closure iterators, no? |
09:26:05 | FromDiscord | <Elegantbeef> It does but it doesnt seem to work with the environment |
09:26:22 | FromDiscord | <Elegantbeef> I have to look into it more but the manual moving of iterators is faster |
09:26:45 | FromDiscord | <Elegantbeef> It's still slower than sequtils which is the real kick in the ribs |
09:27:54 | FromDiscord | <Elegantbeef> Something 2ms slower which is \~20% of the sequtils runtime with this benchmark |
09:28:02 | FromDiscord | <Elegantbeef> 9ms vs 11ms vs 12ms |
09:28:36 | FromDiscord | <Elegantbeef> Manual is 7ms, which is of course what my 0 cost `chain` macro also does š |
09:29:08 | FromDiscord | <Tanguy> Ok, too bad, I was expecting to good perfs with the new runtime in async world |
09:29:30 | FromDiscord | <Elegantbeef> I mean to be fair my example isnt really demonstrating any benefit of closure over other methods |
09:31:10 | FromDiscord | <Elegantbeef> Perhaps there's a way to encourage the move with nested iterators that my benchmarking isnt enabling |
09:32:51 | FromDiscord | <Elegantbeef> Alternatively there is a different cause to this issue i'm missing |
09:33:27 | * | dtomato joined #nim |
09:38:14 | FromDiscord | <2F42BBA1> I am bad at Nim :/āµIs there any way to get better at it? |
09:38:39 | FromDiscord | <2F42BBA1> Syntax is fine, but I can only write something simple. |
09:39:34 | FromDiscord | <Elegantbeef> Write more of it š |
09:39:41 | FromDiscord | <Elegantbeef> Ask questions here |
09:39:54 | FromDiscord | <Elegantbeef> Read the manual/forum/stackoverflow š |
09:40:22 | FromDiscord | <Elegantbeef> Then eventually you'll contribute to the compiler |
09:41:37 | FromDiscord | <Rika> That last point is highly unlikely |
09:42:33 | FromDiscord | <2F42BBA1> In reply to @Elegantbeef "Then eventually you'll contribute": I dpn't have a big brain. |
09:42:45 | FromDiscord | <Elegantbeef> Me either but i do it |
09:42:59 | FromDiscord | <2F42BBA1> I just use Nim so I can without less pain use WinAPI and write CLI software. |
09:43:07 | FromDiscord | <Rika> In reply to @Elegantbeef "Me either but i": Most people donāt want to |
09:43:11 | FromDiscord | <2F42BBA1> Though there are examples of GUI ones. |
09:44:58 | FromDiscord | <Tanguy> Finally found the comment I was looking for: https://github.com/nim-lang/RFCs/issues/16#issuecomment-626875867āµSo with sink, it should not copy, AFAICT |
09:45:20 | FromDiscord | <Elegantbeef> I think with nested ones it still does |
09:45:49 | FromDiscord | <Elegantbeef> I might be wrong |
09:46:35 | FromDiscord | <Tanguy> Ohh, ok by nested you mean chainedāµYeah, probably |
09:46:53 | FromDiscord | <Elegantbeef> Yea in my above example it generates a single iterator in the end |
09:47:34 | FromDiscord | <Elegantbeef> so it's `data.items.asClosure.map.filter.map` which turns into a single `iterator: int` |
09:48:42 | FromDiscord | <Tanguy> Not familiar with the new runtime, but it looks to me like the move should be inferred, since you don't use them afterwards |
09:48:52 | FromDiscord | <Elegantbeef> You're right |
09:49:03 | FromDiscord | <Elegantbeef> Perhaps a bug, or me being dumb again |
09:52:35 | FromDiscord | <Elegantbeef> I was considering moving my mesh gen api to use closure iterators but given they're this much slower than inline iterators i guess i keep iterable for now |
09:53:06 | FromDiscord | <Elegantbeef> But anyway it's late so i'll stop talking about closure iterators for a bit š |
09:59:24 | FromDiscord | <2F42BBA1> https://media.discordapp.net/attachments/371759389889003532/967001670317928468/toIpsUGX21I3xQifjlz4obymZp02rzr0wlqKUglgDqu3GY23kGHETU8gsvi3O0q_nF04AcRzdNrr78v1-dlnqMG-.jpg |
10:00:11 | FromDiscord | <2F42BBA1> I should try TCC |
10:00:21 | FromDiscord | <2F42BBA1> Though it seems not maintained much |
10:25:05 | * | crameleon quit (Quit: I love you.) |
10:35:13 | PMunch | @2F42BBA1, why do you want to try TCC? |
10:38:10 | * | acidsys joined #nim |
10:49:06 | FromDiscord | <Knedlik> Iām trying to install nim on another computer, but after installing thru choosenim, my dependency installer says it canāt find the nim binaryā¦. Any idea why? |
10:51:20 | FromDiscord | <Yardanico> antivirus? |
10:52:06 | FromDiscord | <Knedlik> The only thing I have on this potato is windows defender |
10:54:35 | FromDiscord | <Knedlik> And disabling virus prot doesnāt make it work |
10:55:04 | FromDiscord | <Rika> Check quarantined |
10:56:31 | FromDiscord | <Knedlik> Where even is that in defender |
10:56:43 | FromDiscord | <Rika> I donāt know I donāt use windows |
10:57:13 | FromDiscord | <Knedlik> Although nim.exe is in the .nimble/bin folder as normal |
10:57:20 | PMunch | sudo apt remove windows-defender |
10:57:23 | PMunch | Oh wait.. |
10:57:39 | PMunch | Can you run that file? |
10:57:52 | PMunch | And what dependency installer? |
10:58:00 | FromDiscord | <Rika> Did you put it in your path haha |
10:59:13 | FromDiscord | <Knedlik> I have both .nimble/bin and .nimble/bin/nim.exe in my path |
11:00:01 | FromDiscord | <Knedlik> And nim.exe does open up a console windows |
11:00:04 | FromDiscord | <Knedlik> (edit) "windows" => "window" |
11:04:03 | FromDiscord | <Rika> Restart the console? |
11:04:23 | FromDiscord | <Knedlik> > And what dependency installer?āµI made a dependency installer for my repo, basically a bunch of nimble installs |
11:04:28 | FromDiscord | <Knedlik> I did restart cmd |
11:05:39 | NimEventer | New post on r/nim by 576f6e64657269: Can't seem to install Nim on Fedora 35. What am I doing wrong?, see https://reddit.com/r/nim/comments/u9c05q/cant_seem_to_install_nim_on_fedora_35_what_am_i/ |
11:06:55 | FromDiscord | <Rika> So what happens exactly when you try running Nim in the command line |
11:07:37 | FromDiscord | <Knedlik> Hmm, when I try to use `ānim`, it says unhandled exception access is denied |
11:08:47 | FromDiscord | <Rika> Can you show the output |
11:10:04 | FromDiscord | <Knedlik> https://media.discordapp.net/attachments/371759389889003532/967019453445443644/unknown.png |
11:10:17 | FromDiscord | <Knedlik> Might it be because my user contains diacritics? |
11:10:50 | FromDiscord | <Rika> Yes |
11:11:55 | * | slowButPresent joined #nim |
11:14:33 | FromDiscord | <Knedlik> Would moving .nimble do it? |
11:15:31 | FromDiscord | <Knedlik> Because after doing that and changing the path, it still throws that error |
11:20:44 | PMunch | First try this |
11:20:57 | PMunch | Open a command line, cd to the folder where you have installed nim |
11:21:04 | PMunch | Run `./nim.exe --version` |
11:23:33 | FromDiscord | <Knedlik> sent a long message, see http://ix.io/3VM6 |
11:29:16 | PMunch | Okay so Nim (the devel version) is there and executable |
11:30:02 | FromDiscord | <TryAngle> does something like this exist / make sense in nim? Maybe with arc?āµhttps://docs.rs/drop_bomb/latest/drop_bomb/ |
11:30:15 | PMunch | The last error you shared was truncated, does that come from running Nimble? |
11:30:39 | FromDiscord | <Yardanico> In reply to @TryAngle "does something like this": what does this specifically do? |
11:31:07 | FromDiscord | <TryAngle> In reply to @Yardanico "what does this specifically": Basically a way to be sure when the destructor of that object is called the object is already marked that it may be destroyed / is finished |
11:31:40 | PMunch | I don't know if anything like that already exists, but it should be possible to create with a destructor |
11:31:49 | FromDiscord | <TryAngle> the example shows this with a buffered writerāµthe writer must be closed before it gets destroyed |
11:31:56 | FromDiscord | <Yardanico> In reply to @TryAngle "Basically a way to": it is possible with an extra field in the object |
11:32:10 | FromDiscord | <Yardanico> In reply to @TryAngle "the example shows this": why won't it just get closed automatically? |
11:33:27 | FromDiscord | <TryAngle> In reply to @Yardanico "why won't it just": wdym exactly? |
11:33:44 | FromDiscord | <TryAngle> that it closes itself when the destructor is called? |
11:33:49 | FromDiscord | <Yardanico> yes? |
11:34:00 | FromDiscord | <Yardanico> why close explicitly if it can close itself automatically on scope exit |
11:34:48 | FromDiscord | <TryAngle> this works in this case but there are cases where this does not work |
11:35:21 | PMunch | Something like this: https://play.nim-lang.org/#ix=3VMa |
11:35:24 | FromDiscord | <2F42BBA1> In reply to @PMunch "@2F42BBA1, why do you": Why not? I like to experiment with compilers |
11:35:26 | FromDiscord | <TryAngle> the example I would use it for basically is a parser that is made "via markers" |
11:35:57 | PMunch | @2F42BBA1, oh sure, I just wanted to make sure it wasn't for some poor reason. But experimentation is always fun :) |
11:36:33 | FromDiscord | <2F42BBA1> One time I experimented with milking performance from sample Flask app. |
11:36:42 | FromDiscord | <TryAngle> In reply to @PMunch "Something like this: https://play.nim-lang.org/#ix=": thanks |
11:37:29 | PMunch | Yardanico, because you can have an error during flush, so they want that to be handled before it is destroyed. Of course in Nim that would just raise an exception which could then be caught just the same |
11:37:30 | FromDiscord | <2F42BBA1> I got gunicorn and pypy installed and on other hand same stuff but with Python 3.8 I think? In my experiment I found that Flask with PyPy was winning in performance. |
11:37:39 | PMunch | But I guess it might be useful in other scenarios |
11:37:55 | FromDiscord | <Yardanico> In reply to @2F42BBA1 "One time I experimented": with nim compiled with tcc with -d:danger ? |
11:38:03 | FromDiscord | <Yardanico> i mean it makes sense for tcc |
11:38:35 | PMunch | Well -d:danger is still slower to compile than debug right? |
11:38:40 | FromDiscord | <2F42BBA1> In reply to @Yardanico "with nim compiled with": The language itself compiled via tcc? Never tried that xD |
11:38:49 | FromDiscord | <Yardanico> i mean nim with tcc |
11:38:53 | FromDiscord | <2F42BBA1> Oh |
11:38:56 | PMunch | Maybe a mode which just enables the dangerous features but none of the optimisations :P |
11:39:08 | FromDiscord | <Yardanico> nim compiles to C which is then compiled to native binaries with c compilers |
11:39:09 | PMunch | Oh right |
11:39:22 | FromDiscord | <Yardanico> In reply to @PMunch "Well -d:danger is still": -d:danger just disables all runtime safety checks, otherwise it's equal to -d:release |
11:39:25 | PMunch | You wanted a super fast Nim compiler to use with TCC |
11:39:43 | FromDiscord | <2F42BBA1> i need to make an utility with wNim and winim. So I can make a simple WinGui app |
11:39:54 | PMunch | I was thinking of making a typical Nim compile faster before feeding it to TCC |
11:40:04 | PMunch | And in that case -d:danger would just slow the compile down |
11:40:29 | FromDiscord | <Yardanico> @PMunch if you think about it, actually maybe not |
11:40:34 | FromDiscord | <Yardanico> because nim itself doesn't do many optimizations |
11:40:48 | FromDiscord | <Yardanico> instead with -d:danger a lot of runtime safety checks, etc are disabled so nim doesn't have to generate them |
11:41:02 | FromDiscord | <Yardanico> you just have to remove the -O3 flag that is implied with -d:danger so the C compiler doesn't take long to compile the file |
11:41:14 | FromDiscord | <TryAngle> @Yardanico it is basically another "safety" check the code works correctly |
11:41:49 | FromDiscord | <TryAngle> but I'm not sure, when are destructors being called in nim? |
11:42:03 | FromDiscord | <Yardanico> when something gets out of scope or gets refcount == 0 |
11:42:17 | FromDiscord | <Yardanico> but nim destructors aren't guaranteed to only run once for one object instance, so you need to check if the object was destroyed yourself |
11:42:47 | FromDiscord | <TryAngle> In reply to @Yardanico "but nim destructors aren't": I don't need that aspect only check if the object was "destroyed safely" |
11:43:01 | FromDiscord | <Yardanico> i still don't know what that really means |
11:43:16 | FromDiscord | <TryAngle> In reply to @Yardanico "but nim destructors aren't": arc is more deterministic in that aspect right? |
11:43:21 | FromDiscord | <enthus1ast> it also depends on refc or arc/orc, in my tests arc/orc calls them quite timely, while the old refc took a moment |
11:43:24 | FromDiscord | <Yardanico> no, i was talking about arc specifically |
11:43:32 | FromDiscord | <TryAngle> oh ok |
11:43:44 | FromDiscord | <Yardanico> and yes, refc is not guaranteed to run destructors right after scope exit |
11:43:56 | FromDiscord | <Yardanico> since it's more of a traditional GC in the way it works |
11:44:12 | PMunch | Huh, ARC doesn't only call them once? |
11:44:18 | PMunch | That might cause me some trouble.. |
11:44:24 | FromDiscord | <enthus1ast> refc also did not call the destructor at all if you application quites too fast \:) |
11:44:42 | FromDiscord | <Yardanico> In reply to @PMunch "Huh, ARC doesn't only": yeah |
11:45:59 | FromDiscord | <Rika> In reply to @Yardanico "yeah": Why? |
11:47:51 | FromDiscord | <Yardanico> In reply to @Rika "Why?": not sure, but i think it has to do with objects that also get moved, etc |
11:47:57 | FromDiscord | <Yardanico> but i can't give a precise answer |
11:48:22 | FromDiscord | <TryAngle> @Yardanico https://github.com/mun-lang/mun/blob/25156ebf1cef960cd1015510c5c5ba2b75a1382f/crates/mun_syntax/src/parsing/grammar/expressions.rs#L55āµthis is an example from a programming language that is made in rust.āµBecause there are a lot of recursive calls and different functions sometimes m.complete() might be forgotten to be written, so a destructor like this is a great additional safety check |
11:48:37 | FromDiscord | <TryAngle> (edit) "@Yardanico https://github.com/mun-lang/mun/blob/25156ebf1cef960cd1015510c5c5ba2b75a1382f/crates/mun_syntax/src/parsing/grammar/expressions.rs#L55āµthis is an example from a programming language ... that" added "parser" |
11:48:56 | FromDiscord | <Yardanico> well, as I said, you can do the same in nim, just check if the object was destroyed in the destructor, and if it didn't, show an error or something |
11:48:57 | FromDiscord | <TryAngle> (edit) "written," => "written or written in wrong place etc.," |
11:49:27 | FromDiscord | <TryAngle> ye pmunch linked a great example how to do this, was not sure how to work wtih destructors in nim and how deterministic they are |
11:49:47 | FromDiscord | <Rika> They are deterministic when used with ARC |
11:49:49 | FromDiscord | <Yardanico> yes |
11:50:03 | PMunch | (and ORC) |
11:50:04 | FromDiscord | <Rika> What does it mean to be āslightly deterministicā |
11:50:05 | PMunch | I assume |
11:50:25 | PMunch | 60% of the time it works every time |
11:50:37 | FromDiscord | <Yardanico> In reply to @Rika "What does it mean": ? |
11:51:02 | FromDiscord | <Rika> He asked āhow deterministicā as if it were a gradient |
11:51:11 | FromDiscord | <Rika> Is determinism a gradient or black and white? |
11:51:20 | FromDiscord | <Yardanico> for me it just sounded like a normal question |
11:51:21 | FromDiscord | <Rika> Can you be partially deterministic? What would that mean? |
11:51:26 | FromDiscord | <Yardanico> "how deterministic" - deterministic or not |
11:51:45 | FromDiscord | <Yardanico> in this specific case :) |
11:51:50 | FromDiscord | <Yardanico> In reply to @Rika "Can you be partially": yes, this is true for ORC actually btw |
11:51:52 | FromDiscord | <Rika> I guess I just wouldnāt word it that way |
11:52:05 | FromDiscord | <Yardanico> in ORC with ref objects destructor can be called later than just scope exit |
11:52:08 | FromDiscord | <Yardanico> because of how ORC works |
11:52:13 | FromDiscord | <Rika> In reply to @Yardanico "yes, this is true": I wouldnāt mix āpartiallyā with āsometimesā |
11:52:19 | FromDiscord | <Yardanico> but it's generally still better than with refc |
11:52:47 | FromDiscord | <TryAngle> well I worded it like that because determinism being a gradient may be possible in this case no? I have no clue, so I open worded it |
11:53:10 | FromDiscord | <Rika> I also donāt know |
11:54:27 | FromDiscord | <TryAngle> look what crazy things were done with Java or Go gcs, no clue how nim's gc works aside from ref counting |
11:55:17 | FromDiscord | <Yardanico> In reply to @TryAngle "look what crazy things": with refc it's also very "interesting" :) |
11:55:23 | FromDiscord | <Yardanico> stack scanning |
11:55:37 | FromDiscord | <Yardanico> with ARC it's destructors that get injected, move semantics, and refcounting, nothing else |
11:55:49 | FromDiscord | <Yardanico> with ORC you get an additional algorithm on top of ARC that deals with cycles for refs |
11:56:33 | FromDiscord | <Yardanico> if you haven't read them yet, you can go and see https://nim-lang.org/blog/2020/10/15/introduction-to-arc-orc-in-nim.html and https://nim-lang.org/blog/2020/12/08/introducing-orc.html |
11:56:36 | * | duuude quit (Ping timeout: 240 seconds) |
11:57:18 | * | duuude joined #nim |
11:58:13 | FromDiscord | <TryAngle> In reply to @Yardanico "if you haven't read": already read that but now rereading that again.. why is the whole thing in a try finally? why not just put it at the end regardless? |
11:58:26 | FromDiscord | <Yardanico> In reply to @TryAngle "already read that but": so that in case of an exception stuff still gets cleaned up |
11:58:43 | FromDiscord | <TryAngle> ! |
11:58:43 | FromDiscord | <Yardanico> otherwise you'll leak memory on exceptions |
11:58:44 | FromDiscord | <TryAngle> true |
12:00:07 | FromDiscord | <TryAngle> oh you wrote that article o_O |
12:00:15 | FromDiscord | <TryAngle> good article thanks |
12:00:36 | FromDiscord | <Yardanico> thanks, but others also helped, especially with grammar :) |
12:01:54 | FromDiscord | <2F42BBA1> boehm gc is a good one |
12:02:58 | FromDiscord | <Yardanico> maybe, but I think almost no one uses it for Nim anymore :) |
12:03:05 | FromDiscord | <Yardanico> i don't even know if destructors work with boehm :P |
12:03:20 | FromDiscord | <2F42BBA1> Jus |
12:03:54 | FromDiscord | <2F42BBA1> Just we can try to get example code and profit |
12:04:03 | FromDiscord | <2F42BBA1> We will see if it works or not |
12:04:38 | FromDiscord | <Yardanico> i just don't see why use boehm if refc (if you want battle-tested over the years) or orc (newer, better, etc :P) are already there |
12:05:22 | FromDiscord | <2F42BBA1> Boehm is maintained still tho |
12:05:46 | FromDiscord | <Yardanico> yes, but so is orc š¤ |
12:06:02 | FromDiscord | <Yardanico> nim also has support for Go GC btw, for when you want to closely interface with Go code |
12:08:13 | FromDiscord | <2F42BBA1> In reply to @Yardanico "yes, but so is": orc is stable now? |
12:08:23 | FromDiscord | <Yardanico> "stable" is a broad definition :) |
12:08:38 | FromDiscord | <Yardanico> it still has bugs, and not the default, but for the majority of tasks it's stable, yes |
12:10:19 | FromDiscord | <2F42BBA1> In reply to @Yardanico "it still has bugs,": I had quite shit experience with it, so that's why i sticked with Boehm. |
12:10:33 | FromDiscord | <Yardanico> whatever works best for you I guess |
12:10:38 | FromDiscord | <2F42BBA1> Kinda |
12:13:26 | FromDiscord | <2F42BBA1> I wish Nimskull had Windows support. |
12:14:38 | NimEventer | New Nimble package! excelin - Create and read Excel purely in Nim, see https://github.com/mashingan/excelin |
12:16:04 | FromDiscord | <Yardanico> In reply to @2F42BBA1 "I wish Nimskull had": it has almost no differences compared to mainline Nim in relation to ORC |
12:19:59 | * | blackbeard420 joined #nim |
12:33:05 | FromDiscord | <Knedlik> In reply to @PMunch "The last error you": Yes, nimble install |
12:37:27 | FromDiscord | <jmgomez> sent a code paste, see https://paste.rs/JrM |
12:38:09 | FromDiscord | <Yardanico> sent a code paste, see https://paste.rs/gK7 |
12:39:08 | FromDiscord | <jmgomez> yes, I was wondering if that would work if not what's the utility of having it in from of object in the declaration? |
12:39:21 | FromDiscord | <Yardanico> this will of course owrk |
12:39:22 | FromDiscord | <Yardanico> (edit) "owrk" => "work" |
12:39:44 | FromDiscord | <jmgomez> Im not referring to the alias but to the import as ptr object |
12:39:58 | PMunch | Import as ptr object? |
12:40:14 | FromDiscord | <jmgomez> yes, it's allowed by the compiler |
12:40:25 | PMunch | @Knedlik, and what package are you trying to `nimble install` |
12:40:30 | FromDiscord | <jmgomez> if it doenst work as I exposed, why is it allowed? |
12:40:36 | FromDiscord | <jmgomez> I mean, what's the utility of it |
12:40:44 | PMunch | And does the Nimble directory exist and is writeable? |
12:41:06 | PMunch | @jmgomez, `import as ptr object` is definitely not allowed in Nim |
12:41:59 | PMunch | What exactly is the code you're trying to use? |
12:42:46 | FromDiscord | <Knedlik> Nible directory does exist, but for some reason I canāt mark it as writeable? |
12:42:48 | FromDiscord | <jmgomez> hmm code is fine with it, the compiler only complains when trying to link |
12:43:50 | FromDiscord | <jmgomez> because it doesnt detect it as a ptr but as something else and the names mangled but it does seem to be an allowed expression |
12:45:00 | PMunch | @jmgomez, the code is definitely not fine with it: https://play.nim-lang.org/#ix=3VMq |
12:45:06 | FromDiscord | <jmgomez> I just rollback then changes I did and will go with @Yardanico suggestion |
12:45:27 | PMunch | You still haven't actually told us what you're trying to do.. |
12:45:32 | FromDiscord | <jmgomez> In reply to @PMunch "<@726017160115126333>, the code is": ohh I was using it like so |
12:46:04 | FromDiscord | <Knedlik> So I ran CMD as admin and it worked⦠simplest solutions at work again |
12:46:11 | PMunch | Oh I see, it's the bridge messing up.. |
12:46:16 | FromDiscord | <jmgomez> sent a code paste, see https://play.nim-lang.org/#ix=3VMr |
12:46:24 | PMunch | Your code snippets aren't sent to IRC -_- |
12:46:51 | FromDiscord | <Yardanico> :( |
12:46:52 | PMunch | @Knedlik, you probably installed with administrator and that is now the only user allowed to use the files or something like that |
12:46:54 | FromDiscord | <jmgomez> In reply to @jmgomez "I think I did": and expecting to autogenerate an alias which again is not a problem that it doesnt work like that. But it does compile |
12:46:58 | FromDiscord | <Yardanico> https://media.discordapp.net/attachments/371759389889003532/967043834573881404/unknown.png |
12:47:07 | FromDiscord | <jmgomez> ouch |
12:48:05 | FromDiscord | <jmgomez> without the quote it was: "type UFunction {.importcpp: "UFunction", inheritable, pure, header: "UObject/Class.h".} = ptr object" |
12:48:15 | PMunch | Yeah I got it open in Matrix now |
12:49:12 | PMunch | That code will only work if you always have to deal with `UFunction*` |
12:49:32 | PMunch | And even then it probably won't work quite right |
12:49:53 | PMunch | You shouldn't tell Nim that something is a pointer if it isn't a pointer, that will only make it spit out code that isn't valid |
12:50:15 | FromDiscord | <jmgomez> thats the case I can deref when not but it does not export the objects as proper pointers |
12:50:26 | PMunch | Nim doesn't know what UFunction is, that is why you have to tell it. If you lie to the Nim compiler it will trust you and generate weird code |
12:51:06 | FromDiscord | <jmgomez> Yes, that I know |
12:51:12 | PMunch | You should always just describe the C/C++ code when using `importc.*` |
12:51:18 | FromDiscord | <Knedlik> So dependencies are okay-ish⦠it for some reason canāt install nake |
12:51:32 | PMunch | Well apparently not since you tried to tell it something that isn't a pointer is a pointer :P |
12:51:56 | PMunch | @Knedlik, nake is super old, it might just be broken on new Nim versions |
12:52:25 | PMunch | Oh huh, apparently it was committed to 3 months ago |
12:52:32 | PMunch | So maybe it's still up to date then |
12:52:43 | FromDiscord | <jmgomez> I mean if I use it as a pointer everywhere it should not matter isnt it? |
12:52:46 | FromDiscord | <Knedlik> Thatās bad, Iām pretty sure nim-godot bindings require it |
12:53:06 | PMunch | @jmgomez, yes it will |
12:53:29 | PMunch | Because whenever you use it Nim will generate code as if it was a pointer, and since it isn't that code will be incorrect |
12:53:52 | PMunch | @Knedlik, no I had a look at it and it seems to still be up to date |
12:54:00 | PMunch | When was the error when you tried to install it? |
12:54:41 | FromDiscord | <Knedlik> Stdlib_dollars.nim.c: invalid argument |
12:54:59 | PMunch | @jmgomez, what you do in this case is first describe accurately what the C/C++ type is, then you create an alias in Nim if you want to make it more ergonomic. |
12:55:20 | PMunch | @Knedlik, that seems like a C compiler bug |
12:55:51 | PMunch | Which could be caused by your username, although it could be something else |
12:55:53 | FromDiscord | <jmgomez> yes, that's what Im doing now but it's a bit confuse that nim doesnt treat it like a pointer to something if it's |
12:58:34 | PMunch | @jmgomez, not quire sure what you mean |
12:58:46 | PMunch | If you importc and call it ptr object Nim will treat that as a pointer |
12:59:09 | PMunch | But Nim doesn't know whether it is right or wrong, it just trust that you know what you're doing |
12:59:20 | PMunch | So if you lie about types it does the wrong thing |
12:59:40 | PMunch | Which is part of the reason I wrote Futhark |
12:59:50 | FromDiscord | <jmgomez> I tried to export it afterwards via FFI and got a linker problem. However it did work fine if I just set the ptr in the function declaration (as opposite to in the object) |
13:00:04 | PMunch | Focus on just telling Nim exactly what C types are, then I can wrap those into more comfortable types in Nim afterwards |
13:01:14 | FromDiscord | <jmgomez> Does Futhark works with C++ at all? (even if it required tweaking afterwards?) |
13:01:15 | PMunch | A recent project I did with Futhark: http://ix.io/3VMu/nim |
13:01:25 | PMunch | Not really |
13:01:34 | PMunch | It only reads C headers |
13:01:56 | PMunch | But if you have a C header to a C++ library then you should be fine |
13:02:11 | FromDiscord | <mori> sent a code paste, see https://paste.rs/Ta5 |
13:02:27 | FromDiscord | <jmgomez> In reply to @PMunch "A recent project I": looks good |
13:02:36 | FromDiscord | <mori> how can i concatenate strings at compile time? |
13:02:40 | PMunch | E.g. something like this would work just fine I believe: https://github.com/gtoubassi/femtozip/blob/master/cpp/libfz/src/femtozip.h |
13:02:44 | PMunch | @mori, `&` |
13:02:47 | FromDiscord | <jmgomez> In reply to @PMunch "But if you have": not the case, it's some part of UE that Im binding |
13:03:18 | FromDiscord | <jmgomez> It shouldnt be too much anyways, the idea is to bind the minimum necessary and the generate types using ue reflection system |
13:03:37 | FromDiscord | <mori> In reply to @PMunch "@mori, `&`": am i not doing just that? |
13:03:43 | PMunch | @mori, https://play.nim-lang.org/#ix=3VMv |
13:03:49 | FromDiscord | <Rika> sent a code paste, see https://paste.rs/KCw |
13:03:51 | PMunch | Your for loop is not run on compile-time |
13:03:52 | FromDiscord | <mori> oh... |
13:04:07 | PMunch | So the `i` isn't available on compile-time, and hence can't be used for staticExec |
13:04:10 | FromDiscord | <mori> just got into nim, few minutes ago |
13:04:21 | FromDiscord | <mori> somehow its hard to find relevant information |
13:04:26 | FromDiscord | <mori> im googling compile time loops in nim |
13:04:49 | FromDiscord | <mori> spent 5 minutes and couldn't find that static keyword/block |
13:05:00 | PMunch | @mori, in general what you would do is place them in a procedure and mark that with the {.compileTime.} pragma, or use them from a macro |
13:05:40 | FromDiscord | <mori> tried searching here too https://nim-lang.org/docs/tut1.html |
13:05:46 | FromDiscord | <mori> In reply to @PMunch "@mori, in general what": i see, thank you |
13:06:30 | FromDiscord | <enthus1ast> also stuff that is assigned to const is compiletimeāµ(@mori) |
13:06:45 | FromDiscord | <enthus1ast> const foo = 10 + 20 |
13:08:22 | * | arkurious joined #nim |
13:08:54 | PMunch | @mori, something like this for example https://play.nim-lang.org/#ix=3VMw |
13:09:24 | PMunch | That macro creates aResult and bResult which are the result of running `a --option` and `b --option` respectively |
13:10:01 | PMunch | @mori, in general compile-time execution isn't considered a "Tutorial 1" topic |
13:11:01 | FromDiscord | <SirOlaf> Good news, this kinda does nothing https://github.com/nim-lang/Nim/pull/19717 |
13:11:14 | PMunch | Part 3 has a lot more detail on compile-time execution and macros: https://nim-lang.org/docs/tut3.html |
13:11:50 | PMunch | @SirOlaf, does nothing? |
13:12:08 | FromDiscord | <SirOlaf> I'm trying to use a stream at compiletime |
13:12:16 | FromDiscord | <SirOlaf> But it insists on using prepareMutation in the vm |
13:12:23 | FromDiscord | <SirOlaf> That PR should have fixed it |
13:13:04 | PMunch | And you're sure that you have a version which includes that fix? |
13:13:17 | PMunch | nim --version should contain a git hash |
13:13:39 | FromDiscord | <SirOlaf> Does not contain a git hash |
13:14:00 | FromDiscord | <SirOlaf> But is version 1.7.1 and compiled at 2022-04-22 |
13:14:02 | PMunch | What does it contain then? |
13:14:22 | PMunch | Compilation date doesn't really matter, I can compile an 0.13.0 today and it still wouldn't have that fix :P |
13:14:35 | FromDiscord | <SirOlaf> Well yeah, but I used choosenim |
13:14:38 | FromDiscord | <SirOlaf> That should just work |
13:14:43 | PMunch | Well.. |
13:14:53 | PMunch | choosenim devel will grab the latest nightly |
13:15:26 | PMunch | And it might be prevented from building for some reason |
13:15:34 | PMunch | That's why I wanted you to verify the version |
13:15:36 | FromDiscord | <SirOlaf> No, looks pretty recent |
13:15:44 | FromDiscord | <SirOlaf> https://github.com/nim-lang/nightlies/releases/tag/2022-04-22-devel-bb839029d5065bcd8367661802bf04e1e7eebb58 |
13:15:47 | FromDiscord | <SirOlaf> This references the newest commit |
13:17:00 | FromDiscord | <SirOlaf> And I can verify that it is that build because I added an echo into streams.nim |
13:17:22 | PMunch | @SirOlaf, I tried to run your test case for the issue on the latest devel and it works fine here |
13:18:07 | FromDiscord | <SirOlaf> Did you run with arc |
13:18:16 | FromDiscord | <SirOlaf> Because this is a arc bug |
13:18:33 | PMunch | Ah, I did not |
13:18:41 | PMunch | Can confirm that it does indeed crash with ARC |
13:19:27 | FromDiscord | <Solitude> epic test |
13:19:40 | FromDiscord | <Solitude> why the ci was green then |
13:20:01 | FromDiscord | <SirOlaf> Is compiler even tested with arc |
13:20:15 | FromDiscord | <SirOlaf> Or stdlib in this case |
13:23:21 | PMunch | It doesn't appear so |
13:23:43 | FromDiscord | <Solitude> lol |
13:25:24 | FromDiscord | <SirOlaf> Alternative fix also doesn't work because nimscript is not defined, so that's pretty cool |
13:30:22 | FromDiscord | <SirOlaf> sent a code paste, see https://play.nim-lang.org/#ix=3VMD |
13:31:38 | PMunch | @SirOlaf, better to put these comments on the issue/PR |
13:31:51 | FromDiscord | <SirOlaf> True |
13:32:01 | PMunch | They quickly get lost if you only share them here and the right people doesn't see them |
13:33:53 | FromDiscord | <SirOlaf> Well, at least I can compile now. Kinda wild how often the same thing can fail |
13:57:54 | * | PMunch quit (Quit: Leaving) |
14:04:17 | FromDiscord | <TryAngle> I'm curious how does nim generate the C code? May somebody link me to the module? |
14:04:38 | FromDiscord | <TryAngle> I looked for 10 min but I seem to be too stupid to find lol |
14:06:47 | FromDiscord | <Yardanico> In reply to @TryAngle "I'm curious how does": check the files that start with "ccg" in the compiler folder |
14:07:04 | FromDiscord | <Yardanico> and cgen.nim of course |
14:07:05 | FromDiscord | <Yardanico> https://media.discordapp.net/attachments/371759389889003532/967063999520833576/unknown.png |
14:07:07 | FromDiscord | <Yardanico> those |
14:07:11 | FromDiscord | <ratapenado> Hello, is there somewhere a roadmap of the planned features or libraries ? Not something too technical |
14:07:21 | FromDiscord | <Yardanico> In reply to @ratapenado "Hello, is there somewhere": not really, especially not for libraries |
14:07:37 | FromDiscord | <Yardanico> there's https://github.com/nim-lang/RFCs/issues/437 for nim itself |
14:10:22 | FromDiscord | <ratapenado> Thanks! |
14:20:13 | FromDiscord | <d4rckh> favorite gui library? |
14:29:08 | * | rockcavera joined #nim |
14:29:08 | * | rockcavera quit (Changing host) |
14:29:09 | * | rockcavera joined #nim |
14:31:11 | * | jmdaemon joined #nim |
14:32:32 | FromDiscord | <Zoom> Depends on your needs. But be conservative with your expectations in any case. Last time I checked, if you need something super simple asap, NiGui worked fine.āµ(@d4rckh) |
14:35:18 | FromDiscord | <d4rckh> currently trying nimx |
14:36:19 | * | duuude quit (Ping timeout: 240 seconds) |
14:39:28 | FromDiscord | <TryAngle> In reply to @Yardanico "check the files that": Thanks š |
14:41:17 | FromDiscord | <d4rckh> nimx's docs are top |
14:41:19 | FromDiscord | <d4rckh> (edit) "top" => "amazing" |
14:44:17 | * | pro joined #nim |
14:58:30 | * | v9fk quit (Remote host closed the connection) |
15:12:55 | * | v9fk joined #nim |
15:30:22 | FromDiscord | <jmgomez> sent a code paste, see https://play.nim-lang.org/#ix=3VR2 |
15:34:09 | FromDiscord | <Knedlik> Hey guys, there continues my journey in pushing through errors⦠Why am I getting `Canāt load font data/ttf/Nasa21.ttf: Library not initialized` and `Canāt load image data/gfx/BtS-Background.png: Invalid renderer` when trying to load font and image respectively? |
15:36:43 | FromDiscord | <TryAngle> In reply to @Knedlik "Hey guys, there continues": what library u use? |
15:36:53 | FromDiscord | <Knedlik> Nimgame2 |
15:37:13 | FromDiscord | <Knedlik> Which uses SDL for rendering afaik |
15:37:54 | FromDiscord | <SirElephant> just out of curiosity, is Andreas Rumpf German? |
15:38:46 | FromDiscord | <TryAngle> In reply to @Knedlik "Nimgame2": did u init the scene and made a newTextureGraphic? |
15:39:25 | FromDiscord | <Knedlik> Iām pretty sure I did |
15:39:46 | FromDiscord | <Knedlik> Yes, I did |
15:40:09 | FromDiscord | <TryAngle> is also the direction correct?āµlike first the init than the image loading?āµI had that issue in a similar library once and struggled š |
15:41:21 | FromDiscord | <Knedlik> What? I have the image initial loading in data.nim, which is executed before the scene init, because scene init relies on data.nim in order to use those loaded variables |
15:41:50 | NimEventer | New thread by Jmgomez: C++ binding variadic template, see https://forum.nim-lang.org/t/9122 |
15:42:06 | FromDiscord | <spoon> is the image path in the same location as the executable? |
15:42:11 | * | fredrikhr quit (Quit: Disconnecting) |
15:42:38 | FromDiscord | <Knedlik> No, data is parallel to src as per nimgame tutorial |
15:42:50 | FromDiscord | <Knedlik> (Data the folder) |
15:42:53 | FromDiscord | <spoon> ah. |
15:44:32 | FromDiscord | <TryAngle> In reply to @Knedlik "What? I have the": hmm nimgame is first initing the scene and then load the image in all their demos |
15:45:19 | FromDiscord | <Knedlik> If by load you mean variable.load(), then not in the bounce tutorial |
15:46:18 | FromDiscord | <Knedlik> Although, Iām only 100% sure about fonts |
15:47:18 | FromDiscord | <Knedlik> And Iām also getting Canāt render nil font |
15:47:35 | FromDiscord | <TryAngle> In reply to @Knedlik "If by load you": https://github.com/Vladar4/nimgame2/blob/afd289aefd84aa4f89435f5fa0306da62f2023cc/demos/demo7/mainscene.nim#L34 |
15:47:59 | FromDiscord | <TryAngle> they even discard it š¤ |
15:49:13 | FromDiscord | <Knedlik> Thatās weird, because the tutorial is completely different |
15:53:18 | FromDiscord | <TryAngle> In reply to @Knedlik "Thatās weird, because the": hmm their tutorials are 5 years old |
15:53:22 | FromDiscord | <TryAngle> maybe they changed |
15:54:46 | FromDiscord | <TryAngle> but true, their tutorials are different to their demos that's sus |
15:55:43 | FromDiscord | <Knedlik> Yep, your suggestion to change the order worked |
15:56:21 | FromDiscord | <TryAngle> š |
16:14:59 | FromDiscord | <spoon> aren't `slurp`/`staticRead` supposed to return a string? at least according to the docs, i'm getting `but expression 'bg' is of type: template (a: GVec234[bg.T]): GVec2[bg.T]`, even using the `$` proc |
16:17:11 | FromDiscord | <Rika> whats the code? |
16:18:20 | * | neceve joined #nim |
16:18:58 | FromDiscord | <spoon> actually, i think it's because i'm using `static:`, how do i properly do this? |
16:18:59 | FromDiscord | <spoon> actually, i think it's because i'm using `static:`, how do i properly do this? |
16:19:23 | FromDiscord | <spoon> home internet died oops, cant copy paste |
16:26:24 | FromDiscord | <TryAngle> In reply to @spoon "home internet died oops,": Germany š? |
16:28:14 | FromDiscord | <spoon> In reply to @TryAngle "Germany š?": nah, just my equipment |
16:30:56 | FromDiscord | <spoon> solved by using `const`, using `static:` just spammed my console with like every method from every library when i tried to print a string from there |
16:32:16 | * | vicfred joined #nim |
16:39:23 | * | mahlon joined #nim |
16:53:26 | * | xet7 quit (Remote host closed the connection) |
17:00:25 | FromDiscord | <codic> Given an enum indexed array[E, string] so basically a sort of key value pair, how do I check if say, the array contains a value corresponding to E.x? |
17:00:30 | FromDiscord | <codic> (edit) "E.x?" => "E.EnumMember?" |
17:00:58 | FromDiscord | <Rika> arrays will always have a value corresponding to all enum members |
17:01:09 | FromDiscord | <Rika> it may just be the default value though š |
17:01:19 | FromDiscord | <Rika> so if you need "unset by default" use options |
17:02:51 | FromDiscord | <codic> oh true |
17:02:54 | FromDiscord | <codic> oh well |
17:02:55 | FromDiscord | <codic> ugh |
17:02:59 | FromDiscord | <codic> pain |
17:17:59 | FromDiscord | <kevin> Anyone know if there is a Nim library to take packet captures from an interface? |
17:18:12 | FromDiscord | <kevin> Similar to https://github.com/google/gopacket/blob/master/pcapgo/capture.go (except this is in Golang) |
17:18:35 | FromDiscord | <kevin> Only found this: https://github.com/PMunch/nim-pcap which is for parsing pcaps, not for taking them |
17:27:41 | * | duuude joined #nim |
17:43:48 | FromDiscord | <konsumlamm> In reply to @Rika "so if you need": @codic or just use a table instead |
18:02:21 | FromDiscord | <codic> Yeah I figured out a way to do it without using either (not that specific thing, but ultimately achieves the same behavior) |
18:02:32 | FromDiscord | <codic> I just didn't want to change my code too much lol |
18:02:35 | FromDiscord | <codic> Feeling lazy |
18:05:35 | * | xet7 joined #nim |
18:36:45 | * | vicfred quit (Quit: Leaving) |
18:51:12 | FromDiscord | <Knedlik> Hey guys, any idea why a texture graphic doesnāt show in nimgame, alternatively a good tutorial on how to use texture graphics? |
18:51:31 | FromDiscord | <Knedlik> (edit) "doesnāt" => "wouldnāt" |
19:17:26 | * | Gustavo6046 joined #nim |
19:59:16 | FromDiscord | <Knedlik> So Iām not sure how, but I fixed it |
20:01:36 | FromDiscord | <Knedlik> Is there a proper and safe way to wait a set amount of time in Nim? |
20:05:49 | FromDiscord | <!Patitotective> https://nim-lang.org/docs/os.html#sleep%2Cint ? |
20:06:23 | FromDiscord | <Knedlik> Seems good, thanks |
20:10:43 | FromDiscord | <JSONBash> is there a nim job board site? |
20:11:59 | * | duuude quit (Ping timeout: 240 seconds) |
20:17:58 | FromDiscord | <dom96> the #jobs channel |
20:18:14 | FromDiscord | <dom96> which reminds me, it's time to clean it up |
20:21:50 | pro | we have #jobs? |
20:22:35 | nrds | <Prestige99> on discord, yeah |
20:23:53 | FromDiscord | <JSONBash> In reply to @dom96 "the <#845770858470965258> channel": would it be worth a separate site? something I would gladly work on |
20:24:14 | nrds | <Prestige99> I think that would be cool to have |
20:24:38 | FromDiscord | <dom96> I don't think we have quite enough job postings for that right now |
20:25:45 | FromDiscord | <JSONBash> yeah I don't think so either. Would it be worse to have a site though? |
20:26:01 | nrds | <Prestige99> It could help draw in postings |
20:26:04 | pro | is there some non discordy way of using discord? |
20:27:01 | nrds | <Prestige99> the irc bridge is about it afaik |
20:29:39 | pro | https://github.com/terminal-discord/weechat-discord was thinking more like this |
20:30:03 | nrds | <Prestige99> There's also cordless but it's not actively maintained anymore |
20:30:21 | nrds | <Prestige99> https://github.com/Bios-Marcel/cordless |
20:35:15 | FromDiscord | <Knedlik> Uhhh guys can I somehow package my resources (font, gfxā¦) with the exe? |
20:35:23 | FromDiscord | <Knedlik> Like in the exe? |
20:36:55 | FromDiscord | <Knedlik> And with that, can I make/access files by the directory the exe is in? |
20:38:19 | FromDiscord | <2F42BBA1> In reply to @Knedlik "Uhhh guys can I": It's somewhere in Nimble file |
20:38:22 | FromDiscord | <2F42BBA1> I think |
20:38:27 | FromDiscord | <dom96> `const myFont = staticRead("font.tft")` |
20:39:05 | FromDiscord | <dom96> In reply to @Knedlik "And with that, can": for this you can use getAppDir https://nim-lang.org/docs/os.html#getAppDir |
20:39:18 | FromDiscord | <Knedlik> Thank you so much |
20:40:46 | nrds | <Prestige99> Would be cool if you could do that with lib dependencies |
20:41:56 | FromDiscord | <Ayy Lmao> Is anyone extensively using concepts? I keep finding compiler bugs, and when you do something wrong you usually get spammed with like 100 lines of extremely verbose output. |
20:42:17 | FromDiscord | <Ayy Lmao> I'm wondering if it's worth even going down that road. |
20:44:42 | FromDiscord | <dom96> I personally don't bother with them |
20:44:55 | FromDiscord | <dom96> They are also still due a redesign |
20:45:24 | nrds | <Prestige99> Are they being worked on? |
20:45:32 | FromDiscord | <dom96> no idea |
20:46:42 | FromDiscord | <Ayy Lmao> I like the idea of them, but they seem barely usable at the moment. |
20:46:54 | nrds | <Prestige99> Yeah they're pretty broken |
20:47:09 | nrds | <Prestige99> the new redesign looks nice, but it's not a thing yet |
20:47:46 | FromDiscord | <Knedlik> Uhh so I tried staticRead and Iām getting errors of canāt load image |
20:48:09 | nrds | <Prestige99> incorrect path maybe? |
20:48:31 | FromDiscord | <Knedlik> Should be correct, afterall was usable before when running out of source directory |
20:48:55 | FromDiscord | <dom96> diff the contents of the two files |
20:49:07 | FromDiscord | <Knedlik> What two files? |
20:49:39 | FromDiscord | <Knedlik> Also theyāre .pngs so Iām not sure how |
20:52:41 | FromDiscord | <SirOlaf> Why aren't concepts treated like generics anyways |
20:54:33 | FromDiscord | <dom96> In reply to @Knedlik "What two files?": the one on disk and the one you've embedded in the exe |
20:54:42 | FromDiscord | <dom96> In reply to @SirOlaf "Why aren't concepts treated": what do you mean? |
20:55:39 | FromDiscord | <SirOlaf> Well I don't know too much about how concepts work, but I would think that treating functions that use them as generic would be good |
20:55:54 | FromDiscord | <Knedlik> In reply to @dom96 "the one on disk": Iām not sure how |
20:56:11 | FromDiscord | <SirOlaf> In reply to @SirOlaf "Well I don't know": Because the type is not concrete so a new function of concept type C should be instantiated |
20:57:58 | FromDiscord | <dom96> functions using them are treated as generics afaik |
20:58:09 | FromDiscord | <dom96> the problem with concepts is that they are too flexible |
20:58:19 | FromDiscord | <dom96> the body of a concept is evaluated by the Nim VM |
20:58:33 | FromDiscord | <dom96> which makes their surface area for bugs far too high |
20:58:45 | FromDiscord | <dom96> (but that's I guess mainly my opinion) |
20:59:36 | FromDiscord | <SirOlaf> Actually you're right they do seem to be treated similar to generics |
21:01:47 | FromDiscord | <SirOlaf> Nice recursive error |
21:01:47 | FromDiscord | <SirOlaf> sent a code paste, see https://play.nim-lang.org/#ix=3VYL |
21:03:24 | FromDiscord | <Knedlik> @dom96 so I tried to diff, but it throws an error that it canāt access the file thatās not staticRead |
21:03:40 | FromDiscord | <Knedlik> For some weird reason, but yes, the path is correct |
21:05:37 | * | vicfred joined #nim |
21:08:31 | nrds | <Prestige99> I wonder if it expects a different path? |
21:08:50 | FromDiscord | <Knedlik> ? |
21:09:44 | * | neceve quit (Remote host closed the connection) |
21:09:45 | FromDiscord | <Knedlik> And now it doesnāt work either way⦠how nice |
21:17:50 | FromDiscord | <Knedlik> Iām lost tbh |
21:18:28 | FromDiscord | <Elegantbeef> They areāµ(@SirOlaf) |
21:19:03 | FromDiscord | <SirOlaf> Yeah you're both right |
21:19:09 | FromDiscord | <SirOlaf> But I got some great news for you. Streams still aren't fixed |
21:19:24 | FromDiscord | <Elegantbeef> I mean they're parity with before my change |
21:19:43 | FromDiscord | <SirOlaf> Yep, still pretty crazy how much can go wrong for something like this |
21:19:48 | FromDiscord | <Elegantbeef> or not |
21:19:49 | FromDiscord | <Elegantbeef> I just give up at this point |
21:20:19 | FromDiscord | <SirOlaf> Well I'm just using this when nimvm stuff for my local version |
21:20:22 | FromDiscord | <SirOlaf> Works well enough |
21:20:30 | FromDiscord | <SirOlaf> (edit) "when nimvm" => "`when nimvm`" |
21:20:39 | FromDiscord | <Elegantbeef> The issue here is that `prepareMutation` is declared in the scope of the `static` and it needs a `when not nimVm` ontop of that `when declared(prepareMutation)` |
21:20:49 | FromDiscord | <Elegantbeef> So do you want to PR yet another fix? |
21:21:02 | FromDiscord | <SirOlaf> Oh I'd love a third fix |
21:21:40 | FromDiscord | <Elegantbeef> Would've been nice to have it pointed out to me the test doesnt actually fucking test all three GC methods |
21:21:48 | FromDiscord | <Knedlik> Nimassets looks pretty tasty |
21:22:05 | FromDiscord | <Elegantbeef> But who ever accepted it apparently didnt feel it was important to mention |
21:35:15 | * | pro quit (Quit: pro) |
21:37:40 | * | neurocyte8614492 joined #nim |
22:01:32 | * | slowButPresent quit (Ping timeout: 246 seconds) |
22:03:24 | * | slowButPresent joined #nim |
22:12:33 | FromDiscord | <Knedlik> sent a code paste, see https://play.nim-lang.org/#ix=3VYZ |
22:12:48 | FromDiscord | <Elegantbeef> make it a `let` instead of `const` |
22:13:19 | FromDiscord | <Elegantbeef> `const` is for compile time constants and `getAppDir` is certainly not a constant |
22:14:15 | FromDiscord | <Knedlik> Itās a var |
22:14:28 | FromDiscord | <Elegantbeef> Well give more code |
22:16:11 | FromDiscord | <Knedlik> sent a code paste, see https://play.nim-lang.org/#ix=3VZ0 |
22:16:38 | FromDiscord | <Knedlik> maybe those two consts at the bottom? |
22:16:39 | FromDiscord | <Elegantbeef> you're attempting to use a runtime value for a compile time value |
22:16:44 | FromDiscord | <Elegantbeef> change that const to `let` |
22:17:54 | FromDiscord | <Knedlik> Looks good now, thanks |
22:28:43 | * | toulene quit (Quit: The Lounge - https://thelounge.chat) |
22:36:33 | * | toulene joined #nim |
22:36:48 | * | toulene quit (Remote host closed the connection) |
22:37:37 | * | flynn joined #nim |
22:41:55 | * | toluene joined #nim |
22:43:16 | * | flynn quit (Read error: Connection reset by peer) |
23:05:50 | * | xet7 quit (Remote host closed the connection) |
23:06:58 | * | xet7 joined #nim |