Source of Nothingness - 6789

* Menu

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

* 2007-02-21

擬似乱数生成器 Xorshift RNGs ってのを見つけた。
 http://lucille.atso-net.jp/blog/?p=9
書いてみる
(let ((x 123456789) (y 362436069) (z 521288629) (w 88675123))
  (defun xor128 ()
    (let ((a (logxor x (logand #xFFFFFFFF (ash x 11)))))
      (shiftf x y z w)
      (setq w (logxor (logxor w (ash w -19)) (logxor a (ash a -8)))))))

(dotimes (i 100)
  (format t "~8,'0x~%" (xor128)))

* clispcgi

URIのデコード・エンコードが一応完成。
感想メモ
・whileが無くてびっくり
xyzzy lispとの微妙な差が気になる
・(alphanumericp #\あ) => T ってなんだよ!?

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