Live data from Hacker News

Why I'm Productive in Clojure

yogthos.net

21–30 of 99 posts

Re: Why I'm Productive in Clojure

#21
post #3

Earlier quoted context omitted.

> Any language that lets you spend your brainpower on the essence of the problem is a tremendous advantage and joy. This unlocks creativity and productivity. For some reason the only language that let me reach this level is Python. I tried Clojure and Common Lisp, but for some reason I could never be as efficient as I wanted with them, which I think is a shame because in some ways I think the Lisps are superior to Py…

I really like Python, and use it on a daily basis but I found that after enough experience in Clojure, I prefer it when I have the choice and there isn't a compelling reason to use Python instead. This isn't a criticism by the way, I do understand that people have different preferences of language idioms, and I do occasionally find myself scratching my head about the idiomatic Clojure way to solve a problem that woul…

While I don't think Python is a bad language at all, it has some limitation that I am becoming more and more being aware of them - lack of static typing, limitation of lambdas, speed is an issue sometimes, but on the other hand it's very easy for me to be productive in it.

I am pretty sure that its lack of features is making Python easier to "master" (I don't claim to master it, just that I am more productive with it), but this lack can be limiting sometimes, so I am trying to find a solution to have both power and proficiency.

Re: Why I'm Productive in Clojure

#22
post #10
post #7

My biggest problem with Clojure (specifically ClojureScript) is that it's too workflow opinionated. Nearly all Clojure devs use 1 of 2 text editors. Nearly everyone uses Leiningen. Nearly everyone uses some sort of auto-builder. Nearly everyone uses hot-swapping. Clojure wasn't even optimized for this workflow, it's just the only one that works. So as much as I love the language I keep going away from it because I pr…

When you're buying into a languague, you're also buying into the ecosystem, and if the ecosystem elected it's tools, and it's optimizing it's workflow towards those, then that's what it is. You either buy the whole package (leiningen specifically, I'm not sure what's the editor problem you mention), or you don't.

I'd put it this way, when you try a language, you are testing to see if the ecosystem works for you. Many, if not most, ecosystems have some kind of sweet spot where you find more support.

You don't have to buy the whole ecosystem, but the more you stray the less community overlap you'll find.

Re: Why I'm Productive in Clojure

#23
post #7

My biggest problem with Clojure (specifically ClojureScript) is that it's too workflow opinionated. Nearly all Clojure devs use 1 of 2 text editors. Nearly everyone uses Leiningen. Nearly everyone uses some sort of auto-builder. Nearly everyone uses hot-swapping. Clojure wasn't even optimized for this workflow, it's just the only one that works. So as much as I love the language I keep going away from it because I pr…

Why do you say that nearly everyone uses hot-swapping? What are some examples?

Re: Why I'm Productive in Clojure

#25
post #4

I'm curious to see how Clojure fares against the current crop of folks becoming intrigued by statically-typed languages like Haskell, F#, etc.

I'm a huge static typing fan though outside of Java I'm really only currently into Scala. The issue comes up once in a while, mostly when I miss my tooling, but for a lot of cases, a library like Schema by Prismatic meets what you would want a type system for.

Back to tooling, usually you're into a mess of apis because you are forced to use or choose a type, which then enters a whole world of semantics architects love arguing about. For Clojure, a lot of functionality can be clear and concisely done in maps and lists and the handful of functions which operate on them.

I feel fairly productive.

Re: Why I'm Productive in Clojure

#26
post #7

My biggest problem with Clojure (specifically ClojureScript) is that it's too workflow opinionated. Nearly all Clojure devs use 1 of 2 text editors. Nearly everyone uses Leiningen. Nearly everyone uses some sort of auto-builder. Nearly everyone uses hot-swapping. Clojure wasn't even optimized for this workflow, it's just the only one that works. So as much as I love the language I keep going away from it because I pr…

Well, people do use these tools, but honestly, do you really want a language with multiple build tools / package managers? The java world is a mess here. Leiningen is pretty great, no need to fragment the community. As far as editors go, I'm perplexed. You can use nearly any editor, why do you perceive the need to use one of these 2?

> Well, people do use these tools, but honestly, do you really want a language with multiple build tools / package managers?

I want multiple workflows. A single build tool can accommodate that, but Leiningen can't/doesn't.

For example, let's say I have a compiler called mycc. I can build something like this:

    mycc main.c -o main
I might then combine it with an file watcher utility like entr

    find . -name '*.c' | entr mycc main.c -o main
With Leiningen it has to do that all. AND you pretty much have to use the auto rebuilder capability (which means your workflow starts with turning the auto rebuilder on).

> As far as editors go, I'm perplexed. You can use nearly any editor, why do you perceive the need to use one of these 2?

Then why do nearly all (probably 95%) Clojure devs use either Emacs or LightTable?

Re: Why I'm Productive in Clojure

#27
post #13

Earlier quoted context omitted.

I'm curious what language and workflow you prefer? In my opinion, there are plenty of other technologies (quite popular ones at that) that have a specific workflow considered "best practice", arguably because "it's just the only one that works".

I prefer any language that requires nothing more than a text editor (any) and possibly a compiler. Where you can use any build system you want and be pretty much just as productive. I agree that there are other languages that suffer the same problem, the .NET languages for example (except kinda F#), but there are plenty that do not (C, JavaScript, etc).

Lein evolved to be the winner because afaik it was simply the best at it. If another tool out did it, that would be fine with people I think, but most of what you need (and THEN some) is available as lein plugins, so there's no need to dethrone it.

Re: Why I'm Productive in Clojure

#28
post #7

My biggest problem with Clojure (specifically ClojureScript) is that it's too workflow opinionated. Nearly all Clojure devs use 1 of 2 text editors. Nearly everyone uses Leiningen. Nearly everyone uses some sort of auto-builder. Nearly everyone uses hot-swapping. Clojure wasn't even optimized for this workflow, it's just the only one that works. So as much as I love the language I keep going away from it because I pr…

If you have a better workflow, by all means use it and share it with us.

If you want to see a community-oriented look at Clojure based on self-reported data, I'd suggest the 2013 State of Clojure:

http://cemerick.com/2013/11/18/results-of-the-2013-state-of-...

I think you'll find considerable diversity in Clojure. You've got a confluence of people coming from Java, Ruby, Lisp, and other languages. You've got enterprises and start-ups using it. This diversity is certainly one reason that Clojure is so popular and useful to so many people.

Re: Why I'm Productive in Clojure

#29
post #26

Earlier quoted context omitted.

Well, people do use these tools, but honestly, do you really want a language with multiple build tools / package managers? The java world is a mess here. Leiningen is pretty great, no need to fragment the community. As far as editors go, I'm perplexed. You can use nearly any editor, why do you perceive the need to use one of these 2?

> Well, people do use these tools, but honestly, do you really want a language with multiple build tools / package managers? I want multiple workflows . A single build tool can accommodate that, but Leiningen can't/doesn't. For example, let's say I have a compiler called mycc. I can build something like this: mycc main.c -o main I might then combine it with an file watcher utility like entr find . -name '*.c' | entr…

Leiningen, in my experience, is nicely extensible for what I've needed to do. I've got a project that has to pre-compile Protocol Buffer files. To do that, I use Leiningen profiles.

Have you looked at Leiningen profiles? https://github.com/technomancy/leiningen/blob/stable/doc/PRO...

Plugins? https://github.com/technomancy/leiningen/wiki/Plugins

It seems to me that Leiningen is quite active with its extensibility, especially given how young it is.

If those don't work, have you considered wrapping it with your own scripting?

Have you raised your concerns on the mailing list? People would be open to discussing them.

Re: Why I'm Productive in Clojure

#30
post #13

Earlier quoted context omitted.

I'm curious what language and workflow you prefer? In my opinion, there are plenty of other technologies (quite popular ones at that) that have a specific workflow considered "best practice", arguably because "it's just the only one that works".

I prefer any language that requires nothing more than a text editor (any) and possibly a compiler. Where you can use any build system you want and be pretty much just as productive. I agree that there are other languages that suffer the same problem, the .NET languages for example (except kinda F#), but there are plenty that do not (C, JavaScript, etc).

Clojure (and ClojureScript) have stand alone compilers and ship very nice APIs to compile code (if you want to write your own compiler). People use lein (and its plugins) because mucking around with a compiler and then managing dependencies, setting up your classpath manually, and writing a test runner is a waste of time.

As far as text editors go, you're not forced into using an nrepl-enhanced client. I got by fine on tmux+vim with no editor support for clojure other than syntax highlighting and rainbow parens for a long time. That said, having paredit, nrepl (for code completion, dynamic eval in the correct context, documentation lookup, misc other plugins), and a test runner with easy macros in my "ide" makes my experience better. There's absolutely no reason why one couldn't just use a notepad and the clojure compiler plus whatever random build system strikes their fancy.

Post reply on HN