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] ]

Delaunay Tesselations of Pretty Girls. [Fri, 23-Oct-2009 6:26 PM]
[Tags|, , ]
[music |The Faint -- Mirror Error]

This is pretty cool. Delaunay is the inverse of Voronoi, so this is the same family of tesselations that the Voronoi XScreenSaver does.

He did it manually, though, which is kind of weird. Would have been cooler to automatically pick the control points by the first derivative of the image. Animation:

link8 comments   ·   post comment

XScreenSaver 5.10 out now [Mon, 7-Sep-2009 10:14 PM]
[Tags|, , , ]
[music |Kap Bambino -- Dead Lazers]

XScreenSaver 5.10 is out now. I think I have fixed the color and crashing problems on MacOS 10.6.

I'm still curious to hear from someone who has tried to run this on 10.4 PPC.

Let me know how it works...

link19 comments   ·   post comment

XScreenSaver 5.09 out now [Thu, 3-Sep-2009 2:21 AM]
[Tags|, , , , ]

XScreenSaver 5.09 is out now! In addition to the appearance of a few new savers, this version works on Snow Leopard (as well as 10.4).

It has a few bugs, but since the previous version didn't run at all on 10.6, I'll call this the "better than nothing" release.

Some things I could use help with:

  1. There were some new color-endian issues with 10.6. I have tested it on a 10.5.8 PPC Mac and on a 10.6 Intel Mac. I would like to know if images are displaying properly (in, for example, the Ripples screen saver, when loading photos from disk) on 1) 10.4 Intel Macs, 2) 10.4 PPC Macs, and 3) 10.5 Intel Macs.

  2. Somehow the colors got screwed up in xmatrix on both 10.6 Intel and 10.5 PPC. It makes no sense to me that the colors are screwed up there but nowhere else. I'm lost in a twisty maze of endiannesses, all alike.   Update: I've fixed this, it will be in the next release.

  3. When running the savers under SaverTester or System Preferences on 10.6 (but not 10.5), I get frequent crashes at startup inside NSLayoutManager, as I mentioned earlier. I assume it is a memory corruption bug somewhere, but I can't find it.

  4. Someone needs to fix the configure.in file for autoconf 2.64. I can't make any sense of this bullshit change they've made: Expanded-Before-Required.html. I have no stomach for this, so until someone sends me a patch, I guess xscreensaver will require autoconf 2.63 or earlier.

  5. osxgrabscreen.m is using "deprecated functions" like CGDisplayAddressForPosition(), and that code was flaky to begin with. If someone would like to write me some "modern", non-deprecated code that grabs an image of the desktop and returns it as an array of RGB data, I would be most appreciative. This, apparently, is rocket science.   Update: Fixed this too, though the fix is 10.5-specific, so it will remain flaky on 10.4.

  6. Something has gone catastropically wrong with makedepend on 10.6. It takes like 15 minutes to process even a single one of the xscreensaver Makefiles. It's crazy. This is not an xscreensaver problem per se, but if you know a fix, I'd like to hear it.

Let me know how it works!

link32 comments   ·   post comment

Kindle Clock [Wed, 2-Sep-2009 4:24 PM]
[Tags|, , , , , ]

Hey look, it's Dali Clock running on a Kindle.

link7 comments   ·   post comment

10.6 memory corruption [Wed, 2-Sep-2009 12:17 PM]
[Tags|, , , ]

I'm working on getting xscreensaver running on 10.6, and roughly 2/3rds of the time any of the savers launch, they crash here:

Program received signal: "EXC_BAD_ACCESS".
#0 0x00007fff825df445 in +[NSLayoutManager(NSPrivate) _doSomeBackgroundLayout] ()
#1 0x00007fff825df23f in _NSPostBackgroundLayout ()
#2 0x00007fff84cfe437 in __CFRunLoopDoObservers ()
#3 0x00007fff84cda6e4 in __CFRunLoopRun ()
#4 0x00007fff84cda03f in CFRunLoopRunSpecific ()
#5 0x00007fff86e50c4e in RunCurrentEventLoopInMode ()
#6 0x00007fff86e50a53 in ReceiveNextEventCommon ()
#7 0x00007fff86e5090c in BlockUntilNextEventMatchingListInMode ()
#8 0x00007fff824a5570 in _DPSNextEvent ()
#9 0x00007fff824a4ed9 in -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] ()
#10 0x00007fff8246ab29 in -[NSApplication run] ()
#11 0x00007fff82463844 in NSApplicationMain ()
#12 0x000000010000342c in main (argc=1, argv=0x7fff5fbff380) at /Users/jwz/src/xscreensaver/OSX/main.m:16

