Skip to content

Instantly share code, notes, and snippets.

use core::fmt::Debug;
use std::str::FromStr;
trait ArgsFromSource {
const ARG_COUNT: usize;
fn from_source(source: &Source) -> Self;
}
trait ArgFromSource {
fn from_source(source: &Source, index: usize) -> Self;

Demi Nix:

  • build1 + build2 vms
    • Reduce bare-metal code to something very small, perhaps just vagrant
      • That probably means no vagrant for demi1 + demi2
  • Build the whole VM with nix
  • Split the VM image/OS build, and the Demi build
    • Perhaps split the VM image build and OS build as well, somehow
      • E.g. build grub/initrd into the image, but the rootfs outside
  • This will allow rebuilding Demi stuff without rebuilding the OS
@andreivasiliu
andreivasiliu / acme.md
Created October 20, 2023 06:48
Demi ACME

Demi Cluster:

  • A cluster of two halves
  • There is no master or slave; both demi hosts are masters
  • Security through isolation:
    • All web services (HTTP, DNS) run inside Demi VMs
    • Demi VMs may not access anything on the LAN, or on their host
    • Demi VMs may access each other
  • Security through minimalism:
  • The Demi VMs run on minimal Demi bare metal hosts
From fce8a3045a4ef921f749d9e42fffe5075c6ddedc Mon Sep 17 00:00:00 2001
From: Peter da Silva <peter.dasilva@flightaware.com>
Date: Thu, 14 Jul 2022 18:46:46 +0000
Subject: [PATCH 5/5] Update version number.
---
configure.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure.in b/configure.in
;; This is an operating system configuration generated
;; by the graphical installer.
#!curly-infix
{use-modules(gnu())}
{use-service-modules(desktop networking ssh xorg)}
{operating-system(
locale("en_US.utf8")
# From: https://wiki.tcl-lang.org/page/TemplaTcl%3A+a+Tcl+template+engine
source tt.tcl
set template {
<element><%= $myvar %></element>
}
# Create template engine
TemplaTcl::create tt
state["phase"] = (in["phase"] or 0) + in["frequency"]
state["phase"] = state["phase"] + in["frequency"]
out["out"] = sin(state["phase"])
def show_map() -> Iterable[str]:
yield f"The map has {len(bat_map)} rooms."
if not current_room:
return
yield f"Current room: {current_room.title}"
links = bat_links.get(current_room.room_id)
if links:
inc = len(links.incoming)
def show_map() -> Iterable[str]:
yield f"The map has {len(bat_map)} rooms."
if not current_room:
return
yield f"Current room: {current_room.title}"
links = bat_links.get(current_room.room_id)
if links:
inc = len(links.incoming)