Archive for the ‘Macintosh’ Category

X11 Tablet Support On Mac

Sunday, July 20th, 2008

XQuartz, the cutting edge version of Apple’s X11.app, supports pressure-sensitive tablets as of the latest version, 2.3.0. Or so says the page — I have not personally confirmed this yet.

This could finally put to rest my Linux twitchiness if it turns out to work!

UPDATE: I can confirm, through the xinput commandline tool, that it does now get pressure and location data. However, as noted here by Jeremy Huddleston, GTK and therefore the Gimp and Inkscape are not receiving that data, for reasons which are unclear. Furthermore, with this New Hotness working, you can’t use the tablet the way you used to be able to — as a mouse. Because tablet taps don’t register as mouse clicks.

So a threshold has been crossed, but this whole wacom/XQuartz thing is still not ready for prime time.

And it’s a total hassle to uninstall XQuartz once you installed it (you have to blow X11 away completely and reinstall from your OS X install DVD.)

UPDATE 2: “Total hassle” doesn’t begin to describe it. Despite having reinstalled from the DVD per instructions, X11 doesn’t work at all anymore. I’m not sure what I can do to restore it short of a total OS reinstall from the DVD, restoring my stuff from my Time Machine backup. Ouch.

UPDATE 3: IT GETS WORSE:

I did the reinstall. X11 stopped working. Apparently a bug in Apple’s 10.5.3/4 combo update hoses X11 completely. Guess what the recommended fix is?

Install xquartz from macosforge. WHICH IS WHAT STARTED THE DAMN PROBLEM.

I’m going to try an earlier version of Xquartz (2.2.3) in the hopes that I get the fix without hosing my tablet in X11 again.

UPDATE 4 / CONCLUSION:

Just confirming that installing the next-to-last release of Xquartz (2.2.3) brought things back to normal. Geez, and I think of Linux as being full of bullshit technical hoops to jump through!

OK, NOW the iPhone is cool.

Wednesday, June 11th, 2008

John M McIntosh announced on the squeak-dev mailing list that “I’m pleased to say that I’m one of the 1.5% of the iPhone developer population that has been accepted to officially build applications for distribution via Apple’s iPhone Application Store.”

He’s prepared a 93-day plan to build a new fully documented Objective C based source tree to host the Squeak VM on the iPhone and in addition as a 64bit VM on OS-X. He’s already collaborating with Impara who are looking at adapting the Squeak UI to the iPhone’s multi-touch paradigm and platform widgets, and is looking for further support (and funding) for this work.

John is also looking to offer support for Squeak developers hoping to make their applications available through the iPhone Store, although he notes that Apple has a number of restrictions limiting the types of applications that can be made available in this way.

[From Squeak on the iPhone! « The Weekly Squeak]

I love Smalltalk, specifically Squeak. I don’t actually use it for much, I have just enough experience playing around with it to see what is so sweet about it, but not enough to be really effective with it. Smalltalk on the iPhone? Now that’s cool.

Mail AppleScript-ing Project

Saturday, June 7th, 2008

I have a folder full of old mail in Apple’s Mail application. It’s gigantic. About 70,000 messages. Most of them are duplicates, because it’s the result of finding old folder of mail upon old folder of mail and merging them together into one great hoard. The actual number of real distinct messages is probably a smallish fraction of 70,000.

What’s worse, some of the 70,000 are blank. In an inept attempt at writing a Python script to clean up a similar uber-mail-folder in the past, I somehow took a lot of old mail and destroyed the body of the emails, leaving the headers intact. So my gigantic folder includes many duplicates, but some of the duplicates aren’t real duplicates because they have missing bodies.

I want to somehow eliminate all the duplicate messages, and there are scripts to do that in Apple Mail. The only one that I would have trusted not to accidentally kill a real message and keep the one without a body, chokes and fails on a folder that large. (It also choked and failed on a smaller folder. Maybe something changed in Leopard that breaks that script.)

So I wanted to go through and destroy all the messages which have blank bodies — they’re no use to me and they make it dangerous to get rid of duplicate messages. I tried exporting everything to a mbox-format file, and use some of Python’s nice mailbox-manipulation libraries, but the file was insanely large, and Python on my macbook staggered under its weight. (Besides, my use of Python caused this problem, a while back…)

So eventually I turned to AppleScript. (I first tried using rb-appscript, but it turns out I don’t need any special Rubyness for this, and it’s easier to learn from examples of AppleScript on the web if I don’t have to translate them into Ruby before I use them.)

I wrote a script in Apple’s Script Editor called “Winnower.” It takes messages in a folder called “doing” and sorts them into two folders, “blank” and “done,” depending on whether there’s any content in the body or attachments on the mail. I put a few thousand messages at a time into the “doing” folder and then run the script. (The full weight of the 70,000+ message folder was too much for this script too.)

It looks like this:

tell application “Mail”

set doingbox to mailbox “doing”

set blankbox to mailbox “blank”

set donebox to mailbox “done”

set doingmessages to messages of doingbox

repeat with thisMessage in doingmessages

ignoring white space

if mail attachments of thisMessage is {} and content of thisMessage is equal to “” then

move thisMessage to blankbox

else

move thisMessage to donebox

end if

end ignoring

end repeat

end tell

Three Awesome Drawing Apps For OS X Under $30

Friday, February 15th, 2008

I’ve discovered three really outstanding, and really reasonably priced, shareware drawing applications for OS X. If you’ve blown your budget on a Wacom pad and suddenly realize you can’t afford something huge and crazy like Painter or Photoshop — and you discover that the Gimp for OS X isn’t hip to pressure-sensitive tablets — check these out.

ArtRage from Ambient Design

My homeboy Adam Black pointed me at this one, I think. It’s cross-platform. It’s kind of like Corel Painter in that it’s oriented towards simulating natural media — chalks, oil paints, pencils, watercolors, crazy things like that. Development is ongoing; it’s been updated a couple times since I bought it. There’s a reasonably functional free version as well.

What’s Awesome: It is really, really, REALLY good at simulating natural media. You can seriously create things that look exactly like chalk drawings on textured paper, or oil paints on canvas, or whatever. It takes a while to learn to control the media, but their forums are really helpful. It has layers, “stencils,” “reference images,” all kinds of crazy things. There is an immense amount of power in Artrage.

What’s Less Awesome: Ironically, it’s kind of hard to make drawings that don’t yell “NATURAL MEDIA!!!!” at the top of their lungs. Getting smooth paper and a simple black line is actually a bit of a hassle. The interface, while really original and cool, seems not to have been originally designed for macs, and if you go fullscreen it kind of fights with the Dock. (So I don’t.)

TabletDraw from mooSoftware

This is seriously minimalist. It is aimed at doing one thing very well: drawing with a tablet.

What’s Awesome: They claim to have an outstanding algorithm/whatever for accurately recording quick, subtle strokes, and my experience bears that claim out. You can sign your name quickly on the tablet and it will look just right on the screen. You can create really nice line drawings with it; you can tweak the “pens” along several axes (size, how much they grow/shrink depending on pressure, transparency, color, and whether they allow darker lines underneath them to show through, which is called “ink mode”). It’s easy to build up a palette of useful brushes. You can do interesting things with it once you learn to work with its minimalism. Essentially everything you do with it is “pen drawing” — but you can have “pens” with any color ink, any transparency, any size, the ability to layer over darker ink, etc.

What’s Less Awesome: The minimalism is extreme. They have no layers, for example. A recent feature is that you can load a reference drawing up in the background, and draw on “onionskin” above it, which is a large fraction of what you’d want to do with layers, but that is unwieldy — you have to save an image and then reload it as a reference. The resizing behavior of canvas vs. window is weird too until you learn how to work with it. These are not dealbreakers by any means, but TabletDraw is something that you have to learn your way around. It’s not always what you expect it to be, and it’s not everything to everybody.

Scribbles from Atebits Software

I’ve only just discovered this one. Scribbles is so slick it looks like it was created for Steve Jobs to demo at a keynote address. It uses the latest Mac imaging technology (so you need OS X 10.4 or better to use it), and it’s — wow.

I haven’t had long to explore it but here are first impressions:

What’s Awesome: Incredibly slick, easy to use interface. All the controls and tools are giant and easy to select. The layers control shows animated layers in perspective and how they’re related to each other. Responsiveness to tablet pressure and movement is good. There are a good number of basic tools (pens with varying degrees of fuzziness, erasers, some wacky coloring tools).

No, Really, What’s Awesome: Resolution-independent infinite canvas. You are drawing on an infinte sheet of paper and can zoom in or out all you want, for an arbitrary level of detail or expansiveness. It’s kind of like Rita (also worth checking out, and free) in that way, but I’m finding it a bit easier to use than Rita. In the other programs I’ve used, I usually create a very large canvas to start with so I don’t have to worry about pixellation… I don’t have to do that here.

More Awesome: “tracing paper” mode, where the *entire application* turns semitransparent, so you can trace, say, an image in your web browser.

What’s Not So Awesome: Haven’t discovered that yet but I’m sure I will. Nobody’s perfect. I guess you can’t use it to do simulated natural media like in ArtRage at all, and I don’t know whether its tablet movement responsiveness is as exquisitely awesome as TabletDraw’s. It doesn’t seem to have the ability to really customize your pen tips to be just what you want, like in TabletDraw, so if you want to do exquisite penwork TabletDraw is probably still the winner. But man. It’s tres slick.

Any one of these is easily worth your money. Check ‘em out if you’re in the market.

iMeme for Mac Nerds

Tuesday, February 5th, 2008

If you’re on a mac right now, make a list of all the applications in your /Applications folder which begin with a gratuitous letter ‘i’.

Here’s a magical ruby one-liner to cut and paste into a Terminal to list them:
ruby -e 'Dir[%q{/Applications/i*}].each { | app | puts /\/(i.*).app/.match(app)[1] }’

My list:

  1. iAlarm
  2. iAlertU
  3. iCal
  4. iChat
  5. iExtractMP3
  6. iJournal
  7. iMovie HD
  8. iPhoto
  9. iRecord
  10. iSquint
  11. iStumbler
  12. iSync
  13. iTag
  14. iTunes
  15. iWeb

Fifteen. How bout you?