[cwn] Attn: Development Editor, Latest OCaml Weekly News
Alan Schmitt
alan.schmitt at polytechnique.org
Tue Mar 28 00:21:56 PDT 2023
Hello
Here is the latest OCaml Weekly News, for the week of March 21 to 28,
2023.
Table of Contents
─────────────────
VOCaml: add and remove type annotations in VS Code
new versions of VS Code extensions Alcotest and Expect and Inline tests, now on Open VSX too
Docfd: TUI fuzzy document finder 0.2.3
Camomile 2.0.0 is out!
cid 0.1.0 - Content Identifiers in OCaml
Stk 0.1.0 (SDL-based GUI toolkit) and Chamo 4.0
Cyber-hackathon Frama-C + Binsec near Paris
Zanuda – OCaml linter experiment
Old CWN
VOCaml: add and remove type annotations in VS Code
══════════════════════════════════════════════════
Archive:
<https://discuss.ocaml.org/t/vocaml-add-and-remove-type-annotations-in-vs-code/11618/6>
Lukasz Stafiniak announced
──────────────────────────
A new version of [VOCaml – 1.1.1] is out ([Marketplace]). Multiline
types work now, also labeled arguments (and optional without
defaults), unit value pattern.
[VOCaml – 1.1.1] <https://github.com/lukstafi/vocaml/releases/tag/1.1.1>
[Marketplace]
<https://marketplace.visualstudio.com/items?itemName=lukstafi.vocaml>
new versions of VS Code extensions Alcotest and Expect and Inline tests, now on Open VSX too
════════════════════════════════════════════════════════════════════════════════════════════
Archive:
<https://discuss.ocaml.org/t/ann-new-versions-of-vs-code-extensions-alcotest-and-expect-inline-tests-now-on-open-vsx-too/11700/2>
Roland Csaszar announced
────────────────────────
New versions for both extensions that fix a critical bug: until now if
there had been more than one test runner the tests from all other
runners had been deleted during test discovery.
Important feature added to the Expect and Inline extension: on startup
and `Refresh Tests' now the tests are not run, but only a list of
tests is generated. This speeds up test discovery significantly (and
now both extensions work the same).
Alcotest Test Explorer Version 0.6.0
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌
• [VS Code Marketplace]
• [Open VSX]
• [GitHub]
[VS Code Marketplace]
<https://marketplace.visualstudio.com/items?itemName=release-candidate.vscode-ocaml-alcotest-test-adapter>
[Open VSX]
<https://open-vsx.org/extension/Release-Candidate/vscode-ocaml-alcotest-test-adapter>
[GitHub]
<https://github.com/Release-Candidate/vscode-ocaml-alcotest-test-adapter>
◊ Changelog
• Make the path to the Dune executable configurable. Can now be either
an absolute path, a path relative to the project root or just
`dune', which is looked up in the local Opam environment or the
`PATH'.
• Add a message window to ask for a reload if a configuration value
has changed.
• Update documentation
◊ Bugfixes
• Do not delete the test groups of all other test runners if there
exists more than one test runner.
Expect and Inline Tests Version 0.5.0
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌
• [VS Code Marketplace]
• [Open VSX]
• [GitHub]
[VS Code Marketplace]
<https://marketplace.visualstudio.com/items?itemName=release-candidate.vscode-ocaml-expect-inline>
[Open VSX]
<https://open-vsx.org/extension/Release-Candidate/vscode-ocaml-expect-inline>
[GitHub]
<https://github.com/Release-Candidate/vscode-ocaml-expect-inline>
◊ Changelog
• No need to run all tests at startup or refresh. Use the
`-list-test-names' argument of the inline test runners.
• New configuration values:
‣ `expectppx.discoverInSources' - Whether to parse source files on
open and save for tests and update the Test Explorer tree. Should
be set to `true' if `expectppx.discoverOnStartup' is `false'.
‣ `expectppx.dunePath' - Set an absolute path or a path relative to
the project root of the Dune executable. Default: `dune' - use the
one in the local Opam environment or in `PATH'. See [Issue #3].
‣ `expectppx.excludeRunners' - A list of inline test runner names to
be excluded from test discovery an startup or refresh, e.g.
because they take too long to finish.
• Add a message window to ask for a reload if a configuration value
has changed.
• Disable ANSI color escape sequences in output of test failures.
• Update the documentation.
[Issue #3]
<https://github.com/Release-Candidate/vscode-ocaml-expect-inline/issues/3>
◊ Bugfixes
• Fix bug when tests from other test runners are deleted on startup or
refresh having more than one inline test runner. See [Issue #3].
[Issue #3]
<https://github.com/Release-Candidate/vscode-ocaml-expect-inline/issues/3>
◊ Internal Changes
• Remove ANSI escape sequences from test fixtures.
• Add yarn target for the Open VSX Registry.
Roland Csaszar later announced
──────────────────────────────
I’ve just released a new version of the Expect testing extension. The
Expect test result of a failed test now uses VS Code’s diff view. The
actual result output of the test can be displayed by hovering the
stanza `let%expect_test'.
Expect and Inline Tests Version 0.6.0
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌
• [VS Code Marketplace]
• [Open VSX]
• [GitHub]
[VS Code Marketplace]
<https://marketplace.visualstudio.com/items?itemName=release-candidate.vscode-ocaml-expect-inline>
[Open VSX]
<https://open-vsx.org/extension/Release-Candidate/vscode-ocaml-expect-inline>
[GitHub]
<https://github.com/Release-Candidate/vscode-ocaml-expect-inline>
◊ Changelog
• Show the expected and actual values of Expect tests in VS Codes’
diff view. See [Issue #6].
[Issue #6]
<https://github.com/Release-Candidate/vscode-ocaml-expect-inline/issues/6>
Roland Csaszar finally announced
────────────────────────────────
These releases of both extensions provide better handling of Dune
locks.
The new versions fix a bug where a dune process waiting to acquire the
lock couldn’t be cancelled. And after 30s of not acquiring the Dune
lock an error message is displayed.
Alcotest Test Explorer Version 0.7.0
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌
• [VS Code Marketplace]
• [Open VSX]
• [GitHub]
[VS Code Marketplace]
<https://marketplace.visualstudio.com/items?itemName=release-candidate.vscode-ocaml-alcotest-test-adapter>
[Open VSX]
<https://open-vsx.org/extension/Release-Candidate/vscode-ocaml-alcotest-test-adapter>
[GitHub]
<https://github.com/Release-Candidate/vscode-ocaml-alcotest-test-adapter>
◊ Changelog
• If the dune lock can’t be acquired for 30s, raise an error window
and ask the user what to do.
• Update the documentation.
◊ Bugfixes
• Make `Cancel Test Run' stop Dune processes waiting for the lock too.
See [Issue #9].
[Issue #9]
<https://github.com/Release-Candidate/vscode-ocaml-expect-inline/issues/9>
◊ Internal Changes
• Add yarn target for the Open VSX Registry.
Expect and Inline Tests Version 0.7.0
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌
• [VS Code Marketplace]
• [Open VSX]
• [GitHub]
[VS Code Marketplace]
<https://marketplace.visualstudio.com/items?itemName=release-candidate.vscode-ocaml-expect-inline>
[Open VSX]
<https://open-vsx.org/extension/Release-Candidate/vscode-ocaml-expect-inline>
[GitHub]
<https://github.com/Release-Candidate/vscode-ocaml-expect-inline>
◊ Changelog
• If the dune lock can’t be acquired for 30s, raise an error window
and ask the user what to do.
• Update the documentation.
◊ Bugfixes
• Make `Cancel Test Run' stop Dune processes waiting for the lock too.
See [Issue #9].
[Issue #9]
<https://github.com/Release-Candidate/vscode-ocaml-expect-inline/issues/9>
Docfd: TUI fuzzy document finder 0.2.3
══════════════════════════════════════
Archive:
<https://discuss.ocaml.org/t/ann-docfd-tui-fuzzy-document-finder-0-2-3/11698/2>
Darren announced
────────────────
Docfd 0.2.6 has just been released.
• Some limits were put in places to speed up content search and avoid
it becoming very slow in large documents
• Adjusted the command line to accept multiple paths, each path can be
file or directory
• Single file mode is added (see screenshots below)
Searching `is left' after `docfd README.md'
<https://global.discourse-cdn.com/business7/uploads/ocaml/original/2X/5/543e67723c21f495cd9c0f8a5b358041033177cd.png>
Searching `[github]' after `docfd README.md'
<https://global.discourse-cdn.com/business7/uploads/ocaml/original/2X/4/43324525149cfbba5d1d678e7cab0944fe6dada1.png>
Feel free to leave feedback!
Camomile 2.0.0 is out!
══════════════════════
Archive:
<https://discuss.ocaml.org/t/ann-camomile-2-0-0-is-out/11751/1>
Romain Beauxis announced
────────────────────────
Camomile `2.0.0' is out and should be available in the `opam'
repository. 🎉
This releases brings compatibility with `OCaml' 5 to `camomile' and
all projects using it as well as a cleanup of the API and build
system.
We have used `camomile' for years with `liquidsoap' and, after `OCaml'
5 came out, the library was not building with it and appeared
unmaintained. However, after looking for alternatives, it appeared
that there were ⚠️ **no alternatives to convert from `UTF-8' to
outdated string encodings such as `ISO-8859-1'** ⚠️
While there are modules that allow to do the opposite, we believe
that, in order to be successful and widespread, the OCaml ecosystem
needs to be able to accommodate to legacy computer systems and
protocols and, in particular, be able to output strings to legacy
string encodings so we decided to see about bringing `camomile' up-to
speed with the latest `OCaml' compiler and tooling.
The fork is currently located at <https://github.com/savonet/Camomile>
and was approved by the original author [yoriyuki]. We are immensely
grateful for his work up-to this point.
Make no mistake, though: the module is still in dire need of
maintainers. Ideally, we would like to move the module to
[ocaml-community] and bring more people onboard to help with it.
To reflect back to the last [actual release], things that should be
worked on next are are least:
• split the module into several libraries, so that a user do not need
to install the entire (several megabytes) libraries
• support latest Unicode standard (it is **very** outdated)
If you are interested in helping with it, please feel free to contact
us or send some PRs our way!
[yoriyuki] <https://discuss.ocaml.org/u/yoriyuki>
[ocaml-community] <https://github.com/ocaml-community/meta/issues/39>
[actual release]
<https://discuss.ocaml.org/t/ann-camomile-1-0-0-is-released/1825/1>
cid 0.1.0 - Content Identifiers in OCaml
════════════════════════════════════════
Archive:
<https://discuss.ocaml.org/t/ann-cid-0-1-0-content-identifiers-in-ocaml/11761/1>
Patrick Ferris announced
────────────────────────
I’m happy to announce the initial release of [cid], an OCaml library
for working with [Content Identifiers]. These are like your usual
hash-based identifiers used in content-addressable stores, but are
built on [multiformat] libraries. See
<https://discuss.ocaml.org/t/ann-multicodec-multibase-multihash-and-multihash-digestif/10686>
for the initial release of the OCaml versions of these libraries.
The main takeaway is that the identifiers are self-describing helping
build more permanent and interoperable content-addressed systems (e.g.
they are used in the IPFS protocol).
┌────
│ let () =
│ let s = "foo" in
│ let hash =
│ Multihash_digestif.of_cstruct `Sha3_256 (Cstruct.of_string s)
│ |> Result.get_ok
│ in
│ let cid = Cid.v ~version:`Cidv1 ~codec:`Raw ~base:`Base32 ~hash in
│ Format.printf "Base encoded: %s\nHuman: %a"
│ (Cid.to_string cid) Cid.pp_human cid
│
│ Base encoded: bafkrmidw2o6edspvrd37zugvx5drr6hyjmoedmqiqjydcafz5okbhad4ae
│ Human: cidv1 - base32 - raw - ident(sha3-256) length(32) digest(
│ 76 d3 bc 41 c9 f5 88 f7 fc d0 d5 bf 47 18 f8 f8
│ 4b 1c 41 b2 08 82 70 31 00 b9 eb 94 13 80 7c 01
│ )
└────
There’s also a small example the repository of [replacing Irmin’s
default hash implementation to use cid].
Happy Hacking :camel:
[cid] <https://github.com/patricoferris/ocaml-cid>
[Content Identifiers]
<https://docs.ipfs.tech/concepts/content-addressing/>
[multiformat] <https://multiformats.io>
[replacing Irmin’s default hash implementation to use cid]
<https://github.com/patricoferris/ocaml-cid/blob/main/test/irmin_cid.ml>
Stk 0.1.0 (SDL-based GUI toolkit) and Chamo 4.0
═══════════════════════════════════════════════
Archive:
<https://discuss.ocaml.org/t/ann-stk-0-1-0-sdl-based-gui-toolkit-and-chamo-4-0/11770/1>
Zoggy announced
───────────────
I am pleased to announce the first release of Stk, a SDL-based
graphical user interface toolkit. Its interface is inspired by Gtk and
should look familiar to developers using Lablgtk. The project page:
<https://zoggy.frama.io/ocaml-stk/>
Chamo, a development-oriented text editor, is now based on Stk rather
than Lablgtk since release 4.0. Chamo homepage:
<https://zoggy.frama.io/chamo/> .
Cyber-hackathon Frama-C + Binsec near Paris
═══════════════════════════════════════════
Archive:
<https://discuss.ocaml.org/t/cyber-hackathon-frama-c-binsec-near-paris/11776/1>
amaro announced
───────────────
(* This is an event related to tools developed in OCaml, although the
tools themselves are applied to C and assembly. *)
If you are near Paris, come to the *Cyber-hackathon [Frama-C] +
[Binsec]*, on *28/04* from *9h to 17h*, at [CEA List], in the
Paris-Saclay campus ([Nano-Innov, 2 bd Thomas Gobert, 91120
Palaiseau])!
This is an event dedicated to formal methods, code analysis,
cybersecurity and reverse engineering, with the help of the Frama-C
and Binsec frameworks.
During this day, you will be able to:
• Bring your own C code to have it analyzed by the Frama-C team;
• Participate in the tutorials and code analysis challenges with
Frama-C;
• Participate in the crackme and reverse challenges with the Binsec
tool;
• Learn how to use Frama-C/Binsec, or become proficient with them;
• Participate in the development of these open-source platforms,
developed mainly in OCaml.
Please register here:
<https://framaforms.org/inscription-cyber-hackathon-frama-c-binsec-1678815370>
(/the form is in French, but feel free to contact us directly in
English if you prefer/).
By the way, the Frama-C and Binsec teams are hiring! Interns, PhDs,
postdocs, temporary- and fixed-term researchers… drop by if you are
interested!
[Frama-C] <https://www.frama-c.com/>
[Binsec] <https://binsec.github.io/>
[CEA List] <https://list.cea.fr>
[Nano-Innov, 2 bd Thomas Gobert, 91120 Palaiseau]
<https://www.openstreetmap.org/?mlat=48.71264&mlon=2.19218#map=17/48.71264/2.19218&layers=H>
Zanuda – OCaml linter experiment
════════════════════════════════
Archive:
<https://discuss.ocaml.org/t/ann-zanuda-ocaml-linter-experiment/11784/1>
Kakadu announced
────────────────
I developed [a linter] for my FP course in my local university. It
analyzed (mostly) typed tree and performs various checks (a.k.a.
lints). The list of available lints could be found [here].
The discussion about a absence of litner arise from time to time [How
possible is a clippy-like linter for OCaml?] and somewhere in [What
are the biggest reasons newcomers give up on OCaml?] I’m not sure that
usage of OCaml linter for non-teaching purposes is wise, but if my
work will gain some traction, nobody will be able to accuse OCaml that
it doesn’t have a linter.
Questions, user reports and PRs will be appreciated.
[a linter] <https://github.com/Kakadu/zanuda>
[here] <https://kakadu.github.io/zanuda/lints/index.html>
[How possible is a clippy-like linter for OCaml?]
<https://discuss.ocaml.org/t/how-possible-is-a-clippy-like-linter-for-ocaml>
[What are the biggest reasons newcomers give up on OCaml?]
<https://discuss.ocaml.org/t/what-are-the-biggest-reasons-newcomers-give-up-on-ocaml/10958/299>
Old CWN
═══════
If you happen to miss a CWN, you can [send me a message] and I’ll mail
it to you, or go take a look at [the archive] or the [RSS feed of the
archives].
If you also wish to receive it every week by mail, you may subscribe
[online].
[Alan Schmitt]
[send me a message] <mailto:alan.schmitt at polytechnique.org>
[the archive] <https://alan.petitepomme.net/cwn/>
[RSS feed of the archives] <https://alan.petitepomme.net/cwn/cwn.rss>
[online] <http://lists.idyll.org/listinfo/caml-news-weekly/>
[Alan Schmitt] <https://alan.petitepomme.net/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.idyll.org/pipermail/caml-news-weekly/attachments/20230328/22695497/attachment-0001.html>
More information about the caml-news-weekly
mailing list