From 6f776f55fea31dd12e5af18af519ac7d02dd7f4e Mon Sep 17 00:00:00 2001 From: muqiuhan Date: Thu, 22 Jun 2023 10:56:22 +0000 Subject: deploy: 5065a383b04f53c3f276768fe2cad5da7f821452 --- .../index.html" | 2 +- 2023/04/29/OCaml_News_20230429/index.html | 255 ------------- 2023/05/06/OCaml_News_20230506/index.html | 264 -------------- 2023/05/09/OCaml_News_20230509/index.html | 284 --------------- 2023/05/15/OCaml_News_20230515/index.html | 263 -------------- 2023/05/21/OCaml_News_20230521/index.html | 320 ---------------- 2023/05/31/OCaml_News_20230531/index.html | 279 -------------- .../index.html" | 4 +- 2023/06/11/OCaml_News_20230611/index.html | 309 ---------------- .../index.html" | 2 +- Projects-en.html | 394 -------------------- Projects.html | 401 --------------------- about.html | 63 +++- archives/2023/04/index.html | 18 - archives/2023/05/index.html | 250 ------------- archives/2023/06/index.html | 18 - archives/2023/index.html | 50 +-- archives/2023/page/2/index.html | 74 ++-- archives/2023/page/3/index.html | 275 -------------- archives/index.html | 48 +-- archives/page/2/index.html | 62 ++-- archives/page/3/index.html | 64 ++-- archives/page/4/index.html | 130 ------- tag/index.html | 12 - tags/OCaml/index.html | 297 --------------- tags/Technique/index.html | 297 --------------- 26 files changed, 188 insertions(+), 4247 deletions(-) delete mode 100644 2023/04/29/OCaml_News_20230429/index.html delete mode 100644 2023/05/06/OCaml_News_20230506/index.html delete mode 100644 2023/05/09/OCaml_News_20230509/index.html delete mode 100644 2023/05/15/OCaml_News_20230515/index.html delete mode 100644 2023/05/21/OCaml_News_20230521/index.html delete mode 100644 2023/05/31/OCaml_News_20230531/index.html delete mode 100644 2023/06/11/OCaml_News_20230611/index.html delete mode 100644 Projects-en.html delete mode 100644 Projects.html delete mode 100644 archives/2023/05/index.html delete mode 100644 archives/2023/page/3/index.html delete mode 100644 tags/OCaml/index.html delete mode 100644 tags/Technique/index.html diff --git "a/2023/04/25/\344\272\214\351\233\266\344\272\214\344\270\211\345\271\264\345\233\233\346\234\210\344\272\214\345\215\201\344\272\224\346\227\245/index.html" "b/2023/04/25/\344\272\214\351\233\266\344\272\214\344\270\211\345\271\264\345\233\233\346\234\210\344\272\214\345\215\201\344\272\224\346\227\245/index.html" index b13a0366..504de1cd 100644 --- "a/2023/04/25/\344\272\214\351\233\266\344\272\214\344\270\211\345\271\264\345\233\233\346\234\210\344\272\214\345\215\201\344\272\224\346\227\245/index.html" +++ "b/2023/04/25/\344\272\214\351\233\266\344\272\214\344\270\211\345\271\264\345\233\233\346\234\210\344\272\214\345\215\201\344\272\224\346\227\245/index.html" @@ -172,7 +172,7 @@
- Prev + Prev
diff --git a/2023/04/29/OCaml_News_20230429/index.html b/2023/04/29/OCaml_News_20230429/index.html deleted file mode 100644 index cb66a8ee..00000000 --- a/2023/04/29/OCaml_News_20230429/index.html +++ /dev/null @@ -1,255 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - -OCaml News Intro | 暮秋小屋 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- -
- -
-
-
- - - -
-
-
- - -
-
-
- - -
- -
- -
- -
-
-
-

这里是OCaml News,一个整合了OCaml社区以及周边生态最新信息的地方,先前一直在OCaml群内发送零散的信息,太细碎了,于是在此归纳整理,不过这一系列的更新频率是不规律的,并不遵循Weekly之类的频率,而是帖满即发。

-

总体上每一次更新分为三大类:

-
    -
  1. 论坛,即 discuss.ocaml.org 上有趣的新帖子
  2. -
  3. 生态,即OCaml本身或周边生态中中出现的新工具,库
  4. -
  5. 文章,即OCaml相关的最新论文,博客文章
  6. -
-

所以:

-
-

??? - 二〇二三年四月二十九日

呼吁新的 opam 存储库维护者

OPAM是OCaml的官方包管理器,它通过opam-repository存储OCaml包,opam-repository由少数人力共同维护,以确保包的时效性、和高质量。OPAM的维护团队正在寻找新的贡献者来帮助他们维护opam-repository。

-

帮助维护opam-repository并不是OCaml或OPAM方面的专家才能参与。新加入的维护者将从审查和批准对repo的更改开始,经过几周的工作后,你可以决定留下来继续做这份工作,届时将被授予完全访问权限。

-

论坛原帖:https://discuss.ocaml.org/t/call-for-new-opam-repository-maintainers/12041

-

Local Type Definition

OCaml目前并不支持类似如下的Local Type Definition:

-
1
2
3
4
let f : unit -> unit = 
fun () ->
let type t = A | B in
...
- -

但可以通过let open一个只有t的module来实现:

-
1
2
3
4
let f : unit -> unit = 
fun () ->
let open struct type t = A | B end in
...
- -

其实前者可以当作后者的糖,但目前还没实现,这是相关PR: Add local type definition syntax #12151

-

论坛原帖:https://discuss.ocaml.org/t/local-type-definition

-

使用LablGtk3实现的七个GUI示例

行业中存在各种各样不同语言的GUI工具包和各种各样不同的GUI开发方式。7GUIs代表GUI编程中典型的七项任务。

-

项目页面:https://7guis.github.io/7guis/
使用LablGtk3实现的7GUIs Github连接:https://github.com/F-loyer/7guis-ocaml-lablgtk3

-

使用Dream编写REST API

这篇文章是使用Dream、Yojson和Caqti的经验之谈,这篇文章的重点不是做出价值判断(X框架好,Y框架不好之类的),而是理解如何将一个工作流程转换为另一个工作流程的概念.

-

文章连接:https://jsthomas.github.io/ocaml-dream-api.html

