Hello Hurd: Programming in Mach RPC Calls

TLDR: github.com/ids1024/hello-hurd has a Hello World program using Mach RPC calls.

I don’t really write blog posts much, but when I do, I take the opportunity to discuss the most relevant technologies one is likely to encounter. Like GNU Hurd.

…Okay, some (very abridged) background. In the beginning, Bell Labs created heaven and earth. Bell said, “let there be light”, and there were lasers. And transistors. And in the very dawn of time, the Unix operating system was born.

Read more

Hello World in Rust for m68k with #[no_core] and compiler patches

Rust is great for some many practical purposes in modern software development. But who needs any of that? What are the oldest things we can target with standard Rustc?

Read more

Rust: safe and unsafe as theorems and axioms

UPDATE: I would probably talk about this different now that I know a bit more about how something like this would actually be formalized, but this post is an analogy more than an actual formal model, even if a variation can be formalized.

Read more

Experimenting with WebAssembly dynamic linking with clang

NOTE: Currently the standard way to compile C or C++ to WebAssembly is to use Emscripten. Additionally, my loader code here is a quick test, and not complete nor necessarily entirely correct.

Background

With LLVM 8.0.0, the WebAssembly back-end is no longer categorized as “experimental”. The LLVM linker, LLD, also supports WebAssembly. So with current releases of LLVM, Clang, and LLD, it’s possible to compile C or C++ to WebAssembly without Emscripten, at the cost of doing things more manually and losing some luxuries like… the standard library. Well, it’s not particularly convenient (without some additional tooling and libraries like Emscripten provides), but it can be done.

Read more

Cross-compiling Rust code to Minix

TLDR: Scroll down for a pretty screenshot and a GitHub link.

I’ve decided to take a look at Minix, which is an interesting microkernel OS.

Naturally after building Minix from git, the first thing I decided to try was porting Rust’s std to Minix so I could cross-compile Rust programs from Linux to run under Minix.

Read more

Canon DSLR Bluetooth Remote Protocol

This is a continuation of my earlier reverse engineering work.

This time, I’ve succeeded in duplicated all of the remote’s functionality, other than things like firmware updating.

Read more

Exploring Rust fat pointers

I’ll begin with a word of warning: relying on the particular way fat pointers are implemented is bad, and may break. How bad?

Except worse than that. What’s worse than a Velociraptor attack? Use your imagination. So beware that at any point the code here may stop compiling, segfault, and otherwise behave in weird ways, some of which involve Velociraptors.

Read more

Reverse Engineering Creative Sound Blaster E1

The Creative Sound Blaster E1 is a USB DAC and headphone amplifier. Additionally, it has a built-in microphone, and has two seperate headphone jacks, one of which can be used as a microphone input instead, if it is set as such in Creative’s software. Naturally, their proprietary program only works on Windows, so it is stuck in the default mode (both jacks serve as headphone ports). Let’s fix that.

Read more

Reverse engineering the Canon t7i's bluetooth (work in progress)

The new Canon Rebel t7i includes Bluetooth; it can connect either to the Canon Camera Connect app, or to the BR-E1 remote control.

TLDR so far, I have only gotten it to pair, either as a phone or remote. But shutter release and the other features of the BR-E1 should be easily doable, if the correct commads can be identified.

Read more

Whitaker's Words

Well, I haven’t been posting here much (or at all) have I? Well, I’ll start now. Maybe. But I am writing here now anyway. Whitaker’s Words is an interesting old command line program for analyzing the morphological form of latin words, as well as providing simple definitions. For example, here is what it outputs for the word “caesaris”:

Read more

Static Site Generators

There are essentially two ways to create a website. The most popular method is to use a CMS such as Drupal, Joomla, Wordpress, etc. This method allows for web-based WYSIWIG editors for site content, extensions, user login, comments, and various other features. It is also slower and less secure. Each time a page is loaded, the server must generate the page, often with a php script. There are methods to improve this, but nothing will be more efficient than plain, old fashioned, static html.

Read more