Opera 9 (preview)

February 7, 2006

La prima cosa che salta all’occhio è la nuova interfaccia. Più browser e meno “pacchetto integrato”. Di default ci viene mostrato solo il minimo indispensabile come si vede nello screen

Toolbar Opera

Le classiche toolbar sono comunque tutte accessibili attraverso il solito Menu.

La prima cosa che faremo sarà caricare una pagina. Qui rimarremo sorpresi. La velocità è impressionante (sicuramente la velocità percepita). Anche il resto del programma rimane decisamente reattivo.

Alcuni binding sono cambiati (per esempio adesso per aprire un nuovo tab possiamo usare Mela-T/Ctrl-T come su Firefox e Safari, mentre prima, se la memoria non mi inganna, era Mela-Option-N, con eventualmente sostituito Mela da Ctrl se sotto X11 o Windows).

I bookmark sono stati importati in un batter d’occhio. Bene. Per posta e altro non mi esprimo, non sono funzioni che uso, preferendo di gran lunga programmi apposta, come Apple Mail e NetNewswire — newsfeed –).

Il problema più grosso temo sia *esportare* i bookmark. Passare da un altro browser ad Opera è facile, non altrettanto facile il contrario, purtroppo. L’ultima volta lo feci attraverso un servizio web esterno (questo) . Tale sito fra le varie cose offre un convertitore di file di bookmarks da e per moltissimi programmi diversi.

AJAX pare funzionare bene (a parte un problemuccio su WordPress, qui, sulle immagini, ma cose “complesse” come per esempio l’editor di post WYSIWYG in javascript avanzato funziona decisamente bene).

Ribadisco… veloce, interessante. Vediamo Google cosa inventerà, perchè per adesso Opera 9 sembra una versione riveduta e corretta di Opera 8, ma non offre davvero quanto Firefox, ne è integrato come Safari.
Comunque da tenere sott’occhio senza dubbio.


TextMate: the definitive editor?

January 29, 2006

Unfortunately it appears I’ve no time to talk about programming. It takes lot of time to think about something useful, to write examples and such. However, I promise I will doing it soon.

And yet I’m again talking about a text editor. In fact since most of my computer time is spent on an editor, this makes sense. It’s the most crucial application to me (and the one I spend most time to learn using its full power).

I already said I discovered TextMate. The more I study the more I’m amazed. In fact it did substitute Aquamacs even for latex editing. The new bundle is perfectly integrated with Texniscope and “Command-B” opens in TextMate the pdf document compiled from the document I’m editing. That makes environment such that TexShop almost useless to me.

Emacs is more powerful. But most of the times I’m not using that power. It’s my fault, of course. Still TextMate is always open on my Mac, and I started using it even for latex. That’s the main reason. If I have to do a very long latex editing session I still do prefer Aquamacs.

The Python mode is now wonderful. It lets me check my sources with pychecker or with pyflakes. It allows me to run them from inside TextMate, lets me run unit-tests with one command. And even more. Right at the moment it’s the best python programming environment I’ve ever met (a part from WingIDE).

The only thing I’m missing right now is a “prolog mode”. And probably I have to work on TextMate/Xcode integration (it has been done, but I haven’t done it yet). Oh, and I’m looking forward to see TextMate 2, that should have massive improvements on the “project management” side. And probably I’d like some more refined auto-completion with static languages. This could have somehow been added (TextMate can be extended and customized a lot, still in a really simple way), but I’ve not yet discovered if and how.

But the reason I wrote this is another. For years the “Text editors” with capital T have been Emacs and vim. BBEdit was a beautiful Mac editor, but first it is very web-oriented, second it is somehow less powerful in the way it deals with text.

On the windows platform I have not found really impressive text editors. There are a bunch that are powerful and easy to use. But in fact I installed vim (gvim) and I was happy with that. Most such editors were more concerned in “integrating” command line utilities (compilers, latex, interpreters) with the editor not to have the “programmer” opening the “DOS console” than pure text editing.

Newer editor for Linux (Kate for example) also paled in comparison with Emacs or vim. Now I’m wondering:

  1. Was I superficial? It is possible that no one did something that could be compared with vim or Emacs before TextMate? This seems really unlikely.
  2. Why haven’t I spotted such editors? They exist? Let me know. I’m talking about “pure text editors”, not about “IDEs”.

More on Aquamacs (frames and dired)

December 5, 2005

This is a short tip from the wiki (and most of the notes here will come from the wiki)

After some time, I found quite annoying the way Aquamacs manages frames and windows when I use it as a filemanager (which is something Emacs is really good at) — in fact this ain’t a problem, since I rarely use it that way and I can quickly change behavior with a menu toggle –.

If you would like it to behave like “traditional Emacs” you may want to read this tip

Since I was speaking about dired mode, I add it here: another tip. With this you can open files using mac os open command.


Mac Emacs (Aquamac)

November 30, 2005

Unfortunately enough this seems to be going to be a “text editor blog”, with BBEdit post, this post and almost finished post about TextMate.

In fact I already told Mac Emacs versions do seem to miss something, and this is the reason why I chose to buy TextMate (a cheap 39$ affair).

Right now I’m just trying to convince myself that TextMate was worth 39$. I mean, probably if I discovered Aquamacs earlier (the first version I tried long time ago were “new”) I would not have bought it (even if once I was a vi fan — and in fact I still am, for some things).

And not because I don’t like TextMate anymore… just because Aquamacs is free and is free software [ which is good ].

Aquamacs

You can download Aquamacs here.

I told how weird do seem Emacs key bindings on MacOS (in fact they look odd everywhere outside Emacs). Some of them are pretty standard, readline supports them by default (and so most command line applications do) and Cocoa controls also do (that is to say they work in any text editor.).

I’m talking about ctrl-a, ctrl-e, etc.

But you are never going to convince a Mac user he has to ctrl-x ctrl-s to save or ctrl-x ctrl-c to quit.

So Aquamacs uses standard Apple bindings. Command-C, Command-S, Command-Q. This way the command-key is not free. And meta has to be mapped on alt.

So if you have a not english keyboard, you may not be able to type square brackets, for example. And braces. In fact this is a serious design flaw, in my opinion.

In fact I found out the flaw was in the user (me) who did not read the wiki. Meta, Apple/Command, Option keys are fully configurable.

In my opinion if you are going to use Emacs, you expect to find Emacs key bindings. The more logical choice is to use Command for meta, and leave alt as alt, to enter braces (and on american keyboards accents.).

Still you may want (and it is my choice) to allow Command-key to be used for mac key shortcuts, but you want to pass option/alt to the OS (so that you can use [] and other characters). You do this with

(setq mac-pass-option-to-system t)

.

Should you have troubles with copying and pasting text from outside into Emacs or vice-versa, try to use

(setq x-select-enable-clipboard t)

In fact you can find lot of informations in the wiki:
Emacs wiki.

The nice thing was that you are able to use standard MacOS open and close dialogs, that is really nice.

But there is something even more beautiful features:

  • Frames are mapped to windows: when you open a file, you open it in a new window, and you can manage windows with Expose. Probably a hardcore Emacs user is not going to like this (but probably he will prefer some other more standard version).
  • Fonts: fonts are nice. It uses MacOS fonts and locales and unicode characters appear to be handled correctly (not sure for full unicode, for european >7bit characters, it works).
  • You also have transparencies. It’s just a little nifty feature.
  • Cut and paste works as you expected, so does deleting a text selection. This is probably one of the single features users that are not used to Emacs are going to hate, even if it makes perfectly sense in the Emacs way of working.
  • Last but not least, you can associate files with Emacs, so you can use it as a standard MacOS text editor to open files double clicking in the finder.

I’m really impressed by this project: in fact it’s enought Emacs you want get too confused if you are used to Emacs, but it’s also enought Mac you can use it along your other Mac applications, without having to rethink basic commands (if you don’t want to).

Right at the moment it is in my opinion the best Emacs version for the MacOS out there.


Io e Netbeans

November 20, 2005

Per una serie di casi del destino anche il sottoscritto si è ritrovato costretto ad usare Java. D’altra parte era stato ampiamente previsto, e la cosa non mi ha trovato più impreparato di un tot.

Complessivamente mi sono assuefatto all’ambiente. Il linguaggio è abbastanza “stupido”, ma va bene nella maggioranza dei casi. Certo, avendo dei templates decorosi… la mia opinione sui generics di Java non è certo delle migliori.

D’altra parte la piattaforma regge bene. La libreria continua ad essere ben fatta. E complessivamente anche Swing mi piace abbastanza. Non è troppo cervellotica da usare (mai usato Carbon?), e si comporta entro grandi linee bene ovunque (mai provato Tk?).

Proprio riguardo alle GUI si possono apprezzare alcune dei maggiori vantaggi di NetBeans 5. Il nuovo GUI editor, Matisse, è semplicemente favoloso. Sicuramente sta al pari con InterfaceBuilder dei Developer’s Tools di Apple, forse è anche migliore.

Matisse

Qui un piccolo screenshot di Matisse. Fare le GUI è davvero semplice.
Si tratta di disporre i controlli all’interno della finestra. NetBeans automaticamente mostra delle guide, per disporli “bene” in relazione fra loro.
Per esempio NetBeans tenterà di suggerire che tre campi di testo uno sopra l’altro finiranno allineati e così via.

L’utente poi potrà specificare quali controlli vorrà che si ridimensionino con la finestra e quali no, e quali vuole che siano “ancorati” ad un qualche bordo, in modo che si spostino con la finestra stessa.

Anche se la spiegazione non rende l’idea, posso garantire che il tutto ora è davvero molto semplice e comodo, niente a che fare con il famoso GridBagLayout (in pratica i Layout sono caduti in disuso, a quanto pare)

Tutte le proprietà dei controlli, codice da inserire prima o dopo per inizializzarli e la scelta del costruttore possono essere fatti direttamente da Matisse.

Refactoring

Finalmente anche NetBeans ha aggiunto le funzioni di refactoring che eravamo soliti trovare su Eclipse. Non c’è molto da aggiungere, fanno il loro dovere, punto e basta.

Altro…

Altro non ho ancora avuto il modo di provarlo. In effetti Java continua a non essere il mio ambiente naturale, per quanto mi stia sforzando di affrontarlo con mente aperta. Sono in grado di vederne i pregi, ma mi balzano anche all’occhio i difetti.

Allo stesso modo devo dire di NetBeans che è davvero un bel progetto, un IDE ben fatto di cui più lo si usa, più si scoprono utili funzioni e interessanti scorciatoie.

Purtroppo è terribilmente mastodontico. Sembra di manovrare un camion, è lento e spesso si ferma a pensare davvero troppo. A causa dei limiti di Java diventa sostanzialmente impensabile scrivere il codice semplicemente con un editor di testi, ma la tentazione è forte. TextMate è maneggevole, snello, veloce. Risponde ai miei comandi.

NetBeans ha i suoi tempi. La cosa che continua a torturarmi è… ma abbiamo davvero bisogno di una piattaforma che ha bisogno di centinaia di megabyte di IDE per sopperire alle sue mancanze? A quanto pare si, ma c’è qualcosa che mi suggerisce all’orecchio che mi hanno fregato (con questo Matisse è comunque fantastico, e mi piacerebbe averlo a disposizione anche per le mie GUI Python, Swing è una libreria abbastanza buona — specie adesso che usa il freeform layoyt ).

Attenzione!

Se usate NetBeans 5 sotto MacOS, ricordatevi di copiare il jar org-jdesktop-layout.jar dentro il classpath standard della vostra versione di Java, altrimenti non riuscirete a combinare nulla.


Google Paying for Firefox Installs

November 5, 2005

Google Paying for Firefox Installs: “slashkitty writes ‘Google updated their AdSense service to pay publishers for referrals. What’s interesting is that now they pay publishers $1 US for each FireFox download with the Google Toolbar installed. Is this the bump that Firefox needs to boost downloads? Will Google be able to pay the millions for all the downloads?’

(Via Slashdot.)

Google ha modificato adsense in modo che gli inserzionisti prendono 1 dollarozzo per ogni download di firefox con la google-bar.

Apparentemente sembra che sempre più i colossi si stiano coalizzando tutti contro i vari monopoli che Microsoft ha accumulato lungo gli anni per sostanziale mancanza di competitori seri (ovvero sufficientemente completi).

Fino a poco tempo fa le grandi ditte dell’informatica erano vicino a Microsoft oppure se in contrasto, separate fra loro da motivi ideologici o di mercato. Adesso sempre più sembra che si stia costituendo un fronte comune.