Learning LISP; Scheme vs elisp.
  Home FAQ Contact Sign in
gnu.emacs.help only
 
Advanced search
POPULAR GROUPS

more...

gnu.emacs.help Profile…
 Up
Learning LISP; Scheme vs elisp.         


Author: Adam Funk
Date: Aug 1, 2008 05:45

I've decided I ought to train myself in the most elegant programming
weapon --- http://xkcd.com/297/ --- so I've started working through
_The Structure and Interpretation of Computer Programs_.

In the long term I hope I'll be able to customize Emacs more in its
native way instead of wrapping external Perl programs in
shell-command-on-region (as I often do now).

Any tips on transferring knowledge between Scheme and elisp?

As a first observation, it seems to me that Scheme's define seems to
correspond to both defun and setq in elisp
--- is that a fair
interpretation (or a stupid one)?
13 Comments
Re: Learning LISP; Scheme vs elisp.         


Author: Joost Kremers
Date: Aug 1, 2008 06:06

Adam Funk wrote:
> I've decided I ought to train myself in the most elegant programming
> weapon --- http://xkcd.com/297/ --- so I've started working through
> _The Structure and Interpretation of Computer Programs_.
>
> In the long term I hope I'll be able to customize Emacs more in its
> native way instead of wrapping external Perl programs in
> shell-command-on-region (as I often do now).

dunno, but the emacs lisp intro (C-h i m emacs lisp intro RET) and the
emacs lisp manual (C-h i m elisp RET) seem more appropriate ways to get
started with elisp...

--
Joost Kremers joostkremers@yahoo.com
Selbst in die Unterwelt dringt durch Spalten Licht
EN:SiS(9)
no comments
Re: Learning LISP; Scheme vs elisp.         


Author: Thien-Thi Nguyen
Date: Aug 1, 2008 07:09

() Adam Funk ducksburg.com>
() Fri, 1 Aug 2008 13:45:57 +0100

most elegant programming weapon

warriors attack, felling foe after foe,
few growing old til they realize: to know
what deceit is worth deflection;
such receipt reversed rejection!
then their heavy arms, e'er transformed to shields:
balanced hooked charms, ploughed deep, rich yields.

thi
no comments
Re: Learning LISP; Scheme vs elisp.         


Author: Joel J. Adamson
Date: Aug 1, 2008 12:16

>>>>> "Adam" == Adam Funk ducksburg.com> writes:
Adam> I've decided I ought to train myself in the most elegant
Adam> programming weapon --- http://xkcd.com/297/ --- so I've
Adam> started working through _The Structure and Interpretation of
Adam> Computer Programs_.

Good idea: the best computer science book ever written --- and the only
one I've ever used :-P
Adam> In the long term I hope I'll be able to customize Emacs more
Adam> in its native way instead of wrapping external Perl programs
Adam> in shell-command-on-region (as I often do now).

Uh, what? Can you explain this? Can you explain why on Earth you
would do it?
Adam> Any tips on transferring knowledge between Scheme and elisp?

There are some general qualities to Lisp that all Lisp dialects
share, Scheme and Emacs Lisp among them. Both are descendants of
MacLisp (though Scheme is way different from MacLisp, and Emacs Lisp
is quite similar).
Show full article (3.13Kb)
no comments
Re: Learning LISP; Scheme vs elisp.         


Author: David Kastrup
Date: Aug 1, 2008 13:18

"Joel J. Adamson " email.unc.edu> writes:
Show full article (1.09Kb)
no comments
Re: Learning LISP; Scheme vs elisp.         


Author: Adam Funk
Date: Aug 1, 2008 13:26

On 2008-08-01, Joost Kremers wrote:
> Adam Funk wrote:
>> I've decided I ought to train myself in the most elegant programming
>> weapon --- http://xkcd.com/297/ --- so I've started working through
>> _The Structure and Interpretation of Computer Programs_.
>>
>> In the long term I hope I'll be able to customize Emacs more in its
>> native way instead of wrapping external Perl programs in
>> shell-command-on-region (as I often do now).
>
> dunno, but the emacs lisp intro (C-h i m emacs lisp intro RET) and the
> emacs lisp manual (C-h i m elisp RET) seem more appropriate ways to get
> started with elisp...

