Wednesday, August 26, 2009

cl-mines - A Minesweeper Clone

I uploaded my Minesweeper clone, cl-mines to GitHub a few days ago. It's just a simple, command-line Minesweeper game. It doesn't really have a proper build process yet.

I've only tested it on SBCL, but there isn't any SBCL-specific code that I'm aware of and it is, by far, not the most complicated piece of Lisp code out there, so it should work with other Common Lisp implementations.

Friday, August 21, 2009

Releasing Some Code to GitHub

I'm going to be releasing a bunch of code to my GitHub over the next few weeks, after I clean up some of it and fix a few design issues and small bugs. This should include:
  • Minesweeper clone
  • Command-line Twitter tools
I may also release my Cellular Automata simlator aswell. However, at the moment, it has performance issues due to the Common Lisp LTK libraries. I have also started designing a Tetris clone (to be written in either Python+PyGame or Perl+SDL). Any updates to that will be pushed to GitHub aswell.

Sunday, August 2, 2009

Cute Perl Gem to Get the Minimum/Maximum Value

Saw this little nugget on #perl@irc.perl.org the other night. It determines the minimum of two values:

[$b, $a]->[$a <= $b]

It takes advantage of the fact that Perl doesn't have a boolean return type for true or false, so the comparison operators return 1 or 0 for true and false, respectively, which are then used by this code to index the array ref.

To get the maximum of the two values, just flip the operator to >=