[ANN] Quil 1.0.0

2012-04-07 Thread Sam Aaron
Hello there dear Clojure friends, TL;DR - Rejoice, for Quil 1.0.0 has been released. https://github.com/quil/quil I'm sure you all know this, but programming doesn't just have to be for businesses to make money by optimising processes. Yeah, of course you knew that already. Silly me for repeating

Boolean

2012-04-07 Thread Steven Obua
Hi, I am using Clojure for a month now. I like it a lot so far, but there are a couple of little details that make me very afraid. Foremost: (if (Boolean. false) "jesus" "christ") will return "jesus", not "christ". Googling this on the net, I found that this is a known phenomenon, and some ratio

Re: blip clojure videos from roku

2012-04-07 Thread Terrance Davis
http://blip.tv/clojure/rss was what I needed. I downloaded the clojure videos from there, and then stream them to my roku via Plex. Thanks! On Apr 6, 2012, at 6:54 AM, Aaron Cohen wrote: > Is your roku able to play video from the rss feed at > http://blip.tv/clojure/rss ? > > On Thu, Apr 5, 20

Re: Boolean

2012-04-07 Thread Aaron Cohen
I'm afraid you've managed to convey your emotion, but not what the actual problem you're having is. Care to try that again? --Aaron -- 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 th

Re: [ANN] Quil 1.0.0

2012-04-07 Thread Changa Damany Imara
Very excited to see this. Thanks so much! On Saturday, April 7, 2012 3:53:19 AM UTC-7, Sam Aaron wrote: > > Hello there dear Clojure friends, > > TL;DR - Rejoice, for Quil 1.0.0 has been released. > https://github.com/quil/quil > > I'm sure you all know this, but programming doesn't just have to

Re: Nested refs & conflicting transactions

2012-04-07 Thread Jay Fields
I did something similar at one point with a trading system. The map was something like {ticker {resting-orders [] pending-orders []}. The pending and resting orders were changing often, but we weren't changing what tickers we were trading very often. The entire map was a ref, and the resting and pe

Re: [ANN] Korma SQL ported to ClojureCLR

2012-04-07 Thread dmiller
On Friday, April 6, 2012 6:23:43 PM UTC-5, Aaron wrote: > > I think it's a goal to get Clojure.dll on nuget soon, but it hasn't > happened yet. Hopefully soon. Still, we'll need a good build system for > ClojureCLR that does everything that lein does. But, I don't think that > should be tha

Re: Boolean

2012-04-07 Thread Softaddicts
Hi, You are not in the Clojure play ground when you use (Boolean. false). This expression creates a Java object, hence (if any-java-object ...) always evaluate the "true" branch in Clojure. In Clojure, anything not nil is true except false which is equivalent to the Java false value. (if false.

Re: Boolean

2012-04-07 Thread Moritz Ulrich
Wrapping (Boolean. false) in (boolean ...) also fixes this "issue". On Sat, Apr 7, 2012 at 17:28, Softaddicts wrote: > Hi, > > You are not in the Clojure play ground when you use (Boolean. false). > > This expression creates a Java object, hence (if any-java-object ...) > always evaluate the "tru

Re: Boolean

2012-04-07 Thread Steven Obua
Well, I am an emotional programmer. And it just hurts when something potentially great like Clojure fucks up big time in the little details. I found the problem. It was caused by serializing a record value and later deserializing it: -

Re: Boolean

2012-04-07 Thread Dennis Haupt
why is there an exception for Boolean.FALSE? Am 07.04.2012 17:28, schrieb Softaddicts: > Hi, > > You are not in the Clojure play ground when you use (Boolean. false). > > This expression creates a Java object, hence (if any-java-object ...) > always evaluate the "true" branch in Clojure. > > In

Re: Boolean

2012-04-07 Thread Moritz Ulrich
Use Boolean/FALSE On Sat, Apr 7, 2012 at 17:41, Dennis Haupt wrote: > why is there an exception for Boolean.FALSE? -- Moritz Ulrich -- 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 Not

Re: Boolean

2012-04-07 Thread Aaron Cohen
On Sat, Apr 7, 2012 at 11:41 AM, Steven Obua wrote: > --(defrecord > M-Node [leaf content]) > > (def n (M-Node. false "")) > > (if (:leaf n) "boom" "ok") ;; returns "ok" >

Re: Boolean

2012-04-07 Thread Steven Obua
load-node and store-node are custom functions that rely on two other custom functions serialize and deserialize: (defn serialize "Serializes value, returns a byte array." [v] (let [buff (java.io.ByteArrayOutputStream. 1024)] (with-open [dos (java.io.ObjectOutputStream. buff)] (.w

Re: Boolean

2012-04-07 Thread Steven Obua
Thx, I am using (boolean ...) now to normalize my load-store function. -- 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 wit

Re: Boolean

2012-04-07 Thread Softaddicts
Boolean/FALSE refers to the false value, not a boolean object. In Java you have primitive types and classes related to these types. false is the primitive value while (Boolean. false) is the object equivalent. The handling is much more efficient and simple with primitive types. Another reason to

Re: Boolean

2012-04-07 Thread Meikel Brandmeyer
Hi, Am 07.04.2012 um 18:10 schrieb Steven Obua: > Thx, I am using (boolean ...) now to normalize my load-store function. ObjectInputStream and ObjectOutputStream have .readBoolean resp. .writeBoolean methods which do the right thing. Kind regards Meikel -- You received this message because y

Re: Boolean

2012-04-07 Thread Steven Obua
Yes, but I am serializing the entire M-Node object in one go. Medium-term, I will write my own serialization for m-nodes anyway to get a more compact and well-defined format that does not depend on Java/Clojure versions. On Saturday, April 7, 2012 5:20:28 PM UTC+1, Meikel Brandmeyer (kotarak)

Re: [ANN] Quil 1.0.0

2012-04-07 Thread Sam Aaron
On 7 April 2012 16:20, Changa Damany Imara wrote: > Very excited to see this. Thanks so much! No need to thank me - thank Roland Sadowski for writing clj-processing in the first place. I just did a spot of spring cleaning :-) Sam --- http://sam.aaron.name -- You received this message because

Help in porting Hiccup to ClojureScript

2012-04-07 Thread r0man
Hello ClojureScripters, I started to port the Hiccup library to ClojureScript. The goal is to have a port of Hiccup that has exactly the same api. This would make it possible to write views once (provided no platform specific code is used), and run them on the server with Clojure and on the client

Re: ClojureScript repl error

2012-04-07 Thread Pierre-Henry Perret
CANCELED Le vendredi 6 avril 2012 16:16:21 UTC+2, Pierre-Henry Perret a écrit : > > I constantly get the following error when trying evaluating a clojures > script exp (from remoting sample, a request) > > __ > # > SyntaxError: Unexpected token . > at > http://localho

Re: I'm writing a Tempest clone in ClojureScript

2012-04-07 Thread Trevor Bentley
Greetings! Tempest (in ClojureScript) has come a long way in the last couple of weeks. A playable demo is now up: Play Tempest-cljs Best results with Chrome. Left and Right to move, spacebar shoots. It's legitimately playable now, though

Re: Advice on style & implementation

2012-04-07 Thread Cedric Greevey
On Wed, Apr 4, 2012 at 4:11 PM, Alan Malloy wrote: > On Apr 4, 6:50 am, David Jagoe wrote: >> Particularly I very often find myself doing >> >> (apply hash-map (flatten (for [[k v] some-map] ...))) > > :( :( :( flatten is vile, never use it[1]. What if the value in the > map is a list, or the key

ANN: Mississippi 1.0.0 - validating maps

2012-04-07 Thread gaz jones
Hey, Both myself and my brother do a fair amount of validating maps of data in our day jobs (EXCITE!) so we put together a library a while ago to help out. We just got round to releasing 1.0.0 recently so thought I would announce it here in case anyone else is interested: https://github.com/mikej

Re: Help in porting Hiccup to ClojureScript

2012-04-07 Thread Chris Granger
Have you seen Crate? http://github.com/ibdknox/crate On Apr 7, 1:18 pm, r0man wrote: > Hello ClojureScripters, > > I started to port the Hiccup library to ClojureScript. The goal > is to have a port of Hiccup that has exactly the same api. This > would make it possible to write views once (provi

Re: Help in porting Hiccup to ClojureScript

2012-04-07 Thread r0man
Hi Chris, yes I have seen crate. But I wanted something where I can share the same view code and use it on the client and the server and use the same api. I also think Hiccup's aproach to generate html strings at compile time is quite nice. That way the deconstruction of [:div#id.class] stuff can

Re: Help in porting Hiccup to ClojureScript

2012-04-07 Thread Evan Mezeske
I think crate is about the closest that you're going to be able to get to hiccup in practice. ClojureScript macros are written in Clojure, and thus have to come from separate namespaces from the rest of the ClojureScript code. So, it is not possible to just port hiccup to ClojureScript on a v

Re: Boolean

2012-04-07 Thread Michael Klishin
Steven Obua: > (if (Boolean. false) "jesus" "christ") > > will return "jesus", not "christ". Googling this on the net, I found > that this is a known phenomenon http://docs.oracle.com/javase/7/docs/api/java/lang/Boolean.html#Boolean(boolean) says: «Note: It is rarely appropriate to use this co

Re: Boolean

2012-04-07 Thread Dennis Haupt
i've never seen a "new Boolean(...)" in my 10 years of developing java code. Am 07.04.2012 22:49, schrieb Michael Klishin: > Steven Obua: > >> (if (Boolean. false) "jesus" "christ") >> >> will return "jesus", not "christ". Googling this on the net, I found >> that this is a known phenomenon > >

Re: Help in porting Hiccup to ClojureScript

2012-04-07 Thread r0man
Hi Evan, I think Hiccup is a also a good starting point for this. In fact 99% of the port is already working. The last thing I struggle with is actually only cosmetics, like carrying over the meta data with the arglist and documentation. Why do you think it is impossible to have the same API in C

Re: Help in porting Hiccup to ClojureScript

2012-04-07 Thread Evan Mezeske
On Saturday, April 7, 2012 2:24:21 PM UTC-7, r0man wrote: > > Why do you think it is impossible to have the same API in Clojure > and ClojureScript? > For instance, hiccup.core/html and hiccup.core/h cannot live in the same namespace in ClojureScript if hiccup.core/html is going to be a macro, an

Re: I'm writing a Tempest clone in ClojureScript

2012-04-07 Thread David Nolen
Fun! Would be nice if you could move and fire at the same time :) On Sat, Apr 7, 2012 at 3:12 AM, Trevor Bentley wrote: > Greetings! > > Tempest (in ClojureScript) has come a long way in the last couple of > weeks. A playable demo is now up: > > Play Tempest-cljs

Re: GSOC : Constraint based UI layout

2012-04-07 Thread Kevin Lynagh
Hi Patrick, I'm the potential mentor for the GSoC Cassowary project. The goal isn't to port Cassowary---it's already implemented in Java and available in the browser via my CoffeeScript port with ClojureScript bindings: https://github.com/lynaghk/cassowary-coffee Rather, the aim of the summe

Re: I'm writing a Tempest clone in ClojureScript

2012-04-07 Thread Trevor Bentley
That's in my TODO list... seems that the Google Closure keyboard handler just doesn't two keys at once, so key handling eventually has to be managed some other way. For now, playing makes a terrible racket :) On Saturday, April 7, 2012 7:45:32 PM UTC-4, David Nolen wrote: > > Fun! Would be nice