Kobo Deluxe in the Browser
I spent many hours in college playing what I consider to be one of the best 2d arcade shooters out there: Kobo Deluxe, by David Olofson. As an experiment, I asked Claude Opus to port it to WASM so I could play it in my browser.
The game was written in C/C++ against SDL 1.2, so getting it onto the web meant compiling it to WebAssembly with Emscripten. The game's own code is unchanged. It runs on sdl12-compat, which implements the SDL 1.2 API on top of SDL2, and SDL2 handles graphics, sound and input in the browser.
A few notes:
Continue reading →Using Perl on the Command Line
Foreword
I wrote this article circa 2006 on a personal website that is now defunct. I still use Perl on the command line frequently, so despite the fact that Perl (5) is passé these days, I think this content is worthwhile enough to republish.
Abstract
Perl has become a very popular scripting and text-processing language, yet relatively few programmers and command-line geeks are aware of the usefulness of Perl from within an interactive, command-line interface. In this tutorial, I introduce several powerful command-line switches, including -e, -n, -p, -l, -a, and -F. I also demonstrate BEGIN{} and END{} blocks. I illustrate all new concepts with a variety of examples.
Resources for Learning Clojure
I'm suddenly finding myself in a situation where I need to help a lot of people get a crash-course in Clojure in preparation for a project we'll be doing this semester. Rather than prepare teaching materials myself, fun though that would be, I'll lean on the excellent resources already available. This post contains my current recommendations for how to learn Clojure.
Note: I'm assuming a prerequisite of some programming experience. I'm not sure how much of a hard prerequisite that is. If you have a sense of that, I'd be interested to hear what you think.
Install Clojure
Continue reading →Advanced tips for the bash command-line
I just published a screencast on advanced command-line tips from a short talk I gave last year. I try to keep my screencasts brisk to avoid wasting anybody's time, but I also understand some would prefer to have the content in a more skimmable format; hence this post.
Note that this is more an info-dump than a tutorial, so if any of these topics are unfamiliar, I suggest watching how I use them in the video.
My advanced bash/CLI tips:
Continue reading →New Job! Professor of the Practice @ UNC-CS
I'm starting a new job this month (August, 2018). I'm the new Professor of the Practice in the Computer Science Department of the University of North Carolina at Chapel Hill. Being a professor has been a dream of mine for years, and I'm super excited to get started! Here's a little bit about the job and my transition to it.
Most of the kinds of professors you see quoted in newspapers are research professors. These people might teach classes, but typically their passion is their research. Some have labs full of "research assistant" grad students and even post-doctoral researchers ("postdocs") and might co-author dozens of academic papers a year. On the other end of the spectrum, some research professors might not employ any students or work with anybody else. Most fall somewhere in between and are either tenure-track or tenured.
I decided when I was first looking for a professorship that this wasn't the kind of professor I wanted to be. The day-to-day work mostly consists of looking for and applying for grants to support the research, supervising the work done by their grad students and postdocs, and reading and writing papers. These kinds of activities don't generally excite me, and I generally don't want to be in a "publish or perish" situation, working long hours at the expense of my family to publish enough papers to achieve tenure.
Continue reading →