Live data from Hacker News

Six years of professional Clojure development

falkoriemenschneider.de

101–110 of 209 posts

Re: Six years of professional Clojure development

#101
post #3

I also had the privilege to work with clojure for a couple of years on a large project. That was wonderful. Hands down the best language/framework/approach to development I’ve ever had. I still find crazy that it’s not one of the main programming language out there.

Unfortunately, despite consistently hearing about how enjoyable Clojure is, I think many people are turned off by the JVM. This is probably also the problem with Scala, which is apparently also enjoyable to use.

The JVM is a blessing and a curse. I believe it was a very good decision and that Clojure wouldn't have become as useful or popular as it is without it, because it provided immediate and quick access to a huge ecosystem, allowing it to be productive and useful right away. But its also hindering further adoption and may be part of what caused a bit of a decline in interest, which for an already niche language, doesn't help. Many people are turned off the JVM.

I personally don't mind it and I love Clojure, but even I have been wondering whether I should port some services to something else because I've had to use larger cloud instances for them simply due to memory requirements... Maybe I can run them on node with Clojurescript instead, I'll have to investigate that, but I think I'll lose out on a ton of libraries that I use that rely on the JVM. Hmm.

Re: Six years of professional Clojure development

#102

Clojure is the most enjoyable language I've ever used and I love the interactive development. I haven't written code in any other language that even comes close. Unfortunately I am too lazy and careless to use Clojure in any serious capacity though. I really need a Haskell or Rust compiler to remind me of all my silly mistakes. I can't be trusted to get to the same level of confidence through unit tests or linting or…

Check out Julia; It has built-in optional static typing, a fast JIT, it can be run interactively in the same style as Clojure, and it supports lisp-like macros.

Re: Six years of professional Clojure development

#103
post #77

Earlier quoted context omitted.

- Clojure without clj-kondo - PHP without phpstan/psalm/phan All bad ideas, modern tooling can detect errors in your code before you finish your code expression, but you do need to go out of your way to setup it up Most people do not and then complain about types instead of talking about static analysis If you are ever coding Clojure you should be following this: https://github.com/clj-kondo/clj-kondo/blob/master/doc…

I use kondo already, and while it's a nice tool it doesn't solve my problems.

Can you be more specific? There is a primitive type annotation checking system in there, kinds of mistakes not being caught will likely be of interest to Borkdude and others

Re: Six years of professional Clojure development

#104
post #76

Earlier quoted context omitted.

Scala for example is statically typed and had a REPL from day 1. However, when using a language with a great typesystem, the need for a REPL is just much less. You mostly don't need to try things out because the types guide you. Therefore these languages might have a REPL and it might be useful, but REPL-driven is not really necessary. > I always wish that it would become unnecessary to have to choose between stabili…

I'd argue Clojure has all 3 Stability - one of Clojure's core tenets. Low language complexity - not much more than EDN and everything is an expression, plus a few extras like destructuring. Certainly simpler than any other language I have used. Extensibility - again, one of Clojure's strong points with macros. As for "Type systems removing the value of a repl" again, I disagree. Repl driven development is as much abo…

Stability in this context means "can make changes with confidence in the absence of tests". The more confident you can be, the more stable. Maybe not the right word though.

> Repl driven development is as much about exploring the problem than it is writing code.

