Showing posts with label computers. Show all posts
Showing posts with label computers. Show all posts

Tuesday, November 4, 2014

Stumbling Blocks, One-character Wide

Lisp, the programming language, is one of the oldest still in use. It has many variants, or "dialects", as the programming language people like to call them: Common Lisp, Elisp (specifically for the Emacs text editor), Scheme, and Clojure are popular ones. Because of macros, because of the (relatively) straightforward syntax—throw parentheses around everything—and because of sheet hype, the people who love Lisp love it almost fanatically.

I'm trying to be one of those people. I threw in with Common Lisp because of Peter Siebel's excellent book, Practical Common Lisp; I can't say it hasn't been without some bumps.

Case in point: what is 'a'? Encodings and character sets aside, what is it, really? The intuitive answer is, "it's a letter", or, more computery-sounding, "it's a character". With lisp, it isn't always so clear, however: it could be a character, yes, or it could be a string of length: 1. Lisp has both characters and strings, rare in my experience: either you have strings as a fundamental data type, or you have characters and fashion strings as an array or vector of characters. But having both: that's something I'll have to get used to. (EDIT: Nope, I'm wrong. And this entire post is an example of how far I have to go in understanding Common Lisp.)

Likewise, numbers can be confusing. Perl has a "DWIM" ("Do What I Mean") ethos behind it, and is usually pretty good at guessing what you mean, at the cost of some runtime cycles. One place where it's so good at doing what I mean, it tripped me up in my initial attempts to learn Lisp. If the perl interpreter sees something that looks like a number, it treats it like a number, espcecially if you're trying to do numeric things with it like sorting or arithmetic.

Lisp, or at least Common Lisp, doesn't do that. It sees a "7" somewhere, and it might be a number. Or it might be a character.

I can tell this is something that's going to bite me again before I gain proficiency.

cheers,
Adam

Wednesday, October 22, 2014

More like a blog

My other blog, Verbal Component, is geared toward gaming only, but I find that too much of my life is geared toward other things to limit my output to that mode. So I created this blog, which will cover all of my other interests: movies, music, martial arts, politics, computers, politics, ongoing self-education, current events, and a host of other things that strike my fancy.

I still intend to update Verbal Component with game-related stuff, but when I do, I'll link to it from here as well. (I swear, Google gods, I'm not doing it for a higher page rank; who are we kidding here?)

"Worrier" is, of course, a pun on Warrior, not that I consider myself either of those. But I wage war with mediocrity and complacency, and let worry slip in when I'm not looking, so neither of them are entirely off the mark, either. Look forward to cluttering the web with more of my brain dumps, in the hopes that someone will find it useful.

cheers,
Adam