My heart really isn’t in things this week though. I pay too much attention to world news and what’s going on in Libya, Syria, Iraq, Gaza, Ukraine and other places has me down. I’m really tired of seeing dead children that don’t look too different from my own young daughter.

For a change, I’ve been doing something interesting and relatable for my work. My work revolves around emscripten and lately, my client has been having some interesting questions about their memory usage. In response, I’m building (and contributing to emscripten), a heap profiler. It presents a C API so that emscripten users can instrument their C / C++ code. The C API is implemented by a JavaScript library which uses a webworker to submit trace events to a collection server which I’m writing in Python with Flask. This server collects and performs analysis of the trace event data (allocations, frees, timeline events, frame start, frame end, etc).

For Dylan, I’ve been writing blog posts lately and 2 of them have been submitted here. I’m working on a write up describing some of the design and implementation behind scalaz-stream, but that’s pretty involved. I’m also writing up a document on adding function types to Dylan. Adding function types (and subsequently parametric polymorphism) is going to be a very important step forward.

I am also getting someone going with taking some of the next steps on our Unicode support.

I welcome help. I really need help. There are even some easy things to do that just involve talking to me or reading things and giving review. There are some questions that I have about function types and their semantics. It would be nice to have people to talk about that with as I’m somewhat isolated in the world. (I have no local technical community.)

Doing a gamecube homebrew game with a friend of mine and moving to a new house.

As there are no 3d formats or engines (and as we are doing it for the challenge factor) we had to come up with a 3D format and I’m learning all about matrices, We have also found that there is little difference between gears and hovercrafts. Also
writing utility functions in ASM is fun!

I don’t know if I’m liking more the making of the game itself or asking for help and talking in Dolphin community which is full of helpful and interesting people. Also the Gamecube itself is a very lovely machine :).

We use plain devkitPro (with libogc bundled in).
We started on Dreamcast first but the emulator didn’t work well (We spent most of last week trying to clean nullDC), then moved to PS2 but ps2sdk didn’t compile. Gamecube/Wii seems to be the sweet spot between a compiler/library that works and a good emulator to test things on.

As for other tooling, we use Visual Studio as editor, even though that’s just our personal preference, Dolphin as emulator (latest builds, as we sometime encounter bugs but the Dolphin devs have been super quick at fixing them!) and we have a tool my friend wrote to convert .obj files into a binary format that can be easily loaded into the Gamecube. We also use World Machine for generating the map meshes, even though they aren’t in just yet.

I think our plan is to release the source code when we get a playable prototype, so I’ll probably post it here if we manage to get that far.

Last week I implemented the basic flow control keywords (return, break, continue), and added support for floats. This week, I’ll be adding support for basic ops on imaginary numbers, and boolean operators. After that, I’ll need some time in the hammock to think about implementing objects in the runtime. (This is new territory for me).

I’m also thinking more about changing how the interpreter works. Right now I use a classic-style of evaluation whereby I lean on the host language’s call stack to help with evaluating nested [if/while/def] blocks. However, this model becomes harder to follow when a control-flow construct like break or return is used: I have to unwind these blocks until I hit the first loop or function that I’m in, and then reset the state. (Haskell definitely makes you think when you use mutable state to track things like this.) Adding exception handling to the mix may complicate it further. I’m pondering a design where statements return an enum value indicating the flow control.

Aside: my Haskell code is getting better, slowly. I never thought I’d be writing it and enjoying it so much.

Yeah! I was going to suggest that too. Translate to continuation passing form (where you have continuations for break, throw, and return). You can even push this style into a frame oriented style and write a compiler from it.

My one recommendation is that you design towards a language library for Python written in Haskell and not just an implementation of the Python compiler and runtime.

It would be awesome to parse and then use high level Haskell tooling to transform existing Python code for refactoring, static analysis, inlining native code, creating specialized interpreters or modifying semantics on the fly.

Thanks! Berp was an inspiration (it put it in the ‘possible’ category). I haven’t looked at it much; I’m preferring to stumble around a bit to learn harder/faster.

