What feature of Racket makes it good for Language Engineering? - racket

It can often be read that Racket has some outstanding features, which make Racket very good for language engineering.
For somebody who does not know Racket or Lisp, this not clear. It is really hard to catch that information when reading through the Internet.
What feature or features make Racket so special with regard to language engineering?

Related

How viable is emacs LISP aside from editing emacs? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
I'm in my second year of my CS major, and I've only had courses in C (first course and then a polymorphic data structures course), C++ (OOP focus), MIPS assembly, and a compiler course. I worked in WinForms and C# over the summer. I worked through the Little Schemer and I'm really interested in learning some sort of LISP.
Emacs is my editor of choice--Emacs LISP should be a great place to start.
Aside from customizing emacs, where else could I use emacs LISP? Creating an executable out of elisp code seems almost impossible according to link text. What other limitations are there?
Should I learn Scheme or Common Lisp instead?
Emacs is a text editor. Emacs Lisp is - at heart - a text editing language.
Pinnacles of elisp today - IMO - are ERC, the emacs IRC client, and org-mode, a very nice organizing system. There is also an email client for emacs.
So for building text editing plugins, I don't think you can beat elisp/emacs.
For actual standalone application development, Common Lisp is probably your best bet. I favor the CLISP implementation, but SBCL is also very popular. There are a plethora of Lisp implementations. Someone once joked recently that there are more Lisp compilers than there are Lisp-using companies. :-o
As others have said, Emacs lisp contains many primitives for building a text editor.
That said, it's all still lisp, and getting comfortable using lisp (Emacs, common, or scheme) is about the same in all.
You can use the common lisp package to get access to much of the common lisp macros if you want to use them.
You can use Emacs lisp to write shell scripts (see this question), if that's of interest. The inferior process handling is useful if you want do connect to other running processes (see comint).
Find a project you want to work on, and then let your decision flow from that. If Emacs lisp fits well, use it, if common lisp works well, use that.
This is of course subjective, but I think learning Common Lisp or (standard) Scheme is generally more useful, just for the simple fact that you then will not be limited to one compiler. It is hard to foresee everything you might want to do with your code, so why lock yourself down to one implementation?
It sounds like you are looking to learn a lisp. For that scheme is often recommended, and you say you are reading The Little Schemer.
PLT Racket which was formerly PLT Scheme is a very good scheme development and learning environment. The original primary focus of PLT Scheme was didactic, the renaming from Scheme to Racket is a bad pun but is intended to indicate the system is also mature and sufficient enough for productive "real world" use.
Emacs Lisp is more of a scripting language that is specific to the Emacs environment, useful to learn if you want to rival Stallman in your grasp of Emacs or wish to write extensions.
Common Lisp is the de facto standard for Lisp. Scheme is more pedagogical, primarily due to its association with the famous MIT class and book (SICP), although it is powerful on its own.
They are different however. By some regards Scheme is one of the smallest computer languages out there (in terms of the standard library). The language definition is some six pages. Common Lisp is one of the largest computer languages out there.
There are also more interesting examples. A few years back I was playing around with a Lisp dialect that had support for inline C and Python code, as well as importing and using C and Python objects and calling functions from them directly. However, it seems to have faded into obscurity since I can't find a reference to it on Google.
I would reccomend chicken scheme (http://www.call-cc.org) if you're interested in learning some Lisp. It's got very good documentation, is actively developed, works on a variety of platforms and has a great extension system called 'eggs' that contain a lot of libraries for actaul coding that scheme doesn't directly specify.
On the other hand, emacs is a great development environment for learning emacs lisp, which is a very useful for scripting and (obviously) customizing emacs. Having documentation for functions and variables only a C-h f, C-h v and C-h A away makes development a lot easier; that is once you learn some of the more obscure naming conventions that elisp has created over the years.

Lisp Community - Quality tutorials/resources [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 1 year ago.
Improve this question
As many other people interested in learning Lisp, I feel the resources available are not the best for beginners and eventually prevent many new people from learning it. Do you feel it could be created some sort of community, with a website, forum or something, that provides good (as in quality) resources/tutorials, for Lisp users, possibly translated to several idioms? That way beginners that don't have the necessary skills for writing tutorials could help translating them. Is it a bad idea or is it something that could be accomplished? Give me some feedback or flame me :D
There are two popular dialects of Lisp - Common Lisp and Scheme. Both have excellent books/tutorials and implementations available online for free. Beginners can start with Scheme which is simpler. Some resources for learning Scheme:
Free Books:
Teach Yourself Scheme in Fixnum days. (pdf)
The Scheme Programming Language.
Structure and Interpretation of Computer Programs.
How To Design Programs
Online communities/resources:
The latest Scheme standard.
Scheme Cookbook.
Scheme Requests for Implementation
Scheme Related Research
http://www.schemers.org/
http://groups.csail.mit.edu/mac/projects/scheme/
A Scheme implementation suitable for beginners is PLT Scheme.
Free Books to learn Common Lisp:
Practical Common Lisp
On Lisp
Common Lisp HyperSpec (Reference)
Common Lisp: A Gentle Introduction to Symbolic Computation
Online communities/resources for Common Lisp:
The Common Lisp Cookbook
http://common-lisp.net/
CLiki
The Common Lisp Directory
Popular Common Lisp implementations: SBCL, CLISP, Clozure CL, Allegro CL
Lisp has been around for a long time, there are many (fragmented) communities. There's really no way to "create" a common community, especially from the outside.
Paul Graham would be a likely (IMNO, N=naive) person to potentially unite a large lisp community, given his popularity among younger programmers, as well as his background in lisp (writing On Lisp). However, he has chosen to create a yet another dialect of lisp, Arc.
Many folks have written about the fragmentation of the Lisp community, or Lisp's inability to "catch on". Some examples: here, here, here, and here. So, while your idea is a good one, it is probably fruitless.
That being said, don't let me stop you from rising up and being such a uniting figure in the Lisp community.
As far as existing tutorials, the Emacs Wiki is a good starting place for learning Emacs Lisp. And for an introduction to Scheme - as well as a good introduction to programming in general, there's the classic Structure and Interpretation of Computer Programs.
I find those two resources to be good starting points for learning Emacs Lisp and Scheme. I haven't played with Arc, but presumably there would be some good tutorials on learning Arc - because it is designed in part to be a good language for creating basic web apps.
Here's a forum: Lisp Forum, and here's a community: Planet Lisp
Here's a pretty decent post you might find helpful, How to Learn Lisp.
One of the strengths of Lisp is that being a mature language there are a number of really great books on the subject.
Actually, there are quite a few free CL books available online:
"Common Lisp: A Gentle Introduction to Symbolic Computation" covers the basics, but might be too gentle, depending on your level.
"Successful Lisp" is quite comprehensive, and IMHO the best online resource for learning CL, if you have already programmed a little in another language.
"Practical Common Lisp" aims to reach experienced programmers and surely is one of the best Lisp books available -- one of the few which explicitly try to explain "real world usage".
"On Lisp" is an interesting read for advanced CL programmers, mostly covering macros.
Besides those, there is the indispensable Hyperspec, a htmlized version of the standard, and CLtL2, which is was the pre-ANSI de facto standard (still valuable, since many people find it more accessible than the Hyperspec. At least it sometimes shows things from another perspective).
Finally, there is the Lisp Forum and c.l.lisp. Though there is much noise on c.l.l., you can get very insightful answers there and learn from the masters. As a newbie, one should try to post thoughtful questions on c.l.l., and have a thick skin.
Download, install, run http://download.plt-scheme.org/drscheme/.
Read its "Guide".
My thoughts, as a newcommer to lisp, would be to recommend Clojure (I have over the past six months played with Scheme and Emacs Lisp). I have only been playing with Clojure over the past couple of days.
Running on the JVM, means that most people allready have most of the Clojure enviroment, they only need to .jar files and a plugin for their editor or IDE (Java ones anyway) of choice. So getting running is easier then Scheme or CL in terms of choice.
Most new programmers are at the very least familar with Java, which Clojure of course utilizes pretty well, meaning that while they are learning they can focus on lisp, and a bit less on libraries. There is a lot of concepts that they are much better off focusing on.
On the downside, Java does have a lot of stigma against it. But Clojure has a lot going for it, and I believe a good future ahead, and the Programming Clojure is imho, very accessible, and both Joy of Clojure and Clojure in Action are comming some time soon.
Another great book to learn scheme and it's programming style, even more when you came from OO world it's better to start from scratch.
How to design programs

Is Clojure closer to Scheme or Common Lisp from a beginner's perspective? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
If I want to learn Clojure, should I start by learning Scheme or Common Lisp?
Or is Clojure different enough from both of these, that I should just start learning Clojure by itself?
It would be to your benefit to learn all three, if only so you can pick which one is best for your needs. All three have their own strengths and weaknesses.
Clojure is vaguely like Scheme in that it's a mostly-functional language and is a Lisp1. Clojure also borrows things from Common Lisp, like multimethods and macros, and people are always porting cool Common Lisp things to Clojure as libraries. The creator of Clojure was himself a Common Lisp hacker before writing Clojure. Clojure borrows a lot of terminology and conventions from Scheme and CL both (but also has its own flavors in many areas).
There is not a lot of literature for Clojure right now, it being such a new language (there is only one Clojure book so far). But there are loads of good Scheme-oriented books, like SICP and The Little Schemer / The Seasoned Schemer. There are also good CL books, like PCL, and many others.
Lisps also have a lot of history and it is to your benefit to understand the history, to see where and why Clojure deviates from it if nothing else.
I'd recommend starting with Scheme because it's the simplest language of the three and therefore easiest to learn. Then dabble in CL and Clojure until you have a handle on things, then go full-steam in whichever of the two you gravitate toward.
For your purposes I think you are safe to just start learning Clojure. The differences between Lisp and Scheme (and Clojure itself for that matter) shouldn't be a concern especially if you are just starting to learn.
My first Lisp learning experience was with Scheme, I've never touched Common Lisp (felt it was too complex), and am now starting on Clojure.
I used Dorai Sitaram's "Teach Yourself Scheme in Fixnum Days" to learn Scheme and got fairly far though I never really found myself wanting to use Scheme in real projects.
Clojure, because it purportedly gives nice, clean access to the huge universe of J2SE/J2EE libraries, on the other hand, encourages me to relearn this Lisp dialect because it may finally be of practical use.
As for which one to start with, I would say Scheme is simpler and so might be more appropriate to start with. On the other hand, if you have good Java and Python knowledge, you might not mind diving straight into Clojure because, unlike Scheme, it contains elements of these other two languages (e.g. data structures reminiscent of Python and JVM/Java API centric tutorials) and the familiar terrain might help.
Since I did come from all three (Java, Python, Scheme), I find myself in a good position to appreciate just what Clojure brings to the table that is different from Scheme. I'm no experienced Schemer, but I'd say that if you immediately start with Clojure, you will still get the general Lisp experience, so you definitely won't be missing that by forgoing Scheme.
It depends on whether you want to focus on learning or playing. If you really want to study Lisp, Scheme is a good place to start. If you'd rather play as you're learning Clojure is a better fit.
Eventually I think Clojure might be a better learning language. It's support for concurrency is really eye-opening. Few languages make it so simple for a beginner to write concurrent programs.

Which dialect of Lisp should I learn? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
I know there are a few different dialects of Lisp. Having decided that learning Lisp would be a new intellectual experience, I would like to know which Lisp dialect to learn, and why.
Is there one which is more popular than the others? Is any one of them more "complete", as in, better documented and supported? What are the pros and cons of this dialect?
You want to look for a balance between simplicity and cleanliness, attractive features, and a platform that will allow you to write interesting and useful software (to yourself) as well as serve as a learning tool. (This last will keep you going and learning for a lot longer.) Here are some possibilities:
Scheme. Probably the cleanest of all dialects. This is no doubt why The Little Schemer was translated from LISP into Scheme. The fifth Scheme standard specification, R5RS, is a wonderful education in and of itself; it may be the nicest language and library specification I've ever read, as well as the shortest that's reasonably comprehensive. The PLT Scheme (now Racket) platform includes a fairly decent interpreter and compiler, is good for scripting, and also has some visual tools that make it excellent for learning.
Common Lisp. Probably the most portable and comprehensive variant, this is most likely what you want if you want to be writing things such as commercial software. The standard defines extensive libraries, and many more are available beyond that, it has CLOS, which will probably teach you more about OO than any OO language could, and some of the compilers are very good. Disadvantages include some warts that Scheme doesn't have (such as having a separate namespace for variables that refer to functions), not being as clean and simple (as is the case with anything that has had to have the extensions and make the compromises necessary for large applications in the real world), not having hygienic macros, and emphasizing recursion much less than Scheme.
Clojure. This runs on the JVM, which may give it a leg up right there for Java developers. It's got a few warts (e.g., you must explicitly ask for tail call optimization, though this may change one day if TCO is added to the JVM). The macros, while not hygienic, do have some features to help you avoid variable capture, so you can capture variables if you really want to, while running less risk of accidentally doing so than in CL. You've got easy access to all the Java libraries; that's probably a good thing for "real world" code, and fairly pointless in terms of learning. It's got a set of libraries for persistent data structures and support for STM, which make it very interesting from a concurrent point of view; this makes it probably your best bet if you're interested in learning more about new methods of dealing with concurrent and parallel programming. It appears as if Clojure is as usable for large, production applications as Java, in the sense that it's going to have the ability to do the "ugly stuff" you do in production apps that you'd rather not do and don't do when you're learning.
Emacs Lisp. In terms of a LISP, this is not one of the better examples out there. One of its biggest faults is dynamic scoping, but there are many others. However, if you're an Emacs user, this may be the most powerful tool you can learn to improve your use of the editor. How much you'd really learn from learning Emacs Lisp, beyond how to extend Emacs, is for me an open question however; I don't know how often interesting techniques such as high-order functions are really used in Emacs Lisp.
2018 Update
It's been almost a decade since I wrote this post and the Lisp family of languages now appears to be gaining significant traction in the general programmer consciousness. Much of this appears to be related to Clojure which has not only become a properly separate dialect of Lisp in its own right, introducing many of its own good ideas, but also now has a near-identical version targeting JavaScript and has inspired many other Lisps targeting other platforms. For example, Hy targets the CPython AST and bytecode, aiming first for interoperability with Python, but using Clojure ideas "when in doubt." (Though from the latest commits, the latter may be changing a bit.)
The big change this brings in your decision-making process is that you should also be looking at whatever Lisps or Lisp-like languages are available for and interoperate with languages or platforms you already use, be it Perl, Ruby, Erlang, Go or even C++ on microcontrollers.
I would say Scheme, solely because of the Little Schemer, which is one of the most mind-blowingly fun yet extremely hard books I've ever tried to read.
I can recommend Common Lisp on SBCL. This combination is fast, powerful, mature and well-documented.
Also Clojure is a gaining a lot of mindshare these days, and for good reason. Great data structures, profoundly good concurrency support (puts Scheme and CL to shame in this regard), and a great community. It's also relatively simple, CL is as at least as complicated as C++.
This isn't to say I don't enjoy CL or Scheme. I learned Scheme with SICP. And CL brought me to Clojure. It all depends on your goals I suppose. If you want to learn a Lisp that is immensely practical go for Clojure. Otherwise CL or Scheme are both great.
I learned Scheme in school. It was a great learning experience and I will never forget the fundamentals of functional programming. It probably doesn't matter which version of LISP you pick up, as long as you understand the core of its usefulness - stateless lambda calculus.
Here's an interesting article on Why MIT switched from Scheme to Python in its introductory programming course.
I prefer CL, since I like object-oriented programming, and CLOS is the nicest object system around.
I would say all of them, at least at first. Eventually you will probably develop a preference for Scheme or Common Lisp, but they both have enough differences that it's best to get a handle on everything that's out there.
Scheme has continuations for example, and it's good to learn about those in Scheme, even though they can be implemented in Common Lisp.
Learning the difference between lexical and dynamic scope is important, and if you learn both Common Lisp and elisp you'll come across the implications of both.
LFE (Lisp Flavored Erlang) would be nice. You can have the lisp syntax on top of the Erlang VM.
Was a kind of "loaded" question to begin with but OP probably didn't know about it. Generally, Common and Scheme lispers are like PC and Apple computer "people", they don't mix. Which one is best is probably not as relevant as which one "works" for you. Really, there is not that much difference. Likely a preference for one over the other maybe influenced by which one you learn first. (To me, an empty list should be "nothing", known in CL as NIL, and that makes me a Common Lisper.) I like the integration of SBCL with Slime using EMACS, but SBCL is not for everyone. For one thing, SBCL is very strict. If you just want to "have fun" the GNU clisp is easy and available for virtually every platform.

What's the best way to learn LISP? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I have been programming in Python, PHP, Java and C for a couple or years now, and I just finished reading Hackers and Painters, so I would love to give LISP a try!
I understand its totally diferent from what i know and that it won't be easy. Also I think (please correct me if I'm wrong) there's way less community and development around LISP. So my question is: what's the best way to learn LISP?
I wouldn't mind buying books or investing some time. I just don't want it to be wasted.
The "final" idea would be to use LISP for web development, and I know that's not so common so... I know it's good to plan my learning before picking the first book or tutorial and spending lots of time on something that may not be the best way!
Thank you all for your answers!
edit: I read Practical Common Lisp and was: ... long, hard, interesting and definitely got me rolling in Lisp, after that i read the little schemer, and it was short, fun and very very good for my overall programming. So my recommendation would be to read first the little schemer, then (its a couple of hours and its worth it) if you decide lisp(or scheme or whatever dialect) is not what you where looking for, you will still have a very fun new way of thinking about recursion!
Try reading Practical Common Lisp, by Peter Seibel.
My personal favorite is Abelson & Sussman Structure and Interpretation of Computer Programs.
It uses Scheme, which is a nice and clean dialect of Lisp.
If you like a more practical approach maybe you should pick some Lisp framework for web design
(I have no idea if such a beast exists) and jump right in.
You might want to start with The Little Schemer as a warm-up. It's not a practical book about writing production Lisp programs, but it's a great book for learning how to think in Lisp.
MIT has made available an entire LISP course in DIVX and MPEG format. I highly recommend it.
http://groups.csail.mit.edu/mac/classes/6.001/abelson-sussman-lectures/
There is now a book out called 'Land of LISP' that teaches LISP programming through writing 80's style text games. I'm reading it now, and it's very well written and doesn't take itself too seriously, which I like.
There are several options here. First of all, Scheme and Common Lisp are fairly different in rather deep ways (like scoping); you should pick one to start with and stick with it for a while. I'm a Common Lisp fan, but that may be one of those vi-vs-EMACS religious questions.
For Scheme, go for Kent Dybvig's Scheme Programming Language, followed by SICP.
For Common Lisp, as well as Practical Common Lisp, I'd recommend David Lamkins's Successful Lisp. Successful Lisp is also available online for free.
After than, look at Lisp in Small Pieces by Queinnec, and Norvig's Lisp in AI book.
Marty Hall has a nice list at Johns Hopkins.
Updated: I don't mean stick to it forever, just that trying to learn both at once would be confusing.
Pick up The Land of Lisp by Conrad Barski. It is a fun filled introduction to Lisp programming using cartoons and games.
I'd recommend Project Euler as an excellent source of small bite-sized problems you can use to teach yourself any new programming language.
Ansi Common Lisp by Paul Graham is a good book.
I think it might be out of print, so your best bet to get it via Amazon.
I got the book for a "Natural Language Processing" class I took my sophomore year in college.
We had to write the programing projects in LISP, and so I needed to learn Lisp quickly.
The book helped me quite a bit.
Once I had a problem. I didn't know lisp. So I decided to download LISP in a box.
Then I found myself with an Emacs install without any help or documentation.
Then I had two problems.
For serious learners, I'd recommend PAIP from Norvig. It is an excellent resource to learn both Lisp and AI.
Berkeley offers CS61a in podcast format. This is an intro to CS class based around SICP. It's a more modern version than the 1982 videos MIT has available.
I'm working my way through Lisp right now and have come across "the book" to learn Lisp. It was suggested by Rainer Joswig
The book is called Common Lisp: A Gentle Introduction to Symbolic Computation and can be downloaded as a PDF. The author begins with a UML like approach to Lisp in the first chapter and gradually introduces more and more Lisp syntax.
I've also looked at practical lisp and I think that the author glosses over a lot of required information, even for a seasoned programmer. This book doesn't seem to do that (I'm not completely finished, but have found it useful enough to suggest).
one more thing, you'll need an environment to work in. I've found Lisp in a Box to work well. It runs on Windows and Linux and uses eMacs.
I've got attracted to LISP by its JVM dialect - Clojure. Clojure is sort of great LISP, since
it has "simplified syntax", that is less parathensis are required, there is cleverly design set of collections available
it is JVM based, so there is stable, performant runtime underneath, in addition whole Java ecosystem (libraries, e.g. database drivers, build tools, IDEs) is within our reach
Noir is a good web framework, apps can be deployed on Java web and applications servers
In other words, Clojure can be used in production right here, right now.
When it comes to resources, there are at least 4 books and planty online resources:
Books: "The joy of Clojure" - very insightful but can be difficult, so it's best read together with "Programming Clojure".
Online tutorials: Mark Volkmann tutorial is great
see also https://stackoverflow.com/questions/599519/which-tutorial-on-clojure-is-best
4Clojure website contains a number of simple programming tasks, so one can play with Clojure and see other people solutions
I enjoyed reading Practical Common LISP and ANSI Common LISP.
On LISP looks interesting, but at $190 seems a little expensive for a book.
For web development you might want to have a look at hunchentoot, a web server written in common lisp.
I found working through the exercises in "The Little Schemer" really helped hone the recursive, pattern-matching side of my thinking and made working in XSLT considerably easier.
I recommend Gentle Introduction to Symbolic Computation or Practical Common Lisp first, based on your programming experiences. For practicing, I use Allegro CL 8.2 Free Express Edition in Windows. It turns practicing into a lot of fun.
Sort of a difficult question to answer ... I think it all depends on your learning style.
I learned LISP in my A.I. and Expert Systems classes in college, but that's how I learn ... I'm not a great book learner, I prefer to have someone explain it to me in a class setting.
LISP is definitely a unique language and it requires a new train of thought if you're used to conventional C, Java, PHP programming.
Best of luck to you !
I found reading the book SICP really helped me learn. I used Steel Bank Common Lisp (SBCL) and had good success with it.
Good luck
I don't know that there's anything special about Lisp that makes it different from learning any other language. You just need to start using it and trying out its features.
One option might be to try a simple project.
Another option, that's specific for Lisp, would be to write an Emacs extension that assists you in your regular work.
Read these books in order: Gentle Introduction to Symbolic Computation, ANSI Common Lisp by Paul Graham and then move onto Practical Common Lisp. Or skip ACL and use it as a reference while working your way through PCL.