欢迎大家赞助一杯啤酒🍺 我们准备了下酒菜:Formal mathematics/Isabelle/ML, Formal verification/Coq/ACL2, C++/F#/Lisp
OCaml
来自开放百科 - 灰狐
(版本间的差异)
小 (→项目) |
小 (→项目) |
||
第51行: | 第51行: | ||
==项目== | ==项目== | ||
[https://github.com/rizo/awesome-ocaml Awesome OCaml] [[image:awesome.png]] | [https://github.com/rizo/awesome-ocaml Awesome OCaml] [[image:awesome.png]] | ||
− | *[https://ocamlverse.github.io/content/ecosystem.html OCaml ecosystem] [https://ocamlverse.github.io/content/compilers.html Compilers, Typecheckers, and Parsers] [https://ocamlverse.github.io/content/security.html Security and Cryptography] [https://ocamlverse.github.io/content/software_verification.html Formal Software Verification] | + | *[https://ocamlverse.github.io/content/ecosystem.html OCaml ecosystem] [https://ocamlverse.github.io/content/compilers.html Compilers, Typecheckers, and Parsers] [https://ocamlverse.github.io/content/security.html Security and Cryptography] [https://ocamlverse.github.io/content/static_analysis.html Static Analysis] [https://ocamlverse.github.io/content/testing.html Testing] [https://ocamlverse.github.io/content/software_verification.html Formal Software Verification] [https://ocamlverse.github.io/content/protocols.html Protocols] |
*[https://forge.ocamlcore.org/ OCaml Forge] Deprecating the Forge in 2017 | *[https://forge.ocamlcore.org/ OCaml Forge] Deprecating the Forge in 2017 | ||
*[https://github.com/OCamlPro OCamlPro] | *[https://github.com/OCamlPro OCamlPro] |
2021年11月24日 (三) 05:10的版本
您可以在Wikipedia上了解到此条目的英文信息 OCaml Thanks, Wikipedia. |
OCaml
目录 |
简介
OCaml,最早称为 Objective Caml,是 Caml 编程语言的主要实现,由 Xavier Leroy,Jérôme Vouillon,Damien Doligez,Didier Rémy 及其他人于1996年创立,OCaml 是开放源代码项目(LGPLv2.1)。
OCaml 一般用于编译器、程序分析、金融交易、虚拟机等方面。它是 Jane Street 的核心语言,重点是用它写实时交易系统会很赚钱。
F#,Microsoft .NET平台上 OCaml 风格的编程语言。
Windows
指南
完成第一个OCaml程序,Hello World!,创建test.ml文件,包含:
let _=print_endline "hello world!"
编译 test.ml
ocamlc test.ml -o test // Byte-code编译 或 ocamlopt test.ml -o test // Native-code编译 ./test
REPL
$ ocmal 或 $ utop utop # let () = print_endline "Hello OCaml World!";; Hello OCaml World!
类型
utop # (1, "str1", 2.);; // 元组tuple - : int * string * float = (1, "str1", 2.) utop # [1; 2; 3];; // 列表list - : int list = [1; 2; 3] utop # [|1; 2; 3|];; 数组array - : int array = [|1; 2; 3|] utop # type vec2 = { x : float; y : float };; //记录record type vec2 = { x : float; y : float; }
常见问题
Error: Unbound module Core
vim ~/.ocamlinit 加入以下内容,并重新运行utop
#use "topfind" #camlp4o #thread #require "core.top" #require "core.syntax"
-bash: ocamlfind: command not found
eval $(opam config env)
项目
- OCaml ecosystem Compilers, Typecheckers, and Parsers Security and Cryptography Static Analysis Testing Formal Software Verification Protocols
- OCaml Forge Deprecating the Forge in 2017
- OCamlPro
- OCaml Labs
- Jane Street @ GitHub
- Binary Analysis Platform
- Coq
- Liquidsoap Audio & Video Streaming Language
- Owl - OCaml Scientific Computing
- MirageOS 一个用于构建安全、高性能网络应用的库(library)操作系统
- Reason 是一门基于 OCaml 强大类型系统的编程语言,并拥有让 JavaScript 和 C 语言家族开发者所熟悉的语法。
- Irmin数据库
- ocaml-cohttp 非常轻量的HTTP server
- ocaml-dns DNS协议的OCaml实现 和 jitsu DNS Server
- datakit from Docker team.
- vpnkit from Docker team.
- Jane Street Capital's standard library overlay
- Real World OCaml
- ocsigen
- Haxe
- DataKit -- Orchestrate applications using a Git-like dataflow
- Unison File Synchronizer
Facebook也发布了一些OCaml开源项目
- Hack is a programming language for HHVM
- flow Adds static typing to JavaScript to improve developer productivity and code quality.
- Reason: Build Systems Rapidly
- Infer is a static analysis tool for Java, Objective-C and C, written in OCaml.
- pfff Tools for code analysis, visualizations, or style-preserving source transformation.
课程
文档
- Xen and the art of OCaml
- Some uses of Caml in industry
- Why FP matters to Credit Suisse
- Caml Trader:Adventures of a functional programmer on Wall Street
书籍
开发者
- 张宏波 前OCaml编译器核心作者, BuckleScript 作者。
用户
- Esper
- Jane Street是OCaml最大的用户 知乎上的一些信息 at github Why doesn't Jane Street switch from Ocaml to F#?
- Citrix
- Lexifi
图集
链接
分享您的观点