Conversation
Notices
-
Embed this notice
:ihavenomouth: (inginsub@clubcyberia.co)'s status on Sunday, 27-Oct-2024 08:09:17 JST :ihavenomouth: some library authors have funny ideas about how stuff should work (looking at you, tinyobjloader) -
Embed this notice
gentoobro (gentoobro@shitpost.cloud)'s status on Sunday, 27-Oct-2024 18:48:22 JST gentoobro One of the reasons I tend to roll my own if it's feasible.
:ihavenomouth: likes this. -
Embed this notice
:ihavenomouth: (inginsub@clubcyberia.co)'s status on Sunday, 27-Oct-2024 18:58:58 JST :ihavenomouth: @gentoobro yeah, obj is dead simple and writing a parser is a chore, not a challenge, that's why I thought I would try using a library -
Embed this notice
:ihavenomouth: (inginsub@clubcyberia.co)'s status on Sunday, 27-Oct-2024 20:05:57 JST :ihavenomouth: @gentoobro the parser I wrote for my templeos thing is about 1/8 of tinyobjloader-c (1735 lines) and it also converts the data to a custom format.
> wc -l objtoh3d.c 227 objtoh3d.cto be fair it's a special purpose tool that's in no way ready for deployment - it doesn't handle bad files - but most of the time that's all you need.
-
Embed this notice
:ihavenomouth: (inginsub@clubcyberia.co)'s status on Sunday, 27-Oct-2024 21:54:20 JST :ihavenomouth: @gentoobro I also found an even smaller (and older) file:
> wc -l objclass.cpp 124 objclass.cppIt's full of bangers :dementia:
-
Embed this notice
:ihavenomouth: (inginsub@clubcyberia.co)'s status on Sunday, 27-Oct-2024 22:22:37 JST :ihavenomouth: @gentoobro bro, what the fuck was I thinking here -
Embed this notice
FrailLeaf (frailleaf@ryona.agency)'s status on Sunday, 27-Oct-2024 22:39:13 JST FrailLeaf @Inginsub @gentoobro yeah rewrite in java 👍 :ihavenomouth: likes this. -
Embed this notice
gentoobro (gentoobro@shitpost.cloud)'s status on Monday, 28-Oct-2024 08:41:13 JST gentoobro C++ is such an eyesore
:ihavenomouth: likes this. -
Embed this notice
gentoobro (gentoobro@shitpost.cloud)'s status on Monday, 28-Oct-2024 08:41:15 JST gentoobro That, um, appears to be a floating point exact equality test, which is seldom what you want...
:ihavenomouth: likes this. -
Embed this notice
:ihavenomouth: (inginsub@clubcyberia.co)'s status on Monday, 28-Oct-2024 08:46:41 JST :ihavenomouth: @gentoobro it's an integer vector, so the comparison works as expected. I don't know if the edit federated, the gist of it is that I did a backwards scan and broke the loop on the first match, which was always on the first iteration because of the j = i; as a result, there was no vertex deduplication. I think I was trying to fix a bug with repeating vertices, and for some reason I didn't add a separate counter and tried to do it with just two variables. -
Embed this notice
gentoobro (gentoobro@shitpost.cloud)'s status on Monday, 28-Oct-2024 08:46:53 JST gentoobro The main problem with using a lib for something like an OBJ loader is that learning the lib, its quirks and its bugs often takes longer than just writing your own. And God forbid the library author decides to "update" it and change around the API for no reason.
:ihavenomouth: likes this. -
Embed this notice
gentoobro (gentoobro@shitpost.cloud)'s status on Monday, 28-Oct-2024 08:46:55 JST gentoobro The majority of the code for my OBJ parser is around 20 years old now. Basically no updates or maintenance needed during that time.
:ihavenomouth: likes this.
-
Embed this notice