zombie ships

Happiness: The Chinese zombie ships of West Africa

He's the 2nd mate, and says that he's been sitting here on his own for five days, awaiting a new crew, He doesn't know when they'll arrive. The trawler itself has been anchored here, at this spot, for three months.

"Is this ship ready for fishing?" we ask. "Yes, of course", he looks around, gestures at the deck. He seems surprised that we would ask. We're amazed it's even floating.

We had been told this was where old pirate fishing boats were left at anchor, abandoned. We didn't expect to find living people on board the dying ships.

Update: Part 2.

Tags:

XScreenSaver 5.00b1

I've decided it deserves to be called a "beta" instead of an "alpha" now. Whee. And I've updated the XScreenSaver Web Superstore to acknowledge that there are now both MacOS and X11 versions. Let me know if all that sounds sensible (the audience has changed a lot, after all). Get source and binary from the Download page. And as always, the todo list is the stuff I'm still begging for help with.
Tags: , , , ,

The Lord Our Dog

We had a little photo shoot at DNA yesterday for baconmonkey's new MEAT flyer, which turned out pretty well:

Now, I seem to recall at some point having seen the Last Supper re-enacted by Poker Dogs, but I can't find it now. Please assist. (It's not this, and it's not this, though both are commendable.)

Tags: , , ,

this just in: MONSTERS ARE REAL.

Giant centipede eating mouse.

"A giant centipede, scolopendra gigantea robusta, killing and eating a mouse. This specimen was not yet full grown but as you can see, it was already an impressive size."
Tags: ,

wherein Spotlight is found to be useless

On OSX, the "xscreensaver-getimage-file" Perl script is really slow. I'm trying to fix that.

This is the script that picks a random image file for the screen savers to load. It descends a directory, gathers up all the JPEG, PNG, and GIF files, and picks one at random.

On my Linux machine, running it on a directory containing 47,000 files in 750 subdirectories takes 20 seconds the first time, and 5 seconds on subsequent runs. On my Mac, it takes 49 seconds the first time, and 43 seconds the second time. As both machines have 7200RPM SATA drives, this leads me to believe that HFS+ sucks compared to Ext3fs, but that insight isn't particularly helpful.

So I thought, maybe I can speed this up by using Spotlight instead of iterating the directories myself. <LJ-CUT text="So I tried some Spotlight crap."> So after some googling, I tried:

    mdfind -onlyin /Users/jwz/Pictures
          "kMDItemContentTypeTree == 'public.image'"

Oops, sorry, turns out "ContentType" is useless: it's only set on certain files, like ones created with Photoshop; I've got a ton of .jpg files that don't have that attribute (though Finder knows they're images.) Nice. So instead you have to do:

    mdfind -onlyin /Users/jwz/Pictures
          "kMDItemContentTypeTree == 'public.image' ||
          kMDItemFSName == '*.jpg' ||
          kMDItemFSName == '*.jpeg' ||
          kMDItemFSName == '*.pjpeg' ||
          kMDItemFSName == '*.pjpg' ||
          kMDItemFSName == '*.png' ||
          kMDItemFSName == '*.gif' ||
          kMDItemFSName == '*.tif' ||
          kMDItemFSName == '*.tiff' ||
          kMDItemFSName == '*.xbm' ||
          kMDItemFSName == '*.xpm'"

    Update:

      So, it turns out that when "mdls" on a .jpg file does not list kMDItemContentTypeTree, what that means is "your Spotlight index is incomplete." Somehow, Spotlight failed to index a whole bunch of my files. So last night I nuked and re-created the index ("mdutil -E /") and now I can match files with either kMDItemDisplayName or kMDItemDisplayName. (kMDItemDisplayName is faster than the "FSName" parameters, which apparently stat() the file every time). But it's still incredibly slow. Way slower than traversing the disk directly.
And that takes... wait for it... wait for it... six minutes the first time. and seven minutes the second time.

I guess I could cache the results somewhere, and only re-list the directory once a day or something, but that's pretty lame.

Any other suggestions?

Update: I managed to speed it up a lot by reducing the number of stats (by assuming that certain file extensions are the gospel truth). It seems like using Spotlight for this is just a bad idea, which is too bad.

Tags: , , , ,

XScreenSaver 5.00a13

Come and get it:

