Skip to content

Instantly share code, notes, and snippets.

@stoand
stoand / tinyprog_wsl2.md
Last active September 9, 2020 11:39
Using tinyprog in Windows Subsystem for Linux 2

Programming the TinyFPGA while inside Windows Subsystem for Linux 2 (WSL2)

Setup (in Windows):

  • Install Python with update path enabled
  • in powershell: pip install tinyprog then wsl --shutdown then open WSL2 again

Programming (in WSL2)

Don't forget to press the reset button on the fpga before programming

@stoand
stoand / kakrc
Created April 29, 2020 06:06
Use ripgrep instead of grep with kakoune
# Install: https://github.com/BurntSushi/ripgrep#installation
# Use ripgrep instead of grep
set-option global grepcmd 'rg -Hn --no-heading'
@stoand
stoand / ByteFusion2.fm
Created December 22, 2019 21:14
Binary addition on bytes in Formality - Does not yet fuse
// npm i -g formality-lang@0.1.228
// fm -t ByteFusion2/main && fm -o ByteFusion2/main
// INats serve as the base for fused iteration
// The inductive hypothesis on nats. Erases to Church.
INat : Type
${self}
( P : INat -> Type;
izero : P(izero),
@stoand
stoand / ByteFusion.fm
Created December 22, 2019 02:10
Shows where Formality runtime fusion breaks down when attempting to add two bytes
// USES OLDER VERSION OF FORMALITY
//
// npm i -g formality-lang@0.1.200
// fm -t ByteFusion/main; fm -o ByteFusion/main
T Bit
| z
| o
T Byte