Feeds:
Posts
Comments

Posts Tagged ‘informatica’

E’ uscita da qualche settimana (un paio se non ho visto male) la seconda release candidate di Arduino 1.0 (scaricabile da qui), ma per poter utilizzare il layer di rete su Ubuntu 11.10 è necessario patchare il file w5100.h, che si trova sotto /libraries/Ethernet/utility; alla riga 271 va modificata la seguente define:

static uint16_t read##name(SOCKET _s) { \
uint16_t res = readSn(_s, address); \
res = (res << 8) + readSn(_s, address + 1); \
return res; \
}

in questo modo:

static uint16_t read##name(SOCKET _s) { \
uint16_t res = readSn(_s, address); \
uint16_t res2 = readSn(_s, address+1); \
res = (res << 8); \
res2 = res2 & 0xFF; \
res = res | res2; \
return res; \
}

GCC-AVR in Oneiric, infatti, per qualche motivo (che non sto ad indagare) non digerisce l’altra definizione, e rende inutilizzabili i socket aperti (esperimenti con Wireshark infatti mostrano pacchetti malformati). Questa modifica peraltro vale anche per le versioni precedenti di Arduino, eccetto quelle pacchettizzate, che già includono la patch (ma chi usa Arduino pacchettizzato…).

Read Full Post »

Riusciremmo un giorno a realizzare la vision di TBL?

The entertainment system was belting out the Beatles’ “We Can Work It Out” when the phone rang. When Pete answered, his phone turned the sound down by sending a message to all the other local devices that had a volume control. His sister, Lucy, was on the line from the doctor’s office: “Mom needs to see a specialist and then has to have a series of physical therapy sessions. Biweekly or something. I’m going to have my agent set up the appointments.” Pete immediately agreed to share the chauffeuring. At the doctor’s office, Lucy instructed her Semantic Web agent through her handheld Web browser. The agent promptly retrieved information about Mom’s prescribed treatment from the doctor’s agent, looked up several lists of providers, and checked for the ones in-plan for Mom’s insurance  within a 20-mile radius of her home and with a rating of excellent or very good on trusted rating services. It then began trying to find a match between available appointment times (supplied by the agents of individual providers through their Web sites) and Pete’s and Lucy’s busy schedules. (The emphasized keywords indicate terms whose semantics, or meaning, were defined for the agent through the
Semantic Web.)

In a few minutes the agent presented them with a plan. Pete didn’t like it—University Hospital was all the way across town from Mom’s place, and he’d be driving back in the middle of rush hour. He set his own agent to redo the search with stricter preferences about location and time. Lucy’s agent, having complete trust in Pete’s agent in the context of the present task, automatically assisted by supplying access certificates and shortcuts to the data it had already sorted through.

Almost instantly the new plan was presented: a much closer clinic and earlier times—but there were two warning notes. First, Pete would have to reschedule a couple of his less important appointments. He checked what they were—not a problem. The other was something about the insurance company’s list failing to include this provider under physical therapists: “Service type and insurance plan status securely verified by other means,”the agent reassured him. “(Details?)”

Lucy registered her assent at about the same moment Pete was muttering, “Spare me the details,” and it was all set. (Of course, Pete couldn’t resist the details and later that night had his agent explain how it had found that provider even though it wasn’t on the proper list.)

(dall’articolo The Semantic Web, Scientific American, 2001 (PDF))

Read Full Post »

Ebbene sì: proprio io, il laudator maximo di KDE e Ubuntu, sto per scrivere un rant. E devo ammettere che la cosa è successa un po’ per caso, essenzialmente perchè per la prima volta sto configurando un PC per uso di tutta la casa, quindi essenzialmente multiutente e con un utente in particolare semplificato il più possibile, così da permettere anche ai miei genitori di fare task estremamente semplici (in particolare, navigazione Web).

Pronto e carico, stamattina decido di installare Kubuntu 11.10: avevo già messo su la 11.04 in precedenza in quel PC, ma c’era Gnome e preferivo avere KDE per avere un ambiente desktop che assomigli a Windows e non a Mac, per favorire appunto il newbie della situazione. L’installazione va smooth, come al solito del resto, ma è al momento della configurazione che appaiono i problemi, che mi fanno dire appunto che un sistema del genere non è certo pronto a reggere il confronto con gli altri già nominati. Per la cronaca: il rant è rivolto sia a Kubuntu che a KDE.

