きのう書いたclojure x p5のスクリプトのなかで、激遅だったピクセル置き換えの部分がどーにもこーにも気にいらなかったので書きなおしてみた。 clojureは該当する処理部分を(time (...))みたいにしてあげればベンチがとれるのでべんりですね。 元 (dotimes [w width] (dotimes [h height] (if (= (.get app w h) @black) (do ;(println (aget (.pixels @pic) (+ (* h width) w))) (.set app w h (aget (.pixels @pic) (+ (* h width) w))))))) ;; => Elapsed time: 23393.167 msecs letで束縛 (dotimes [w width] (dotimes [h height] (if
昨日はコーヒー豆が切れたので、近くのコーヒー店に豆を買いに行った。 そしたら、そこには、JavaBeans大特価の看板がでかでかと出ていた。 JavaBeansって苦いんだよなぁーと、敬遠しましたよ。 どのぐらい苦いかと言うと、、、まだ、私がMac使いだった頃、鳴り物入りで Java 1.01が出たんです。苦労して落としてきて、起動してみましたが、余りの 遅さに即、ごみ箱へ叩きこみましたよ。 それから、時代は経過し、女房用のWindows機が搬入された時、Ecripseを入れて みましたが、こやつも起動したら、タバコを吸いに行くのが常体と成りました。 それで、余り使う事もなく、時間が経過し、、 どこからか、JavaBeansがいいらしいと聞きつけ、入れてみましたが、やっぱり 遅い。 それ以来、JRE環境を除いて、全てのJava開発環境を捨ててしまいました。 JREは、時々Netをうろうろし
In this episode I continue of discussion of decorators, and see how they are related to higher order functions. You can find my decorator library here: github.com/francoisdevlin/Decorate
anything で "echo $HOME" と打とうとして, "H" が入力できずに困りました. これは, anything-map の値を設定しているところで, anything-select-with-digit-shortcut に A, S,D,などが使われるようになったのが原因です.本体の該当箇所を以下のようにコメントアウトし, バイトコンパイルしなおせば大文字が入力できます. ;; (define-key map (kbd "A") 'anything-select-with-digit-shortcut) ;; (define-key map (kbd "S") 'anything-select-with-digit-shortcut) ;; (define-key map (kbd "D") 'anything-select-with-digit-shortcut) .
I haven't posted here much recently because I've been hacking on another recently-sort-of-completed website. One of my favorite hobbies is old 8-bit video games. The first thing I ever programmed was a website about Final Fantasy for the old NES, and I've fiddled with it for the past 10 years or so. A while back I decided to rewrite the whole thing using Clojure + Compojure with data in mysql. Thi
ググッても誰もやってなさそうだったので。 id:m2ymさんのauto-completeをslimeで使ってみる試み。 auto-completeインストール後、.emacsに以下を追加。 (defvar ac-slime-modes '(lisp-mode)) (defun ac-slime-candidates () "Complete candidates of the symbol at point." (if (memq major-mode ac-slime-modes) (let* ((end (point)) (beg (slime-symbol-start-pos)) (prefix (buffer-substring-no-properties beg end)) (result (slime-simple-completions prefix))) (destruct
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く