Showing posts with label free software. Show all posts
Showing posts with label free software. Show all posts

Thursday, 17 October 2013

Mac OS X, Python, PySide and Matplotlib

In these days I'm working on Python application for manage some metereological datas. It uses PySide for the GUI and Matplotlib to plot some useful charts. Unluckily, I had some troubles to add this last library. After some work, I found a solution. This post is a brief guide to my little oddity on using PySide and Matplotlib on a Mac OS X environment.

Wednesday, 6 March 2013

Miguel de Icaza moves to Mac

This is a fresh news: Miguel de Icaza, founder of Gnome and Mono projects, declares in this post he moved from GNU/Linux to Mac OS X.

Wednesday, 27 February 2013

New Aqueduct Release


Aqueduct development continues and now it supports HTML throught a new AqueductDriver. So you can export your Fountain files as HTML+CSS files.
Try it and report bugs.
You can obtain Aqueduct at


http://www.github.com/jacopoprendin/aqueduct


Monday, 18 February 2013

Aqueduct on GitHub

If you're a writer and you like to write screenplays for theatre or movies (as me), maybe you know Fountain, a markup language realized to give you a simple, easy and elegant way to manage your scripts.

Wednesday, 23 November 2011

Build your C/C++ programs everywhere with SCons



Maximum Power!

In these days I'm trying to realize a small and portable game engine using SDL+OpenGL, fascinated by their power. I begun writing some C files and a simple Makefile.
Portability is a fundamental requisite, so I decided to move to a portable building system. I thought CMake could be a good choice, mainly because it's used by several open-source project: KDE, Inkscape, OGRE, MySQL use CMake. So, I decided to write my platform-indipendent CMakefile. It was one of most boring and error-prone task I've ever saw. After some days, I still can't have a functionally CMake file: I've got less problems writing then a python script for compiling it. Frustrating.

Tuesday, 19 April 2011

VIM vs EMACS - again


«Two snakes facing each other!»


Looking to my blog statistics, I realized visitors come here mostly because they're looking to "vim vs emacs". It's comprensible: this is one of most (in)famouse computer "wars".
In last months I used a lot VIM, because I had some problems with Aquamacs Emacs. So, I decided to write another post to these two max-weight editors, maybe helping you to choose.

EMACS

I became an Emacs fan since 1999, when I first heard about "a free, open source, configurable, programmable editor". I gave Emacs many tries, just because it was Emacs. But, let's admit it, it hasn't a quiete learning curve. Emacs has more options and controls than an SR-71 and has it's own default settings. This is the "beauty" of Emacs: to discover that a simple function (one-tab if I type tab key, e.g.) needs to be configurated.

VIM

Usually, everybody tries VIM after some frustration with Emacs and find a bit confortable with it. Editing file in a modal program is a bit weird, but become quite fast. You can have problems with some "complex" tasks, such as search-and-replace. To do this in VIM you have to type

:s^$/text to find/text to replace/gc

where, last 'c' stands for "confirm".

Conclusion

When I have to write an iPhone App, I must use XCode. When I'm working on a win32 platform, Notepad++ is the choice. To develop a Java application, I prefer Netbeans (and some friends of mine use it also for PHP development). I admit Emacs or VIM are fundamental to a programmer, but to use them for huge programs could be a delirium. So, as general line-guide I say:

  1. VIM or Emacs are good to write small/medium scripts
  2. For large applications, I'll use a SDK (Netbeans? Eclipse? XCode?)
  3. Emacs with cua-mode is easier than VIM, but you could have troubles with other tasks
  4. Do not be ashamed to use a simpler editor as gEdit, Kate, Bluefish or JEdit. Use what you prefear. A text-editor is just a tool. Real Programmers write programs

And happy programming! :)

Tuesday, 21 December 2010

Once upon a time, there was KDE

KDE: your UNIX easy

