Skip to content

Instantly share code, notes, and snippets.

@echo off
busybox sh -c "rlwrap -S '> ' perl -nE 'say eval()//$@'"
my @waveforms = (
"7 10 12 13 14 13 12 10 7 4 2 1 0 1 2 4 7 11 13 14 13 11 7 3 1 0 1 3 7 14 7 0",
"0 0 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15",
"14 14 7 7 14 14 7 7 14 14 7 7 14 14 7 7 0 0 7 7 0 0 7 7 0 0 7 7 0 0 7 7",
"7 14 12 9 12 14 10 7 12 15 13 8 10 11 7 2 8 13 9 4 5 7 2 0 3 8 5 1 3 6 3 1",
"11 13 14 13 12 10 8 8 8 10 12 13 14 13 11 8 4 2 1 2 3 5 7 7 7 5 3 2 1 2 4 7",
"0 2 3 4 6 6 4 5 9 10 10 8 10 7 10 9 7 7 9 6 8 6 5 6 10 12 10 10 12 13 14 15"
);
for($i = 0; $i < 6; $i++) {
my @wave_data = split(" ",$waveforms[$i]);
use feature "say";
print "> ";
while(<>) {
say eval()//$@;
print "> ";
}
@echo off
mkdir C:\tcl
mkdir C:\tcl\lib
mkdir C:\tcl\bin
mklink C:\tcl\bin\tclsh.exe C:\msys64\mingw64\bin\tclsh.exe
mklink C:\tcl\bin\tclsh86.exe C:\msys64\mingw64\bin\tclsh86.exe
mklink C:\tcl\bin\wish.exe C:\msys64\mingw64\bin\wish.exe
mklink C:\tcl\bin\wish86.exe C:\msys64\mingw64\bin\wish86.exe
@echo off
lua %~dp0\fennel.lua %*
var rng_state;
function xorshift32() {
rng_state ^= rng_state << 13;
rng_state ^= rng_state >> 17;
rng_state ^= rng_state << 5;
return rng_state;
}
function rnd(max) {
@abnrk
abnrk / ipl
Last active August 7, 2026 14:47
#!/bin/env bash
rlwrap -S '> ' perl -nE 'say eval()//$@'
local waveforms = {
"7 10 12 13 14 13 12 10 7 4 2 1 0 1 2 4 7 11 13 14 13 11 7 3 1 0 1 3 7 14 7 0",
"0 0 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15",
"14 14 7 7 14 14 7 7 14 14 7 7 14 14 7 7 0 0 7 7 0 0 7 7 0 0 7 7 0 0 7 7",
"7 14 12 9 12 14 10 7 12 15 13 8 10 11 7 2 8 13 9 4 5 7 2 0 3 8 5 1 3 6 3 1",
"11 13 14 13 12 10 8 8 8 10 12 13 14 13 11 8 4 2 1 2 3 5 7 7 7 5 3 2 1 2 4 7",
"0 2 3 4 6 6 4 5 9 10 10 8 10 7 10 9 7 7 9 6 8 6 5 6 10 12 10 10 12 13 14 15"
}
for i=0,#waveforms-1 do
local wave = waveforms[i+1]
@abnrk
abnrk / repl.php
Last active August 6, 2026 11:38
Simple PHP REPL script
<?php
while(1) {
echo "> ";
$code = fgets(STDIN);
try {
$result = eval('return '.$code.";");
} catch(ParseError $e) {
$result = eval($code);
}
if($result) echo var_export($result);
<?php
$waveforms = [
"7 10 12 13 14 13 12 10 7 4 2 1 0 1 2 4 7 11 13 14 13 11 7 3 1 0 1 3 7 14 7 0",
"0 0 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15",
"14 14 7 7 14 14 7 7 14 14 7 7 14 14 7 7 0 0 7 7 0 0 7 7 0 0 7 7 0 0 7 7",
"7 14 12 9 12 14 10 7 12 15 13 8 10 11 7 2 8 13 9 4 5 7 2 0 3 8 5 1 3 6 3 1",
"11 13 14 13 12 10 8 8 8 10 12 13 14 13 11 8 4 2 1 2 3 5 7 7 7 5 3 2 1 2 4 7",
"0 2 3 4 6 6 4 5 9 10 10 8 10 7 10 9 7 7 9 6 8 6 5 6 10 12 10 10 12 13 14 15"
];
for($i = 0; $i < 6; $i++) {