All New

user:thomas gists created by user

title:mygist gists with given title

filename:myfile.txt gists having files with given name

extension:yml gists having files with given extension

language:go gists having files with given language

topic:homelab gists with given topic

Register

Login


All New Register Login
's Avatar

yumaikas

Joined 1 year ago

Recently created
Least recently created
Recently updated
Least recently updated
All gists 23
yumaikas's Avatar

yumaikas / compiled_query.js

0 likes
0 forks
2 files
Last active 1 year ago
1 /*
2 |
3 lightning struck $x $y
4 , $something is at $x $y?
5 , $something has inventory $inventory?
6 , $inventory has item $item?
7 , $item is $class?
8 , $class is conductive?
9 |
10 $something is struck by lightning
yumaikas's Avatar

yumaikas / lspace.lua

0 likes
0 forks
2 files
Last active 1 year ago
1 local Space = require("lspace")
2 local enemies = {}
3 local r, f, l, box, tuples, rules = Space()
4
5 local function p(...)
6 local args = {...}
7 return function() print(table.unpack(args)) end
8 end
9
10 function espawn(vars)
yumaikas's Avatar

yumaikas / parse_alta.py

0 likes
0 forks
1 files
Last active 1 year ago
1 #! /bin/env python3
2
3 import re
4 from collections import namedtuple
5
6 Pattern = namedtuple("Pattern", ["stack", "value"])
7 Rule = namedtuple("Rule", ["pattern", "consequence"])
8
9 def parse(code):
10 idx = 0
yumaikas's Avatar

yumaikas / parse_alta.lua

0 likes
0 forks
1 files
Last active 1 year ago
1 local alta = {}
2
3 function alta.parse(code)
4 local idx = 1
5 local STATE_FIND_OUTER_DELIM = "find/outer-delim"
6 local STATE_FIND_INNER_DELIM = "find/inner-delim"
7 local STATE_READ_STACK_NAME = "read/stack-name"
8 local STATE_READ_VALUE_NAME = "read/value-name"
9
10 local state = STATE_FIND_OUTER_DELIM
yumaikas's Avatar

yumaikas / funnyMaze.scm

0 likes
0 forks
1 files
Last active 1 year ago
A random maze solver written in Chicken Scheme
1 (use ncurses posix extras posix-extras loops)
2 (define mazeData
3 (vector "OOOOOOOOOOOOOOO"
4 "O O O OOO O OO"
5 "O O"
6 "O O OOOOOOO O O"
7 "O O O O O"
8 "O OOO OO OOOO"
9 "O O O O"
10 "OO O O O OOO OO"
yumaikas's Avatar

yumaikas / derp.comp.tiny.js

0 likes
0 forks
3 files
Last active 1 year ago
1 return function() {
2 let min = Math.min; var max = Math.max; var huge = Number.MAX_SAFE_INTEGER;
3 let self = { state: { strings: [], slots: {} } };
4
5
6 self.counters = {
7 "loop": 1,
8 }
9
10 function match(self, counters) {
yumaikas's Avatar

yumaikas / mechanistic_pumpkin_bread_recipe.nv

0 likes
0 forks
1 files
Last active 1 year ago
1 |_| Pumpkin Bread Recipe
2
3 || start oven, gather equipment, gather ingredients
4
5 | start oven, imperial | oven fahrenhiet:375
6 | start oven, metric | oven celcius:190
7
8 | gather equipment |
9 fetch medium bowl, fetch large bowl,
10 fetch half teaspon,
yumaikas's Avatar

yumaikas / Recursive Mira Pattern Match

0 likes
0 forks
1 files
Last active 1 year ago
1 --[[
2 |
3 lightning struck [x] [y]
4 , [something] is at [x] [y]?
5 , [something] has inventory [inventory]?
6 , [inventory] has item [item]?
7 , [item] is [class]?
8 , [class] is conductive?
9 |
10 [something] is struck by lightning
yumaikas's Avatar

yumaikas / html_calc.nv

0 likes
0 forks
5 files
Last active 1 year ago
1 | # meta code status | Untested, uncompiled
2 | #include, strings.nv, slots.nv, DOM.nv |
3
4 | #strings, br, app, button, calc-output, div,
5 AC, All Clear, C, Clear,
6 0,9,8,7,6,5,4,3,2,1,
7 +,/,*,-,.,=,
8 ,Press 7, Press 8, Press 9, Press Divide
9 ,Press 4, Press 5, Press 6, Press Multiply
10 ,Press 1, Press 2, Press 3, Press Subtract
yumaikas's Avatar

yumaikas / tokenizer.js

0 likes
0 forks
1 files
Last active 1 year ago
1 function tokenize(program) {
2 var delimiter = null;
3 var tokens = [];
4 var current_token = [];
5 // Doing this for
6 var STATE_DELIM = "detect the delimiter";
7 var STATE_COLLECT_TOKENS = "collecting the tokens";
8 var STATE_RAW_STRING = "collecting a raw string";
9 var state = "detect the delimiter";
Newer Older

Powered by Opengist ⋅ Load: 202ms⋅

English
Čeština Deutsch English Español Français Magyar Italiano 日本語 Polski Português Русский Türkçe Українська 中文 繁體中文