Skip to content

Instantly share code, notes, and snippets.

{ stdenv, fetchFromGitHub, janet, pkgconfig, readline80}:
stdenv.mkDerivation rec {
pname = "janetsh";
version = "0.0.1";
src = fetchFromGitHub {
owner = "andrewchambers";
repo = "janetsh";
rev = "72253ce31bee9974a2fee232cce5d049b2ade215";

Concept for coolpkg

Coolpkg is a new decentralized, time traveling package manager that ...

  • Solves dependency hell.
  • Gives you reproducible builds.
  • Makes it easy to share programs with your friends (or worst enemy, it doesn't care.).
  • Works well with existing tools (docker, various operating systems and more).
  • Is fun to use.
@andrewchambers
andrewchambers / output.txt
Created December 3, 2019 01:29
self-test
running suite tester-self-test-suite
✔✔
passed 2/2
(import https://raw.githubusercontent.com/andrewchambers/hpkgs/49aa40b0776789c1741124bb4ebd35c52c23e7f5/core)
# Utility macros to define oasis packages.
(defn oasis-src
[&keys {:name name :rev rev :hash hash}]
(fetch
:url (string "https://github.com/michaelforney/" name "/tarball/" rev)
:hash hash
:fname (string name ".tar.gz")))

A DSL for scripting

In most programming languages to run a sub command you need to go through quite a lot of ceremony. This post covers my design of a domain specific language to solve this problem for Janet (One of my favourite programming languages).

First, let's set compare simple tasks you might perform during

@andrewchambers
andrewchambers / benchmark.go
Last active August 22, 2021 12:11
go-collectd-benchmark
func BenchmarkWriteEncryptedPacket(bench *testing.B) {
bench.ReportAllocs()
out := make([]byte, 65535)
ctx := context.Background()
b := NewBuffer(0)
b.Encrypt("user", "password")
vl := &api.ValueList{
Identifier: api.Identifier{
Host: "example.com",
Plugin: "golang",