8 ms·
Successful Lisp: How to Understand and Use Common Lisp (1999)
- ra1231963 3y ago[flagged]
- dang 3y agoHN is doing great if it has all the Lisp and Haskell users.
- schemescape 3y agoJust started reading this and, as a newcomer, I’m finding it helpful because it explains not just what things do, but how they work (for example: the keyword package). I haven’t gotten far, but it’s an encouraging start.
- j_m_b 3y agoIn the web-app/API dominated world of modern software development what advantages and tradeoffs would a CL have over Clojure?
- schemescape 3y agoI’m definitely not qualified to answer, but other than not needing to worry about having a Java runtime environment, my impression is that Clojure doesn’t have a CL-like condition/restart system that allows for things like interactively dealing with errors and re-running/redefining functions in the middle of experiencing an error. CL also has multiple dispatch and I’m not sure but I don’t think Java supports that. I’m curious to see other responses. I’m also interested in the reverse: why Clojure over CL? (I assume integration with Java and immutable data structures, but there’s probably more.)
- cyberbanjo 3y agoJava I am unsure about, but Clojure does support multiple dispatch https://clojure.org/reference/multimethods https://clojure.org/reference/multimethods
- schemescape 3y agoThanks for the correction!
- amitprayal 3y agoI think Clojure syntax is more intuitive than CL , at least to someone who has not spend a lot of time in CL One e.g. I can see for "destructuring" (let [ [a b c] [1 2 3]] (+ a b c)) as opposed to (multiple-value-bind (a b c) (values 2 3 5) (+ a b c)) Also datastructres maps, sets sequence abstraction in Clojure seem more Organic...in CL its feels like bolted on
- Jach 3y agoI haven't used Clojure professionally in 10 years so with a grain of salt here are my thoughts as only one other person answered... CL over Clojure: it's the OG Lisp that the creator of Clojure used and wanted to continue using but faced too much resistance from management afraid of anything not-Java/not-Oracle, or not-CLR/not-Microsoft, etc. Clojure shipped originally as "just another jar" so devs could "sneak" it in. If you don't have such a management restriction, why Clojure? If you want to integrate CL with the JVM, you can use the ABCL implementation, there's also something from one of the proprietary Lisps. Some useful CL features that are nice in this domain: conditions and restarts mentioned in a sibling comment (very nice to help interactively develop/debug e.g. a selenium webdriver test), ability to easily compile an exe (perhaps useful for microservices, or just to keep your deployment environment clean and not having to care about Lisp), and ability to easily ship with an open local socket allowing you to SSH in (or SSH port forward) and debug/fix/poke around in production (JVM of course lets you attach debuggers to a running process, even certain billion+ dollar companies will have supervised/limited prod debugging sessions for various hairy cases, but it's not as interactive). You should never hear CL advocates claim you can't scale to large teams/groups of engineers or large multi-million-lines sized projects, though you might oddly hear Clojure advocates sometimes claim you can't (and shouldn't) scale to such large projects -- large groups of engineers are a non-issue for them as well though, the challenge is in hiring, not in the language somehow making it impossible to modularize and keep people from stepping on each other. Clojure over CL: its integration with the JVM is nicer than ABCL's, so if you do actually want a lot of the great world of Java stuff, it's easier to get at/you don't have to make a choice to enjoy things like state of the art GC or concurrency support. Database integration libraries are better. Clojure's philosophy of values are values is so much better. Access to libs (Clojure or Java) is via Maven, so it's a larger ecosystem with more self-integrating components (especially around monitoring/metrics) than what's available for Lisp via Quicklisp. Clojure is very opinionated, much of it quite tasteful, and that gives the whole ecosystem a certain consistency. (You can have immutable data structures in CL, you can if you want use [] for literal vectors and make them syntactically important e.g. in let bindings, but not everyone will be on board.) Even though its popularity seems to have stopped growing, at least at the same rate as e.g. Go which it was keeping pace with for a while, it's still popular enough with a bigger community; as a proxy measure there are multiple conferences around the world and good talks at adjacent conferences, whereas Lisp mostly just has one conference in Europe per year and only occasional the occasional project branching outside of that. If you're doing a client-side-heavy webapp, ClojureScript is still amazing, CL's answers there aren't very compelling with the exception of CLOG (https://github.com/rabbibotton/clog https://github.com/rabbibotton/clog) which takes an entirely different direction than the usual idea of translating/running Lisp on top of JavaScript and its popular frameworks.
- dang 3y agoRelated: Successful Lisp: How to Understand and Use Common Lisp - https://news.ycombinator.com/item?id=2087140 https://news.ycombinator.com/item?id=2087140 - Jan 2011 (7 comments) Successful Lisp: How to Understand and Use Common Lisp - https://news.ycombinator.com/item?id=1032553 https://news.ycombinator.com/item?id=1032553 - Jan 2010 (9 comments)
- deleted 3y ago[deleted]
- medo-bear 3y agoThis book is unique in that it offers a very good overview of Common Lisp concepts for beginners and professionals alike. There is some pretty advanced content in there presented in a very succint way. As for the date, please know that this book is about ANSI Common Lisp. That is it is about a standardised language. It is not implementation or hardware specific. Therefore 90%+ of the content is relevant today as it is when it was written. That is simply the nature of Common Lisp. If I was to make a Common Lisp lecture I would use this book and expand on the content where apropriate.
- jurgenaut23 3y ago23 years old, add the date please
- bradrn 3y ago(1999), that is.
- Narishma 3y agoI think it's older than that going by this quote from the first chapter. > The Lisp development systems on both my Mac and my PC run comfortably in anywhere from 4 to 8 megabytes of RAM. Less in a pinch. The integrated C++ development environments take anywhere from 12 to 20 megabytes. Both have comparable tools and facilities.
- deleted 3y ago[deleted]
- lukego 3y agoProbably pretty up-to-date, then :)
- theshrike79 3y agoToo bad, I was actually excited to see what kind of problem would benefit from Lisp in the 2020s
- susam 3y agoSeems like a nice book. I like that it gets into the fundamental stuff like setq, cond, let, list, cons, etc. quickly enough in the 3rd chapter. In my opinion, the sooner these concepts are introduced in a book, the better. I have found, at least from my own experience, that a programming language is best learnt by a mix of diving straight into it and writing small software that you care about with it and then supplementing that experience with the study of existing literature. When I began learning computer programming two decades ago, it was pretty much necessary to buy a good book and read as much of the book as possible chapter by chapter. For example, the first programming language book that I read was K&R and I read that cover to cover. It was quite formative in my journey of learning to program the computer. It took me a long time to start writing useful software but when I did, I had a pretty thorough knowledge of C. I have come to realise that these days, it is not uncommon for aspiring programmers to jump straight into developing software with a programming language determined by requirements. Not everyone has the time to read a book cover to cover. In fact, I myself learnt Python by jumping straight into developing tools that I needed for myself with it and then followed the official Python tutorial. My Common Lisp story was different. I began learning CL directly by browsing the Common Lisp Hyperspec (CLHS). It is not an approach you would find anyone recommending, and for good reasons. If someone wants to get started with quickly developing tools using Common Lisp, I would suggest bookmarking https://lispcookbook.github.io/cl-cookbook/ https://lispcookbook.github.io/cl-cookbook/ which is a great resource to look up common recipes for common tasks. Special thanks to @vindarel for maintaining the Lisp Cookbook. Don’t let the parentheses scare you. With proper tooling, they are no more distracting than, say, braces in other languages.
- vindarel 3y agoIt's a good book! Modern companions would be: - the Cookbook: https://lispcookbook.github.io/cl-cookbook/ https://lispcookbook.github.io/cl-cookbook/ (check out the editors section: Atom/Pulsar, VSCode, Sublime, Jetbrains, Lem...) - https://github.com/CodyReichert/awesome-cl https://github.com/CodyReichert/awesome-cl to find libraries Also: - https://stevelosh.com/blog/2018/08/a-road-to-common-lisp/ https://stevelosh.com/blog/2018/08/a-road-to-common-lisp/ - https://news.ycombinator.com/item?id=34321090 https://news.ycombinator.com/item?id=34321090 2022 in review
- macmac 3y agoThe Steve Losh link is dead for me. Here is one from the Wayback Machine: https://web.archive.org/web/20230505132018/https://stevelosh.com/blog/2018/08/a-road-to-common-lisp/ https://web.archive.org/web/20230505132018/https://stevelosh...
- bhiply 3y agoIs Lisp being used today for anything particularly significant, like C and JavaScript are, or is it merely a niche academic language, like Haskell and Rust?
- tmtvl 3y agoIf you consider Rust (is in the Windows and Linux kernels, powers Discord,...) a niche academic language, then I guess Common Lisp (used for the Grammarly backend, powers ITA software) is a niche academic language as well.
- the_duke 3y agoIf you consider Rust an academic language, you are quite a few years out of date. The language is in production at Google, Facebook, Amazon and Microsoft (including making it into the Windows kernel), and is slowly being included in Linux as well.
- esjeon 3y agoRust has been a practical language since the beginning. Not every experimental stuffs are academic, especially when concepts are not rigorously formulated. Rust has been a rolling language ever since it was created, so is hardly formal.
- vindarel 3y agoyes https://github.com/azzamsa/awesome-lisp-companies https://github.com/azzamsa/awesome-lisp-companies http://lisp-lang.org/success/ http://lisp-lang.org/success/ industrial theorem prover, design of Intel chips, quantum compilers... and little me, being more productive and having more fun than with python to deploy boring tools (read a DB, format the data, send to FTP servers, show a web interface...).
- BaculumMeumEst 3y agoNot really. It has some great ideas but its library ecosystem is weak and it has a fair amount of footguns and jank. It’s fun to use but it doesn’t really make sense to use it for most serious software projects, particularly those that want collaborators.
- jossclimb 3y agoWhat value would learning Lisp provide, if you're not curious and learning for the love of learning, or you're not an emacs user?
- gjvc 3y agoWhat value would learning Lisp provide, if you're not curious and learning for the love of learning, or you're not an emacs user? What do you want?! A dollar value addition to your salary? To answer your question: Knowing about an important and highly influential part of the industry in which you work. If that sort of thing is not important to you, by all means let it pass you by.
- teddyh 3y ago“LISP is worth learning for a different reason – the profound enlightenment experience you will have when you finally get it. That experience will make you a better programmer for the rest of your days, even if you never actually use LISP itself a lot.” — <http://www.catb.org/~esr/faqs/hacker-howto.html#skills1 http://www.catb.org/~esr/faqs/hacker-howto.html#skills1>
- gjvc 3y agoStill working and waiting for that profound enlightenment experience. Still hopeful.
- jimbokun 3y agoMaybe you had already picked up the concepts of Lisp from other languages. Although the approach to macros is still quite distinctive. To the point that if a language has Lisp like macros, it’s probably considered a Lisp.
- ra1231963 3y ago[flagged]
- packetlost 3y ago
- ur-whale 3y ago> Lisp, which seems to go to great lengths to isolate you from the details of machine organization. Right there, along with Haskell is exactly why Lisp was never an option for me. And much like the author, I've been subjected to the darn thing multiple times since an early age (the 80's). [EDIT]: and most notably missing from the list: The Lisp ecosystem is pretty much impossible to understand. There are so many flavors of the darn thing none of which are interoperable with the others. Every time I found something written in some random dialect of Lisp, there's always a missing piece to get it to run on my machines unless it's a 20 line coding exercise. I've also never found a list that explains why "this Lisp is different from that Lisp because ..." . Everyone in that world seems to assume their favorite patois is the best thing since sliced cheese. Seen from the outside, it's a giant mess. Makes it impossible to pick the right tool for the job.
- wudangmonk 3y agoI feel the exact same way about Python, and Javascript and everyone seems to use and sometimes even likes those giant messes so we can assume for sure that giant messes aren't really the problem here.
- anthk 3y agoThere's the Common Lisp standard with the Quicklisp library manager being almost fully compatible with SBCL, ECL, Clisp... (the performance will vary a lot, tho), and then there's Scheme, the LISP cousin. For programming, the best env for CL it's Emacs and Slime, and for Scheme there's Emacs and Geiser. For further programming, Org-babel from Org-Mode wth the accompanying modules for Slime/Geiser with ob-scheme or ob-lisp. Emacs with Org-Babel it's like having an anotated REPL with options to put anotated marks, graphics and/or export it to ODF or PDF. Kinda like the Python/Jupyter notebooks but with superpowers.
- whartung 3y agoPart of the problem is that most anything that uses S-expressions is called a Lisp. And there are dozens of these languages. You see a headline “Did amazing thing using Lisp!!” and find that it’s actually more “Did amazing thing with A Lisp”, and, typically, not the Lisp you like to use. Nobody calls C, Java, C#, C++, Pascal, D, etc. an “Algol” or whatever generic term might apply to this family of languages. “DOOM is written in Algol”. But this happens all the time with Lisps.
- avodonosov 3y agoAlso Practical Common Lisp: https://gigamonkeys.com/book/ https://gigamonkeys.com/book/
- user6723 3y agoStatically typed Lisp for the win https://carp-lang.github.io/carp-docs/core/Pointer.html https://carp-lang.github.io/carp-docs/core/Pointer.html
- tmtvl 3y agoIndeed, I also like statically typed Lisp: https://quickref.common-lisp.net/defstar.html https://quickref.common-lisp.net/defstar.html EDIT: to be fair, Coalton seems even more interesting than defstar, but it has issues with mutation.
- reikonomusha 3y agoHindley-Milner has the very standard and well-known problem with polymorphic mutation [1]. There is no issue with setting an array of floats or something like that. It's only when you assign a polymorphic value cell with one type, then subsequently with another type. This is not unique to Coalton. Any HM-based language that defines mutation primitives has it, including Haskell and OCaml. These languages don't "solve" it a sense most people think, instead they provide some sort of restriction or workaround to the HM theory to make mutation constructs feasible. There's a huge space of possible solutions, including ensuring functional purity with monads (Haskell) to using weak polymorphism (OCaml) to using Wright's value restriction (eliminate invalid mutations, but also eliminate tons of reasonable, valid programs). Coalton developers know of the HM deficiency and described it very well here [2]. It looks like they're building out more important parts of the language that affect their users more seriously (e.g., adding records) before making a hugely consequential design decision around mutation, which people don't seem to bump into much. It doesn't seem to have stopped them from building interesting software in the slightest. [3] [1] https://en.wikipedia.org/wiki/Value_restriction#A_Counter_Example_to_Type_Safety https://en.wikipedia.org/wiki/Value_restriction#A_Counter_Ex... [2] https://github.com/coalton-lang/coalton/issues/84 https://github.com/coalton-lang/coalton/issues/84 [3] https://coalton-lang.github.io/20220906-quantum-compiler/ https://coalton-lang.github.io/20220906-quantum-compiler/
- medo-bear 3y ago
- vrglvrglvrgl 3y ago[dead]