00:00:02 | FromDiscord | <Bubblie> Honestly ive been struggling with a decision, whether I should make my game engine in C++ vulkan or use the existing vulkan bindings that exist in nim for this, one of my ideas was having C++ handle all the backend and nim using the backend so I could just manipulate the stuff I wrote in C++ with nim instead of having to make the entire thing painstakingly C++ |
00:01:11 | FromDiscord | <spoon> nimgl vulkan bindings should be good |
00:01:14 | FromDiscord | <Bubblie> The reason why I may want to use C++ as there are many libraries that I want to use that aren't directly supported by nim, and I would rather not make bindings for each or use C2Nim for them because it may actually require me writing more logic for it |
00:01:17 | FromDiscord | <Bubblie> In reply to @spoon "nimgl vulkan bindings should": tried em |
00:01:20 | FromDiscord | <Bubblie> it just |
00:01:20 | FromDiscord | <Bubblie> dies |
00:01:21 | FromDiscord | <Bubblie> LMAO |
00:01:26 | FromDiscord | <spoon> oh |
00:01:27 | FromDiscord | <Bubblie> the other one I found works t hough |
00:01:29 | FromDiscord | <Bubblie> a bit |
00:01:33 | FromDiscord | <Bubblie> (edit) "t hough" => "though" |
00:01:56 | FromDiscord | <Bubblie> also nim vulkan isn't on the latest vulkan yet |
00:02:38 | FromDiscord | <Bubblie> I still want to use nim in some way, but I was thinking it could act more as what manipulates the game engine, rather than what makes it up |
00:02:55 | FromDiscord | <Bubblie> because at that point I can just link everything to C++ methods I have created |
00:03:11 | FromDiscord | <Bubblie> and have it execute those and such |
00:03:22 | FromDiscord | <Bubblie> almost like bindings, but not total bindings to the libraries im using in C++ |
00:03:30 | FromDiscord | <Bubblie> scripting language if you will to some degree |
00:04:01 | FromDiscord | <spoon> i mean i guess you could bind a few of your own ui procedures |
00:04:29 | FromDiscord | <Bubblie> I do wish nim had official vulkan bindings like they do for opengl tbh |
00:04:40 | FromDiscord | <spoon> there is nim-lang/vulkan |
00:04:52 | FromDiscord | <spoon> no wait |
00:04:58 | FromDiscord | <spoon> im illiterate |
00:05:00 | FromDiscord | <Bubblie> Lmao |
00:05:03 | FromDiscord | <Bubblie> Its alright |
00:05:14 | FromDiscord | <Bubblie> nim-lang/opengl exists so does sdl2 bindings |
00:06:57 | FromDiscord | <spoon> hmm i did have a problem with nimgl's imgui bindings only working when compiling to c++ |
00:07:10 | FromDiscord | <Bubblie> Yeah |
00:07:17 | FromDiscord | <Bubblie> Ive only had problems with nimgl sadly |
00:07:19 | FromDiscord | <Elegantbeef> You need cimgui to have them work with C |
00:07:39 | FromDiscord | <spoon> In reply to @Elegantbeef "You need cimgui to": yeah ik, i was just wondering if that might be the problem with vulkan |
00:07:48 | FromDiscord | <Bubblie> I was thinking maybe i could wriye c++ rendering and have nim do the logic |
00:07:53 | FromDiscord | <Bubblie> (edit) "wriye" => "write" |
00:08:05 | FromDiscord | <Bubblie> Oh god I have to use cmake |
00:08:08 | FromDiscord | <Bubblie> NOOOOOO |
00:08:45 | FromDiscord | <Bubblie> God cmake is horrid |
00:09:10 | FromDiscord | <Bubblie> Maybe I can use meson with tensorflow or pytorch c++ bindings |
00:09:19 | FromDiscord | <spoon> im curious how well futhark will wrap vulkan |
00:09:46 | FromDiscord | <Bubblie> Probably decently |
00:09:54 | FromDiscord | <Elegantbeef> Uhh if you have the vulkan dev packages you dont need anything else↵(@spoon) |
00:09:56 | FromDiscord | <Bubblie> I was using it to wrap glfw |
00:10:10 | FromDiscord | <Bubblie> I havent finished it fully |
00:10:12 | FromDiscord | <Bubblie> But it sorta works |
00:10:20 | FromDiscord | <Bubblie> Then it crashes after like |
00:10:22 | FromDiscord | <Bubblie> A second |
00:10:26 | FromDiscord | <Bubblie> But thats my fault LMAO |
00:10:30 | FromDiscord | <Elegantbeef> Yea i've used it for wasmedge and it's working lovely |
00:10:41 | FromDiscord | <Bubblie> Futhark is genuinely brilliant |
00:11:03 | FromDiscord | <Bubblie> And its why im debating to go full nim or not |
00:11:32 | FromDiscord | <Bubblie> Because If I can get this working with glfw that would be quite awesome, and then its just vulkan |
00:11:49 | FromDiscord | <Bubblie> I might actually wrap both instead of using those vulkan bindings I found |
00:11:57 | FromDiscord | <Bubblie> Or atleast attempt to wrap both |
00:12:13 | FromDiscord | <Bubblie> Because I would like to use vulkan’s latest due to the extension updates qnd such |
00:12:29 | FromDiscord | <Bubblie> Its not much of a difference but |
00:12:33 | FromDiscord | <Bubblie> It would be quite nice |
00:12:53 | FromDiscord | <spoon> i might be using nim to interact with an existing mongo database soon, are the bindings to a point where i dont have to worry about anything? |
00:12:56 | FromDiscord | <Bubblie> Idk im in a perpetual state of confusion |
00:13:11 | FromDiscord | <Bubblie> In reply to @spoon "i might be using": For what? |
00:13:36 | FromDiscord | <Bubblie> Mongo db with vulkan? |
00:13:41 | FromDiscord | <Bubblie> Ive never heard of that lol |
00:13:46 | FromDiscord | <spoon> no a discord bot lol |
00:13:49 | FromDiscord | <Bubblie> Oh |
00:13:55 | FromDiscord | <Bubblie> D++ with nim? |
00:13:58 | FromDiscord | <spoon> pixie + dimscord has worked super nice |
00:14:08 | FromDiscord | <Bubblie> Is there a nim discord api |
00:14:14 | FromDiscord | <spoon> dimscord yeah |
00:14:21 | FromDiscord | <Bubblie> 👀👀 |
00:14:21 | FromDiscord | <Elegantbeef> Yes |
00:14:28 | FromDiscord | <Bubblie> I had no idea oml |
00:14:29 | FromDiscord | <Bubblie> Thats amazing |
00:15:31 | FromDiscord | <Bubblie> Fuck it, im gonna try using nim with vulkan and glfw and see what happens |
00:15:45 | FromDiscord | <spoon> yeah, and i used pixie to generate images and just straight up used the encoding function without writing to disc |
00:15:59 | FromDiscord | <Bubblie> If it isn’t the best for whatever reason, ill make c++ handle the rendering and nim use that to handle logic |
00:19:34 | FromDiscord | <Bubblie> In reply to @spoon "pixie + dimscord has": is pixie that vector graphics library |
00:19:44 | FromDiscord | <Bubblie> you used a vector graphics library with dimscord? |
00:20:33 | FromDiscord | <spoon> In reply to @Bubblie "is pixie that vector": its an image generation/manipulation library |
00:21:03 | FromDiscord | <spoon> it has vector support though |
00:21:18 | FromDiscord | <Bubblie> I wonder how it compares to skia |
00:21:24 | FromDiscord | <Bubblie> I used skia and it was just |
00:21:25 | FromDiscord | <Bubblie> amazing |
00:22:40 | FromDiscord | <spoon> it has all the things like image mats and shadows and image position and rotation and |
00:23:25 | FromDiscord | <!Patitotective> how should i join enviroment variables? is there a cross-platform way?↵so i can use `putEnv` with `getEnv` 🤔 |
00:23:40 | FromDiscord | <!Patitotective> i mean, append to an existing enviroment variable |
00:24:04 | FromDiscord | <huantian> there's a variable somewhere that's like pathSeperator |
00:24:07 | FromDiscord | <huantian> somewhere |
00:24:16 | FromDiscord | <Elegantbeef> Probably in OS |
00:24:19 | FromDiscord | <Bubblie> In reply to @spoon "it has all the": does it have bitmap font |
00:24:32 | FromDiscord | <Bubblie> or just ttf otf and svg |
00:24:43 | FromDiscord | <!Patitotective> In reply to @huantian "there's a variable somewhere": smart https://nim-lang.org/docs/os.html#PathSep |
00:24:45 | FromDiscord | <spoon> i'd have to look |
00:24:54 | FromDiscord | <Elegantbeef> https://github.com/treeform/pixie#image-file-formats |
00:28:09 | FromDiscord | <Bubblie> does it support an opengl or graphics api backend like skia does |
00:29:04 | FromDiscord | <Elegantbeef> It makes images |
00:29:13 | FromDiscord | <Elegantbeef> What you use the images for is up to you |
00:29:24 | FromDiscord | <Bubblie> alright |
00:29:46 | FromDiscord | <spoon> i mean there's boxy with opengl and gpu rendering which uses pixie |
00:30:25 | FromDiscord | <Bubblie> oooo |
01:02:01 | * | noeontheend joined #nim |
01:03:19 | FromDiscord | <!Patitotective> does `"user" / ".nimble/bin"` on windows gets converted to `user\.nimble\bin`? |
01:04:03 | FromDiscord | <Rika> Yes |
01:04:08 | FromDiscord | <!Patitotective> :] |
01:04:26 | FromDiscord | <Rika> Wait, not the second slash technically |
01:05:14 | FromDiscord | <!Patitotective> :[ |
01:05:27 | FromDiscord | <!Patitotective> then what |
01:05:52 | FromDiscord | <Elegantbeef> `user\.nimble/bin` |
01:07:46 | FromDiscord | <!Patitotective> i dont get it↵`"user" / ".nimble" / "bin"` should work |
01:10:18 | FromDiscord | <Elegantbeef> work where? |
01:10:41 | FromDiscord | <Elegantbeef> Are you attempting to do `getHomeDir() / ".nimble" / "bin"`? |
01:10:48 | FromDiscord | <!Patitotective> yea :] |
01:14:50 | * | duuuuuude quit (Ping timeout: 260 seconds) |
01:19:22 | FromDiscord | <!Patitotective> :OOOOOOOOO https://media.discordapp.net/attachments/371759389889003532/971581840727113748/unknown.png |
01:19:34 | * | ltriant_ joined #nim |
01:21:40 | * | ltriant quit (Ping timeout: 248 seconds) |
01:22:53 | FromDiscord | <!Patitotective> what does this mean `Error: unhandled exception: %1 is not a valid Win32 application.` :[↵https://github.com/Patitotective/ImTemplate/runs/6299523833?check_suite_focus=true#step:4:99 |
01:23:33 | FromDiscord | <Elegantbeef> It means what it says |
01:23:45 | FromDiscord | <!Patitotective> whats %1 |
01:23:57 | FromDiscord | <!Patitotective> (edit) "%1" => "%1?" |
01:23:57 | FromDiscord | <Elegantbeef> what `resources` returns |
01:24:55 | FromDiscord | <!Patitotective> this `var resources = ""; for resource in installFiles: resources.add "-f=" & resource.replace(" ", "\\ ") & " "`? |
01:25:05 | FromDiscord | <Elegantbeef> Read the output |
01:25:09 | FromDiscord | <Elegantbeef> Line 29 is where the error is |
01:25:54 | FromDiscord | <!Patitotective> resources should be something like `"-f=file.nim -f=icon.png"`↵the arguments for `nimassets` |
01:26:06 | FromDiscord | <Elegantbeef> Well they're not |
01:26:18 | FromDiscord | <!Patitotective> wdym |
01:26:32 | FromDiscord | <Elegantbeef> Read your output |
01:26:34 | FromDiscord | <!Patitotective> oooooh, i may be using `/` for windows |
01:26:40 | FromDiscord | <Elegantbeef> The error is on line 29 so your generated string is wrong |
01:26:55 | FromDiscord | <Elegantbeef> `/` inserts the os' directory sep |
01:27:48 | FromDiscord | <!Patitotective> i mean `-f=file` `file` can be a string like `assets/icon.png`↵so i may need to replace it |
01:28:06 | FromDiscord | <!Patitotective> also does windows manage spaces like linux `file\ with\ spaces.txt`? |
01:28:51 | FromDiscord | <Elegantbeef> No clue |
01:29:32 | FromDiscord | <!Patitotective> seems like quotes do the thing |
01:30:40 | FromDiscord | <huantian> I like very rarely use `\ ` on linux I always use quotes |
01:31:16 | FromDiscord | <spoon> linux file directory can use back slash? |
01:32:46 | FromDiscord | <Elegantbeef> Yea it's escape but you just should quote |
01:34:30 | FromDiscord | <!Patitotective> In reply to @Elegantbeef "Yea it's escape but": yep :] |
01:43:28 | FromDiscord | <!Patitotective> resources are okay, i think https://github.com/Patitotective/ImTemplate/runs/6299684997?check_suite_focus=true#step:4:98↵but still `Error: unhandled exception: %1 is not a valid Win32 application.` |
01:58:49 | FromDiscord | <!Patitotective> ~~what about silly windows go to the silly hell 💀 ~~ |
02:11:36 | FromDiscord | <!Patitotective> descriptive https://github.com/Patitotective/ImTemplate/runs/6299870844?check_suite_focus=true#step:4:101 |
02:11:46 | FromDiscord | <!Patitotective> at least there is no `%1` |
02:20:49 | FromDiscord | <!Patitotective> time to get my hands dirty, time to use windows 💀 |
02:58:03 | * | noeontheend quit (Ping timeout: 252 seconds) |
02:58:31 | * | s0k1t joined #nim |
03:07:27 | * | ehmry quit (Ping timeout: 256 seconds) |
03:10:47 | * | ehmry joined #nim |
03:26:12 | FromDiscord | <OceanMongrel> hello, upon downloading nim for windows from the official site, firefox reports malware. is this cause for concern? https://media.discordapp.net/attachments/371759389889003532/971613755320438825/unknown.png |
03:26:55 | FromDiscord | <Elegantbeef> Nim is popular to write malware and there is much for proper Nim software out in the wild as such it flags Nim for malaware is what i understand |
03:26:59 | FromDiscord | <Elegantbeef> there isnt much |
03:27:16 | FromDiscord | <Elegantbeef> So no it's not, but if you're really concern the source code is open if you feel like auditing |
03:28:38 | * | arkurious quit (Quit: Leaving) |
03:34:29 | * | xet7_ joined #nim |
04:02:04 | * | ehmry quit (Ping timeout: 250 seconds) |
04:02:21 | * | ehmry joined #nim |
04:11:03 | * | slowButPresent quit (Quit: leaving) |
04:16:39 | FromDiscord | <spoon> if the zip file is blocked, the hash has to have been intentionally added, right? |
04:17:13 | FromDiscord | <spoon> never really noticed since i get it through a package manager, but brave blocks it too |
04:28:27 | FromDiscord | <Rika> Not necessarily |
04:28:45 | FromDiscord | <Rika> The AV probably decompressed the zip, then check the binaries |
04:28:46 | FromDiscord | <Rika> Checked |
04:37:34 | * | rockcavera quit (Remote host closed the connection) |
05:18:59 | * | Zectbumo joined #nim |
05:35:04 | * | pch quit (Quit: Leaving) |
05:37:15 | * | pch joined #nim |
06:03:24 | * | ehmry quit (Ping timeout: 250 seconds) |
06:12:41 | * | lain quit (Ping timeout: 248 seconds) |
06:13:25 | * | lain joined #nim |
06:15:42 | * | ehmry joined #nim |
06:16:19 | FromDiscord | <spoon> for browsers though? |
06:20:11 | FromDiscord | <Phil> sent a long message, see http://ix.io/3X0N |
06:21:13 | FromDiscord | <Phil> (edit) "http://ix.io/3X0N" => "http://ix.io/3X0O" |
06:22:31 | * | duuuuuude joined #nim |
06:26:46 | FromDiscord | <Rika> In reply to @spoon "for browsers though?": Why wouldn’t a browser be able to do the same thing |
06:28:48 | FromDiscord | <spoon> In reply to @Isofruit "As far as I'm": im sure there are a lot of ways to report false positives |
06:29:20 | FromDiscord | <Rika> In reply to @spoon "im sure there are": Now if the vendors actually look at them is another thing |
06:29:50 | FromDiscord | <Phil> In reply to @spoon "im sure there are": I'm pretty sure the vendors already have a lot of reported false positives, I'm not entirely convinced that's fully the problem |
06:38:11 | * | jjido joined #nim |
06:45:50 | * | Gustavo6046 quit (Remote host closed the connection) |
06:46:23 | * | Gustavo6046 joined #nim |
06:49:17 | * | PMunch joined #nim |
06:49:41 | * | kenran joined #nim |
06:50:27 | * | Perryman_ joined #nim |
06:50:43 | * | Perryman quit (Ping timeout: 256 seconds) |
07:10:43 | PMunch | Hmm, I'm trying to wrap some underlying C code into async. I've got something working by registering the file handle, and then setting a callback for `read` events with `addRead`. The problem is if multiple handlers add a reader callback. The file handle says that it is ready to read, the first one is triggers and exhausts the handle, then the next one triggers but blocks as the handle is no longer ready to be read from. |
07:11:25 | PMunch | On linux you can replicate the behaviour with: http://ix.io/3X0V/nim |
07:12:07 | PMunch | Remove one of those addReads and the program executes fine (crashing with runForever not having any more handlers or timers, which is expected) |
07:12:26 | PMunch | Keep them both and hitting enter now freezes the program in the second handler |
07:12:45 | FromDiscord | <Elegantbeef> Works fine here |
07:12:58 | NimEventer | New thread by Miran: Nim 1.6.6 released, see https://forum.nim-lang.org/t/9144 |
07:13:30 | FromDiscord | <Elegantbeef> image.png https://media.discordapp.net/attachments/371759389889003532/971670961818570762/image.png |
07:13:33 | FromDiscord | <Elegantbeef> Atleast i think this is proper |
07:14:32 | PMunch | @Elegantbeef, this should make it a bit more clear: http://ix.io/3X0W/nim |
07:15:02 | PMunch | As you can see the pings stop after you hit enter the first time, because the program is now blocking on the stdin.readLine of the second handler |
07:16:01 | FromDiscord | <Elegantbeef> Ah i see |
07:19:40 | * | joast quit (Ping timeout: 250 seconds) |
07:20:41 | PMunch | One such event handler shouldn't really trigger all callbacks, but I'm not sure what would happen if you didn't exhaust the handle |
07:20:57 | PMunch | Maybe it doesn't trigger a second read. I think it does, at least on POSIX.. |
07:27:48 | PMunch | Hmm, strange |
07:28:01 | PMunch | There is actually a check for this in asyncdispatch |
07:28:31 | PMunch | Ah, but only if the callback wants to be called again |
07:28:34 | PMunch | Interesting |
07:29:42 | PMunch | Can confirm, if I don't remove the callback it works fine. That sounds like a bug |
07:34:08 | * | pch quit (Remote host closed the connection) |
07:34:26 | * | pch joined #nim |
07:39:15 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
07:42:16 | * | pch quit (Remote host closed the connection) |
07:44:30 | * | lain quit (Ping timeout: 260 seconds) |
07:45:24 | * | pch joined #nim |
07:45:44 | * | lain joined #nim |
07:48:22 | * | Arrrrrrr joined #nim |
07:50:27 | * | duuuuuude quit (Ping timeout: 246 seconds) |
07:57:02 | FromDiscord | <FireLite> How can I get a process name with dll? (Need to check if it is in the right process) |
07:57:41 | FromDiscord | <Elegantbeef> Does `dll` imply windows? |
07:59:42 | * | Onionhammer quit (Quit: Ping timeout (120 seconds)) |
08:02:13 | * | Onionhammer joined #nim |
08:03:51 | * | jmdaemon quit (Ping timeout: 252 seconds) |
08:04:52 | * | lain quit (Ping timeout: 248 seconds) |
08:05:42 | FromDiscord | <FireLite> Yes, a dll for windows app |
08:07:24 | FromDiscord | <Elegantbeef> use winim if you arent and you should be able to use `getCurrentProcessID` |
08:08:23 | FromDiscord | <Zectbumo> would someone explain to me why this doesn't work:↵proc `x`(a,b:int): string = $(ab)↵echo 9 x 6 |
08:08:38 | FromDiscord | <Zectbumo> (edit) "`x`(a,b:int):" => "``x``(a,b:int):" |
08:08:56 | FromDiscord | <Zectbumo> (edit) "``x``(a,b:int):" => "`x`(a,b:int):" |
08:08:58 | FromDiscord | <Elegantbeef> Nim doesnt have arbitrary unicode operators |
08:09:26 | FromDiscord | <Elegantbeef> https://nim-lang.org/docs/manual.html#lexical-analysis-unicode-operators |
08:09:31 | FromDiscord | <Zectbumo> it works if I use @ or something else |
08:09:44 | FromDiscord | <Elegantbeef> `@` isnt unicode |
08:10:01 | FromDiscord | <Elegantbeef> Well it is but yea 😄 |
08:10:14 | FromDiscord | <Zectbumo> 😕 |
08:10:53 | FromDiscord | <FireLite> In reply to @Elegantbeef "use winim if you": What about name? PID is not the same every time.↵And is there docs for winim? |
08:11:12 | FromDiscord | <Elegantbeef> You use the PID to get the name |
08:11:18 | FromDiscord | <Elegantbeef> What's the problem Zect? |
08:11:40 | FromDiscord | <Zectbumo> I get error:↵missing parameter: b↵expression: x 6 |
08:12:13 | FromDiscord | <Zectbumo> so it looks like it's trying to do a single parameter proc call |
08:12:20 | * | lain joined #nim |
08:12:47 | FromDiscord | <Elegantbeef> Wait that's an ascii x? |
08:12:54 | FromDiscord | <Elegantbeef> I thought that was a unicode x |
08:13:03 | FromDiscord | <Elegantbeef> Characters are not used as operators |
08:13:13 | FromDiscord | <Zectbumo> I tried to do backtick x backtick but discord takes it as code |
08:13:17 | FromDiscord | <Elegantbeef> https://nim-lang.org/docs/manual.html#lexical-analysis-operators |
08:13:56 | FromDiscord | <Zectbumo> but this works:↵proc `z`(a:int): string = $(-a)↵echo z 6 |
08:14:17 | FromDiscord | <Elegantbeef> command syntax |
08:14:21 | FromDiscord | <Elegantbeef> https://nim-lang.org/docs/manual.html#procedures-command-invocation-syntax |
08:14:28 | FromDiscord | <Zectbumo> lol |
08:14:50 | FromDiscord | <Zectbumo> why not make it consistent? |
08:14:57 | PMunch | It is consistent |
08:15:01 | FromDiscord | <Elegantbeef> What? |
08:15:06 | FromDiscord | <Zectbumo> just make x (int,int) work and x(int) work as expected |
08:15:15 | PMunch | They do work as expected |
08:15:24 | PMunch | Neither x nor z are operators in your case |
08:15:35 | FromDiscord | <Zectbumo> but sometimes they are |
08:15:40 | PMunch | You can call `z 6` the same way you can call `x 6, 7` |
08:16:02 | PMunch | But you can't put functions in-between it's operators |
08:16:12 | PMunch | Well, unless you do `6.x 7` |
08:16:44 | FromDiscord | <FireLite> In reply to @Elegantbeef "You use the PID": Is there a docs for winim? I can't find it. |
08:17:05 | FromDiscord | <Elegantbeef> There are primitive docs but it's mostly just "Use windows docs its the same" |
08:21:19 | FromDiscord | <Zectbumo> oh proc `x` is the same as proc x the backticks doesn't make it an operator |
08:21:48 | FromDiscord | <Zectbumo> sent a code paste, see https://play.nim-lang.org/#ix= |
08:22:35 | PMunch | Zectbumo, correct |
08:22:53 | PMunch | The backticks are only used to create identifiers that would otherwise not be valid |
08:22:58 | FromDiscord | <Elegantbeef> backticks are just lexical stropping |
08:23:00 | FromDiscord | <Zectbumo> I see how my question was off now |
08:23:16 | PMunch | @Elegantbeef comes in here with his long fancy words |
08:23:20 | FromDiscord | <Elegantbeef> Yea i at first thought that was a unicode x cause it kinda looked that way |
08:23:31 | PMunch | Zectbumo, no worries, easy mistake to make |
08:24:51 | FromDiscord | <Zectbumo> so what determines an "operator"? some set of ascii characters? |
08:25:07 | FromDiscord | <Elegantbeef> Click one of my links |
08:25:22 | PMunch | Zectbumo, yes, there is a subset of characters that comprises operators |
08:25:35 | PMunch | @Elegantbeef shared the link to the relevant part of the documentation twice |
08:26:07 | PMunch | Hmm, why doesn't line 11 work here? https://play.nim-lang.org/#ix=3X1g |
08:26:09 | Arrrrrrr | Does any other language allows this much flexibility other than nim? https://nim-lang.org/docs/manual.html#syntax-precedence |
08:26:14 | FromDiscord | <Zectbumo> right... it actually spells this out 😛 |
08:26:16 | Arrrrrrr | When it comes to operators |
08:26:20 | PMunch | You can call echo like that.. |
08:26:53 | FromDiscord | <Zectbumo> at some point I have to stop asking questions and read |
08:27:30 | PMunch | Arrrrrrr, those are kinda weird tbh |
08:28:03 | Arrrrrrr | Maybe is too much freedom. |
08:28:29 | PMunch | Oh don't get me wrong, I enjoy the freedom. But those operator precedence rules are a bit weird |
08:28:36 | * | kenran quit (Quit: WeeChat info:version) |
08:28:40 | PMunch | I think most people just picks one they think looks good |
08:28:56 | FromDiscord | <Elegantbeef> I enjoy the freedom until someone tells me `%` means `toJson` 😛 |
08:29:06 | Arrrrrrr | Weird because is hard to understand, or too picky? |
08:29:59 | PMunch | Arrrrrrr, mostly that it is so opinionated. And "an operator ending with ->", are we expected to have operators like /=->? |
08:30:17 | FromDiscord | <Zectbumo> I just learned about %, why those two characters? |
08:30:30 | Arrrrrrr | That's my "divide and assign, then return" operator yes. |
08:30:32 | PMunch | They weren't used for anything else :P |
08:30:48 | PMunch | Arrrrrrr, haha, fair enough |
08:31:11 | PMunch | Zectbumo, @Elegantbeef got a better operator symbol for "toJson"? |
08:31:33 | Arrrrrrr | it is also the interpolate this array sym |
08:31:34 | NimEventer | New post on r/nim by miran1: Nim 1.6.6 released, see https://reddit.com/r/nim/comments/uisucs/nim_166_released/ |
08:31:56 | FromDiscord | <Elegantbeef> Yea you're not going to believe this you actually can write words with your keyboard i was thinking `asJson` or something readable |
08:32:16 | FromDiscord | <Yardanico> isn't it an operator so you don't need parens |
08:32:25 | FromDiscord | <Yardanico> and no spaces |
08:33:02 | FromDiscord | <Elegantbeef> Yet a sane person uses a space |
08:33:49 | FromDiscord | <Zectbumo> if I'm never going to use ' to make chars then can I make ' do strings instead? |
08:34:00 | FromDiscord | <Rika> No |
08:34:02 | PMunch | @Elegantbeef, I tend to not use spaces with %* |
08:34:22 | PMunch | @Elegantbeef, and you can just call toJson can't you? |
08:35:46 | FromDiscord | <Elegantbeef> Pmunch i was making a joke, calm..... breath in and out |
08:38:13 | PMunch | I was actually curious :P |
08:42:28 | FromDiscord | <dom96> Jokes? This ain’t a comedy club :p |
08:43:03 | FromDiscord | <Elegantbeef> Shit then why are you here? You're the biggest joke in these parts. |
08:44:08 | PMunch | Oh hi dom96, did you see my async issue I had earlier today? |
08:44:18 | PMunch | Just wondering if you had any input :) |
08:44:39 | FromDiscord | <dom96> In reply to @Elegantbeef "Shit then why are": feeling welcome in the Nim community intensifies /s |
08:46:28 | FromDiscord | <Elegantbeef> Hey people mostly say the nim community is nice after my messages, coincidence i think not |
08:46:31 | FromDiscord | <enthus1ast> can imagine that some do not understand the written jokes and take them for grant, think of the asperger's among us. |
08:46:34 | PMunch | I think it was a poor attempt at a joke.. |
08:48:01 | FromDiscord | <Elegantbeef> Well then i should be given the boot |
08:48:36 | PMunch | Here you go 🥾 |
08:49:01 | FromDiscord | <Elegantbeef> Can always count on you |
08:49:19 | PMunch | Happy to help :P |
08:50:09 | PMunch | Hmm, for some reason after I updated Firefox I can't control the audio of YouTube videos any longer |
08:50:17 | PMunch | Even muting them does nothing |
08:50:31 | FromDiscord | <enthus1ast> updates are evil |
08:51:11 | FromDiscord | <enthus1ast> Have you done the default IT Servicedesk steps? 1. Check Cables↵ 2. Restart↵ 3. Update |
08:51:16 | FromDiscord | <Elegantbeef> It's apart of googles ploy to deafen it's userbase |
08:53:09 | FromDiscord | <dom96> In reply to @Elegantbeef "Hey people mostly say": If you call anyone that disagrees a joke not many will be left to disagree. But you know, I was making a joke too :) |
08:53:30 | FromDiscord | <Elegantbeef> What the fuck are you on about |
08:53:34 | FromDiscord | <Elegantbeef> I responded with a joke to your counter joke |
08:53:44 | PMunch | @enthus1ast, not yet I'm still on step 0. Complain |
08:54:15 | FromDiscord | <enthus1ast> I understand that you have an Issue with you'r audio, in Firefox.↵(<@709044657232936960_=50=4dunch=5b=49=52=43=5d>) |
08:55:11 | PMunch | @enthus1ast, huh? |
08:57:53 | FromDiscord | <Rika> Same I didn’t understand what you meant |
08:58:08 | FromDiscord | <dom96> In reply to @Elegantbeef "I responded with a": Whatever you say |
08:59:05 | FromDiscord | <Elegantbeef> Cant tell if you sicnerely think i have some reason to insult you |
09:01:36 | PMunch | Hmm, if I add a check before my readLine I think it will fix my current issue with async |
09:02:33 | PMunch | But I think maybe I should perhaps track a flag and register/unregister the file handle entirely if I don't have any events I wait for |
09:02:55 | PMunch | Is there a way to check if a handle is registered in the async dispatcher? |
09:03:21 | PMunch | Ah, contains |
09:03:48 | FromDiscord | <Zectbumo> sent a code paste, see https://paste.rs/3JU |
09:04:08 | FromDiscord | <Zectbumo> % format and meaning "all" -- very cool |
09:04:25 | FromDiscord | <dom96> PMunch: I haven’t read the discussion above yet. But do have a look at how the recv calls are implemented in async dispatch |
09:04:43 | FromDiscord | <dom96> Should be the best example for how to use addRead |
09:08:16 | FromDiscord | <Zectbumo> In reply to @Elegantbeef "Cant tell if you": will smith come after you now |
09:09:13 | FromDiscord | <Zectbumo> https://www.youtube.com/watch?v=lrAgaULqGOY |
09:09:22 | FromDiscord | <Elegantbeef> But i didnt say jada |
09:09:39 | FromDiscord | <Rika> You just did |
09:09:43 | FromDiscord | <Rika> Ready yo ass |
09:09:49 | FromDiscord | <Zectbumo> KEEP MY WIFES NAME... |
09:10:11 | PMunch | dom96, hmm recv looks complicated |
09:11:01 | FromDiscord | <dom96> Happy to help explain it. What doesn’t make sense? |
09:11:10 | PMunch | The problem here is that I can only call `io_process` from the C library, and then I have registered a callback in the C library which completes the futures in a table |
09:12:41 | PMunch | So I guess I just need to keep track of how many outstanding futures I have, if that number reaches 0 I unregister the handle and the readers |
09:12:45 | PMunch | Or something like that |
09:14:30 | FromDiscord | <dom96> It should be fine to keep them registered. What is the fd and what operations are you implementing on it? |
09:14:59 | FromDiscord | <hmmm> aaa I can't remember if I installed nim manually or with choosenim |
09:15:14 | FromDiscord | <Zectbumo> okay, so `%{"foo": 5, "bar": 4}` is the shorthand. what is the long hand version that the docs are referring to?↵"""macro `%`(x: untyped): untyped↵Convert an expression to a JsonNode directly, without having to specify % for every element.""" |
09:15:16 | FromDiscord | <hmmm> apparently choosenim is not in my path |
09:15:39 | FromDiscord | <Elegantbeef> The long hand is to manually insert `%` before each entry |
09:15:47 | FromDiscord | <dom96> In reply to @hmmm "apparently choosenim is not": Does ~/.choosenim exist? |
09:15:52 | FromDiscord | <hmmm> I'll check |
09:16:08 | PMunch | dom96, it's a handle exposed by the COAP library. It's just used as a signal that you can call io_process. And io_process doesn't return anything, it just calls a callback for each item it processes |
09:16:16 | FromDiscord | <hmmm> yea it does |
09:16:26 | FromDiscord | <hmmm> but for some reason it's not in the path |
09:16:48 | FromDiscord | <Zectbumo> In reply to @Elegantbeef "The long hand is": I can't get it to work: ↵`{%"foo": %5, %"bar": %4}` returns `[("foo", 5), ("bar", 4)]` |
09:17:05 | FromDiscord | <dom96> You don’t put the % on the key |
09:17:31 | FromDiscord | <hmmm> lol apparently I'm still on 1.6.2 |
09:17:49 | FromDiscord | <Zectbumo> In reply to @dom96 "You don’t put the": okay `{"foo": %5, "bar": %4}` still returns `[("foo", 5), ("bar", 4)]` |
09:17:49 | PMunch | Zectbumo, long version `%{"foo": 5, "bar": 4}` |
09:18:08 | PMunch | You need % to turn that into a JsonNode |
09:18:22 | FromDiscord | <dom96> And then you need the % before { |
09:18:55 | FromDiscord | <Zectbumo> I feel like a baby that backed into a corner and doesn't know why I can't go backwards anymore |
09:19:14 | FromDiscord | <Elegantbeef> Macros are a hell of a drug, they make the room into a circle |
09:19:37 | FromDiscord | <Zectbumo> In reply to @PMunch "<@157415492812800000>, long version `%{"foo":": `%{"foo": 5, "bar": 4}` returns `Error: type mismatch: got <(string, int)>` |
09:20:00 | PMunch | Because you didn't add `%` on the inner keys |
09:20:02 | FromDiscord | <Zectbumo> can someone tell me the long version please |
09:20:25 | PMunch | By the way, this is why not prepending it with % returns a tuple https://nim-lang.org/docs/manual.html#statements-and-expressions-table-constructor |
09:20:29 | PMunch | Zectbumo, I already did.. |
09:20:53 | FromDiscord | <Zectbumo> In reply to @PMunch "Because you didn't add": you mean values, got it |
09:20:56 | FromDiscord | <Zectbumo> phew! |
09:21:02 | FromDiscord | <Elegantbeef> It's for nested structures |
09:21:20 | FromDiscord | <Elegantbeef> If you have nested `{}` you'd need to `%` each |
09:21:20 | PMunch | !eval %{"foo":": `%{"foo": 5, "bar": 4} |
09:21:23 | NimBot | Compile failed: /usercode/in.nim(1, 29) Error: closing " expected |
09:21:31 | FromDiscord | <Zectbumo> yeah, that I figured. I just couldn't replicate my two entry dict |
09:21:42 | FromDiscord | <Zectbumo> or do we call them tables around here? |
09:21:46 | PMunch | Damn it, stupid playground not having proper selectinos.. |
09:22:09 | PMunch | !eval import json; echo %{"foo": %{"foo": %5, "bar": %4}} |
09:22:12 | FromDiscord | <Elegantbeef> selectinos arent those trademarked tetris pieces? |
09:22:13 | NimBot | Compile failed: {"foo":{"foo":5,"bar":4}} |
09:22:49 | FromDiscord | <Elegantbeef> It's not your day |
09:22:51 | FromDiscord | <Zectbumo> (edit) "yeah, that I figured. I just couldn't replicate ... my" added "the "long version" for" |
09:23:33 | FromDiscord | <dom96> Didn’t that succeed? Lol |
09:24:30 | FromDiscord | <Elegantbeef> Yea it works just not with the silly nimbot |
09:26:54 | FromDiscord | <dom96> Little NimBot does it’s best |
09:27:11 | FromDiscord | <hmmm> hey where does the choosnim executable sit typically on windowz? |
09:27:57 | FromDiscord | <dom96> In reply to @hmmm "hey where does the": In ~/.nimble/bin |
09:28:18 | FromDiscord | <hmmm> ha! it's not there |
09:28:35 | FromDiscord | <hmmm> I think I had a manual install on top of a choosenim one |
09:28:53 | FromDiscord | <Zectbumo> okay, my question may go deeper than I'm ready for right now, but here it goes...↵can the std/json module provide a json encoded output stream?↵meaning, I feed an undetermined number of objects to an array and it spits out a continuous json encoded stream? |
09:29:24 | FromDiscord | <Zectbumo> (edit) "an array" => "a sequence" |
09:30:05 | FromDiscord | <Elegantbeef> You mean spit out a string? |
09:30:10 | FromDiscord | <Zectbumo> yes |
09:30:21 | FromDiscord | <Zectbumo> string stream |
09:31:22 | FromDiscord | <Zectbumo> most libraries I've encountered have to parse all of what is fed into memory and can't start spitting out string data until the very end |
09:32:33 | FromDiscord | <Elegantbeef> Well it's hard to do it partially |
09:32:45 | FromDiscord | <Zectbumo> I don't think so |
09:32:50 | FromDiscord | <Elegantbeef> It's vastly more complex |
09:33:10 | FromDiscord | <Zectbumo> after every complete object it can yield a string |
09:33:28 | FromDiscord | <Elegantbeef> Well then you can make it do that yourself |
09:33:31 | FromDiscord | <Elegantbeef> 😄 |
09:33:38 | * | duuuuuude joined #nim |
09:33:39 | FromDiscord | <Elegantbeef> I'm tired so i think "Vastly" might be an overstatement 😄 |
09:33:48 | FromDiscord | <Zectbumo> it's true. I could. once I learn nim |
09:34:01 | FromDiscord | <Zectbumo> my hope was that someone already did this |
09:34:13 | FromDiscord | <Yardanico> In reply to @Zectbumo "most libraries I've encountered": https://github.com/Araq/packedjson does this I think |
09:34:16 | FromDiscord | <Yardanico> or something similar |
09:34:42 | FromDiscord | <Zectbumo> yeah, that should be std/ |
09:34:48 | FromDiscord | <Yardanico> why? |
09:34:49 | FromDiscord | <Zectbumo> 😢 |
09:34:49 | FromDiscord | <Elegantbeef> https://nim-lang.org/docs/json.html#parseJsonFragments.i%2CStream%2Cstring exists apparently |
09:34:50 | FromDiscord | <Elegantbeef> But that's backwards 😄 |
09:36:01 | FromDiscord | <Zectbumo> In reply to @mothumix "why?": why standard? because you don't need to jam everything into memory all the time. and programming in streams is a nice way to go |
09:36:56 | FromDiscord | <Zectbumo> In reply to @Elegantbeef "But that's backwards 😄": that's half the battle 😄 |
09:50:29 | FromDiscord | <Zectbumo> where is the toJson function? |
09:52:46 | FromDiscord | <eyecon> jsonutils\: https://nim-lang.org/docs/jsonutils.html#toJson%2CT↵(@Zectbumo) |
09:53:11 | FromDiscord | <Zectbumo> two json modules?? |
09:54:02 | FromDiscord | <Yardanico> In reply to @Zectbumo "two json modules??": they don't do the same stuff |
09:55:50 | FromDiscord | <Zectbumo> right, but it doesn't make sense to import json to get parseJson and then import jsonutils to get toJson |
10:00:28 | FromDiscord | <Zectbumo> why does `import json` and `import std/json` both work but `import jsonutils` doesn't work |
10:00:34 | FromDiscord | <Zectbumo> (edit) "work" => "work?" |
10:01:17 | FromDiscord | <Zectbumo> (in playground, in case that matters) |
10:21:29 | PMunch | Zectbumo, that's because jsonutils is too new |
10:21:40 | PMunch | It was decided to move all the standard library modules into std/ |
10:22:12 | PMunch | But to avoid breaking every Nim program that was written before this change modules that existed before the decision can still be imported without std |
10:48:35 | FromDiscord | <Phil> Man, going to java from nim is sometimes such a wild ride |
10:48:45 | FromDiscord | <Zectbumo> yeah? how so? |
10:48:53 | FromDiscord | <Phil> I tend to not use ref types in nim |
10:49:27 | FromDiscord | <Phil> So having every object in java be ref-type is so confusing until you've re-acclimitized and remember "yes, this change here does apply also to the core object at place X" |
10:51:12 | FromDiscord | <Zectbumo> I don't follow since all references modify the original "core object" (in java) |
10:52:08 | PMunch | Zectbumo, that's what confuses him. In Nim it's much more normal to use "normal" objects |
10:52:16 | PMunch | Which don't update like that |
10:53:31 | FromDiscord | <Zectbumo> oh yeah, @Phil , you may need to know I'm a nim noob right now. so I may not know the difference you are pointing out. |
10:54:17 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=3X1B |
10:54:31 | FromDiscord | <Phil> fields is an AcroFields object that lives within the stamper object |
10:54:46 | FromDiscord | <Phil> Or rather it's just a reference to the object that lives in stamper |
10:55:06 | FromDiscord | <Phil> So you can manipulate fields and all the changes will also be in the object that is within stamper, because they're the same object |
10:55:15 | FromDiscord | <Phil> Which can do very funky things when you don't expect it |
10:55:55 | FromDiscord | <Phil> in nim, you tend to use value-type objects. Which means, the "getAcroFields" wouldn't give you a reference to the object within stamper, it would give you a copy |
10:56:08 | FromDiscord | <Zectbumo> ah |
10:56:20 | FromDiscord | <Phil> And that would mean changes in fields do not apply to the thing in stamper |
10:56:22 | FromDiscord | <Zectbumo> now what if you wanted the reference? |
10:56:33 | FromDiscord | <Phil> you can just write ref objects |
10:56:46 | * | 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]) |
10:57:01 | FromDiscord | <Phil> I'd need to look up the exact syntax but it's something like `type Bla = Ref object of RootObj` or sth |
10:57:16 | FromDiscord | <Phil> You see I rarely use that in nim |
10:57:28 | FromDiscord | <Zectbumo> interesting. I'll look that up. thx |
10:57:30 | FromDiscord | <Phil> (edit) "You ... seehow" added "can" | "cansee ... Iwhen" added "how" | "seehowI rarely use that in nim ... " added "when I can't even recall the syntax" |
10:57:47 | FromDiscord | <Zectbumo> https://nim-lang.org/docs/manual.html#types-reference-and-pointer-types |
10:58:01 | PMunch | Yes it's just `ref object` |
10:58:14 | PMunch | `ref object of RootObj` is used to make a type you can inherit from |
10:58:32 | PMunch | Works with `object of RootObj` as well of course |
10:59:47 | * | duuuuuude quit (Ping timeout: 240 seconds) |
11:02:39 | FromDiscord | <Phil> Is there actually a technical benefit for using value-objects? |
11:02:52 | FromDiscord | <Phil> I mean, it makes code nicer imo because it forces you to write less side-effect-y |
11:03:08 | PMunch | Data being more local |
11:03:22 | FromDiscord | <Zectbumo> it is so cool that you can: typeof x or typeof(x) or type_of(x) or typeOf x ... I'm liking nim |
11:03:24 | PMunch | Having to jump around on the heap can be quite punishing on caches |
11:03:51 | PMunch | Zectbumo, yeah Nim has a very flexible syntax :) |
11:03:55 | FromDiscord | <Phil> Ohhh you're more likely to make good usage of cache? |
11:04:11 | FromDiscord | <Phil> Given that good caching is one of the best ways to get insanely fast, me likey |
11:04:13 | PMunch | @Phil, well it depends |
11:04:56 | FromDiscord | <Zectbumo> who do I talk to for suggestions to changes of the language? |
11:04:57 | PMunch | But yeah, if you just pass objects around on the stack (and Nim optimizes your object passing with pointers to the stack objects) it is likely that objects are placed closed to other related data |
11:05:07 | PMunch | So you might get better cache performance |
11:05:29 | PMunch | But as with everything cache related it is very scenario dependent |
11:05:43 | PMunch | Zectbumo, depends on how big the change is |
11:06:08 | PMunch | A good place right now be this forum topic: https://forum.nim-lang.org/t/9132 |
11:06:45 | PMunch | There are also RFCs and issues on GitHub |
11:08:00 | FromDiscord | <Zectbumo> small, I think? it is unused syntax to do 'my string' (`missing closing ' for character literal`) and doing string with single quote is so nice. so my idea is 'x' stays a char but 'my string' is a string |
11:09:08 | FromDiscord | <Zectbumo> it seems nim is so generous in this sense and here it's so strict |
11:09:23 | FromDiscord | <Phil> Yeh but how do you separate between the string "a" |
11:09:27 | FromDiscord | <Phil> and the character 'a' |
11:09:48 | * | duuuuuude joined #nim |
11:09:52 | FromDiscord | <Zectbumo> ? they are separate "a" is \0 terminated and 'a' is not |
11:10:03 | PMunch | Nim has quite relaxed syntax, but very strict types. |
11:10:20 | FromDiscord | <Zectbumo> yes, I like that. and I want to keep that. 'sth' is a string type 😄 |
11:10:36 | FromDiscord | <Zectbumo> 'h' is a char |
11:10:46 | FromDiscord | <Phil> Hmm I'd say it turns into "now you need to know this gotcha" scenario |
11:10:59 | PMunch | What would you do with '\p' then? |
11:11:03 | FromDiscord | <Phil> That 'a ' now becomes a fundamentally different type then 'a' |
11:11:18 | PMunch | \p is "platform specific newline" aka. LF on Linux and CRLF on windows |
11:11:35 | PMunch | Now '\p' is a character on one platform, and a string on another |
11:12:16 | FromDiscord | <Zectbumo> In reply to @PMunch "What would you do": easy, string, since it can't be a char |
11:12:35 | FromDiscord | <Zectbumo> basically it's: can it be a char? no, then string |
11:14:39 | PMunch | But on Linux it's a char |
11:14:47 | PMunch | It's just a single newline character on Linux |
11:15:19 | FromDiscord | <Zectbumo> yeah, but nim doesn't allow that as a char anyway. it's mentioned in the tutorial |
11:15:45 | FromDiscord | <Zectbumo> because it can be length 2 on some platforms so \p can never be a char |
11:17:29 | FromDiscord | <Zectbumo> https://nim-lang.org/docs/manual.html#lexical-analysis-character-literals |
11:17:40 | FromDiscord | <Zectbumo> "with one exception: the platform dependent newline (\p) is not allowed as it may be wider than one character" |
11:18:48 | FromDiscord | <Zectbumo> here's a question, what is empty single quotes? '' ↵well, it's not a char, so empty string! |
11:19:41 | * | Gustavo6046 joined #nim |
11:21:10 | FromDiscord | <SirElephant> is there any way to play audio in the terminal using nim? |
11:21:24 | FromDiscord | <SirElephant> like playsound for python and rodio for rust? |
11:21:59 | PMunch | So '' is a string, 'a' is a char and 'ab' is a string? That just sounds super confusing.. |
11:22:53 | FromDiscord | <Zectbumo> In reply to @PMunch "<@157415492812800000>, depends on how": do you think the forum would be the right place for this? @dom96 said "Please also be sure to focus on ideas that require breaking changes to the language/stdlib or similar. Not general improvements that can be made at any Nim version." |
11:23:08 | * | Gustavo6046 quit (Client Quit) |
11:23:26 | FromDiscord | <Zectbumo> In reply to @PMunch "So '' is a": not really right? because right now 'ab' is a syntax error |
11:23:59 | PMunch | @SirElephant, there is probably something in here you can use: https://nimble.directory/search?query=sound |
11:24:05 | FromDiscord | <Zectbumo> (edit) "error" => "error, and so is ''" |
11:25:02 | * | Gustavo6046 joined #nim |
11:26:07 | FromDiscord | <Zectbumo> In reply to @PMunch "So '' is a": but if it makes the community feel better, I'm willing to sacrifice the empty string and have the rule be length > 1 |
11:26:12 | FromDiscord | <Rika> In reply to @Zectbumo "not really right? because": I mean with your proposed change it is like that |
11:26:23 | PMunch | Yeah that's what I meant |
11:26:32 | * | Gustavo6046 quit (Changing host) |
11:26:32 | * | Gustavo6046 joined #nim |
11:26:34 | FromDiscord | <Rika> I think it’s unnecessary… |
11:26:48 | PMunch | The forum post should be fine for this yeah, it's a breaking change. At least kind of |
11:27:18 | FromDiscord | <Zectbumo> it's unnecessary, yes, because it's a developer UX feature request |
11:27:38 | FromDiscord | <Zectbumo> In reply to @PMunch "The forum post should": is it though? |
11:28:04 | FromDiscord | <Zectbumo> 0% of code right now will break if my idea is implemented |
11:28:10 | FromDiscord | <Zectbumo> exactly 0% |
11:28:58 | FromDiscord | <Zectbumo> I'll post it. what's the worst thing that could happen 😛 |
11:30:38 | * | Gustavo6046 quit (Remote host closed the connection) |
11:30:42 | FromDiscord | <Rika> In reply to @Zectbumo "it's unnecessary, yes, because": I think it doesn’t bring anything to the table, there |
11:30:44 | FromDiscord | <Rika> Better wording |
11:30:53 | * | Gustavo6046 joined #nim |
11:33:28 | * | Gustavo6046 quit (Changing host) |
11:33:28 | * | Gustavo6046 joined #nim |
11:34:23 | FromDiscord | <Zectbumo> oh but I do. a lot actually. bouncing between shifting keys when coding is not ideal. keeping the use of shift key to a minimum is a plus in my book |
11:35:23 | PMunch | Zectbumo, some macros might depend on '' not compiling :P |
11:35:38 | FromDiscord | <Zectbumo> interesting |
11:36:03 | FromDiscord | <Zectbumo> then... it's a breaking change! yay 😉 |
11:36:26 | FromDiscord | <Zectbumo> see you in nimv2 😄 |
11:39:23 | FromDiscord | <SirElephant> sent a long message, see http://ix.io/3X1H |
11:39:41 | FromDiscord | <SirElephant> (edit) "http://ix.io/3X1H" => "http://ix.io/3X1I" |
11:42:21 | PMunch | @SirElephant, did you have a look at the tests and common.nim as the README suggests? |
11:42:30 | FromDiscord | <SirElephant> In reply to @PMunch "<@856412455507984404>, did you have": ye |
11:44:30 | * | Gustavo6046 quit (Quit: ZNC 1.8.2 - https://znc.in) |
11:44:43 | * | Gustavo6046 joined #nim |
11:44:50 | PMunch | I seem to remember that there was a small library out there to just play sound files |
11:44:54 | PMunch | But I can't find it.. |
12:07:40 | * | Zectbumo quit (Remote host closed the connection) |
12:15:13 | FromDiscord | <SirElephant> https://github.com/jiro4989/wave ↵========================↵Is this the one? |
12:15:41 | FromDiscord | <SirElephant> In reply to @PMunch "But I can't find": https://github.com/jiro4989/wave ↵========================↵Is this the one? |
12:16:24 | PMunch | Please don't pad your own messages with ====, just makes the channel harder to read.. |
12:16:53 | PMunch | I don't think it was that one, but it might've been |
12:16:57 | FromDiscord | <SirElephant> In reply to @PMunch "Please don't pad your": sory |
12:17:05 | FromDiscord | <SirElephant> thought it looked go |
12:17:09 | PMunch | I might also be mis-remembering |
12:27:56 | * | slowButPresent joined #nim |
12:28:58 | FromDiscord | <Rika> In reply to @SirElephant "thought it looked good": Not for those in IRC since they don’t have line breaks |
12:31:26 | PMunch | Even in Discord/Matrix, those messages could've both been a single line |
12:32:45 | FromDiscord | <Rika> Most here would say that they’d prefer two |
12:34:47 | PMunch | Why would you want two lines when one line suffices? |
12:40:59 | FromDiscord | <Zoom> One thing I love Matrix for is markdown support, specifically for technical chats like this one. Being able write a [proper link](https://youtu.be/dQw4w9WgXcQ) is great. |
12:45:56 | FromDiscord | <Rika> In reply to @PMunch "Why would you want": Because it doesn’t suffice for me |
12:46:01 | FromDiscord | <Rika> Visual separation |
13:02:32 | PMunch | Hmm, another issue with the compiler not being easily built by people who don't install via choosenim: https://github.com/PMunch/ratel/issues/12 |
13:02:57 | PMunch | That the compiler tries to read `../doc/` should probably be considered a bug.. |
13:15:42 | FromDiscord | <Yardanico> btw, if someone's curious about the nim binary that AVs hate the most in the nim distribution |
13:15:52 | FromDiscord | <Yardanico> it's nimgrab.exe, and I assume it's because it uses some urlmon.dll APIs on Windows |
13:15:55 | FromDiscord | <Yardanico> https://www.virustotal.com/gui/file/f266609e91985f0fe3e31c5e8faeeec4ffa5e0322d8b6f15fe69f4c5165b9559 |
13:15:57 | FromDiscord | <Yardanico> 18/68 |
13:28:20 | * | xet7_ quit (Quit: Leaving) |
13:28:20 | * | xet7 quit (Quit: Leaving) |
13:30:10 | * | xet7 joined #nim |
13:33:37 | * | arkurious joined #nim |
13:37:53 | PMunch | I wonder what we could do to try and fix this |
13:38:04 | PMunch | Could we contact the virus vendors somehow? |
13:44:08 | FromDiscord | <Yardanico> In reply to @PMunch "Could we contact the": yeah, but again, it's really weird |
13:44:18 | FromDiscord | <Yardanico> i compiled that binary myself with my tdm-gcc, and virustotal only showed 3 detections |
13:44:24 | FromDiscord | <Yardanico> (edit) removed "my" |
13:46:24 | PMunch | Maybe Nim for Windows should be built with the Go GC and compiled via the Zig compiler :P |
13:49:40 | FromDiscord | <Yardanico> nim.exe gets 0 detections, it's nimgrab specifically :) |
13:49:52 | FromDiscord | <Yardanico> one my theory is that AVs really don't like the usage of urlmon by nimgrab |
13:51:32 | PMunch | Hmm, interesting |
13:51:47 | PMunch | What about finish.exe? I think that's one of the ones that causes trouble |
13:51:51 | FromDiscord | <Zoom> We'll probably have more luck "writing to our representative congressmen" \:-/↵(<@709044657232936960_=50=4dunch=5b=49=52=43=5d>) |
13:52:55 | FromDiscord | <Yardanico> In reply to @PMunch "What about finish.exe? I": nope, just 2 detections |
13:59:29 | PMunch | Hmm, I kinda want to make a library out of this https://play.nim-lang.org/#ix=3X2l |
14:00:22 | PMunch | So many times I've wanted to add logging to a procedure, and I end up logging multiple lines just so I have context when something goes wrong. But if nothing goes wrong I don't want anything logged |
14:00:42 | PMunch | Combine this with log levels (that can only be increased) and voila |
14:01:12 | PMunch | Maybe I'll just merge this with superlog and build a proper library out of that |
14:01:49 | PMunch | Unfortunately reasoning about modules is suprisingly tricky in Nim |
14:04:18 | * | PMunch quit (Quit: Leaving) |
14:09:04 | FromDiscord | <Zoom> Interesting idea. How usable is a log from a single proc, though? |
14:10:32 | FromDiscord | <Zoom> Ah, you probably mean to be adding proc-local logs to a global only on exception... Nice |
14:10:36 | * | vicecea quit (Remote host closed the connection) |
14:11:04 | * | vicecea joined #nim |
14:15:11 | NimEventer | New post on r/nim by mavavilj: Most promising library for drawing from random distributions (2022)?, see https://reddit.com/r/nim/comments/uiyea1/most_promising_library_for_drawing_from_random/ |
14:30:47 | * | vicfred joined #nim |
14:47:29 | FromDiscord | <soundmodel> Could someone explain to me this thing in the alea lib (I'm new to Nim)? I'm reading https://github.com/andreaferretti/alea/blob/b2019665a989a8e707a5253d23625072268f49aa/alea/rng.nim#L27, and then I am reading https://github.com/andreaferretti/alea/blob/b2019665a989a8e707a5253d23625072268f49aa/alea/core.nim#L39. I saw that randomInt was supposed to have two args, but only one is provided in the latter. So am I missing something? |
14:48:04 | FromDiscord | <Yardanico> In reply to @soundmodel "Could someone explain to": Nim has method call syntax, so `a.b()` is the same as `b(a)` |
14:48:20 | FromDiscord | <Yardanico> In your example `rng.randomInt(d.values[].len)` means `randomInt(rng, d.values[].len)` |
14:48:41 | FromDiscord | <Yardanico> Nim doesn't have any specific class stuff regarding routines, it's all resolved by method call syntax (also called UFCS) |
14:49:37 | FromDiscord | <Yardanico> it's explained in the second tutorial: https://nim-lang.org/docs/tut2.html#object-oriented-programming-method-call-syntax |
14:54:39 | FromDiscord | <tsoj> Choosenim doesn't work for me anymore. When I use it, it just hangs forever. Anybody else have any issues like this? |
14:55:52 | * | vicfred quit (Quit: Leaving) |
15:17:55 | FromDiscord | <dom96> try passing `--debug` to see what it gets stuck on |
15:19:16 | FromDiscord | <undel> In reply to @mothumix "it's nimgrab.exe, and I": By any chance is the URLDownloadToFile API used? |
15:19:39 | FromDiscord | <Yardanico> In reply to @-|- "By any chance is": yes |
15:20:05 | FromDiscord | <Yardanico> is it something used by viruses so often AVs detect it, even if it's just a windows API? |
15:21:27 | FromDiscord | <undel> In reply to @mothumix "is it something used": Yep |
15:21:36 | * | noeontheend joined #nim |
15:21:37 | FromDiscord | <undel> I used it in a program and AVs instantly flagged it |
15:21:58 | FromDiscord | <undel> you could have a program that's just `int main() { return URLDownloadToFileA(); }` and it's flagged |
15:22:18 | FromDiscord | <undel> That API is effectively toxic now as it was often used by malware droppers to fetch the main payload |
15:26:57 | * | duuuuuude quit (Ping timeout: 256 seconds) |
15:34:15 | FromDiscord | <tsoj> @dom96 it's stuck at `Http Requesting http://nim-lang.org/channels/stable` but the weird thing is that it works from a virtual machine, but not with a clean install on another real machine. could be unrelated to choosenim |
15:46:07 | FromDiscord | <dom96> does requesting it via `curl` work? |
15:53:50 | FromDiscord | <tsoj> `curl http://nim-lang.org/channels/stable -o file` works fine as far as I can see. |
15:54:55 | FromDiscord | <tsoj> Just noticed, it doesn't hang forever, it just takes very very long (like 10 minutes to half an hour). |
15:56:35 | FromDiscord | <dom96> what OS are you on? Linux? |
15:59:05 | FromDiscord | <dom96> looks like this is the code path: https://github.com/dom96/choosenim/blob/master/src/choosenimpkg/download.nim#L397 |
15:59:34 | FromDiscord | <dom96> possibly something wrong with httpclient. Do you have a proxy set up via the typical env vars? |
16:07:31 | * | Arrrrrrr quit (Remote host closed the connection) |
16:09:28 | * | Arrrrrrr joined #nim |
16:09:28 | * | Arrrrrrr quit (Remote host closed the connection) |
16:09:48 | * | Arrrrrrr joined #nim |
16:15:08 | * | Arrrrrrr quit (Read error: Connection reset by peer) |
16:16:02 | * | Arrrrrrr joined #nim |
16:18:26 | FromDiscord | <Entikan> sent a code paste, see https://play.nim-lang.org/#ix=3X33 |
16:20:29 | FromDiscord | <Entikan> nimraylib_now |
16:20:30 | FromDiscord | <Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=3X36 |
16:22:13 | FromDiscord | <Yardanico> In reply to @Entikan "nimraylib_now": it has Color as an object, and then converters to convert tuples to that Color object |
16:22:23 | FromDiscord | <Yardanico> I guess the converter isn't being called in this case |
16:22:33 | FromDiscord | <Yardanico> you can call it with `tupleToColor` yourself explicitly |
16:23:19 | FromDiscord | <Entikan> ah |
16:23:24 | FromDiscord | <Entikan> what is this called? |
16:23:27 | FromDiscord | <aph> or maybe use another syntax, probably `Color(r: 123, g: 234, b: 255)` probably |
16:23:32 | FromDiscord | <aph> (edit) removed "probably" |
16:23:36 | FromDiscord | <aph> not sure though |
16:24:11 | FromDiscord | <Yardanico> In reply to @aph "or maybe use another": yes that'd work too |
16:24:12 | FromDiscord | <aph> (edit) "or maybe use another syntax, probably `Color(r: 123, g: 234, b: 255)` ... " added "(constructs a color object i think)" |
16:24:20 | FromDiscord | <Entikan> doii |
16:24:23 | FromDiscord | <Entikan> it does |
16:24:30 | FromDiscord | <aph> good to know i ain't wrong |
16:25:05 | FromDiscord | <Entikan> thanks |
16:32:39 | FromDiscord | <tsoj> sent a long message, see http://ix.io/3X3c |
16:36:06 | FromDiscord | <dom96> In reply to @tsoj "Yes, Linux (Manjaro Gnome).": https://github.com/dom96/choosenim/blob/master/src/choosenimpkg/utils.nim#L101 |
16:45:12 | FromDiscord | <tsoj> Oh okay, I don't use any proxy. |
16:47:36 | FromDiscord | <dom96> interesting, then there may be some bug in httpclient. If this is reproducible for you it would be great if you could compile an app that downloads that page to see if it fails as well, and then maybe we could debug together to find the cause. |
16:48:52 | FromDiscord | <Yardanico> In reply to @tsoj "Oh okay, I don't": can you try doing `echo $http_proxy` and `echo $https_proxy` in the terminal? |
16:51:00 | FromDiscord | <Yardanico> and see if it outputs a non-empty string |
16:53:00 | * | Arrrrrrr quit (Read error: Connection reset by peer) |
16:54:03 | * | Arrrrrrr joined #nim |
16:55:35 | * | Arrrrrrr quit (Remote host closed the connection) |
16:55:48 | FromDiscord | <tsoj> `echo "<"$https_proxy">"` outputs `<>`, same with http, so I guess it is empty. When I have time I will try what you're suggesting @dom96 |
16:56:18 | * | Arrrrrrr joined #nim |
17:00:11 | * | jmdaemon joined #nim |
17:29:55 | * | Arrrrrrr quit (Ping timeout: 256 seconds) |
17:30:46 | * | Arrrrrrr joined #nim |
17:38:28 | * | Arrrrrrr quit (Read error: Connection reset by peer) |
18:06:58 | * | duuuuuude joined #nim |
18:13:09 | * | xet7 quit (Remote host closed the connection) |
18:13:55 | * | xet7 joined #nim |
18:18:29 | * | ttkap joined #nim |
18:24:35 | FromDiscord | <jmgomez> Hey guys, system.io is not available at compile time. I want to append things to a file at compile time, what should I use? |
18:28:47 | * | rockcavera joined #nim |
18:28:47 | * | rockcavera quit (Changing host) |
18:28:48 | * | rockcavera joined #nim |
18:34:15 | FromDiscord | <Prestige> I don't know if there's an answer, but why do you want to be changing files while compiling the code? |
18:36:22 | FromDiscord | <jmgomez> long story short Im emitting Nim code as a wrapper from a dynlib to another dynlib that cant be used directly (due to it being hooked by the host app) so I dont have to write the same function twice |
18:37:50 | FromDiscord | <jmgomez> I think you can execute cmds, maybe that does the trick from what I want to do but not sure if exec is available outside of nimscript? |
18:37:52 | * | kenran joined #nim |
18:38:02 | FromDiscord | <jmgomez> (edit) "from" => "for" |
18:38:51 | FromDiscord | <Prestige> There's https://nim-lang.org/docs/os.html#execShellCmd%2Cstring which may be the same |
18:40:04 | FromDiscord | <jmgomez> sent a code paste, see https://paste.rs/EN4 |
18:40:07 | FromDiscord | <jmgomez> 😦 |
18:42:50 | FromDiscord | <jmgomez> Just tried exec (inside of system.script) and it didnt work neither |
18:44:09 | FromDiscord | <jmgomez> Oh there is also staticExec |
18:50:20 | * | rockcavera quit (Read error: Connection reset by peer) |
18:50:25 | FromDiscord | <Recruit_main707> i create a tiny nim program, compile it to an exe, and then use execshellcmd with it |
18:51:39 | * | rockcavera joined #nim |
18:51:39 | * | rockcavera quit (Changing host) |
18:51:40 | * | rockcavera joined #nim |
18:51:45 | FromDiscord | <Recruit_main707> sent a code paste, see https://play.nim-lang.org/#ix=3X3Q |
18:54:06 | FromDiscord | <Recruit_main707> actually used gorge instead of execshellcmd, i think there was a reason but i dont remember already https://nim-lang.org/docs/system.html#gorge%2Cstring%2Cstring%2Cstring |
18:54:56 | FromDiscord | <soundmodel> sent a long message, see http://ix.io/3X3R |
18:55:07 | FromDiscord | <soundmodel> (edit) "http://ix.io/3X3R" => "http://ix.io/3X3S" |
18:55:16 | FromDiscord | <soundmodel> (edit) "http://ix.io/3X3S" => "http://ix.io/3X3T" |
18:56:14 | FromDiscord | <Prestige> Can you use choosenim instead? |
18:56:30 | FromDiscord | <soundmodel> (edit) "http://ix.io/3X3T" => "http://ix.io/3X3U" |
18:56:31 | FromDiscord | <soundmodel> (edit) "http://ix.io/3X3U" => "http://ix.io/3X3V" |
18:56:46 | FromDiscord | <soundmodel> In reply to @Avahe "Can you use choosenim": Possibly, but this is not the primary method for OpenSuse. |
18:57:07 | FromDiscord | <Prestige> Or any distro really, but it's been the best solution for me personally |
18:57:25 | FromDiscord | <soundmodel> In reply to @Avahe "Or any distro really,": and choosenim is not in YaST |
18:57:29 | FromDiscord | <Prestige> Seems like none of the distros package nim correctly or keep it up to date |
18:57:47 | FromDiscord | <Prestige> I just do this: https://github.com/dom96/choosenim#unix |
19:02:38 | FromDiscord | <soundmodel> In reply to @Avahe "I just do this:": Okay so I actually got nim 1.6.6 in my system under ~/.nimble/bin |
19:03:14 | FromDiscord | <soundmodel> In reply to @soundmodel "Okay so I actually": but doing nimble install distributions gives me Unsatisfied dependency: nim (>= 1.4.6) |
19:03:22 | FromDiscord | <soundmodel> (edit) "Unsatisfied" => "`Unsatisfied" | "1.4.6)" => "1.4.6)`" |
19:03:29 | FromDiscord | <Prestige> You need to get ~/.nimble/bin into your PATH |
19:03:43 | FromDiscord | <Prestige> (edit) "PATH" => "$PATH" |
19:04:09 | FromDiscord | <soundmodel> In reply to @Avahe "You need to get": I wonder where this .nimble folder is from |
19:04:35 | FromDiscord | <Prestige> From choosenim, if you just installed it |
19:04:49 | FromDiscord | <soundmodel> why does it put it there |
19:04:53 | * | Zectbumo joined #nim |
19:05:08 | FromDiscord | <soundmodel> In reply to @Avahe "From choosenim, if you": why does it put it there? When snap and YaST put it elsewhere |
19:05:35 | FromDiscord | <Prestige> Would have to ask @dom96 why he put it there (I think he's responsible for that?) |
19:07:32 | FromDiscord | <soundmodel> In reply to @Avahe "Would have to ask": also, I put this to the $PATH, and it still complains |
19:08:15 | FromDiscord | <Prestige> What's your output of `~/.nimble/bin/nim --version` and `nim --version` ? |
19:09:08 | FromDiscord | <dom96> In reply to @Avahe "Would have to ask": Because that’s where Nimble installs packages by default so you only need to add one folder to your PATH |
19:09:39 | FromDiscord | <dom96> (edit) "packages" => "packages’ binaries" |
19:09:48 | FromDiscord | <soundmodel> sent a long message, see http://ix.io/3X3Z |
19:10:14 | FromDiscord | <soundmodel> sent a long message, see https://paste.rs/h7w |
19:10:16 | FromDiscord | <UN533N_5PY> It doesn't matter where's it's at really, think of it like a program your user has ownership of↵The package manager installs it systemwide and puts it on path↵Makes sure to set the path↵(@soundmodel) |
19:10:51 | FromDiscord | <Prestige> Yeah so you still have `nim` installed @soundmodel by some other means, which is at a lower version. Uninstall it, and make sure ~/.nimble/bin is in your path |
19:12:35 | FromDiscord | <d4rckh> When you execute calc.exe from cmd for example, it runs the calculator and the cmd window doesn't get stuck (i can still type commands in it while calc is running), but if I execute calc from Nim, my program does get stuck |
19:13:12 | FromDiscord | <soundmodel> In reply to @Avahe "Yeah so you still": Yes, I uninstalled using YaST and put into the path, now it works. |
19:13:21 | FromDiscord | <d4rckh> how can I make my program not get stuck when I run the things cmd also doesn't get stuck on? |
19:13:35 | FromDiscord | <Prestige> In reply to @soundmodel "Yes, I uninstalled using": Awesome |
19:13:41 | FromDiscord | <d4rckh> Does cmd have a list of programs "to run in a separate thread"? |
19:17:53 | FromDiscord | <Alea> Ah name a more iconic duo than HN and bitching about case insensitivity on every nim post :sipinteresting: |
19:23:00 | * | gshumway quit (Quit: .) |
19:23:34 | * | jjido joined #nim |
19:24:40 | FromDiscord | <dom96> This time I gave them an excuse |
19:25:30 | FromDiscord | <eyecon> Can I use the version string in .nimble file as a compile time const somehow? |
19:25:45 | * | gshumway joined #nim |
19:26:02 | FromDiscord | <eyecon> When `nimble build`ing at least |
19:27:39 | * | droidrage quit (Ping timeout: 240 seconds) |
19:27:51 | * | qwestion quit (Ping timeout: 260 seconds) |
19:28:38 | FromDiscord | <soundmodel> anyone know good examples of OO in Nim? |
19:29:02 | FromDiscord | <soundmodel> I mean, since it was sold to me as multi-paradigm, then I assumed that it should work as a Java-replacement. |
19:29:27 | FromDiscord | <soundmodel> In reply to @soundmodel "anyone know good examples": I mean, since it was sold to me as multi-paradigm, then I assumed that it should work as a Java-replacement. |
19:30:29 | FromDiscord | <soundmodel> In reply to @soundmodel "I mean, since it": But possibly this all works out using the type system |
19:31:03 | FromDiscord | <Prestige> https://nim-by-example.github.io/oop/ has an example |
19:31:30 | FromDiscord | <Prestige> it's not super ergonomic though |
19:32:47 | FromDiscord | <dom96> In reply to @eyecon "When `nimble build`ing at": Yes. Nimble defines NimblePkgVersion or something for you (use —debug to see what it passes to Nim) |
19:33:25 | FromDiscord | <Prestige> I should write a tiny OOP lib for Nim because I keep having to write boilerplate every time I write what I'd call a "class" |
19:34:54 | FromDiscord | <soundmodel> In reply to @Avahe "I should write a": also that seemed far too simple to say "hey Nim is cleaner Java" |
19:35:23 | FromDiscord | <Prestige> I wouldn't really say they're comparable |
19:35:32 | FromDiscord | <Prestige> But I'd much rather write Nim in any case |
19:35:43 | FromDiscord | <soundmodel> In reply to @Avahe "I wouldn't really say": Yes, but surely Nim cannot dismiss the OO paradigm |
19:36:01 | FromDiscord | <soundmodel> although I believe it was argued in Python as a "second thought" |
19:36:12 | FromDiscord | <soundmodel> but Nim is not interpreted |
19:36:44 | FromDiscord | <eyecon> In reply to @dom96 "Yes. Nimble defines NimblePkgVersion": `NimblePkgVersion`, excellent, ty |
19:36:45 | FromDiscord | <Prestige> Yeah - it's definitely usable, but we don't have interfaces or abstract classes, essentially |
19:37:04 | FromDiscord | <Prestige> If you can get away without OOP with whatever you're working on, you're probably better off |
19:37:11 | FromDiscord | <soundmodel> In reply to @Avahe "Yeah - it's definitely": Well as long as someone doesn't find those useful |
19:38:40 | FromDiscord | <soundmodel> https://forum.nim-lang.org/t/2422 |
19:39:03 | FromDiscord | <soundmodel> In reply to @soundmodel "https://forum.nim-lang.org/t/2422": here it seems though that it's possible to emulate a bunch of stuff without it also seeming like it doesn't belong to the language |
19:39:24 | FromDiscord | <soundmodel> (edit) "In reply to @soundmodel "https://forum.nim-lang.org/t/2422": here it seems though that it's possible to emulate a bunch of stuff without it also seeming like it doesn't belong to the ... languageB" added "language. Compared to some other horrible cases of "lets emulate" | "language. Compared to some other horrible cases of "lets emulatelanguage ... " added "B using language A" I've seen." |
19:42:35 | * | duuuuuude quit (Ping timeout: 260 seconds) |
20:20:07 | * | kenran quit (Quit: WeeChat info:version) |
20:30:28 | * | gsalazar_ quit (Ping timeout: 248 seconds) |
20:32:20 | * | duuuuuude joined #nim |
20:49:50 | FromDiscord | <konsumlamm> when do we tell them about nimVM? |
20:56:44 | * | krux02 joined #nim |
21:16:54 | FromDiscord | <Prestige> Who? |
21:22:31 | * | Zectbumo quit (Remote host closed the connection) |
21:28:41 | * | xet7 quit (Remote host closed the connection) |
21:29:40 | * | xet7 joined #nim |
21:38:46 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
21:41:33 | FromDiscord | <tsoj> sent a long message, see http://ix.io/3X4n |
21:41:47 | * | jjido joined #nim |
21:43:04 | FromDiscord | <tsoj> The little program that I used looks like this: |
21:43:33 | FromDiscord | <tsoj> sent a code paste, see https://play.nim-lang.org/#ix=3X4p |
21:49:29 | FromDiscord | <Zectbumo> who runs the nim forum? my account is all messed up and I'm getting errors trying to signup |
21:49:42 | FromDiscord | <Zectbumo> I tried deleting and now my problem is worse |
21:52:28 | FromDiscord | <Zoom> Contact @dom96↵(@Zectbumo) |
21:52:38 | FromDiscord | <Zoom> sent a code paste, see https://play.nim-lang.org/#ix=3X4r |
21:55:01 | FromDiscord | <that_dude> did ya compile with release/danger? |
21:55:56 | FromDiscord | <Bubblie> does nim have switch statements |
21:56:19 | FromDiscord | <Bubblie> like java C# kotlin |
21:56:35 | FromDiscord | <pointystick> https://nim-lang.org/docs/tut1.html#control-flow-statements-case-statement |
21:58:05 | FromDiscord | <Bubblie> can the case statement also deal with object comparisons |
22:02:09 | FromDiscord | <Bubblie> also how good are nim threads |
22:02:15 | FromDiscord | <Zoom> Of course. With flto too (my default for danger), but that doesn't affect the Nim\>C stage of course↵(@that_dude) |
22:02:20 | FromDiscord | <Elegantbeef> Fuck i feel threatened reading that |
22:02:59 | FromDiscord | <Elegantbeef> Nim does do dead code elimination but there is no dead code technically here |
22:03:11 | FromDiscord | <Elegantbeef> Gcc will remove the useless definitions of course |
22:03:31 | FromDiscord | <Zoom> Semantically there is. |
22:03:56 | FromDiscord | <Elegantbeef> Well yea the values are not used, but they're assigned which Nim thinks means they're used |
22:04:02 | FromDiscord | <Zoom> `var X = literal` can't have side effects |
22:04:33 | FromDiscord | <Elegantbeef> This is the one of only case where the compiler doesnt do dead code elimination |
22:04:41 | FromDiscord | <Zoom> So `var x = literal; x = foo` should be tracked and optimized out |
22:05:15 | FromDiscord | <Elegantbeef> I mean if we did value tracking life would be better |
22:05:47 | FromDiscord | <Elegantbeef> the C compiler will probably remove it so it's a moot point i think, but ymmv |
22:05:47 | FromDiscord | <Zoom> I already said it doesn't. |
22:06:03 | FromDiscord | <Elegantbeef> Oh i thought you meant in the C code mybad |
22:06:07 | FromDiscord | <Elegantbeef> I misread |
22:06:55 | FromDiscord | <Elegantbeef> You wouldnt buy it's not technically dead code since operations happen and also the string constants are stored in the binary, would you? |
22:08:28 | FromDiscord | <Elegantbeef> I wonder if there is a reason for not removing that code, if you abuse the stack it could change the programs behaviour i guess |
22:09:17 | FromDiscord | <Zoom> It does with numbers, but it's much much easier to track, as it's just a simple var binding in the C code too, not with strings |
22:09:26 | FromDiscord | <Bubblie> is there any reference I can use for nim pointers? Ive been having a hard time trying to learn from the nim docs |
22:09:32 | FromDiscord | <Bubblie> sorry if I interrupted |
22:09:34 | FromDiscord | <Zoom> The operation should not happen if they have no effects |
22:09:37 | FromDiscord | <Elegantbeef> https://www.jasonbeetham.com/pointerexplanation.html#References%20-%20the%20well%20dressed%20pointers |
22:09:45 | FromDiscord | <Bubblie> thank you beef |
22:10:08 | FromDiscord | <Elegantbeef> It's an ok explanation |
22:11:54 | FromDiscord | <Zoom> @Bubblie\: you know there's a guerilla Nim book? https://ssalewski.de/nimprogramming.html#_references_and_pointers |
22:12:07 | FromDiscord | <Bubblie> holy shit no I did not |
22:12:14 | FromDiscord | <Bubblie> 👀 |
22:12:34 | FromDiscord | <Elegantbeef> With both writeups you might reason how pointers work |
22:12:35 | FromDiscord | <Elegantbeef> It's a joke 😄 |
22:12:41 | * | noeontheend quit (Ping timeout: 256 seconds) |
22:12:43 | FromDiscord | <Elegantbeef> Yea i dont know what to say this is where i walk away going "Yep i'm just a numpty" |
22:16:48 | FromDiscord | <Zoom> Technically, this should lead us to a long and windy language-design discussion of lazy/eager evaluation for which I'm totally unqualified \:( |
22:17:10 | FromDiscord | <Elegantbeef> Eh i'm unqualified to do anything but write "hello world" |
22:19:39 | FromDiscord | <Zoom> C'mon, you're almost praise-whoring by this point |
22:19:40 | FromDiscord | <Elegantbeef> Hey if i'm not self deprecating who will insult me?! |
22:20:08 | FromDiscord | <Bubblie> me |
22:20:24 | FromDiscord | <Zoom> You can always go to another channel and ask them nicely, maybe they will |
22:20:27 | FromDiscord | <Bubblie> LMAO |
22:20:38 | FromDiscord | <Bubblie> "hello sir can you please make fun of me" |
22:20:59 | FromDiscord | <Zoom> You'll probably need to provide a bit of shitty code to make them... |
22:21:07 | FromDiscord | <Bubblie> ive done that countless times |
22:21:10 | FromDiscord | <Elegantbeef> "Now taking CVs for people to insult me" |
22:21:42 | FromDiscord | <Elegantbeef> But Zoom praise whoring aside I dont have any qualifications 😛 |
22:22:21 | FromDiscord | <Elegantbeef> Except all of that code i've written |
22:22:21 | FromDiscord | <Elegantbeef> Shit always the caveat |
22:23:08 | FromDiscord | <Zoom> That would be enough for me, but I decide nothing where it would apply... |
22:24:58 | FromDiscord | <Zoom> On a serious note. I consider this behaviour a serious deficiency. Especially, considering strong metaprogramming side of Nim - it can generate a lot of code very easily and invisibly to the coder. And it all clutters the binary. I'm interested if the unused assignments actually happen. If they do that's even worse. |
22:26:08 | FromDiscord | <Zoom> I wish someone with a bit more brain matter wrote an issue for that. |
22:26:18 | FromDiscord | <Elegantbeef> Side effect free intialization should be relatively cheap since Nim expands anything it can before it gens C code |
22:26:41 | FromDiscord | <Elegantbeef> As you probably noticed your string constants are just static character arrays |
22:26:54 | FromDiscord | <Elegantbeef> Atleast on Orc/Arc |
22:27:00 | FromDiscord | <Elegantbeef> No clue if refc does the same |
22:28:52 | FromDiscord | <Bubblie> damn nim clion plugin sucks actual ass ngl |
22:28:58 | FromDiscord | <Bubblie> What does the community generally use? |
22:29:01 | FromDiscord | <Elegantbeef> Also 100% unrelated but i do like this resultant example code 😄 https://forum.nim-lang.org/t/9132#59763 |
22:29:23 | FromDiscord | <Elegantbeef> Yea the only worth wile tool is Saem's vscode or nimlsp |
22:29:24 | FromDiscord | <Elegantbeef> worthwhile\ |
22:32:06 | FromDiscord | <Bubblie> I think I will move to saem's vscode plugin |
22:32:17 | FromDiscord | <Bubblie> looks great |
22:40:18 | FromDiscord | <dom96> In reply to @tsoj "<@132595483838251008> So I tried": Oooh. Thanks for looking into this. I guess whatever your DNS returns for Google.com cannot be connected to. I wonder if we can set a shorter timeout on that connect call. |
22:40:42 | FromDiscord | <dom96> (edit) "In reply to @tsoj "<@132595483838251008> So I tried": Oooh. Thanks for looking into this. I guess whatever your DNS returns for Google.com ... cannot" added "first" |
22:46:02 | FromDiscord | <Zoom> Anyone reads asm? https://godbolt.org/z/v84reqEnr It's interesting how the version with globals only is much larger |
22:47:04 | FromDiscord | <Elegantbeef> Seems it strips them from the procedure method |
22:49:12 | FromDiscord | <Elegantbeef> Ghidra gives a bit more introspection if you're looking into this |
22:50:35 | FromDiscord | <Elegantbeef> Though i cannot read ASM so what am i talking about 😄 |
22:51:28 | FromDiscord | <Zoom> I'll probably stop investigating for now. But initial point stands, it's worth improving on the Nim side as much as possible |
22:52:21 | FromDiscord | <Elegantbeef> Dont know if you read my silly filter example, but i did redo it using concepts cause fuck yea 😛 |
22:52:40 | FromDiscord | <Elegantbeef> But anyway i gotta get ready to take my dogs for a walk before they choose violence |
22:52:53 | FromDiscord | <Zoom> Mmm? Link? |
22:53:07 | FromDiscord | <Elegantbeef> https://forum.nim-lang.org/t/9132#59763 this one |
22:53:46 | FromDiscord | <!Patitotective> the `%1 Win32` error was actually a popup saying that `libwinpthread-1.dll` was missing↵https://github.com/xmonader/nimassets/issues/14 |
22:54:17 | FromDiscord | <Zoom> Ah! Looks great! |
22:59:39 | FromDiscord | <Zoom> It's a bit backwards as your new `[]` doesn't take a proc |
23:16:12 | FromDiscord | <tsoj> @dom96 I rebooted my router and the problem vanished. In the past I already had a few very weird issues, like ssh server of one machine not working, but every other network service worked, or slowing down the ethernet connection of one specific machine. I should probably do a router restart first, every time I have a network issue now 😛 |
23:18:20 | FromDiscord | <Zectbumo> sent a long message, see http://ix.io/3X4J |
23:28:51 | FromDiscord | <Bubblie> yo the vulkan bindings for nim might be working |
23:28:53 | FromDiscord | <Bubblie> lets go |
23:29:20 | FromDiscord | <Bubblie> its time to write 800 lines to render a fucking triangle |
23:29:36 | FromDiscord | <Bubblie> and then put it on my repo on github |
23:29:49 | FromDiscord | <Bubblie> these vulkan nim bindings are great though |
23:30:01 | FromDiscord | <Zoom> sent a code paste, see https://play.nim-lang.org/#ix=3X4L |
23:30:02 | FromDiscord | <Bubblie> I just hope nothing breaks |
23:30:08 | FromDiscord | <Bubblie> I say that and that always goes wrong |
23:30:17 | FromDiscord | <Bubblie> I jinxed myself |
23:32:13 | FromDiscord | <Bubblie> okay so I may need to use quite a lot of unsafe nim for vulkan |
23:32:16 | FromDiscord | <Bubblie> https://media.discordapp.net/attachments/836012350934089728/970121091378991174/image0-2.gif |
23:32:40 | FromDiscord | <Bubblie> oh embed fail |
23:43:17 | * | vicfred joined #nim |
23:44:15 | FromDiscord | <Elegantbeef> Lambda's suck 😛 |
23:48:00 | FromDiscord | <Zoom> Less than templates doing same thing |
23:56:04 | FromDiscord | <Zoom> OK, I'm done for the night. Help me decide\: Larry Nivel or Paul McKenney? |