- -
- - - - - -
- - - - - - - -
- - -
-
-
- - - -
- - - - - - diff --git a/2023/05/06/OCaml_News_20230506/index.html b/2023/05/06/OCaml_News_20230506/index.html deleted file mode 100644 index eafd35fe..00000000 --- a/2023/05/06/OCaml_News_20230506/index.html +++ /dev/null @@ -1,264 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - -OCaml News 2023/5/6 | 暮秋小屋 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- -
- -
-
-
- - - -
-
-
- - -
-
-
- - -
- -
- -
- -
-
-
-

二〇二三年四月二十九日 - 二〇二三年五月六日

Dune正在探索集成包管理,提供统一的开发体验

dune, opam, opam-monorepo团队在几个月前联合起来,共同解决这个来自之前社区报告中的重要痛点。

-

在dune的github上有对于这项工作的详细解释:https://github.com/ocaml/dune/issues/7680

-

https://discuss.ocaml.org/t/explorations-on-package-management-in-dune/12101

-

论坛原帖:https://discuss.ocaml.org/t/explorations-on-package-management-in-dune/12101

-

OCaml/C FFI对象的生命周期问题

OCaml manual中有一节名为
5 Living in harmony with the garbage collector
,其中介绍了六个规则,帮助编写C FFI。

-

对于如下C代码:

-
1
2
3
4
5
6
7
8
value pair(value a, value b) {
CAMLparam2(a, b); /*required*/
CAMLlocal1(r); /*required*/
r = caml_alloc(2,0);
Store_field(r,0,a);
Store_field(r,1,b);
CAMLreturn(r); /*required*/
}
- -

这里的CAMLlocal1(r)并不是必须的,如果a和b是立即值,那么其他注释有require的代码。也不是必须的,对于这六个规则应该持保留态度,它们并不是必须严格遵守的,只是为了更安全。

-

论坛原帖:https://discuss.ocaml.org/t/ocaml-c-ffi-object-lifetimes/12099

-

使用Elm Style编写函数式Web应用

Fmlib 是一个函数式库,其中包含以下组件:

-
    -
  • Fmlib_std: 标准的数据结构(B树等)
  • -
  • Fmlib_pretty: Pretty Printing
  • -
  • Fmlib_parse: Parsing
  • -
  • Fmlib_browser: Web应用程序
  • -
  • Fmlib_js: 与浏览器/Nodejs交互
  • -
-

github仓库:https://github.com/hbr/fmlib

-

一些简单的示例:https://hbr.github.io/fmlib/webapp/index.html

-

论坛原帖:https://discuss.ocaml.org/t/ann-functional-web-applications-running-in-the-browser/11984

-

使用OCaml编写NeoVIM插件

VCaml是一个用于在 OCaml 中编写 Neovim 插件的库。

-

github仓库: https://github.com/janestreet/vcaml

-

论坛上相关的讨论: https://discuss.ocaml.org/t/repo-for-nvim-plugins-in-ocaml-neovim-vcaml/12049

-

Format和PPrint在实践中的对比

论坛原帖: https://discuss.ocaml.org/t/format-vs-pprint-in-practice/12087

-

BLAS/LAPACK的OCaml Binding

这个 OCaml 库绑定了两个广泛使用的数学 FORTRAN 库:

- -

Github仓库:https://github.com/mmottl/lacaml

-

基于Effects的实验性WebServer

Github仓库: https://github.com/avsm/eeww

-

纯(?)函数式SSH库

awa-ssh是一个使用ISC协议开源的OCaml SSH库
Github仓库:https://github.com/mirage/awa-ssh

- -
- - - - - -
- - - - - - - -
- - -
-
-
- - - -
- - - - - - diff --git a/2023/05/09/OCaml_News_20230509/index.html b/2023/05/09/OCaml_News_20230509/index.html deleted file mode 100644 index ec61d448..00000000 --- a/2023/05/09/OCaml_News_20230509/index.html +++ /dev/null @@ -1,284 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - -OCaml News 2023/5/9 | 暮秋小屋 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- -
- -
-
-
- - - -
-
-
- - -
-
-
- - -
- -
- -
- -
-
-
-

二〇二三年五月六日 - 二〇二三年五月九日

在Eio中不使用Unix和Sys模块实现所有I/O和文件系统操作?

-

EIO: Effects-based direct-style IO for multicore OCaml

-
-

例如Sys.is_directory, Sys.file_exists,Sys.is_regular_file这些函数在Eio中并没有相关的实现, 因为Eio目前还缺少很多文件操作的实现: Add missing file operations #510。

-

但退一步,如果需要,可以用 Eio_unix.run_in_systhread来运行Unix的相关操作从而不阻塞Eio线程。

-

关于执行外部命令, 例如Sys.command或Unix.create_process函数, 在Eio中可以通过Eio.Process模块实现,例如:

-
1
2
3
4
5
# Eio_main.run @@ fun env ->
let proc_mgr = Eio.Stdenv.process_mgr env in
Eio.Process.run proc_mgr ["echo"; "hello"];;
hello
- : unit = ()
- -

相关文档: https://github.com/ocaml-multicore/eio#running-processes

-

论坛原帖:https://discuss.ocaml.org/t/what-are-equivalent-to-some-sys-functions-in-eio-and-other-eio-questions/12126

-

为一个现有的Dune项目生成最小的mli文件

-

Reanalyze: Experimental analyses for ReScript and OCaml: globally dead values/types, exception analysis, and termination analysis.

-
-

reanalyze可以分析项目中的dead code, 它并不能直接实现这个需求, 但可能可以利用这些信息对实施相关分析提供一个良好的起点。

-

论坛原帖: https://discuss.ocaml.org/t/how-to-create-the-minimal-mli-files-using-dune/12115

-

自动派生枚举转换函数

主要想实现的是自动生成如下代码中的 _foo 和 _bar 函数。 也就是将具有无参数constructors的variant视为enum,并为每个constructor映射一个整数值:

-
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
type my_enum = A | B | C | D | E

let _foo (x : my_enum) : int =
match x with
| A -> 0
| B -> 1
| C -> 2
| D -> 3
| E -> 4

let _bar (n : int) : my_enum =
match n with
| 0 -> A
| 1 -> B
| 2 -> C
| 3 -> D
| 4 -> E
| _ -> failwith "not handled"
- -

