Skip to main content

Moved Utility Packages

· One min read
Nicolas Schmidt
Maintainer of Shake
Shake Team
Shake Programming Language Team

We've decided, to move our utility packages from group com.shakelang.shake.util to com.shakelang.util. We've wanted to do this change for a longer time now and decided that it is better to do such things in early development. Nevertheless this was a big refactoring change including more than 400 files. Additionally we've also moved all packages from com.shakelang.shake.util to com.shakelang.util.

THIS IS A BREAKING CHANGE. WE'VE DECIDED NOT TO INCREMENT THE MAJOR, AS WE ARE STILL IN A BETA PHASE FOR ALL THE AFFECTED PACKAGES

Here is a list of all affected packages:

  • changelog (now com.shakelang.util.changelog)
  • colorlib (now com.shakelang.util.colorlib)
  • common-io (now com.shakelang.util.common-io)
  • environment (now com.shakelang.util.environment)
  • jvmlib (now com.shakelang.util.jvmlib) (unreleased)
  • logger (now com.shakelang.util.logger)
  • markdown (now com.shakelang.util.markdown)
  • parseutils (now com.shakelang.util.parseutils)
  • pointers (now com.shakelang.util.pointers)
  • primitives (now com.shakelang.util.primitives)
  • sarifmerge (now com.shakelang.util.sarifmerge)
  • shason (now com.shakelang.util.shason)
  • testlib (now com.shakelang.util.testlib)

Moved specification

· 2 min read
Nicolas Schmidt
Maintainer of Shake
Shake Team
Shake Programming Language Team

We moved the specification to specification.shakelang.com. The old specification url shakelang.com/specification will redirect to the new url. We now use a separate repository and a separate docusaurus instance for the specification. This allows us to have a better overview of the specification and to have a better structure. We plan on making it much more detailed.

Besides the specification of the language, we are also writing specification for the packages we built as part of the shake project. This includes out parseutils, common-io, primitives, shason and many more utility packages. They might be useful for other projects as well, so we decided to write specification and tutorials for them.

At the moment we only have a specification for the shason package, but we plan on adding more in the future.

As part of this restructuring, we also moved the dokka documentation of the shake project to a separate repository and subdomain.

The dokka documentation is now moved to dokka.shakelang.com. (again, shakelang.com/dokka will redirect to the new url

The reason for all these restructuring are smaller and more maintainable repositories as well as better performance in the builds.

We hope you like the new specification and the new dokka documentation. If you have any questions, feel free to ask them in our discord server.

Working on new Bytecode-Based interpreter

· 3 min read
Nicolas Schmidt
Maintainer of Shake
Shake Team
Shake Programming Language Team

Our main goal at the moment is to make a new working build of shake using the actual codebase.

We habe decided to not update the interpreter package, which interprets the code on the old demo builds, further with the main codebase. At the moment it is still codebase, but ignored in the build process (as it is not up-to-date with breaking changes to the parser).

The reason for this decision is that we want to migrate to an instruction based bytecode interpreter as shake interpreter. If you want to know more about this topic and why we made that decision you can read it here.

Because of that reason we have to rewrite the whole interpreter codebase as well as a generator to generate the required bytecode instructions. Also the instructions will be generated from the output of the shake processor, so for a working build we have to make the processor ready as well. The processor is in a mostly working state at the moment, but it is not well tested, so there might be a lot of bugs.

All of these chages are quite a lot to handle and will need some time. But, they are our main focus point. When we are ready for alpha builds of the new bytecode-based interpreter, we will also release them to the demo on the website.

Overall we decided to not maintain the old interpreter anymore, because it becomes obsolete as soon as the new interpreter is ready, so we are better of focussing our limited work-capacity on the new interpreter.

Technical considerations

When compiling code we need to generate an abstract syntax tree (AST). You can imagine an AST like a mindmap of your whole programm. A generator generates something new out of that AST.

Our old interpreter was basically a visitor of an AST, so we have an add node with two values, we generate just the result. There are a few problems with this aproach. The biggest problem is, that we have to work with the whole AST the whole time. So we need to store such a mind-map of the whole programm in memory while it is executing. This drastically slows down our programm and generates a lot of unnescessary junk stored in the memory.

The new apporach is to create a list of (which is basically just a big byte array and a pointer index). This is much cleaner and faster. We can also decide to compile the code to bytecode (while building the code) for even better performance (especially when starting the programm) (e.g. java does this when compiling .java files to .class files).

An advanced benefit is that we have controll over the amount of instructions we want to visit at all time. On the website-demo for example, the whole website is paused while the code is running (because javascript is a single-threaded language). If you are just doing small calculations (like 10000 steps) this is no problem, but by inserting some bigger loop structure (or non-deterministic loop) you can crash the website. If we limit the amount of "ticks" (one tick refers to one visited operation) to 10000/s, the website would run just fine, even if we input a non-deterministic loop. For such cases we can then add a terminate button.

Introducing Shake Bot

· One min read
Shake Bot
Bot of the Shake Organization

Hello there, I'm the Shake Bot. I'm a bot that is used to automate some tasks on the shake repositories. Most automated commits and stuff like that will be done by me in the future. So if you see a commit by me, don't be surprised. My roles will expand in the future, so stay tuned for more information. At the moment im only controlled by github actions.

Release first utility packages

· One min read
Nicolas Schmidt
Maintainer of Shake
Shake Team
Shake Programming Language Team

We are very happy to release our first pre-release version of Shake! These releases is a pre-releases, and is not intended for production use. This release is intended for testing purposes only. We have no releases of the shake compiler yet, but of some of it's utility packages. We have released the following packages:

  • testlib (v0.1.0) (Extended testing functionality we use in our unit testing for Shake)
  • colorlib (v0.1.0) (Kotlin MPP library for color manipulation in the terminal)
  • common-io (v0.1.0) (Kotlin MPP library for common io operations, streams and such)
  • parseutils (v0.1.1) (Kotlin MPP library for parsing utilities, containing character streams, and other parsing utilities)
  • primitives (v0.1.0) (Kotlin MPP library to extend primitive types with some useful functionality)
  • shason (v0.1.0) (Kotlin MPP library for JSON parsing and serialization)

Welcome to the Shake blog!

· One min read
Nicolas Schmidt
Maintainer of Shake
Shake Team
Shake Programming Language Team

This is the first blog post of the Shake blog. This blog will be used to post updates about the ShakeLang project, as well as other things related to ShakeLang.

What is Shake?

Shake is a programming language that is designed to be easy to use, and easy to learn. It is designed to be a general purpose programming language, and is designed to be used for many different things, especially multi-platform api creation.