2014-09-08

Super Foul Egg Moved

Super Foul Egg will soon disappear from the Mac App Store as I’m not renewing my developer subscription. It is now available from this new and hastily created website:

superfoulegg.com

The latest version is 1.4, which matches the build in the App Store.

Leave a comment

2014-05-10

Gobble Developments

I’ve just pushed some new changes to the master branch of the Gobble git repository. Mostly I’ve been refactoring the code to be tidier and take advantage of features of the Go language, but I’ve also made some more interesting changes.

As a result of experimenting with closures, Gobble’s list of static files is now user-definable. Previously, only two files could be served from the root of a Gobble blog: robots.txt and favicon.ico. It seems that a single favicon is no longer sufficient, so the config file can now include a dictionary of static file definitions.

For example, this blog includes the following in its config file:

"staticFiles": {
    "/favicon.ico": "favicon.ico",
    "/robots.txt": "robots.txt"
}

The key is the URL of the file relative to the root URL of the blog; the value is its path on the local filesystem, relative to a new staticFilePath setting.

Gobble has a new syntax highlighting library: Rainbow is out and highlight.js is in. The new library features automatic language detection, which makes marking up code easier. Now it’s possible to just use Markdown-style indenting to indicate a code block instead of including pre and code tags with a data-language attribute.

The correct “Leave a comment” text is shown for all situations: singular, plural, no comments, and comments disabled. Until now Gobble only handled the “no comments” and “plural comments” situation. I couldn’t figure out why I hadn’t fixed that problem before now – other than the awful, awful template docs and the useless errors that the templates spit out if there’s a bug, that is – until I installed the changes on this server and took the whole blog down. It seems the fix relies on features on Go 1.2, so I had to use godeb to get the latest version of the language installed.

Posts and comments are now stored in RAM in both HTML and plain text formats. The plain text versions are searched instead of the HTML versions.

2014-04-05

Dropbox Synced Blog

Updating a Gobble blog is now much faster due to the addition of the fsnotify library. The library watches a blog’s “posts” directory and, when anything changes, causes Gobble to refresh its post and comment cache. New posts, edits and deletions now occur instantly. The old 10 minute wait for the timer to expire has gone.

In related news, the content of Simian Zombie now gets synced to the server by Dropbox. The old workflow looked like this:

  • Write a post;
  • Commit to Git;
  • Push to BitBucket;
  • Connect to server;
  • Pull from BitBucket;
  • Restart Gobble to force a refresh.

The new workflow looks like this, thanks to fsnotify and Dropbox:

  • Write a post.

Much nicer. I can even edit posts on my phone without having to use SSH and Vim.

I had a few false starts. The initial idea was to use BitTorrent Sync, not Dropbox, as I thought it would be easier to set up. Unfortunately, the documentation for CLI-only installs is half-baked and, after an hour or so of tinkering, I switched to Dropbox instead. Dropbox had its own share of issues, the most annoying of which was a segfault at startup in the current version. Switching to the latest beta fixed that.

2014-01-26

Sparky 1.0 - A New DS Game

A new Nintendo DS game!

Sparky

This is a little version of the hacking subgame from the original Bioshock game. I started it waaay back in 2010 but got sick of trying to imitate the pipe filling graphics using nothing but Woopsi’s drawing primitives. The completed version uses a spark that travels along a line instead. Much easier to code.

I’d intended to improve on the original by only producing levels that were possible to complete. However, the recursive algorithm I wrote didn’t like the DS (probably a stack overflow issue) so that feature didn’t make the cut.

2014-01-07

Woopsi Tabs

Tabs are done. They work in more or less the same way as radio button groups: create the group, then use its built-in newTab() method to add new tabs. The tab group will automatically resize all added tabs so that they fill up the available space.

Woopsi Tabs

2014-01-03

Relocation and SDL2

Things have been a little quiet here recently. I am pushing ever westward; this time I moved from sunny Littleton, Colorado, to the equally-sunny Mountain View, California. I’m close enough to Google’s headquarters to be able to see their city-wide free wifi on my laptop, but far enough away that I can’t use it.

Relocation is something of a theme. The little coding time I’ve had has mainly been spent moving repositories from Mercurial/BitBucket to Git/GitHub so that I can hang out with the cool kids. Actually, I’ve been using Git exclusively for about five months and find that, when I do need to use Mercurial, I can’t remember how it works. Within the repositories, I’ve done some relocating too: consolidating DS and SDL code.

SDL2 was released not too long ago and I thought I’d have a play and see if it offered anything new. It seems the most important change for my SDL projects was the inclusion of automatic texture format conversion within the library itself, meaning it has built-in support for converting and displaying bitmaps in ARGB1555 format. This means that all of my DS projects no longer need to keep track of two bitmaps – one in ARGB8888 and one in ARGB1555 format – when in SDL mode.

