Todos Nuevo

user:thomas gists creados por el usuario

title:mygist gists con el título indicado

filename:myfile.txt gists que contienen archivos con el nombre indicado

extension:yml gists que contienen archivos con la extensión indicada

language:go gists que contienen archivos con el lenguaje indicado

topic:homelab gists with given topic

Registrarse

Iniciar sesión


Todos Nuevo Registrarse Iniciar sesión

Todos los gists

Recientemente creado
Menos reciente creado
Recientemente actualizado
Menos reciente actualizado
june's Avatar

june / Fridge Simulation

0 gustos
0 bifurcaciones
1 archivos
Última actividad 4 months ago
Putting groceries away in the fridge.
1 ||:@include: lib/rpn.nv
2
3 |:groceries: $item|
4 :: put $item in the fridge
5
6 |:: put $item in the fridge :fridge: $item $quantity?|
7 :: put $item in its bin
8 :: close all the bins
9 |:: put $item in the fridge? :fridge: $other $quantity|
10 :checked bins: $other $quantity
june's Avatar

june / Command Parser

0 gustos
0 bifurcaciones
1 archivos
Última actividad 4 months ago
A simple command parser.
1 |:: read a line? :@stdio: (10 $x)|
2 :@stdio: 10
3 :buffer: $x
4 |:: read a line :@stdio: 10|
5 |:: read a line?|
6 :@stdio: read
7
8 |:: print the buffer? :buffer: $x|
9 :@stdio: write $x
10 |:: print the buffer|
june's Avatar

june / Echo

0 gustos
0 bifurcaciones
1 archivos
Última actividad 4 months ago
Takes a line, prints a line.
1 |:: read a line? :@stdio: (10 $x)|
2 :@stdio: 10
3 :buffer: $x
4 |:: read a line :@stdio: 10|
5 |:: read a line?|
6 :@stdio: read
7
8 |:: print the buffer? :buffer: $x|
9 :@stdio: write $x
10 |:: print the buffer|
june's Avatar

june / Lists

0 gustos
0 bifurcaciones
1 archivos
Última actividad 4 months ago
An example of dynamic lists.
1 |:: $list @ $index = $value| :: set $list $index $value
2 |:: $list @ $index | :: get $list $index
3 |:: del $list @ $index | :: delete $list $index
4
5 |:: set $list $index $new :lists: $list $index $old|
6 :lists: $list $index $new
7 :: reset lists
8 |:: set $list $index $value? :lists: $x $y $z|
9 :checked items: $x $y $z
10 |:: set $list $index $value|
june's Avatar

june / Kitchen Simulation

0 gustos
0 bifurcaciones
1 archivos
Última actividad 4 months ago
An example of a kitchen that can take orders.
1 ||:@include: lib/rpn.nv
2
3 ||::(BLT for june and mary)
4 :vegan:
5
6 ||:pantry: (bread lettuce bacon tomato tempeh)
7 :menu: BLT
8
9 |:recipe: BLT|
10 :need: (bread lettuce tomato bacon)
june's Avatar

june / Parser (Skeleton)

0 gustos
0 bifurcaciones
1 archivos
Última actividad 4 months ago
The skeleton of a symbol stream parser.
1 > "State:" Pending
2 "Symbols:" 0
3 > "State:" Fact
4
5 > "State:" Pending
6 "Symbols:" $any
7 > "State:" Left
8
9 > "State:" Left
10 "Symbols:" 0
yumaikas's Avatar

yumaikas / StackTalk

0 gustos
0 bifurcaciones
1 archivos
Última actividad 5 months ago
A language to surpass Io
1 title[ StackTalk ]
2
3 "Stack Basics" note[
4
5 An object is a collection of named stacks
6 A quotation is a malleable list of code symbols, delimited by [ and ]
7 Strings can be written two ways:
8
9 "This is a conventional string"
10 this-is-a-symbol-string:
june's Avatar

june / slab.nv

0 gustos
0 bifurcaciones
1 archivos
Última actividad 5 months ago
1 || :@include: lib/math.nv
2
3 || :entity.slab.id: 1
4 :entity.slab.free: (1 2 3 4 5)
5 :entity.slab.pool:
6 . 1 0 0 0
7 . 2 0 0 0
8 . 3 0 0 0
9 . 4 0 0 0
10 . 5 0 0 0
june's Avatar

june / A basic for-each/fold pattern.

0 gustos
0 bifurcaciones
1 archivos
Última actividad 5 months ago
1 ||:@include: lib/rpn.nv
2
3 |:: push $x to $y|
4 :stacks: $y $x
5 |:: pop from $x :stacks: $x $y|
6 :item: $y
7 |:: pop from $x? :stacks: $y $z|
8 :seen: $y $z
9 |:: pop from $x|
10 :stack empty: $x
capitalex's Avatar

capitalex / tree.lua

0 gustos
0 bifurcaciones
1 archivos
Última actividad 5 months ago
1 local function table_stream(t)
2 return coroutine.wrap(function()
3 for _, v in ipairs(t) do
4 coroutine.yield(v)
5 end
6 end)
7 end
8
9 local function push(t, v)
10 table.insert(t, v)
Siguiente Anterior

Desarrollado por Opengist ⋅ Load: 265ms⋅

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