* Menu
[[About:self:AboutPage.txt]] | [[Profile:file/southly/]] | [[まとめ:self:1163859357.txt]] | [[オリジナル:http://ninjinix.x0.com/rn/]] | [[xyzzy:lisp/]] | [[あんてな:listall]] | [[■:lisp]] | [[buzz:files/southly#buzz]]
page 0 - << : 0 : >>
* xyzzy lisp :
こんなのを用意してみた。
cronがちゃんと働けば、一日3回更新チェックをするはず。
cronがちゃんと働けば、一日3回更新チェックをするはず。
(defun ni::add-site-from-raido () (interactive) (ni::load-site-data) (mapcar (lambda (x) (ignore-errors (ni::site-add x))) (set-difference (let ((stream (ni::http-get-url "http://raido.sakura.ne.jp/southly/lisp/ni/ni-status.txt"))) (do* ((line (read-line stream nil nil) (read-line stream nil nil)) (r nil)) ((not line) (nreverse r)) (unless (string-matchp "^\\(4[0-9][0-9]\\|NIL\\)" line) (push (second (split-string line " ")) r)))) (mapcar (lambda (x) (cdr (assoc "src" x :test #'equal))) ni::*site-data*) :test #'string=))) (define-key ni::*site-map* #\N 'ni::add-site-from-raido)
- 2008-02-06 : タイムアウトしているときは除外しましょうということで修正
* 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]]
* 適当すぎる
[[(ReadMore...) index.rb?1162458380.txt]]
* xyzzy lisp : なんとなく
(defun sort-by-column-region (beg end &optional (f #'<)) (interactive "*r") (let ((lines (split-string (buffer-substring beg end) #\LFD t)) (pred #'(lambda (x y) (funcall f (length x) (length y))))) (setq lines (sort lines pred)) (goto-char (min beg end)) (delete-region beg end) (insert (format nil "~{~A~%~}" lines))))
* clispでcgi
とりあえずで作ったsplit-string
ファイルの入出力のときに「Bad address」のエラーが出ているみたい。
一応入出力には成功しているんだけど。
日本語関係をちゃんとすれば簡単な一行掲示板になるかな。
[[(ReadMore...) index.rb?1142181148.txt]]
(defun split-string (string &optional (separator " ")) (let ((n (position separator string :test #'(lambda (x y) (find y x :test #'char=))))) (if n (cons (subseq string 0 n) (split-string (subseq string (1+ n)) separator)) (cons string nil))))あとで末尾再帰へ書き直ししないと。
ファイルの入出力のときに「Bad address」のエラーが出ているみたい。
一応入出力には成功しているんだけど。
日本語関係をちゃんとすれば簡単な一行掲示板になるかな。
[[(ReadMore...) index.rb?1142181148.txt]]
page 0 - << : 0 : >>