Re: [ANN] thi,ng/geom 0.0.856 (new dataviz module)

2015-06-17 Thread Ivan L
this is quickly becoming my clojurescript goto viz api.  keep up the great work!

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ANN] Dominator 0.3.0

2015-06-08 Thread Ivan L
Any performance comparisons to refrain reagent?

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ANN] Clojure 1.7.0-RC1 now available

2015-06-03 Thread Ivan L
Removing Java 6 would affect clojure for android projects wouldn't it?

On Wednesday, June 3, 2015 at 9:34:07 AM UTC-4, Mike Rodriguez wrote:
>
> Sorry for the delay in getting back with a response to this.  I think it 
> is fairly clear in the Clojure Compiler that there is an exception that 
> will wrap errors that occur during macroexpansion now.
>
> Around here 
> https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/Compiler.java#L6627-L6649,
>  
> the Compiler.macroexpand1() now has a try-catch for Throwable around the 
> evaluation of the macro invocation.
> This was not the case in Clojure version 1.6.  See around 
> https://github.com/clojure/clojure/blob/clojure-1.6.0/src/jvm/clojure/lang/Compiler.java#L6548-L6560
>  
> for a reference point.
>
> I'm fairly sure that is what has caused this change in behavior that broke 
> our expectations that the exception types our code through during 
> macroexpansion would propagate all the way back to the caller.  Again, I 
> think this was a bad expectation to have, but it is a little tricky.
>
> It is a little trickier for us to have any strong assertions on the type 
> of exception that may come from a macro now.  Compiler$CompilerException 
> seems too dependent on the implementation.  So we've opted to just assert 
> there would be a is-thrown? RuntimeException in these sorts of tests.  If 
> we want to test something like an ExceptionInfo's data map, we now just 
> have to write a helper to walk the stack trace until we find it - which 
> would likely be a single "step" up the trace.
>
> A simple reproducing case:
> *clojure-version* ;= {:major 1, :minor 7, :incremental 0, :qualifier "RC1"}
>
> (defmacro demo [] (throw (ex-info "fail" {})))
>
> (demo) ;= CompilerException clojure.lang.ExceptionInfo: fail {}, 
> compiling:(form-init4053282905768384039.clj:1:1) 
>
> vs.
> *clojure-version* ;= {:major 1, :minor 6, :incremental 0, :qualifier nil}
>
> (demo) ;= ExceptionInfo fail  clojure.core/ex-info (core.clj:4403)
>
>
>
> On Saturday, May 23, 2015 at 8:52:47 AM UTC-5, Alex Miller wrote:
>>
>> I'm not aware of any wholesale changes with respect to compiler 
>> exceptions. Can you give an example?
>
>

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Opinion on core.async vs callbacks in abstract APIs?

2015-06-02 Thread Ivan L
Is there a detail of core.async that is needed in a third party usage?  If 
not, you should't have to require core.async.

Be liberal in what you accept and conservative in what you produce - Art of 
Unix Programming paraprhased.

On Monday, June 1, 2015 at 3:18:19 PM UTC-4, Christopher Small wrote:
>
> Greetings
>
> I imagine most of us here would rather use core.async channels over 
> callbacks in their application code, particularly with more complicated 
> applications. But is it okay/preferable for Clojure libraries to force 
> their users to use core.async channels as part of an API (an event channel, 
> for example)? 
>
> As much as I love core.async, I can't help but wonder whether sticking 
> with callbacks for an API isn't a simpler/better design strategy. It's easy 
> enough to drop messages on a channel in a callback, and this let's users 
> opt-in. But if one expects core.async channels are what most would prefer 
> anyway, is it okay to foist them upon everyone?
>
> As a follow up, does your opinion on the matter change if implementations 
> of an API become simpler using core.async channels?
>
>
> Looking forward to your thoughts :-)
>
> Chris Small
>
>
>
> PS I'm asking because I'm working on a physical computing API (
> https://github.com/clj-bots/pin-ctrl) and debating between using channels 
> vs callbacks for the edge detection functionality (if you're not familiar, 
> edge detection let's you asynchronously handle changes in pin state, such 
> as button pushes). If you're interested in this question as it applies 
> specifically to this application, feel free to join the discussion on our 
> gitter channel: https://gitter.im/clj-bots/chat
>

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ANN] thi.ng additions/updates

2015-06-01 Thread Ivan L
this project is so cool.  I've been playing around with noise and svg 
thanks to it.  Thanks Karsten!

>
>

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Any chance of a module system being added to the language?

