Daily blurbs Dec. 2002

Plans

daily blurbs


31 Dec 2002

21:58:27 # Today's hack Some elisp code to update mozilla display when editing in emacs.

(defun dancer-html-preview-moz-page ()
  "Call mozilla for preview of current page"
  (interactive)
  (save-buffer)
  (call-process "mozilla" nil "*moztmp*" nil "-remote" (concat "openfile(" buffer-file-name ")" )))

(defun dancer-html-post-command-hook-preview-moz-page-internal ()
  "Call mozilla if current file is HTML and modified,
use this function with (add-hook 'post-command-hook 'dancer-html-post-command-hook-preview-moz-page-internal)
"
  (if (local-variable-p 'dancer-html-preview-moz-page-tic)
      t
    (make-local-variable 'dancer-html-preview-moz-page-tic))
  (if (eq major-mode 'html-mode)
      (let* ((curval (buffer-modified-tick)))
	(if (and (boundp 'dancer-html-preview-moz-page-tic) (= curval dancer-html-preview-moz-page-tic))
	    t
	  (setq dancer-html-preview-moz-page-tic curval)
	  (dancer-html-preview-moz-page)))))
	

30 Dec 2002

13:44:52 # Life I'm now back, and things are looking better now...

20:59:12 # dinstall/dupload sted2, translate-docformat, and beast are now orphaned.

20:59:27 # Today's hack I hacked on libretto and made some changes to my kernel, updating patches to 2.4.20.

22:18:45 # web maintenance Updated and added libretto page in English. It is a link page for the files that I use for libretto, and on my machine.

27 Dec 2002

10:30:57 # Life Power failure in University for 2 days from tomorrow.

23 Dec 2002

15:40:28 # dinstall/dupload Fixed gs version seems to have finally appeared.

20:14:09 # Today's hack I have tracked down to the fact that advi loads /etc/advirc and ~/.advirc and ~/.advi/advirc, and userfile.ml seems to be the one which does that.

(* User preferences. *)
let default_init_file0 = "/etc/advirc";;
let default_init_file1 = tilde_subst "~/.advirc";;
let default_init_file2 =
  tilde_subst (Filename.concat default_user_advi_dir "advirc");;
	

20:41:06 # Life and I hacked, to find the culprit:

--- advi-1.2.0-orig/userfile.ml 2002-05-15 22:14:41.000000000 +0900
+++ advi-1.2.0/userfile.ml      2002-12-23 20:40:27.000000000 +0900
@@ -101,7 +101,7 @@
 
 let default_user_advi_cache_dir = Filename.concat (Unix.getcwd ()) ".advi";;
 let advi_cache_dir = ref default_user_advi_cache_dir;;
-let set_advi_cache_dir s = advi_cache_dir := s;;
+let set_advi_cache_dir s = advi_cache_dir := tilde_subst s;;
 
 Options.add
  "-cache-dir"
	

21:17:10 # research My masters thesis paper is progressing very slowly. And I need to write about Genetic Algorithm ... This is probably the hardest part.

22 Dec 2002

19:51:26 # Life I've been playing with hevea and build scripts for whizzytex, and there seem to be a lot of things that are broken and needs fixing. It's rather enjoyable.

20 Dec 2002

17:23:15 # dinstall/dupload I fixed mpich build scripts slightly today. I'll try and get things reflected to upstream, but it's rather a tedious job.

19 Dec 2002

17:40:44 # Life I'm listening to Enigma all day. I code, and I write. My thesis is progressing. That is good. Thesis writing has too much editorial and semantic details to play with, which is rather painful to do.

18 Dec 2002

20:12:05 # Life rootstrap is not working pretty well on me. debootstrap stops while downloading... I wonder what problem it is.

17 Dec 2002

17:24:00 # Today's hack Hack on mpich libslog building. It seems to be a big pain and a big mess, really.

23:08:17 # Today's hack I did my mpich package. This is badly timeconsuming. How long did I work at it ??? Really...

16 Dec 2002

20:41:30 # Life ecasound package is broken, doh.

14 Dec 2002

15:05:10 # Today's hack I've hacked up a script to draw graph of CVS activity. It felt hopeful but doesn't look very good or interesting.

17:39:25 # Today's hack Script to copy .changes file and files related to them to /home/dancer/pending/$date


(defun copy-today-pending (original-filename)
  (interactive "f.changes file name: ")
  (let* ((directory-name (concat "/home/dancer/pending/" (format-time-string "%Y%m%d/")))
	 (source-dir-name (file-name-directory original-filename))
	 (debug-on-error t))
    (if (file-accessible-directory-p directory-name)
	t
      (make-directory directory-name))
    (set-buffer (find-file-noselect original-filename t nil))
    (goto-line 1)
    (re-search-forward "^Files:")
    (next-line 1)
    (beginning-of-line)
    (copy-file original-filename (concat directory-name (file-name-nondirectory original-filename)) t t)
    (while (re-search-forward "^ [0-9a-z]+ [0-9]+ [a-z]+ [a-z]+ \\(.*\\)$" nil t)
      ;; copy files that are found.
      (let* ((target-filename (match-string 1)))
	(copy-file (concat source-dir-name target-filename)
		   (concat directory-name target-filename) t t)))))
	

21:17:01 # Life Writing masters thesis now.

13 Dec 2002

16:17:24 # dinstall/dupload libpng3 security patch was broken. I didn't manage to get a good testing of it. Too bad.

20:42:21 # Life Fight with libasound2. Its activities seem to have changed.

20:54:22 # Today's hack Wrote a patch for sysstat, for many things that I think is wrong.

21:46:50 # Life hacked alsa enough to work. I made a symlink /dev/snd to /proc/asound/dev.

12 Dec 2002

16:05:32 # dinstall/dupload openoffice.org is available in Debian now and is possible to make it work almost immediately.

18:05:26 # Today's hack Finally found the SRC.RPM from RedHat newt. It seems to be slightly changed, and it seems like the SONAME has changed also. The sources have diverged largely. On either side, old newt, Debian newt, and RedHat newt, they are diverged and diff is large enough. I have a feeling that Debian newt is more patched than the new RedHat upstream release.

18:53:27 # Today's hack I confirmed that pbuilder with --internal-build-uml is able to do building without tarring up and untarring.

8 Dec 2002

19:47:25 # Life Read up on debian-gcc and debian-glibc lists. It seems like there are a few problems with sparc64, but other things are improving. It might be that we can have a glibc 2.3 an gcc 3.2 working soon, so that we can seriously consider working with a gcc 3.2 transition. Considering that we only have a properly working gcj for gcc 3.2, and not for 2.95, it would be a large benefit.

7 Dec 2002

19:38:13 Life JNI links 1 2 3 4

I created a simple program test.java

package jp.ac.doshisha.mikilab;
import java.io.*;
public class test
{
    static {
	System.loadLibrary ("test");
    }
    public static native int testhoge(int n);
}
	

and I did

	  gcj-3.2 test.java
	  gcjh-3.2 -jni test
	

It generates a test.h, which requests for extern jint Java_jp_ac_doshisha_mikilab_test_testhoge (JNIEnv *env, jclass, jint); which I have no clue as to what jint means, but probably is just an int. and I make some code:

/* some test code. */
#include "test.h"

jint Java_jp_ac_doshisha_mikilab_test_testhoge (JNIEnv *env, jclass something, jint value)
{
  return value + 1;
}

	

and some makefile

libtest.so: libtest.c
	gcc-3.2 -shared libtest.c -o libtest.so
	

and I can compile with gcj-3.2 -fjni -c test.java. I coded an example using program:

import jp.ac.doshisha.mikilab.test;

public class usetest {
    public static void main (String args[])
    {
	System.out.println(test.testhoge(1));
    }
}
	

gcj-3.2 usetest.java -fjni --main=usetest jp/ac/doshisha/mikilab/test.java seems to be a good start.

20:40:59 # Today's hack The collection is now added to my today's junk. I've successfully worked around problems and created something useful at last. Or rather, something that works

21:54:27 # Life I tried to benchmark JNI, and it told me that on my Athlon system I can call a JNI function 1000000 times a second.

$  cat usetest.java 
import jp.ac.doshisha.mikilab.test;

public class usetest {
    public static void main (String args[])
    {
        for (int i = 0; i < 100000000; i++)
                test.testhoge(1);
    }
}
$ time make run 
LD_LIBRARY_PATH=. ./test

real    1m49.958s
user    1m49.900s
sys     0m0.000s
	

6 Dec 2002

20:25:40 Life My main system is back again. It is probably functioning. I have two hard disks in my computer now, for backing up my system.

5 Dec 2002

16:38:27 Life My main desktop machine failed, and broke down. I am having difficulty trying to restore that machine now. I need some hardware. Harddisk failed, and there was quite a few data installed on that machine. The damage is rather large, and it will probably take a while for me to get back to grips with everything that I used to do.

On the other hand, I have come to improve my configuration bootstrapping scripts, so, maybe the next time I will be more quick in recovering my configuration from CVS.

18:32:36 Life This is daunting task. I've been spending my day to set up this backup note PC. This is silly. I need to recover my main machine, really.

4 Dec 2002

15:17:53 dinstall/dupload ecawave should be fixed, I updated.

15:36:11 Life procps source code made me giggle for a bit, and then left me a feeling a bit annoyed. Especially the top.c and README.top

1 Dec 2002

15:22:25 Life gnome2 is losing my configuration every time. It tells me that it cannot find its panel for some reason. This is immensely annoying. panel is re-set every time, and nautilus seems to be somewhat stuck forever. sigh...

16:13:05 Life xosd seems to have upgraded, and hotkeys package seems to be broken again, or is it ?

17:06:16 Life My new keyboard


Junichi Uekawa

$Id: 200212.html.en,v 1.44 2002/12/31 14:17:54 dancer Exp $