Skip to content

Instantly share code, notes, and snippets.

n=2;eval$s=%q{Z=?\s;eval"$><<S=Z*4"+(%w{+"n=#{-~n%3};eval$s=%q{#$s}#YE";$>.isat ty&&
(r="\e[43;3#{C="#{n*5%9+1}m"}#{T}\e[4"+C+S[1568,79]+E="\e[0m";r[81,21]="\e[37m# {(["Ca
f\u00e9_au_lait","Yogurt","Fruit_mix"][n].chars*Z).tr(?_,"").center(21)}\e[3"+C ;a=%~POS
A[`ER]`PASX1cTc22V6NNP.QOYGMXXIG7KK:bCCaVN8WZ[]UQMMS`cBFFJJHHY`QTUIUURRPTOcRV_a LLUT`WXL
W]a_c_bV`XXYa_9}+[e=rand(4)+5,T='BALANCEDFOOD',f=rand(5)-2-2i]*0+%w{bZZYb_][9cc ????`9^acG
G,,N9DU`DKcUKU3K4!4!4!QXTSSS""9`9`#U`KcK--S;;/GOT<QE$U=>F==Q0@%U/P/B=S0Q`PM&XVV V15CMRHMSH
RKO>==QMQVR 'b`&DK>BS<XE$T>T33DDDUM<V@@E(((TCT0A<0A"')5CXPcQa54X@@Y#KcK--S;; /GOT<Q`$)T)T
:a4A%%#X VS6a ' b`&DK>BS<T7**] ^^b6+++]~; P=Str uct.new(:x,:d,:p,:v );M=(-5**7..
b=0).m ap{[]};A=s =[];t=Time.now;q=?y.succ;( s=S .scan(/.+/ );M[0]<<P [(e-b%3)*5i-
9,0,0 ,f*1 i] ;6 0.t ime s { |i |j= i %2 0 ;i< 40 ? [ M[j -1],m=M[j],M
@youz
youz / TuringMachine.sql
Created May 29, 2020 09:14
TuringMachine.sql
/*
* Turing Machine Simulator for SQLite3
* (requires version >= 3.8.3)
*/
-- .headers on
.separator \t
DROP TABLE IF EXISTS stdin;
CREATE TABLE stdin(line);
@youz
youz / README.md
Created May 16, 2020 15:20
lazyk.grass

lazyk.grass

Lazy K interpreter in Grass language

How to build

You need grasspiler

@youz
youz / grass.ml
Last active October 12, 2022 08:42 — forked from ytomino/grass.ml
ocaml implementation of http://www.blue.sky.or.jp/grass/
type token = T_w | T_W | T_v | EOF;;
let rec scan s i = (
let length = String.length s in
if i >= length then length, EOF else
match s.[i] with
| 'W' -> i + 1, T_W
| 'w' -> i + 1, T_w
| 'v' -> i + 1, T_v
| '\xef' -> (* W : EF BC B7, v : EF BD 96, w : EF BD 97 *)
@youz
youz / grass.satyg
Last active May 7, 2020 04:00
Grass on Grass on SATySFi
% grass.saty - Grass interpreter
% https://github.com/youz/grasses
%
% Copyright (C) 2018-2020 Yousuke Ushiki <[email protected]>
% All rights reserved.
%
% Grass language
% http://www.blue.sky.or.jp/grass/
%
% Redistribution and use in source and binary forms, with or without
@youz
youz / sd.pdf
Last active April 8, 2020 08:32
sd.saty
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@youz
youz / make.bat
Last active October 13, 2022 16:30
quine.grass
@echo off
call grasspile quine-base.ml -P 1000000 >quine-base.grass
if ERRORLEVEL 1 (
echo compile failed [exitcode=%ERRORLEVEL%]
exit /b 1
)
ruby mkquine.rb >quine.grass
@youz
youz / Makefile
Created April 2, 2020 09:06
Grass interpreter
# Makefile for mingw64
CC=gcc
CFLAGS=-Wall -Wno-strict-aliasing -std=gnu11 -g -I. -O0
ifeq ($(OS),Windows_NT)
BINEXT = .exe
endif
TARGET=grass$(BINEXT)
@youz
youz / lazynk.rb
Last active December 27, 2019 07:22
lazy-nk
require "io/wait"
if $*.length < 1
puts "usage: ruby lazynk.rb sourcefile"
exit(1)
end
NHK = ->(x){->(y){->(z){x[z][y[z]]}}}
国民 = car = ->(x){->(y){x}}
cdr = ->(x){->(y){y}}
@youz
youz / enumcamp.pdf
Last active December 4, 2019 09:13
enumcamp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.