Live data from Hacker News

Land of Lisp (2010)

landoflisp.com

61–70 of 84 posts

Re: Land of Lisp (2010)

#61

This book is well worn, dog eared, and on my home office book shelf. While many people criticize it, for legitimate reasons, it is still a fun and wonderful journey through Common Lisp. I wish more books were written in this irreverent and whimsical style. If however you want a more traditional and "from zero" introduction to Lisp, then "Common LISP - A Gentle Introduction to Symbolic Computation"[0] may be better. I…

If you like this sort of thing, here are some others in a similar humorous style for other languages. 1. Kaufman, Roger. A FORTRAN Coloring Book (probably the first funny programming book -- from 1978). 2. Lipovača, Miran. Learn You A Haskell for Great Good. 3. Hebert, Fred. Learn You Some Erlang for Great Good (inspired by the Haskell book). 4. Felleisen, Matthias. Realm of Racket (basically Land of Lisp for Racket.…

LYAH is a great introduction for Haskell in my opinion. It helps make an intimidating language more approachable. And once you see that it's not all that intimidating, it's easy to find resources for yourself and keep learning Haskell.

The Haskell IRC community is a great resource as well, and probably one of the friendliest around. (#haskell on freenode)

Re: Land of Lisp (2010)

#62

This book is well worn, dog eared, and on my home office book shelf. While many people criticize it, for legitimate reasons, it is still a fun and wonderful journey through Common Lisp. I wish more books were written in this irreverent and whimsical style. If however you want a more traditional and "from zero" introduction to Lisp, then "Common LISP - A Gentle Introduction to Symbolic Computation"[0] may be better. I…

I second the recommendation for Practical Common Lisp, even for complete beginners and newcomers to Lisp. It covers the very basics, and the writing style is accessible and patient.

I'm going through this book now. It has a different style from LoL but I do find it suits me better. It feels at least more structured :)

Re: Land of Lisp (2010)

#63
post #18

Author of LOL here, if there are any questions!

Thanks for the book! It was the reason I finally started to really learn LISP apart from just dabbling with it. It did serve as a great way to get over the "scary-ness" of learning LISP. :)

Re: Land of Lisp (2010)

#64
post #27
post #21

Earlier quoted context omitted.

What do you think about making a second edition?

I would say "Realm of Racket" is really the second edition to "Land of Lisp"- The fact is that most lisp developers now use either Racket Scheme or Clojure, so those are really the only markets that could support a rework of LOL in 2019. I've tried a couple of times in the past to work with someone on a Clojure port, but just haven't been able to make the coauthor+publisher work out right to get it launched.

Flick me a message if you're interested in chatting to Manning at any stage

Re: Land of Lisp (2010)

#65
post #33

Earlier quoted context omitted.

Does Common Lisp have something similar to Clojure's threading macros? (trim-string (get-string '(some data))) (-> '(some data) get-string trim-string https://clojure.org/guides/threading_macros

Yes, of course there is... Lisp always has the thing you find :-) https://github.com/hipeta/arrow-macros

Thanks guys, that macro makes it easier to see the flow :)

Re: Land of Lisp (2010)

#66
post #47

Earlier quoted context omitted.

Hey Dr Barski. I'm actually reading your book right now. I do have a question. How do you write Lisp effectively? And by that I mean, Lisp seems to be written from the inside out due to the nested lists. Is there something that makes it more natural to write: (trim-string (get-string '(some data))) Or do you need to know that you're going to call trim before you get the string? Hope that makes sense.

how do you write it in other languages? sin(cos(10.4)); or v = 10.4; c = cos(v); s = sin(c); in Lisp one might write: (let* ((v 10.4) (c (cos v))) (sin c)) really old style: (prog (v c s) (setq v 10.4) (setq c (cos v)) (setq s (sin c)) s)

Thanks for the reply! I'd go the first route unless method chaining was available.

  SomeData.ToString().Trim()
I would like to write idiomatic Lisp code and it's getting easier to read the nested expressions but it breaks the flow to leave the expression and wrap it. Another user mentioned using a command with Emacs to escape the expression and auto wrap it. That might be what I'm looking for.

Re: Land of Lisp (2010)

#67
post #48

Earlier quoted context omitted.

Hey Dr Barski. I'm actually reading your book right now. I do have a question. How do you write Lisp effectively? And by that I mean, Lisp seems to be written from the inside out due to the nested lists. Is there something that makes it more natural to write: (trim-string (get-string '(some data))) Or do you need to know that you're going to call trim before you get the string? Hope that makes sense.

The way I do it, is that in my editor, I can type: '(some data|) Where | is my cursor. And then I have a keybinding that moves my cursor to the front and wraps around like so: (| '(some data)) So I can type the next thing: (get-string| '(some data)) Press it again: (| (get-string '(some-data))) And so on. That way, even though the code is visually nested, I can write it in logical order from what eval first to what e…

This is just what I've been looking for!

I've been searching for this and see there are commands for navigating s expressions but I haven't found this example. Is this a built-in command? Is there name for this action?

Re: Land of Lisp (2010)

#68
post #58
post #55

Earlier quoted context omitted.

Why not write it as in lisp as: (sin (cos 10.4))

The question was for alternatives to code that reads inside->out. I personally don't have a problem with it, but I can see that many languages have a more procedural/imperative top->down control flow by default. A Java programmer might prefer that, where a Lisp programmer will be trained to alternate while reading between inside->out and outside-in in code.

Still using those long expression is unfair

A(b(c)) are 2 function calls.

Hence

(A (b c))

is the fair abd equal expression. And you inside out whilst valid and in fact easier to read (as more normal) would need precedence rule in other scenario.

But those examples just not right.

Re: Land of Lisp (2010)

#69
post #18

Author of LOL here, if there are any questions!

Did you draw the pictures yourself? I really like the long final comic story, and several times thought about making some roguelike ascii game with this background (choosing a guild with specific skills, killings various kinds of bugs, etc.), but I am too lazy for having actually written it... Thank you for that!

Re: Land of Lisp (2010)

#70
post #22

I bought this book years ago even though I had already been programming in Common Lisp for 20 years at that time. I really like Conrad Barski's writing and that was sufficient reason to buy the book.

"Loving Common Lisp, or the Savvy Programmer's Secret Weapon" is also a very good book on Lisp.

  CL-USER> (if (not-known-by-p 'you)
             (author-p 'your-parent-commenter 'Loving-Lisp)
           ) 
  T
;) sorry, just approximate syntax
Post reply on HN