poikilos wrote:A lightweight game that is rather painful to compile is called RainCat (I had trouble getting Haskell up and running and compiling Raincat in Manjaro, but other distros may not have as much trouble).
Raincat is a puzzle game, written in Haskell, developed by Carnegie Mellon students in 2008. It's vaguely reminiscent of Lemmings, though there are elements of other games. The home page is:
http://hackage.haskell.org/package/RaincatRaincat is written in Haskell. But I'd added Haskell to my Linux distro last year (2018), so that part was out of the way.
Haskell is one of the languages that's written in itself. So, to add it to a distro, you need to find bootstrap binaries that will run on the distro. Then you need to get the bootstrap binaries to build the language sources.
If you're developing your own Linux distro, this part is tricky because nobody is building binaries that target your distro. You need to use kludges so that foreign binaries will work.
The bootstrap process is also complicated for some languages, including Haskell, by the fact that the bootstrap and source release numbers need to be a close match.
I think that I used Debian Haskell binaries for the bootstrap compiler. The sources that I used came from:
https://downloads.haskell.org/~ghc/Raincat needs Cabal, Haskell's package system, as well. This meant that a build might or might not work.
Cabal is an online library ecosystem. This is a framework which discourages offline builds.
As a distro creator and maintainer, I'm not a fan of builds that rely on these things.
Ecosystems of this type make things easier in some respects. But the increasing reliance on them, and the resulting increase in problems such as conflicts between dependencies, mean that you're never sure if a program is, or isn't, going to build.
It's as simple as that. Builds need to be reproducible and reliable and they should work offline.
There should no reliance on sources that aren't in a distro maintainer's possession. Or how is he or she supposed to deliver the exact sources that were used to build to people who use the distro?
Regrettably, most languages have developed online library ecosystems, though some take it farther than others.
* Perl has CPAN, but it's not really required. Additionally, you can mirror all of CPAN offline without too much trouble.
* Python has "pip", a package manager, and "pypi", a repository.
I don't like "pypi" because it doesn't seem to provide fixed URLs for tarballs. But you can mirror parts of the repository offline, though not as easily as with Perl.
* Java is a solid language, better for some purposes than it's given credit for, but the "build" ecosystem for some components is pure mysticism.
There often isn't even a way to build some components. You need to incorporate source-less JAR files, the equivalent of binary blobs, in your projects. Better still, JAR files that are supposed to be FOSS sometimes rely on non-FOSS JAR files, which torpedoes the FOSS license.
If you mix FOSS and non-FOSS, the resulting color isn't in-between. It's non-FOSS.
* With Ruby Gems, you frequently end up with conflicts that are difficult to resolve.
* Rust is a bust. Cargo, its online package system, is complicated, buggy, and actively hostile to offline builds.
* Then there's Haskell and Cabal. Cabal reminds me of Cargo, but it's not as bad.
As it turned out, to build and run Raincat, just two simple steps were required:
1) Delete my old Cabal directory tree:
rm -fr $HOME/.cabal
This gave me a clean starting point for the experiment.
2) Tell Cabal to build the program:
cabal install Raincat
Cabal downloaded and compiled a few dozen dependencies and then Raincat itself. It took a while, but everything worked. When the compiles were done, Cabal started the program automatically.
One negative was that, when I tried repeating the "cabal install" command, it built all of the dependencies again. I'm not sure why. But when I repeated the command a 2nd time, it didn't build the dependencies a 3rd time.
It helped that my Linux distro already had most major libraries installed along with the associated header files and "pkg-config" files.
Other developers might need to install, for example, development kits for the "sdl2" core and some of the "sdl2" core extensions such as "sdl-mixer".
A Raincat screenshot is shown below.
The game started with the cat sitting to the left of the rain. It didn't want to go through the rain until I gave it the umbrella. Then it was pleased to proceed.
Controls are simple. Sound worked out of the box. I'd add this Haskell game to my Linux distro if there was a simple way to package it.