Re: Clojure CLR Experiences

2014-11-12 Thread Adrian Mowat
Ah, OK. Sorry about that! On Wednesday, 12 November 2014 02:32:23 UTC, dmiller wrote: > > Re versions: look at the tags, not the branches. The 1.4.1 branch was > anomalous, due to needing to get out a bug fix. > > > On Tuesday, November 11, 2014 2:17:29 PM UTC-6, Aaron wrote: >> >> Hi Adrian, >

Re: Clojure CLR Experiences

2014-11-12 Thread Adrian Mowat
Hi Aaron, That really helpful. Just what I was looking for. Adrian On Tuesday, 11 November 2014 20:17:29 UTC, Aaron wrote: > > Hi Adrian, > > I'll share some of my experiences. > > * Is Clojure CLR production ready? > Yes, I have been using it in production for about 2 years now. > > * Do its

Re: ClojureScript and development workflow

2014-11-12 Thread Geraldo Lopes de Souza
Collin, To achieve the basic of what you said: lein new chestnut Because of the other pieces I had to extract the code into the stack I'm using. But it's very good for a start. On Saturday, November 8, 2014 11:47:37 AM UTC-2, Colin Yates wrote: > > Figwheel plus om plus immutable data is just

Re: Persistent Data Structures for Objective-C/LLVM

2014-11-12 Thread Anton Astashov
Sorry for resurrecting of such an old post, but I just wrote port of Clojure's data structures in Objective-C - https://github.com/astashov/persistent.objc - hopefully one day someone will find that useful. :) On Sunday, March 31, 2013 5:43:52 AM UTC-7, Matthias Benkard wrote: > > I implemented

loop problems

2014-11-12 Thread Sam Raker
I'm using Twitter's HBC library to read from Twitter's public stream. HBC stores results in a LinkedBlockingQueue, from which you can then `.take` tweets and do stuff to them (in my case, doing some processing/normalization, then storing them in CouchDB). I've been struggling with how exactly b

Re: Mutable local variables

2014-11-12 Thread John Gabriele
On Saturday, November 8, 2014 10:15:12 PM UTC-5, Blake McBride wrote: > > Greetings, > > I have a sense that there is value in immutable variables and data but > that value is unneeded in my application and more than a nuisance. How can > I create a "let" that creates mutable locals that I can e

Re: test.check slow shrinking

2014-11-12 Thread Lucas Bradstreet
I've also had some tricky shrinking type issues with recursive generators using bind. I had a play with your generators, using such-that to reduce the row/column name length and also preventing some generator shrinking by using no-shrink, but I didn't have much luck improving the resulting shrin

Re: loop problems

2014-11-12 Thread Henrik Lundahl
Your loop seems to work as expected: user=> (def in-queue (java.util.concurrent.LinkedBlockingQueue. (range 1 11))) #'user/in-queue user=> (future (loop [res (.take in-queue)] (prn res) (recur (.take in-queue #1 2 3 4 5 6 7 8 9 10 user=> (.put in-queue 11) nil11 user=> What happens when you

What does .NET open sourcing mean for ClojureCLR?

2014-11-12 Thread Evan Zamir
I just read that MS is open sourcing .NET. I assume this means one could now target .NET with ClojureCLR on Linux/Mac environment. Assuming that is true, the natural question seems to be which VM should a Clojure developer be targeting? Is performance going to be similar on both? In that case,

How to bind a C# value in clojure-clr using the C# API.

2014-11-12 Thread rvdalen
Hi, I have a basic editor, which uses clojure-clr as a lib. I need to pass a C# value into an instance of clojure-clr, using the clojure-clr C# api. I tried something like: Symbol s = Symbol.intern("*appState*"); IFn def = Clojure.var( "clojure.core", "def

Re: What does .NET open sourcing mean for ClojureCLR?

2014-11-12 Thread Michael Klishin
On 12 November 2014 at 21:50:57, Evan Zamir (zamir.e...@gmail.com) wrote: > I just read that MS is open sourcing .NET. I assume this means > one could now target .NET with ClojureCLR on Linux/Mac environment. > Assuming that is true, the natural question seems to be which > VM should a Clojur

Re: How to bind a C# value in clojure-clr using the C# API.

