8
votes
What programming/technical projects have you been working on?
This is a recurring post to discuss programming or other technical projects that we've been working on. Tell us about one of your recent projects, either at work or personal projects. What's interesting about it? Are you having trouble with anything?
I've posted about this before, but it's been a while. After a summer hiatus due to an internship with an NDA, I've resumed my work on my hobby OS, duckOS.
A lot of the improvements lately have been focused on less-exciting things like stability. However, there are a couple of interesting things that I've been bouncing back and forth on lately - one of which is a ports system, which allows me to easily configure ported software for building on duckOS. I've successfully gotten GNU binutils and gcc to compile for the system, which is exciting because it means the OS could theoretically be self-hosting in the near future! The only problem is that, due to some issues I haven't completely figured out yet (probably due to incompatibilities in my libc implementation), gcc will compile object files, but ld is unable to link them properly.
Next, I've been making improvements to the UI with components like improved text rendering, a graphical file manager, and next I want to work on text input. As it turns out, working with text and fonts is a whole rabbit hole I wasn't prepared for :)
Developing duckOS has been a great learning experience thus far, and I don't plan on really ever stopping. One thing I want to focus on in the near future is cleaning up and documenting more of the codebase (especially in the kernel), since some of it is nearing as much as 5 years old at this point. The other issue is that I've never been too happy with how "clean" my code is - C++ is kind of a messy language IMO, especially when using things like inheritance and reference counting (Seeing
std::shared_ptr<T>
, macros, and templates all over the place isn't pretty). I fell in love with using Swift and Obj-C over the summer - if I end up designing a language (which is something I do want to try at some point), it would definitely pull some inspiration from there.If anyone's interested in trying it out, a version that runs under v86.js (an x86 emulator written with WASM) can be found linked in the README. However, the version there is a few weeks out of date and is extremely slow, as you could probably imagine. However, it's not that hard to compile yourself - INSTRUCTIONS.MD should have everything you need.
This is kind of a silly math problem. Making a mechanical drawing of a piano keyboard is harder than it looks because the dimensions look like they divide evenly, but they don't, quite. (There are 12 notes per octave and 7 white notes.) Here's an explanation someone wrote and a sketch I made in a CAD program.
Anyway, I proved to myself that if I try to 3D print it, the black keys could be all the same, but each white key in an octave has to be a little different.