This is pretty cool. I know python well enough to hack my way around it. I'm probably missing something, but now I have to ask: what would be the point in me learning clojure?
Clojure & Python, Side by Side
61–67 of 67 posts
Re: Clojure & Python, Side by Side
#62Earlier quoted context omitted.
While I'd agree Python 2.5 to 2.7 doesn't bring a swath of language features with it... it's a good sign of Jython's slowing/sluggish growth/development. Personally, I want to use a language implementation that will be around and (well!) supported for many years.
None of you three mentioned Python 3.0 to 3.2.
Re: Clojure & Python, Side by Side
#63But that's not how I (nor, I imagine, any experienced Lisper) would do it. Lisp programmers are not afraid to write compilers in Lisp targeting Lisp. This is not something a Python programmer would consider doing.
I would implement Dan Friedman et al's Scheme constraint solver (cKanren) in Clojure (which can be done in a few hours) so I could solve all sorts of problems, not just Sudoku, in 80 lines of code instead of 200 with very good performance.
Re: Clojure & Python, Side by Side
#64In addition to performance metrics, this site has implementations of their benchmarks in all the languages they test. It's not pretty and side-by-side, but it's fascinating. http://shootout.alioth.debian.org/
Re: Clojure & Python, Side by Side
#65Earlier quoted context omitted.
None of you three mentioned Python 3.0 to 3.2.
That's because they don't matter to anyone.
Re: Clojure & Python, Side by Side
#66Side by side assumes that you would write the Clojure solution this way. But that's not how I (nor, I imagine, any experienced Lisper) would do it. Lisp programmers are not afraid to write compilers in Lisp targeting Lisp. This is not something a Python programmer would consider doing. I would implement Dan Friedman et al's Scheme constraint solver (cKanren) in Clojure (which can be done in a few hours) so I could so…
Given the addition of core.logic into Clojure 1.3.0, one could even skip the implementation of cKanren. Although to be honest I'm not altogether sure how core.logic measures up to cKanren.
Re: Clojure & Python, Side by Side
#67Side by side assumes that you would write the Clojure solution this way. But that's not how I (nor, I imagine, any experienced Lisper) would do it. Lisp programmers are not afraid to write compilers in Lisp targeting Lisp. This is not something a Python programmer would consider doing. I would implement Dan Friedman et al's Scheme constraint solver (cKanren) in Clojure (which can be done in a few hours) so I could so…
Great, I was wondering what would be an idiomatic way of solving this in Clojure. Given the addition of core.logic into Clojure 1.3.0, one could even skip the implementation of cKanren. Although to be honest I'm not altogether sure how core.logic measures up to cKanren.