2015-04-03 Thread Ivan L
Osgi brings in so many other things to worry about.  Imo not a route to 
consider.  The main issue is every jar you use would have to have an osgi 
friendly implementation. For this reason  a lot of libs are duplicated after 
source alteration into a new repo.  Great for tightly controlled embedded 
systems not so great for just grabbing random lob X off of maven.

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Project fails to compile on different machines

2015-03-10 Thread Ivan L
seems like a clear classnotfound error to me.  make sure both environments are 
building from a clean state (no build caches) and that your classes are being 
prred correctly.

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Diagnosing a figwheel error

2015-03-07 Thread Ivan L
Sounds like you are fighting with project.clj.  You'd be better off going 
with a template like chestnut as a learning tool.

On Saturday, March 7, 2015 at 5:47:19 PM UTC-5, Jonathon McKitrick wrote:
>
> I decided to ditch piggieback/weasel and try figwheel, and though it 
> starts without errors, I get 'Page not found' when visiting localhost:3449.
>
> What's the best way to track down the cause?
>

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ANN] Dunaj project, an alternative core API for Clojure

2015-03-05 Thread Ivan L
Just a quick glance at the example project shows integrated type 
definitions.  I'm curious for sure.

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: partition-when

2015-03-04 Thread Ivan L
I went though almost the exact same exercise and my code is almost 
identical to yours.  I called it partition-every and I use it a lot.  A 
more determined individual might submit this for inclusion into core!

