Re: Best Way To Implement Priority Map With Finite Size

2014-03-28 Thread milinda
Sorry I forgot the link [1]. Thanks Milinda [1] https://github.com/clojure/data.priority-map On Saturday, March 29, 2014 12:28:17 AM UTC-4, milinda wrote: > > Hi All, > > I wanted to extend priority-map which can be found at [1] to support size > limitation. So when the map is full I need to dr

test.check, quickcheck concurrency

2014-03-28 Thread Brian Craft
Re: John Hughes' talk at clojure/west, at the end he did a fairly incredible demo of testing concurrency. It doesn't look like this was implemented in test.check (or I'm not finding it). Are there any plans? -- You received this message because you are subscribed to the Google Groups "Clojure"

Best Way To Implement Priority Map With Finite Size

2014-03-28 Thread milinda
Hi All, I wanted to extend priority-map which can be found at [1] to support size limitation. So when the map is full I need to drop element/elements based on priority when assoc is call with a new key/keys. Is using the deftype the best way? If I use deftype can I only implement assoc or limit

Re: using contrib functions

2014-03-28 Thread John Gabriele
On Friday, March 28, 2014 10:40:55 PM UTC-4, Christopher Howard wrote: > > Hi. --Insert here the usual caveats about being new to Clojure and > Java.-- > > I wanted to try out this Contrib function describe on this > page > < > http://richhickey.github.io/clojure-contrib/types-api.html#clojure.

Re: using contrib functions

2014-03-28 Thread Sean Corfield
BTW, where did you find the references to defadt and clojure.contrib.types? Perhaps we can get the original references updated so people aren't misled in future... Sean On Mar 28, 2014, at 8:05 PM, Sean Corfield wrote: > On Mar 28, 2014, at 7:40 PM, Christopher Howard wrote: >> I wanted to tr

Re: using contrib functions

2014-03-28 Thread Sean Corfield
On Mar 28, 2014, at 7:40 PM, Christopher Howard wrote: > I wanted to try out this Contrib function describe on this > page > . > How > do I get that in my project? Trying to follow documentation, I did That'

using contrib functions

2014-03-28 Thread Christopher Howard
Hi. --Insert here the usual caveats about being new to Clojure and Java.-- I wanted to try out this Contrib function describe on this page . How do I get that in my project? Trying to follow documentation, I

Error when starting REPL

2014-03-28 Thread Niels van Klaveren
Its a problem with writing to a temp folder. Run Ccw as admin, or take a look at the counterclockwise group for a solution that doesn't need that. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegrou

Re: Unexpected core.async timeout behaviour

2014-03-28 Thread Timothy Baldridge
This is a caused by an interesting interaction of two things: 1) channels can have no more than 1024 pending takes at a time. and 2) (timeout) "caches" it's return value for a given ms + window size of time. At the moment, window is about 5-10ms. This error message is normally the result of a bug.

Re: working with "multiple" return values

2014-03-28 Thread Nicola Mometto
You can use destructuring user=> (let [[a b] [(+ 1 2) (+ 2 3)]] [a b]) [3 5] Christopher Howard writes: > In Clojure, what is the easiest (cleanest) way to return "multiple" > values from a function, in order to work with them immediately > afterwards? In Haskell you can return a tuple

working with "multiple" return values

2014-03-28 Thread Christopher Howard
In Clojure, what is the easiest (cleanest) way to return "multiple" values from a function, in order to work with them immediately afterwards? In Haskell you can return a tuple, and pattern match the components into variables. Prelude> let (a, b) = (1 + 4, 2 - 1) Prelude> a 5 Prelude> b 1 IIRC, P

Re: Amazonica performance: options?

2014-03-28 Thread Dave Tenny
Actually, let me withdraw the question for now. If I call an unfiltered (describe-images) on my account I'll get ~27,900 images. It takes 70 seconds to retrieve them using the Java api (from clojure). If I then print (str image) for all those images to a file, that makes adds another 153 seconds

Re: java interop help for beginner calling java class

2014-03-28 Thread bryan webb
Thanks the help is much appreciated  created file ocfLZWBW,java added package my.nice.lzw;   to the top of the file changed  /*     */ public class OcfLZW  to  /*     */ public class OcfLZWBW compiled ocfLZWBW.java to a class file of ocfLZWBW.class  (no errors) in eclipse added the ocfLZWBW.c

Error when starting REPL

2014-03-28 Thread Arie van Wingerden
Hi, I freshly installed the stand-alone Counterclockwise in Windows 8.1. When I execute: "Load file in REPL" I get this error: java.io.IOException: Access denied at java.io.WinNTFileSystem.createFileExclusively(Native Method) at java.io.File.createNewFile(Unknown Source) at java.io.F

Re: algorithm help: extracting groups of consecutive ints from a sorted list

2014-03-28 Thread John Gabriele
Brilliant. Thanks, Shantanu! On Wednesday, March 19, 2014 12:09:56 AM UTC-4, Shantanu Kumar wrote: > > Something like this? > > (defn x [1 3 4 5 7 9 10 13]) > > (reduce (fn [a i] (let [y (last a) z (last y)] (if (and z (= (inc z) i)) > (conj (pop a) (conj y i)) (conj a [i] [] x) > > Shantanu

[ANN] avi 0.1.3

2014-03-28 Thread Jason Felice
*0.1.3 - The "view" Release* Avi should now make an acceptable replacement for the "view" command. - Clojure 1.6.0 - Implemented ^D, ^U, L, H, M, gg - Implementing new normal mode commands is now much cleaner. avi A lively vi. Vision We love vim

Re: java interop help for beginner calling java class

2014-03-28 Thread Tassilo Horn
"bww00amd...@yahoo.com" writes: > I have read so much i cant see the tree for the forest. and need some > help calling the ocfLZW class below from clojure. If that's really the complete class definition... > /* */ public class OcfLZW > /* */ { ... then you can't use it from Clojure be

Re: Garden, Thorn - Looking for contributors

2014-03-28 Thread Timothy Washington
So there's 2 points that I raised. The main one is getting the *@import*working. And I probably just need to see an example of how to do that in the API. With that, I'd probably move over to hiccup / garden. Wrt garden-watch , I understand and agree with y

Re: Amazonica performance: options?

2014-03-28 Thread Michael Cohen
time ec2-describe-images -a > ec2-cli-images.txt real 1m26.401s user 0m6.551s sys 0m1.159s and writes a 7.5MB file to disk. Note the -a flag, to list all of the available public images. in a repl, (time (spit "clj-awz-images.txt" (describe-images))) "Elapsed time: 90258.47 msecs" and write

java interop help for beginner calling java class

2014-03-28 Thread bww00amd...@yahoo.com
I have read so much i cant see the tree for the forest. and need some help calling the ocfLZW class below from clojure. THANKS for the help using eclipse and counterclockwise In clojure have the data to decompress read into an array. have an array allocated to hold the decompresed data The

Re: Problem in clojars SSL Cert

2014-03-28 Thread Nelson Morris
Some jvm's do not ship the startcom ssl cert in the default list. This means a verified chain cannot be found to the clojars cert. This was resolved in leiningen by shipping the startcom cert and adding it to that jvm's trust mananger (https://github.com/technomancy/leiningen/issues/613). Since

Re: algorithm help: extracting groups of consecutive ints from a sorted list

2014-03-28 Thread John Gabriele
Y'know, I'm guilty of not looking into flatland/useful enough. I'll have to try out codox on it, and see if that makes it easier for me to get acquainted with it. Thanks, Alex. On Wednesday, March 19, 2014 6:57:27 AM UTC-4, Alex Nixon wrote: > > Or use glue from flatland.useful.seq

Amazonica performance: options?

2014-03-28 Thread Dave Tenny
I'm trying to code some amazonica based solutions in a nontrivial AWS environment. I work with many AWS accounts and it isn't unusual to see a thousand instances running on one account, and similar excesses in other types of AWS resources. So if you're going an ec2-describe-instances (or amazon

Re: [ANN] Clojure cheat sheet (v13)

2014-03-28 Thread John Gabriele
Thanks, Andy! Love love love the cheatsheet. :) -- John -- 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: Unexpected core.async timeout behaviour

2014-03-28 Thread Peter Taoussanis
One thing I'm not clear on: if I've understood your explanation correctly, I would expect the 100ms timeout to produce this error _more_ (not less) often. So can I just confirm some things here? 1. `async/timeout` calls can (always?) get "cached" to the nearest TIMEOUT_RESOLUTION_MS. 2. In thi

Re: Unexpected core.async timeout behaviour

2014-03-28 Thread Peter Taoussanis
Okay, fantastic - appreciate the detailed info Timothy! This did actually came up in staging today; reduced it to the toy example here. Now that I understand what's happening, let me think about it a little and get back to you. BTW I don't think I've ever thanked you personally for your work on

Re: [ANN] Clojure 1.6

2014-03-28 Thread Alex Miller
I noticed that but am unclear how that zip file got created in the past. Might need to page Dr. Stuart "Maven" Sierra. Perhaps its due to changing the Nexus staging/release process? On Thursday, March 27, 2014 7:58:12 PM UTC-5, David Nolen wrote: > > It looks like the zip file that usually incl

Re: [ANN] Clojure 1.6

2014-03-28 Thread Alex Miller
Looks like the pom.xml should create that with "mvn -Pdistribution package". Perhaps we accidentally lost that profile during the Nexus change. On Friday, March 28, 2014 7:52:21 AM UTC-5, Alex Miller wrote: > > I noticed that but am unclear how that zip file got created in the past. > Might ne

Re: Unexpected core.async timeout behaviour

2014-03-28 Thread Peter Taoussanis
Please, not at all! Appreciate any ideas :-) -- 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 uns

Re: Unexpected core.async timeout behaviour

2014-03-28 Thread Tim Visher
On Fri, Mar 28, 2014 at 8:08 AM, Peter Taoussanis wrote: > Hi Tim, thanks for the info! > > It's not clear to me that this is the same issue, unfortunately. (Though I > may be missing something obvious). > > In the example I've provided above, we're actually creating a _new_ channel > for each tak

Re: Unexpected core.async timeout behaviour

2014-03-28 Thread Peter Taoussanis
Hi Tim, thanks for the info! It's not clear to me that this is the same issue, unfortunately. (Though I may be missing something obvious). In the example I've provided above, we're actually creating a _new_ channel for each take. The problem appears to be either some interaction between the lo

Re: Unexpected core.async timeout behaviour

2014-03-28 Thread Tim Visher
Hi Peter, On Fri, Mar 28, 2014 at 2:48 AM, Peter Taoussanis wrote: > Hi all, quick question: > > `(dotimes [_ 5] (go ( `(dotimes [_ 5] (go ( produces an error: > > (< (.size takes) impl/MAX-QUEUE-SIZE)> java.lang.AssertionError: Assert > failed: No more than 1024 pending takes are allowed