Go Julia!

by Ingy döt Net | | 2 min read

Last week two new language bindings were added to the YAMLScript family: Go and Julia.

Go

The Go binding has been a long time coming. Several people have been working on it this year but it was Andrew Pam who finally got it over the finish line.

Go is a big user of the YAML data language, so we're happy to be able to provide this library and hope to see it used in many Go projects.

Julia

The Julia binding was a bit more of a recent surprise addition. A few weeks ago a Julia hacker dropped by the YAML Chat Room to ask some questions about YAML. I ended up asking him more about Julia and if he could help write a YAMLScript binding.

He invited Kenta Murata to the chat room and Kenta said he could do it for us. Then Kenta disappeared for a few weeks. Last week he came back with a fully working Julia binding for YAMLScript!

Fun fact: Julia is Clark Evans favorite programming language! Clark is one of the original authors of the YAML data language.

YAMLScript Loader Libraries

These YAMLScript language bindings are intended to be an alternative YAML loader library for the respective languages. They can load normal existing YAML files in a consistent way, and common API across all languages. They can also load YAML files with embedded YAMLScript code, to achieve data importing, transformation, interpolation; anything a programming language can do.

The current list of YAMLScript loader libraries is:

Join the Fun!

If your language is missing a YAMLScript binding or you want to help improve one, please drop by the YAMLScript Chat Room and we'll get you started.

All of the bindings are part of the YAMLScript Mono-Repo on GitHub. If you look at the existing bindings, you'll see that they are all quite small. You'll need to learn about basic FFI (Foreign Function Interface) for your language, to make calls to the YAMLScript shared library libyamlscript, but that's about it.

It's a great way to get started with a new language project.

Some Future Plans

There's a lot of upcoming work planned for YAMLScript. I've mapped some of it out in the YAMLScript Roadmap.

Currently YAMLScript (written in Clojure, which compiles to JVM bytecode, which…) compiles to a native binary interpreter using the GraalVM native-image compiler. This is great for performance and distribution, but it's not great for portability, limiting it to Linux, MacOS and Windows.

The JVM is a great platform for portability, so we're planning to make a JVM version of the ys YAMLScript interpreter. Of course, having YAMLScript available as a JVM language is also a good thing for Linux, MacOS and Windows users.

We also want to make WebAssembly, JavaScript and C++ versions of the YAMLScript interpreter.

And of course we still want to get to our goal of 42 language bindings!!!

Lots of fun stuff to explore!