Všechno Nové

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

Registrovat

Přihlásit se


Všechno Nové Registrovat Přihlásit se

Všechny gisty

Nedávno Vytvořeno
Nejméně nedávno Vytvořeno
Nedávno Aktualizováno
Nejméně nedávno Aktualizováno
june's Avatar

june / Lists

0 Lajky
0 Forky
1 Soubory
Naposledy aktivní 6 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 Lajky
0 Forky
1 Soubory
Naposledy aktivní 6 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 Lajky
0 Forky
1 Soubory
Naposledy aktivní 6 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 Lajky
0 Forky
1 Soubory
Naposledy aktivní 6 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 Lajky
0 Forky
1 Soubory
Naposledy aktivní 6 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 Lajky
0 Forky
1 Soubory
Naposledy aktivní 6 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 Lajky
0 Forky
1 Soubory
Naposledy aktivní 7 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)
capitalex's Avatar

capitalex / ewe.stackops.wul

0 Lajky
0 Forky
2 Soubory
Naposledy aktivní 7 months ago
1 @ewe @ewe.pop ; @ewe.stack $name {
2 @ewe pop $name
3 }
4
5 @ewe @ewe.push ; @ewe.stack $name {
6 @ewe push $name
7 }
8
9 @ewe @ewe.peek ; @ewe.stack $name {
10 @ewe peek $name
capitalex's Avatar

capitalex / sparse_set.lua

0 Lajky
0 Forky
1 Soubory
Naposledy aktivní 7 months ago
1 local function push(self, thing)
2 -- Attempt to recycle a previously freed ID
3 local id = self.free_ids[#self.free_ids]
4 table.remove(self.free_ids)
5 if not id then
6 -- Othewise generate a new ID
7 id = self.next_id
8 self.next_id = self.next_id + 1
9 end
10 -- Assign the ID, the push the object into items
capitalex's Avatar

capitalex / tictactoe.io

0 Lajky
0 Forky
1 Soubory
Naposledy aktivní 7 months ago
1 Cell := Object clone do (
2 state := nil
3 occupy := method(player,
4 state = player
5 )
6 empty := method(state isNil)
7 asString := method(
8 if(state isNil, return "_")
9 state
10 )
Novější Starší

Vytvořeno pomocí Opengist ⋅ Load: 236ms⋅

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