Arc Forumnew | comments | leaders | submitlogin
ASK: Best way to learn Lisp?
3 points by kinnard 627 days ago | 7 comments
I'm learning lisp and I'm wondering what the best way to learn is?

Build something, obviously, right?

But I'm looking for a little more efficiency than that. Is it even the right move to learn arc first(or at all)?



2 points by claytonkb 621 days ago | link

I think Arc is perfect for what you want - it was designed from the ground-up for "exploratory programming". Arc not only preserves its Lisp roots "under the hood", it also captures the spirit of Lisp, IMO. It clears away what I consider to be syntactical pollution in, say, Common Lisp.

Start with the foundation:

https://arclanguage.github.io/ref/

Lisp has a bad reputation for being difficult; the most difficult thing about Lisp is the concept of quotation (and quasi-quotation). At the REPL (http://tryarc.org/):

  > (list 1 (+ 1 1) 3)  
  (1 2 3)
This list contains a sub-list - (+ 1 1) - which is itself evaluated to give the final list that Arc returns.

  > (list 1 '(+ 1 1) 3)  
  (1 (+ 1 1) 3)
Putting a single-quote in front of the sub-list causes the interpreter to not evaluate that list but, instead, to return it in quoted form, exactly as-is.

  > '(list 1 (+ 1 1) 3)  
  (list 1 (+ 1 1) 3)
We can quote the whole list if we like, in which case, the whole list is returned as-is. Quotation is "blocking", that is, once the interpreter hits a single-quote, it stops evaluating the quoted list and any sub-lists within it.

  > `(list 1 (+ 1 1) 3)  
  (list 1 (+ 1 1) 3)
The back-tick is the quasi-quote operator and has a similar effect as quote when applied to a whole list. However, it acts differently when we apply the unquote operator (comma) to sub-lists:

  > `(list 1 ,(+ 1 1) 3)  
  (list 1 2 3)
Here, the whole list was quoted but the interpreter did not stop traversing the list, searching for unquoted lists. When found, the unquoted list was evaluated.

Keeping track of exactly when/where you need to use quotation or quasi-quotation can sometimes be challenging. Everything else about Lisp is completely straightforward, that is, no more difficult than any other, more common, language.

-----

2 points by zck 627 days ago | link

What are your goals? Although the people here are pretty helpful, there isn't much out there, resource-wise, for Arc. This is both in terms of documentation and libraries.

Are you interested in hacking a Lisp itself? Then Arc is a good choice. Are you interested in learning a Lisp you can find companies using? Arc is suboptimal.

-----

3 points by kinnard 627 days ago | link

I suppose I'm learning lisp for more idealistic/philosophical rather than professional reasons. Though it seems there are compelling professional outcomes nonetheless.

-----

2 points by zck 626 days ago | link

If you're interested in Arc, sure, go for it. It's a lot of fun, and the things it does are very well designed.

If you want suggestions as to which Lisp might fit your philosophical ideals, it would help to talk about what the ideals are.

-----

1 point by kinnard 625 days ago | link

I'd describe myself as a bottom-up thinker. [But I'm unopposed to the description "top-down" because . . . "which way is up?"] I like to work from axioms to outcomes. I'm frustrated under other conditions.

-----

2 points by hjek 620 days ago | link

MIT have some good freely available videos on Lisp, where they go through a lot of philosophical stuff: https://archive.org/details/mit_ocw_sicp

-----

2 points by hjek 621 days ago | link

If you already know Javascript, you write that with LISP syntax: https://github.com/anko/eslisp

That might reduce the entry barrier to building something.

-----