Kevin Reid's blog

Latest Posts

Info

stone wall, glasses, neutral
Name
Kevin Reid
Website
My Website

View

Advertisement

December 14th, 2009

Unifying status messages?

Add to Memories Tell a Friend
stone wall, glasses, neutral

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.

March 21st, 2009

Confused yet?

Add to Memories Tell a Friend
stone wall, glasses, neutral

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.

October 30th, 2008

Database document software?

Add to Memories Tell a Friend
stone wall, glasses, neutral
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.)

June 19th, 2008

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 )

February 5th, 2008

Portal (on a Mac)

Add to Memories Tell a Friend
stone wall, glasses, neutral

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

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.

November 28th, 2007

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).

Tags:

August 1st, 2006

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.

July 26th, 2006

The MudWalker mailing list has moved.

The new address for posting is mudwalker@cubik.org (you need to subscribe to post).

July 22nd, 2006

plist.py 1.2

Add to Memories Tell a Friend
stone wall, glasses, neutral

plist.py 1.2 is now available, adding support for boolean values. It is a Python module which converts between Mac OS X XML property lists and Python data structures.

Thanks to Robert White for the addition.

January 18th, 2006

Monaco Gripe

Add to Memories Tell a Friend
stone wall, glasses, neutral

Mac OS X 10.4.4: "Includes later versions of the Courier and Monaco system fonts that resolve certain Central European language and Cyrillic glyph display issues". In unantialiased Monaco 9, I have noticed the following differences:

  • •: The bullet is slightly smaller. Good.
  • & « »: The ampersand and angle-quotes look smashed. Bad.
  • t: The lowercase 't' is intermittently shifted left one pixel. Bad.
  • p: The lowercase 'p' is intermittently displayed narrower (the loop is squished). Bad.

And yes, I do mean intermittently. The appearance of 'p' is changing as I use the system.

Tags:

November 16th, 2005

Half-Baked World

Add to Memories Tell a Friend
stone wall, glasses, neutral

This is another Mac OS X screen saver, which I've been working on but haven't really “finished” to my satisfaction. I’ve decided to publish it anyway.

The basic idea is that there is a grid with various terrain types (which is incrementally modified), and various “mobiles” wander about it. The terrains so far are ground, mountain/wall, water, and bridge. The mobiles are bouncing rollers, edge followers, and fish.

The camera picks several mobiles (usually two) and keeps them in view, choosing different ones after a while, or if the group wanders too far apart.

What's missing:

  • More mobile types. Mobiles that modify the terrain. More modes of locomotion: flying, hopping, etc.
  • Better camera control, so that it doesn't spend as much time showing stationary mobiles or wide-area views, and will follow individual mobiles longer if they manage to move significant distances.
  • Better collision handling. I've already incorporated ODE to manage the basic position-and-velocity, but haven't updated the collision system to take advantage of it (if you're familar with ODE: the space system is not used; no contact joints are created; collisions are handled by setting velocity components to 0). As a result, mobiles may get stuck or run into walls and vanish, won't ever bounce or tumble, etc.
  • A better name.

Here are some rather small screenshots:

more images )

October 3rd, 2005

mergesvn

Add to Memories Tell a Friend
stone wall, glasses, neutral

mergesvn (not to be confused with svn merge) is a simple tool I wrote to resolve conflicts in Subversion working copies using the Mac OS X FileMerge application.

Given the name of a file with conflicts, it automatically finds the ".mine" and ".rN" files svn creates for a conflict. Saving the FileMerge window will overwrite the file; you must do svn resolved yourself. [Update: The above-linked version will run svn resolved for you.]

mergesvn source )

July 15th, 2005

MudWalker 0.3.2 released

Add to Memories Tell a Friend
stone wall, glasses, neutral

MudWalker 0.3.2 is now available.

MudWalker is an open source mud client for Mac OS X.

(Which I have been not working on for far too long.)

Details )

June 29th, 2005

