m (@m_bitsnbites) header
m (@m_bitsnbites) profile picture

Software/hardware developer (3D graphics, compression, audio/music, signal processing...). Creator of GLFW, BuildCache and MRISC32.

Sweden
Joined May 2011
Photo by m (@m_bitsnbites)Photo by m (@m_bitsnbites)Photo by m (@m_bitsnbites)Photo by m (@m_bitsnbites)Photo by m (@m_bitsnbites)Photo by m (@m_bitsnbites)Photo by m (@m_bitsnbites)Photo by m (@m_bitsnbites)Photo by m (@m_bitsnbites)Photo by m (@m_bitsnbites)
Happily running the MC1 #FPGA computer @ 120 MHz, after patching my broken DE0-CV board with a new oscillator via GPIO pins (off screen, wires to the right). github.com/mrisc32/mc1 #MRISC32 #CPU #VHDL #opensource
1
5
24
Created another tool: Remote V4L recording (for Linux). I needed to capture a video stream from my PS3, but the laptop that I could connect to the HDMI was too weak, so I had to stream the raw video+audio data over LAN to a more powerful computer. codeberg.org/mbitsnbites/vid…
3
252
Latest hack: A spatial domain variable block size luma dependent chroma compression algorithm bitsnbites.eu/a-spatial-doma… #image #compression
4
196
This weekend's hack: How long does it take to brute force a cryptographic key? bruteforce.bitsnbites.eu/
1
111
Why not change the Unix epoch to the big bang? The number of seconds since the big bang fits comfortably in an unsigned 64-bit integer (only 59 bits are required, so far). Caveat: All we have to do is to define the age of the universe with sub-second accuracy. 🤔
4
279
So far I like codeberg.org - Free European Git hosting, with a familiar interface. #git #codeberg #foss
165
Smile of the day: Every error message should start with "dear friend". 🙂 Courtesy of codeberg.org/kenneth_stailey…
158
One of the arguments against immediate mode UI is that it will drain your battery. I think that's bollocks! Here is my "proof of life" test to measure power draw. Preliminary result is that Dear ImGui consumes less power than YouTube. That feels like a fairbar to compare against
10
6
68
14,106
In anticipation of the C23 standard #embed, I couldn't help revisiting the age old covert-binary-data-to-source-code problem. I came up with a ludicrous speed conversion tool (2 GB/s binary data conversion rate). Light speed is too slow! Check it out! gitlab.com/mbitsnbites/lsb2s
1
1
1
8
2,027
Fun fact: Even when compiled for MRISC32 and running in my (quite slow) CPU simulator, lsb2s is *STILL* faster at generating source code than xxd -include (running natively).
3
230
BuildCache just gained support for caching Rust builds 🥳 Contribution by Firefox developer @__farre__ 🙏 Get v0.29 and speed up your Rust builds: gitlab.com/bits-n-bites/buil… #rustlang @mozilla @firefox
214
Want to run #DOOM. Need something to run it on. ✔️ Develop new CPU ISA. ✔️ Write new GCC backend. ✔️ Implement CPU and VGA gfx in FPGA. ✔️ Write a minimal OS. ✔️ Port DOOM to the new CPU & platform. ✔️ Optimize rendering code. Now I can run DOOM 🤘 @romero #MRISC32 #FPGA
22
83
8
521
41,143
wow! stop everything else now and look this amazing page about concurrency programming in C! 🙀 tontinton.com/posts/scheduli… thanks leo! 🍕
4
23
2,853
Came up with a working set of instructions for PC-relative calls and address calculations for my V16 ISA. +/-2MB range w two instructions (32 bits of code), and full 4GB range w three instructions. Also perfectly fusable. Struggling somewhat w aligned relocs in binutils/bfd.
1
3
417
The first V16 program in the world! Hand-assembled in a hex editor, disassembled with binutils, nothing to run it on, and it's a pretty meaningless program (the prologue/epilogue isn't even needed), but still 🥳 Forgot how cute 16-bit instructions look 😅 #CPU #ISA
2
28
2,034
Your operating system, your browser, your database engine, your web server, git, your JavaScript engine, your Python interpreter… all of these are likely written in C/C++. I repeatedly encourage people to learn many programming languages. I do not (at all) think that C or C++ should be used systematically. I use different programming languages. If you can, use Go, Python, JavaScript, C#, Java, Zig, etc.... they are often better choices than C. I literally just published a new book on Python programming (see Amazon). It is a great language. However, if you are proudly broadcasting your belief that safe and performant complex systems cannot be written in C or C++, you are showing your ignorance and you are signalling that you are unable to match what countless programmers have done over decades. And no, C programming is not elitist. Generations of teenagers taught themselves C. Working with C strings does not require a Ph.D.
people here talking about how C/C++ is unsafe, no good, don't learn it Your browser was written in C. Your OS was written in C. AAA games are in C. game engines are in C. "safe" languages are (or were) in C. Your art tools, written in C. Audio tools, C.
94
216
28
2,853
808,372
wow! this is really gold! 🥇 bitsnbites.eu/three-fundamen…
4
8
1,472
Trying a new ISA targeting the very low end (think AVR, Cortex M), but with a twist. Only at the concept level right now: gitlab.com/mbitsnbites/v16 Still not convinced about the 16-bit instruction encoding, but I'm fairly confident about the vector functionality.
4
1
12
1,936