Rename project to vise
This commit is contained in:
parent
208ad0e287
commit
d8c112fa92
@ -1,4 +1,4 @@
|
||||
# festive: A Constrained Size Output Virtual Machine
|
||||
# vise: A Constrained Size Output Virtual Machine
|
||||
|
||||
An attempt at defining a small VM to handle menu interaction for size-constrained clients and servers.
|
||||
|
||||
@ -142,7 +142,7 @@ Currently the following rules apply for encoding in version `0`:
|
||||
|
||||
## Reference implementation
|
||||
|
||||
This repository provides a `golang` reference implementation for the `festive` concept.
|
||||
This repository provides a `golang` reference implementation for the `vise` concept.
|
||||
|
||||
In this reference implementation some constraints apply
|
||||
|
||||
|
@ -13,11 +13,11 @@ import (
|
||||
"github.com/alecthomas/participle/v2"
|
||||
"github.com/alecthomas/participle/v2/lexer"
|
||||
|
||||
"git.defalsify.org/festive/vm"
|
||||
"git.defalsify.org/vise/vm"
|
||||
)
|
||||
|
||||
|
||||
// Asm assembles bytecode from the festive assembly mini-language.
|
||||
// Asm assembles bytecode from the vise assembly mini-language.
|
||||
type Asm struct {
|
||||
Instructions []*Instruction `@@*`
|
||||
}
|
||||
|
@ -7,7 +7,7 @@ import (
|
||||
"log"
|
||||
"testing"
|
||||
|
||||
"git.defalsify.org/festive/vm"
|
||||
"git.defalsify.org/vise/vm"
|
||||
)
|
||||
|
||||
|
||||
|
@ -1,2 +1,2 @@
|
||||
// Package asm parses and compiles festive assembly code to bytecode.
|
||||
// Package asm parses and compiles vise assembly code to bytecode.
|
||||
package asm
|
||||
|
@ -3,7 +3,7 @@ package asm
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"git.defalsify.org/festive/vm"
|
||||
"git.defalsify.org/vise/vm"
|
||||
)
|
||||
|
||||
// BatchCode defines quasi-opcodes that expand to mulitple individual vm instructions.
|
||||
|
@ -3,7 +3,7 @@ package asm
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"git.defalsify.org/festive/vm"
|
||||
"git.defalsify.org/vise/vm"
|
||||
)
|
||||
|
||||
|
||||
|
@ -6,7 +6,7 @@ import (
|
||||
"log"
|
||||
"os"
|
||||
|
||||
"git.defalsify.org/festive/asm"
|
||||
"git.defalsify.org/vise/asm"
|
||||
)
|
||||
|
||||
func main() {
|
@ -5,7 +5,7 @@ import (
|
||||
"os"
|
||||
"io/ioutil"
|
||||
|
||||
"git.defalsify.org/festive/vm"
|
||||
"git.defalsify.org/vise/vm"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
@ -4,7 +4,7 @@ import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"git.defalsify.org/festive/testdata"
|
||||
"git.defalsify.org/vise/testdata"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
@ -6,7 +6,7 @@ import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"git.defalsify.org/festive/engine"
|
||||
"git.defalsify.org/vise/engine"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
@ -3,9 +3,9 @@ package engine
|
||||
import (
|
||||
"context"
|
||||
|
||||
"git.defalsify.org/festive/cache"
|
||||
"git.defalsify.org/festive/resource"
|
||||
"git.defalsify.org/festive/state"
|
||||
"git.defalsify.org/vise/cache"
|
||||
"git.defalsify.org/vise/resource"
|
||||
"git.defalsify.org/vise/state"
|
||||
)
|
||||
|
||||
// NewDefaultEngine is a convenience function to instantiate a filesystem-backed engine with no output constraints.
|
||||
|
@ -6,11 +6,11 @@ import (
|
||||
"io"
|
||||
"log"
|
||||
|
||||
"git.defalsify.org/festive/cache"
|
||||
"git.defalsify.org/festive/render"
|
||||
"git.defalsify.org/festive/resource"
|
||||
"git.defalsify.org/festive/state"
|
||||
"git.defalsify.org/festive/vm"
|
||||
"git.defalsify.org/vise/cache"
|
||||
"git.defalsify.org/vise/render"
|
||||
"git.defalsify.org/vise/resource"
|
||||
"git.defalsify.org/vise/state"
|
||||
"git.defalsify.org/vise/vm"
|
||||
)
|
||||
|
||||
// Config globally defines behavior of all components driven by the engine.
|
||||
|
@ -8,10 +8,10 @@ import (
|
||||
"path"
|
||||
"testing"
|
||||
|
||||
"git.defalsify.org/festive/cache"
|
||||
"git.defalsify.org/festive/resource"
|
||||
"git.defalsify.org/festive/state"
|
||||
"git.defalsify.org/festive/testdata"
|
||||
"git.defalsify.org/vise/cache"
|
||||
"git.defalsify.org/vise/resource"
|
||||
"git.defalsify.org/vise/state"
|
||||
"git.defalsify.org/vise/testdata"
|
||||
)
|
||||
|
||||
var (
|
||||
|
@ -8,9 +8,9 @@ import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"git.defalsify.org/festive/cache"
|
||||
"git.defalsify.org/festive/resource"
|
||||
"git.defalsify.org/festive/state"
|
||||
"git.defalsify.org/vise/cache"
|
||||
"git.defalsify.org/vise/resource"
|
||||
"git.defalsify.org/vise/state"
|
||||
)
|
||||
|
||||
func TestLoopTop(t *testing.T) {
|
||||
|
@ -4,8 +4,8 @@ import (
|
||||
"context"
|
||||
"io"
|
||||
|
||||
"git.defalsify.org/festive/persist"
|
||||
"git.defalsify.org/festive/resource"
|
||||
"git.defalsify.org/vise/persist"
|
||||
"git.defalsify.org/vise/resource"
|
||||
)
|
||||
|
||||
// RunPersisted performs a single vm execution from client input using a persisted state.
|
||||
|
@ -1,16 +1,14 @@
|
||||
package engine
|
||||
|
||||
import (
|
||||
// "bytes"
|
||||
"context"
|
||||
// "errors"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
"git.defalsify.org/festive/cache"
|
||||
"git.defalsify.org/festive/persist"
|
||||
"git.defalsify.org/festive/state"
|
||||
"git.defalsify.org/vise/cache"
|
||||
"git.defalsify.org/vise/persist"
|
||||
"git.defalsify.org/vise/state"
|
||||
)
|
||||
|
||||
func TestPersist(t *testing.T) {
|
||||
@ -22,7 +20,7 @@ func TestPersist(t *testing.T) {
|
||||
}
|
||||
rs := NewFsWrapper(dataDir, nil)
|
||||
|
||||
persistDir, err := ioutil.TempDir("", "festive_engine_persist")
|
||||
persistDir, err := ioutil.TempDir("", "vise_engine_persist")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
2
go.mod
2
go.mod
@ -1,4 +1,4 @@
|
||||
module git.defalsify.org/festive
|
||||
module git.defalsify.org/vise
|
||||
|
||||
go 1.20
|
||||
|
||||
|
@ -7,8 +7,8 @@ import (
|
||||
"path/filepath"
|
||||
"github.com/fxamacker/cbor/v2"
|
||||
|
||||
"git.defalsify.org/festive/cache"
|
||||
"git.defalsify.org/festive/state"
|
||||
"git.defalsify.org/vise/cache"
|
||||
"git.defalsify.org/vise/state"
|
||||
)
|
||||
|
||||
// FsPersister is an implementation of Persister that saves state to the file system.
|
||||
|
@ -7,9 +7,9 @@ import (
|
||||
"reflect"
|
||||
"testing"
|
||||
|
||||
"git.defalsify.org/festive/cache"
|
||||
"git.defalsify.org/festive/state"
|
||||
"git.defalsify.org/festive/vm"
|
||||
"git.defalsify.org/vise/cache"
|
||||
"git.defalsify.org/vise/state"
|
||||
"git.defalsify.org/vise/vm"
|
||||
)
|
||||
|
||||
func TestSerializeState(t *testing.T) {
|
||||
@ -73,7 +73,7 @@ func TestSaveLoad(t *testing.T) {
|
||||
ca.Add("inky", "pinky", 13)
|
||||
ca.Add("blinky", "clyde", 42)
|
||||
|
||||
dir, err := ioutil.TempDir("", "festive_persist")
|
||||
dir, err := ioutil.TempDir("", "vise_persist")
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
}
|
||||
|
@ -1,8 +1,8 @@
|
||||
package persist
|
||||
|
||||
import (
|
||||
"git.defalsify.org/festive/cache"
|
||||
"git.defalsify.org/festive/state"
|
||||
"git.defalsify.org/vise/cache"
|
||||
"git.defalsify.org/vise/state"
|
||||
)
|
||||
|
||||
// Persister interface defines the methods needed for a component that can store the execution state to a storage location.
|
||||
|
@ -7,8 +7,8 @@ import (
|
||||
"strings"
|
||||
"text/template"
|
||||
|
||||
"git.defalsify.org/festive/cache"
|
||||
"git.defalsify.org/festive/resource"
|
||||
"git.defalsify.org/vise/cache"
|
||||
"git.defalsify.org/vise/resource"
|
||||
)
|
||||
|
||||
// Page exectues output rendering into pages constrained by size.
|
||||
|
@ -3,7 +3,7 @@ package render
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"git.defalsify.org/festive/cache"
|
||||
"git.defalsify.org/vise/cache"
|
||||
)
|
||||
|
||||
|
||||
|
@ -5,9 +5,9 @@ import (
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"git.defalsify.org/festive/state"
|
||||
"git.defalsify.org/festive/resource"
|
||||
"git.defalsify.org/festive/cache"
|
||||
"git.defalsify.org/vise/state"
|
||||
"git.defalsify.org/vise/resource"
|
||||
"git.defalsify.org/vise/cache"
|
||||
)
|
||||
|
||||
type TestSizeResource struct {
|
||||
|
@ -1,7 +1,7 @@
|
||||
package resource
|
||||
|
||||
import (
|
||||
"git.defalsify.org/festive/state"
|
||||
"git.defalsify.org/vise/state"
|
||||
)
|
||||
|
||||
type StateResource struct {
|
||||
|
@ -3,7 +3,7 @@ package resource
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"git.defalsify.org/festive/state"
|
||||
"git.defalsify.org/vise/state"
|
||||
)
|
||||
|
||||
func TestStateResourceInit(t *testing.T) {
|
||||
|
4
testdata/testdata.go
vendored
4
testdata/testdata.go
vendored
@ -8,7 +8,7 @@ import (
|
||||
|
||||
testdataloader "github.com/peteole/testdata-loader"
|
||||
|
||||
"git.defalsify.org/festive/vm"
|
||||
"git.defalsify.org/vise/vm"
|
||||
)
|
||||
|
||||
type genFunc func() error
|
||||
@ -167,7 +167,7 @@ func generate() error {
|
||||
//
|
||||
// This directory can in turn be used as data source for the the resource.FsResource object.
|
||||
func Generate() (string, error) {
|
||||
dir, err := ioutil.TempDir("", "festive_testdata_")
|
||||
dir, err := ioutil.TempDir("", "vise_testdata_")
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
@ -1,2 +1,2 @@
|
||||
// Package vm handles the line-by-line execution of festive bytecode.
|
||||
// Package vm handles the line-by-line execution of vise bytecode.
|
||||
package vm
|
||||
|
@ -5,8 +5,8 @@ import (
|
||||
"fmt"
|
||||
"regexp"
|
||||
|
||||
"git.defalsify.org/festive/cache"
|
||||
"git.defalsify.org/festive/state"
|
||||
"git.defalsify.org/vise/cache"
|
||||
"git.defalsify.org/vise/state"
|
||||
)
|
||||
|
||||
var (
|
||||
|
@ -5,10 +5,10 @@ import (
|
||||
"fmt"
|
||||
"log"
|
||||
|
||||
"git.defalsify.org/festive/cache"
|
||||
"git.defalsify.org/festive/render"
|
||||
"git.defalsify.org/festive/resource"
|
||||
"git.defalsify.org/festive/state"
|
||||
"git.defalsify.org/vise/cache"
|
||||
"git.defalsify.org/vise/render"
|
||||
"git.defalsify.org/vise/resource"
|
||||
"git.defalsify.org/vise/state"
|
||||
)
|
||||
|
||||
// Vm holds sub-components mutated by the vm execution.
|
||||
|
@ -7,10 +7,10 @@ import (
|
||||
"log"
|
||||
"testing"
|
||||
|
||||
"git.defalsify.org/festive/cache"
|
||||
"git.defalsify.org/festive/render"
|
||||
"git.defalsify.org/festive/resource"
|
||||
"git.defalsify.org/festive/state"
|
||||
"git.defalsify.org/vise/cache"
|
||||
"git.defalsify.org/vise/render"
|
||||
"git.defalsify.org/vise/resource"
|
||||
"git.defalsify.org/vise/state"
|
||||
)
|
||||
|
||||
var dynVal = "three"
|
||||
|
Loading…
Reference in New Issue
Block a user