by jdmichal · 5y ago · 0 comments
> 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.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.
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.
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.
BTW the Wolfram language isn't 'a bit like lisp'. It _is_ a lisp with an alternate syntax. This becomes extremely apparent in any kind of symbolic manipulation.
Only a galaxybrain like Wolfram could devise such an elaborate implementation of Greenspun's Tenth.
Now I think Mathematica is a combination of C, C++, Java, and of course Mathematica code. C and C/C++ libraries are used for the symbolic stuff and some libraries, Java is used for database connections and so forth, and I think they do eat their own dog food by implementing new functionality using existing Mathematica code. That's a little bit yucky, but no different than many ecosystems today. At least everything seems pretty seamless to me.
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). 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/) that serves as a really great illustration of how it all comes together.
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.
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.
On the other hand something like Racket seems very easy to get going with.
> 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 below the entry for 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 itself nor anywhere in the page source that I can find.
But going back to 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.
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
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+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 :)
Try to make something like MediKanren in a mainstream language, and the advantage of lisp languages will become immediately apparent.
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.
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.
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!
I personally would've rather them use Lisp than tack on their own conditionals and loops and such.
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.
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.
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.
The entire point of the Lisp Curse is that this is a social issue! Not a technical one. And, furthermore, what is a technical issue in another language can be pushed into being a social issue in a Lisp. And social issues are a lot more difficult to solve.
Compare this to something like Java + Spring Boot or Ruby on Rails or any other framework favoring configuration and convention over code. Where the explicit point is a social agreement on what a program looks like, which in turn allows everyone to hopefully focus on the actual business logic.
(Also: Sibling commenter already addressed the differences in abstraction power better than I would have.)
For instance, suppose that cheap and 100% effective sound-proofing were available and installed into every apartment by default (an example of (practically nonexistent) technology). Then unwanted noise from neighboring units wouldn't be a social problem.
This is also one of the two major problems that Forth has. The other is the lack of types and non-stack data structures.
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.
can you point to any instances of someone actually doing this?
(bonus points if you're willing to say "paul graham and arc")