Live data from Hacker News

Try Clojure – An interactive tutorial in the browser

tryclojure.org

21–30 of 96 posts

Re: Try Clojure – An interactive tutorial in the browser

#22

I would love to work with clojure. I thought there were opportunities for to work on a clojure project in my previous company. But I was told that no one likes to work on these products hence why they moving away from clojure and rewriting everything in java or scala. I wish I could tell you exactly why they hated it, I never got an answer. Speaking to some of the individuals, they thought it came down to tooling, no…

The tooling is actually great, but kind of hard to discover if you're a beginner. The clojure.org website isn't very beginner-friendly, unfortunately.

Types... I find most people missing static type checking are really reliant on a certain way of programming which isn't applicable to Clojure, e.g. write code, look for red squiggly lines, fix type signatures, compile, wait, fix the bugs the compiler tells you about.

Clojure is much more exploratory in the way that you are always connected to a live system (like other Lisps) plus most of your functions are small and pure, making their logic self-contained and simple to deal with in isolation.

Re: Try Clojure – An interactive tutorial in the browser

#23

I would love to work with clojure. I thought there were opportunities for to work on a clojure project in my previous company. But I was told that no one likes to work on these products hence why they moving away from clojure and rewriting everything in java or scala. I wish I could tell you exactly why they hated it, I never got an answer. Speaking to some of the individuals, they thought it came down to tooling, no…

It's the latter argument that did it for me. I never again want to work primarily with a technology that doesn't have encapsulation of optional types. It's just such an uninteresting problem to have to continuously suffer from.

Re: Try Clojure – An interactive tutorial in the browser

#24

I would love to work with clojure. I thought there were opportunities for to work on a clojure project in my previous company. But I was told that no one likes to work on these products hence why they moving away from clojure and rewriting everything in java or scala. I wish I could tell you exactly why they hated it, I never got an answer. Speaking to some of the individuals, they thought it came down to tooling, no…

The tooling is actually great, but kind of hard to discover if you're a beginner. The clojure.org website isn't very beginner-friendly, unfortunately. Types... I find most people missing static type checking are really reliant on a certain way of programming which isn't applicable to Clojure, e.g. write code, look for red squiggly lines, fix type signatures, compile, wait, fix the bugs the compiler tells you about. C…

> Types... I find most people missing static type checking are really reliant on a certain way of programming which isn't applicable to Clojure, e.g. write code, look for red squiggly lines, fix type signatures, compile, wait, fix the bugs the compiler tells you about.

I use a repl in Haskell just as much as I used a repl in Clojure.

The development experience is also somewhat similar if we're talking in terms of what you described here. In Clojure, you also fix the bugs the compiler tells you about, except the compiler in this case is one you partially implement yourself with a test suite.

> plus most of your functions are small and pure, making their logic self-contained and simple to deal with in isolation.

This is hardly exclusive to Clojure.

Re: Try Clojure – An interactive tutorial in the browser

#25

Earlier quoted context omitted.

The tooling is actually great, but kind of hard to discover if you're a beginner. The clojure.org website isn't very beginner-friendly, unfortunately. Types... I find most people missing static type checking are really reliant on a certain way of programming which isn't applicable to Clojure, e.g. write code, look for red squiggly lines, fix type signatures, compile, wait, fix the bugs the compiler tells you about. C…

> Types... I find most people missing static type checking are really reliant on a certain way of programming which isn't applicable to Clojure, e.g. write code, look for red squiggly lines, fix type signatures, compile, wait, fix the bugs the compiler tells you about. I use a repl in Haskell just as much as I used a repl in Clojure. The development experience is also somewhat similar if we're talking in terms of wha…

Maybe I wasn't describing you then.

Re: Try Clojure – An interactive tutorial in the browser

#26
post #12

I started playing around with Clojure back in 2014 by implementing a rudimentary polyglot persistent news feed microservice. That microservice used Ring which sits on top of Jetty. I blogged about that implementation at https://glennengstrand.info/software/architecture/oss/clojur... which is my personal blog. Last year, I re-evaluated Clojure with a feature identical microservice. This time, I integrated with Donkey…

Clojure absolutely does not reflect on every call, and no it does require type hinting every argument to every function to get that speed. Especially after Clojure 1.8 came out, huge performance gains were had by inlining far more direct function calls. You can achieve near Java performance on most code, especially if you are okay sacrificing the immutable data structures and lazy sequences. I think this is what make…

You do still need to use type hints to achieve best performance, especially in numerical code. That said, even if I’m doing primitive math and using arrays in Clojure for performance sensitive code, it’s still a nicer experience than other JVM languages for me.

Re: Try Clojure – An interactive tutorial in the browser

#27
post #2

Do I need to have a somewhat decent knowledge of Java to plunge into Clojure right away?

You’re leaving a lot of value on the table if you don’t make use of Java libraries (even the standard ones). Many open source projects are thin layers over Java bindings, and it’s a huge free buffet lunch if you can do that yourself. But as long as you know the interop syntax you can pick that stuff up as and when you need to. Many people get by googling some JVM command line parameters when they hit a problem (running out of heap space, bringing in additional modules etc) and there are still plenty of people who work in pure Clojure and claim never to have to think about Java or the JVM, even the Maven bits.

Re: Try Clojure – An interactive tutorial in the browser

#30
post #28

Looks good. Is there a way to go back to previous step? Also, please use "Show HN" for own submissions like this project (see https://news.ycombinator.com/showhn.html for details).

Try (prev-step) in the REPL. Probably I need to add an help with some commands.

Forgot Show HN. Now I cannot edit the title anymore

Post reply on HN