Live data from Hacker News

Clojure: A Lisp that wants to spread

simongray.github.io

291–300 of 306 posts

Re: Clojure: A Lisp that wants to spread

#291

Earlier quoted context omitted.

If you tried Clojure a few years ago, the Tooling could be a problem. But now, the tools-deps(official Clojure cli) is awesome.

How do you find it compares to Leiningen? I'm using lein for all of my side projects (and shadow-cljs) and I like it. What does tools-deps offer me?

Tools-deps is a lightweight alternative, when working with it, the configuration mainly care about three things. The source path, the dependencies and the aliases(all kinds of entry point and launcher command). I found this solution much more clear than in Leiningen.

But tools-deps don't care about packaging, deploy, install, etc. Like its name, it's focusing on `deps`.

I use tools-deps and shadow-cljs.

Re: Clojure: A Lisp that wants to spread

#292
post #271

Earlier quoted context omitted.

I'm a Programming Language enthusiast, currently making my own language. I'm really curious what makes Clojure different - it's pretty much the most loved language among its proponents (i.e. people love e.g. Rust and Go as well, but not as much as those who love Clojure, love Clojure). Is there any very Clojure-y code you can point to, that would showcase it? Is it just the libraries - collections, concurrency primit…

Being a Lisp is a big one for me for sure! Specifically, this means having a simple regular homoiconic syntax, great support for macros and meta-programming, and most important of all, a fully dynamic nature with REPL driven development and all constructs being reifiable at runtime, while still being fast and performant. Yes, there are other Lisps, but Clojure also improved certain things compared to them: - Clojure…

Thanks! I got a few answers already, all of which were really helpful, but this one was most extensive! Another one, if you’ve time: What would you improve in Clojure?

Re: Clojure: A Lisp that wants to spread

#293
post #289
post #287

Earlier quoted context omitted.

I don't dispute it has niches where it does well, or at least "works". The implication often given is general purpose productivity superiority.

Well, you claimed that Lisp programmers can not work in software teams over a long period of time, because they don't understand each others code. I gave a few examples. There are also a bunch of examples where Lisp was used to prototype or for rapid application development. This enables exploring ideas or conquering early markets. Later iterations may then reimplement the thing... That's another model and is also fi…

Re: you claimed that Lisp programmers can not work in software teams over a long period

I meant for "general" programming. I apologize for not wording it clearer earlier.

Re: There are also a bunch of examples where Lisp was used to prototype or for rapid application development.

Yes, this is a niche it often does well in. It's partly how Paul Graham beat competitors in the store app arena.

Re: Clojure: A Lisp that wants to spread

#294

As someone who uses Clojure a lot: It would be a lot better for language adoption if people would write more blog posts showing best practices for tooling, and less vague stuff about how awesome the language is. For example, the startup time thing is completely irrelevant if you use Emacs/VSCode with a standalone REPL that you connect to. It's non-trivial to set this up (more because of lack of consolidated info rath…

I totally agree, and that's why I am going to write a book about that: https://twitter.com/draganrocks/status/1226811229362147331 It has to wait until I wrap up the books that are currently in progress [1], but I expect to start this summer. [1] https://aiprobook.com

Random fan here: you DO rock. Thanks for your incredible work on making ML a first-class citizen in Clojure!

Re: Clojure: A Lisp that wants to spread

#295
post #271

Earlier quoted context omitted.

> I do not personally find clojure makes this any easier than in any language. Surprisingly, it does for me. After using many different languages, I find myself more productive in Clojure than in any other language I have used before. Every language I used before Clojure left a dent in my mental ability to appreciate what I do. It's not a single favorite PL of mine, but most other programming languages make me feel b…

I'm a Programming Language enthusiast, currently making my own language. I'm really curious what makes Clojure different - it's pretty much the most loved language among its proponents (i.e. people love e.g. Rust and Go as well, but not as much as those who love Clojure, love Clojure). Is there any very Clojure-y code you can point to, that would showcase it? Is it just the libraries - collections, concurrency primit…

Since there are many answers already, I won’t elaborate too much. I just want to emphasize one thing: people mention immutable data structures as a default a lot, and sure, they’re great.

However, someone might turn around and say, “well, I can pull in a lib with immutable data structures in $lang if I want to.”

It needs to be highlighted that the real game changer is an /ecosystem of libraries/ built entirely out of immutable data structures.

That’s not something that can be engineered as needed.

Re: Clojure: A Lisp that wants to spread

#296
post #292

Earlier quoted context omitted.

Being a Lisp is a big one for me for sure! Specifically, this means having a simple regular homoiconic syntax, great support for macros and meta-programming, and most important of all, a fully dynamic nature with REPL driven development and all constructs being reifiable at runtime, while still being fast and performant. Yes, there are other Lisps, but Clojure also improved certain things compared to them: - Clojure…