I'm not even using NSLayoutManager (as far as I know), so presumably this is some random memory corruption that happened somewhere else entirely, but turning on the MallocCheckHeap and related environment variables doesn't reveal anything. Any ideas how to debug this?

None of the XCode "Performance Tools" seem even remotely useful for tracking down memory corruption, but maybe I just don't understand them. Anyway, I thought the garbage collector was supposed to make everything sweetness and light?

link11 comments   ·   post comment

Dali Clock, 10.6 [Tue, 1-Sep-2009 3:48 PM]
[Tags|, , , ]

Before I dive in to getting xscreensaver to work on 10.6, I started smaller, and got the Dali Clock screen saver to work. Version 2.30 is out now. Please try it.

Unfortunately, I think the screen saver executable in there only works on 10.6, and the app and widget no longer work on 10.4, and I can't figure out how to fix that.

That's where you come in, dear Lazyweb.

To make it build on 10.6, I had to make these changes in XCode:

  • Architectures: Standard (32/64-bit Universal)
  • Base SDK: Mac OS X 10.5 (10.6 for the .saver)
  • C/C++ Compiler Version: GCC 4.0 (not 4.2)
  • Objective-C Garbage Collection: Supported
  • Info.plist: change "LSMinimumSystemVersion" from "10.4.0" to "10.4".

But it's obviously unacceptable that this should be a 10.6-only binary.

  1. How to I build DaliClock.app in such a way that it is runnable on 10.4, 10.5, and 10.6 systems?

    When I set the Base SDK to 10.4, I get "warning: Mac OS X version 10.5 or later is needed for use of the new objc abi", followed by "#error 64-bit not supported" from from objc/objc.h, included via Foundation.h.

    I suspect this means that you can't build a 10.4 version of the x86_64 binary, which is fine. Since 10.4 was perfectly happy running the i386 or ppc binaries, it's ok if the x86_64 build be 10.6-only, and the i386 and ppc builds be 10.4. But I don't see a way to specify that.

  2. How to I build DaliClock.saver in such a way that it is runnable on even 10.5 systems?

    When I set the Base SDK to 10.5, I get "ld: warning: in MacOSX10.5.sdk ScreenSaver.framework, missing required architecture x86_64 in file".

    Maybe this is the same kind of problem. But it's worse, because it means I can't build a 10.5-compatible version of the saver at all.

  3. How do I make these warnings go away?

    "AppController.m warning: passing argument 3 of 'addObserver:forKeyPath:options:context:' makes integer from pointer without a cast"

    The code in question is this, which had been warning-free before:

      [userDefaultsController addObserver:self
                forKeyPath:@"values.windowTitlebarIsHidden"
                options:nil
                context:@selector(windowTitlebarIsHiddenDidChange:)];
link16 comments   ·   post comment

how much does Snow Leopard suck? [Fri, 28-Aug-2009 2:07 PM]
[Tags|, , ]

In the interest of not burying the lede: if you install Snow Leopard, none of your 3rd-party screen savers will work (.qtz files may work but .saver files will not).


Normally I wouldn't give a shit about installing this OS upgrade, except that apparently Apple has fucked up ScreenSaverEngine, so in order to make the XScreenSaver distribion work on 10.6, I have to do a 64-bit build of all of the savers... and that's not possible on 10.5, because the 10.5 version of the ScreenSaver.framework bundle doesn't include the x86_64 architecture.

How angry am I going to be if I install 10.6 on my only computer?

Will it break Photoshop, Illustrator and Lightroom?

The nature of Apple's screen saver fuckup is that .saver bundles aren't separate programs (like they are in XScreenSaver under X11) but instead are dynamically loaded code into the ScreenSaverEngine app. And now they've changed ScreenSaverEngine to a 64-bit app which refuses to load 32-bit code -- meaning they broke every third party .saver bundle.

Dynamically loading the code this was always an idiotic idea. Even before Apple's current fuck-up, it had already meant that one screen saver could screw up the namespace of one that happens to run later (e.g., there are some savers that you can't run consecutively in System Preferences); and it means that a buggy screen saver that hangs can make you need to power-cycle the computer, since deactivation requires the cooperation of the 3rd party saver itself, instead of that being handled at a higher level. With X11 XScreenSaver, user activity guns down the saver whether it is responsive or not: a sandbox, basically, which is the only sensible way to do it.

I'd volunteer to rewrite ScreenSaverEngine from scratch, to make it less flaky and more compatible, if I thought there was any chance Apple would accept and ship my contribution.


Update: Progress is being made. I have questions.

link68 comments   ·   post comment

ALL WORK AND NO PLAY MAKES JACK A DULL BOY. [Mon, 26-Jan-2009 4:39 PM]
[Tags|, , , ]
[music |ALL WORK AND NO PLAY MAKES JACK A DULL BOY.]

All work and no play makes jack a dull boy.

Jack Torrance.

"All Work and No Play Makes Jack a Dull Boy is nothing short of a complete rethinking of what a novel can and should be. It's true that, taken on its own, All Work is plotless. But like the best of Beckett, the lack of forward momentum is precisely the point. If it's nearly impossible to read, let us take a moment to consider how difficult it must have been to write. One is forced to consider the author, heroically pitting himself against the Sisyphusean sentence. It's that metatextual struggle of Man vs. Typewriter that gives this book its spellbinding power. Some will dismiss it as simplistic; that's like dismissing a Pollock canvas as mere splatters of paint." -- Matthew Belinkie
link31 comments   ·   post comment

XScreenSaver 5.08 [Sun, 28-Dec-2008 12:14 AM]
[Tags|, , ]
[music |School of Seven Bells -- Wired for Light]

XScreenSaver 5.08 out now.

A bunch of bug fixes, but most notably this time, I finally retired a bunch of screen savers that suck. Also I rewrote Jigsaw and Sonar as OpenGL programs, and they are a lot slicker now. The pieces in Jigsaw come in many more varieties, and it rotates the pieces as well.

link26 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

about:internets [Wed, 3-Sep-2008 1:07 PM]
[Tags|, , , , ]
[music |Art of Noise -- Beatbox]

link21 comments   ·   post comment

XScreenSaver 5.07, and a "screen savers that suck" poll [Sun, 10-Aug-2008 10:52 PM]
[Tags|, , , , ]
[music |Minipop -- Generator]

XScreenSaver 5.07 out now. Mostly a bug fix release, fixing up a few lingering Xinerama/RANDR bugs, and a bunch of UI tweaks to the preferences dialogs. But most notably, I'm really happy with how the new cartoony cel-shading option to SkyTentacles came out.

And now, a poll!

Screen Savers That Suck, Second Try.

Two years ago I asked you all which screen savers, if any, you thought I should remove from the xscreensaver distribution. That didn't work out so well. A lot of it went like this: "I hate XYZ." "You're crazy, XYZ is my favorite!"

Several people suggested partitioning them into categories (e.g., "Retro", "Math", etc.) but nobody came up with a set of categories that really made sense.

So let's try it another way: please vote in this poll for the screen savers you think I should delete. BUT, please only vote for TEN. The poll will let you select hundreds, but please don't do that. Only select your ten most hated. The ones that make you say, "this screen saver is completely without merit, and anyone who says they like it is lying."

( The "Screen Savers That Suck" Poll   --More--(20%) )

link63 comments   ·   post comment

XScreenSaver 5.06 [Wed, 16-Jul-2008 2:58 PM]
[Tags|, , , ]
[music |Revolting Cocks -- Attack Ships on Fire]

XScreenSaver 5.06 out now. Only one new hack this time, but it's a fine one, if I do say so myself. Also this includes a bunch of fixes related to adding, removing and resizing monitors (RANDR/Xinerama) on X11 systems, as I mentioned earlier. So please stress-test that junk. Or be devoured.

link9 comments   ·   post comment

xscreensaver help [Sun, 6-Jul-2008 4:00 PM]
[Tags|, , , ]
[music |jwz mixtape 00]

Dear Lazyweb,

I could use some Linux xscreensaver debugging help. I made some fairly large changes to make it cope with the brave new RANDR world where monitors can be hot-swapped and have their resolution changed willy-nilly. Please apply this patch and test some things for me, k? Launch xscreensaver with -verbose to see what it's actually up to.

"Bad" would be 1) crashing, 2) part of your desktop ever being incompletely blacked out by a screen saver, 3) running savers on video outputs that don't actually have monitors attached to them.

If you have (or can has) more than one monitor:

  • Do they all go blank when xscreensaver activates?
  • Do things look right if you add a monitor while the screen is blanked? While it is non-blanked?
  • Likewise when changing the resolution of the monitors using the "xrandr" command.
  • Does it correctly realize which monitors are actually attached to the system and in use?
  • Try configuring your machine to use the old-style multi-screen mode (where you have displays :0.0 and :0.1, and no Xinerama or RANDR.) Does it still behave sanely?
  • Can you configure your X server to use just the Xinerama extension and not the RANDR extension? Try that too.

