Programming thread

  • 🐕 I am attempting to get the site runnning as fast as possible. If you are experiencing slow page load times, please report it.
Pretty much. Logically speaking, element.operation <=> resultElement
Maybe look into Elixir's structs and, by extension, their maps. You'll see what I mean by that last bit if you read the link I provided.
Elixir's functional nature with its immutability would lend well to your idea.
 
  • Informative
Reactions: Anti Snigger
You'll see what I mean by that last bit if you read the link I provided.
Sorry, I didn't mean to be rude by skimming, I suffer the zoomer attention span at times. The Elixir stuff does look good. I guess to translate what I'm imagining mathematically into programming terms, I want compile time evaluated mappings generated with the rules of finite groups.
 
Sorry, I didn't mean to be rude by skimming, I suffer the zoomer attention span at times.
I didn't mean to imply anything like that. I just mean Elixir's structs are bare maps under the hood, and that docs page would tell you that, hence you would know what I meant by "by extension" in my last post. Apologies for any confusion.
 
  • Feels
Reactions: Anti Snigger
Does anybody have any proper knowhow for how to go about modding video games? Also am I fucked if the game engine for the game that I want to mod uses a proprietary engine?
 
Does anybody have any proper knowhow for how to go about modding video games? Also am I fucked if the game engine for the game that I want to mod uses a proprietary engine?
Depending on what the community looks like, you may be starting from scratch. Assuming this game doesn't have accessible scripting, or it's not powerful enough to accomplish anything more than new-ish levels, you're probably going to end up hooking into DirectX functions to inject your code, and you'll probably end up needing to write a modloader and integrate a scripting language. I haven't done it, but I've seen enough to know most anything is possible if you're willing to learn.
 
  • Informative
Reactions: HexFag
Does anybody have any proper knowhow for how to go about modding video games? Also am I fucked if the game engine for the game that I want to mod uses a proprietary engine?
Depends. If it's proprietary, you are fucked unless you know assembly and are a damn good reverser, or they left a security flaw which would allow you to execute arbitrary code in the engine. If it's something standard like Source or UE4/5, there are tools out there that inject scripting languages you can work with.
 
No, like mathematical groups
The only explicit intersection between programming and groups that comes to mind is SAGE, which is the computer algebra system featured in the book Adventures in Group Theory by Joyner. However, it is unfortunately written in python and also is not a language feature, as it seems you had requested.
 
I'd like to start an APL thread here, but I know there would be little participation from others. I've never been able to have a long conversation about APL with anyone else, anywhere. Anyway, I've written a Wordle solver in APL, and would anyone like to see it? The core of the program is a single line, and the entire thing not even ten.
My number one want for a programming language would be groups, essentially enums that define pure bijections to other members. It's a math construct, but it's a surprisingly common pattern within enums, and I think formalizing it would make people better able to use group properties, and potentially allow for constexpr evaluation, or at least very fast code.
Let me know if I should show how to do this in Ada. The older language standards already make it effortless to define real enumeration types and arrays indexed by them, and Ada 2012 should make it easy enough to define the last little bit with a type predicate.
 
Disassemble it with something like Binary Ninja and start reverse engineering it. It's hard but doable if you have the time and patience.
+1 for Binary Ninja; I have been using it since some of the earliest versions. It has gotten really really amazingly good over the past few years, especially with those ILs.

For anyone who wants to go the free route, try radare2 or the NSA's Ghidra (open source, not just trust_me_bro.exe). Disassembly graphs are so handy.
 
Why does "main()" need to be classed as an integer in C?
Most compilers are OK with void now as well

Basically whatever main returns will turn into your programs exit code that is given to the operating system, which is always an int. This is semi related to the fact that generally the 'return' value is a register which will be whatever the register size for the CPU is, so technically it could be 64 bits if you wanted but for api stability reasons its still an int.
 
Back