Web にアクセスするプログラムを書いていると良く JSON というデータを扱う ことがあります。JSON とは世間で何と言われているかわかりませんが OCaml では: type t = | String of string | Number of float | Object of obj | Array of t list | Bool of bool | Null and obj = (string * t) list 簡単ですね。まあ S式に毛の生えたようなものです。 型の無い世界の人はこの簡単な型でもって、何でもかんでも表現しているみたい。 例えば、このデータは必ず整数リストだという仮定があっても JSON では本当に データが整数リストであるか、どうか、確かめなきゃいけない。大変ですねー。 じゃあ OCaml だと楽かというと、やっぱり大変です。 JSON のデータをパースし
1. ガイド¶ あなたがOMakeを始めて使うのであれば、 2. OMakeクイックスタートガイド はどのようにプロジェクトを始めるべきなのかについて、簡単に説明してくれるでしょう。 3. OMakeビルドサンプル ではプロジェクトをビルドするための、より詳細なコードサンプルを紹介しています。そして 4. OMake言語の概要と構文 では実際にプログラミングするときに役立つ、いくつかの一例を紹介しています。 1.1 注意事項¶ OMakeマニュアル 日本語訳 v1.3.2 このドキュメントは OMake バージョン0.9.8.6の マニュアル を日本語訳したものです。原文のニュアンスを忠実に翻訳するよう心がけていますが、意図しない翻訳ミスやドキュメントの不備があるかもしれません。よって、 内容の正確さについて保証することはできません。 2. クイックスタート OMakeを利用するためのクイ
_ OSXへOCamlの開発環境構築し直した 今年はOCamlの4.0系が出たり、opamというかなりイケてるパッケージ管理システムが出て来たりしたので、 OCamlの開発環境を作り直した。 typerex というのも今年出たので気になってるんだけど、私の環境では3.12.1ではビルドが通らないし、 4.00.1だとビルドは通るけど、emacsとサーバーが通信始めると例外が起きるので、様子見中。 というわけで、相変わらずtuaregなのであった。 前提とする環境は以下。 MacBook Air 11inch 2012 OSX 10.7.5 Lion Xcode 4.5.1 GNU bash 3.2.48(1) Emacs 23.3.1 anything.el 1.287(sprk2012でhelm.elを見て、そろそろhelm.elに移行してもいいのかなーと思ったけど、まだめんどくさくてや
The Manticore Project Manticore is a high-level parallel programming language aimed at general-purpose applications running on multi-core processors. Manticore supports parallelism at multiple levels: explicit concurrency and coarse-grain parallelism via CML-style constructs and fine-grain parallelism via various light-weight notations, such as parallel tuple expressions and NESL/Nepal-style paral
TypeRex, the OCaml Programming Studio TypeRex is a set of open-source tools and libraries for developing applications in OCaml, edited by OCamlPro. It is currently under development. Libraries and tools are released independantly, as soon as they reach a state where they can be tested and used by users.
MikiBeta February 27, 2018 Important notice: Please refer to the new MikiBeta page. Below is the old version that corresponds to the LOPSTER 2010 paper. What is MikiBeta? Proof trees are useful. We use proof trees for type checking as well as proofs in deductive systems. However, it is often tedious to write proof trees by hand. Proof trees tend to require a large space; we have to rewrite metavar
10/4まで北京泊・10/5 京都泊・10/6 東京泊・10/7 機内泊・10/8からシドニー泊…という激しいスケジュールを経て NICTA を訪問中です. 最近,再び OCaml のコードをたくさん書く機会ができたので, 久しぶりに OCaml プログラミングに関するメモを公開します. Ruby には p という便利な関数 (メソッド) があってどんな値でも可視化できますが, OCaml だと自分で書かなきゃいけなくて面倒です. extlib に Std.print という関数がありますが,これは実行時の値を出力する関数なので, 実行時に単なる組になってしまうレコードやバリアントではフィールドやコンストラクタの名前が失われてしまい,十分な可視化ができているとは言えません.このため,結局自分で書く必要があります. 今回紹介する print.ml はそれを補助するプログラムで,先日公開した
What is Menhir?Menhir is a LR(1) parser generator for the OCaml programming language. That is, Menhir compiles LR(1) grammar specifications down to OCaml code. Menhir was designed and implemented by Fran蔞is Pottier and Yann R嶲is-Gianas. Menhir is 90% compatible with ocamlyacc. Legacy ocamlyacc grammar specifications are accepted and compiled by Menhir. The resulting parsers run and produce correct
Largely based on FlymakeHaskell: IntroductionQuoting what is flymake-mode from the page FlyMake: Flymake is implemented as an Emacs minor mode. It runs the syntax check tool in the background, passing it a temporary copy of the current buffer, and parses the output for known error/warning message patterns. Flymake then highlights erroneous lines (that is, lines for which at least one error or warn
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く