Feeds:
Posts
Comments

A brief note, just because lots of things changed during this weekend (this long weekend, two days of holidays here in Italy): I have dropped the metadata model that I started last week, because the annotation plugin already had one, and a couple of hours ago I also dropped the SuggestionProvider plugin system.

Recent annotations will be implemented through an AnnotationPlugin subclass, and related annotations will be provided with an utility class, probably later on.

Still working on save dialog UI, though, and I’m trying to add views in a KFileDialog subclass: task which seems not so easy (any advice?), some functioning code will shortly come, I promise!

Edit: I’m sorry if the previous wallpaper contained in my second activity was somewhat offensive for any reader of this blog; I’ve changed it to a more appropriate “hacking” wallpaper.

Last week I decided to start using activities in a productive way: until then, I have just used them last year, for having the desktop configured for office work (read: with a quiet wallpaper), but I dismissed them when my office time ended.

Activities have been criticized here and there, with that useless button circle in the corner of your desktop; there even existed (and maybe still exists) a plasmoid which removes that circle.

I am between those people who think it is a useful thing (like lots of plasma features), and now I want to get accustomed with using it, and here there are my two current activities:

Default activity

Default activity

This one is configured for standard PC usage: my desktop and temp folder, email, weather, ktorrents…

Programming activity

Programming activity

This is the programming activity: my two current projects’ folders (GSoC and Master Thesis), plus CPU load and Kate sessions…

So: I think activities are useful, and I’m starting to productively use them, and for those of you who don’t (yet): try them!

5×1000 vs 8×1000

The first official SoC week is gone! A bit of a hard work, but good results obtained…

With the last smartsave commit, all the stubs are done and real code is coming out: all the base classes are being populated, and in a few days some UI may come up.

I’m especially working in the save part of the system, still from the backend point of view, with models and signals that come and go through the classes (test 2 already shows something of this), updating views when new annotations come up. A hard link to the annotation framework (in playground) is coming out, and probably one of the two exposed classes will be collapsed to that framework, when my experiments and my messing up the API will stabilize a little.

The most difficult part, I must admit, has been to adapt to Qt frameworks (signal-slot, model-view, d-pointers), which are pretty different from my last C++ works or from the Java approach, so a big thank goes to Sebastian Trueg for his advices on them.

Besides, I hope not to flame in any way, but I really have some difficulties in understanding why the d-pointer idea… for example, I see the model-view as some kind of a derivative of MVC, and signal-slot as an alternative to a callback system; I see why calling getter methods with the variable name (C# does something similar), but why can’t I put my private members directly in the class? I read about the binary compatibility, but those are still private members, so the outside world cannot see them. So why complicate the classes structure with all those private classes with public members?

So, C++/Qt masters, I’d really like to read your opinion on that, not for flaming (I repeat), just for deeply understanding this way of programming 🙂

And, stay tuned for UI updates in the next few days!

Playin' hard, part II

Mi sono accorto che è da parecchio che non parlo più di università: le ultime riflessioni sono sempre state su di me o sul progetto per Google o musica, comunque è ora di rispolverare un po’ le conoscenze sull’argomento.

Questa settimana sono finalmente uscite le date degli esami estivi, e così il piano di battaglia si sta delineando: ci sono tra i 20 ed i 25 crediti che mi aspettano a cavallo tra giugno e luglio, ed altri 10/15 a settembre; il tutto in parallelo con il Summer of Code (pagato, quindi va necessariamente portato avanti in parallelo). Robotica 2, DB2, filosofia, meccanica…

Se tutto va bene, un discreto passo avanti verso la laurea mi aspetta nella prossima mesata e mezza, solita estate di studio ma se non ci sono sorprese darà i risultati sperati 🙂

Playin' hard, part I

Signore e signori, e musica fu!

Con il fondamentale apporto di Sante, oggi ho finalmente sperimentato a fondo le potenzialità multimediali di Linux; la scheda audio esterna USB della Terratec, gentilmente sponsorizzata dall’uomo di cui sopra, ha un ingresso mono funzionante sotto il nostro sistema operativo preferito, così ho potuto registrare in lungo ed in largo nel pomeriggio.

Ardour 2

Ardour 2

Qui sopra potete vedere Ardour 2 con tutte le tracce di “I am the highway” degli Audioslave, versione almost unplugged (ho solo l’acustica qui a Milano); naturalmente, basso e batteria non sono miei ma vengono dal MIDI della base.

In primo piano ci sono le opzioni del plugin LADSPA per applicare il delay all’assolo del brano: anche se non è semplice come in Audacity applicare gli effetti, se la cava comunque bene (sono riuscito a fare anche l’effetto reverse, volume swallow o chiamatelo come vi pare, dell’intro).

Unico difetto, volendo, dell’esperimento è stata la necessità di eseguire sia qjackctl che ardour da root, e se il kernel real time mi funzionasse decentemente (that is, non mi mandasse il pc in freeze al boot), magari la latenza sarebbe stata inferiore ai (credo) ~6 ms misurati.

Audacity

Audacity

Audacity, alla fine, mostra il file wave finale dell’opera d’arte…

La versione conclusa non è male, anche se penso che sarebbe meglio mettere un amplificatore tra la chitarra e l’ingresso (o comunque una scheda dedicata per poterci agganciare direttamente lo strumento), per diminuire alcuni fruscii di fondo. Comunque direi esperimento perfettamente riuscito e assolutamente replicabile!

Edit: oggi ho provato Rakarrack: spettacolo! Ecco un primo esperimento: Delayed improvisation

Father, yes, I am a prisoner
Fear not to relay my crime
The crime is loving the forsaken
Only silence is shame

And now I’ll tell you what’s against us
An art that’s lived for centuries
Go through the years and you will find
What’s blackened all of history

Against us is the law
With its immensity of strength and power
Against us is the law!
Police know how to make a man
A guilty or an innocent
Against us is the power of police!
The shameless lies that men have told
Will ever more be paid in gold
Against us is the power of the gold!
Against us is racial hatred
And the simple fact that we are poor

My father dear, I am a prisoner
Don’t be ashamed to tell my crime
The crime of love and brotherhood
And only silence is shame

With me I have my love, my innocence,
The workers, and the poor
For all of this I’m safe and strong
And hope is mine
Rebellion, revolution don’t need dollars
They need this instead
Imagination, suffering, light and love
And care for every human being
You never steal, you never kill
You are a part of hope and life
The revolution goes from man to man
And heart to heart
And I sense when I look at the stars
That we are children of life
Death is small

This week has seen my first (and second, by the way) commit into KDE SVN! Another milestone reached 🙂

There are mostly stubs into the new smartsave/ folder, and a bit of documentation for the interfaces; there also is a test program, taken from one of Techbase tutorials: a very simple notepad, which will be the very first application to use the new dialog system, and it will be useful for trying functionalities.

No, don’t try it now: it just falls back to the standard KFileDialog class; let me write some real implementations before toying with it!

For now, the idea is to have an abstract class, Nepomuk::SuggestionProvider, which may be subclassed by any application (there’s, for now, just a method to be implemented), and an instance of it will be passed to the dialog UI for getting personalized suggestions, in form of Nepomuk::Annotation objects. These objects need to be created by the developer in the way he wants, by hand or using any Nepomuk::AnnotationPlugin, but things may change later on.

The second important class is Nepomuk::KSmartDialog (I called it ‘K’ just to mimic KFileDialog, but if you don’t like it, I can drop that ‘K’), which is a subclass of the actual file dialog, and which will provide a couple of static methods for getting or setting document metadata; of course, each of these methods will use the SuggestionProvider subclass as stated before.

These are the two important exported classes, at least today; expect some working code in the next days!

Oh, by the way: tomorrow is the official GSoC start! Godspeed to any GSoCer around PlanetKDE!

System UML 2

System UML 2

I promise: this will be the last image!

The next post will discuss a bit about real code (which is coming, I just have to check the very first compilation cycle before throwing a new folder into playground); for now, here is an update of the previous UML diagram: it’s a little bit more into the “real virtual world” of KDE libraries, even if something could be changed any time.

I’m studying the model-view framework from Qt, and a few classes are now related to the abstractions offered by that system; as soon as the structure will be clear, I will write about it.

Next week, waiting for the GSoC official start (on saturday the 23rd), the first classes will come up and I will talk about something a little less into the air and a little more into the bits.