What this Blog is about

When I first started this blog three or so years ago, I called it “Emma’s Research and Television Blog.” The idea was that I would write about my main professional interests and about life, obliquely, in the form of television critiques. You see, I love T.V. It’s how I unwind, turn my brain off, and escape. I’m not unusual, and I was hoping that peppering my research posts with some pop-culture commentary would help increase readership. I had a silly justification for both Research and Television, which you can read here, but more important was my justification for blogging, which I’ll reproduce here:

Before the internet, academics and intellectuals shared their musings and worked out problems via letter writing. Read any math “paper” before 1920 and you will notice the casual tone and seeming lack of formality in the notation. These letters were not public, but they were not exactly private either. I see today’s blogs as an extension of that letter-writing tradition.

Now, not everyone will agree with me. For some, blogging is more formal – it functions as a compendium of advice and pithy explanation, or it is an avenue to push work that may not have a home elsewhere. For others, it is more informal. This blog is somewhere between open letters to no one and what might otherwise end up lost in a research notebook or in casual conversation in front of a whiteboard.

To make blogging truly worth it, it helps to have comments. I’ve noticed that some graduate students turn off comments in their blogs and prefer to hold the conversation over email. I welcome comments over email, but would prefer if they happened in the open, where others can participate, if they wish.

So, please enjoy, and be in touch.


[Read More]

Ocaml Library Circular Dependencies

Once again I’ve allowed the list of things I want to blog about to pile up, have been focusing writing energies elsewhere, and now haven’t blogged in well over six months. C’est la vie!

What I want to post here is an issue I ran across in August, when I was attempting to refactor some OCaml code. Javier had asked me to split out an embaressingly long module into smaller ones and I know I had a reason for not doing so, but I couldn’t remember it. This post is a summary of me re-discovering why I hadn’t done it originally and how part of the rationale was based on a flawed understanding of oasis.

[Read More]

Calling External Programs from OCaml with Core

I have a program I’d like to run with node. The program is typically run like so:

node $PROGRAM input_filename.js

and it prints its output to stdout. Now, this program is not written to handle streaming input:

node $PROGRAM < input_filename.js

So we can see that one of the main challenges is that the node program expects a file name. We could alter the Javascript program to take a stream as input, so that the second version works. However, I’m going to focus on implementing a function that will deal with $PROGRAM as is. So, for starters, I’d like to be able to programmatically call this from Ocaml using a function having the signature:

val exec_program : (prog : string) -> string

[Read More]

Thoughts on Church Encodings

I was recently reviewing Church encodings, for no particular reason other than to refresh my memory. It’s been a while since I first learned about them and I was pleased that they seemed so much easier to understand this time around! The exercise I was reviewing got me thinking about an idiom I’d learned and used often in Lisp dialects.

[Read More]