Well, what I mainly want to do is learn LISP from a reputable text,
and I'm hoping a side benefit of that will be improved Emacs skills.
no comments
Re: Learning LISP; Scheme vs elisp.         


Author: Adam Funk
Date: Aug 1, 2008 13:30

On 2008-08-01, Joel J. Adamson wrote:
>> I've decided I ought to train myself in the most elegant
>> programming weapon --- http://xkcd.com/297/ --- so I've
>> started working through _The Structure and Interpretation of
>> Computer Programs_.
>
> Good idea: the best computer science book ever written --- and the only
> one I've ever used :-P

Good!
>> In the long term I hope I'll be able to customize Emacs more
>> in its native way instead of wrapping external Perl programs
>> in shell-command-on-region (as I often do now).
>
> Uh, what? Can you explain this? Can you explain why on Earth you
> would do it?

If you mean why do I do such a hideous thing now, it's because I *can*
do string manipulation in Perl, whereas I can't (currently) do it in
LISP (except for fairly trivial cases).
Show full article (1.04Kb)
no comments
Re: Learning LISP; Scheme vs elisp.         


Author: Pascal J. Bourguignon
Date: Aug 1, 2008 14:51

Adam Funk ducksburg.com> writes:
> I've decided I ought to train myself in the most elegant programming
> weapon --- http://xkcd.com/297/ --- so I've started working through
> _The Structure and Interpretation of Computer Programs_.

Notice that this is not a book about scheme, but about programming in
general. It just happens that it uses scheme for its examples (but
there are blogs and wikis with the sicp examples translated in other
programming languages).
http://codepoetics.com/wiki/index.php?title=Topics:SICP_in_other_languages
http://eli.thegreenplace.net/category/programming/lisp/sicp/

To learn scheme there are easier books such as:

How to Design Programs -- An Introduction to Computing and Programming
http://www.htdp.org/2003-09-26/Book/

Concrete Abstractions -- An Introduction to Computer Science Using Scheme
http://www.gustavus.edu/+max/concrete-abstractions.html
Show full article (5.10Kb)
no comments
Re: Learning LISP; Scheme vs elisp.         


Author: Pascal J. Bourguignon
Date: Aug 1, 2008 15:10

"Joel J. Adamson " email.unc.edu> writes:
> I suggest you use Emacs for Scheme hacking, and that way you will learn
> the ins and outs of both.

Oh yes, and be sure to use paredit.
http://mumble.net/~campbell/emacs/paredit.el

Here is a quick tutorial for using scheme in emacs:

C-x C-f ~/test.scm RET
C-x 2
C-u M-x inferior-lisp RET
C-a C-k mzscheme RET -- assuming you have mzscheme in the PATH.
(display "Hello") RET
C-x o -- return to test.scm buffer.
(define (hw)
(newline) (display "Hello") (newline)) C-x C-e
(hw) c-x C-e
-- so you can keep your source and test
-- expressions in the scm buffer, and
-- send the over to the inferior-lisp
-- process for execution with C-x C-e.
Show full article (1.08Kb)
no comments
Re: Learning LISP; Scheme vs elisp.         


Author: weber
Date: Aug 1, 2008 18:06

On Aug 1, 6:51 pm, p...@informatimago.com (Pascal J. Bourguignon)
wrote:
> Adam Funk ducksburg.com> writes:
>> I've decided I ought to train myself in the most elegant programming
>> weapon ---http://xkcd.com/297/--- so I've started working through
>> _The Structure and Interpretation of Computer Programs_.
>
> Notice that this is not a book about scheme, but about programming in
> general.  It just happens that it uses scheme for its examples (but
> there are blogs and wikis with the sicp examples translated in other
> programming languages).http://codepoetics.com/wiki/index.php?title=Topics:SICP_in_other_lang...http://eli.../
>
> To learn scheme there are easier books such as:
>
>          How to Design Programs -- An Introduction to Computing and Programming
>          http://www.htdp.org/2003-09-26/Book
>
>          Concrete Abstractions -- An Introduction to Computer Science Using Scheme
>          http://www.gustavus.edu/+max/concrete-abstractions.html
> ...
Show full article (5.49Kb)
no comments

RELATED THREADS
SubjectArticles qty Group
Convert scheme to lisp14 comp.lang.lisp ·
1 2