== About GoLightly == GoLightly is a lightweight virtual machine library implemented in Go, designed for flexibility and reuse. Traditionally popular VMs have adopted a stack-based design as this is perceived to be easier to implement than the register-based design that real-world hardware generally uses. There are arguments both ways on which of the two approaches is 'better' and it's not our intention to mandate either: a good VM toolkit should leave that decision to those who know which suits their purpose best. However just because GoLightly adopts a careful neutrality on this issue doesn't mean that it has nothing fresh to offer. Firstly GoLightly provides support for vector instructions allowing each virtual processor to handle large data sets more efficiently than in traditional VM designs. Not only is this a boon for fast maths, it also allows complex data structures to be transferred between virtual processors with only a couple of instructions. And speaking of multiple virtual processors, once a processor has been initialised it can be cloned with a single instruction and both processors are hooked together with a communications channel. Each processor has its own dynamic instruction definition and dispatch mechanism providing a flexible model during development. However function-based dynamic dispatch is more expensive than the switch-based dispatch used in traditional VM designs so the latter is also supported via type embedding of the ProcessorCore and method hiding of InlinedInstructions(). One interesting consequence of making each virtual processor configurable in this manner is that it allows complex problems to be modelled in terms of several different processors running relatively simple programs and arranged in a pipeline. Likewise the ability to clone virtual processors can be used as a building block for transactional and speculative execution. == Tests and Benchmarks == Golightly includes a large collection of tests and benchmarks. A simple set of micro-benchmarks is available to judge the relative cost of various standard Go instructions and idioms which can be invoked from the command-line: cd go gotest -benchmarks="Benchmark" Likewise the test suite for the VM primitives can be executed with: cd vm gotest and the optional benchmarks invoked with: gotest -benchmarks="Benchmark" These include extensive micro-benchmarks focusing on individual primitive operation performance which will hopefully act as a useful guide to relative performance for those writing compilers or assemblers targeting GoLightly virtual machines.
A customisable virtual machine written in Go
<< in ShiftRight() and >> in ShiftLeft() should be the other way around.
What versions of Golang does this work with? I'm trying to use it with 1.1.2 and it's failing with the following error:
golightly.go:8:2: cannot find package "container/vector"
After some checking it seems that package was replaced by native slices. I guess I just want to confirm that I'm not missing something.
This is WhitespaceBot from Gun.io. I'm an open-source robot that removes trailing white space in your code, and gives you a gitignore file if you didn't have one! I've only cleaned your most popular project, and I've added you to a list of users not to contact again, so you won't get any more pull requests from me unless you ask. If I'm misbehaving, please email my owner and tell him to turn me off!
== About Gun.io == Gun.io is a place for hackers to hire each other for small tasks. We offer no-hassle, winner-take-all freelance gigs, by hackers, for hackers. Got a bug you can't fix or a feature you want for your project? Post a gig and have somebody else sort it out for you. Oh, and it's free for open source! Sign up and get notified about new gigs you can work on!
== About WhitespaceBot== WhitespaceBot is a simple open source robot which uses GitHub's API as a way of cleaning up open source projects! We've put up a paid bounty for whoever can add security fixing features to it.
Hi, I can't compile your application
$ ./make.bash make: Nothing to be done for `all'. mkdir: cannot create directory `/home/jlarky/go/pkg/linux_386/golightly': Permission denied make: *** [/home/jlarky/go/pkg/linux_386/golightly/test.a] Error 1 8g -o _go_.8 utility.go reslicing.go buffer.go int_buffer.go int_vector.go float_buffer.go utility.go:5: undefined: float utility.go:6: undefined: float int_vector.go:368: undefined: float int_vector.go:390: undefined: float float_buffer.go:7: undefined: float float_buffer.go:9: invalid receiver type FloatBuffer float_buffer.go:10: invalid receiver type FloatBuffer float_buffer.go:12: invalid receiver type FloatBuffer float_buffer.go:18: invalid receiver type *FloatBuffer float_buffer.go:28: invalid receiver type *FloatBuffer float_buffer.go:28: too many errors make: *** [_go_.8] Error 1 8g -o _go_.8 utility.go reslicing.go buffer.go int_buffer.go int_vector.go float_buffer.go utility.go:5: undefined: float utility.go:6: undefined: float int_vector.go:368: undefined: float int_vector.go:390: undefined: float float_buffer.go:7: undefined: float float_buffer.go:9: invalid receiver type FloatBuffer float_buffer.go:10: invalid receiver type FloatBuffer float_buffer.go:12: invalid receiver type FloatBuffer float_buffer.go:18: invalid receiver type *FloatBuffer float_buffer.go:28: invalid receiver type *FloatBuffer float_buffer.go:28: too many errors make: *** [_go_.8] Error 1 rm -f _test/feyeleanor/golightly.a 8g -o _gotest_.8 baseline.go baseline_benchmark_test.go baseline_test.go baseline_benchmark_test.go:282: undefined: float make: *** [_gotest_.8] Error 1 rm -f _test/golightly/vm.a 8g -o _gotest_.8 instruction_set.go iocontroller.go processor_core.go program.go instruction_set_benchmark_test.go
instruction_set_test.go iocontroller_test.go processor_core_benchmark_test.go processor_core_test.go iocontroller.go:7: can't find import: golightly/storage make: *** [gotest.8] Error 1