Live data from Hacker News

Getting Started With Clojure

jrheard.tumblr.com

61–70 of 113 posts

Re: Getting Started With Clojure

#61
post #53

I have been thinking about getting into Clojure, but time is precious. It doesn't seem like there are that many jobs out there, but I could be wrong. For those of you in the industry, why would I want to use Clojure? What would be a good project to try it on? A Web app? Why is it worth learning it?

This post is specially relevant for me, since last weekend I've decided to take a quick look at Clojure, as one of my personal goals this year is to get acquainted with a Lisp dialect. From my _very_ short experience (I've started coding a simple game), here are my two cents: - If your application is heavily dependent on state, which changes continuously and must be maintained during most of the execution time - like…

Thanks for this. I'd hate to start down the road of writing a game in clojure....

I may try the blog/webapp idea with Clojure.

Re: Getting Started With Clojure

#62
post #59
post #53

I have been thinking about getting into Clojure, but time is precious. It doesn't seem like there are that many jobs out there, but I could be wrong. For those of you in the industry, why would I want to use Clojure? What would be a good project to try it on? A Web app? Why is it worth learning it?

I started learning Clojure because it seemed to be the logical next step for me. In the few years that I've been programming full-time, I've noticed some patterns: in general, imperative code with lots of side effects in it is difficult to reason about and hard to test, and pure functions are easy to reason about and trivial to test. The same rule seems to hold for code that uses mutability vs code that deals only wi…

What do your superiors think about implementing new, small projects in Clojure?

When you say "has a huge amount of useful libraries" but then say that Python is "batteries included", which libraries in Clojure are particularly useful? Which ones did you wish it had?

Re: Getting Started With Clojure

#63
post #61

Earlier quoted context omitted.

This post is specially relevant for me, since last weekend I've decided to take a quick look at Clojure, as one of my personal goals this year is to get acquainted with a Lisp dialect. From my _very_ short experience (I've started coding a simple game), here are my two cents: - If your application is heavily dependent on state, which changes continuously and must be maintained during most of the execution time - like…

Thanks for this. I'd hate to start down the road of writing a game in clojure.... I may try the blog/webapp idea with Clojure.

Programming a game in Clojure might not be such a bad idea - mikera has some really great thoughts at http://stackoverflow.com/questions/9755882/are-functional-pr... . Also, you might find this series of blog posts interesting: http://briancarper.net/blog/520/making-an-rpg-in-clojure-par...

Re: Getting Started With Clojure

#64
post #62
post #59

Earlier quoted context omitted.

I started learning Clojure because it seemed to be the logical next step for me. In the few years that I've been programming full-time, I've noticed some patterns: in general, imperative code with lots of side effects in it is difficult to reason about and hard to test, and pure functions are easy to reason about and trivial to test. The same rule seems to hold for code that uses mutability vs code that deals only wi…

What do your superiors think about implementing new, small projects in Clojure? When you say "has a huge amount of useful libraries" but then say that Python is "batteries included", which libraries in Clojure are particularly useful? Which ones did you wish it had?

1) Remains to be seen :)

2) I used those two phrases interchangeably - I consider both Clojure and Python as "batteries-included" languages. Case in point - before I was aware that Clojure Toolbox existed, I was able to google "clojure http request" and find several libraries that let me perform HTTP requests programmatically that I could include in my project.clj and start using right away. My memory's a little fuzzy, so apologies if this is completely wrong, but I don't recall having as easy a time doing that in e.g. Common Lisp or Haskell.

As far as which libraries in Clojure are particularly useful - Ring and Compojure are fantastic, and core.logic[0] is extremely interesting; I'll write a blog post showcasing core.logic (and using it for my first time ever) at some point. Midje is great for writing unit tests. I've only been using Clojure for a few months, so I can't point to too many others that have really been extremely useful for me, but I definitely recommend checking out the Clojure Toolbox[1] for a more thorough list of the main contenders.

[0] https://github.com/clojure/core.logic/wiki/A-Core.logic-Prim... [1] http://www.clojure-toolbox.com

Re: Getting Started With Clojure

#65
"When I was going through all this myself a few months back, there was a weird period of a good few weeks when I had basically no mental map of the Clojure ecosystem and had no idea how to assemble one."

One of the things you can do when learning something new is to hop onto IRC and join a channel related to the topic. I almost always have got a good overview of things just by asking around what I am supposed to know.

Re: Getting Started With Clojure

#66
post #62
post #59

Earlier quoted context omitted.

I started learning Clojure because it seemed to be the logical next step for me. In the few years that I've been programming full-time, I've noticed some patterns: in general, imperative code with lots of side effects in it is difficult to reason about and hard to test, and pure functions are easy to reason about and trivial to test. The same rule seems to hold for code that uses mutability vs code that deals only wi…

What do your superiors think about implementing new, small projects in Clojure? When you say "has a huge amount of useful libraries" but then say that Python is "batteries included", which libraries in Clojure are particularly useful? Which ones did you wish it had?

If you don't find a Clojure library meeting your needs, you can always find a Java library for that purpose and "wrap the crap".

http://news.ycombinator.com/item?id=1883043

Re: Getting Started With Clojure

#67
post #53

I have been thinking about getting into Clojure, but time is precious. It doesn't seem like there are that many jobs out there, but I could be wrong. For those of you in the industry, why would I want to use Clojure? What would be a good project to try it on? A Web app? Why is it worth learning it?

What kind of job are you trying to get?

If you want to start your own venture, using a powerful language like Clojure might give you an edge.

http://www.paulgraham.com/avg.html

Learning a powerful, less main stream language like Clojure can also signal to smart, innovative software companies you might be the kind of person they should hire.

http://www.paulgraham.com/pypar.html

Re: Getting Started With Clojure

#68
post #37

Earlier quoted context omitted.

You still need to install the JVM. Python/perl/ruby require installers because you need some platform-specific stuff for each. Running everything inside the JVM means you only need to ship what any arbitrary JVM library requires. In this case, its as simple as a .jar.

So Clojure has over (say) Ruby the feature that you don't have to install it. Yet you do have to install a JVM... How is installing a JVM better than installing any other interpreter or runtime?

The JVM tends to change less often than a language runtime, so you can use the JVM version that's packaged for your operating system, but still take advantage of the latest language runtime.

Re: Getting Started With Clojure

#69

Earlier quoted context omitted.

So, reader knows about keywords and does this implicit syntactic transformation? It seems to me that a function must be defined somewhere before one could call it.)

https://github.com/clojure/clojure/blob/master/src/jvm/cloju...

The code itself is more concise and comprehensible than the prose explanations here. :)

Re: Getting Started With Clojure

#70
post #27

Earlier quoted context omitted.

Fair point, mea culpa :) I'll carve out some time this weekend, figure out how to make this advice generic across platforms, and figure out how to contribute it to dev.clojure.org.

Please do. Good writers like yourself can make a big difference right now. There's also the Clojure Doc project - http://clojure-doc.org/

I am a mediocre-at-best Java developer, but somewhat better at writing. I'd like to learn Clojure and contribute to the community while doing so. Is the Clojure Doc project the best opportunity for someone like me?
Post reply on HN