5 ms·
> I have met a lot of people who said that they could do things with Lisp 20, 30 years ago that languages either cannot do today, or could only do recently. >
by jdmichal 5y ago
> I have met a lot of people who said that they could do things with Lisp 20, 30 years ago that languages either cannot do today, or could only do recently.
> It looks to me like the Lisp community knows something the rest of the world does not. They are not searching for the next hot thing. They seem to understand things on a deeper level than other communities. Perhaps “enlightenment” is not an overwrought term to use.
For those that haven't read this before. For me, any article making claims like this simply brings to mind the Lisp Curse:
http://web.archive.org/web/20210617140457/http://www.winestockwebdesign.com/Essays/Lisp_Curse.html http://web.archive.org/web/20210617140457/http://www.winesto...
(Not currently available... Last snapshot is from June, so unsure whether this is permanent or just temporary.)
Lisp is extremely flexible as a language. The core is very small, especially if you look at something like Scheme. But it lets you easily create and extend the language into what practically becomes a domain-specific language (DSL) for whatever problem you're working on.
Except what this really does is push things from being technical issues to being social issues. Sure, maybe I know Lisp. But how long is it going to take me to learn what your ultra-customized, macro-laden particular flavor of Lisp? And one has to do that for every single new project requiring coordination...
Lisp is not one language, but a wide variety of personal languages that happen to share a common core and syntax.
- codetrotter 5y agoFrom the page you linked: > Check out the note for the first entry: Come on, everyone! Let's beat the dead horse one more time! And indeed, it does say that at https://hn.algolia.com/?q=the+lisp+curse https://hn.algolia.com/?q=the+lisp+curse below the entry for https://news.ycombinator.com/item?id=2450973 https://news.ycombinator.com/item?id=2450973 But what's weird is it doesn't appear on the page https://news.ycombinator.com/item?id=2450973 https://news.ycombinator.com/item?id=2450973 itself nor anywhere in the page source that I can find. But going back to https://hn.algolia.com/?q=the+lisp+curse https://hn.algolia.com/?q=the+lisp+curse, and looking at the source it says that it's the story comment. So if I understand correctly, even though when you submit a story with a link it does not include the text if you write one, it seems that it's still stored on the HN server and returned from the HN API that Algolia gets its data from. Just found this interesting. And I wonder how many other stories have a "hidden text" like this. If the Google BigQuery or what it's called dataset includes this same data it should be a simple thing to find all such stories.
- jdmichal 5y agoI noticed that also. I've never seen it on anything other than that one search.
- codetrotter 5y agoI gave it a go with Google BigQuery: https://console.cloud.google.com/marketplace/details/y-combinator/hacker-news https://console.cloud.google.com/marketplace/details/y-combi... First, number of stories where url begins with "http". SELECT COUNT(*) FROM `bigquery-public-data.hacker_news.stories` WHERE INSTR(url, "http") = 1; Output: 1729544 Then, number of stories with non-zero length text: SELECT COUNT(*) FROM `bigquery-public-data.hacker_news.stories` WHERE CHAR_LENGTH(text) > 0; Output: 218726 And then, this should be the number of stories that has both. SELECT COUNT(*) FROM `bigquery-public-data.hacker_news.stories` WHERE INSTR(url, "http") = 1 AND CHAR_LENGTH(text) > 0; Output: 113550 Seemed like an awfully high number though. SELECT * FROM `bigquery-public-data.hacker_news.stories` WHERE INSTR(url, "http") = 1 AND CHAR_LENGTH(text) > 0 LIMIT 3; Ah. I see then that there's a lot of spam posts. (Note: The order of the rows may be different from run to run I think, and I didn't feel like adding "order by" stuff. So it could be that you don't see the spam from issuing this one query above.) Anyways, let's require score > 0. SELECT COUNT(*) FROM `bigquery-public-data.hacker_news.stories` WHERE score > 0 AND INSTR(url, "http") = 1 AND CHAR_LENGTH(text) > 0; Output: 113322 Still really high. Let's limit ourselves to score > 25. SELECT COUNT(*) FROM `bigquery-public-data.hacker_news.stories` WHERE score > 25 AND INSTR(url, "http") = 1 AND CHAR_LENGTH(text) > 0; Output: 1677 Ah, that's better. And somewhere between? Say, with score > 8. SELECT COUNT(*) FROM `bigquery-public-data.hacker_news.stories` WHERE score > 8 AND INSTR(url, "http") = 1 AND CHAR_LENGTH(text) > 0; Output: 3458 And let's look at some of them. SELECT * FROM `bigquery-public-data.hacker_news.stories` WHERE score > 8 AND INSTR(url, "http") = 1 AND CHAR_LENGTH(text) > 0 LIMIT 5; Here's one of the ones I get: Title: Calling the NSA: "I accidentally deleted an e-mail, can you help me recover it?". Text: A nice thought and practically the same thing that Google does. You hand in your privacy, but you get services back in return. Id: 6306219. Discussion: https://news.ycombinator.com/item?id=6306219 https://news.ycombinator.com/item?id=6306219 Seems pretty clear that this is an example of a comment to go along with the submission. And it was preserved, although not shown in the thread as we know. And with Algolia we indeed get the story comment shown as well. https://hn.algolia.com/?q=%09Calling+the+NSA%3A+%22I+accidentally+deleted+an+e-mail%2C+can+you+help+me+recover+it%3F%22 https://hn.algolia.com/?q=%09Calling+the+NSA%3A+%22I+acciden... Well, there you have it! So this also makes me realize that third-party HN clients could use this to offer users the ability to write and to see story texts that don't display on HN itself due to there being an URL attached to the story, but which are still stored on the HN servers and returned by the HN API. That's pretty neat :)
- rscho 5y agoSo, a language that excels when used by small teams and lone hackers... which BTW describes academic research perfectly. Of course if you have an army of programmers working in parallel on a 1M loc codebase, you won't want something too flexible. Right tool for the right environment! Try to make something like MediKanren in a mainstream language, and the advantage of lisp languages will become immediately apparent.
- Zababa 5y ago> So, a language that excels when used by small teams and lone hackers... When you're trying to do something that hasn't been already done programming-wise. For most other cases you would be better served by a language with a healthy and large ecosystem.
- rscho 5y agoI agree, and this translates into the real world. That's exactly what lisp has been and is used for (research in quantum computing, for a current example). Still, it's not a bad thing to try to extend the user base as it translates to more libs and better implementations. Many new things are mostly same-old same-old with a sprinkle of 'new' glitter on top!
- bitwize 5y agoIf you have an army of programmers working on 1M LOC, there's a very good chance you're working on something overcomplicated for the problem it's trying to solve. Padding out your CV by inflating your budget/team size numbers, eh? :) Lisp gets a single programmer leverage over large, complicated problems, and puts even complex projects within the reach of small teams. In the 80s, Symbolics had the stated goal of making very large projects feasible by a small team, and anything smaller within the reach of a single developer. Ambitious, to be sure, but given the CF that is enterprise development, it shouldn't be ruled out as something to reach for.
- mlang23 5y agoYour criticism seems to apply to every DSL, which in my mind makes it too generic and therefore invalid. It also reminds me of the argument which was used to push Java in the corporate world. "We need a language which protects us from the dumb programmers we hired to save money" Understanding someone elses code is always a challenge. Outlawing custom abstractions in favour of a few very shallow ones doesnt seem like a convincing thechnical argument.
- snek_case 5y ago> Your criticism seems to apply to every DSL, which in my mind makes it too generic and therefore invalid The problem is that LISP macros are extremely powerful. The DSLs you can design don't always neatly fit into a box and integrate seamlessly. They're leaky abstractions. You don't necessarily know what's a function or a macro. You don't necessarily know that a macro isn't doing lazy evaluation or redefining some operators you're familiar with. Programming languages aren't just about coding, they're also about having a shared language that other people can understand. If you introduce 500 new syntactic forms that you designed yourself into your code, and newcomers have to look them all up to really understand what's going on, that makes it much harder for new people to onboard. LISP loops minimalistic on the surface, but it's kind of a lie. In practice it's easy for it to become exactly the opposite of that.
- taeric 5y agoThis is the popular narrative. But it is talked about more than it happens. In most lisps, few stray from the basic data structures, such that the data you can get is usable basically everywhere. Contrasted with many Java libraries, where coding a library locks you in to said library. Yes, a few have tried to keep interface compatibility with the core collections. I'd hope most do, nowadays. But that really just highlights that we are both talking of previous year's mistakes. My hypothesis is it comes from novice attitudes in building everything as a masterpiece. As the community matures, things tend to stabilize.
- mlang23 5y agoI believe a DSL-done-right doesnt care about the issues you mention. The important thing about DSLs is the DS, Domain-specific. The domain experts care about a nice language fitted for their specific domain. But they dont care about evaluation order, macros, lazyness, and whatnot. If the DSL fits the domain, these are non-issues.
- 7thaccount 5y agoI read a lot of these articles early on and then bought a few lisp books and read them cover to cover. My observations were as follows: 1.) If I needed to do some really crazy stuff (like I imagine what grammerly does) then lisp might be the right tool. I know it is far more performant than the scripting languages (really closer to the C end of the spectrum), but I seldom need raw performance (your mileage may vary widely). 2.) 99.99% of my own work or hobby projects were better served by more mainstream tools like Python, Bash, PowerShell, C++...etc as all those tools either had built-in data structures that were easier to use, or better integrated with the OS, or they had massive ecosystems of scientific, plotting, GUI...etc, far in advance of anything that the lisp ecosystem has. You can talk about blub languages all you want, but when I can write a short little script with Python to remotely control an application using the only API they provide (Python) and then start doing something else, there is a clear winner from a software tool choice even if the lisp language itself is a better design in a multitude of ways. The tool I have where I feel like I have an insane amount of power that isn't widely known is Wolfram Mathematica. It shares a bit with lisp in that all computing has a REPL, you can see the AST & intermediate calculations, all the command names use a pretty consistent notation like GraphPlot[]. Documentation is really good and there are primitives for pretty much everything from graph networks to matrices to neural networks to GUIs and 3D plotting ...audio, Blockchain....the list goes on and on. It's a commercial tool which sucks, but doing R&D with it is like using secret alien tech. I could literally copy paste an image of certain things I wanted to use in my network (node diagram) as vertices, build that graph, start doing computations on it like max flow or traveling salesman. I could then just grab the graphs output picture and feed it as an input into some other command and get the AdjacencyMatrix and then do other computations on that. I still love Python for code I need to share with coworkers who don't have a Mathematica license, but it is truly some amazing technology.
- bradrn 5y ago> The tool I have where I feel like I have an insane amount of power that isn't widely known is Wolfram Mathematica I’m pretty sure I’ve heard that the Wolfram Language is in fact considered a Lisp, albeit one using M-expressions rather than S-expressions [0]. But I can’t seem to find a source for this though. [0] https://en.wikipedia.org/wiki/M-expression https://en.wikipedia.org/wiki/M-expression
- mikewarot 5y ago>But how long is it going to take me to learn what your ultra-customized, macro-laden particular flavor of Lisp? And one has to do that for every single new project requiring coordination... This is also one of the two major problems that Forth has. The other is the lack of types and non-stack data structures.
- mumblemumble 5y ago> But how long is it going to take me to learn what your ultra-customized, macro-laden particular flavor of Lisp? I think that the big thing to recognize about Racket is that its approach is not really to do that. It's to implement complete, well-specified domain-specific languages that live on top of Racket. What's unique about it is that they've put a lot of thought into how to set you up for success in doing this, so that your DSL retains a high level of compatibility with the core language and other DSLs, without any particularly special effort on your part. The other thing to keep in mind is that Lisp, particularly the Racket community, tends to favor stratified design (https://dspace.mit.edu/handle/1721.1/6064 https://dspace.mit.edu/handle/1721.1/6064). So when you think about the level of coordination involved, don't think in terms of a tangle of DSLs and macros all vying for control of the same conceptual space. Think of it in terms of layers. The goal is usually something more like a lower-friction version of the relationship between Lua and C, or Python and C++, or even TypeScript and JavaScript. There's an online book, Beautiful Racket (https://beautifulracket.com/ https://beautifulracket.com/) that serves as a really great illustration of how it all comes together.
- sigstoat 5y ago> But how long is it going to take me to learn what your ultra-customized, macro-laden particular flavor of Lisp? can you point to any instances of someone actually doing this? (bonus points if you're willing to say "paul graham and arc")
- threatofrain 5y agoDSL's have been proliferating as of late in the dev ops / IT space, such as with Kubernetes, Ansible, Terraform, etc. On the frontend we also have Vue. I personally would've rather them use Lisp than tack on their own conditionals and loops and such.
- zepto 5y ago> Except what this really does is push things from being technical issues to being social issues. Sure, maybe I know Lisp. But how long is it going to take me to learn what your ultra-customized, macro-laden particular flavor of Lisp? And one has to do that for every single new project requiring coordination... This happens in every language though. You just get to this point more efficiently with lisp. A rigid language doesn’t protect you from having to understand the local terms e.g. ConcurrencyGeneratorObserverFactory.
- civilized 5y agoMaybe the reason people prefer Java + Design Patterns to Lisp is the same reason people prefer writing monstrous macro-driven spreadsheets to writing "real" programs: lower barrier to entry. Once people are off the ground with an MVP that is delivering value, they are willing to invest virtually unlimited effort into scaling up their pre-existing solution, even as the limitations and absurdities of their chosen framework become increasingly obvious. Any language is preferable to a language you don't feel confident developing in. So whatever gets people off the ground is what wins, regardless of what would be better in the long run.
- zepto 5y agoWhat does ‘low barrier to entry’ mean in this case? Java was low barrier to entry in the early days, but now it seems completely impenetrable to me having not used it for a decade. On the other hand something like Racket seems very easy to get going with.
- zepto 5y agoAgreed - I way posting the economist link to back up your legal reasoning.
- yesenadam 5y agoI've been getting into Forth again lately. I couldn't help noticing that everything in The Lisp Curse applies to Forth, maybe even more so.
- zarkov99 5y agoDon't complex python programs end up doing the same thing? I am looking at Django and there is definitely a lot of introspection, code generation and half-assed DSL stuff going on.
- deleted 5y ago[deleted]
- mrobot 5y agoYou might be interested in this post from today on the racket-users list: https://groups.google.com/g/racket-users/c/hP1hZDWnj7Y https://groups.google.com/g/racket-users/c/hP1hZDWnj7Y It is about "social contracts" and seems to kind of address some of what you are saying here. Basically, the community comes to an agreement on what some good common contracts should be. I wonder if there are any other social problems in the lisp languages that we could think of that can be developed by consensus this way.
- mbrodersen 5y agoYep the core is very small but also useless if you want to write real software. You need a lot of additional code to have a useful language. With the core you can’t even add two numbers. Unless you encode numbers as cons lists (Peano style). The core for Haskell is also super small (just 1 page). But it takes a lot of additional code to make Lisp and Haskell useful/practical.
- mbrodersen 5y agoIt’s funny how Lisp proponents have been promoting Lisp for 60+ years and are still completely fail to get developer mindshare. While “inferior” languages like C/C++/Java/… are successfully used by millions of developers to create the software that runs the world. And it is especially funny when a number of Lisp proponents keep going on about how much smarter they are than the rest of the world. While failing to use their smarts to achieve any successful outcomes. Perhaps those Lisp proponents should use their “superior” intelligent more productively? Maybe by questioning their deep held assumptions about the superiority of Lisp vs. languages that are actually successful in the real world? Now that would be real progress.