Things I Learned Today

Add to Memories Tell a Friend
stone wall, glasses, neutral

If SBCL reports that the sb-posix contrib module fails to build, it may be a good idea to:

$ sudo chmod o-w /
Tags: ,

May 3rd, 2005

GLToy 1.1

Add to Memories Tell a Friend
stone wall, glasses, neutral

I just uploaded GLToy 1.1, a Mac OS X screen saver. From the page:

Miscellaneous OpenGL-based effects with transitions. Highly randomized. Slightly interactive (press I for help).

  • Changes in version 1.1:
    • Info area and particle textures work under Mac OS X 10.3 and later, instead of having or being large white areas.
    • New effects: Voronoi diagram; point grid; infinite tunnel.
    • Plot effect has several new functions to plot.
    • Trail effect is somewhat less ugly.
    • Fractal effect has modes where subdivision boxes appear instead of disappearing.
    • Grids effect has multiple styles of grids, and may turn the camera independently of the direction of motion.
    • Chain effect: spheres will be less oversaturated; new "curl" motion mode; fixed incorrect info display.
    • Particles effect: an uninteresting motion mode has been removed.

Sleep problem update

Add to Memories Tell a Friend
stone wall, glasses, neutral

I wrote in a comment previously:

No, it's a PowerBook G4 12", latest revision (scrolling trackpad).

It goes to sleep normally. On wakeup the light goes out and the drives make the usual noises, but the screen remains off (not blank, and not backlight-off-but-showing-an-image). The one time I tried network access, SSH just hung and ping reported, IIRC, “Host is down”.

It didn’t do this when I first got it, but I didn’t put it to sleep for a while after that so I didn’t notice exactly when it started doing this.

I had an unrelated crash today, and I decided to try something while I had the opportunity.

I turned it off, waited five minutes, unplugged everything, waited five minutes, removed the battery, waited five minutes, put the battery back in, waited five minutes, plugged it in, waited five minutes, and then turned it on again. Now it works.

Ah, modern technology.

Update’s update: Apparently if I do anything but click Sleep at the login screen, it again won’t wake up. Ngh.

Tags:

April 30th, 2005

10.4 notes

Add to Memories Tell a Friend
stone wall, glasses, neutral

Installed Mac OS X 10.4 last night. Miscellany that I can remember this morning:

  • The installer no longer offers separate Custom Install settings for whatever-the-fonts-for-many-languages-package-was-called and Additional Asian Fonts, but only one. I wonder if it’s just all in one now, or the A.A.F. are in the base system or not provided any more.
  • I clicked on Safari. Safari loaded, started showing a page, crashed. The Crash Reporter dialog now has a button to relaunch the application. If it crashes again, the dialog offers to relaunch it with the preference file moved aside. If it crashes again, the “Report” button becomes the default. (Still no apparent hooks for reporting a crash to anyone but Apple.)

    I got it to not crash after launch by copying the plist entry (ack, plists are now binary by default!) from my 10.3 system that says “start up with blank page”. Trying various web pages, and setting up a WebView in Interface Builder, seems to indicate that WebKit crashes whenever a GIF (not PNG, not JPEG) image is present on a page.

    I haven’t seen any other reports of this problem yet. Hmm.

  • Looking at Console indicates that a “mdimporter” process is crashing about once a minute (and accumulating crash logs). I understand this is the Spotlight indexing process.
  • Dashboard has plenty of Gratuitous Visual Effects, and works as described, but I haven’t yet seen anything obvious that I’ll be using it for.
  • Safari is said to support viewing PDFs in-browser, but I haven’t tried this yet. I’m looking forward to it.
  • Audio MIDI Setup had something called “Network” in the MIDI device configuration section.
  • I should turn on speech recognition and see if it’s become less crashy.
  • My computer still won’t wake from sleep properly on this clean-installed system. This means it’s probably a hardware problem. Aargh.
Tags:
Powered by LiveJournal.com