Skip to content

Instantly share code, notes, and snippets.

View steshaw's full-sized avatar
👨‍💻
Loves programming languages

Steven Shaw steshaw

👨‍💻
Loves programming languages
View GitHub Profile
@steshaw
steshaw / fpmax.scala
Created September 26, 2023 06:05 — forked from jdegoes/fpmax.scala
FP to the Max — Code Examples
package fpmax
import scala.util.Try
import scala.io.StdIn.readLine
object App0 {
def main: Unit = {
println("What is your name?")
val name = readLine()
@steshaw
steshaw / ubuntu-setup.md
Last active March 21, 2023 01:18
Ubuntu desktop setup

Setting up a fresh Ubuntu machine

Start with Ubuntu

Install Ubuntu Desktop 22.04, encrypted ZFS, with minimal packages.

Install OpenSSH

We may want to do the rest of the installation/configuration from our laptop over ssh, so:

@AndrasKovacs
AndrasKovacs / HOASOnly.hs
Last active February 27, 2024 15:50
HOAS-only lambda calculus
{-# language BlockArguments, LambdaCase, Strict, UnicodeSyntax #-}
{-|
Minimal dependent lambda caluclus with:
- HOAS-only representation
- Lossless printing
- Bidirectional checking
- Efficient evaluation & conversion checking
Inspired by https://gist.github.com/Hirrolot/27e6b02a051df333811a23b97c375196
@andreabedini
andreabedini / plan-to-datalog.jq
Created December 15, 2022 08:18
plan-to-datalog.jq
#!/usr/bin/env -S jq -f -r
#
# This jq scripts transforms cabal's plan.json file into a series of fact that souffle can interpret.
#
# Example use
#
# $ ~/plan-to-datalog.jq <dist-newstyle/cache/plan.json >plan.dl
#
# Then create a file query.dl
#
@abailly-iohk
abailly-iohk / testnets.md
Last active February 13, 2024 21:28
List of tools to launch a testnet
@ners
ners / Schedule.hs
Last active May 20, 2022 02:50
A Haskell program that parses Doodle responses and selects the two best time slots such that as many participants as possible may attend.
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE ScopedTypeVariables #-}
module Main where
import Data.Aeson (FromJSON, Object, Value (..), eitherDecodeFileStrict, parseJSON, (.:))
@sts10
sts10 / rust-command-line-utilities.markdown
Last active May 9, 2024 13:46
A curated list of command-line utilities written in Rust

A curated list of command-line utilities written in Rust

Note: I have moved this list to a proper repository. I'll leave this gist up, but it won't be updated. To submit an idea, open a PR on the repo.

Note that I have not tried all of these personally, and cannot and do not vouch for all of the tools listed here. In most cases, the descriptions here are copied directly from their code repos. Some may have been abandoned. Investigate before installing/using.

The ones I use regularly include: bat, dust, fd, fend, hyperfine, miniserve, ripgrep, just, cargo-audit and cargo-wipe.

  • atuin: "Magical shell history"
  • bandwhich: Terminal bandwidth utilization tool
@mb64
mb64 / tychk.ml
Last active November 7, 2023 16:26
Bidirectional typechecking for higher-rank polymorphism in OCaml, without polymorphic subtyping
(* Compile with:
$ ocamlfind ocamlc -package angstrom,stdio -linkpkg tychk.ml -o tychk
Example use:
$ ./tychk <<EOF
> let f = (fun x -> x) : forall a. a -> a
> in f f
> EOF
input : forall a. a -> a
*)
--------------------------------------------------------------------------------
--
---- Dependently Typed Programming: Part 3
--
---- An Intrinsically Typed Compiler
--
---- Josh Ko (Institute of Information Science, Academia Sinica)
--
--------------------------------------------------------------------------------