This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Clojure and the fly likes Real-life Clojure examples Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Languages » Clojure
Bookmark "Real-life Clojure examples" Watch "Real-life Clojure examples" New topic
Author

Real-life Clojure examples

Toby Matejovsky
Greenhorn

Joined: Mar 22, 2011
Posts: 4
Clojure's fully functional paradigm is a big shift for many people, including myself. My experience with functional languages comes from OCaml in university, and programming along SICP using Scheme/Racket. What are some good open-source Clojure projects that I could study to learn common idioms, techniques, and how larger projects are actually structured?
Hauke Ingmar Schmidt
Rancher

Joined: Nov 18, 2008
Posts: 433
    
    2
Toby Matejovsky wrote:Clojure's fully functional paradigm


Am I wrong or does Clojure use functional elements but is not a "fully" (i.e. pure) functional language (same with Lisp)?
David Byron
Rancher

Joined: Jan 20, 2009
Posts: 172

Hauke Ingmar Schmidt wrote:
Toby Matejovsky wrote:Clojure's fully functional paradigm
Am I wrong or does Clojure use functional elements but is not a "fully" (i.e. pure) functional language (same with Lisp)?

I believe Clojure is a full-fledged Lisp dialect that also provides robust support for existing Java libraries. This means it is less hybridized than, say, Scala.

As a result, it's possible to use Clojure to develop a Swing app (see for example this slideshow) without deviating from Lispy syntax and functional conventions.


SCJD 6, OCPJP7, Baroque Potion, G+
Hauke Ingmar Schmidt
Rancher

Joined: Nov 18, 2008
Posts: 433
    
    2
Sure, but Lisp itself is not a pure or fully functional language.
David Byron
Rancher

Joined: Jan 20, 2009
Posts: 172

Hauke Ingmar Schmidt wrote:Sure, but Lisp itself is not a pure or fully functional language.
Hence "less hybridized". ;)
Hussein Baghdadi
clojure forum advocate
Bartender

Joined: Nov 08, 2003
Posts: 3479

Hauke Ingmar Schmidt wrote:
Toby Matejovsky wrote:Clojure's fully functional paradigm


Am I wrong or does Clojure use functional elements but is not a "fully" (i.e. pure) functional language (same with Lisp)?

Niether Clojure or Lisp are pure functional programming languages, not like Haskell any way.
As for the original poster, Github hosts tons of Clojure project. I'm pretty sure you will get some projects that you will like and learn a lot from them.
Toby Matejovsky
Greenhorn

Joined: Mar 22, 2011
Posts: 4
That's fair, "fully functional" was the wrong description of the language. https://github.com/languages/Clojure is a good starting point to explore clojure projects.

Are there any specific ones that you (all) have found interesting?
Igor Mechnikov
Ranch Hand

Joined: Feb 13, 2011
Posts: 100

Toby Matejovsky wrote:That's fair, "fully functional" was the wrong description of the language. https://github.com/languages/Clojure is a good starting point to explore clojure projects.

Are there any specific ones that you (all) have found interesting?


Bump for good Clojure code examples specific recommendations.

Thank you.


String knock = "\u042F \u0418\u0433\u043e\u0440\u044c";
Sean Corfield
Ranch Hand

Joined: Feb 09, 2011
Posts: 261
    
    5

This comes up fairly often on the Clojure mailing list and the consensus seems to be that the Clojars project is a fairly good example to look at.

Toby's pointer to github projects written in Clojure is a good general place to start but I suspect most "real-life" Clojure code, at an application level, is behind corporate firewalls right now with only the libraries out in public. I'm hoping to open source some of the Clojure code that my company is creating but it may be a while before that happens (and, to be honest, much of that would really only be higher-level libraries built around other stuff).

It may just be too early in Clojure's cycle for a substantial amount of open source _application_ code.
Hussein Baghdadi
clojure forum advocate
Bartender

Joined: Nov 08, 2003
Posts: 3479

You might want to check ElephantDB:
https://github.com/nathanmarz/elephantdb
http://tech.backtype.com/introducing-elephantdb-a-distributed-database
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Real-life Clojure examples