

Lisp Enlightenment and Emacs Frustration - gnosis
http://www.erik-rasmussen.com/blog/2007/07/06/lisp-enlightenment-and-emacs-frustration/

======
Xurinos
Oh nooo... It's a 2007 article, but I wish I had been able to go back to that
time and shout, "You can use vim! It's okay!" slimv... screen, vim, sbcl in an
alternate window with linedit... I think the only real things emacs ever gave
me was some intellisense and a slightly enhanced debugger over sbcl's stock
debugger. I do not really feel slowed down, though; maybe the problem is that
I am not regularly experiencing the speed-ups. :)

But whatever the case, emacs should not be a barrier to Lisp. I might even
recommend for new Lisp users: avoid emacs. First learn Lisp. Play around a
bit. Most of your environment should be the REPL, and you can copy-paste from
your favorite editor. You can use "(ed)" in the REPL. Go from there. Then,
later on, try to get emacs to work with your Lisp. Mainly, you will want to
experience the interaction, the environment with Lisp. Finally, switch back to
vim when you are ready to get your real work done quickly.

I couldn't help the last line... :) Use both editors, depending on your
immediate need. But learning Lisp is separate from learning emacs.

~~~
GrooveStomp
I completely agree. I've tried doing the Lisp + Emacs combo, and it's just too
daunting for someone starting out. I'm happy as can be using Vim for now. I
fully intend to give Emacs a thorough chance once more, but not until I'm more
thoroughly entrenched in Lisp.

~~~
sigzero
My fingers are broken. I dust of emacs every now and then but I end up typing
vim commands on the screen when I want to do things. :-)

------
Stormbringer
It baffles me whenever someone announces their discovery that Java didn't
invent objects and garbage collection as though that invalidates the whole
language. I wonder what rock they have been hiding under. How could any true
language enthusiast not have an understanding of their language's history?

====

Java has very few original features. However, it did serve as a sort of
'feature aggregator', where it pulled in a very large pile of features from
other languages and housed them all under one roof.

What I (vaguely) remember about Java from the early days as being it's (other)
main advantages were:

(1) incredibly easy networking (compare sockets with C for example)

(2) applets (yes they suck(ed), but no other language had that browser
adoption)

(3) it wasn't Microsoft (not such a big deal now, but back in the day
Microsoft were a lot more aggressive)

(4) it was open(ish) (you could look at the library code to figure out how it
was doing stuff) (compare with Visual Basic where everything either magically
works or magically doesn't)

(5) Threads (compare again to semaphores)

(6) Free (as in beer)

In some cases, such as early Java, I think a feature most people don't really
take into account is not what was put _into_ the language, but what was left
out. By hiding pointers behind the curtain, it made the language a lot easier.
Easier to write, and easier to read. Even then it had its wrinkles, the people
I know who were uber-productive in Java tended to use a small subset of the
languages features.

Over the years of course feature creep has slipped in, so it now has bits of
perl (regex) and bits of C++ (templates/generics). A lot more of the base code
is a lot uglier than it used to be....

====

As for Lisp, I don't really buy the argument that lack of a good IDE held it
back. I think the following reasons are more to the point:

A) butt ugly syntax (I'm talking about the random lengths of indents, not the
()s - to understand why this is bad, go learn you some usability)

B) greedy corporate interests (if the developer kit for Java had cost $10,000
no one would ever use it either) (early on)

C) language fracturing and speciation (there are too many 'little lisps' for
any one of them to gain momentum) (later on)

D) lack of well written textbooks (compare to the veritable explosion of books
for Java in its early days. Back when I was actually interested in Lisp I used
to pick up books on it, and they'd invariably spend the first 2 pages showing
some vague equivalency to lambda calculus and then it seemed as though they
felt their teaching duty was done)

speaking of the lambdas...

E) programmers got better at naming variables and functions (having anonymous
functions may be a neat party trick, but nowdays when we put on our big boy
pants we like to name stuff)

F) missed the OO boat because they were too caught up in their own cleverness
(early OO implementations in Lisp were butt ugly and broken (didn't do
encapsulation and/or inheritance well)).

You may argue (as the author of the original article does) that currently Lisp
does wonderful OO, but you have the same problem as say Java does, overcoming
the slowness myth(s).

I wonder if it is possible to predict the critical junctures where the myths
about a language solidify. In any case, it doesn't help to make a new lisp
with more/better/faster features (in an attempt to create new myths), because
that just feeds the confusion (see point C above)

edit for irony: missed a )

~~~
kunjaan
> D) lack of well written textbooks

1\. How do I program? I dont know how to build abstractions. I dont know how
to write correct, modular and reliable codes. I'll start with "How to Design
Programs"

2\. I want to learn more about recursion. I want to master thinking
recursively because I have found that they solve a lot of my problems. Let me
see "Little Schemer".

3\. I want to learn more powerful constructs like continuations, tail calls
and what not. I want to learn to solve harder problems in Scheme. Let me pick
up "Seasoned Schemer".

