The Day Tsaukpaetra Died


  • Considered Harmful

    @Tsaukpaetra said in The Official Status Thread:

    ...

    For the morbidly curious...

    I know who's morbidly curious! You. You are reading this site.


  • Banned

    What, @Tsaukpaetra died again?

    sudo reboot


  • Considered Harmful

    And lo, on the third day of downtime, He did boot again.



  • So, let's summarize some of the problems from the referenced thread:

    • For "flexibility in command keywords", some unholy monstrosity of a mix of magic numbers, unseparated concerns, and what has to be one of the stupidest if trees I've ever seen:
    • Hi! I'm a class. That means I'm a bag of static free functions with some general theme. I don't actually store any information. Also you could probably inline all the functions in me and no one would notice.
    • Encryption! It's so easy, anyone can do it!

    Here's another one:

    • .gitignore is often used to keep per-user data and reconstructable artifacts out of the tree. So let's not do that.
      c7f41dc9-11b1-48d7-91aa-156867f06484-image.png
      e3ef0c8b-7644-44c1-97ce-5b98dcd4a516-image.png
      *: Intentional. And a copyright violation.

  • Considered Harmful

    @TwelveBaud said in The Day Tsaukpaetra Died:

    Hi! I'm a class. That means I'm a bag of static free functions with some general theme. I don't actually store any information. Also you could probably inline all the functions in me and no one would notice.

    Toby fair, C# doesn't really have a way to define stateless functions without putting them into a class. (But if they'd just made them instance methods implementing an interface you could at least mock and inject them.) This is just non-OOP in an OOP language. OOP is a hammer and sometimes you need a screwdriver.

    The other things are definite :wtf:s though.


  • Considered Harmful

    @error said in The Day Tsaukpaetra Died:

    This is just non-OOP in an OOP language. OOP is a hammer and sometimes you need a screwdriver.

    Eh, it's making them part of a namespace sort-of at least, which is useful and sort-of OOP influence-adjacent. The common theme thing is a valid case. If they have any access to anything mutable they're not safe to have around without :raisins: ...

    With a JIT, having the utilities look like inlining candidates is a good thing. In Java 8+, having higher-order utility functions be explicitly static is a way to avoid enclosing any unrelated state.

    Scala argues that these don't exist and sticks them on an object, which is a point of view.

    If all of these things mutate a JS object which their functionality fully embodies, but yet that object has no instance methods, then it's, worse.


  • Considered Harmful

    @TwelveBaud said in The Day Tsaukpaetra Died:

    :wtf_owl: I think they were going for a one time pad? But for some reason they convert the string to binary and subtract?

    I honestly wrote a more secure (but still weak) implementation of this with xor in VB3 when I was 13.



  • @error but it must be secure, my browser died while opening the link! And if I can't open the source it is as secure as can be!



  • @robo2 hmm, it seems Edge was just protecting me. I opened the link in Firefox, and that code was... not a pleasure to read.
    No worries, I will grab another beer and hopefully I have forgotten ever seeing this by tomorrow.


  • Fake News

    @error said in The Day Tsaukpaetra Died:

    @TwelveBaud said in The Day Tsaukpaetra Died:

    Hi! I'm a class. That means I'm a bag of static free functions with some general theme. I don't actually store any information. Also you could probably inline all the functions in me and no one would notice.

    Toby fair, C# doesn't really have a way to define stateless functions without putting them into a class. (But if they'd just made them instance methods implementing an interface you could at least mock and inject them.) This is just non-OOP in an OOP language. OOP is a hammer and sometimes you need a screwdriver.

    The other things are definite :wtf:s though.

    @TwelveBaud didn't indicate whether the class was declared static or not. Being able to create instances of a class containing only static methods would be a :wtf: .


  • Considered Harmful

    @error said in The Day Tsaukpaetra Died:

    I think they were going for a one time pad? But for some reason they convert the string to binary and subtract?

    Of course, one key to one-time pads is the one-time part. When you reuse a key like this, you're vulnerable to a known plaintext attack. If you know the plaintext, you can derive the key easily.


  • Considered Harmful

    @robo2 said in The Day Tsaukpaetra Died:

    @robo2 hmm, it seems Edge was just protecting me. I opened the link in Firefox, and that code was... not a pleasure to read.
    No worries, I will grab another beer and hopefully I have forgotten ever seeing this by tomorrow.

    You're drinking at least Trappist, yeah? Hopefully. This ain't no lager code.


  • Considered Harmful

    @JBert said in The Day Tsaukpaetra Died:

    @error said in The Day Tsaukpaetra Died:

    @TwelveBaud said in The Day Tsaukpaetra Died:

    Hi! I'm a class. That means I'm a bag of static free functions with some general theme. I don't actually store any information. Also you could probably inline all the functions in me and no one would notice.

    Toby fair, C# doesn't really have a way to define stateless functions without putting them into a class. (But if they'd just made them instance methods implementing an interface you could at least mock and inject them.) This is just non-OOP in an OOP language. OOP is a hammer and sometimes you need a screwdriver.

    The other things are definite :wtf:s though.

    @TwelveBaud didn't indicate whether the class was declared static or not. Being able to create instances of a class containing only static methods would be a :wtf: .

    Maybe you're using the instances as shared lock objects for locally thread-local state used by multiple threads? In any case, so far I need to declare a private constructor to prevent that.


  • Notification Spam Recipient

    @Gribnit said in The Day Tsaukpaetra Died:

    the instances

    So if memory serves (mobile at the moment) there are only like three classes total that are actually instanced. Everything else is all static shit everywhere.

    I was wondering what the fuck happened when one of the "plugins" threw an unhandled error that made it all the way into the Unity exception handler and the mod was forever fucked until I restarted the server.



  • @JBert said in The Day Tsaukpaetra Died:

    @TwelveBaud didn't indicate whether the class was declared static or not. Being able to create instances of a class containing only static methods would be a :wtf: .

    @Tsaukpaetra didn't in his original screenshot, and :kneeling_warthog: to find where that code is. If they're Harmony injectables, it makes sense that the functions themselves are static, but the class ought to be static as well. If they're not Harmony injectables, then either they don't mutate state (in which case why have them as separate functions which don't even have a multiline body?) or they do mutate state and the state should be in that class.

    @Gribnit said in The Day Tsaukpaetra Died:

    Maybe you're using the instances as shared lock objects for locally thread-local state used by multiple threads?

    This is C# so you typically have a private instance of object -- at least, that's what all the example code does and the documentation warns you against doing otherwise. Also, this is Unity so using multiple threads is already deep in :wtf: territory.


  • Considered Harmful

    @error said in The Day Tsaukpaetra Died:

    But if they'd just made them instance methods implementing an interface you could at least mock and inject them.

    Either way I have no problem mocking both them and their author and whatever they injected before writing this.

    OOP is a hammer and sometimes you need a screwdriver.

    After this code I do. Maybe even a Long Island Ice Tea for a proper memory cleanup.


  • Notification Spam Recipient

    Shit like this. Like, are there no i18n libraries that could have been used to make getting a phrase from a translation store? The hell, man!

    6631993b-b2e8-403e-8f80-f493eaffa5ad-image.png



  • @Gribnit said in The Day Tsaukpaetra Died:

    You're drinking at least Trappist, yeah? Hopefully. This ain't no lager code.

    I noticed that regular beer didn't help, so I switched to whiskey. Worked like a charm.


Log in to reply