Search Results: "Stefano Zacchiroli"

6 January 2007

Stefano Zacchiroli: ocamlnet 2.2 in experimental

Ocamlnet 2.2: test it by yourself from experimental A couple of days ago I finally managed to complete the packaging work of Ocamlnet 2.2. This upstream version is a (r)evolutionary release in which it aggregate in a single source package libraries who used to be distributed separately, namely: equeue, ocaml-rpc, netclient, and ocamlnet itself. I've been quite surprised to discover that upstream is explicitly nice with us packages and provides guidelines on how to split the various libraries in binary packages addressing both dependency and licensing problems (e.g. for nethttpd which is GPL and can't be shamelessly linked with other components which are MIT/X11-licensed). The packages are in experimental but need NEW-processing, as well as cryptgps (a pure-OCaml implementation of some symmetric crypto algorithms, which is a new build-dep of Ocamlnet). Hence to ease testing I set up an apt-gettable repo here:
deb http://people.debian.org/~zack unstable ocaml

Please try it and give feedback to debian-ocaml-maint@l.d.o. In all my tests the upgrade from ocamlnet pre-2.2 has been smooth: the (too many) transitional packages I had to create did their dirty job. The only "issue" non-addressed (and I don't know how to actually) is that the nethttpd library used to be distributed in libocamlnet-ocaml-dev and is now distributed in libnethttpd-ocaml-dev. Since the former package is entirely useful without the latter there is no dep among the two and it's possible that upon upgrades an user ends up without a working nethttpd library on the system. I added a Recommends in the hope it's enough, let's see how many complaints I will receive ...

30 December 2006

Stefano Zacchiroli: trac.cs.unibo.it

Experiences with a Trac Server In the last few days after Xmas I set up http://trac.cs.unibo.it, a server for my CS department which will host a bunch of Trac instances, initially for academic projects only then it will be opened to student projects as well. The server set-up has been "powered-by" the following technologies:
  1. Debian Etch
  2. Apache 2.2 with FastCGI, SuExec, and WebDAV over TLS (for accessing SVN repositories without forcibly passing through Trac)
  3. Trac instances backed by Sqlite databases and Subversion repositories
  4. Some bits of Genshi templating for generating the projects index
  5. Some shell scripts for automating creation and removal of projects
I'm quite happy with the result. From the overall experience I drew some observations though: Happy new year birthday trac.cs.unibo.it.

27 December 2006

Stefano Zacchiroli: mozex for firefox 2.0

Mozex (i.e. Vim for Editing Wikis) "Now" Works with Firefox 2.0 Not really a news, but I discovered only now that on December 2nd, Mozex 1.9.5 has been released with support for Firefox 2.0 (and hence for Iceweasel). Mozex is my favorite Firefox add-on. Among several other features, using it text-areas can be edited in an external editor (e.g. gvim): the only way I can survive editing huge wiki pages. The last weeks since the release of Firefox 2.0, which broke Mozex 1.9.4, have been really painful ... PS this will be the first post on my blog following the YEAR/MONTH/ structure, will it work properly?

25 December 2006

Stefano Zacchiroli: use filetype hooks luke

Xmas Vim tip: use ~/.vim/after/ftplugin/XXX.vim Jose Carlos posted some Python tips for vim. I haven't yet looked thoroughly at the code, but still here is my Xmas Vim tip:
Avoid putting filetype-specific customizations directly in your ~/.vimrc using au groups which rely on specific filename extensions. It's better to put filetype-specific customizations for the filetype XXX directly in the file ~/.vim/after/ftplugin/XXX.vim (in the example it would be ~/.vim/after/ftplugin/python.vim), this way they would be loaded even when you manually do "set ft=XXX" on a file with whatever extension.
For the interested reader the "after" path step is justified by the vim "runtimepath" we use in Debian (cfr. /usr/share/vim/vimcurrent/debian.vim). It ensures your customizations will be loaded after system-wide customizations so that they can be overridden. Oh-Oh-Oh, Merry Christmas.

23 December 2006

Stefano Zacchiroli: looking for a website markup language

Which Website Markup Language? Dear Lazyweb, now that I've finished my Ph.D. thesis (i.e. now that I'm officially unemployed :-) ) it's time to renew my vetust homepage. That page is written with WML, I used to be quite happy with it, but this is no longer the case (lots of reasons for that snippet). I'm now looking for an XML based markup language for re-writing my new homepage, the features I would like to see in a tools based on it are: Of course I can design my own XML format and all the needed XSLT transformations, but I would like to avoid re-inventing the wheel if possible. Actually a while ago I think I read about a couple of tools like the one I'm looking for here on planet, but right now I'm unable to find the relevant posts. Similarly I'm apparently unable to find the right set of Google keywords for finding anything useful.

20 December 2006

Stefano Zacchiroli: ls2rss

ls2rss AFAIK amule is missing notification of completed downloads. In addition to that, me and Godog are sharing the same amule instance and it's cool to be notified of what the other downloaded, it's a bit like the for:someone tag on del.icio.us. As an issue of my hack of the day series I hence implemented ls2rss.py. The name is telling: given a directory it generates a corresponding RSS feed. It's written in python, it's meant to be run as a cron job, and takes care of minor details like remembering files that have been deleted since the last invocation and enforcing a threshold to the feed size. I was unable to find anything like that already available on the net (the one available here is not available for download any longer). In case of need, try mine. Download

11 December 2006

Stefano Zacchiroli: as fast as wikipedia

As Fast as Wikipedia Yesterday evening I was zapping on the (Italian) television. A rare event since I'm not really fond of (especially Italian) television, but sunday evening offers a nice interview show on Rai 3 with Fabio Fazio. At the end of the show the director of the network (Claudio Cappon) made a phone call to the anchorman announcing that Enzo Biagi, interviewed during the show, is going to come back working on Rai 3. That's a great news, since Enzo Biagi was basically fired during the years of Berlusconi's government, after the so called Editto Bulgaro, since he was too much irreverent with our former prime minister (damn!, is still painful to refer to Berlusconi as our "former prime minister", I wonder how much this feeling will last ...). That was one of the saddest page of Italian mass-media history. A few minutes after the end of the show (the time of having some water and washing my teeth) I went to the wikipedia page about Biagi, looking for the story of his daughter and I found the mention of his coming back to the Italian television. According to the history of wikipedia the page was changed during the interview (when Biagi firstly mentioned his probable coming back to television) and again 5 minutes after the end of the show to mention Cappon's phone call. That was fast!

4 December 2006

Stefano Zacchiroli: debian karma feel good

Debian Karma: I Feel Good It has been a while since the last time I checked the debian Karma page (?snapshot took at the time of writing). I did it today though, and to my great surprise I found myself listed in the third position. My Karma is in a good shape then, that's probably why I feel good these days (or is it because I finished my thesis? ...) P.S. Dear Lazyweb, how am I supposed to link static .html pages from this blog post with ikiwiki? I've enabled the html plugin, but both trying to link to it with and without ".html" extension isn't working ... And yes, that's why the "snapshot" link above doesn't work.

30 November 2006

Stefano Zacchiroli: stratus i owe you a beer

Stratus: I Owe You a Beer
bzrtools (0.11.0-1) unstable; urgency=low
  * New upstream release. (Closes: #389605)
 -- Gustavo Franco <stratus@debian.org>  Tue, 28 Nov 2006 12:21:48 -0200

According to my informal bounty I owe you a beer, to be paid at the next Debconf (let's hope beer prices in Edinburgh have not raised too much since the last time I've been there!). Many thanks!

28 November 2006

Stefano Zacchiroli: vim ctrl r

Vim's Feature of the Day #1: i_CTRL-R I'm really astonished of how much there's to learn about Vim and how much you can forget about it, especially because I consider myself a rather power user of my beloved editor. Digging into my ~/.vim/after/ftplugin/tex.vim I found some mappings that were laying there from quite a while (I think I wrote them something like 4 years ago):
vmap ,b "zdi\textbf <C-R>z <ESC>
vmap ,e "zdi\emph <C-R>z <ESC>
vmap ,t "zdi\texttt <C-R>z <ESC>

Looking at them I went through :help i_CTRL-R ... and it's wonderful! Hitting CTRL-R in insert mode Vim enters in a "waiting for a register name" mode and when received it inserts its content without leaving insert mode. That's amazingly quick, and I'm already addicted to two combos:

16 November 2006

Stefano Zacchiroli: cdbs relevance

/me on the Relevance of CDBS Whoa, people discussing about CDBS, I can't help joining them. My position: I love CDBS. I started switching my packages to CDBS an year ago or so and nowadays I've almost finished. I understand that people not knowing CDBS might have trouble fixing bugs in my packages, but that's life and it's the same as having to fix a bug in a software written in a programming language you are not fond of. It's just a matter of setting a minimal standard: today people in the NM have to learn debhelper, tomorrow they will have to learn CDBS too. I think it's worth the effort, because CDBS, if used extensively in our archive, has the benefit of providing a single place where to massively make changes to potentially all packages of the archive. That's a huge win for QA in Debian. The same does debhelper, but it only takes care of technical aspects in the packaging process while CDBS also takes care of behavioural aspects. Of course CDBS has drawbacks and nuisances (the available hooks for examples are not properly standardized nor documented IMO), but I think it's a step in the right direction. In Debian we should push more and more toward the possibility of making changes in a centralized/batch manner, so that when maintainers tend to get MIA we have a quick and easy way to take over their unfulfilled duties. Collaborative maintenance is a social step in that direction, CDBS is a technical one.

11 November 2006

Stefano Zacchiroli: more fp in python 2.5

More Functional Programming in Python 2.5, where's the Syntax? I'm glad to read that more functional stuff is coming with Python 2.5, especially for the introduction of partial application, the heart of functional programming. Still, FP is not only about semantics, is also about fostering code reuse and implementing stuff in more elegant and concise way. For such stuff to be effective though, a nice and handy syntax is (IMO) mandatory. Anyone knowing i J. Random Functional Language (whatever Lisp dialect, ML, Haskell, ...) should be able to guess how to apply function partially in Python. Considering that Python has a long history of syntactic extensions via PEPs (think about list comp or generator expressions) I fail to understand why to apply a function partially I have to write something as ugly as:
all_evens = functools.partial(all_divided_by, x=2)

It's only me or the most natural syntax, that everyone would be able to guess out of the box, would have been:
all_evens = all_divided_by(x=2)

?

7 November 2006

Stefano Zacchiroli: editing latex the vim way

Editing LaTeX, the Vim way Uwe presented latexmk as its way of previewing LaTeX output while editing in Vim. While I don't know latexmk myself, I'm using quite a lot LaTeX recently (my Ph.D. thesis is getting huuuge) and I'm co-maintaining vim-latexsuite in Debian. With vim-latexsuite what he wants can be achieved quite easily too. I keep on editing in Vim and can exploit the following shortcuts (where <Leader> is usually mapped to backslash):
  1. <Leader>ll compile the current LaTeX source, the generated format depends on the value of g:Tex_DefaultTargetFormat (I use dvi, for a reason explained below);
  2. <Leader>lv fire up a viewer for the compiled format, in my case this runs xdvi;
  3. <Leader>ls move the DVI viewer to the point the cursor is currently at in Vim, highlighting (in xdvi) with a rectangle the current paragraph (believe me, this is amazing);
  4. CTRL+Mouse Click (this in xdvi) do the opposite of (3), i.e. move Vim to the point in the LaTeX source file corresponding to where we clicked in xdvi.
I don't really understand why Uwe want to see working previews in PDF format, to me PDF is just the final output. DVI is much better (especially for (3) and (4) above, but also because it takes less time to be generated). Oh, and of course vim-latexsuite is able to do a lot more, like deciding whether LaTeX needs to be run again to fix dangling references, use the quickfix window to jump to compilation error, and so on ... End of the SPAM :-) PS these are my latex-specific vim settings from my ~/.vim/after/ftplugin/tex.vim
setlocal tw=80
setlocal ts=8
setlocal sts=1
setlocal sw=1
setlocal iskeyword+=\\
setlocal makeprg=make
setlocal keywordprg=:help
"setlocal formatoptions+=a
setlocal spell
vmap ,b "zdi\textbf <C-R>z <ESC>
vmap ,e "zdi\emph <C-R>z <ESC>
vmap ,t "zdi\texttt <C-R>z <ESC>
  " Latex-Suite
let g:Tex_CompileRule_dvi = 'latex -interaction=nonstopmode -src-specials $*'
if v:servername != ""
 let g:Tex_ViewRule_dvi = 'xdvi -editor "vim --servername ' . v:servername . ' --remote +\%l \%f"'
endif

5 November 2006

Stefano Zacchiroli: versioning etc w bzr

Versioning /etc with bzr for fun and profit Since mid October I rented a room to Godog, here in Bologna (erm ... Italy :-)). Living with another DD so far has been utterly fun: our lives proceed normally, but when we occasionally met it's like hack time: brainstorming and implementation of the first hackish ideas that come to mind. The first idea we deemed nice to be implemented has been versioning /etc of our server (which we co-administer) with bzr. The requirements we set forth where:
  1. who is changing stuff should be somehow forced to document and commit its changes;
  2. automatic changes performed by package upgrades should be automatically versioned.
Our current solution consists in a couple of hacks: What's next? Well, Enrico already set forth the idea of an housewarming bug squashing party with all DDs living in the Bologna area. Sounds cool!

3 November 2006

Stefano Zacchiroli: my life wo caps lock

My life without CAPSLOCK Yesterday I spotted the option "Make CapsLock an additional Ctrl" in the Gnome keyboard preferences (Desktop > Preferences > Keyboard > Layout Options > Ctrl key position). I enabled it, obtaining the end of errors due to erroneous enabling of Caps Lock (as suggested to me by several people at DebConf6, but so far I've been too lazy to learn how to do it with xmodmap). In addition to feeling more relaxed when using Vim (we all know how dangerous can be Caps Lock in Vim!), using Caps Lock as CTRL is actually really handy, since key combinations involving CTRL can be formed moving the left pinky way less: probably a dream of all Emacs users out there :-) Now it is just a matter of training my left pinky to stop going in the bottom left corner of the keyboard ...

2 November 2006

Stefano Zacchiroli: first thoughts on ruby

First Thoughts on Ruby Following my first experiences programming with it, here is my current braindump on Ruby (pros and cons mixed):

Stefano Zacchiroli: flickr download

Flickr_download (.rb): Flickr batch downloader A while ago I decided to give Ruby a try. And of course the best way to do that on a programming language you don't know is write something in it. The result is flickr download.rb: a batch downloader of Flickr! photo sets. It handles all the stuff of Flickr! authentication/authorization via the shared secret, API key and so on (see the Flickr! API). Then, specifying the username of a photoset owner and the photoset (either by title or id) it downloads in a batch fashion the best available size of contained photos. Command line interface of course. Despite its simplicity and how useful it looks to me, I was unable to find a similar tool already available somewhere. Maybe because the usefulness of such an utility is diminished by the requirement imposed by the Flickr! API that the owner of a photoset must first authorize the tool before it can be used, but I still found it very useful to download my photos batchly ... Requirements Sample usage
$   # let's try on my Debconf6 photo set
$ flickr_download -u zacchiro -i 72157594247689892
will download 53 photos(s)
starting download of http://static.flickr.com/73/222421262_38df10594a_o.jpg ...
starting download of http://static.flickr.com/91/222420881_3b49a57f11_o.jpg ...
starting download of http://static.flickr.com/61/222420518_b2ad6ddf1a_o.jpg ...
<snip>
starting download of http://static.flickr.com/72/222392122_80b8041c47_o.jpg ...
waiting for all downloads to complete ...
all done.
$

Download

30 October 2006

Stefano Zacchiroli: tomboy mindmap

Graphviz-based mindmap with Tomboy After having started using Tomboy, I've already become addicted to it. It's basically a merger between a note taking tool and a desktop wiki (with some issues with WikiWords nonetheless: #396177). I was missing a Mind map feature though. Thus I wrote the tiny teeny hack of the day which processes Tomboy's notes from ~/.tomboy/ and generates a Graphviz graph that is then rendered (to SVG) and shown on the fly. Now I can just run mindmap to obtain a Mind map of my notes. Enjoy mindmap TODO Kudos to Sebastian Menge who wrote the XSLT stylesheet I started from.

29 October 2006

Stefano Zacchiroli: dear old mutt

Dear old Mutt, ... My MUA of choice is Mutt. I've been using it for something like 8 years now and I like it: it's quick, powerful and well integrated with the Unix way of handling mail (e.g. procmail). But we all know that. My feeling today is that sooner or later I will be forced to abandon it. The main reason is that it seems to be a dead product, upstream development is not dead but I fail to see an overall plan for my beloved MUA. Other text based application have understood that they should be integrated in some way with the desktop and/or windowing environment in which they are run: Vim for example is able to deal with the mouse wheel event when run in an xterm or even has developed a GUI which is well integrated with the Gnome session mechanism. Why Mutt is not? Such feelings of today has been originated by Tomboy, a wonderful note taking tool with Wiki-like capabilities, integrated with Gnome. It has a plugin for drag and dropping Evolution mails on notes automatically providing links from the notes to your mailbox: that's ... wow, great! I'm already using Evolution as my organizer and I already have Gaim integrated with it for contacts. I fear the moment I will try it for mails because I'm pretty sure it also has an UI which can be easily used with keyboard without the need of the mouse. Since I'm using all this on my laptop which is always with me (and this means that the argument "Mutt can be used remotely using a 9600 GSM connection" is bogus), it seems I'm running out of arguments for sticking to Mutt. Oh, right, there is the procmail stuff, my last feeble chance of keep on using Mutt ...

18 October 2006

Stefano Zacchiroli: bzrtools not up to date

I'm starting to hate bzrtools 0.11.0 My Ph.D. thesis is (obviously) being written in LaTeX and (even more obviously) being edited with Vim. The VCS I'm using to save my ass is (less obviously) bzr. I chose it just for fun, but I must say that I'm quite happy with it and I'm also considering using some of its distributed features to track an external Subversion repository (using bzr-svn) which contains changes to my BibTeX database to merge them back in my local copy. Still, the next time I see the following message, there is a non-negligible probability that I'll totally freak out:
zack@aquarium:~/thesis$ bzr st
Bzrtools is not up to date with installed bzr version 0.11.0.
There should be a newer version available, e.g. 0.11.
<snip>

I'm ready to offer a bounty of 1 beer (to be paid at the next Debconf) to the first who fixes it in sid!

Next.

Previous.