8 ms·
I Just Can't Kick Lisp
- sleepycatgirl 4y agoLisp is cute I love the syntax, the REPL-driven development to which not many languages can come close (Smalltalk I think has something similar?)
- smitty1e 4y agoThe further I get into python, the more inclined I am to work with the REPL.
- zlurker 4y agoHow would it compare to other REPL languages? EG: Python, Scala or Julia?
- sleepycatgirl 4y agoMore integration, and it's more powerful. With python, you less so use REPL for development, and more for testing, while in Common Lisp, you develop with it. You have REPL running, you can evaluate functions, and definitions on the fly, or completely re-define the function, even if said function is being called in a loop by other one, and it will work. Or, redefine classes, and it will be fine. Or, if function errors, debugger gets launched, and you have option to redefine variables, and the function will continue with that variable (if, you called undefined variable) Though, I believe, its better to see how it works, rather than read, While the video is not mine, https://www.youtube.com/watch?v=6pMyhrDcMzw https://www.youtube.com/watch?v=6pMyhrDcMzw And remember, this is not hot reloading.
- vindarel 4y agoThis is my attempt at explaining but honestly it is not so easy! https://lisp-journey.gitlab.io/pythonvslisp/ https://lisp-journey.gitlab.io/pythonvslisp/ see also https://mikelevins.github.io/posts/2020-12-18-repl-driven/ https://mikelevins.github.io/posts/2020-12-18-repl-driven/ It is actually not about a "REPL" but "image-based" development. It is WAY ahead of the Python REPL, which was already a relief for me. The Python REPL is archaic in comparison.
- draegtun 4y agoThe REPLs that come with Lisp, Smalltalk & Factor are in a different league. There's probably a few different reasons to why but one thing that the 3 i've listed above all have in common is that they have image-based environments. So thats probably one of the top reasons why they have superior REPLs.
- waynecochran 4y agoLisp was my favorite prototype language… I could write programs 10x faster in Lisp. Lisp also made me a better programmer and taught me the superiority of functional programming.
- boppo1 4y agoHow did you learn Lisp? I'm a newbie programmer* and started with SICP but found the exercises too challenging and switched to K&R and Stroustrup. *many years writing python spaghetti to accomplish personal tasks, just now trying to build an employable foundation..
- mbustamanter 4y agoI just started reading SICP yesterday after being convinced by PG's essays [0] and I would suggest just looking at the solutions, since the first chapter relies heavily on number theory concepts, and the authors say they take that choice because it makes introduction to more abstract ideas easier (as a math grad student I'm already on page 110). I personally think that to someone without a background in higher arithmetic it would be a bit boring, so I repeat that it wouldn't hurt to look at some solutions to get a feel to it [1]. The book is MIND-BLOWING and after years of C++ and Python I'm really excited of what I will find in the next chapers. [0] http://www.paulgraham.com/avg.html http://www.paulgraham.com/avg.html (referenced in the top link blog post) [1] http://community.schemewiki.org/?SICP-Solutions http://community.schemewiki.org/?SICP-Solutions
- cudderlover 4y agoWhy is this so upvoted? There's nothing interesting here, it's just some guy saying he likes using Lisp.
- the_third_wave 4y agoQuidquid Lisp dictum sit, altum videtur.
- guestbest 4y agoMaybe it was a bait and switch link.
- steve_taylor 4y agoIt doesn’t have a lot of votes. HN is curated. There’s a handful of ways to get the top spot. Writing about Lisp is one of them.
- yakubin 4y ago30 votes in an hour is a lot and easily gets you on the front page.
- drekipus 4y agoWasn't there some discussion on "the tribe of day you post doesn't matter" ? Because I feel like that would fly in the face of that. (IE: assuming more Americans are in hn, you would want to pay at the American hours and get more votes over a shorter amount of time)
- perihelions 4y agoIt's currently tied for 4th for the highest upvote rate, of the 30 posts on the front page. This isn't pg secretly manipulating HN to boost Common Lisp blogs; we're just organically crazy. (I'm also confused who's enthusiastically upvoting 3-paragraph long text blogs). 52.7 points/minute :: "Sauna use as a lifestyle practice to extend healthspan (sciencedirect.com)" 38.0 points/minute :: "Japan WWII poison gas agents still scarring people today (mainichi.jp)" 36.8 points/minute :: "Baker's Math (thefreshloaf.com)" 36.0 points/minute :: "Cobra Maneuver (wikipedia.org)" 36.0 points/minute :: "I Just Can't Kick Lisp (djha.skin)" 33.0 points/minute :: "Ubisoft+Bungie Scrambling to Evacuate Players Games from Capsizing Google Stadia (forbes.com/sites/paultassi)" &c...
- nonrandomstring 4y agoInteresting claim implied here, and maybe some truth in it, that there are highbrow code cultures that attract 'better' types of hacker to the club. Personally I've never felt ashamed to roll up my sleeves and get some oil in my beard with C++. Perl, Python or really filthy Bash scripting. But having learned Lisp (SICP) back in the 80s, It does sometimes feel like I took Latin and Greek at prep-school, and ever since have been slumming it with my working class coder pals. Total geek snobbery for sure. But is there anything in it? Please say no.
- Kalium 4y agoI've known engineers who would swear up, down, and center that using Haskell or Lisp or Clojure made them more productive. More features, better, and faster. From the outside, I didn't see any evidence of this. The people who were better and more experienced engineers tended to produce more, better, and faster. I saw that they were happier using the tools of choice. As far as I could tell the supposed extra productivity over Rails or some other modern framework for the task at hand was largely illusory. On the one hand, happier engineers is good. On the other hand, code in relatively obscure languages is more difficult to find people to maintain and libraries are less likely to be kept patched by the community. It's a tradeoff. I wouldn't say one is better. The primary gain from Lisp and similar is, in my experience, not that it's useful for writing software. It's that learning a different approach teaches you new ways to attack problems. Sometimes those are useful.
- rad_gruchalski 4y ago> From the outside, I didn't see any evidence of this. The people who were better and more experienced engineers tended to produce more, better, and faster. I saw that they were happier using the tools of choice. As far as I could tell the supposed extra productivity over Rails or some other modern framework for the task at hand was largely illusory. I don’t think the claim is that one has to use those older technologies exclusively. I read the GP’s comment as that the knowledge one gains by learning those older technologies gives one more tools in their bag when using modern technology. > The primary gain from Lisp and similar is, in my experience, not that it's useful for writing software. It's that learning a different approach teaches you new ways to attack problems. Sometimes those are useful. Exactly. An example: trying to learn functional programming? Erlang will force one into that mindset. It is natural to spot mapping, folding, flattening in any other language later on. Working with local data, or state machines becomes a habit because there’s no other way of doing things in Erlang. That knowledge is directly applicable in any other language.
- pstuart 4y agoI wanted to love Lisp after learning about it in "Gödel, Escher, Bach", and then in PG's Blub essay (which is why I'm a HN fan). The syntax is just off-putting and I was never compelled to learn it in school, so I remain in algol-land. If time and focus allowed I'd do the SICP self study path but it's too easy to surf HN and Reddit instead.
- Test0129 4y agoSICP is a good way to learn about programming from first principles. It is not the best way to learn CL. CL and scheme are extremely different despite having similar roots.
- lispm 4y agoIt's not even the best book to learn actual Scheme. SICP's main purpose is to teach computer science basics using a tiny subset of Scheme (no macros, no error handling, no libraries, ...).
- throwaway81523 4y agoScheme didn't have macros when SICP was first written, iirc.
- nemoniac 4y agoScheme already had macros in 1975 [1] SICP was first published in 1984 [2] [1] https://stackoverflow.com/a/69261645/3414663 https://stackoverflow.com/a/69261645/3414663 [2] https://en.wikipedia.org/wiki/Structure_and_Interpretation_of_Computer_Programs https://en.wikipedia.org/wiki/Structure_and_Interpretation_o...
- throwaway81523 4y agoThat says (some) implementations had macros from the beginning, though those macros were much different than what was eventually standardized in (I think) r5rs. I guess I can believe that. I don't know when Guile got macros. Philip Wadler's paper discussed and linked from here is also interesting: https://www.wisdomandwonder.com/link/1055/why-calculating-is-better-than-scheming https://www.wisdomandwonder.com/link/1055/why-calculating-is...
- Test0129 4y ago> He's right. Not just for Common Lisp, either. But I just can't kick lisp. And on the other side of that coin, if I think I will only ever develop a project on a small team, the nimbleness of Lisp helps. I feel like Lisp is custom built for high functioning, high quality, low-head-count teams. I kinda feel like most of my projects into this category. The original linked article is a promotion for Julia with some decent criticisms of CL. CL has a special place in my heart. I want to love it. I programmed in it, bought just about every book I could to learn about it, etc. But CL was just a huge time sink to do anything to me. Ignoring my (lack of) skill with it I found it was difficult to really find help (though the CL IRC channel is active and probably the nicest community in programming). Everything still felt strange to me 6 months in and even with other similarly good languages this usually doesn't occur. For example, with SBCL and Quicklisp it felt like even getting a database connection set up was pulling teeth. I found the problem of having dozens of implementations hard to cope with as well. SBCL is a standard and it can be quick (sometimes as quick as C). But there's also Allegro, LispWorks, and several others. Each one of them has their own quirks you have to know. If I wanted to develop well on Windows you were pretty much siloed into LispWorks and the extremely high costs to use it. In fact, Allegro and LispWorks both make IDA Pro's pricing look reasonable and come close to rivaling some CAD software. Making SBCL work on Windows was kind of a pain but workable. But then you have to deal with the package managers like Quicklisp which are great...but so many extra steps to get stuff done. Finally, I found it extremely difficult to work with CL outside of Emacs (which I like a lot and am quite familiar) especially with my career forcing a choice between Sublime or Vscode. I think CL should inspire similar languages. I fell in love with Clojure but dropped it because its community is dwindling. It's commercial uses have dwindled which made me sad. It also couldn't be compiled like other Lisps and lacked the "general purpose" feel to it (having chosen it's domain for concurrent programming I felt). I long for a popular, modernized lisp with all the benefits of the other lisps, except with a better package manager, a community united in a single direction, and lots of support.
- vindarel 4y agoMy experience wasn't a smooth sailing either, but I want to say to readers that stuff is probably better today: "getting a database connection set up was pulling teeth." => https://lispcookbook.github.io/cl-cookbook/databases.html https://lispcookbook.github.io/cl-cookbook/databases.html Use cl-dbi (connection layer) or Mito (light ORM) and do: (mito:connect-toplevel :sqlite3 :database-name "myapp") ;; also mysql and postgres "having dozens of implementations hard to cope with" => you don't have to cope with so many, or any at all. Use one implementation if it suits you well. "develop well on Windows" => SBCL works fine as of today. "extremely difficult to work with CL outside of Emacs" => solved or being solved. See the plugins for Vim, Atom, Sublime, VSCode, Jupyter, Geany… and more. Also Portacle (a portable Emacs for CL), the Lem editor, the free LispWorks IDE… https://lispcookbook.github.io/cl-cookbook/editor-support.html https://lispcookbook.github.io/cl-cookbook/editor-support.ht... "a better package manager" => Quicklisp is great (easy to use, easy smoothing) but with shortcomings. See CLPM, the Ultralisp distribution, Qlot. "lots of support." there's room for anybody I guess: pro support (LispWorks, Allegro…), helpful community (reddit, Discord, pro mailing list…)
- ausbah 4y agothere's nothing of substance in this post? why is this upvoted?
- beders 4y agoTo fellow lispers struggling with curse of parens. Adopt structural editing like paredit. You are going to miss it when coding in other languages. Here's an example: https://calva.io/paredit/ https://calva.io/paredit/
- beders 4y agoand you can learn a few basic moves and go from there: barf forward/backward is already a great improvement.
- tut-urut-utut 4y agoOr just use parinfer. You don’t need to learn anything, it just works.
- cwzwarich 4y agoI used to be a religious devotee to Lisp, but then I started programming for a living and realized that static type systems (even of the simplest variety) are so helpful for preventing bugs. Unfortunately, I never found a typed variant of Lisp that I really liked; the uniform Lisp syntax doesn't collide well with the stratification of types and values.
- ausbah 4y agohave you ever tried typed racket?
- iamevn 4y agoI really like Racket and write as much as I can in Typed Racket. It's great but also has lots of weird little warts that I keep stumbling across. One of the biggest for me is that type signatures completely take the place of untyped Racket's contracts. It's way too difficult to have both types and contracts attached to things. Ideally one could write a contract for things that are not able to be expressed in the type system but Typed Racket doesn't let you.
- medo-bear 4y ago>I used to be a religious devotee to Lisp, but then I started programming for a living and realized that static type systems so you just switched religions ?
- sph 4y agoYeah but this one has got all the answers!
- aidenn0 4y agoYou might want to look at coalton[1]. It's a common lisp ML alike.
- reikonomusha 4y agoMore info: https://coalton-lang.github.io/20211010-introducing-coalton/ https://coalton-lang.github.io/20211010-introducing-coalton/
- yuan43 4y ago> I recently read mfiano's blog post about Common Lisp. He makes the point that the language attracts loners. ... That article by mfiano focuses on reasons the author switched from Lisp to Julia. As for the "loners" part, mfiano says this: > This hints at a very real problem with Common Lisp: it has a tendency to attract people that employ the 'NIH syndrome' and refuse to collaborate. There is a large overlap of software available, and there is a large selection of low-hanging fruit for new developers. This coupled with the fact that the language is small, relatively speaking, hurts the language immensely. Contrast this with how djha (TFA) puts it: > I feel like Lisp is custom built for high functioning, high quality, low-head-count teams. I kinda feel like most of my projects into this category. So TFA is kind of taking liberties with mfiano's post. I might come down to whether or not you view NIH syndrome as a net positive or negative.
- creepycrawler 4y agoWhat does "refuse to collaborate" even mean? There are multiple people who submit patches to free Lisp software. There are companies where Lisp people work together. There is free help offered in various Lisp fora. Perhaps the author didn't receive free help on his own projects? Perhaps he didn't offer free help on other people's projects?
- splistud 4y ago
- agumonkey 4y ago> I feel like Lisp is custom built for high functioning, high quality, low-head-count teams. sounds like heaven
- jcynix 4y agoLisp was my first real programming language many years ago and the superior environment of Lisp machines (which I had the chance to use from the mid-80s until the mid-90s) is what I still miss today. I dabbled with Fortran IV and Pascal too early on, a bit later with C too, at the same time, but I always found the need to manually manage storage (How long to plan a string? Or how large should an array be?) annoying. Lisp offered me the freedom to think (and program) in abstract terms. As did (and does), BTW, Perl (especially with regexps, another great abstract tool), where memory management is nothing to care about unless your RAM isn't sufficient ;-0) When I had to describe the different programming languages to lay people, I used to compare programming in Lisp with using a helicopter and a camera to collect data for map production, while other languages are similar to some earth bound vehicles and a tape measure. Yes, learning to fly a helicopter is more complicated than learning to drive (a bicycle or car) but once you managed the learning curve, you could produce much better results much faster (aka prototyping). And, of course, there are fewer pilots than drivers to chat with. Here's an interesting (not so recent) talk by Peter Norvig where he summarized the Lisp perspective: "Lisp: Where Do We Come From? What Are We? Where Are We Going?" http://www.norvig.com/lisp_talk_final.htm http://www.norvig.com/lisp_talk_final.htm
- kaveh808 4y agoI had a similar experience, doing my first 3D graphics development on Symbolics Lisp Machines back in the 80's [1], and then spending my career developing 3D CG code in Fortran, C, and C++, missing the Lisp experience the whole time. Some of the milestones along the way: - Developed 3D animation software used to animate the dinosaurs in “Jurassic Park”. - Software R&D lead for CGI feature “Final Fantasy: The Spirits Within”. - Senior Software Developer on “The Hobbit” films. Now I have returned to Common Lisp with a new open source 3D system [2], and it feels really good. As I deliberate over innumerable design decisions, the one thing I have told myself I will not consider changing is the choice of language. New, popular, hot, trendy languages (Clojure, Julia) may monopolize the conversation, but I am content with what Common Lisp allows me to do. [1]: https://kaveh808.medium.com/late-night-lisp-machine-hacking-d22a0e2d83fa https://kaveh808.medium.com/late-night-lisp-machine-hacking-... [2]: https://github.com/kaveh808/kons-9 https://github.com/kaveh808/kons-9 I should re-read the Norvig paper...
- ElfinTrousers 4y agoWell, I'm about to post perhaps the most controversial opinion anyone ever dared express about Lisp on this site, so maybe strap in and/or have a shot of the hard stuff: It's a perfectly good programming language, but nothing special.