june / Driver Assistance
0 curtidas
0 bifurcações
1 arquivos
Última atividade 2 days 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 / Fridge Simulation
0 curtidas
0 bifurcações
1 arquivos
Última atividade 4 days 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 / Command Parser
0 curtidas
0 bifurcações
1 arquivos
Última atividade 4 days 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 / Kitchen Simulation
0 curtidas
0 bifurcações
1 arquivos
Última atividade 1 week 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 / Parser (Skeleton)
0 curtidas
0 bifurcações
1 arquivos
Última atividade 1 week 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 / A basic for-each/fold pattern.
0 curtidas
0 bifurcações
1 arquivos
Última atividade 3 weeks 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 |
Próximo
Anterior