Skip to content

Instantly share code, notes, and snippets.

View mefyl's full-sized avatar
🍻
I mean what do they expect me do, take a bus?

mefyl mefyl

🍻
I mean what do they expect me do, take a bus?
View GitHub Profile
@mefyl
mefyl / eio-plus-third-party-effect.ml
Created January 8, 2024 18:54
A possible alternative scheduling pattern for Eio that preserves effect handler semantics.
module Eio = struct
type fiber = {
fiber : (unit, unit) Effect.Shallow.continuation;
mutable over : bool;
}
type t = { mutable fibers : fiber list }
type _ Effect.t += Fork : fiber -> unit Effect.t | Yield : unit Effect.t
let run f =
@mefyl
mefyl / httpaf_unresponsive.ml
Last active September 28, 2020 12:17
Httpaf unresponsiveness minimal test.
open Httpaf
let ( let* ) = Lwt.( >>= )
let string_of_sockaddr = function
| Unix.ADDR_UNIX p -> p
| Unix.ADDR_INET (addr, port) ->
Format.sprintf "%s:%i" (Unix.string_of_inet_addr addr) port
let request_handler sockaddr reqd =

A distributed, decentralized immutable block store for dune-cache

Objective

The aim of this project is to create a system to store data in the form of immutable, content addressable blocks that can be used as a backend for the dune-cache-daemon.

The envisioned characteristics are:

--- $HOME/.opam/opam-init/hooks/sandbox.sh
+++ $HOME/.opam/opam-init/hooks/sandbox.sh
@@ -56,6 +56,7 @@
# the OPAM_USER_PATH_RO format is the same as PATH
# ie: export OPAM_USER_PATH_RO=/nix/store:/rw/usrlocal
add_sys_mounts /usr /bin /lib /lib32 /lib64 /etc /opt /home /var
+add_mount rw $HOME/.cache/dune $HOME/.cache/dune
# C compilers using `ccache` will write to a shared cache directory
# that remain writeable. ccache seems widespread in some Fedora systems.

Keybase proof

I hereby claim:

  • I am mefyl on github.
  • I am mefyl (https://keybase.io/mefyl) on keybase.
  • I have a public key ASCDQldEx57PdQKAixZMkJpo1HgxzmVi8EnUggT4lXyj1go

To claim this, I am signing this object: