jwz [entries|archive|friends|userinfo]
jwz

  www.jwz.org
  userinfo
  archive
  rss

Links
[»| [DNA Lounge] [Blog] [iCal] ]
[»| [DNA Lounge Legal Defense Fund] ]
[»| [WebCollage] [LJ WebCollage] ]

im in ur browser, melting ur digits [Sat, 27-Jun-2009 6:33 PM]
[Tags|, , , , ]
[music |Duran Duran -- Yo Bad Azizi]

Dali Clock Javascript!

I factored out the Javascript from the Palm Pre port of Dali Clock, so now it works as a web page too, including all the display options.

If any of you browser-internals types have suggestions on how to get better performance out of the <canvas> tag (specifically in the Palm Pre version of Webkit) I'd love to hear them.

link23 comments   ·   post comment

Palm WebOS Dali Clock [Fri, 26-Jun-2009 2:47 AM]
[Tags|, , ]
[music |Jane Jensen -- Dream Ridiculous Implausable]

Ladies and Gentlemen,

I have ported Dali Clock to the Palm Pre.

Truly, this program will last forever. If I have anything to say about it.

It's a little slow. It is, in fact, a bit slower than the PalmOS "Classic" port. And, for that matter, the original Xerox Alto version. Why, you may ask?

Because this port is written entirely in Javascript.

frsrs.

Let's take a moment to ponder this version and the Alto version, and just how many wasted instructions, layers of abstraction, frameworks, toolkits and outright cruft have gotten between the algorithm and the frame buffer in the intervening twenty-seven years. This program makes my phone hot. Hot, I tell you.

Oh. The huge manatee.

link57 comments   ·   post comment

My first Palm Pre app! [Mon, 22-Jun-2009 4:36 PM]
[Tags|, , , ]
[music |Scraping Foetus Off the Wheel -- Descent into the Inferno]

I wrote a restaurant tip calculator, since there wasn't one.

It was relatively painless, though the documentation is pretty spotty.

Since Palm isn't yet letting people upload things to the App Catalog, here's how you install this:

  1. Email yourself a link to the .ipk file. Don't mail the file itself as an attachment: just send yourself an email with the URL in it. You can do that by clicking here.

  2. Open that mail message on your Pre, and click the link.

  3. That will appear to have done nothing, but it did! Go to the first page of the Launcher, and you'll see that the new application has been installed.

Dear Lazyweb, I have several questions.

  1. How do I get it into the Palm App Catalog?

  2. How do I give a button a different background color, while still having it look like a standard Pre button?

  3. Native code, man. I need it. How do I do it? I seriously doubt I can do a port of Dali Clock using only Javascript and the <canvas> tag.


Update: Oh, the email I've been getting. Look, it only does whole numbers because if you insist that your tip be accurate to the penny you are a cheapskate weirdo. Here in the Colonies, we use paper money, not coins. If your bill is $44.22, just enter $45. Don't go all Scrooge McAsperger's on us, ok?

Update 2: Holy shit! The intardwebs have a new cesspool, I see!

link27 comments   ·   post comment

Palm Pre SMTP [Thu, 18-Jun-2009 10:44 AM]
[Tags|, , ]
[music |Fol Chen -- Cable TV]

I figured out why my Pre couldn't send mail. The phone is sending this:

    ehlo www.palm.com
    STARTTLS
    AUTH LOGIN

And Postfix 2.4.5 is replying: Error: send HELO/EHLO first

The problem there is that EHLO should have been upper case it's not sending another EHLO after STARTTLS. Turning off smtpd_helo_required is a workaround.

My question, dear Lazyweb:

    Where's the Palm Pre WebOS Bugzilla? How do I report this bug in such a way that it will actually reach a developer who can say, "Oh, duh" and actually check in a fix?

    If there is not a public bug reporting mechanism, then next best would be for someone to point me at your friend who works there who is willing to take mailed reports from me directly...

link20 comments   ·   post comment

SKYNET DEMANDS YOUR AUSTERITY. [Fri, 5-Jun-2009 5:10 PM]
[Tags|, , ]
[music |Portishead -- Nylon Smile]

The new software "is programmed to reject attempts at exuberance or human warmth." "It will send an error message if it detects a non-neutral expression," the DMV spokeswoman said.

link7 comments   ·   post comment

leading a tabless existence [Fri, 29-May-2009 2:47 PM]
[Tags|, , ]
[music |Killing Joke -- Wardance]

Dear Lazyweb, how do I get rid of the "new tab" plus-box on the title bar of Safari 4? I never use tabs and it's in the way. This thing:

Answer: defaults write com.apple.Safari DebugSafari4TabBarIsOnTop -bool NO

No, I'm not interested in discussing the merits of tabs with you. At all. Shut up.

link

Lightroom face recognition? [Mon, 11-May-2009 1:42 PM]
[Tags|, , , ]
[music |Enduser -- Off]

Dear Lazyweb,

Is there some kind of face-recognition plugin for Lightroom? Failing that, some software that will make it easy for me to auto-tag the people in my photos into their EXIF data, which I can then re-import into Lightroom?

Importing everything into iPhoto is not an option, since it copies and/or renames everything, and doesn't write data back to the original files. (Also iPhoto is generally crap.)

I tried "ilovephotos" and it's useless. It does an ok job of spotting faces, but makes no attempt to learn who's face is whose.

Are there any options that don't suck?

Options that involve "upload all your photos" or that do not provide any way to put the data into EXIF tags will not be considered.

link18 comments   ·   post comment

nice things, and the no can hassing of them [Thu, 23-Apr-2009 10:12 PM]
[Tags|, , ]
[music |Bauhaus -- Burning from the Inside]

I thought you might be interested in what happens to computing machinery around me. It's part of a field that I emit. Or perhaps a secretion. But I think it's a field. A failfield. I have been using this particular keyboard for just under eight years:

Yes, those keys used to say "N" and "M" on them. Wearing the paint off your keycaps? That's for amateurs. Not only do I wear the paint off, I inadvertently carve scars into the plastic. But it's the left "Alt" key that deserves special notice:

It is nearly worn through. That's just how meta I am, man.

link56 comments   ·   post comment

spamassassin [Wed, 4-Mar-2009 1:27 AM]
[Tags|, , ]
[music |The Lovemakers -- Misery Loves Company]

Dear Lazyweb,

How the hell do I get SpamAssassin to work properly with Postfix? I've been through this several times before, but as far as I can tell, it's never worked right. Here is what I want:

  • Postfix feeds all locally-delivered mail through SpamAssassin;
  • Each recipient user on the system can have a .spamassassin/user_prefs file that uses directives like "required_score" and "blacklist_from" and "score". (Note that I said that I want this to be per user, not global. His blacklist is not her blacklist.)

Sounds simple, right? Sounds like the setup everyone in the world must have, right?

I can't get it to ever read the user_prefs files. And my mail log is full of errors about not being able to write lock files in ~user/.spamassassin/.

What I've tried... --More--(31%)  )

link26 comments   ·   post comment

MacOS 7 on iPhone! [Mon, 2-Mar-2009 5:18 PM]
[Tags|, , , ]
[music |O + S -- Permanent Scar]

link22 comments   ·   post comment

(no subject) [Sat, 14-Feb-2009 3:37 AM]
[Tags|, ]

If you sent me any mail today, it probably bounced. Please resend.

I've had the same ISP (meer.net) for like 13 years, because it was started by some former coworkers. This used to mean there was a high level of cluefulness and reliability, but lately, not so much. About every three months I get some new variant of what happened again today: "Hey, how about we re-number our mail server without telling you so that your firewall is now wrong!" "Oh, and once you figure out what we did, how about the new server says 'relaying denied' at you, how would that be?"

