Re: question about clojure.lang.LazySeq.toString()

2013-03-21 Thread Cedric Greevey
Eh. Not just any collisions, but only ones where the succession of tails are equal-as-seqs but not identical as objects (.equals, but not ==) for "sufficiently long". So seqs that differ after only a trillion items would blow up. So would equal ones sharing no tail structure. Putting (iterate inc 0

Re: Clojure - CLR - JS - Visual Studio Extension

2013-03-21 Thread Devin Garner
I've added beta support for ClojureScript to vsClojure on the visual studio gallery for vs2012. Please try it out and let me know how it works. You can see more details about the post on the ClojureCLR group at http://gplus.to/clojureclr Thanks, Devin On Thursday, March 21, 2013 9:42:52 PM U

Re: question about clojure.lang.LazySeq.toString()

2013-03-21 Thread Cedric Greevey
Hrm. Sounds like getting the hash of an infinite sequence will hang or cause OOME. On the one hand, *most* uses of the hash are followed by .equals if the hashes match, and .equals on an infinite seq can't work, since if it gives up and says "equal" after some large number N of elements, the seqs

Re: question about clojure.lang.LazySeq.toString()

2013-03-21 Thread Nelson Morris
Found a post on clojure-dev about this https://groups.google.com/forum/?fromgroups=#!topic/clojure-dev/F68GRPrbfWo On Fri, Mar 22, 2013 at 1:29 AM, Nelson Morris wrote: > If I'm reading everything correctly: > > 1. Object 's .toString uses .hashCode() > 2. LazySeq 's .hashCode() uses seq() which

Re: question about clojure.lang.LazySeq.toString()

2013-03-21 Thread Nelson Morris
If I'm reading everything correctly: 1. Object 's .toString uses .hashCode() 2. LazySeq 's .hashCode() uses seq() which realizes a seq. 3. LazySeq 's .hashCode() calls .hashCode() on the realized seq 3. (map ..) creates a LazySeq with a fn to create (cons val (lazy-seq (map f rest))) 4. (cons ...

Re: question about clojure.lang.LazySeq.toString()

2013-03-21 Thread Marko Topolnik
I am deeply puzzled abouth the behavior of *.toString* invocation on a lazy sequence. ==> (.getClass (map println (range 100))) clojure.lang.LazySeq ==> (.toString (map println (range 100))) *;;* *integers 0..100 printed* "clojure.lang.LazySeq@590b4b81" It should be obvious from the output, but

Re: Clojure - CLR - JS - Visual Studio Extension

2013-03-21 Thread Ambrose Bonnaire-Sergeant
I'm using Mono on Ubuntu, and I have these errors/failures (including project.clj at the bottom): https://gist.github.com/frenchy64/5218783 This is with commit 3b387f914815e389313897977eb02a9fba89dea2 Is this to do with my environment? Thanks, Ambrose On Fri, Mar 22, 2013 at 11:09 AM, Ambrose

Re: Clojure - CLR - JS - Visual Studio Extension

2013-03-21 Thread Ambrose Bonnaire-Sergeant
Hi David, Excellent work so far! I'll have a dig around and see what I find. Thanks, Ambrose On Fri, Mar 22, 2013 at 10:53 AM, dmiller wrote: > Last update on this here: > > > The port of core.logic to ClojureCLR that resides here: > https://github.com/**dmiller/clr.core.logic

Re: Clojure - CLR - JS - Visual Studio Extension

2013-03-21 Thread dmiller
Last update on this here: The port of core.logic to ClojureCLR that resides here: https://github.com/dmiller/clr.core.logic the datomic piece is not ported. All tests run EXCEPT: test-binding-map-* test-binding-map-as-1 test-binding-map-constraints-1 test-unifier-constraints-* test-flatteno

Re: Native library not found after upgrade to leiningen 2.0

2013-03-21 Thread xumingmingv
Have a look at this: http://nakkaya.com/2010/04/05/managing-native-dependencies-with-leiningen/ 在 2013-3-22,上午6:55,Dave Snowdon 写道: > I just upgraded from leiningen version 1.5.2 to 2.0.0 and noticed that the > native library path no longer seems to be set correctly. > > Here is my project fi

Re: ClassNotFoundException when using fetch RPC from cljs

2013-03-21 Thread Steve Buikhuizen
Thanks for the support gents. Ever since Noir was deprecated I've been planning to switch to compojure and shoreleave. However I'm still in prototype mode and "it ain't broke" so I'm delaying that work until I need the next level of stability. Nice to know I'm on the right track though. -- --

Google Summer of Code 2013: It's started!

2013-03-21 Thread Daniel Solano Gómez
Hello, all, The window for mentoring organizations to apply to this year's summer of code began on Monday and wraps up at 19:00 UTC on March 29th. The most important things we need to do ensure the success of our application include: 1. Posting ideas on the Project Ideas

Re: question about clojure.lang.LazySeq.toString()

2013-03-21 Thread Mark Engelberg
On Thu, Mar 21, 2013 at 11:54 AM, Razvan Rotaru wrote: > Is there an alternative to the code above (preferably simple and elegant), > which will return the etire sequence? > (pr-str (map + [1 2 3])) or (print-str (map + [1 2 3])) There are subtle differences between pr-str and print-str, (which

Native library not found after upgrade to leiningen 2.0

2013-03-21 Thread Dave Snowdon
I just upgraded from leiningen version 1.5.2 to 2.0.0 and noticed that the native library path no longer seems to be set correctly. Here is my project file: (defproject naojure "0.1.0-SNAPSHOT" :description "Clojure wrapper for Aldebaran Robotics java NAOQI binding. Depends on the Aldebaran jar

[ANN] Leiningen 2.1.1 released

2013-03-21 Thread Phil Hagelberg
Hello folks. I've just pushed out version 2.1.1 of Leiningen, which contains a handful of bug fixes from 2.1.0. * Add `:test-paths` to directories shared by checkout deps. (Phil Hagelberg) * Allow `run` task to function outside projects. (Phil Hagelberg) * Fix a bug preventing `with-profiles` wo

core.logic -- logic programming pickle

2013-03-21 Thread JvJ
It's a bit difficult what I'm trying to do, but I'll try my best to explain it. I'd like to take an arbitrary predicate, and find which facts could be entered in the database that could make it true. I'm working on a computer game dialogue framework that allows communication between agents (i.

Re: Clojure/West 2013 videos?

2013-03-21 Thread John Gabriele
On Thursday, March 21, 2013 12:29:04 PM UTC-4, Ben Mabey wrote: > > On 3/21/13 10:08 AM, John Gabriele wrote: > > Are there any videos available of the talks recently given at > Clojure/West? > > > > Is there a central location where these will most likely be found at > some point? > > > Ale

Re: question about clojure.lang.LazySeq.toString()

2013-03-21 Thread Brian Marick
On Mar 21, 2013, at 2:30 PM, Brian Marick wrote: > If you don't mind brackets Or, if you do mind brackets: user=> (str (apply list (map inc [1 2 3]))) "(2 3 4)" I'll stop now. Looking for employment as a Clojure programmer Latest book: /Functional Programming for the Object-Oriented

Re: question about clojure.lang.LazySeq.toString()

2013-03-21 Thread Brian Marick
On Mar 21, 2013, at 2:20 PM, Brian Marick wrote: > I don't know if it's elegant, but: > > user=> (str (list* (map + [1 2 3]))) > "(1 2 3)" I wrote too soon. `list*` returns a lazy sequence, not a list, so I guess you shouldn't rely on it. If you don't mind brackets even though lazy sequences

Re: question about clojure.lang.LazySeq.toString()

2013-03-21 Thread Brian Marick
On Mar 21, 2013, at 1:54 PM, Razvan Rotaru wrote: > I'm curious, why doesn't toString of clojure.lang.LazySeq return the entire > sequence as a String, and returns the Java pointer instead? I don't know, but perhaps it's to avoid problems with infinite sequences? (Although it's interesting th

Re: ANN: Illegal Argument podcast on Typed Clojure

2013-03-21 Thread Mark Derricutt
No worries - we enjoyed recording this one. I think it's up there with our episode with James Ladd on Redline Smalltalk [1] for deep technical content and a great conversation. [1] http://illegalargument.com/illegal-argument-78-smalltalking-on-the-jvm Jim foo.bar wrote: thanks guys! I enjoyed

Re: ClassNotFoundException when using fetch RPC from cljs

2013-03-21 Thread Max Penet
+1 fetch also has some bugs that will bite you sooner or later, it's not maintained anymore (and I don't think anyone took over). On Thursday, March 21, 2013 4:34:44 PM UTC+1, Paul deGrandis wrote: > > If you're up for the challenge, I'd encourage you to migrate from Noir to > Compojure+Ring a

question about clojure.lang.LazySeq.toString()

2013-03-21 Thread Razvan Rotaru
Hi, I'm curious, why doesn't toString of clojure.lang.LazySeq return the entire sequence as a String, and returns the Java pointer instead? I find it annoying when I do this: user> (str (map + [1 2 3])) "clojure.lang.LazySeq@7861" What's the reason behind this decision? Shouldn't toString tr

Re: Get difference between two lists with java objects of same class

2013-03-21 Thread Marko Topolnik
On Thursday, March 21, 2013 5:21:53 PM UTC+1, Ryan wrote: > Thanks Marko. I do have couple more q's for you just to ensure I got > everything right: > > (comp keyset-b key-fn) >> This results in a function that first applies *key-fn*, then *keyset-b*. >> So it's like #(keyset-b (key-fn %)). Let'

If there is no nil values, why do I get null pointer exception?

2013-03-21 Thread larry google groups
I am getting a null pointer exception in the line where I conj into the vector. I added the pprint so I could see what was going on. I am confused by the outcome: (defn convert-json-to-xml [json-as-flat-maps] (reduce (fn [vector-of-strings next-movie-as-map] (println "next move as map

Re: Clojure - CLR - JS - Visual Studio Extension

2013-03-21 Thread dmiller
I started a port of core.logic to ClojureCLR. Repo: https://github.com/dmiller/clr.core.logic It is not finished yet. All files load with two exceptions. (1) I have not ported clojure.core.logic.datomic (2) there is a problem in the finite domain code with extending fd to the integer types. Spe

Re: Clojure/West 2013 videos?

2013-03-21 Thread Ben Mabey
On 3/21/13 10:08 AM, John Gabriele wrote: Are there any videos available of the talks recently given at Clojure/West? Is there a central location where these will most likely be found at some point? Alex can confirm this but my guess is that they will be released on infoq slowly over time. Th

Re: Get difference between two lists with java objects of same class

2013-03-21 Thread Ryan
Thanks Marko. I do have couple more q's for you just to ensure I got everything right: (comp keyset-b key-fn) > This results in a function that first applies *key-fn*, then *keyset-b*. > So it's like #(keyset-b (key-fn %)). Let's call this function *predicate*. 1. What exactly happens when an

Re: Get difference between two lists with java objects of same class

2013-03-21 Thread Marko Topolnik
Personal preference. It causes less mental load because it more obviously spells out what you are doing. On Thursday, March 21, 2013 4:58:08 PM UTC+1, Ryan wrote: > > Thanks a lot Marko. Much better now :) > > I also wanted to ask you why did you mention in a previous post that you > prefer usin

Clojure/West 2013 videos?

2013-03-21 Thread John Gabriele
Are there any videos available of the talks recently given at Clojure/West? Is there a central location where these will most likely be found at some point? -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to cloj

Re: Get difference between two lists with java objects of same class

2013-03-21 Thread Ryan
Thanks a lot Marko. Much better now :) I also wanted to ask you why did you mention in a previous post that you prefer using *remove *than *filter + complement*. Is there a reason for this or just a personal preference? Ryan On Thursday, March 21, 2013 5:37:33 PM UTC+2, Marko Topolnik wrote: >

Re: Get difference between two lists with java objects of same class

2013-03-21 Thread Marko Topolnik
First we build a set of all the keys in *list-b*: (into #{} (map key-fn list-b)) Let's call that set *keyset-b. *Then we use *keyset-b* as a function which returns truthy (non-nil) for any key that is contained in it, and compose it with our *key-fn*: (comp keyset-b key-fn) This results in a

Re: ClassNotFoundException when using fetch RPC from cljs

2013-03-21 Thread Paul deGrandis
If you're up for the challenge, I'd encourage you to migrate from Noir to Compojure+Ring and from Fetch to Shoreleave remotes. I have much appreciation for Chris and his works, but the recent additions of the EDN reader are in the latter stack combination. You also get benefits like CSRF and XS

Re: Immutant - NPE when deploying

2013-03-21 Thread adrians
Done - issue 41 On Thursday, March 21, 2013 11:15:46 AM UTC-4, Toby Crawley wrote: > > Can you file an issue at > https://github.com/immutant/lein-immutant/issues? No one on the Immutant > team uses windows on a daily basis, so the plugin doe

Re: Immutant - NPE when deploying

2013-03-21 Thread Toby Crawley
Can you file an issue at https://github.com/immutant/lein-immutant/issues? No one on the Immutant team uses windows on a daily basis, so the plugin doesn't get tested there as often as it should. adrians writes: > I was trying to deploy a project using plugin 0.17.1 and incremental build > 808 f

Re: Get difference between two lists with java objects of same class

2013-03-21 Thread Ryan
Marko, Can you please do me a favor and break down the function you suggested me? I understand partially how it works but I am having trouble to fully get it. Thank you for your time. On Monday, March 11, 2013 11:05:47 PM UTC+2, Marko Topolnik wrote: > > Another approach, preserving the order o

Re: ClassNotFoundException when using fetch RPC from cljs

2013-03-21 Thread Steve Buikhuizen
I found the solution and it's a bit of a noob mistake. Because I'm using fetch, the server side of the RPC is defined in a noir host page. I added a :require of the view model ns to that page so that the classes are loaded above read-string call in the stack. This made it work immediately. Do

Immutant - NPE when deploying

2013-03-21 Thread adrians
I was trying to deploy a project using plugin 0.17.1 and incremental build 808 from the directory above the project. This resulted in the following NPE: C:\Users\adi>lein immutant deploy foobar java.lang.NullPointerException at leiningen.immutant.common$verify_root_arg.invoke(common.cl

Re: Immutant and ClojureScript

2013-03-21 Thread David Frese
Thanks, I tried the newest build 808 and it looks good - ClojureScript compiled something. On Wednesday, March 20, 2013 5:45:45 PM UTC+1, Toby Crawley wrote: > > > I've exposed findResource and findResources in ImmutantClassLoader, and > this change is available in incremental build 803 or newe

Re: ANN: Illegal Argument podcast on Typed Clojure

2013-03-21 Thread Jim foo.bar
thanks guys! I enjoyed this.. :) Jim On 21/03/13 08:32, Mark Derricutt wrote: Hey all, We couldn't let everyone at Clojure/West have all the fun so our latest podcast is an awesome chat with Ambrose Bonnaire Sergeant all about Typed Clojure. http://illegalargument.com/illegal-argument-epi

ANN: Illegal Argument podcast on Typed Clojure

2013-03-21 Thread Mark Derricutt
Hey all, We couldn't let everyone at Clojure/West have all the fun so our latest podcast is an awesome chat with Ambrose Bonnaire Sergeant all about Typed Clojure. http://illegalargument.com/illegal-argument-episode-98-typed-clojure Enjoy. -- -- You received this message because you are s

Re: Exception propagation design in Clojure web APIs.

2013-03-21 Thread Marko Topolnik
On Wednesday, March 20, 2013 11:29:55 PM UTC+1, James Reeves wrote: > On 20 March 2013 16:41, Marko Topolnik > > wrote: > >> On Wednesday, March 20, 2013 4:34:32 PM UTC+1, James Reeves wrote: >> >>> >>> If validation happens "all around", that implies there is no one >>> function that can test w