There is a memory corruption bug in image loading that I have been beating my head against for days, and have so far been unable to track down. If you have a Mac development environment, please help me figure out where it's going wrong...

    Some of the image-displaying savers will run for a little while, but most of them blow up immediately in some nonsensical place. Maybe the autorelease pool is getting corrupted? I've tried everything I know (MallocDebug, the various $Malloc* env. vars), and I've gotten nowhere.

    It probably has something to do with waiting for the result of a pipe, because the problem goes away if the "#if 0" is changed to "#if 1" in grabclient.c: osx_load_image_file_async() to make all images load synchronously instead of asynchronously. Perhaps this implicates jwxyz-timers.m, though I've stared at that code quite a bit.

    Update: I think this is fixed now. Thanks, zetawoof!

Other things that I'm still stuck on, and that I still haven't gotten any happy LazyWeb action on:

  • Why do none of my .saver bundles show up with a custom icon in the Finder, even though CFBundleIconFile=XScreenSaver in Contents/Info.plist, and Contents/Resources/XScreenSaver.icns exists?

  • Why is this getting logged every time you hit OK in the preferences dialog:
    "SaverTester[]: ScreenSaverDefaults does not respond to volatileDomainForName:"

  • If you delete all the text in a preferences text field (e.g., in sonar), this happens after hitting OK:
    NSRunLoop ignoring exception '-[NSCFDictionary setObject:forKey:]: attempt to insert nil value' that raised during posting of delayed perform with target 3d9ea0 and selector 'invokeWithTarget:'

  • Assertion failures seem to result in the program just hanging (in the event loop, with the screen perma-blanked). How do I make them cause the program to exit instead?

  • The image-generation preferences aren't displaying quite right; the radio-buttons don't come up selected by default, and the labels are wrong. Basically, I can't figure out how to use NSMatrix properly. (Code is in OSX/XScreenSaverConfigSheet.m: make_text_controls().)

  • The "Text File", "URL", and "Choose Random Image" fields in preferences should probably be spin-boxes that remember all previous entries into those fields in any of the screen savers. I don't know how to do either part of that.

  • When the "Image Directory" preference is long, the field displays the first part of the string; it should scroll to display the last part instead. I tried a few things, but I can't figure out how to do that.

Tags: , , , ,

Open Source Teledildonics

Linux/OSX drivers and fingerd client for the Rez Trance Vibrator:

This program is a rudimentary teledildonics application built around the finger daemon - hence bringing generations of CS undergrad innuendo full circle.

It has two modes in addition to what you're seeing now - if you finger [any string]@[this host], a series of random pulses will be generated, proportional to the length of the string.

Alternatively, fingering 0x[hex digits]@[this host] will instead send a direct stream of motor speeds to the vibrator, one per second.

Tags: , , ,

Today in Japanese Amputee Sex Doll news

Tags: , ,

Enigma

It's a (slightly updated) working reproduction of an Enigma machine! Wikipedia says it "makes use of 40-point rotors, allowing letters, numbers and some punctuation". It also appears to have Centronics printer connectors (what, no USB?)

Tags: , ,

I got your checks and balances right here

Administration tells Congress (again) - We won't abide by your "laws"

There are numerous noteworthy items, but the most significant, by far, is that the DoJ made clear to Congress that even if Congress passes some sort of newly amended FISA of the type which Sen. DeWine introduced, and even if the President "agrees" to it and signs it into law, the President still has the power to violate that law if he wants to. Put another way, the Administration is telling the Congress -- again -- that they can go and pass all the laws they want which purport to liberalize or restrict the President's powers, and it does not matter, because the President has and intends to preserve the power to do whatever he wants regardless of what those laws provide. [...]

Put another way, the Administration has seized the power of Congress to make the laws, they have seized the power of the judiciary to interpret the laws, and they execute them as well. They have consolidated within themselves all of the powers of the government, particularly with regard to national security. This situation is, of course, exactly what Madison warned about in Federalist 47; it really is the very opposite of everything our Government is intended to be: [...]

As usual, the most amazing aspect of all of this is not that the Administration is claiming these powers. It is that even as it claims them as expressly and clearly as can be, the Congress continues to ignore it and pretend that it still retains power to restrict the Administration by the laws it passes. And the media continues to fail in its duty to inform the country about the powers the Administration has seized, likely because they are so extreme that people still do not really believe that the Administration means what they are saying. What else do they need to do in order to demonstrate their sincerity?

Previously.

Tags: ,