"Quick Look is a technology introduced in Mac OS X version 10.5 that enables client applications, such as Spotlight and the Finder, to display thumbnail images and full-size previews of documents.", and has an framework for developers.
It's one of the less discussed features of Leopard and yet, for me, one of the most valuable. Specially when used in conjunction with Mail.app. So handy.
Dave Dribbin just coded and made available a .qlgenerator for source code files which is great and it's a very good example of what to expect from Leopard's new core features and programming APIs.
Back in the Tiger days, Quartz Composer had few support for network sources. The RSS feed patch was pretty much the only way we had to read data from the net, but it was way too limited (no streaming, not event based, not extendable, no input or output triggers).
I needed a way to get data from the Network in the form of events that I could reuse in a quartz composition. So our resident mac programmer coded this custom made patch based on sparse non official documentation found on the internet. And it worked great. We have about 5 plasma screens with mac minis over at work running it for months, no problems whatsoever.
Now Leopard comes along and QC had a major upgrade and I'm drooling, but ironically 1. Apple publishes an API to develop custom patches (which is good news) but 2. Our patch for Tiger doesn't work anymore and needs a rewrite.
Then I found 2 patches in the new "Network" category: Network Broadcaster and Network Receiver. They are meant to connect several qtz compositions across the network and exchange messages between them. But maybe I can use them for something else...
I wrote a quartz composition to broadcast messages using UDP and multicast and started debugging and I discovered that the packets are really simple non-crippled text messages, four bytes per character iso-latin encoded chunks. So if you want to broadcast the message "Apple", you'll send this over UDP "\0\0\0A\0\0\0p\0\0\0p\0\0\0l\0\0\0e"
So I wrote a small php script (download) to broadcast messages:
And a sample composition to test the concept. Download here and run it on Quartz Composer. After which just type:
$ ./broadcast.php "message number 1"
$ ./broadcast.php "message number 2"
...
And happily see them scroll up your screen.
This is just a proof of concept. I rewrote all my most complex compositions to use the Network Receiver patch and they all work fine. Using UDP over TCP is also an advantage because you don't have to worry about the producer as the connection is stateless, and using a multicast group is great for broadcast scenarios (ie: multiple compositions on multiple computers consuming the same data).
Now imagine the possibilities and have loads of fun.
O QC é daquelas coisas que o OSX tem (desde o 10.4) mas que nunca aparece nas reviews. É um dos segredos mais bem guardados da Apple, não perguntem porquê.
Para mim é das ferramentas mais inovadoras, poderosas e interessantes que o OS tem. Já fiz inúmeras "compositions" que correm alegremente nos vários Plasmas do SAPO. No Codebits fiz uma para o sistema de votações em tempo real, funcionou que nem ginjas. Divertimento sem limites.
Anyway, o QC do Leopard (que by the way, é distribuido com o XCode, outro mistério) sofreu um major upgrade. A lista de melhorias é babante. A destacar: a possibilidade de escrevermos os nossos próprios patches (agora com documentação porque o mestre Pavão já o fez em 10.4), patches para ler XML a partir da rede (sweet), mais inputs e outputs, melhorias no UI, etc, etc.
Para os que curtem QC, este Blog deve ir para o vosso OPML e este post é uma excelente descrição das novidades do QC em 10.5.
Bom, acho que já recuperei. O Codebits terminou e os dias que se seguiram foram de embriaguez daquela de missão cumprida e de sucesso. Tantos E-Mails, SMSes e telefonemas que recebemos. Muito agradável. Em 12 anos ligado ao projecto SAPO, o Codebits foi para o topo dos marcos históricos das iniciativas que nos orgulhamos muito e que sabemos que mudam o nosso rumo.
Foi acima das minhas próprias expectativas, e quem me conhece sabe que eu sou optimista por natureza. Aproveitei o fim de semana para escrever um post em forma de wrap-up. Agora não há descanso, muitas actividades no pós-evento se vão seguir
A parte má é que perdi a minha Wii. Eu a dizer para terem cuidado com os vossos bens e desapareceu-me o raio da Wii. A ironia... Oh well, deve ainda estar em algum caixote algures.
The MySQL community is on fire, really. There's just so many cool mysql related projects coming out these days.
You'll know Sphinx or MySQL proxy for sure, but today I found a new one called Blogstreaming which "will transform MySQL into a scalable media server capable of streaming pictures, films, MP3 files and other binary and text objects (BLOBs) directly in and out of the database".
Very interesting. Also check Paulo McCullagh's presentation on the project.
I'm a huge fan of Amazon. The way they turned just a successful book selling platform into one of the coolest internet companies and teams in the world, fighting head to head with Google, Yahoo and MS in the innovation and services playground is nothing to disdain. If you're a geek, you'll know Amazon better from AWS, FPS, EC2 and S3 than, hum.. books.
I really think Amazon has a great vision of what the future of computing resources will be, and they're shaping it, silently and cleverly.
The Start-Up Project is an event they're promoting around the US and clearly shows what kind of practical applications AWS can deliver today. And with the cost savings these architectures can have, traditional hosting business for small/mid-size companies should be worried. I would.
By the way, if you live in Portugal and like programming, Mike Culver will be speaking over at SAPO Codebits on the 13rd.
A few days ago Slashdot wrote a piece on Prism's prototype, a new (sort of, webrunner preceded) Mozilla labs project. Now it's available for all platforms for download. I grabbed the Mac version.
I'm very fond of the web as a platform so I find this idea quite interesting and worth exploring. There's no shortage of ideas for future versions too. I'll keep an eye on this one.