I had to route around them by drafting a machine I have at a different ISP into service as a mail relay. WTF.

I think they're trying to drive me into the arms of Comcast.

link15 comments   ·   post comment

today in time_t news [Fri, 13-Feb-2009 12:48 PM]
[Tags|, ]
[music |Bow Wow Wow -- What's the Time (Hey Buddy)]

If you're like me, you've been seeing blog posts about "OMG it's time_t 1234567890!!" for the last two weeks. Stupid decimalists. There weren't nearly as many posts when time_t hit 0x40000000, and that's a far more interesting number.

Anyway. It's in about three hours.

    perl -le 'print time'
    perl -le 'print scalar localtime(1234567890)'

3:31:30 PM PST, today. Please make a note of it.

link15 comments   ·   post comment

Cocoa EXIF rotation [Sat, 27-Dec-2008 3:38 PM]
[Tags|, , , ]
[music |Cabaret Voltaire -- Motion Rotation]

Dear Lazyweb,

How do you load an NSImage with proper EXIF rotation applied? I can't figure out how to determine the correct rotation. The following doesn't work. I get a dictionary containing a bunch of EXIF keys like exposure and shutter speed, but the "Orientation" tag is notably missing, and the image is displayed sideways. Preview and Finder display it properly, and exiftool says the field is there.

  NSImage *img = [[NSImage alloc] initWithContentsOfFile:filename];
  NSArray *reps = [img representations];
  NSBitmapImageRep *rep = reps ? [reps objectAtIndex:0] : 0;
  if (rep) {
    NSDictionary *exif = [rep valueForProperty: @"NSImageEXIFData"];
    if (exif) {
      NSString *rot = [exif objectForKey:@"Orientation"];
      NSLog (@"rot = %@", rot);
      NSEnumerator *e = [exif keyEnumerator];
      id key;
      while ((key = [e nextObject])) {
        NSLog (@"%@ = %@", key, [exif objectForKey:key]);
      }
    }
  }
link8 comments   ·   post comment

RSS 2.0 question [Mon, 22-Dec-2008 12:05 AM]
[Tags|, , ]
[music |Azzido da Bass -- Lonely By Your Side]

Let's say you have an RSS feed and some consumers of it would prefer full entries of text/html content, but some would prefer full entries of text/plain content. Is the thing to do to put the text/plain in <description> and the text/html in <content:encoded>? Or will that cause some consumers to "accidentally" display the text/plain when they should be displaying the text/html?

Or should the two fields be <content> and <content:encoded> instead? (Does <content> even exist?) All the documentation says <description> should be an abbreviated summary, but I see nothing that talks about how to achieve that which MIME calls multipart/alternative.

(Just trusting the text/plain consumers to strip the tags out of the HTML to display it is suboptimal; the two versions should be formatted slightly differently to be most readable.)


Update: Ok, I changed the feed to contain both text/plain and text/html versions. Please try that in your favorite feed reader, and let me know if it screws up. A screw-up would be: it's showing you plain text when it could be showing you HTML.

link12 comments   ·   post comment

normalizing audio volume on movies [Tue, 9-Dec-2008 4:06 PM]
[Tags|, , , ]
[music |Male or Female -- Louder Than Silence]

Dear Lazyweb,

How do I normalize the audio volume of a bunch of MOV and MP4 files?

The "Sound Check" option in iTunes works passably well for MP3 files, but doesn't do anything for videos. This makes it annoying to use a playlist full of music videos as a source of ambient entertainment, since the volume fluctuates wildly.

(Only slightly surprisingly, iTunes doesn't use the RVA2 ID3 tag used by normalize, but instead uses a COMM/iTunNORM tag.)

I think that a solution involving manually pulling the audio out of the movie files, normalizing it as a WAV, and re-inserting it into the movie is probably doomed to synchronization errors. So let's not.

link34 comments   ·   post comment

Action Item [Thu, 4-Dec-2008 10:35 PM]
[Tags|, ]

Why is there no Unicode character for "i dotted with a heart"? This is an even bigger oversight than there being no coding for the Glyph Formerly Known As.*


* Yes I am aware of the Apr 1 prank.

link9 comments   ·   post comment

magical toobs. [Thu, 20-Nov-2008 2:07 PM]
[Tags|, , ]
[music |Halou -- Tubefed]

Exhibit A:

Exhibit B:


We'll miss you, Senator.
You gave us so much.
link25 comments   ·   post comment

apparently billg 0wns yer robots [Thu, 20-Nov-2008 1:26 PM]
[Tags|, , ]
[music |Say Hi To Your Mom -- Magic Beans and Truth Machines]

So I was considering buying that robot kit I posted about the other day. "Considering" because it's like a thousand bucks, and I'm not sure it's a thousand bucks worth of entertainment. Two fifty, surely, but a grand? But then I did some more poking around and hit the part of the assembly instructions that go, "Now download flargle.exe, connect to COM1 and diddle the flibbidy registers". So I emailed them, asking, "Really?" Turns out? "Yeah." Apparently the entire hobbyist-robotics industry assumes a substrate of Windows. What the hell guys.

So, now this is sounding less like "a fun 3d jigsaw puzzle to assemble! And when you're done, it walks!" and more like, "figure out how to get your Mac to run Windows (which it does not have) to talk to a serial port (which it does not have) to run UI software written by a hardware guy". Aside from the part of this that is clearly against Policy, this also sounds like a heaping dollop of Not Fun. In fact, my back-of-the-envelope calculations suggest that the entertainment value of this toy decreases by about $25 per minute spent screwing around with the serial port. It's hard to assign a value to time spent in Windows, because I'd have to be pretty heavily sedated to even consider that, so I imagine my sense of time would be skewed. Still, I think it's in the red before I even open the box.

Also! Apparently the robot's software is written in Excel! No, seriously.

Plus side to all this? We need not worry about Skynet.

I am, however, Jack's seething cybernetic disappointment.

link42 comments   ·   post comment

Ejacs [Sun, 16-Nov-2008 11:43 PM]
[Tags|, , , ]
[music |The Soviettes -- #1 Is Number Two]

So, Steve Yegge went insane and implemented a JavaScript interpreter in Emacs Lisp, and he has some things to say about that. Now, I have to point out that making fun of Emacs Lisp is kind of like kicking a puppy... a puppy who's been dead since 1981. But, at this I lolled:

The best way to compare programming languages is by analogy to cars. Lisp is a whole family of languages, and can be broken down approximately as follows:

  • Scheme is an exotic sports car. Fast. Manual transmission. No radio.
  • Emacs Lisp is a 1984 Subaru GL 4WD: "the car that's always in front of you."
  • Common Lisp is Howl's Moving Castle.
link19 comments   ·   post comment

Worst. Bug. Ever. [Sat, 8-Nov-2008 7:25 PM]
[Tags|, , ]
[music |Ladytron -- Startup Chime]

Yeah, uh, "oops."

It turns out the bug in Android I wrote about yesterday was worse than we thought. When the phone booted it started up a command shell as root and sent every keystroke you ever typed on the keyboard from then on to that shell. Thus every word you typed, in addition to going to the foreground application would be silently and invisibly interpreted as a command and executed with superuser privileges. Wow!

[...]
Funny story behind finding this:

I was in the middle of a text conversation with my girl when she asked why I hadn't responded. I had just rebooted my phone and the first thing I typed was a response to her text which simply stated "Reboot" - which, to my surprise, rebooted my phone.

[...]
Here's a workaround I just discovered: Open the keyboard and type these 5 keystrokes: <return>-c-a-t-<return>. That will cause the phantom shell to not listen to commands any more, at least until the next reboot.

link16 comments   ·   post comment

navigation
[ viewing | most recent entries ]
[ go | earlier ]