This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/sh | |
set -e | |
set -u | |
set -x | |
# configure this! | |
hostname="nixos" | |
password="abc123" | |
diskdev=/dev/sda |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use sys | |
use std | |
// XXX move to stdlib | |
const rename = {from, to | |
var ret = sys.rename(from, to) | |
-> ret == 0 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"time" | |
"github.com/gopherjs/gopherjs/js" | |
) | |
func main() { | |
c := make(chan string) | |
//Three concurrent infinite loops generating events |
NewerOlder