Hacker News new | ask | show | jobs
by arsey 4825 days ago
Simple Dwarf Fortress Clone in 58000 lines of Python
1 comments

Lispers that preach of concision mere mortals cannot possibly dream of, this is your call to arms.
I mess around with roguelike development and have been migrating from python to scheme for brevity.

I started with python. I've had lots of problems with it, but I'm far stronger in python than anything else, so have been in a sense stuck on it despite separate attempts over the last twelve months to get to momentum in C, C++ and racket.

During the recent 7-day roguelike challenge I found myself still stuck on my old python codebase, now creating DSLs in order to define entities and relationship opportunities between them (e.g. water -> planted_seed = sapling). I found I was able to significantly reduce code size, it's cleaner, and it's far sturdier. That was the point where I realised I needed to drop everything and make the jump to scheme, which I've been doing since.

This derailed my 7-day roguelike effort a couple of weeks ago, but it's progress.

OT, but another benefit I've found is that it's trivial to write zero-dependency, multiplatform code in racket. "raco exe main.rkt".

Whereas getting that done with with python is fiddly. With the previous game I released, I spent more time trying to get exes for the major platforms than I did on everything else combined.