Live data from Hacker News

Why I'm Productive in Clojure

yogthos.net

31–40 of 99 posts

Re: Why I'm Productive in Clojure

#31
REPL-driven development is wonderful. I'm not a Clojure user (yet), but I write a lot of Scheme. My programs are living creatures that adapt and evolve as they are running. It's refreshing to see that Clojure is seeing real use in the industry. Gives me hope that I can get paid to work with a language I really enjoy some day.

Re: Why I'm Productive in Clojure

#32
post #3
post #2

> What matters to me in a language is whether I can use it without thinking about it. I love this statement. It reminds me of the what it feels to be good at mathematics (not my words): "Your intuitive thinking about a problem is productive and usefully structured, wasting little time on being aimlessly puzzled." from http://www.quora.com/Mathematics/What-is-it-like-to-understa... The author also says more about math…

> 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…

Could you tell us more about what you ended up missing from Python ? is it syntax ? concepts ? libraries ?

Re: Why I'm Productive in Clojure

#33
post #8

Earlier quoted context omitted.

I have a friend who is deeply into modern static-typed languages (Haskell and OCaml), but has worked professionally for a couple of years in Clojure. His big gripe with Clojure is that it's still dynamically typed, and thus vulnerable to type-based uncertainties. In languages like OCaml, lots of bugs are actually syntax errors and will be caught at compile time. On the other hand, Clojure is at least a functional lan…

Has your friend used core.typed[0]? I haven't really, but I've wondered if it might be the perfect balance for people who really miss their type system. [0]: https://github.com/clojure/core.typed

core.typed is super cool, but I don't think it's liable to impress anybody who is used to Haskell or OCaml. Java, perhaps.

Re: Why I'm Productive in Clojure

#34
post #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? 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, es…

You can't wrap it with your own scripting because compiling is too slow. That's the essential problem, Leiningen has to be the center of your workflow. There's no other (meaningfully productive) way.

What I dislike is the need to run a background task per-project, every time I work on the project. What I would like is either:

1) Faster (sub 500ms) compile times so that I can flexibly use a workflow I prefer.

2) A "Leiningen daemon" that runs when I start my computer and automatically compiles any project.clj files that exist.

3) ClojureScript to build in the browser, so that my workflow can be any text editor + refresh the browser.

Leiningen plugins cannot give me any of those things, correct?

Re: Why I'm Productive in Clojure

#35
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…

Could you tell us more about what you ended up missing from Python ? is it syntax ? concepts ? libraries ?

It's nothing I miss, it's just that I couldn't keep in my head all the standard way to do things in Clojure/CL. I kept wondering "oh, how do I check if an element is a member of a list in Clojure, again?", or "ok, so I need to put this Sexpr out of this parenthesis, so with paredit I need to do C-right or C-left?", etc.

I plan to give Clojure and CL another shot in the future, but for now I am just lack of proficiency with them (I think I wrote about 1k loc in those language, including 4Clojure and project Euler, and some mock projects I tried to do but gave up).

Re: Why I'm Productive in Clojure

#36
post #34
post #29

Earlier quoted context omitted.

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, es…

You can't wrap it with your own scripting because compiling is too slow. That's the essential problem, Leiningen has to be the center of your workflow. There's no other (meaningfully productive) way. What I dislike is the need to run a background task per-project, every time I work on the project. What I would like is either: 1) Faster (sub 500ms) compile times so that I can flexibly use a workflow I prefer. 2) A "Le…

Fast JVM startup is possible with a preloader like Nailgun. A Leiningen daemon is very easy to create. lein-cljsbuild automatically generates ClojureScript so you can use any editor and refresh your browser.

The JVM way of doing things is different but not inferior. You extend Leiningen with Leiningen plugins written in JVM languages, not with external tools. Yes, you can do everything you would ever want to do.

Re: Why I'm Productive in Clojure

#37
post #3
post #2

> What matters to me in a language is whether I can use it without thinking about it. I love this statement. It reminds me of the what it feels to be good at mathematics (not my words): "Your intuitive thinking about a problem is productive and usefully structured, wasting little time on being aimlessly puzzled." from http://www.quora.com/Mathematics/What-is-it-like-to-understa... The author also says more about math…

> 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 use Clojure a lot, and did more Python in the past. Whenever I come back to Python, I am frustrated by being unable to remember what's a plain old function and what's a method, and the differences defining functions vs classes and methods etc..

In Clojure I know it's always (except for interop) just functions on values. Some functions dispatch to an implementation based on the type of the value, as is the case with multimethods and protocols, but it's still always just function calls from my point of view while writing the code.

Re: Why I'm Productive in Clojure

#39
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…

I work on a project where people use different workflows and editors.

I use Emacs w/ Cider to connect to a REPL session to develop my application.

Another person uses vim and "lein run" and "lein repl".

Yet another uses Cursive (IntelliJ-based) for everything.

Re: Why I'm Productive in Clojure

#40
post #34
post #29

Earlier quoted context omitted.

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, es…

You can't wrap it with your own scripting because compiling is too slow. That's the essential problem, Leiningen has to be the center of your workflow. There's no other (meaningfully productive) way. What I dislike is the need to run a background task per-project, every time I work on the project. What I would like is either: 1) Faster (sub 500ms) compile times so that I can flexibly use a workflow I prefer. 2) A "Le…

You can of course just have a scripts/ directory with any kind of script to automate any part of your build or development processes.
Post reply on HN