Re: [ANN] Clojure 1.8.0-RC1 is now available

2015-11-11 Thread Alex Miller
There is a Potemkin error that was exposed during 1.8 that looks like this (the compile_stub) - is that library in your dependencies? If so, supplying the latest version explicitly should fix the problem. -- You received this message because you are subscribed to the Google Groups "Clojure"

Re: [ANN] Clojure 1.8.0-RC1 is now available

2015-11-11 Thread Alex Miller
Can you file a ticket for that VerifyError Shantanu? -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first

Re: [ANN] Clojure 1.8.0-RC1 is now available

2015-11-11 Thread Nicola Mometto
Here's a minimal repro case: user=> (defn foo ^long [] 1) #'user/foo user=> (Integer/bitCount ^int (foo)) VerifyError (class: user$eval13, method: invokeStatic signature: ()Ljava/lang/Object;) Expecting to find integer on stack java.lang.Class.getDeclaredConstructors0 (Class.java:-2) > On 11

Re: [ANN] Clojure 1.8.0-RC1 is now available

2015-11-11 Thread Nicola Mometto
To be honest I'm not sure this should even be a valid use of type hints. You're telling the compiler that the result of (foo) is an int, when it is infact a long. The correct way to do this should be: (Integer/bitCount (int (foo)) Again, lack of specification on what the correct type hinting

Re: Procedurally generated animation in Clojure

2015-11-11 Thread Christopher Small
Oh; and nice work Mike! :-) Chris On Wednesday, November 11, 2015 at 8:48:22 AM UTC-8, Christopher Small wrote: > > If you haven't tried it in a while, you may want to look again. They've > created an alternate API or mode which is more functional/immutable. > Perhaps that _is_ what you saw

Re: Procedurally generated animation in Clojure

2015-11-11 Thread Christopher Small
If you haven't tried it in a while, you may want to look again. They've created an alternate API or mode which is more functional/immutable. Perhaps that _is_ what you saw though, and you're just referring to the mutable Java underpinnings leaking through... My 2c Chris On Tuesday, November

Re: [ANN] Clojure 1.8.0-RC1 is now available

2015-11-11 Thread Fluid Dynamics
On Wednesday, November 11, 2015 at 9:23:16 AM UTC-5, Nicola Mometto wrote: > > To be honest I'm not sure this should even be a valid use of type hints. > You're telling the compiler that the result of (foo) is an int, when it is > infact a long. > > The correct way to do this should be: >

Re: [ANN] Clojure 1.8.0-RC1 is now available

2015-11-11 Thread Nicola Mometto
Clojure has a history of adopting the GIGO approach > On 11 Nov 2015, at 12:08, Shantanu Kumar wrote: > > Thanks, Nicola! > > Filed the ticket: http://dev.clojure.org/jira/browse/CLJ-1846 > > > Shantanu > > On

Re: [ANN] Let's make clojure.org better!

2015-11-11 Thread Alex Miller
Yes, all of the instructions point you to a stable build of JBake 2.5.0-SNAPSHOT. There is, in particular, a fix coming in 2.5.0 that allows us to output files with no extension so that urls look like http://clojure.org/reader instead of http://clojure.org/reader.html. When 2.5 is released,

Re: [ANN] Let's make clojure.org better!

2015-11-11 Thread Nelson Morris
Is there a list of reviewers and editors? On Tue, Nov 10, 2015 at 9:14 AM, Alex Miller wrote: > The Clojure community is full of talented writers and valuable experience, > and together we can create great documentation for the language and the > ecosystem. With that in

Re: [ANN] Clojure 1.8.0-RC1 is now available

2015-11-11 Thread Alex Miller
Aside on the type hinting specs: - I would be happy to have a doc contribution at https://github.com/clojure/clojure-site that defines specs that I could move through review with Rich. On Wed, Nov 11, 2015 at 8:22 AM, Nicola Mometto wrote: > To be honest I'm not sure this

Re: [ANN] Clojure 1.8.0-RC1 is now available

2015-11-11 Thread Phillip Lord
I've been trying out RC1. I've tried enabling the direct linking in leiningen, by sticking: :jvm-opts ["-Dclojure.compiler.direct-linking=true"] I can't see any particular performance change (when running tests anyway). Is there a way to know whether it is actually working? Phil Alex

Re: [ANN] Clojure 1.8.0-RC1 is now available