2014-11-12 Thread Gary Verhaegen
I can't directly help you with C#, but I think the problem here is not related to the host platform, and the code snippet below (which is in Java) should be easy enough to translate. It's a bit tricky because def is not actually a function and can thus not be accessed from Java (or C#) using the o

Re: test.check slow shrinking

2014-11-12 Thread Brian Craft
Interesting that you don't see a performance problem. What version did you try? I'm using 0.5.9. I just re-ran this example to make sure I wasn't imagining it. On the 11th run, it wedged, not returning, and burning a lot of cpu, presumably trying to shrink. It's a larger problem with the real

Re: Persistent Data Structures for Objective-C/LLVM

2014-11-12 Thread Stephen Wakely
Interesting. I would definitely look into this if I ever need to do another iOS app. How does it work in a language without garbage collection? If you replace an element in a vector and only keep a reference to the new vector there will be a stray element there that would need mopping up. Is ARC c

Re: test.check slow shrinking

2014-11-12 Thread Lucas Bradstreet
I'm pretty sure I did encounter the performance problem you're talking about, but I killed it and re-ran until I hit cases that shrink quickly. I'm afraid I'm not much help with those, although I agree that the bad shrinking is probably related to the performance issues. > On 13 Nov 2014, at 04

Re: Persistent Data Structures for Objective-C/LLVM

2014-11-12 Thread Anton Astashov
All objects in Objective-C actually maintain their reference count. This is how ARC works. So, if there is only one reference to a vector, and we create a new modified vector with a new element, the changed nodes of the old vector will set reference count to 0 and will be disposed. On Wednesday

Re: Persistent Data Structures for Objective-C/LLVM

2014-11-12 Thread Anton Astashov
It is indeed waaay slower now than original NSArray/NSSet/NSDictionary (on large maps ~20x than NSMutableDictionary, on large vectors ~100x than NSMutableArray) but that's a tradeoff :). I'll continue to work on speeding it up though. On Wednesday, November 12, 2014 2:01:07 PM UTC-8,

Re: test.check slow shrinking

2014-11-12 Thread Brian Craft
I tried your idea of generating the size first, then passing it to the matrix & vector generators. This does seem to work better. The shrunk cases that return are actually worse, but so far it hasn't wedged itself, which is a great improvement. They all return within a few seconds. I don't yet

Re: loop problems

2014-11-12 Thread Francis Avila
Your loop pattern should work. (I've used this pattern before.) Just a sanity check: you *are* running this function in a different thread, right? Because whatever thread calls this function *will* block forever, whether the queue is empty or not. And unless you provide some side-effecting proc

Re: loop problems

2014-11-12 Thread Sam Raker
The plan is to run it in a thread, yeah. The process-fn I'm planning on running it with does some stuff to the tweet and then uploads the results to a local couchdb instance. I've been periodically checking /var/log/couchdb/couch.log to verify it's actually doing stuff. I *think* this could ben

Problem with lein new

2014-11-12 Thread gvim
With quite a few lein templates I'm having this problem, eg. : $ lein new splat flow1 Failed to resolve version for splat:lein-template:jar:RELEASE: Could not find metadata splat:lein-template/maven-metadata.xml in local ... /repository) This could be due to a typo in :dependencies or net

Re: Persistent Data Structures for Objective-C/LLVM

2014-11-12 Thread Mike Fikes
I'm thinking Anton's persistent collections could be useful on iOS. Out of curiosity, I made a small iOS project that compares the performance of Anton's map to ClojureScript's, when adding lots of key-value pairs (using transients): https://github.com/mfikes/persistent-objc-cljs Interestingly,

Assuming too much in docs

2014-11-12 Thread Don Wilde
Hi, Rich - Love what Clojure is up to, and was thrilled to see that the tar-ball was less than 5 MB in size... you rock. This is the essence of HLL development, and I say that from thirty years of non-HLL slogging! I have a lot of docs to go through to be productive, but I'd like to point out

Re: How to bind a C# value in clojure-clr using the C# API.

2014-11-12 Thread rvdalen
Gary, Thanks, this is awesome. It really helps a lot. Converting from Java to C# is straight forward. Exposing a function to set the value of an atom seems like a good approach. I will play with this idea a bit later tonight. With this info I should be able to get something working for now, ev

Re: Assuming too much in docs

2014-11-12 Thread Andy Fingerhut
Don: You could try sending a message to the author of the Eclipse plugin (CC'ed) about its documentation, and he may enhance it, e.g. a link to Leiningen's home page, maybe with a sentence or two on what it does. This web site may provide a better starting place, in particular the "Getting Starte

Re: What does .NET open sourcing mean for ClojureCLR?

2014-11-12 Thread Aleš Roubíček
Unfortunately startup time of ClojureCLR is much worse because it targets DLR. On Wednesday, November 12, 2014 8:16:19 PM UTC+1, Michael Klishin wrote: > > On 12 November 2014 at 21:50:57, Evan Zamir (zamir...@gmail.com > ) wrote: > > I just read that MS is open sourcing .NET. I assume this mea