by beefsack · 9y ago · 0 comments
I started one in Go a number of years ago[1] and I feel I managed to prove to myself that a pure email interface is possible and actually really convenient in some cases. I even managed to implement over 20 games[2]. It was only ever used in my closed circle of friends, but we played thousands of games and many found it simple to participate in slow periods at work or school.
If anything, my biggest takeaway was that if you want to really reach a level of expertise in a new technology, you need to find a project that you can pour your heart into. I've probably breached 100k LOC for the project and I've been working on it for over half a decade. I'm currently redoing the project in Rust as an attempt to become highly skilled in that[3].
[1] https://github.com/Miniand/brdg.me
But there's this (claims to support play by email but I couldn't find actual directions in 2 minutes of reading around): http://www.diplomaticcorp.com/
When I played this ~10 years ago the main interface was just plain email. You'd send and email with the body containing commands like so:
signon gamename password A PAR-BUR A MAR-SPA F BRE-MAO signoff
Then there was a website that subscribed to your game as a observer and would render views of the map
It's a web interface, but the underlying representation is text-based, and you can type in the commands directly if you want. This leads to some nice features--for example, you can plan your moves several steps ahead of time, and you get a game log for free.
There creator wrote a blog post about that particular design decision: https://www.snellman.net/blog/archive/2014-12-08-command-lan...
How do you find Rust for this code base compared to Go?
Rust has been a challenge but now that I'm fairly proficient it's very well suited to implementing the game data structures. Parsers are much more pleasant to implement in Rust too; I've written a custom parser combinator for game input and it's much easier to handle input in Rust than it is in Go.
Pretty, pretty please!
The rationale and idea is described on https://blog.golang.org/toward-go2#TOC_5.3. and https://blog.golang.org/toward-go2#TOC_8. , with an important note to later "publish it" (i.e. just link) on https://golang.org/wiki/ExperienceReports.
Yours seems to be an awesomely perfect case — a real-world situation, with additional case study of how a new language helps you solve the pain points!
I would like to hear the negative side of switching from go to rust.
Personally, the things I really missed after moving to Rust are quick compile times and very high quality editor plugins. These are areas which the Rust community are putting a lot of effort into at the moment though so I'm hopeful they'll continue to improve.