Dali Clock

OSX Dali Clock is just about done... try it out and let me know?

All the preferences work, and I think it doesn't leak. I'm not sure how good it is about CPU usage.

The application icon is kinda crappy. Someone make me a nicer one!

I played around with making it use CGContextClipToMask to draw a 1bpp bitmap instead of using NSImage-drawInRect, but I couldn't see how to do that and have transparency still work. I'm also not sure it would make that much of a difference anyway; any informed opinions? (It's in DaliClockView-drawRect).

Tags: , , ,

worse than a door prize

The umbrella is a nice detail:


Photographer Liu Tao was accused of lying in wait to take his pictures instead of warning people of the danger. Liu defended himself, saying: "I just knew that the city government has paved the pit, and without my pictures, the pit would not be noticed by the government, and there would perhaps be more people falling over."
Tags:
Current Music: Doves -- Rise ♬

"Hello, World."

Dear subset of the LazyWeb who hack on OSX,

I've finally started on the OSX port of XDaliClock. (And there was much rejoicing.) Since this is my first native Mac program, I could use some help figuring out what I'm doing wrong so far.

  • I made a preferences panel, but I still have no clue how I'm supposed to actually hook it up, so that I can read the settings in it and act on them. One of the tutorials I saw seemed to imply that I needed to have both a "DaliClockView" and a "DaliClockController", but I still just follow how this crap works at all.

  • And once that stuff's hooked up, how do I cause the settings to be saved across sessions?

  • When I test the interface from Interface Builder, the color picker dialog has an "Opacity" slider, but in the real application, that slider's not there. Why?

  • I'm confused about the lifetimes of objects, and whether, when, or how I'm expected to increase or decrease the reference counts. Especially the "fg" and "bg" instance variables. Am I leaking stuff? I think I probably am...

  • Calling setMovableByWindowBackground from initWithFrame doesn't seem to do anything (it needs to be called later) so I'm calling it from acceptsFirstResponder, which is clearly bogus. What's the right place for this sort of thing?

  • How do I make the window always stay on top?

  • How do I make the app exit when the window close box is clicked?

  • Is there a more efficient way of taking a 1bpp bitmap and rendering it on a window with a given pair of foreground/background colors than the horrible way I'm doing it (scale the 1bpp bitmap up to a 24bpp pixmap and render that instead)?

The code is here: xdaliclock-2.21alpha.tar.gz. Please don't distribute this yet, but please do take a look at it and tell me what parts I did in a crazy ass-backwards way. The XCode project is in the "OSX" subdirectory.

Tags: , , , ,

documentation that makes me laugh

finalize
- (void)finalize

Discussion
Called by the garbage collector when the receiver is not referenced by other objects.

Note: Garbage collection is not available for use in Mac OS X v10.4, nor in earlier versions.

The garbage collector invokes this method on the receiver before disposing of the memory it uses. When garbage collection is enabled, this method is invoked instead of dealloc.

Availability
Available in Mac OS X v10.4 and later.

Tags: , ,

DNA Lounge: Wherein the cameras go click click.

Photos are up of the bouncy-castle-riffic DNA Staff Christmas Party (Oh, the humanity...) and of Madelia at last night's Pop Roxx, and also a few more pictures of the Ayria + System Syn + Tesseract7 show.

All stunts performed by professional drivers on a closed track. Do not try this at home.

Tags:

Today in Panopticon news

This happens all the time: just when you think things are bad in the US, the UK shows how it's really done...


(I couldn't find a UK plate generator...)

Britain will be first country to monitor every car journey
Britain is to become the first country in the world where the movements of all vehicles on the roads are recorded. A new national surveillance system will hold the records for at least two years.

Using a network of cameras that can automatically read every passing number plate, the plan is to build a huge database of vehicle movements so that the police and security services can analyse any journey a driver has made over several years.

The network will incorporate thousands of existing CCTV cameras which are being converted to read number plates automatically night and day to provide 24/7 coverage of all motorways and main roads, as well as towns, cities, ports and petrol-station forecourts.

By next March a central database installed alongside the Police National Computer in Hendon, north London, will store the details of 35 million number-plate "reads" per day. [...] Already there are plans to extend the database by increasing the storage period to five years and by linking thousands of additional cameras so that details of up to 100 million number plates can be fed each day into the central databank.

(Previously.)

Tags: , , ,

Traitor in Chief

bruce_schneier has a good, long article and collection of links on the latest antics: The Security Threat of Unchecked Presidential Power.
[Yoo's memo is] a dense read and a terrifying piece of legal contortionism, but it basically says that the president has unlimited powers to fight terrorism. He can spy on anyone, arrest anyone, and kidnap anyone and ship him to another country ... merely on the suspicion that he might be a terrorist. And according to the memo, this power lasts until there is no more terrorism in the world.

This is indefinite dictatorial power. And I don't use that term lightly; the very definition of a dictatorship is a system that puts a ruler above the law. In the weeks after 9/11, while America and the world were grieving, Bush built a legal rationale for a dictatorship. Then he immediately started using it to avoid the law.

This is, fundamentally, why this issue crossed political lines in Congress. If the president can ignore laws regulating surveillance and wiretapping, why is Congress bothering to debate reauthorizing certain provisions of the Patriot Act? Any debate over laws is predicated on the belief that the executive branch will follow the law.

And isn't it nice that the New York Times sat on this story for a full year before publishing it? They knew about this before the election! And earlier this month, when they finally decided to run the story (and only decided to do so to avoid being scooped by a book by one of their own reporters!):

On Dec 6, Bush summoned Times publisher Arthur Sulzberger and executive editor Bill Keller to the Oval Office in a futile attempt to talk them out of running the story. The Times will not comment on the meeting, but one can only imagine the president's desperation. [...] Bush was desperate to keep the Times from running this important story -- which the paper had already inexplicably held for a year -- because he knew that it would reveal him as a law-breaker.
Tags: , ,

Stupidity Leak!

Ghost Rider teaser trailer. This is going to be bigger than Catwoman, I can feel it.

The only good thing about Ghost Rider is the awesome lyrics to the Rollins Band song on the Crow soundtrack:

Ghost Rider motor cycle hero
Ghost Rider motor cycle hero
Baby, baby, baby, baby, he's a blazin' away
Like the stars, stars, stars in the universe, yeah!
Baby, baby, baby, baby, he's lookin' so cute, yeah!
ridin' around in a blue jump suit, yeah!
Baby, baby, baby, baby, he's screamin' the truth!
America is killin' its youth!
cause he is cryin', dyin', chokin', drownin'
Going to jail, going to jail, going to jail
I see him dyin'! Dyin'!! Ohhhhhhh
He's ridin' through town with his head on fire
He's ridin' through town with his head on fire!!
head on burnin' eyes all tired
head on burnin' eyes all tired
Ghost Rider
Ghost Rider!!
keep ridin'
never stop ridin'
don't forget to burn, don't forget to burn
burn....with fire!! with fire, fire, fire, fire, fire!
with fire!!!

That just about covers it right there.

Scene missing! A video that used to be embedded in this post has disappeared. If you know of a copy of this video that is still accessible, please mail me so that I can update the link.
Tags: , , , ,

MAKE PENIS FAST

Paul McCarthy:

See also: "Within 60 days you will receive over 50,000 inches of PENIS."

Tags: , ,

Kong

King Kong is pretty good. It could have done without most of the first hour (it really drags until they get to the island) but the fight sequences with the dinosaurs are fantastic. Most of the effects are pretty good. Kong himself is consistently convicing. When he's picking up or tossing around tiny humans, they are consistently unconvincing. Also the "stampede" scene wasn't very believable. But overall, pretty impressive effects. All of the human actors are decent, except for Jack Black, who is as intolerable as always. (I haven't liked him in anything but High Fidelity, and I probably would have hated him in that if I'd seen him in anything else first. He only ever plays the same dickhead.)
Tags: , ,