Re: ANN: Clojure 1.5

2013-03-01 Thread Alex Baranosky
Congratulations on the new release. Thanks for all your hard work. On Fri, Mar 1, 2013 at 5:08 PM, Jean Baro wrote: > Congratulations for every one involved in making clojure the most fun to > work language there is. > > On Friday, 1 March 2013 12:56:58 UTC-3, stuart@gmail.com wrote: > >> W

Re: [GSoC 2013] CinC

2013-03-01 Thread Aaron Cohen
I'd really like to see this happen actually. If there's interest I'd be happy to help or mentor. The current status is that I have a commit that needs finishing to implement letfn and I believe that was the last major special form that needed implementing in the compiler. Next up would be figuri

Re: ANN: lein-clr 0.2.0 for ClojureCLR

2013-03-01 Thread Aaron Craelius
My Clojure.dll shouldn't break ngen. I ilmerge'd it from AOT compiled assemblies - it doesn't use embedded assemblies which would break ngen. For me ngen seems to work fine. Open up the Clojure.dll from nuget in Ilspy or DotPeek to see how it's done. Btw, I just posted a new build on nuget toda

Re: ANN: lein-clr 0.2.0 for ClojureCLR

2013-03-01 Thread Aaron Craelius
On Fri, Mar 1, 2013 at 6:48 PM, Rainer Schuster wrote: > 2. I assume, you created your a nuget and added it to a local repo. I > don't have one and don't know what version you are using. > 3. I deleted the Clojure and Nuget.Core dependency. Using Stable > Nuget.Core Version 2.2.0 but thats not an

Clojure 1.5 print-table, org-mode babel, and org-mode HTML gen

2013-03-01 Thread Mark C
Sorry in advance if this doesn't turn out to be a clojure-specific problem, but this seemed like a reasonable place to ask.. Context: I'm a heavy org-mode user, so Mike Fogus' recent "usesthis" postmentioning org-mode babel was quite interesting. I got babel wor

Problems building CounterClockwise

2013-03-01 Thread Frank Hale
I'm trying to build the CounterClockwise plugin for Eclipse and am stuck with the following build path problem: Project 'ccw.core' is missing required library: 'lib' Has anyone here encountered that and know how to resolve it? I've done a search on Google but I'm not finding any results. I have a

Re: Windows MSI installer for a msysGit-compatible Clojure?

2013-03-01 Thread AtKaaZ
yeah looks like both lein and lein.bat fail with 403 curl: (22) The requested URL returned error: 403 Failed to download https://leiningen.s3.amazonaws.com/downloads/leiningen-2.1.0-SNAPSHOT-standalone.jar Downloading Leiningen now... Exception calling "DownloadFile" with "2" argument(s): "The rem

clojure plugin for adobe brackets

2013-03-01 Thread john pradeep
For people who use adobe brackets for web development, you can now evaluate clojure expressions in brackets using a small plugin that I wrote over the weekend - https://github.com/yehohanan7/clj-brackets Planning to extend it with some more useful features in the future. Thanks -- -- You rece

Re: Windows MSI installer for a msysGit-compatible Clojure?

2013-03-01 Thread Andrew Pennebaker
I've tried Chocolatey Leiningen, lein.bat, and the "Cygwin-compatible" lein shell script. All fail, either silently, or with thrown Java errors. :( On Fri, Mar 1, 2013 at 8:16 PM, AtKaaZ wrote: > did you try with lein.bat ? it would bring all needed deps for your > project (including clojure) i

New midje tutorial (and sales pitch) for clojure.test users

2013-03-01 Thread Brian Marick
Midje is a competitor to clojure.test. Version 1.5 has just entered the release candidate pipeline. It's a big release, and makes a big jump toward what's long been a goal of mine: "working with ease": http://www.exampler.com/ease-and-joy.html http://www.youtube.com/watch?v=0U0cfejYMOI In partic

Re: ANN: Clojure 1.5

2013-03-01 Thread Jean Baro
Congratulations for every one involved in making clojure the most fun to work language there is. On Friday, 1 March 2013 12:56:58 UTC-3, stuart@gmail.com wrote: > We are pleased to announce the release of Clojure 1.5. > > Getting Clojure: > > Web: http://clojure.org/downloads