If you have only one monitor, you can still test this. Use Ctrl-Alt-KeypadPlus and Ctrl-Alt-KeypadMinus to change the resolution of your monitor without changing the resolution of your desktop, so that bumping the mouse against the edge of the screen pans across your desktop. (You might need to turn off the Xinerama and RANDR extensions to make this work, I'm not sure.)

  • When xscreensaver launches, the savers should always be the size of the monitor (you shouldn't be seeing a zoomed-in portion of the saver, you should be seeing the whole thing.)
  • Lock the screen. While the screen is locked, zoom in and out. The xscreensaver window should stay the size of the visible portion of the screen.
  • With the screen locked, bump the mouse against the edge of the screen. The screen should remain covered.

Please let me know how that goes...


Update: There's a new patch with a few fixes. Please try that instead!

link19 comments   ·   post comment

xscreensaver hacking help wanted [Fri, 30-May-2008 8:54 PM]
[Tags|, , , ]
[music |Bohemian Carnival sound check]

Hey, want to help out with some xscreensaver hacking?

Recent-ish Linux systems have made it so that when you add or remove monitors (e.g., docking a laptop) the system is actually aware that this has happened (shocking, I know) and dynamically changes the size, position, and number of screens.

Based on the email complaints I'm getting, it would appear that xscreensaver handles this... poorly.

However, I don't have access to any Linux machines capaple of doing this new Xrandr junk, so I can't really debug it.

I would like someone who does have access to such a machine to A) figure out what cases don't work, and B) send me a patch. You'll need one (preferably two) external monitors to experiment with. Probably better if the machine is a laptop.

Is this person you?

link8 comments   ·   post comment

15×15 [Mon, 19-May-2008 12:57 AM]
[Tags|, ]
[music |The Kills -- No Wow]

I approve of 15×15 a great deal.
I insist that someone turn it into a screen saver.

link3 comments   ·   post comment

XScreenSaver 5.05 [Sat, 1-Mar-2008 9:45 PM]
[Tags|, , , ]
[music |Brassy -- Everything You Need]

XScreenSaver 5.05 out now. Two and a half new savers this time, and a bunch of bug fixes (I hope).

link4 comments   ·   post comment

can it, in fact, sink? [Wed, 6-Feb-2008 1:47 PM]
[Tags|, , ]
[music |Submerged -- Last Gasp of the Shitbat]

I find this message hilarious* in several ways.

(Did you know usenet still existed? Wacky. I'm tempted to tag this with "retrocomputing" on that basis alone.)

From: Moshe Goldfarb <brick.n.st...@gmail.com>
Newsgroups: comp.os.linux.advocacy
Subject: Re: Gnome-screensaver ... nice touch
Date: Wed, 6 Feb 2008 14:38:14 -0500

On Wed, 06 Feb 2008 04:31:51 +0000, [H]omer wrote:

> Usually I just stick with xscreensaver,

Yawwn.......
Is this what Linux advocacy has sunk to?
Don't you guys have anything more interesting to talk about than patents and screen savers?

--
Moshe Goldfarb
Collector of soaps from around the globe.
Please visit The Hall of Linux Idiots:
http://linuxidiots.blogspot.com/

* Where by "hilarious" I mean "mildly amusing".

link25 comments   ·   post comment

XScreenSaver 5.04 [Tue, 13-Nov-2007 12:47 AM]
[Tags|, , , ]
[music |Rogue Traders -- Watching You]

XScreenSaver 5.04 out now. Three and a half new savers this time.


The OSX binaries were built on 10.5 but should work fine on 10.4.

link5 comments   ·   post comment

how to goof off at work [Tue, 6-Nov-2007 10:38 AM]
[Tags|, ]
[music |Trauma -- Open Your Mind]

Hey kids, here's something fun to try!

Remember those Magic Eye "random dot stereogram" things, where if you crossed your eyes just right, you could see 3D pictures?

So. Run the rd-bomb screen saver. Increase the grid size until the seed points are about two inches apart. I like -width 250 -height 220 (it looks better when the width and height are slightly different.)

Now sit about a foot away from the monitor, and cross your eyes slightly so that two of the boxes merge into one, just like you'd do with a random dot stereogram. Now it looks like your monitor is a window and the seething pattern is about ten feet away.

Ooooooh, trippy.

Keep this up for a couple hours and it'll be time for lunch!

link10 comments   ·   post comment

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