Nell’ordine:

  • creo i 3 utenti del sistema: quello dei 3 che verrà usato dai miei vorrei che fosse creato senza password (ovviamente non è amministratore del sistema), dato che non c’è motivo di inserirne una. System settings non si lamenta, e fin qui tutto bene.
  • Tento di fare login con i nuovi utenti: KDM mi costringe a cambiare la password al primo login di tutti, senza che io glielo avessi chiesto. Torno in System settings, ma da nessuna parte trovo l’opzione per disattivare questo comportamento. Prendo atto, riapro la gestione degli utenti, metto password a caso e torno a provare il login. A questo punto inserisco le password definitive, ma sono costretto a darne una anche all’utente che non doveva averne, dato che KDM non accetta campi vuoti. Tanto per fare un esempio, in Gnome posso configurare utenti con e senza password senza alcun problema.
  • Il tema di login predefinito di KDM (e l’unico installato) non mostra i tre utenti, ma costringe a scrivere sia il nome utente che la password. Non c’è modo di cambiare questa cosa, se non installando (forse) un altro tema. Peraltro, se si scaricano ed installano nuovi temi dalla pratica finestrella di System settings, questi non appaiono nell’elenco (forse dopo un riavvio, ma devo controllare).
  • Rekonq è il browser di default di Kubuntu. Rekonq? Ma ci prendiamo per i fondelli? Per carità, se cerchi Firefox trovi l’installer, ma Rekonq è una cavolata fatta più o meno per caso e probabilmente ancora instabile, vogliamo veramente rifilare questo catorcio ai nuovi utenti?
  • KDE notifica con warning, al termine del login di chiunque, che la cartella $HOME/.kde/share/apps/korganizer/contacts (o qualcosa del genere) non esiste. Bè, e allora? Non esiste perchè nessuno di noi usa un gestore dei contatti, non vedo cosa gli possa interessare al sistema se tale cartella non c’è.
  • Imposto un utente con il desktop a vista delle cartelle (aka come un desktop normale), e inserisco alcune icone. Ora, a parte il fatto che le icone hanno dimensioni diverse l’una rispetto all’altra, resta il fatto che se voglio dare all’utente la possibilità di muoverle, devo lasciare sbloccati gli widget, e questo fa sì che ogni volta che si va sopra un’icona esca la barra laterale per spostarla, e se non voglio che appaia questa cosa (che francamente è inguardabile se esce ogni volta che si muove il mouse sul desktop) devo bloccare gli widget, rendendo impossibile muovere le icone. Ora, la barra in trasparenza va benissimo per configurare i plasmoidi e per muoverli, ma per le icone è veramente inutile per non dire pessima da un punto di vista visivo.

Per quanto mi riguarda, uno qualunque di questi punti mi porterebbe quantomeno ad installare Gnome, se non fosse che Unity è troppo diversa dal Windows XP che usano normalmente i miei genitori, e devo ammettere di aver pensato anche di mettere su direttamente XP, se non fosse che è un OS che ha più di 10 anni.

Vedremo le impressioni al loro primo utilizzo, anche se temo vivamente quel momento.

P.S.: il sistema è, come detto, Kubuntu 11.10, aggiornato fino ad oggi con i soli repository ufficiali (quindi nessun PPA in mezzo).

Read Full Post »

Anche quest’anno ho partecipato al LinuxDay, finalmente tenutosi in sessione congiunta da tante associazioni per il software libero di Milano, tra cui naturalmente il POuL; ho avuto anche il piacere di tenere un talk introduttivo a LaTeX, in parte ispirato a quanto già mostrato qualche mese fa in occasione della conferenza su LyX che abbiamo fatto al Politecnico. Ripropongo qui le slides aggiornate.

Read Full Post »

Anche quest’anno ho dato un (piccolo) contributo ai Corsi Linux organizzati dal POuL, introducendo agli studenti KDE; ecco di seguito le slide che ho preparato (tutte le immagini sono tratte dai siti kde.org e satelliti).

Read Full Post »

Scrivania

Scrivania

Read Full Post »

The Witcher - Epilogue*

The Witcher - Epilogue*

