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