On Tuesday, March 3, 2015 at 2:46:29 PM UTC-5, Frank wrote:
>
> Hi all,
>
> for some tests I need a function which starts a new partition each time a 
> predicate returns true, for instance:
>
> (partition-when
>   (fn [s] (.startsWith s ">>"))
>   [">> 1" "2" "3" ">> 4" "5" "6"])
> :=> [[">> 1" "2" "3"] [">> 4" "5" "6"]]
>
> Since I haven't found a built-in function, I copied, pasted, and modified 
> the core function partition-by:
>
> (defn partition-when
>   [f coll]
>   (lazy-seq
>(when-let [s (seq coll)]
>  (let [fst (first s)
>run (cons fst (take-while #(not (f %)) (next s)))]
>(cons run (partition-when f (seq (drop (count run) s
>
> Is there a better (more idiomatic) way to achieve the same result?
>
> Thank you in advance.
>
> Frank
>

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


XPATH/XSLT like access to Clojure data structures?

2015-02-28 Thread Ivan L
instar and balagan are two libs that are in this space.  ive been looking for 
something like youre describing as well - i think something like xslt would be 
wondrous.  

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Removing the 5th, 10th, 15th ... element of a list

2015-02-17 Thread Ivan L
this works

=> (filter #(not= (mod % 5) 0) (range 22))
(1 2 3 4 6 7 8 9 11 12 13 14 16 17 18 19 21)


On Tuesday, February 17, 2015 at 2:21:20 PM UTC-5, Cecil Westerhof wrote:
>
> What is the best way to remove all elements which position (counting from 
> 1) is a multiply of five out of a list?
>
> So the list:
> (1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21)
> ​becomes:
> (1 2 3 4 6 7 8 9 11 12 13 14 16 17 18 19 21)​
>
> -- 
> Cecil Westerhof
>  

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Performant flattening of nested data structures

2015-02-17 Thread Ivan L
i wasn't able to squeeze that much more out of it, informally maybe around 
10% as it gets larger.

(defn- flx 
  ([obj] (flx obj ["$"] {}))
  ([obj curr res]
(cond
  (map? obj)
  (reduce 
#(flx (%2 obj) (conj curr (str "." (name %2))) %1) 
res 
(keys obj))
  (sequential? obj)
  (reduce 
#(flx (second %2) (conj curr (str "[" (first %2) "]")) %1) 
res 
(map #(identity (list %1 %2)) (range (count obj)) obj))
  :else
  (assoc res (apply str curr) obj


On Tuesday, February 17, 2015 at 11:18:58 AM UTC-5, Mark Watson wrote:
>
> A slightly cleaner version:
>
> (defn- flatten-keys* [a ks m]
>
>   (cond
>
>;; Is a map?
>
>(map? m) (reduce into
>
> (map (fn [[k v]]
>
>(flatten-keys* a (str ks "." (name k)) v))
>
>  (seq m)))
>
>;; Is an arr/vec/seq?
>
>(and (sequential? m)
>
> (not (instance? clojure.lang.MapEntry m))) (reduce into
>
>(map-indexed (fn 
> [idx itm]
>
>   
> (flatten-keys* a
>
>   
>(str ks "[" idx "]")
>
>   
>itm))
>
> (seq 
> m)))
>
>;; Is not a collection
>
>:else (assoc a ks m)))
>
> (defn flatten-keys [m] (flatten-keys* {} "$" m))
>
>

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Performant string concatenation (of many, large strings)

2015-02-14 Thread Ivan L
What is the best way to profile Clojure? I tried a reduce doto thing but it was 
way slowe than apply str.  would love to know why.

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: ANN: ClojureScript 0.0-2814, Nashorn REPL, async testing, and much more

2015-02-09 Thread Ivan L
Congratulations David and CLJS team, you guys are on fire lately.

On Monday, February 9, 2015 at 7:47:41 PM UTC-5, David Nolen wrote:
>
> ClojureScript, the Clojure compiler that emits JavaScript source code.
>
> README and source code: https://github.com/clojure/clojurescript
>
> New release version: 0.0-2814
>
> Leiningen dependency information:
>
> [org.clojure/clojurescript "0.0-2814"]
>
> There are numerous enhancements in this release including: a Nashorn
> REPL, Node.js 0.12 support, cljs.test async testing support,
> `cljs.closure/watch`, extra JSDoc annotation support, unified source
> mapping on client/server (thus REPLs!), and many small fixes.
>
> I'm particularly excited about unified source mapping as this means we
> get a much better debugging experience on newer targets (for us) like iOS, 
> see https://github.com/omcljs/ambly
>
> ## 0.0-2814
>
> ### Enhancements
> * add simple source directory `cljs.closure/watch` watcher using java.nio
> * CLJS-1022: Concatenate foreign dependencies safely
> * CLJS-988: Support async testing in cljs.test
> * CLJS-1018: Add support for cljs.core/*e Modify the JavaScript that is 
> sent for evaluation to wrap in a try and then catch any exception thrown, 
> assign it to *e, and then rethrow.
> * CLJS-1012: Correct behavior when *print-length* is set to 0
> * Added new :closure-extra-annotations compiler option allowing to define 
> extra JSDoc annotation used by closure libraries.
> * Mirrored source map support APIs on server/client
> * Unified source mapping support in REPLs
> * Nashorn REPL (thanks Pieter van Prooijen)
>
> ### Fixes
> * CLJS-1023: regression, macro-autoload-ns? and ns-dependents need to 
> throw on cyclic dependencies
> * fix require with browser REPL, set base path to "goog/"
> * CLJS-1020: off by one error in REPL source map support
> * Node.js 0.12 support
> * browser REPL needs to respect :output-dir
> * CLJS-1006: Implicit dependency of clojure.browser.repl on cljs.repl
> * CLJS-1005: Browser REPL creates 'out' directory no matter what
> * CLJS-1003: fix cljs.test run-tests do-report :summary issues
> * CLJS-1003: Cannot pass custom env to run-tests
> * Windows Node.js REPL issues
>
>

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: ANN: ClojureScript 0.0-2740, Windows

2015-01-28 Thread Ivan L
Thanks David, the Windows love is much much appreciated.

On Wednesday, January 28, 2015 at 8:54:42 AM UTC-5, David Nolen wrote:
>
> ClojureScript, the Clojure compiler that emits JavaScript source code.
>
> README and source code: https://github.com/clojure/clojurescript
>
> New release version: 0.0-2740
>
> Leiningen dependency information:
>
> [org.clojure/clojurescript "0.0-2740"]
>
> The primary reason for this release is to bring all the benefits of
> 0.0-2727 to Windows users.
>
> ### Changes
> * local :foreign-libs can precisely override upstream :foreign-libs
> * :foreign-libs :file-min is only used under :advanced optimizations
> * file generated by supplying :main now idempotent
> * more informative error if :main incorrectly supplied
>
> ### Fixes
> * many fixes around file/resource handling for Windows users
>
>

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: ANN: ClojureScript 0.0-2719, JavaScript Dependencies

2015-01-25 Thread Ivan L
To this end I would hope everyone takes a look at using webjars.org as 
their source for frontend libraries.  imo, it's a way forward to dep mgmt 
outside of bower/npm/node etc.

On Sunday, January 25, 2015 at 2:42:54 PM UTC-5, David Nolen wrote:
>
> I strongly recommend the Clojure(Script) community join forces when 
> packaging libraries to avoid duplicated effort and dependency conflicts.
>
> CLJSJS seems like a good initiative to me along these lines: 
> http://cljsjs.github.io
>
> David
>
> On Sun, Jan 25, 2015 at 1:49 PM, Vladimir Bokov  > wrote:
>
>> Thanks David!
>>
>> I also already packaged https://github.com/razum2um/jquery-cljs using 
>> your react repo as example
>>
>> суббота, 24 января 2015 г., 21:10:29 UTC+6 пользователь David Nolen 
>> написал:
>>
>>> ClojureScript, the Clojure compiler that emits JavaScript source code.
>>>
>>> README and source code: https://github.com/clojure/clojurescript
>>>
>>> New release version: 0.0-2719
>>>
>>> Leiningen dependency information:
>>>
>>> [org.clojure/clojurescript "0.0-2719"]
>>>
>>> ClojureScript is not an island, like Clojure on the JVM, ClojureScript
>>> embraces the many benefits provided by the host. However this goal
>>> has been hampered by another goal - the compilation stragey. Google
>>> Closure Compiler offers superior optimization and minification for
>>> ClojureScript while simultaneously making it considerably more
>>> difficult to integrate non-Closure compatible libraries. Using popular
>>> libraries like jQuery, React or D3 is an error prone process: "which
>>> extern did I forget?", "which script tag did I miss for development?",
>>> "are these script tags in dependency order?".
>>>
>>> No more. 0.0-2719 delivers full support for non-Closure compatible
>>> libraries through some less known features that have been lurking
>>> around for almost three years - `deps.cljs` and the :foreign-libs
>>> compiler option.
>>>
>>> `deps.cljs` is a simple EDN file provided at the root of a JAR that
>>> describes additional build information for the ClojureScript
>>> compiler. For example here is the `deps.cljs` for the React JAR I
>>> maintain:
>>>
>>> {
>>>  :foreign-libs [{:file "react/react.js"
>>>  :file-min "react/react.min.js"
>>>  :provides ["com.facebook.React"]}
>>> {:file "react/react_with_addons.js"
>>>  :file-min "react/react_with_addons.min.js"
>>>  :provides ["com.facebook.ReactWithAddons"]}]
>>>  :externs ["react/externs/react.js"]
>>> }
>>>
>>> This file provides all the information ClojureScript needs to
>>> correctly manage the foreign dependency for you under all compilation
>>> modes and REPLs.
>>>
>>> In a REPL:
>>>
>>>cljs.user> (require 'com.facebook.React)
>>>cljs.user> (. js/React 
>>> (renderToString 
>>>   (. js/React (DOM.div nil "Hello!"
>>>
>>> In your project:
>>>
>>>(ns foo.bar
>>>  (:require com.facebook.React))
>>>
>>>(enable-console-print!)
>>>
>>>(println
>>>  (. js/React
>>>(renderToString
>>>  (. js/React (DOM.div nil "Hello!")
>>>
>>> The above works under all compilation modes. There is no need to
>>> include React as a script tag under development, there is no need to put
>>> script tags in dependency order, there is no need to add React to
>>> :preamble under :advanced, and there is no need to explicitly provide
>>> :externs.
>>>
>>> All that is required is that JavaScript libraries be packaged in JARs
>>> with a `deps.cljs`.
>>>
>>> Some of you might reasonably ask why not a tool like Bower for this
>>> instead?  Bower requires an additional dependency on Node.js. While
>>> ClojureScript embraces Node.js as a useful target it is not a
>>> requirement to be productive. Bower manages dependencies, but in the
>>> Clojure world we have already embraced Maven for this task and have
>>> done the same for ClojureScript. Finally Bower does not address the
>>> problem of loading libraries at runtime. This is challenging to do -
>>> some JavaScript libraries adopt CommonJS, some AMD, and the most
>>> popular ones make no assumptions at all allowing users to simply use
>>> script tags as they have done for nearly two decades. The above
>>> solution addresses the issue for all ClojureScript users by
>>> eliminating paralysis of choice. Finally none of the above
>>> precludes Bower usage in any way whatsoever.
>>>
>>> This new feature addresses a long outstanding pain point with
>>> ClojureScript development. All that is required is that we take the
>>> time to properly package up the most popular JavaScript libraries that
>>> fill gaps not currently served by exising ClojureScript and Google
>>> Closure Library functionality.
>>>
>>> Please kick the tires and feedback is most welcome. This feature
>>> touched many bits of code so there are likely to be wrinkles and we want
>>> to get these ironed out as quickly as possible.
>>>
>>> ## 0.0-27

maya - A DSL for math and numerical stuff

2015-01-07 Thread Ivan L
Lovely.  It also seems like a stones throw away to a succint let macro.

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Simplifying JS dependencies in ClojureScript

2015-01-07 Thread Ivan L
Sounds like this would work great for the majority where the lib is only js, 
but what about edge cases where a lib depends on a relative pathed resource 
like an image or css file?  Bootstrap comes to mind.

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ClojureScript] Browserless ClojureScript

2014-12-22 Thread Ivan L
Great job!

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ANN] Boot 2.0.0-rc1 released

2014-12-17 Thread Ivan L
cljx support turns my head.  I took like a week off and on to read up on 
all the cljx/cljs/lein documentation and to create the cljx-start template. 
 When I was working on it, I kept asking myself, why is all this stuff 
necessary.  "That which is generated by a computer should not have to be". 
 Boot looks a lot simpler by comparison which I'm drawn to.  Will be 
following more closely, nice work.

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: {ANN} defun: A beautiful macro to define clojure functions with pattern match.

2014-09-25 Thread Ivan L
Is this clojurescript ready?  This looks amazing, I would also love to have 
it in core.

On Sunday, September 14, 2014 2:47:28 AM UTC-4, dennis wrote:
>
>
> Hi , i am pleased to introduce defun : 
> a beautiful macro to define clojure functions with pattern match.
>
> Some examples:
>
>
> (defun say-hi
>
>   ([:dennis] "Hi,good morning, dennis.")
>
>   ([:catty] "Hi, catty, what time is it?")
>
>   ([:green] "Hi,green, what a good day!")
>
>   ([other] (str "Say hi to " other)))
>
>
> (say-hi :dennis)
>
> ;;  "Hi,good morning, dennis."
>
> (say-hi :catty)
>
> ;;  "Hi, catty, what time is it?"
>
> (say-hi :green)
>
> ;;  "Hi,green, what a good day!"
>
> (say-hi "someone")
>
> ;;  "Say hi to someone"
>
>
> Recursive function? It's all right:
>
> (defun count-down
>
>   ([0] (println "Reach zero!"))
>
>   ([n] (println n)
>
>  (recur (dec n
>
> (defun fib
>
> ([0] 0)
>
> ([1] 1)
>
> ([n] (+ (fib (- n 1)) (fib (- n 2)
>
>
>
> Guard functions? it's all right:
>
> (defun valid-geopoint?
>
> ([(_ :guard #(and (> % -180) (< % 180)))
>
>   (_ :guard #(and (> % -90) (< % 90)))] true)
>
> ([_ _] false))
>
>
> (valid-geopoint? 30 30)
>
> ;; true
>
> (valid-geopoint? -181 30)
>
> ;; false
>
>
> It's really cool,all the magic are from core.match, much more details 
> please see 
> https://github.com/killme2008/defun
>
>
> -- 
> 庄晓丹 
> Email:killm...@gmail.com  xzh...@avos.com 
> 
> Site:   http://fnil.net
> Twitter:  @killme2008
>
>
> 

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Interop nightmare

2014-09-08 Thread Ivan L
For an enterprising clojure hacker, this is a good opportunity to write 
"Clojure for non-Java Hackers" and put it up on Pragprog.

On Sunday, September 7, 2014 10:50:31 PM UTC-4, Sam Raker wrote:
>
> I'm trying to use the Stanford Parser from Clojure, but I don't know 
> hardly any Java, and this is my first time working with the interop stuff. 
> All I want to do is play around with the class in the REPL. I added 
> `[edu.stanford.nlp/stanford-parser "3.4.1"]` to my Lein `project.clj`, and 
> the download seemed to go fine. The documentation is 
> http://nlp.stanford.edu/nlp/javadoc/javanlp/edu/stanford/nlp/parser/lexparser/LexicalizedParser.html
>  
> for those of you playing at home.
>
> Basically, my efforts have been a total failure. I can `(import 
> edu.stanford.nlp.parser.lexparser.LexicalizedParser)`, but after that, it's 
> just a nightmare of `no matching ctor`, `no matching field`, 
> `NoSuchFieldException` and `expected static field` errors. I can't even 
> initialize anything -- `(def parser (new LexicalizedParser))` gives me the 
> aforementioned `no matching ctor` error.
>
> Like I said before, this is entirely my fault: I don't know Java, I don't 
> know interop, and I Google has failed me. So I turn to you, beloved Clojure 
> community, to correct my ignorance. I'm sure it's not hard, I'm just 
> missing something.
>
>
> Thanks,
> -sam
>

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: ANN: Reagent 0.4.0

2014-08-29 Thread Ivan L
Dan apparently is really strapped on time.  If you check out the issues 
list you'll see a few of us are using a fork from github/@whoops while he's 
out and whoops has updated to the latest react.

On Friday, August 29, 2014 7:21:46 AM UTC-4, Cesare wrote:
>
> Hi Dan,
> I'm playing with Reagent and I find it very simple and promising. Thanks 
> for it!
>
> Anyway, the last update was 5 months ago (react 0.10.0): is the project 
> still alive and well?
>
> Thanks in advance!
>
> Il giorno sabato 22 febbraio 2014 09:11:42 UTC+1, Dan Holmsand ha scritto:
>>
>> Reagent is now at 0.4.1, with support for ClojureScript 0.0-2173. 
>>
>> Reagent's atom now implements the necessary IAtom, ISwap and IReset 
>> protocols. Reagent should still be compatible with older ClojureScript 
>> versions, but you will get a lot of compilation warnings.
>>
>> /dan
>>
>>
>> On 21 feb 2014, at 16:57, Dan Holmsand  wrote:
>>
>> Reagent, a minimalistic interface between React.js and ClojureScript, is 
>> now at 0.4.0.
>>
>> The new release has a breaking change: Reagent now lets you call 
>> component functions exactly like ordinary functions (albeit with square 
>> brackets). This is obviously a breaking change, but behaviour is unchanged 
>> if you passed a map as the only argument (as in all the examples in the old 
>> documentation).
>>
>> Also: React is updated to 0.9.0, a great new example showing svg use in 
>> Reagent, by Jonas Enlund, general performance improvement, etc.
>>
>> Read more here: 
>>
>> http://holmsand.github.io/reagent/news/any-arguments.html
>>
>> The project page is here:
>>
>> https://github.com/holmsand/reagent
>>
>> Cheers,
>>
>> /dan
>>
>>
>>

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ANN] New release 0.27.1 of Counterclockwise

2014-08-28 Thread Ivan L
Thanks Laurent and team!

On Thursday, August 28, 2014 5:49:32 PM UTC-4, Laurent PETIT wrote:
>
> Counterclockwise the Eclipse Clojure development tool.
>
>
> Counterclockwise 0.27.1 has just been released.
>
> Contains 2 important bug fixes. All users are expectec to update from 
> 0.27.0 ASAP
>
> Please see the Changelog for detailed explanations: 
>
> Release Note
> ===
>
>
> http://doc.ccw-ide.org/ChangeLog.html#_changes_between_counterclockwise_0_27_0_and_0_27_1
>
> Install
> ===
>
> Installation instructions:
>
> http://doc.ccw-ide.org/documentation.html#_install_counterclockwise
>
> Cheers,
>
> -- 
> Laurent Petit
>  

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ANN] lein-plz 0.1.1 - Add dependencies quickly

2014-08-18 Thread Ivan L
I ran it on windows 7 via lein 2.4.3 and it just prints out a new 
project.clj.  It didn't alter the project.clj for me.  
I ran: lein plz add match

On Monday, August 18, 2014 12:24:00 PM UTC-4, Dylan Butman wrote:
>
> It looks like it walks the file and injects new lines. 
>
> Are you planning on adding a "remove" task?
>
> Also, it'd be great if you define groups of dependencies by giving 
> multiple dependencies the same key. For example, I want something like
>
> {
>   om#{"om frontend"}
>   prismatic/om-tools#{"om-tools frontend"}
>   sablono#{"sablono frontend"}
> }
>
> where "lein plz add frontend" would add all three deps.
>
> Also, it seems like the task takes quite a while, and there's no debug 
> output to indicate why, is this because you're fetching a lot of things 
> behind the scenes?
>

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ANN] lein-plz 0.1.1 - Add dependencies quickly

2014-08-18 Thread Ivan L
This doesn't overwrite the current project.clj correct?  It just generates 
text for a new file?

On Saturday, August 16, 2014 8:19:42 PM UTC-4, john walker wrote:
>
> Hello everyone.
>
> This is a lein plugin that helps you add dependencies to projects pretty 
> quickly. The git repo is here: https://github.com/johnwalker/lein-plz
>
> Basically, you write something like this:
>
>
> lein new foo
> cd foo
> lein plz add cljs async match jdbc
>
> and get this:
>
> (defproject foo "0.1.0-SNAPSHOT"
>   :description "FIXME: write description"
>   :url "http://example.com/FIXME";
>   :license {:name "Eclipse Public License"
> :url "http://www.eclipse.org/legal/epl-v10.html"}
>   :dependencies [[org.clojure/clojure "1.6.0"]
>  [org.clojure/clojurescript "0.0-2311"]
>  [org.clojure/core.async "0.1.319.0-6b1aca-alpha"]
>  [org.clojure/core.match "0.2.2"]
>  [org.clojure/java.jdbc "0.3.5"]])
>
> I hope it's useful.
>
> -- 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 post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: tools.analyzer[.js/.jvm], tools.emitter.jvm, status report

2014-08-13 Thread Ivan L
Keep up the great work Nicola.

On Wednesday, August 13, 2014 12:54:54 PM UTC-4, Nicola Mometto wrote:
>
>
> As some of you might know, I've been working contiuously on my various 
> tools.* contrib libraries for the past months and I've recently added 
> tools.analyzer.js to the list of contrib libraries I maintain. 
>
> Since I don't blog/tweet much about those libraries, I thought I'd write 
> a report to let the community aware of the status of those libraries. 
>
> ## tools.analyzer https://github.com/clojure/tools.analyzer 
>
> tools.analyzer is a host-agnostic pluggable analyzer and collection of 
> passes producing an AST in clojure data structures for clojure and 
> other languages in the clojure language family, like clojurescript. 
>
> The current release is 0.5.1, here's a list of notable changes that have 
> made in in the last few months: 
>
> * The analyzer now uses different environments for lexical state (like 
>   the locals map) and for global state (like namespaces mappings); the 
>   former is just a regular map passed to an analyze call, the latter is 
>   a dynamic var holding an atom and lives in the tools.analyzer.env 
>   namespace along with functions to setup/manipulate it. 
>
> * The metadata elision mechanism has been vastly improved, allowing to 
>   specify different keys to elide based on the node :op, aswell as based 
>   on a predicate rather than simple key matching. 
>
> * The env context now partecipates in a keyword hierarchy, the default 
>   contexts are :ctx/statement, :ctx/return and :ctx/expr and other 
>   contexts can be derived from those, as an example tools.analyzer 
>   utilizes :ctx.invoke/target and :ctx.invoke/params for nodes in invoke 
>   position. 
>
> * Dispatch on clojure expressions types has been opened with the 
>   -analyze-form multimethod, allowing to provide custom evaluation 
>   strategies for custom types (this was needed for tools.analyzer.js 
>   because of clojurescript's #js syntax) 
>
> * Documentation has been vastly improved with docstrings for every 
>   public function and pass, and the addition of an official AST 
>   quickref http://clojure.github.io/tools.analyzer/spec/quickref.html 
>
> For a complete list of changes, refer to the CHANGELOG: 
> https://github.com/clojure/tools.analyzer/blob/master/CHANGELOG.md 
>
> For more informations and examples, refer to the README: 
> https://github.com/clojure/tools.analyzer/blob/master/README.md 
>
> ## tools.analyzer.jvm https://github.com/clojure/tools.analyzer.jvm 
>
> tools.analyzer.jvm is a jvm-specific tools.analyzer extension, 
> collection of passes and useful functions to deal with analysis of 
> clojure on the JVM code. 
>
> The current release is 0.5.2, here's a list of notable changes that have 
> made in the last few months: 
>
> * Added an analyze-ns function that returns a vector of AST nodes for 
>   every top-level form in that namespace; evaluates each form. 
>
> * Added a configurable handler for wrong tags: while Clojure is 
>   permissive of type hints that don't resolve to a Class which it 
>   simply ignores in most cases, tools.analyzer.jvm's default behaviour 
>   has always been to throw an exception in those cases. This has been a 
>   longstanding issue for tools like eastwood that want to simply emit a 
>   warning on those cases rather than stopping analysis and error out. 
>   With the addition of this handlers, users can now control what happens 
>   when t.a.jvm hits a tag that can't be resolved to a Class. 
>
> * Added optional Var-level tag inference 
>
> * Improved analyze+eval to attach the result of the evaluation of the 
>   node to the AST, wrapping potential exceptions at evaluation time in 
>   an ExceptionThrown record. 
>
> * Documentation has been vastly improved with docstrings for every 
>   public function and pass, and the addition of an official AST 
>   quickref http://clojure.github.io/tools.analyzer.jvm/spec/quickref.html 
>
> For a complete list of changes, refer to the CHANGELOG: 
> https://github.com/clojure/tools.analyzer.jvm/blob/master/CHANGELOG.md 
>
> For more informations and examples, refer to the README: 
> https://github.com/clojure/tools.analyzer.jvm/blob/master/README.md 
>
> ## tools.analyzer.js https://github.com/clojure/tools.analyzer.js 
>
> tools.analyzer.js is a js-specific tools.analyzer extension, collection 
> of passes and useful functions to deal with analysis of clojurescript 
> code. 
>
> The current release is 0.1.0-beta4. 
>
> The produced AST is not compatible with the one produced by 
> cljs.analyzer even though they are similar as the cljs analyzer heavily 
> influenced the AST format of tools.analyzer. 
> tools.analyzer.js has several advantages over cljs.analyzer: 
>
> * Heavily modular implementation, thanks to the :children-walking based 
>   multi-pass design. 
>
> * Unified AST format and analyzer interface between clj and cljs code 
>   analyzers, this will allow library authors to write passes

Re: ANN: ClojureScript 0.0-2280

2014-08-02 Thread Ivan L
As always, thanks for your hard work.

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ANN] om-start lein template for nrepl compliant editors/IDEs

2014-05-01 Thread Ivan L
Thanks mimmo!  Looking forward to trying this out.

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: eclipse REPL problem (no prompt)

2014-04-28 Thread Ivan L
I recommend the counter clockwise users group at:
https://groups.google.com/forum/#!forum/clojuredev-users

On Monday, April 28, 2014 1:18:23 PM UTC-4, Roelof Wobben wrote:
>
> Hello, 
>
> I try now the eclipse with CounterClockwise plugin.
> It looks to work fine except one thing.
>
> When I open a repl I do not see a sort of prompt.
>
> Does anyone know how to solve this ?
>
> Roelof
>
>

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Kind of off-topic] Enlightenment

2014-02-10 Thread Ivan L
When I was writing a simple lib to work against stock prices and somewhere 
between a few hofs and a macro or two I ended up accidently with a small 
dsl for stock prices.
I then remembered reading  "lisp is the language you write the language to 
solve the problem in" and it just instantly range true like a huge gong.
Definitely a Keanu Reeves "whoa" moment.

On Sunday, February 9, 2014 10:15:14 AM UTC-5, Plinio Balduino wrote:
>
> Hi there 
>
> I would like to know about your experiences of enlightenment, "a-ha!" 
> ou "now everything makes sense" when you finally understood how LISP 
> works and what's so hot about that language/family of languages. As 
> "LISP" I mean "any Lisp dialect, blessed or not by the good old 
> lispers". 
>
> I would to like to talk about it here, but I'm not sure if it's usual 
> or if it's a kind of 'urban legend' of software developers. 
>
> Thank you 
>
> Plínio 
>

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Should predicates always have one argument?

2014-01-31 Thread Ivan L
I typically wrap stuff with (partial) for easier reading.  In your example 
you might use something like following.

(defn are-valid
  [maps validator]
  (let [valid? (partial validator)]
(map valid? maps)))

On Friday, January 31, 2014 11:44:38 AM UTC-5, Ryan wrote:
>
> Hello,
>
> I am wondering if all my predicates should be one argument functions 
> because I run into a couple of cases where I needed more than one.
>
> For example, I have a function called valid-params? which takes two 
> parameters; the validator to use and a maps parameter.
> Is this approach wrong/not the clojure way?
>
> What are my alternatives? Should I just use a different function name 
> which does not have a question mark at the end that implies that is a 
> predicate?
>
> Cheers,
>
> Ryan
>

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Recommendations for parsing/validating a JSON structure

2014-01-31 Thread Ivan L
Schema is really awesome.  Very easy to use and even though the validation 
messages are a little cryptic, I think they'll work for libraries.

My only irk with it so far is that it appears to modify the function 
prototype.  
(extend-protocol Schema  js/Function ...

Not sure why they need to extend it directly, but its modifying a core 
object prototype is considered a big no-no (just look at the backlash to 
prototype.js).

Other than that though, been loving it.


On Monday, January 27, 2014 7:43:52 AM UTC-5, Korny wrote:
>
> Parsing is easy - use either https://github.com/clojure/data.json or 
> https://github.com/dakrone/cheshire (Cheshire used to have some 
> advantages over data.json but I have the impression data.json has caught 
> up).
>
> For validation I've used Prismatic Schema - 
> https://github.com/prismatic/schema - it's good for structural 
> validation, correct data types, valid keys etc.  If you want user-friendly 
> validation failures for individual fields you might want to use something 
> more user-focused - there are quite a few validation libraries at 
> http://www.clojure-toolbox.com/ you could try.
>
> - Korny
> On 27 Jan 2014 12:17, "David Simmons" > 
> wrote:
>
>> Hi Folks.
>>
>> I'm writing a web app which receives a JSON structure. I'd like to 
>> validate that the structure is correct i.e. mandatory fields are present, 
>> and then convert into the relevant Clojure data structure. As a bonus if  a 
>> particular field in the JSON structure is incorrect I'd like to be able to 
>> define the error message generated (in a similar way I can do for 
>> noir.validation).
>>
>> Does anyone have any recommended libraries or the best way to approach 
>> this issue - I'm sure I'm not the first with this requirement.
>>
>> cheers
>>
>> Dave
>>  
>> -- 
>> -- 
>> You received this message because you are subscribed to the Google
>> Groups "Clojure" group.
>> To post to this group, send email to clo...@googlegroups.com
>> Note that posts from new members are moderated - please be patient with 
>> your first post.
>> To unsubscribe from this group, send email to
>> clojure+u...@googlegroups.com 
>> For more options, visit this group at
>> http://groups.google.com/group/clojure?hl=en
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "Clojure" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to clojure+u...@googlegroups.com .
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>  

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.