Serial RS232 connections in Python
Here at ULPGC I'm following a Robotics course. In the practical part of the exam we have to write some applications to operating some didactics robots we have (Rhino XR-4 and SCARA Robots).
Each robot is connected to a Controller (Rhino Mark-4) which can be connected to a PC to send commands to the Controller in order to let the robots do things.
The PC to Controller connection is a serial RS-232 connection.
- fabio's blog
- Add new comment
- Read more
- 26 reads
Serial RS232 connection in DOS dosemu
Recently I had to play with serial RS232 connections in order to control a robot we have here in the Robotics course at the ULPGC.
We have some pretty old (1989!!!) applications to control and configure the robots which used to run under DOS. I tried to run them under dosemu: unfortunately it didn't work. Maybe because the code the applications use is not really good (direct access to the hardware, incorrect driver usage etc..).
- fabio's blog
- Add new comment
- Read more
- 18 reads
linux how-to: two fingers scrolling on a regular synaptics notebook touchpad
One of the features I really love about Apple's notebooks is the two fingers scrolling enabled touchpad they have.
It's easier and faster to use than the regular side scrolling available on normal notebooks.
So.. I recently had a look at the synaptics documentation (synaptics is the driver which manages the touchpads under Linux).
Well.. After some reading and a bit of google searches it turns out that is possible to enable two fingers scrolling on recent synaptics touchpads even on normal/regular notebooks (not Apple Macbooks).
h264 videos on Flash: cool example
Recently I'm playing a bit with the new feature available on the new Adobe Flash Player 9: the support of h264 encoded video for flash videos.
Well.. seems that this will really give us incredible developments as this technology it's really super powerful.
As an example of it you might have a look at this h264 flash video h264 demo (right click on the video to go fullscreen).
The resolution and definition of this video it's really incredible. Even if the video is being downloaded from a website in real time the quality is really high but still it plays without interruptions and smoothly.
And the quality.. it's amazing. Actually higher than lot of divx which are commonly available in Emule and friends.
Wouldn't you pay a couple of dollars to stream online your favorite movies with superb quality and without the hassle of time consuming and bad quality with P2P ? ... Let's see what will happen.
- fabio's blog
- 1 comment
- 529 reads
Why No One should Drink and Drive - The Destiny of Jacqueline Saburido
WARNING: this article contains explicit images of a girl burned in a car accident. If you think that this images might hurt you please leave this article.
Today I received an email telling the true story of Jacqueline Saburido, a girl which gets burnt in a car accident caused by a drunk 17 years old guy.
These things should not happens. I'm totally against drunk driving and I have to publish this picture to give them most visibility as possible.
Jacquelin still have to pay lot of hospital bills so.. if you want to contribute you could do her a little donation on her website.
Here are the pictures..
- fabio's blog
- 5 comments
- Read more
- 1963 reads
Straylight Run "The Needles The Space" - My personal review
Straylight Run "The Needles The Space" - Album Cover
I just bought the last album from Straylight Run called "The Needles The Space".
I'm a long time Straylight Run fan. Songs from old CDs like "Existentialism On Prom Night", "Another Word for Desperate" and "The Perfect Ending" always make me feel strange.. These songs really can make you touched, super emotional music.
- fabio's blog
- Add new comment
- Read more
- 379 reads
Quick Sort implemented in Prolog
A Quick Sort implementation written in Prolog.
% Varesano Fabio - QuickSort
/* [+,-] */
quicksort([], []).
quicksort([HEAD | TAIL], SORTED) :- partition(HEAD, TAIL, LEFT, RIGHT),
quicksort(LEFT, SORTEDL),
quicksort(RIGHT, SORTEDR),
append(SORTEDL, [HEAD | SORTEDR], SORTED).
/* [+,+,-,-] */
partition(PIVOT, [], [], []).
partition(PIVOT, [HEAD | TAIL], [HEAD | LEFT], RIGHT) :- HEAD @=< PIVOT,
partition(PIVOT, TAIL, LEFT, RIGHT).
partition(PIVOT, [HEAD | TAIL], LEFT, [HEAD | RIGHT]) :- HEAD @> PIVOT,
partition(PIVOT, TAIL, LEFT, RIGHT).
/* [+,+,-] */
append([], LIST, LIST).
append([HEAD | LIST1], LIST2, [HEAD | LIST3]) :- append(LIST1, LIST2, LIST3).
- fabio's blog
- 1 comment
- 866 reads
Simple type checker in Prolog
A simple type checker written in Prolog.
%esercizio di pdp07 typechecker
typenv(X,[ass(X,Y)|_],Y).
typenv(X,[_|Env],Y) :- typenv(X,Env,Y).
type(num(_),_,int).
type(bfun(+),_,arr(int,arr(int,int))).
type(bfun(-),_,arr(int,arr(int,int))).
type(bfun(*),_,arr(int,arr(int,int))).
type(bfun(=),_,arr(int,arr(int,bool))).
type(bfun(<),_,arr(int,arr(int,bool))).
type(bfun(>),_,arr(int,arr(int,bool))).
type(var(X), Env, Y) :- typenv(X,Env,Y).
type(fun(V,M),Env,arr(T,W)):- type(M,[ass(V,T)|Env],W).
% senza occur check
%type(app(X,Y), Env, T) :- type(X,Env,arr(U,T)), type(Y,Env,U).
% con occur check: controlla tipaggi ricorsivi
type(app(X,Y), Env, T) :- type(X,Env,arr(U1,T)), type(Y,Env,U2),
unify_with_occurs_check(U1,U2).
type(cond(I,H,E), Env, T) :- type(I, Env, bool), type(H, Env, T), type(E, Env, T).
type(let(X,Y,Z), Env, T) :- type(Y, Env, U), type(Z,[ass(X,U)|Env],T).
- fabio's blog
- Add new comment
- Read more
- 424 reads
Sudoku resolver in Python
A simple Sudoku resolver written in Python.
Sorry for the Italian code comments. Please add a comment below if you don't get parts of the algorithm.
- fabio's blog
- 1 comment
- Read more
- 616 reads
An ML parser interpreter implemented in OCAML
This is a simple ML parser/interpreter implemented in OCAML. Below there are different versions.
Sorry for the comments in Italian. Please comment below if you don't get parts of the algorithm.
- fabio's blog
- Add new comment
- Read more
- 301 reads

Recent comments
1 day 12 min ago
1 day 4 hours ago
1 week 1 day ago
2 weeks 2 days ago
2 weeks 2 days ago
5 weeks 1 day ago
5 weeks 5 days ago
5 weeks 6 days ago
6 weeks 2 days ago
6 weeks 4 days ago