ppx_deriving有enum deriver, 可以实现,例如

-
1
2
3
4
5
6
7
8
9
10
# type insn = Const | Push | Pop | Add [@@deriving enum];;
type insn = Const | Push | Pop | Add
val insn_to_enum : insn -> int = <fun>
val insn_of_enum : int -> insn option = <fun>
val min_insn : int = 0
val max_insn : int = 3
# insn_to_enum Pop;;
- : int = 2
# insn_of_enum 3;;
- : insn option = Some Add
- -

相关文档: https://github.com/ocaml-ppx/ppx_deriving#plugin-enum

-

论坛原帖: https://discuss.ocaml.org/t/auto-derive-enum-conversions/12119

-

在Linux上编译OCaml程序, 在FreeBSD上跑

-

以Linux和FreeBSD都在x86-64架构上运行为例

-
-

如果程序是纯OCaml(没有C bindings之类的),那么只要目标系统中有OCaml解释器(ocamlrun), ocamlc生成的字节码就可以运行, 如果不是的话…

-

从Linux x86-64到FreeBSD x86-64从表面上看似乎没有太大的困难。 如果知道怎么配置Linux到FreeBSD的交叉编译器(最好使用clang和FreeBSD sysroot),并且愿意维护交叉编译器,
可以联系jbeckford,他愿意合作将其添加到dkml-base-compiler.4.14.x中。

-

相关阅读: Linux的二进制兼容性

-

论坛原帖: https://discuss.ocaml.org/t/how-to-compile-ocaml-program-on-linux-for-running-on-freebsd/12110

-

OCaml的速度竞赛

-

speed-comparison: A repo which compares the speed of different programming languages

-
-

这里用OCaml实现了莱布尼茨算法用于计算圆周率:

-
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
(* ocamlopt -O2 -o leibniz leibniz.ml && strip leibniz *)

let rec calc sum curr upto =
if curr >= upto then sum
else calc (sum +. 1. /. float_of_int curr) (curr + 4) upto

let calc rounds =
let double = rounds * 2 in
calc 0. (1 - double) (double + 1)

let () =
let rounds_txt = open_in_bin "rounds.txt" in
let rounds = int_of_string (input_line rounds_txt) in
close_in rounds_txt;

let pi = 4. *. calc rounds in
Printf.printf "%.16f\n" pi
- -

但性能:

-
1
2
3
$ time ./leibniz
3.1415926435899633
./leibniz 0.38s user 0.00s system 99% cpu 0.388 total
- -

比Go版本:

-
1
2
3
time ./leibniz_go
3.141592663589326
./leibniz_go 0.13s user 0.01s system 95% cpu 0.142 total
- -

慢了很多, 这是因为从生成的汇编代码来看, OCaml编译器无法在递归调用中unbox浮点数用于返回值。而命令式版本:

-
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
let calc rounds =
let sum = ref 0. in
let curr = ref (1 - rounds * 2) in
for _ = 0 to rounds - 1 do
sum := !sum +. 1. /. float_of_int !curr;
curr := !curr + 4;
done;
!sum

let () =
let rounds_txt = open_in_bin "rounds.txt" in
let rounds = int_of_string (input_line rounds_txt) in
close_in rounds_txt;

let pi = 4. *. calc rounds in
Printf.printf "%.16f\n" pi
-

的性能将会好得多(对应的汇编)

-

所以为了使数字运算的OCaml代码运行得更快,应该避免递归调用(这会抑制unbox浮点值)。

-

论坛原帖:https://discuss.ocaml.org/t/ocaml-speed-comparison-calculating-pi-with-leibniz-optimize/12112

-
-

一些库

- -
- - - - - -
- - - - - - - -
- - -
-
-
- - - -
- - - - - - diff --git a/2023/05/15/OCaml_News_20230515/index.html b/2023/05/15/OCaml_News_20230515/index.html deleted file mode 100644 index dd363e54..00000000 --- a/2023/05/15/OCaml_News_20230515/index.html +++ /dev/null @@ -1,263 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - -OCaml News 2023/5/15 | 暮秋小屋 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- -
- -
-
-
- - - -
-
-
- - -
-
-
- - -
- -
- -
- -
-
-
-

二〇二三年五月九日 - 二〇二三年五月十五日

关于OCaml最新的并行特性相关文档

    -
  1. Eio的README有很多例子: https://github.com/ocaml-multicore/eio
  2. -
  3. ocaml-multicore组织官方的教程仓库: https://github.com/ocaml-multicore/parallel-programming-in-multicore-ocaml
  4. -
  5. OCaml的Manual: https://v2.ocaml.org/releases/5.0/htmlman/parallelism.html
  6. -
-

论坛原帖: https://discuss.ocaml.org/t/new-concurrency-features/12158

-

使用OCaml通过串口与STM32通信

在Linux/Unix上可以:

- -

Windows目前没有解决方案。

-

论坛原帖: https://discuss.ocaml.org/t/is-there-any-library-of-ocaml-to-use-serial-port-of-pc/3658

-

使用OCaml构建IOS APP

-

论坛原帖: https://discuss.ocaml.org/t/building-ios-apps-with-ocaml/12153

-

Ahref现在使用Melange构建

Melange是结合使用 OCaml 和 Reason 生成 JavaScript 的工具组合。
Ahrefs是一个SEO软件套装,包含外链建设、关键字研究、竞争对手分析,排名跟踪和站点审核等工具。Ahrefs内部的大多数功能都是为营销专业人员设计的。

-

自去年 9 月以来,Melange、Dune 和 Ahrefs 开发团队一直致力于加强 Dune 和 Melange 之间的集成。作为一家在后端使用大量 OCaml 的公司,Ahrefs看到了Melange可以将其前端技术栈与OCaml更紧密结合(通过使用Melange与UI相关的JavaScript生态系统集成)。因此,该公司决定投资并积极参与以实现这种整合。

-

论坛原帖: https://discuss.ocaml.org/t/ahrefs-is-now-built-with-melange/12107

-

Ahref正在招聘OCaml开发人员

一如既往,Ahrefs正在寻找OCaml开发人员,他们总部位于新加坡,团队遍布各地,所以也支持远程,详见:
https://ahrefs.com/jobs/ocaml-developer

-