Thanks! I got a few answers already, all of which were really helpful, but this one was most extensive! Another one, if you’ve time: What would you improve in Clojure?

Hum, that's an interesting question.

Error messages could be improved, currently, they often leak the implementation details, so the error is disconnected from your actual code.

Startup time is slow. There's ways around, like making a Graal Native build, or using ClojureScript or babashka instead, but those are all alternative thing you need to consciously choose to use. It be great if standard Clojure somehow could start really fast.

Memory usage could probably be improved further. It makes liberal use of Objects right now for everything, and that adds up quickly.

Performance is pretty fast, but I'll never say no to something that would perform faster.

I think I would make the data manipulation functions eager by default, and the lazy one would be the opt-in one.

There's a few names that could be improved, contains? is a famous confusing one, since it always checks for key, would have been better to call it contains-key?

When it comes to the language design itself, I'm not sure there's much I'd change. I think it could be interesting to try and see if you could build some language that's like Clojure and have some level of static type safety. I'm not sure what you'd have to trade away for it, but I think it be an interesting experiment.

Oh, and one more thing, doing unboxed things, operating over primitives could be improved and made easier. This is often needed for high performance numerics, or making better use of memory and caches.

Re: Clojure: A Lisp that wants to spread

#297
post #271

Earlier quoted context omitted.

> I do not personally find clojure makes this any easier than in any language. Surprisingly, it does for me. After using many different languages, I find myself more productive in Clojure than in any other language I have used before. Every language I used before Clojure left a dent in my mental ability to appreciate what I do. It's not a single favorite PL of mine, but most other programming languages make me feel b…

I'm a Programming Language enthusiast, currently making my own language. I'm really curious what makes Clojure different - it's pretty much the most loved language among its proponents (i.e. people love e.g. Rust and Go as well, but not as much as those who love Clojure, love Clojure). Is there any very Clojure-y code you can point to, that would showcase it? Is it just the libraries - collections, concurrency primit…

It's not one thing. It's many, many things. Each one, on their own, is good, but not a game changer. It's how they all come together in a consistent, well designed whole. This union is idiomatic. Sure you can do all this stuff in other ways, elsewhere. But there is so much ceremony. Clojure is opinionated in a good way that makes nice things succinct and idiomatic. So you will get many different answers. They are all true. And they all come together. The whole is very much greater than the sum of the parts.

Re: Clojure: A Lisp that wants to spread

#298
post #292

Earlier quoted context omitted.

Being a Lisp is a big one for me for sure! Specifically, this means having a simple regular homoiconic syntax, great support for macros and meta-programming, and most important of all, a fully dynamic nature with REPL driven development and all constructs being reifiable at runtime, while still being fast and performant. Yes, there are other Lisps, but Clojure also improved certain things compared to them: - Clojure…

Thanks! I got a few answers already, all of which were really helpful, but this one was most extensive! Another one, if you’ve time: What would you improve in Clojure?

I would remove some of the minor warts that remain from earlier versions that will always be in clojure because the devs care so much about backwards compatibility and not breaking userspace. And I would want to see a clojure that targets direct compilation into native binaries that are small and efficient.

Re: Clojure: A Lisp that wants to spread

#299
post #63

Earlier quoted context omitted.

Some of it is libraries and frameworks. Some of it is the attention Clojure has paid to ergonomics. A lot of Clojure’s libraries seem to have been built by smart people for mediocre programmers (like me!). Elsewhere in lisp land it can feel like smart people wrote libraries for themselves. For me Racket is probably the closest thing to a decent end-to-end modern lisp experience with decent libraries outside Clojure.…

Aside from being faster, more mature and with better observability, why is bringing "the JVM along for the ride" different from bringing Racket's runtime along? Also, you do know that Oracle is behind OpenJDK, has been for ten years, and has recently made the JDK completely open-source and free of field-of-use restrictions for the first time in Java's history?

Off topic; But since you work at Oracle, what is the Oracle copyright terms on alternative implementations of Java? (in the light of Android lawsuits). Eg: some research or commercial implementation for a subset of java etc?

Re: Clojure: A Lisp that wants to spread

#300
post #139

Earlier quoted context omitted.

> The situation with windows is weird. Isn't it always? Basically anything that's not related to .NET has its warts in Windows. Erlang for example.

Delphi, Python, Ruby, C++, Qt, Perl, nodejs, Java, Pharo/Smalltalk, Eiffel, Common Lisp, Ada do pretty well on Windows, without being .NET related.

Funny, I'm probably getting old, but I do remember times when every single one of these had issues in Windows. Besides, all of them are much older than Clojure.
Post reply on HN