Search Results: "Sandro Tosi"

5 March 2010

Sandro Tosi: Code syntax highlighting on Blogger

Blogger has no feature to highlight code syntax in blog posts. But google-code-prettify comes to rescue.

The information in their README are quite generic, and treat the situation where you're directly managing the website files, which is not the case for Blogger.

Luka Marinko wrote a very nice blog post describing how to use google-code-prettify on Blogger; I'm going to follow his advices right away!

15 February 2010

Sandro Tosi: Migrate a Git repo to a SVN one

We often see the opposite, convert a SVN repository into a Git one and try the breeze of a DVCS, but what if you want to convert a Git repo into a SVN one?

The process is not easy (and you need a "straight" Git repo: no merge, too complex branches and so), and the result is quite raw, but you're still able to convert the main part into SVN. Here are the steps:
  1. create an empty SVN repository: svn mkdir svn://path/to/repo/project/ trunk,branches,tags
  2. clone it in a Git repo: git svn clone svn://path/to/repo/project --stdlayout . This will create a project directory, empty except for the .git information directory; master is the default Git branch created by git-svn that maps SVN trunk.
  3. add the original Git repo as a remote: git remote add origin git://uri/to/git/repo/project.git
  4. fetch from it: git fetch origin
  5. create a local branch for the remote master: git checkout -b old_master origin/master . Note that master branch is already present, so we define another one.
  6. being on old_master we rebase this branch onto master: git rebase --onto master --root . Doing this, we have "moved" all our commits from old_master to master
  7. and push all the commits into the SVN repo: git svn dcommit
It's not that elegant, but it gets it done. I'd like to know if someone is aware of a better method, also to import tags and branches, that this process doesn't do.

12 February 2010

Sandro Tosi: Italy has (again) a PHP.net mirror

After a long time of no Italy mirror, now PHP.net has enabled it.php.net, kindly sponsored by Register.it.

Why am I happy? Because I did it! :)

Sandro Tosi: This RRD was created on another architecture

That is the message you'll receive when trying to open a RRD database created on a 32bit machine from a 64bit one (it's also true the reverse). It's due to the fact that RRD is an architecture-dependent file format: endianess and integer bits length matter.

That's quite boring, given it's quite common to let each machine generate its own RRDs and graph them from a central place, and the more machines you have, the more chances of the above problem.

So, for another example, if you migrate one machine from 32 to 64 bits, you'll have to:
as described here. And when you have +4GB of RRDs it's not so painless.

So, can we haz an architecture independed RRD file format? Pretty please?

It was planned for 1.4, and now that 1.4 is release it's planned for 1.5. Let's hope it comes soon, it would be really nice! :)

3 February 2010

Sandro Tosi: Convert a time string (with microseconds) in a datetime

I struggled a bit with datetime & friends providing a strftime() that support %f (for microseconds output) but not a strptime() . That's really boring and counter-intuitive, and luckily it was fixed in 2.6:

$ python2.6
>>> import datetime
>>> datetime.datetime.strptime('22:57:39.101941', '%H:%M:%S.%f')
datetime.datetime(1900, 1, 1, 22, 57, 39, 101941)

but on my servers I still have 2.5, so what to do?

I found a reply on StackOverflow quite interesting:

$ python2.5
>>> from dateutil.parser import parser
>>> p = parser()
>>> p.parse('22:57:39.101941')
datetime.datetime(2010, 2, 3, 22, 57, 39, 101941)

ok, it uses the current date (instead of 1900-01-01) but it's still has the microseconds correctly recognized (and since I need a time diff, I'm fine with that).

2 February 2010

Marco Túlio Gontijo e Silva: Hi Debian Planet!


Hi Debian Planet! Finally I became a Debian Developer on saturday. Some time after that I sent my first e-mail @debian.org, and today I uploaded my first package: haskell-qio, a sponsored upload for Iain Lane. I d like to thanks everyone that have helped me in the process:
  • Joachim Breitner: for being my sponsor, telling me to look into NM, advocating me in NM and DM, helping me with packaging and other things.
  • Gustavo Noronha: for advocating me in DM, helping me with packaging and agreeing that packaging is not an easy to learn task.
  • Enrico Zini: for being a very nice to work with and helpful AM.
  • Marcelo Vieira: for the chats about the process, which made it pass faster.
  • Ian Costa de Andrade: for not complaining too much about me spending the whole day in the computer, and for all support and encouragement.
  • Marina Gontijo Andrade: for existing.
  • Wagner Meira and Fernando Pereira: for allowing me to work on Debian and giving me a scholarship for it.
  • Thadeu Cascardo and Samuel Vale: for giving me a Debian-related job which made me study about the system.