论坛原帖: https://discuss.ocaml.org/t/ahrefs-is-hiring/12136

-

string literals inside comments #5745

草,OCaml的parser不会忽略注释中的引号:

-
1
2
3
4
5
6
7
8
9
$ echo '(* "test *)' | ocaml 
OCaml version 5.0.0
Enter #help;; for help.

# (* "test *)tive `utop_prompt_fancy_light'.
# *
Error: This comment contains an unterminated string literal
Line 1, characters 3-4: String literal begins here
#
- -

而经过讨论认为修复这个问题是向后不兼容的,所以修复这个词法分析器错误的风险似乎大于好处,就给close了。

-

相关issue: https://github.com/ocaml/ocaml/issues/5745

-

有趣的是F#也继承了这个问题:

-
1
2
3
4
5
6
7
8
9
10
11
12
$ echo '(* "test *)' | dotnet fsi

Microsoft (R) F# Interactive version 12.5.0.0 for F# 7.0
Copyright (c) Microsoft Corporation. All Rights Reserved.

For help type #help;;

>
(* "test *)
^^

/home/muqiu-han/stdin(1,1): error FS0517: End of file in string embedded in comment begun at or before here
- - -
- - - - - -
- - - - - - - -
- - -
-
-
- - - -
- - - - - - diff --git a/2023/05/21/OCaml_News_20230521/index.html b/2023/05/21/OCaml_News_20230521/index.html deleted file mode 100644 index 263db05f..00000000 --- a/2023/05/21/OCaml_News_20230521/index.html +++ /dev/null @@ -1,320 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - -OCaml News 2023/5/21 | 暮秋小屋 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- -
- -
-
-
- - - -
-
-
- - -
-
-
- - -
- -
- -
- -
-
-
-

二〇二三年五月十五日 - 二〇二三年五月二十一日

Fmlib_browser 0.5.4

之前介绍过的Fmlib: Ocaml函数式Monadic库更新了其中的 Fmlib_browser模块, Fmlib_browser可以帮助用Elm-Style开发纯函数式风格的Web App。

-

论坛原帖: https://discuss.ocaml.org/t/ann-release-0-5-4-of-fmlib-browser/12184

-

测试一下OCaml的FFI

以 《The absurd cost of finalizers in Go》 这篇文章作为动机,测试一下OCaml FFI方面的性能比Go好多少或差多少:

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
testocaml 5.0go 1.19.9
native add0.3 ns0.3 ns
foreign add1.5 ns60.4 ns
c allocate & free4.0 ns71.6 ns
allocate & free17.2 ns133.3 ns
alloc auto125.6 ns1180 ns
alloc dummy131.0 ns1197 ns
alloc custom109.4 ns-
-

但这不一定是一个准确的测试,例如应该使用Sys.time还是Unix.gettimeofday来计算时间还有待商榷, 更详细的请看论坛原帖: https://discuss.ocaml.org/t/critique-my-use-of-ffi/12193

-

OCaml在改善开发人员体验方面取得的进展

OCaml Platform是提高OCaml工作效率的工具集。 他们在OCaml平台上所做的所有工作都有一个目标: 改善 OCaml开发人员的体验。

-

以下是目前正在研究并改善的一些工作流程:

-
    -
  1. 构建包:构建工作流的直接目标是消除与使用两种不同的工具进行包管理和构建系统相关的差异。例如OCaml开发者通常需要使用opam下载包再用dune作为构建系统构建包,为此,他们计划将opam直接集成到dune中,使其成为构建OCaml项目所需的单一工具,就像cargo一样。 这项工作也可以改进其他工作流程,例如处理多个项目,交叉编译等。

    -
    -

    计划在此: https://discuss.ocaml.org/t/explorations-on-package-management-in-dune/12101

    -
    -
  2. -
  3. 编译为JavaScript: 不断改善将OCaml编译为JavaScript的工具。 改善dune与Js_of_ocaml的集成,他们也一直在致力于Dune和Melange的集成, Melange fork自ReScript编译器,专注于与OCaml生态系统集成。

    -
  4. -
  5. 文档生成: OCaml包的文档是 OCaml2020至2022调查中的一个主要痛点。 他们正在努力改善OCaml开发人员创建高质量的文档的体验。 例如通过添加新功能、改进导航和扩展odoc标记语法以支持丰富的内容(例如表格、图像和图形)来使odoc生成的文档手册更加高质量。 初次之外还将把OCaml的编辑器支持引入Web和第三方平台,例如OCaml Playground 和 GitHub Codespaces。

    -
  6. -
  7. 代码格式化: 提高准确性, 增强向后兼容性, 更加深入地集成dune和ocamlformat

    -
  8. -
-

与此同时,OCaml Platform也一直在寻找新的维护者和贡献者, 具体的可以看论坛原帖: https://discuss.ocaml.org/t/ocaml-platform-newsletter-april-2023/12187

-

在odoc中内嵌HTML

通过 {%html:

foo

%} 来实现, 例如:

-
1
2
3
4
5
6
7
8
9
10
11
{1 Raw HTML}

Raw HTML can be {%html:<input type="text" placeholder="inserted">%} as
inline elements into sentences.

{%html:
<blockquote>
If the raw HTML is the only thing in a paragraph, it is treated as a block
element, and won't be wrapped in paragraph tags by the HTML generator.
</blockquote>
%}
- - -

论坛原帖:https://discuss.ocaml.org/t/is-it-possible-to-include-inline-html-in-ocaml-documentation-odoc/12177

-

开源的OCaml静态博客生成工具

-

论坛原帖: https://discuss.ocaml.org/t/open-source-tool-to-make-a-static-blog-in-ocaml/11967

-

一些GADT的实践用法

这个帖子 列出了一些使用了GADT的开源项目,除此之外,还有一篇 《Petrol:使用 GADT 在 OCaml 中嵌入类型安全的 SQL API》。

-

函数式语言实现中的LR parser generator生成的代码是无类型的、不必要的低效代码,使用GADT,可以生成类型良好(不会意外崩溃或失败)且高效的解析器, 这篇论文讲了细节: Towards efficient, typed LR parsers

-

论坛原帖: https://discuss.ocaml.org/t/a-bestiary-of-gadt-examples/12143

-

对 OCaml.org 的改进

本月,OCaml发布了从3月开始准备的一项改善 OCaml.org 的Learn板块的调查结果。该调查在各种平台上进行了推广,包括官方OCaml讨论平台,Discord,LinkedIn,Twitter等,并得到了积极的相应,从五月份开始,官方会根据调查结果改善Learn板块。

-

除了的Learn板块的改进之外,官方还对文档进行了一些较小的改进,具体表现在ocaml官网的仓库中许多未完成的包含对学习区域现有文档页面更新的pr, 这些pr将在五月份合并大部分。

-

除此之外还有大量细节的更改可以查看论坛原帖: https://discuss.ocaml.org/t/ocaml-org-newsletter-april-2023/12173

-

生态

- -
- - - - - -
- - - - - - - -
- - -
-
-
- - - -
- - - - - - diff --git a/2023/05/31/OCaml_News_20230531/index.html b/2023/05/31/OCaml_News_20230531/index.html deleted file mode 100644 index d2299d1b..00000000 --- a/2023/05/31/OCaml_News_20230531/index.html +++ /dev/null @@ -1,279 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - -OCaml News 2023/5/31 | 暮秋小屋 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- -
- -
-
-
- - - -
-
-
- - -
-
-
- - -
- -
- -
- -
-
-
-

二〇二三年五月二十一 - 二〇二三年五月三十一日

为什么OCaml中总是约定俗成的写 type t = ... ?

在OCaml中我们经常会看到:

-
1
2
3
4
module Foo = struct
type t = ...
...
end
-

这种写法已经存在于29年前的 Caml Light sources 中, SML里面也能看到这种写法。 按照惯例,当一个模块定义了一个唯一的核心抽象数据类型时,就写成type t = ...。

-

为什么要这么写也有比较多原因,具体可以看论坛原帖: https://discuss.ocaml.org/t/why-is-ocaml-convention-to-use-type-t/12256

-

但可以知道的是,有了这个约定之后Functor的使用会更加方便。 例如标准库的Set模块,大家都可以直接:

-
1
Set.Make(Foo)
- -

而不是多写一些无用的代码:

-
1
2
3
4
5
6
Set.Make(struct
include Foobar
type t = foobar
let compare = compare_foobar
end)

- -

如何更高效的使用OCaml

在这个帖子中,针对在OCaml中使用新的库由于因为文档很少并且需要阅读源码导致非常耗时的问题展开了讨论:

-

论坛原帖: https://discuss.ocaml.org/t/how-do-you-stay-productive-in-ocaml/8221

-

求值顺序

在OCaml中,想这样的代码:

-
1
foo(f x, f y, f z)
-

会先对 f z 求值而不是 f x,OCaml官方并没有定义求值顺序,实现上是从右到左的,如果想从左到右只能一个个let。

-

论坛原帖: https://discuss.ocaml.org/t/evaluation-order/12258

-

OCaml Platform路线图

在2020年的OCaml Platform会议中,avsm和OCaml Platform团队提出了针对开发工具(例如编辑器)的改进,使开发效率提升,这三年以来OCaml的开发工具和开发人员体验发生了很大变化,OCaml Platform的工作也取得了重大进展。

-
-

2020年OCaml Platform会议视频: https://watch.ocaml.org/w/2KbfRNv2oLtkKXkbd5u9F1

-
-

对于未来,OCaml Platform打算研究新的OCaml工作流原型。并认为应该反思过去三年所做的一切并制定未来三年的路线图。

-

所以在过去的几个月里,OCaml Platform一直致力于收集尽可能多的社区反馈,并组织了几个会议,会见了使用OCaml的来自各个行业的开发者,并从他们口中了解相关的需求和痛点。在会议中还共同思考了理想的 OCaml 开发人员体验应该是什么。

-

OCaml Platform希望由社区驱动自身,所以公布了路线图,并开始收集反馈并对其进行更新迭代:

-
-

OCaml Platfrom路线图: https://github.com/tarides/ocaml-platform-roadmap

-
-

论坛原帖: https://discuss.ocaml.org/t/a-roadmap-for-the-ocaml-platform-seeking-your-feedback/12238

-

OCaml的Debug体验

VS Code唯一的debug支持是 hackwaly/ocamlearlybird , 但遗憾的是它已经不积极维护了(根据 README 判断它只支持 4.11 和 4.12)。

-

所以在出现更好的替代方案之前…

-
-

The most effective debugging tool is still careful thought, coupled with judiciously placed print statements!!!

-
-

不过除此之外还是有很多Debug相关的库和方案的,比如上一期的 ppx_minidebug 和 ppx_debug 或者是 ppx_interact。

-

具体的可以看论坛原帖: https://discuss.ocaml.org/t/enhancing-ocaml-debugging-experience-in-visual-studio-code/12236

-

类似 MIT Scratch/Berkeley Snap/Google Blockly 之类的OCaml实现?

Blockly是一个基于网络的可视化编程编辑器。

-

OCaml中也有类似的 Hazle

-

论坛原帖: https://discuss.ocaml.org/t/exists-scratch-snap-blockly-for-ocaml-js/12234

-

Tiny_httpd v0.13

Tiny_httpd 是一个极简的 HTTP 1.1 服务器库,它依赖线程(或线程池)而不是异步/协作多任务处理。可能有点异端。

-

Parany v14.0.0

Parany可以用于并行化任何类型的计算,在这个版本中作者将运行时切换回了fork+marshal

-

论坛原帖: https://discuss.ocaml.org/t/new-major-release-of-parany-v14-0-0/12208

-

Merlin v4.9

Merlin 是为OCaml提供现代IDE功能的编辑器后端服务,这个新版本带来了许多改进和错误修复。而且发现并修复了一个重要的内存消耗问题.

-

论坛原帖: https://discuss.ocaml.org/t/ann-new-release-merlin-4-9/12277

-

OCaml Learn板块更新

社区成员为官网的Learn板块贡献了以章有关Sequence的教程。

-

论坛原帖: https://discuss.ocaml.org/t/creating-a-tutorial-on-sequences/12091

-

生态

    -
  • streamable: A collection of types suitable for incremental serialization.
  • -
  • incr_dom: A library for building dynamic webapps, using Js_of_ocaml.
  • -
- -
- - - - - -
- - - - - - - -
- - -
-
-
- - - -
- - - - - - diff --git "a/2023/06/10/\344\272\214\351\233\266\344\272\214\344\270\211\345\271\264\345\205\255\346\234\210\345\215\201\346\227\245/index.html" "b/2023/06/10/\344\272\214\351\233\266\344\272\214\344\270\211\345\271\264\345\205\255\346\234\210\345\215\201\346\227\245/index.html" index 317f333f..4dd0ebaf 100644 --- "a/2023/06/10/\344\272\214\351\233\266\344\272\214\344\270\211\345\271\264\345\205\255\346\234\210\345\215\201\346\227\245/index.html" +++ "b/2023/06/10/\344\272\214\351\233\266\344\272\214\344\270\211\345\271\264\345\205\255\346\234\210\345\215\201\346\227\245/index.html" @@ -168,7 +168,7 @@
- Prev + Prev
@@ -176,7 +176,7 @@
- Next + Next
diff --git a/2023/06/11/OCaml_News_20230611/index.html b/2023/06/11/OCaml_News_20230611/index.html deleted file mode 100644 index 3fa81655..00000000 --- a/2023/06/11/OCaml_News_20230611/index.html +++ /dev/null @@ -1,309 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - -OCaml News 2023/6/11 | 暮秋小屋 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- -
- -
-
-
- - - -
-
-
- - -
-
-
- - -
- -
- -
- -
-
-
-

二〇二三年五月三十一日 - 二〇二三年六月十一日

Lambda演算中的可计算性极限

OCaml 的用户可能有兴趣阅读有关 lambda 演算的理论论文。

-

“ Limits of Computability in Lambda Calculus“ 这篇论文介绍了在lambda演算中有一些函数是不可计算的。

-

详细讨论可以看论坛原帖

-

OCaml 5.1.0~alpha2

随着 OCaml 5.1.0 持续稳定的工作进展,OCaml 5.1.0 的第二个 alpha 版本发布了, 这个版本修复了GC和Windows ABI的问题。
除此之外,类型系统兼容性得到增强,恢复支持 s390x/IBM Z

-

详细的更新可以查看 论坛原帖

-

OCaml中能否实现 constraint 不等

OCaml提供了对类型定义添加约束的方法, 即constraint:

-
1
2
3
4
5
module A = struct type t = int end
module B = struct type t = float end

(** Error: This type constructor expands to type t but is used here with type float *)
type t = A.t constraint t = B.t
- -

能否实现判断两个类型是不兼容的呢? 比如: type t = A.t constraint t <> B.t。

-

类型相关的理论在学了在学了呜呜,目前来看这不是个好的做法…,详细可以看论坛原帖

-

在OCaml5的并行程序中使用全局哈希表是否安全?

这里指的应该是 Stdlib.Hashtbl。

-

只能安全一点点,因为对哈希表访问没有同步,所以只是内存安全而不是线程安全。
文档指出,对哈希表的不同步访问是程序员的锅,要么使用锁保护表,要么用并发哈希表的不同实现。
在表没有涉及大小调整操作的情况下,共享哈希表是安全的。在调整大小的情况下,添加/删除可能会与任何其他操作产生冲突。

-

查看论坛原帖

-

谈谈你心目中理想ML的样子吧!

    -
  • Haskell的类型系统和简洁
  • -
  • OCaml的模块系统和对象系统
  • -
  • Rust的low level内存控制和借用以及并发检查
  • -
  • Lisp的宏系统和REPL
  • -
  • JetBrains相关IDE支持
  • -
  • 和x86_64汇编一样的编译速度
  • -
-

有种许愿的美,🙏

-

查看论坛上其他愿望

-

OOP Visitors在Polymorphic情况下的类型错误

像Java里面:

-
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
interface Tree {
public <B> B accept(TreeVisitor<B> v);
}

interface TreeVisitor<B> {
public B visitLeaf(Leaf t);
}

class Leaf implements Tree {
public final int value;

public Leaf(int value) {
this.value = value;
}

public <B> B accept(TreeVisitor<B> v) {
return v.visitLeaf(this);
}
}
- -

要是直接翻译成OCaml:

-
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
class virtual tree =
object
method virtual accept : 'a . 'a tree_visitor -> 'a
end

and virtual ['a] tree_visitor =
object
method virtual visit_leaf : (leaf -> 'a)
end

and leaf (i : int) =
object (self)
method get = i

method accept (v : 'a tree_visitor) : 'a =
v#visit_leaf (self :> leaf)
end
- -

是会报错滴:

-
1
2
3
4
5
File "visitor.ml", line 3, characters 28-54:
3 | method virtual accept : 'a . 'a tree_visitor -> 'a
^^^^^^^^^^^^^^^^^^^^^^^^^^
Error: The universal type variable 'a cannot be generalized:
it escapes its scope.
- -

OCaml的类在定义时是单态的,比如:

-
1
2
3
4
5
6
7
8
class ['a] c (x:'a) = 
object
method x = x
end
and d =
object
method strange = (new c 0)#x
end
- -

这里c是:

-
1
class ['a] c : 'a -> object constraint 'a = int method x : 'a end
-

因为在d里面 new c 0 定义了一个 int c 的对象。

-

所以正确的写法应该是:

-
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
class virtual ['a, 'leaf, 'node, 'empty] open_tree_visitor = 
object
method virtual visit_leaf : 'leaf -> 'a
method virtual visit_node : 'node -> 'a
method virtual visit_empty : 'empty -> 'a
end

class virtual tree =
object
method virtual accept : 'a .
('a, 'leaf, 'node, 'empty) open_tree_visitor -> 'a
end

and leaf (i : int) =
object (self:'self)
inherit tree
method get = i
method accept v = v#visit_leaf (self :> leaf)
end

and node (x : tree) (y: tree) =
object (self:'self)
inherit tree
method left = x
method right = y
method accept v = v#visit_node (self :> node)
end

and empty =
object (self:'self)
inherit tree
method accept v = v#visit_empty (self :> empty)
end
- -

查看论坛原帖

-

进一步约束模块的接口

-

基于dune,有一个模块A.ml它的接口是A.mli,但是当它在主模块中时,我想使用进一步约束过的的接口A_sub.mli,因为只有A_Sub的功能对用户有用。

-
-

其实在library下面声明一个和library同名的 xxx.ml,在里面写 module A = struct include A end 就可以啦,很常见的做法。

-

详细讨论可以查看论坛原帖

-

OCaml环不环保?

这篇文章说道,对于在 ocaml.org 集群中监测的19台机器,
每周大约产生70公斤的二氧化碳当量,

-

自 ocaml.org 重新设计以来, 社区一直致力于对环境影响负责。第一步是通过计算使用的能源总量来准确量化影响,为了确定未来所做的任何改善是否能减少二氧化碳排放量。

-

为此,开发了一个用于获取各种碳强度API的HTTP客户端: carbon-intensity

-

英国特定地区API的非常简单,使用只需要用户提供Eio的网络功能:

-
1
2
3
4
5
6
7
8
9
10
# Eio_main.run @@ fun env ->
Mirage_crypto_rng_eio.run (module Mirage_crypto_rng.Fortuna) env @@ fun _ ->
Carbon.Gb.get_intensity env#net
|> Eio.traceln "%a" Carbon.Gb.Intensity.pp;;
+period: 2022-08-28T17:30Z - 2022-08-28T18:00Z
+forecast: 255 gCO2/kWh
+actual: None
+index: high
+
- : unit = ()
- -

某些API需要更多配置,例如法国的需要token:

-
1
2
3
4
5
6
7
8
9
10
11
# Eio_main.run @@ fun env ->
Mirage_crypto_rng_eio.run (module Mirage_crypto_rng.Fortuna) env @@ fun _ ->
let token = Eio.Path.(load (env#fs / ".co2-token")) in
let t = Carbon.Co2_signal.v token in
Carbon.Co2_signal.get_intensity ~net:env#net ~country_code:`FR t
|> Eio.traceln "%a" Carbon.Co2_signal.Intensity.pp;;
+country: FR
+datetime: 2022-08-29T11:00:00.000Z
+intensity: 99 gCO2/kWh
+fossil fuel percentage: 15.230000
- : unit = ()
- -

更详细的可以看论坛原帖, 以及论坛上关于carbon-intensity的帖子

-

float_of_int的细节

试图弄清楚 float_of_int 在amd64和arm64上的行为, 生成的 Cmm 大概是
box_float (Cop(Cfloatofint (untag_int myfloat)))

-

在 amd64 上,它被转换为序列:

-
1
2
3
(** untag_int *)
sarq $1, %rax
cvtsi2sdq %rax, %xmm0
- -

而在arm64上使用scvtf实现。

-

论坛原帖

-

Debugging Native Code in OCaml!

本视频适用于:

-
    -
  • 非 OCaml 开发人员对 OCaml 的工作原理感到好奇
  • -
  • 中级 OCaml 开发人员
  • -
-

更多讨论可以看论坛原帖

-

Outreachy Summer 2023

Outreachy是一项带薪远程实习计划,目的是促进开源和开放科学的多样性。Outreachy的实习是为那些在本国()技术行业面临代表性不足、歧视或系统性偏见的人提供的。

-

关于今年Outreachy的信息可以看这个帖子: Outreachy Summer 2023
如果想加入,可以看: Become an Outreachy Mentor: support the growth and diversity of the OCaml community

-

一些生态

    -
  • OCaml-Minisat github repo minisat是一个小巧快速的SAT Solver, 这是其OCaml Bining
  • -
  • MPP 兼容OCaml5咯, mpp就是meta preprocesser
  • -
  • caml2html可以将OCaml源码文件转换成带高亮的HTML
  • -
  • containers 3.12发布了
  • -
  • multicoretests是用于测试Multicore OCaml 的 PBT 测试套件和库
  • -
- -
- - - - - -
- - - - - - - -
- - -
-
-
- - - -
- - - - - - diff --git "a/2023/06/17/\345\217\221\347\203\255\345\217\212\350\266\205\351\253\230\347\203\255\345\215\261\350\261\241/index.html" "b/2023/06/17/\345\217\221\347\203\255\345\217\212\350\266\205\351\253\230\347\203\255\345\215\261\350\261\241/index.html" index 2935f4ab..0f7ee0fa 100644 --- "a/2023/06/17/\345\217\221\347\203\255\345\217\212\350\266\205\351\253\230\347\203\255\345\215\261\350\261\241/index.html" +++ "b/2023/06/17/\345\217\221\347\203\255\345\217\212\350\266\205\351\253\230\347\203\255\345\215\261\350\261\241/index.html" @@ -299,7 +299,7 @@
- Next + Next
diff --git a/Projects-en.html b/Projects-en.html deleted file mode 100644 index 12594c40..00000000 --- a/Projects-en.html +++ /dev/null @@ -1,394 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - -Projects | 暮秋小屋 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- -
- -
-
-
- - - -
-
-
- - -
-
-
- - -
- -
-
-
-

This page is some projects I wrote while studying computer science, in no particular order

-
- -

A simple container

- -
-

This is a container implementation on Linux, mainly to study the container technologies of Docker and some features of Linux. It was first implemented with Rust, and finally refactored with OCaml

-
-
-
- -
- -

LSM-Tree-based KV storage implemented using F#

- -
-

Research on some principles of HBase and RocksDB

-
-
-
- - -
- -

A simple, fast and smooth web server implemented by F#

- -
-

Explore related network libraries and Web principles of .NET Core

-
-
-
- - -
- -

Tie Muqiu: A robot overlooking the world

- -
-

This project was originally a QQ robot, which was later decoupled to support replying to various sources, such as QQ, terminals, microphones, etc.

-
-
-
- - -
- -

Lisp implementation written by OCaml

- -
-

This is just a toy, it was written to learn OCaml, nothing new

-
-
-
- - -
- -

A simple Linux C++ debugger

- -
-

The purpose of this project is to learn C++ and some operating system principles

-
-
-
- - - -
- -

Blockchain system implemented by Racket

- -
-

Works to learn basics of Racket and Blockchain

-
-
-
- - -
- -

OpheliaOS

RISC-V operating system kernel

- -
-

RISC-V operating system kernel written in Rust according to the rCore tutorial

-
-
- - - -
- -

Annabear

Parser Combinators library written by OCaml

- -
-

Study Parser Combinator

-
-
- - - -
- -

rust-colog

A minimalist Rust logging library with color coding

- -
-

Fork the logging library from chrivers/rust-colog, adding time information and better styles

-
-
- - - -
- -

crp

Image color replacement tool

- -
-

A simple command-line tool written in Rust to transform the colors in an image

-
-
- - - -
- -

ocaml-random-str

Random string library based on Xorshift algorithm

- -
-

Study Parser Combinator

-
-
- - - -
- -

ocaml-snowflake

The snnowflake algorithm implemented using OCaml

- -
-

Snowflake is an open source distributed ID generation algorithm based on Twitter.

-
-
- - - -
- -

simlog

A minimal log library implemented by OCaml

- -
-

Currently Fork from Lucid, but plan to re-implement it by myself

-
-
- - - -
- -

Ocason

Another OCaml JSON library

-> Fork from [nogw/ocason](https://github.com/nogw/ocason), I converted it to a pure Dune project, fixed some test bugs - -
- - - -
- -

ws-ocaml

OCaml's minimalist WebSocket server implementation

- -
-

Fork from https://github.com/krtx/ws-ocaml, compatible with OCaml5 environment and make it more comprehensive

-
-
- - - -
- -

omtl

A minimal test library for OCaml

- -
-

Sometimes I just need a simple test to test something

-
-
- - - -
- -

ocaml_ptrace

OCaml's ptrace function binding

-> Fork from [williamleferrand/ocaml-ptrace](https://github.com/williamleferrand/ocaml-ptrace), added dune support - -
- - - -
- -

FsExecute

Simple and fast execution of shell commands asynchronously in F#

- -
- - - -
- -

Ream

A zero-dependency, low-level web server written by Racket

- -
-

Look at the Racket official website tutorial to learn

-
-
- - - -
- -

Autumn Theme

VSCode theme

-> This is a VSCode theme series, including Dark, Gray, Light three colors. It's okay to design it yourself. - -
- -
- - - -
-
-
- - - -
- - - - - - diff --git a/Projects.html b/Projects.html deleted file mode 100644 index ee21716f..00000000 --- a/Projects.html +++ /dev/null @@ -1,401 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - -项目 | 暮秋小屋 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- -
- -
-
-
- - - -
-
-
- - -
-
-
- - -
- -
-
-
-

这个页面是一些我在学习计算机科学的过程中编写的项目,不分先后

-
- -

一个简陋的容器

- -
-

这是一个Linux上的容器实现,主要是为了研究Docker这些容器技术以及Linux的一些Feature,最初用Rust实现,最后用OCaml重构

-
-
-
- - -
- -

使用F#实现的基于LSM-Tree的KV存储

- -
-

对于HBase和RocksDB的一些原理探究

-
-
-
- - -
- -

F#实现的极简快速,平滑的Web服务器

- -
-

探索.NET Core的相关网络库以及Web原理

-
-
-
- - -
- -

铁暮秋:一个俯瞰世界的机器人

- -
-

这个项目其实最初是一个QQ机器人,后来解耦,支持对各种消息源做出回复,比如QQ,终端,麦克风等。

-
-
-
- - -
- -

OCaml编写的Lisp实现

- -
-

这就是个玩具,当初为了学OCaml写的,没啥新意

-
-
-
- - -
- -

简陋的Linux C++调试器

- -
-

这个项目的目的是为了学习C++和一些操作系统原理

-
-
-
- - - -
- -

Racket实现的区块链系统

- -
-

学习Racket和区块链基础知识的作品

-
-
-
- - -
- -

OpheliaOS

RISC-V操作系统内核

- -
-

根据rCore教程使用Rust编写的RISC-V操作系统内核

-
-
- - - -
- -

Annabear

OCaml编写的Parser Combinators库

- -
-

研究Parser Combinator

-
-
- - - -
- -

rust-colog

具有颜色编码的极简Rust日志库

- -
-

Fork自chrivers/rust-colog的日志库,添加了时间信息以及更优质的样式

-
-
- - - -
- -

crp

图像颜色替换工具

- -
-

Rust编写的简单命令行工具,用于转换一个图片中的颜色

-
-
- - - -
- -

ocaml-random-str

基于Xorshift算法编写的随机字符串库

- -
-

研究Parser Combinator

-
-
- - - -
- -

ocaml-snowflake

使用OCaml实现的snnowflake算法

- -
-

Snowflake 是一种基于 Twitter 的开源分布式 ID 生成算法。

-
-
- - - -
- -

simlog

OCaml实现的极简日志库

- -
-

目前Fork自Lucid,但打算自己重新实现一下

-
-
- - - -
- -

Ocason

另一个OCaml JSON库

- -
-

Fork自nogw/ocason,我将其转换为了纯粹的Dune项目,修复了一些测试Bug

-
-
- - - -
- -

ws-ocaml

OCaml的极简WebSocket服务器实现

- -
-

Fork自https://github.com/krtx/ws-ocaml,兼容了OCaml5环境并使其更全面

-
-
- - - -
- -

omtl

OCaml的极简测试库

- -
-

有时候我只是需要简单测试测试一些东西

-
-
- - - -
- -

ocaml_ptrace

OCaml的ptrace函数绑定

- -
-

Fork自williamleferrand/ocaml-ptrace,添加了dune支持

-
-
- - - -
- -

FsExecute

简单快速的在F#中异步执行shell命令

- -
- - - -
- -

ream

Racket编写的零依赖,低级Web服务器

- -
-

看Racket官网教程学习的

-
-
- - - -
- -

Autumn Theme

VSCode主题

- -
-

这是一个VSCode主题系列,包含Dark, Grey, Light三种配色。闲的没事自己设计的。

-
-
- -
- - - -
-
-
- - - -
- - - - - - diff --git a/about.html b/about.html index 08407bd9..fadb0ab8 100644 --- a/about.html +++ b/about.html @@ -140,29 +140,52 @@
-

我现在为X档案研究所工作, X档案研究所是一个纯粹的开源组织

- - -
- - - - - -

我热衷于实用函数式编程,尤其是ML语言家族。喜欢用OCaml研究编程语言编译器,用F#写Web全栈项目。Rescript很年轻,很有活力,我很期待!

-


-

对于系统级编程,Rust/C++可能更适合。用它们研究操作系统内核和数据库系统等底层领域。

-


-

Scala和Clojure可以让我在JVM上获得些许快乐。

-


-

一些简单的脚本用Python和Racket是非常不错的解决方案

-
- -

关于我在学习过程中编写的开源项目,可以看: 项目列表

-