New clear Objective-C

I have come here to chew bubblegum and write code ... and I'm all out of bubblegum.

Sunday, February 10, 2008

Peaceful Atom and Cocotron

Every so often I get an email asking where I got the images for cocotron.org, to make a short story long ...

Cocotron.org was registered Sep 29, 2005, the day I came up with the name for the project. I had struggled for a long time with the name, trying to come up with something relevant, catchy, memorable and so on. The obvious thing would have been to create another *Step but it never sat well with me. OpenStep was a failure in the market, abandoned by Sun, superceded by Apple and never gained significant acceptance on the emerging Linux desktop. Making the association would have some name recognition but also come with a lot of baggage. So I waited for inspiration.

My father had collected and saved an inordinate amount of Stuff in his lifetime and I spent an inordinate amount of my lifetime sorting through the Stuff. Sitting there going through some papers with a trash bag I happened upon a small collection of items from the 1961 USSR Industrial Exposition in London. Among them was a booklet distributed by the former Soviet Union called "Peaceful Atom". I'm not sure if my father went or it was something from my grandfathers estate, but either way it spoke to me "Hey, don't throw me away!"



The booklet had all these wonderful propaganda pictures of atomic energy at work, in medicine, power plants and so on. My favorite, while a poorly lit shot, is the "Atomic Store" in Moscow. It was like gold in images, all these carefully done propaganda pictures to show off the Soviet Union's technology at an international forum. You'd spend a small fortune trying to stage images like this today. My father had a lot of old booklets, but most of them were from his lifetime and from the US or the UK which pose copyright issues. On its own as a government produced informational document the case for "Peaceful Atom" being public domain is pretty strong, being produced before the Soviet Union entered into international copyright agreements made it even stronger. So I decided this would be the imagery for the project. (While the originals may be public domain, my derivatives are not, if you want these or similar images, one word: eBay)

Flipping through the book words like "synchrocyclotron" and "synchrotron" jump out at you. Of course! "Cocoatron", but well, to simplify and help avoid the ire of Apple legal let's say "Cocotron".

Labels:

Monday, January 21, 2008

cocotron.org facelift

I recently switched cocotron.org over to a new site I have been chipping away at. There were a few things I knew I needed to do, page generation using a better template system which would help with content organization and fix a big annoyance with the examples.

The original site was done using server side includes with a simple header&footer template. If you've used SSI's you know how extremely limited they are, especially in the older version of Apache my hosting provider is using. I'm sure some people have done amazing stuff with just SSI's, but that is not me. I decided to write a CGI program to generate pages using Foundation on OS X and then get it working on the Linux shared hosting account where cocotron.org lives. One bug fix later in Cocotron it was generating pages on the Linux account. Most of the work was reorganizing the html of the old content, coming up with the new layout and updating some content.

One recurring problem with the examples and building apps in general is that the DLL's and framework resources need to be copied into the same directory as the .EXE in order to run the program. The documentation does describe this, but automating it during the build process would make it all a lot easier. So there is a new program in CDT which fixes this problem called retargetBundle, it does a fast copy, using modification dates, to copy the DLL's and resources as the final build stage. If you have the latest CDT and build an example, it should be ready to run.

Satisfied for now with the page generator I'll be updating the content more regularly and probably work on some new dynamic aspects of the site. This will improve the site and increase the use and testing of Cocotron on Linux.

Labels:

Friday, July 06, 2007

Radial CGShading fun

While there is a bunch of other work going on in Cocotron, some of the results are more visually satisfying than others. One recent addition is radial shading. Here is an updated CGShading example running on Vista, showing off some of the themeing work too.



The CGShadingCreate example runs on Windows and Mac.



Whoops! Well, it works on the Mac most of the time (10.4.10 on a MBP).

(this is a bug in OS X)

Labels:

Wednesday, April 25, 2007

Best personal checks yet



For most of my checkwriting life I have used the plain old bank issued "security" check, it is only recently, under the influence of my wife, have I slowly moved into the world of custom checks. Every year or so I spend far too much time browsing pictures of bunnies, licensed characters, ye olde script and just generally bad art looking for something that remotely feels like a fit.

While recently repeating this ritual my wife pointed out a check printing site that allows you to use your own image on the check and then commented "You could use images from that site of yours", brilliant.

I chose the four rotating images series:

(As a special treat to my faithful readers, the third image is a yet unpublished view of the Cocotron laboratories)






I ordered these at uniquechecks.com. The site expects a 6"x2.75" image, minimum 432x198 (72dpi) and the images should be only a few hundred k or you'll have trouble uploading. I used 288dpi high quality jpg's and am completely happy with the results.

Labels:

Friday, March 23, 2007

Yet another CGShading example ...

but this one runs on Windows too :)

The Cocotron now supports axial gradients via a CGShading & CGFunction API, works on Win2k and above.

CGShadingCreateAxial example

Labels:

Sunday, January 21, 2007

Cocotron article over at NewsForge

I had the opportunity to chat with Nathan Willis of Linux.com about Cocotron, the result is this article:

Newly released Cocotron lets developers code Mac APIs under Windows

Overall I am pleased with the result. One small correction, I said I would recommend Cocotron if you were a Mac developer looking to get on Windows, not GS. I did say GS is the way to go if you are looking to get on Linux.

I can't believe he actually linked to the Cocotron blog :)

Labels: