There’s no place like ::1

My ‘Uniq’ Has Problems…

| Comments

krani1@0x82:~/router/logs/archive$ ls
auth.log.1 crond.1 errors.log.1 iptables.log.1 mail.log.1 store.log.2 user.log.2
auth.log.2 crond.2 errors.log.2 iptables.log.2 messages.log.1 syslog.log.1
cache.log.1 daemon.log.1 everything.log.1 kernel.log.1 messages.log.2 syslog.log.2
cache.log.2 daemon.log.2 everything.log.2 kernel.log.2 store.log.1 user.log.1
krani1@0x82:~/router/logs/archive$ ls | cut -f1 -d'.' | head
auth
auth
cache
cache
crond
crond
daemon
daemon
errors
errors
krani1@0x82:~/router/logs/archive$ ls | cut -f1 -d'.' | sort | uniq | head
auth
auth
cache
crond
daemon
errors
everything
iptables
kernel
mail

Can someone please explain me the double auth??

UPDATE: Thank you Alberto for the tip on the comment. I owe you a launch…

Beatles in C

| Comments

When I find my code in tons of trouble, Friends and colleagues come to me, Speaking words of wisdom: "Write in C."

As the deadline fast approaches, And bugs are all that I can see, Somewhere, someone whispers" "Write in C."

Write in C, write in C, Write in C, write in C. LISP is dead and buried, Write in C.

I used to write a lot of FORTRAN, for science it worked flawlessly. Try using it for graphics! Write in C.

If you've just spent nearly 30 hours Debugging some assembly, Soon you will be glad to Write in C.

Write in C, write in C, Write In C, yeah, write in C. Only wimps use BASIC. Write in C.

Write in C, write in C, Write in C, oh, write in C. Pascal won't quite cut it. Write in C.

HellaNZB Patch for Libnotify Daemon

| Comments

I was bored and tried to implement a feature I wanted for a few time on Hellanzb.

On MacOS you have Growl, and on Linux you have libnotify daemon. If you run a decent distribution and GNOME you probably got it running.

So my patch adds a option to enable notifications to this daemon. If the user enables this option he must have the notify-python bindings installed (my patch check for the module and exits with a nice error if the user does’t have it).

If everything goes smoothly the user should receive the same notifications as a MacOS user receives with Growl.

The link to the ticket is here .

UPDATE: The patch was applied on r994 :D :D Sweeeeeeet :D

ANTLR2 Sucks… ANTLR3 Forever

| Comments

This weekend I was trying to implement a simple PHP parser for my WebAppViewer project (more on that later).

Since the project is written in Java, we decided to use ANTLR2 for parsing purposes. After messing around with it (and being used to LR parsers), I went nuts because every single line of grammar I wrote had conflicts.

Just before going completely crazy, I decided to give ANTLR3 a try.

The real difference is that ANTLR2 is a LL(k) parser. On the other hand, ANTLR3 is a LL(*) parser. This means that the parser may do infinite LookAheads to do the disambiguation, and therefore, my grammar started working :)

So for you that don’t like LL grammars, dump ANTLR2, and adopt ANTLR3.

More info on ANTLR3 here

Linux Filesystems Without Permissions?

| Comments

I’ve got a new 2Gb pen drive. It will mostly be used on Linux, but on different machines. So I wanted a filesystem that is better than FAT.

This is not too difficult, but I’ve found that because of the UNIX permissions on filesystems like EXT2 or ReiserFS, it makes the use of the filesystem on multiple systems useless.

I’ve tried to Google about this, but came without any answer…. I really don’t want to go back to FAT. So my solution (for now) is to chmod -R 777 /mnt/pen. This (seems) to work, but more testing needed.

Anyone got a better solution?