Skip to content

Instantly share code, notes, and snippets.

View reynir's full-sized avatar

Reynir Björnsson reynir

  • @roburio
  • Århus, Denmark
View GitHub Profile
(test
(name test_validate_email)
(libraries validate alcotest))

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.

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

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

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

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:

@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 = {
@reynir
reynir / EggsToast.java
Created August 29, 2016 13:40 — forked from tonymorris/EggsToast.java
What is the output of this program?
// What is the output of this program?
// a) x = 2
// b) x = 3
// c) compile-error
// d) runtime exception
// e) something else _____
abstract class Eggs {
abstract void m();
Eggs() {
$ python2 fib.py 32 # Nothing happens for a few secs and then the fibonacci numbers are printed
$ python3 fib.py 32 # The fibonacci numbers are printed one by one with a greater and greater interval