My first Desktop Environment on GNU/Linux was KDE 2, at university laboratory. At that time I didn't have a computer powerfull enough to double-boot Windows 95 and a distro, but I read a lot, fascinated by FOSS philosphy.
I was KDE fanboy: I am still convinced that big projects as a desktop environments must be programmed with an object-oriented language. KDE uses C++, while Gnome works in C. This difference was visible in first years of 2000: KDE was fast, fascinating and colorful, while Gnome and its applications were gray and old-looking.
When KDE3 was released I run it on my new Pentium IV 1200 with 512MB, looking admired that environments, far advanced from Windows XP. Many friends of mine were surprised by KDE3, its themes and its applications (Kopete, Konquerror, Kircand KOffice), making it very near to Mac OS X.
On 2002, the Liquid theme (made by Mosfet), was a wonder.

KDE 4 Revolution

Since Matthias Ettrich foundation, KDE was a well engeneered project. Ettrich did many analysis to optimize user experience, expecially about memory use.
KDE 4 was a "revolutionary" project: its developers wanted to change the usual "desktop paradigm", introducing a engine which runs many "plugin" (called "plasmoids"). You can still have a "desktop" with your folders: it's a "plasmoid" which will show you your $HOME/Desktop folder big as your monitor.
KDE4's underlaying platform is a programming masterpiece: there are base libraries well organized (Phonon, Solid, KIO, Plasma, KParts and others) and well integrated all togheter, but... take a look to these two screenshots





KDE 4 Enlightenment 17

Well... there's something not very clear to me: Enlightenment 17 is a "yet not finished" project, but you can test it. It's written in C and it's very fast and light. So light to move some producers of embedded devices to run E17 on their products.
KDE4 is big, heavy and does E17 same things.
Looking to Gnome, I see a lighter DE, fast and nice looking. Its technology is not refined as in KDE, but Gnome does its job very well. It's usable and I can be productive with it. One year ago I tryed both KDE4 and Gnome: after some "Wow! Amazing!" I used Gnome because I can "do things", while KDE4 seemed to me a "useless videogame".

The Future

Gnome is the most widespread DE thanks to its usability. Its Human Interface Guidelines were the secret of its success. KDE, instead, worked too much on its underlying technology, making it «the Java of Desktop Environments»: well designed, well documented, well thinked, not very usable.
KDE has to rethink its structure, moving the user-experience as center of its universe, continuing to host great applications and (maybe) trying to take a diet.

Wednesday, 24 November 2010

Meanwhile, in Microsoft Russia...

In USSR, Windows installs you

Nikolai Pryanishnikov, Microsoft Locale Director in Russia, says that

«We must bear in mind that Linux is not a Russian OS and, moreover, is at the end of its life cycle»

I am a bit disappointed by this statement: I always belived that Microsoft managers were smart enough to avoid some hazardous declarations. Says that «Linux is dieing» is a manifestation of ignorance.
Actually, GNU/Linux is a player to face in important environments such as

  • Embeded devices
  • Servers
  • Mobile phones with Android

I suppose mr. Pryanishnikov was talking about the desktop market, but he must understand that HIS statement is offensive for HIS company.
As president of Microsoft in Russia, Nikolai Pryanishnikov hasn't capacity to say everything he wants: he have to think well what he can he says and what he can't. A misunderstanding in business world can move billions of dollars. A good CEO will take the situation in his hands, to correct this clumsy sentence.
Mr. Pryanishnikov misses to report citations and, more important, to say something about the Google OS. It's right that it's not yet released and that its base (Google Chrome) is just at 8% of broswer market shares (source: Wikipedia). But wait: Android is at 25%, while Windows Phone is at 3% (source: Wikipedia) and mobile market is becoming more important than ever. If Mr. Pryanishnikov was a smart president, then he would know that HIS Chief Software Architect (Ray Ozzie) sent a memo less than a month ago where he talked about the new marked trends (mobile, cloud computing, ecc.). Ignore what says your Chief Software Architect is clearly self-defeating.
If GNU/Linux's zealots are annoying, then Microsoft's supporters aren't better. But a fanboy's rant is forgettable; a manager's rant in public is not.
Mr. Pryanishnikov must think very well where, when and what he says, giving some attention to the same market shares I found googling some minutes. If I can do, then he can too.

