表題の通りです。
msgpack-rust_はMessagePack_のRustによる実装の一つで、私が書いたものです。まだ実装していない機能が多いです。はい、がんばります。
表題の通りです。
msgpack-rust_はMessagePack_のRustによる実装の一つで、私が書いたものです。まだ実装していない機能が多いです。はい、がんばります。
作成者にもかかわらず、いきなり遅刻しました。ごめんなさい。`Rust Advent Calendar 2013`_、今からでも参加できますのでぜひ。
今日はRustの特徴を簡潔に紹介します。
これは`Teach Myself Lojban Advent Calendar 2013`_の1日目のコラムです。
最近、私はロジバン_ (Lojban) という人工言語に興味を持ったので、アドベントカレンダー[#]_を口実にロジバンについて学び、理解したことを日々文章に書き出し、この年末を過ごそうという企画。初日から大遅刻。先が思いやられる……。
| fn seq_lt<A: Eq + Ord, T: Iterator<A>>(mut a: T, mut b: T) -> bool { | |
| loop { | |
| match (a.next(), b.next()) { | |
| (None, None) => return false, | |
| (None, _ ) => return true, | |
| (_, None) => return false, | |
| (Some(x), Some(y)) => if !x.eq(&y) { return x.lt(&y) } | |
| } | |
| } | |
| } |
| cfg: build triple x86_64-unknown-linux-gnu | |
| cfg: host triples x86_64-unknown-linux-gnu | |
| cfg: target triples x86_64-unknown-linux-gnu | |
| cfg: host for x86_64-unknown-linux-gnu is x86_64 | |
| cfg: os for x86_64-unknown-linux-gnu is unknown-linux-gnu | |
| cfg: using gcc | |
| cfg: no node found, omitting docs | |
| cfg: no llnextgen found, omitting grammar-verification | |
| compile_and_link: x86_64-unknown-linux-gnu/stage0/lib/rustc/x86_64-unknown-linux-gnu/bin/rustc | |
| error: linking with `cc` failed with code 1 |
これは[Garbage Collection Advent Calendar 2012][gcac2012]の20日目の文書として @omasanori がPyPyのGCを解説する……はずでしたが、期日までに理解しきれませんでした。すみません。
そこで、ここでは私が現時点でどこまで理解できたか、これからどこを読んでいくか、という途中経過を記すことにします。GC初心者視点なのでGC上級者には物足りない文章になっていると思います。
[PyPy][pypy]はRestricted Python (RPython)と呼ばれるPythonのサブセットを中心としたインタプリタ実装ツールキットと、それを利用したPythonの処理系です。Pythonの処理系としての印象が強いですが、RPythonとツールキットの部分は他のインタプリタを実装するために利用することも可能です。
| ;;; See also | |
| ;; http://d.hatena.ne.jp/mkut/20111226/1324907006 | |
| ;; http://blog.livedoor.jp/dankogai/archives/51763038.html | |
| ;; My straightforward but naive solution. | |
| (defn naive-map-between | |
| [f coll] | |
| (lazy-seq | |
| (let [[x y] coll] | |
| (when (and x y) |
| ;;; bf.clj --- A Brainfuck interpreter written in Clojure | |
| ;; The idea to implement loop instructions without waste of stack | |
| ;; is borrowed from a interpreter by Blake Williams, available at | |
| ;; https://github.com/BlakeWilliams/Clojure-Brainfuck | |
| ;;; Data Constructors and Manipulators | |
| ;; TODO(omasanori): Consider writing a macro to remove duplication of code. | |
| (defn valid-address? | |
| "Returns true if `address` is valid, otherwise false." | |
| [address] |
| (ns generate-boundary) | |
| (defn- char-range | |
| "Returns a lazy seq of characters between `start` and `end`. | |
| Unlike clojure.core/range, `end` is included in the results. | |
| e.g. (= \9 (last (char-range \0 \9)))" | |
| [start end] | |
| (map char (range (int start) (inc (int end))))) | |
| (def ^:dynamic *characters* |