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
@AndrasKovacs
AndrasKovacs / TwoStageRegion.md
Last active September 29, 2024 18:03
Lightweight region memory management in a two-stage language
@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()
@AndrasKovacs
AndrasKovacs / ZeroCostGC.md
Last active September 18, 2024 04:17
Garbage collection with zero-cost at non-GC time

Garbage collection with zero cost at non-GC time

Every once in a while I investigate low-level backend options for PL-s, although so far I haven't actually written any such backend for my projects. Recently I've been looking at precise garbage collection in popular backends, and I've been (like on previous occasions) annoyed by limitations and compromises.

I was compelled to think about a system which accommodates precise relocating GC as much as possible. In one extreme configuration, described in this note, there

@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 August 23, 2024 00:18
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 June 5, 2024 08:43
List of tools to launch a testnet
@raulraja
raulraja / 0.SIP.md
Last active September 4, 2024 08:32
Scala 3 Continuations

Pre-SIP: Suspended functions and continuations in Scala 3.

This Pre-SIP post proposes continuations as a new language feature in Scala 3.

It has been prepared by Jack Viers, Raul Raja and reviewed by the Scala 3 team at 47 Degrees. This doc is intended to be used as a way to gather community feedback and foster discussion.

Motivation

Our observation in the industry and among our peers is that most programming in Scala today that involves async or I/O-based programs targets a monadic indirect boxed style.

@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 September 27, 2024 17:31
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