It's not difficult to write a provably correct implementation of doubly linked list in C, but it is very painful to do in Rust because the borrow checker really hates this kind of mutually referential objects.
Hard part of writing actually provable code isn't the code. It's the proof. What are invariants of double linked list that guarantee safety?
Writing provable anything is hard because it forces you to think carefully about that. You can no longer reason by going into flow mode, letting fast and incorrect part of the brain take over.
I am curious as a non game developer, are these types of games deterministic? If so if I send to the server that I moved huge units to attack another huge units, can the server determine what the end will be? Why do we face a network issue?
> Rather than passing the status of each unit in the game, the expectation was to run the exact same simulation on each machine, passing each an identical set of commands that were issued by the users at the same time. The PCs would basically synchronize their game watches in best war-movie tradition, allow players to issue commands, and then execute in exactly the same way at the same time and have identical games.
When this happens in Factorio, the game pauses, one player (the server?) saves the game and sends it to all other players who load the savefile and the game resumes when that's done. It's not a nice experience, but it's a lot better than "you can't play today, goodbye!"
Many (not all) RTS games use a networking method called lockstep synchronization that requires the gameplay to be deterministic, but has its own downsides. One of those being that if one player lags, everyone lags. I know AOE 1 and 2 use it, and I assume 3 as well
For Beyond All Reason, it seems the Spring/Recoil engine will eventually decide to "close the action window", so that if one player is lagging hard, they simply submitted no actions for that "round" and the rest of the players keep going.
I know because I've gotten to the point in the late game where my computer can't simulate at realtime, and I can no longer control my units, but everyone else keeps playing.
Conveniently you can even still sort of chat in this state, and ask a teammate to assume control of your army on your behalf.
It's got downsides. There's often no way to recover game state without actually running the simulation, and often no way to go backwards either. If you miss a moment in the replay you gotta watch the whole damn thing all over gain.
They can be deterministic but I think you might be confused about the kind of game
In RTS games like 0AD or AoE you don't just send a single huge unit to attack and wait for the result, you send many tens of individual units near enemy units, then the "battle" goes on in real time and you can micromanage units to influence the outcome. You can't just simulate it on the server because the server can't simulate the thought process of the players
AoE2 battles are all about the micromanagement. Last minute splitting the onslaught of trash units against your opponents treb micro shot can change everything.
If you are wondering why not Rust instead of Go, they outline why Rust was not chosen. This is a port not a reimplementation. Many of the data structures can not easily be ported to Rust, such as Nodes with cyclic dependencies. Check the longer interview here: https://www.youtube.com/watch?v=10qowKUW82U&ab_channel=Michi...
Also, I think the discussion on esbuild's choice of language applies here as well as it has a large similarity. You can find it here on hn
I don’t think there was any dig implied. And I will second that it will add to self esteem. Specially during discussions if you have more understanding about the code you will have both better contribution and take away
Sure, when you succeed in understanding someone else's legacy codebase, it builds self esteem. When you fail attempting to do that, it does the opposite.
I have inherited projects where I just could never understand what they were thinking well enough to make the service good (not running out of memory and crashing). It was very humbling; I still sometimes wake up in the middle of the night with things I wish I'd tried, but the assumptions of how it all worked was just scattered throughout a bunch of files and the assumptions of everything was just not how I'd do it.
That’s quite nice. But to put things in perspective, the entire country of Norway’s population is much less than NYC and also it’s not dense. I can’t imagine how you would implement that here
Is there a language or tool with no runtime?
Also Config files can be JSON.
I find nothing weird when it comes to .NET on linux vs any other technology
"apt install redis-server" on my server says that the following will be installed:
- libjemalloc2
- liblzf1
- redis-tools
Garnet requires .NET, so...
apt install aspnetcore-runtime-8.0
Acting like Redis works "out of the box" while Garnet requires a whole other paradigm shift is disingenuous. I have no dog in the fight - I use macOS and I don't use Redis or Garnet.
Just flag+downvote and move on, it's been 8 years already and it never changes.
While on the topic of macOS, Swift Library Evolution ABI support is coming .NET for native integration with Swift (particularly for system APIs). I have not tried it yet but it's an interesting feature AFAIK no other language has, well, besides Swift itself.