Time Nick Message 16:11 nekobit apparently InitializeAsync didn't like me manually setting the top variable to the index of my "pkgmgr" table, causing a crash. 16:11 nekobit not sure how i'll work around that 16:15 nekobit And this entire time, i just realized that the function I rewrote in C++ already had a function in C++. Great. Awesome. 16:15 nekobit although it could be namespaced 16:16 MTDiscord I'm available to answer C++ questions if that's helpful, or watch you working on it. 16:17 nekobit Don't worry, i got it all figured out now 16:17 nekobit im porting pkgmgr to c++ 16:17 nekobit Do we uppercase namespaces? 16:18 MTDiscord Namespaces should be lowercase - I believe this is consistent with our style rules. 16:18 nekobit Ta 16:20 MTDiscord If the change isn't more than about 300 LoC I'm interested in reviewing it. (Although I can't approve it). 16:20 MTDiscord When it's ready for review, that is. 16:21 nekobit It may be more than that. It's a rewrite of that file. I have a dumb question, can you add toString method to enum classes? 16:21 MTDiscord To what end? For converting into a string representing the object for output? 16:22 nekobit Yes 16:22 MTDiscord Overload operator<< then. 16:22 nekobit Why not overload toString()? 16:22 nekobit it doesn't seem possible anyway 16:23 MTDiscord C++ doesn't have a toString in the standard (to my knowledge) and that's odd. 16:23 MTDiscord toString is a Java thing. 16:27 MTDiscord Is our IRC not hosted on libera.chat anymore? 16:27 MTDiscord Found it, had the wrong channel name. 16:28 josiah_wi I feel somehow disconnected using the Discord bridge to talk to the IRC people. I should use my IRC account more often. 16:28 nekobit Ah, i was thinking of std::to_string(). Sorry, my C++ is rusty after so much C 16:29 josiah_wi Ah, that one is specifically for converting numeric values. 16:30 josiah_wi You could do something similar and write a function (could even call it to_string, especially if you have it namespaced) to convert the enum value to a string. 16:32 nekobit I did 16:32 MTDiscord > It may be more than that. It's a rewrite of that file. I have a dumb question, can you add toString method to enum classes? Nope, enums do not have reflection in C++, you have to manually type that one out 16:34 josiah_wi What's the motivation for the rewrite of this file? 16:35 nekobit I was told to do so by ruben, before i added a cli and tui for downloading/managing/updating mods 16:35 nekobit so i wouldnt need to depend on lua 16:36 josiah_wi Ah, not needing a dependency is very nice. Thanks for working on that. 16:38 nekobit well, ive rewritten one function in the proper namespace. So that's good 16:39 nekobit It sure takes a while for minetest to link though 16:42 josiah_wi Do you have link time optimization turned on? That can account for the majority of the time spent linking if so. 16:43 nekobit No 16:44 nekobit do i just do CFLAGS="-flto" cmake .. 16:44 MTDiscord pass -DENABLE_LTO=OFF to cmake 16:45 nekobit i want it on tho 16:45 nekobit er 16:45 nekobit off.. 16:45 [MTMatrix] make -j 128 16:45 MTDiscord LTO is enabled by default when doing release builds now 16:53 nekobit yeah that changes everything. i was waiting a good 30 seconds to link every time 17:12 MTDiscord LTO is enabled by default when doing release builds now. Aha! that's what was causing it, darn it that's like 1 hour of my life lost 17:12 nekobit Same. Anyway: https://github.com/swagtoy/minetest/commit/582048af159be33032ddc7bd4949e9f1f14ddbb3 17:13 nekobit Here's just a starting point. Only up from here. My only concern is how i'll wrap the networking functions around C++ 17:13 nekobit (without breaking anything) 17:13 nekobit I'll make a draft PR for now 17:22 nekobit Ok, its opened. Need to head to work. Will be back later 17:24 MTDiscord You can click "Convert to draft" and it will mark it as such. 17:25 nekobit Thank you. Didn't know this. 19:05 Guest12 HELLOOOOOO 19:05 Guest12 IM CUMMINGGG 20:01 nekobit Thanks man