Filtered by Linux

Page 13

Reset

Distributed compiling with distcc

May 9, 2004
1 comment Linux

distcc is a server-client program by the people behind "Samba"n:http://www.samba.org/ that allows compilation of C, C++, Objective C and Objective C++ to happen spread out on many computers, i.e. distributed. The daemon can be run on computers that have different processor as the one you're on. They can even be different operating systems.

The friend who told me about this had tried it to compile the latest Linux kernel. By using two workstations and his laptop he was able to do it in one fifth the time it usually takes. That's pretty damn impressive!

I really like distributed computing but my UNIX-foo is not good enough to use it without shooting myself in the foot all the time. But one thing I wonder. When you as a C developer sit and work on a big program, don't you mostly compile one single file that you're working on with its necessary header files? distcc seems to be more suitable for large compilations, not one at a time.

Heil Jed and Dave Kuhlman

May 9, 2004
1 comment Linux

I've said it before but I have to say it again: jed rocks! Now even more thanks to Dave Kuhlmans SLang script. (jed is a text editor that makes Emacs look like a space shuttle and MS Word like a snail)

Granted that this is more for programming than to write a book but it's still worth noting. I can now with one key command search backwards and forwards on the word that the cursor is currently at. The alternative before was to start searching and on the dialog you write the word that you're looking for. What a waste of time! Plus, with the old way it happens often that you misspell the word you intend to find. This is ideal when you're programming because you often want to inspect where a variable or a function is coming from or how it will be used. I suspect that it will take some getting used to but it was the same story for the emacs bindings and now they are second nature.

Truncated! Read the rest by clicking the link below.

PostgreSQL, MySQL or SQLite

April 4, 2004
9 comments Linux

I use PostgreSQL a lot but these benchmarking results surprise me. MySQL is often much faster than PostgreSQL and SQLLite is several times faster than MySQL.

What matters to me is how fast they work with Python, or in particular Zope. I need to make my own benchmark of MySQL and PostgreSQL with Zope and all the various database adapters.

The reason I moved from MySQL to PostgreSQL was partly because PostgreSQL has more enterprise features and that my colleges use PostgreSQL. But I suspect that for many of my projects I never even use these features.

Then I also found this from a Zope mailing list:

>The speed comparisions with PostgreSQL are very much an apples vs. fish
>sort of thing: the pgsql server was not tuned at all, and does a whole
>lot more that was never tested, such as multi-user writer access.

CPU info

March 2, 2004
0 comments Linux

"Adam Horner"n:http://www.salmagundi.org.uk/ showed me how to check, on a linux system, information about the CPU make and model on the command line:


$ cat /proc/cpuinfo

I write it down so I don't forget. Note that this is on the command line, i.e. when you don't even have a graphical interface.

Running this on the very server I serve these pages:


peterbe@compaqpete:~$ cat /proc/cpuinfo
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 8
model name      : Celeron (Coppermine)
stepping        : 6
cpu MHz         : 699.106
cache size      : 128 KB
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 2
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 
sep mtrr pge mca cmov pat pse36 mmx fxsr sse
bogomips        : 1392.64

Not very impressive is it. A 700Mhz Celeron. At least it's possible to run Zope, Squid and Apache on it.

Why Sun should Open up on Java

February 18, 2004
1 comment Linux

"In an open letter to Sun, Eric S. Raymond, president of the Open Source Initiative, attacks Sun's tight control of Java, even though the firm has recently made positive comments on open source software."

A good news article about why "Eric S. Raymond"n:http://www.catb.org/~esr/ thinks Sun should go open source with the Java programming language. This next thing struck me:

"Open source is hardly a zero revenue model; ask Red Hat, which had a share price over triple Sun's when I just checked," wrote Raymond.

Adding a year in PostgreSQL

February 4, 2004
1 comment Linux

Finally I found it. How to add one year to a date in PostgreSQL


SELECT 
 date('now') + interval '1 year' AS today_in_one_year,
 date '2003-12-13' + interval '1 year' AS my_next_birthday ;

Both return a TIMESTAMP type.

Grep in Jed

January 27, 2004
1 comment Linux

What I really miss about Jed (my favourite editor by far) is to be able to search many files with one single simple command. Currently, I have to exit Jed every time and use grep to do the search, then enter Jed again to redo the search on the file I found out about from grep.

Anyway, now I found this jed mode file. I haven't installed it yet but will shortly. It sets out to integrate the two.

"A jed fronted to the grep command. Start a search from within jed or from the command line and display the result nicely in a jed buffer. Jump to the findings pressing Enter or with double click. Copy, move or delete files. Replace text across the grep results."

Truncated! Read the rest by clicking the link below.

Keybinding ALT-F in Jed

January 27, 2004
1 comment Linux

In the basic setup of jed when you press ALT-F (i.e. Alt key at the same time as letter "f") it opens the File menu. I didn't want that. I wanted it to be like in Emacs where ALT-F means skip-word.

The README said to set ALT_CHAR = 27; like this FAQ said. Well, that didn't work. After some more google searching I found out how to do it!:


() = evalfile("emacs");           % Emacs-like bindings

Now it works like I think it should. I write it here because I'll probably forget for the next time.

Jed is the editor I use the most when not working in a graphical environment. Almost all of the code to this website has been developed using jed.

Dabbrev in Jed

January 26, 2004
0 comments Linux

dabbrev is a plugin for Jed that allows you to repeat a word that has been written before with a simple key-command.

Suppose you write somewhere in your text the word: SelectHDSDirectories_sql. Then a little later you intend to write that word again, but can't be asked to type it all out, then all you do is write Sel and press CTRL-Q (i.e. Ctrl button at the same time as the key q) and it finishes the word for you.

Truncated! Read the rest by clicking the link below.

Crontab wizard

January 13, 2004
2 comments Linux

This little nifty web application lets you create crontab syntax through a nice a interface. I'm quite a beginner with crontabs so I think I'll hold on to this URL.

I've recent discovered pycron which is a free crontab gui for windows written in Python