Live data from Hacker News

Lisp is still a secret weapon

kep.io

21–30 of 145 posts

Re: Lisp is still a secret weapon

#21
post #15

But we need types people! Properly static ones that can be used to encode your intentions and handle inconsistency before even running the program. And yes I know that Clojure has an optional type system. But optional means that you cannot rely on having types in the libraries that you use. So you can't fit your stuff together with their stuff and have reasonable expectations that it will work once the user does that…

Types do have a lot of benefits but they also come with a big cost: some programs are very hard to express in modern type systems. For example, consider a pattern that is becoming more common today in UI programming (even in plain javascript): keeping your UI in one big tree data structure, and then working on arbitrary paths (represented by a sequence of keys) into that data structure. That is not a pattern you can…

That pretty much describes my Angular data models, yes. My internal helper functions get passed sub-structures from the model, but Angular bindings get strings like "top.area.sub.fld" to name a variable.

Doubtless, there's another way to do this without a global / dynamic data tree, but this is working, at least for me.

Re: Lisp is still a secret weapon

#22
This was a great read. I've always heard about Clojure and now I have a better idea as to what it is. I'm still going to stick with what I've heard all along: it doesn't matter what language you write in, it matters how you write it.

Re: Lisp is still a secret weapon

#23
post #6

The author almost immediately writes off Common Lisp for lack of "frictionless access to a rich ecosystem of code written in the same language as your software", then recommends Clojure. Most of the ecosystem you have access to in Clojure is, in fact, not built in Clojure, and most Clojure libraries were/are wrappers around Java or Javascript. Footnote 1 makes no sense, suggesting that the only way to get access to "…

> It's nowhere near the 200 thousand packages in npm

It's also nowhere near the massive FOSS ecosystem that runs on the JVM.

Re: Lisp is still a secret weapon

#24
I tried Clojure, but immediately got the impression that the run-time type-system is ill-designed. I cannot recall the details, but I can remember odd things like different run-time types used for empty lists than for non-empty lists. A simple program doing a "switch" on some run-time types turned out to be really cluttered. But of course, there's always the possibility that I was doing something wrong :)

Re: Lisp is still a secret weapon

#25
Here are some heretical thoughts. The language is irrelevant. The text editor is irrelevant. The OS is irrelevant. The size of your monitor is irrelevant. All your productivity hacks are irrelevant. The only relevant thing is your ability to formulate and solve problems.

You might say the language can help with both the formulation and the solution but I'd say that just comes down to what language you're most comfortable with and how good of a problem solver you are. So you can use lisp and I'll use ruby and at the end it'll all be a wash because the fundamental bottleneck will always be the speed at which you can formulate and solve problems and how quickly you can respond to market dynamics. All other choices are accidents of history.

Graham and his buddy were just good problem solvers.

Re: Lisp is still a secret weapon

#26
post #9

In the expressjs example, I wonder how practical is to do all that interop instead of just using plain JS? I mean, is awesome that Clojurescript can leverage all those JS libs, but its worth writing lots of interop just to use Clojurescript? Of course, as Clojurescript libraries grow this will not be an issue, but it is nowhere close to JS for web dev. For me, a more practical approach for server side would be to use…

> In the expressjs example, I wonder how practical is to do all that interop instead of just using plain JS?

It depends. Interop in clojurescript isn't any more difficult than using plain JS but if your code is very interop heavy I don't think you gain a lot by using Clojurescript.

For a web application though interop code is going to be a tiny fraction of the overall code.

Re: Lisp is still a secret weapon

#28
post #15

But we need types people! Properly static ones that can be used to encode your intentions and handle inconsistency before even running the program. And yes I know that Clojure has an optional type system. But optional means that you cannot rely on having types in the libraries that you use. So you can't fit your stuff together with their stuff and have reasonable expectations that it will work once the user does that…

Types do have a lot of benefits but they also come with a big cost: some programs are very hard to express in modern type systems. For example, consider a pattern that is becoming more common today in UI programming (even in plain javascript): keeping your UI in one big tree data structure, and then working on arbitrary paths (represented by a sequence of keys) into that data structure. That is not a pattern you can…

Types + pattern matching -- best combination for working with trees.

I'm not sure if there's a library in F# similar to HXT, but in Haskell, working with large xml structures is a breeze.

Re: Lisp is still a secret weapon

#29

Lisp? Meh! The real secret is Agda. The real real secret is using a language so obscure that you end up writing the compiler for production use, by studying the compiler that some researcher created for a paper.

The fact I am being downvoted is indicative that I am on to something. Think about it :-)

Re: Lisp is still a secret weapon

#30

Here are some heretical thoughts. The language is irrelevant. The text editor is irrelevant. The OS is irrelevant. The size of your monitor is irrelevant. All your productivity hacks are irrelevant. The only relevant thing is your ability to formulate and solve problems. You might say the language can help with both the formulation and the solution but I'd say that just comes down to what language you're most comfort…

You are absolutely right. However, if you use a cluttered language with a dozen choices for a data structure or concurrency (as far as I know Ruby is not one of them), you'll run into many accidental problems before you even get to solving your business domain problem.
Post reply on HN