Recent submissions

Comment · 3 years ago
https://www.youtube.com/watch?v=Hw-_x9CfqA8&list=PLyrlk8Xayl... - starts around -4:30:00 (but I guess that's relative to now and will change).
Comment · 3 years ago
I just tried it. :X asks you to enter an encryption key, then asks you to enter it again, and only continues if the keys match. And then you're still in vim and need to save your file to overwrite anything. Seems hard to do by mistake.

(though I prefer ZZ)

Comment · 4 years ago
Comment · 4 years ago
Comment · 4 years ago
Work has already started: https://github.com/ocaml-multicore/eio

There's also now https://github.com/talex5/lwt_eio, which allows you to run existing Lwt code alongside code using effects, to aid with porting.

Comment · 4 years ago
Comment · 4 years ago
I usually notice if my blog gets on Hacker News fairly soon, so I'll see any comments posted here.

I prefer not to use email for most things because then the reply only benefits one person, whereas replies in a public forum can be read by others and get indexed by search engines.

I've been thinking about creating a Matrix room for each blog post as a discussion forum, but so far most posts have ended up on other discussion sites anyway.

Comment · 4 years ago
Comment · 6 years ago
Comment · 6 years ago
By default, opam installs everything into the current "switch". Typically you have switch one per compiler, but you can create one per project. You can also create a "local" switch directly inside your project directory: https://opam.ocaml.org/blog/opam-local-switches/

Another option is to use the duniverse tool (https://github.com/ocamllabs/duniverse). That downloads all dependencies to the project directory, and then builds them all together as one giant project. That makes it very easy to make changes across multiple libraries at once, while keeping fast incremental builds.

And a final option is to build projects with Docker, which allows you to have separate versions of non-OCaml packages too.

Comment · 6 years ago
Comment · 9 years ago
Comment · 9 years ago
> the recommended tools never seem to work together on anything but the latest version

Whenever a package is added to the repository, the CI tests (the latest compatible version of) every package that depends on it to check everything still works. However, non-current packages may break if they're missing upper bounds (it doesn't check all previous releases).

However, since opam-repository is just a Git repo, you can clone a known snapshot of it at some point in time and keep using that. That allows you to continue using old versions of packages without the risk of new software causing unwanted upgrades.

> My impression is that INRIA is too eager to add features and tweak the language.

That's strange. I've always had the opposite impression - that they maintain compatibility at all costs, including leaving sub-optimal APIs in the standard library.

> Next, everything builds so slowly, and just trying to set up Core, utop, and ocp_indent is a trial in patience, watching the same dep build again and again

The Core alternative standard library is pretty huge, indeed (I don't use it). I just tried installing all the tools you mention in a fresh container:

$ time docker run ocaml/opam:debian-9_ocaml-4.05.0 opam install core utop ocp-indent

6:03.75elapsed

So, 6 min to set up a dev environment with those tools. That installed 67 packages, so compilation took about 5 seconds/package on average. I'm not sure why it would build the same dep twice - I haven't seen it do that.

Comment · 9 years ago
Comment · 10 years ago
I use a Qubes Debian VM for dev work. Works fine, except that it runs gnome-keyring by default, which breaks ssh, and restores this config everytime I upgrade (but easy to fix when it happens).

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton