Live data from Hacker News

Why I like Clojure

sulami.github.io

41–50 of 155 posts

Re: Why I like Clojure

#41
post #29

Need someone to explain why I should use clojure over scala because typelevel seems pretty well developed

Clojure: live repl into running code Scala: Clojure: Explore the problem you are facing with quick prototyping in the repl and see the blind spots, the unknowns, the shape of data received from flaky integrations. Mold and shape your functions as the problem becomes clearer. Scala: Best it can do is write unit tests and the debugger to look at what exactly is happening, devise a bunch of classes to handle them, rinse…

Scala also has a live repl.

Re: Why I like Clojure

#42

> While the primary platform is the JVM, superbly uncool but stable and relatively performant My impression was that java has the reputation of being "uncool" but JVM is highly regarded as modern marvel. I am wrong about this ?

IT Java is uncool, but then IT is uncool even if written in Clojure (though the psychological aspect of using a "cool" language will likely dampen the existential pain of writing yet another book keeping CRUD app since now you are using s-expressions!)

In my experience, people who say silly things about Java -- the technology, which certainly includes the Java Language Semantics, and JVM -- actually do not know what you can do with Java (the language).

So yes, you Lisp nerds have you homoiconic 'mash' of syntax and thus AST manipulation, and we have first class Class Loaders and Byte Code Engineering and the sky is the limit there. Magic.

But the sad reality of programmers' lives is the disconnect between the required cognitive capabilities of workers and the actual (domain) task at hand.

tldr;/ its your job that is uncool not the tech.

Re: Why I like Clojure

#43
Clojure Help:

This is super apropos since I am JUST learning Clojure via the Clojure Koans.

Any tips from clojurists on getting the repl (and readline) working fluently? I'm using Leiningen but it's not responding as I'd expect. I would think this would all set up more effortlessly.

Tips on getting a new Clojure setup working would be appreciated.

Re: Why I like Clojure

#44
post #34

Clojure/Lisp is super nice until you have a bunch of transformations to make then you've to keep everything in mind without having a named reference in front of you (unless you omit the threading operators and abuse the let statement). It becomes exhausting after a while and makes you question if you are working for the machine or the machine is working for you. Yes, it's more succinct and elegant but is it worth it?

Would Specter help here?

Re: Why I like Clojure

#45

Clojure Help: This is super apropos since I am JUST learning Clojure via the Clojure Koans. Any tips from clojurists on getting the repl (and readline) working fluently? I'm using Leiningen but it's not responding as I'd expect. I would think this would all set up more effortlessly. Tips on getting a new Clojure setup working would be appreciated.

I recommend emacs, try braveclojure.com - it's a pain to set up properly but well worth it.

Re: Why I like Clojure

#46

Clojure Help: This is super apropos since I am JUST learning Clojure via the Clojure Koans. Any tips from clojurists on getting the repl (and readline) working fluently? I'm using Leiningen but it's not responding as I'd expect. I would think this would all set up more effortlessly. Tips on getting a new Clojure setup working would be appreciated.

Join the beginners channel in Clojurians slack, there are many patient people there volunteering to help with things like this.

Try out Calva for VS code, read the official REPL guide here https://clojure.org/guides/repl/introduction

Re: Why I like Clojure

#47

Clojure Help: This is super apropos since I am JUST learning Clojure via the Clojure Koans. Any tips from clojurists on getting the repl (and readline) working fluently? I'm using Leiningen but it's not responding as I'd expect. I would think this would all set up more effortlessly. Tips on getting a new Clojure setup working would be appreciated.

If you're willing to pay a monthly fee, you might like this REPL driven development course:

https://purelyfunctional.tv/courses/repl-driven-development-...

EDIT: and you might also want to check out https://clojureverse.org/

Re: Why I like Clojure

#48

Clojure Help: This is super apropos since I am JUST learning Clojure via the Clojure Koans. Any tips from clojurists on getting the repl (and readline) working fluently? I'm using Leiningen but it's not responding as I'd expect. I would think this would all set up more effortlessly. Tips on getting a new Clojure setup working would be appreciated.

I use Leiningen as well and I have no issues with it. REPL startup is a bit slow, as is expected from most JVM programs but a bit more so for Leiningen.

Re: Why I like Clojure

#49

> While the primary platform is the JVM, superbly uncool but stable and relatively performant My impression was that java has the reputation of being "uncool" but JVM is highly regarded as modern marvel. I am wrong about this ?

No you aren't wrong. Java the language has a reputation of being verbose, boilerplate-heavy, and inspiring over-engineered OO cruft. JVM on the other hand is a pretty modern and performant and nice-to-debug platform.

Re: Why I like Clojure

#50
post #34

Clojure/Lisp is super nice until you have a bunch of transformations to make then you've to keep everything in mind without having a named reference in front of you (unless you omit the threading operators and abuse the let statement). It becomes exhausting after a while and makes you question if you are working for the machine or the machine is working for you. Yes, it's more succinct and elegant but is it worth it?

It's really your choice whether or not you want to name intermediate expressions. Just use plenty of `let` if you are concerned.
Post reply on HN