Friday, 12 November 2010

Welcome back, Firefox!

Yeah, we missed you, Firefox ;) Welcome back!
I was a great Firefox supporter. I work also in a public administration and I suggest always to install it: Zimbra works well under Firefox (we still use Windows 2000), but in last year I become less enthusiast. When Chrome and Safari entered the browser market, Firefox appeared disoriented. It introduced some new features (Persona, Jetpack), but nothing really interesting for the end-user; I never used extensions (never found one really usefull, maybe I'll search better) and Chrome and Safari beated Firefox in brute speed. But now I'm using Firefox 4 (Beta 7) and I find it really fast.
What's new on Firefox 4?
First: a the javascript engine uses a JIT compiler (JägerMonkey), just like Chrome.
Second: graphics it's rendered using DirectX (on Windows) of OpenGL (on Mac OS X and GNU/Linux)
This second feature means also Firefox can use the new WebGL standard.
Groovy!
I suggest you to give it a try if you passed to Safari/Chrome and you feel the lack of some extensions. You will have a surprise.
And a final joke: What  did Firefox so far? The playmate? Errr...!

Thursday, 4 November 2010

Unity and so be it


Is this a flame? Maybe. But I support Canonical's decision to use Unity instead Gnome Shell. Why? Because this "fork" is fundamental, not just for usability reasons, but mainly because it's a strong stance from the most widespread GNU/Linux distribution. Adopting Unity, Canonical did some decisions, oriented both to usability and development. Choosing Unity, Canonical show us its direction: the underlying technology is useless if user experience is poor. KDE 4 is on this way: great technology (C++, QT, Plasma, Phonon, ecc.) but the resulting desktop is not "sexy" as Gnome on Ubuntu.
Technology can't be the objective. Christopher Tozzi said


I put emphasis on some statements, expecially about "to borrow ideas": this is the base of Free Software, which is not (as many thinks) a "Hippy-Programmers Way of Life". Free Software is much more near to "Ideal Market" and "Concurrency" than other realities (such as Apple and Microsoft). Same ideas are implemented by different teams in different ways (e.g. EMACS vs VIM; Eclipse vs Netbeans; Gnome vs KDE; Firefox vs Konqueror and so on). This environment allows to many competitors to survive. But Canonical must monetize its work. And to do this it needs to follows user's desires. If Gnome shell isn't actractive enough, then welcome Unity.

Tuesday, 2 November 2010

Oracle's short vision

Mr. Magoo, you are more fun

News of the day (october 29 2010). From Computer World I read «Oracle: Google 'directly copied' our Java code». In this article is exposed how and where Google did copy Java's code. From the article we read

«The infringed elements of Oracle America’s copyrighted work include Java method and class names, definitions, organization, and parameters; the structure, organization and content of Java class libraries; and the content and organization of Java’s documentation»

I organize this declaration in the following list
  1. Java's methods names;
  2. Java's class names, definitions, organization;
  3. Java methods' parameters;
  4. the structure, organization and content of Java class libraries;
  5. Content and organization of Java’s documentation;
Pay attention, this statements aren't so unfamiliar. Do you know where I (and probably you) did hear them before? When SCO accused Linux of copyright infringement. SCO was more prepared, saying mr. Torvalds copied directly UNIX code into his kernel (Linux). In the final chapter of this ridiculous theatre, SCO showed this famous pieces of code: few macro definitions of the errno.h header file. These macros look similar to this:

#define PI 3.14159265

The SCO-Linux controversies was more complex and still continue. Anyway, SCO showed some code and, on a computer-science lawsuit, gave some material to think about.
Let's return to Oracle's assertions. How much are they real? As a programmer with some knowledge in law and licensing, they seem ridicolous.

  1. You can't set a copyright for a "Function Name". Neither for a class name or a declaration. They're not "trademarks". The only trademark could be the "java" prefix in some cases (such as java.*), but I have doubts, because there are placed to grant the Java Standard Definition;
  2. Look point 1;
  3. Look point 1;
  4. As I say on point 1, I can understand Oracle dislikes the word "java" in a whole classpath, but this is placed to follow the Java Standard Definitions;
  5. This is more difficult: as you can read here, Oracle's documentation distribution isn't released under the GNU Free Documentation License.
If you think well, there's something else to say: Android is based on 3 things: a Virtual Machine (Dalvik), a language (Java) and a classpath (Harmony). Google never said Android runs Java and they're right, because Dalvik is very different to Hotspot; Harmony is a java classpath reimplementation released under the Apache License.
By the way, "Java" was released under GPL by Sun Microsystems just before it was purchased by Oracle and just some pieces are still under a non-free license. So, Oracle's charges to Google seems inconsistent to me. If the problem is documentation, then Google can pay a team to rewrite it.

I think the main reason to start this lawsuit campaign is the lesser importance of the Java Micro Edition platform. How Oracle (a server provider) could be afraid on losing the mobile market? The answer is Oracle feels threatened by the decreasing importance of selling licenses to use the Java Micro Edition. Sun Microsystems earned selling to smartphone producers (Nokia, Erikson, Motorola, ecc.) the autorization to include a JME on their products. I think this was the only profittable Java client platform. Now that JME is going out  of market (killed by iOS and Android), maybe Oracle is playing dirt to give new life to this project.

Tuesday, 26 October 2010

HipHop: emotions no-stop

Mhh... there's something strange....

Some months ago, Facebook annunced its new "HipHop" technology, used to speedup its servers. HipHop is a translator: when a page is requested for first time, HipHop transforms PHP source code in to a C++ source and then compiles it into native code with g++.The executable then is launched:its output is passed to the webserver.
Haiping Zhao, senior engeneer and HipHop chief, said HipHop speeds up to fifty percent Facebook servers. No bad, really. So, will we start to develop with HipHop in mind? I don't think so.

HipHop born with a specific target: to increase performances of one of most visited sites on earth. But, after thinking about it for some weeks I realized that better solutions could exist. Assuming as fundamental requisite that is impossible to rewrite ALL Facebook in another language and that most of programmers involved knows only PHP we can:

   1. write a PHP-to-Bytecode interpreter. JVM on server side is great: it's scalable and it has a JIT.
   2. create a front-end to LLVM. LLVM is a Virtual Machine AND a compiler. Apple is founding LLVM project, probably to use it as default compiler for its systems. LLVM supports multithreading.

HipHop technology seems to me as a return to the CGI. After ten years of mod_php (created to avoid CGI), Zope and other ways to reduce the use of CGI, we return to the root of web programming.

In my humble opinion, HipHop looks like more as a "patch" than an "entire solution". Facebook's engineers know well their work and they developed Cassandra DB from ground to up. A great work, well designed and well implemented (Java for scalability and fault-tollerance; replication; choice of a non-relational schema, ecc.). It sounds strange that Cassandra and HipHop came from the same home, because they seem too different. I think Apache Foundation is more coherent: Apache developers work on server-side with Java, with some exceptions in client and C/C  (such as Xerces and log4cxx).

I have no doubts that Facebook's administrators know well what's better for their business and I have no doubts they studied with attention to choose the best solution for their problem. But their solution seems very strange to me, and I would like to understand why they choose to create HipHop.

Friday, 22 October 2010

Aggiungi un posto a Valaram?

Ulmo, Vala delle Acque (disegno di John Howe)
Per chi segue il mondo dell'open-source o anche solo quello della programmazione, ricorderà sicuramente il putiferio nato quando alcune distribuzioni iniziarono ad installare di default il framework Mono. La scelta fu ferocemente contestata: il fatto che Mono sia ispirato al .NET di Microsoft  e che, secondo alcuni, ci fossero dei "problemi di licenza", spinse diversi utenti ad alcune iniziative un po' esagerate, tra cui la reimplementare in Java o C++ dei programmi «colpevoli» di essere stati scritti utilizzando Mono (come F-Spot e Beagle)
I più moderati, però, sapevano bene come mai era stato scelto Mono per la scrittura di alcune applicazioni e i motivi erano gli stessi per cui Microsoft realizzò il framework .NET: ossia la possibilità di includere interi pezzi di altri programmi con una facilità estrema: potete includere Firefox come browser nella vostra applicazione usando un import e un Firefox f=new Firefox(). Niente male, eh? E questo può funzionare anche per altri programmi, come Evolution, Pidgin, Nautilus, fogli di calcolo, database ecc. Il motivo per cui si iniziò a lavorare con Mono è questo ed è lo stesso che prima ha spinto gli ingegneri di Microsoft a progettare .NET.
La scelta può essere discutibile, ok. Ma continuare lo sviluppo di Gnome non è facile e non si risolve con prese di posizione "a priori" o coding selvaggio in C++.
Un team separato di programmatori, però, ha iniziato a lavorare in maniera parallela al problema e ideò un altro linguaggio di programmazione,pulito come Java, veloce come C++ e integrato con il sistema a oggetti GObject di Gnome. Il risultato si chiama Vala, ossia "Potenza" e termine generico con cui vengono indicati gli dei presenti ne «Il Silmarillion» di Tolkien.

Io per primo ero dubbioso sulle capacità di questo linguaggio, specialmente per la sua toolchain che, son sicuro, vi farà inarcare il sopracciglio: il programma scritto in Vala viene letto dal compilatore: questo, anziché trasformarlo in codice macchina, lo trasforma in codice C che viene poi compilato dal buon vecchio gcc. Non è poi così strano: i primi compilatori C++ funzionavano esattamente così.
La scelta di creare un nuovo linguaggio non è da prendere a cuor leggero, specialmente in un'era dove se ne possono contare almeno otto di veramente utilizzati e all'epoca liquidai Vala come «l'idea scema di quattro geek»
Invece, contrariamente alle mie previsioni, scopro che Shotwell, il nuovo gestore di foto di Ubuntu, è stato scritto in Vala. E non solo: altri progetti interessanti del gruppo Yorba sono scritti in questo nuovo linguaggio. Pare, insomma, che «l'idea scema» tanto scema non fosse.

Che Vala possa occupare il posto di Mono in Gnome? Potrebbe essere interessante. Che possa cambiare qualcosa nel panorama della programmazione in generale? Improbabile, visto che è pesantemente basato su GLib e GTK; inoltre non sarebbe portabile a livello binario, poiché essendo compilato in codice macchina con gcc.
Sul suo futuro non so davvero cosa dire se non un "staremo a vedere". Però, sicuramente, prima o poi Vala dovrà fare i conti con un linguaggio che concettualmente gli somiglia e che è finanziato dal "solito noto". il linguaggio è Go; il finanziatore Google.

Friday, 15 October 2010

Iniziare con la mia testa

Scrivo il primo post di "The J Head" dedicandomi all'argomento "informatica". Cosa c'è di così nuovo da segnalare da suscitare la nascita di un blog? C'è l'articolo pubblicato su ossblog.it in cui si segnala lo stato di avanzamento del progetto Haiku, un sistema operativo "Free Software" pensato per il desktop. Haiku raccoglie la tradizione del vecchio BeOS ed è compatibile col parco software dell'illustre predecessore. Haiku non ha un kernel né Linux né tantomeno UNIX e questo rappresenta un'anomalia nel mondo dell'open-source. In questo periodo, però, dove tutto il mondo corre dietro a Android, Ubuntu e Mac Os X, temo che il povero Haiku avrà vita dura. Dateci comunque un'occhio: potrebbe non dispiacervi.