venerdì 29 giugno 2012

Autonomous Role Discovery for Collaborating Agents


I'm proud to announce that a paper I wrote with my colleague and friend prof. Haibin Zhu has been published on-line on Software Practice and Experience (SPE). The paper, titled, Autonomous Role Discovery for Collaborating Agents , can be found here.
 This is the result of the last year efforts on the WhiteCat framework.

JFK and Roles....

With the help of a friend of mine a work on roles applied to the JFK framework is ongoing. It is still early to present some results, and it is quite difficult to even imagine the final result, that came into my mind from Object Teams. We'll see!

martedì 5 giugno 2012

csh e bash con un po' di colore

Il terminale è l'unico vero strumento affidabile di ogni buon sistema, l'amico fidato dell'amministratore di sistema. Personalmente uso dei temi a sfondo scuro che affaticano poco gli occhi, ma a volte dover tenere aperte diverse sessioni fra macchine diverse e con sistemi diversi può causare un po' di confusione. Ho quindi elaborato un prompt personalizzato della CSH (non la migliore shell al mondo, ma comunque la vera shell Unix) che mostra in maniera un po' piu' colorata non solo utente e percorso ma anche il kernel usato (o meglio l'id del sistema) e il numero di comandi dati (utile per l'uso di history). Si passa quindi da:

 ad un prompt un po' piu' ricco come:


Per attivare un prompt del genere, districandosi un po' fra le sequenze di escape, è possibile impostare la variabile prompt come segue:

set prompt="%{\033[0;1;33m%}%B[%{\033[0;1;37m%}%n%{\033[0;1;31m%}@%{\033[0;1;37m%}%M%{\033[0;1;33m%} %{\033[0;1;34m%}{%{\033[0;1;36m%}`uname -n -r`%{\033[0;1;34m%}}%{\033[0;1;33m%}] %{\033[0;1;32m%}%b%/%{\033[0;1;33m%} (%{\033[0;1;37m%}%h%{\033[0;1;33m%}) %{\033[0;1;36m%}%{\033[0;1;32m%}>%{\033[0;1;37m%} "

Qualcosa di simile può essere ottenuto anche per la Bash, agendo sulla variabile PS1, ma il comportamento delle sequenze di escape è un po' piu' rognoso e produce qualche effetto collaterale (lunghezza fissa della linea di input):

# Reset
Reset='\e[0m'       # Text Reset

# Regular Colors
Black='\e[0;30m'        # Black
Red='\e[0;31m'          # Red
Green='\e[0;32m'        # Green
Yellow='\e[0;33m'       # Yellow
Blue='\e[0;34m'         # Blue
Purple='\e[0;35m'       # Purple
Cyan='\e[0;36m'         # Cyan
White='\e[0;37m'        # White

# Bold
BBlack='\e[1;30m'       # Black
BRed='\e[1;31m'         # Red
BGreen='\e[1;32m'       # Green
BYellow='\e[1;33m'      # Yellow
BBlue='\e[1;34m'        # Blue
BPurple='\e[1;35m'      # Purple
BCyan='\e[1;36m'        # Cyan
BWhite='\e[1;37m'       # White

# Underline
UBlack='\e[4;30m'       # Black
URed='\e[4;31m'         # Red
UGreen='\e[4;32m'       # Green
UYellow='\e[4;33m'      # Yellow
UBlue='\e[4;34m'        # Blue
UPurple='\e[4;35m'      # Purple
UCyan='\e[4;36m'        # Cyan
UWhite='\e[4;37m'       # White

# Background
On_Black='\e[40m'       # Black
On_Red='\e[41m'         # Red
On_Green='\e[42m'       # Green
On_Yellow='\e[43m'      # Yellow
On_Blue='\e[44m'        # Blue
On_Purple='\e[45m'      # Purple
On_Cyan='\e[46m'        # Cyan
On_White='\e[47m'       # White

# High Intensty
IBlack='\e[0;90m'       # Black
IRed='\e[0;91m'         # Red
IGreen='\e[0;92m'       # Green
IYellow='\e[0;93m'      # Yellow
IBlue='\e[0;94m'        # Blue
IPurple='\e[0;95m'      # Purple
ICyan='\e[0;96m'        # Cyan
IWhite='\e[0;97m'       # White

# Bold High Intensty
BIBlack='\e[1;90m'      # Black
BIRed='\e[1;91m'        # Red
BIGreen='\e[1;92m'      # Green
BIYellow='\e[1;93m'     # Yellow
BIBlue='\e[1;94m'       # Blue
BIPurple='\e[1;95m'     # Purple
BICyan='\e[1;96m'       # Cyan
BIWhite='\e[1;97m'      # White

# High Intensty backgrounds
On_IBlack='\e[0;100m'   # Black
On_IRed='\e[0;101m'     # Red
On_IGreen='\e[0;102m'   # Green
On_IYellow='\e[0;103m'  # Yellow
On_IBlue='\e[0;104m'    # Blue
On_IPurple='\e[10;95m'  # Purple
On_ICyan='\e[0;106m'    # Cyan
On_IWhite='\e[0;107m'   # White




PS1="${BYellow}\u${Reset}"
PS1="${PS1}${Reset} @ "
PS1="${PS1}${BPurple}\h "
PS1="${PS1}${UWhite}\w${Reset} "
PS1="${PS1}${BIYellow}(\!)${Reset} "
PS1="${PS1}${BIRed} $ "
PS1="${PS1}${Reset}"

lunedì 4 giugno 2012

Linus, Gnome, KDE e l'insoddisfazione

Si è parlato tanto in passato della migrazione di Linus Torvalds da KDE a Gnome, e in effetti i toni con i quali Linus ha denigrato KDE 4 sono stati...beh, nel solito stile di Linus (ossia piuttosto feroci).
Eppure sembra che alla fine nemmeno il progetto Gnome, con il rilascio di Gnome 3 (che è rivoluzionario esattamente come lo fu KDE all'epoca della release 4) non piace a Linus.
Non penso che la community Gnome debba essere triste di questo, come pure non penso che sia una vendetta di KDE, penso semplicemente che Linus, come tanti altri utenti, sia restio ai cambiamenti radicali. Specialmente quando questi cambiamenti non sono ad opera sua!