diff options
Diffstat (limited to '2023/04')
| -rw-r--r-- | 2023/04/27/二零二三年四月二十七日/index.html | 5 | ||||
| -rw-r--r-- | 2023/04/29/OCaml_News_20230429/index.html | 256 |
2 files changed, 261 insertions, 0 deletions
diff --git a/2023/04/27/二零二三年四月二十七日/index.html b/2023/04/27/二零二三年四月二十七日/index.html index b51b37ed..ffd82031 100644 --- a/2023/04/27/二零二三年四月二十七日/index.html +++ b/2023/04/27/二零二三年四月二十七日/index.html @@ -184,6 +184,11 @@ <nav class="post-nav"> <div class="prev-item"> + <div class="icon arrow-left"></div> + <div class="post-link"> + <a href="/2023/04/29/OCaml_News_20230429/">Prev</a> + </div> + </div> <div class="next-item"> diff --git a/2023/04/29/OCaml_News_20230429/index.html b/2023/04/29/OCaml_News_20230429/index.html new file mode 100644 index 00000000..32554332 --- /dev/null +++ b/2023/04/29/OCaml_News_20230429/index.html @@ -0,0 +1,256 @@ +<!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 Intro | 暮秋小屋</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 Intro + + + </div> + <span class="post-date"> + Apr 29, 2023 + </span> + </div> + <div class="post-img"> + + <div class="h-line-primary"></div> + + </div> +</div> + <div class="post-content"> + <p>这里是OCaml News,一个整合了OCaml社区以及周边生态最新信息的地方,先前一直在OCaml群内发送零散的信息,太细碎了,于是在此归纳整理,不过这一系列的更新频率是不规律的,并不遵循Weekly之类的频率,而是帖满即发。</p> +<p>总体上每一次更新分为三大类:</p> +<ol> +<li>论坛,即 <a target="_blank" rel="noopener" href="https://discuss.ocaml.org/">discuss.ocaml.org</a> 上有趣的新帖子</li> +<li>生态,即OCaml本身或周边生态中中出现的新工具,库</li> +<li>文章,即OCaml相关的最新论文,博客文章</li> +</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> +<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> +<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> +<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">open</span> <span class="keyword">struct</span> <span class="keyword">type</span> t = <span class="type">A</span> | <span class="type">B</span> <span class="keyword">end</span> <span class="keyword">in</span></span><br><span class="line"> ...</span><br></pre></td></tr></table></figure> + +<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> +<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> +<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> + +<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/04/27/%E4%BA%8C%E9%9B%B6%E4%BA%8C%E4%B8%89%E5%B9%B4%E5%9B%9B%E6%9C%88%E4%BA%8C%E5%8D%81%E4%B8%83%E6%97%A5/">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> |
