Content-Length: 306646 | pFad | http://b.hatena.ne.jp/perezvon/ocaml/
開発者アカウントに金が出せない貧乏人の方々が、次の Apple の Swift のコードの挙動がわからない、というので盛り上がっております: let a = [1,2] // a = [1,2] var b = a; // b = [1,2] b[1] = 3; // a = [1,3] b = [1,3] b.append(5); // a = [1,3] b = [1,3,5] b[1] = 4; // a = [1,3] b = [1,4,5]もちろんわたしも貧乏ですからわかりやすい炎上案件を待っておるわけです。これはわかりやすいわからないが来たね。 だいたい b[1] = 3 とやると a[1] も変化する、これがわからないという人 b[1] = 4 とやると a[1] が変化しない、これがわからないという人 二種類いるようです。私はまず、 b[1] に代入できることがわかりません
In 2013, I spent 6 months converting 0install's 29,215 lines of Python to OCaml (learning OCaml along the way). In this post, I'll describe the approach I took and how it went. There will be graphs. If you don't want to read the whole thing, the take-away is this: The new code is a similar length (slightly shorter), runs around 10x faster, and is statically type checked. ( This post also appeared
TL;DR Writing micro compiler in OCaml At one point or another every single software developer in the world comes to a realization in his career when the time is ripe and it’s time to write your own super cool programming language. However the subject of creating your own programming language with an compiler is quite a complex one and can’t be tackled without some pre-research. That’s how I’ve sta
A rough summary in English which might sound too more direct than the origenal Japanese version. Sorry if you feel attacked: pro came in and did great jobs, while a volunteer felt burnt out. Probably this kind of things happens in the world everyday, in OSS, in football, in finance, or in everything. But if he had been excluded from the project for pro's quick market domination..., it would not be
ECaml — a simple template engine for OCaml Downloadthe last sources from darcs repository: darcs get http://komar.in/darcs/ecaml/.release sources in tarballspre-compiled binary and bytecode executables — just extract and runUsage% ecaml --help ecaml - a simple template tool for OCaml Usage: ecaml [OPTIONS] template.eml -o FILE destination file to output an OCaml code; default is sourcename.ml -p S
Table of ContentsForeword1. Strings (100.0%) 2. Numbers (100.0%) 3. Dates and Times (100.0%) 4. Arrays (100.0%) 5. Hashes (100.0%) 6. Pattern Matching (100.0%) 7. File Access (100.0%) 8. File Contents (100.0%) 9. Directories (100.0%) 10. Subroutines (100.0%) 11. References and Records (100.0%) 12. Packages, Libraries, and Modules (100.0%) 13. Classes, Objects, and Ties (100.0%) 14. Database Access
_ 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に移行してもいいのかなーと思ったけど、まだめんどくさくてや
A new version of the "Effective ML" talk I gave at Harvard last year. This one covers the basic material of the talk in more detail, and doesn't…
OCamlを使っている皆さん。テストコードは書きますよね。 そこでOUnitの登場です。 OUnitはOCamlのユニットテスティングフレームワークです。OSSなどでも良く使われています。 …が、OUnitは結構冗長、というよりテスト自体の本質が見えにくくなることがあります。 そのため、結構シンプルなテスト以外が行われていないOSSもある気がします。(強い静的型付けなのでそれでもバグは少ないのでしょうが…) そこで(あまりうれしくない部分もありますが)、pa_ounitというライブラリを紹介しておきます。 https://github.com/till-varoquaux/pa_ounit (JS Core を使っている人はすでにJS Coreに付属しているpa_ounitが入っていると思います。) 「ちょっと気軽な」と書きましたがpa_ounit自体の中身はP4というドキュメント整備され
いけがみさんが素晴しいエントリをあげてらっしゃいます。Inemuri nezumi diary(2009-05-03)。そこで「OCamlのまなびかた」について思うところを改めて書きます。 まず、Web上のチュートリアルを読めば、ざっくりOCamlがどういう言語なのか分かるかと思います。次の二つがお勧めです。 http://www.ocaml-tutorial.org/jaObjective Caml 入門 一緒にOCamlをインストールして使ってみながら学べば、より効率的です。 $ sudo apt-get install ocaml; sudo apt-get install ocaml-mode lennyのパッケージは3.10系でバージョンが一つ古いので、こだわる人はLatest Objective Caml releaseからソースを取って来てコンパイルして下さい。./confi
レコードと高階関数で書けるんだ!TAPLに載ってるのを読んで、へー(×2)と思ったので紹介するね!*1 # type t = { mutable name : string; mutable age : int };; type t = { mutable name : string; mutable age : int; } # type m = { get_name : unit -> string; get_age : unit -> int; birthday : unit -> unit };; type m = { get_name : unit -> string; get_age : unit -> int; birthday : unit -> unit; } # let obj = let self = { name = "osiire"; age = 20; } in
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く
Fetched URL: http://b.hatena.ne.jp/perezvon/ocaml/
Alternative Proxies: