The Joy of Small Projects
When was the last time you completed a project? When was the last time you started a project? Have you every felt that you were trapped working on something that you don’t enjoy anymore? Size is something that I’m sure most developers with the drive to do side projects have felt. Recently I have been completing more projects with more success than ever before. This is my new process.
Build an OpenSCAD WASM Configurator
I like building 3D models with OpenSCAD. As a software developer, I find it the most intuitive and scalable way to build models. Sites like Thingiverse looked like the solution but I was looking for something that I could put on my website, that would have zero cost, and where I could fully customize the user experience. So, I got to work and after a few months of hard effort I created this: DSchroer/openscad-wasm. A WebAssembly port of OpenSCAD that can be run in any modern browser. With this port, anyone can package and share OpenSCAD projects on the internet.
In this post I will be going through an example of how to build a configurator where anyone can customize the 3D models that you design.
Modelling A Head Tube Lug In OpenSCAD
Recently I have been working on a project to build 3D printable lugs for a custom bike frame. I am using OpenSCAD to build this because I find the software to align very well to how I enjoy building things. As a software developer it is quite intuitive for building customizable 3D objects.
In this post I want to walk through my process of building the lower head tube lug using OpenSCAD. I do assume that you have an understanding of OpenSCAD, this is more of a guide than a beginner tutorial.
Compiler Weekly: LLVM to AVR
Now that we have a working LLVM backend, I wanted to make one small step forward this week. Right now, the LLVM backend setup targets x86_64 based machines. That means the program that it creates will run on my laptop. But what if I want to run my program on something different?
I have a lot of AVR microcontrollers. They are small 8-bit chips that are good for controlling small circuits. If you have ever used an Arduino the AVR chip is the main chip inside it. My goal for this week is to have my compiler produce a hex file that I can upload and run directly on one of these chips. More specifically I want to run it on an ATmega328P.
Compiler Weekly: LLVM Backend
All of my compiler projects so far have been focusing on the frontend. I spent a lot of time focusing on parsing languages but the runtime is usually very small. Now it’s time to take a closer look at the backend and build up some new tools.
I chose to work with LLVM because it has some great properties. I wanted a tool that could create native binaries. In my opinion, there is a huge advantage of having native code over using an interpreter or vm. I also know that LLVM has a well supported and known API. It’s a great way to get started building compilers that you know will work because other people have done it.
This week, my project will use LLVM to produce
hello world binaries. There wont be much flexibility but it will show the basics needed to setup your own LLVM compiler.