This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## --with-libiconv と --with-projdir を省略するとだめだった。特に iconv の方はハマりどころ。 | |
## | |
$ ./configure --with-libiconv=/usr/local --with-projdir=/usr/local | |
checking build system type... x86_64-unknown-freebsd9.1 | |
checking host system type... x86_64-unknown-freebsd9.1 | |
: (中略) | |
enabling PostgreSQL extension support... | |
configure: creating ./config.status | |
config.status: creating GNUmakefile | |
config.status: creating extensions/Makefile |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"> | |
<meta name="apple-mobile-web-app-capable" content="yes"> | |
<style type="text/css"> | |
html, body, #map { | |
margin: 0; | |
width: 100%; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
user=> (import 'java.io.File) | |
user=> (File. ".") | |
#<File .> | |
user=> (def curdir (File. ".")) | |
#'user/curdir | |
user=> curdir | |
#<File .> | |
user=> (.list curdir) | |
#<String[] [Ljava.lang.String;@33d6798> | |
user=> (seq (.list curdir)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/misaki/config.clj b/src/misaki/config.clj | |
index ee06fbe..dfffb85 100644 | |
--- a/src/misaki/config.clj | |
+++ b/src/misaki/config.clj | |
@@ -57,8 +57,6 @@ | |
(declare ^:dynamic *post-sort-type*) | |
;; Compile options for ClojureScript | |
(declare ^:dynamic *cljs-compile-options*) | |
-;; Current site data | |
-(declare ^:dynamic *site*) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/project.clj b/project.clj | |
index 99624f3..5b53fba 100644 | |
--- a/project.clj | |
+++ b/project.clj | |
@@ -9,6 +9,7 @@ | |
[clj-time "0.3.7"] | |
[clj-text-decoration "0.0.1"] | |
[clj-pretty-error "0.0.5"] | |
+ [clj-gntp "0.0.1"] ; https://github.com/mattn/clj-gntp | |
[uochan/watchtower "0.1.2"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# http://d.hatena.ne.jp/haru-s/20110405/1302006637 に答えがそのままあるが、一応メモ | |
# github fork 追従 で見つけた | |
$ git remote | |
origin | |
# 本家のリモートリポジトリの短縮名を登録する. | |
$ git remote add github git://github.com/liquidz/misaki.git | |
# 本家の更新をローカルで反映させる. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; @___otabat___ さんのツイート https://twitter.com/___otabat___/status/230890089218195456 | |
;; より引用 | |
;; 「Clojureでmapリテラルを使うとき、8対目まではarray-map、9対目からhash-mapに変わるなどデータと内部実装が異なるのは注意。」 | |
;; を試してみた。 | |
user=> (class {:a 10 :b 20}) | |
;= clojure.lang.PersistentArrayMap | |
user=> (class {:a 10 :b 20 :c 30 :d 40 :e 50 :f 60 :g 70 :h 80}) | |
;= clojure.lang.PersistentArrayMap (:a〜:h 8対まで) | |
user=> (class {:a 10 :b 20 :c 30 :d 40 :e 50 :f 60 :g 70 :h 80 :i 90}) | |
;= clojure.lang.PersistentHashMap (:a〜:i 9対、PersistentHashMap に変わった!!) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn print-logger | |
[writer] | |
#(binding [*out* writer] | |
(println %))) | |
(def *out*-logger (print-logger *out*)) | |
;= #'user/*out*-logger | |
(*out*-logger "hello") | |
; hello | |
;= nil |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; Clojure Programming Chapter 2. Functional Programming | |
;;; Example 2-1. Implementation of a mutable integer in "Clojure" | |
(defprotocol IStatefulInteger | |
(setInt [this new-state]) | |
(intValue [this])) | |
(deftype StatefulInteger [^{:volatile-mutable true} state] | |
IStatefulInteger | |
(setInt [this new-state] (set! state new-state)) | |
(intValue [this] state) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; http://melborne.github.com/2012/07/12/object-repeat-take-care-of-sequence/ | |
;;; を Clojure でやってみた。 | |
;;; 9.、10. は挫折www | |
;;; 2012/07/16 11:02 追記:9.、10.についての解答をtnoda さんが作成されました。 | |
;;; https://gist.github.com/3111930 の 9.、10. になります。 | |
;;; 1. 初項1、公差2の等差数列の最初の20項を求めなさい。 | |
(take 20 (iterate #(+ % 2) 1)) | |
;;; => (1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39) |