diff options
| author | muqiuhan <[email protected]> | 2023-05-06 09:26:11 +0000 |
|---|---|---|
| committer | muqiuhan <[email protected]> | 2023-05-06 09:26:11 +0000 |
| commit | 50dac1fa5008a5dc41d487bc49398d9dc8870f3b (patch) | |
| tree | d76fe19982d01662243c2e000a971a6932b32266 /2023 | |
| parent | bda865750391fb40db98e9f4366dbc8efad3b76e (diff) | |
| download | blog-50dac1fa5008a5dc41d487bc49398d9dc8870f3b.tar.gz | |
deploy: a1e399ab2145b476eaffe8284921ab6740bcbf2e
Diffstat (limited to '2023')
| -rw-r--r-- | 2023/02/26/二零二三年二月二十六日/index.html | 2 | ||||
| -rw-r--r-- | 2023/03/01/纯牛奶可以加点啥/index.html | 2 | ||||
| -rw-r--r-- | 2023/04/29/OCaml_News_20230429/index.html | 13 | ||||
| -rw-r--r-- | 2023/05/04/OCaml-Effects简明教程/index.html (renamed from 2023/02/28/OCaml-Effects简明教程/index.html) | 10 | ||||
| -rw-r--r-- | 2023/05/06/OCaml_News_20230506/index.html | 265 |
5 files changed, 281 insertions, 11 deletions
diff --git a/2023/02/26/二零二三年二月二十六日/index.html b/2023/02/26/二零二三年二月二十六日/index.html index c57b714b..e82b9d2c 100644 --- a/2023/02/26/二零二三年二月二十六日/index.html +++ b/2023/02/26/二零二三年二月二十六日/index.html @@ -170,7 +170,7 @@ <div class="icon arrow-left"></div> <div class="post-link"> - <a href="/2023/02/28/OCaml-Effects%E7%AE%80%E6%98%8E%E6%95%99%E7%A8%8B/">Prev</a> + <a href="/2023/03/01/%E7%BA%AF%E7%89%9B%E5%A5%B6%E5%8F%AF%E4%BB%A5%E5%8A%A0%E7%82%B9%E5%95%A5/">Prev</a> </div> </div> diff --git a/2023/03/01/纯牛奶可以加点啥/index.html b/2023/03/01/纯牛奶可以加点啥/index.html index f13e0396..a2e3ab4f 100644 --- a/2023/03/01/纯牛奶可以加点啥/index.html +++ b/2023/03/01/纯牛奶可以加点啥/index.html @@ -197,7 +197,7 @@ <div class="icon arrow-right"></div> <div class="post-link"> - <a href="/2023/02/28/OCaml-Effects%E7%AE%80%E6%98%8E%E6%95%99%E7%A8%8B/">Next</a> + <a href="/2023/02/26/%E4%BA%8C%E9%9B%B6%E4%BA%8C%E4%B8%89%E5%B9%B4%E4%BA%8C%E6%9C%88%E4%BA%8C%E5%8D%81%E5%85%AD%E6%97%A5/">Next</a> </div> </div> diff --git a/2023/04/29/OCaml_News_20230429/index.html b/2023/04/29/OCaml_News_20230429/index.html index 32554332..67c9759d 100644 --- a/2023/04/29/OCaml_News_20230429/index.html +++ b/2023/04/29/OCaml_News_20230429/index.html @@ -179,10 +179,10 @@ </ol> <p>所以:</p> <hr> -<h1 id="???-二零二三年四月二十九日"><a href="#???-二零二三年四月二十九日" class="headerlink" title="??? - 二零二三年四月二十九日"></a>??? - 二零二三年四月二十九日</h1><h2 id="论坛"><a href="#论坛" class="headerlink" title="论坛"></a>论坛</h2><h3 id="呼吁新的-opam-存储库维护者"><a href="#呼吁新的-opam-存储库维护者" class="headerlink" title="呼吁新的 opam 存储库维护者"></a>呼吁新的 opam 存储库维护者</h3><p><a target="_blank" rel="noopener" href="https://opam.ocaml.org/">OPAM</a>是OCaml的官方包管理器,它通过<a target="_blank" rel="noopener" href="https://github.com/ocaml/opam-repository">opam-repository</a>存储OCaml包,opam-repository由少数人力共同维护,以确保包的时效性、和高质量。OPAM的维护团队正在寻找新的贡献者来帮助他们维护opam-repository。</p> +<h1 id="???-二零二三年四月二十九日"><a href="#???-二零二三年四月二十九日" class="headerlink" title="??? - 二零二三年四月二十九日"></a>??? - 二零二三年四月二十九日</h1><h2 id="呼吁新的-opam-存储库维护者"><a href="#呼吁新的-opam-存储库维护者" class="headerlink" title="呼吁新的 opam 存储库维护者"></a>呼吁新的 opam 存储库维护者</h2><p><a target="_blank" rel="noopener" href="https://opam.ocaml.org/">OPAM</a>是OCaml的官方包管理器,它通过<a target="_blank" rel="noopener" href="https://github.com/ocaml/opam-repository">opam-repository</a>存储OCaml包,opam-repository由少数人力共同维护,以确保包的时效性、和高质量。OPAM的维护团队正在寻找新的贡献者来帮助他们维护opam-repository。</p> <p>帮助维护opam-repository并不是OCaml或OPAM方面的专家才能参与。新加入的维护者将从审查和批准对repo的更改开始,经过几周的工作后,你可以决定留下来继续做这份工作,届时将被授予完全访问权限。</p> <p>论坛原帖:<a target="_blank" rel="noopener" href="https://discuss.ocaml.org/t/call-for-new-opam-repository-maintainers/12041">https://discuss.ocaml.org/t/call-for-new-opam-repository-maintainers/12041</a></p> -<h3 id="Local-Type-Definition"><a href="#Local-Type-Definition" class="headerlink" title="Local Type Definition"></a>Local Type Definition</h3><p>OCaml目前并不支持类似如下的Local Type Definition:</p> +<h2 id="Local-Type-Definition"><a href="#Local-Type-Definition" class="headerlink" title="Local Type Definition"></a>Local Type Definition</h2><p>OCaml目前并不支持类似如下的Local Type Definition:</p> <figure class="highlight ocaml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">let</span> f : <span class="built_in">unit</span> -> <span class="built_in">unit</span> = </span><br><span class="line"> <span class="keyword">fun</span> <span class="literal">()</span> -></span><br><span class="line"> <span class="keyword">let</span> <span class="keyword">type</span> t = <span class="type">A</span> | <span class="type">B</span> <span class="keyword">in</span></span><br><span class="line"> ...</span><br></pre></td></tr></table></figure> <p>但可以通过let open一个只有t的module来实现:</p> @@ -190,9 +190,9 @@ <p>其实前者可以当作后者的糖,但目前还没实现,这是相关PR: <a target="_blank" rel="noopener" href="https://github.com/ocaml/ocaml/pull/12151">Add local type definition syntax #12151</a></p> <p>论坛原帖:<a target="_blank" rel="noopener" href="https://discuss.ocaml.org/t/local-type-definition">https://discuss.ocaml.org/t/local-type-definition</a></p> -<h2 id="生态"><a href="#生态" class="headerlink" title="生态"></a>生态</h2><h3 id="使用LablGtk3实现的七个GUI示例"><a href="#使用LablGtk3实现的七个GUI示例" class="headerlink" title="使用LablGtk3实现的七个GUI示例"></a>使用LablGtk3实现的七个GUI示例</h3><p>行业中存在各种各样不同语言的GUI工具包和各种各样不同的GUI开发方式。7GUIs代表GUI编程中典型的七项任务。</p> +<h2 id="使用LablGtk3实现的七个GUI示例"><a href="#使用LablGtk3实现的七个GUI示例" class="headerlink" title="使用LablGtk3实现的七个GUI示例"></a>使用LablGtk3实现的七个GUI示例</h2><p>行业中存在各种各样不同语言的GUI工具包和各种各样不同的GUI开发方式。7GUIs代表GUI编程中典型的七项任务。</p> <p>项目页面:<a target="_blank" rel="noopener" href="https://7guis.github.io/7guis/">https://7guis.github.io/7guis/</a><br>使用LablGtk3实现的7GUIs Github连接:<a target="_blank" rel="noopener" href="https://github.com/F-loyer/7guis-ocaml-lablgtk3">https://github.com/F-loyer/7guis-ocaml-lablgtk3</a></p> -<h2 id="文章"><a href="#文章" class="headerlink" title="文章"></a>文章</h2><h3 id="使用Dream编写REST-API"><a href="#使用Dream编写REST-API" class="headerlink" title="使用Dream编写REST API"></a>使用Dream编写REST API</h3><p>这篇文章是使用Dream、Yojson和Caqti的经验之谈,这篇文章的重点不是做出价值判断(X框架好,Y框架不好之类的),而是理解如何将一个工作流程转换为另一个工作流程的概念.</p> +<h2 id="使用Dream编写REST-API"><a href="#使用Dream编写REST-API" class="headerlink" title="使用Dream编写REST API"></a>使用Dream编写REST API</h2><p>这篇文章是使用Dream、Yojson和Caqti的经验之谈,这篇文章的重点不是做出价值判断(X框架好,Y框架不好之类的),而是理解如何将一个工作流程转换为另一个工作流程的概念.</p> <p>文章连接:<a target="_blank" rel="noopener" href="https://jsthomas.github.io/ocaml-dream-api.html">https://jsthomas.github.io/ocaml-dream-api.html</a></p> </div> @@ -205,6 +205,11 @@ <nav class="post-nav"> <div class="prev-item"> + <div class="icon arrow-left"></div> + <div class="post-link"> + <a href="/2023/05/04/OCaml-Effects%E7%AE%80%E6%98%8E%E6%95%99%E7%A8%8B/">Prev</a> + </div> + </div> <div class="next-item"> diff --git a/2023/02/28/OCaml-Effects简明教程/index.html b/2023/05/04/OCaml-Effects简明教程/index.html index 8890e437..bce17e0c 100644 --- a/2023/02/28/OCaml-Effects简明教程/index.html +++ b/2023/05/04/OCaml-Effects简明教程/index.html @@ -20,7 +20,7 @@ -<title>OCaml Effects简明教程 | 暮秋小屋</title> +<title>如何表示OCaml运行时类型 | 暮秋小屋</title> @@ -155,12 +155,12 @@ <div class="post-title"> - OCaml Effects简明教程 + 如何表示OCaml运行时类型 </div> <span class="post-date"> - Feb 28, 2023 + May 4, 2023 </span> </div> <div class="post-img"> @@ -183,7 +183,7 @@ <div class="icon arrow-left"></div> <div class="post-link"> - <a href="/2023/03/01/%E7%BA%AF%E7%89%9B%E5%A5%B6%E5%8F%AF%E4%BB%A5%E5%8A%A0%E7%82%B9%E5%95%A5/">Prev</a> + <a href="/2023/05/06/OCaml_News_20230506/">Prev</a> </div> </div> @@ -191,7 +191,7 @@ <div class="icon arrow-right"></div> <div class="post-link"> - <a href="/2023/02/26/%E4%BA%8C%E9%9B%B6%E4%BA%8C%E4%B8%89%E5%B9%B4%E4%BA%8C%E6%9C%88%E4%BA%8C%E5%8D%81%E5%85%AD%E6%97%A5/">Next</a> + <a href="/2023/04/29/OCaml_News_20230429/">Next</a> </div> </div> diff --git a/2023/05/06/OCaml_News_20230506/index.html b/2023/05/06/OCaml_News_20230506/index.html new file mode 100644 index 00000000..802a930f --- /dev/null +++ b/2023/05/06/OCaml_News_20230506/index.html @@ -0,0 +1,265 @@ +<!DOCTYPE html> +<html lang="en"> + <head> + <meta charset="UTF-8"> +<meta name="viewport" + content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"> +<meta http-equiv="X-UA-Compatible" content="ie=edge"> + + <meta name="author" content="含暮秋"> + + + <meta name="subtitle" content="暮秋小屋"> + + + <meta name="description" content="不卑不亢的码农, 朴素的民谣诗人"> + + + <meta name="keywords" content="韩暮秋,MuqiuHan"> + + + + +<title>OCaml News 2023/5/6 | 暮秋小屋</title> + + + + + +<style> + @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Noto+Sans+SC:wght@300;400;500;700&family=Roboto+Mono&display=swap'); +</style> + + + + <!-- stylesheets list from _config.yml --> + + <link rel="stylesheet" href="/css/style.css"> + + + + + + <!-- scripts list from _config.yml --> + + <script src="/js/frame.js"></script> + + + + + + <script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script> + <script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script> + + + + + + + + <!-- hexo injector head_end start --> +<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css"> + +<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/style.css"> +<!-- hexo injector head_end end --><meta name="generator" content="Hexo 6.3.0"></head> + <body> + <div class="mask-border"> + </div> + + <div class="wrapper"> + + <div class="header"> + <div class="flex-container"> + <div class="header-inner"> + <div class="site-brand-container"> + <a href="/"> + + 暮秋小屋 + + </a> + </div> + <div id="menu-btn" class="menu-btn" onclick="toggleMenu()"> + Menu + </div> + <nav class="site-nav"> + <ul class="menu-list"> + + + <li class="menu-item"> + <a href="/">主页</a> + </li> + + + + <li class="menu-item"> + <a href="/tags/Technique/">技术</a> + </li> + + + + <li class="menu-item"> + <a href="/tags/Medicine/">医学</a> + </li> + + + + <li class="menu-item"> + <a href="/tags/Life/">生活</a> + </li> + + + + <li class="menu-item"> + <a href="/categories/gallery/">日记本</a> + </li> + + + + <li class="menu-item"> + <a href="/about">关于</a> + </li> + + + + </ul> + </nav> + </div> + </div> +</div> + + + <div class="main"> + <div class="flex-container"> + <article id="post"> + + + <div class="post-head"> + <div class="post-info"> + <div class="tag-list"> + + + <span class="post-tag"> + <a href="/tags/OCaml/"> + OCaml + </a> + </span> + + <span class="post-tag"> + <a href="/tags/Technique/"> + Technique + </a> + </span> + + + </div> + <div class="post-title"> + + + OCaml News 2023/5/6 + + + </div> + <span class="post-date"> + May 6, 2023 + </span> + </div> + <div class="post-img"> + + <div class="h-line-primary"></div> + + </div> +</div> + <div class="post-content"> + <h1 id="二零二三年四月二十九日-二零二三年五月六日"><a href="#二零二三年四月二十九日-二零二三年五月六日" class="headerlink" title="二零二三年四月二十九日 - 二零二三年五月六日"></a>二零二三年四月二十九日 - 二零二三年五月六日</h1><h2 id="Dune正在探索集成包管理,提供统一的开发体验"><a href="#Dune正在探索集成包管理,提供统一的开发体验" class="headerlink" title="Dune正在探索集成包管理,提供统一的开发体验"></a>Dune正在探索集成包管理,提供统一的开发体验</h2><p>dune, opam, opam-monorepo团队在几个月前联合起来,共同解决这个来自之前社区报告中的重要痛点。</p> +<p>在dune的github上有对于这项工作的详细解释:<a target="_blank" rel="noopener" href="https://github.com/ocaml/dune/issues/7680">https://github.com/ocaml/dune/issues/7680</a></p> +<p><a target="_blank" rel="noopener" href="https://discuss.ocaml.org/t/explorations-on-package-management-in-dune/12101">https://discuss.ocaml.org/t/explorations-on-package-management-in-dune/12101</a></p> +<p><a target="_blank" rel="noopener" href="https://discuss.ocaml.org/t/explorations-on-package-management-in-dune/12101">论坛原帖:https://discuss.ocaml.org/t/explorations-on-package-management-in-dune/12101</a></p> +<h2 id="OCaml-x2F-C-FFI对象的生命周期问题"><a href="#OCaml-x2F-C-FFI对象的生命周期问题" class="headerlink" title="OCaml/C FFI对象的生命周期问题"></a>OCaml/C FFI对象的生命周期问题</h2><p>OCaml manual中有一节名为<a target="_blank" rel="noopener" href="https://v2.ocaml.org/manual/intfc.html#s%3Ac-gc-harmony"><br>5 Living in harmony with the garbage collector</a>,其中介绍了六个规则,帮助编写C FFI。</p> +<p>对于如下C代码:</p> +<figure class="highlight c"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line">value <span class="title function_">pair</span><span class="params">(value a, value b)</span> {</span><br><span class="line"> CAMLparam2(a, b); <span class="comment">/*required*/</span></span><br><span class="line"> CAMLlocal1(r); <span class="comment">/*required*/</span></span><br><span class="line"> r = caml_alloc(<span class="number">2</span>,<span class="number">0</span>);</span><br><span class="line"> Store_field(r,<span class="number">0</span>,a);</span><br><span class="line"> Store_field(r,<span class="number">1</span>,b);</span><br><span class="line"> CAMLreturn(r); <span class="comment">/*required*/</span></span><br><span class="line">}</span><br></pre></td></tr></table></figure> + +<p>这里的<code>CAMLlocal1(r)</code>并不是必须的,如果a和b是立即值,那么其他注释有<code>require</code>的代码。也不是必须的,对于这六个规则应该持保留态度,它们并不是必须严格遵守的,只是为了更安全。</p> +<p><a target="_blank" rel="noopener" href="https://discuss.ocaml.org/t/ocaml-c-ffi-object-lifetimes/12099">论坛原帖:https://discuss.ocaml.org/t/ocaml-c-ffi-object-lifetimes/12099</a></p> +<h2 id="使用Elm-Style编写函数式Web应用"><a href="#使用Elm-Style编写函数式Web应用" class="headerlink" title="使用Elm Style编写函数式Web应用"></a>使用Elm Style编写函数式Web应用</h2><p>Fmlib 是一个函数式库,其中包含以下组件:</p> +<ul> +<li>Fmlib_std: 标准的数据结构(B树等)</li> +<li>Fmlib_pretty: Pretty Printing</li> +<li>Fmlib_parse: Parsing</li> +<li>Fmlib_browser: Web应用程序</li> +<li>Fmlib_js: 与浏览器/Nodejs交互</li> +</ul> +<p>github仓库:<a target="_blank" rel="noopener" href="https://github.com/hbr/fmlib">https://github.com/hbr/fmlib</a></p> +<p>一些简单的示例:<a target="_blank" rel="noopener" href="https://hbr.github.io/fmlib/webapp/index.html">https://hbr.github.io/fmlib/webapp/index.html</a></p> +<p><a target="_blank" rel="noopener" href="https://discuss.ocaml.org/t/ann-functional-web-applications-running-in-the-browser/11984">论坛原帖:https://discuss.ocaml.org/t/ann-functional-web-applications-running-in-the-browser/11984</a></p> +<h2 id="使用OCaml编写NeoVIM插件"><a href="#使用OCaml编写NeoVIM插件" class="headerlink" title="使用OCaml编写NeoVIM插件"></a>使用OCaml编写NeoVIM插件</h2><p>VCaml是一个用于在 OCaml 中编写 Neovim 插件的库。</p> +<p>github仓库: <a target="_blank" rel="noopener" href="https://github.com/janestreet/vcaml">https://github.com/janestreet/vcaml</a></p> +<p>论坛上相关的讨论: <a target="_blank" rel="noopener" href="https://discuss.ocaml.org/t/repo-for-nvim-plugins-in-ocaml-neovim-vcaml/12049">https://discuss.ocaml.org/t/repo-for-nvim-plugins-in-ocaml-neovim-vcaml/12049</a></p> +<h2 id="Format和PPrint在实践中的对比"><a href="#Format和PPrint在实践中的对比" class="headerlink" title="Format和PPrint在实践中的对比"></a>Format和PPrint在实践中的对比</h2><p><a target="_blank" rel="noopener" href="https://discuss.ocaml.org/t/format-vs-pprint-in-practice/12087">论坛原帖: https://discuss.ocaml.org/t/format-vs-pprint-in-practice/12087</a></p> +<h2 id="BLAS-x2F-LAPACK的OCaml-Binding"><a href="#BLAS-x2F-LAPACK的OCaml-Binding" class="headerlink" title="BLAS/LAPACK的OCaml Binding"></a>BLAS/LAPACK的OCaml Binding</h2><p>这个 OCaml 库绑定了两个广泛使用的数学 FORTRAN 库:</p> +<ul> +<li>BLAS : <a href="www.netlib.org/blas/">www.netlib.org/blas/</a></li> +<li>LAPAK : <a href="www.netlib.org/lapack/">www.netlib.org/lapack/</a></li> +</ul> +<p>Github仓库:<a target="_blank" rel="noopener" href="https://github.com/mmottl/lacaml">https://github.com/mmottl/lacaml</a></p> +<h2 id="基于Effects的实验性WebServer"><a href="#基于Effects的实验性WebServer" class="headerlink" title="基于Effects的实验性WebServer"></a>基于Effects的实验性WebServer</h2><p>Github仓库: <a target="_blank" rel="noopener" href="https://github.com/avsm/eeww">https://github.com/avsm/eeww</a></p> +<h2 id="纯(?)函数式SSH库"><a href="#纯(?)函数式SSH库" class="headerlink" title="纯(?)函数式SSH库"></a>纯(?)函数式SSH库</h2><p>awa-ssh是一个使用ISC协议开源的OCaml SSH库<br>Github仓库:<a target="_blank" rel="noopener" href="https://github.com/mirage/awa-ssh">https://github.com/mirage/awa-ssh</a></p> + +</div> + +<script> + window.onload = detectors(); +</script> + <div class="post-footer"> + <div class="h-line-primary"></div> + <nav class="post-nav"> + <div class="prev-item"> + + </div> + <div class="next-item"> + + <div class="icon arrow-right"></div> + <div class="post-link"> + <a href="/2023/05/04/OCaml-Effects%E7%AE%80%E6%98%8E%E6%95%99%E7%A8%8B/">Next</a> + </div> + + </div> + </nav> +</div> + + + <div class="post-comment"> + + + + + + + +</div> + + +</article> + </div> + </div> + + <div class="footer"> + <div class="flex-container"> + <div class="footer-text"> + + + | + + + 希望路过的人可以添点柴火让这里暖和点 + + </div> + </div> +</div> + + </div> + + + + + </body> +</html> |
