全部 新建

user:thomas 由用户创建的 Gists

title:mygist 包含指定标题的 Gists

filename:myfile.txt 包含指定文件名的 Gists

extension:yml 包含指定扩展名的 Gists

language:go 包含指定编程语言的 Gists

topic:homelab 具有给定主题的 Gists

注册

登录


全部 新建 注册 登录

所有 Gists

最近 创建
最早 创建
最近 更新
最早 更新
capitalex's Avatar

capitalex / stack-lang-triangle.modal

0 喜欢
0 派生
1 文件
最后活跃于 9 months ago
1 <> (?0 ?1 >> `?:) (?: >>)
2 <> (>> +) (>> `+)
3 <> (>> -) (>> `-)
4 <> (>> *) (>> `*)
5 <> (>> >) (>> `>)
6 <> (>> &) (>> `&)
7 <> (>> =) (>> `=)
8
9 <> (?x ?y >> swap) (?y ?x >>)
10 <> (?x >> dup) (?x ?x >>)
capitalex's Avatar

capitalex / string-rewriter.lua

0 喜欢
0 派生
3 文件
最后活跃于 9 months ago
1 local pprint = require "pprint"
2 love.graphics.setDefaultFilter("nearest", "nearest")
3 local read, write = 1, 1
4 local active_buffer, back_buffer, rule_book = {}, {}, {}
5 local function parse(str)
6 local symbols = {}
7 for symbol in str:gmatch("%S+") do
8 table.insert(symbols, symbol)
9 end
10 return symbols
capitalex's Avatar

capitalex / player.bite

0 喜欢
0 派生
1 文件
最后活跃于 9 months ago
1 for #player when ["right" key is pressed] do
2 set [$my vx is 250]
3 end
4
5 for #player when ["left" key is pressed] do
6 set [$my vy is 200]
7 end
8
9 for #player when ["space" key is pressed] [$i can jump] do
10 forget [$i can jump]
june's Avatar

june / A Stack

0 喜欢
0 派生
1 文件
最后活跃于 9 months ago
A stack, implemented in string rewrite rules.
1 Spawn the stack and the reading head.
2 start -> ()|
3
4 Handle a push.
5 Continually push symbols until you run into another instruction.
6 If you can't push any more symbols, and a push is pending, push a separator.
7 )|push1 -> 1)|push
8 )|push; -> ;)|
9
10 Handle a drop.
june's Avatar

june / Pen Plotter

0 喜欢
0 派生
1 文件
最后活跃于 9 months ago
A pen plotter in string rewriting.
1 Handle a horizontal move.
2 Handle a left move.
3 Switch to state 'L'.
4 |l -> OL
5 Skip over the instruction stream, cells, inactive cursors and separators.
6 Ll -> lL
7 Lr -> rL
8 Lu -> uL
9 Ld -> dL
10 L. -> .L
yumaikas's Avatar

yumaikas / hex.js

0 喜欢
0 派生
3 文件
最后活跃于 9 months 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 {
capitalex's Avatar

capitalex / bf.cul

0 喜欢
0 派生
1 文件
最后活跃于 9 months ago
1 : eval (run '+) (left '0) -> (left '1) (ran '+) ;
2 : eval (run '+) (left '1) -> (right '0) (ran '+) +carry eval ;
3
4 : +carry (left '0) -> (left '1) (shift bits left) ;
5 : +carry (left '*) -> (left '*) (shift bits left) ;
6 : +carry (left '1) -> (right '0) +carry ;
7
8
9
10 : eval (run '-) (left '1) -> (left '0) (ran '-) eval ;
june's Avatar

june / Makermod Elements V2

0 喜欢
0 派生
1 文件
最后活跃于 10 months ago
1 //{[(<Element script V2>)]}
2 mmarkfoot
3 say ^0ELEMENT SCRIPT V2 ^5By ^1µ^2/^0Ðàrk^1Qµàkè^2/^1S
4 wait 120
5 say ^6I call the four ^3elements: ^1Fire, ^5Air, ^4Water ^6and ^2Earth ^6to fight along side me!
6 marm 0
7 mplacefx ships/fire 1;mgrab
8 mplacefx howler/sonic 1;mgrab
9 mplacefx env/water_impact 1;mgrab
10 mplacefx env/quake_small 1;mgrab
capitalex's Avatar

capitalex / main.lua

0 喜欢
0 派生
3 文件
最后活跃于 10 months ago
1 local pprint = require "pprint"
2 local QueueMap = require "queue-map"
3 local the_eye = require "the-eye"
4
5 -- knowledge base
6 local kb = QueueMap.new()
7
8 for _, pixel in ipairs(the_eye) do
9 kb:enqueue("image $image $x $y $r $g $b", {"eye", pixel[4], pixel[5], pixel[1], pixel[2], pixel[3]})
10 end
capitalex's Avatar

capitalex / hypot.poqs

0 喜欢
0 派生
1 文件
最后活跃于 10 months ago
1 { [#port] [@add (x) and (y) into (where)] =>
2 [% push(vars.where, vars.x + vars.y) %] }
3
4 { [#port] [@square root of (x) into (where)] =>
5 [% push(vars.where, math.sqrt(vars.x)) %] }
6
7 { [#port] [@write (mesage)] =>
8 [% io.write(vars.message) %] }
9
10 { [hypotenuse of (a) and (b)] =>
上一页 下一页

由 Opengist 强力驱动 ⋅ Load: 216ms⋅

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