Astro, compilation woes, etc

» It is as predicted. ;-)

Long time no blog. I've just been too busy, mostly with uninteresting things (aka "work" ;-)). (Although I generally don't write about my work, maybe one of these days I will talk about working from home, which I have been doing for over 5 years now.)

Anyway, I just wanted to mention here that I've been looking for one of these:

• a command line astrology tool for Mac OS X

-or-

• a way to compile Astro 5.40 on Mac OS X

-or-

• a way to compile the Swiss Ephemeris to a dylib, so I can then talk to it via Python and ctypes.

So far, I've had no luck. Astro refuses to compile; there seem to be several versions of the source code around, though, so I might have to look a bit more in order to find a more Unix- or Mac-friendly version. Swisseph, on the other hand, compiles just fine... to an .a library, but not to .sl or .dylib. Suck. And needless to say, I haven't found a valid Astro 5.40 for OS X either. (There's a version for Classic, which is not suitable for my purposes.)

What I actually want is to create (yet another) horoscope database. Command line is fine, although I suppose I could write a GUI front-end for it... Mac only... but that's something for later. Either way, the idea is that you can enter search strings, that are actually valid expressions in the language I choose to write the database in... could be Python, Ruby, Io, maybe even Lisp. I don't know yet, and it depends on the solution (if any) I will find to the issue described earlier.

This is not a new idea, of course; I did the same at least 4 times with a Magic the Gathering card database, back when DSLs were not all the rage yet. :-) It's a very powerful idea though, and if you have a large collection of horoscopes, it would enable you to find horoscopes that match specific criteria very quickly. This can of course get as detailed as necessary:

Implementing the query stuff isn't all that exciting, but it might be a good exercise in, say, Io, or Python/ctypes/PyObjC.

Anyway, in order to compute horoscopes, I would need to solve one of the issues mentioned earlier. If anybody has any tips regarding these problems, I'd love to hear from them.

Update/1: I found a shell archive with some Unix source for Astro... after some tweaking, I got it to compile. (Replaced <malloc.h> with <sys/malloc.h> and undefined the X11 and MOUSE macros, to be exact. If you undefine X11 but not MOUSE, you'll get syntax errors... bizarre.) So now I have a working command line version for OS X (with graphics deliberately turned off). If anybody is interested, I'll put it online somewhere.

Update/2: A reader pointed me to this Python extension to the Swisseph library. I haven't tried it (yet?), because I now have a working Astro... and the resulting astrology program (which will, by the way, most likely be for personal use only) might not be written in Python at all.