Skip to content

Instantly share code, notes, and snippets.

View frame-lang's full-sized avatar

Mark Truluck frame-lang

View GitHub Profile
#TCPProtocol
-machine-
$Closed
|>|
activeOpen() ?
-> "Active\nOpen" $SynSent
:
-> "Passive\nOpen" $Listen :: ^
@frame-lang
frame-lang / TrafficLight.frm
Created April 25, 2022 14:57
Frame spec for #TrafficLight workflow
```
package trafficlight
import (
"encoding/json"
"github.com/frame-lang/frame-demos/persistenttrafficlight/framelang"
)
```
#[derive(Managed,Marshal)]
@frame-lang
frame-lang / TrafficLightMom.frm
Last active April 26, 2022 04:01
Frame spec for #TrafficLightMom
```
package trafficlight
import (
"github.com/frame-lang/frame-demos/persistenttrafficlight/framelang"
)
```
#TrafficLightMom
-interface-
@frame-lang
frame-lang / Iterator.frm
Created July 29, 2021 01:07
An internal iterator
#Iterator
-interface-
start @(|>>|)
-machine-
$Start
|>>|
@frame-lang
frame-lang / EditorialWorkflow.frm
Last active July 21, 2021 02:19
Editorial Workflow
--- see https://www.lucidchart.com/blog/what-is-workflow
#EditorialWorkflow
-machine-
$GatherInfo
|done| -> $FirstDraft ^
$FirstDraft
@frame-lang
frame-lang / AliceProtocolSpec.frm
Created July 10, 2021 16:20
Alice Protocol Spec
#AliceProtocolSpec
-machine-
$Start
|seeBob|
-> $GreetBob ^
$GreetBob
|>|
#InterfaceSpec
-interface-
yo
foo[bar:String]:bool
start @(|>>|)
stop @(|<<|)
##
@frame-lang
frame-lang / HierarchicalStateMachine.frm
Created July 6, 2021 04:35
Hierarchical State Machine
#HierarchicalStateMachine
-interface-
start @(|>>|)
stop @(|<<|)
-machine-
$Begin
@frame-lang
frame-lang / TransitionEnterEventParametersSpec.frm
Created July 4, 2021 16:27
Transition EnterEvent Parameters Spec
#TransitionEnterEventParametersSpec
-interface-
start[msg:String]
-machine-
$Start
|start|[msg:String]
@frame-lang
frame-lang / VariablesSpec.frm
Last active July 7, 2021 04:06
Variables Spec
#VariablesSpec
-interface-
start @(|>>|)
-machine-
$Start
|>>| -> $Working ^