Which is exactly what types give you. This even coined the term "type driven development" (same as "test driven development" on purpose").

Re: Six years of professional Clojure development

#105
post #10

Earlier quoted context omitted.

JVM and .NET are the top runtimes with best in game GC implementatios, JIT compilers, JIT code cache, and monitoring tools for production code. In fact plenty of them, given that there are multiple implementation to choose from. Meanwhile other languages keep playing catchup and having to rewrite extensions in C.

The runtimes themselves may be great, but the tooling is bloated and uncomfortable. Every time I use Clojure, I am reminded how much I hate using Java. The error messages alone are enough to turn me away. So is having to set up a whole Leiningen project just to get started. A Clojure without Java would be very attractive to me.

For writing simple scripts and stuff I like to use babashka[1], which is a simple clojure interpreter that's compile to a binary, so there's no JVM or leiningen to worry about. Of course, it's slower than the JVM hosted clojure once the JVM is started, so it's basically best for simple tasks.

[1] https://babashka.org/

Re: Six years of professional Clojure development

#106

Earlier quoted context omitted.

``` breaking things up into small isolated components that can be reasoned about independently ``` - This is insufficient for the same reasons unit tests are not enough and you also need integration tests. The moment you cross namespace boundaries, you will end up not setting keys /entries in maps , missing logic etc and end up needing something like Spec/Schema....

> you will end up not setting keys /entries in maps This is what I run into. But that's not exactly a dynamic language problem. It's more of a data-oriented programming (in the Clojure sense) problem. I'm coming to the opinion that data-oriented programming techniques only make sense inside a fairly tightly bounded context. One that's small enough that you can see and understand the whole thing at once. As soon as yo…

> This is what I run into. But that's not exactly a dynamic language problem. It's more of a data-oriented programming (in the Clojure sense) problem.

Yes, all dynamic languages have this problem. I have transitioned to statically typed languages and it has been very peaceful so far :)

Re: Six years of professional Clojure development

#107
post #77

Clojure is the most enjoyable language I've ever used and I love the interactive development. I haven't written code in any other language that even comes close. Unfortunately I am too lazy and careless to use Clojure in any serious capacity though. I really need a Haskell or Rust compiler to remind me of all my silly mistakes. I can't be trusted to get to the same level of confidence through unit tests or linting or…

- Clojure without clj-kondo - PHP without phpstan/psalm/phan All bad ideas, modern tooling can detect errors in your code before you finish your code expression, but you do need to go out of your way to setup it up Most people do not and then complain about types instead of talking about static analysis If you are ever coding Clojure you should be following this: https://github.com/clj-kondo/clj-kondo/blob/master/doc…

Yes, just use C with asan, msan, valgrind and frama-c. Why invest in types?

Re: Six years of professional Clojure development

#108
post #77

Clojure is the most enjoyable language I've ever used and I love the interactive development. I haven't written code in any other language that even comes close. Unfortunately I am too lazy and careless to use Clojure in any serious capacity though. I really need a Haskell or Rust compiler to remind me of all my silly mistakes. I can't be trusted to get to the same level of confidence through unit tests or linting or…

- Clojure without clj-kondo - PHP without phpstan/psalm/phan All bad ideas, modern tooling can detect errors in your code before you finish your code expression, but you do need to go out of your way to setup it up Most people do not and then complain about types instead of talking about static analysis If you are ever coding Clojure you should be following this: https://github.com/clj-kondo/clj-kondo/blob/master/doc…

> then complain about types instead of talking about static analysis

Static types are a form of static analysis. One that is deeply integrated into the language and compiler, which gives obvious advantages such as machine-checked documentation, custom invariants and error messages (expected a Currency but got a Country), better code generation, better tooling (IDE pop-ups, fast incremental checking) etc. Other forms of static analysis are of course useful too.

Re: Six years of professional Clojure development

#109

Clojure is the most enjoyable language I've ever used and I love the interactive development. I haven't written code in any other language that even comes close. Unfortunately I am too lazy and careless to use Clojure in any serious capacity though. I really need a Haskell or Rust compiler to remind me of all my silly mistakes. I can't be trusted to get to the same level of confidence through unit tests or linting or…

I also like the racket contract system, it is very expressible. But comes with a performance penalty that i can't justify for anything inside a loop. Typed-racket might help but i haven't used much so not so sure.

Re: Six years of professional Clojure development

#110
post #95

I've used Clojure for going on 10 years now and it has been one of the most enjoyable programming languages I've ever used. But I've gone back to Scheme for a few ridiculous reasons. 1. TCO. Using `recur` in Clojure just breaks my thought process. 2. Difficulty in getting down to the metal when needed. Using JNI is painful. In Scheme, when needed, the FFI usually handles plain old C. Much easier in my opinion. 3. Com…

Curious, because I'm also doing Scheme now, and Clojure was my gateway drug, which Scheme are you using and for what sort of problem? I'm using s7, but that's because my use case is very much oriented to s7's non-typical feature set (it's computer music), but Janet looks really nice too. (Many similarities to both Clojure and s7 actually).
Post reply on HN