Todos Novo

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

Registrar-se

Entrar


Todos Novo Registrar-se Entrar
's Avatar

yumaikas

Juntou-se 2 years ago

Mais recente criado
Menos recente criado
Mais recente atualizado
Menos recente atualizado
Todos os gists 25
yumaikas's Avatar

yumaikas / spell_zine.js

0 curtidas
0 bifurcações
1 arquivos
Última atividade 1 year ago
1 // Build:
2 // npx google-closure-compiler -O SIMPLE minmoire.js > minmoire.min.js && du -b minmoire.min.js
3
4 // Changes from base grimoire:
5 // - API names
6 // - Rules are two-length arrays rather than {needs, makes} objects
7 // - Some compressed logic. Eg. removed do/while for executing facts, which may change behavior of edge cases
8 // - parsing based on .split() rather than regex matches
9 // - Assumes various ES6+ syntax
10 // - various heresies like var (instead of const), omitting { } from if statements, etc
yumaikas's Avatar

yumaikas / hex.js

0 curtidas
0 bifurcações
3 arquivos
Última atividade 1 year ago
1 <!DOCTYPE html>
2 <html>
3
4 <div id="app"></div>
5 <style>
6
7 #app, body {
8 height: 100%;
9 }
10 #edit-affirmations {
yumaikas's Avatar

yumaikas / compiled_query.js

0 curtidas
0 bifurcações
2 arquivos
Última atividade 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 curtidas
0 bifurcações
2 arquivos
Última atividade 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 curtidas
0 bifurcações
1 arquivos
Última atividade 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 curtidas
0 bifurcações
1 arquivos
Última atividade 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 curtidas
0 bifurcações
1 arquivos
Última atividade 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 curtidas
0 bifurcações
3 arquivos
Última atividade 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 curtidas
0 bifurcações
1 arquivos
Última atividade 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 curtidas
0 bifurcações
1 arquivos
Última atividade 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
Próximo Anterior

Desenvolvido por Opengist ⋅ Load: 307ms⋅

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