Part II

Filip Dabrowski's China 2004 Photo Gallery, Filip Dabrowski's Shanghai Photo Gallery, David Warren's China and Tibet Photo Gallery, Doug Janson's China Galleries, alvin's Hong Kong the City of Life Photo Gallery, Eddie Ling's Hong Kong Scenic Photo Gallery, micros' Hong Kong Photo Gallery, Roland's Hong Kong Photo Gallery, Owen Wong's Hong Kong Photo Gallery, H.L. Tam's Hong Kong Sketchbook Photo Gallery, Henry Ho's Red China Photo Gallery, Murtaza Amiji's Hong Kong Photo Gallery.

Happy GNU Year!

[image]

I just finished reading Paul Graham's book "Hackers & Painters". It was a very interesting read, worth my time. I especially enjoyed chapters "The Other Road Ahead", "How to Make Wealth", "Beating the Averages", and "Revenge of the Nerds". The last two have increased my will to master more Lisp/Scheme. I highly recommend this book.

So, I have switched my home system to Fedora Core 3. The migration took about one week and partly still continues as there are so many things to configure. I like the combination of the Linux kernel 2.6, udev, HAL, D-BUS, and GNOME 2.8. Now, when I plug my camera into the USB port, the system just asks me if I want to import the photos. This is so obvious, but still very cool :).

[image] GNU Anubis 4.0 is out!!

Finally, after two years of development process, we released a milestone version, 4.0. Here is the official annoucement, and here is a quick summary of the major changes:

  • The new authentication and authorization mode has been introduced, which does not require client machines to run an AUTH server (identd). It uses standard SMTP AUTH capability.
  • User's database can be kept on the server machine in any of the following formats: plain text, GDBM, MySQL, PostgreSQL.
  • The program is now extensible via Guile.
  • Configuration file grammar has been heavily improved. It features several new syntactical entities, allows nesting of conditional statements to arbitrary depth, and is easily extended using Guile.
  • Added test suite (make check).

No matter how perfect things are made to appear, Murphy's law will take effect and screw it up.

Oh well, it is likely that we'll have to postpone the 4.0 release, because of the serious problems with GNU SASL library 0.2.x. The API has changed heavily, and I can't remember so buggy software in a long time! Current version 0.2.2 doesn't work with Anubis, both while using an old API and while using the new. Fortunately, Sergey hacked it and found the bugs, so Simon should be informed tomorrow. Today I also updated GNU Bison 1.875e translation, but the TP-Robot's gone crazy and refused to cooperate. Bad luck today, sigh.

Yup, socks.c should be now fixed. I was thinking about removing it in a future and use only an external SOCKS library, but (uhm) can't find any with a proper project's home page and being completely free (GPL/LGPL). Am I googling wrong? For instance, Fetchmail supports some SOCKS libraries, but doesn't say anything about their source.

I wrote this:

in Java

import java.util.*;

class StackTest
{
    public static void main (String[] s)
    {
	Stack stack = new Stack ();
	stack.push ("a");
	stack.push ("b");
	stack.push ("c");

	Iterator itr = stack.iterator ();
	while (itr.hasNext ())
	    System.out.print (itr.next () + " ");

	System.out.println ();
	stack = null;
    }
}

and C#

using System;
using System.Collections;

class StackTest
{
   public static void Main ()
   {
       Stack stack = new Stack ();
       stack.Push ("a");
       stack.Push ("b");
       stack.Push ("c");

       IEnumerator e = stack.GetEnumerator ();
       while (e.MoveNext ())
	   Console.Write (e.Current + " ");

       Console.WriteLine ();
       stack = null;
   }
}

The result:

 $ javac StackTest.java
 $ java StackTest
 a b c

 $ mcs StackTest.cs
 $ mono StackTest.exe
 c b a

What the heck? This is confused, but I like more the .NET framework implementation. So, here is my own stack implementation: Stack.java alongside with the test program StackTest.java.

Okay, here is also a similar example in C++:

#include <iostream>
#include <string>
#include <list>

using namespace std;

int main ()
{
  list<string> stack;
  stack.push_back ("a");
  stack.push_back ("b");
  stack.push_back ("c");

  for (list<string>::const_iterator itr = stack.begin ();
       itr != stack.end (); itr++)
    cout << *itr << " ";
  cout << endl;
      
  for (list<string>::reverse_iterator itr = stack.rbegin ();
       itr != stack.rend (); itr++)
    cout << *itr << " ";
  cout << endl;

  return 0;
}
 $ g++ StackTest.cc -o StackTest
 $ ./StackTest
 a b c
 c b a

Notice that I didn't use <stack>, because it is a container adapter and it doesn't provide the iterators.