Tutti i colori del Photoshoppe
L’altro giorno sono rimasto folgorato dalla notizia di Punto Informatico secondo cui Photoshop CS4 sarà a 64bit, ma solo per Windows. Non tanto per il fatto in sé — non credo che avrò bisogno, nei prossimi dodici eoni, di utilizzare Photoshop con un’immagine da sette miliardi di Gigapixel — ma quanto per il motivo di questa scelta.
Breve riassunto
Il motivo è che quelli della Adobe si sono “improvvisamente” accorti di dover riscrivere da zero tutta la parte di codice che coinvolge le API delle librerie Carbon. In breve, da tempo la Apple ha sostituito le vecchie librerie di programmazione Carbon (scritte in C) con le più sofisticate Cocoa (pensate, invece, in Objective-C). Le API di Carbon sono ovviamente rimaste disponibili, anche se deprecate, senza problemi… fino al WWDC 2007. Da Leopard (OS X 10.5) in poi, il supporto per Carbon nella versione a 64 bit è stato eliminato, così.
Poveri diavoli
Puf, come per magia, a molti sviluppatori è crollato il soffitto sulla testa. Compresi quelli della Adobe. Ovviamente, riscrivere vaste porzioni del codice di Photoshop (si parla di un milione di linee da ristrutturare) non è una cosa da fare durante la pausa caffè… Certo, potevano pensarci prima, ma tant’è. È davvero interessante leggersi il post di John Nack, dev alla Adobe, che ho linkato un attimo fa. Adduce una serie di spiegazioni/scuse (peraltro sensate) da far venire quasi compassione…
As soon as we got the news in June, we began adjusting our product development plans. No one has ever ported an application the size of Photoshop from Carbon to Cocoa (as I mentioned earlier, after 9 years as an Apple product Final Cut Pro remains Carbon-based), so we’re dealing with unknown territory. We began training our engineers to rewrite code in Objective C (instead of C++), and they began prototyping select areas to get a better view of the overall effort.
Poveri scemi*
Ora, la domanda è: vi viene in mente un framework all’incirca simile, nelle funzionalità offerte, sia a Carbon che a Cocoa? Un framework, per di più, scritto magari proprio in C++ (il linguaggio nativo di Photoshop)? Un framework, tanto per esagerare, completamente cross-platform (OSX-Win-Linux-…)? Magari addirittura un ottimo framework?
È il vento che fischia o qualcuno sta scandendo “Qt“? Secondo me, sarebbe la soluzione perfetta, per questo e per altri problemi. Se non altro, per il fatto che quelli della Trolltech in questi mesi stanno affrontando proprio gli stessi problemi di porting:
Qt will be impacted by this last minute change, as we are currently basing our Mac version on Carbon. If Apple’s current decision holds, it will regrettably not be possible to create 64-bit Qt-based GUI applications on Leopard. […] Over time, we will gradually transition Qt to also use Cocoa for 64-bit applications, […].
I really need a 64-bit application with a GUI for Leopard, what can I do?
A: You may be able to use the approach outlined in this article: […], with a 32-bit GUI interacting with a 64-bit process.
Photoshop-on-Linux support
A febbraio, invero, un altro post sullo stesso blog di John Nack aveva destato il mio interesse: Wine offers improved Photoshop-on-Linux support. Si riferiva alla versione 0.9.54 di wine che includeva, tra le altre cose, un supporto soddisfacente a Photoshop CS2. Il post si concludeva con un inutile e, anzi, quasi provocatore disclaimer:
[Pre-emptive, comment-saving non-disclosure: No, I don’t have other info/plans to share concerning Photoshop on Linux, and yes, we know that Linux folks would like a fully native PS on Linux implementation. Just thought I’d spare you some typing. ;-)]
Come si può immaginare, valanga di commenti al limite dell’aggressività, per domandare appunto l’indomandabile… tra cui il mio XD
Google has been doing a really great work on the Wine project till now.
It would be awesome if Adobe would hire (even just one or two) developers in order to join the effort, fixing bugs and providing useful technical informations — as somebody previously said.
Also, I think Adobe should re-consider the Qt4 Framework adoption, a really powerful tool providing advanced *cross-platform* features.
From Trolltech.com:
“Qt simplified our task by providing high-level tools we could customize to meet our needs. The product is excellent, the support was outstanding and we are extremely pleased with our decision to go with Qt.”
(Mike DePaoli, Adobe Photoshop Album)
La risposta di un tizio è stata:
It is not just a matter of converting code (which would be a massive job with the millions of lines of code that I am sure are now in PS). There is also the support aspect of the equation. Adobe probably has hundreds of support people who are trained in either Mac or PC, or both. Adding Linux into the mix would mean hiring additional staffers who know that OS, or training existing staff.
Another consideration is that of testing new versions. A major part of each new release is the debugging of the versions, and you now want to add 50% to that bill be going to a third platform.
As John suggests above, Adobe will start working on a Linux version the day they decide that it will be profitable to do so.
Penso che probabilmente abbia ragione, ma penso anche che una eventuale adozione di Qt da parte di Adobe sarebbe stata perfettamente sensata anche mettendo per un attimo da parte la questione Linux: avrebbero avuto una base di codice comune tra Windows XP, Windows Vista e OS X. Mica poco.
Boh, avranno fatto i loro calcoli. O forse no.
____
* Ovviamente, nel clamoroso caso in cui mi leggesse qualcuno nella posizione di offendersi, è solo un tono colorito e niente più :-P




Adobe Bridge usa già le Qt… :) Ma non riesco a pensare ad un’applicazione più brutta, lenta, inutile e pesante di Bridge che dovrebbe scorrere e catalogare foto… immagina se ci dovessero fare Photoshop o___O
Niente contro le Qt — ovviamente io solo il di loro talebano — ma bisogna anche saperle usare :)
Boh, ma tu dici che la lentezza del Bridge è da attribuire alle Qt?
Tra l’altro, c’è anche da dire che tra le Qt3 e le recenti Qt4 c’è un abisso, in tutti gli aspetti.
Adobe Bridge: brrrr….