Live data from Hacker News

Clojure 1.7 is now available

blog.cognitect.com

51–60 of 125 posts

Re: Clojure 1.7 is now available

#51
post #28

My only negativity with Clojure isn't really with the language itself, but with the Debian / Ubuntu packages, they're way outdated. Not sure who ever maintained them, or why they stopped doing so 1.4 being the last version. Outside of that for anyone wanting to check it out, you could try downloading LightTable and using ClojureScript, seems to be close enough I am able to use Clojure books with ClojureScript, not su…

Clojure is often billed as "just another JAR" and in my experience I've never felt the need to install via any package manager. My workflow often consists of a new leiningen project where I define the version of Clojure that I want to use for the current project, along with whatever I else I need for the task at hand. Likewise, if I just need a quick repl to test something out, I'll simply use `lein repl` and fire aw…

To expand on this:

If you're familiar with Python Leiningen takes the place of both pip and virtualenv. Every project has a project.clj file where you declare your project dependencies and running "lein deps" from your project root handles it from there. This includes libraries and the version of Clojure you're targeting. When you add/delete/change a dependency in project.clj you simply run "lein deps" again. You never have to run "pip freeze" or make a requirements.txt file because project.clj serves that purpose as well.

As an example, Leiningen's own project.clj: https://github.com/technomancy/leiningen/blob/master/project...

Re: Clojure 1.7 is now available

#52
post #15

>Transducers are composable algorithmic transformations. They are independent from the context of their input and output sources and specify only the essence of the transformation in terms of an individual element. Because transducers are decoupled from input or output sources, The biggest thing holding me back from learning Clojure is that I fear it will take me a decade to become remotely competent in it.

If you have an understanding of functions like map, filter, and reduce, transducers are actually pretty easy. Say you have `(map inc [1 2])`. You can run that, and get `'(2 3)`. A transducer is the `(map inc)` part of that call (slightly confusingly, this isn't partial application or currying). You can apply it to something like `[1 2]`, but you can also compose with it, by combining it with say, `(filter even?)` to…

The way you explain it, it's no different from functions and function composition; in which case, why invent new vocabulary?

I do remember looking into them before and translating them into Haskell and they ended up not being identical to functions in the trivial sense that you suggest, but I forget how.

Re: Clojure 1.7 is now available

#53

Earlier quoted context omitted.

Don't worry too much if you don't get the esoteric stuff in the beginning. The fact that it's there just means that there's room to grow. The core language is actually very simple and quite straightforward. It just allows for some quite mind-boggling stuff. Try Carin Meier's Living Clojure if you feel up for an intro.

And then check out the new Clojure Applied (by me) which aims to be a good intermediate level intro. https://pragprog.com/book/vmclojeco/clojure-applied

+1 I looked at your table of contents: nice topic selection.

The free excerpt was a good read. You might edit your comment to provide a direct link to that.

Re: Clojure 1.7 is now available

#54
post #50

I'm really impressed by how backwards compatible it is. I just changed the Clojure version from "1.6.0" to "1.7.0" for one of my side projects, without updating any library versions, ran it, all the tests passed, and it seems to work perfectly. It also didn't break my Emacs setup, which is a breath of fresh air compared to how much work it was to get the Haskell tooling working with the new 7.10 GHC release (GHC-mod…

Yes this is something clojure users take for granted. I dont know the state of Scala right now but a year back even minor version bump was horrible in scala in terms of backward compatibility. Really impressive job by clojure code devs in terms of maintaining such stable releases.

Is the job simpler because Clojure is not statically typed?

Re: Clojure 1.7 is now available

#55

Earlier quoted context omitted.

I am reading several negative responses to this comment and I feel the need to throw him a hand. I like the idea of having a single place where every application is installed, to the extent possible. I like to try to install everything with apt-get, and I feel there is value in working that way. It's way more complicated to have apt-get for some things, lein for other ones, pip install, quicklisp, the ruby gems, emac…

One advantage to language specific packages is that IDE's have a uniform target across platforms (PyCharm has pip support for example). That's a win if you switch around a lot.

Oh, interesting, I've never looked at it that way!

Re: Clojure 1.7 is now available

#56

>Transducers are composable algorithmic transformations. They are independent from the context of their input and output sources and specify only the essence of the transformation in terms of an individual element. Because transducers are decoupled from input or output sources, The biggest thing holding me back from learning Clojure is that I fear it will take me a decade to become remotely competent in it.

You may feel less intimidated by "Clojure for the Brave and True." The landing page features a rodent with an eye patch and a sword. http://www.braveclojure.com/

> Delete ~/.emacs or ~/.emacs.d if they exist

Ehhhh, no!

Re: Clojure 1.7 is now available

#57

My only negativity with Clojure isn't really with the language itself, but with the Debian / Ubuntu packages, they're way outdated. Not sure who ever maintained them, or why they stopped doing so 1.4 being the last version. Outside of that for anyone wanting to check it out, you could try downloading LightTable and using ClojureScript, seems to be close enough I am able to use Clojure books with ClojureScript, not su…

Just install "lein" and then in any project run "lein deps" to use maven to pull in all dependencies, including the version of Clojure that you have in your project.clj file.

Clojure is really a simple language to use, which is one reason why I like it a lot (and use it for most of my projects). Compared to Scala and Haskell, Clojure is fast to learn. Java interop with Clojure is also really simple. I often use existing Java code by including it in my Clojure project and adding the magic Java build stuff to my project.clj file. Some purists might like to have just Clojure in their projects, but being able to pull in my old Java code (and other open source libraries) as needed is a large time saver. If Java libraries are small, I like to have them in my project. I use IntelliJ for both Clojure and Java development and having all the code in one place is often nicer than pulling in JAR dependencies.

Re: Clojure 1.7 is now available

#58
post #54
post #50

Earlier quoted context omitted.

Yes this is something clojure users take for granted. I dont know the state of Scala right now but a year back even minor version bump was horrible in scala in terms of backward compatibility. Really impressive job by clojure code devs in terms of maintaining such stable releases.

Is the job simpler because Clojure is not statically typed?

Or because it's a lisp? : )

Re: Clojure 1.7 is now available

#59
post #54
post #50

Earlier quoted context omitted.

Yes this is something clojure users take for granted. I dont know the state of Scala right now but a year back even minor version bump was horrible in scala in terms of backward compatibility. Really impressive job by clojure code devs in terms of maintaining such stable releases.

Is the job simpler because Clojure is not statically typed?

I'm not a Scala user, but Clojure the language tends to be extremely stable. Existing stdlib functions almost never get updated, unless they add a new (backwards-compatible) arities.

Releases tend to consist mostly of new features, and a small number of bugfixes.

Re: Clojure 1.7 is now available

#60
post #15

Earlier quoted context omitted.

If you have an understanding of functions like map, filter, and reduce, transducers are actually pretty easy. Say you have `(map inc [1 2])`. You can run that, and get `'(2 3)`. A transducer is the `(map inc)` part of that call (slightly confusingly, this isn't partial application or currying). You can apply it to something like `[1 2]`, but you can also compose with it, by combining it with say, `(filter even?)` to…

The way you explain it, it's no different from functions and function composition; in which case, why invent new vocabulary? I do remember looking into them before and translating them into Haskell and they ended up not being identical to functions in the trivial sense that you suggest, but I forget how.

Why have new vocabulary for the state monad?

Transducers are mostly function and function composition, but with a specific signature. There are a handful of contracts on a transducer, so it is useful to have a name, so you can say "this function takes a transducer" and "this function returns a transducer".

Post reply on HN