A different approach to terminal user interfaces

Intro Bubbletea is a framework with a philosophy based on The Elm Architecture: Making it simple, it breaks into three parts: Model: the state of your application View: a way to turn your state into something to display Update: a way to update your state based on messages The framework’s runtime manages everything else: from messages orchestration to low-level rendering details. Example Let’s say you want to create the classic to-do list: ...

May 3, 2024 · Andrea Manzini

SEGFAULT: Debugging a crashing application

🙀 Something breaks If you use linux running some applications you could have seen sometimes a similar error message: [1] 24975 segmentation fault (core dumped) what’s meaning and how it can be useful ? Let’s dig it out. 🧪 Lab Setup To make a proper case study, we need a crashing program. Of course they are very rare nowadays 😁 so we just create a new one ourself, showing off our worst C coding bad skills and practices. ...

April 5, 2024 · Andrea Manzini

Osday 2024 recap

Intro: [SYN] Last 7-8 March 2024 I was at Open Source Day 2024: a free conference organized by Schrodinger-Hat Open Source Community. Two days of talks, meeting old and new friends, networking and fun in a beautiful city. Since the event was split into two tracks, I had to carefully choose which one to attend ; if you are interested all the sessions was recorded and live streamed. Day Stream Recording links 1 Alpha Track Beta Track 2 Alpha Track Beta Track Speaking of open source events, each talk proposal is simply an issue on a GitHub repository, and the selection was done by picking the ones with most “thumbs up” vote from the community. ...

March 11, 2024 · Andrea Manzini

Playing with Rust on ARM architecture

An old find I found an old cubieboard3 (cubietruck) collecting dust in a drawer, so I took the chance to try out Rust cross compilation and collect here some notes about the process. Here’s the baby: Give it a penguin First of all, I installed an ARM linux distro on a MicroSD card and started the device: [user@arm ~]$ cat /proc/cpuinfo processor : 0 model name : ARMv7 Processor rev 4 (v7l) BogoMIPS : 50.52 Features : half thumb fastmult vfp edsp thumbee neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm CPU implementer : 0x41 CPU architecture: 7 CPU variant : 0x0 CPU part : 0xc07 CPU revision : 4 processor : 1 model name : ARMv7 Processor rev 4 (v7l) BogoMIPS : 50.52 Features : half thumb fastmult vfp edsp thumbee neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm CPU implementer : 0x41 CPU architecture: 7 CPU variant : 0x0 CPU part : 0xc07 CPU revision : 4 Hardware : Allwinner sun7i (A20) Family Revision : 0000 So our device is ARM model v7l ; this means is a 32bit CPU, if you are curious there’s also a reference manual around. Now we will work from a development machine. ...

March 1, 2024 · Andrea Manzini