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

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 / 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() {
def compute_error(partition):
"""Find the majority category of the partition. Count how big
a part of the partition that the majority category is.
Return the ratio of things that are *not* of the majority category."""
categories = map(get_category, partition)
majority = max(set(categories), key=categories.count)
return 1 - (categories.count(majority) / float(len(partition)))
# This is what a typical partition looks like. The inner tuple may
# be very large (in the thousands) and the list of the length may
@reynir
reynir / output
Created May 7, 2012 22:11 — forked from awreece/output
$ ./command-line-arguments.test --test.bench="Bench"
testing: warning: no tests to run
PASS
BenchmarkConcat 200000 10877 ns/op
BenchmarkJoin 100000 16848 ns/op
BenchmarkBuffer 100000 20729 ns/op