Closure is now available on Mac and Windows via Steam (previously on PS3). If you like platform puzzle games, or if you like games that play with the nature of the virtual universe, then you need to play this game. Convinced my description is inadequate for a purchase decision? Play the free Flash original.

I bought it as soon as it came out and while I haven't finished it, I've played through several of the puzzles and it is living up to what I'd hoped it would be. The one thing that bothers me a bit is the loss of the original version's 1-bit aesthetic. (Yes, I said 1-bit, not 8-bit. I'm talking about color depth, not word size.)

A couple weekends ago, I was musing that among my electronic devices there was no radio — as in AM/FM, not WiFi and Bluetooth and NFC and etc. Of course, radio is not exactly the most generally useful of information or entertainment sources, but it still has some things to be said for it, such as being independent of Internet connections.

Another thing that came to mind was my idle curiosity about software-defined radio. So, having read that Wikipedia article, it led me to an article with a neat list of radio hardware, including frequency range, sampling rate (≈ bandwidth) and price. Sort by price, and — $20, eh? Maybe I’ll play around with this.

What that price was for was RTL-SDR — not a specific product, but any of several USB digital TV receivers built around the Realtek RTL2832U chip, which happens to have a mode where it sends raw downshifted samples to the host computer — intended to be used to provide FM radio receiving without requiring additional hardware for the task. But there's plenty of room to do other things with it.

I specifically bought the “ezTV”/“ezcap” device, from this Amazon listing by seller NooElec (who also sells on eBay, I hear) (note: not actually $20). One of the complications in this story is that different (later?) models of the same device have slightly different hardware which cannot tune as wide a frequency range. (Side note: when buying from Amazon, what you actually get depends on the “seller” you choose, not just the product listing, and as far as I know, any seller can claim to sell any product. If you see a product with mixed “this is a fake!” and “no it's not!” reviews, you're probably seeing different sellers for the same product listing.)

Of course, the point of SDR is to turn hardware problems into software problems — so I then had a software problem. Specifically, my favorite source for unixy software is MacPorts, but they have an obsolete version of GNU Radio. GNU Radio is a library for building software radios, and it is what is used by the first-thing-to-try recommendation on the Osmocom RTL-SDR page (linked above), The MacPorts version of GNU Radio, 3.3.0, is too old for the RTL-SDR component, which requires 3.5.3 or later. So I ended up building it from source, which took a bit of tinkering. (I'm working on contributing an updated port for MacPorts, however.)

I've had plenty of fun just using it “scanner” style, seeing what I can pick up. A coworker and friend who is into aviation posed a problem — receive and decode VOR navigation signals — which has led to several evenings of fiddling with GNU Radio Companion, and reading up on digital signal processing while I wait for compiles and test results at work. (It sort-of works!)

This is also notable as the one time in my life where a ferrite bead on a cable actually did something — putting one on the computer end of the USB extension cord noticeably reduced the noise level. (And, of course, there remains a large, metallic hardware problem: antennas!)

(I could say more, such as the detailed fiddling to build GNU Radio, and various useful links, but it's taken me long enough to get around to writing this much. Let me know if you'd like me to expand on any particular technical details.)

Started a new project, GLToyJS; I’m porting my GLToy to WebGL. The advantage, besides using a higher-level language and modern OpenGL (shaders!), is that it is more cross-platform, rather than being a Mac-only screensaver. The disadvantage is that it’s not a screensaver at all, but a web page; I plan to add a wrapper to fix that, and I have a working proof of concept.

So far I’ve put together the core framework and ported 6 of the original 13 effects (most of the in-my-current-opinion good ones, of course). An additional feature is that an effect’s parameters are described in JSON, which will be used to allow you to save a particularly good random result for future viewing. (I could just put them in the URL, in fact — I think I’ll try that next.)

I haven't yet created any new effects, so nothing takes obvious advantage of the additional capabilities provided by shaders (other than refinements such as Phong-rather-than-Gouraud lighting and GPU-side particle systems). I also wrote a sketchy compatibility layer for the GLSL Sandbox’s interface so that you can drop in a fragment shader from there to make an effect; a possible thing to do would be automatically downloading from their gallery (if politeness and copyright law permits).

It's not published as a web page anywhere yet, but it should be and I’ll let you know as soon as it is.

I've finally gotten around to uploading my custom Mac OS X keyboard layout. The most significant additions over the standard U.S. keyboard layout are: mathematical symbols (relevant to calculus and symbolic logic), Greek characters, and arrows. It also makes (, ), :, and | unshifted.

(no subject)

Friday, August 5th, 2011 22:29

Never need to run a text editor as root: use sudo -e.

Whoa. They even called it a powerbox as we do.

Apple has chosen to solve this problem by providing heightened permissions to a particular class of actions: those explicitly initiated by the user. Lion includes a trusted daemon process called Powerbox (pboxd) whose job is to present and control open/save dialog boxes on behalf of sandboxed applications. After the user selects a file or directory into which a file should be saved, Powerbox pokes a hole in the application sandbox that allows it to perform the specific action.

Mac OS X 10.7 Lion: the Ars Technica review

It probably ain't capabilities (no bundling of designation of the resource with authority to access it, unless they've replaced file pathnames, which I doubt), but it's a big step in a good direction. UPDATE: Ivan Krstić says “The implementation uses actual capabilities under the hood.”

I've found a useful configuration option for if you're using Ubuntu on a Windows-layout keyboard and you're used to Apple's keyboards and ⌘ (Command)-shortcuts:

System → Preferences → Keyboard → Layouts → Options… → Alt/Win key behavior → Control is mapped to Alt keys, Alt is mapped to Win keys

With this option enabled, the Alt keys (in the Mac ⌘ position on the keyboard) function as Control keys, and the Windows keys (in the Mac Alt/Option position) function as Alt.

Having just discovered this, I find it quite handy for the years of muscle memory of ⌘W and other such shortcuts. (No, I haven't switched to Ubuntu; I just frequently find myself using it for software compatibility testing and so on.)

Everything I’ve read says that the USB tethering facility of Android phones doesn’t work with Macs without installing additional software and possibly going through various moderately elaborate procedures. Imagine my surprise when I accidentally turned it on and it worked perfectly.

It appears that this is an unadvertised feature of Missing Sync for Android, which does use the phone’s tethering function as part of their recently added sync-over-USB feature. Specific evidence: (1) The phone does not appear as a network interface on another Mac with the same OS version. (2) When I unplug the phone or disable tethering, the network interface changes its name momentarily from "USB Ethernet (en3)" to "MissingSync" before disappearing.

I’m using Android 2.2.1 (FRG83D) on a Nexus One, Mac OS X 10.5.6, and Missing Sync 1.5.1 (phone)/1.5.0 (desktop).

I reiterate that this is not documented anywhere I have found, and especially not on Mark/Space, Inc.’s web site.

The Mac System Profiler app, in the “USB” section, will display a tree of all USB devices, including hubs, and what they claim to be. This can be useful when you're trying to find where the problem is when your system isn't seeing a device at all.

(You may also be surprised at the number of USB buses (a.k.a. root hubs, I think) and built-in USB devices your system has.)

$ cat ~/bin/maken
# Make files and view the results.
make "$@" && open "$@"

UPDATE: Turns out I posted this previously, with further thoughts: Avoiding repeating myself (on the command line).

(If anyone has already used this title, that wasn't my intent.)

Screenshot of the game.

“Fire Worms From Outer Space!” was a game I wrote in spring 2009 as my final project for PH115 Science of Multimedia at MVCC.

It was written in Macromedia Adobe Director, and designed as “with the structure of a shoot-em-up and the mechanics of a physics game”; you must defeat the enemies in each of a series of levels — by smashing apart their chains-of-spheresical bodies with your wrecking ball of an inexplicably orbiting asteroid.

Most of the development time was focused on getting the physics right; the graphics, sounds, and level design were all secondary.

(I'm not particularly a fan of Director; it's just what was used in the class. If I ever get around to it, I'll rewrite it in JavaScript.)

Play Fire Worms

  • Play on web (requires Shockwave plugin)

    (Please let me know if this doesn't work; I don't have the Shockwave plugin so I can't test it.)

  • Mac OS X app (standalone)
  • Windows app (standalone?)


The Director file, plain-text copies of the scripts, and all of my saved development history (reconstructed; it was originally a bunch of directory copies) are available in a Git repository at git:// (No web view yet; need to do that.)

Other than the background image, credited in game and in “Title Page” to NASA, all elements of the game are Copyright 2009 Kevin Reid. I haven't gotten around to sticking a license on it; contact me and I'll get around to labeling it MIT or CC — let me know what license would be useful for what you'd like to do with it.

I’m currently using an old version of NetNewsWire Lite; I stopped upgrading when the NewsGator thing happened, because I didn’t want a third-party service involved. Unfortunately, it doesn’t support Atom 1.0, has some UI glitches, and doesn't provide any nice way to notice when a feed is dead.


  • Must support fully offline operation (and therefore must run entirely on my Mac).
    • Use case: I have no internet access and I want something to read.
    • Downloading embedded images is optional.
  • Must be able to handle 500 feeds (mostly low-volume) and 2000 unread items (when I’m too busy to read for a while).
  • Must support per-item read/unread states for “must not miss anything” feeds and “mark unread for later”-style use.
  • Must support efficient scanning (e.g. spacebar for scroll down/next item, and not slow to respond). (This is another reason it needs to run locally; network/server latency for UI interaction is unacceptable.)
  • Must support HTTP authentication with stored passwords for feeds.
  • Per-feed (or per-feed-group) customizable polling frequency.

Nice things:

  • Has an offline mode — ability to inhibit or stop downloading of feeds.
  • Does not use a third-party server (no mandatory accounts or syncing).
  • Remember unread items even if they have “scrolled off” the feed, for last-N-items feeds which generate more than N items more often than I read them.
  • Does better than my current setup for handling the distinction between “must not miss anything” and “as time permits, feel free to skip” feeds.
  • Has support for scraping and/or plain “has this site changed?” for sites without feeds. (There are web services to do this, which I am using occasionally; I'm talking about built-in functionality.)

(This list was written in a hurry; I may revise it as I think of additional requirements.)

I'm on a wireless network which apparently has a firewall which is MITMing port 993 connections (IMAP-over-SSL); my mail client reported a certificate error (the presented certificate was from “FortiGate”). Now, I trust this network's provider, but that doesn't mean I'm going to give them my personal e-mail, much less the password for it; so I went looking for a solution. It turns out that Apple Mail supports SOCKS proxies, and if you have SSH access to another system it's trivial to set up; ssh -D somelocalport somehost, then go into Network Preferences → Advanced → Proxies, and enter localhost:somelocalport as the proxy, and you're done!

It's not clear to me, though, once I set this up how much of my traffic goes over the proxy — the setting is not specific to mail or Apple Mail. This might be testable by shutting down the proxy and seeing what fails.

Has anyone invented a common protocol for, in a desktop environment, updating status (available/away/do-not-disturb and “what I'm doing” and so on) in social applications? I have 5 different such applications (iChat, Colloquy, Skype, MudWalker, Steam), and I usually don't bother to update all of them since it's too much trouble to do regularly. Is there some protocol that, say, the Linux-on-the-desktop folks have invented for having just one widget to inform everything?

[edit] Clarification: I mention Linux-on-the-desktop just because I don't know much aboutit and there seems to be some innovation from that direction in this kind of area. The desktop in question is Mac OS X; I'm expecting to have to write the software myself; I just want to not reinvent the wheel with regard to protocol.

Confused yet?

Saturday, March 21st, 2009 11:40

While setting up my new laptop, I found this situation:

I had three mounted volumes all named kpreid. Luckily, they were of different types so they could be distinguished by icon.

Something I've wished for several times recently is a database-document program.

By "document" I mean that the database is a single file, which I can move, copy, etc., as opposed to living in a database server which has to stay up, uses accounts and ACLs, needs special backup procedures, and so on. It doesn't need to support humongous data sets — fits-in-memory and even linear searches are fine.

I am aware that people use spreadsheets for such purposes, but I would like to have named, typed, and homogeneous columns, easy sorting/filtering/querying, etc. which I assume I'm not going to find there. Relational would be nice too.

It must be GUI, and run on Mac OS X, but it doesn't have to be thoroughly native — I can stand the better sort of Java or perhaps even X11 app.

And finally, it should have a file format that either is obvious how to parse, or has a specification, or is supported by many other programs.

Does such a thing exist?

(If not, I might write it.)

Apple's Sampler is a profiler based on the principle of periodically collecting the entire call stack of the executing threads, then summarizing these stacks to show what occurs frequently; primarily, as a tree, rooted at the bottom of the stack, where each node shows the number of times that call sequence was found on the stack.

SBCL's sb-sprof is a profiler which also collects call stacks, but its summary report is much less useful to me as it does not provide the per-branch counting; just top-of-stack frequencies and a caller/callee graph.

Therefore, I examined Sampler's file format and wrote code to generate it from sb-sprof's record.

Screenshot of Sampler with SB-SPROF data

The file is mixed text/binary, LF line endings. The grammar, as far as I've determined it, is:

  "@supersamplerV1.0" LF
  "@symboltableV1.1" LF
  (TAB int32<id> TAB int32<unknown> 
   TAB text<symbol> 
   TAB text<library-path> TAB text<library-path> LF)*
  "@end" LF
    "@threadV1.0" TAB int16Hex<thread-id> LF
      TAB int32<1> int32<0> int32<1> int32<count of stack-frame> (int32<stack-frame>)* LF
  "@end" LF

where by "int32" I mean a big-endian 32-bit (unsigned?) integer (i.e. four not-necessarily-ASCII bytes), and by "int16Hex" I mean a 16-bit integer in hexadecimal (i.e. four ASCII bytes).

"id" is an arbitrary identifier for this symbol. "unknown" is occasionally nonzero, but I don't know what it means. "symbol" is the name of a function/method found on the stack. "library-path" is the pathname to the object file it was loaded from (relative in the case of a standard framework, e.g. "Carbon.framework/HIToolbox.framework/HIToolbox").

"thread-id" is an identifier for the thread, which should occur as an "id" in the symbol table; the upper 16 bits evidently must be 0. Thread symbol table entries have a name and library path which is the string ("Thread_" int16<thread-id>); I have not confirmed whether this is necessary.

Each entry in a @thread block is one sampling of the whole stack of that thread. I do not know what the 1, 0, and 1 mean, but the fourth integer is the number of frames on the stack; immediately after are that many integers, each of which is an id from the symbol table.

Files generated from this structure are accepted by Sampler, but not always by Shark; I don't know why, and my attempt at tracking it down made it seem to depend on the size of the trace file.

Here is code to generate such a file from sb-sprof data; it should be loaded in the SB-SPROF package: SB-SPROF to Sampler )

This code generates a noninteractive Sampler-style tree report from SB-SPROF data. SB-SPROF tree report )

I found out that you can play Portal on a Mac without installing Windows using CrossOver Mac. Yay.

(2010 update: Of course, these days we can run Portal (and Steam, TF2, ...) on Mac. And the visual glitches mentioned have all been fixed in newer versions of Portal and CrossOver, too.)

Glitch and workaround... )

Portal is great.

I especially liked the moments of stare at layout baffled ... OH! ... portal-portal-portal-ding!

A bit of advice: Don't go on YouTube and watch a bunch of videos. There are only 19 levels (25 if you count the advanced maps, which are modifications of 6 of the regular ones), and having several of them spoiled was a bit disappointing.

I haven't tried any third-party maps. (Got recommendations?)

Oh, and one tip: when bouncing through a pair of floor portals and trying to aim at something, be looking straight up or down when you pass through the portal — that way, the game won't reorient you while you're trying to aim.

Bought a new MacBook with Leopard installed and used Migration Assistant (transferring from an iBook G3). Upon logging in to the primary account, the letter and number keys, Return, and some others stopped working. Returning to the login window, they continued to not work (as tested in the password-entry field) except for the Num-lock number pad region (which seemed strange, since this keyboard doesn't have a num-lock key or keypad markings). An external full USB keyboard worked normally.

The fix that worked (found in a web search) was to disable Mouse Keys (in Universal Access preferences).

more pictures )

GLToy and Kevin's Fireworks have been updated to run on Intel Macs. As I don't have one myself, please let me know if the screen savers don't work or look funny.