00:33:55 | * | noeontheend joined #nim |
01:05:00 | * | vicfred quit (Quit: Leaving) |
01:51:10 | FromDiscord | <Forest> Anyone know if i could make an iOS app with Nim? Specifically using Naylib? Or is that not feasible now because of Apple removing OpenGL stuff |
01:52:30 | FromDiscord | <Forest> Actually that's probably a question better asked in the Raylib discord server |
01:52:57 | FromDiscord | <Forest> But how would i have one codebase for different platforms that have different APIs? |
01:53:46 | FromDiscord | <Forest> sent a code paste, see https://play.nim-lang.org/#ix=3Vgf |
01:54:36 | FromDiscord | <Anuke> https://github.com/treeform/glfm has examples for an iOS app, it's probably a good place to start. |
01:57:32 | FromDiscord | <Forest> Thanks! |
02:00:04 | * | noeontheend quit (Ping timeout: 250 seconds) |
02:09:59 | FromDiscord | <kunaltyagi (Kunal Tyagi)> Newbie question\: should I be using make with nimc or are there better recommendations? |
02:11:24 | FromDiscord | <kunaltyagi (Kunal Tyagi)> I found koch, but it's a bit confusing |
02:19:35 | FromDiscord | <Elegantbeef> You can use `nake` or just `nimble` tasks |
02:21:40 | FromDiscord | <kunaltyagi (Kunal Tyagi)> Thanks, will look at those |
02:22:37 | FromDiscord | <aph> how should i limit the range of what an integer can store, i'm trying to make a type thats `0..127`, would `mod` work? |
02:22:51 | FromDiscord | <Elegantbeef> `var a: 0..127` |
02:22:57 | FromDiscord | <aph> ohhh |
02:23:06 | FromDiscord | <aph> that's cool ngl |
02:24:09 | FromDiscord | <aph> thx beef |
02:36:20 | FromDiscord | <Anuke> Isn't nake basically dead? I don't see anyone using it, and the repo maintainer doesn't seem to be around |
02:36:41 | FromDiscord | <Anuke> It doesn't seem to offer anything over nimble tasks |
02:36:56 | FromDiscord | <Elegantbeef> It's compiled Nim so isnt limited to nimscript/Nimvm |
02:37:34 | FromDiscord | <!Patitotective> In reply to @Anuke "Isn't nake basically dead?": i use it 👀 |
02:39:47 | FromDiscord | <Anuke> I haven't run into many nimscript limitations with it, but I suppose my buildscripts haven't been that complex either |
02:41:44 | FromDiscord | <!Patitotective> i use it because niprefs (npeg) doesn't work inside nimvm for some reason so🤷♂️ |
02:45:02 | * | arkurious quit (Quit: Leaving) |
02:45:44 | FromDiscord | <TryAngle> is there a way to consistenly give a relative path? |
02:46:24 | FromDiscord | <TryAngle> like `../assets` and `assets` or maybe `<name>/assets` |
02:46:31 | FromDiscord | <TryAngle> depending on where the script got executed |
02:47:32 | FromDiscord | <!Patitotective> i have a main module at the top of my project dir, and all paths depend on it↵if you need to pass the path to another module you could pass the absolute path 🤷♂️ |
02:48:49 | FromDiscord | <TryAngle> hmm neither works↵Ive written a script that downloads assets from another page for my project and I want the script to be executable if you are in <project>/scripts and <project>/ |
02:48:58 | FromDiscord | <TryAngle> (edit) removed "if you are" |
02:53:36 | FromDiscord | <!Patitotective> you could make a config file at `project/` where you define all the paths (and maybe the read function of the file converts them to absolutes paths from the `project/`) so the only path you need to "hardcode" is the one of the config file |
02:54:21 | FromDiscord | <huantian> you could have a helper function which walks up directories until it finds your project base that would have a `.git` fodler |
03:02:03 | * | vicfred joined #nim |
03:08:29 | FromDiscord | <!Patitotective> hey @ElegantBeef do you remember the `igBegin/igEnd` macro thing? there seems to be a problem with overloaded procedures↵how should i get the overloaded procedures? 🤨 |
03:08:51 | FromDiscord | <!Patitotective> (edit) "procedures?" => "procedures from the macro?" |
03:12:34 | FromDiscord | <Forest> Anyone have an idea of how I'd structure a program that's supposed to target Android, PC and the web? |
03:19:03 | FromDiscord | <TryAngle> sent a long message, see http://ix.io/3Vgo |
03:19:56 | FromDiscord | <Forest> Thanks! The GUI library itself is crossplatform but there's definitely code for specific for each platform that'll need to be done |
03:21:19 | FromDiscord | <TryAngle> I have the same thing rn with winapi and an api to work on most unix distros and I do it like that |
03:22:20 | FromDiscord | <Forest> Ah fair |
03:23:07 | FromDiscord | <Forest> @!Patitotective a reason for using platform specific code is for purchases, i can't exactly use Google play purchases on the web now can i lol |
03:23:46 | FromDiscord | <!Patitotective> big project |
03:24:25 | FromDiscord | <Forest> Yeah lol, or at least I'm planning to |
03:26:57 | FromDiscord | <!Patitotective> sounds interesting ~~stealable~~ |
03:27:52 | FromDiscord | <Forest> Not if i never release the source code lol |
03:29:46 | FromDiscord | <!Patitotective> In reply to @Forest "Not if i never": just to see how you're managing cross-platform stuff ~~steal~~ 👀 |
03:30:19 | FromDiscord | <Forest> Fair lol |
03:30:27 | FromDiscord | <Forest> In reply to @TryAngle "really depends on what": But it's just this essentially |
03:32:10 | FromDiscord | <!Patitotective> then gonna take a look at try angle's code ~~steal~~ 👀 |
03:32:41 | FromDiscord | <Forest> Lol |
03:55:45 | FromDiscord | <TryAngle> In reply to @Patitotective "then gonna take a": haven't published that yet either 😳 |
03:55:51 | FromDiscord | <TryAngle> but will soon'ish |
03:56:05 | FromDiscord | <TryAngle> writing library atm and implementing that in rift once it's done |
03:58:42 | FromDiscord | <TryAngle> sent a code paste, see https://play.nim-lang.org/#ix=3Vgt |
03:59:06 | FromDiscord | <TryAngle> (edit) "https://play.nim-lang.org/#ix=3Vgt" => "https://play.nim-lang.org/#ix=3Vgu" |
03:59:15 | FromDiscord | <Elegantbeef> Ew |
03:59:31 | FromDiscord | <TryAngle> In reply to @Elegantbeef "Ew": why lol |
03:59:51 | FromDiscord | <Elegantbeef> sent a code paste, see https://paste.rs/FlI |
04:00:31 | FromDiscord | <TryAngle> sent a code paste, see https://paste.rs/KwZ |
04:00:49 | FromDiscord | <TryAngle> (edit) "https://play.nim-lang.org/#ix=3Vgw" => "https://play.nim-lang.org/#ix=3Vgx" |
04:02:45 | FromDiscord | <TryAngle> I'm getting literally downvoted on a discord |
04:02:49 | FromDiscord | <TryAngle> I'm crying |
04:03:18 | FromDiscord | <TryAngle> https://tenor.com/view/oh-the-misery-everybody-wants-gif-25104633 |
04:03:31 | FromDiscord | <!Patitotective> the link is funnier than the gif |
04:03:45 | FromDiscord | <TryAngle> https://tenor.com/view/oh-the-misery-everybody-wants-gif-25104633 |
04:03:50 | FromDiscord | <TryAngle> oh true |
04:07:24 | FromDiscord | <Elegantbeef> if they have the same api you can just use a const but unlikely |
04:07:43 | FromDiscord | <Rika> In reply to @Patitotective "hey <@145405730571288577> do you": We warned you about it though |
04:08:46 | FromDiscord | <!Patitotective> In reply to @Rika "We warned you about": :C |
04:09:15 | FromDiscord | <!Patitotective> no overload procedures in macros? :[ |
04:09:18 | FromDiscord | <!Patitotective> (edit) "overload" => "overloaded" |
04:10:16 | FromDiscord | <Rika> You can probably but it’s something I’d say “too complicated for me to go through |
04:10:33 | FromDiscord | <Rika> I’d just go with a simpler solution at this point |
04:11:13 | FromDiscord | <Rika> Like sure you can get beef to fix it |
04:11:23 | FromDiscord | <Rika> Can you maintain it yourself in the future though |
04:11:28 | FromDiscord | <!Patitotective> In reply to @Rika "I’d just go with": what kind of solution? :o |
04:11:36 | FromDiscord | <Rika> In reply to @Patitotective "what kind of solution?": Manually. |
04:11:49 | FromDiscord | <!Patitotective> In reply to @Rika "Like sure you can": all my code is going to end up being written by beef 💀 |
04:12:21 | FromDiscord | <!Patitotective> In reply to @Rika "Manually.": m-manually?↵thats not what a programmer would say |
04:14:07 | FromDiscord | <Rika> In reply to @Patitotective "m-manually? thats not what": It’s not what an amateur programmer would say but there’s a point where you’re exerting more effort making something automatic than just doing it manually |
04:17:46 | FromDiscord | <!Patitotective> well, its to time to go to sleep thinking if its worth ~~how to name this library~~ |
04:17:48 | FromDiscord | <!Patitotective> 🌃 |
04:18:32 | FromDiscord | <Rika> In reply to @Rika "It’s not what an": It’s just my judgment |
04:18:39 | FromDiscord | <Rika> If you really want just wait for beef then |
04:19:24 | FromDiscord | <!Patitotective> now im confused |
04:19:29 | FromDiscord | <!Patitotective> anyways, thanks and gn |
04:20:35 | FromDiscord | <TryAngle> u can write a script for vscode lol |
04:21:29 | FromDiscord | <TryAngle> that inserts igEnd<..>s for u |
04:25:42 | NimEventer | New Nimble package! stdarg - A wrapper for <stdarg.h>, see https://github.com/sls1005/stdarg |
04:30:30 | FromDiscord | <huantian> hey rika you know a thing or two about suru right |
04:32:53 | FromDiscord | <huantian> I was originally going to plan on making a bar for each download "thread", and one total download bar, but then I realized that probably wouldn't work |
04:33:46 | FromDiscord | <huantian> at least if I want the bar totals to be file sizes ig? maybe I can have it be a fixed value out of 100 |
04:34:24 | FromDiscord | <creikey> sent a code paste, see https://paste.rs/JPb |
04:34:35 | FromDiscord | <huantian> oh boy do I have a concept for you |
04:34:45 | FromDiscord | <Rika> In reply to @huantian "hey rika you know": bro i fucking made it |
04:34:52 | FromDiscord | <creikey> In reply to @huantian "oh boy do I": I heard about concepts but I ctrl f'd for them on the manual and couldn't find them |
04:35:09 | FromDiscord | <Rika> you can change the totals to whatever number |
04:35:21 | FromDiscord | <huantian> can I change the totals after I call setup tho |
04:35:35 | FromDiscord | <Rika> i think that's how i made it to be |
04:35:35 | FromDiscord | <huantian> In reply to @creikey "I heard about concepts": they're in the experimental section <https://nim-lang.org/docs/manual_experimental.html#concepts> |
04:35:44 | FromDiscord | <Rika> bar[0].total = ... or something i forget |
04:35:48 | FromDiscord | <huantian> ok then I think I'm doing something wrong |
04:35:49 | FromDiscord | <creikey> ah I see they're experimental |
04:35:55 | FromDiscord | <creikey> why? |
04:35:56 | FromDiscord | <creikey> like do they work |
04:36:15 | FromDiscord | <Rika> they work but not completely stably |
04:36:27 | FromDiscord | <Rika> but they work well enough |
04:36:45 | FromDiscord | <creikey> In reply to @Rika "they work but not": how can a type be "unstable" |
04:36:47 | FromDiscord | <creikey> like the compiler actually stops working? |
04:36:57 | FromDiscord | <Rika> internal errors yeah |
04:36:59 | FromDiscord | <Rika> bugs |
04:37:12 | FromDiscord | <creikey> this syntax is looking very wonkky |
04:37:14 | FromDiscord | <Rika> "oh this matched even if it isnt supposed to: |
04:37:19 | FromDiscord | <creikey> I can kinda read it but like not really |
04:38:04 | FromDiscord | <creikey> maybe this is silly but like why even have concepts? just do like `x: any` and then x is valid if its usage in the procedure compiles |
04:38:12 | FromDiscord | <creikey> that's like the same thing right |
04:38:16 | FromDiscord | <creikey> oh wait isn't that what templates do |
04:38:21 | FromDiscord | <Elegantbeef> Lacks concrete explanation |
04:39:03 | FromDiscord | <Rika> its just another guarantee |
04:39:08 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3VgD |
04:39:10 | FromDiscord | <creikey> cool |
04:39:11 | FromDiscord | <creikey> sent a code paste, see https://paste.rs/Kp4 |
04:39:14 | FromDiscord | <Rika> theres more to it |
04:39:22 | FromDiscord | <creikey> I think it's time I finally read the nim manula |
04:39:23 | FromDiscord | <creikey> (edit) "manula" => "manual" |
04:41:42 | FromDiscord | <huantian> oh I forgot to call bar.update |
04:43:58 | FromDiscord | <Rika> bruh |
04:44:01 | FromDiscord | <Rika> okay |
04:44:15 | FromDiscord | <Rika> suru's still pretty wonky though ill admit |
04:44:53 | FromDiscord | <Rika> kinda because i never really needed a progress bar so i dont have much incentive to work more on it |
04:47:23 | * | slowButPresent quit (Quit: leaving) |
04:47:58 | FromDiscord | <TryAngle> what does that mean exactly? |
04:48:00 | FromDiscord | <TryAngle> sent a code paste, see https://play.nim-lang.org/#ix=3VgF |
04:48:14 | FromDiscord | <Elegantbeef> images is stack allocated and cannot safely be captured |
04:48:24 | FromDiscord | <huantian> what in the world is happening here, I think I'm breaking something https://media.discordapp.net/attachments/371759389889003532/964749073766830170/unknown.png |
04:48:28 | FromDiscord | <Elegantbeef> Use a ref table if you want this to work |
04:48:31 | FromDiscord | <TryAngle> In reply to @Elegantbeef "images is stack allocated": so I would need images = ref ? |
04:48:33 | FromDiscord | <TryAngle> (edit) "?" => "...?" |
04:48:45 | FromDiscord | <Elegantbeef> Yes do \`newTable |
04:49:00 | FromDiscord | <Elegantbeef> and drop the `var` |
04:50:18 | FromDiscord | <huantian> wow my code is so jank! |
04:51:42 | FromDiscord | <Rika> In reply to @huantian "what in the world": i got the same bug, somethings fucked |
04:55:28 | FromDiscord | <TryAngle> In reply to @Elegantbeef "Yes do \`newTable": wokrs 🥺 |
05:00:14 | FromDiscord | <huantian> In reply to @Rika "i got the same": with a different thing? |
05:03:31 | FromDiscord | <Rika> the issue is basically that you're incrementing more than total lol |
05:03:44 | FromDiscord | <Rika> i dont check that because uh i dont know what i'd do if it goes over, raise an exception? |
05:04:14 | FromDiscord | <huantian> yeahhh not sure |
05:04:26 | FromDiscord | <huantian> I think keeping it like this is fine, it's a pretty obvious error ig |
05:04:45 | FromDiscord | <Rika> i still think it should be caught some way |
05:04:58 | FromDiscord | <Rika> but i dont know if an exception would be appreciated xd |
05:05:02 | FromDiscord | <Rika> i guess it will |
05:05:04 | FromDiscord | <huantian> hm how do I have it inc only by the amount progressed... |
05:05:09 | FromDiscord | <huantian> (edit) "progressed..." => "progressed since the last inc" |
05:05:21 | FromDiscord | <Rika> how are you getting the progress in the first place |
05:12:07 | FromDiscord | <huantian> async httpclients have a callback for that ↵<https://nim-lang.org/docs/httpclient.html#progress-reporting> |
05:13:41 | FromDiscord | <sOkam!> Is it possible to make the output of a function be discarded automatically, without having to do `discard theThing()` on every call? |
05:14:03 | FromDiscord | <Rika> In reply to @huantian "async httpclients have a": ok so you can set progress with bar.progress = |
05:14:23 | FromDiscord | <Rika> In reply to @sOkam! "Is it possible to": on the function definition put pragma `{.discardable.}` i believe |
05:15:44 | FromDiscord | <huantian> what exactly is the delay parameter I'm passing in to update? is is the time since last update? |
05:16:33 | FromDiscord | <Rika> its uh delay for the bar, otherwise it'll update too quickly |
05:16:42 | FromDiscord | <Rika> you dont have to |
05:16:50 | FromDiscord | <Rika> theres a default value, 8 millis |
05:16:59 | FromDiscord | <huantian> ah ok |
05:17:11 | FromDiscord | <huantian> I've been passing in the miliseconds since the last time update was called 😅 |
05:17:21 | FromDiscord | <huantian> (edit) "miliseconds" => "seconds" |
05:17:30 | FromDiscord | <Rika> the update value is in nanoseconds because i have infinite wisdom |
05:17:33 | FromDiscord | <Rika> so just dont xd |
05:18:08 | FromDiscord | <Rika> before beef murders me this was way before, i think around 2020 i made this |
05:18:36 | FromDiscord | <huantian> is there a way I can override the speed value the bar shows? |
05:19:07 | FromDiscord | <huantian> probably not but I'll still ask |
05:19:13 | FromDiscord | <Rika> no |
05:19:19 | FromDiscord | <Rika> is it wrong? |
05:19:38 | FromDiscord | <huantian> nah it's fine, just onProgressChanged gives a probably more accurate speed value |
05:20:02 | FromDiscord | <Rika> yeah i havent thought about overriding the speed thing because that's not really something you'd consider for a progress bard |
05:20:02 | FromDiscord | <Rika> (edit) "bard" => "bar\" |
05:23:36 | * | rockcavera quit (Ping timeout: 248 seconds) |
05:25:55 | FromDiscord | <huantian> <https://github.com/huantianad/rd-downloader/blob/master/src/rd_downloader.nim>↵my current code if you wanna critique my poorly thought out code↵I swear I'll make some of it less horrendous soon™️ |
05:30:41 | FromDiscord | <Rika> it looks fine |
05:33:27 | FromDiscord | <huantian> I wonder how much I would have to put in to get progressbars kinda similar to pacman |
05:34:25 | FromDiscord | <sOkam!> Is `return 0` needed at the end of the main function, like in C?↵Or is that done automatically? |
05:34:29 | FromDiscord | <huantian> but I think i'd have to make my own progress bar from scratch |
05:34:38 | FromDiscord | <huantian> nah no return 0 is needed |
05:34:50 | FromDiscord | <huantian> in fact a main method isn't needed |
05:34:56 | * | zeus-supreme joined #nim |
05:35:20 | FromDiscord | <sOkam!> well, you need a core function that runs the show. Was meaning that one 🙂 |
05:35:49 | FromDiscord | <sOkam!> Or a core file, if you want to ignore things being inside procs |
05:36:14 | FromDiscord | <huantian> yeah I know what ya mean, I do like having a main function usually too |
05:36:20 | FromDiscord | <huantian> at least for applications |
05:37:12 | FromDiscord | <sOkam!> whats the return value of an app made in nim when it successfully runs? is it 0 automatically? |
05:37:25 | FromDiscord | <huantian> mhm |
05:37:31 | FromDiscord | <sOkam!> or is that even a thing here at all 🤔 |
05:38:06 | FromDiscord | <huantian> I mean I don't think you can have a program not return an exit code 😛 |
05:38:09 | FromDiscord | <Rika> the "return value" is 0 |
05:38:23 | * | zeus-supreme1 quit (Ping timeout: 256 seconds) |
05:38:39 | FromDiscord | <huantian> use `quit` to exit with a non-zero exit code↵<https://nim-lang.org/docs/system.html#quit%2Cint> |
05:38:46 | FromDiscord | <Elegantbeef> If there is no unhandled exception it returns 0 otherwise it returns `Quit.failure` |
05:39:05 | FromDiscord | <sOkam!> handy. tyty |
05:58:05 | * | rockcavera joined #nim |
05:58:05 | * | rockcavera quit (Changing host) |
05:58:05 | * | rockcavera joined #nim |
05:58:49 | FromDiscord | <beans> Is there a library(or builtin way) that generates nim objects from json objects that I can unmarshal into? I'm writing an API wrapper and some of the endpoints return some realllly long json objects 😅 |
05:59:35 | FromDiscord | <huantian> yeah but I cannot remember the name of it |
05:59:44 | FromDiscord | <huantian> wait no is it https://github.com/jiro4989/nimjson |
06:00:14 | FromDiscord | <beans> That's exactly what I was looking for, thanks |
06:00:41 | FromDiscord | <huantian> if your api provides a json schema or something, it might be better to use that |
06:05:24 | FromDiscord | <TryAngle> is there a way to get the user home path on windwos / linux / mac? |
06:05:34 | FromDiscord | <Elegantbeef> `getHomeDir` |
06:06:10 | FromDiscord | <TryAngle> In reply to @Elegantbeef "`getHomeDir`": what is it's result for linux / mac ? |
06:06:30 | FromDiscord | <TryAngle> windows not linux |
06:06:46 | FromDiscord | <huantian> C:\Users\username |
06:06:54 | FromDiscord | <huantian> There’s a funny name for this but I can’t remember |
06:07:10 | FromDiscord | <Valdar> getCurrentDir() |
06:07:25 | FromDiscord | <Valdar> oh, home.. |
06:07:35 | FromDiscord | <TryAngle> In reply to @huantian "C:\Users\username": ok ty |
06:07:50 | FromDiscord | <creikey> why is it like this? why is panic/exception platform dependent? does this just mean you can never use exceptions as valid code? https://media.discordapp.net/attachments/371759389889003532/964769065140899900/unknown.png |
06:07:53 | FromDiscord | <Valdar> (edit) "getCurrentDir()" => "~~getCurrentDir()~~" |
06:08:09 | FromDiscord | <Elegantbeef> It's not platform specific |
06:08:12 | FromDiscord | <Elegantbeef> It's flag specific |
06:08:18 | FromDiscord | <Rika> Defects and CatchableErrors are different kinds of exceptions |
06:08:20 | FromDiscord | <Elegantbeef> And if you use try except on a fucking defect i'll find you |
06:08:38 | FromDiscord | <Rika> i personally disagree about defects existing so try me bitch |
06:08:46 | FromDiscord | <huantian> At some point I’ve caught rangeDefect for input handling hehe |
06:08:48 | FromDiscord | <TryAngle> sent a long message, see http://ix.io/3VgL |
06:09:02 | FromDiscord | <TryAngle> (edit) "http://ix.io/3VgL" => "http://ix.io/3VgM" |
06:09:11 | FromDiscord | <huantian> Well Linux has .config and .local/share |
06:09:22 | FromDiscord | <huantian> I don’t know the conventions for window |
06:09:45 | FromDiscord | <TryAngle> (edit) "http://ix.io/3VgM" => "https://paste.rs/VtC" |
06:10:07 | FromDiscord | <Elegantbeef> If only there was a `getConfigDir` |
06:10:15 | FromDiscord | <huantian> Ikr |
06:12:07 | FromDiscord | <huantian> Also I wish getFilename was specified that it worked on directories |
06:12:33 | FromDiscord | <huantian> Though perhaps it’s obvious |
06:13:54 | FromDiscord | <huantian> Hm what is the windows version of Linux ~/.local/share |
06:14:15 | FromDiscord | <TryAngle> In reply to @Elegantbeef "If only there was": XD |
06:15:12 | FromDiscord | <TryAngle> nim is so nice ppl will lose their job because it's too efficient to use once it gets more popular |
06:17:10 | FromDiscord | <TryAngle> is there a way to autocreate a diretory with writeFile if the directory does not exist? |
06:17:21 | FromDiscord | <TryAngle> writeFile autocreates a file but not the entire dir |
06:17:24 | FromDiscord | <huantian> Exists or crest dir something something |
06:17:47 | FromDiscord | <huantian> Oh you mean create dirs up to the file |
06:18:09 | FromDiscord | <TryAngle> In reply to @huantian "Oh you mean create": yes |
06:18:56 | FromDiscord | <Rika> In reply to @huantian "Hm what is the": appdata roaming? |
06:29:01 | FromDiscord | <Valdar> In reply to @huantian "Hm what is the": There is C:\Users\Public if that is what you mean. public share with no admin requirement |
06:42:32 | * | rockcavera quit (Remote host closed the connection) |
06:49:30 | FromDiscord | <Rika> yes but no, isnt `~/.local/share/` still part of the user's home though |
06:51:10 | FromDiscord | <Rika> sent a code paste, see https://paste.rs/RSK |
06:52:02 | FromDiscord | <Rika> `/usr/share Architecture-independent (shared) data.` |
06:54:40 | FromDiscord | <Rika> so maybe its local or roaming, idk which |
07:13:03 | FromDiscord | <huantian> iirc roaming gets shared across multiple computers that have the same user account |
07:13:11 | FromDiscord | <huantian> While local is local to a specific imputed |
07:13:14 | FromDiscord | <huantian> Computer |
07:13:21 | FromDiscord | <TryAngle> how can I compare via value and not for "ptr"? |
07:13:33 | FromDiscord | <TryAngle> or something is off 🤔 |
07:13:56 | FromDiscord | <Rika> In reply to @huantian "iirc roaming gets shared": so its equivalent to roaming |
07:14:06 | FromDiscord | <Rika> unless is local only computer-local |
07:14:08 | FromDiscord | <Rika> i dont remember it being such |
07:14:42 | FromDiscord | <Rika> yeah its not computer-local |
07:14:50 | FromDiscord | <Rika> so appdata roaming is likely best analogue |
07:15:40 | FromDiscord | <TryAngle> sent a code paste, see https://play.nim-lang.org/#ix=3VgY |
07:15:41 | FromDiscord | <TryAngle> when I assert them |
07:16:42 | FromDiscord | <Elegantbeef> sent a code paste, see https://paste.rs/C34 |
07:16:46 | FromDiscord | <Elegantbeef> Maybe with a few more `()` but meh |
07:17:02 | FromDiscord | <Elegantbeef> And perhaps not overload `==` |
07:17:06 | FromDiscord | <TryAngle> In reply to @Elegantbeef "Maybe with a few": wdym? |
07:17:17 | FromDiscord | <TryAngle> sent a code paste, see https://paste.rs/Uh0 |
07:17:27 | FromDiscord | <Elegantbeef> So then what's the issue? |
07:17:43 | FromDiscord | <TryAngle> In reply to @Elegantbeef "So then what's the": I have no idea lol |
07:17:54 | FromDiscord | <TryAngle> I get assertion defect |
07:18:33 | FromDiscord | <Elegantbeef> What's the type definition? |
07:18:57 | FromDiscord | <TryAngle> sent a code paste, see https://play.nim-lang.org/#ix=3Vh0 |
07:19:36 | FromDiscord | <TryAngle> oh! |
07:20:12 | FromDiscord | <TryAngle> sent a code paste, see https://paste.rs/XHN |
07:22:36 | FromDiscord | <TryAngle> sent a code paste, see https://play.nim-lang.org/#ix=3Vh3 |
07:23:32 | FromDiscord | <Rika> ? are you sure thats where it errors |
07:24:44 | FromDiscord | <TryAngle> sent a code paste, see https://play.nim-lang.org/#ix=3Vh4 |
07:24:50 | FromDiscord | <TryAngle> removing this line it works |
07:25:26 | FromDiscord | <Rika> print them both and see if tehyre the sam? |
07:25:28 | FromDiscord | <Rika> (edit) "sam?" => "same?" |
07:26:16 | FromDiscord | <TryAngle> In reply to @Rika "print them both and": yes |
07:26:27 | FromDiscord | <TryAngle> sent a code paste, see https://play.nim-lang.org/#ix=3Vh5 |
07:26:34 | FromDiscord | <Rika> print repr |
07:27:23 | FromDiscord | <Elegantbeef> This is a hell of a proc https://github.com/nim-lang/Nim/blob/version-1-6/lib/pure/times.nim#L1407-L1411 |
07:28:43 | FromDiscord | <TryAngle> sent a code paste, see https://play.nim-lang.org/#ix=3Vh7 |
07:29:02 | FromDiscord | <Rika> loooooool |
07:29:26 | FromDiscord | <TryAngle> because $ does not contain ns |
07:35:41 | FromDiscord | <TryAngle> ok doing formt and parse with "yyyy-MM-dd'T'HH:mm:sszzz:fffffffff" works now |
07:35:54 | FromDiscord | <TryAngle> thanks 🥺 ↵didn't know about repr()↵cool command |
07:44:50 | * | 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:14:19 | FromDiscord | <untoreh> is my pc slow or was this gif edited to look fast? 🙂 https://raw.githubusercontent.com/inim-repl/INim/master/readme.gif my commands are definitely not that fast |
08:14:41 | * | yoyojambo joined #nim |
08:15:30 | * | yoyojambo quit (Client Quit) |
08:15:47 | * | yoyojambo joined #nim |
08:15:53 | FromDiscord | <Rika> Could be a fast typed |
08:15:58 | FromDiscord | <Rika> Typer |
08:16:02 | FromDiscord | <Rika> Not unimaginable |
08:16:09 | * | yoyojambo quit (Client Quit) |
08:16:52 | FromDiscord | <untoreh> I mean, the eval (compile) time, between you press enter, and get the output |
08:17:41 | FromDiscord | <TryAngle> how can I shorten `newString(40)` to i'ts real length ? |
08:17:57 | FromDiscord | <Elegantbeef> you want `newStringOfCap` |
08:18:15 | FromDiscord | <TryAngle> In reply to @Elegantbeef "you want `newStringOfCap`": no |
08:18:19 | FromDiscord | <TryAngle> I'm using it for imgui |
08:18:22 | FromDiscord | <TryAngle> text |
08:18:32 | FromDiscord | <Elegantbeef> Find the first `\0` that's the new length |
08:18:44 | FromDiscord | <TryAngle> last time u told me I want newString(40) 😂 |
08:18:57 | FromDiscord | <TryAngle> In reply to @Elegantbeef "Find the first `\0`": oh, that make sense thanks |
08:19:03 | FromDiscord | <Rika> In reply to @TryAngle "I'm using it for": Shouldn’t it return the new length? |
08:19:13 | FromDiscord | <Elegantbeef> nah it just returns if it mutated iirc |
08:19:52 | FromDiscord | <TryAngle> I'm having lot of issues storing and reading / writing that value outside of imgui |
08:20:02 | FromDiscord | <TryAngle> espcieally it eats my file endings 😡 |
08:21:36 | FromDiscord | <Rika> Nom |
08:59:25 | FromDiscord | <jmgomez> how do you model a variant type that has fields in common with other variants but not all? |
08:59:52 | FromDiscord | <Elegantbeef> You name them slightly differently presently |
08:59:58 | FromDiscord | <Elegantbeef> There is an RFC to allow duplicate case statements |
09:00:25 | FromDiscord | <jmgomez> ok, thanks |
09:28:55 | * | neceve joined #nim |
09:33:20 | * | jmdaemon quit (Ping timeout: 250 seconds) |
09:36:13 | * | wyrd quit (Remote host closed the connection) |
09:41:24 | * | wyrd joined #nim |
10:03:49 | * | kenran joined #nim |
10:06:28 | FromDiscord | <d4rckh> sent a code paste, see https://paste.rs/D0w |
10:06:41 | FromDiscord | <Yardanico> In reply to @d4rckh "I am using argparse": required type for default: Option[system.string] but expression 'default = some(@[""])' is of type: Option[seq[string]] |
10:06:48 | FromDiscord | <Yardanico> you're passing a sequence of strings but it expects a string |
10:06:55 | FromDiscord | <Yardanico> i guess it maybe doesn't support default for multiple? |
10:06:57 | FromDiscord | <d4rckh> well it errors if i give it a string too |
10:07:04 | FromDiscord | <Yardanico> In reply to @d4rckh "well it errors if": it shouldn't |
10:07:07 | FromDiscord | <Yardanico> try `default = some(""`) |
10:07:11 | FromDiscord | <Yardanico> (edit) "some(""`)" => "some("")`" |
10:07:28 | FromDiscord | <d4rckh> sent a code paste, see https://paste.rs/3ax |
10:07:31 | FromDiscord | <d4rckh> its so weird |
10:08:05 | FromDiscord | <Yardanico> yeah I think it's an argparse bug then |
10:08:36 | FromDiscord | <Yardanico> i don't know that would be a good way of fixing this in argparse itself. I guess one way is to always have the seq[string] argument, and just take the first element without `multiple` |
10:08:43 | FromDiscord | <Yardanico> you can open an issue in argparse |
10:08:51 | FromDiscord | <Yardanico> also can you give me the code? |
10:09:07 | FromDiscord | <d4rckh> one sec, let me make a new branch |
10:09:07 | FromDiscord | <Yardanico> ah nvm i can try myself |
10:09:11 | FromDiscord | <d4rckh> okay then |
10:09:23 | FromDiscord | <d4rckh> let me know if it works for you, if not ill open an issue |
10:09:32 | FromDiscord | <enthus1ast> i'm quite happy with cligen for my command line stuff |
10:10:36 | FromDiscord | <d4rckh> i might consider changing argparse with something else because i need more features like having my arguments categorized, my program has like 21 argumentsw |
10:10:37 | FromDiscord | <d4rckh> (edit) "argumentsw" => "arguments" |
10:10:56 | FromDiscord | <Yardanico> In reply to @enthus1ast "i'm quite happy with": well cligen is nice for simple stuff, but IMO it lacks a bit for more complex CLI apps |
10:11:12 | FromDiscord | <Yardanico> and I don't like the fact that it has too much additional code for a CLI library (although nim has DCE so it's not a big deal) |
10:11:17 | FromDiscord | <Yardanico> and also the fact that it uses some unsafe Nim features |
10:12:17 | FromDiscord | <enthus1ast> yes thats true, cligen does a lot automatically and you cannot do all possible commandline apps with it↵(@Yardanico) |
10:12:35 | FromDiscord | <enthus1ast> but the "bang for the bucks" is quite good, |
10:12:58 | FromDiscord | <enthus1ast> 2-3 lines for a fully fledged command line app is good imho |
10:13:18 | FromDiscord | <Yardanico> ah btw @d4rckh is there any reason you actually need `header` to have one empty string by default? |
10:13:21 | FromDiscord | <Yardanico> you can just check the length |
10:13:33 | FromDiscord | <Yardanico> `if opts.header.len > 0: do stuff with headers` |
10:14:23 | FromDiscord | <d4rckh> well i want it to be empty by default, i tried default=some(@[]) but that also errored, thought i need to add at least an element |
10:14:45 | FromDiscord | <Yardanico> wdym? |
10:14:50 | FromDiscord | <Yardanico> it's empty by default already |
10:14:54 | FromDiscord | <d4rckh> actually not supplying default would work |
10:14:55 | FromDiscord | <Yardanico> Nim sequences are empty by default |
10:14:59 | FromDiscord | <d4rckh> right |
10:15:06 | FromDiscord | <Yardanico> but yeah it's still a bug in argparse |
10:15:13 | FromDiscord | <d4rckh> okay, ill open an issue later today then |
10:18:32 | * | ltriant quit (Ping timeout: 248 seconds) |
10:23:11 | FromDiscord | <d4rckh> @Yardanico https://github.com/iffy/nim-argparse/issues/76 |
10:23:18 | FromDiscord | <d4rckh> (edit) "@Yardanico ... https://github.com/iffy/nim-argparse/issues/76" added "here" |
10:50:29 | * | ltriant joined #nim |
11:05:06 | FromDiscord | <5Q> sent a long message, see https://paste.rs/B2V |
11:05:46 | FromDiscord | <5Q> sent a code paste, see https://paste.rs/dAS |
11:22:42 | FromDiscord | <Yardanico> @5Q in win32 api (and a lot of other C APIs) if the return value is 0, the function _failed_ |
11:22:50 | FromDiscord | <5Q> nevermind, my error-checking is wrong, I should use .FAILED to see if the function failed or not |
11:22:51 | FromDiscord | <Yardanico> and if the return value is non-zero (like in your case), it succeeded |
11:23:00 | FromDiscord | <5Q> yeah, just figured that out↵(@Yardanico) |
11:23:13 | FromDiscord | <Yardanico> wait actually not a lot of other C apis :P |
11:23:17 | FromDiscord | <Yardanico> i just know that win32 api does that |
11:24:05 | FromDiscord | <5Q> but weird that the WINBOOL to bool conversion doesn't work as expected, that it converts 1 to false |
11:24:25 | FromDiscord | <Yardanico> ? |
11:24:32 | FromDiscord | <Yardanico> i think it's correct as it's just simple type conversion |
11:24:37 | FromDiscord | <Yardanico> in all languages 1 means true |
11:24:46 | FromDiscord | <Yardanico> oh |
11:24:54 | FromDiscord | <5Q> there you can see that res = 1, but the (not res) is true |
11:25:11 | FromDiscord | <Yardanico> huh |
11:25:19 | FromDiscord | <Yardanico> sorry, i don't know win32 api and winim that well, maybe they do that |
11:26:45 | FromDiscord | <5Q> by the way, I see in winim they use converters, where can I learn about them? I couldn't find anything about them in the documentaiton |
11:28:06 | FromDiscord | <5Q> nevermind, found them in macros |
11:29:41 | FromDiscord | <5Q> so, is it a procedure that gets called when you, for example, pass a sequence to the if statement, and that converter returns false if it's empty? |
11:35:41 | FromDiscord | <@Legioneroff:matrix.org> What about vacancies for junior at Nim language? |
11:37:36 | FromDiscord | <5Q> sent a code paste, see https://play.nim-lang.org/#ix=3VhZ |
11:42:17 | FromDiscord | <d4rckh> whats a quick way of checking if the at least one string in a sequence contains a substring? |
11:42:57 | FromDiscord | <Yardanico> In reply to @d4rckh "whats a quick way": i don't think there's a "quick way", you'll have to iterate over all elements until you find one that has a substring |
11:43:07 | FromDiscord | <d4rckh> thanks, ill probably use filter |
11:43:28 | FromDiscord | <Yardanico> filter will be a bit slower, better use anyIt |
11:43:36 | FromDiscord | <Yardanico> https://nim-lang.org/docs/sequtils.html#anyIt.t%2Cuntyped%2Cuntyped |
11:43:46 | FromDiscord | <Yardanico> `mystrings.anyIt("substring" in it)` |
11:43:52 | FromDiscord | <Yardanico> import std/[sequtils, strutils] |
11:44:27 | FromDiscord | <d4rckh> oh, thanks |
11:44:42 | FromDiscord | <Yardanico> but you won't know the index though |
11:44:52 | FromDiscord | <d4rckh> i dont need it |
12:00:45 | * | kenran quit (Quit: WeeChat info:version) |
12:05:33 | * | zeus-supreme1 joined #nim |
12:08:49 | * | zeus-supreme quit (Ping timeout: 256 seconds) |
12:20:26 | * | slowButPresent joined #nim |
12:29:47 | FromDiscord | <untoreh> is there a pragma to override destructors? |
12:45:50 | * | xet7 quit (Remote host closed the connection) |
12:47:47 | * | xet7 joined #nim |
13:11:39 | * | wyrd quit (Remote host closed the connection) |
13:12:02 | * | wyrd joined #nim |
13:14:43 | * | arkurious joined #nim |
13:24:15 | FromDiscord | <Rika> No, what’s the issue exactly though ? |
13:28:22 | * | kenran joined #nim |
13:33:51 | FromDiscord | <deech> sent a code paste, see https://paste.rs/ZF8 |
13:36:29 | FromDiscord | <renghen> hi I do not know if this is the right channel, can anyone point me on how to compile nim to web assembly and updated tutorial would be nice |
14:06:15 | FromDiscord | <demotomohiro> https://github.com/treeform/nim_emscripten_tutorial |
14:26:01 | FromDiscord | <@Legioneroff:matrix.org> What about vacancies for junior at Nim language? |
14:28:51 | FromDiscord | <Rika> not many |
14:29:03 | FromDiscord | <Rika> there are barely any jobs at all |
15:00:56 | * | lumo_e joined #nim |
15:02:13 | * | kenran quit (Quit: WeeChat info:version) |
15:22:25 | * | lumo_e quit (Ping timeout: 246 seconds) |
15:23:28 | * | lumo_e joined #nim |
15:25:14 | FromDiscord | <0ffh> sent a long message, see http://ix.io/3ViW |
15:25:34 | FromDiscord | <0ffh> (edit) "sent" => "In reply to @5Q "I've done some digging,": ``result = if x == FALSE: false else: true``↵The reason for code like above is" | "long message, see http://ix.io/3ViW" => "mystery to me. Whats wrong with just going like blow?↵``result = x != FALSE``" |
15:27:35 | FromDiscord | <Yardanico> In reply to @renghen "hi I do not": You can either use emscripten as demotomohiro said, or use WASI SDK |
15:28:21 | FromDiscord | <Yardanico> You can check https://github.com/aduros/wasm4/tree/main/cli/assets/templates/nim for an example of WASI SDK usage |
15:28:36 | FromDiscord | <Yardanico> It's for wasm-4, but it's the same principle |
15:28:59 | FromDiscord | <Yardanico> In reply to @0ffh "``result = if x": Or just result = bool(x) |
15:34:25 | FromDiscord | <0ffh> In reply to @Yardanico "Or just result =": Right, even better!↵Although I'm surprised a bit: Even for a ``distinct int`` without any ``borrow``-ing you can cast to bool just like that. I wouldn't have expected that. |
15:35:46 | FromDiscord | <Yardanico> well this is not a cast, this is a type conversions |
15:35:51 | FromDiscord | <Yardanico> (edit) "conversions" => "conversion" |
15:36:19 | FromDiscord | <Yardanico> Nim has casts with `cast`, but they're unsafe as they just treat memory as another type |
15:36:41 | FromDiscord | <0ffh> Pardon my sloppy language. 😅 |
15:37:01 | FromDiscord | <Yardanico> type conversions are safe and checked (for things like inherited objects) |
15:37:18 | NimEventer | New thread by Tcheran: Seeking advices for a C programming book, see https://forum.nim-lang.org/t/9110 |
15:37:59 | FromDiscord | <0ffh> In reply to @Yardanico "type conversions are safe": Right, thanks, but why does one even exist for a ``distinct int`` is what I marveling at? |
15:38:12 | FromDiscord | <0ffh> (edit) "I" => "I'm" |
15:38:16 | FromDiscord | <Yardanico> Maybe you misunderstood distinct |
15:38:31 | FromDiscord | <Yardanico> You can convert distinct types to their original types or the ones they're compatible with |
15:38:35 | FromDiscord | <Yardanico> With type conversions |
15:41:02 | FromDiscord | <0ffh> sent a long message, see http://ix.io/3ViZ |
15:41:18 | FromDiscord | <0ffh> (edit) "http://ix.io/3ViZ" => "http://ix.io/3Vj0" |
15:41:32 | FromDiscord | <Yardanico> https://nim-lang.org/docs/manual.html#type-relations-convertible-relation has some more info about conversions |
15:42:26 | FromDiscord | <Solitude> In reply to @0ffh "Yeah, I would have": you can convert any ordinal to any other ordinal |
15:43:43 | FromDiscord | <Yardanico> Explicitly yes |
15:44:48 | FromDiscord | <0ffh> That's good to know, thanks y'all! |
15:59:00 | * | lumo_e quit (Ping timeout: 250 seconds) |
15:59:32 | FromDiscord | <!Patitotective> In reply to @TryAngle "u can write a": i dont think im the person that uses vs code 💀 |
15:59:46 | FromDiscord | <!Patitotective> (edit) "In reply to @TryAngle "u can write a": i dont think im the ... person" added "kind of" |
16:06:19 | FromDiscord | <TryAngle> In reply to @Patitotective "i dont think im": what u using 🥺 |
16:06:52 | FromDiscord | <TryAngle> sublime |
16:07:28 | FromDiscord | <TryAngle> In reply to @Patitotective "i dont think im": I even use the propietery from AUR 😈 |
16:07:47 | FromDiscord | <TryAngle> (edit) "In reply to @Patitotective "i dont think im": I even use the propietery from AUR ... 😈" added "instead of the oss version" |
16:08:33 | FromDiscord | <!Patitotective> AUR? did you mean debian or flatpak? |
16:17:13 | * | slowButPresent quit (Quit: leaving) |
16:33:03 | FromDiscord | <TryAngle> In reply to @Patitotective "AUR? did you mean": no |
16:33:08 | FromDiscord | <TryAngle> I only use snapd |
16:34:04 | FromDiscord | <TryAngle> snapd > flatpak > appimage > pacman > aur |
16:34:36 | FromDiscord | <!Patitotective> appimages can't be compared to package managers↵appimages don't require installation |
16:34:42 | FromDiscord | <TryAngle> (edit) "snapd > flatpak > appimage > ... pacman" added "aur >" | removed "> aur" |
16:37:53 | FromDiscord | <TryAngle> In reply to @Patitotective "appimages can't be compared": u can make it one if you are brave enough 😳 |
16:38:37 | FromDiscord | <!Patitotective> wdym? make a appimages package maanger?? |
16:39:54 | FromDiscord | <TryAngle> In reply to @Patitotective "wdym? make a appimages": just write shell script add it to path↵and all appimages in one folder↵so u can do like (if we call that script pacimage↵`$ pacimage <appimagename>` |
16:40:06 | FromDiscord | <TryAngle> (edit) "pacimage↵`$" => "pacimage)↵`$" |
16:40:22 | FromDiscord | <!Patitotective> there's already appimage-launcher |
16:40:37 | FromDiscord | <TryAngle> 😔 |
16:41:16 | * | oddish quit (Quit: nyaa~) |
16:44:13 | FromDiscord | <jmgomez> hey guys, is there a way to retrieve all defined types at compile time? |
16:44:27 | * | oddish joined #nim |
16:47:03 | * | rockcavera joined #nim |
16:47:03 | * | rockcavera quit (Changing host) |
16:47:03 | * | rockcavera joined #nim |
16:48:12 | FromDiscord | <Rika> why? |
16:48:16 | FromDiscord | <Rika> no i dont think so |
16:48:30 | FromDiscord | <Rika> you can check if a type is defined if you know the name though |
16:48:41 | FromDiscord | <Rika> what're you trying to do? |
16:50:26 | FromDiscord | <jmgomez> I would like to check for all user defined types that has certain pramas in it |
16:50:37 | FromDiscord | <jmgomez> (edit) "pramas" => "pragma" |
16:52:19 | FromDiscord | <huantian> Could you have the pragma add the type to a compile time table? |
16:53:52 | FromDiscord | <jmgomez> yes, that would work. Im just new to macros so problably there are options that Im not considering. ↵Is there an example of that somewhere? |
16:56:42 | * | vicfred quit (Quit: Leaving) |
17:00:56 | * | vicfred joined #nim |
17:37:57 | FromDiscord | <Yayko> sent a long message, see https://paste.rs/3a1 |
17:39:11 | * | T-urbo joined #nim |
17:39:43 | * | T-urbo quit (Client Quit) |
17:42:36 | FromDiscord | <spoon> i mean right now i'm learning polymorph to switch to an entity component system, but currently i have an "entity" class that the player and enemies inherit from, as well as a separate class for tiles which things like walls and floors inherit from |
17:43:41 | FromDiscord | <spoon> (edit) "class" => "object" | "class" => "ref object" |
17:48:33 | FromDiscord | <leorize> the gamedev channel is probably better for this question |
17:50:20 | FromDiscord | <leorize> using ref vs value objects depends a lot on your data structures and their requirements which varies wildly from domain to domain |
17:51:36 | FromDiscord | <Yayko> In reply to @spoon "i mean right now": Ok thank you very much, it helps me a little better to understand, you use refs when you have a lot of similar object to create/store right? for example if you make an online game, would your character become a ref object? |
17:51:57 | FromDiscord | <leorize> from the little stuff I heard about gamedev though, is that you should avoid focusing on one object and focus more on the fact you will process a lot of them at once |
17:52:09 | FromDiscord | <leorize> but for starters I think ref objects are very easy to understand and use |
17:54:04 | FromDiscord | <spoon> well, the players will probably all be instances of the same player object, ref objects are used for when two objects share a lot of the same features, but the one inheriting has different features. like, in my case, all entities have a position but only the player has an inventory, so it inherits from entity, and only the item drop has a description, but still has a world position, so it has its own ref object of entity |
17:54:42 | FromDiscord | <spoon> (edit) "different" => "additional" |
17:56:12 | FromDiscord | <spoon> In reply to @leorize "from the little stuff": yeah, that's what entity component systems are for, since it uses a data-oriented approach. but OOP is fine for simplistic stuff that doesn't require a ton of separate instances |
18:01:11 | FromDiscord | <Yayko> In reply to @spoon "well, the players will": Ok, thank you very much, you really helped me!! 🙂↵The Nim community is really cool 😄 |
18:05:10 | FromDiscord | <Yayko> In reply to @spoon "yeah, that's what entity": When I went to see some info on rust I came across this famous "ECS"↵I don't know at all what it is but it seems to be powerful, I see that there are a lot of people talking about it among the Rustacean |
18:08:50 | FromDiscord | <spoon> sent a long message, see http://ix.io/3VjI |
18:10:44 | FromDiscord | <spoon> there are a bunch of nuances im not experienced enough to go into detail about too, though |
18:12:02 | FromDiscord | <leorize> this is a good book to read if you wish to understand the concepts behind such a system\: https://dataorienteddesign.com/dodbook/ |
18:12:26 | FromDiscord | <leorize> for something more gamedev-geared, you can watch pretty much any talks from Mike Acton |
18:18:26 | * | pro joined #nim |
18:26:54 | FromDiscord | <!Patitotective> im totally new to async/web stuff and i want to use https://download-directory.github.io/ to download a directory but ive no idea how to do it 🤷♂️ ↵should i use puppy? |
18:30:42 | FromDiscord | <huantian> you can also use https://nim-lang.org/docs/httpclient.html#downloadFile%2CAsyncHttpClient%2C%2Cstring↵if you'd like |
18:31:09 | FromDiscord | <Zoom> [Yayko#1726](https://matrix.to/#/%40_discord_897838441453191218%3At2bot.io) if your game has any considerable number of entities, I'd look into "data-orienting" your logic before going full ECS or OOP. |
18:32:43 | FromDiscord | <Zoom> Look up that talk by Mike Acton (it's on C++ but language is not really relevant to the topic) |
18:34:14 | FromDiscord | <!Patitotective> In reply to @huantian "you can also use": so, for example, if i wanted to download https://github.com/nimgl/nimgl/tree/master/src i would use this link https://download-directory.github.io?url=https://github.com/nimgl/nimgl/tree/master/src↵but then how do i wait until the download is ready? |
18:34:29 | FromDiscord | <!Patitotective> because it zips the directory |
18:34:48 | * | zeus-supreme joined #nim |
18:35:14 | FromDiscord | <huantian> I have no idea how the website works, but you need a direct link |
18:37:25 | * | zeus-supreme1 quit (Read error: Connection reset by peer) |
18:38:07 | FromDiscord | <spoon> you mean like async await? |
18:38:25 | FromDiscord | <huantian> it might be easier just to download the entire git repo |
18:38:33 | FromDiscord | <huantian> and unzip and move stuff around yourself |
18:39:05 | FromDiscord | <spoon> i wish git had a pull command for a subfolder, i had to download an entire game source just to get something out of the tools folder |
18:39:15 | FromDiscord | <spoon> clone command rather |
18:39:18 | FromDiscord | <huantian> i mean, you can use svn 😛 |
18:39:29 | FromDiscord | <!Patitotective> i wanted to avoid that cause the `.git` folder weighs 118MB 💀 |
18:39:59 | FromDiscord | <huantian> the zip download doesn't come with a .git |
18:40:10 | FromDiscord | <huantian> https://github.com/nimgl/nimgl/archive/refs/heads/master.zip https://media.discordapp.net/attachments/371759389889003532/964958392974180362/unknown.png |
18:40:45 | FromDiscord | <huantian> or use the release zips if you want to make it more reproducible ig |
18:45:29 | FromDiscord | <!Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=3VjS |
18:45:57 | FromDiscord | <TryAngle> sent a code paste, see https://play.nim-lang.org/#ix=3VjT |
18:46:31 | FromDiscord | <Zoom> Do you remember you can always do `git clone --depth 1 --shallow-submodules` to lighten up the .git and traffic? |
18:46:40 | FromDiscord | <huantian> In reply to @Patitotective "im getting 404 😕": `await client.downloadFile("https://github.com/nimgl/nimgl/archive/refs/heads/master.zip", "master.zip")` |
18:46:55 | FromDiscord | <huantian> pass full url to url, second argument is name of file on disk |
18:47:23 | FromDiscord | <!Patitotective> amazing, thanks ❤️ |
18:47:45 | * | lumo_e joined #nim |
18:50:43 | FromDiscord | <TryAngle> sent a code paste, see https://play.nim-lang.org/#ix=3VjU |
18:50:53 | FromDiscord | <TryAngle> (edit) "https://play.nim-lang.org/#ix=3VjU" => "https://play.nim-lang.org/#ix=3VjV" |
18:51:06 | FromDiscord | <huantian> good thing they already have that written for you↵https://nim-lang.org/docs/locks.html#withLock.t%2CSysLock%2Cuntyped |
18:52:19 | FromDiscord | <TryAngle> In reply to @huantian "good thing they already": ..... |
18:52:25 | FromDiscord | <TryAngle> thank you great gods of nim language |
18:52:36 | FromDiscord | <TryAngle> I shall learn to read your wise documentation |
18:54:58 | FromDiscord | <TryAngle> sent a code paste, see https://play.nim-lang.org/#ix=3VjY |
18:55:24 | FromDiscord | <TryAngle> (edit) "https://play.nim-lang.org/#ix=3VjY" => "https://play.nim-lang.org/#ix=3VjZ" |
19:02:55 | * | Gustavo6046 joined #nim |
19:04:54 | * | Gustavo6046 quit (Remote host closed the connection) |
19:05:18 | * | Gustavo6046 joined #nim |
19:23:46 | * | vicfred quit (Quit: Leaving) |
19:28:57 | * | jmdaemon joined #nim |
19:30:16 | FromDiscord | <@Legioneroff> Why the Nim more popular than Crystal language? 🤔 |
19:30:39 | FromDiscord | <huantian> because nim better |
19:30:51 | FromDiscord | <Elegantbeef> It's older, and didnt have oddities with it's cross platform API |
19:32:31 | FromDiscord | <huantian> also you don't need to ask in 3 different rooms lol |
19:33:04 | * | neceve quit (Ping timeout: 250 seconds) |
19:33:13 | FromDiscord | <spoon> i just looked at it and it already reminds me of java |
19:34:00 | FromDiscord | <@Legioneroff> Thanks dude! |
19:34:34 | FromDiscord | <Elegantbeef> Eh crystal is ruby but a system language supposedly |
19:34:49 | FromDiscord | <spoon> does it have the same everything as an object philosophy because i saw an example of creating a parser to parse stuff |
19:35:10 | FromDiscord | <@Legioneroff> Crystal? They talked that in is C with Ruby syntax.↵(@spoon) |
19:35:10 | FromDiscord | <Elegantbeef> Yea it's OOP afaik |
19:36:03 | * | jjido joined #nim |
19:36:19 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=3Vke |
19:36:29 | FromDiscord | <spoon> is it multiparadigm at least because i hate java and forced oop |
19:36:46 | FromDiscord | <Elegantbeef> Ugh i hate you phil so many wasted operations |
19:38:02 | FromDiscord | <Phil> I would start caring if it would actually matter for performance more than the SQL query |
19:38:31 | FromDiscord | <Elegantbeef> Cmon look at that beaut! |
19:38:31 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3Vkg |
19:39:05 | FromDiscord | <spoon> that just looks like code golf |
19:39:13 | FromDiscord | <@Legioneroff> Which is older, Crystal? They seem to be a couple of years apart. |
19:39:18 | FromDiscord | <Elegantbeef> Well it's actually faster |
19:39:20 | FromDiscord | <Elegantbeef> Nim is older |
19:39:30 | FromDiscord | <TryAngle> is there a database implementation in nim 🤔 ↵I think it would be a perfect language for such thing |
19:39:40 | FromDiscord | <TryAngle> tbh is there on thing where nim is not a prefect thing for ?? |
19:40:06 | FromDiscord | <TryAngle> probably university because they want to draw their insane UML diagramms everywhere .. . |
19:40:09 | FromDiscord | <Phil> In reply to @spoon "that just looks like": I think his approach is actually pretty neat, you avoid looping over the same array twice |
19:40:26 | FromDiscord | <leorize> the major thing that kept crystal from popularity is the fact it can't run on windows for a long time |
19:40:41 | FromDiscord | <Elegantbeef> You also avoid allocating 3 sequences for 1 operation |
19:40:46 | FromDiscord | <Phil> In reply to @TryAngle "tbh is there on": I mean, hypothetically or as in, right now? Because the ecosystem isn't quite there |
19:40:54 | FromDiscord | <leorize> actually, I'm still not sure if today's crystal can run on windows |
19:41:03 | FromDiscord | <spoon> In reply to @TryAngle "tbh is there on": yea, databases are something ive needed, but std/tables are hash tables so maybe theres something there? |
19:41:07 | FromDiscord | <Elegantbeef> It can but i think some parts of libraries dont work |
19:41:15 | FromDiscord | <spoon> i know there are mongo bindings (limited ones) |
19:41:30 | FromDiscord | <Elegantbeef> That's what i was talking about leorize, it's windows support was at least poop |
19:41:34 | FromDiscord | <spoon> In reply to @Isofruit "I think his approach": icic |
19:41:41 | FromDiscord | <huantian> I don't really see why you'd want to make a pure nim database, guess it oculd be cool, but seem unnessary |
19:41:58 | FromDiscord | <TryAngle> In reply to @Isofruit "I mean, hypothetically or": hypothetically |
19:42:27 | FromDiscord | <TryAngle> it's literally C with Rust memory management and the syntax of python not a single downside lmao |
19:43:04 | FromDiscord | <Elegantbeef> Uhh "literally C" 😀 |
19:43:31 | FromDiscord | <Phil> In reply to @TryAngle "it's literally C with": Take that back! The way nim doesn't expose you to pointer madness unless you want to is way saner! |
19:43:33 | FromDiscord | <@Legioneroff> And I always thought it was a positive effect. 🤗 |
19:43:39 | FromDiscord | <TryAngle> In reply to @Isofruit "Take that back! The": ok true |
19:44:08 | FromDiscord | <TryAngle> In reply to @Elegantbeef "Uhh "literally C" 😀": like this is the most based thing I've ever seen↵https://github.com/PMunch/futhark↵I love it |
19:45:07 | FromDiscord | <Phil> I generally agree with you, really liking the language. I'd love to work more closely with some people that are more into procedural programming to look at the patterns they use or the way they approach problems since at work OOP with some functional mixed in is pretty much all I'm getting. |
19:45:16 | FromDiscord | <Elegantbeef> Ok but zig does the same 😛 |
19:45:34 | FromDiscord | <Phil> Which bleeds into how I use nim a lot |
19:45:37 | FromDiscord | <TryAngle> In reply to @Elegantbeef "Ok but zig does": but Zig has no Elegentbeef 🥺 |
19:45:39 | FromDiscord | <Elegantbeef> With Nim you write you code like OOP just without methods |
19:45:49 | FromDiscord | <Elegantbeef> Let's be honest not having me is a benefit i'm a fuckwit |
19:46:05 | FromDiscord | <spoon> java ruined oop for me |
19:46:18 | FromDiscord | <Phil> I mean, so far I'm basically writing what I would in java but without having my legs sawed off because "java knows better" |
19:46:20 | FromDiscord | <leorize> if you look at the biggest subcommunity of Nim, the gamedev folks, you will find that the majority runs Windows |
19:46:36 | FromDiscord | <TryAngle> if I don't know something and can't find answer I ask here and get response within 2min from elegandbeef explaining everything gg |
19:46:48 | FromDiscord | <Elegantbeef> How dare you say i'm a minority! |
19:46:51 | FromDiscord | <Phil> Module = Object, you don't do module wide variables I guess though |
19:46:51 | FromDiscord | <TryAngle> would probably still stuck at hello world |
19:47:13 | FromDiscord | <spoon> In reply to @Isofruit "I mean, so far": java but you dont have to create two different "getters" and three "parsers" to make a single rest call |
19:47:15 | FromDiscord | <Elegantbeef> You can do top level variables if you're a weirdo |
19:47:16 | FromDiscord | <Phil> (edit) "though" => "though. So in that sense nim inherently promotes better code" |
19:47:17 | FromDiscord | <spoon> true story |
19:47:36 | FromDiscord | <Phil> In reply to @Elegantbeef "You can do top": I would like to retain my sanity and only do those for exceptional usecases such as connection pooling |
19:48:35 | FromDiscord | <Phil> In reply to @spoon "java but you dont": I mean, Java introduced records (basically just a group of fields, no functions whatsoever) around 3-4 years ago... which maybe even will make its way to work in 5 years |
19:49:13 | FromDiscord | <@Legioneroff> The job market believes that both of them are not needed\: neither Nim nor Crystal. Unfortunately. |
19:50:07 | FromDiscord | <spoon> dont nim godot bindings have a semi successful mobile game from a publisher under them? |
19:50:45 | FromDiscord | <spoon> In reply to @Isofruit "I mean, Java introduced": functions without classes? |
19:51:27 | FromDiscord | <Phil> In reply to @spoon "functions without classes?": Best I can give you are lambdas. Which (utterly insane as it is) are objects in java |
19:52:22 | FromDiscord | <Phil> Like, you can define interfaces that describe the signature a specific lambda must have. As long as that interface only has one function, it'll be allowed as a "functional interface" |
19:52:27 | FromDiscord | <spoon> yeah java seems designed from the ground up to be wasteful with resources |
19:53:29 | FromDiscord | <Phil> I'm not fully convinced it is. I mean, I'm also not under the impression it's a totally sane language, but java code can run pretty fast. Not quite C/C++ levels, but up there |
19:53:53 | FromDiscord | <Phil> It just hogs memory like tomorrow will never come and imo promotes antipatterns within the language |
19:54:06 | FromDiscord | <Phil> And honestly that amount of abstraction layers are sometimes insane |
19:54:28 | FromDiscord | <Phil> (edit) "that" => "the" |
19:54:28 | FromDiscord | <leorize> as is the case with most niche languages, unfortunately. Getting to mainstream is a lot of work |
19:54:52 | FromDiscord | <willyboar> Crystal is more mature in webdev but lack of windows support hurts the gamedev imo |
19:55:13 | FromDiscord | <spoon> just needs a tool the general public can use |
19:55:47 | FromDiscord | <spoon> odin which is a language i only heard about recently has embergen, a big industry particle sim, using it in tons of production |
19:55:54 | FromDiscord | <leorize> Crystal has working openssl bindings and shared library support, unlike a certain language where they re-invent the dynamic linker for whatever reason |
19:56:42 | FromDiscord | <spoon> In reply to @Isofruit "It just hogs memory": yea, i just really dont like the java philosophy and kinda have a bias against interpreted languages |
19:57:14 | FromDiscord | <Phil> In reply to @Elegantbeef "You can do top": Wait a second! I just noticed that you threw in a dependency to your own package into that other example! |
19:57:20 | FromDiscord | <Phil> I was wondering where that colChain proc came from! |
19:57:32 | FromDiscord | <spoon> nim if the nim-lang repos had up to date bindings on everything |
19:57:39 | FromDiscord | <spoon> a lot of small languages do that |
19:58:33 | FromDiscord | <spoon> but then we wouldnt get a lot of different design philosophy choices |
19:59:04 | FromDiscord | <@Legioneroff> The webdev has been taken over by Golang. It will be hard for Crystal. 😇↵(@willyboar) |
19:59:37 | FromDiscord | <spoon> everyone i know personally in webdev is already using node |
19:59:49 | FromDiscord | <Phil> Hmm ElegantBeef? Given that slicerator is already involved, curiosity question. Would it be feasible to have it so the user doesn't have to define `:discard` ? |
20:00:00 | FromDiscord | <Phil> Webdev backend is a free for all currently in my experience |
20:00:51 | FromDiscord | <Phil> Python has multiple horses in the race, java with Spring is industry standard depending on the country, Go... exists as far as I can tell and microsoft has dot net which I also see existing occasionally |
20:01:47 | FromDiscord | <spoon> microsoft makes a lot of exclusivity deals with companies to keep them in the .net ecosystem using everything microsoft |
20:01:55 | FromDiscord | <Phil> I don't yet see Rust making any sort of sense outside of insanely high performance services that need to be that fast and can justify the maintenance cost of that language |
20:01:58 | FromDiscord | <huantian> .net isn't the worst tho |
20:02:23 | FromDiscord | <Phil> (edit) "I don't yet see Rust ... making" added "webdev" |
20:02:26 | FromDiscord | <@Legioneroff> All my friends hosts Cloud Servers hate node and other scripting languages that eat their memory and there is no end to it.↵(@spoon) |
20:02:55 | FromDiscord | <Phil> Oh yeah, node is also used somewhat frequently |
20:03:11 | FromDiscord | <huantian> js is 😔 |
20:03:23 | FromDiscord | <Phil> js isn't a language, it's a compilation target |
20:04:01 | FromDiscord | <Phil> There's a reason everyone and their dog is using typescript |
20:04:28 | FromDiscord | <spoon> ive had to use it to assist with discord bot dev, now imagine adding mass image processing with node, canvas took multiple seconds and pixie with nim took a fraction of a second for the same task |
20:06:01 | FromDiscord | <Phil> Node is an utterly terrible tool for computation heavy tasks. In the end, it's still JS and performs as such, so that'll always severely hamper performance.↵Doing the language swap there sounds like the right choice there. |
20:06:54 | FromDiscord | <Phil> It works fine for simpler usecases from what I can see |
20:07:49 | FromDiscord | <Phil> In reply to @huantian ".net isn't the worst": From what I can see C# can be used in .net and C# sounds like a good language |
20:08:06 | FromDiscord | <Phil> Though I may be wrong in that |
20:14:42 | FromDiscord | <konsumlamm> In reply to @TryAngle "it's literally C with": i feel like people that say that Nim literally has Rust's memory management understand neither Nim's nor Rust's memory management |
20:15:32 | FromDiscord | <konsumlamm> (not trying to insult you, but i've seen a lot of people giving uninformed comparisons to Rust and it annoys me) |
20:15:44 | FromDiscord | <tandy> why is this? |
20:15:50 | FromDiscord | <tandy> sent a code paste, see https://paste.rs/u7x |
20:16:18 | * | pro quit (Quit: pro) |
20:19:14 | FromDiscord | <TryAngle> In reply to @konsumlamm "i feel like people": I mean it's pretty similar (I mean arc) |
20:20:11 | FromDiscord | <TryAngle> I thought arc also uses "lifetimes" with destrucutres 🤔 |
20:21:33 | * | flynn quit (Read error: Connection reset by peer) |
20:22:38 | FromDiscord | <konsumlamm> similar, yes |
20:22:43 | * | flynn joined #nim |
20:22:50 | FromDiscord | <konsumlamm> but still different in a lot of ways |
20:23:07 | FromDiscord | <konsumlamm> there are no explicit lifetimes in Nim, for one |
20:23:38 | * | wyrd quit (Remote host closed the connection) |
20:24:23 | FromDiscord | <konsumlamm> and you don't get a compile error if you have multiple mutable borrows |
20:25:10 | FromDiscord | <Phil> What is the beautiful version of "get last entry of array" ? I mean I could obviously infer it over len-1, but is there a nicer proc? |
20:25:19 | FromDiscord | <Phil> (edit) "array"" => "array/seq"" |
20:25:21 | FromDiscord | <konsumlamm> `arr[^1]` |
20:26:01 | FromDiscord | <konsumlamm> `^i` creates a `BackwardsIndex` value which can be used to index from the back (in the collections that support it, which are most of the standard ones) |
20:27:36 | FromDiscord | <Phil> In reply to @tandy "I have these two": First things first, you have ensured that getUsers gets actually called? |
20:28:56 | FromDiscord | <Phil> After that my first question would be how you define "not available". Since IndexedDB ins't an Optional I'm fairly sure you're passing something at least |
20:28:57 | FromDiscord | <tandy> sent a code paste, see https://play.nim-lang.org/#ix=3Vkv |
20:28:58 | FromDiscord | <tandy> this is the proc its getting called from |
20:29:07 | FromDiscord | <huantian> bare excepts ;pensive |
20:29:20 | FromDiscord | <tandy> sorry i mean in the browser↵(@Phil) |
20:29:24 | FromDiscord | <tandy> like incognito mode |
20:29:36 | FromDiscord | <Phil> In reply to @tandy "this is the proc": Wait, is this karax? |
20:29:42 | FromDiscord | <tandy> lool il get to that soon the try excepts werent even there before↵(@huantian) |
20:29:47 | FromDiscord | <tandy> yesir↵(@Phil) |
20:29:53 | FromDiscord | <tandy> well its js |
20:29:59 | FromDiscord | <Phil> Allow me to instantly raise a white flag |
20:30:20 | FromDiscord | <tandy> bruh |
20:30:22 | FromDiscord | <Phil> I give no guarantees for anything that is nim --> js jumping |
20:31:13 | FromDiscord | <Phil> Have you ensured with an echo or something that your proc actually gets called? I mean, an echo translates into a console.log in the browser I assune= |
20:31:16 | FromDiscord | <Phil> (edit) "assune=" => "assume?" |
20:31:28 | FromDiscord | <tandy> yep |
20:31:48 | FromDiscord | <tandy> it echos "storing users" |
20:33:44 | FromDiscord | <Phil> In reply to @tandy "sorry i mean in": Do you somehow pass "nil" as IndexedDB? |
20:33:52 | * | wyrd joined #nim |
20:34:31 | FromDiscord | <Phil> Or is this trying to access an object that should be available within the browser context but somehow isn't in your special case?↵Is the code assuming that other code has created that "IndexedDB" object? |
20:41:40 | FromDiscord | <Elegantbeef> For loop macros still require a body↵(@Phil) |
20:42:26 | FromDiscord | <Elegantbeef> I mean I could do `colChain[x] a.map(x + 2).filter(x < 6)` or something similar |
20:42:45 | FromDiscord | <leorize> have you examined the actual JS? |
20:43:18 | FromDiscord | <leorize> async for js is much less tested, so I wouldn't be surprised if it generates some code that doesn't do what you ask for at all |
20:47:36 | FromDiscord | <!Patitotective> im downloading a file in a thread and i want to display the download process somehow↵how could i achieve that? without violating memory safety 🤨 |
20:48:05 | FromDiscord | <Elegantbeef> https://nim-lang.org/docs/httpclient.html#progress-reporting |
20:48:20 | FromDiscord | <!Patitotective> in a gui, sorry |
20:48:42 | FromDiscord | <leorize> pass a message back to main thread |
20:48:48 | FromDiscord | <!Patitotective> how |
20:49:23 | FromDiscord | <Elegantbeef> Yep, download thread wait's for the download, and `onProgresschanged` propogates back to the main thread either setting a global variable or using a channel |
20:50:04 | FromDiscord | <huantian> or just use async/await if you can do that |
20:50:28 | FromDiscord | <!Patitotective> doesn't async/await blocks the program? |
20:50:30 | FromDiscord | <Elegantbeef> Yep no need for a thread if it's possible to be async |
20:51:36 | FromDiscord | <leorize> it is a problem if your event loop for GUI is different from the asyncdispatch loop |
20:52:43 | FromDiscord | <!Patitotective> i dont have any asyncdispatch loop 😕 ↵im donwloading a file asynchronously |
20:53:36 | FromDiscord | <Elegantbeef> Given you use imgui and it's a update loop you can just hold onto the future and stay on that page until it fails or is completed |
20:53:44 | FromDiscord | <leorize> `waitFor`/`runForever` is asyncdispatch loop, in case you're wondering |
20:54:23 | FromDiscord | <Elegantbeef> I guess you do need a delay to allow the async proc to kick in |
20:54:44 | FromDiscord | <leorize> a simple way to do this is to use a channel and send your progress update via that, I suppose? |
20:55:01 | FromDiscord | <Elegantbeef> Yep or a global variable, though that involves manual locking |
20:55:20 | FromDiscord | <Elegantbeef> Given i assume this is a simple program the global variable isnt that terrible |
20:56:18 | FromDiscord | <!Patitotective> sooo if i was using waitFor↵now how do run it so it doesnt block the GUI |
20:56:31 | FromDiscord | <!Patitotective> In reply to @Elegantbeef "Given you use imgui": or wdym here 🤨 |
20:58:00 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3VkA |
20:58:07 | FromDiscord | <Elegantbeef> Something like this does work, though isnt the best of course |
20:58:15 | FromDiscord | <Elegantbeef> It's easier to spin up a thread |
20:58:50 | FromDiscord | <Elegantbeef> Also if that if statement is true the download is done |
21:03:07 | * | lumo_e quit (Ping timeout: 240 seconds) |
21:05:40 | FromDiscord | <huantian> a callback might also work? |
21:06:08 | FromDiscord | <Elegantbeef> Dont you need a break to give up your CPU somewhere? |
21:06:31 | FromDiscord | <!Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=3VkI |
21:06:43 | FromDiscord | <Elegantbeef> `waitfor` |
21:07:19 | FromDiscord | <!Patitotective> but it Blocks the current thread 😕 |
21:07:24 | FromDiscord | <Elegantbeef> yes |
21:07:32 | FromDiscord | <Elegantbeef> which is why you block for `5` ms or something small |
21:07:52 | FromDiscord | <Elegantbeef> To give the cpu up to the async procedures |
21:08:08 | FromDiscord | <Elegantbeef> Or use a thread and just propoagate data back |
21:08:39 | FromDiscord | <Elegantbeef> You have to give up the cpu somehow with async, so something needs to block for a small amount of time, otherwise you need threads |
21:09:01 | FromDiscord | <leorize> an I/O thread is the best way for this tbh |
21:09:08 | FromDiscord | <Elegantbeef> Yep |
21:09:43 | FromDiscord | <leorize> I believe there are better channel implementations outside of the stdlib that might be easier to use |
21:10:06 | FromDiscord | <!Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=3VkJ |
21:10:14 | FromDiscord | <!Patitotective> let me try the thread thing |
21:10:23 | FromDiscord | <Elegantbeef> How the hell did you get a nil |
21:10:34 | FromDiscord | <Elegantbeef> You dont assign the future |
21:10:50 | FromDiscord | <Elegantbeef> To be fair the stdlib channel is quite easy to use |
21:11:43 | FromDiscord | <!Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=3VkK |
21:11:53 | FromDiscord | <Elegantbeef> you dont check if `app != nil` |
21:11:57 | FromDiscord | <Elegantbeef> rather `future` |
21:12:25 | FromDiscord | <Elegantbeef> also nice donwload |
21:12:32 | FromDiscord | <Elegantbeef> I donwload all the stuffs from yuotbue |
21:12:41 | FromDiscord | <!Patitotective> ;-; |
21:13:16 | FromDiscord | <!Patitotective> In reply to @Elegantbeef "you dont check if": where am i doing that? 😕 |
21:14:44 | FromDiscord | <Elegantbeef> you need to do that for the if statement |
21:14:49 | FromDiscord | <Elegantbeef> `if app.downloadFuture != nil and waitFor app.downloadFuture.withTimeout(5)` |
21:15:19 | FromDiscord | <Elegantbeef> Due to imgui being loop like this that waitfor is called even when the future is nil |
21:15:53 | FromDiscord | <!Patitotective> ooooooooooooooooooooooooooooooooooooooooooooooooh it works |
21:15:57 | FromDiscord | <!Patitotective> amazing |
21:16:05 | FromDiscord | <!Patitotective> thanks ❤️ |
21:16:12 | FromDiscord | <Elegantbeef> Well it's going to now have a 5ms delay between draw frames |
21:16:15 | FromDiscord | <Elegantbeef> but it "works" |
21:16:25 | FromDiscord | <Elegantbeef> It's pretty much the best you can do without using threads |
21:17:03 | FromDiscord | <Elegantbeef> I'm sure leorize isinternally screaming "You can do better using CPS", but that's just his hobby i think |
21:17:11 | FromDiscord | <!Patitotective> but i can say that when its not downloading anything dont do the timeout, right? |
21:17:23 | FromDiscord | <leorize> You can do better using CPS |
21:17:43 | FromDiscord | <Elegantbeef> Well yea the timeout only happens when it's downloading |
21:17:50 | FromDiscord | <Elegantbeef> Set it to nil in the if statement |
21:17:59 | FromDiscord | <Elegantbeef> if that if statement is true it finished downloading |
21:18:34 | FromDiscord | <Elegantbeef> Hey leo i said internally screaming not externally! |
21:18:36 | * | neceve joined #nim |
21:18:48 | FromDiscord | <leorize> btw you can just `poll()` until your future finishes |
21:19:03 | FromDiscord | <Elegantbeef> Leorize this is an imgui program so not really |
21:19:14 | FromDiscord | <Elegantbeef> They want to visualize download progress |
21:19:20 | FromDiscord | <Elegantbeef> Which means they need their main loop unblocked |
21:19:23 | FromDiscord | <leorize> I mean, integrate poll into your event loop |
21:19:32 | FromDiscord | <leorize> spare it 2ms |
21:19:43 | FromDiscord | <Elegantbeef> Oh right it has a timeout |
21:20:19 | FromDiscord | <Elegantbeef> This past week or two is the most i've used async which is like once so I only pretend to know how to write it |
21:20:32 | FromDiscord | <System64 ~ Flandre Scarlet> Why it doesn't work? https://media.discordapp.net/attachments/371759389889003532/964998753033543711/unknown.png |
21:20:36 | FromDiscord | <Elegantbeef> My pr to Nimibook is fucking silly |
21:20:47 | FromDiscord | <!Patitotective> In reply to @Elegantbeef "This past week or": and i'll pretend to you know 👀 |
21:20:53 | FromDiscord | <Elegantbeef> memory isa type |
21:21:02 | FromDiscord | <leorize> if frametime is scare then just spawn an IO thread tbf |
21:21:06 | FromDiscord | <Elegantbeef> `var memory: array[1024, byte]` |
21:21:20 | * | lumo_e joined #nim |
21:21:24 | FromDiscord | <Elegantbeef> Yes i highly agree with "just use a fucking thread" |
21:21:39 | FromDiscord | <!Patitotective> but |
21:21:41 | FromDiscord | <!Patitotective> :[ |
21:21:44 | FromDiscord | <leorize> btw it's 0-initialized by default so you don't even have to run the loop |
21:21:57 | FromDiscord | <Elegantbeef> https://github.com/pietroppeter/nimibook/pull/53/files#diff-296b9b043ee4ab30b508d575fde250f3ef5306782e0da8e1ef7bf84011d10f5eR58-R71 yea leo i'm something an async expert myself |
21:23:31 | FromDiscord | <leorize> I'm pretty sure `withTimeout` is meant for cancellations, but cancellation doesn't exist in asyncdispatch \:P |
21:23:57 | FromDiscord | <Elegantbeef> Yea i dont know, all i know is i wanted to give the other operations some CPU time and this seemed the best |
21:24:08 | FromDiscord | <Elegantbeef> Since it also tells me when it finishes |
21:24:29 | FromDiscord | <!Patitotective> In reply to @leorize "I'm pretty sure `withTimeout`": just wait until my program crashes and ill ask you for the thread thing :p |
21:24:42 | FromDiscord | <Elegantbeef> Eitherway it does vastly speed up build times for nimibook since it multithreads the compilation/runs of the programs |
21:25:00 | FromDiscord | <Elegantbeef> Why the fuck do you need to ask anyone for the thread thing |
21:25:16 | FromDiscord | <Elegantbeef> `createThread` and a channel is all you need |
21:25:36 | FromDiscord | <Elegantbeef> https://nim-lang.org/docs/threads.html#examples https://nim-lang.org/docs/channels_builtin.html#example |
21:26:24 | FromDiscord | <!Patitotective> i dont have to ask anyone anymore 🙃 |
21:26:24 | FromDiscord | <Elegantbeef> Is a cancellation in an async context stopping operation from outside? |
21:26:42 | FromDiscord | <Elegantbeef> wouldnt have even had to said anything if you went to the manual 😛 |
21:26:54 | FromDiscord | <!Patitotective> i didnt know what were channels, hehe |
21:27:36 | FromDiscord | <leorize> your `all` doesn't make any sense beef |
21:27:49 | FromDiscord | <Elegantbeef> Uhh |
21:28:46 | FromDiscord | <Elegantbeef> Is there a failed callback,if so that's better |
21:29:10 | FromDiscord | <leorize> also I hate to say it, but `execProcesses` should net you the same thing |
21:29:24 | FromDiscord | <leorize> maybe not the singular `build` being async, though |
21:29:55 | FromDiscord | <Elegantbeef> Eh i just did this quickly due to seeing that it was easy to slightly modify and get it to run faster |
21:30:26 | FromDiscord | <Elegantbeef> I guess it's relatively easy to just make a group of `.nim` files |
21:30:46 | FromDiscord | <leorize> you can `addCallback` to the future to execute the reporting code on completion while you wait on `all` |
21:31:00 | FromDiscord | <leorize> the callback can be a closure, so it's pretty flexible |
21:31:46 | FromDiscord | <leorize> oh, you want chronological returns |
21:32:02 | FromDiscord | <Elegantbeef> Well with callbacks and closure chronological doesnt matter |
21:32:29 | FromDiscord | <Elegantbeef> the issue with `all` is that it wasnt chronological it was FIFO |
21:32:41 | FromDiscord | <leorize> yea, as it should be |
21:32:44 | FromDiscord | <Elegantbeef> So if one failed the error was wrong, but like i said with a callback you can just add the error to a seq then print |
21:33:08 | FromDiscord | <Elegantbeef> Yea i dont disagree just didnt even know there were callbacks when i wrote this |
21:33:16 | FromDiscord | <Elegantbeef> I've never used async in any code up to this point |
21:33:54 | FromDiscord | <Elegantbeef> So yea a closure that adds the build error to a seq on completion seems much better |
21:34:07 | FromDiscord | <Elegantbeef> then i can just call `all` |
21:34:20 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
21:43:24 | * | jjido joined #nim |
21:43:49 | * | Zectbumo joined #nim |
21:47:12 | FromDiscord | <Elegantbeef> Yep leorize callback is nicer |
21:47:20 | FromDiscord | <Elegantbeef> Though due to a change in devel need to use index iteration |
22:00:17 | FromDiscord | <willyboar> In reply to @@Legioneroff "The webdev has been": I said compared to Nim. Generally webdev still belongs to js-php and rails |
22:08:56 | * | wyrd quit (Ping timeout: 240 seconds) |
22:09:08 | * | wyrd joined #nim |
22:31:15 | * | ehmry quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
22:32:14 | * | ehmry joined #nim |
22:37:12 | * | lumo_e quit (Ping timeout: 248 seconds) |
22:41:04 | * | rockcavera quit (Remote host closed the connection) |
22:43:11 | FromDiscord | <dom96> In reply to @leorize "You can do better": the CPS circlejerk never stops eh 😛 |
22:45:52 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
22:47:28 | FromDiscord | <dom96> In reply to @Elegantbeef "It's pretty much the": iirc you can also pass 0ms and have the event loop only process events that are ready, it's a trade off between IO and UI responsiveness though. Ideally your UI event loop will expose an async API that you can hook into. |
22:49:04 | FromDiscord | <!Patitotective> In reply to @Elegantbeef "Given i assume this": is there another way? i dont like global variables hehe |
22:49:43 | * | neceve quit (Ping timeout: 246 seconds) |
22:50:06 | FromDiscord | <Elegantbeef> Yes |
22:50:26 | FromDiscord | <Elegantbeef> We already told you about channels |
22:50:48 | FromDiscord | <Elegantbeef> At this point i should just scream into a void |
22:51:59 | FromDiscord | <!Patitotective> i mean, to not have the channel as a global variable |
22:52:10 | FromDiscord | <Elegantbeef> Yes |
22:52:22 | FromDiscord | <Elegantbeef> You can pass any variable that is safely scoped to another thread |
22:52:22 | FromDiscord | <dom96> You'll have the same problem with channels. You can either block read on them or check them continuously, which is almost like polling the async event loop |
22:52:33 | FromDiscord | <Elegantbeef> imagine if there was a `tryRecv` |
22:52:42 | FromDiscord | <Elegantbeef> This is an imgui looped program that problem doesnt exist with channels |
22:53:52 | FromDiscord | <Elegantbeef> Really you could pass a float and lock to the callback write the float then lock on reading it |
22:54:34 | FromDiscord | <Elegantbeef> There are a bazillion ways of doing this, aslong as the float is declared somewhere that the second thread outlves you're fine |
22:54:43 | FromDiscord | <TryAngle> is there something like an async websocket iterator that continuesly returnes a value? |
22:55:17 | FromDiscord | <Elegantbeef> continously returns a value? |
22:55:23 | FromDiscord | <dom96> In reply to @TryAngle "is there something like": what's your high-level goal? |
22:56:03 | FromDiscord | <dom96> In reply to @Elegantbeef "This is an imgui": not sure what you mean, how would you read from the channel inside the UI thread? |
22:56:12 | FromDiscord | <TryAngle> In reply to @dom96 "what's your high-level goal?": listen to a websocket on a different thread, parse those values and put them in a channel |
22:56:19 | FromDiscord | <Elegantbeef> `tryRecv` |
22:56:25 | FromDiscord | <TryAngle> wait I'm stupid I can literally just do a while loop |
22:56:29 | FromDiscord | <TryAngle> ..... |
22:57:14 | FromDiscord | <dom96> not stupid, but yes you can 🙂 |
22:57:25 | FromDiscord | <Elegantbeef> `while (let (hasData, newProg) = channel.tryRecv; hasData): progress = newProg` |
22:57:55 | FromDiscord | <dom96> In reply to @Elegantbeef "`while (let (hasData,": right, but that's the same as just running poll(0) on the async event loop |
22:58:00 | FromDiscord | <TryAngle> In reply to @Elegantbeef "`while (let (hasData,": 😳 ↵while let in nim ??? |
22:58:33 | FromDiscord | <TryAngle> In reply to @dom96 "not stupid, but yes": 🥺 |
22:58:42 | FromDiscord | <dom96> I mean, you'll have a separate thread so I guess that helps alleviate some of the load on the UI thread but it'll still be a lot of wasted work on the UI thread continuously checking the state of the channel |
22:58:58 | FromDiscord | <Elegantbeef> I mean it's imgui so it's already redoing worrk 😛 |
22:59:23 | FromDiscord | <dom96> lol |
22:59:35 | FromDiscord | <TryAngle> In reply to @dom96 "I mean, you'll have": I mean isn't that the way anyways? UI (main) thread gets event from "data" thread and does something |
22:59:54 | FromDiscord | <Elegantbeef> Most proper UI solutions are event based so it's a bit less silly |
23:00:22 | FromDiscord | <TryAngle> should I not use imgui 🥲 ? |
23:00:52 | FromDiscord | <dom96> In reply to @TryAngle "I mean isn't that": I suppose it might work just fine. |
23:00:56 | FromDiscord | <dom96> Let me know how it goes 🙂 |
23:00:59 | FromDiscord | <Elegantbeef> It's up to you |
23:01:05 | FromDiscord | <TryAngle> In reply to @dom96 "Let me know how": lol |
23:01:11 | FromDiscord | <Elegantbeef> dearimgui is infact not a GUI toolkit |
23:01:12 | FromDiscord | <TryAngle> is there better architecture? |
23:01:27 | FromDiscord | <TryAngle> @dom96 |
23:01:42 | FromDiscord | <dom96> I always try to do everything single threaded with an async event loop |
23:01:58 | FromDiscord | <Elegantbeef> Personally async doesnt exist |
23:02:17 | FromDiscord | <!Patitotective> ~~just realized that with threads i dont need to use download async lmfao~~ |
23:02:38 | FromDiscord | <TryAngle> In reply to @dom96 "I always try to": hmmmm |
23:02:54 | FromDiscord | <Elegantbeef> Dont you still need it for progress reporting |
23:02:54 | FromDiscord | <TryAngle> do u have example repo maybe? |
23:03:23 | * | Gustavo6046 quit (Read error: Connection reset by peer) |
23:03:24 | FromDiscord | <!Patitotective> In reply to @Elegantbeef "Dont you still need": ... |
23:03:28 | FromDiscord | <Elegantbeef> Man i love the docs for when objects |
23:03:32 | FromDiscord | <Elegantbeef> image.png https://media.discordapp.net/attachments/371759389889003532/965024670753648640/image.png |
23:05:05 | FromDiscord | <dom96> In reply to @TryAngle "do u have example": It's quite simple, kinda what was discussed above: in your UI/Game/Event loop just call asyncdispatch.poll(5) after you draw your UI/Game/Whatever. |
23:05:58 | FromDiscord | <TryAngle> In reply to @dom96 "It's quite simple, kinda": hmm but how is this better than threaded and I call channel.recv() in UI loop ? |
23:06:06 | FromDiscord | <TryAngle> isn't it like almost the same'ish |
23:06:18 | FromDiscord | <dom96> sent a code paste, see https://play.nim-lang.org/#ix=3VkY |
23:06:29 | FromDiscord | <dom96> (edit) "https://play.nim-lang.org/#ix=3Vl0" => "https://play.nim-lang.org/#ix=3VkZ" |
23:07:34 | FromDiscord | <dom96> In reply to @TryAngle "hmm but how is": threads make everything at least an order of magnitude more complex |
23:07:42 | FromDiscord | <Elegantbeef> Probably should use `monotimes` or `cpuTime` instead of `epocTime` but mostly pedantry |
23:07:47 | FromDiscord | <dom96> it's much easier to debug code that you know runs in a single thread |
23:08:17 | FromDiscord | <dom96> In reply to @Elegantbeef "Probably should use `monotimes`": possibly 😄 |
23:08:32 | FromDiscord | <Elegantbeef> In the case IO is your limiting factor you should use async/cps, if cpu is the bottleneck you use threading |
23:08:42 | FromDiscord | <Elegantbeef> There isnt much reason to use async in these cases |
23:08:44 | FromDiscord | <Elegantbeef> i mean threads |
23:09:11 | FromDiscord | <Elegantbeef> Since the bottleneck here in patito's case is just an IO operation, a poll at the end of the draw gives the cpu over to progress the download and emit any callbacks |
23:09:43 | FromDiscord | <Elegantbeef> Downloading files is a relatively cheap CPU operation of getting data from a socket and move it over to where it's supposed to go |
23:09:53 | FromDiscord | <dom96> yep |
23:09:59 | * | Gustavo6046 joined #nim |
23:10:29 | FromDiscord | <Elegantbeef> Async is of course single threaded and you have to use `waitFor` `poll` `withTimeout` and the like to give up your CPU when you're ok with it |
23:10:58 | * | Gustavo6046 quit (Remote host closed the connection) |
23:11:15 | FromDiscord | <dom96> I'd definitely recommend not using waitFor/withTimeout and instead explicitly `poll` inside your UI loop |
23:11:22 | * | Gustavo6046 joined #nim |
23:11:30 | FromDiscord | <Elegantbeef> Well waitfor doesnt make sense in this case 😛 |
23:11:53 | FromDiscord | <Elegantbeef> "I want it non blocking", "yea so we're going to use waitfor here to fucking destroy your program's draw loop" |
23:11:59 | FromDiscord | <dom96> you could do waitFor sleepAsync(5) 😄 |
23:12:32 | FromDiscord | <Elegantbeef> anywho point being you need to give up your cpu, whereas with threading you dont |
23:12:41 | FromDiscord | <dom96> that's just a really inefficient way to do `poll(5)` |
23:12:46 | FromDiscord | <!Patitotective> `donwloadChannel.recv()` is blocking the main thread D: |
23:12:51 | FromDiscord | <Elegantbeef> yes |
23:12:54 | FromDiscord | <Elegantbeef> `recv` blocks |
23:12:55 | FromDiscord | <Elegantbeef> RTFM |
23:12:57 | FromDiscord | <!Patitotective> DDD: |
23:12:58 | FromDiscord | <Elegantbeef> `tryRecv` doesnt |
23:13:16 | FromDiscord | <Elegantbeef> `while (let (hasData, newProg) = channel.tryRecv; hasData): progress = newProg` |
23:13:26 | FromDiscord | <Elegantbeef> That's how you do it non blocking and get the most recent update |
23:16:09 | FromDiscord | <Elegantbeef> ASync poll is likely faster than this as it unlocks and locks as many times as it has data |
23:16:27 | FromDiscord | <Elegantbeef> Though perhaps that's offset by the fact the second thread is copying the data over |
23:16:50 | FromDiscord | <Elegantbeef> Only way to know is to benchmark the difference between `poll(0)` and the above while loop |
23:20:53 | FromDiscord | <!Patitotective> it works :OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO |
23:20:54 | FromDiscord | <!Patitotective> amazing |
23:21:30 | FromDiscord | <Elegantbeef> Like mentioned there is a chance this has higher latency than that of `poll` so if low latency is desired test both |
23:22:18 | FromDiscord | <!Patitotective> also beef↵how can i know when a thread finished? i dont understand this https://nim-lang.org/docs/threads.html#onThreadDestruction%2Cproc%29 where do i call it? it doesnt have a thread param |
23:22:48 | FromDiscord | <Elegantbeef> perhaps `running` |
23:23:10 | FromDiscord | <!Patitotective> but it will also return false when it haven't even started 😕 |
23:23:37 | FromDiscord | <Elegantbeef> annnnd? |
23:24:30 | FromDiscord | <!Patitotective> that i want to know when the thread finished, not when is not running ;-; |
23:24:59 | FromDiscord | <Elegantbeef> Make it a `Option[Thread[T]]` then |
23:25:23 | FromDiscord | <Elegantbeef> if it's `none` it's not started if it's `some` and `not running` it finished, if it's `some` and `running` it's running |
23:26:12 | FromDiscord | <TryAngle> hmmm I forgot I have a bit different situation what I initially wrote |
23:26:15 | FromDiscord | <!Patitotective> ~~what about if its not running and `downloadProgress` is not 0, 0, 0 💀 ~~ |
23:26:20 | FromDiscord | <TryAngle> I have multiple sockets of the same kind |
23:26:25 | FromDiscord | <TryAngle> I need to listen to |
23:26:42 | FromDiscord | <TryAngle> should I do one "async thread" for them? |
23:26:58 | FromDiscord | <Elegantbeef> Is it an IO issue or a CPU issue?\> |
23:27:45 | FromDiscord | <TryAngle> hmm I have the best ryzen so for me it's not an issue but I think older pcs might run into issues↵the expected sockets are 1-3 most of times |
23:27:57 | FromDiscord | <TryAngle> (edit) "issues↵the" => "issues wiht multiple threads↵the" |
23:28:12 | FromDiscord | <Elegantbeef> That doesnt change what was said |
23:28:21 | FromDiscord | <Elegantbeef> It's an IO issue so async is the solution generally |
23:29:09 | FromDiscord | <TryAngle> hmmm not sure 💀 |
23:29:24 | FromDiscord | <Elegantbeef> What do you mean |
23:29:49 | FromDiscord | <Elegantbeef> You're waiting for sockets, those are IO. There is no amount of computational power that speeds up your network speed |
23:30:46 | FromDiscord | <TryAngle> so basically I want to write a "client manager for league of legends clients" that allows to manage multiple clients at once (ofc. only things that are not against Riots TOS)↵each client has a websocket to listen for events and an api, I will need to use both per launcher |
23:31:12 | FromDiscord | <TryAngle> I need to change the amounts of sockets in runtime |
23:31:19 | FromDiscord | <TryAngle> so that's IO ? |
23:31:35 | FromDiscord | <Elegantbeef> IO is input output |
23:32:38 | FromDiscord | <TryAngle> ok so the solution is to run 1 additonal thread besides main/ui and I read all clients from that and use async in that thread? |
23:32:49 | FromDiscord | <Elegantbeef> You can just use async in your main thread |
23:33:09 | FromDiscord | <Elegantbeef> Have you been reading any of the chat we've had about threads vs. async |
23:33:49 | FromDiscord | <TryAngle> In reply to @Elegantbeef "Have you been reading": only skimmed |
23:33:51 | FromDiscord | <TryAngle> I will reread |
23:33:59 | FromDiscord | <Elegantbeef> Ok good |
23:34:13 | FromDiscord | <Elegantbeef> There's alot of inforrmation there that should answer your quandary |
23:34:37 | FromDiscord | <!Patitotective> what unit does https://nim-lang.org/docs/httpclient.html#progress-reporting use for total and progress? |
23:35:05 | FromDiscord | <Elegantbeef> bytes |
23:35:11 | * | vicfred joined #nim |
23:35:19 | FromDiscord | <!Patitotective> for speed too? |
23:35:19 | FromDiscord | <Elegantbeef> you can tell cause it does `speed div 1000` to get `kb` |
23:35:30 | FromDiscord | <!Patitotective> oh, right, thanks 🙃 |
23:36:32 | FromDiscord | <TryAngle> ok I reread now↵so from what I understand because my app is just ui + data reading it's only really IO bound so I should use async only.↵threading is unnacessary but works also, it just adds addition complexity? |
23:36:52 | FromDiscord | <Elegantbeef> Yes it's more complex and also makes your program needlessly use more resources |
23:37:55 | FromDiscord | <TryAngle> hmm ok 🤔 |
23:46:46 | * | vicfred quit (Ping timeout: 246 seconds) |
23:49:44 | * | vicfred joined #nim |
23:56:01 | FromDiscord | <!Patitotective> can i stop a thread? 🤔 |
23:56:36 | FromDiscord | <Elegantbeef> Nope |
23:57:03 | FromDiscord | <!Patitotective> and can i stop an async operation? (like downloading a file) |
23:58:48 | FromDiscord | <dom96> You should be able to by just calling `close` on the http client instance |
23:59:04 | FromDiscord | <dom96> Not sure if anyone has tested this though lol |