Due to time, I’m biased towards creating a full-fledged interpreter right now. I would like to model the Python language itself better (AST.hs is basically just a dumping ground of a minimal representation), I’m just triaging my free time as best I can.

I’ve been thinking of doing a series of blog posts on this, especially as I’m relatively new to Haskell. Glad to see there is some interest there!

The “Recent commits” and “Written words” sections seem unnecessary and definitely shouldn’t be so far up the page. It’s the “Contribute” and “Author” sections which are most important. There should also be a link to a sample from the book.

$work: Packaging up our deployment scripts for our IT department (well, the one guy in our IT department who will be doing deploys). They are disinterested in learning to use them the way the dev team does, so it’s on me to make it IT-user friendly. Practically, that means making use of librarian-ansible and some shell scripts; but getting there is a lot of tedious work.

!$work: I’m spending most of this week cleaning and organizing my home office, I’ve slowly acquired so much crap that my once seemingly huge office is now a tiny little corner. It’s also my birthday this week (friday), so I’m going to be making some seafood and eating cake.

I have been working on a Tower Defence game for iOS using SpriteKit. I started this game using web tech but I decided to go native and get used to Obj-C along the way. A tower defence game has been on my bucket list for a while :) Now that I have graduated I finally have the time.

I got the majority of the features implemented and I open sourced everything today.

At work, all my “free” time (e.g. time not spent on critical support issues) is going towards the Elasticsearch book. Deadline for content in the physical print copy is September 1st…lots of writing to do!

Tangentially related: I never want to write/co-author a book ever again.

Outside of work: building a humidor (curly maple and purpleheart carcass, spanish cedar interior), building a TV console (quarter-sawn white oak, all mortise/tenon joinery) and fiddling with Turbine some more. Just put Turbine on Rust-CI so it’ll be easier to track rust nightlies.

This week will work on my secret game TCFODS. I am thinking that hopefully by the end of the week it will look good enough to start blogging about it and showing screen shots. I want to blog about its development.

Also, I just made (l like 5 minutes ago) a slightly nicer logo for Fire★

As an open-source side project, outside of work, I contribute to the Ruby lmdb gem. This weekend, I pushed out a new release with fixes for some concurrency problems introduced by the ruby wrappers around the LMDB C library. Short story: it was all about managing the dance among the ruby VM lock, the LMDB write mutex, and interrupts, and making this work in ruby 1.9 as well as 2.0.

If you need a key-value store, take a look at LMDB, it has some nice concurrency properties (concurrent reads and writes, transactions, snapshots/cursors) and impressive benchmarks.

i’ve been juggling some consulting, and slowly getting my numerical haskell project ready for alpha. The first layer (and the bulk of the alpha) is a very very awesome array library. (though i’m still fine tuning a lot of the api). One really cool thing i’ve realized is that a very well designed array library looks kinda like a very very optimized database library specialized to a read heavy workload.

Also, something as unsexy as a RSS cleaner, weeding out semi-duplicated items across a set of RSS feeds from different sources (e.g. news articles from several news agencies regarding the same subject)

Work continues along, piece by piece this test framework comes together and I feel a little more like I get lisp. Except when I try to write macros, that’s the next barrier.

Thinking about some code-as art stuff. Like the idea of making mosaics, but so far haven’t found a sweet spot for image processing in clojure. Quil is cool, but sometimes doesn’t let me get into the guts of images, haven’t played around enough yet to find a suitable level to manipulate images at.

I am playing with the idea of using constructs related to functional programming at the C99 preprocessor and C++ templates level, for the sake of generating useful metaprogramming facilities. Trying to make a library out of this idea for some time now, source at https://github.com/irrequietus/clause. Nothing too important, just an innocent hobby so that perhaps I can use some higher abstractions when I have to deal with C++.

Just continuing to work on my PureScript book, getting the landing page up, and fixing any issues before trying to put out the first seven chapters this week. Any feedback would be greatly appreciated :)