Skip to content

Instantly share code, notes, and snippets.

@slaymaker1907
slaymaker1907 / example-wasmtime.rkt
Last active November 26, 2023 20:33
Racket Wasmtime FFI Example
#lang racket
(require ffi/unsafe
ffi/unsafe/define)
(require syntax/parse/define)
(require pipechain)
(require (for-syntax pipechain))
(require (for-syntax racket/match racket/format))
;; Download wasmtime C lib and set this file to the DLL/library file
(define wasmtime-dll "")
@slaymaker1907
slaymaker1907 / Main.java
Last active June 28, 2024 21:55
Generators in pure Java using (virtual) threads
import java.time.Duration;
import java.time.Instant;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.Random;
import java.util.concurrent.Semaphore;
import java.util.function.Consumer;
public class Main {
public static class Box<T> {
@slaymaker1907
slaymaker1907 / TestSaverModule.tid
Last active January 26, 2022 10:47
Example TiddlyWiki 5 Saver Using HTML 5 File System Access API
created: 20210424052412556
modified: 20210424052444872
module-type: saver
tags:
title: TestSaverModule
type: application/javascript
// Disable this to limit logging.
let debugEnabled = true;
let problemEncountered = false;
@slaymaker1907
slaymaker1907 / Makefile
Created May 18, 2018 23:18
Poor Mans Pandoc Wiki
SOURCES=$(wildcard **/*.md) $(wildcard *.md)
HTML=$(patsubst %.md, build/%.html, $(SOURCES))
all: $(HTML)
build/%.html: %.md
mkdir --parents $(dir $@)
pandoc -s $< -o $@
.PHONY: