Our great sponsors
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
-
hof
Framework that joins data models, schemas, code generation, and a task engine. Language and technology agnostic.
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
Thanks for your note. The package notes on Jacobin say that we strongly discourage folks from running it in its present form. There are enough features still to be implemented, that for anything but trivial classes, you won't have a good experience. TBH, we're about a year out (we think) from having a version we can solicit users to test.
Nonetheless, if you'd be kind enough to post the above error and the class you used into the GitHub Issues tracker [0], we'll definitely include it in our test suite and make sure whatever the problem is, it'll be corrected.
[0] https://github.com/platypusguy/jacobin/issues
The modules system is for better encapsulation and the ability to produce a JVM without features you don't need.
Faster start up time is in the works with projects like coordinated restore at checkpoint which will let you start a JVM up in an already "warmed" state.
https://github.com/CRaC/docs
Ummm, excuse me, but where the f&$k has this been hiding? I’ve been looking for ways to extend my go applications with scripting support. I started with Lua (worked ) then Python (worked but hacky) then javascript using otto [1]. However it lacks ES6 support so having pretty OOP js code is a non-starter. I would love to have Java as a runtime that can be executed from goroutines.
[1] https://github.com/robertkrimen/otto
CUE is another interesting language to use from within Go, and is rather natural, given CUE is implemented in Go, but you can also do way more cool things with CUE via the Go API.
We're using CUE to validate and transform data, as input to code gen, the basis for a DAG task engine, and more
https://cuelang.org | https://pkg.go.dev/cuelang.org/[email protected]/cue | https://cuetorials.com/go-api (learn about CUE)
https://github.com/hofstadter-io/hof (where we are doing these things)
CUE is another interesting language to use from within Go, and is rather natural, given CUE is implemented in Go, but you can also do way more cool things with CUE via the Go API.
We're using CUE to validate and transform data, as input to code gen, the basis for a DAG task engine, and more
https://cuelang.org | https://pkg.go.dev/cuelang.org/[email protected]/cue | https://cuetorials.com/go-api (learn about CUE)
https://github.com/hofstadter-io/hof (where we are doing these things)
I am a fan of the Jacobin project! For your uses, you may also want to consider wazero [1], a pure-go WebAssembly runtime. Full disclosure: I am on the team :)
[1]: https://wazero.io/
Not the parent but there are several high quality native (meaning no CGO) Lua implementations for Go and it's a great choice if you want an embedded scripting language:
https://github.com/yuin/gopher-lua
https://github.com/Shopify/go-lua
Unless you specifically need a JVM either of these will be a much more practical and mature choice for embedded scripting.
Alternatively if you prefer JS then Otto is a good choice:
Yeah, I think any bytecode interpreter ends up with a giant switch in the critical path at some point :)
Around the time that change was made to Go, Andrew and I were looking at this and wondering how big of a performance hit it was and if there were a better way to structure that. I had a hunch that the compiler should be smart enough to not compile that as a switch/giant if block, and a quick trip to a disassembler showed it using binary search. This commit: https://github.com/golang/go/commit/1ba96d8c0909eca59e28c048... added the jump table and has some nice analysis on where it makes sense to do binary search vs jump tables.
As far as I can tell, with certain restrictions (that are fine in this case), it is pretty reliable at optimizing giant if/else blocks and switches.