Re: [ANN] bleach 0.0.11

2013-05-04 Thread David Lowe
It's much, much simpler than any compiler! It just translates arbitrary clojure code to and from all-whitespace strings :) Thanks, David On Sat, May 4, 2013 at 11:26 AM, Gary Verhaegen wrote: > Without looking at more than the Readme on github, I guess it's kind > of like a compiler to whitespa

Re: [ANN] bleach 0.0.11

2013-05-04 Thread David Lowe
Sure thing! Here's a sample: $ cat src/helloworld/core.clj (ns helloworld.core) (defn foo "I don't do a whole lot." [x] (println x "Hello, World!")) $ lein bleach src/helloworld/core.clj $ cat src/helloworld/core.clj (use 'bleach.core) #bleach/ed "

Re: New Forms Library

2013-05-04 Thread Steven Degutis
Got a link? On Sat, May 4, 2013 at 10:57 PM, mike wrote: > I created a forms library called Formula over the last week or so, and I > wanted to share it with the community. The library uses hiccup underneath > and includes it's own validation (which is optional). It's built to handle > validati

New Forms Library

2013-05-04 Thread mike
I created a forms library called Formula over the last week or so, and I wanted to share it with the community. The library uses hiccup underneath and includes it's own validation (which is optional). It's built to handle validation inline, so you would just pass any errors (into the same form

Re: [OT] Re: More idiomatic way to use map like this?

2013-05-04 Thread Devin Walters
I don't think that it's productive to discuss idiomatic code and performance in the same breath. People do all sorts of nasty stuff when trying to squeeze performance juice out of their code. In my experience it's rare to see performance-related "idioms" beyond the obvious language-level constr

Re: [OT] Re: More idiomatic way to use map like this?

2013-05-04 Thread Cedric Greevey
What about the times when one simply must use loop/recur for performance reasons? Although, one thought I had on that was to write a functional version, and if it's a performance bottleneck, write a loop/recur version and call the latter in performance-critical areas, but also have tests that check

Re: [ANN] bleach 0.0.11

2013-05-04 Thread AtKaaZ
got it, thanks Gary! On Sat, May 4, 2013 at 9:26 PM, Gary Verhaegen wrote: > Without looking at more than the Readme on github, I guess it's kind > of like a compiler to whitespace. You know, the whitespace programming > language : > http://en.wikipedia.org/wiki/Whitespace_(programming_language)

Re: [ANN] rhizome - simple graph and tree visualizations

2013-05-04 Thread AtKaaZ
this is awesome! On Sat, May 4, 2013 at 1:39 AM, Zach Tellman wrote: > I've had Graphviz integration in Lamina for a while [1], and have > generally found it to be fun and useful. To let everyone join in the fun, > I've extracted that functionality into its own library, Rhizome [2]. > Feedbac

Re: [ANN] bleach 0.0.11

2013-05-04 Thread Jonathan Fischer Friberg
You could try reading about it here: http://search.cpan.org/~dconway/Acme-Bleach-1.150/lib/Acme/Bleach.pm I still can't figure out exactly what it does though... Reading the description, it seems like it removes, for example whitespace at the end of lines. But from the example it seems like it rem

Re: [ANN] bleach 0.0.11

2013-05-04 Thread Gary Verhaegen
Without looking at more than the Readme on github, I guess it's kind of like a compiler to whitespace. You know, the whitespace programming language : http://en.wikipedia.org/wiki/Whitespace_(programming_language) like implemented as a user defined type with the #bleach/ed type. On 4 May 2013 19:

Re: idiomatic way to force evaluation of a lazy operation

2013-05-04 Thread Jonathan Fischer Friberg
If you don't need the result, you should use dorun instead of doall. http://clojuredocs.org/clojure_core/clojure.core/dorun Jonathan On Sat, May 4, 2013 at 8:07 PM, Gary Verhaegen wrote: > Just want to point out that doall seeming more idiomatic in this case > might just be an accident of histo

Re: idiomatic way to force evaluation of a lazy operation

2013-05-04 Thread Gary Verhaegen
Just want to point out that doall seeming more idiomatic in this case might just be an accident of history - mapv is a relatively new addition to Clojure (1.4). At least to me, it is immediately obvious that a mapv is intentionally non lazy. On 4 May 2013 12:07, Timo Mihaljov wrote: > On 04.05.20

Re: [ANN] bleach 0.0.11

2013-05-04 Thread AtKaaZ
could you post a sample code how it looks before and after? On Thu, May 2, 2013 at 7:36 AM, David Lowe wrote: > bleach: whitens unsightly code! > > When you bleach your code, it continues to work as before, only now it > looks like: > > (use 'bleach.core) #bleach/ed " > > > > > " > > Find it he

Re: Question about destructuring with :keys :or and :as

2013-05-04 Thread Ryan
Hey Peter, I personally found out that I require this functionality more when I am building web apps because I pass around the url query parameters to other functions for validation or other tasks and build my sql queries from there so some default are required. For several other clojure server

Re: [ANN] java.jdbc 0.3.0-alpha2

2013-05-04 Thread Sean Corfield
Thanx for the detailed feedback. I'm not sure why that didn't show up in testing. Update made to create alpha3. I'll have it released to Maven shortly. On Sat, May 4, 2013 at 3:51 AM, r0man wrote: > Hi Sean, > > I just tested java.jdbc 0.3.0-alpha2 against my code base and got > the following exc

Re: [ANN] http-kit 2.0.0 released

2013-05-04 Thread Shen, Feng
> Will there be a client-side for browsers in ClojureScript or Javascript? I mean something similar to sockjs implementation. I have't plan to do that yet. http-kit is focused to provide a HTTP library for Clojure. 沈锋 On Sat, May 4, 2013 at 6:48 PM, Hoàng Minh Thắng wrote: > On Friday, Marc

Re: [ANN] http-kit 2.0.0 released

2013-05-04 Thread Shen, Feng
> I hope support autoload .It's very useful for develop! http://http-kit.org/migration.html#reload 沈锋 On Sat, May 4, 2013 at 9:08 PM, 张保良 wrote: > I hope support autoload .It's very useful for develop! > > 在 2013年3月29日星期五UTC+8下午2时03分38秒,Feng Shen写道: > >> Hello folks. >> >> I just released ve

Re: [ANN] http-kit 2.0.0 released

2013-05-04 Thread 张保良
I hope support autoload .It's very useful for develop! 在 2013年3月29日星期五UTC+8下午2时03分38秒,Feng Shen写道: > > Hello folks. > > I just released version 2.0.0 of http-kit. > > > *2.0.0 (2013/3/29)* > >1. Unify WebSocket and HTTP long polling/streaming with Channel >protocol and with-channel

Re: A JMonkeyEngine3 wrapper?

2013-05-04 Thread Alex Fowler
Thanks everyone for their input! I have studied all the proposed codes! Based on them I have created a proof-of-concept solution for my case. Although reading the API of Jonathan's library inspired me, I avoided looking into the code yet so as to have some personal fun (remember I am a Clojure

Re: A JMonkeyEngine3 wrapper?

2013-05-04 Thread Alex Fowler
Thanks everyone for their input! I have studied all the proposed codes! Based on them I have created a proof-of-concept solution for my case. Although reading the API of Jonathan's library inspired me, I avoided looking into the code yet so as to have some personal fun (remember I am a Clojure

Re: A JMonkeyEngine3 wrapper?

2013-05-04 Thread Alex Fowler
Thanks everyone for their input! I have studied all the proposed codes! Based on them I have created a proof-of-concept solution for my case. Although reading the API of Jonathan's library inspired me, I avoided looking into the code yet so as to have some personal fun (remember I am a Clojure

Re: A JMonkeyEngine3 wrapper?

2013-05-04 Thread Alex Fowler
Thanks everyone for their input! I have studied all the proposed codes! Based on them I have created a proof-of-concept solution for my case. Although reading the API of Jonathan's library inspired me, I avoided looking into the code yet so as to have some personal fun (remember I am a Clojure

Re: Question about destructuring with :keys :or and :as

2013-05-04 Thread Peter Taoussanis
Hi Ryan, I actually run into this quite often and feel that it's something that's missing from destructuring: http://grokbase.com/t/gg/clojure/128z9e3sqj/possible-to-merge-destructuring-or-defaults-with-as Basically, I'd advocate the addition of a new `:merge-as` destructure option that functi

Re: [ANN] java.jdbc 0.3.0-alpha2

2013-05-04 Thread r0man
Hi Sean, I just tested java.jdbc 0.3.0-alpha2 against my code base and got the following excpetion when running my tests: Exception in thread "main" java.lang.IllegalArgumentException: Unable to resolve classname: Connection, I think the problem only happens when you use the get-connection func

Re: [ANN] http-kit 2.0.0 released

2013-05-04 Thread Hoàng Minh Thắng
On Friday, March 29, 2013 1:03:38 PM UTC+7, Feng Shen wrote: > > Hello folks. > > I just released version 2.0.0 of http-kit. > Looks great, Feng Shen. I couldn't find a road-map so I ask here. Will there be a client-side for browsers in ClojureScript or Javascript? I mean something similar to so

Re: idiomatic way to force evaluation of a lazy operation

2013-05-04 Thread Timo Mihaljov
On 04.05.2013 13:01, Korny Sietsma wrote: > Thanks - I thought doall was probably better than mapv. > > Incidentally, doseq won't work - if the 5th result throws an exception > during parsing, results 1-4 will still be saved, whereas I want the > whole operation to abort without saving anything.

Re: idiomatic way to force evaluation of a lazy operation

2013-05-04 Thread Korny Sietsma
Thanks - I thought doall was probably better than mapv. Incidentally, doseq won't work - if the 5th result throws an exception during parsing, results 1-4 will still be saved, whereas I want the whole operation to abort without saving anything. - Korny On 4 May 2013 19:38, Timo Mihaljov wrote:

Re: Question about destructuring with :keys :or and :as

2013-05-04 Thread Ryan
Thanks for your input Sean On Saturday, May 4, 2013 3:07:49 AM UTC+3, Sean Corfield wrote: > > Just merge the new, known values back in since they've already been > bound to their (possibly defaulted) values: > > (let [params (assoc params :my-key my-key)] ...) > > Sean > > On Fri, May 3, 2013

Re: idiomatic way to force evaluation of a lazy operation

2013-05-04 Thread Timo Mihaljov
On 04.05.2013 12:16, Korny Sietsma wrote: > What's the idiomatic way to avoid this? The options seem to be either > to use > (doall (map parse-record records)) > or (mapv parse-record records) > > Is either of these better? The latter is simpler, the former (to me) > expresses that you are deli

idiomatic way to force evaluation of a lazy operation

2013-05-04 Thread Korny Sietsma
Hi folks, we have some code that needs to _not_ be lazy - the rough code we have is: (defn parse-and-store [raw-data] (try (let [records (split-records raw-data) results (map parse-record records)] (do (save-audit-data! raw-data) (map (save-result! results)

Re: link for clojure programs

2013-05-04 Thread nrel...@yahoo.com
On Saturday, May 4, 2013 2:01:48 PM UTC+8, nre...@yahoo.com wrote: > > Can anybody give me a link/websites of codes for BEGINNERS FOR CLOJURE? > Thanks -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojur