Rename project to vise

This commit is contained in:
lash 2023-04-14 09:59:37 +01:00
parent 208ad0e287
commit d8c112fa92
Signed by untrusted user who does not match committer: lash
GPG Key ID: 21D2E7BB88C2A746
30 changed files with 63 additions and 65 deletions

View File

@ -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. 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 ## 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 In this reference implementation some constraints apply

View File

@ -13,11 +13,11 @@ import (
"github.com/alecthomas/participle/v2" "github.com/alecthomas/participle/v2"
"github.com/alecthomas/participle/v2/lexer" "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 { type Asm struct {
Instructions []*Instruction `@@*` Instructions []*Instruction `@@*`
} }

View File

@ -7,7 +7,7 @@ import (
"log" "log"
"testing" "testing"
"git.defalsify.org/festive/vm" "git.defalsify.org/vise/vm"
) )

View File

@ -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 package asm

View File

@ -3,7 +3,7 @@ package asm
import ( import (
"fmt" "fmt"
"git.defalsify.org/festive/vm" "git.defalsify.org/vise/vm"
) )
// BatchCode defines quasi-opcodes that expand to mulitple individual vm instructions. // BatchCode defines quasi-opcodes that expand to mulitple individual vm instructions.

View File

@ -3,7 +3,7 @@ package asm
import ( import (
"testing" "testing"
"git.defalsify.org/festive/vm" "git.defalsify.org/vise/vm"
) )

View File

@ -6,7 +6,7 @@ import (
"log" "log"
"os" "os"
"git.defalsify.org/festive/asm" "git.defalsify.org/vise/asm"
) )
func main() { func main() {

View File

@ -5,7 +5,7 @@ import (
"os" "os"
"io/ioutil" "io/ioutil"
"git.defalsify.org/festive/vm" "git.defalsify.org/vise/vm"
) )
func main() { func main() {

View File

@ -4,7 +4,7 @@ import (
"fmt" "fmt"
"os" "os"
"git.defalsify.org/festive/testdata" "git.defalsify.org/vise/testdata"
) )
func main() { func main() {

View File

@ -6,7 +6,7 @@ import (
"fmt" "fmt"
"os" "os"
"git.defalsify.org/festive/engine" "git.defalsify.org/vise/engine"
) )
func main() { func main() {

View File

@ -3,9 +3,9 @@ package engine
import ( import (
"context" "context"
"git.defalsify.org/festive/cache" "git.defalsify.org/vise/cache"
"git.defalsify.org/festive/resource" "git.defalsify.org/vise/resource"
"git.defalsify.org/festive/state" "git.defalsify.org/vise/state"
) )
// NewDefaultEngine is a convenience function to instantiate a filesystem-backed engine with no output constraints. // NewDefaultEngine is a convenience function to instantiate a filesystem-backed engine with no output constraints.

View File

@ -6,11 +6,11 @@ import (
"io" "io"
"log" "log"
"git.defalsify.org/festive/cache" "git.defalsify.org/vise/cache"
"git.defalsify.org/festive/render" "git.defalsify.org/vise/render"
"git.defalsify.org/festive/resource" "git.defalsify.org/vise/resource"
"git.defalsify.org/festive/state" "git.defalsify.org/vise/state"
"git.defalsify.org/festive/vm" "git.defalsify.org/vise/vm"
) )
// Config globally defines behavior of all components driven by the engine. // Config globally defines behavior of all components driven by the engine.

View File

@ -8,10 +8,10 @@ import (
"path" "path"
"testing" "testing"
"git.defalsify.org/festive/cache" "git.defalsify.org/vise/cache"
"git.defalsify.org/festive/resource" "git.defalsify.org/vise/resource"
"git.defalsify.org/festive/state" "git.defalsify.org/vise/state"
"git.defalsify.org/festive/testdata" "git.defalsify.org/vise/testdata"
) )
var ( var (

View File

@ -8,9 +8,9 @@ import (
"strings" "strings"
"testing" "testing"
"git.defalsify.org/festive/cache" "git.defalsify.org/vise/cache"
"git.defalsify.org/festive/resource" "git.defalsify.org/vise/resource"
"git.defalsify.org/festive/state" "git.defalsify.org/vise/state"
) )
func TestLoopTop(t *testing.T) { func TestLoopTop(t *testing.T) {

View File

@ -4,8 +4,8 @@ import (
"context" "context"
"io" "io"
"git.defalsify.org/festive/persist" "git.defalsify.org/vise/persist"
"git.defalsify.org/festive/resource" "git.defalsify.org/vise/resource"
) )
// RunPersisted performs a single vm execution from client input using a persisted state. // RunPersisted performs a single vm execution from client input using a persisted state.

View File

@ -1,16 +1,14 @@
package engine package engine
import ( import (
// "bytes"
"context" "context"
// "errors"
"io/ioutil" "io/ioutil"
"os" "os"
"testing" "testing"
"git.defalsify.org/festive/cache" "git.defalsify.org/vise/cache"
"git.defalsify.org/festive/persist" "git.defalsify.org/vise/persist"
"git.defalsify.org/festive/state" "git.defalsify.org/vise/state"
) )
func TestPersist(t *testing.T) { func TestPersist(t *testing.T) {
@ -22,7 +20,7 @@ func TestPersist(t *testing.T) {
} }
rs := NewFsWrapper(dataDir, nil) rs := NewFsWrapper(dataDir, nil)
persistDir, err := ioutil.TempDir("", "festive_engine_persist") persistDir, err := ioutil.TempDir("", "vise_engine_persist")
if err != nil { if err != nil {
t.Fatal(err) t.Fatal(err)
} }

2
go.mod
View File

@ -1,4 +1,4 @@
module git.defalsify.org/festive module git.defalsify.org/vise
go 1.20 go 1.20

View File

@ -7,8 +7,8 @@ import (
"path/filepath" "path/filepath"
"github.com/fxamacker/cbor/v2" "github.com/fxamacker/cbor/v2"
"git.defalsify.org/festive/cache" "git.defalsify.org/vise/cache"
"git.defalsify.org/festive/state" "git.defalsify.org/vise/state"
) )
// FsPersister is an implementation of Persister that saves state to the file system. // FsPersister is an implementation of Persister that saves state to the file system.

View File

@ -7,9 +7,9 @@ import (
"reflect" "reflect"
"testing" "testing"
"git.defalsify.org/festive/cache" "git.defalsify.org/vise/cache"
"git.defalsify.org/festive/state" "git.defalsify.org/vise/state"
"git.defalsify.org/festive/vm" "git.defalsify.org/vise/vm"
) )
func TestSerializeState(t *testing.T) { func TestSerializeState(t *testing.T) {
@ -73,7 +73,7 @@ func TestSaveLoad(t *testing.T) {
ca.Add("inky", "pinky", 13) ca.Add("inky", "pinky", 13)
ca.Add("blinky", "clyde", 42) ca.Add("blinky", "clyde", 42)
dir, err := ioutil.TempDir("", "festive_persist") dir, err := ioutil.TempDir("", "vise_persist")
if err != nil { if err != nil {
t.Error(err) t.Error(err)
} }

View File

@ -1,8 +1,8 @@
package persist package persist
import ( import (
"git.defalsify.org/festive/cache" "git.defalsify.org/vise/cache"
"git.defalsify.org/festive/state" "git.defalsify.org/vise/state"
) )
// Persister interface defines the methods needed for a component that can store the execution state to a storage location. // Persister interface defines the methods needed for a component that can store the execution state to a storage location.

View File

@ -7,8 +7,8 @@ import (
"strings" "strings"
"text/template" "text/template"
"git.defalsify.org/festive/cache" "git.defalsify.org/vise/cache"
"git.defalsify.org/festive/resource" "git.defalsify.org/vise/resource"
) )
// Page exectues output rendering into pages constrained by size. // Page exectues output rendering into pages constrained by size.

View File

@ -3,7 +3,7 @@ package render
import ( import (
"testing" "testing"
"git.defalsify.org/festive/cache" "git.defalsify.org/vise/cache"
) )

View File

@ -5,9 +5,9 @@ import (
"fmt" "fmt"
"testing" "testing"
"git.defalsify.org/festive/state" "git.defalsify.org/vise/state"
"git.defalsify.org/festive/resource" "git.defalsify.org/vise/resource"
"git.defalsify.org/festive/cache" "git.defalsify.org/vise/cache"
) )
type TestSizeResource struct { type TestSizeResource struct {

View File

@ -1,7 +1,7 @@
package resource package resource
import ( import (
"git.defalsify.org/festive/state" "git.defalsify.org/vise/state"
) )
type StateResource struct { type StateResource struct {

View File

@ -3,7 +3,7 @@ package resource
import ( import (
"testing" "testing"
"git.defalsify.org/festive/state" "git.defalsify.org/vise/state"
) )
func TestStateResourceInit(t *testing.T) { func TestStateResourceInit(t *testing.T) {

View File

@ -8,7 +8,7 @@ import (
testdataloader "github.com/peteole/testdata-loader" testdataloader "github.com/peteole/testdata-loader"
"git.defalsify.org/festive/vm" "git.defalsify.org/vise/vm"
) )
type genFunc func() error 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. // This directory can in turn be used as data source for the the resource.FsResource object.
func Generate() (string, error) { func Generate() (string, error) {
dir, err := ioutil.TempDir("", "festive_testdata_") dir, err := ioutil.TempDir("", "vise_testdata_")
if err != nil { if err != nil {
return "", err return "", err
} }

View File

@ -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 package vm

View File

@ -5,8 +5,8 @@ import (
"fmt" "fmt"
"regexp" "regexp"
"git.defalsify.org/festive/cache" "git.defalsify.org/vise/cache"
"git.defalsify.org/festive/state" "git.defalsify.org/vise/state"
) )
var ( var (

View File

@ -5,10 +5,10 @@ import (
"fmt" "fmt"
"log" "log"
"git.defalsify.org/festive/cache" "git.defalsify.org/vise/cache"
"git.defalsify.org/festive/render" "git.defalsify.org/vise/render"
"git.defalsify.org/festive/resource" "git.defalsify.org/vise/resource"
"git.defalsify.org/festive/state" "git.defalsify.org/vise/state"
) )
// Vm holds sub-components mutated by the vm execution. // Vm holds sub-components mutated by the vm execution.

View File

@ -7,10 +7,10 @@ import (
"log" "log"
"testing" "testing"
"git.defalsify.org/festive/cache" "git.defalsify.org/vise/cache"
"git.defalsify.org/festive/render" "git.defalsify.org/vise/render"
"git.defalsify.org/festive/resource" "git.defalsify.org/vise/resource"
"git.defalsify.org/festive/state" "git.defalsify.org/vise/state"
) )
var dynVal = "three" var dynVal = "three"