<< 11-09-2023 >>

00:00:03*nyeaa4928423010 quit (*.net *.split)
00:00:04*adium quit (*.net *.split)
00:00:04*deadmarshal_ quit (*.net *.split)
00:00:04*cornfeedhobo quit (*.net *.split)
00:00:05*syl quit (*.net *.split)
00:00:05*koltrast quit (*.net *.split)
00:00:05*jkl quit (*.net *.split)
00:00:05*ttkap quit (*.net *.split)
00:00:05*lumidify quit (*.net *.split)
00:00:05*FromDiscord quit (*.net *.split)
00:00:05*attah quit (*.net *.split)
00:00:05*mal`` quit (*.net *.split)
00:00:05*anddam quit (*.net *.split)
00:00:21*FromDiscord joined #nim
00:00:22*nyeaa4928423010 joined #nim
00:00:36*anddam joined #nim
00:01:29*anddam quit (Changing host)
00:01:29*anddam joined #nim
00:03:22*syl joined #nim
00:03:28*mal`` joined #nim
00:04:39*ttkap joined #nim
00:05:02*koltrast joined #nim
00:05:50*lumidify joined #nim
00:06:05*attah joined #nim
00:06:06*deadmarshal_ joined #nim
00:06:17*jkl joined #nim
00:06:49*krux02 quit (Remote host closed the connection)
00:08:10*adium joined #nim
00:11:59*cornfeedhobo joined #nim
00:12:40FromDiscord<kingterrytheterrible12> Where do i suggest an RFC
00:15:21FromDiscord<demotomohiro> https://github.com/nim-lang/RFCs
00:24:11FromDiscord<kingterrytheterrible12> In reply to @demotomohiro "https://github.com/nim-lang/RFCs": Done
00:24:23FromDiscord<kingterrytheterrible12> Gonna try to boot the javascript backend off nim
00:25:16FromDiscord<demotomohiro> You created this?↵https://github.com/nim-lang/RFCs/issues/531
00:25:35FromDiscord<kingterrytheterrible12> Yws
00:25:39FromDiscord<kingterrytheterrible12> (edit) "Yws" => "Yes"
00:27:01FromDiscord<raynei486> nice trolling 💀
00:27:05FromDiscord<kingterrytheterrible12> The js backend makes no sense to exist at this point
00:27:09FromDiscord<kingterrytheterrible12> In reply to @raynei486 "nice trolling 💀": Really
00:27:27FromDiscord<kingterrytheterrible12> So your telling me im gonna sit here and write a whole proposal just to troll
00:28:05FromDiscord<kingterrytheterrible12> I mean just read the rfc its self explanatory
00:28:39FromDiscord<kingterrytheterrible12> Just compile C with emscripten and now you have more dev time due to not maintaining a whole backend
00:29:06FromDiscord<raynei486> take a look at what the top few nim repositories on github are
00:29:13FromDiscord<raynei486> this won't just be a breaking change
00:29:33FromDiscord<kingterrytheterrible12> What are they
00:29:44FromDiscord<kingterrytheterrible12> iirc they all just SSR frameworks
00:30:22FromDiscord<kingterrytheterrible12> I mean i suggested we remove the js backend in nim 3.0
00:30:37FromDiscord<kingterrytheterrible12> So there is more than enough time to do everything
00:35:30*azimut quit (Ping timeout: 246 seconds)
00:38:20FromDiscord<Elegantbeef> Lol
00:38:30FromDiscord<Elegantbeef> No rational reason to remove the working backend
00:38:33FromDiscord<Elegantbeef> this has to be troll
00:39:00FromDiscord<kingterrytheterrible12> Suit yourself
00:39:16FromDiscord<kingterrytheterrible12> The dev time cannot be split between 3 backends and 1 of them is close to useless
00:39:42FromDiscord<kingterrytheterrible12> Emscripten and C will achieve the same purpose as the js backend or even better
00:39:49FromDiscord<Elegantbeef> Except it doesnt
00:39:59FromDiscord<kingterrytheterrible12> How so
00:40:10FromDiscord<kingterrytheterrible12> The photoshop suite was ported all to the web with emscripten
00:40:15FromDiscord<Elegantbeef> Wasm still does not have access to the dom without js as far as i know
00:40:18FromDiscord<kingterrytheterrible12> Figma uses emscripten
00:40:37FromDiscord<kingterrytheterrible12> In reply to @Elegantbeef "Wasm still does not": Emscripten will generate the necessary code iirc
00:40:53FromDiscord<kingterrytheterrible12> Idk its just a proposal you can reject it a guess
00:41:08FromDiscord<Elegantbeef> Is it even a proposal, it doesnt have any argument really
00:41:16FromDiscord<kingterrytheterrible12> Thats why its called a proposal not a mandate 💀
00:41:48FromDiscord<kingterrytheterrible12> In reply to @Elegantbeef "Wasm still does not": And probably will never have too
00:42:02FromDiscord<kingterrytheterrible12> There was an RFC about it and it got rejected
00:42:38FromDiscord<Elegantbeef> Your proposal is pretty silly as it's not realistic the JS backend is hardly ever touched
00:42:50FromDiscord<kingterrytheterrible12> Maybe maybe not
00:43:13FromDiscord<kingterrytheterrible12> It still requires maintenance though
00:43:37FromDiscord<kingterrytheterrible12> But idk i dont think removing a backend is even possible in a lang thats not just 1.0 but 2.0
00:43:50FromDiscord<Elegantbeef> So then why did you make the proposal?
00:43:55FromDiscord<kingterrytheterrible12> Try it
00:44:07FromDiscord<kingterrytheterrible12> Its a PROPOSAL
00:44:17FromDiscord<kingterrytheterrible12> it takes 5 mins to read and 1 click to reject
00:44:25FromDiscord<Elegantbeef> Right, you should propose things you think are good ideas
00:45:23FromDiscord<Elegantbeef> Just wait for araqs response, I know it'll be a good one
00:45:40FromDiscord<kingterrytheterrible12> In reply to @Elegantbeef "Just wait for araqs": Ong he probably gonna go ham or something
00:45:52FromDiscord<kingterrytheterrible12> But eh why not its worth a shot
00:47:00FromDiscord<kingterrytheterrible12> The idea sounds crazy but here me out
00:47:45FromDiscord<kingterrytheterrible12> Maintaining one less backend and shifting the work into an offical gui library will probably cause nim to get much more attention
00:48:16FromDiscord<Elegantbeef> That's not based in reality though
00:48:25FromDiscord<Elegantbeef> The js backend is relatively untouched
00:49:12FromDiscord<kingterrytheterrible12> In reply to @Elegantbeef "The js backend is": Will it remain untouched forever?
00:49:26FromDiscord<Elegantbeef> Depends on if new features/changes require work on it
00:49:46FromDiscord<kingterrytheterrible12> It probably is a good idea nim 3.0 is probably coming in like 2030
00:50:09FromDiscord<Elegantbeef> https://github.com/nim-lang/Nim/commits/devel/compiler/jstypes.nim↵https://github.com/nim-lang/Nim/commits/devel/compiler/jsgen.nim↵You can see for yourself
00:53:06FromDiscord<kingterrytheterrible12> Damn
00:53:11FromDiscord<kingterrytheterrible12> I guess i was wrong
00:53:20FromDiscord<kingterrytheterrible12> Should i close the rfc?
00:53:29FromDiscord<Elegantbeef> You do you
00:53:45FromDiscord<kingterrytheterrible12> Eh fuck it im gonna leave it open
00:59:27FromDiscord<raynei486> In reply to @Elegantbeef "Just wait for araqs": oh yeah
00:59:31FromDiscord<taperfade> https://media.discordapp.net/attachments/371759389889003532/1150596448585515008/IMG_2584.jpg
00:59:42FromDiscord<taperfade> Jerboa
01:00:36FromDiscord<raynei486> something about good engineers and their temper
01:00:40FromDiscord<kingterrytheterrible12> In reply to @taperfade "": Tf is that
01:00:43FromDiscord<raynei486> araq reminds me of linus
01:00:50FromDiscord<kingterrytheterrible12> In reply to @raynei486 "something about good engineers": Do you know what is an RFC
01:00:55FromDiscord<kingterrytheterrible12> its in its name
01:00:57FromDiscord<taperfade> Whos araq
01:00:58FromDiscord<raynei486> yeah
01:01:02FromDiscord<kingterrytheterrible12> Request for comments
01:01:04FromDiscord<kingterrytheterrible12> So
01:01:30FromDiscord<kingterrytheterrible12> Yall can suck it if you dont like it its a proposal for a reason
01:01:39FromDiscord<kingterrytheterrible12> Ong yall acting like we already booted it off the lang
01:01:51FromDiscord<taperfade> ??
01:01:57FromDiscord<taperfade> What are u waffling abt rn
01:01:59FromDiscord<kingterrytheterrible12> In reply to @taperfade "Whos araq": The creator of this lang
01:02:05FromDiscord<kingterrytheterrible12> He here
01:02:11FromDiscord<taperfade> Wow
01:02:12FromDiscord<kingterrytheterrible12> Hes pretty respectful
01:02:29FromDiscord<taperfade> Andreas Rumpf
01:02:32FromDiscord<taperfade> 😧
01:02:34FromDiscord<kingterrytheterrible12> Yes
01:02:39FromDiscord<taperfade> Cool
01:02:51FromDiscord<kingterrytheterrible12> He mostly just chills in #internals
01:03:03FromDiscord<kingterrytheterrible12> I doubt he wants to see all our retarded takes
01:03:12FromDiscord<taperfade> True
01:04:05FromDiscord<kingterrytheterrible12> Also we need an official nim gui toolkit
01:04:07FromDiscord<kingterrytheterrible12> Badly
01:04:23FromDiscord<raynei486> In reply to @kingterrytheterrible12 "Yall can suck it": I mean yeah↵but I'm mainly here now to see how araq would react lol
01:04:37FromDiscord<raynei486> In reply to @kingterrytheterrible12 "Also we need an": I think there was a post on nim forums
01:04:42FromDiscord<kingterrytheterrible12> Most nim toolkits are here today and unmaintained by tomorrow
01:04:49FromDiscord<kingterrytheterrible12> In reply to @raynei486 "I think there was": The araq wishlist
01:04:52FromDiscord<kingterrytheterrible12> I've seen it
01:05:16FromDiscord<kingterrytheterrible12> Although to collect the skills necessary to build a none shit gui library i need probably 3 years
01:06:00FromDiscord<raynei486> and many years of community effort
01:06:08FromDiscord<raynei486> nim community just too small rn
01:06:22FromDiscord<kingterrytheterrible12> In reply to @raynei486 "I mean yeah but": Like this probably https://media.discordapp.net/attachments/371759389889003532/1150598175451791390/yt1s.com_-_Patrick_Bateman_Staring_into_your_soul.mp4
01:06:25FromDiscord<raynei486> nim can do a lot of things but not enough people to power that promise
01:06:46FromDiscord<raynei486> In reply to @kingterrytheterrible12 "Like this probably": ok this is hilarious
01:06:47FromDiscord<kingterrytheterrible12> Yes
01:06:57FromDiscord<kingterrytheterrible12> And when i say we need a gui toolkit badly
01:07:00FromDiscord<kingterrytheterrible12> I mean BADLY
01:07:08FromDiscord<kingterrytheterrible12> like REALLY BAD
01:07:20FromDiscord<raynei486> maybe we need a javascript runtime :trolol:
01:07:24FromDiscord<taperfade> guys i found a job
01:07:28FromDiscord<kingterrytheterrible12> bruh
01:07:37FromDiscord<kingterrytheterrible12> In reply to @taperfade "guys i found a": Arent you a women
01:07:40FromDiscord<taperfade> yes
01:07:43FromDiscord<kingterrytheterrible12> Back to the kitchen
01:07:45FromDiscord<raynei486> In reply to @kingterrytheterrible12 "Arent you a women": wat
01:07:46FromDiscord<taperfade> as a graphics designer
01:07:47FromDiscord<taperfade> and
01:07:50FromDiscord<taperfade> programmer
01:07:56FromDiscord<taperfade> but i avoid programming part
01:07:58FromDiscord<raynei486> In reply to @kingterrytheterrible12 "Back to the kitchen": bruh are you 14 💀
01:08:03FromDiscord<taperfade> bcs i need to learn js
01:08:06FromDiscord<kingterrytheterrible12> In reply to @raynei486 "bruh are you 14": Im literally 20
01:08:08FromDiscord<taperfade> and im learning nim rn
01:08:10FromDiscord<kingterrytheterrible12> I can send you id RN
01:08:16FromDiscord<raynei486> im good
01:08:25FromDiscord<raynei486> dont let discord see
01:08:28FromDiscord<taperfade> i can get paid 80k a year
01:08:36FromDiscord<raynei486> remote?
01:08:37FromDiscord<taperfade>
01:08:39FromDiscord<taperfade> yup
01:08:48FromDiscord<taperfade> 80k a year at 15
01:09:18FromDiscord<taperfade> wait
01:09:23FromDiscord<taperfade> does nim compile to js ?
01:09:28FromDiscord<taperfade> it does to c right
01:09:29FromDiscord<kingterrytheterrible12> 💀
01:09:38FromDiscord<kingterrytheterrible12> Where was bro at this whole time
01:09:43FromDiscord<taperfade> idk
01:09:45FromDiscord<taperfade> wdym
01:09:51FromDiscord<kingterrytheterrible12> Its not gonna compile to js soon 😈😈
01:10:01FromDiscord<taperfade> <:GO_catStanding:1133402101205192734>
01:10:37FromDiscord<raynei486> In reply to @taperfade "80k a year at": where is that for me
01:10:43FromDiscord<raynei486> is freedom land doomed
01:10:45FromDiscord<taperfade> secret
01:10:47FromDiscord<raynei486> do I need to be in europe
01:10:50FromDiscord<kingterrytheterrible12> Bro you compiler dev
01:10:51FromDiscord<taperfade> yes
01:10:56FromDiscord<kingterrytheterrible12> Go work on carbon
01:10:57FromDiscord<kingterrytheterrible12> Ong
01:11:00FromDiscord<taperfade> it will imporve your quality of life
01:11:06FromDiscord<taperfade> less chemicals
01:11:10FromDiscord<PingusMcDuck> Your 15 years old and make 80k?
01:11:12FromDiscord<taperfade> more walkable cities
01:11:15FromDiscord<taperfade> In reply to @PingusMcDuck "Your 15 years old": yup
01:11:18FromDiscord<kingterrytheterrible12> In reply to @PingusMcDuck "Your 15 years old": Its called lying
01:11:20FromDiscord<taperfade> not confirmed tho
01:11:32FromDiscord<raynei486> In reply to @kingterrytheterrible12 "Go work on carbon": fr
01:11:35FromDiscord<kingterrytheterrible12> In reply to @kingterrytheterrible12 "Its called lying": Politicians love it
01:11:42FromDiscord<taperfade> could be anywhere between 50-100k
01:11:45FromDiscord<taperfade> its so fucking insane
01:11:52FromDiscord<taperfade> its a small niche
01:12:07FromDiscord<kingterrytheterrible12> Bro im gonna work IT and imma make like 500 dollar a month 💀
01:12:12FromDiscord<kingterrytheterrible12> But its 2 days a week
01:12:15FromDiscord<PingusMcDuck> You should just save it all, put it into the etf VOE, retire at 45 with the 4 million dollars
01:12:29FromDiscord<taperfade> thinking of doing tha
01:12:45FromDiscord<taperfade> but i will definitely use some of the money just for fun
01:12:51FromDiscord<raynei486> In reply to @taperfade "more walkable cities": I once had those when I was still in east asia
01:13:00FromDiscord<taperfade> asia doesnt count
01:13:01FromDiscord<raynei486> ok but new york isn't that bad
01:13:03FromDiscord<kingterrytheterrible12> In reply to @raynei486 "I once had those": Thailand?
01:13:16FromDiscord<taperfade>
01:13:17FromDiscord<raynei486> In reply to @kingterrytheterrible12 "Thailand?": no the one that's red
01:13:24FromDiscord<kingterrytheterrible12> CHINA
01:13:34FromDiscord<kingterrytheterrible12> CHING CHONG BING BONG MF
01:13:43FromDiscord<raynei486> that's me
01:13:52FromDiscord<PingusMcDuck> You can retire at 45, screw having fun at 15, play some freemium games and ride a bike
01:13:52FromDiscord<kingterrytheterrible12> Whats your social credit
01:13:57FromDiscord<Nelson> dude go to sleep↵(@kingterrytheterrible12)
01:14:03FromDiscord<kingterrytheterrible12> In reply to @Nelson "dude go to sleep": No
01:14:11FromDiscord<kingterrytheterrible12> Imma rawdog this for 4 more hours
01:14:18FromDiscord<Nelson> poor guy lmao
01:14:39FromDiscord<kingterrytheterrible12> Ong
01:14:40FromDiscord<raynei486> In reply to @kingterrytheterrible12 "Whats your social credit": probably 0 because I'm living in new york lmao
01:14:43FromDiscord<taperfade> In reply to @kingterrytheterrible12 "CHING CHONG BING BONG": ban Muahahaha
01:14:47FromDiscord<taperfade> In reply to @PingusMcDuck "You can retire at": yeah
01:14:47FromDiscord<kingterrytheterrible12> Pre calculus + all nighter
01:14:49FromDiscord<taperfade> hmmm
01:14:50FromDiscord<taperfade> idk
01:14:59FromDiscord<raynei486> mods here
01:15:02FromDiscord<Nelson> take a copious amount of caffeine.↵(@kingterrytheterrible12)
01:15:06FromDiscord<kingterrytheterrible12> In reply to @taperfade "ban Muahahaha": Its a joke
01:15:09FromDiscord<taperfade> ill prob buy myself a nice mx5 at 18
01:15:16FromDiscord<kingterrytheterrible12> In reply to @Nelson "take a copious amount": How many coffee cups
01:15:17FromDiscord<taperfade> and some other necessary stuff
01:15:19FromDiscord<Nelson> a racist joke is still racism lmao
01:15:25FromDiscord<Nelson> a copious amount↵(@kingterrytheterrible12)
01:15:29FromDiscord<Nelson> 50 at least
01:15:31FromDiscord<ringabout> Warning: This is main channel, which is used to talk about the Nim language. Please chat about unrelated topic in the offtopic channel.
01:15:32FromDiscord<taperfade> rest will be invested and stuff
01:15:40FromDiscord<kingterrytheterrible12> In reply to @Nelson "a copious amount (<@655759729477287956>)": Thats death
01:15:43FromDiscord<taperfade> but hmm
01:15:51FromDiscord<kingterrytheterrible12> In reply to @ringabout "Warning: This is main": Oh hello mrs mod
01:15:54FromDiscord<taperfade> i can also do programming to earn extra
01:15:54FromDiscord<kingterrytheterrible12> Or mr
01:15:55FromDiscord<kingterrytheterrible12> Idk
01:15:57FromDiscord<Nelson> Yeah I agree! I was about to ask something about nim but I forgot what it was \:(↵(@ringabout)
01:15:57FromDiscord<taperfade> but they need a lua dev
01:15:59FromDiscord<taperfade> not nim
01:16:04FromDiscord<kingterrytheterrible12> I straight up assumed their gender
01:16:04FromDiscord<taperfade> also im bad at nim so lol
01:16:16FromDiscord<kingterrytheterrible12> Ok come #offtopic
01:18:02FromDiscord<Nelson> Sorry for being lazy, but how can i generate the lightest possible nim binary?
01:18:12FromDiscord<Nelson> like, C's -O3
01:18:24FromDiscord<Nelson> frick it, i'ma search it on the docs lmao
01:19:38FromDiscord<raynei486> as in size?
01:19:53FromDiscord<Nelson> yeah but dont worry, it's all fine now \:)
01:20:10FromDiscord<raynei486> yeah it's the `--opt:size` flag which I assume you found
01:20:17FromDiscord<Nelson> why does times.nim use GC memory..............
01:20:34FromDiscord<Nelson> imagen.png https://media.discordapp.net/attachments/371759389889003532/1150601748390621254/imagen.png
01:20:36FromDiscord<Nelson> smol baby \:)
01:21:02FromDiscord<kingterrytheterrible12> Its huge wdym
01:21:07FromDiscord<Nelson> i wonder if i can get this to compile with static SDL for ARMv5
01:21:20FromDiscord<kingterrytheterrible12> Static link glibc
01:21:25FromDiscord<Nelson> it's actually really small for all that i crammed inside, dont worry
01:21:28FromDiscord<kingterrytheterrible12> And its gonna probably be like 70 kb
01:21:32FromDiscord<Nelson> breaks gpu acceleration on linux.↵(@kingterrytheterrible12)
01:21:39FromDiscord<kingterrytheterrible12> In reply to @Nelson "breaks gpu acceleration on": Oh damn
01:22:03FromDiscord<Nelson> musl doesnt work either, trust me, i have experience with it, sadly.......
01:22:28FromDiscord<kingterrytheterrible12> Upx?
01:22:47FromDiscord<Nelson> The zig folk actually came up with an insane idea to create portable binaries across all linux distros, disregarding libc version, using some insane hack regarding ELF patching
01:22:50FromDiscord<Nelson> and worst of it all, it WORKED
01:23:00FromDiscord<Nelson> ..... but then they dropped the project to focus on the compiler
01:23:25FromDiscord<Nelson> this idea was continued by the people working with Cosmopolitan rn
01:23:49FromDiscord<raynei486> yeah it's pretty nuts
01:23:51FromDiscord<Nelson> but they also aimed to create OS-independent hardware acceleration! a single binary for ALL platforms
01:23:51FromDiscord<Nelson> ... sadly it broke
01:24:18FromDiscord<Nelson> zig users when they actually do something useful\:
01:24:43FromDiscord<kingterrytheterrible12> How do you even make an os independent binary?
01:24:57FromDiscord<Nelson> HAHA HEH YOU DONT WANT TO GO DOWN THAT RABBIT HOLE↵(@kingterrytheterrible12)
01:25:14FromDiscord<Nelson> anyways the trick is that a lot of the stuff we use across systems has actually the same contents with different formats
01:25:44FromDiscord<Nelson> https://justine.lol/ape.html
01:25:45FromDiscord<Nelson> Check this out
01:25:45FromDiscord<kingterrytheterrible12> So
01:25:55FromDiscord<kingterrytheterrible12> Decode them on the fly?
01:26:11FromDiscord<Nelson> basically this nerdy girl working with Android found out that you can make a fucking frankenstein file that had every single executable format on it
01:26:12FromDiscord<Nelson> at the same time
01:26:21FromDiscord<Nelson> using VERY CAREFUL code
01:26:36FromDiscord<kingterrytheterrible12> Wifey type
01:27:06FromDiscord<Nelson> she ended up turning her idea into a whole LibC, like Musl but it aims to work under ANY OS, by doing some insane bs in runtime
01:27:22FromDiscord<Nelson> it doesnt have much of a performance penalty but it's 100% not ready for production lmao
01:28:35FromDiscord<Nelson> oops this is mega offtopic
01:28:36FromDiscord<Nelson> bye
01:41:24FromDiscord<Nelson> Any way to cross-compile this horrid beast?↵https://github.com/Vladar4/sdl2_nim
01:41:49FromDiscord<Elegantbeef> Since it uses dynlib it should just work
01:42:03FromDiscord<Nelson> oh cool! oh, what's the command for cross-compiling though?
01:42:08FromDiscord<Nelson> wait maybe i can search it mself
01:43:39FromDiscord<raynei486> you can just tell nim the architecture if you already have the cross compiling toolchain installed
01:44:22FromDiscord<Nelson> sounds cool
01:45:10FromDiscord<raynei486> as for the command...↵just search for it in the compiler user guide :)
01:46:04FromDiscord<Nelson> imagen.png https://media.discordapp.net/attachments/371759389889003532/1150608165050790000/imagen.png
01:46:18FromDiscord<Nelson> doesnt seem like -d\:mingw is working \:(
01:46:29FromDiscord<Nelson> i do have mingw64-gcc installed
01:46:35FromDiscord<raynei486> In reply to @raynei486 "as for the command...": .
01:46:45FromDiscord<raynei486> it has a section for cross compiling to windows
01:46:51FromDiscord<Nelson> yeah i'm literally looking at it right now.↵(@raynei486)
01:46:58FromDiscord<Nelson> that's what it told me to do
01:48:25FromDiscord<Elegantbeef> If you have mingw installed it should work
01:48:27FromDiscord<Nelson> nevermind it was an extra argument i had.. apparently...............
01:48:43FromDiscord<Nelson> nim is magic
01:49:31FromDiscord<Nelson> now i wonder, could i compile this statically for armv5
01:50:05FromDiscord<Elegantbeef> Even more magical if you have `nim c -r` it'll run in wine
01:50:05FromDiscord<Nelson> this language really was designed to be comfortable, huh
01:50:06FromDiscord<Nelson> wow, it's beautiful
01:50:11FromDiscord<Nelson> [Edit](https://discord.com/channels/371759389889003530/371759389889003532/1150609178067472445): this language really was designed to be comfortable, huh?
01:54:33FromDiscord<Nelson> yaaaay!!! my thingy runs on wine now!
01:54:33FromDiscord<Nelson> imagen.png https://media.discordapp.net/attachments/371759389889003532/1150610300048003072/imagen.png
02:02:59FromDiscord<raynei486> Nim magic
02:04:52FromDiscord<kingterrytheterrible12> In reply to @Nelson "imagen.png": Is that fucking gnome
02:07:41FromDiscord<Nelson> yeah↵(@kingterrytheterrible12)
02:07:53FromDiscord<kingterrytheterrible12> In reply to @Nelson "yeah (<@655759729477287956>)": Disgusting
02:07:59FromDiscord<kingterrytheterrible12> But hey at least its linux
02:08:14FromDiscord<Nelson> if you go on, and start ranting about how bad gnome is, consider the idea of not caring about DEs as if they were religion
02:08:37FromDiscord<Nelson> i have tried every DE, every window manager, every distro (almost, nobody can do that.)↵and i just got tired, honestly
02:08:49FromDiscord<kingterrytheterrible12> In reply to @Nelson "i have tried every": Did you try cinnamon
02:09:15FromDiscord<Nelson> i wanted something that would focus me, put me on the driver's seat for good, something that would push me forwards and would be sophisticated enough for me to go on and expect things to work properly
02:09:22FromDiscord<Nelson> I abandoned X11 long ago↵(@kingterrytheterrible12)
02:09:35FromDiscord<kingterrytheterrible12> Why
02:09:38FromDiscord<kingterrytheterrible12> X is good
02:09:40*hexeme_ quit (Server closed connection)
02:09:50FromDiscord<kingterrytheterrible12> As long as you dont have 2 monitors with seperate refresh rates
02:10:16FromDiscord<Nelson> Cinnamon had this issue of having absolutely abhorrent vsync issues and just felt extremely laggy and stuttery in comparison to GNOME in all of my devices, even the low end ones
02:10:17FromDiscord<Nelson> because, x11 is not equipped to understand timing
02:10:58FromDiscord<Nelson> X is not good, trust me, i've worked with both Wayland and X11 by myself, from scratch, and I can tell you that the fundamentals between X and Wayland are very different, and that Wayland has better design
02:11:04*hexeme joined #nim
02:11:11FromDiscord<Nelson> it's just that wayland has The Linux Issue™ of nobody agreeing with eachother
02:11:15FromDiscord<Nelson> implementing dumbass standards
02:11:18FromDiscord<kingterrytheterrible12> Yes bc X is ancient software
02:11:22FromDiscord<Nelson> yes
02:11:35FromDiscord<kingterrytheterrible12> We stuck with it bc of nvidia
02:11:42FromDiscord<Nelson> yeah, so sad
02:12:04FromDiscord<Nelson> I've just had bad experiences with nvidia overall, just... bad experiences
02:12:15FromDiscord<Nelson> from a gamedev standpoint, and as a user of nvidia
02:12:15FromDiscord<kingterrytheterrible12> If only nvidia gives uss foss drivers then we can boot xorg off existence
02:12:35FromDiscord<Nelson> they're trying, but only for their new cards \:/↵(@kingterrytheterrible12)
02:12:53FromDiscord<kingterrytheterrible12> The foss kenel does nothing really
02:13:00FromDiscord<kingterrytheterrible12> We need the whole thing foss
02:13:11FromDiscord<Nelson> to be fair, we cannot just go like "x11 bad!!" because to be honest, x11 was designed for an era that does not reflect what we use nowadays
02:13:19FromDiscord<kingterrytheterrible12> Exactly
02:13:36FromDiscord<kingterrytheterrible12> X served us well for the time being
02:13:48FromDiscord<Nelson> like, i dont think they expected us to have a co-processor running a shit-ton of threads over memory, operating in real time, doing a lot of stuff behind the courtains
02:14:06FromDiscord<Nelson> X11 was designed, for computers that essentially just connected to a server, and then sent commands over the network
02:14:24FromDiscord<Nelson> Wayland is absolutely NOT ready either, unless you're on GNOME, which is SUPER lame.
02:14:37FromDiscord<breadpudding> It's really hard to see into the future, but they did a really good job seeing that we're still using X today.
02:14:52FromDiscord<kingterrytheterrible12> X12 when
02:14:56FromDiscord<Nelson> yeah, and also, it was the x11 people who designed wayland anyways↵(@breadpudding)
02:15:42FromDiscord<kingterrytheterrible12> I heard xorg had its own printer implementation lmao
02:16:03FromDiscord<Nelson> the way wayland works is that it just gets rid of ALL the serverisms that x11 had, where most of the rendering and magic happened on the server, like, the UI was originally meant to be commands sent over the network, which got rendered by the server itself!↵↵wayland just... gives you a "surface", and then just draw to it using some graphics api, it literally just gives you a little piece of VRAM lmao
02:16:31FromDiscord<Nelson> since absolutely nobody uses the UI stuff that x11 had anymore
02:16:42FromDiscord<Nelson> it had absolutely everything built in lmao, everything!↵(@kingterrytheterrible12)
02:16:43FromDiscord<kingterrytheterrible12> I wonder if wayland is good on nvidia
02:16:49FromDiscord<kingterrytheterrible12> (edit) "nvidia" => "amd"
02:16:59FromDiscord<Nelson> the kde people have been doing some great advancements on it!↵(@kingterrytheterrible12)
02:17:12FromDiscord<Nelson> from "EUGHHH" to "Huh..."
02:17:16FromDiscord<breadpudding> By the way, does anybody have any good resources for C interop with Nim? I'm trying to work with an incredibly low-level interface and being able to work with high level types would be great(Example: Using actual arrays rather than pointers pretending to be arrays)
02:17:46FromDiscord<kingterrytheterrible12> In reply to @breadpudding "By the way, does": Why dont you write the whole function in assembly
02:17:54FromDiscord<kingterrytheterrible12> Define it as an extern then link the assembly
02:17:57FromDiscord<Nelson> afaik there's a little thingy you can use named "c2nim"; and it just translates C headers to nim stuff↵(@breadpudding)
02:18:14FromDiscord<Nelson> i was about to say this was dumb until i thought about it for a sec...↵why not make it in assembly? really?↵(@kingterrytheterrible12)
02:18:21FromDiscord<kingterrytheterrible12> In reply to @breadpudding "By the way, does": Try futhrak by pmunch
02:18:25FromDiscord<Nelson> if it's THAT low level, wouldnt it be better to just do inline assembly? lmao
02:18:33FromDiscord<kingterrytheterrible12> No not inline
02:18:41FromDiscord<kingterrytheterrible12> Define it as an extern function
02:18:47FromDiscord<kingterrytheterrible12> Then write the function in asm
02:18:48FromDiscord<Nelson> sorry maybe i used the wrong name lol
02:18:52FromDiscord<kingterrytheterrible12> Then link it to C
02:18:55FromDiscord<Nelson> yeah that'd be better↵(@kingterrytheterrible12)
02:19:07FromDiscord<breadpudding> Well I'm using Nim so I don't have to use Assembly(or a bunch of other languages)...
02:19:19FromDiscord<Nelson> oh...↵(@breadpudding)
02:19:28FromDiscord<breadpudding> Let me show you what I mean
02:19:30FromDiscord<Nelson> so you want convenience hm↵↵try using c2nim
02:19:41FromDiscord<Nelson> i think it can actually just turn C code into nim but i'm not sure
02:20:02FromDiscord<breadpudding> sent a code paste, see https://play.nim-lang.org/#ix=4FZg
02:20:22FromDiscord<kingterrytheterrible12> I see framebuffer
02:20:23FromDiscord<kingterrytheterrible12> Im out
02:20:34FromDiscord<Nelson> u h o h
02:20:37FromDiscord<raynei486> sent a code paste, see https://play.nim-lang.org/#ix=4FZi
02:20:38FromDiscord<breadpudding> Doing some good ol' OSDev
02:20:44FromDiscord<breadpudding> And I have no idea how to use Nim
02:20:45FromDiscord<kingterrytheterrible12> In nim
02:20:45FromDiscord<Nelson> BASED
02:20:52FromDiscord<kingterrytheterrible12> Wtf is bro cooking
02:21:01FromDiscord<Nelson> OSDev in Nim sounds based↵(@kingterrytheterrible12)
02:21:06FromDiscord<kingterrytheterrible12> Sound bad
02:21:08FromDiscord<kingterrytheterrible12> Very bad
02:21:08FromDiscord<Nelson> as long as you're doing all without a GC i guess...?
02:21:15FromDiscord<breadpudding> It's been an incredibly cursed journey so far
02:21:16FromDiscord<breadpudding> And yes
02:21:24FromDiscord<kingterrytheterrible12> Bc it aint meant to replace C
02:21:26FromDiscord<Nelson> what is your proposition? C++? lol↵(@kingterrytheterrible12)
02:21:34FromDiscord<kingterrytheterrible12> yes
02:21:42FromDiscord<kingterrytheterrible12> But disable vtables and rtti
02:21:55FromDiscord<raynei486> honestly that's pretty nice
02:21:59FromDiscord<raynei486> modern c++ ain't half bad
02:22:05FromDiscord<kingterrytheterrible12> Its not bad at all
02:22:06FromDiscord<raynei486> once you get deranged enough
02:22:09FromDiscord<raynei486> jk
02:22:09FromDiscord<Nelson> and rely only on stack memory
02:22:16FromDiscord<kingterrytheterrible12> Whats bad is other programmers abusing all its features
02:22:27FromDiscord<breadpudding> `UncheckedArray` might be what I want in this case
02:22:27FromDiscord<raynei486> suffering from same issue as nim
02:22:30FromDiscord<raynei486> too much features
02:22:34FromDiscord<raynei486> need to use them responsibility
02:22:36FromDiscord<Nelson> honestly yes, i've seen some really beautiful C++ code↵(@kingterrytheterrible12)
02:22:41FromDiscord<Nelson> then there's ABSOLUTE PSYCHOPATHS
02:22:42FromDiscord<raynei486> (edit) "responsibility" => "responsibly"
02:22:42FromDiscord<kingterrytheterrible12> In reply to @Nelson "and rely only on": Bro osdev wiki tells you the first think you should implement is dynamic mem alloc
02:22:45FromDiscord<Nelson> WRITING ABSTRACTIONS OVER ABSTRACTIONS
02:22:48*mahlon quit (Server closed connection)
02:22:51FromDiscord<kingterrytheterrible12> In reply to @Nelson "then there's ABSOLUTE PSYCHOPATHS": We do a lil macro abuse
02:22:52FromDiscord<Nelson> TEMPLATES OVER TEMPLATES OVER TEMPLATES OVER TEMPLATES
02:23:02FromDiscord<Nelson> DOING THE MOST CURSED OPERATOR OVERRIDES
02:23:04FromDiscord<breadpudding> In reply to @kingterrytheterrible12 "Bro osdev wiki tells": Really? lol
02:23:15FromDiscord<kingterrytheterrible12> In reply to @breadpudding "Really? lol": I think so yes
02:23:17FromDiscord<raynei486> In reply to @breadpudding "`UncheckedArray` might be what": yeah because nim pointers only point to one thing, not to a block of memory
02:23:25FromDiscord<Nelson> "ah yes do the bitshift trick again, aha! splendid, yes, make it look special for no fucking reason"
02:23:29*mahlon joined #nim
02:23:36FromDiscord<breadpudding> In reply to @raynei486 "yeah because nim pointers": I noticed that, attempted pointer arithmetic, and realized I was probably doing something wrong.
02:23:36FromDiscord<kingterrytheterrible12> In reply to @Nelson ""ah yes do the": 💀
02:23:37FromDiscord<Nelson> cool}↵(@raynei486)
02:23:42FromDiscord<kingterrytheterrible12> Quake 3 algo moment
02:23:50FromDiscord<Elegantbeef> So when the inane commentary stops ....
02:23:54FromDiscord<Nelson> no i meant the whole std\:\:stream thing↵(@kingterrytheterrible12)
02:24:19FromDiscord<kingterrytheterrible12> In reply to @Nelson "no i meant the": I dont think this means << bitshift in cpp
02:24:28FromDiscord<Nelson> it does↵(@kingterrytheterrible12)
02:24:33FromDiscord<kingterrytheterrible12> You sure?
02:24:34FromDiscord<breadpudding> It does in C
02:24:39FromDiscord<kingterrytheterrible12> How am i bit shifting strings then
02:24:41FromDiscord<raynei486> it does until you use it on a ostream
02:24:50FromDiscord<raynei486> operator overloading at its finest
02:24:51FromDiscord<kingterrytheterrible12> Ye thsts what i mean
02:24:52FromDiscord<breadpudding> Double meaning
02:24:56FromDiscord<kingterrytheterrible12> On ostream
02:25:05FromDiscord<raynei486> just use `fmt` like all the cool kids
02:25:09FromDiscord<kingterrytheterrible12> In reply to @breadpudding "Double meaning": Thats the reason why C++ is complex
02:25:14FromDiscord<raynei486> everyone admits iostream is a mistake
02:25:20FromDiscord<kingterrytheterrible12> Multiple meanings for the same shit
02:25:21FromDiscord<Elegantbeef> It's an over-loadable operator
02:25:21FromDiscord<breadpudding> It's not bitshift when using `cout`/`cin` because the types are overloaded
02:25:41FromDiscord<kingterrytheterrible12> In reply to @raynei486 "everyone admits iostream is": You can make your own print with varargs
02:26:09FromDiscord<raynei486> why do that when I can just use something someone already made 💀
02:26:18FromDiscord<raynei486> cool exercise I guess
02:26:19FromDiscord<kingterrytheterrible12> To reinvent the wheel off
02:26:22FromDiscord<kingterrytheterrible12> (edit) "off" => "ofc"
02:26:25FromDiscord<kingterrytheterrible12> This is C++
02:26:39FromDiscord<kingterrytheterrible12> You always make your own shit of things due to not using packages
02:26:52FromDiscord<kingterrytheterrible12> I legit one time spent a week trying to setup packages
02:27:12FromDiscord<kingterrytheterrible12> Cargo alone is worth switching to rusy
02:27:16FromDiscord<kingterrytheterrible12> (edit) "rusy" => "rust"
02:27:20FromDiscord<raynei486> it should be fine if you're using cmake
02:27:25FromDiscord<raynei486> should be
02:27:47FromDiscord<kingterrytheterrible12> Who even learns cmake
02:27:50FromDiscord<kingterrytheterrible12> Fuck that
02:27:54FromDiscord<kingterrytheterrible12> I use xmake
02:28:16FromDiscord<kingterrytheterrible12> Its by china so its good
02:28:27FromDiscord<Elegantbeef> This is such a intelligent conversation
02:28:30FromDiscord<kingterrytheterrible12> Chinese programmers are very very good
02:28:38FromDiscord<kingterrytheterrible12> In reply to @Elegantbeef "This is such a": Peak #main
02:28:41FromDiscord<raynei486> In reply to @Elegantbeef "This is such a": agreed
02:28:49FromDiscord<raynei486> average day in main
02:29:01FromDiscord<raynei486> In reply to @kingterrytheterrible12 "Chinese programmers are very": me
02:29:17FromDiscord<kingterrytheterrible12> And also
02:29:43FromDiscord<kingterrytheterrible12> If you got like 1k+ github contributions dont ever talk to me about going outside
02:29:49FromDiscord<kingterrytheterrible12> The most i got was like 400
02:30:40FromDiscord<raynei486> I only got 2 PR in Nim
02:30:46FromDiscord<raynei486> and they were for documentation..
02:30:54FromDiscord<kingterrytheterrible12> xd
02:31:10FromDiscord<kingterrytheterrible12> Put in discord "core nim maintainer"
02:31:16FromDiscord<raynei486> yeah technically
02:31:55FromDiscord<Elegantbeef> Anyway @breadpudding I know you're wrapping C code but if you're doing it in Nim you can generally avoid the whole `ptr UncheckedArray` and use `openArray[T]`
02:32:21FromDiscord<kingterrytheterrible12> Outsource the job to generics
02:33:04FromDiscord<Elegantbeef> Uh huh
02:36:43FromDiscord<breadpudding> Got it. `openArray` and not `UncheckedArray`
02:37:25FromDiscord<kingterrytheterrible12> @breadpudding also are you making an os?
02:37:40FromDiscord<breadpudding> Also side note: I have a bug in my Makefile where the `nim` command exits before `nimcache` populates. Is there a way to wait for the files to actually exist on the filesystem before continuing?
02:37:44FromDiscord<breadpudding> And yes, this is a custom OS.
02:39:01FromDiscord<kingterrytheterrible12> In reply to @breadpudding "And yes, this is": Whats it called
02:39:34FromDiscord<breadpudding> We haven't really agreed on a name yet, but we're under the working title of MapleDOS.
02:39:53FromDiscord<kingterrytheterrible12> Is it based on freedos?
02:40:03FromDiscord<breadpudding> Nope. It's completely custom.
02:40:26FromDiscord<kingterrytheterrible12> Does it aim to maintain compatability with windows binaries?
02:40:33FromDiscord<breadpudding> The main purpose is to learn more about OS development so I don't expect it to be a full project with actual users.
02:40:42FromDiscord<kingterrytheterrible12> Ofc dont
02:40:43FromDiscord<Elegantbeef> This is where I go "why are you using make"
02:40:52FromDiscord<kingterrytheterrible12> Bc its a sane build system
02:40:56FromDiscord<Nelson> i use make for everything
02:41:01FromDiscord<breadpudding> Because `-passc` doesn't work the way it should in my opinion
02:41:27FromDiscord<Nelson> mostly because it's simple
02:41:27FromDiscord<Elegantbeef> What do you mean?
02:41:28FromDiscord<Elegantbeef> I didnt ask either of you two
02:41:29FromDiscord<breadpudding> If I tell it `-nostdlib`, it doesn't even put the argument in the GCC command it uses to build.
02:41:30FromDiscord<Nelson> you dont need to ask me, i'm going to give my opinion because i like doing so
02:41:48FromDiscord<Nelson> it's simple because it's basically a shell script with labels
02:41:49FromDiscord<Elegantbeef> How does make resolve that?
02:41:57FromDiscord<kingterrytheterrible12> In reply to @Elegantbeef "I didnt ask either": Bros saying i didnt ask in a public room
02:42:03FromDiscord<kingterrytheterrible12> Wait until bro finds out about dms
02:42:13FromDiscord<breadpudding> I'm passing `-noLinking` and pulling objects out of the Nim cache.
02:42:25FromDiscord<breadpudding> Then I can actually tell it how I want it to function.
02:43:05FromDiscord<Elegantbeef> I mean pass c clearly passes nostdliib
02:43:36FromDiscord<breadpudding> Except it doesn't in checks version 1.6.10
02:43:57FromDiscord<Elegantbeef> Why are you using such an old and odd version
02:44:07FromDiscord<Elegantbeef> But it still passes it
02:44:09FromDiscord<breadpudding> Because that's the last version packaged by Arch
02:44:46FromDiscord<Elegantbeef> `nim c -r --passC:"-nostdlib" --listcmd --verbosity:1 -f ./test.nim`↵`gcc -c -w -fmax-errors=3 -nostdlib -I/home/jason/.choosenim/toolchains/nim-1.6.10/lib -I/tmp -o /home/jason/.cache/nim/test_d/@mtest.nim.c.o /home/jason/.cache/nim/test_d/@mtest.nim.c`
02:46:17FromDiscord<breadpudding> I'm not sure why it doesn't work on my system but fixing that would make it less of a cluster
02:47:26FromDiscord<Elegantbeef> `-d:useMalloc --mm:arc --os:any` should be used, but it's not like the linker compiles the code properly given it's missing a bunch of signatures now
02:48:30FromDiscord<breadpudding> sent a code paste, see https://play.nim-lang.org/#ix=4FZq
02:48:30FromDiscord<Elegantbeef> I also assume you meant to use `passL` not `passC`
02:48:53FromDiscord<breadpudding> Ah crap, I might have.
02:50:21FromDiscord<Elegantbeef> But yea with the `passL` and above it does pass it along properly and error inside linking due to the aforementioned lacking stdlib
02:50:50FromDiscord<breadpudding> Let me try it out and see if that works any better
02:51:10FromDiscord<Elegantbeef> Should be a bit cleaner as it's just a `config.nims` instead
02:51:26FromDiscord<breadpudding> Much much better lol
02:51:54FromDiscord<breadpudding> I'm convinced half the mess I'm dealing with is just me shooting myself in the foot
02:53:15FromDiscord<Elegantbeef> Now if you two want to talk about all the benefits of make, feel free to. I was just trying to help
02:53:55FromDiscord<breadpudding> I'm building more than Nim here so make is still required for me :)
02:54:20FromDiscord<breadpudding> At the very least, you've simplified the Nim portion of the build.
02:54:23FromDiscord<Elegantbeef> Well technically you can use nimscript as a build system, but we're not going down that bath
02:54:30FromDiscord<Elegantbeef> path even
02:55:09FromDiscord<Elegantbeef> https://nim-lang.org/docs/nims.html#nimscript-as-a-build-tool if you want to go down that path
02:55:10FromDiscord<breadpudding> I learned FUSE so I could mount a system image without root access and I'm sure that'll be a pain for Nimscript.
02:56:02FromDiscord<Elegantbeef> I mean it'd be the same thing through shell calls
02:56:02FromDiscord<Elegantbeef> Atleast in theory
02:56:46FromDiscord<breadpudding> I might convert some day but that day is not today
03:23:04FromDiscord<sOkam! 🫐> Is there a way to reorder an `OrderedTable[string, Data]`, based on one of the contained values in `Data`?
03:23:33FromDiscord<Elegantbeef> `sort`
03:23:53FromDiscord<sOkam! 🫐> where is it? std/tables?
03:24:04FromDiscord<Elegantbeef> Yes
03:24:35FromDiscord<sOkam! 🫐> classic me, read the entire file and missed it 🙈 ty beef
03:28:30FromDiscord<sOkam! 🫐> wait, how do you use this function?
03:28:39FromDiscord<Elegantbeef> Pass in your cmp function
03:28:41FromDiscord<sOkam! 🫐> the system.cmp is confusing me a lot
03:28:50FromDiscord<sOkam! 🫐> yeah but what is that cmp function supposed to do?
03:29:08FromDiscord<Elegantbeef> Where it returns an integer of `< 0` if a is before b, `== 0` if they're the same or `> 0` if a is after b
03:30:49FromDiscord<Elegantbeef> It's a shame that it doesnt use an enum, but it is what it is
03:31:16FromDiscord<demotomohiro> I think `system.cmp` exists for sorting int and string.
03:31:40FromDiscord<Elegantbeef> Well a `cmp` exists for all types
03:31:59FromDiscord<Elegantbeef> https://nim-lang.org/docs/system.html#cmp%2CT%2CT
03:32:25FromDiscord<demotomohiro> yes, not only ints and strings.
03:34:16FromDiscord<sOkam! 🫐> i feel so dum right now
03:34:53FromDiscord<sOkam! 🫐> how do you sort `0, 1, 2, 3, 4, -1, -2, -3, -4` so they are a valid enum, aka the negative values go down, and the positives up?
03:35:07FromDiscord<sOkam! 🫐> so result: `-4, -3, -2, -1, 0, 1 ...`
03:38:36FromDiscord<odexine> What do you mean “how do you sort@
03:38:47FromDiscord<odexine> You just sort it normally?
03:39:04FromDiscord<sOkam! 🫐> what do you send to the sort function so it does what it needs to
03:39:19FromDiscord<sOkam! 🫐> sent a code paste, see https://play.nim-lang.org/#ix=4FZP
03:39:34FromDiscord<sOkam! 🫐> i have no clue what that cmp function is really doing, its breaking my brain quite hard ngl
03:39:59FromDiscord<sOkam! 🫐> i understand the idea of negative or positive, but not really understanding how its doing it
03:40:09FromDiscord<sOkam! 🫐> so really confused if what i wrote is what i need, or if its incorrect
03:42:35FromDiscord<sOkam! 🫐> sent a code paste, see https://play.nim-lang.org/#ix=4FZS
03:42:52FromDiscord<sOkam! 🫐> (edit) "https://play.nim-lang.org/#ix=4FZS" => "https://play.nim-lang.org/#ix=4FZT"
03:44:02FromDiscord<huantian> did you import the sort proc from algorithm
03:44:21FromDiscord<sOkam! 🫐> hmm nope, let me do that. i thought it was in system?
03:44:50FromDiscord<huantian> nop
03:45:03FromDiscord<sOkam! 🫐> also, wait. you said sort
03:45:11FromDiscord<sOkam! 🫐> im sorting a table, sort is in std/tables
03:45:25FromDiscord<sOkam! 🫐> (edit) "a table," => "an OrderedTable,"
03:45:45FromDiscord<sOkam! 🫐> so adding std/algorithm didn't really solve it
03:46:00FromDiscord<Elegantbeef> You need to sort the tuples
03:46:12FromDiscord<sOkam! 🫐> what does that mean?
03:46:22FromDiscord<Elegantbeef> `(Key, Value)`
03:46:43FromDiscord<sOkam! 🫐> but i don't have tuples
03:46:43FromDiscord<Elegantbeef> `proc (x, y: (A, B)): int`
03:47:05FromDiscord<Elegantbeef> You do have tuples it's `(string, EnumValueData)`
03:47:19FromDiscord<Elegantbeef> The sort function sorts the keyvalue pairs
03:47:52FromDiscord<sOkam! 🫐> `cmp: proc (x, y: (A, B)): int;` whats this with my types?
03:47:57FromDiscord<sOkam! 🫐> im really not getting it at all
03:48:09FromDiscord<Elegantbeef> `proc(x, y: (string, EnumValueData)): int`
03:48:37FromDiscord<sOkam! 🫐> oh so it expands the table into a tuple internally? that is confusing
03:48:52FromDiscord<sOkam! 🫐> should be at least mentioned in the example or something
03:48:52FromDiscord<Elegantbeef> It doesnt expand anything
03:49:01FromDiscord<sOkam! 🫐> you can only know that if you understand the internal code
03:49:18FromDiscord<sOkam! 🫐> In reply to @Elegantbeef "It doesnt expand anything": it does, im giving it a table, not a tuple
03:49:24FromDiscord<sOkam! 🫐> (edit) "table," => "table entry,"
03:49:49FromDiscord<sOkam! 🫐> but the function does not want that, it wants the key,val pair of the table shape
03:49:53FromDiscord<Elegantbeef> And to sort a table you must operate on the key value pairs
03:50:03FromDiscord<sOkam! 🫐> yeah, and that should be mentioned in the doc
03:50:09FromDiscord<sOkam! 🫐> which says nothing about it at all
03:50:24FromDiscord<sOkam! 🫐> so if you don't have any context of how that works, you get like... huh? 🤷‍♂️
03:50:32FromDiscord<Elegantbeef> "PRs welcome"
03:50:52FromDiscord<sOkam! 🫐> yeah i understood that much when it comes to docs. PRs or changes will never happen
03:51:22FromDiscord<huantian> hey
03:51:22FromDiscord<sOkam! 🫐> anyway, ty for unconfusing me 🙏 it was breaking my brain a lot
03:51:24FromDiscord<huantian> i've pred docs
03:51:29FromDiscord<huantian> like once or twice
03:52:00FromDiscord<Elegantbeef> PRs are accepted for docs!
03:52:27FromDiscord<sOkam! 🫐> wait, im actually still just as lost 😔
03:52:52FromDiscord<sOkam! 🫐> sent a code paste, see https://play.nim-lang.org/#ix=4G00
03:53:32FromDiscord<sOkam! 🫐> `A[1].value.parseInt()`? 🤔
03:54:44FromDiscord<Elegantbeef> If these are string ints you do not even need to parse them
03:55:33FromDiscord<Elegantbeef> image.png https://media.discordapp.net/attachments/371759389889003532/1150640750963478628/image.png
03:55:52FromDiscord<sOkam! 🫐> sure, but that doesn't fix the issue
03:56:00FromDiscord<Elegantbeef> What?
03:56:06FromDiscord<sOkam! 🫐> just optimizes the amount of code, but doesn't solve the issue i have
03:56:26FromDiscord<sOkam! 🫐> sent a code paste, see https://play.nim-lang.org/#ix=4G01
03:56:29FromDiscord<Elegantbeef> Your table isnt mutable
03:56:34FromDiscord<sOkam! 🫐> i do not understand what to give to the proc
03:58:40FromDiscord<sOkam! 🫐> `<` doesn't return a -1,0,1 though
03:58:55FromDiscord<Elegantbeef> https://nim-lang.org/docs/system.html#cmp%2CT%2CT
03:59:08FromDiscord<Elegantbeef> But there is a `cmp` for strings
04:00:41FromDiscord<sOkam! 🫐> sent a code paste, see https://play.nim-lang.org/#ix=4G04
04:00:54FromDiscord<sOkam! 🫐> with strings
04:02:09FromDiscord<Elegantbeef> Hey it's sorted numerically! 😛
04:04:34FromDiscord<sOkam! 🫐> how can you check what is making `parseInt` choke?
04:04:45FromDiscord<sOkam! 🫐> its not returning the contents being parsed or anything, it just fails
04:05:29FromDiscord<sOkam! 🫐> by returning i mean printing to console on the error message, to see what is happening
04:05:56FromDiscord<sOkam! 🫐> `Error: unhandled exception: invalid integer: [ValueError]`
04:21:38FromDiscord<odexine> that just means youre passing an empty string
04:29:08FromDiscord<sOkam! 🫐> how do you make it skip the eval when empty?
04:29:25FromDiscord<sOkam! 🫐> eval meaning the cmp function
04:30:48FromDiscord<odexine> ??
04:30:54FromDiscord<odexine> i dont know your code
04:31:18FromDiscord<sOkam! 🫐> sent a code paste, see https://play.nim-lang.org/#ix=4G0c
04:31:36*cnx quit (Ping timeout: 255 seconds)
04:31:38FromDiscord<sOkam! 🫐> (edit) "https://play.nim-lang.org/#ix=4G0c" => "https://play.nim-lang.org/#ix=4G0d"
04:31:46FromDiscord<sOkam! 🫐> thats the cmp function thats crashing if i add `parseInt()` to each
04:32:00FromDiscord<odexine> skip it by using an if the string is empty???
04:32:19FromDiscord<huantian> wait why are you parse int-ing an enum?
04:32:21FromDiscord<sOkam! 🫐> but what do you return for the cmp?
04:32:27FromDiscord<odexine> return 0
04:32:29FromDiscord<odexine> well
04:32:41FromDiscord<sOkam! 🫐> In reply to @huantian "wait why are you": because the enum comes from the spec, which is an xml converted to string information
04:32:56FromDiscord<sOkam! 🫐> and nim doesn't understand unsorted enums
04:33:08FromDiscord<sOkam! 🫐> so im trying to sort it so its valid code
04:33:09FromDiscord<odexine> nim doesnt ALLOW unsorted enums
04:33:12FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4G0e
04:33:16FromDiscord<odexine> it definitely understands it
04:33:38FromDiscord<sOkam! 🫐> kk, same deal its crashing the code 🙈
04:33:43FromDiscord<sOkam! 🫐> but ty for the correction
04:33:54FromDiscord<odexine> sent a code paste, see https://play.nim-lang.org/#ix=4G0f
04:44:09*cnx joined #nim
05:01:50FromDiscord<griffith1deadly> In reply to @kingterrytheterrible12 "what about me &": = pedo
05:12:43FromDiscord<taperfade> guys check this out
05:12:45FromDiscord<taperfade> https://github.com/senzur/nim-file-browser/tree/main
05:12:49FromDiscord<taperfade> star it
05:13:26FromDiscord<taperfade> ( its not malware )
05:13:27FromDiscord<sOkam! 🫐> seems like the values can also be `0x100001` and parseint doesn't understand them 😔
05:13:38FromDiscord<sOkam! 🫐> parseHex for those i guess?
05:13:44FromDiscord<griffith1deadly> In reply to @taperfade "star it": if condition == true
05:13:46FromDiscord<griffith1deadly> lmao
05:13:56FromDiscord<griffith1deadly> no, i dont wanna star it
05:14:14FromDiscord<taperfade> In reply to @griffith1deadly "lmao": 😧
05:14:17FromDiscord<taperfade> yep
05:14:21FromDiscord<taperfade> youre the reason im gonna do it
05:15:02FromDiscord<Phil> In reply to @kingterrytheterrible12 "when i hear anything": This is not a memes channel. Keep it to prog memes. Period.
05:15:39FromDiscord<taperfade> In reply to @griffith1deadly "no, i dont wanna": virgin https://media.discordapp.net/attachments/371759389889003532/1150660909841256528/SPOILER_image.png
05:15:42FromDiscord<taperfade> ong
05:16:28FromDiscord<griffith1deadly> In reply to @taperfade "virgin": forever
05:17:39FromDiscord<taperfade> loser
05:20:13FromDiscord<sOkam! 🫐> or literally keep memes to #offtopic and the conversation focused on nim. the channel has been nuts this last week
05:23:33FromDiscord<enthus1ast> @taperfade\: the convention for procs is to start them with lowerCase its quite weird on the eyes \:)
05:23:45FromDiscord<sOkam! 🫐> sent a code paste, see https://play.nim-lang.org/#ix=4G0s
05:25:12FromDiscord<odexine> well will it work if both are len = 0?
05:26:14*ntat joined #nim
05:27:02FromDiscord<taperfade> In reply to @enthus1ast "<@1111014250446585866>\: the convention for": I like it if they start uppercase lol
05:27:26FromDiscord<enthus1ast> sent a code paste, see https://paste.rs/I1XV4
05:27:40FromDiscord<sOkam! 🫐> In reply to @odexine "well will it work": no clue, tbh
05:27:48FromDiscord<sOkam! 🫐> it does seem to not crash at the moment
05:28:23FromDiscord<Phil> In reply to @taperfade "ong": You too, just because it takes me a while to catch up: THis is not offtopic, nor is this a memes channel.↵Keep it to offtopic if it isn't nim related. People want to program here.
05:28:59FromDiscord<taperfade> Ok
05:29:05FromDiscord<enthus1ast> sent a code paste, see https://play.nim-lang.org/#ix=4G0w
05:29:18FromDiscord<Phil> (edit) "THis" => "This"
05:29:58FromDiscord<Elegantbeef> @sOkam! 🫐\: `a.parseHexInt, b.parseHexInt`
05:30:16FromDiscord<sOkam! 🫐> yeah doing that
05:30:29FromDiscord<sOkam! 🫐> or do you mean that parseHexInt also handles normal ints?
05:31:38FromDiscord<Elegantbeef> I mean you are doing `A[1].values` when you aliased it
05:32:42FromDiscord<Elegantbeef> No clue if it works but you might be able to do `a, b: tuple[key: string, value: ...]`
05:33:09FromDiscord<sOkam! 🫐> oh
05:33:15FromDiscord<Elegantbeef> If you prefer to 'document' it
05:33:28FromDiscord<sOkam! 🫐> well its the same thing after all
05:33:39FromDiscord<sOkam! 🫐> but yeah true
05:33:43FromDiscord<Elegantbeef> Yea but it's a tinge more explicit and that seems to be what you like
05:35:07FromDiscord<sOkam! 🫐> also cleans up the noise a lot
05:38:11FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4G0y
05:39:01FromDiscord<Phil> Out of curiosity, why the uppercased first letters in the procs?↵Is this a convention from another language?
05:40:55FromDiscord<Phil> (edit) "procs?↵Is" => "proc names?↵Is"
05:41:03Amun-RaGo?
05:41:16FromDiscord<odexine> sz didnt use go before though iirc
05:41:21FromDiscord<odexine> never mentioned it, at least
05:41:22FromDiscord<Phil> Go does this? I've never read any code from there
05:41:26Amun-Rayes
05:41:35FromDiscord<odexine> go makes capitalised procs public
05:41:41FromDiscord<odexine> that's their public private convention
05:41:48FromDiscord<odexine> also why i will never use it
05:42:06FromDiscord<Phil> Check
05:43:15FromDiscord<Elegantbeef> They also support unicode identifiers
05:43:29FromDiscord<Elegantbeef> You might be going "Wait not all languages have the concept of capitalisation" and you'd be right
05:43:33FromDiscord<odexine> flashback to aboriginal generics
05:44:02Amun-RaAda also has UpperCaseFunctions convention, for all the functions
05:44:31FromDiscord<Elegantbeef> I've seen Chinese Go code that uses `T` prefix for exporting
05:45:23FromDiscord<Elegantbeef> Pascal does aswell, that's why it's called PascalCase in most cases
05:45:38*tanami quit (Server closed connection)
05:45:46*tanami joined #nim
05:48:48*advesperacit joined #nim
06:23:07*PMunch joined #nim
06:24:28FromDiscord<gogolxdong666> Anyone knows how to fix the nim-web3 issue when receiving from subscription `Caught exception in getHistoricalEvents: Frame too big: 22981651`
06:25:19FromDiscord<gogolxdong666> (edit) "Anyone knows how to fix the" => "Any idea of fixing this"
06:40:48*PMunch_ joined #nim
06:43:49*PMunch quit (Ping timeout: 245 seconds)
07:13:45FromDiscord<Chronos [She/Her]> I wonder how complicated it'd be to transpile JVM bytecode to Nim code and how horrible it'd work
07:15:06FromDiscord<nnsee> i mean
07:15:16FromDiscord<nnsee> that's just a roundabout way of implementing JVM
07:15:40*cnx quit (Remote host closed the connection)
07:16:31*cnx joined #nim
07:18:18FromDiscord<Chronos [She/Her]> I mean yeah I guess lmao
07:19:03FromDiscord<Chronos [She/Her]> I kinda wanna work on a library to parse JVM bytecode tbh, was doing it before but then kinda, forgot
07:19:29FromDiscord<nnsee> have you written an emulator before?
07:19:44FromDiscord<Chronos [She/Her]> Nope ✨
07:20:36FromDiscord<Chronos [She/Her]> And tbh I don't think I plan to lol, I only wanted a library for JVM bytecode in Nim so I could use it as a codegen backend for my language (that doesn't even have a working parser yet)
07:22:08FromDiscord<sOkam! 🫐> sent a code paste, see https://play.nim-lang.org/#ix=4G0Q
07:23:57FromDiscord<Chronos [She/Her]> Nim doesn't actually care about any underscores in the name so you don't even need an alias there
07:24:23FromDiscord<Chronos [She/Her]> For `VkDriverIdKHR` tho...
07:24:23FromDiscord<sOkam! 🫐> did you notice the lack of `_SPACE_` word in there?
07:24:34FromDiscord<Chronos [She/Her]> I mean, templates should be fine
07:24:49FromDiscord<sOkam! 🫐> oh you got a point, though, that one specifically is the same for nim
07:24:57FromDiscord<Chronos [She/Her]> Yeah
07:25:06FromDiscord<sOkam! 🫐> well thats not the case in 999% of the other cases
07:25:19FromDiscord<Chronos [She/Her]> Templates should be fine but hm... That's actually pretty irritating oof
07:28:15FromDiscord<nnsee> In reply to @chronos.vitaqua "And tbh I don't": ah okay. Well, if you ever change your mind, writing emulators is fun. I recommend starting with chip8
07:28:40FromDiscord<nnsee> if you want to "cheat" a bit, you can take a look at my (not the cleanest) implementation https://git.dog/xx/nim-chip8
07:28:44FromDiscord<Chronos [She/Her]> Chip8? Sounds interesting
07:29:04termerHappy 9/11 guys
07:29:09termerfor my American friends
07:29:28FromDiscord<nnsee> the core is here https://git.dog/xx/nim-chip8/src/branch/master/src/cpu.nim#L301
07:29:38FromDiscord<Chronos [She/Her]> I don't think that's happy-
07:30:27FromDiscord<Chronos [She/Her]> In reply to @nnsee "the core is here": Certainly looks interesting-
07:30:55FromDiscord<Chronos [She/Her]> I don't really understand it but I'm guessing that's because I've not done anything like that before-
07:34:58FromDiscord<sOkam! 🫐> In reply to @chronos.vitaqua "I don't *really* understand": cpu operations are literally just numbers that are given a function
07:35:03FromDiscord<sOkam! 🫐> that's why they look confusing
07:35:41FromDiscord<sOkam! 🫐> they make no sense, they just are a number-name and a specific process for the cpu to execute
07:36:16FromDiscord<Chronos [She/Her]> Isn't that the same with JVM bytecode too?
07:36:24FromDiscord<sOkam! 🫐> idk jvm
07:36:58FromDiscord<sOkam! 🫐> but i figure the answer is yes, since all emulators are technically VMs
07:37:01FromDiscord<nnsee> In reply to @chronos.vitaqua "Isn't that the same": yes, but a single instruction generally can have a lot more logic
07:37:14FromDiscord<Chronos [She/Her]> Makes sense
07:37:46FromDiscord<nnsee> or, how to say
07:37:49FromDiscord<nnsee> it can be more high level
07:38:22FromDiscord<nnsee> for example, JVM's `invokeinterface` instruction:↵> invokes an interface method on object _objectref_ and puts the result on the stack (might be void); the interface method is identified by method reference index in constant pool `(indexbyte1 << 8 | indexbyte2)`
07:38:23FromDiscord<Chronos [She/Her]> How so?
07:38:40FromDiscord<nnsee> that's not something you would ever see in a bare metal instruction set
07:38:49FromDiscord<Chronos [She/Her]> Ah yeah that makes sense
07:39:19FromDiscord<nnsee> because the concepts of an interface, method, object etc only exist in the context of the VM
07:39:34FromDiscord<Chronos [She/Her]> Yeah I understand that
07:40:18FromDiscord<Chronos [She/Her]> A fun tidbit of knowledge you probably already have tbh, but older ARM CPUs actually supported a subset of JVM bytecode! The unsupported instructions were stubbed out of course but it's actually p interesting
07:40:40FromDiscord<Chronos [She/Her]> I remember this because a friend told me that and I thought it was wack af
07:40:50FromDiscord<sOkam! 🫐> @nnsee idk why you call that implementation not clean, its the cleanest cpu impl ive seen to this day
07:40:58FromDiscord<ieltan> What exactly is the difference between `unsafeGet` and `get` ?
07:41:40FromDiscord<Chronos [She/Her]> `unsafeGet` doesn't care if there is no value, so it'll return whatever is there when you're trying to get it iirc, whether it's nil or an actual value
07:41:49FromDiscord<nnsee> In reply to @heysokam "<@961485620075720734> idk why you": thank you 😅 it was just a weekend project and I didn't really put too much effort into it, but thank you nonetheless
07:42:23FromDiscord<sOkam! 🫐> In reply to @ieltan "What exactly is the": https://github.com/nim-lang/Nim/blob/18e62ad13699cc054e087fd63e75183d3076de60/lib/pure/options.nim#L201-L203
07:42:29FromDiscord<ieltan> In reply to @chronos.vitaqua "`unsafeGet` doesn't care if": Ah i see, so it doesn't raise any exceptions if you get a nil
07:42:32FromDiscord<ieltan> (edit) "nil" => "none"
07:42:32FromDiscord<Chronos [She/Her]> In reply to @ieltan "What exactly is the": The docs say the behaviour is undefined so this is just my assumption
07:42:41FromDiscord<Chronos [She/Her]> In reply to @ieltan "Ah i see, so": Yeah
07:42:41FromDiscord<sOkam! 🫐> unsafe get just gives you the value without an exception check
07:43:17FromDiscord<ieltan> I know how `get` works, just not `unsafeGet` but thanks
07:43:43FromDiscord<sOkam! 🫐> In reply to @ieltan "I know how `get`": its at the bottom of the file, it does the exact same without that raise check
07:43:53FromDiscord<Chronos [She/Her]> In reply to @ieltan "I know how `get`": Np!
07:44:09FromDiscord<ieltan> ah i missed it
07:44:26FromDiscord<ieltan> indeed, it only has an `assert` which can be disabled
07:47:08*PMunch_ is now known as PMunch
07:50:50FromDiscord<frobnicate> Why would one run in local deps mode?
07:52:00FromDiscord<nnsee> In reply to @frobnicate "Why would one run": you can see some context here https://gist.github.com/genotrance/ee2ce321a56c95df2d4bb7ce4bd6b5ab
07:52:06FromDiscord<nnsee> or, rather, the motivation
07:52:16FromDiscord<frobnicate> ty, I couldn't find it in the manual
08:30:37*azimut joined #nim
08:34:59*junaid_ joined #nim
08:47:17*junaid_ quit (Remote host closed the connection)
10:04:44*azimut quit (Remote host closed the connection)
10:05:09*azimut joined #nim
10:08:57*junaid_ joined #nim
10:11:14*junaid_ quit (Remote host closed the connection)
10:18:20FromDiscord<.maverk> hello
10:21:32FromDiscord<frobnicate> hello you
10:23:58FromDiscord<frobnicate> sent a code paste, see https://play.nim-lang.org/#ix=4G1v
10:24:09FromDiscord<frobnicate> (edit)
10:24:35FromDiscord<frobnicate> I thought about adding all the cleanup to a list, but I can't figure it out
10:25:32FromDiscord<.maverk> what is the issue ? https://media.discordapp.net/attachments/371759389889003532/1150738894682333204/374.PNG
10:26:10*advesperacit quit (Ping timeout: 252 seconds)
10:26:35FromDiscord<ieltan> You have to omit the `initSetChar`
10:26:40FromDiscord<ieltan> It'll work
10:26:43*advesperacit joined #nim
10:26:45FromDiscord<frobnicate> initSetchar doesn't exist in your current context
10:27:09FromDiscord<odexine> In reply to @frobnicate "If I'm doing a": … defer
10:27:30FromDiscord<frobnicate> In reply to @odexine "… defer": I just don't like defer because it's not super explicit when that resource is freed
10:27:45FromDiscord<frobnicate> I'm sorry for being like this
10:28:22FromDiscord<frobnicate> I find it much easier to scan the code for a finally then figure out when the context is done
10:28:28FromDiscord<odexine> You can’t avoid the nesting otherwise no? Unless you encapsulate into functions
10:28:32FromDiscord<frobnicate> (edit) "then" => "than"
10:28:54FromDiscord<frobnicate> I would have to nest anyway then, because I need code to run between the try-finally
10:29:37FromDiscord<frobnicate> sent a code paste, see https://play.nim-lang.org/#ix=4G1x
10:29:45FromDiscord<odexine> ??? Put the procedures outside
10:29:54FromDiscord<frobnicate> Outside?
10:29:57FromDiscord<odexine> Yes
10:30:21FromDiscord<frobnicate> Please teach me, sensei
10:30:22FromDiscord<odexine> Functions, use them as functions where you pass all needed contexts in
10:30:25FromDiscord<ieltan> Yeah I kinda have the same issue
10:30:38FromDiscord<frobnicate> Do you have an example?
10:33:08FromDiscord<odexine> this will be very pseudocody
10:33:13FromDiscord<frobnicate> of course
10:33:19FromDiscord<frobnicate> anything is appreciated
10:34:30FromDiscord<odexine> sent a code paste, see https://play.nim-lang.org/#ix=4G1A
10:35:08FromDiscord<odexine> (edit) "https://play.nim-lang.org/#ix=4G1A" => "https://play.nim-lang.org/#ix=4G1B"
10:35:19FromDiscord<odexine> would this be acceptable?
10:35:36FromDiscord<odexine> of course technically you can instead make use of destroy hooks if you want
10:36:26FromDiscord<frobnicate> how would a destroy hook work?
10:36:38FromDiscord<odexine> uhhhhhhhhhhhhhhhhhhhh
10:36:46FromDiscord<odexine> https://nim-lang.org/docs/destructors.html
10:36:50FromDiscord<frobnicate> I override the destructor?
10:36:51FromDiscord<frobnicate> oh yeah
10:36:54FromDiscord<frobnicate> what I thought
10:36:55FromDiscord<odexine> better than id explain it yes
10:36:59FromDiscord<frobnicate> Yea yea
10:37:13FromDiscord<frobnicate> I'm gonna try overriding first. If that works, it should be fairly clean
10:41:14FromDiscord<frobnicate> I don't need to implement all of `=destroy, =copy, =sink, =trace, =deepcopy, =wasMoved, =dup`for my type, right?
10:42:13FromDiscord<.maverk> guys sets work only with ascii characters ? i cannot put numbers ?
10:42:19*ntat quit (Quit: leaving)
10:42:34FromDiscord<raynei486> In reply to @frobnicate "I don't need to": yeah you don't need to
10:42:44FromDiscord<odexine> sets work with numbers but only up to around 16 bit numbers
10:43:06FromDiscord<.maverk> In reply to @odexine "sets work with numbers": i put 1 and it says it is too high
10:43:28FromDiscord<odexine> because the default is 32 or 64 bits
10:43:29FromDiscord<.maverk> https://media.discordapp.net/attachments/371759389889003532/1150743408185442354/55342.PNG
10:43:43FromDiscord<odexine> you need to use `set[int16]`
10:43:56FromDiscord<.maverk> In reply to @odexine "you need to use": !!!!
10:44:00FromDiscord<odexine> or better, if you dont need 16 bits use int8
10:44:06FromDiscord<.maverk> is not int ore than 32 ?????
10:44:19FromDiscord<.maverk> (edit) "ore" => "more"
10:44:19FromDiscord<odexine> you cant use sets for 32 bits
10:44:25FromDiscord<raynei486> In reply to @.maverk "is not int more": int defaults to int32
10:44:34FromDiscord<odexine> int by default is 64 bits on 64 bit platforms
10:44:35FromDiscord<.maverk> yeah
10:44:41FromDiscord<.maverk> it is machine dependent
10:44:49FromDiscord<.maverk> aaah
10:44:51FromDiscord<.maverk> okyoky
10:44:54FromDiscord<.maverk> i get it now
10:45:03FromDiscord<raynei486> In reply to @.maverk "it is machine": that's something I hear everyday in the C & C++ server
10:45:19FromDiscord<odexine> nim defines int to be pointer-size
10:45:23FromDiscord<.maverk> yeah
10:45:28FromDiscord<.maverk> yeah exactly
10:45:47FromDiscord<.maverk> In reply to @odexine "nim defines int to": this makes a lot of sense
10:51:48FromDiscord<frobnicate> @odexine Making my own destroy worked like a charm, thanks
10:52:31FromDiscord<frobnicate> are there any special considerations?
10:52:57FromDiscord<frobnicate> I couldn't really see anything other than going out of scope
10:53:52FromDiscord<odexine> mm:refc cannot be used
10:56:37PMunchfrobnicate, after having implemented the destroy hook then running some tests with Valgrind would be a good idea
10:56:48PMunchJust to make sure everything is destroyed properly
10:59:09FromDiscord<frobnicate> How do I make Valgrind track a variable?
10:59:31FromDiscord<frobnicate> I haven't used it a lot
11:01:24PMunchUhm, I just run `valgrind --leak-check=full` and make sure nothing leaks
11:02:25FromDiscord<odexine> asan is better ngl
11:02:33FromDiscord<odexine> well, it depends
11:02:37FromDiscord<odexine> but asan is p good as well
11:02:54FromDiscord<frobnicate> Yeah but I'm on my work pc right now, which is a windows running docker linux :/ So no x runtimes for graphics
11:03:28FromDiscord<frobnicate> So trying to run a gfx app with valgrind just segfaults :c
11:03:47FromDiscord<frobnicate> poopy windows
11:04:29FromDiscord<.maverk> ``nim`` has only one ``set`` datatype ? does it have a ``dictionary`` like python does ?
11:05:06FromDiscord<frobnicate> table
11:05:16FromDiscord<.maverk> but no built-in ?
11:05:23FromDiscord<frobnicate> table is built-in
11:05:30FromDiscord<.maverk> it has to be imported
11:05:37FromDiscord<frobnicate> from the std
11:05:42FromDiscord<.maverk> i mean the defaut
11:05:43FromDiscord<.maverk> like
11:05:44FromDiscord<.maverk> set
11:05:50FromDiscord<.maverk> array
11:05:53FromDiscord<frobnicate> I dunno how to answer this
11:05:53FromDiscord<.maverk> tuple
11:06:07PMunchNo, Nim doesn't automatically import tables like Python does
11:06:25FromDiscord<.maverk> so it has only one default set type
11:06:36FromDiscord<frobnicate> What do you mean by default?
11:06:42FromDiscord<.maverk> ????
11:06:48PMunchIt only has the one bitset type imported by default, yes
11:06:49FromDiscord<.maverk> var name : string
11:06:55FromDiscord<.maverk> string is a default datatype
11:07:07FromDiscord<.maverk> var array : array[]
11:07:11PMunchYou also have the `sets` module by the way, which has proper hash sets you can put anything in
11:07:11FromDiscord<.maverk> array is default
11:07:31FromDiscord<.maverk> In reply to @PMunch "It only has the": i see
11:07:34PMunchThat's not what "default" means, but I get your point
11:07:43FromDiscord<frobnicate> Yeah I'm confused as well
11:07:45FromDiscord<frobnicate> SOrry
11:07:56PMunchstring and array are built into the system module, which is automatically imported
11:08:16FromDiscord<.maverk> yeah
11:08:22PMunchTables exist in their own module in the standard library and must be imported explicitly
11:08:32FromDiscord<.maverk> yeah i know table
11:08:36FromDiscord<.maverk> import tables
11:08:38PMunchNot sure why that distinction matters to you though..
11:08:52FromDiscord<.maverk> i just wanna know
11:08:55FromDiscord<.maverk> i am curious
11:09:32FromDiscord<frobnicate> Ok, you can look at https://nim-lang.org/docs/lib.html, and go to https://nim-lang.org/docs/system.html to see what is autoamtically imported
11:09:48FromDiscord<frobnicate> It has all the standard libraries there
11:10:03FromDiscord<.maverk> In reply to @frobnicate "Ok, you can look": i am not looking for libraries
11:10:04FromDiscord<frobnicate> I don't know if that's what you mean by "default", but it's built-in
11:10:09FromDiscord<frobnicate> I'm aware
11:10:16FromDiscord<frobnicate> You can look in system
11:10:19FromDiscord<frobnicate> Like I said
11:10:23FromDiscord<.maverk> hhhhhh
11:10:33FromDiscord<frobnicate> What does h's mean?
11:10:34FromDiscord<.maverk> 😩
11:10:48FromDiscord<.maverk> nothing bro forget
11:11:02FromDiscord<frobnicate> I'm telling you where to see what is automatically imported?
11:11:08FromDiscord<frobnicate> Which is what you asked
11:11:57FromDiscord<frobnicate> I'm so confused
11:12:03PMunch.maverk, as I said the system module is automatically imported. So if you follow the links frobnicate shared you will see what is in that module, and which other modules it includes, and which it imports and re-exports. These are the modules which are available to you without importing anything explicitly.
11:13:14PMunchfrobnicate, I think they just misunderstood what you meant and thought you were just linking to see what was in the standard library
11:13:24FromDiscord<frobnicate> I see
11:13:41FromDiscord<frobnicate> I guess I could have been more explicit
11:13:55PMunchThey don't seem to be aware that `system.nim` is an actual module, and that Nim basically just imports it by default and that's where stuff like sets come from.
11:15:09FromDiscord<frobnicate> I can't make SDL2 run in some kind of simulated headless mode so I can test with valgrind in my container, can I?
11:15:16FromDiscord<frobnicate> I'm locked a windows machine at work :c
11:15:31FromDiscord<frobnicate> (edit) "I'm locked ... a" added "to"
11:16:51FromDiscord<frobnicate> It works fine until I init SDL2 which of course fails since windows doesn't have the x-gfx stuff libs
11:17:26FromDiscord<frobnicate> And if I build for windows I can't run it with valgrind
11:17:43FromDiscord<frobnicate> Windows sucks
11:18:00PMunchWait, Windows doesn't have valgrind?
11:18:09FromDiscord<frobnicate> no :c
11:18:15FromDiscord<frobnicate> It's Linux only
11:18:55FromDiscord<frobnicate> I hate developing on / for windows
11:19:27FromDiscord<frobnicate> Visual Studio has some kind of memory tool but like hell I'm testing with that
11:23:20FromDiscord<frobnicate> And the valgrind SO question is 14 years old
11:23:26FromDiscord<frobnicate> https://stackoverflow.com/questions/413477/is-there-a-good-valgrind-substitute-for-windows
11:26:37FromDiscord<frobnicate> And WinValgrind has zero activity and 17 stars. Windows is starved for good memory tools it seems
11:26:55FromDiscord<frobnicate> Excuse, good OSS memory tools
11:27:05FromDiscord<frobnicate> I'm sure there's plenty of propriety stuff
11:27:30FromDiscord<inventormatt> @.maverk the hashset is what you are looking for. it would be the equivalent to the python set
11:28:49FromDiscord<raynei486> In reply to @frobnicate "Excuse, good OSS memory": not many people want to develop OSS for a proprietary system
11:29:41FromDiscord<frobnicate> Unfortunately
11:30:00FromDiscord<frobnicate> I did see there's a Wine variant on Valgrinds own page
11:30:24FromDiscord<raynei486> does valgrind run in wsl?
11:31:07FromDiscord<frobnicate> It does, but the issue isn't valgrind itself so to speak, it's that I'm making a gfx app, so if I try to run it in docker it'll try to use the x graphics stuff and segfault, because I'm on windows
11:31:34FromDiscord<frobnicate> And if I build for windows, I can't run it with valgrind in my container
11:40:09ormiretinstall X + VNC + noVNC (or something along those lines) in the docker container to get graphics fro there in browser on windows?
11:40:43FromDiscord<frobnicate> What's vnc?
11:41:12PMunchVirtual Network Computing
11:41:29PMunchBasically visual ssh
11:41:40FromDiscord<nnsee> In reply to @frobnicate "What's vnc?": think RDP
11:41:45FromDiscord<frobnicate> I see
11:41:50FromDiscord<frobnicate> I mean I can try I guess
11:42:05FromDiscord<frobnicate> It's not like I have any work to do
11:42:13PMunchCan't you just do something like this? https://learn.microsoft.com/en-us/windows/wsl/tutorials/gui-apps
11:42:38PMunchWhere do you work where you're allowed to use Nim but not Linux by the way?
11:42:43FromDiscord<.maverk> In reply to @inventormatt "<@1021771961040375900> the hashset is": yeah but not dictionary
11:42:50FromDiscord<.maverk> i would use import table for that
11:43:24FromDiscord<inventormatt> yes, tables are the equivalent to a dictionary
11:43:25FromDiscord<.maverk> (edit) "table" => "tables"
11:43:34FromDiscord<.maverk> yeah exactly bro
11:43:47FromDiscord<.maverk> i have a question related to pointers in nim
11:43:54FromDiscord<.maverk> https://media.discordapp.net/attachments/371759389889003532/1150758610834571374/image.png
11:44:03FromDiscord<.maverk> i want to see the address instead
11:44:22FromDiscord<.maverk> i don't want to derefernce the pointer
11:44:37FromDiscord<frobnicate> Then use addr again
11:44:44FromDiscord<.maverk> doesn't work
11:45:02FromDiscord<frobnicate> What does repr even do
11:45:13FromDiscord<.maverk> https://media.discordapp.net/attachments/371759389889003532/1150758944256569374/5514.PNG
11:45:26FromDiscord<.maverk> In reply to @frobnicate "What does repr even": it gives a representation of a value
11:45:45FromDiscord<.maverk> like "string" it just gives "string" in console
11:45:49*ntat joined #nim
11:45:50FromDiscord<.maverk> afaik
11:46:03FromDiscord<frobnicate> Oh right that makes sense. But you can't just do pointer?
11:46:10FromDiscord<frobnicate> You need repr?
11:46:11PMunchHuh, it seems to do something special for string pointers
11:46:19FromDiscord<.maverk> that is what i could not achieve
11:46:35PMunch!eval var x = "Hello world"; echo x.addr.pointer.repr
11:46:38NimBot000055D7EC50E160
11:46:47PMunchSomething like that?
11:46:57FromDiscord<.maverk> now i got it
11:47:24PMunchHuh?
11:47:47PMunchIt's just a `repr` overload for `ptr string` which is a bit less helpful that it maybe should be
11:47:50FromDiscord<.maverk> no it doesn't work
11:47:58FromDiscord<.maverk> how to do it ?????
11:48:02PMunchBut just convert to a raw pointer type as I showed you and it works fine
11:48:17FromDiscord<.maverk> yeah i know how to do that
11:48:26FromDiscord<.maverk> but i don't want to dereference
11:48:32FromDiscord<nnsee> sent a code paste, see https://play.nim-lang.org/#ix=4G1T
11:48:33PMunchI mean I already shared a code snippet with you..
11:48:39PMunchNot sure how much more clear I can be
11:50:29PMunchBasically `x.addr` gets the address of the pointer, but pointers in general don't have `$` defined for them. So we need to get a string representation to output. Typically `repr` would do that, but apparently it has a silly overload for `ptr string`. So we use `x.addr.pointer` to grab the pointer of x and then tell Nim that this is just a generic pointer, not as string pointer, and then repr that.
11:50:36PMunchSo `x.addr.pointer.repr`
11:50:50FromDiscord<.maverk> ok now it works
11:52:32*disso-peach joined #nim
11:57:38FromDiscord<.maverk> In reply to @PMunch "!eval var x =": is ``pointer`` a keyword ?????
11:58:26PMunchNo, it's a type
11:59:02FromDiscord<.maverk> In reply to @PMunch "No, it's a type": as ``ptr`` ?
11:59:18PMunchYou could also have done `cast[pointer](x.addr).repr`
11:59:42PMunchYes, but you can't use `ptr` without specifying what it is a pointer _to_
11:59:50FromDiscord<.maverk> In reply to @PMunch "You could also have": they told me i have to avoid cast
12:00:07PMunch`pointer` just means _a pointer_ which doesn't point to anything in particular as far as the type system is concerned
12:00:11FromDiscord<nnsee> you also have to avoid working with pointer values in general
12:00:12FromDiscord<nnsee> so
12:00:14PMunchWho? The lizard people?
12:00:14FromDiscord<nnsee> that's kind of moot
12:01:15PMunchbut yeah, in general casting is a bad idea, which is why I used `.pointer` instead in my initial code
12:19:53*advesperacit quit (Ping timeout: 255 seconds)
12:20:23*advesperacit joined #nim
12:22:16FromDiscord<nnsee> In reply to @PMunch "Who? The lizard people?": who told you about us!?
12:23:58FromDiscord<frobnicate> 🦎
12:25:36FromDiscord<odexine> In reply to @nnsee "who told you about": since when were you a relative of zuck
12:49:58FromDiscord<vindaar> sent a code paste, see https://play.nim-lang.org/#ix=4G2i
12:52:45FromDiscord<frobnicate> I saw isNil was suggested to be deprecated in favor of == nil
12:55:10FromDiscord<vindaar> seen that in the past too, but never found the why 🤷‍♂️
12:56:47PMunchWhat? Did isNil have a side-effect?
12:58:25FromDiscord<vindaar> no, it was due to some stack corruption caused by the HDF5 library thinking the object I hand it is 160 bytes, but it was only 144 bytes. Now why these two lines of code have the result I saw, I don't fully understand, but I guess it may be some kind of race condition with the HDF5 library doing stuff in the background and NULL'ing the data effectively in between or something. No idea
12:58:39FromDiscord<vindaar> https://github.com/Vindaar/nimhdf5/pull/64 for reference
13:01:46FromDiscord<frobnicate> Yeah I can't copy it
13:01:59FromDiscord<frobnicate> With just normal pointers
13:05:06*rockcavera joined #nim
13:16:23*ntat quit (Quit: leaving)
13:21:32FromDiscord<griffith1deadly> In reply to @vindaar "had the most fun": bro https://media.discordapp.net/attachments/371759389889003532/1150783182027894784/image.png
13:24:27FromDiscord<vindaar> In reply to @griffith1deadly "bro": Uhm, yes? Would you like your code to continue when your reference is nil?
13:24:49FromDiscord<frobnicate> is there a way to color the output of `debugEcho`?
13:26:55FromDiscord<frobnicate> Or am I better off making a logger at that point?
13:28:23*disso-peach quit (Quit: Leaving)
13:34:58PMunchJust use terminal escape codes?
13:35:07PMunchMy termstyles module is good for this
13:36:12PMunchLike so: https://play.nim-lang.org/#ix=4G2u
13:51:41FromDiscord<enthus1ast> @frobnicate\: why not just use cronicles?
13:52:07FromDiscord<enthus1ast> https://github.com/status-im/nim-chronicles
13:53:46FromDiscord<odexine> Prolly cuz they want quick and dirty?
13:54:12FromDiscord<odexine> But if you’re colouring things already then maybe it’s best to graduate into a proper logger
13:54:53FromDiscord<enthus1ast> What about chronicles is not quick?
13:55:33FromDiscord<enthus1ast> Zero config for exactly what he wants
13:56:57*junaid_ joined #nim
14:00:42*junaid_ quit (Remote host closed the connection)
14:15:58*ntat joined #nim
14:17:53*jmdaemon quit (Ping timeout: 246 seconds)
14:55:39*xet7 quit (Remote host closed the connection)
15:40:32*xmachina quit (Server closed connection)
15:41:02*xmachina joined #nim
15:41:41FromDiscord<frobnicate> In reply to @enthus1ast "<@199678698499080192>\: why not just": I'll give it a try next time I have my editor open
15:55:26FromDiscord<taperfade> nimnimnim
16:16:30*junaid_ joined #nim
16:20:34FromDiscord<.maverk> https://media.discordapp.net/attachments/371759389889003532/1150828241314131968/3312.PNG
16:20:42FromDiscord<.maverk> why is it saying deprecated ?
16:21:43FromDiscord<odexine> method is not what you should use for that
16:21:52FromDiscord<odexine> use `proc`, methods are for dynamic dispatch
16:22:03FromDiscord<Phil> In reply to @.maverk "": First of: ↵Why use method here?↵Method is something you'd want to be using if you want to use inheritance
16:22:13FromDiscord<odexine> off
16:22:14FromDiscord<odexine> 😛
16:22:15FromDiscord<.maverk> In reply to @isofruit "First of: Why": i heard about
16:22:24FromDiscord<.maverk> static dispatch
16:22:25FromDiscord<.maverk> vs
16:22:29FromDiscord<.maverk> dynamic dispatch
16:22:33FromDiscord<.maverk> and i wanted to try
16:22:44FromDiscord<odexine> dynamic dispatch only works with inheritance
16:22:52FromDiscord<sOkam! 🫐> In reply to @leorize "you have to either": this was it. just fixed it right now, tysm 🙏
16:23:02FromDiscord<.maverk> In reply to @odexine "use `proc`, methods are": what ?? it says for static dispatch
16:23:10FromDiscord<odexine> yes it is for static dispatch
16:23:21FromDiscord<odexine> you can't use dynamic dispatch without also using inheritance
16:23:32FromDiscord<.maverk> proc : for static dispatch↵method : for dynamic dispatch
16:23:50FromDiscord<odexine> your type doesn't use inheritance so dynamic dispatch cannot do anything
16:23:51FromDiscord<.maverk> In reply to @odexine "method is not what": what should i use ?
16:24:17FromDiscord<.maverk> is the use of method deprecated or what ?
16:24:19FromDiscord<odexine> `ref object of <insert base type here>`↵where the base type should be a `ref object of RootObject`
16:24:22FromDiscord<odexine> no it is not
16:24:25FromDiscord<odexine> please read the manual
16:24:30FromDiscord<.maverk> i do
16:24:36FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4G3y
16:24:52FromDiscord<odexine> https://nim-lang.org/docs/manual.html#methods
16:25:02FromDiscord<.maverk> In reply to @odexine "https://nim-lang.org/docs/manual.html#methods": i am in the page
16:25:15FromDiscord<Phil> The interesting thing that makes dynamic dispatch "unique" here is that despite y and z having the type `A` according to the compiler, the proc that gets chosen is the one for "B" and "C" in both cases.
16:25:20FromDiscord<.maverk> In reply to @.maverk "": i learnt this from there
16:25:32FromDiscord<Phil> As if the correct proc for a given type were "attached" to the object instance itself
16:25:35FromDiscord<Phil> That is what methods are
16:25:49FromDiscord<Phil> (edit) "As if the correct proc for a given type were "attached" to the object instance itself ... " added "and it didn't matter what type it had according to the compiler."
16:25:56FromDiscord<.maverk> it is for oop
16:26:04FromDiscord<.maverk> as it says
16:26:59FromDiscord<odexine> In reply to @isofruit "The interesting thing that": it works without references?
16:27:06FromDiscord<odexine> well i mean sure it does ig
16:27:18FromDiscord<odexine> but you cant store B and C in a var A
16:28:27FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4G3B
16:28:39FromDiscord<odexine> that is surprising
16:28:44FromDiscord<Phil> This compiles and works as expected
16:28:50FromDiscord<odexine> well
16:28:50FromDiscord<odexine> no
16:29:02FromDiscord<Phil> I don't know how, I don't claim to understand how it makes sure the method pointers are on the stack where they should be
16:29:06FromDiscord<odexine> you cannot declare that, would fields work as expected?
16:29:10FromDiscord<Phil> But it echo#s what I assumed it would
16:29:41FromDiscord<Phil> Hmm let's find out, one sec
16:31:02FromDiscord<Phil> In reply to @odexine "you cannot declare that,": Field access is fucked as expected
16:31:28FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4G3C
16:35:12*PMunch_ joined #nim
17:15:12FromDiscord<kingterrytheterrible12> is nim `method` always implemented as virtual lookup
17:16:54FromDiscord<kingterrytheterrible12> aka vtable
17:18:08FromDiscord<.maverk> sent a code paste, see https://play.nim-lang.org/#ix=4G3W
17:32:37*Mister_Magister quit (Quit: bye)
17:34:42*Mister_Magister joined #nim
17:42:25FromDiscord<.maverk> sent a long message, see http://ix.io/4G48
17:45:27FromDiscord<Phil> In reply to @.maverk "guys i have been": Not quite, do you know what a side-effect is?
17:46:04FromDiscord<ShalokShalom (ShalokShalom)> How did you infer that?↵(@.maverk)
17:46:41FromDiscord<.maverk> In reply to @ShalokShalom (ShalokShalom) "How did you infer": from examples and reading
17:46:43FromDiscord<ShalokShalom (ShalokShalom)> First\: You always specify the type, in both cases.
17:46:55FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4G49
17:46:56FromDiscord<ShalokShalom (ShalokShalom)> Nim, sadly, allows for no type inference on function parameter.
17:46:57FromDiscord<.maverk> In reply to @isofruit "Not quite, do you": what do you mean by not quite ????
17:47:15FromDiscord<Phil> That echo is a "side-effect" - It happened during the proc execution but had nothing to do with what the proc did in the end
17:47:20FromDiscord<ShalokShalom (ShalokShalom)> Not at all. Its not at all like that. \:)
17:47:21FromDiscord<Phil> (edit) "did" => "returned"
17:47:30FromDiscord<ShalokShalom (ShalokShalom)> Like, it has nothing to do with types.
17:48:05FromDiscord<Phil> `func` is a way to say "This function will NOT do any side-effects! It will only do things that transform from A to B!"
17:48:17FromDiscord<Chronos [She/Her]> In reply to @ShalokShalom (ShalokShalom) "Nim, sadly, allows for": Wdym by type inference here?
17:48:21FromDiscord<ShalokShalom (ShalokShalom)> @.maverk\: Default to func. When you like to do IO, use proc.
17:48:45FromDiscord<Chronos [She/Her]> In reply to @isofruit "`func` is a way": I should probably do this in my libraries
17:48:46FromDiscord<ShalokShalom (ShalokShalom)> Func is always good, when you like pure logic. Without "doing" anything.
17:48:59FromDiscord<ShalokShalom (ShalokShalom)> Func = logic↵proc = action
17:49:09FromDiscord<Phil> proc meanwhile does not have this "limitation".↵That means if you call a proc "double" you can't be sure that they don't do something else in the background - Like send an HTTP request to the CIA!
17:49:16FromDiscord<ShalokShalom (ShalokShalom)> Everybody, not only you.↵(@Chronos [She/Her])
17:49:40FromDiscord<Phil> But if you call `func` you can be sure that they didn't do anything except map A to B
17:49:46*PMunch_ quit (Quit: leaving)
17:49:47FromDiscord<jmgomez> well, I mostly agree but `noSideEffect` is actually inferred
17:49:49FromDiscord<ShalokShalom (ShalokShalom)> Type inference is type inference. idk, what do you mean by it?↵(@Chronos [She/Her])
17:50:19FromDiscord<ShalokShalom (ShalokShalom)> Type inference infers the type, simply based on the context the values/functions are used.
17:50:55FromDiscord<Phil> In reply to @jmgomez "well, I mostly agree": I mean, I value func mostly for its semantic value to other programmers. It gives certainty.↵It's a means of communication for me that I only have to think about the transformation of that thing and what it entails, nothing more.
17:51:00FromDiscord<ShalokShalom (ShalokShalom)> Nim has type inference for variables, constants, and I think return types. But not function and proc parameters.
17:51:12FromDiscord<odexine> Auto works on parameters I believe
17:51:21FromDiscord<.maverk> but was i correct about func ? when i said we must specify the type ?
17:51:24FromDiscord<Phil> It does, mapster uses auto for some of its generics
17:51:37FromDiscord<ShalokShalom (ShalokShalom)> Ah, that you mean. Is noSideEffect a type? I mean, its just part of the implementation of func, or not?↵(@jmgomez)
17:51:37FromDiscord<odexine> In reply to @.maverk "but was i correct": You have to specify the type in both functions and procedures
17:51:38FromDiscord<.maverk> yes auto works
17:51:41FromDiscord<Phil> In reply to @.maverk "but was i correct": Not really, func and proc aren't concerned with types at all
17:51:52FromDiscord<Phil> They're only concerned with "are side-effects allowed" or not
17:52:04FromDiscord<.maverk> In reply to @isofruit "Not really, func and": then where is the key difference ?????
17:52:07FromDiscord<ShalokShalom (ShalokShalom)> Define which types. Of the parameter?↵(@.maverk)
17:52:16FromDiscord<.maverk> yes
17:52:36FromDiscord<.maverk> because func is preventing me from not defining the type
17:52:36FromDiscord<ShalokShalom (ShalokShalom)> Then you always need to specify them↵(@.maverk)
17:52:36FromDiscord<ShalokShalom (ShalokShalom)> In proc and func
17:52:45FromDiscord<.maverk> like i always need to specify the type
17:52:46FromDiscord<ShalokShalom (ShalokShalom)> Thats not true.
17:52:52FromDiscord<.maverk> aww
17:52:57FromDiscord<.maverk> let me show you
17:53:01FromDiscord<ShalokShalom (ShalokShalom)> Thats true for both func and proc
17:53:13FromDiscord<jmgomez> In reply to @ShalokShalom (ShalokShalom) "Ah, that you mean.": it's sugar for enforcing it. Nim has an effect system, `noSideEffect` is a effect
17:53:15FromDiscord<ShalokShalom (ShalokShalom)> As said, Nim has no type inference on function parameter
17:53:19FromDiscord<ShalokShalom (ShalokShalom)> and is statically typed
17:53:39FromDiscord<ShalokShalom (ShalokShalom)> Ah, yeah. But its still no type, or?↵(@jmgomez)
17:54:12FromDiscord<.maverk> it is preventing me and saying side effects
17:54:21FromDiscord<jmgomez> wdym with no type?
17:55:08FromDiscord<ShalokShalom (ShalokShalom)> Well, `noSideEffect` is no type. You said "noSideEffect" is inferred, when we were talking about type inference on func and proc.
17:55:09FromDiscord<.maverk> i mean ↵↵func name() : string
17:55:22FromDiscord<ShalokShalom (ShalokShalom)> Thats something different↵(@.maverk)
17:55:22FromDiscord<.maverk> it is always preventing me from not doing string
17:55:28FromDiscord<ShalokShalom (ShalokShalom)> Learn what side effects are
17:55:37FromDiscord<ShalokShalom (ShalokShalom)> Otherwise, you will never understand this.
17:55:49FromDiscord<.maverk> ok i will google that
17:56:12FromDiscord<ShalokShalom (ShalokShalom)> Do you know, what IO is?
17:56:33FromDiscord<.maverk> yes
17:56:39FromDiscord<.maverk> input / output
17:56:49FromDiscord<ShalokShalom (ShalokShalom)> Most of the time, proc is for that. If you dont do IO, use func. Basically. Nim is very unique, in that most languages dont make this distinction.
17:56:49FromDiscord<.maverk> stdout and stdin
17:57:05FromDiscord<jmgomez> In reply to @ShalokShalom (ShalokShalom) "Well, `noSideEffect` is no": `noSideEffect` is an `effect` inferred in "safe" `proc` that has no effects
17:57:18FromDiscord<ShalokShalom (ShalokShalom)> It allows you to combine lots of imperative and functional code, and dont loose track about hidden state at the same time.
17:57:33FromDiscord<odexine> Shalok that’s a very complex definition
17:57:40FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4G4d
17:57:47FromDiscord<ShalokShalom (ShalokShalom)> Yeah, I see. Then we are just talking about two different forms of inference. \:)↵(@jmgomez)
17:58:08FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4G4e
17:58:15FromDiscord<ShalokShalom (ShalokShalom)> Do you see, where the IO is, in Phil's case?
17:58:21FromDiscord<ShalokShalom (ShalokShalom)> Ah, now he gave it away \:D
17:58:33FromDiscord<jmgomez> In reply to @ShalokShalom (ShalokShalom) "Yeah, I see. Then": exactly
17:58:36FromDiscord<ShalokShalom (ShalokShalom)> What do you mean?↵(@odexine)
17:58:37FromDiscord<odexine> In reply to @.maverk "stdout and stdin": A side effect means accessing something that isn’t defined in your function’s parameters. Basically, stdout can’t be accessed in a func because it’s not directly in your parameters, which is why you can’t echo
17:58:41FromDiscord<Phil> (edit) "https://play.nim-lang.org/#ix=4G4e" => "https://play.nim-lang.org/#ix=4G4f"
17:59:44FromDiscord<Phil> sent a long message, see http://ix.io/4G4g
17:59:49FromDiscord<ShalokShalom (ShalokShalom)> I have never thought about it like this↵(@odexine)
18:00:00FromDiscord<ShalokShalom (ShalokShalom)> That sounds like a very good explaination.
18:00:03FromDiscord<.maverk> In reply to @ShalokShalom (ShalokShalom) "Most of the time,": you made a clear point to the difference between the two functions
18:00:20FromDiscord<ShalokShalom (ShalokShalom)> Well, proc stands for process
18:00:24FromDiscord<.maverk> but i will read some google articles for better understanding
18:00:35FromDiscord<ShalokShalom (ShalokShalom)> Again, Nim is one of the only languages, that gets that right
18:00:35FromDiscord<.maverk> not procedure ?
18:00:51FromDiscord<Phil> In reply to @.maverk "but i will read": That's perfectly valid.↵What you're at is the starting point of wrapping your head around the reason why "functional programming" exists.↵it's a fairly math-y thing
18:00:52FromDiscord<ShalokShalom (ShalokShalom)> Most languages call a process a function.
18:01:08FromDiscord<ShalokShalom (ShalokShalom)> It can mean both. Procedure and process are basicially the same thing↵(@.maverk)
18:01:30FromDiscord<ShalokShalom (ShalokShalom)> I would say its a logical thing \:D↵(@Phil)
18:01:58FromDiscord<Phil> In reply to @ShalokShalom (ShalokShalom) "I would say its": Eh, seeing functions as basically maps to map one set of things to another set of things is a very mathy concept to me
18:02:00FromDiscord<odexine> In reply to @ShalokShalom (ShalokShalom) "I have never thought": It’s technically wrong since even if you then give me stdout, I still can’t write to it since IOEffect
18:02:06FromDiscord<ShalokShalom (ShalokShalom)> A side effect is, when you communicate with the outside world.↵(@Phil)
18:02:08FromDiscord<.maverk> In reply to @isofruit "That's perfectly valid. What": well i didn't know that
18:02:12FromDiscord<.maverk> 😄
18:02:20FromDiscord<ShalokShalom (ShalokShalom)> So something, that we programmers avoid to do \:D
18:02:28FromDiscord<odexine> It would be more right in a “real” functional language because of monads blah blah blah
18:02:28FromDiscord<Phil> In reply to @ShalokShalom (ShalokShalom) "So something, that we": Oh lord, the outside!
18:02:51FromDiscord<starkiller1493> Can I convert Time to DateTime? I can't find any way in the docs
18:03:05FromDiscord<ShalokShalom (ShalokShalom)> Is this Nim specific? I assume, this is different from language to language, depending on the implementation↵(@odexine)
18:03:26FromDiscord<odexine> In reply to @ShalokShalom (ShalokShalom) "Is this Nim specific?": Well, monads are used to mark effects
18:03:26FromDiscord<ShalokShalom (ShalokShalom)> Yeah, I see. Sad that the effect system in Nim is so limited.↵(@odexine)
18:03:39FromDiscord<ShalokShalom (ShalokShalom)> Mhm
18:03:40FromDiscord<odexine> So basically I have an IO monad meaning okay now my function can do IO effects
18:03:56FromDiscord<ShalokShalom (ShalokShalom)> How are you doing in Elixir, anyway? \:D↵(@odexine)
18:04:11FromDiscord<odexine> In Nim you’d have to prolly give up on func and use the effects pragma or something instead
18:04:34FromDiscord<odexine> In reply to @ShalokShalom (ShalokShalom) "How are you doing": Stalled. I haven’t written much of anything because I’ve been focusing on other projects that aren’t web development
18:05:01FromDiscord<ShalokShalom (ShalokShalom)> Ah, I see.
18:05:11FromDiscord<jmgomez> In reply to @odexine "In Nim you’d have": why is that?
18:05:14FromDiscord<ShalokShalom (ShalokShalom)> I am currently experimenting with fish and Julia.
18:05:33FromDiscord<odexine> In reply to @jmgomez "why is that?": Not sure about it but I think you can’t add an effect to a func?
18:05:52FromDiscord<ShalokShalom (ShalokShalom)> And just recover from a rant, that I had because the documentation of fish is so lackluster xD
18:06:09FromDiscord<ShalokShalom (ShalokShalom)> I studied a problem for 2 hours, just to find out the docs are misleading.
18:06:19FromDiscord<odexine> I forgot if the side effects and the effects system in Nim was orthogonal or not
18:06:25FromDiscord<odexine> I might have made that mistake just now
18:06:27FromDiscord<ShalokShalom (ShalokShalom)> Exactly there would it make the most sense?↵(@odexine)
18:06:33FromDiscord<odexine> It is confusing
18:06:35FromDiscord<ShalokShalom (ShalokShalom)> Why would I make an effect of a proc?
18:06:47FromDiscord<jmgomez> I didnt play that much with it but AFAIK `noSideEffect` forbirds all effects?
18:07:18FromDiscord<ShalokShalom (ShalokShalom)> Yeah. I know someone, who collects info on all languages, who have an effect system and they said the Nim one is pretty basic.↵(@odexine)
18:07:29FromDiscord<odexine> I don’t know and I don’t want to test now, it is deep into the night
18:07:42FromDiscord<ShalokShalom (ShalokShalom)> I think they changed the implementation recently.↵(@jmgomez)
18:07:47FromDiscord<ShalokShalom (ShalokShalom)> Aka a year ago
18:07:48FromDiscord<odexine> In reply to @ShalokShalom (ShalokShalom) "Yeah. I know someone,": The Nim one does feel basic I will say
18:07:56FromDiscord<ShalokShalom (ShalokShalom)> With 2.0 at least
18:08:57FromDiscord<jmgomez> it is but that's ok. Most people like Nim for its speed, simplicity, interop and CE
18:10:05FromDiscord<ShalokShalom (ShalokShalom)> CE? Computation expressions?
18:10:22FromDiscord<Chronos [She/Her]> In reply to @ShalokShalom (ShalokShalom) "Nim has type inference": Aah alright
18:10:49*krux02 joined #nim
18:10:53FromDiscord<ShalokShalom (ShalokShalom)> Languages, that can infer all, have a global type inference.↵(@Chronos [She/Her])
18:10:53FromDiscord<jmgomez> compile time evaluation although I ment compile time capabilities (instrospection + AST mod too)
18:10:55*junaid_ quit (Quit: leaving)
18:11:08FromDiscord<Chronos [She/Her]> In reply to @ShalokShalom (ShalokShalom) "Languages, that can infer": Makes sense
18:11:19FromDiscord<ShalokShalom (ShalokShalom)> https://gist.github.com/ShalokShalom/af804bee1822a22f98ad6b25ce73492c
18:11:55FromDiscord<ShalokShalom (ShalokShalom)> I think I have to rework that list. Kotlin and Swift are both a bit weird with that. I think they both require type annotations on functions, but sometimes they do not.
18:12:11*krux02 quit (Remote host closed the connection)
18:12:17FromDiscord<ShalokShalom (ShalokShalom)> Ah yeah. Imperative language user seem to care a lot about introspection.↵(@jmgomez)
18:12:24FromDiscord<jmgomez> another area where Nim shines is overloading btw
18:12:37FromDiscord<ShalokShalom (ShalokShalom)> Ah yeah.
18:12:44FromDiscord<ShalokShalom (ShalokShalom)> This brings me back to another quesiton
18:12:48*krux02 joined #nim
18:12:55FromDiscord<ShalokShalom (ShalokShalom)> I have already asked that like a couple of days ago
18:12:58FromDiscord<jmgomez> In reply to @ShalokShalom (ShalokShalom) "Ah yeah. Imperative language": well, static instrospection is crucial for AST modification, otherwise you are quite limited
18:13:02FromDiscord<ShalokShalom (ShalokShalom)> How does Nim solve the expression problem?
18:13:29FromDiscord<ShalokShalom (ShalokShalom)> I am currently playing with Julia, and multiple dispatch at the center of the language looks like it cannot be replaced by anything else.
18:14:19FromDiscord<jmgomez> I dont know, ask in #internals
18:14:32FromDiscord<ShalokShalom (ShalokShalom)> Ah
18:14:34FromDiscord<ShalokShalom (ShalokShalom)> Thanks
18:14:45FromDiscord<ShalokShalom (ShalokShalom)> I mean, based on your own experience?
18:15:02FromDiscord<ShalokShalom (ShalokShalom)> If anybody is curious
18:15:03FromDiscord<ShalokShalom (ShalokShalom)> https://www.youtube.com/watch?v=kc9HwsxE1OY
18:16:15*junaid_ joined #nim
18:17:02FromDiscord<odexine> In reply to @ShalokShalom (ShalokShalom) "How does Nim solve": What is the problem stated? I am not familiar
18:17:27FromDiscord<odexine> Notably Nim does not have multiple dispatch (anymore)
18:17:30FromDiscord<jmgomez> wdym? I would say it is pretty good, never seen something like that in other langs. But never looked into it before Nim TBH
18:17:54FromDiscord<jmgomez> the json module ilustrates very well how to extend a library by overloading it at compile time
18:24:18*junaid_ quit (Quit: leaving)
18:29:20*ntat quit (Quit: leaving)
18:38:01*anddam left #nim (WeeChat 4.0.1)
18:49:44*junaid_ joined #nim
18:51:38FromDiscord<Chronos [She/Her]> Oh there's actually one reason I may wanna make new bindings for Chipmunk2D
18:51:49FromDiscord<Chronos [She/Her]> They don't make use of destructors and such
18:52:55FromDiscord<Chronos [She/Her]> But that's prolly the only reason really and I still don't know if it's worth it
18:57:52FromDiscord<Chronos [She/Her]> I think I'll prolly wrap it anyway using Futhark
18:58:34FromDiscord<Chronos [She/Her]> Also is it better to include Futhark as a dependency in the wrapper or to just yank the generated Nim code instead?
18:59:43FromDiscord<Chronos [She/Her]> I prolly won't do it right now but defo at some point
19:07:47*junaid_ quit (Remote host closed the connection)
19:11:00FromDiscord<Chronos [She/Her]> Is it a sane idea to make a new thread for handling all the physics stuff and use the main thread for rendering?
19:11:40FromDiscord<Chronos [She/Her]> Probably not very without making sure it's all safe but eeeeeh
19:16:13FromDiscord<ShalokShalom (ShalokShalom)> its funny that you mention that, since Stefan says in his talk, that I linked earlier, that people always come up with function overloading.↵(@jmgomez)
19:16:40FromDiscord<ShalokShalom (ShalokShalom)> Why this is not the same, you can see here, I linked you to the time spot\: https://www.youtube.com/live/kc9HwsxE1OY?feature=shared&t=392
19:20:47FromDiscord<ShalokShalom (ShalokShalom)> There is a pretty good explaination\: https://www.youtube.com/live/kc9HwsxE1OY?feature=shared&t=1516↵(@odexine)
19:21:21FromDiscord<ShalokShalom (ShalokShalom)> [Edit](https://discord.com/channels/371759389889003530/371759389889003532/1150872444354179162): its funny that you mention that, since Stefan says in his talk, that people always come up with function overloading.
19:23:18FromDiscord<ShalokShalom (ShalokShalom)> [Edit](https://discord.com/channels/371759389889003530/371759389889003532/1150872444354179162): It's funny that you mention that, since Stefan says in his talk, that people always come up with function overloading. And that it is not equal.
19:27:23FromDiscord<kingterrytheterrible12> In reply to @chronos.vitaqua "Is it a sane": No
19:27:47FromDiscord<kingterrytheterrible12> your gonna have to put a mutex on the mainthread
19:28:14FromDiscord<Chronos [She/Her]> Gucci I think
19:31:51FromDiscord<Chronos [She/Her]> So with this I'm gonna need to manually make sure it's locked with std/locks? Pain-
19:32:16FromDiscord<Chronos [She/Her]> I may just make a macro (and type) for this honestly to wrap it
19:36:08FromDiscord<raynei486> if you don't lock your stuff you're gonna have unsolicited object touching
19:37:43FromDiscord<kingterrytheterrible12> In reply to @chronos.vitaqua "So with this I'm": welcome to multithreaded programming
19:39:14FromDiscord<ShalokShalom (ShalokShalom)> Does Nim need the VM to do automatic memory management? Like, does it use the VM for anything other than macros, at all?
19:39:16FromDiscord<Chronos [She/Her]> In reply to @raynei486 "if you don't lock": Yeah I'm aware
19:39:27FromDiscord<Chronos [She/Her]> In reply to @kingterrytheterrible12 "welcome to multithreaded programming": Lmao it'll be pain~
19:39:32FromDiscord<kingterrytheterrible12> In reply to @ShalokShalom (ShalokShalom) "Does Nim need the": what vm
19:39:41FromDiscord<kingterrytheterrible12> there is no vm if you compile to C or C++
19:39:53FromDiscord<ShalokShalom (ShalokShalom)> Nim has a VM to do the macros afaik
19:39:53FromDiscord<Chronos [She/Her]> I need some example code for an example where without locks, the program will crash
19:40:04FromDiscord<kingterrytheterrible12> In reply to @ShalokShalom (ShalokShalom) "Nim has a VM": dont think so
19:40:11FromDiscord<kingterrytheterrible12> VM = virtual machine like JVM?
19:40:12FromDiscord<Chronos [She/Her]> In reply to @ShalokShalom (ShalokShalom) "Nim has a VM": Yeah only used for macro unfolding (unless embedding it elsewhere) afaik
19:40:22FromDiscord<ShalokShalom (ShalokShalom)> https://nim-lang.org/docs/nims.html
19:40:24FromDiscord<Chronos [She/Her]> They don't compile it into your program at least
19:40:29FromDiscord<raynei486> compile time evaluation is done in the vm iirc
19:40:44FromDiscord<ShalokShalom (ShalokShalom)> Yep, says the link
19:40:45FromDiscord<kingterrytheterrible12> OH compile time
19:40:49FromDiscord<ShalokShalom (ShalokShalom)> I was curious about ARC
19:40:52FromDiscord<kingterrytheterrible12> i thought there was a runtime VM
19:40:59FromDiscord<kingterrytheterrible12> i was about to never touch the language again
19:41:01FromDiscord<ShalokShalom (ShalokShalom)> There is
19:41:06FromDiscord<ShalokShalom (ShalokShalom)> but optional, for Nimscript
19:41:07FromDiscord<kingterrytheterrible12> there is?
19:41:16FromDiscord<kingterrytheterrible12> bro dont fucking do that thing
19:41:17FromDiscord<kingterrytheterrible12> the hting
19:41:27FromDiscord<ShalokShalom (ShalokShalom)> Read the link
19:41:39FromDiscord<kingterrytheterrible12> WHERE IS EVEN NIMSCRIPT
19:41:40FromDiscord<kingterrytheterrible12> WHERES IT AT
19:41:43FromDiscord<ShalokShalom (ShalokShalom)> Its in the most sane way possible, imho
19:41:57FromDiscord<ShalokShalom (ShalokShalom)> You might learn to write, before you shout
19:42:04FromDiscord<Chronos [She/Her]> In reply to @ShalokShalom (ShalokShalom) "I was curious about": At compile time destructor hooks are smartly inserted
19:42:18FromDiscord<kingterrytheterrible12> like C++ RAII
19:42:21FromDiscord<kingterrytheterrible12> yes
19:42:23FromDiscord<kingterrytheterrible12> (edit) "yes" => "yes?"
19:42:26FromDiscord<Chronos [She/Her]> Not sure what that is tbh
19:42:31FromDiscord<Chronos [She/Her]> Assuming it's similar
19:42:32FromDiscord<ShalokShalom (ShalokShalom)> Ah, I see. So strictly speaking, without the VM, there is no compilation?↵(@Chronos [She/Her])
19:42:34FromDiscord<raynei486> In reply to @kingterrytheterrible12 "like C++ RAII": basically yes
19:42:38FromDiscord<kingterrytheterrible12> alright
19:42:44FromDiscord<ShalokShalom (ShalokShalom)> Unless I manually manage memory
19:42:45FromDiscord<raynei486> I'm not sure about the implementation details but it's basically the same concept
19:42:55FromDiscord<kingterrytheterrible12> at this point idk why im using ORC when my code has no cycles
19:43:07FromDiscord<Chronos [She/Her]> In reply to @ShalokShalom (ShalokShalom) "Ah, I see. So": I'd assume so, or at least you'd be greatly limited, tho not sure if the VM is driving the insertion or if that's the compiler itself
19:43:15FromDiscord<raynei486> In reply to @kingterrytheterrible12 "at this point idk": I'm still using refc because it's more mature
19:43:22FromDiscord<Chronos [She/Her]> In reply to @kingterrytheterrible12 "at this point idk": Peace of mind if they sneak in?
19:43:31FromDiscord<raynei486> it's the scary "conventional" gc
19:43:32FromDiscord<kingterrytheterrible12> In reply to @raynei486 "I'm still using refc": refc has thread local heaps right
19:44:02FromDiscord<raynei486> I think so yeah
19:44:04FromDiscord<kingterrytheterrible12> In reply to @chronos.vitaqua "Peace of mind if": just leak
19:44:04FromDiscord<kingterrytheterrible12> lol
19:44:20FromDiscord<kingterrytheterrible12> if its some CLI tool then just leak all the way
19:44:25FromDiscord<kingterrytheterrible12> like some short lived program
19:44:36FromDiscord<raynei486> leak based programming
19:44:49FromDiscord<kingterrytheterrible12> In reply to @raynei486 "leak based programming": its actually the best for performance yk
19:44:56FromDiscord<Chronos [She/Her]> Time to write of an example of where without my New Smart Locking, the code for threading would suffer lol
19:45:01FromDiscord<Chronos [She/Her]> Or would crash and die
19:45:03FromDiscord<kingterrytheterrible12> program cant pause if i never free and just allocate
19:45:42FromDiscord<kingterrytheterrible12> In reply to @chronos.vitaqua "Time to write of": smart locking 💀
19:45:49FromDiscord<kingterrytheterrible12> smart locking with smart bugs
19:45:57FromDiscord<kingterrytheterrible12> that use smart ways to not be able to debug
19:45:57FromDiscord<Chronos [She/Her]> Lol
19:46:25FromDiscord<Chronos [She/Her]> Basically I'm just implementing that Mutex type that Rust has iirc
19:46:30FromDiscord<raynei486> In reply to @kingterrytheterrible12 "its actually the best": and actually makes sense for learning purposes
19:46:39FromDiscord<raynei486> like a lot of small compiler projects do that
19:46:46FromDiscord<kingterrytheterrible12> really?
19:46:54FromDiscord<raynei486> no need to fill up the code with free statements
19:47:07FromDiscord<kingterrytheterrible12> or you could just use a memory arena
19:47:13FromDiscord<kingterrytheterrible12> allocate like 10 mb of ram
19:47:16FromDiscord<Chronos [She/Her]> Idk what to call the library... Pain
19:47:19FromDiscord<raynei486> out of scope for small projects
19:47:23FromDiscord<kingterrytheterrible12> yes
19:47:39FromDiscord<raynei486> if you check out rui ueyama's compiler projects they're all leaking by design lol
19:47:46FromDiscord<raynei486> he's known for the mold linker
19:48:16FromDiscord<kingterrytheterrible12> if your program leaks
19:48:18FromDiscord<kingterrytheterrible12> just get more ram
19:48:20FromDiscord<raynei486> In reply to @chronos.vitaqua "Idk what to call": what're you making?
19:48:21FromDiscord<kingterrytheterrible12> wtf
19:48:44FromDiscord<kingterrytheterrible12> In reply to @chronos.vitaqua "Idk what to call": libchronos
19:48:59FromDiscord<Chronos [She/Her]> In reply to @raynei486 "what're you making?": Basically Mutex type for Nim, so you don't worry about manually using locks in your code
19:49:10FromDiscord<kingterrytheterrible12> nimtex
19:49:13FromDiscord<kingterrytheterrible12> mutex for nim
19:49:20FromDiscord<Chronos [She/Her]> In reply to @kingterrytheterrible12 "libchronos": Sounds cheesy and stupid + chronos exists already
19:49:35FromDiscord<kingterrytheterrible12> nitex
19:49:38FromDiscord<Chronos [She/Her]> In reply to @kingterrytheterrible12 "nimtex": I could but it reminds me of LaTeX, ig I could do Nutex hm
19:49:55FromDiscord<kingterrytheterrible12> or just mutex-nim
19:49:56FromDiscord<kingterrytheterrible12> lol
19:50:29FromDiscord<kingterrytheterrible12> @Chronos [She/Her] https://nim-lang.org/docs/locks.html
19:50:38FromDiscord<kingterrytheterrible12> also why are you making it when there is this
19:51:25FromDiscord<raynei486> In reply to @chronos.vitaqua "Basically Mutex type for": how about `knock`
19:51:27FromDiscord<raynei486> because yk
19:51:31FromDiscord<kingterrytheterrible12> In reply to @raynei486 "how about `knock`": whos there
19:51:34FromDiscord<raynei486> your thread is locked
19:51:36FromDiscord<raynei486> gotta knock lmao
19:52:06FromDiscord<raynei486> In reply to @kingterrytheterrible12 "whos there": your browsing history
19:52:13FromDiscord<Chronos [She/Her]> In reply to @kingterrytheterrible12 "also why are you": So that you can lock objects without even thinking about the fact they're locked (usually)
19:52:29FromDiscord<Chronos [She/Her]> In reply to @raynei486 "how about `knock`": I mean that is smart hm
19:52:46FromDiscord<kingterrytheterrible12> In reply to @raynei486 "your browsing history": whats wrong with it https://media.discordapp.net/attachments/371759389889003532/1150881640839655534/image.png
19:53:56advesperacitGNOME and javascript is what's wrong with it
19:54:05FromDiscord<kingterrytheterrible12> anyways its time to #offtopic since if i continue phil is probably gonna boot my ass off here
19:54:24FromDiscord<kingterrytheterrible12> In reply to @advesperacit "GNOME and javascript is": exploring my options
19:54:49FromDiscord<raynei486> In reply to @chronos.vitaqua "I mean that *is*": yeah I think it's pretty funny
19:55:13FromDiscord<Chronos [She/Her]> Should I license it as CC0? It's probably not even enough code to license really and it is small lmao
19:55:56FromDiscord<raynei486> just be generic and use mit
19:56:25FromDiscord<kingterrytheterrible12> also can i replace nim C with nim cpp and it would just work?
19:56:41FromDiscord<Chronos [She/Her]> Yep usually
19:56:44FromDiscord<Chronos [She/Her]> In reply to @raynei486 "just be generic and": Eh
19:56:56FromDiscord<Chronos [She/Her]> Doing CC0
19:57:27FromDiscord<Chronos [She/Her]> Are locks specific to a thread? What if I want to allocate the type on shared memory :/
19:57:31FromDiscord<Chronos [She/Her]> Hmmm
19:57:55FromDiscord<kingterrytheterrible12> In reply to @chronos.vitaqua "Are locks specific to": Yes
19:58:06FromDiscord<Chronos [She/Her]> Iirc there's a thing for that but isn't it discouraged to use it?
19:58:15FromDiscord<kingterrytheterrible12> once you lock 1 thread all other threads must wait until its unlocked
19:58:23FromDiscord<kingterrytheterrible12> kinda the point of a lock
19:58:47FromDiscord<Chronos [She/Her]> No I mean can you access a lock defined from one thread, in another
19:59:06advesperacitwhat would be the point of a lock otherwise
19:59:14FromDiscord<Chronos [She/Her]> Like accessing any variable from one thread in another
19:59:32FromDiscord<Chronos [She/Her]> In reply to @advesperacit "what would be the": Unsure, just wanting to catch any behaviour that may happen in a scenario idk about
20:00:40FromDiscord<kingterrytheterrible12> In reply to @chronos.vitaqua "Unsure, just wanting to": it sounds like your making a disaster
20:00:52FromDiscord<kingterrytheterrible12> if you are new to multi threaded code start simple
20:00:56FromDiscord<Chronos [She/Her]> I make disasters all the time 🤷
20:01:22FromDiscord<raynei486> In reply to @kingterrytheterrible12 "also can i replace": probably but the C backend is definitely the most mature and tested
20:01:25FromDiscord<kingterrytheterrible12> multithreaded code is hard to get right
20:01:31FromDiscord<Chronos [She/Her]> In reply to @kingterrytheterrible12 "if you are new": I understand the concept and the basics, it's moreso me worrying about what if the object is freed despite being in use in another thread
20:01:48FromDiscord<Chronos [She/Her]> Since afaik arc doesn't actually ensure that really
20:01:58FromDiscord<Chronos [She/Her]> Unless I'm completely wrong
20:02:00FromDiscord<kingterrytheterrible12> In reply to @chronos.vitaqua "I understand the concept": thats the GC job
20:02:02FromDiscord<kingterrytheterrible12> not yours
20:02:07FromDiscord<Chronos [She/Her]> Fair enough
20:02:14FromDiscord<kingterrytheterrible12> therefore if it happens make an issue in nim github
20:02:24*Mister_Magister quit (Quit: bye)
20:02:30FromDiscord<kingterrytheterrible12> sent a code paste, see https://play.nim-lang.org/#ix=4G4L
20:02:34FromDiscord<kingterrytheterrible12> i compile with C++
20:03:37FromDiscord<raynei486> is virtual even a keyword
20:04:01FromDiscord<kingterrytheterrible12> In reply to @jmgomez "if you are targeting": acording to him
20:04:23*Mister_Magister joined #nim
20:04:29FromDiscord<Chronos [She/Her]> In reply to @kingterrytheterrible12 "therefore if it happens": Fair enough, I shall do that
20:04:46FromDiscord<Chronos [She/Her]> In reply to @kingterrytheterrible12 "acording to him": It's a pragma
20:05:08FromDiscord<kingterrytheterrible12> In reply to @chronos.vitaqua "It's a pragma": how do i use it
20:05:34FromDiscord<Chronos [She/Her]> Same with any pragma, `proc speak(self: Animal, msg: string) {.virtual.} =`
20:05:40FromDiscord<Chronos [She/Her]> Tho how it works idk at all
20:06:09FromDiscord<kingterrytheterrible12> alright
20:06:48FromDiscord<kingterrytheterrible12> In reply to @chronos.vitaqua "Same with any pragma,": yes it works
20:07:58FromDiscord<Chronos [She/Her]> Gucci
20:10:55FromDiscord<kingterrytheterrible12> also where is the nim cache on linux?
20:11:27advesperacit~/.cache/nim
20:12:08FromDiscord<kingterrytheterrible12> In reply to @advesperacit "~/.cache/nim": thanks
20:12:25FromDiscord<Chronos [She/Her]> There's also a flag for specifying the cache dir
20:12:31FromDiscord<Chronos [She/Her]> It's `--nimcache` iirc
20:13:00FromDiscord<kingterrytheterrible12> bet
20:13:02FromDiscord<kingterrytheterrible12> ty
20:13:03FromDiscord<kingterrytheterrible12> also
20:13:23FromDiscord<kingterrytheterrible12> @ElegantBeouf does owlkettle mem leak for you? i opened an issue on their GH↵https://github.com/can-lehmann/owlkettle/issues/73
20:13:40FromDiscord<Chronos [She/Her]> In reply to @kingterrytheterrible12 "ty": Np
20:14:08FromDiscord<Chronos [She/Her]> I actually know a fair bit about Nim which is... Mildly shocking?
20:14:47FromDiscord<kingterrytheterrible12> In reply to @chronos.vitaqua "I actually know a": xd
20:15:17FromDiscord<Chronos [She/Her]> Ah with macros how do I accept an identifier? :p
20:15:29FromDiscord<Chronos [She/Her]> `untyped`?
20:15:33FromDiscord<kingterrytheterrible12> macros evil
20:15:42FromDiscord<kingterrytheterrible12> do you have to use them
20:16:15FromDiscord<raynei486> they're not evil
20:16:16FromDiscord<Chronos [She/Her]> Yep for accessing the underlying field
20:16:19FromDiscord<raynei486> just use properly
20:16:23FromDiscord<raynei486> just like C preprocessors
20:16:25FromDiscord<Chronos [She/Her]> It's a dead simple macro to
20:16:27FromDiscord<Chronos [She/Her]> too
20:16:37*advesperacit quit ()
20:16:39FromDiscord<Chronos [She/Her]> sent a code paste, see https://play.nim-lang.org/#ix=4G4N
20:16:47FromDiscord<Chronos [She/Her]> All I need to do is add the lock for it now
20:16:58FromDiscord<kingterrytheterrible12> In reply to @raynei486 "just like C preprocessors": the C and C++ preprocessor are literally the source of 30% of the langs problems
20:17:05FromDiscord<Chronos [She/Her]> Not sure how to make sure the lock is initialised though... Lol
20:17:05FromDiscord<kingterrytheterrible12> you can do some wonky shit with macros
20:17:55FromDiscord<Yardanico> https://github.com/nim-lang/Nim/issues/20000 2000th issue 🎉
20:18:01FromDiscord<Yardanico> (edit) "2000th" => "20000th"
20:18:16FromDiscord<Yardanico> wait what
20:18:18FromDiscord<Yardanico> nvm
20:18:31FromDiscord<Chronos [She/Her]> sent a code paste, see https://play.nim-lang.org/#ix=4G4O
20:18:33FromDiscord<Yardanico> I got this in notifications for some reason, but it's an old one
20:18:39FromDiscord<Yardanico> ah because of metagn's comment
20:18:45FromDiscord<raynei486> In reply to @kingterrytheterrible12 "the C and C++": yeah but only because they're misused lol (and badly designed)
20:19:03FromDiscord<Yardanico> Nim has a preprocessor too, but don't tell that to anyone
20:19:11FromDiscord<Yardanico> https://nim-lang.org/docs/filters.html
20:19:27FromDiscord<Chronos [She/Her]> is `var Lock` a valid type in fields for types? :p
20:20:14FromDiscord<raynei486> don't you only modify them by overloading the assignment operator
20:20:52FromDiscord<Chronos [She/Her]> Wdym?
20:22:27FromDiscord<raynei486> like aren't you making members `var` in the type declaration because you want to modify them
20:24:04FromDiscord<Chronos [She/Her]> Yeah I am
20:24:24FromDiscord<Chronos [She/Her]> Locks have to be modifiable
20:24:30FromDiscord<Chronos [She/Her]> https://nim-lang.org/docs/locks.html
20:28:48FromDiscord<raynei486> hmm I can't find where you overload the assignment operator
20:29:06FromDiscord<Chronos [She/Her]> Wdym?
20:29:13FromDiscord<Chronos [She/Her]> I don't get what you mean lol
20:30:01FromDiscord<raynei486> nvm forget what I said
20:30:12FromDiscord<raynei486> object fields can be modified normally
20:32:15FromDiscord<Chronos [She/Her]> Shit, I can't do what I wanted to do even with a macro :////
20:32:57FromDiscord<kingterrytheterrible12> In reply to @chronos.vitaqua "Shit, I can't do": its not possible
20:33:01FromDiscord<Chronos [She/Her]> Maybe I can though
20:33:04FromDiscord<Chronos [She/Her]> Hm...
20:33:08FromDiscord<kingterrytheterrible12> nim macros manipulate AST
20:33:09FromDiscord<kingterrytheterrible12> so
20:33:10FromDiscord<kingterrytheterrible12> you can
20:34:26FromDiscord<Chronos [She/Her]> Oh shit the code doesn't kill itself with Nimsuggest so maybe I can
20:37:35FromDiscord<kingterrytheterrible12> In reply to @yardanico "https://github.com/nim-lang/Nim/issues/20000 20000t": the 20th THOUSAND ISSUE
20:37:36FromDiscord<kingterrytheterrible12> GODDAMN
20:37:44FromDiscord<Yardanico> there are almost 23k now
20:37:47FromDiscord<kingterrytheterrible12> BRO
20:37:57FromDiscord<kingterrytheterrible12> too many bugs
20:38:29FromDiscord<Chronos [She/Her]> `'c' is not GC-safe as it accesses 'a' which is a global using GC'ed memory` oof, maybe I can declare the variable gcsafe
20:38:54FromDiscord<Chronos [She/Her]> Okay nope
20:38:56FromDiscord<Chronos [She/Her]> Uh
20:38:58FromDiscord<Chronos [She/Her]> Hm
20:39:33FromDiscord<Chronos [She/Her]> Yeaaah not sure how to make it gcsafe now
20:40:54FromDiscord<raynei486> In reply to @kingterrytheterrible12 "too many bugs": I wish I could work on actual code related issues
20:41:02FromDiscord<raynei486> even the ones labeled easy get me lost lmao
20:41:09FromDiscord<raynei486> so I can only make documentation
20:41:54FromDiscord<kingterrytheterrible12> In reply to @raynei486 "I wish I could": i wish you could too
20:42:21FromDiscord<raynei486> although making docs ain't half bad
20:43:22FromDiscord<raynei486> I'm documenting new concepts right now and they were merged in 2020 and still undocumented
20:43:41FromDiscord<Elegantbeef> `{.cast(gcSafe).}` 😄↵(@Chronos [She/Her])
20:44:15FromDiscord<Elegantbeef> https://nim-lang.org/docs/manual.html#effect-system-gc-safety-effect
20:44:26FromDiscord<kingterrytheterrible12> isnt there an nim llvm frontend?
20:45:39FromDiscord<raynei486> yeah by arne
20:45:57FromDiscord<raynei486> https://github.com/arnetheduck/nlvm
20:47:15FromDiscord<kingterrytheterrible12> is it good
20:48:33FromDiscord<Chronos [She/Her]> In reply to @Elegantbeef "`{.cast(gcSafe).}` 😄 (<@524288464422830095>)": Couldn't do that in a test block, but it did work using it as a block
20:48:34FromDiscord<Chronos [She/Her]> https://play.nim-lang.org/#ix=4G4W
20:48:46FromDiscord<Chronos [She/Her]> Also I think this does what I wanted even if a bit out of order
20:48:56FromDiscord<Chronos [She/Her]> Though they probably aren't running long enough hm...
20:49:10FromDiscord<raynei486> In reply to @kingterrytheterrible12 "is it good": no idea, try asking arne himself how ready the project is
20:49:17FromDiscord<raynei486> pretty sure he's in this server
20:49:24FromDiscord<kingterrytheterrible12> @arnetheduck how ready is your compiler
20:49:28FromDiscord<Elegantbeef> Also you probably should use the guard annotation for your `obj`
20:50:12FromDiscord<Chronos [She/Her]> I can;t even test it sigh
20:50:18FromDiscord<Chronos [She/Her]> In reply to @Elegantbeef "Also you probably should": Oh? What's that?
20:50:38FromDiscord<Elegantbeef> https://nim-lang.org/docs/manual.html#guards-and-locks-guards-and-locks-sections
20:51:14FromDiscord<jmgomez> In reply to @ShalokShalom (ShalokShalom) "its funny that you": I think you dont understand what I said. Nim has statically dispatched function overloading. A library dev can ask if certain generic type implements a function trivially
20:51:55FromDiscord<jmgomez> In reply to @kingterrytheterrible12 "acording to him": https://nim-lang.github.io/Nim/manual_experimental.html#virtual-pragma
20:52:58FromDiscord<Elegantbeef> Nim can do multiple dispatch statically, but then it's just normal overloading
20:53:21FromDiscord<Elegantbeef> There is also the disabled multimethods that no one should use
20:53:34FromDiscord<Chronos [She/Her]> In reply to @chronos.vitaqua "https://play.nim-lang.org/#ix=4G4W": Yeah I'm not actually show how I'd write a proper test for this 😅
20:55:34FromDiscord<vindaar> sent a code paste, see https://play.nim-lang.org/#ix=4G4Z
20:55:43FromDiscord<jmgomez> In reply to @Elegantbeef "Nim can do multiple": In the conversation, I used how the `std/json` is open to be extended as example with the combination of `compiles(userDefinedTheProc(T))` . I didnt refer explicitly to multimethods
20:55:48FromDiscord<Chronos [She/Her]> Wait templates actually work for that? Sweeet
20:56:12FromDiscord<jmgomez> (edit) "`compiles(userDefinedTheProc(T))`" => "`compiles(userDefinedProc(T))`"
20:56:26FromDiscord<jmgomez> (edit) "`compiles(userDefinedProc(T))`" => "`when compiles(userDefinedProc(T)):...`"
20:57:37FromDiscord<Elegantbeef> Using dot operators for locking operations is the most hidden performance causality i've seen in some time
20:57:38FromDiscord<Elegantbeef> casualty even
20:58:17FromDiscord<Chronos [She/Her]> Is this not done at compile time?
20:58:50FromDiscord<Chronos [She/Her]> Oh wait the locking
20:58:57FromDiscord<Elegantbeef> Locking is not done at compile time and is a blocking operation
20:59:00FromDiscord<Chronos [She/Her]> I mean, idk another way around it?
20:59:25FromDiscord<Chronos [She/Her]> Yk maybe I'm just being extra (I definitely am)
21:00:24FromDiscord<Chronos [She/Her]> Maybe there's a usecase where you need to ensure it's strictly locked tho hmmmm
21:02:47FromDiscord<Chronos [She/Her]> Is it a bad idea to do `{.gcsafe.}: ...` in my template for the entire block of mutex code?
21:03:02FromDiscord<saint._._.> I updated nim with nimble install nim
21:03:06FromDiscord<Chronos [She/Her]> The only thing that may be unsafe is the assignment block which idk how to protect against
21:03:08FromDiscord<saint._._.> But when I use nim --version I still have the old version
21:03:16FromDiscord<saint._._.> and which nim shows it's running from my nimble/bin
21:03:34FromDiscord<saint._._.> `/Users/saint/.nimble/bin/nim↵`
21:03:43FromDiscord<saint._._.> Is there something I have to do to "link" it or something?
21:03:57FromDiscord<saint._._.> If I try to nimble uninstall nim it says it's removing nim 2.0
21:04:27FromDiscord<saint._._.> sent a code paste, see https://play.nim-lang.org/#ix=4G53
21:04:48FromDiscord<saint._._.> sent a code paste, see https://play.nim-lang.org/#ix=4G54
21:04:59FromDiscord<alendrik> I use choosenim, helps me deal with that
21:05:20FromDiscord<Elegantbeef> Yea choosenim installs nim inside nimble
21:05:28FromDiscord<saint._._.> Oh maybe I am using choosenim
21:05:57FromDiscord<alendrik> type choosenim show
21:06:14FromDiscord<alendrik> (edit) "choosenim show" => "`choosenim show`"
21:06:44FromDiscord<saint._._.> Ya I am installing it from there now
21:06:55FromDiscord<alendrik> noice, glad it worked for ya
21:07:01FromDiscord<saint._._.> https://cdn.discordapp.com/attachments/991450167041605662/1067994340787503125/YayFren.gif
21:07:19FromDiscord<saint._._.> 👍
21:09:54FromDiscord<Chronos [She/Her]> In reply to @Elegantbeef "Locking is not done": Also beef, what's better than mutexes when I need to access data between threads
21:10:33FromDiscord<Chronos [She/Her]> And ensure that they aren't being actively used
21:11:30FromDiscord<kingterrytheterrible12> In reply to @chronos.vitaqua "Also beef, what's better": nothing
21:11:48FromDiscord<kingterrytheterrible12> once 2 threads want to acess the same thing at the same time then you need a mutex
21:12:14FromDiscord<Chronos [She/Her]> Using it to make sure that physics logic and rendering logic don't break (since rendering draws based on the physics boxes and stuff)
21:12:32FromDiscord<bhunao> is there something specific i gotta do in nim to do `+=` inside a proc or a template?
21:12:48FromDiscord<Elegantbeef> nope
21:13:00FromDiscord<Chronos [She/Her]> I mean if I'm repeatedly calling multiple procs at a time on the same object that would be an issue
21:13:18FromDiscord<kingterrytheterrible12> and it dependa
21:13:20FromDiscord<kingterrytheterrible12> (edit) "dependa" => "depends"
21:13:25FromDiscord<Chronos [She/Her]> Can solve that with a `with mutex:` ig?
21:13:26FromDiscord<kingterrytheterrible12> acess as in modify or acess as in read
21:13:35FromDiscord<Chronos [She/Her]> Read
21:13:36FromDiscord<Elegantbeef> I'm guessing your `+=` issue is lack of `var T` in the proc
21:13:44FromDiscord<kingterrytheterrible12> In reply to @chronos.vitaqua "Read": you dont need a mutex then
21:13:53FromDiscord<kingterrytheterrible12> mutexes are for mutation operations
21:14:00FromDiscord<kingterrytheterrible12> reading does not mutate anything
21:15:58FromDiscord<bhunao> sent a code paste, see https://play.nim-lang.org/#ix=4G5d
21:16:11FromDiscord<Elegantbeef> No
21:16:26FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4G5e
21:17:00FromDiscord<Chronos [She/Her]> In reply to @kingterrytheterrible12 "reading does not mutate": So I should be fine if I'm reading data as a proc is actively editing the data on another thread? The issue there is that my drawn object could look odd especially with faster objects, no?
21:17:07FromDiscord<bhunao> In reply to @Elegantbeef "No": it worked, ty
21:17:09FromDiscord<bhunao> ❤️
21:17:34FromDiscord<bhunao> its been 3 days i'm trying to understand why
21:17:38FromDiscord<Elegantbeef> If one thread is reading whilst one thread is mutating you need to lock access
21:17:53FromDiscord<Chronos [She/Her]> Yeah that's what I'm thinking :p
21:19:18FromDiscord<Elegantbeef> Unless you're mutating it from two places
21:19:19FromDiscord<Elegantbeef> Wonder if an atomic integer would work to prevent access....
21:19:19FromDiscord<Chronos [She/Her]> sent a code paste, see https://play.nim-lang.org/#ix=4G5i
21:19:31FromDiscord<Chronos [She/Her]> atomic integer? wdym?
21:21:31FromDiscord<leorize> just use a lock until it's proven to be a bottleneck
21:22:04FromDiscord<Chronos [She/Her]> In reply to @chronos.vitaqua "Also is there a": But yeah tryna think of this now... Unless I could just get the name of the mutex var and shadow it in the scope?
21:23:06FromDiscord<leorize> typically a re-entrant lock is used for that
21:23:24FromDiscord<kingterrytheterrible12> In reply to @chronos.vitaqua "So I *should* be": https://media.discordapp.net/attachments/371759389889003532/1150904449745834044/mutex.png
21:23:30FromDiscord<leorize> but it's highly recommended that the user understand locks to not double-lock something
21:23:42FromDiscord<kingterrytheterrible12> its simple
21:24:31FromDiscord<kingterrytheterrible12> In reply to @leorize "just use a lock": the speed boost you get from mutexless multithreading is crazy
21:24:40FromDiscord<leorize> that's why it's wrong \:)
21:24:49FromDiscord<kingterrytheterrible12> exactly
21:24:57FromDiscord<kingterrytheterrible12> 95% of the time
21:25:27FromDiscord<kingterrytheterrible12> @Chronos [She/Her] also btw mutexes dont have to be slow
21:25:40FromDiscord<kingterrytheterrible12> it depends on what the returning thread is doing
21:25:55FromDiscord<leorize> usually, just stop sharing data between threads and you free yourself from locks
21:25:57FromDiscord<leorize> but 99% of the time you have bigger problems when lock contention become a bottleneck
21:26:10FromDiscord<kingterrytheterrible12> true
21:27:11FromDiscord<kingterrytheterrible12> i remember i wrote a multithreaded tiktok username checker with no mutex and dear god was it a disaster to debug
21:27:15FromDiscord<toma400> Out of curiosity, is there any lib or std func that allows you to access/write into clipboard?↵Especially given image data, since I've found string one, but it's not suitable for use I would like to add for my app
21:27:18FromDiscord<Chronos [She/Her]> In reply to @leorize "typically a re-entrant lock": Wdym?
21:27:43FromDiscord<kingterrytheterrible12> In reply to @chronos.vitaqua "Wdym?": bro just make the thing already
21:27:56FromDiscord<kingterrytheterrible12> just lock the thread thats getting mutated and thats it
21:28:19FromDiscord<Chronos [She/Her]> In reply to @kingterrytheterrible12 "it depends on what": One thread is rendering the sprites onto the position of the object that is actively moving
21:28:36FromDiscord<kingterrytheterrible12> In reply to @chronos.vitaqua "One thread is rendering": OH i have found the perfect video from a good teacher on this
21:28:39FromDiscord<Chronos [She/Her]> I am making the mutex lib :p
21:28:41FromDiscord<kingterrytheterrible12> if your familar with C++ tho
21:29:18FromDiscord<kingterrytheterrible12> https://www.youtube.com/watch?v=5HWCsmE9DrE&ab_channel=TheCherno
21:29:22FromDiscord<leorize> they&#x27;re also known as recursive mutexes↵(@Chronos [She/Her])
21:29:53FromDiscord<leorize> i'm pretty sure there are some other locks library out there for Nim already
21:29:57FromDiscord<kingterrytheterrible12> @Chronos [She/Her] and also if you didnt know every GUI framework in this world tells you to not mutate the UI thread from another thread for example
21:30:10FromDiscord<kingterrytheterrible12> and also if your a noob in mulithreading DO NOT MAKE A MUTEX LIB
21:30:29FromDiscord<kingterrytheterrible12> your gonna end up debugging your multithreaded code and your mutex lib
21:31:27FromDiscord<Chronos [She/Her]> There's no other mutex lib in Nim lol
21:31:39FromDiscord<Chronos [She/Her]> not that google brought up at least
21:31:58FromDiscord<kingterrytheterrible12> In reply to @chronos.vitaqua "There's no other mutex": there is literally a mutex lib in the nim stdlib
21:32:06FromDiscord<kingterrytheterrible12> https://nim-lang.org/docs/locks.html
21:32:12FromDiscord<Chronos [She/Her]> No mutex type I meant
21:32:24FromDiscord<Chronos [She/Her]> I'm just overcomplicating this tbh
21:32:33FromDiscord<kingterrytheterrible12> ues
21:32:34FromDiscord<kingterrytheterrible12> (edit) "ues" => "yes"
21:32:38FromDiscord<Chronos [She/Her]> My code is just a wrapper for that to make a type :p
21:32:45FromDiscord<kingterrytheterrible12> xd the joys of debugging mulithreaded code
21:32:52FromDiscord<kingterrytheterrible12> there is a reason why async is so popular...
21:33:18FromDiscord<Chronos [She/Her]> Pretty sure async doesn't help when you're doing math
21:33:25FromDiscord<leorize> just make sure helgrind and drd is happy with your MT code and you'll be fine
21:33:34FromDiscord<kingterrytheterrible12> In reply to @chronos.vitaqua "Pretty sure async doesn't": it doesnt
21:34:24FromDiscord<Chronos [She/Her]> Helgrind? drd? :p
21:34:32FromDiscord<Chronos [She/Her]> Anyway I'm done for today oof
21:35:58FromDiscord<kingterrytheterrible12> xd
21:36:17FromDiscord<kingterrytheterrible12> i am making an add to path gtk app in nim
21:36:31FromDiscord<kingterrytheterrible12> so noob linux users can add shit to path like windows without borking everything
21:36:55FromDiscord<Chronos [She/Her]> How would adding to path work without editing the profile file?
21:37:00FromDiscord<Chronos [She/Her]> Or adding one in profile.d
21:37:03FromDiscord<kingterrytheterrible12> In reply to @chronos.vitaqua "How would adding to": thats the thing
21:37:16FromDiscord<leorize> of course you'd have to edit something \:P
21:37:22FromDiscord<kingterrytheterrible12> im gonna load the .bashrc as string the modify it there bruh
21:37:29FromDiscord<Chronos [She/Her]> In reply to @kingterrytheterrible12 "thats the thing": If you're editing it, it sounds like a recipe for disaster
21:37:29FromDiscord<kingterrytheterrible12> (edit) "the" => "then"
21:37:33FromDiscord<kingterrytheterrible12> why
21:37:44FromDiscord<Chronos [She/Her]> Not everyone uses bash (I don't, I use `fish` shell)
21:37:53FromDiscord<Chronos [She/Her]> I mean if you're just appending it's fine ig
21:38:05FromDiscord<kingterrytheterrible12> eh idk
21:38:06FromDiscord<Chronos [She/Her]> Would get long if they constantly add folders to path ig but that's not an issue
21:38:20FromDiscord<kingterrytheterrible12> im gonna say its for bashrc
21:38:25FromDiscord<kingterrytheterrible12> if you end up borking something
21:38:27FromDiscord<kingterrytheterrible12> not my problem
21:39:00FromDiscord<leorize> there's a reason why PATH-editing stuff is unpopular in \nix after all
21:39:10FromDiscord<kingterrytheterrible12> In reply to @leorize "there's a reason why": why
21:39:31FromDiscord<leorize> inconsistent and can bork stuff up
21:39:41FromDiscord<kingterrytheterrible12> its easy
21:39:47FromDiscord<kingterrytheterrible12> just append the path to new line
21:39:48FromDiscord<kingterrytheterrible12> done
21:39:53FromDiscord<leorize> so tools just took the conservative approach of telling you to do the deed yourself
21:40:05FromDiscord<raynei486> In reply to @toma400 "Out of curiosity, is": That would require OS specific stuff
21:40:20FromDiscord<kingterrytheterrible12> `export userinputhere:$PATH`
21:41:54FromDiscord<kingterrytheterrible12> i made a backup bashrc bc i know i will bork everything in development
21:42:28FromDiscord<raynei486> imagine configuring your shell
21:42:31FromDiscord<raynei486> I'm too dumb for bash
21:43:30FromDiscord<kingterrytheterrible12> In reply to @raynei486 "imagine configuring your shell": im making it for noobs
21:43:41FromDiscord<kingterrytheterrible12> gonna ask the linux mint guys to add it to the OS next release
21:44:32FromDiscord<leorize> you might want something more structured for OS integration
21:45:19FromDiscord<kingterrytheterrible12> In reply to @leorize "you might want something": structured as in what?
21:45:24FromDiscord<kingterrytheterrible12> its just a couple of lines on nim
21:46:40FromDiscord<leorize> something reliable and doesn't break because you use it in a funny way
21:47:06FromDiscord<leorize> a simple idea is a tool that compiles `environment.d` and export bash/fish/whatever
21:47:11FromDiscord<kingterrytheterrible12> In reply to @leorize "something reliable and doesn't": oh you mean stupid proof
21:47:46FromDiscord<leorize> then have the OS vendor add something like `eval environment-provider` to their default bashrc or something
21:48:08FromDiscord<kingterrytheterrible12> In reply to @leorize "then have the OS": nah
21:48:21FromDiscord<kingterrytheterrible12> im gonna make it in a way that makes sense then you guys can audit it
21:48:23FromDiscord<kingterrytheterrible12> for stupid
21:51:20FromDiscord<Chronos [She/Her]> In reply to @kingterrytheterrible12 "im gonna say its": Fair enough
21:51:37FromDiscord<Chronos [She/Her]> In reply to @kingterrytheterrible12 "`export userinputhere:$PATH`": I always make sure to manually define every path lol
21:51:44FromDiscord<leorize> in my personal experience, if you want something so simple a noob could use it, then it better be built like a tank
21:52:17FromDiscord<kingterrytheterrible12> In reply to @leorize "in my personal experience,": its just one big button called "add to path" you click it then it opens a dialog then you place your path and it adds it
21:52:41FromDiscord<kingterrytheterrible12> its sorta like how its done in windows
21:52:52FromDiscord<kingterrytheterrible12> if you add something wrong its gonna add it
21:53:29FromDiscord<leorize> but windows don't modify text files that contains executable code when you does so
21:53:45FromDiscord<kingterrytheterrible12> so
21:53:46FromDiscord<leorize> it's the reliability factor
21:53:50FromDiscord<kingterrytheterrible12> im gonna add it to a new line
21:54:07FromDiscord<kingterrytheterrible12> anything that happens is not my problem i added something to a new line like how you would do it
21:54:34FromDiscord<kingterrytheterrible12> sent a code paste, see https://play.nim-lang.org/#ix=4G5s
21:55:05FromDiscord<kingterrytheterrible12> is bashrc just a txt file?
21:55:07FromDiscord<leorize> well, you do you↵(@kingterrytheterrible12)
21:55:14FromDiscord<leorize> `~` is not expanded outside of shell
21:55:22FromDiscord<leorize> use `os.getHomeDir()`
21:55:30FromDiscord<kingterrytheterrible12> oh
21:55:31FromDiscord<kingterrytheterrible12> ok
21:59:50FromDiscord<kingterrytheterrible12> In reply to @leorize "use `os.getHomeDir()`": it just returns a string
22:00:12FromDiscord<leorize> use it in place of your `~`
22:00:45FromDiscord<kingterrytheterrible12> ah alright
22:02:07FromDiscord<leorize> I just realized that one of the (harmful) prank you could do is to create a folder called `~` and ask someone to delete it using CLI
22:02:38FromDiscord<raynei486> sent a code paste, see https://play.nim-lang.org/#ix=4G5w
22:02:51FromDiscord<raynei486> In reply to @leorize "I just realized that": lol
22:03:03FromDiscord<raynei486> how would the shell recognize them ngl
22:03:21FromDiscord<kingterrytheterrible12> In reply to @leorize "I just realized that": we do a lil trolling
22:03:29*lucasta joined #nim
22:03:58FromDiscord<leorize> usually if you quote it it won&#x27;t expand↵(@raynei486)
22:04:07FromDiscord<leorize> or just prepend the thing with `./`
22:05:19FromDiscord<raynei486> oh really?
22:05:21FromDiscord<kingterrytheterrible12> also why is this invalid
22:05:21FromDiscord<kingterrytheterrible12> sent a code paste, see https://play.nim-lang.org/#ix=4G5x
22:05:25FromDiscord<kingterrytheterrible12> is there a gocha here
22:05:36FromDiscord<kingterrytheterrible12> it returns a string i should be able to concat it
22:05:37FromDiscord<leorize> special file names are always fun to troll with
22:05:51FromDiscord<leorize> like trying to cat a file with the name `-`
22:06:08FromDiscord<kingterrytheterrible12> due to stupid
22:06:11FromDiscord<kingterrytheterrible12> sent a code paste, see https://play.nim-lang.org/#ix=4G5y
22:08:21FromDiscord<kingterrytheterrible12> we half way there
22:10:44FromDiscord<kingterrytheterrible12> also what file mode open the file to append? `fmWrite`?
22:11:12FromDiscord<kingterrytheterrible12> nvm its `fmAppend`
22:11:47FromDiscord<huantian> Gasp I’m astounded
22:12:05FromDiscord<kingterrytheterrible12> In reply to @huantian "Gasp I’m astounded": about what?
22:13:47FromDiscord<huantian> That the file mode to open a file to append would be called fmAppend 🙃
22:14:04FromDiscord<kingterrytheterrible12> In reply to @huantian "That the file mode": yes
22:14:17FromDiscord<raynei486> nim actually has a standard naming guide
22:14:19FromDiscord<raynei486> go check it out
22:14:25FromDiscord<leorize> frankly the `fm` is terrible design
22:14:28FromDiscord<raynei486> you can guess a lot of enum and field names
22:14:39FromDiscord<kingterrytheterrible12> In reply to @leorize "frankly the `fm*` is": its a whole lot better than python way
22:14:47FromDiscord<kingterrytheterrible12> tf is "w+" python
22:14:48FromDiscord<kingterrytheterrible12> WTF
22:14:52FromDiscord<raynei486> https://nim-lang.org/docs/nep1.html
22:15:15FromDiscord<raynei486> In reply to @kingterrytheterrible12 "tf is "w+" python": That's just inherited from `fopen`
22:15:19FromDiscord<leorize> anything is better than the C way, that's a low bar
22:15:40FromDiscord<raynei486> yeah
22:15:52FromDiscord<raynei486> but what better way would there be
22:16:08FromDiscord<raynei486> Is passing in a flag for access not straightforward enough?
22:16:29FromDiscord<leorize> flags composition is better
22:16:44FromDiscord<leorize> and that's something natively supported in nim via sets even
22:19:03FromDiscord<raynei486> wait it's literally like 3 extra lines of code lol
22:19:07FromDiscord<raynei486> PR when?
22:20:07FromDiscord<leorize> and fmWrite/fmReadWrite is quite a beginners' trap in Nim
22:21:06FromDiscord<raynei486> sent a code paste, see https://play.nim-lang.org/#ix=4G5C
22:21:20FromDiscord<raynei486> assuming the arguments of `open` was adjusted ofc
22:22:01FromDiscord<leorize> yea but that's not how the actual thing was done, isn't it
22:22:38FromDiscord<raynei486> In reply to @raynei486 "PR when?": this
22:23:18FromDiscord<raynei486> idk though
22:23:27FromDiscord<raynei486> that would be a breaking change
22:23:43FromDiscord<raynei486> albeit very easy to migrate
22:24:05FromDiscord<leorize> they had 1.x -\> 2.0 and stuff like that didn't happen \:p
22:24:23FromDiscord<kingterrytheterrible12> i dont need sudo to write to path right?
22:24:31FromDiscord<kingterrytheterrible12> for some reason my program is not writing to it
22:24:43FromDiscord<kingterrytheterrible12> the code
22:24:46FromDiscord<kingterrytheterrible12> sent a code paste, see https://play.nim-lang.org/#ix=4G5F
22:25:07FromDiscord<raynei486> In reply to @leorize "they had 1.x -\>": because no issue for it 😛
22:25:16FromDiscord<leorize> close the file and it'll be written
22:25:29FromDiscord<leorize> if you don't the string stays in buffer and will be lost on exit
22:25:54FromDiscord<kingterrytheterrible12> oh whoops
22:25:55FromDiscord<raynei486> that's why you should always have a `defer: file.close()`
22:26:00FromDiscord<kingterrytheterrible12> i remeber this stupid mistake
22:26:04FromDiscord<kingterrytheterrible12> thank you guys
22:26:07FromDiscord<raynei486> speaking of which why hasn't `File` been rewritten with destructor hooks yet
22:26:18FromDiscord<leorize> because there's no issue for it \:)
22:26:23FromDiscord<raynei486> C++ had that ages ago with `fstream`
22:26:36FromDiscord<raynei486> In reply to @leorize "because there's no issue": goddamnit you're right
22:26:40FromDiscord<raynei486> the stdlib needs some love
22:27:33FromDiscord<leorize> these complaints aren't new tbh
22:28:01FromDiscord<raynei486> So it's sitting somewhere in the 2k issues?
22:28:06FromDiscord<leorize> professional made stuff just build their own stdlib outside of nim, see status-im for an example
22:28:46FromDiscord<raynei486> oh yeah
22:28:55FromDiscord<raynei486> well if they have their own needs then sure
22:29:07FromDiscord<raynei486> but the standard library should be usable for most things
22:29:09FromDiscord<kingterrytheterrible12> sucess bois https://media.discordapp.net/attachments/371759389889003532/1150920994043740222/image.png
22:29:38FromDiscord<leorize> they don't have that great of a culture for contributing back
22:29:50FromDiscord<raynei486> In reply to @kingterrytheterrible12 "sucess bois": nice
22:30:11FromDiscord<kingterrytheterrible12> i got the dopamine rusg
22:30:14FromDiscord<kingterrytheterrible12> (edit) "rusg" => "rush"
22:30:20FromDiscord<leorize> so status people isn't viewed in a great light by old timers here
22:31:02FromDiscord<raynei486> but they've made some cool libraries
22:31:48FromDiscord<kingterrytheterrible12> also is it possible to add an else statment to a try catch?
22:31:58FromDiscord<leorize> you can add more except
22:32:39FromDiscord<kingterrytheterrible12> wdym
22:33:02FromDiscord<leorize> you can have multiple except branches if that's what you're after
22:33:27FromDiscord<raynei486> Or maybe you're looking for `finally`
22:33:31FromDiscord<kingterrytheterrible12> no i want something to run if the exception did not happen
22:33:37FromDiscord<kingterrytheterrible12> oh wait
22:33:40FromDiscord<kingterrytheterrible12> im fucking stupid
22:33:47FromDiscord<raynei486> In reply to @kingterrytheterrible12 "no i want something": ?
22:33:48FromDiscord<kingterrytheterrible12> why dont i just add it inside the try LMAO
22:33:59FromDiscord<raynei486> Then just add the stuff after the except?
22:35:30FromDiscord<kingterrytheterrible12> im sorry im an exception noob
22:35:40FromDiscord<kingterrytheterrible12> i havent used exceptions in 3 years
22:35:43FromDiscord<kingterrytheterrible12> due to slow
22:35:52FromDiscord<raynei486> based?
22:36:03FromDiscord<kingterrytheterrible12> C++
22:36:03FromDiscord<raynei486> Actually I'm gonna be a C++ programmer and say they're not slow
22:36:08FromDiscord<kingterrytheterrible12> they are
22:36:31FromDiscord<kingterrytheterrible12> its the only thing in the whole C++ standard other than RTTI and vtables that have a runtime cost
22:36:33FromDiscord<kingterrytheterrible12> iirc
22:36:34FromDiscord<raynei486> Compilers are so good at optimizing that they don't cost anything if not thrown
22:36:40FromDiscord<kingterrytheterrible12> if not thrown
22:36:41FromDiscord<leorize> slow is relative
22:36:42*jmdaemon joined #nim
22:36:51FromDiscord<kingterrytheterrible12> its not slow if its gonna be raised once
22:37:03FromDiscord<kingterrytheterrible12> but if your using it for control flow then yes
22:37:13FromDiscord<kingterrytheterrible12> but i generally dont like to be slow at all not just once
22:37:18FromDiscord<raynei486> You shouldn't be using exceptions for control flow
22:37:26FromDiscord<kingterrytheterrible12> i know
22:37:31FromDiscord<leorize> branching is slow too \:)
22:37:38FromDiscord<kingterrytheterrible12> BPU doesnt make it slow
22:38:10FromDiscord<leorize> until it mispredicts, that is
22:38:26FromDiscord<kingterrytheterrible12> it doesnt happen for something trivial like a return value
22:38:37FromDiscord<kingterrytheterrible12> like error codes
22:38:39FromDiscord<kingterrytheterrible12> 0 and 1
22:39:06FromDiscord<kingterrytheterrible12> anyways im off to making my shit work
22:39:43FromDiscord<leorize> frankly the cost of syscall trumps any exception overhead that you can imagine
22:40:11FromDiscord<kingterrytheterrible12> maybe
22:40:23FromDiscord<leorize> nim exceptions are also slow, fwiw
22:40:30FromDiscord<leorize> just that you can't escape them here
22:40:31FromDiscord<kingterrytheterrible12> yes
22:40:38FromDiscord<kingterrytheterrible12> my whole FUCKING APP USES OS CALLS
22:41:00FromDiscord<kingterrytheterrible12> i can afford an exception
22:41:16FromDiscord<leorize> slow is relative, after all
22:43:59FromDiscord<kingterrytheterrible12> goddamn the invalid indents error
22:44:49*jmdaemon quit (Ping timeout: 252 seconds)
22:50:54*jmdaemon joined #nim
23:05:06*azimut quit (Ping timeout: 246 seconds)
23:06:32*jmdaemon quit (Ping timeout: 255 seconds)
23:06:58FromDiscord<kingterrytheterrible12> alright i present to you, the GNU path adder program↵https://github.com/FaisalAhmedAlghamdi/gnu-pathadder
23:07:09FromDiscord<kingterrytheterrible12> audit my code to fix some stupidity i probably made
23:08:18FromDiscord<leorize> why method?
23:09:05FromDiscord<leorize> you don't protect the folder name so it's trivial to inject scripts via it
23:10:35FromDiscord<leorize> and you should add a path separator between getHomeDir and bashrc
23:10:55FromDiscord<kingterrytheterrible12> In reply to @leorize "why method?": it has to be for owlkettle
23:11:14FromDiscord<leorize> I don't see why addToPath have to be one
23:11:43FromDiscord<kingterrytheterrible12> In reply to @leorize "I don't see why": oh yeah it doesnt
23:11:49FromDiscord<kingterrytheterrible12> i think
23:11:51FromDiscord<kingterrytheterrible12> let me try
23:12:03FromDiscord<leorize> `IOError` have a message component to it too, so you can use it for detailed messages
23:12:23FromDiscord<kingterrytheterrible12> you are correct, it does not i will update it
23:12:44FromDiscord<saint._._.> What's the equiv of void for nim?
23:12:51FromDiscord<kingterrytheterrible12> In reply to @saint._._. "What's the equiv of": generics
23:12:52FromDiscord<saint._._.> If I 'm trying to interop with a c proc
23:12:58FromDiscord<kingterrytheterrible12> oh
23:13:00FromDiscord<kingterrytheterrible12> idk
23:13:13FromDiscord<saint._._.> 😢
23:13:15FromDiscord<kingterrytheterrible12> In reply to @leorize "`IOError` have a message": Alright
23:14:05FromDiscord<kingterrytheterrible12> In reply to @leorize "`IOError` have a message": how do you even get the message?
23:15:34FromDiscord<kingterrytheterrible12> ah `getCurrentExceptionMsg`
23:16:09FromDiscord<leorize> or just `except IOError as e`
23:16:12FromDiscord<leorize> then `e.msg`
23:16:49FromDiscord<kingterrytheterrible12> In reply to @leorize "or just `except IOError": thanks
23:17:05FromDiscord<leorize> `open` can error too, btw
23:17:53FromDiscord<leorize> your `writeLine` seems to assume that the file ended on a new line
23:17:58FromDiscord<leorize> this is not guaranteed
23:18:58FromDiscord<kingterrytheterrible12> In reply to @leorize "your `writeLine` seems to": yes i think i should strip the input from all whitespaces before and after it correct?
23:19:52FromDiscord<kingterrytheterrible12> whats the nim equivlenet of python `lstrip` and `rstrip`
23:19:59FromDiscord<leorize> trim
23:20:12FromDiscord<kingterrytheterrible12> In reply to @leorize "trim": and it trims it from where
23:20:20FromDiscord<leorize> check the docs
23:20:27FromDiscord<kingterrytheterrible12> alright
23:20:55FromDiscord<leorize> actually I think it's called strip
23:21:05FromDiscord<kingterrytheterrible12> yes
23:21:08FromDiscord<kingterrytheterrible12> was about to say
23:21:19FromDiscord<kingterrytheterrible12> it also strips spaces by default
23:23:27FromDiscord<leorize> though the solution for the "file not ended on new line" problem is to just prepend a newline
23:23:39FromDiscord<leorize> the file won't look pretty but at least it's robust
23:23:49FromDiscord<kingterrytheterrible12> In reply to @leorize "the file won't look": yes
23:23:54FromDiscord<kingterrytheterrible12> good suggestion
23:24:06FromDiscord<kingterrytheterrible12> also strip does not work like how the docs say
23:24:21FromDiscord<Yardanico> as in?
23:24:37FromDiscord<kingterrytheterrible12> sent a code paste, see https://play.nim-lang.org/#ix=4G66
23:24:52FromDiscord<Yardanico> yes, because `strip` returns a new variable, it doesn't modify the old one
23:25:01FromDiscord<Yardanico> strips and returns https://media.discordapp.net/attachments/371759389889003532/1150935056358060072/image.png
23:25:19FromDiscord<kingterrytheterrible12> docs says otherwise
23:25:20FromDiscord<kingterrytheterrible12> sent a code paste, see https://play.nim-lang.org/#ix=4G67
23:25:23FromDiscord<kingterrytheterrible12> or the example
23:25:23FromDiscord<Yardanico> you're checking https://nim-lang.org/docs/strbasics.html#strip%2Cstring%2Cset%5Bchar%5D
23:25:25FromDiscord<Yardanico> it's a different module
23:25:29FromDiscord<Yardanico> a different proc signature
23:26:07FromDiscord<Yardanico> and even then, it fails because you're trying to `strip` a non-var argument
23:26:30FromDiscord<kingterrytheterrible12> its a string copy
23:26:31FromDiscord<kingterrytheterrible12> what do you mean
23:26:41FromDiscord<Yardanico> it's not mutable by default
23:26:55FromDiscord<Yardanico> you have to mark it as mutable or explicitly copy it in the proc body with `var` for it to be mutable in the proc body
23:26:58FromDiscord<kingterrytheterrible12> ah so `folderName: var string`
23:27:08FromDiscord<Yardanico> that will require the callee to pass a mutable var though, yeah
23:27:09FromDiscord<kingterrytheterrible12> thanks
23:27:22FromDiscord<Yardanico> if you want to callee to have the mutated version afterwards, you change the argument to be mutable
23:27:25FromDiscord<leorize> if you wanna sanitize the `folderName` you should do it properly with `quoteShell` (after stripping, of course)
23:27:28FromDiscord<Yardanico> otherwise you do↵`var folderName = foldername` in the proc itself
23:27:41FromDiscord<kingterrytheterrible12> wait i test
23:27:54FromDiscord<leorize> and do the preprocessing at `path` level instead of `folderName`
23:27:56FromDiscord<Yardanico> In reply to @kingterrytheterrible12 "wait i test": if you passed a non-var to your proc it won't work as I said in https://discord.com/channels/371759389889003530/371759389889003532/1150935589286322196
23:28:14FromDiscord<leorize> looks like matrix just got lagged a lil
23:28:21FromDiscord<Yardanico> if you have it as `proc blabla(x: var string)` then it must be called like `blabla(x)` where `x` was defined as `var x = "something"`
23:29:01FromDiscord<Yardanico> in your case you probably just want a local mutable copy, so do `var folderName = folderName`, or even just `result = folderName` (and then mutate the result) if you want to _return_ the value (ofc then you'll also need to add `: string` to the proc signature
23:29:18FromDiscord<kingterrytheterrible12> In reply to @yardanico "in your case you": isnt there a .copy or something
23:29:20FromDiscord<kingterrytheterrible12> or .clone
23:29:34FromDiscord<Yardanico> strings are value types anyway
23:29:40FromDiscord<Yardanico> `var folderName = folderName` makes a copy
23:29:45FromDiscord<Yardanico> for a string that is
23:30:36FromDiscord<leorize> same for seq
23:30:41FromDiscord<leorize> nim have somewhat sane builtins
23:31:54FromDiscord<kingterrytheterrible12> my code looks like a mess lol
23:31:57FromDiscord<kingterrytheterrible12> or at least i think so
23:32:14FromDiscord<kingterrytheterrible12> sent a code paste, see https://play.nim-lang.org/#ix=4G6f
23:32:16FromDiscord<kingterrytheterrible12> does it look readable lmao
23:32:51FromDiscord<kingterrytheterrible12> i borked my bash
23:32:53FromDiscord<kingterrytheterrible12> XD
23:32:58FromDiscord<kingterrytheterrible12> thank god for backups
23:33:23*om3ga quit (Server closed connection)
23:34:05*om3ga joined #nim
23:35:00FromDiscord<kingterrytheterrible12> so far i tested my program for all possibilities
23:35:09FromDiscord<kingterrytheterrible12> so far so good i mark this as 1.0.0
23:36:01FromDiscord<Yardanico> as I said btw, you don't have to use the strbasics version
23:36:36FromDiscord<kingterrytheterrible12> it works
23:36:36FromDiscord<Yardanico> just use https://nim-lang.org/docs/strutils.html#strip%2Cstring%2Cset%5Bchar%5D and do `var strippedFolder = strip(folderName)`
23:36:45FromDiscord<kingterrytheterrible12> naw
23:36:48FromDiscord<Yardanico> or even `var strippedFolder = folderName.strip()` (ufcs)
23:37:00FromDiscord<Yardanico> In reply to @kingterrytheterrible12 "naw": well, you'll want strutils' utilities sooner or later anyway :)
23:37:39FromDiscord<kingterrytheterrible12> string manipulation is always so disgusting
23:37:47FromDiscord<Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=4G6h
23:37:55FromDiscord<Yardanico> all stdlib modules can (and really should) be imported with the std/ prefix
23:38:14FromDiscord<kingterrytheterrible12> will do
23:38:18FromDiscord<kingterrytheterrible12> you can make a pr
23:38:25FromDiscord<Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=4G6i
23:38:26FromDiscord<Yardanico> no need, it's too small of a change
23:38:28FromDiscord<kingterrytheterrible12> so you have more acticity
23:38:35FromDiscord<kingterrytheterrible12> (edit) "acticity" => "activity"
23:38:38FromDiscord<kingterrytheterrible12> alright
23:40:40*lucasta quit (Quit: Leaving)
23:40:58FromDiscord<kingterrytheterrible12> so you guys think its ready now to send it off to the linux mint team?
23:41:21FromDiscord<Yardanico> huh?
23:41:35FromDiscord<kingterrytheterrible12> i made this program for noob linux users to add shit to path
23:41:46FromDiscord<leorize> you can but personally I would pass on this as a toy program
23:41:56FromDiscord<kingterrytheterrible12> would it hurt to try?
23:42:27FromDiscord<leorize> it wouldn't, most OSS devs are chill
23:42:29FromDiscord<Yardanico> In reply to @kingterrytheterrible12 "i made this program": I think even if mint wanted something like this, they'd probably make it as a bash script since IIRC there are easy tools to make simple GUIs in bash
23:42:30FromDiscord<leorize> just don't be pushy
23:42:50FromDiscord<kingterrytheterrible12> In reply to @yardanico "I think even if": i see
23:42:55FromDiscord<kingterrytheterrible12> In reply to @leorize "just don't be pushy": fair enough
23:43:04FromDiscord<kingterrytheterrible12> so where do i even suggest they add this
23:43:18FromDiscord<leorize> open an issue on their bug tracker
23:43:22FromDiscord<leorize> or mailing list
23:43:27FromDiscord<leorize> whichever that they use
23:43:30FromDiscord<kingterrytheterrible12> alright
23:43:34FromDiscord<Yardanico> I wonder if debian (and its descendants) has at least one program made with nim except the nim compiler itself?
23:43:54FromDiscord<kingterrytheterrible12> you can check
23:44:02FromDiscord<leorize> nitter could be a thing, given its popularity
23:44:03FromDiscord<Yardanico> In reply to @kingterrytheterrible12 "you can check": i can, yeah, but I don't exactly know how :P
23:44:05FromDiscord<kingterrytheterrible12> gl trying to navigate their 300 mil LOC code base
23:44:19FromDiscord<Yardanico> In reply to @yardanico "i can, yeah, but": I don't think it's packaged in any distro by default
23:44:43FromDiscord<kingterrytheterrible12> i want this to be in nim bc its beyond me why there isnt a program that does this already
23:44:51FromDiscord<kingterrytheterrible12> its the most used program i used on windows
23:44:58FromDiscord<kingterrytheterrible12> and they aim to be a windows replacement
23:45:06FromDiscord<Yardanico> well, because for most users it's easier to just open nano and write down the line if they want to get used to linux :)
23:45:09FromDiscord<kingterrytheterrible12> (edit) "nim" => "mint"
23:45:10FromDiscord<Yardanico> or a GUI text editor
23:45:11FromDiscord<leorize> maybe the linux mint mailing list will enlighten you
23:45:21FromDiscord<kingterrytheterrible12> bet
23:45:36FromDiscord<kingterrytheterrible12> and also what is a mailing list?
23:46:34FromDiscord<leorize> it's a list of emails
23:46:50FromDiscord<leorize> if you subscribe, any email sent to the list will be sent to you
23:46:56FromDiscord<kingterrytheterrible12> hm
23:47:02FromDiscord<kingterrytheterrible12> so i sent an email to the mailing list?
23:47:12FromDiscord<leorize> it's technology back in the old days before forum software are a thing
23:47:33FromDiscord<leorize> I'd recommend checking if the list are active
23:47:51FromDiscord<kingterrytheterrible12> i dont think they have a mailing list
23:48:17FromDiscord<Yardanico> https://linuxmint.com/getinvolved.php
23:48:25FromDiscord<leorize> https://forums.linuxmint.com/viewforum.php?f=120 \<- that's a good place to start
23:48:27FromDiscord<Yardanico> https://linuxmint-developer-guide.readthedocs.io/en/latest/
23:48:52FromDiscord<kingterrytheterrible12> ty all
23:49:16FromDiscord<kingterrytheterrible12> well shit i gotta learn how to make a debian package
23:54:24FromDiscord<Haze System (they/them)> sent a code paste, see https://play.nim-lang.org/#ix=4G6l
23:54:56FromDiscord<kingterrytheterrible12> In reply to @hazesystem "is there an equivalent": enum?
23:55:13FromDiscord<raynei486> a enum with the `pure` pragma is what you're looking for
23:55:31FromDiscord<kingterrytheterrible12> hm what does the pure pragma do?
23:55:46FromDiscord<raynei486> Always require the enum name in front of it
23:56:10FromDiscord<Yardanico> isn't that the default nowadays?
23:56:23FromDiscord<raynei486> I'm not sure, manual doesn't say
23:56:27FromDiscord<huantian> hm is it? is enum overloading enabled by default?
23:56:36FromDiscord<huantian> if so I'd assume it's not required
23:59:53FromDiscord<leorize> sent a code paste, see https://play.nim-lang.org/#ix=4G6n