This page is a collection of various experiments I've done throughout the years. Most of what you'll find here are weekend projects, but a few are a bit more extensive.
Although not as much nowadays, I used to be an active member at Stack Overflow. You can check out my profile to the right.
This is an incomplete list of things I've done throughout the years. It's not representative of my professional, but does convey a good picture of my interests. The major themes are graphics programming, network programming and programming languages.
A DNS server written in Rust, with a built-in web server for managing zones. Written as an exploration of the language as well as the details of the protocol. Quite an extensive project, which supports most of the features expected in a DNS server except for spoofing mitigation. Neither heurestic mitigation nor DNSSEC is currently supported, although I'll likely resume development at some point.
This is an experiment with generating java bytecode. After playing around with the asm library for a bit and gaining a better understanding of java bytecode, I decided to implement a simple program which parses mathematical expressions and converts them into executable java classes.
A simple experiment and learning project, written in C++. Uses the phong reflection model to shade objects, with full support for reflections. The source code only depends on libgd2. I used this project to render the picture of earth at the top of this page.
This is to some extent just a C++ port of the Amiga Juggler reimplementation, which kinda shows from the structure of the code, but there's a few enhancements of my own. For instance, support for multiple lights. Further work on this project will probably attempt to introduce an acceleration data structure, and some way of loading scenes from disk.
Toy programming language. It's currently implemented in Java, but I dream of bootstrapping it eventually. Current all execution is interpreted. The language as such is characterized by its static type system, which guarantees type safety. It's a cross between the functional and imperative paradigms. The current lack of support for generic programming combined with the strict type safety limits its usability, although I'm hoping to resolve that eventually.
Plugin for the bukkit minecraft server, that provides most of the features needed to run an economy/survival server. It's a collaboration with a number of other developers, for the Tregmine minecraft server.
Experiment with software rasterization. Written mostly as a learning project, and horrendously unoptimized. When I started out with this, I had no experience whatsoever in 3d programming, and thus I spent some time documenting my research as a diary, which is available in the repository. (I did have a solid understanding of basic linear algebra, though.)
The major feature I never got around to would be texture mapping, which will probably be added at some point. Still, it'd be hard to argue that this project is suited for any real life applications, even after that's done.
A java implementation of the SASS language, which is a superset of CSS. Based on a JavaCC grammar. See link for a more complete description.
A java implementation of an irc server. It was designed in a way that would make it easy to add other protocols, with a core that simply manages the server state. The only other protocol that I ever tried adding was minecraft support, by embedding it in bukkit, and wrapping the mc-related state in a protocol handler. It worked pretty well, and turned out really cool.
fatcat has a completely asynchronous network thread using java.nio. There's currently no support for linking other servers, and also no services. I have some wild ideas about expanding fatcat with distributed linking support, and using something like vector clocks to synchronize state, but I'm not sure when I'll get around to that.
A visualizer framework for spotify, using the official libspotify. Includes some simple FFT-based visualizers, that doesn't work nearly as well as I'd hoped. This is entirely due to my severely lacking understanding of signal processing. The addition of some type of online filter would probably result in a lot more recognizable beats. It does look pretty nice, though. Uses the windows DirectDraw API.
Horrendously ugly tetris clone. WinApi and DirectDraw. My first and final attempt at doing game graphics.
A java program that evaluates arbitrary mathematical expressions. Also includes some primitive plotting capabilities. I wrote this before I had spent any time whatsoever researching parsing. If I redid it today, I'd probably use ANTLR or a recursive descent parser. This project used a completely ad-hoc approach, which turned out surprisingly robust. Features a really crappy math shell.
Simple program to crop images quickly. Written using WinApi and GDI+. I wrote this to optimize my photo editing workflow, since it felt a bit too painful to launch a full image editor every time I simply wanted to crop an image. This is my attempt to solve that specific problem in a really lightweight way.
Solutions for the hundred first Project Euler or so. Some problems have several solutions, and not all of them might work. A few problems (probably less than five) have partial solutions that doesn't give the correct answer.
This repository contains solutions in several different languages. Most of them are written in python, since I started doing Project Euler solutions as a way of learning that language. However, there are some solutions I've done in C as a way of practicing low-level optimization, and there's a few in Haskell which I also did for learning purposes. Warning: My Haskell is pretty awful.
A small unix program that constructs an image mosaic from a source image and a collection of smaller images (mosaic bricks). There's a few major issues with this program:
An implementation of the seam carving algorithm I did back when it was first released. I was absolutely fascinated by the paper, and implemented it in both PHP and Java. This repository contains only the java-version, which has some interesting quirks. For instance, I'm calculating the energy of the image using a literal interpretation of the method in the paper rather than using a simple sobel transform. This involves interpolating the pixels as a cubic equation and calculating the partial derivatives. As far as I can tell, this has no real advantages over the sobel approach, but it's a rather beuatiful over-complication.
Smaller projects and experiments I've done, of somewhat varying quality.
You can get in contact with me using my gmail. My username is emil.hernvall.