* Immagine tratta dall’artbook di “The Witcher Enhanced Edition – Director’s Cut”

Read Full Post »

Quasi quasi me la perdo: la trovate qui!

Read Full Post »

After having seen many versions on Internet, I have just created my own theremin using Arduino! Nothing too much fancy, just a couple of sensors and a VST on software side, and that’s it. Here are the details…

Hardware

From a hardware point of view, the circuit is quite simple:  I am using two IR proximity sensors, connected to two analog input pins of the Arduino Uno, plus a couple of leds, which increase their light in proportion to the readings from the sensors, and a couple of pushbuttons, useful for blocking the values sent to the computer (regardless of the readings).

I have also changed the Arduino firmware, as indicated here, using this one, so that the Arduino itself is seen from the computer as a MIDI device, instead of a USB-to-serial port; this has been easy enough: just a 10K resistor is required, soldered in the position indicated on the guide, and then a couple of commands and the new firmware is up and running. Of course, you will need to change it with the standard one quite often in the beginning, before settling the final version of the sketch (which can be uploaded only with the USB-to-serial code). Note that this operation can be done only on an Arduino Uno.

As you can see, the device is correctly shown in QJackCtl:

QJackCtl Alsa view

QJackCtl Alsa view

Software

On the software side: first of all I have searched for an existing program which could reproduce the Theremin sound: there are a few, one very interesting is written in Python but it works only with OSS, and the Alsa emulation does not work at all (Ubuntu does not support OSS since a couple of years); there is also a CSound library, but it did not sound that well. In the end, I have decided to use this free VST effect, which is not free software (unfortunately), but has many different options and it also shows a MIDI input, so it can be driven using MIDI CC #60 and #61 (for x and y directions).

Super Spook Keys

Super Spook Keys

The Arduino program is very simple: it reads values from both the sensors, collecting five consecutive values; after that, it computes the mean of the values (for smoothing the signal) and sends it through the serial line as MIDI messages, then it repeats. The two leds are set a value proportional to the sensors, and if one of the two buttons is pressed, the corresponding sensor is blocked to the last valid value, so that (for example) the volume can be blocked while the pitch is changed, or viceversa.

Conclusions

Recording session

Recording session

Quite fun, again: I have also added all the components to a prototipying shield, so that as soon as a new enclosure arrives, I will be able to move everything together and close up my third Arduino circuit of the summer; you can briefly see part of that shield in the first video, although it is not in use yet.

Let me know if you want any detail…

P.S.

Webcam recording on Linux (or, at least, on Ubuntu 11.04) sucks: mencoder exited with floating point exception ( :-O ), ffmpeg just crashed, the same for Cheese; in the end, GStreamer saved me (and allowed me to easily record the second video), with the definitive pipeline:

gst-launch-0.10 v4l2src device=/dev/video1 !
 'video/x-raw-yuv,width=640,height=480,framerate=30/1' !
 tee name=t_vid ! queue ! xvimagesink sync=false t_vid. !
 queue ! videorate ! 'video/x-raw-yuv,framerate=30/1' !
 queue ! mux. alsasrc device=hw:0,0 !
 audio/x-raw-int,rate=48000,channels=2,depth=16 ! queue !
 audioconvert ! queue ! mux. avimux name=mux !
 filesink location=webcam.avi

Read Full Post »

Linus Benedict Torvalds
Aug 26 1991, 2:12 am

Hello everybody out there using minix –

I’m doing a (free) operating system (just a hobby, won’t be big and
professional like gnu) for 386(486) AT clones.  This has been brewing
since april, and is starting to get ready.  I’d like any feedback on
things people like/dislike in minix, as my OS resembles it somewhat
(same physical layout of the file-system (due to practical reasons)
among other things).

I’ve currently ported bash(1.08) and gcc(1.40), and things seem to work.
This implies that I’ll get something practical within a few months, and
I’d like to know what features most people would want.  Any suggestions
are welcome, but I won’t promise I’ll implement them 😀

Linus (torvalds@kruuna.helsinki.fi)

PS.  Yes – it’s free of any minix code, and it has a multi-threaded fs.
It is NOT portable (uses 386 task switching etc), and it probably never
will support anything other than AT-harddisks, as that’s all I have 😦 .

Read Full Post »

« Newer Posts - Older Posts »