Skip to content

Instantly share code, notes, and snippets.

@reynir
reynir / solver.ml
Last active November 1, 2016 10:29 — forked from ra4king/solver.ml
ocp-indent
open Printf
type move = Start | Right | Left | Up_Right | Up_Left | Down_Right | Down_Left;;
type board_move = {
move: move;
idx: int;
};;
type board_state = {

Keybase proof

I hereby claim:

  • I am reynir on github.
  • I am reynir_ (https://keybase.io/reynir_) on keybase.
  • I have a public key ASBb1GAmVV381w_KoxbrEAfZ0bhb0Uh4kxIrNIrn8LJbqwo

To claim this, I am signing this object:

$ ocamlfind ocamlopt -package ppx_cstruct test.ml
File "_none_", line 1:
Warning 11: this match case is unused.
@reynir
reynir / jbuild
Last active January 19, 2018 11:31
asd
(jbuild_version 1)
(library
((name test)
(public_name test)
(preprocess (pps ()))))

In March 2018, I attended my first MirageOS hack retreat in Morrocco. MirageOS is a library operating system which allows everyone to build very small, specialized operating system kernels that are intended to run directly on the virtualization layer. The application code itself is the guest operating system kernel, and can be deployed at scale without the need for an extra containerization step in between. It is written in OCaml and each kernel is built only with exactly the code that is necessary for the particular application. A pretty different approach from traditional operating systems. Linux feels huge all of a sudden.

I flew in from New York via Casablanca to Marrakesh, and then took a cab to the city center, to the main square, Jemaa El Fnaa. At Cafe de France, Hannes was picking me up and we walked back through the labyrinth of the Medina to the hostel Riad "Priscilla" where we lived with about 20 MirageOS folks, two turtles and a dog. We ate some food, and there were talks about Mirage's quickch

This can be used as a starting point for developing your own image e.g. for running MirageOS on an Pi3

You will need an arm64 / aarch64 cross compiler. You can use e.g. the cross compiler shipped by Ubuntu or get the toolchain of your choice for your OS.

apt-get install gcc-aarch64-linux-gnu

Now we setup the SD card. We need to create two partitions like shown below

Migration guide from Nocrypto

The modules have been split into four packages: mirage-crypto, mirage-crypto-pk, mirage-crypto-rng and mirage-crypto-entropy. Some of the signatures have changed slightly, and sexp has been removed from mirage-crypto (but not mirage-crypto-pk).

Mirage-crypto

This module contains most of the content of Nocrypto except for public key cryptography and RNG. The Base64 module has been removed. In particular, it contains symmetric key cryptography and hashes.

(test
(name test_validate_email)
(libraries validate alcotest))