Live data from Hacker News

CL or Scheme?

news.ycombinator.com

31–40 of 47 posts

Re: CL or Scheme?

#31
Scheme isn't really a language like CL is. Scheme's R5RS standard is pretty minimal, and last time I checked (admittedly it's been awhile) R6RS is not that widely implemented (a lot of implementers never liked it).

Each implementation has its own way of doing things. Some are simple, and some are relatively baroque. Racket is more on the baroque end, though probably less so than CL.

Re: CL or Scheme?

#32
post #14
post #8

A little off topic, but I notice a lot of people new to Emacs and Lisp banging there heads trying to get Slime set up and running, when Emacs has excellent Lisp support right out of the box. Slime is excellent, but complicated (even by Emacs standards). I wouldn't recommend a user installing it until a specific need arises. I can't imagine trying to learn Lisp, Emacs, and set up Slime all at once.

Setting up SBCL+Emacs+SLIME is really easy if you use Ubuntu or some other distro that contains packages for them. All you need to do in current Ubuntu is $ sudo apt-get install sbcl emacs slime && echo "(require 'slime)" >> ~/.emacs and then start emacs and press Alt+x, write `slime´ and press enter (M-x slime for the initiated). Now using all the available features of that combination will take a lot of time, but s…

I am not sure how it works in Ubuntu, but you might need also to set the `inferior-lisp-program' variable to 'sbcl' in emacs.

Re: CL or Scheme?

#33

Scheme isn't really a language like CL is. Scheme's R5RS standard is pretty minimal, and last time I checked (admittedly it's been awhile) R6RS is not that widely implemented (a lot of implementers never liked it). Each implementation has its own way of doing things. Some are simple, and some are relatively baroque. Racket is more on the baroque end, though probably less so than CL.

[deleted]

Re: CL or Scheme?

#34
post #24

Go for Clojure. It's a modernized common-lisp with access to the wealth of Java libraries. There are resources online, and you should be able to get up and running in a matter of minutes.

Would Clojure be worth trying rather than CL or Scheme for someone who doesn't have any Java experience, though?

Re: CL or Scheme?

#35
You should have gone with your favourite editor + CLISP. Would have taken you 5 minutes and it would have been more than enough to get through PCL.

If you're not already familiar with Emacs, save it and Slime for later.

Re: CL or Scheme?

#36

newLISP is a scripting language with a Lisp-like syntax. It's designed to be a Lisp-flavoured alternative to Perl or PHP or AppleScript. The emphasis is on staying small (250Kb) and easy to install, learn, and use. As a non-programmer I'm not clever enough to learn CL or Clojure, but I found newLISP pretty easy to learn and use for day-to-day scripting tasks and CGI work. It's based on the ideas of Lisp, rather than…

If anyone's considering picking up newLISP, be advised they made some widely criticized design decisions (such as omitting lexical scope, closures, pass by reference, and GC) intended to speed up the interpreter. Last I heard, they don't plan on having a compiler. http://arclanguage.org/item?id=2911

yeah, lush (http://lush.sourceforge.net/) is a lot more interesting in the alternative-lisp space, but they too omit lexical scoping :(

Re: CL or Scheme?

#37
post #24

Go for Clojure. It's a modernized common-lisp with access to the wealth of Java libraries. There are resources online, and you should be able to get up and running in a matter of minutes.

Would Clojure be worth trying rather than CL or Scheme for someone who doesn't have any Java experience, though?

With Clojure 1.2.0 and the build tools Leiningen or Cake you can get very far along w/o needing to know much about Java.

Re: CL or Scheme?

#38
I use Chicken Scheme. I prefer Scheme over Common Lisp for practical reasons. None of the Common Lisp implementations that I'm aware of can compile code to nice, small, executables that start fast and don't use a ton of memory. They all either produce a huge image file or generate bytecode that has to be run in a VM.

Re: CL or Scheme?

#39
post #13
post #10

Earlier quoted context omitted.

Why do you say LET and LET* have very different uses? I just use LET* if I need to reference a preceding variable in the same declaration (it happens). Actually I vaguely remember PG in one of his Lisp books saying LET* indicates bad code, something I never understood, though empirically I've noticed some evidence for it.

> LET* indicates bad code, something I never understood Neither did I, until I encountered something along the lines of: (let* ((foo ...) (foo ...) (foo ...) (foo ...) (foo ...) (foo ...) (foo ...)) ...)

That's strangely unidiomatic. I wonder why that person didn't just write:

  (let ((foo ...))
    (setf foo ...)
    (setf foo ...)
    ...)
On a tangential note, while I try to avoid multiple assignment as much as possible, I also enjoy availing myself of CL's imperativeness whenever doing so makes my code smaller or more efficient. I really like CL's multiparadigm approach. The sweet spot seems to be: allow side-effects in the small (i.e. within functions or small scopes) and be as strict as you can in composing larger pieces.

Re: CL or Scheme?

#40
post #28

Earlier quoted context omitted.

If anyone's considering picking up newLISP, be advised they made some widely criticized design decisions (such as omitting lexical scope, closures, pass by reference, and GC) intended to speed up the interpreter. Last I heard, they don't plan on having a compiler. http://arclanguage.org/item?id=2911

omitting lexical scope, closures, pass by reference, and GC None of those decisions were made for performance reasons, but because the creator of newLisp had no idea how to do them (lexical scope and call by reference were initially performance hacks, and actually make programs faster and/or smaller.) A better name for the language would have been newBASIC, but even Basic is garbage collected. People who intend to us…

According to http://www.paulgraham.com/thist.html, at the time implementing lexical scope was a leap of faith. It was broadly assumed to be less efficient.
Post reply on HN