Re: Windows MSI installer for a msysGit-compatible Clojure?

2013-03-01 Thread AtKaaZ
did you try with lein.bat ? it would bring all needed deps for your project (including clojure) in your ".m2" folder (maven) which is in %HOMEDRIVE%%HOMEpath% On Sat, Mar 2, 2013 at 2:12 AM, MC Andre wrote: > I love Clojure, but I'm having trouble getting it installed in Windows > (sometimes I u

Windows MSI installer for a msysGit-compatible Clojure?

2013-03-01 Thread MC Andre
I love Clojure, but I'm having trouble getting it installed in Windows (sometimes I use Windows). Can someone provide an MSI installer for Clojure that adds a "clj.exe" to PATH? I ask for an MSI and a "clj.exe", because every way I've tried to setup Clojure has failed: * "chocolatey install c

Re: Moving ClojureScript to Clojure 1.5.0 & data.json dependency

2013-03-01 Thread Thomas Heller
+1 I'd like to check out source maps. On Friday, March 1, 2013 8:41:26 PM UTC+1, David Nolen wrote: > > Now that Clojure 1.5.0 is out the door I'd like to make ClojureScript > depend on it. This would allow me to merge in the source map branch which > is a work in progress but far enough along

Re: Optimized code => now it's 4x slower. Why?

2013-03-01 Thread Stephen Compall
On Fri, 2013-03-01 at 13:17 +0100, Tassilo Horn wrote: > (defn ^:private eget-ref [^EObject eo ref allow-unknown-ref single-valued] eo has a type here, > (if-let [^EStructuralFeature sf (.getEStructuralFeature (.eClass eo) (name > ref))] sf has a type here (btw the annotation is probably not

Re: ANN: lein-clr 0.2.0 for ClojureCLR

2013-03-01 Thread Rainer Schuster
Btw. I like how you package all the clojure assemblies into clojure.dll, very smart. But that'll break ngen speed up, doesn't it? Atm. I'm running a native x86 image of clojure-clr (1.4.1) which is pretty descent, regarding the startup. I'll try building a ngened versio of your current fork and

Inserting multiple rows with clj-jdbc

2013-03-01 Thread Jonathon McKitrick
Does insert-records with a collection of records have any performance advantage over calling insert-values for each row? Is it only a question of network latency? -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email

Re: ANN: lein-clr 0.2.0 for ClojureCLR

2013-03-01 Thread Rainer Schuster
Thx and great work. I have a working nlein.exe ... and had serveral issues so far. First of all: I"m using VS2012. Don't this is not an issue. 1. your packages.config from Bootstrap has the following content 2. I assume, you created your a nuget and added it to a local repo. I

Distributing Clojure 1.5 to Java 6 and Java 7 JVMs

2013-03-01 Thread Bill Robertson
If I want to distribute Clojure 1.5 to Java 1.6 JVMs, and I am not using the reducer code, do I need to include the fork join library? If I do use the reducers library, and I need to distribute to both JVM versions, should I include the fork/join lib with the distribution and then will it work

Re: Wrong clojure version depending on lein dependencies (was: ANN: Clojure 1.5)

2013-03-01 Thread Nelson Morris
On Fri, Mar 1, 2013 at 1:24 PM, Tassilo Horn wrote: > Michael Klishin writes: > >> 2013/3/1 Tassilo Horn >> >>> So to summarize: >>> >>> clj 1.5.0-RC17 + ordered 1.3.2 => clj 1.5.0-RC17 is used >>> clj 1.5.0 + ordered 1.3.2 => clj 1.4.0 is used >>> clj 1.5.0 no ordered 1.3.2 => cl

Re: Unable to build Clojure 1.5

2013-03-01 Thread John Smith
Ok, I see where I messed up. Thanks, that helped. I can take it from here. On Friday, March 1, 2013 1:40:35 PM UTC-5, Andy Fingerhut wrote: > > As noted in the readme.txt file: > > To build locally with Ant: > >One-time setup:./antsetup.sh >To build: ant > > > > Clojure ha

Consuming REST APIs in Clojure: What's the best way?

2013-03-01 Thread Denis Labaye
Hi, I'm using clj-http to consume a JSON REST API. The code is ugly [1]: I'm in the process of rewriting it, and I would love to have some inputs from the community on how to design it. I love the Datomic way "everything is data", but I don't want/can re-invent a query DSL [2]. Does anyone kno

Re: core.logic: Dividing the knowledge base

2013-03-01 Thread Norman Richards
On Wed, Feb 27, 2013 at 4:32 PM, JvJ wrote: > One more thing I'd like to ask. Is it possible to combine the databases > in a way? > > For instance, I'd like to have a universal database that every agent can > access, as well as agent-specific databases. I understand that databases > can be modi

Re: contains? for vectors

2013-03-01 Thread AtKaaZ
and obviously I would like it to throw here instead :) but hey, that's just me - overly obsessed with fail-fast rather that performance first or tolerance On Fri, Mar 1, 2013 at 9:12 PM, AtKaaZ wrote: > user=> (contains? "abc" 1.5) > true > > looks like for that, it's coerced to int > > else if

Re: contains? for vectors

2013-03-01 Thread AtKaaZ
user=> (contains? "abc" 1.5) true looks like for that, it's coerced to int else if(key instanceof Number && (coll instanceof String || coll.getClass().isArray())) { int n = ((Number) key).intValue(); return n >= 0 && n < count(coll); } => (int 1.4) 1 => (int 1.6) 1 => (.intVal

Re: contains? for vectors

2013-03-01 Thread AtKaaZ
Right, but I'm only after the when-invalid-key is passed: valid: => (contains? "abc" 1) true => (contains? ["a" "b" "c"] 1) true invalid: => (contains? "abc" "a") IllegalArgumentException contains? not supported on type: java.lang.String clojure.lang.RT.contains (RT.java:724) => (contains? ["a" "b

Re: contains? for vectors

2013-03-01 Thread Michael Gardner
On Mar 1, 2013, at 13:36 , AtKaaZ wrote: > I don't think I understand what you mean (could you rephrase/example?), I > cannot think of a case when I wouldn't want it to throw when I'm passing a > non-number (contains? [:a :b :c] :a), I mean, rather than just silently > ignoring. I'm talking a

Re: contains? for vectors

2013-03-01 Thread Maik Schünemann
the old contails? debate :) contains? is only intented for associative collections. This explains (somewhat) the behavior on vectors. They are seen as assocuative collections from indexes to values. I'm not exactly sure about this, but I expect (contains? c x) to be true if you can call (get c x).

Re: ANN: Clojure 1.5

2013-03-01 Thread Rich Morin
On Mar 1, 2013, at 07:56, Stuart Halloway wrote: > The number of Clojure contributors continues to grow. Thanks to all > the people whose code is included in this release: > > Aaron Bedra > ... > > Thanks to all involved! I think that it would be appropriate (and possibly spur participation) to

Re: ANN: Clojure 1.5

2013-03-01 Thread Tassilo Horn
Cosmin Stejerean writes: > core.logic might not have any dependencies in its pom, but the parent > pom (pom.contrib) does depend on clojure 1.3.0 by default. Aha, there are parent poms. I didn't know that. Are there also aunt and uncle poms? (I love maven so much!) ;-) Anyway, I could workaro

Moving ClojureScript to Clojure 1.5.0 & data.json dependency

2013-03-01 Thread David Nolen
Now that Clojure 1.5.0 is out the door I'd like to make ClojureScript depend on it. This would allow me to merge in the source map branch which is a work in progress but far enough along that the critical bits are there and it would be nice to get community contributions towards wrapping it up. Me

Re: contains? for vectors

2013-03-01 Thread AtKaaZ
I don't think I understand what you mean (could you rephrase/example?), I cannot think of a case when I wouldn't want it to throw when I'm passing a non-number (contains? [:a :b :c] :a), I mean, rather than just silently ignoring. It;s not unlike this: => (contains? '(:a :b :c) :a) IllegalArgumentE

Wrong clojure version depending on lein dependencies (was: ANN: Clojure 1.5)

2013-03-01 Thread Tassilo Horn
Michael Klishin writes: > 2013/3/1 Tassilo Horn > >> So to summarize: >> >> clj 1.5.0-RC17 + ordered 1.3.2 => clj 1.5.0-RC17 is used >> clj 1.5.0 + ordered 1.3.2 => clj 1.4.0 is used >> clj 1.5.0 no ordered 1.3.2 => clj 1.3.0 is used >> >> Can anymone make sense of that? > > This

Re: ANN: Clojure 1.5

2013-03-01 Thread Michael Klishin
2013/3/1 Tassilo Horn > So to summarize: > > clj 1.5.0-RC17 + ordered 1.3.2 => clj 1.5.0-RC17 is used > clj 1.5.0 + ordered 1.3.2 => clj 1.4.0 is used > clj 1.5.0 no ordered 1.3.2 => clj 1.3.0 is used > > Can anymone make sense of that? > This reminds me of https://github.com/tech

Re: ANN: Clojure 1.5

2013-03-01 Thread J . J . Ezechiëls
Are you using any special libs? I just tried to reproduce your problem by upgrading a relatively simple project to clojure 1.5 and got no problems. Best regards, Joey Ezechiëls On Fri, Mar 1, 2013 at 7:45 PM, Tassilo Horn wrote: > Joey Ezechiëls writes: > > Hi Joey, > > > Hi Tassilo, are you

Re: ANN: Clojure 1.5

2013-03-01 Thread Tassilo Horn
Joey Ezechiëls writes: Hi Joey, > Hi Tassilo, are you using java v1.6? because according to the > changelog, reducers need an extra lib to work on java 1.6, while 1.7 > should be fine as-is. No, I use 1.7. The problem is that actually clojure 1.4.0 gets started although my dependencies say I w

Re: Unable to build Clojure 1.5

2013-03-01 Thread Andy Fingerhut
As noted in the readme.txt file: To build locally with Ant: One-time setup:./antsetup.sh To build: ant Clojure has a form of tail recursion using the "recur" form within loops and within functions, but it does not do tail calls unless you use the recur form. I do not kn

Unable to build Clojure 1.5

2013-03-01 Thread John Smith
Hi all, just starting out. Here is my dilemma when I try to build clojure 1.5: http://bin.cakephp.org/view/812400581 Also, I have a question. Is it true that Clojure does not have true tail-recursion like Lisp does? Will that be implemented in the future? -- -- You received this message be

Re: ANN: Clojure 1.5

2013-03-01 Thread Joey Ezechiëls
Hi Tassilo, are you using java v1.6? because according to the changelog, reducers need an extra lib to work on java 1.6, while 1.7 should be fine as-is. On Friday, March 1, 2013 5:46:50 PM UTC+1, Tassilo Horn wrote: > > Stuart Halloway > writes: > > Hi Stu, > > > We are pleased to announce the

Re: ANN: Clojure 1.5

2013-03-01 Thread Tassilo Horn
David Powell writes: Hi David, > works for me... do you have some sort of version conflict perhaps? Indeed, you are right. With dependency [org.clojure/clojure "1.5.0"], my project's actually started with clojure 1.4.0. With [org.clojure/clojure "1.5.0-RC17"], it's started with exactly that.

Re: Listing more intuitive install options on the Clojure Downloads page

2013-03-01 Thread Mayank Jain
You don't need to install clojure. Lein does that for you as much as I know. On Fri, Mar 1, 2013 at 11:28 PM, MC Andre wrote: > I'm sure that Clojure users, especially novices, would appreciate these > being listed as well-supported options on the official downloads > page

Listing more intuitive install options on the Clojure Downloads page

2013-03-01 Thread MC Andre
I'm sure that Clojure users, especially novices, would appreciate these being listed as well-supported options on the official downloads page : * Windows "chocolatey install clojure" * Mac OS X "brew install clojure" * Ubuntu "apt-get install clojure" -- -- You r

Re: ANN: Clojure 1.5

