My Blog| blog.evacchi.dev
Update (Jun 20, 2025). This post was originally published at JVM Advent. And here we are again. For the third time in a row, we are back to the Java Advent, eager to discover what’s new with WebAssembly from a Java developer perspective. Incidentally, since, as you know, I have a favorite topic (after programming languages and compilers, of course), it is also the third time in a row I have worked at a different company.| Posts on Middle of Nowhere
Update (Jun 20, 2025). This post was originally published at JVM Advent. Welcome back, my dear Java Geek! Last year we compared WebAssembly and discussed in what ways it differs from the JVM. A lot of things have happened in the meantime. If you want to dive deeper into that kind of detail, I warmly suggest reading this beautiful blog series by Chris Dickinson. For this Java Advent, I wanted to get back to the topic from a different angle. Last year we saw that, because the JVM and WebAsse...| Posts on Middle of Nowhere
Update (Aug 3, 2023). This post was originally published at JVM Advent. If you want to read a more comprehensive guide to language VMs, I strongly recommend Chris Dickinson's series and especially part 2. If you want to see a recorded, more recent version of this content, check out my JNation talk. When many Java developers hear the word WebAssembly, the first thing they think is “browser technology”. The second thing: “it’s the JVM all over again”. After all, for a Java developer, ...| Posts on Middle of Nowhere
Lately there have been quite a few announcements around WebAssembly, such as the Docker+Wasm Technical Preview. You may have started to wonder whether this technology is something you should care about. In this blog post, we will lightheartedly explore the history of Wasm. I will not make any claim about correctness: I may have made mistakes; in that case, feel free to contact me! I will try to motivate how we came to defining the WebAssembly standard and VM, and how they are all about provid...| Posts on Middle of Nowhere
Traditionally Java libraries come with everything but the kitchen sink. In the past, people have given a lot of crap to the JavaScript ecosystem, but if there is something I envy, is how tiny some libraries are. People are still joking about left-pad to this day; in reality, the JavaScript ecosystem has come a long way ever since, and I believe we have all something to learn. Long story short, I was looking for a Java library to parse WebAssembly binaries, and what I found was either a full-b...| Posts on Middle of Nowhere
Welcome to the next installment of the “Writing Envoy WASM Filters The Hardest Way” franchise. In this episode, our silly hero has decided to put together the lessons learned in the previousepisodes and define an Envoy WASM filter using only LLVM IR, a magnetized needle, and a steady hand. Now that we have figured out how to write a WASM filter from scratch, the jump to LLVM IR is far smaller. We can write a source file llvm.ll that maps onto the correct WASM ABI pretty easily.| Posts on Middle of Nowhere
If you hadn’t noticed, I have started looking into WebAssembly and WASI. Last time I was looking into the LLVM toolchain. In the last few days, I have been reading about Envoy and its WASM filters. While there are a number of tutorials on how to use the Proxy WASM SDK using higher-level languages such as C++, Go, Rust, Zing and AssemblyScript, I could not find any resource on how to write a WASM extension from scratch using the canonical text format WAT and the lower-level tool wat2wasm.| Posts on Middle of Nowhere
I have been experimenting a little bit with LLVM and its WASM backend. Unfortunately, although it is easy to find examples on how to compile a “hello world” using C, resources are a bit scattered when it comes to doing something a little more specific like compiling LLVM IR into WASM with WASI support. I found Surma’s article on how to compile C into WASM from scratch to be a very valuable resource, and Frank Denis’s article on Compiling C to WebAssembly using clang/LLVM and WASI was ...| Posts on Middle of Nowhere
A few days ago I learned about pz. A Python library that exposes a few simple one-letter shorthands for line-based editing of pipes at the command-line. I immediately thought there could be potential. This is simple and clever. The default `s` variable holds the contents of stdin. @jbangdev idea? 🤔https://t.co/pBBcIfEIJb — Edoardo Vacchi (@evacchi) February 12, 2022 I liked the idea so I pestered Max Andersen: what if JBang supported that kind of shorthand syntax? It turned out Max was a...| Posts on Middle of Nowhere
This blog post was originally published at the Java Advent Calendar 2021, so pardon all the festive references. San Biagio was just a few days ago, but if that really bothers you, you can mentally replace all references to Panettone with Tortelli alla crema e chiacchiere di Carnevale. The festive season is that period of the year when they tempt you to indulge in those dear sweet, sugary treats. Personally, as an Italian, I do love me some panettone. And as much as I enjoy the bitter taste of...| Posts on Middle of Nowhere
Hello! Welcome back to “Learn You An Actor (System) For Great Good!”. If you haven’t read the first part, jump there to learn how to write a minimalistic actor runtime using Java 17. As promised, in this second part I am showing how to write a tiny chat client/server using the runtime we wrote. Then, we will run it using JBang! Next time, we will learn how to create a typed version of the same actor runtime and revisit the examples!| Posts on Middle of Nowhere
In 2012, Viktor Klang published a tiny Java snippet that implemented a tiny actor system in about about 20 lines of code; a few years later, a revised version showed how to do the same in Scala. I think untyped actors in the style of Akka Classic have always felt clunky in Java; Java used to lack a way to express pattern matching concisely. However, a few days ago I realized that Java 17 provides enough syntactic sugar to write shorter actors:| Posts on Middle of Nowhere
My favorite topic of discussion last year was moving computations to compile-time. In fact, I went to a fewconferences explaining how moving processing out of your run-time and into build-time, is a conceptually simple but extremely effective way to make your applications lighter. This was sometimes received with little enthusiasm: the idea itself is in fact far from new. Yet, it is key to a lot of the most interesting recent innovations in the Java ecosystem.| Posts on Middle of Nowhere
The question of whether a computer can think is no more interesting than the question of whether a submarine can swim. (Edsger W. Dijkstra) Motivation 🔗 Rule-based artificial intelligence (AI) is often overlooked, possibly because people think it’s only useful in heavyweight enterprise software products. However, that’s not necessarily true. Simply put, a rule engine is just a piece of software that allows you to separate domain and business-specific constraint from the main applicatio...| Posts on Middle of Nowhere
Shapeless is a Scala library for generic programming. The name “Shapeless” comes from a famous Bruce Lee quote: Don’t get set into one form, adapt it and build your own, and let it grow, be like water. Empty your mind, be formless, shapeless — like water. Now you put water in a cup, it becomes the cup; You put water into a bottle it becomes the bottle; You put it in a teapot it becomes the teapot. Now water can flow or it can crash. Be water, my friend.| Posts on Middle of Nowhere
These are the slides for a talk I gave recently. Abstract. IPython notebooks, NumPy and Pandas data frames are the go-to tools for doing data science with Python. Spark and PySpark is rapidly becoming the de facto standard for doing analysis on large volumes of data. But what about CPU-intensive tasks? What about rough numerical, but distributed computations? In the first part of this talk I give an overview of the most interesting alternatives. The second part is a brief roundup of the file ...| Posts on Middle of Nowhere
I am resurrecting my old “Wasm the Hard Way” series with a some fresh new content about a recent project I have been working on: porting the Chicory Wasm compiler to Android. If you are interested in Wasm and Java, you might have heard about Chicory, a pure-Java Wasm runtime. Ever since I started working at Dylibso, I have been contributing to the project. Extism is Dylibso’s family of open-source projects to develop and host WebAssembly (Wasm) plugins. Going forward, we believe the Chi...| blog.evacchi.dev