4\. Wow macros are pretty nice. I want to learn more about them. Let me first
see how to write unhygenic ones. Paul Graham's "On Lisp" is amazing!

5\. Constructing higher levels of abstraction is something that I really want
to master. What kinds of abstractions can I build? What are the ways to
construct large programs? What is the way to organize programs? What is
programming? Let me read SICP

6\. What is a loop? Why doesn't scheme have it? How can I build it? How do I
build these kinds of abstractions? Wand's EOPL is my bible at this stage.

7\. Let me do something useful in Scheme. How do I write much more powerful
macros? I love my types. I love my modules. I love my libraries. Racket, I
think you are the most powerful thing out there.

------
technomancy
One time I tried using Eclipse for a screencast, and it felt like coding with
oven mitts on. However, I didn't blog about the experience, because it
contributed nothing useful. I wonder if the same thought occurred to the
author.

------
swannodette
If all you want to do is learn the beauty of Lisp don't waste time mucking
around with arcane (and great) editors like Vim or Emacs. I'm using LispWorks
6.0 Personal Edition to work through Norvig's PAIP - no headaches.

~~~
blacksmythe
DrRacket (packaged with the Racket variant of Scheme) provides some indenting
and paren matching that is helpful, at least compared to a basic text editor.

~~~
swannodette
DrRacket isn't just helpful, it's a downright fantastic IDE if you're digging
into Scheme :)

~~~
gnosis
Does it have vim keybindings?

~~~
gus_massa
The keybindings are customizable (in a previous version I added Alt-Backspace
for "Undo".). But the procedure is not straightforward, you have to create a
special module: [http://docs.racket-
lang.org/drracket/Keyboard_Shortcuts.html...](http://docs.racket-
lang.org/drracket/Keyboard_Shortcuts.html#\(part._defining-shortcuts\))

------
xyzzyz
Hey, Emacs keybindings suck. Why don't we fix them, instead of complaining?

Surely, it will not be easy -- there are some problems visible even from
distance. One of them are people like me who grew accustomed to Emacs'
idiosyncrasies -- they're small problem. The big one are people who firmly
believe that C-f,b,n,p, C-y/M-y, mainly useless functions having single-key
bindings and really useful ones concealed under complicated binding, like C-x
b or C-x o, or without any binding at all, like replace-string or query-
replace, etc, is the way to go.

~~~
rednum
As a Vim user who switched to emacs I find emacs bindings inconvenient as hell
[1] however I don't think it is possible to fix them now. Most 'prominent'
emacs users are simply used to them and won't change their habits, it's really
unlikely that new bindings - no matter how cool they would be - would acquire
much attention.

[1] Well, I may be biased, however I already use emacs commands automatically
e.g. acquired some muscle memory and some things actually are better in vim -
after long coding I can actually feel some strain from pressing C-M, and
navigation still is much slower, and I doubt it will get faster with time.

~~~
gnosis
You might want to check out viper and vimpulse:

<http://www.emacswiki.org/emacs/ViperMode>

<http://www.emacswiki.org/emacs-es/Vimpulse>

~~~
lelele
or Vim mode: <http://www.emacswiki.org/emacs/VimMode>

------
dto
Emphasis seems odd here. Keybindings are just about the most trivially (and
commonly) customized part of Emacs, and things like CUA-mode and customized
Mac builds of Emacs are common ways of dealing with the issue. Whereas the
major benefit of Emacs for Lisp development---having your development
environment written in Lisp, by Lispers, who have collectively spent 30 years
or so improving its Lisp editing/development capabilities both in included and
in third-party elisp libraries---is not mentioned.

I think the poster implicitly points out something interesting---that Java and
Common Lisp are both large languages that require sophisticated tools to use
effectively. I'm not talking about Emacs versus Eclipse here, I mean the
toolset in your brain. Money quote:

"IntelliJ makes Java programming as easy as it can possibly be. It more or
less compiles your code as you type it, points out most bugs as they occur,
intelligently suggests code completion to finish your words for you. I
generates all the annoying repetitive code, like getters and setters and
equals() methods for you. Without it, Java would be much more laborious to
program in..."

So to Java users, writing annoying repetitive code is a life-saving feature of
the IDE, whereas for Common Lisp it would simply be bad style.

------
Ingaz
Hm.

I'm using emacs just several days.

I've used: vim, visual studio, Delphi/CBuilder IDEs, PyScripter, notepad++,
PL/SQL Developer, TOAD, others.

What I found pleasant in emacs: It does not have learning curve at all.

All I need to figure is just Alt-x (M-x). Than it became fun.

I've read documentation only for cua-mode. Everything else was found through
guessing and experimentation.

Of course, maybe I'm just novice and I do not know some hidden emacs dangers,
one day they will pop up and bite my ass. Dunno.

------
Luyt
Ha! Editing Clojure source with UltraEdit over a WinSCP SSH connection to my
server! There is no need to force yourself to using either emacs or vi (both
of which I use sometimes).

------
spacemanaki
Poor guy, I hope he stuck with it. After all, doesn't pg use vi?

Eta Someone indeed pointed this out as the first comment in 2007.