2015-11-11 Thread Shantanu Kumar
Thanks, Nicola! Filed the ticket: http://dev.clojure.org/jira/browse/CLJ-1846 Shantanu On Wednesday, 11 November 2015 17:13:05 UTC+5:30, Nicola Mometto wrote: > > Here's a minimal repro case: > > user=> (defn foo ^long [] 1) > #'user/foo > user=> (Integer/bitCount ^int (foo)) > VerifyError

Re: [ANN] Let's make clojure.org better!

2015-11-11 Thread Hildeberto Mendonça
All set here! Just to point out that the site generation didn't work with JBake v2.4.0 (latest stable). So, if you already use JBake, you will have to upgrade it to v2.5.0-SNAPSHOT, as suggested in the README file. On Wed, Nov 11, 2015 at 5:38 AM, Dmitri wrote: > Just

Re: [ANN] Clojure 1.8.0-RC1 is now available

2015-11-11 Thread Robin Heggelund Hansen
You were right. Aleph depended on potemkin, upgrading that dependency fixed the problem. onsdag 11. november 2015 12.12.40 UTC+1 skrev Alex Miller følgende: > > There is a Potemkin error that was exposed during 1.8 that looks like this > (the compile_stub) - is that library in your

Re: [ANN] 0.3.0 HugSQL release

2015-11-11 Thread Curtis Summers
Colin, This is a great question, and I concede that the compose-ability of HoneySQL (and other DSLs) is almost always going to best HugSQL for the simple reason that a Lisp is a better tool for composing than SQL is. You could feasibly accomplish some composable queries by using HugSQL's Raw SQL

[ANN] 0.3.0 HugSQL release

2015-11-11 Thread Curtis Summers
I'm happy to announce the 0.3.0 release of HugSQL. HugSQL is a Clojure library for embracing SQL in your projects. This is a significant release because of the new documentation site: http://www.hugsql.org/ Recent changes from 0.2.x to 0.3.0 include: - New doc site! - Comparison to

[ANN] hugsql-adapter-postgres-async 0.3.0

2015-11-11 Thread Robin Heggelund Hansen
A new release of hugsql-adapter-postgres-async is now available. * Sync release number with hugsql release number. * Make use of new feature in hugsql, that allows us to return all exceptions on the response channel. Github: https://github.com/Skinney/hugsql-async -- You received this message

Re: [ANN] 0.3.0 HugSQL release

2015-11-11 Thread Robin Heggelund Hansen
Fantastic release Curtis. This is an awesome work! -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post.

Re: Style, Efficiency, and updating nested structure

