Skip to content

Instantly share code, notes, and snippets.

View jrstrunk's full-sized avatar

John Strunk jrstrunk

View GitHub Profile
pub fn decode33(
constructor: fn(
t1,
t2,
t3,
t4,
t5,
t6,
t7,
t8,
@jrstrunk
jrstrunk / work_pool.gleam
Last active December 17, 2024 17:36
A small module for running a pool of workers over a long list of tasks to be run concurrently
import gleam/bool
import gleam/erlang/process
import gleam/function
import gleam/int
import gleam/list
import gleam/otp/actor
pub fn work_pool_forever(
inputs: List(a),
num_workers: Int,
@jrstrunk
jrstrunk / gleamono
Last active February 28, 2025 12:24
A makefile to make working with Gleam monorepos easier!
# List all subdirectories
SUBDIRS := $(wildcard */)
.PHONY: all
all:
@echo "Available commands: run, dev, test, update, format, build, add <package>, and remove <package>"
# Customize this per project
.PHONY: run
run: