Re: how to packge lein project in a maven-style?

2014-01-06 Thread Chris Jeris
https://github.com/djpowell/lein-libdir may do what you want for assembling
dependencies.

peace, Chris Jeris


On Mon, Jan 6, 2014 at 12:33 AM, Qiu Xiafei  wrote:

>
>
> Using maven, we usually package the project in a directory with sub dirs
> like:
> bin/ # bash/python scripts
> lib/  # all jars
> conf/   # resources/configuration files
>
> And, we often use the *maven-dependency-plugin* to copy dependency jars
> and use the *maven-resources-plugin* to copy scripts and other resource
> files. But I find no alernertives in lein.
>
> Is there any lein plugin can help me about this?
>
> thanks!
>
>  --
> --
> 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.
>



-- 
Chris Jeris
cje...@brightcove.com
freenode/twitter/github: ystael

-- 
-- 
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.


Possible heisenbug in test suite (not in individual test runs) with memoization

2014-01-06 Thread David James
I've got a Clojure test suite that fails when run as whole but passes when
run piecemeal. This just started happening. I've tested the code
thoroughly. The bug pops up in a part of the code that I did not change.
So, at present, it feels like a heisenbug!

These may be some relevant pieces:
* I'm using memoization; the failures happen in memoized functions.
* I'm doing a lot of various precision BigDecimal math.

Some tentative guesses:
* Somehow one test is affecting another test

Questions (there are speculative):
* What are some possible ways that memoization might fail (e.g. return an
incorrect value)?
* Is it possible that higher memory usage could cause memoization results
to get lost?

Unfortunately, it is a sizable code base, and I don't have a small,
reproducible example. Any suggestions?

-David

-- 
-- 
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: Possible heisenbug in test suite (not in individual test runs) with memoization

2014-01-06 Thread Justin Kramer
Shot in the dark: check that arguments passed to your memoized functions 
use consistent typing. A BigDecimal such as 1M does not necessarily equal 1 
(a Long):

> (= 1 1M)
false
> (== 1 1M)
true

Your memoized functions could be recomputing values unnecessarily if you're 
giving them different types of numbers.

Justin

On Monday, January 6, 2014 12:57:49 PM UTC-5, David James wrote:
>
> I've got a Clojure test suite that fails when run as whole but passes when 
> run piecemeal. This just started happening. I've tested the code 
> thoroughly. The bug pops up in a part of the code that I did not change. 
> So, at present, it feels like a heisenbug!
>
> These may be some relevant pieces:
> * I'm using memoization; the failures happen in memoized functions.
> * I'm doing a lot of various precision BigDecimal math.
>
> Some tentative guesses:
> * Somehow one test is affecting another test
>
> Questions (there are speculative):
> * What are some possible ways that memoization might fail (e.g. return an 
> incorrect value)?
> * Is it possible that higher memory usage could cause memoization results 
> to get lost?
>
> Unfortunately, it is a sizable code base, and I don't have a small, 
> reproducible example. Any suggestions?
>
> -David
>

-- 
-- 
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: Namespaces in waiting

2014-01-06 Thread Stephen C. Gilardi

On Jan 1, 2014, at 3:26 PM, Dave Tenny  wrote:

> When I use 'lein repl' in some project context and get to the REPL prompt, 
> there's an available but as yet not ... present ... namespace, i.e. (all-ns) 
> won't list the namespace(s) created in the lein project directory tree.
> 
> Is there some API I can use to see a list these available but not active 
> namespaces?

I’m not aware of one.

> I'm guessing that looking at what's on the class path doesn't necessarily 
> tell me what namespaces might be USE-able via (use 'x).

Walking the classpath including the contents of jar files would be a way to 
construct such a list of USE-able (or REQUIRE-able) namespaces. It would 
involve  traversing the directory structure under each entry in the classpath 
and reading at least the first ns form in each candidate file (or jar entry).

—Steve

-- 
-- 
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: ClojureScript integration with Emacs/Cider ?

2014-01-06 Thread Tim Visher
Hi Alexandru,

On Sun, Jan 5, 2014 at 3:30 PM, Alexandru Nedelcu  wrote:
> I can’t get auto-completion or jumping to the definition of a function in
> Emacs, while working with ClojureScript. Is this a limitation of Emacs’
> Cider plugin?

IIUC, completing et al does not work for ClojureScript because
ClojureScript, not because of tooling. I have no idea how or if
development towards that end is going, but I believe it has something
to do with limitations of the host language which does not get my
hopes up.

If someone else knows better, please correct me, because I miss it too!

--

In Christ,

Timmy V.

http://blog.twonegatives.com/
http://five.sentenc.es/ -- Spend less time on mail

-- 
-- 
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: ClojureScript integration with Emacs/Cider ?

2014-01-06 Thread David Nolen
Limitation of tooling. ClojureScript analyzer exposes the necessary
information.

On Monday, January 6, 2014, Tim Visher wrote:

> Hi Alexandru,
>
> On Sun, Jan 5, 2014 at 3:30 PM, Alexandru Nedelcu 
> >
> wrote:
> > I can’t get auto-completion or jumping to the definition of a function in
> > Emacs, while working with ClojureScript. Is this a limitation of Emacs’
> > Cider plugin?
>
> IIUC, completing et al does not work for ClojureScript because
> ClojureScript, not because of tooling. I have no idea how or if
> development towards that end is going, but I believe it has something
> to do with limitations of the host language which does not get my
> hopes up.
>
> If someone else knows better, please correct me, because I miss it too!
>
> --
>
> In Christ,
>
> Timmy V.
>
> http://blog.twonegatives.com/
> http://five.sentenc.es/ -- Spend less time on mail
>
> --
> --
> 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.
>

-- 
-- 
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: ClojureScript integration with Emacs/Cider ?

2014-01-06 Thread Tim Visher
On Mon, Jan 6, 2014 at 3:01 PM, David Nolen  wrote:
> Limitation of tooling. ClojureScript analyzer exposes the necessary
> information.

That is seriously great to hear. I had no idea we were that far along.

--

In Christ,

Timmy V.

http://blog.twonegatives.com/
http://five.sentenc.es/ -- Spend less time on mail

-- 
-- 
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: ClojureScript integration with Emacs/Cider ?

2014-01-06 Thread Colin Fleming
Since Cursive (http://cursiveclojure.com) resolves everything statically
from source, ClojureScript completion and navigation works for most
symbols. There are still a lot that it doesn't know about since
cljs-specific functionality is still pretty low, so js/* symbols have no
support, and any functions included from Closure are not found either. But
for pure cljs it should work pretty well. There are quite a few people
using Cursive for cljs dev now, despite the slightly embarrassing lack of
explicit support :-)


On 6 January 2014 09:30, Alexandru Nedelcu  wrote:

> Hi,
>
> I can’t get auto-completion or jumping to the definition of a function in
> Emacs, while working with ClojureScript. Is this a limitation of Emacs’
> Cider  plugin?
>
> I managed to get nRepl working by using the awesome 
> com.cemerick/austinplugin for lein 
> (besides including the plugin in
> project.clj I’ve got no other special configuration). So to work with
> ClojureScript, from inside an nRepl session, I execute the following (not
> sure if this is right):
>
> (cemerick.austin.repls/exec :exec-cmds ["google-chrome"])
>
> In Emacs I do the same thing, by first starting the repl with
> cider-jack-in and then I execute the above command. Compiling the current
> buffer works (C-c C-k), I can also send expressions for evaluation to the
> repl (C-x C-e).
>
> However, as I said, auto-completion doesn’t work and neither does jumping
> to the definition of a function. Is there any way to get these features
> while working with ClojureScript in Emacs? Or maybe in another IDE?
>
> Thanks,
> --
> Alexandru Nedelcu
> www.bionicspirit.com
>
> PGP Public Key:
> https://bionicspirit.com/key.aexpk
>
> --
> --
> 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.
>

-- 
-- 
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: [ANN] data.avl 0.0.10 -- fast sorted maps and sets with log-time rank queries

2014-01-06 Thread Michał Marczyk
On 6 January 2014 00:33, Brandon Bloom  wrote:
> Michał: This is awesome. Thanks for the continued awesome work on data
> structures!
>
>>
>>   ;; if the key is not present in the collection, -1 is returned:
>>   (avl/rank-of (avl/sorted-set 3 4 5) 0)
>>   ;= -1
>
>
> Curious: Why not return nil instead of -1?

Thank you, happy to hear this might be useful!

As for rank-of's -1: the reason is as Mikera said. I wanted to be
consistent with primitive-returning Java methods like indexOf and to
be able to hint rank-of to ^long (although I haven't yet -- 0.0.11, I
guess!).

This is not the only sensible thing to do; I was thinking about maybe
adding variants of rank-of which would find the index of the "first <=
/ =>" element according to the comparator (which would still return -1
for empty collections and elements less / greater than the extreme
elements of the collection, but not for those in between a pair of
existing keys):

(rank-of-<= (avl/sorted-set 0 2 4) 3)
;= 1

(rank-of->= (avl/sorted-set 0 2 4) 3)
;= 2

(rank-of->= (avl/sorted-set 0 2 4) 2)
;= 1

Alternatively rank-of could take an optional argument to force this
behaviour; we could even use < / <= / >= / > like subseq does.

In fact, apparently there's a relevant ticket in the tracker already:
DAVL-1 [0].

It's doable right now with subseq / rsubseq:

(defn rank-of-<= [coll x]
  (if (empty? coll)
-1
(let [r (avl/rank-of coll x)]
  (if (== -1 r)
(let [s (rsubseq coll <= x)]
  (avl/rank-of coll (first s)))
r

(mapv #(rank-of-<= (avl/sorted-set 0 2 4) %) [-1 0 1 2 3 4 5])
;= [-1 0 0 1 1 2 2]

But a direct approach would no doubt be faster.

Any ideas re: possible API, comments on the usefulness of such
additions etc. would be very welcome!

Cheers,
Michał


[0] http://dev.clojure.org/jira/browse/DAVL-1


>
> --
> --
> 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.

-- 
-- 
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: ANN: Om, a ClojureScript binding to Facebook's React

2014-01-06 Thread Curtis Gagliardi
I watched a few talks from facebook people about React and was impressed, 
lots of talk about the simplicity of just rerendering everything and pure 
functions.  I think this is the first time I've been excited about a 
javascript framework, looking forward to trying it out with Om. 

On Sunday, January 5, 2014 9:05:06 PM UTC-8, David Pidcock wrote:
>
> Ha! Just saw your Sortable example popup in Git! 
>
> Very cool. 
>
>
>
> On Thursday, January 2, 2014 4:00:45 PM UTC-8, David Pidcock wrote: 
> > Very nice. Relatively easy to follow.  Basically it's re-implementing 
> the drag-list behaviour  in React.  I had thought to re-use some existing 
> code, provided I could inform React that the DOM was changing. (This is the 
> approach used by the example in the fiddler, albeit with jquery instead of 
> goog.closure as the UI manipulation library) 
> > 
> > 
> > I'm very interested to see what you do with this, in Om. 
> > This example is complex enough that following along would most likely 
> fill in the conceptual gaps for me, that the TODO example lacks. 
> > 
> > 
> > Again - inspiring work..  
> > 
> > 
> > -- David 
> > 
> > 
> > On Monday, December 30, 2013 10:02:37 PM UTC-8, David Nolen wrote: 
> > 
> > From a React dev: 
> > 
> > https://www.khanacademy.org/preview/content/items/xfa03b103 
> > 
> > 
> https://github.com/Khan/perseus/blob/master/src/widgets/orderer.jsx#L6-L439 
> > 
> > 
> > 
> > 
> > I'm sure this can be adapted for Om. I may write up a simpler Om example 
> in the future. 
> > 
> > 
> > David 
> > 
> > 
> > 
> > On Tue, Dec 31, 2013 at 12:43 AM, David Pidcock  
> wrote: 
> > 
> > 
> > On Thursday, December 19, 2013 11:12:12 AM UTC-8, David Nolen wrote: 
> > 
> > > Enjoy, 
> http://swannodette.github.io/2013/12/17/the-future-of-javascript-mvcs/ 
> > 
> > > 
> > 
> > > 
> > 
> > > 
> > 
> > > David 
> > 
> > 
> > 
> > I've been playing around with some basics. I'm still a relative n00b 
> when it comes to functional programming, and I've never looked at React 
> before. 
> > 
> > 
> > 
> > Very cool stuff. 
> > 
> > 
> > 
> > I managed to get Om+React to display a list of items that are sorted by 
> a given key, and I have a content-editable span which updates the state of 
> the owner with new value of that key for a given item, and voila! the list 
> item moves to the correct position. (as expected) 
> > 
> > 
> > 
> > 
> > Now here's the tricky part... 
> > 
> > I want to implement a drag-list, where I can drag-drop items into a new 
> position, and update the key based on the new position. I have that 
> algorithm working in a different project (using goog.DragListGroup) , but 
> React does not like you to manipulate the DOM outside it's knowledge. 
> > 
> > 
> > 
> > 
> > I found this : 
> > 
> > 
> https://groups.google.com/forum/#!searchin/reactjs/sortable/reactjs/mHfBGI3Qwz4/rXSr-1QUcKwJ
>  
> > 
> > 
> > 
> > which lead to 
> > 
> > http://jsfiddle.net/LQxy7/ 
> > 
> > 
> > 
> > Unfortunately,  I can't get this to work with Om. I am having trouble 
> navigating the data structures. 
> > 
> > 
> > 
> > How are "props" created/accessed? I followed the TodoMVC example, but 
> that seems to be using "state", which I am given to understand should be 
> kept as high in the hierarchy as possible (per the React recommendations). 
>  I tried something like  (:value (om/get-props this)) from within IRender, 
> but that doesn't work. Also : (om/get-props this [:items] )  (following the 
> idiom established by get-state. 
> > 
> > 
> > 
> > 
> > I'm probably missing something obvious, so I thought I'd pop in here to 
> see if there's someone who can point me in the right direction. 
> > 
> > 
> > 
> > 
> > 
> > -- 
> > 
> > 
> > -- 
> > 
> > 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 bec

Re: Possible heisenbug in test suite (not in individual test runs) with memoization

2014-01-06 Thread Cedric Greevey
It's possibly an interaction between memoization and dynamic vars; more
specifically, a result might be being memoized with one with-precision
context active, and then recalled with a different one active, with
arguments that compare equal despite the different precisions (say, because
those arguments that are BigDecimals are exactly representable at the lower
of the two precisions). If the result is *not* the same at the higher
precision, that could cause an expected-equal check to fail in your test.

I'd also wonder at possibly having a test work if it used a memoized result
generated earlier with a finite precision in effect, and fail with
ArithmeticException without the memoization if the test doesn't set a
precision limit itself and the result's not exactly representable at any
finite precision (e.g. 1/7); but this would likely result in a test that
worked in the suite and failed in isolation, instead of the reverse.
However, if high memory use is causing a memoized value computed at limited
precision to be "forgotten" and then recalculated with no precision limit,
that might trigger failures in the suite of tests that worked in isolation.

In any event, subtle interaction of with-precision's underlying dynamic var
*math-context* with memoization is an obvious suspect worth investigating,
even if it might ultimately be acquitted by the jury. :)



On Mon, Jan 6, 2014 at 1:21 PM, Justin Kramer  wrote:

> Shot in the dark: check that arguments passed to your memoized functions
> use consistent typing. A BigDecimal such as 1M does not necessarily equal 1
> (a Long):
>
> > (= 1 1M)
> false
> > (== 1 1M)
> true
>
> Your memoized functions could be recomputing values unnecessarily if
> you're giving them different types of numbers.
>
> Justin
>
>
> On Monday, January 6, 2014 12:57:49 PM UTC-5, David James wrote:
>>
>> I've got a Clojure test suite that fails when run as whole but passes
>> when run piecemeal. This just started happening. I've tested the code
>> thoroughly. The bug pops up in a part of the code that I did not change.
>> So, at present, it feels like a heisenbug!
>>
>> These may be some relevant pieces:
>> * I'm using memoization; the failures happen in memoized functions.
>> * I'm doing a lot of various precision BigDecimal math.
>>
>> Some tentative guesses:
>> * Somehow one test is affecting another test
>>
>> Questions (there are speculative):
>> * What are some possible ways that memoization might fail (e.g. return an
>> incorrect value)?
>> * Is it possible that higher memory usage could cause memoization results
>> to get lost?
>>
>> Unfortunately, it is a sizable code base, and I don't have a small,
>> reproducible example. Any suggestions?
>>
>> -David
>>
>  --
> --
> 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.
>

-- 
-- 
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: how to packge lein project in a maven-style?

2014-01-06 Thread Qiu Xiafei
yes, lein-libdir help copy depencencies, maybe i have to copy other
resource files by hand.


On Tue, Jan 7, 2014 at 12:34 AM, Chris Jeris  wrote:

> https://github.com/djpowell/lein-libdir may do what you want for
> assembling dependencies.
>
> peace, Chris Jeris
>
>
> On Mon, Jan 6, 2014 at 12:33 AM, Qiu Xiafei  wrote:
>
>>
>>
>> Using maven, we usually package the project in a directory with sub dirs
>> like:
>> bin/ # bash/python scripts
>> lib/  # all jars
>> conf/   # resources/configuration files
>>
>> And, we often use the *maven-dependency-plugin* to copy dependency jars
>> and use the *maven-resources-plugin* to copy scripts and other resource
>> files. But I find no alernertives in lein.
>>
>> Is there any lein plugin can help me about this?
>>
>> thanks!
>>
>>  --
>> --
>> 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.
>>
>
>
>
> --
> Chris Jeris
> cje...@brightcove.com
> freenode/twitter/github: ystael
>
> --
> --
> 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.
>

-- 
-- 
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: Cute Clojure tricks

2014-01-06 Thread curiousGuy
This is extremely disappointing, that the flag must change when the U.S. 
takes over all of North America. I suspect that this issue on flag design 
will be the likely reason that this never happens.

On Monday, January 6, 2014 1:02:29 PM UTC+8, Cedric Greevey wrote:
>
> How many states can the US have and keep a flag with a reasonably close to 
> square arrangement of stars like it currently has?
>
> (take-while #(<= % 100)
>   (sort
> (distinct
>   (for [m (range 3 20)
> n (range (int (* m 3/4)) (inc m))]
> (- (* 2 m n) m n -1)
>
> (8 13 18 23 25 32 39 41 50 59 61 72 83 85 94 98)
>
> The next close-to-squarish possibility is 59 states. The stars would be a 
> 7x5 grid with a superposed 6x4 grid, versus the present 6x5 and 5x4. But 
> just two states after that it could be exactly square, with 6x6 and 5x5 
> arrays. :)
>
> Also: the flag would have to change if the US annexed either of its large 
> neighbors. Canada has 13 internal divisions which would become new states, 
> but 63 is not a solution. Mexico's 31 internal states would give the US 81 
> in total, but that is not a solution either. Both miss solutions by 2, but 
> in opposite directions. Mexico, plus graduating Puerto Rico and the U.S. 
> Virgin Islands to full statehood, would give 83, allowing a flag with 8x6 
> and 7x5 arrays of stars. (Of course, the GOP would never stand for anything 
> like this that would make such a large fraction of US voters Latino.)
>  

-- 
-- 
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: ANN: Om, a ClojureScript binding to Facebook's React

2014-01-06 Thread David Nolen
The sortable example in the repo is now relatively baked. I'm happy to see
React can handle interactive UIs so well.

On Monday, January 6, 2014, David Pidcock wrote:

> Ha! Just saw your Sortable example popup in Git!
>
> Very cool.
>
>
>
> On Thursday, January 2, 2014 4:00:45 PM UTC-8, David Pidcock wrote:
> > Very nice. Relatively easy to follow.  Basically it's re-implementing
> the drag-list behaviour  in React.  I had thought to re-use some existing
> code, provided I could inform React that the DOM was changing. (This is the
> approach used by the example in the fiddler, albeit with jquery instead of
> goog.closure as the UI manipulation library)
> >
> >
> > I'm very interested to see what you do with this, in Om.
> > This example is complex enough that following along would most likely
> fill in the conceptual gaps for me, that the TODO example lacks.
> >
> >
> > Again - inspiring work..
> >
> >
> > -- David
> >
> >
> > On Monday, December 30, 2013 10:02:37 PM UTC-8, David Nolen wrote:
> >
> > From a React dev:
> >
> > https://www.khanacademy.org/preview/content/items/xfa03b103
> >
> >
> https://github.com/Khan/perseus/blob/master/src/widgets/orderer.jsx#L6-L439
> >
> >
> >
> >
> > I'm sure this can be adapted for Om. I may write up a simpler Om example
> in the future.
> >
> >
> > David
> >
> >
> >
> > On Tue, Dec 31, 2013 at 12:43 AM, David Pidcock 
> wrote:
> >
> >
> > On Thursday, December 19, 2013 11:12:12 AM UTC-8, David Nolen wrote:
> >
> > > Enjoy,
> http://swannodette.github.io/2013/12/17/the-future-of-javascript-mvcs/
> >
> > >
> >
> > >
> >
> > >
> >
> > > David
> >
> >
> >
> > I've been playing around with some basics. I'm still a relative n00b
> when it comes to functional programming, and I've never looked at React
> before.
> >
> >
> >
> > Very cool stuff.
> >
> >
> >
> > I managed to get Om+React to display a list of items that are sorted by
> a given key, and I have a content-editable span which updates the state of
> the owner with new value of that key for a given item, and voila! the list
> item moves to the correct position. (as expected)
> >
> >
> >
> >
> > Now here's the tricky part...
> >
> > I want to implement a drag-list, where I can drag-drop items into a new
> position, and update the key based on the new position. I have that
> algorithm working in a different project (using goog.DragListGroup) , but
> React does not like you to manipulate the DOM outside it's knowledge.
> >
> >
> >
> >
> > I found this :
> >
> >
> https://groups.google.com/forum/#!searchin/reactjs/sortable/reactjs/mHfBGI3Qwz4/rXSr-1QUcKwJ
> >
> >
> >
> > which lead to
> >
> > http://jsfiddle.net/LQxy7/
> >
> >
> >
> > Unfortunately,  I can't get this to work with Om. I am having trouble
> navigating the data structures.
> >
> >
> >
> > How are "props" created/accessed? I followed the TodoMVC example, but
> that seems to be using "state", which I am given to understand should be
> kept as high in the hierarchy as possible (per the React recommendations).
>  I tried something like  (:value (om/get-props this)) from within IRender,
> but that doesn't work. Also : (om/get-props this [:items] )  (following the
> idiom established by get-state.
> >
> >
> >
> >
> > I'm probably missing something obvious, so I thought I'd pop in here to
> see if there's someone who can point me in the right direction.
> >
> >
> >
> >
> >
> > --
> >
> >
> > --
> >
> > 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
> >
> >

-- 
-- 
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.


Perl Regexp::Grammars in Clojure?

2014-01-06 Thread gvim
I'm fairly new to Clojure, having spent many years working with Perl. 
One area where Perl has always shone is regular expressions and text 
parsing. Perl 6 took this one step further with grammars and the genius 
that is Damian Conway managed to port Perl 6 grammars to Perl 5:


http://search.cpan.org/~dconway/Regexp-Grammars-1.033/lib/Regexp/Grammars.pm

I'm just wondering what a Clojure version of Regexp::Grammars would look 
like :). Anyone up for the challenge?


gvim


--
--
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: Perl Regexp::Grammars in Clojure?

2014-01-06 Thread Andy Fingerhut
Mark Engelberg's Instaparse most likely does not have the same feature set
as Regexp::Grammars (I haven't checked in enough detail to learn the
differences), but they do likely have features in common:

https://github.com/Engelberg/instaparse

Andy


On Mon, Jan 6, 2014 at 9:04 PM, gvim  wrote:

> I'm fairly new to Clojure, having spent many years working with Perl. One
> area where Perl has always shone is regular expressions and text parsing.
> Perl 6 took this one step further with grammars and the genius that is
> Damian Conway managed to port Perl 6 grammars to Perl 5:
>
> http://search.cpan.org/~dconway/Regexp-Grammars-1.033/
> lib/Regexp/Grammars.pm
>
> I'm just wondering what a Clojure version of Regexp::Grammars would look
> like :). Anyone up for the challenge?
>
> gvim
>
>
> --
> --
> 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.
>

-- 
-- 
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: ClojureScript integration with Emacs/Cider ?

2014-01-06 Thread Bozhidar Batsov
I'm cider's maintainer. The problem with code completion for ClojureScript 
is that the default mechanism is based on the Clojure-only 
library https://github.com/ninjudd/clojure-complete. As I don't use 
ClojureScript I haven't paid much attention to it so far. If there is a 
similar library for ClojureScript I might add support for it. Btw, cider 
will also pick up any nREPL middleware that provides a "complete" op - if 
there is a ClojureScript nREPL completion middleware it can be used with 
cider even now. Ideally at some point we'll have unified middleware 
supporting both Clojure & ClojureScript.

On Sunday, January 5, 2014 10:30:44 PM UTC+2, Alexandru Nedelcu wrote:
>
> Hi,
>
> I can’t get auto-completion or jumping to the definition of a function in 
> Emacs, while working with ClojureScript. Is this a limitation of Emacs’ 
> Cider  plugin?
>
> I managed to get nRepl working by using the awesome 
> com.cemerick/austinplugin for lein 
> (besides including the plugin in 
> project.clj I’ve got no other special configuration). So to work with 
> ClojureScript, from inside an nRepl session, I execute the following (not 
> sure if this is right):
>
> (cemerick.austin.repls/exec :exec-cmds ["google-chrome"])
>
> In Emacs I do the same thing, by first starting the repl with 
> cider-jack-in and then I execute the above command. Compiling the current 
> buffer works (C-c C-k), I can also send expressions for evaluation to the 
> repl (C-x C-e).
>
> However, as I said, auto-completion doesn’t work and neither does jumping 
> to the definition of a function. Is there any way to get these features 
> while working with ClojureScript in Emacs? Or maybe in another IDE?
>
> Thanks,
> -- 
> Alexandru Nedelcu
> www.bionicspirit.com
>
> PGP Public Key:
> https://bionicspirit.com/key.aexpk 
>

-- 
-- 
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.