Archive for August 2nd, 2006

To clarify for some respondants to Voted Off the Planet: As far as I know, the decision to remove my blog from Planet Lisp was not made collectively by readers but solely by the site’s maintainer. As is apparent from comments on the announcement, some people approved of the decision and some did not, but those comments came after it had already been done. The emailed responses I’ve gotten have been uniformly positive — thank you to those people, and to anyone who is still reading.

I was never actually notified either when my blog was added or when it was dropped. I think that’s revealing: I was not being invited into the community, I was being tested. According to one person’s standards, I failed. That in itself does not surprise me. I was not ready for such a large and demanding audience. I only started this blog a few months ago, and I am definitely still feeling my way towards a writing style.

What did surprise me was the viciousness of the criticism, some of it from people who were clearly only skimming my posts anyway. E.g., I was “hassling” Planet Lisp by announcing “UFFI bindings to a C library.” Well, 1) It was CFFI, not UFFI; 2) only half of it is bindings, the rest re-implements bits of the Perl API in Lisp and translates data between the two; and 3) I said it was just for fun.

Or was the idea of embedding Perl code in Common Lisp just too heretical? ;)

But the lesson I can take from all this is that I still have a long way to go. So bear with me, gentle readers, as this page (hopefully) evolves into an interesting and enjoyable discussion.

Comments 1 Comment »

This is just an random idea that popped into my head. Tell me if I’m crazy.

Is there enough distinction between literals in code and values generated at runtime? In other words, what should be the difference between this:

x = "Hello, World!"

and this (syntax made up):

x = new String("Hello, World!")

In general, I understand literal values in code to be immutable, or at least it’s undefined what happens if you modify them. So should two identical literals be pointers to the same block of memory? Does this C code:

char x[] = "Hello!";
char y[] = "Hello!";
if (x == y) printf("True");
else printf("False");

print True? (I tried it, and the answer is no, it doesn’t.)

This gets more confusing when you can have object literals as in JavaScript:

myFriend = {
  name : "Bob",
  age : 32,
  friends : ["Jack", "Jill", "Joe"],
  talk : function(){alert("Hi, I'm "+myFriend.name)}
};

Is myFriend mutable? As it turns out, in JavaScript, the answer is yes. For an interpreted language embedded in web pages that makes sense. But what about a compiled language — is efficiency lost when values could be compiled in but aren’t because the compiler doesn’t know the value never changes? I suppose that’s the reason for all those annoying const declarations in C++, but is that a complete solution?

So my question is this: would it be worthwhile to have specific syntax for compile-time contants? C has preprocessor constants, but they’re text-based and don’t carry type information.

Comments No Comments »