2015-11-11 Thread Gareth Clapperton
Hey Daves I too like the map idea (and using sets for roles for that matter). But sticking with collections, I might do something like this (defn upsert "Updates or inserts v into coll" [key-fn update-fn v coll] (let [k(key-fn v)] (letfn [(step [v [x & xs]]

Re: Style, Efficiency, and updating nested structure

2015-11-11 Thread James Reeves
In general, it's not helpful to reach for optimisations like mutability without a benchmarking tool to tell you how much of a difference you're making. I'd be tempted to write something like: (defn find-project-index [projects id] (first (keep-indexed (fn [i p] (if (= (:project_id p) id)

Re: [ANN] 0.3.0 HugSQL release

2015-11-11 Thread Colin Yates
Congrats Curtis - this looks great. I do have one question: you compare in http://www.hugsql.org/#faq-dsls HugSQL with HoneySQL, however, the one killer feature that I use HoneySQL for is composable queries - or rather building up the Clojure data map through composition before rendering it as

Re: [ANN] core.async 0.2.374

2015-11-11 Thread Martin Raison
Thanks! Le mercredi 11 novembre 2015 14:30:34 UTC-8, Alex Miller a écrit : > > Dependency info: [org.clojure/core.async "0.2.374"] > > This release bumps the versions of all upstream dependencies. In > particular, this pulls in new versions of tools.analyzer.jvm, tools.reader, > etc. > > The

Re: Style, Efficiency, and updating nested structure

2015-11-11 Thread Rangel Spasov
I have been using Specter https://github.com/nathanmarz/specter recently with great success for doing all kinds of transformation: (let [project-id 10 new-role :r3 projects [{:project-id 1 :project-roles [:r1]} {:project-id 2 :project-roles [:r2]}]

Re: Pareto's Clojure

2015-11-11 Thread Alan Thompson
Finish reading CFBT, and add "Living Clojure". Then read the other ones and keep the Clojure Cookbook handy for concrete examples on specific tools. Don't forget "Web Development with Clojure" for a focused tutorial on that topic. Alan On Tue, Nov 10, 2015 at 3:23 PM, Sayth Renshaw

Re: [ANN] Clojure 1.8.0-RC1 is now available

2015-11-11 Thread Alex Miller
In this case, I am definitely in agreement with FD that producing invalid bytecode does not seem like an acceptable outcome. The other two options are a compiler error or having the compiler ignore or resolve the mismatch such that it produces valid bytecode. Rich is looking at it. On

Re: [ANN] Clojure 1.8.0-RC1 is now available

2015-11-11 Thread Alex Miller
On Wednesday, November 11, 2015 at 2:03:07 PM UTC-6, Andy Fingerhut wrote: > > Results of some testing done on 1.8.0-RC1: > > Ran 'mvn clean test' on a few OS/JDK combos that are not tested as often. > Reason: there have been (or still are) build or test failures with some of > them. All JDKs

Re: [ANN] Let's make clojure.org better!

2015-11-11 Thread Colin Yates
I don’t know how feasible that is as a tool lives in a much smaller space than everything you can do with that tool. “programming through Clojure” feels a bit like teaching Carpentry through examine a hammer… On the other hand, do I think the Clojure community have some excellent ideas on how

Style, Efficiency, and updating nested structure

2015-11-11 Thread Dave Tenny
A colleague and I are debating various things clojure as we were exploring alternative ways to solve a problem. Here's the description of the problem that a particular function is trying to solve, and the first implementation of it. (defn update-roles "Given a vector of maps of the form

Re: [ANN] Clojure 1.8.0-RC1 is now available

2015-11-11 Thread Alex Miller
Rich pushed a commit to master that will now detect this invalid primitive type hint and throw a compiler error. Shantanu - your asphalt library will fail due to this new compile error. You should change your two ^int type hints to casts instead (int ...) to fix the error. FYI, this type

Re: [ANN] Let's make clojure.org better!

2015-11-11 Thread Alex Miller
On Wednesday, November 11, 2015 at 10:27:34 AM UTC-6, Nelson Morris wrote: > > Is there a list of reviewers and editors? > In the interest of getting this public, I did not wait to figure out all the details of the review and editing process before we made the announcement. I am hoping to get a

Re: Pareto's Clojure

2015-11-11 Thread Eric Normand
Hi Sayth! This is quite an interesting question. I would dive into the abstractions at the core of Clojure: Seq, Associative, Fn, and Deref. Having a good grasp of these will give you a nice foundation into what the language is all about. Seq

Re: [ANN] Clojure 1.8.0-RC1 is now available

2015-11-11 Thread Andy Fingerhut
Results of some testing done on 1.8.0-RC1: Ran 'mvn clean test' on a few OS/JDK combos that are not tested as often. Reason: there have been (or still are) build or test failures with some of them. All JDKs listed below were 64-bit. Windows 7 Enterprise SP1 + Oracle JDK 1.7.0_80-b15: ok 3/3

Re: [ANN] Let's make clojure.org better!

2015-11-11 Thread Harrison Maseko
Content idea: Would be nice to have a section for new-comers to programming, introducing them to programming through Clojure. All of the existing Clojure books that I know of are aimed at those with intermediate to advanced programming skills in Clojure or another language. The content and

[ANN] core.async 0.2.374

2015-11-11 Thread Alex Miller
Dependency info: [org.clojure/core.async "0.2.374"] This release bumps the versions of all upstream dependencies. In particular, this pulls in new versions of tools.analyzer.jvm, tools.reader, etc. The following bug was fixed via the tools.analyzer.jvm update: - ASYNC-149

Re: Style, Efficiency, and updating nested structure

2015-11-11 Thread Nelson Morris
I can't speak much to the efficiency analysis, but if I was solving the problem I would attempt to change the data structure. If the `proj-roles` could be a map then everything could be quick map updates. Given you run this in a loop to aggregate everything perhaps converting to that form before

Re: Style, Efficiency, and updating nested structure

2015-11-11 Thread Atamert Ölçgen
Hi Dave, I would prefer functional approach (the latter, one without atoms and reset!) over the one with mutable local state. I would also refactor the update case as a separate function. Both are from the style perspective. I would try to optimize after I'm happy with how the code reads. And

Re: Style, Efficiency, and updating nested structure

2015-11-11 Thread Michael Gardner
- Worrying about the performance of a small, pure function like this is almost certainly premature optimization. - Avoid concurrency constructs like atoms if you don't need them. - Have you considered using group-by? > On Nov 11, 2015, at 13:25, Dave Tenny wrote: > > A