What strikes me is how well these C patterns are abstracted in safe Rust (aside from computed goto). For example, if I use equal-length instructions like in the Lua VM, then my instruction pointer becomes an `&[Instruction]` and I can fully(!) decode with `match chunk_rest.split_off_first()? {`.

I'm starting a series of blog posts, in which I write a #bytecode #compiler and a #virtualMachine for arithmetic in #Haskell. We explore the following topics in the series:

- Parsing arithmetic expressions to ASTs.
- Compiling ASTs to bytecode.
- Interpreting ASTs.
- Efficiently executing bytecode in a VM.
- Disassembling bytecode and decompiling opcodes for debugging and testing.
- Unit testing and property-based testing for our compiler and VM.
- Benchmarking our code to see how the different passes perform.
- All the while keeping an eye on performance.

The first post of the series that focuses on writing the #parser is now out: https://abhinavsarkar.net/posts/arithmetic-bytecode-vm-parser/

#programming #Blogging #compilers #programmingLanguages

A Bytecode VM for Arithmetic: The Parser

We write a bytecode VM for arithmetic in Haskell.

abhinavsarkar.net
A note on my #UltimaVM for #RISC_OS users: when coding on Ultima, we don't care at all about RO multistasking, we just code like on Windows, Linux or macOS. If we want to run an Ultima App in the desktop we just use the `--mt` option in the command line, everything else is handled by Ultima itself:👇
#bytecode #virtualMachine #programming #coding

#Computerclub2

#CC2tv #403 Vom `print()` zum #Bit

So spricht dein #Mikrocontroller
Wir zeigen, wie ein einziger #MicroPython-Befehl – `print("Hallo Welt")` – Schicht für Schicht bis zum elektrischen Signal am TX-Pin zerlegt wird. Wir starten in der Hochsprache, werfen einen Blick auf den erzeugten #Bytecode und zeigen, wie die MicroPython-VM ihn in C-Routinen übersetzt. Von dort gelangt der String über den #UART-Treiber als #ARM- #Maschinencode auf den RP2040-Prozessor

https://cc2.tv/daten/20250705100000.php

Moin! Wieder gibt es eine neue Folge #CC2tv – So spricht dein Mikrocontroller 🧠️
https://youtu.be/gFAGxDAAyNU

Wir zeigen, wie ein einziger #MicroPython-Befehl – `print("Hallo Welt")` – Schicht für Schicht bis zum elektrischen Signal am TX-Pin zerlegt wird.

Wir starten in der Hochsprache, werfen einen Blick auf den erzeugten #Bytecode und zeigen, wie die MicroPython-VM ihn in C-Routinen übersetzt. Von dort gelangt der String über den UART-Treiber als ARM-Maschinencode auf den #RP2040-Prozessor und schließlich als 3,3-Volt-Bits aufs Kabel. #cc2

Мечтают ли андроиды о Robolectric? Разбираем фреймворк по косточкам

Я уверен, вы слышали про Robolectric, но использовали ли хоть раз для UI‑тестирования или screenshot-тестирования? Да, у библиотеки неоднозначная репутация в Android-комьюнити. Возможно, вы будете в восторге, когда её устройство перестанет быть для вас загадкой. В статье разберу: устройство Robolectric, возможности фреймворка, задачи, которые вы сможете решать, и нюансы совместимости, важные для вашего проекта . Я копнул глубже, упорядочил все свои знания о библиотеке и изложил их под катом.

https://habr.com/ru/companies/alfa/articles/910226/

#robolectric #android #classloader #bytecode #юниттесты #uiтестирование #фреймворки_тестирования

Мечтают ли андроиды о Robolectric? Разбираем фреймворк по косточкам

Иногда наступают моменты в карьере, когда ты хочешь сделать следующий шаг в своём развитии, но можешь не понимать наверняка, что это за следующий шаг и какие возможности...

Хабр
🎉 #Mill as a Direct Style #Build Tool: because what the world really needed was yet another build #tool to complicate life even further! 🚜 Dive into a riveting exploration of jargon-laden buzzwords like "bytecode callgraph analysis" and "monorepo," all designed to make your eyes glaze over faster than you can compile Java. 🔥
https://mill-build.org/blog/12-direct-style-build-tool.html #Bytecode #Monorepo #Jargon #TechBuzz #HackerNews #ngated
Mill as a Direct Style Build Tool :: The Mill Build Tool

@LunaFreyja Thank goodness #Maven uses #XML and not a cute #DSL based on a dynamic language that depends on ASM and #bytecode tricks. Why? Because I can freely upgrade to #JDK24 (or even #JDK25 EA) and Maven keeps chugging along, and no multiple weeks of waiting for a new compatible release ... (looks over at #Gradle and #Kotlin) #Java #OpenJDK

Как работает Robolectric и почему это важно знать

Представьте, что можно тестировать android-код без эмулятора, запуская тесты за секунды вместо минут. Именно это обещает Robolectric — библиотека, которую либо любят, либо ненавидят, но точно не игнорируют. За кажущейся простотой «просто добавь зависимость» скрывается удивительная магия модификации байткода, о которой не рассказывают в статьях. Предлагаю разобраться, как на самом деле работает магия Robolectric и почему эти знания пригодятся любому android-разработчику.

https://habr.com/ru/companies/tbank/articles/902180/

#android #robolectric #bytecode #kotlin #classloader

Как работает Robolectric и почему это важно знать

Представьте, что можно тестировать android-код без эмулятора, запуская тесты за секунды вместо минут. Именно это обещает Robolectric — библиотека, которую либо любят, либо ненавидят, но точно не...

Хабр
Ah, the thrilling saga of RakuAST! 🤯 A gripping tale where, shockingly, the compiler frontend gets a makeover...again! Because clearly, parsing code is where the real #magic happens. 🎩✨ Can’t wait for the sequel: “Backend Shenanigans – #Bytecode Strikes Back!” 🙄
https://niner.name/blog/rakuast_grant_report/index.html #RakuAST #CompilerFrontend #CodeParsing #HackerNews #ngated
RakuAST Grant Report