Skip to content

Instantly share code, notes, and snippets.

@andrewchambers
andrewchambers / gist:1c473fd1595f4fcedbcfc634ee1decb0
Last active March 19, 2020 00:41
full disk encrypted nixos install
#! /bin/sh
set -e
set -u
set -x
# configure this!
hostname="nixos"
password="abc123"
diskdev=/dev/sda
@andrewchambers
andrewchambers / notes.txt
Last active April 12, 2018 13:01
Notes on a new interpreted language
I have been thinking recently about a set of features that might be
interesting for an interpreted language. Largely I am uninterested in the
syntax for now, just the properties of the language and implementation.
1. Actor model similar to erlang with total isolation of actors except
via message passing. Crashing one actor does not affect other actors
unless they want to be affected.
2. Mutability within an actor, but only immutable objects can be passed
use sys
use std
// XXX move to stdlib
const rename = {from, to
var ret = sys.rename(from, to)
-> ret == 0
}
use std
const runcmd = {cmd : byte[:][:]
var output, status
match std.spork(cmd)
| `std.Ok (pid, stdin, stdout):
match std.fslurp(stdout)
| `std.Ok out: output = out
while true
do
cat ~/fifo | (
while read rev ref
do
tarfile=$rev.tar.gz
(cd ~/gittest/server/ && git archive --format=tar $rev) | gzip > $tarfile
for cfg in `ls configs/`
do
package main
import (
"time"
"github.com/gopherjs/gopherjs/js"
)
func main() {
c := make(chan string)
//Three concurrent infinite loops generating events