Feeds:
Posts
Comments

Posts Tagged ‘informatica’

Disclaimer: the following guide may overwrite some of the files installed through the standard packages of your distribution, so it may be better if the work is done on a newly installed machine different from your production one, or in a different directory along with kdesupport, kdelibs and kdebase from SVN trunk. You have been warned…

As promised, while I’m currently tweaking a few things out in the dialogs, here there are the compilation instructions for trying my code. No .deb precompiled packages (yet?), a couple of passages were a little more complicated in relation to the time that I can give them, so you need to get a little dirty, but I’m sure that this is not a problem.

As a premise, I assume you are a little confident with compiling sources, and you know what cmake is; given that, here we go!

The following passages work for sure in Ubuntu Jaunty, updated to KDE 4.3 (oh, by the way: you need KDE 4.3 or better (that is: trunk) for all this to work), and I know this because my new shining laptop arrived last wednsday, so I did this to work on my code.

Prerequisites

You need at least kdelibs and kdebase packages (let me repeat: minimum version is 4.3, so if you are on Jaunty, you do need the backports repository and the upgrade operation, please refer to www.kubuntu.org for instructions), plus their development versions: kdelibs5-dev and kdebase-workspace-dev (pay attention: kdebase-dev is from 4.2.2); for any other missing library, cmake will tell you what you need.

Source code

Premise: if you don’t have the latest version of Strigi, you need to get it from SVN, too: for example, in Jaunty is 0.6.4 and in Karmic, at least a couple of days ago, was 0.6.5, but you need at least 0.6.95. So, if you need it, then get it:

svn co svn://anonsvn.kde.org/home/kde/trunk/kdesupport/strigi
cd strigi
mkdir build
cd build
cmake ..
make
(as root) make install

You can install it in /usr/local, but this thing is probably going to stop your strigi filesystem analysis: if you don’t care about it, then go and compile it; otherwise, I think you will need to install trunk in some different directory and work with it.

Then, you need to checkout from SVN Adam’s kioslave:

svn co svn://anonsvn.kde.org/home/kde/branches/work/soc-virtualfolders
cd soc-virtualfolders
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=/usr ..
make
(as root) make install

As you may notice, you need to install that code in the same folder you have KDE, unfortunately it does not seem to work in /usr/local or similar folders (but any suggestion in this sense is accepted): as a consequence, it will overwrite the current kioslave from your packages. Again, if you don’t like it, then compile trunk in a directory different from the one of your standard installation.

After the last command, everything should work.

Now, let’s go with playground:

svn co svn://anonsvn.kde.org/home/kde/trunk/playground/base/nepomuk-kde
cd nepomuk-kde
mkdir build
cd build
cmake ..

Ok, now you have your building makefiles ready; usually I only compile what I really need from this code, also because there is the need to install the annotation plugins, because they are searched at runtime by the dialog system, so here it is the sequence of commands to compile and install them and their dependencies:

cd kcompleter
make
make install
cd ../pimo
make
make install
cd ../nepomukcompletion
make
make install
cd ../scribo
make
make install
cd ../annotationplugins
make
make install
cd ..

Ok, with this you should have installed everything you need (of course, if needed, install commands have to be launched as root); now we can build smartsave and test it:

cd smartsave
make
make install

The installation passage is optional, because it will not install the testing application.

If you want to try the dialog, enter the test directory and launch the texteditor app: it is just the same simple notepad from Techbase tutorials, but with my open and save dialogs instead of the standard KDE ones.

Troubleshooting

Some things can go wrong: the first one is that you see the standard dialogs in the test app, and if this happens, then you probably have shut down Nepomuk, please restart it from the system settings dialog.

The second one is that you don’t get any suggestion in the save suggestion box: if this is true, then you can try by restarting the kde daemon, by invoking kdeinit4 from a console, so that the plugins installed before are registered.

The third one is that you cannot see any file in the open dialog: if this happens, then you have to check that the kioslave has been correctly installed in your KDE main directory (/usr on a standard system, or something else if you work directly on trunk).

What now?

Now that you have a text editor with the dialogs, what can you do? Well, I’m going to prepare a screencast, probably in the following week, to show a couple of features; bear in mind that there are some tweaks on which I’m working on, so this is not a perfect system or a system ready to be shipped in a stable release (far from that 🙂 ), so be patient and test, and feel free to report any kind of trouble you may find along the way.