2013-03-01 Thread David Powell
works for me... do you have some sort of version conflict perhaps? user=> (clojure-version) "1.5.0" user=> (require '[clojure.core.reducers :as r]) nil user=> (r/fold + (range 1000)) 499500 On Fri, Mar 1, 2013 at 4:46 PM, Tassilo Horn wrote: > Stuart Halloway writes: > > Hi Stu, > > > We are

Re: ANN: Clojure 1.5

2013-03-01 Thread Logan Linn
Congrats and thanks to all those who contributed! On Friday, March 1, 2013 7:56:58 AM UTC-8, stuart@gmail.com wrote: > > We are pleased to announce the release of Clojure 1.5. > > Getting Clojure: > > Web: http://clojure.org/downloads > Lein/Maven: :dependencies [[org.clojur

Re: fully populated protocols (or not)?

2013-03-01 Thread Softaddicts
Upfront you have to track multiple arities for the same method. If all your implementations are concealed in a single file that may be bearable. Here we define protocols in a file (like xxx-api) and then conceal the implementations in different name spaces where they belong. Multiply the # of na

Re: Interesting Light Table post

2013-03-01 Thread charlie
Is there a way for outsiders to contribute to lighttable ? On Fri, Mar 1, 2013 at 9:03 AM, Mark C wrote: > This release is a big step forward. I still struggle a little with the > editor (the new vim mode is great but I really want Emacs bindings), but > one nice use of LT is doing 4clojure prob

Re: contains? for vectors

2013-03-01 Thread Michael Gardner
On Feb 28, 2013, at 17:17 , AtKaaZ wrote: > According to this, can a vector have keys that are not numbers? like :a , if > not, then wouldn't it make more sense that > (contains? [:a :b :c] :a) would throw ? It's probably just me. This is a reasonable point, and one I haven't seen made before.

Re: ANN: Clojure 1.5

2013-03-01 Thread Arnout Roemers
Great news, congratulations on your release! -- -- 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. To

Re: problem redefining protocols and records in emacs+nrepl

2013-03-01 Thread Jim - FooBar();
On 01/03/13 16:17, Joachim De Beule wrote: I'm not sure what you mean. I am not changing between namespaces in this last example, only trying to delete a slot from a record definition and create a record according to the new definition subsequently. The problem occurs even when I do a C-c C-k

Re: ANN: Clojure 1.5

2013-03-01 Thread Tassilo Horn
Stuart Halloway writes: Hi Stu, > We are pleased to announce the release of Clojure 1.5. Great, except that if I change my project's dependency from 1.5.0-RC17 to 1.5.0, I get this error when trying to "lein test". With RC17, it works just fine. --8<---cut here---start

Re: problem redefining protocols and records in emacs+nrepl

2013-03-01 Thread Joachim De Beule
The problem is precisely that I cannot create *novel* instances after redefining the record, apparently because it tries to initialise them according to the old definition. 2013/3/1 Neale Swinnerton > > On Fri, Mar 1, 2013 at 3:44 PM, Joachim De Beule < > joachim.de.be...@gmail.com> wrote: > >>

Re: problem redefining protocols and records in emacs+nrepl

2013-03-01 Thread Neale Swinnerton
On Fri, Mar 1, 2013 at 3:44 PM, Joachim De Beule wrote: > Here is another (real) example: > > When I change the number of slots in a record, e.g. from > > (defrecord MyRecord [slot1 slot2] ...) > > to > > (defrecord Myrecord [slot1] ...) > > > Are you remembering to recreate the *instances* of th

Re: problem redefining protocols and records in emacs+nrepl

2013-03-01 Thread Jim - FooBar();
On 01/03/13 15:44, Joachim De Beule wrote: When I change the number of slots in a record, e.g. from (defrecord MyRecord [slot1 slot2] ...) to (defrecord Myrecord [slot1] ...) are you reloading the namespace between these steps? Jim -- -- You received this message because you are subscribe

ANN: Clojure 1.5

2013-03-01 Thread Stuart Halloway
We are pleased to announce the release of Clojure 1.5. Getting Clojure: Web: http://clojure.org/downloads Lein/Maven: :dependencies [[org.clojure/clojure "1.5.0"]] Note that it will take a few hours for the links above to become live, as the completed build moves into Maven Ce

Re: problem redefining protocols and records in emacs+nrepl

2013-03-01 Thread Joachim De Beule
Here is another (real) example: When I change the number of slots in a record, e.g. from (defrecord MyRecord [slot1 slot2] ...) to (defrecord Myrecord [slot1] ...) and then call (MyRecord. :foo), clojure complains with "NoSuchMethodError MyRecord.(Ljava/lang/Object;) Then when I simply rena

Re: fully populated protocols (or not)?

2013-03-01 Thread Jim - FooBar();
On 01/03/13 15:15, Meikel Brandmeyer (kotarak) wrote: However for some reason I seldomly have the desire to use multiple arities in protocol functions. this is the case for me too but only when I'm working in an all-Clojure project...when doing interop though and especially when I need to ac

Re: fully populated protocols (or not)?

2013-03-01 Thread Meikel Brandmeyer (kotarak)
Hi, I would extend protocols using the normal function approach as with extend. user=> (defprotocol P (foo [this] [this that])) P user=> (extend-type String P (foo ([this] this) ([this that] (str this that nil user=> (foo "foo") "foo" user=> (foo "foo" "bar") "foobar" Howev

Re: Interesting Light Table post

2013-03-01 Thread Mark C
This release is a big step forward. I still struggle a little with the editor (the new vim mode is great but I really want Emacs bindings), but one nice use of LT is doing 4clojure problems. For each problem, define the function "__", then paste tests right from the 4clojure problem page. Yo

Re: fully populated protocols (or not)?

2013-03-01 Thread Jim - FooBar();
but multiple arities correspond to different method signatures on the interface level and in fact the protocol level as well...when you implement either you really treat them as separate fns/methods...how does the one complect (not implementing some arity) and the other doesn't (not implementin

Re: Securing Clojure + Clojurescript Web App

2013-03-01 Thread Ari
On Tuesday, February 26, 2013 8:54:19 PM UTC-5, Ari wrote: > > On Tuesday, February 26, 2013 3:16:23 PM UTC-5, Chas Emerick wrote: > > >> What do you mean by "sidesteps the auth"? If you're using >> shoreleave-remote-ring, then the handler produced by its wrap-rpc >> middleware is subject to

Re: fully populated protocols (or not)?

2013-03-01 Thread Softaddicts
Precisely David and I were making a point specifically about methods with multiple arities in the same protocol. I do have protocols partially implemented on some occasions and there's no problem with that. The runtime error is quite clear if someone tries to call an unimplemented method. The pro

fully populated protocols (or not)?

2013-03-01 Thread Jim - FooBar();
Hi all, Since yesterday, I've been thinking about something David Nolen said in my /"what on earth is happening?"/ post. In a nutshell, he suggested that protocols *should* be fully populated. Luc from softaddicts agreed and actually shared his own horrific experiences with non-fully populate

Optimized code => now it's 4x slower. Why?

2013-03-01 Thread Tassilo Horn
Hi all, I wanted to optimize a function of mine, and after doing that, I found out that the optimized version is 4 times slower! However, I can't see the reason for that. Probably, I can't see the forest for trees, so I'd be happy if someone else could have a look if I'm doing something obviousl

Re: ANN: Shoreleave 0.3.0

2013-03-01 Thread Job Wunder
investigating a (new) framework or a lib, i always scan the dependencies in project.clj first i liked, what i saw and my impressions are: shoreleave is a clojure-lib-stack that really looks like something and its possibly the right time for the community to focus on something isn't it ? i am a

Re: Java interop: "Can't call public method of non-public class"

2013-03-01 Thread Marko Topolnik
I'd say it's a bug. You are invoking a public class's method, which happens to be inherited from a package-private class. Clojure's reflective code accesses the superclass method directly so there's no distinction between direct invocation and invocation through inheritance. If you are interse

Java interop: "Can't call public method of non-public class"

2013-03-01 Thread Ben Smith-Mannschott
Simplified, from a more complex example: abstract class Bytes { public toHexString() { return "..."; } Bytes { } } public class Hash extends Bytes { public Hash() { super(); } } This works in Java: new Hash().toHexString(); This fails in Clojure: (.toHexString (Hash.)) Il

Re: In order to get java-like performance, one needs to write java-like code first?

2013-03-01 Thread Marko Topolnik
On Friday, March 1, 2013 5:35:16 AM UTC+1, yizhen wei wrote: > I just start learning clojure recently. > > So I was looking for some performance related post on the internet, and > found some optimization tips, "fast" clojure code and so on. Which lead to > the question above. > It seems like m

Re: Clojure Performance For Expensive Algorithms

2013-03-01 Thread Marko Topolnik
It's in the official API documentation. Yes, it's new with Clojure 1.5. On Friday, March 1, 2013 12:42:18 AM UTC+1, Geo wrote: > > I didn't know reduce could be short circuited! I assume from the code >