I m absolutely sure I m forgetting about someone, but I m also sure I ll never remember everyone and I ll always have this sensation. Being a Debian Developer is something I wanted for a long time, and I m very happy to have made it now. Currently I m working mostly in the Debian Haskell Group. These days I m checking if it s possible to make ghci be built in all architectures, and trying to make the newer versions of ghc6, from sid (6.10.4-1) and experimental (6.12.1-4), build in ia64, hurd-i386 and m68k. Any help is welcome. By the way, while I was reading the instructions to migrate some things to the new account, I ve not paid very much attention that I should only change the submitter of the unarchived e-mail, and I made a script, which I posted on the wiki, to change it for all the bugs. Neil Williams commented that this was not necessary, and Sandro Tosi pointed that I could have done this using only one mail to do all commands. Yves-Alexis Perez said that even with the unarchived bug this may not be a good idea, because of the generated noise. So I update the script in the wiki, following these tips, thanks for them. Special thanks for Jimmy Klapowitz, who was nice and supportive in a moment people were not being very nice to me. Sorry for the maintainers that received a lot of e-mails because of this, specially to the people who sign the pkg-haskell-maintainers mailling list, which received the biggest ammount of mail.

14 January 2010

Sandro Tosi: Is being pirated sign of success?

I don't know (and I don't think so) but for sure it's less money in my pocket :)

Anyhow, just the other day I found my book was available for "free download" in a post on a rapidshare forum.

I don't bother too much, it just a strange feeling...

Sandro Tosi: Matplotlib for Python Developers - Images available for download

This is a book on a graphic library, so when they first told me it will be printed in black&white I was quite surprised and puzzled. The editor explained it was to reduce paper copy cost, and that the PDF version will still be in full color, but I would be quite upset if I bought the book and then discover it's black&white without knowing it upfront.

Thus I've asked to at least let the images be downloadable from the book website, so that any reader (either for the paper or electronic copy) can see the pictures as if they're running the programs.

The first request went ignored, but keep pushing got results: now images can be downloaded!! To get them, got the book webpage, then in the "Code Download" section, and request the zip file: in it you'll find either the source code and the images.

The pictures are quite big, because they are the same used for book production (so with specific dimensions and DPI) but you got colors now :)

Sandro Tosi: Matplotlib for Python Developers - PUBLISHED!

Some days are passed, but I'm still pleased to announce that

The first book about Matplotlib has been PUBLISHED!!

It was a really nice experience, it offered me the possibility to work on Matplotlib, do some really interesting stuff, and I'm quite proud of it :)

On the other hand, it was not a "straight" way: the effort I put in this was huge, practically I had to stop all other stuffs and projects I was working on (Debian included) and I was getting more and more tired as time passed. Also, sometimes Packt employees and actions were somehow problematic. but anyhow, the important thing is that THE BOOK IS OUT!!

Now I got also a nice box about the book on the sidebar of this blog!

Enjoy it!!

Sandro Tosi: The beast is quite done

At the end, I made it: the book is in pre-order phase!! yayyy

I'm at the end of reviewing chapters, so I can see the light at the end of the tunnel :)

Probably I'll be able to sleep more than 4/5 hrs at night and have additional spare time to work on the projects I've neglected in these months

29 December 2009

Sandro Tosi: Debian lists spam: ALL messages reviewed!!!

Holy crap! I don't know how I made it, but my mailing-list spam review page is EMPTY!! It was a long way, started on 2009-04-05, but at least the biggest part is done (now there are only the new reports, much much less than the whole backlog).

Again, I'd like to invite anyone to contribute to have (an ideal) lists.d.o spam free:
I know it seems boring at first (and indeed it is), but we are many people, and anyonw contributes a little, it will be much faster and less-annoying. For example: why not review some message while waiting for your next package to be built? Or while you wait for the dist-upgrade to end? Or in any other situation where you got some minutes of spare time to dedicate to such an easy task?

Some links to those interested:
Have fun!

18 December 2009

Sandro Tosi: Remote Apache logging with syslog: is there anything better?

We're doing a pilot to do remote logging for some Apache logs (possibly other services in the future). We've heard of remote syslog capability (and since syslog is on all Linux system) we're giving it a try.

The configuration is quite simple:
  1. [srv] prepare a machine to do the log server
  2. [srv] open it's rsyslogd to receive messages on UDP (or TCP) port
  3. [srv] log the selected facility.level to a log file
  4. [cli] forward the above facility.level to @srv<srv address="" ip=""></srv>
Ok, easy and it works. Unfortunately we face pretty fast the limitation of syslog:
  1. only 8 facilities for users custom log (local0-local7)
  2. only 8 levels for logs severity
this is a big block (only 64 combinations, if you agree to do some "dirty" stuff) if you want to log remotely several services on several different platform on the syslog server.

rsyslog is quite flexible and it allows you to filter messages based on the tag in them, and log in different files, but it's still something very "home-made" and not that professional.

I don't we're the only one needing a remote logging tool, and while syslog is the classic solution, is very bind to the system logs and not to the applications logs: any suggestions for this task? I'd like to hear how you solved this task, possibly without a custom tool, but using something standard.

27 November 2009

Sandro Tosi: Reportbug has now less than 150 outstanding bugs!

Yes, finally we made it! Thanks in particular to Carl Chenet and to Luca Bruno we were able to reduce the reportbug bugs count below 150!

It was a very long road (when I joined the team there was 230-something bugs opened) and I hoped to achieve this some time ago, but the fought goals are the most relevant ones.

Of course, the just released version 4.9 contains quite some bug fixes and enhancements: if you have the chance, give it a look and report any regression or feature request you see fit, but not too much: I want to enjoy the barrier just broken :)

21 November 2009

Sandro Tosi: Goodbye MIA team

I can't simply put up any longer with all the shit thrown on the face being unable to do punish such bad behavior. There are just so many other things that increase my anger (like, for example, "WTH is python2.6 still not in unstable?!") that I don't need another one.

For sure, I don't advocate or encourage anyone to join the MIA team, and I'm speaking with a lot of experience... There is a proposal, from zack, to restructure how MIA works (another bright example of collaboration...): when will it be implemented? nobody knows. will it help? I don't think so (much).

My work (MIA work in general) was almost invisible, like invisible were all the harsh and aggressive replies I got. The nice part is that those replies came from people with the worst situation. Something like:
and several other non-sense replies doesn't leave anything but a huge frustration in you.

And when you got really pissed off, and want to see some sort of reaction on such bad and unmotivated attacks and ask the "People with Powers", what do you got? "sorry, we can't do anything to help you, it's your problem". Something should be done to protect people from fuckheads, make them behave, or else kick them out of the project as far away as we can. But what we got is nothing (and nothing seems to be changing on this side).

Well, now it's not my problem anymore, it's someone else: in perfect Debian-style.

11 November 2009

Sandro Tosi: Another round of Google Wave invites

Big-G just gave me another number of invites for Wave: if you want one, just leave your gmail address as comment to this post (only here, it's easier).

UPDATE (@13.33 CEST): invites are finished, look at the list of those invited here.

9 November 2009

Jon Dowland: debian kernel contributors

Sandro Tosi writes to complain about Debian/Ubuntu members using their Ubuntu email address for Debian packages. zack responds, wondering what's wrong with that. I generally agree with Zack. However, back when Jon Corbet was producing summaries of kernel contributors (here's one for 2.6.23: Who wrote 2.6.23), I thought it was a shame that the many Debian contributors who work on the kernel were not represented. I suspect most Debian kernel hackers are paid to work on the kernel, and sign off their patches with an address at their employer's domain.

Sandro Tosi: Debian Whiteboard

How cool is that? Did you already tried it? if so, you already know, if not, well go and play with it soon!

Kumar introduced me (thanks!) to it, and now when I need to collaboratively edit a text, I do with that.

8 November 2009

Sandro Tosi: Things that make me angry

grrr

2 November 2009

Sandro Tosi: Google Wave Invites

Still looking for an invite to Google Wave? I got some, so give me your GMail address (either via email, IRC or as comment here).

UPDATE: invites are finished quite fastly - I'll repost when (if) they'll give me others.

18 October 2009

Christian Perrier: 4621 potential "spams" left to review for me

A few of us are working on spam removal from Debian lists archives. The wiki page linked above explains how to report spam on Debian mailing lists. This is in short as easy as bouncing a mail to a specific address, from your favourite MUA. These "reported spams" then need to be reviewed. Once a given message has been identified as "spam" by enough DD's (there are many false positives in the candidates, particularly in non English-speaking mailing lists), it is removed from the archives. Many mails have already been removed and any help is welcomed. Since Frans Pop launched this for debian-boot, back in May, I use 1 or 2 hours every Sunday to this work. After working on debian-boot only, I gradually worked on reported spams in other lists. As of now, I only have 4 lists where I still have work to do: The Chinese and the Spanish ones are tricky because identifying spam there is much less easy (for Chinese, I'm quite conservative and only tag very obvious spam....for Spanish, I read enough of the language to be able to target spam). What about you? Will you be able to help the few of us who work on getting clean archives (noticeably, Sandro Tosi, Giacomo Catenazzi, Cord Beermann, Luk Claes, Frans Pop, Bastian Blank, Luca Falavigna, Michael Koch, Bernd Steinmetz, Thoomas Viehmann, Florian Ernst, Adam D. Barratt, to name thos ewho reviewed more than 1000 mails)? Working on lists in your own language might be a good idea (I'm particularly thinking about lists in German, Spanish, Chinese and French).

Next.

Previous.