1. What is this blog about ?
2. Elisp is fun.
3. Elisp is a specialized Lisp dialect.
4. Conclusions and plans for the future.
2. Elisp is fun.
3. Elisp is a specialized Lisp dialect.
4. Conclusions and plans for the future.
What is this blog about ?
In this blog, I intend to share my experience in Emacs Lisp programming and Emacs scripting, as well as some thoughts, critics and ideas about the art of programming in general.
I assume the audience of the blog to be, first of all, Common Lisp gurus and Emacs (Lisp) advanced users. But beginners are by no means discouraged from reading my posts and leaving comments on them; in fact, I don't consider myself to be an advanced lisper (rather quite far from being so). The reason I said the above is that it just seems to me that things I'm going to post here can be classified as "advanced Emacs Lisp programming", in comparison to what is typically done in this language.
I assume the audience of the blog to be, first of all, Common Lisp gurus and Emacs (Lisp) advanced users. But beginners are by no means discouraged from reading my posts and leaving comments on them; in fact, I don't consider myself to be an advanced lisper (rather quite far from being so). The reason I said the above is that it just seems to me that things I'm going to post here can be classified as "advanced Emacs Lisp programming", in comparison to what is typically done in this language.
Elisp is fun
First of all, why Emacs Lisp (Elisp) and what is so special about that language ?
I do almost all of my spare time programming in Elisp inside GNU Emacs text editor, and it is extremely interesting and exciting. Major part of the fascination comes from the nature of the language -- it is a Lisp dialect, therefore, it shares the same principal trait with all the Lisp family languages. Namely, this trait is the ability to write code that writes code, which naturally leads to the possibility of creating any syntax and using it, without a necessity to reinvent another compiler for that, and without ever being stuck to any particular predefined language tools (which is pretty sure the case with almost all the other programming languages).
But Elisp is not so enjoyable solely due to the fact that it is a Lisp dialect. The environment is also perfect; first, Emacs is itself written in C and Elisp, and all the facilities it affords are implemented in Elisp themselves (barring primitives, which are implemented in C). This makes Emacs perfectly unified and consistent. Second, it is fully interactive, meaning that one can use REPL, run arbitrary pieces of code directly from the editor, have functions in Elisp defined and compiled and call them right away with a single keypress. You will never have to wait for half an hour for your project to be built, for the sake of calling a single function 1 time.
In Elisp, like in Common Lisp or Scheme, there's no place for any routine work, boring coding, copy-pasting or boilerplate code. But the space for creative activity, inventing, discovering, writing and rewriting is unlimited.
Elisp is a specialized Lisp dialect
I believe that Elisp is one of the most underestimated programming languages ever devised by humans (the other being JavaScript; but leave that for now). It is perfect for various text-processing tasks, since it contains certain primitive facilities aimed to be used specially for that. In the fields of scripting and text processing, Elisp is perfectly able to compete with Perl or Python, with a difference that all Elisp-based facilities can be seamlessly integrated into Emacs environment and be used interactively.
So, Elisp is a special Lisp dialect that was invented to be an intrinsic and inseparable part of a single particular application. But this fact doesn't prevent it from being excellently usable for some limited types of general-purpose programming. I strongly believe this, and I want to popularize Elisp by sharing my experience in using it for miscellaneous programming tasks. Elisp should evolve and become better; it is worth putting endeavors in its evolution.
Conclusions and plans for the future
As a conclusion, I want to mention some concrete topics I plan to devote my future posts to.
First, one of the most actual thing concerning Elisp at the moment of writing is introducing of lexical scoping in the language. Presently, it is already available in alpha version 24.0.94. Full acceptance of lexical scoping seems to open new horizons to Elisp programmers and to change the way Elisp code was being hacked before.
Second, it would be interesting to write about the experience of creating algorithms for simple games like Sudoku or Paint-by-numbers (Japanese crosswords). Those involve many interesting questions.
I hope to come up with the second post during the next couple of weeks.
Good luck!