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

june

Joined 1 year ago

Recently created
Least recently created
Recently updated
Least recently updated
All gists 52 Forked 1
june's Avatar

june / Driver Assistance

0 likes
0 forks
1 files
Last active 1 month ago
A model of a driver assistance function.
1 |# Model based off of https://beza1e1.tuxen.de/tla-plus.html #|
2 |# Driving Assist #|
3 :author: "June Gardner"
4
5 |:state: off :seatbelt: unknown| :state: fault
6 |:state: off :sensors: broken | :state: fault
7 |:state: off :brakes: broken | :state: fault
8
9 |:state: off :seatbelt: off | :state: temporary fault
10 |:state: off :sensors: blind| :state: temporary fault
june's Avatar

june / Fridge Simulation

0 likes
0 forks
1 files
Last active 1 month 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 likes
0 forks
1 files
Last active 1 month 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 likes
0 forks
1 files
Last active 1 month 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 likes
0 forks
1 files
Last active 1 month 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 likes
0 forks
1 files
Last active 1 month 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 likes
0 forks
1 files
Last active 1 month 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
june's Avatar

june / slab.nv

0 likes
0 forks
1 files
Last active 2 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 likes
0 forks
1 files
Last active 2 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
june's Avatar

june / A formatting print rule-set.

0 likes
0 forks
1 files
Last active 3 months ago
Supports custom formatting by adding additional rules. (Runs in Serpens.)
1 |:: print? :string: '%d'| :: print a number
2 |:: print? :string: '%b'| :: print a number :base: 2
3 |:: print? :string: '%x'| :: print a number :base: 16
4 |:: print? :string: '%s'| :: print a string
5 |:: print? :string: '{}'| :: print an argument
6 |:: print? :string: '\n'| :string: 10
7 |:: print? :string: '\t'| :string: 9
8 |:: print? :string: '\r'| :string: 13
9 |:: print? :string: '\0'| :string: 0
10 |:: print? :string: $ | :@stdio: write $
Newer Older

Powered by Opengist ⋅ Load: 142ms⋅

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