GSoC status

Well, one week left: the dialog system surely has a base on which to work for both UI and some backend code; there are a couple of things that I’d like to work out before August the 17th; then I may try to add these dialogs to a real KDE application, instead of a simple test program, but we will see what will come up in the next few days…

Read Full Post »

64 bit!

Dell Studio 15 foto 1

Dell Studio 15 foto 1

Dell Studio 15 foto 2

Dell Studio 15 foto 2

Eccolo! Il nuovo portatile è arrivato mercoledì, e lo potete ammirare in tutto lo splendore della cover verde lime…

La seconda foto non rende giustizia alle dimensioni dello schermo, non so se siano i 15,6″ o solo un’impressione, ma pare più allungato rispetto al vecchio notebook; se la viaggia discretamente, anche se la batteria sporge un po’ non ci si fa molto caso, sembra anche più leggero. La tastiera, tra l’altro, è spettacolare (e sicuramente meglio di quella dell’eeebox), silenziosa e larga, mi manca solo un mouse in tinta ormai!

Come OS, ovviamente Vista ci ha lasciati senza manco fare il primo boot di configurazione, ed al suo posto una scintillante Ubuntu Jaunty, con ieri upgrade a Kubuntu (mi serve KDE per il GSoC, as you may know) e litri di software installato; ho anche copiato tutti i dati, e fa un certo effetto leggere 30 GB occupati di home ma solo l’11% dello spazio disponibile!

Come compatibilità hardware, va pressochè tutto: la scheda ATI necessita dei driver proprietari, anche perchè altrimenti scalda un sacco e non va il 3D, ma installati quelli (dalla pratica voce dei menu di Ubuntu) tutto ok; anche la scheda wireless Intel funziona, dopo un momento iniziale in cui non vedeva nessuna rete (difatti ieri cavo 10 metri per attaccarmi al modem), da ieri sera pare essersi ripigliata (naturalmente senza che io facessi alcunchè). Giusto un’opzione da mettere in modprobe per far funzionare anche la scheda audio, e tutto va bene.

Non testati (yet): il mousepad a fondo: per andare va ma finora ho sempre usato quello esterno; la batteria: il primo giorno sono andato a corrente, anche perchè ci sono da fare le 12 ore di carica iniziali, sono in batteria da un po’, almeno un’ora e mezza, forse anche due, e sono più o meno a metà, quindi parrebbe già non male; devo capire un attimo come far calare ulteriormente la luminosità anche coi driver proprietari…

La webcam ed il microfono integrato: li ho visti, ma non li ho ancora toccati, idem per il bluetooth (che dovrebbe essere integrato, AFAIK).

E, naturalmente, si viaggia a 64 bit!

Read Full Post »

KDE 4.3 codename Caizen

KDE 4.3 codename "Caizen"

Read Full Post »

Open dialog v.1

Open dialog v.1

Yes, as you can see, now the open dialog is working!

It took more time than expected, especially because of a couple of different approaches tried along the way (and some signal loops between models), but now a first basic version is there: as you can see, on the right there is a standard KDirModel, which is using Adam‘s code, the other GSoCer of Nepomuk, on kio-slaves, and it shows files; on the left, there is the filter view.

The filter view is still a work in progress, but it is quite similar to the faceted browsing systems you can see in many Web sites: there are properties and their current value, taken from the files shown on the right side, and the user can check them and restrict those files (and consequently the filters themselves become less in number). Of course, their visualization is very very _very_ basic for now, but it will become better, don’t worry about it!

There have been also a couple of changes in the save dialog, especially in how the user can enter personalized informations, I don’t have a screenshot right here but a screencast will come, I promise, as soon as some things will be refined.

Now, about the roadmap: only three weeks of official GSoC are left (17th is the last day “on the job”), so for that date I need to do a couple of important refinements in the base code, and some good work will go in the UI part, filters as one of the priorities; anyway the base dialog system is there, and that’s the first important thing. So, stay tuned!

P.S.: some people asked about how to try the code: in short, you need to compile the virtualfolders branch and the nepomuk playground, but some things need to be installed to be used, so I will publish some detailed guide, at least as I compile and use it; I also thought about creating some debs and putting them on my account on Launchpad, if I can I will do it and tell you about it: they will be Ubuntu debs, because I use that distribution 🙂

Read Full Post »

Sì, si tratta di un rapido update, mentre sono in attesa del meeting settimanale di Nepomuk, dato che in questi giorni scriverò ben poco in questo blog… principalmente causa connessione scarsa e leeeenta.

Finalmente sono in vacanza, dopo essere uscito decentemente dalla sessione d’esami di luglio, presissimo dal progetto di KDE e già pronto a ricominciare a studiare le materie per settembre; mi sono anche lanciato con Erlang, come lavoro di preparazione alla tesi, e ho già in mente un riadattamento del buon vecchio DAEx anche in quel linguaggio. Ma di questo parlerò non appena avrò sperimentato adeguatamente la cosa (e non appena arriva il portatile nuovo, ormai lo aspetto a momenti!).

Spettacolo poi martedì sera a Piazzola sul Brenta (PD), a vedere John Fogerty: due ore piene di concerto, e devo ammettere che il tipo non è malvagio come chitarrista, anche se io ne preferisco altri… un peccato solo che non abbia fatto “I put a spell on you”, sarebbe stata il coronamento! Poi nella band c’era anche un mandolino (elettrico), verrà il momento in cui lo prenderò anch’io!

A presto, e buone vacanze a tutti!

Read Full Post »

Ho pensato per un po’ se far uscire questo post anche su PlanetKDE, però poi ho optato per l’italiano e per la stretta cerchia di lettori “nostrani”, ed è perciò a questo pubblico che rivolgo i miei 2 cents sul dibattito Mono.

Premessa doverosa: non intendo soffermarmi sulla questione etica, che è stata sicuramente mitigata dagli ultimi accordi di licenza by Microsoft, e che comunque non mi trova del tutto d’accordo con RMS (che, ripeto, per me continua ad essere troppo estremista, il mondo non è bianco o nero).

Da un punto di vista di sviluppatore, mi infilo alla grande nel dibattito Banshee vs. Rhythmbox, ripreso anche su Pollycoke, forse uno degli eventi maggiormente scatenanti le polemiche: in pratica, Canonical vuole sostituire al secondo il primo nella prossima edizione di Ubuntu, sostanzialmente droppando lo storico riproduttore di Gnome ed aumentando perciò la propria dipendenza da Mono, questo quando altre distribuzioni invece cercano di liberarsene.

Ora, io non sono mai stato un utilizzatore di nessuno dei due, dato che mi piace Amarok e lo uso a prescindere dal Desktop Environment che ho attivo in quel momento; sottolineo che entrambi i programmi hanno due interfacce estremamente simili, quindi un utente dell’uno non credo possa essere completamente spaesato nell’altro, e sono comunque convinto che chi utilizza Rhythmbox continuerà ad usarlo a prescindere da che programma sarà di default, anche perchè si potrà installare quest’ultimo giusto con i soliti due click. Mi è anche difficile sparare su Mono, dato che uso ormai da 3 anni Tomboy, e non lo cambio neppure ora che sono fisso su KDE, più che altro perchè ho ormai più di 300 note, e voglia zero di dover creare uno script apposito che mi trasferisca tutta la history in un altro framework analogo.

Da un punto di vista di sviluppatore, bè non posso che approvare la scelta: sono ormai un paio di mesi che sviluppo in C++ per il GSoC, ed intendiamoci, questa non è certo una critica (o uno sputare nel piatto dove sto mangiando quest’estate), ma rimango comunque alquanto interdetto dal fatto che siamo costretti ancora ad usare C/C++ per produrre non dico programmi dalla grafica 3D spinta, o dalla gestione di dati sconfinati, ma per produrre un’interfaccia grafica standard e funzionalità direi “normali”.

Per un programma di riproduzione multimediale, obiettivamente, uno sviluppatore non può dover trattare ancora con la gestione della memoria, non nel 2009, per il semplice motivo che è assurdo dover stare attenti a dove eseguire i delete o le free per evitare dangling pointers, o utilizzare compilatori sostanzialmente lenti (Banshee lato C# si compila in 2 minuti, serve quasi quasi di più per i wrapper in C verso le librerie multimediali) e che producono errori non certo sempre comprensibili.

Ammetto, ad esempio, che la mia esperienza con C++ non è così vasta, e che giorno dopo giorno imparo dai miei errori ed evito di combinare guai con le mie librerie, certo è che ho perso tre ore per un’istruzione non funzionante in una classe (quando in un’altra classe sostanzialmente identica non dava problemi), per poi scoprire che mancava un’include, e naturalmente l’errore non faceva certo percepire che il problema potesse vagamente essere questo; oppure la possibilità di passare i parametri per riferimento in due modi diversi, che naturalmente devono essere gestiti in modo diverso, o la quantità di combinazioni della parola chiave “const” che si possono utilizzare…

Quando il mio progettino sarà finito, inoltre, dovrò dare un giro di Valgrind, per verificare di non lasciare memoria occupata per niente, quando in linguaggi come Python, Java, C# questa è una cosa assolutamente inutile, dato che non dipende più da me.

Insomma: i framework Qt e GTK sicuramente aiutano e tolgono parte del peso dalle spalle dei programmatori, ma secondo me dovrebbe esserci sempre più la nascita e lo spostamento di sforzo di sviluppo dai linguaggi usati oggi a quelli che potremmo considerare sostanzialmente moderni, dato che il livello di prestazioni è sostanzialmente identico e la manutezione e lo sviluppo discretamente semplificati.

Read Full Post »

Yes, I know, it’s been a while since my last post, and today, too, I cannot say so much about the code: the open dialog is on its way, and a good milestone in the project is just behind the corner, but it’s exam session here at Politecnico and it’s been hard to find some good time to code in the last two weeks…

Anyway, tomorrow I’ll have another exam, and the last of the summer session is waiting for me on the 20th, and then it will be only SoC! And I promise to achieve that milestone next week, so expect a screencast coming, stay tuned!

Read Full Post »

Maledetto C++

Alla fin fine non chiedo molto: mi basterebbe avere un compilatore che restituisca errori comprensibili dall’uomo…

Read Full Post »

Sempron 3000+

Sempron 3000+

Eccolo qui, il mio Sempron, fedele compagno di viaggio per quasi quattro anni! Quanti sorgenti sono passati per quei piedini, quanti frame da elaborare, quante parole da mostrare, quante canzoni da riprodurre!

Arrivato come rimpiazzo del buon vecchio Athlon XP Mobile, Missing in Action, è stato subito in grado di farsi accettare e prendere il posto d’onore che gli è spettato. Ha sopportato stoicamente uptime da 20 ore, temperature sopra i 90 gradi, viaggi interminabili avanti e indietro per la pianura Padana, ed a suon di operazioni aritmetiche ha sempre portato a casa la pagnotta.

Perciò grazie, mio processore, per tutto il lavoro svolto in questi difficili anni universitari, chissà che un giorno non mi capiti per le mani un socket 754 e ti possa riportare in vita. Nel frattempo, tutto ciò che posso dirti è…

… addio, e grazie per tutti i bit.

Read Full Post »

Disclaimer: as said below, I never used GIT for development, so the characteristics that I attribute to it are based on what I have heard about it from other developers…

I personally have been and still am a supporter of SVN, and of the fact that (as some friends noticed) it’s not so cool having to download, with GIT, the whole project history just for trying some new features in trunk/ (but maybe there is an option to avoid it, I don’t remember exactly…); as of today, I have only used SVN for my projects (GIT and CVS only for downloading some bleeding edge software), and I also have a local repository with that VCS.

But, in the last weekend I started to rethink this fact: developing my GSoC project, I often had the necessity to create a local branch on the fly, sometimes because, in the middle of the development of a new feature, I or someone else found some serious bug, which should be solved asap and its new code uploaded in the remote repository, sometimes because there were more than one way for solving some problems, and it would be nice to try them in parallel, sometimes because you just want to revert only a part of the last modifications, but the revert option erases everything…

I admit that having a good IDE, with a good history of last modifications, may help in this way (and Eclipse, my usual IDE, does help), but it looks like that, in the end, a distributed VCS does make the difference, so I may start to try GIT for real, and then I’ll tell you if it is worth develop with it…

Read Full Post »

« Newer Posts - Older Posts »