diff options
| author | muqiuhan <[email protected]> | 2023-06-22 10:56:22 +0000 |
|---|---|---|
| committer | muqiuhan <[email protected]> | 2023-06-22 10:56:22 +0000 |
| commit | 6f776f55fea31dd12e5af18af519ac7d02dd7f4e (patch) | |
| tree | c72c4cb1c01777dd906172ce1f41d085ede5038e /2023/05/15/OCaml_News_20230515/index.html | |
| parent | e6158eb85d917cea33aef29a0d51f6ca19718790 (diff) | |
| download | blog-6f776f55fea31dd12e5af18af519ac7d02dd7f4e.tar.gz | |
deploy: 5065a383b04f53c3f276768fe2cad5da7f821452
Diffstat (limited to '2023/05/15/OCaml_News_20230515/index.html')
| -rw-r--r-- | 2023/05/15/OCaml_News_20230515/index.html | 263 |
1 files changed, 0 insertions, 263 deletions
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 @@ -<!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/15 | 暮秋小屋</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="/Projects">项目</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/15 - - - </div> - <span class="post-date"> - May 15, 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="关于OCaml最新的并行特性相关文档"><a href="#关于OCaml最新的并行特性相关文档" class="headerlink" title="关于OCaml最新的并行特性相关文档"></a>关于OCaml最新的并行特性相关文档</h2><ol> -<li>Eio的README有很多例子: <a target="_blank" rel="noopener" href="https://github.com/ocaml-multicore/eio">https://github.com/ocaml-multicore/eio</a></li> -<li>ocaml-multicore组织官方的教程仓库: <a target="_blank" rel="noopener" href="https://github.com/ocaml-multicore/parallel-programming-in-multicore-ocaml">https://github.com/ocaml-multicore/parallel-programming-in-multicore-ocaml</a></li> -<li>OCaml的Manual: <a target="_blank" rel="noopener" href="https://v2.ocaml.org/releases/5.0/htmlman/parallelism.html">https://v2.ocaml.org/releases/5.0/htmlman/parallelism.html</a></li> -</ol> -<p>论坛原帖: <a target="_blank" rel="noopener" href="https://discuss.ocaml.org/t/new-concurrency-features/12158">https://discuss.ocaml.org/t/new-concurrency-features/12158</a></p> -<h2 id="使用OCaml通过串口与STM32通信"><a href="#使用OCaml通过串口与STM32通信" class="headerlink" title="使用OCaml通过串口与STM32通信"></a>使用OCaml通过串口与STM32通信</h2><p>在Linux/Unix上可以:</p> -<ul> -<li>适用于linux/unix的oserial: <a target="_blank" rel="noopener" href="https://github.com/m-laniakea/oserial">https://github.com/m-laniakea/oserial</a></li> -<li>直接打开 <code>/dev/XXX</code> 文件用Unix模块相关的API与其交互, 一个例子: <a target="_blank" rel="noopener" href="https://gist.github.com/dbuenzli/035bc5c8598069360dd7301f55e7774a">https://gist.github.com/dbuenzli/035bc5c8598069360dd7301f55e7774a</a></li> -</ul> -<p>Windows目前没有解决方案。</p> -<p>论坛原帖: <a target="_blank" rel="noopener" href="https://discuss.ocaml.org/t/is-there-any-library-of-ocaml-to-use-serial-port-of-pc/3658">https://discuss.ocaml.org/t/is-there-any-library-of-ocaml-to-use-serial-port-of-pc/3658</a></p> -<h2 id="使用OCaml构建IOS-APP"><a href="#使用OCaml构建IOS-APP" class="headerlink" title="使用OCaml构建IOS APP"></a>使用OCaml构建IOS APP</h2><ul> -<li>通过Js_of_ocaml编译为JavaScript并使用像CapacitorJS(甚至是旧的Cordova)这样的框架或许是一条路子。</li> -<li><a target="_blank" rel="noopener" href="http://psellos.com/aboutus.html">Psellos</a>是一个注重现代函数式语言(OCaml, F#, Haskell)的组织,它们维护了一个将OCaml编译到IOS的交叉编译器: <a target="_blank" rel="noopener" href="http://psellos.com/ocaml/compile-to-iphone.html">http://psellos.com/ocaml/compile-to-iphone.html</a></li> -<li>ocaml-cocoa的demo: <a target="_blank" rel="noopener" href="https://github.com/dboris/ocaml-cocoa/blob/master/examples/count_clicks.ml">https://github.com/dboris/ocaml-cocoa/blob/master/examples/count_clicks.ml</a></li> -</ul> -<p>论坛原帖: <a target="_blank" rel="noopener" href="https://discuss.ocaml.org/t/building-ios-apps-with-ocaml/12153">https://discuss.ocaml.org/t/building-ios-apps-with-ocaml/12153</a></p> -<h2 id="Ahref现在使用Melange构建"><a href="#Ahref现在使用Melange构建" class="headerlink" title="Ahref现在使用Melange构建"></a>Ahref现在使用Melange构建</h2><p><a href="">Melange</a>是结合使用 OCaml 和 Reason 生成 JavaScript 的工具组合。<br><a target="_blank" rel="noopener" href="https://ahrefs.com/">Ahrefs</a>是一个SEO软件套装,包含外链建设、关键字研究、竞争对手分析,排名跟踪和站点审核等工具。Ahrefs内部的大多数功能都是为营销专业人员设计的。</p> -<p>自去年 9 月以来,Melange、Dune 和 Ahrefs 开发团队一直致力于加强 Dune 和 Melange 之间的集成。作为一家在后端使用大量 OCaml 的公司,Ahrefs看到了Melange可以将其前端技术栈与OCaml更紧密结合(通过使用Melange与UI相关的JavaScript生态系统集成)。因此,该公司决定投资并积极参与以实现这种整合。</p> -<p>论坛原帖: <a target="_blank" rel="noopener" href="https://discuss.ocaml.org/t/ahrefs-is-now-built-with-melange/12107">https://discuss.ocaml.org/t/ahrefs-is-now-built-with-melange/12107</a></p> -<h2 id="Ahref正在招聘OCaml开发人员"><a href="#Ahref正在招聘OCaml开发人员" class="headerlink" title="Ahref正在招聘OCaml开发人员"></a>Ahref正在招聘OCaml开发人员</h2><p>一如既往,Ahrefs正在寻找OCaml开发人员,他们总部位于新加坡,团队遍布各地,所以也支持远程,详见:<br><a target="_blank" rel="noopener" href="https://ahrefs.com/jobs/ocaml-developer">https://ahrefs.com/jobs/ocaml-developer</a></p> -<p>论坛原帖: <a target="_blank" rel="noopener" href="https://discuss.ocaml.org/t/ahrefs-is-hiring/12136">https://discuss.ocaml.org/t/ahrefs-is-hiring/12136</a></p> -<h2 id="string-literals-inside-comments-5745"><a href="#string-literals-inside-comments-5745" class="headerlink" title="string literals inside comments #5745"></a>string literals inside comments #5745</h2><p>草,OCaml的parser不会忽略注释中的引号:</p> -<figure class="highlight plaintext"><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><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line">$ echo '(* "test *)' | ocaml </span><br><span class="line">OCaml version 5.0.0</span><br><span class="line">Enter #help;; for help.</span><br><span class="line"></span><br><span class="line"># (* "test *)tive `utop_prompt_fancy_light'.</span><br><span class="line"># * </span><br><span class="line">Error: This comment contains an unterminated string literal</span><br><span class="line">Line 1, characters 3-4: String literal begins here</span><br><span class="line"># </span><br></pre></td></tr></table></figure> - -<p>而经过讨论认为修复这个问题是向后不兼容的,所以修复这个词法分析器错误的风险似乎大于好处,就给close了。</p> -<p>相关issue: <a target="_blank" rel="noopener" href="https://github.com/ocaml/ocaml/issues/5745">https://github.com/ocaml/ocaml/issues/5745</a></p> -<p>有趣的是F#也继承了这个问题:</p> -<figure class="highlight plaintext"><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><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br></pre></td><td class="code"><pre><span class="line">$ echo '(* "test *)' | dotnet fsi</span><br><span class="line"></span><br><span class="line">Microsoft (R) F# Interactive version 12.5.0.0 for F# 7.0</span><br><span class="line">Copyright (c) Microsoft Corporation. All Rights Reserved.</span><br><span class="line"></span><br><span class="line">For help type #help;;</span><br><span class="line"></span><br><span class="line">> </span><br><span class="line"> (* "test *)</span><br><span class="line"> ^^</span><br><span class="line"></span><br><span class="line">/home/muqiu-han/stdin(1,1): error FS0517: End of file in string embedded in comment begun at or before here</span><br></pre></td></tr></table></figure> - - -</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 class="icon arrow-left"></div> - <div class="post-link"> - <a href="/2023/05/21/OCaml_News_20230521/">Prev</a> - </div> - - </div> - <div class="next-item"> - - <div class="icon arrow-right"></div> - <div class="post-link"> - <a href="/2023/05/09/OCaml_News_20230509/">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> |