Upgrading to SDL2 has allowed me to merge the SDL and DS codebases together, meaning I now have a single repository that will build for the DS and OSX out of the box. Getting them to build in Windows and Linux should be trivial. Additionally, the makefiles for the DS versions all work with the latest devkitARM. Something must have changed in the build system as all of the makefiles were broken.

In other news, I’ve been tinkering with Woopsi again. The complex, C#-inspired EventArgs system is out and I replaced it with the set of arguments that are relevant to each event. Gadgets no longer support multiple event handlers; each can now have just a single handler. Much tidier.

2013-12-24

Putty Squad

Putty Squad for the Amiga finally got released. Who’d have guessed? I loved the demo version that Amiga Power gave away as a coverdisk, and was hugely disappointed when the full version never appeared. The SNES version wasn’t a great substitute; it didn’t feel right.

I’ve got it running in FS-UAE. Download it from the System 3 website:

Putty Squad

2013-09-07

Auto-Disable Gobble Comments

Here’s a neat new feature added to Gobble a couple of weeks ago: comments can be automatically disabled when a post reaches a certain age. I’ve enabled it in this blog and spam has dropped from a few dozen comments a day to zero.

I need to tidy it up a little. At present, it looks like comments are still enabled until you click through to the post itself. I couldn’t get my initial plan working, probably because I’m pushing the templating system too far. Also, I switched to a singleton for the config settings, which might not have been the best way to implement it.

2013-08-21

Gobble Moves to GitHub

Gobble is now stored in a Git repository on GitHib:

Other recent changes to Gobble include the addition of support for per-theme favicon.ico and robots.txt files.

It’s been just over a month since I decided to gradually switch from Mercurial to Git. Thus far the change has been surprisingly enjoyable. Git’s extra flexibility turned out to be a good thing. Somewhat disturbingly, I’ve already forgotten how to perform basic operations with Mercurial. Travis CI is next on my list of new Git-powered toys to investigate.

In other Gobble-related news, I’ve removed Google Analytics from this site. GoAccess is a neat web server log analyser that does everything I want, and it keeps Google’s grubby little paws off my website.

2013-07-10

Git

When I first made the switch from Subversion to Mercurial, I tried out most of the available DVCS options: Git, Mercurial, Fossil, Monotone, Darcs and Bazaar. I wanted something that was easy to use, powerful and cross-platform. Only Mercurial and Fossil met the criteria. Fossil’s weird file system handling and lack of built-in Creole or Markdown support in its wiki eventually killed off my enthusiasm for its unique feature set, leaving Mercurial.

Mercurial is possibly the greatest development tool ever created. It completely altered the way I write code and made me immeasurably more productive. Its command line UI is a work of art. Every command is obvious and works exactly as you’d expect. Any chance I get I promote it, especially to the folks who still think that TFS is a really neat idea.

When I was evaluating DVCSes, Git had two main failings:

  • Windows support was second-rate;
  • The UI was designed by Linux programmers and made absolutely no sense.

Though the official Windows client is still an afterthought, Windows support is getting better. Microsoft themselves are adding Git support to TFS and Visual Studio; considering their attitude to Linus Torvald’s other work, this is deeply ironic.

The UI hasn’t improved in the last few years. It still has counter-intuitive commands that are overloaded to perform multiple actions that have little relation to each other. Users are still required to be experts in Git’s data structures in order to use the tool effectively.

Despite these failings, Git has become the de-facto DVCS. It is vastly more popular than any of the others I looked at, including the dreamlike Mercurial.

Microsoft aren’t the only company to have integrated Git into their tools. Xcode 4 uses Git as its default source control system, and Xcode 5 looks to be basing a number of very enticing new features around it. Though I don’t want to, it’s time to add Git to my toolbox.

Here’s my initial Git session:

git init test
vim test.md
git add .
git commit -m "Initial commit."
vim test.md
git commit -m "Edited text."

Working well so far. Now let’s try branching.

git checkout HEAD~1

Hmm. You are in ‘detached HEAD’ state.

vim test.md
git add .
git commit -m "Branch edit."
git checkout master

Warning: you are leaving 1 commit behind, not connected to any of your branches. That’s unexpected. I have no idea what it means. Mercurial allows multiple heads on the same branch; doesn’t Git?

git log --oneline

e48b1bf Edited text.
6739f7f Initial commit.

Two commits. I made three. Yikes.

At this point I decided that the only way I was going to learn to use Git properly was if I forgot everything I knew about Mercurial and approach Git as an entirely new tool. I’m up to chapter 3.6 of the Git book and it’s making more sense. The command aliasing function goes some way to alleviating some of the pain of the insane UI, it has some exceptionally cool features, and suddenly I find that I’m looking forward to using it.

As a test run, I’ve migrated the Super Foul Egg iOS source code to GitHub: