Source of Nothingness - directory

* Menu

[[About:self:AboutPage.txt]] | [[Profile:file/southly/]] | [[まとめ:self:1163859357.txt]] | [[オリジナル:http://ninjinix.x0.com/rn/]] | [[xyzzy:lisp/]] | [[あんてな:listall]] | [[■:lisp]] | [[buzz:files/southly#buzz]]

* 2010-02-28 :

; #<PACKAGE "ASDF1">
; registering #<SYSTEM SB-GROVEL {B4F1921}> as SB-GROVEL
;
; compilation unit aborted
;   caught 1 fatal ERROR condition

Error running init-common-lisp-controller-v4: Lock on package SB-IMPL violated
                                              when interning NATIVE-FILE-KIND.
See also:
  The SBCL Manual, Node "Package Locks"

--- /usr/share/common-lisp/source/common-lisp-controller/post-sysdef-install.lisp~      2010-02-28 17:58:19.000000000 +0900
+++ /usr/share/common-lisp/source/common-lisp-controller/post-sysdef-install.lisp       2010-02-28 18:01:36.000000000 +0900
@@ -61,7 +61,7 @@
 #+sbcl
 (defun get-owner-and-mode (directory)
   (when (eq :directory
-           (sb-impl::native-file-kind (namestring directory)))
+           (sb-unix::unix-file-kind (namestring directory)))
     ;; check who owns it
     (multiple-value-bind (res dev ino mode nlink uid gid rdev size atime mtime)
        (sb-unix:unix-stat (namestring directory))
で、以下を実行。
$ sudo dpkg-reconfigure common-lisp-controller

* 2008-11-17 :

[[(ReadMore...) index.rb?1226934821.txt]]

* memo : apacheの設定メモ

userdirを使えるようにするために毎回調べているのでメモ。
cd /etc/apache2/mods-enabled/
ln -s ../mods-available/userdir.conf .
ln -s ../mods-available/userdir.load .

cgiやら.httacessやらを許可するためにuserdir.confの方を書き換える。
面倒なので両方Allで。
<IfModule mod_userdir.c>
        UserDir public_html
        UserDir disabled root

        <Directory /home/*/public_html>
                AllowOverride All
                Options All
        </Directory>
</IfModule>

参考: http://x68000.q-e-d.net/~68user/webcgi/server-config.html

* memo : clispさくらインターネットにインストール

clispはサーバーのOSバージョンが上がっても動いていたけど、clispの方もバージョンが上がっているので入れなおしてみた。
いまいちうまくいっていないのでもう一回入れなおそう。

必要なライブラリであるlibsigsegvがきっちり認識されない。
libsigsegvはコンパイルはできるがチェックでエラーが出る状態。
$make check
Making check in src
Making check in tests
make  check-TESTS
Test passed.
PASS: sigsegv1
Test passed.
PASS: sigsegv2
FAIL: stackoverflow1
FAIL: stackoverflow2
===================
2 of 4 tests failed
===================
*** Error code 1

Stop in /home/raido/local/src/libsigsegv-2.5/tests.
*** Error code 1

Stop in /home/raido/local/src/libsigsegv-2.5/tests.
*** Error code 1

Stop in /home/raido/local/src/libsigsegv-2.5.

ということで --ignore-absence-of-libsigsegv を追加して作成。
本当は --with-module=bindings/glibc も指定する予定だったけれどうまくいかず、結局以下のような感じでインストール。

cd local/src/
wget http://ring.sakura.ad.jp/archives/GNU/clisp/release/2.43/clisp-2.43.tar.bz2
tar xf clisp-2.43.tar.bz2 
cd clisp-2.43
./configure --ignore-absence-of-libsigsegv --prefix=$HOME/local --with-module=rawsock --with-module=wildcard
cd src/
make
make check
make install

できあがった物。
$ clisp --version
GNU CLISP 2.43 (2007-11-18) (built 3410886803) (memory 3410887057)
Software: GNU C 3.4.4 [FreeBSD] 20050518 
gcc -g -O2 -Igllib -W -Wswitch -Wcomment -Wpointer-arith -Wimplicit -Wreturn-type -Wmissing-declarations -Wno-sign-compare -O2 -fexpensive-optimizations -falign-functions=4 -DUNICODE -DDYNAMIC_FFI -DNO_GETTEXT -DNO_SIGSEGV -I. -x none libavcall.a libcallback.a -lreadline -lncurses 
SAFETY=0 HEAPCODES STANDARD_HEAPCODES SPVW_BLOCKS SPVW_MIXED TRIVIALMAP_MEMORY
libreadline 5.0
Features: 
(READLINE REGEXP SYSCALLS I18N LOOP COMPILER CLOS MOP CLISP ANSI-CL COMMON-LISP
 LISP=CL INTERPRETER SOCKETS GENERIC-STREAMS LOGICAL-PATHNAMES SCREEN FFI
 UNICODE BASE-CHAR=CHARACTER PC386 UNIX)
C Modules: (clisp i18n syscalls regexp readline)
Installation directory: /home/raido/local/lib/clisp-2.43/
User language: ENGLISH
Machine: I386 (I386) www658.sakura.ne.jp [59.106.19.88]

* xyzzy : gtags.l

たかだか3つの関数のためにemacs.lに依存するのはもったいないと思ったので、てきとーに実装してみました。
GPLなんですしemacs.lからもってくるのもありかと。
マイナーモードにする関数はed::toggle-modeを使いましょう。それでelisp::prefix-numeric-valueは不要になります。

(defun count-line(beg end)
  (if (eql beg end)
      0
    (1+ (- (save-excursion
             (goto-char end)
             (when (eql (preceding-char) #\LFD) (backward-char))
             (current-line-number))
           (save-excursion
             (goto-char beg)
             (current-line-number))))))

(defun expand-file-name (file &optional (dir (default-directory)))
  (merge-pathnames file dir))

[[(ReadMore...) index.rb?1196394719.txt]]

* editorパッケージのbuiltin関数

以下で調べて652個
(let ((count 0))
  (do-symbols (sym (find-package "editor") (format t "~%count: ~d~%" count))
    (when (and (not (find-symbol (symbol-name sym) "lisp"))
               (fboundp sym)
               (si:*builtin-function-p (symbol-function sym)))
      (format t "~a~%" sym)
      (incf count))))
[[(ReadMore...) index.rb?1164371462.txt]]

* xyzzy : WSHでxyzzy起動