Preskoči na glavno vsebino

Objave

Prikaz objav, dodanih na februar, 2022

Rye with WASM and TinyGo

Contrary to the number of blogposts, Rye development wasn't sleeping last week. I experimented with Rye compiled to Web Assembly. Regular Go can cross-compile to WASM without a problem, but the .wasm file is not so small. It was around 5MB in my test case. The bigger size is supposed to be the result of not so small Go runtime, that isn't made to be used in a browser for example. But there is a very interesting project out there: TinyGo , that made an alternative compiler. They are using llvm and a lot of it's features to reduce the size. So go becomes good option for very small devices like micro-controllers and also WASM! Compilation right now takes a lot more time, but if it would produce considerably smaller .wasm file, it would be more than worth it and really awesome also for Rye. The problem right now is, that compiling Rye with TinyGo doesn't produce smaller binary, so we are trying to figure out why is that.

Higher order functions test

When playing with recent puzzle , I added some new HOF-like functions and made existing ones work with more data-types. I added strings not just blocks / lists to some of them. Below is a short demo from the Rye console where you can see how they work. You can get the code as code in the following gist .   We have got binaries now on github and a docker image on Docker Hub .