diff options
| author | muqiuhan <[email protected]> | 2024-01-23 12:34:19 +0000 |
|---|---|---|
| committer | muqiuhan <[email protected]> | 2024-01-23 12:34:19 +0000 |
| commit | c2ce219850aa3c880587e585b88718a3a25630a5 (patch) | |
| tree | 3466fb2435ec664a980adfdf13234b69615ce570 /2024 | |
| parent | 472a16ba150261cdba1ca068a678d8160c552954 (diff) | |
| download | blog-c2ce219850aa3c880587e585b88718a3a25630a5.tar.gz | |
deploy: 850faf4c6934ac6a7bd99a26948c2e3f7bed6c9a
Diffstat (limited to '2024')
| -rw-r--r-- | 2024/01/08/OCaml-News-2024-1/index.html | 283 | ||||
| -rw-r--r-- | 2024/01/18/OCaml-News-2024-2/index.html | 293 | ||||
| -rw-r--r-- | 2024/01/22/Rescript-React-Native/index.html | 255 | ||||
| -rw-r--r-- | 2024/01/23/G-Machine/index.html | 240 | ||||
| -rw-r--r-- | 2024/01/23/二〇二四年一月二十三日/index.html | 2 | ||||
| -rw-r--r-- | 2024/01/23/慢性肺源性心脏病/index.html | 5 |
6 files changed, 1077 insertions, 1 deletions
diff --git a/2024/01/08/OCaml-News-2024-1/index.html b/2024/01/08/OCaml-News-2024-1/index.html new file mode 100644 index 00000000..13a70b6c --- /dev/null +++ b/2024/01/08/OCaml-News-2024-1/index.html @@ -0,0 +1,283 @@ +<!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 2024-1 | 暮秋小屋</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> + + + + + + + + <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="/categories/gallery/">日记本</a> + </li> + + + + <li class="menu-item"> + <a href="/tags/Medicine/">医学</a> + </li> + + + + <li class="menu-item"> + <a href="/tags/Technique/">计算机科学</a> + </li> + + + + <li class="menu-item"> + <a href="/tags/Life/">生活</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/Technique/"> + Technique + </a> + </span> + + <span class="post-tag"> + <a href="/tags/OCaml/"> + OCaml + </a> + </span> + + + </div> + <div class="post-title"> + + + OCaml News 2024-1 + + + </div> + <span class="post-date"> + Jan 8, 2024 + </span> + </div> + <div class="post-img"> + + <div class="h-line-primary"></div> + + </div> +</div> + <div class="post-content"> + <h2 id="News"><a href="#News" class="headerlink" title="News"></a>News</h2><ul> +<li><a target="_blank" rel="noopener" href="https://tarides.com/blog/2023-12-20-ocaml-survey-developers-perception-interest-and-perceived-barriers/">OCaml Survey: Developers’ Perception, Interest, and Perceived Barriers</a></li> +<li><a target="_blank" rel="noopener" href="https://tarides.com/blog/2023-12-29-announcing-the-orchide-project-powering-satellite-innovation/">Announcing the ORCHIDE Project: Powering Satellite Innovation</a></li> +<li><a target="_blank" rel="noopener" href="https://github.com/ocaml/ocaml/pull/12885">Dynarrays, unboxed (with local dummies) #12885</a></li> +<li><a target="_blank" rel="noopener" href="https://github.com/ocaml/ocaml/pull/12871">Stdlib priority queues #12871</a></li> +<li><a target="_blank" rel="noopener" href="https://github.com/ocaml/ocaml/pull/12596">Compile recursive bindings in Lambda #12596</a></li> +<li><a target="_blank" rel="noopener" href="https://github.com/ocaml/ocaml/pull/12828">Add short syntax for dependent functor types #12828</a></li> +<li><a target="_blank" rel="noopener" href="https://github.com/ocaml/ocaml/pull/12508">[shapes] Add support for project-wide occurrences #12508</a></li> +<li><a target="_blank" rel="noopener" href="https://github.com/ocaml/ocaml/pull/1802">Make the character set for OCaml source code officially UTF-8. #1802</a></li> +<li><a target="_blank" rel="noopener" href="https://github.com/ocaml/ocaml/pull/12719">Add thread local storage #12719</a></li> +</ul> +<h2 id="Videos"><a href="#Videos" class="headerlink" title="Videos"></a>Videos</h2><ul> +<li><a target="_blank" rel="noopener" href="https://www.youtube.com/watch?v=zG7JejHlQoM">“Melange: The next frontier in type-safe web development” by Dillon Mulroy - RVAJS 2023</a></li> +<li><a target="_blank" rel="noopener" href="https://www.youtube.com/watch?v=R-XJzUrP7bQ">Trying out OCaml TUI framework Mint Tea!</a></li> +<li><a target="_blank" rel="noopener" href="https://www.youtube.com/watch?v=XyDbG9FGR1o">A TUI chat in OCaml 🐫</a></li> +<li>[Building a Game Engine… with OCaml ?! [Part 1]](<a target="_blank" rel="noopener" href="https://www.youtube.com/watch?v=1XpUaTnssQE">https://www.youtube.com/watch?v=1XpUaTnssQE</a></li> +</ul> +<h2 id="Blogs"><a href="#Blogs" class="headerlink" title="Blogs"></a>Blogs</h2><ul> +<li><a target="_blank" rel="noopener" href="https://sancho.dev/blog/whats-possible-with-melange">What’s possible with Melange</a></li> +<li><a target="_blank" rel="noopener" href="https://discuss.ocaml.org/t/access-inferred-types/13805">Access inferred types</a></li> +<li><a target="_blank" rel="noopener" href="https://discuss.ocaml.org/t/using-menhir-to-parse-into-idiomatic-js-typescript-structures/13809">Using Menhir to parse into idiomatic JS (TypeScript) structures</a></li> +<li><a target="_blank" rel="noopener" href="https://discuss.ocaml.org/t/why-constructors-are-not-curried/13792">Why constructors are not curried?</a></li> +<li><a target="_blank" rel="noopener" href="https://discuss.ocaml.org/t/practical-example-of-applicative-vs-generative-functors/13777">Practical example of applicative vs generative functors?</a></li> +<li><a target="_blank" rel="noopener" href="https://discuss.ocaml.org/t/compiler-optimization-on-flattening-adt-for-less-boxing/13764">Compiler optimization on flattening ADT for less boxing?</a></li> +<li><a target="_blank" rel="noopener" href="https://discuss.ocaml.org/t/how-to-express-koka-home-page-example/13748">How to express Koka home page example?</a></li> +<li><a target="_blank" rel="noopener" href="https://practicalocaml.com/parsing-with-binary-string-pattern-matching/">Parsing with Binary String Pattern Matching</a></li> +</ul> +<h2 id="Highlighted-Projects"><a href="#Highlighted-Projects" class="headerlink" title="Highlighted Projects"></a>Highlighted Projects</h2><ul> +<li><a target="_blank" rel="noopener" href="https://github.com/backtracking/grid">grid: A tiny library for two-dimensional arrays</a></li> +<li><a target="_blank" rel="noopener" href="https://github.com/leostera/minttea">A fun little TUI framework for OCaml</a></li> +<li><a target="_blank" rel="noopener" href="https://github.com/terrateamio/ocaml-ts-mode">ocaml-ts-mode: Ocaml mode for emacs using treesitter</a></li> +<li><a target="_blank" rel="noopener" href="https://github.com/dmmulroy/create-melange-app">create-melange-app: An example app created by create-melange-app</a></li> +<li><a target="_blank" rel="noopener" href="https://github.com/andersfugmann/ppx_protocol_conv">ppx_protocol_conv: Pluggable serialization and deserialization of ocaml data strucures based on type_conv</a></li> +<li><a target="_blank" rel="noopener" href="https://spatial-shell.app/">spatial-shell: Spatial Shell is a daemon implementing a spatial model inspired by Material Shell, for i3 and sway. More precisely, it organizes your windows within a grid whose rows are the workspaces of your favorite WM.</a></li> +<li><a target="_blank" rel="noopener" href="https://codeberg.org/marcc/fixgen">Fixgen: A language agnostic fixture generator</a></li> +<li><a target="_blank" rel="noopener" href="https://github.com/tweag/opam-nix">opam-nix: Turn opam-based OCaml projects into Nix derivations</a></li> +<li><a target="_blank" rel="noopener" href="https://github.com/leostera/blink">Blink: A pure OCaml HTTP client for Riot</a></li> +<li><a target="_blank" rel="noopener" href="https://github.com/leostera/colors">colors: A pure OCaml library for manipulating colors in different color spaces.</a></li> +<li><a target="_blank" rel="noopener" href="https://github.com/nationalarchives/miiify">miilfy: A web annotation server built with the same principles as Git</a></li> +</ul> +<h2 id="New-Releases"><a href="#New-Releases" class="headerlink" title="New Releases"></a>New Releases</h2><ul> +<li><a target="_blank" rel="noopener" href="https://github.com/leostera/riot">Roit v0.0.7: An actor-model multi-core scheduler for OCaml 5 🐫</a></li> +<li><a target="_blank" rel="noopener" href="https://github.com/leostera/castore">CAStore: A portable pure OCaml CA Store, with no dependencies, inspired by Elixir’s <a target="_blank" rel="noopener" href="https://github.com/elixir-mint/castore">:castore</a>.</a></li> +<li><a target="_blank" rel="noopener" href="https://discuss.ocaml.org/t/learn-ocaml-1-0-approaching-call-for-testers/13621">Lean-OCaml 1.0: A Web Application for Learning OCaml</a></li> +<li><a target="_blank" rel="noopener" href="https://erratique.ch/software/cmarkit">cmarkit 0.3.0” CommonMark parser and renderer for OCaml</a></li> +<li><a target="_blank" rel="noopener" href="https://ocaml.org/p/dream-html/latest">dream-html 2.0.0: A library for generating HTML</a></li> +<li><a target="_blank" rel="noopener" href="https://git.frama-c.com/pub/caisar/">Caisar: A platform under active development at CEA LIST, aiming to provide a wide range of features to characterize the safety and robustness of artificial intelligence based software.</a></li> +<li><a target="_blank" rel="noopener" href="https://github.com/jserot/rfsm">RFSM 2.0: A toolset for describing and simulating StateChart-like state diagrams.</a></li> +<li><a target="_blank" rel="noopener" href="https://github.com/chshersh/zbg/tree/main">Zbg 2.0: <code>zbg</code> (short for <strong>Z</strong>ero <strong>B</strong>ullshit <strong>G</strong>it) is a CLI tool for using <code>git</code> efficiently.</a></li> +</ul> + +</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="/2024/01/18/OCaml-News-2024-2/">Prev</a> + </div> + + </div> + <div class="next-item"> + + <div class="icon arrow-right"></div> + <div class="post-link"> + <a href="/2023/12/02/%E4%BA%8C%E3%80%87%E4%BA%8C%E4%B8%89%E5%B9%B4%E5%8D%81%E4%BA%8C%E6%9C%88%E4%BA%8C%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> diff --git a/2024/01/18/OCaml-News-2024-2/index.html b/2024/01/18/OCaml-News-2024-2/index.html new file mode 100644 index 00000000..a97be6e9 --- /dev/null +++ b/2024/01/18/OCaml-News-2024-2/index.html @@ -0,0 +1,293 @@ +<!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 2024-2 | 暮秋小屋</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> + + + + + + + + <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="/categories/gallery/">日记本</a> + </li> + + + + <li class="menu-item"> + <a href="/tags/Medicine/">医学</a> + </li> + + + + <li class="menu-item"> + <a href="/tags/Technique/">计算机科学</a> + </li> + + + + <li class="menu-item"> + <a href="/tags/Life/">生活</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/Technique/"> + Technique + </a> + </span> + + <span class="post-tag"> + <a href="/tags/OCaml/"> + OCaml + </a> + </span> + + + </div> + <div class="post-title"> + + + OCaml News 2024-2 + + + </div> + <span class="post-date"> + Jan 18, 2024 + </span> + </div> + <div class="post-img"> + + <div class="h-line-primary"></div> + + </div> +</div> + <div class="post-content"> + <h2 id="News"><a href="#News" class="headerlink" title="News"></a>News</h2><ul> +<li><a target="_blank" rel="noopener" href="https://discuss.ocaml.org/t/ann-preview-play-with-project-wide-occurrences-for-ocaml/13814">[ANN][PREVIEW] Play with project-wide occurrences for OCaml!</a></li> +<li><a target="_blank" rel="noopener" href="https://github.com/ocaml/dune/pull/8784">[Dune]: Add link flags ocamlmklib when using ctypes stubs. #8784</a></li> +<li><a target="_blank" rel="noopener" href="https://discuss.ocaml.org/t/ocaml-software-foundation-january-2024-update/13828">OCaml Software Foundation: January 2024 update</a></li> +<li>[Apprendre à programmer avec OCaml](Apprendre à programmer avec OCaml)</li> +<li><a target="_blank" rel="noopener" href="https://discuss.ocaml.org/t/call-for-speakers-for-the-2024-carolina-code-conference-is-open-until-april-15th/13827"><a target="_blank" rel="noopener" href="https://discuss.ocaml.org/t/call-for-speakers-for-the-2024-carolina-code-conference-is-open-until-april-15th/13827">Call for Speakers for the 2024 Carolina Code Conference is open until April 15th</a></a></li> +<li><a target="_blank" rel="noopener" href="https://github.com/ocaml/ocaml/discussions/11924">[OCaml]: feature request: better errors #11924</a></li> +<li><a target="_blank" rel="noopener" href="https://discuss.ocaml.org/t/ocsigen-summary-of-recent-releases/13817">Ocsigen: summary of recent releases</a></li> +</ul> +<h2 id="Discussion"><a href="#Discussion" class="headerlink" title="Discussion"></a>Discussion</h2><ul> +<li><a target="_blank" rel="noopener" href="https://discuss.ocaml.org/t/benchmark-between-open-addressing-and-closed-addressing-hashtbl/13882">Benchmark between open-addressing and closed-addressing hashtbl</a></li> +<li><a target="_blank" rel="noopener" href="https://discuss.ocaml.org/t/examples-of-caqti-infix/13878">Examples of Caqti infix?</a></li> +<li><a target="_blank" rel="noopener" href="https://discuss.ocaml.org/t/why-can-t-i-create-a-project-with-non-ascii-characters/13865">Why can’t I create a project with non-ASCII characters? </a></li> +<li><a target="_blank" rel="noopener" href="https://discuss.ocaml.org/t/old-self-taught-vs-uni-debate-landscape-for-former-jane-street/13851">Old self-taught vs. uni debate; Landscape for former; Jane Street</a></li> +<li><a target="_blank" rel="noopener" href="https://discuss.ocaml.org/t/toml-file-parser/13854">Is there an easy way to read the values from a toml file?</a></li> +<li><a target="_blank" rel="noopener" href="https://discuss.ocaml.org/t/generate-typed-ast-fragments/13824">Generate typed AST fragments</a></li> +<li><a target="_blank" rel="noopener" href="https://discuss.ocaml.org/t/partially-apply-function-accepting-multiple-modules-and-keep-polymorphic-types/13823">Partially apply function accepting multiple modules and keep polymorphic types</a></li> +<li><a target="_blank" rel="noopener" href="https://discuss.ocaml.org/t/printing-unicode-characters-on-different-platforms/13813">Printing Unicode Characters on Different Platforms</a></li> +</ul> +<h2 id="Videos"><a href="#Videos" class="headerlink" title="Videos"></a>Videos</h2><ul> +<li><a target="_blank" rel="noopener" href="https://watch.ocaml.org/w/iQNqZzA8gVmd4RQaycAwx4">Verifying an Effect-Based Cooperative Concurrency Scheduler in Iris by Adrian Dapprich</a></li> +</ul> +<h2 id="Blogs"><a href="#Blogs" class="headerlink" title="Blogs"></a>Blogs</h2><ul> +<li><a target="_blank" rel="noopener" href="https://discuss.ocaml.org/t/advice-for-combining-multiple-monads/10409">Advice for combining multiple monads</a></li> +<li><a target="_blank" rel="noopener" href="https://discuss.ocaml.org/t/writing-ctypes-bindings-to-system-shared-libraries-for-bytecode-targets-via-the-dune-ctypes-stanza/13844">Writing ctypes bindings to system shared libraries for bytecode targets via the dune ctypes stanza</a></li> +</ul> +<h2 id="Highlighted-Projects"><a href="#Highlighted-Projects" class="headerlink" title="Highlighted Projects"></a>Highlighted Projects</h2><ul> +<li><a target="_blank" rel="noopener" href="https://github.com/johnyob/grace">Grace: A fancy diagnostics library that allows your compilers to exit with grace</a></li> +<li><a target="_blank" rel="noopener" href="https://github.com/thierry-martinez/metapp">meta-pp: Meta-preprocessor for OCaml</a></li> +<li><a target="_blank" rel="noopener" href="https://github.com/stedolan/ppx_stage">ppx_stage: Staged metaprogramming in stock OCaml</a></li> +<li><a target="_blank" rel="noopener" href="https://erratique.ch/software/cmarkit">Cmarkit is an <a target="_blank" rel="noopener" href="http://ocaml.org/">OCaml</a> libary for parsing the <a target="_blank" rel="noopener" href="https://spec.commonmark.org/">CommonMark</a> specification.</a></li> +<li><a target="_blank" rel="noopener" href="https://erratique.ch/software/brr">Brr is a toolkit for programming browsers in <a target="_blank" rel="noopener" href="http://ocaml.org/">OCaml</a> with the <a target="_blank" rel="noopener" href="http://ocsigen.org/js_of_ocaml/">js_of_ocaml</a> compiler. It provides:</a></li> +<li><a target="_blank" rel="noopener" href="https://erratique.ch/software/zipc">Zipc is an in-memory <a target="_blank" rel="noopener" href="https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT">ZIP</a> archive and <a target="_blank" rel="noopener" href="https://www.rfc-editor.org/rfc/rfc1951">deflate</a> compression codec for <a target="_blank" rel="noopener" href="http://ocaml.org/">OCaml</a>.</a></li> +<li><a target="_blank" rel="noopener" href="https://github.com/lukstafi/ocaml-gccjit">ocaml-gccjit: OCaml bindings for libgccjit</a></li> +<li><a target="_blank" rel="noopener" href="https://github.com/whitequark/ocaml-m17n">ocaml-m17n: Multilingualization for the OCaml source code</a></li> +<li><a target="_blank" rel="noopener" href="https://github.com/hackwaly/ocamlearlybird">ocamlearlybird: OCaml debug adapter</a></li> +<li><a target="_blank" rel="noopener" href="https://github.com/dmbaturin/otoml">otoml: TOML parsing, manipulation, and pretty-printing library for OCaml (fully 1.0.0-compliant)</a></li> +<li><a target="_blank" rel="noopener" href="https://github.com/mattjbray/ocaml-decoders">ocaml-decoders: Elm-inspired decoders for Ocaml</a></li> +<li><a target="_blank" rel="noopener" href="https://github.com/OCamlPro/ez_toml">ez_toml: A library to parse and print TOML files</a></li> +</ul> +<h2 id="New-Releases"><a href="#New-Releases" class="headerlink" title="New Releases"></a>New Releases</h2><ul> +<li><a target="_blank" rel="noopener" href="http://cambium.inria.fr/~fpottier/oma/doc/oma/Oma/index.html">Oma: OCaml implementation of ‘Two Simplified Algorithms for Maintaining Order in a List’</a><ul> +<li><a target="_blank" rel="noopener" href="https://discuss.ocaml.org/t/ann-first-release-of-oma/13845">[ANN] First release of oma</a></li> +<li><a target="_blank" rel="noopener" href="https://erikdemaine.org/papers/DietzSleator_ESA2002/paper.pdf">Two Simplified Algorithms for Maintaining Order in a List</a></li> +</ul> +</li> +<li><a target="_blank" rel="noopener" href="https://github.com/hackwaly/ocamlearlybird">ocamlearlybird: v1.3.0</a><ul> +<li><a target="_blank" rel="noopener" href="https://discuss.ocaml.org/t/ann-ocamlearlybird-just-got-ability-to-inspect-opaque-abstract-values/13852">[ANN] Ocamlearlybird just got ability to inspect opaque/abstract values</a></li> +</ul> +</li> +<li><a target="_blank" rel="noopener" href="https://github.com/Axot017/validate">validate: OCaml Data Validation library</a><ul> +<li><a target="_blank" rel="noopener" href="https://discuss.ocaml.org/t/ann-validate-a-new-library-for-data-validation/13861">[ANN] Validate - A New Library for Data Validation</a></li> +</ul> +</li> +<li><a target="_blank" rel="noopener" href="https://github.com/gborough/sarif">sarif v2.1.0: Static Analysis Results Interchange Format (SARIF) For OCaml</a><ul> +<li><a target="_blank" rel="noopener" href="https://discuss.ocaml.org/t/ann-sarif-0-1-0-static-analysis-results-interchange-format-sarif-for-ocaml/13821">[ANN] sarif 0.1.0 - Static Analysis Results Interchange Format (SARIF) For OCaml</a></li> +</ul> +</li> +<li><a target="_blank" rel="noopener" href="https://discuss.ocaml.org/t/ann-new-release-of-menhir-20231231/13816">[ANN] New release of Menhir (20231231)</a></li> +</ul> + +</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="/2024/01/22/Rescript-React-Native/">Prev</a> + </div> + + </div> + <div class="next-item"> + + <div class="icon arrow-right"></div> + <div class="post-link"> + <a href="/2024/01/08/OCaml-News-2024-1/">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> diff --git a/2024/01/22/Rescript-React-Native/index.html b/2024/01/22/Rescript-React-Native/index.html new file mode 100644 index 00000000..47775070 --- /dev/null +++ b/2024/01/22/Rescript-React-Native/index.html @@ -0,0 +1,255 @@ +<!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>Rescript React Native | 暮秋小屋</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> + + + + + + + + <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="/categories/gallery/">日记本</a> + </li> + + + + <li class="menu-item"> + <a href="/tags/Medicine/">医学</a> + </li> + + + + <li class="menu-item"> + <a href="/tags/Technique/">计算机科学</a> + </li> + + + + <li class="menu-item"> + <a href="/tags/Life/">生活</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/Technique/"> + Technique + </a> + </span> + + <span class="post-tag"> + <a href="/tags/Rescript/"> + Rescript + </a> + </span> + + + </div> + <div class="post-title"> + + + Rescript React Native + + + </div> + <span class="post-date"> + Jan 22, 2024 + </span> + </div> + <div class="post-img"> + + <div class="h-line-primary"></div> + + </div> +</div> + <div class="post-content"> + <p>Rescript 对 React Native 的支持还算可以,但如今的 RN 已经是 Expo 的 RN 了,所以仍然有些落后,在这个 template 中,我测试了 rescript + rescript-react-native + expo + nativewind 的组合,可以跑起来:</p> +<ul> +<li><a target="_blank" rel="noopener" href="https://github.com/muqiuhan/rescript-react-native-expo-nativewind-template">muqiuhan/rescript-react-native-expo-nativewind-template</a></li> +</ul> +<p>其中有两个问题,一是 <a target="_blank" rel="noopener" href="https://github.com/rescript-bindings/expo">rescript-expo</a> 对 rescript v11 的兼容性,我通过简单的注释让其通过编译:</p> +<ul> +<li><a target="_blank" rel="noopener" href="https://github.com/muqiuhan/expo/commit/918e9578f2a991450821760352c2445c4866f0d8">[Fix]: DocumentPicker type options</a></li> +</ul> +<p>二是对于 nativewind 的支持,编写的 binding 非常丑陋:</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><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br></pre></td><td class="code"><pre><span class="line">type default_style = {</span><br><span class="line"> className?: string,</span><br><span class="line"> children?: React.element,</span><br><span class="line">}</span><br><span class="line"></span><br><span class="line">@module("nativewind")</span><br><span class="line">external styled: React.component<'a> => React.component<default_style> = "styled"</span><br><span class="line"></span><br><span class="line">module StyledText = {</span><br><span class="line"> let make = styled(ReactNative.Text.make)</span><br><span class="line">}</span><br><span class="line"></span><br><span class="line">module StyledView = {</span><br><span class="line"> let make = styled(ReactNative.View.make)</span><br><span class="line">}</span><br><span class="line"></span><br><span class="line">module StyledImage = {</span><br><span class="line"> type props = {</span><br><span class="line"> source?: string,</span><br><span class="line"> ...default_style,</span><br><span class="line"> }</span><br><span class="line"></span><br><span class="line"> @module("nativewind")</span><br><span class="line"> external styled: React.component<'a> => React.component<props> = "styled"</span><br><span class="line"></span><br><span class="line"> let make: React.component<props> = styled(ReactNative.Image.make)</span><br><span class="line">}</span><br></pre></td></tr></table></figure> + +<p>而这似乎并没有好的解决方案,理想中的实现应该是:</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><span class="line">13</span><br></pre></td><td class="code"><pre><span class="line">module Styled = (Component: {</span><br><span class="line"> type params // or type params = 'a</span><br><span class="line"> let make: React.component<props></span><br><span class="line">}) => {</span><br><span class="line"> type props = {</span><br><span class="line"> ...Component.props, // This can't work as it is not defined as record</span><br><span class="line"> className?: string</span><br><span class="line"> }</span><br><span class="line"> @module("nativewind")</span><br><span class="line"> external styled: React.component<Component.props> => React.component<props> = "styled"</span><br><span class="line"></span><br><span class="line"> let make: React.component<props> = styled(Component.make)</span><br><span class="line">}</span><br></pre></td></tr></table></figure> + +<p>或者退一步:</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><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br></pre></td><td class="code"><pre><span class="line">type styledProps = {</span><br><span class="line"> className?: string,</span><br><span class="line"> // ...</span><br><span class="line">}</span><br><span class="line"></span><br><span class="line">@module("nativewind")</span><br><span class="line"> external styled: React.component<'a> => React.component<'b> = "styled"</span><br><span class="line"></span><br><span class="line">module StyledText = {</span><br><span class="line"> type props = {</span><br><span class="line"> ...ReactNative.Text.props,</span><br><span class="line"> ...styledProps</span><br><span class="line"> }</span><br><span class="line"></span><br><span class="line"> let make: React.component<props> = styled(ReactNative.Text.make)</span><br><span class="line">}</span><br></pre></td></tr></table></figure> + +<p>但这在当前的 rescript 中,根本无法实现。</p> +<p>详细的讨论看这个帖子:</p> +<ul> +<li><a target="_blank" rel="noopener" href="https://forum.rescript-lang.org/t/how-to-use-nativewind-in-rescript-react-native/5005">How to use Nativewind in Rescript React Native</a></li> +</ul> + +</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="/2024/01/23/%E4%BA%8C%E3%80%87%E4%BA%8C%E5%9B%9B%E5%B9%B4%E4%B8%80%E6%9C%88%E4%BA%8C%E5%8D%81%E4%B8%89%E6%97%A5/">Prev</a> + </div> + + </div> + <div class="next-item"> + + <div class="icon arrow-right"></div> + <div class="post-link"> + <a href="/2024/01/18/OCaml-News-2024-2/">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> diff --git a/2024/01/23/G-Machine/index.html b/2024/01/23/G-Machine/index.html new file mode 100644 index 00000000..ff1d742e --- /dev/null +++ b/2024/01/23/G-Machine/index.html @@ -0,0 +1,240 @@ +<!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>G-Machine | 暮秋小屋</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> + + + + + + + + <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="/categories/gallery/">日记本</a> + </li> + + + + <li class="menu-item"> + <a href="/tags/Medicine/">医学</a> + </li> + + + + <li class="menu-item"> + <a href="/tags/Technique/">计算机科学</a> + </li> + + + + <li class="menu-item"> + <a href="/tags/Life/">生活</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/Technique/"> + Technique + </a> + </span> + + + </div> + <div class="post-title"> + + + G-Machine + + + </div> + <span class="post-date"> + Jan 23, 2024 + </span> + </div> + <div class="post-img"> + + <div class="h-line-primary"></div> + + </div> +</div> + <div class="post-content"> + <ul> +<li><a target="_blank" rel="noopener" href="https://link.springer.com/chapter/10.1007/3-540-15975-4_50">The G-machine: A fast, graph-reduction evaluator</a></li> +</ul> +<p>G-Machine 是一种通过图规约来对函数式语言程序求值的抽象架构。<br>与组合子规约不同,组合子规约的control是从表达式图本身动态导出的,而G-Machine是由通过编译Application表达式导出的指令序列指定的。</p> +<hr> +<p>FP的程序基本上都可以用一个表达式的图表示,图计算机就是对这个图求值的机器,总的说来对图的求值是一个不停合并图上的节点生产新节点的过程。</p> +<p>例如:</p> +<figure class="highlight ocaml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">let</span> x = <span class="number">2</span> + <span class="number">3</span> <span class="keyword">in</span> </span><br><span class="line"> x * x</span><br></pre></td></tr></table></figure> + +<p>先计算出5,然后创建一个新的节点 <code>5 * 5</code>,然后再对这个节点求值,于是求值过程中就产生了很多临时的节点,这些中间节点也被叫做是 spine,求值过程是沿着 spine 进行的。</p> +<p>但是这样就产生了很多额外的开销,lambda lifting 里提到:可以把程序里,很多捕捉了外围绑定的闭包函数中的这些绑定,转换成函数的参数,从而消除闭包,得到的这个函数就可以自由脱离作用域,被静态的编译到机器码里。这些被 float out 的函数也叫 supercombinator.</p> +<p>在上面的代码中,如果不创建新的节点,顺序计算完了第一个 <code>x</code>,第二个 <code>x</code> 还会再被算一遍。</p> +<p>Spineless reduction 的概念:只有当面临需要重复计算的情况时,才去创建节点,不然就一路顺序算下去</p> +<ul> +<li><a target="_blank" rel="noopener" href="https://en.wikipedia.org/wiki/Graph_reduction">Graph reduction</a></li> +<li><a target="_blank" rel="noopener" href="https://en.wikipedia.org/wiki/Graph_reduction_machine">Graph reduction machine</a></li> +<li><a target="_blank" rel="noopener" href="https://www.zhihu.com/question/54834531/answer/144213668">https://www.zhihu.com/question/54834531/answer/144213668</a></li> +</ul> + +</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="/2024/01/23/%E6%85%A2%E6%80%A7%E8%82%BA%E6%BA%90%E6%80%A7%E5%BF%83%E8%84%8F%E7%97%85/">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> diff --git a/2024/01/23/二〇二四年一月二十三日/index.html b/2024/01/23/二〇二四年一月二十三日/index.html index b41da268..62bf3ade 100644 --- a/2024/01/23/二〇二四年一月二十三日/index.html +++ b/2024/01/23/二〇二四年一月二十三日/index.html @@ -195,7 +195,7 @@ <div class="icon arrow-right"></div> <div class="post-link"> - <a href="/2023/12/02/%E4%BA%8C%E3%80%87%E4%BA%8C%E4%B8%89%E5%B9%B4%E5%8D%81%E4%BA%8C%E6%9C%88%E4%BA%8C%E6%97%A5/">Next</a> + <a href="/2024/01/22/Rescript-React-Native/">Next</a> </div> </div> diff --git a/2024/01/23/慢性肺源性心脏病/index.html b/2024/01/23/慢性肺源性心脏病/index.html index 93def6d0..91a5abba 100644 --- a/2024/01/23/慢性肺源性心脏病/index.html +++ b/2024/01/23/慢性肺源性心脏病/index.html @@ -237,6 +237,11 @@ <nav class="post-nav"> <div class="prev-item"> + <div class="icon arrow-left"></div> + <div class="post-link"> + <a href="/2024/01/23/G-Machine/">Prev</a> + </div> + </div> <div class="next-item"> |
