October 21st, 2009

beartato phd

(no subject)

Am I weird for having a weird feeling in my gut about all these (I confess, often quite nice) haskell combinator libraries calling themselves "domain-specific embedded languages", and ns3 calling itself "a network simulator", in a way that makes me expect that it is a nice standalone application, which it is basically not? If you write a bunch of code in an existing language and it requires a bunch more code in that same language to do something real, which compiles and links against that first bit of code, then that sure walks and quacks like a library to my understanding. And there's nothing wrong with that! I'm both mystified at why people do call them by something other than the plain ordinary word that seems to, according to its well-understood meaning, accurately describe what they are, and also slightly why they want to.

Does it not seem appropriate to get a paper or two out of a "mere" (but well-designed and interesting and useful) library you wrote? Do we think only of big fancy soi-disant "languages" and "systems" as being novel and not-just-the-status-quo enough to deserve recognition or something, that people feel forced to stretch the unsexy truth?

The thing that pushed me over the edge was the ns3 tutorial, where it goes:

We typically run scripts under the control of Waf. This allows the build system to ensure that the shared library paths are set correctly and that the libraries are available at run time. To run a program, simply use the --run option in Waf. Let's run the ns-3 equivalent of the ubiquitous hello world program by typing the following:
./waf --run hello-simulator
Waf first checks to make sure that the program is built correctly and executes a build if required. Waf then executes the program, which produces the following output.
Hello Simulator
Congratulations. You are now an ns-3 user. [emphasis original]

And the source code of this thing is
#include "ns3/core-module.h"


using namespace ns3;

main (int argc, char *argv[])
  NS_LOG_UNCOND ("Hello Simulator");

And I'm like, yes, okay, this is Hello World, it's not going to be complicated, but come on, you just wrote Hello World in C with a fancy-named macro interposed between you and printf. The "ns3 network simulator" doesn't stop me from including stdio.h and actually calling printf myself, (I know because I just tried) no more than all these Haskell combinator libraries typically prevent me from using arbitrary Haskell code, thus making it much harder to reason about them than it would be if I actually had a well-defined DSL whose operational semantics I knew the clear limits of.

Then the tutorial goes on to walk you through "writing an ns3 script" by which they mean "writing a C++ program that calls the ns3 library". I just feel creeped out by this, since it seems like an overt way of Sapir-Whorfishly changing what I'm doing to something that more prominently features their brand, you know? I feel marketed-to. It's not just brand X breakfast cereal, it's the brand X breakfast experience. It's not just a C++ program that happens to call ns3 library functions, it's an ns3 script.
beartato phd

(no subject)

Lately I've been more conscientious about actually using tags files more regularly, and getting my emacs bindings set up for it in a way that I like, and it is another one of those "why have I not been doing this all my life" sort of things. I suppose I really haven't had to read large bodies of existing C/C++ in a while. Or, you know, been using eclipse for forever and a day like all the cool java kids, and been acclimated to what I'm sure are utterly standard modern IDE features.
beartato phd

(no subject)

Lev Grossman's "The Magicians" is way too much fun for its own good. I basically read it in two sessions, between roughly 7pm and midnight yesterday and 9pm-midnight today. Picked up the recommendation from boingboing. To quickly summarize: It's post-Harry-Potter, post-Narnia gritty magical-boarding-school fantasy that is ultimately about the meaning of friendship and love and books and the corrupting effects of power and gossiping cliques of catty hipsters getting drunk a lot and fucking each other every which way they can manage until everyone feels suitably betrayed, and how grad school doesn't even begin to prepare you for the vast existentialist conundrum that is the rest of your life. I felt the ending was wonky, in ways that obviously cannot be discussed without spoilers, but whatever. It's a good page-turner, and shit frequently goes down in dramatic fashion, and in it there are several hilarious nerd-cultural in-jokes, and a lot of good swears in the places where they really count. (9/10)