DaemonForums  

Go Back   DaemonForums > Miscellaneous > Programming

Programming C, bash, Python, Perl, PHP, Java, you name it.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 9th July 2020
sabrina sabrina is offline
Port Guard
 
Join Date: Jun 2020
Posts: 15
Question Learning Lisp

Hello
I want to learn a Lisp dialect, which one do you recommend? Or maybe learn Haskell?
Are there any good books?
Reply With Quote
  #2   (View Single Post)  
Old 9th July 2020
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 3,318
Default

What is your end goal?
Reply With Quote
  #3   (View Single Post)  
Old 9th July 2020
sabrina sabrina is offline
Port Guard
 
Join Date: Jun 2020
Posts: 15
Default

I want to improve my programming knowledge and maybe pursue programming career later.
I'm starting to learn Emacs and eLisp and want to continue to learn Lisp afterwards.
Reply With Quote
  #4   (View Single Post)  
Old 9th July 2020
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 3,318
Default

Quote:
Originally Posted by sabrina View Post
I'm starting to learn Emacs and eLisp and want to continue to learn Lisp afterwards.
As for Emacs & the Lisp dialect it uses, I would suggest looking at the documentation page hanging off the GNU Emacs page:

https://www.gnu.org/software/emacs/

That page points to a number of books on how to add features to Emacs.

As for learning Lisp proper, it is an interesting language, but no one is really using it today. I would suggest looking at Scheme, but MIT abandoned it in favor of Python several years ago.

Functional programming promises a number of interesting features which unfortunately remain primarily at the academic fringe. The corporate world continues to accept quickly written (sloppy) code over carefully crafted code. Plus, the next person to inherit code maintenance may have no clue as to the functionalism.

Last edited by ocicat; 9th July 2020 at 03:50 PM.
Reply With Quote
  #5   (View Single Post)  
Old 11th July 2020
gpatrick gpatrick is offline
Spam Deminer
 
Join Date: Nov 2009
Posts: 245
Default

Don't start with Haskell. Your choices will be: Common Lisp, Scheme, Racket, Clojure.

There are two types: Lisp-1 which is Scheme, and Lisp-2 which is Common Lisp. Racket started out as PLT Scheme, but changed its name because it was diverging from Scheme. Clojure is also a Lisp-1.

What a Lisp-1 or Lisp-2 means, to simplify it, is the namespace. In Lisp-2 you can have a function named foo and a variable named foo. In Lisp-1 you can only have a function or a variable named foo, but not both.

Common Lisp is really big, but is multi-paradigm, as well as Racket and Scheme; but they all support functional. Clojure is functional.

Good books based on each language:
Common Lisp: "Common Lisp: A Gentle Introduction to Symbolic Computation" by David Touretzky, which uses a subset of Common Lisp.
Common Lisp: "Practical Common Lisp" by Peter Seibel.
Common Lisp: "Land of Lisp (LoL)" by Conrad Barski.
Racket: "How to Design Programs (HtDP)" by Matthais Felleisen, Matthew Flatt, Robert Findler, Shriram Krishnamurthi.
Racket: "Picturing Programs: An Introduction to Computer Programming" by Stephen Block.
Racket: "Realm of Racket (RoR)" by multiple authors.
Scheme: "Concrete Abstractions" by Max Hailperin.
Scheme: "The Little Schemer" by Daniel Friedman and Matthais Felleisen.
Scheme: "Structure and Interpretation of Computer Programs (SICP)" by Harold Abelson and Gerald Sussman. A classic and used by MIT for two decades.
Scheme: "Simply Scheme" by Brian Harvey and Matthew Wright.
Scheme: "Exploring Computer Science with Scheme" by Oliver Grillmeyer.
Clojure: "Living Clojure" by Carin Meier.
Clojure: "Clojure for the Brave and True" by Daniel Higginbotham.

Selected notes about the above books:
1. Brian Harvey has written that one needs only to read HtDP or The Little Schemer or Simply Scheme, but not necessarily all three. He is the author of Simply Scheme and says it is less formal and less prescriptive than HtDP.
2. Picturing Programs takes a graphics approach using Racket, and is for what the author would call math phobes.
3. SICP is heavy on math.
4. Barski drew the cartoons for RoR in the same manner of his LoL book, but I don't see the completeness in RoR that exists in LoL.
5. HtDP was created specifically for those new to programming and teaches a recipe that can be followed for any other language.
6. You can search for "How to Design Classes" which is written by most of the authors of HtDP and is available online, but not print. It is to be read after HtDP.

Scheme and Racket were both created for education. Since Racket started as a Scheme, you can use Scheme in Racket by choosing it as a #lang.

Once you learn one, the others would be fairly easy to pick up. Scheme or Racket (using HtDP) would be your best choice. Racket comes with its own powerful graphical editor called DrRacket.

Alex Harsanyi has a blog on Racket and writes some pretty cool applications and has the source on github. Racket also has a regular newsletter.

As I said above, Common Lisp is huge, and Racket has a large library. Scheme has a few dialects and Chicken Scheme would be your best choice if going with Scheme, or maybe Chez Scheme (but doesn't have as large a library as Chicken) which was fairly recently open sourced by Cisco. Racket as of 7.5 has Racket on Chez available for production use, although as of 7.7 (current, and 7.8 expected later this month) it is not yet the default implementation.

Last edited by gpatrick; 11th July 2020 at 01:42 PM.
Reply With Quote
  #6   (View Single Post)  
Old 11th July 2020
sabrina sabrina is offline
Port Guard
 
Join Date: Jun 2020
Posts: 15
Default

Thank you!
Reply With Quote
  #7   (View Single Post)  
Old 26th July 2020
thirdm thirdm is offline
Spam Deminer
 
Join Date: May 2009
Posts: 248
Default

Their advice is good, but to muddle things further there's a very appealing small dialect named picolisp that I've been learning recently.

What I've been doing is to read (or start to read for the fourth time, argh) Land of Lisp by Conrad Barski and to translate the examples from Common Lisp into picolisp. It's a funny, light hearted way to start with Lisp. Has some really cute comics.

picolisp is designed by an individual instead of a commitee which I think gives it special and appealing qualities that common lisp certainly doesn't have and that perhaps even scheme lacks. This will be badly misunderstood since hardly anyone likes Perl anymore, Lisp people least of all, but I like to think of Alexander Burger (inventor of picolisp) as the Larry Wall of the Lisp world.

https://picolisp.com/wiki/?home

Another appealing thing about it is that the interpreter is small, so it's perhaps not a hopeless task to try to read its source code to see how it's implemented or to port it to a strange platform that a mainstream lisp does not support.

Last edited by thirdm; 27th July 2020 at 02:38 PM. Reason: Trim out an irrelevant possibly patronizing paragraph.
Reply With Quote
  #8   (View Single Post)  
Old 27th July 2020
bashrules's Avatar
bashrules bashrules is offline
Aspiring Unix Greybeard
 
Join Date: Mar 2010
Location: Here
Posts: 80
Default

Quote:
Originally Posted by gpatrick View Post
Don't start with Haskell.
Ha! Why not?

As a phd student, I was teaching university courses on both languages, Haskell and Scheme.

Haskell is beautiful. Scheme/Lisp has the charm of C - it takes discipline to write beautiful and understandable code.
Reply With Quote
  #9   (View Single Post)  
Old 12th September 2020
solarseven solarseven is offline
New User
 
Join Date: Sep 2020
Posts: 1
Default

If you are new to the functional programming paradigm, I suggest you start with ELM. It's quite easy to learn and fun. ELM has an outstanding debugger which lets you know exactly what you are doing wrong or are forgetting. It will make learning the functional programming paradigm a breeze.

Then after you get the paradigm it's so much easier to make the shift to Haskell.
Which I definitely suggest, after you get it.

https://elm-lang.org/
Reply With Quote
Reply

Tags
lisp

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Someone Is Learning How to Take Down the Internet e1-531g News 0 21st October 2016 10:14 PM
Learning to script... RJPugh Programming 7 9th November 2014 08:04 PM
Father of Lisp and AI John McCarthy has died J65nko News 6 25th October 2011 05:01 PM
Lisp can't build %.el Mr-Biscuit Programming 3 29th January 2011 06:46 PM
Learning Programming Crypt Programming 35 27th October 2008 04:54 PM


All times are GMT. The time now is 08:26 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick