Re: Concatenating InputStreams (was: Re: Parsing SGML)

2012-07-13 Thread Meikel Brandmeyer
Hi, and more errata: reading is not thread-safe when the result is -1. Then an unintended switch! might happen. There things have to be packed into a locking together with a second read to verify it's still −1. Details! Details! Kind regards Meikel signature.asc Description: Message signed w

Re: Concatenating InputStreams (was: Re: Parsing SGML)

2012-07-13 Thread Meikel Brandmeyer
Hi, Am 13.07.2012 um 23:48 schrieb Kevin Downey: > thank you for responding personally to me, but I sent my message to > clojure google group. > > given the thread has the subject "Concatenating InputStreams" and I > linked javadocs for a standard part of java.io that does exactly that, > I am s

Re: Should read-string support \x.. escaped characters?

2012-07-13 Thread Dave Sann
opened: http://dev.clojure.org/jira/browse/CLJ-1025 On Wednesday, 25 April 2012 04:20:11 UTC+10, Brandon Bloom wrote: > > Surprisingly, this differs from JSON, which only supports \u... > > On Friday, December 23, 2011 5:43:00 PM UTC-8, Dave Sann wrote: >> >> When sending data as strings from cloj

Re: Concatenating InputStreams (was: Re: Parsing SGML)

2012-07-13 Thread Alan Malloy
It's a public class in clojure.lang that is not used by any part of the Clojure runtime or standard libraries. I can't think what other reason it would be included for, if not to be used by you. Just like clojure.lang.PersistentQueue - there's no nice Clojure wrapper for it (why on Earth not?),

Re: ClojureC - A Clojure to C compiler - Work in Progress

2012-07-13 Thread Mark Probst
Adam, > Just a quick iOS update. I grabbed the latest from your git repo and from > my initial work at implementing the required glib methods that you're using, > I now have it running on both my iPad and iPhone4S. I don't look at the > glib source - I just google the missing function name and

Re: Concatenating InputStreams (was: Re: Parsing SGML)

2012-07-13 Thread Kevin Downey
thank you for responding personally to me, but I sent my message to clojure google group. given the thread has the subject "Concatenating InputStreams" and I linked javadocs for a standard part of java.io that does exactly that, I am surprised that you decided to respond with "tl;dr", but I have n

Re: ICFP Contest in ClojureC

2012-07-13 Thread Laurent PETIT
2012/7/13 Mark Probst : > Hey ho! > > If anybody's up for entering the ICFP programming contest > > http://icfpcontest2012.wordpress.com/task/ > > with a ClojureC program, email me > > mark.probst at gmail > > Obviously most of the work would be getting ClojureC up to the task :-) And it would

setting a default route in noir

2012-07-13 Thread Chris McBride
I have a lot of defpages that have a long part of the url in common (ex. "/client/:clientid/someresource/"). So I made a function to encapsulate the beginning of the URL, but the defpage macro expects a string and not a function call. Is there an easy way to have the begging of the route be the

Re: Concatenating InputStreams (was: Re: Parsing SGML)

2012-07-13 Thread Meikel Brandmeyer
Hi, Am 13.07.2012 um 19:25 schrieb Alan Malloy: > (defn coll->enumeration [coll] > (clojure.lang.SeqEnumeration. coll)) Ah. I knew there must be something. But it doesn't seem to be official, public API. Meikel signature.asc Description: Message signed with OpenPGP using GPGMail

Re: ClojureC - A Clojure to C compiler - Work in Progress

2012-07-13 Thread Adam King
Hi Mark: Just a quick iOS update. I grabbed the latest from your git repo and from my initial work at implementing the required glib methods that you're using, I now have it running on both my iPad and iPhone4S. I don't look at the glib source - I just google the missing function name and impl

Re: Clojure @ Prague?

2012-07-13 Thread Daniel Skarda
Hi Edward and Jiří, it would be great to meet Clojurians in Prague. Currently I am in Slovakia and I will be back on Monday, so I would prefer later next week (Thursday?) or next weekend. Do you have some favourite pub or restaurant? (probably we should take this discussion away from Clojure mail

ANN: core.cache version 0.6.1 (SoftCache + bug fixes)

2012-07-13 Thread Fogus
core.cache v0.6.1 Release Notes === core.cache is a new Clojure contrib library providing the following features: * An underlying `CacheProtocol` used as the base abstraction for implementing new synchronous caches * A `defcache` macro for hooking your `CacheProtoco

Re: Concatenating InputStreams (was: Re: Parsing SGML)

2012-07-13 Thread Alan Malloy
(defn coll->enumeration [coll] (clojure.lang.SeqEnumeration. coll)) On Friday, July 13, 2012 7:13:54 AM UTC-7, Meikel Brandmeyer (kotarak) wrote: > > Hi, > > I think you don't handle the switching of streams correctly. You have to > keep track with atoms. But then you run into thread-safety is

Clojure on an Erlang-vm-os on Xen?

2012-07-13 Thread Frank Siebenlist
Just became aware of this effort: "http://erlangonxen.org/"; which shows off some impressive properties: * Startup time of a new instance is 100ms * Instances are provisioned after the request arrival - all requests get handled * No instances are running waiting for requests - the cloud footprint

Re: Concatenating InputStreams (was: Re: Parsing SGML)

2012-07-13 Thread Kevin Downey
http://docs.oracle.com/javase/1.5.0/docs/api/java/io/SequenceInputStream.html On Fri, Jul 13, 2012 at 7:29 AM, Meikel Brandmeyer (kotarak) wrote: > Hi again, > > talking about thread safety. > > Am Freitag, 13. Juli 2012 16:13:54 UTC+2 schrieb Meikel Brandmeyer > (kotarak): >> >> (close >>

ICFP Contest in ClojureC

2012-07-13 Thread Mark Probst
Hey ho! If anybody's up for entering the ICFP programming contest http://icfpcontest2012.wordpress.com/task/ with a ClojureC program, email me mark.probst at gmail Obviously most of the work would be getting ClojureC up to the task :-) Mark -- You received this message because you are s

Re: core cache/memoize issue?

2012-07-13 Thread siyu798
Awesome, thx a lot!! On Wednesday, July 11, 2012 7:24:29 PM UTC-4, Fogus wrote: > > Thank you for the report. I have a fix for the LRU/LU caches on my box > and will have it out in the next day or so. The core.memoize changes > will follow soon after. > -- You received this message because yo

Re: Concatenating InputStreams (was: Re: Parsing SGML)

2012-07-13 Thread Meikel Brandmeyer (kotarak)
Hi again, talking about thread safety. Am Freitag, 13. Juli 2012 16:13:54 UTC+2 schrieb Meikel Brandmeyer (kotarak): > > (close > [] > (when @is > (.close @is) > (doseq [s @streams] (.close s (close [] (locking this (when @is (.close

Re: Concatenating InputStreams (was: Re: Parsing SGML)

2012-07-13 Thread Meikel Brandmeyer (kotarak)
Hi, I think you don't handle the switching of streams correctly. You have to keep track with atoms. But then you run into thread-safety issues. (defn concat-input-stream "Gets one or many input streams and returns a new input stream that concatenates the given streams." [is & streams] (l

Re: Concatenating InputStreams

2012-07-13 Thread Tassilo Horn
Wolodja Wentland writes: Hi Wolodja, > Thanks, I've done that and had to change your code a little in order > to provide the same behaviour as the Java equivalent. (return -1 when > no data can be read). Ah, right. I didn't read the docs too accurate. > The following is the implementation I u

Concatenating InputStreams (was: Re: Parsing SGML)

2012-07-13 Thread Wolodja Wentland
On Wed, Jul 11, 2012 at 14:46 +0200, Tassilo Horn wrote: > Hm, probably yes. But you can implement the other arities quiet easily. > So that version also accepts the version that reads into a byte array. > The third version is left as an exercise for the reader. ;-) Thanks, I've done that and had

Re: Clojure @ Prague?

2012-07-13 Thread Edward Tsech
What do you think guys about informal meeting at the weekend? On Monday, July 9, 2012 9:21:51 AM UTC+2, Zuzkins wrote: > > Hi guys, > I, somehow, missed this thread but I am all up for clojure @ Prague > > On Thu, Jul 5, 2012 at 7:54 PM, Edward Tsech wrote: > >> HI Daniel, >> >> I'm interested in