Instaparse - thank you!

2014-06-10 Thread Sean Corfield
I just wanted to post a public "Thank You!" to Mark Engelberg for his 
Instaparse library.

https://github.com/Engelberg/instaparse

We are just starting to use this at World Singles so that we can provide a 
"natural language" interface to our search engine, allowing our internal 
support folks to create custom queries without needing some complex cascading 
drop-down-filled UI to define complex queries. The ability to provide an 
English-like DSL for an otherwise very complex part of our business is a huge 
benefit!

I started playing with Instaparse just yesterday morning and we have a working 
proof of concept up on QA today - Instaparse is an amazing tool!

Sean Corfield -- http://clojurebridge.org

"ClojureBridge aims to increase diversity within the Clojure community by
 offering free, beginner-friendly Clojure programming workshops for women."



signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: Newbie needs help: Unable to resolve symbol....

2014-06-10 Thread Bill Cohagan
I figured out the problem.  Although the article fails to mention the need 
for modifying the (ns ...) form to reflect the *quil* dependency, the code 
available for download has the needed change.  Now I'm on to the next 
error, this time using the downloaded code.  I'll spend a bit more time 
trying to figure out that one before posting here.

On Tuesday, June 10, 2014 1:01:50 PM UTC-5, Bill Cohagan wrote:
>
> I'm a LightTable/Clojure newbie and am trying to work through the workflow 
> article 
> 
>  to 
> better understand how to actually develop code. I'm getting a compilation 
> error in the *draw-pendulum* function definition complaining: "Unable to 
> resolve symbol: frame-count..." I'm guessing this is bound in the *quil  
> *dependency 
> -- or supposed to be.  I've added that dependency to my project.clj file:
>
>  *:dependencies [[org.clojure/clojure "1.5.1"]*
> * [org.clojars.aperiodic/quil "1.6.0"] *
>
> as instructed in the article, but I must be missing something.
>
> The article instructs to "disconnect" (from the REPL?), then to 
> "re-evaluate the namespace". I was able to find how to disconnect and 
> simply guessed that the "re-evaluate" was to hit CTRL-SHIFT-ENTER to 
> evaluate everything in the file. Unfortunately I get the error described 
> above when I do this.
>
> I'd appreciate any help or pointers or explanations as to what's going on. 
> Feeling a bit lost at the moment!
>
> Bill 
>

-- 
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: Clojure Contributor Agreement process update

2014-06-10 Thread Atamert Ölçgen
Excuse my ignorance. But from what I've read, it all seems fair game.
Essentially contributors are assigning the same rights they have to
project's creator, no? What exactly feels wrong to you?


On Tue, Jun 10, 2014 at 8:35 PM, Sergey Didenko 
wrote:

> Sorry if that was already answered,
>
> Is there a possibility to get rid of this legalwall?
>
> I realize that there are good intents behind the existing practice, but it
> feels a bit wrong for an open source artifact in the digital age of instant
> sharing.
>
>
>
>
> > Starting today, we have updated the Clojure Contributor Agreement
>>> process.
>>>
>>
>  --
> 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.
>



-- 
Kind Regards,
Atamert Ölçgen

-+-
--+
+++

www.muhuk.com

-- 
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: [RFC] Roundtripping namespaced xml documents for data.xml

2014-06-10 Thread Herwig Hochleitner
Hi Paul,

2014-06-06 17:28 GMT+02:00 Paul Gearon :
>
> I've split up the namespace pretty much the same way that you did (since I
> totally agreed with that). To that end I ought to put your name down as the
> author, though I typically end up changing things in each file, so it's got
> my mark on it too. Is the standard for the namespace :author tag to use a
> comma separated string?
>

I'm not aware of any convention here. To me it's also fine if you just put
your name.


> Parsing goes to the representation tier, which is compatible with the
> existing clojure.data.xml output. As mentioned before, the changes are a
> new namespaces field, and metadata to hold the contextual namespaces (so
> it's invisible to printing, equality, etc). For the test data I've used,
> emitting the representation tier generates the original XML (with new
> formatting).
>

OK, I don't think that adding a separate namespaces field is compatible
with existing output, but it's a change that makes sense in a certain light.
I would still oppose that change, in case it should be proposed.

This data format contains each of the elements of your infoset
> representation. So your model tier example in the design doc of:
>
>
> Maps to your representation of infosec:
>
> {:tag ::dav/propfind :attrs {} :in-scope {"D" "DAV:" "xml" ""}
> :namespace-attrs {::xmlns/D "DAV:"}}
>
> Whereas my code represents the same data with:
>
> (with-meta
>  {:tag :D/propfind :attrs {} :namespaces {"D" "DAV:"} :content ()}
>  {:xml "http://www.w3.org/XML/1998/namespace"})
>
> So it's the same info, but represented differently.
>

My proposed model tier would be leaning on xpath, because it fits with
clojure.core/=. So that would be:

(with-meta
  {:tag #xml/name "{DAV:}propfind" :attrs {} :content ()}
  {:clojure.data.xml/namespaces (xml/to-ns {"D" "DAV:"})}) ;; xml and xmlns
prefixes are added by to-ns

I don't intend to implement the infoset or the dom representation at all,
sorry that the design page is unclear on that.

The ::dav/propfind convention is convenience for notation, it doesn't
interact well with equality, so there would be a special version of =
and/or a converter.

I'm sure that you are aware that your proposed representation doesn't work
with clojure.core/=, so I'm not going to dissect the issues there.
Let me add that people might want to store arbitrary metadata on parsed
xml, so using a namespaced key there is prudent.

I've also implemented a resolve-xml function (I'd have liked "resolve", but
> I hate reusing names that appear in clojure.core). When applied to data in
> the representation tier it generates a version of the model tier. This uses
> QNames for tags and attributes. They are still QNames even when they do not
> have a namespace, since QNames support this. This transformation was easy,
> as it just applied the namespace info to the keywords in the representation
> tier. I was expecting to create a new Element type to represent the model
> tier, but in the end I didn't see the need, since the existing types do
> everything needed for the model tier as well. The main reason I can think
> of to create a new element type for the model tier would be for a tree
> walker to be able to use protocol dispatch on the element and not the
> contents of the element.
>

Cool, maybe I can steal your converter? I have only implemented parsing
directly to model tier, for now.

- a function to go from the model tier to the representation tier. I hope
> to do this soon.
>

So, basically a prefix-assigner for model tier


> - graceful handling of un-mapped prefixes
>

I'm still thinking hard about erroring out in this case, as StAX does, IIRC


>  - handling a default prefix (the pseudo-raw section of the design
> document)
>

I think that this can be modeled as the empty prefix.


> - The QName reader
>

I've already written that, I'm just not sure how to deploy it in a contrib
project.

Thanks for following up on this, I'll make sure and ping you, before I get
back to my version.

cheers

-- 
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: solving an equation for all solutions with constraints: core.logic.fd

2014-06-10 Thread Alex Engelberg
It doesn't totally make sense to me that you would have integer variables
with real coefficients. If the coefficients are irrational and are not
scaled versions of each other, then the problem is impossible. Otherwise,
you can just scale them by a common factor and make them integers. For
instance, you could turn 3.x + 2.y = 8.4 into 28x + 20y = 76.

--Alex


On Tue, Jun 10, 2014 at 2:30 PM, cej38  wrote:

> I picked a toy problem that was really easy to solve, figuring that once I
> had the idea down, I would be able to easily change the equation to the one
> that I am interested in solving.  In moving to my real problem I hit the
> next snag I can't use real numbers within the equation.  I note that the
> equation hasn't changed, the values of x and y are still non-negative
> integers.
>
> (run* [q]
>   (fresh [x y]
> (fd/in x y (fd/interval 0 9))
> (fd/eq
>   (= (+ (* x 3.) (* y 2.)) 8.))
> (== q [x y])))
>
> In my real problem I expect that I could have something like
>
> (run* [q]
>   (fresh [x y]
> (fd/in x y (fd/interval 0 9))
> (fd/eq
>   (= (+ (* x 3.) (* y 2.)) 8.))
> (== q [x y])))
>
> Is there away to do this?
>
>  --
> 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 a topic in the
> Google Groups "Clojure" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/clojure/hje351kbvJA/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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: Clojure Contributor Agreement process update

2014-06-10 Thread Luc Prefontaine
 What about the real world
constraints ?

As far as I know, everyone needs
air, water, heat, and a minimal food 
ration to survive.

The day I cut your air away, I bet
you'll be suddenly be very concerned
about the 'the physical world' and
that you will relinquish the 
'digital age' way back in some
remote primitive place in your brain :)

Ok, lawyers are not as vital as air,
however they flourish on litigation
systems like some plants in dump
yards.

The day you are stuck in a lawsuit
or the day someone steals something
you have created and you have not
cared about these 'real' things you 
are left alone on an ice bank, plenty 
of air I agree but seldom provided
with a grocery store and a Starbuck...

Contrary to popular belief, sharing does not imply that you
allow others to steal your ideas so
they can make $ out of them or claim
that it's now their own
and that you should get lost.

I hope you stay anchored in the
real world :)))

Luc P.

> Sorry if that was already answered,
> 
> Is there a possibility to get rid of this legalwall?
> 
> I realize that there are good intents behind the existing practice, but it
> feels a bit wrong for an open source artifact in the digital age of instant
> sharing.
> 
> 
> 
> > Starting today, we have updated the Clojure Contributor Agreement
> >> process.
> >>
> >
> 
> -- 
> 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.
> 
--
Luc Prefontaine sent by ibisMail!

-- 
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: destructuring let and for

2014-06-10 Thread Paul Gearon
Hi Francesco,

I apologize for using "for" earlier, as I did not explain how you should be
using it. The comment of "do something with rel" should have indicated that
it resolved to an expression, and those expressions would be returned in a
seq (the "for" expression resolves to have a value of a seq).

Given your last example, I could read it a couple of ways. My first
interpretation is that you just need a way to convert names to nodes, and
then to connect all the nodes. My preference would be to separate these
steps, so the conversion would be done with:

(map convert-to-node list-of-names)

The result of this is then looped through to create the relations (as in my
previous example, the relations are both ways, and not reflexive):

(let [nodes (map convert-to-node list-of-names)]
  (for [node1 nodes, node2 nodes :when (not= node1 node2)]
(nrl/create conn page1 page2 :links)))

This creates a seq of all the relations, in both directions. So one
relationship will be [Jupiter->Pluto] and another will be [Pluto->Jupiter].
To create one-way relationships, I suggest the use of indexes, as in my
previous post.

However, when I followed your link to the example data, I see that there
are connections between some nodes and not others. In that case it would be
preferable to create a mapping of names to nodes, and then as the
relationships are required those nodes can be found easily:

(def create-nodemap [names]
  (zipmap names (map convert-to-node names)))

Now you can grab the nodes as needed to work with them:

(defn connect [nodemap name1 name2]
  (nrl/create conn (nodemap name1) (nodemap name2 :link)))

(let [nodemap (create-nodemap ["jupiter" "hercules" "neptune" "pluto"])]
  (connect nodemap "jupiter" "hercules" :link)
  (connect nodemap "jupiter" "neptune" :link)
  (connect nodemap "jupiter" "pluto" :link)
  (connect nodemap "neptune" "pluto" :link))

I am avoiding many tricks here that I'd use in reality, to avoid making it
too obscure.

Note that the above has links between Juptier, Neptune and Pluto, but
Hercules is only linked to Jupiter. So we don't have everything connected
to everything else. However, this approach is only useful in simple
examples like this, since any real data set would be too large to write
code for every connection. Instead, the actual data (coming from a csv
file, or something) would be read and used to create the connections.

What does your original data look like? Are you just trying to re-create
the graph you linked to, or is the data available in some structured format?

Paul



On Tue, Jun 10, 2014 at 4:08 PM, Francesco Lunelli <
francesco.lune...@gmail.com> wrote:

> Thanks for the answer.
> If I understand well your code it's a partial answer to my question
> because if I'm not wrong it creates a link between to elements at a time.
> What I need is to create all the elements then create on them every kind of
> relation.
> I take as example a graph db used in another engine
> https://raw.githubusercontent.com/wiki/thinkaurelius/titan/images/graph-of-the-gods-2.png
> Here you have a graph of Roman gods, with the name of the gods and the
> links among them. So if I have for example a list of the names of Roman
> gods I need to create all the nodes, then connect them in various mode.
> I want to take the list '("jupiter" "saturn" "hercules" "neptune" "pluto"
> ...) and cycling on it I want to creare the nodes. When I finished to
> create them I need to be able to call every node to crete the various links
> among them. For example I need to link jupiter with pluto, jupiter with
> neptun, neptun with pluto and so on.
>
> Thanks
>
> Francesco
>
>
> On Tuesday, June 10, 2014 7:43:21 PM UTC+2, Paul G wrote:
>
>> Hi Francesco,
>>
>> You want to decouple your code from the data that it is operating on, so
>> your code can operate regardless of the contents of the list. Otherwise,
>> you'll need code that matches the list, in which case it could all be code
>> anyway. Operating on arbitrary lists makes it easy to test simple examples
>> too.
>>
>> A simple way to create links between pages might be like this (assuming
>> that conn is in scope and initialized):
>>
>> (for [list-elt1 the-list, list-elt2 the-list :when (not= list-elt1
>> list-elt2)]
>>   (let [page1 (page-fn list-elt1)
>> page2 (page-fn list-elt2)
>> rel (nrl/create conn page1 page2 :links)]
>>   ;; do something with rel
>>   ))
>>
>> This creates links both ways.
>>
>> If you only want one-way links then the first approach that comes to mind
>> (there are others, and they're probably better) is to index through the seq:
>>
>> (for [n (range (count the-list)), m (range (inc n) (count the-list))]
>>   (let [page1 (page-fn (nth the-list n))
>> page2 (page-fn (nth the-list m))
>> rel (nrl/create conn page1 page2 :links)]
>>   ;; do something with rel
>>   ))
>>
>> The general idea here is to use an arbitrary var to represent your list
>> elements and pages.
>>
>> Does this address y

Re: solving an equation for all solutions with constraints: core.logic.fd

2014-06-10 Thread cej38
I picked a toy problem that was really easy to solve, figuring that once I 
had the idea down, I would be able to easily change the equation to the one 
that I am interested in solving.  In moving to my real problem I hit the 
next snag I can't use real numbers within the equation.  I note that the 
equation hasn't changed, the values of x and y are still non-negative 
integers.

(run* [q]
  (fresh [x y]
(fd/in x y (fd/interval 0 9))
(fd/eq
  (= (+ (* x 3.) (* y 2.)) 8.))
(== q [x y])))

In my real problem I expect that I could have something like 

(run* [q]
  (fresh [x y]
(fd/in x y (fd/interval 0 9))
(fd/eq
  (= (+ (* x 3.) (* y 2.)) 8.))
(== q [x y])))

Is there away to do this?

-- 
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: Clojure Contributor Agreement process update

2014-06-10 Thread Timothy Baldridge
Welcome to the "real world", where programmer ideals are often overridden
by the concerns of lawyers. That's what it comes down to, you have to do it
this way in the US (and other places) or risk legal issues.

https://www.clahub.com/pages/why_cla

Timothy


On Tue, Jun 10, 2014 at 2:35 PM, Sergey Didenko 
wrote:

> Sorry if that was already answered,
>
> Is there a possibility to get rid of this legalwall?
>
> I realize that there are good intents behind the existing practice, but it
> feels a bit wrong for an open source artifact in the digital age of instant
> sharing.
>
>
>
>
> > Starting today, we have updated the Clojure Contributor Agreement
>>> process.
>>>
>>
>  --
> 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.
>



-- 
“One of the main causes of the fall of the Roman Empire was that–lacking
zero–they had no way to indicate successful termination of their C
programs.”
(Robert Firth)

-- 
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: Clojure Contributor Agreement process update

2014-06-10 Thread Sergey Didenko
Sorry if that was already answered,

Is there a possibility to get rid of this legalwall?

I realize that there are good intents behind the existing practice, but it
feels a bit wrong for an open source artifact in the digital age of instant
sharing.



> Starting today, we have updated the Clojure Contributor Agreement
>> process.
>>
>

-- 
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: destructuring let and for

2014-06-10 Thread Francesco Lunelli
Thanks for the answer.
If I understand well your code it's a partial answer to my question because 
if I'm not wrong it creates a link between to elements at a time. What I 
need is to create all the elements then create on them every kind of 
relation.
I take as example a graph db used in another 
engine 
https://raw.githubusercontent.com/wiki/thinkaurelius/titan/images/graph-of-the-gods-2.png
Here you have a graph of Roman gods, with the name of the gods and the 
links among them. So if I have for example a list of the names of Roman 
gods I need to create all the nodes, then connect them in various mode.
I want to take the list '("jupiter" "saturn" "hercules" "neptune" "pluto" 
...) and cycling on it I want to creare the nodes. When I finished to 
create them I need to be able to call every node to crete the various links 
among them. For example I need to link jupiter with pluto, jupiter with 
neptun, neptun with pluto and so on.

Thanks

Francesco 


On Tuesday, June 10, 2014 7:43:21 PM UTC+2, Paul G wrote:
>
> Hi Francesco,
>
> You want to decouple your code from the data that it is operating on, so 
> your code can operate regardless of the contents of the list. Otherwise, 
> you'll need code that matches the list, in which case it could all be code 
> anyway. Operating on arbitrary lists makes it easy to test simple examples 
> too.
>
> A simple way to create links between pages might be like this (assuming 
> that conn is in scope and initialized):
>
> (for [list-elt1 the-list, list-elt2 the-list :when (not= list-elt1 
> list-elt2)]
>   (let [page1 (page-fn list-elt1)
> page2 (page-fn list-elt2)
> rel (nrl/create conn page1 page2 :links)]
>   ;; do something with rel
>   ))
>
> This creates links both ways.
>
> If you only want one-way links then the first approach that comes to mind 
> (there are others, and they're probably better) is to index through the seq:
>
> (for [n (range (count the-list)), m (range (inc n) (count the-list))]
>   (let [page1 (page-fn (nth the-list n))
> page2 (page-fn (nth the-list m))
> rel (nrl/create conn page1 page2 :links)]
>   ;; do something with rel
>   ))
>
> The general idea here is to use an arbitrary var to represent your list 
> elements and pages.
>
> Does this address your issue?
>
> Regards,
> Paul
>
>
>
> On Tue, Jun 10, 2014 at 1:04 PM, Francesco Lunelli  > wrote:
>
>> Thanks for the answer, I try to explain better what I have to do.
>>
>> I need to create some nodes in Neo4j then I need to create relationships 
>> between those nodes.
>>
>> This is an example taken from necons doc.
>>
>> (let [conn  (nr/connect "http://localhost:7474/db/data/";)
>> page1 (nn/create conn {:url "http://clojurewerkz.org"})
>> page2 (nn/create conn {:url "http://clojureneo4j.info"})
>> ;; a relationship that indicates that page1 links to page2
>> rel   (nrl/create conn page1 page2 :links)]
>> (println rel)))
>>
>> They create two nodes called page1 and pag2 then connect them.
>>
>> In my case I have a list of names, I want to create one node for each of 
>> them with the possibility to work on nodes after they are created.
>> So if I have for example  a list like this one (def mylist '(j"john" 
>> "paul" "mary")) I want to create three nodes calling them john paul and 
>> mary storing the value "John" "Paul" "Mary" and after having created them I 
>> want to be albe to connect nodes creating a relationship among them, with a 
>> funciont like   rel   (nrl/create conn john paul :friend)]
>>
>> I hope this example explain better my needs.
>>
>> Thanks in advance
>>
>> Francesco
>>
>>
>> On Tuesday, June 10, 2014 6:11:16 PM UTC+2, James Reeves wrote:
>>
>>> Could you explain a little more what your end goal is?
>>>
>>> It sounds like you want a map, but without knowing more about the 
>>> purpose, it's difficult to say.
>>>
>>> - James
>>>
>>>
>>> On 10 June 2014 16:43, Francesco Lunelli  wrote:
>>>
 Hello everybody, I have a newbie question about destructuring and 
 assigning and didn't find an answer in documentation or books.

 I have a list that contains an arbitrary number of elements for example 
 '("one" "two" "three" ...) I now only that elements are strings.

 I need to to take every element and use it as the name of a variable 
 inside a let and assign the result of a funcion on that element to that 
 variable.
 Somthing like this for example:

 (let [one  (clojure.string/capitalize "one")
   two (clojure.string/capitalize "two")
   three (clojure.string/capitalize "three")]
  ;; here I have access to vars one two three etc. 
   )
   
 where the names of the vars are taken from the list and values are 
 obtained applying a function on the corresponding element of the list (the 
 capitalize function il only an example, it could be everything else).

 If I do in this way 
 (for [word ["the" "

Newbie needs help: Unable to resolve symbol....

2014-06-10 Thread Bill Cohagan
I'm a LightTable/Clojure newbie and am trying to work through the workflow 
article 

 to 
better understand how to actually develop code. I'm getting a compilation 
error in the *draw-pendulum* function definition complaining: "Unable to 
resolve symbol: frame-count..." I'm guessing this is bound in the *quil  
*dependency 
-- or supposed to be.  I've added that dependency to my project.clj file:

 *:dependencies [[org.clojure/clojure "1.5.1"]*
* [org.clojars.aperiodic/quil "1.6.0"] *

as instructed in the article, but I must be missing something.

The article instructs to "disconnect" (from the REPL?), then to 
"re-evaluate the namespace". I was able to find how to disconnect and 
simply guessed that the "re-evaluate" was to hit CTRL-SHIFT-ENTER to 
evaluate everything in the file. Unfortunately I get the error described 
above when I do this.

I'd appreciate any help or pointers or explanations as to what's going on. 
Feeling a bit lost at the moment!

Bill 

-- 
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: solving an equation for all solutions with constraints: core.logic.fd

2014-06-10 Thread Alex Engelberg
I couldn't help but overhear that you're working with Constraint 
Programming, so I thought I'd suggest that you try loco 
, which is a Clojure wrapper of a Java 
library specifically designed to work with these types of problems.

The loco solution to your problem would look like this:
(use 'loco.core 'loco.constraints)
(solutions [($in :x 0 100)
($in :y 0 100)
($= ($+ ($* :x 2)
($* :y 3))
8)])
=> ({:y 0, :x 4} {:y 2, :x 1})
While loco doesn't free you from all the limitations you previously had 
(like having to specify arbitrarily large domains), it might be a better 
choice than core.logic in this case because I think it's more elegant to 
write problems, and it's much faster. (I wrote the library so I'm a bit 
biased.)

On Tuesday, June 10, 2014 8:32:33 AM UTC-7, David Nolen wrote:
>
> That's that's the suggested way - just pick a large bound. 
>
> David 
>
> On Tue, Jun 10, 2014 at 11:28 AM, cej38 > 
> wrote: 
> > I found the solution to my first problem at 
> > https://github.com/clojure/core.logic/wiki/Features (with a few small 
> > changes by me): 
> > 
> > (run* [q] 
> >   (fresh [x y] 
> > (fd/in x y (fd/interval 0 9)) 
> > (fd/eq 
> >   (= (+ (* x 3) (* y 2)) 8)) 
> > (== q [x y]))) 
> > 
> > 
> > I suppose that I could set (fd/interval 0 9) to do a fair 
> > approximation of the non-negative integers, but out of curiosity, would 
> > there be a better way of doing this? 
> > 
> > 
> > 
> > On Tuesday, June 10, 2014 11:12:11 AM UTC-4, cej38 wrote: 
> >> 
> >> I am interested in solving a simple equation for all of its solutions 
> when 
> >> some constraints are applied.  This sounds like a problem for 
> core.logic.fd. 
> >> 
> >> Let's use a toy example: 
> >> 
> >> 8 = 3*x + 2*y,  where x and y must be non-negative integers. 
> >> 
> >> Here are the possible solutions:  [x,y]= {[2,1],[0,4]}. 
> >> 
> >> 
> >> I tried something like this: 
> >> 
> >> (run* [q] 
> >>   (fresh [x y] 
> >>  (== q [x y]) 
> >>(project [x y] 
> >>   (fd/+ (* x 2) (y 3) 8 
> >> 
> >> But I get a exception: 
> >> "java.lang.ClassCastException: clojure.core.logic.LVar cannot be cast 
> to 
> >> java.lang.Number" 
> >> 
> >> So I have two questions: 
> >> 1. How should I rewrite the above command to get the solutions? 
> >> 2. Are there any good blog posts/online presentations/etc. on 
> >> core.logic.fd? 
> >> 
> >> 
> >> 
> > -- 
> > 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/d/optout. 
>

-- 
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: destructuring let and for

2014-06-10 Thread Paul Gearon
Hi Francesco,

You want to decouple your code from the data that it is operating on, so
your code can operate regardless of the contents of the list. Otherwise,
you'll need code that matches the list, in which case it could all be code
anyway. Operating on arbitrary lists makes it easy to test simple examples
too.

A simple way to create links between pages might be like this (assuming
that conn is in scope and initialized):

(for [list-elt1 the-list, list-elt2 the-list :when (not= list-elt1
list-elt2)]
  (let [page1 (page-fn list-elt1)
page2 (page-fn list-elt2)
rel (nrl/create conn page1 page2 :links)]
  ;; do something with rel
  ))

This creates links both ways.

If you only want one-way links then the first approach that comes to mind
(there are others, and they're probably better) is to index through the seq:

(for [n (range (count the-list)), m (range (inc n) (count the-list))]
  (let [page1 (page-fn (nth the-list n))
page2 (page-fn (nth the-list m))
rel (nrl/create conn page1 page2 :links)]
  ;; do something with rel
  ))

The general idea here is to use an arbitrary var to represent your list
elements and pages.

Does this address your issue?

Regards,
Paul



On Tue, Jun 10, 2014 at 1:04 PM, Francesco Lunelli <
francesco.lune...@gmail.com> wrote:

> Thanks for the answer, I try to explain better what I have to do.
>
> I need to create some nodes in Neo4j then I need to create relationships
> between those nodes.
>
> This is an example taken from necons doc.
>
> (let [conn  (nr/connect "http://localhost:7474/db/data/";)
> page1 (nn/create conn {:url "http://clojurewerkz.org"})
> page2 (nn/create conn {:url "http://clojureneo4j.info"})
> ;; a relationship that indicates that page1 links to page2
> rel   (nrl/create conn page1 page2 :links)]
> (println rel)))
>
> They create two nodes called page1 and pag2 then connect them.
>
> In my case I have a list of names, I want to create one node for each of
> them with the possibility to work on nodes after they are created.
> So if I have for example  a list like this one (def mylist '(j"john"
> "paul" "mary")) I want to create three nodes calling them john paul and
> mary storing the value "John" "Paul" "Mary" and after having created them I
> want to be albe to connect nodes creating a relationship among them, with a
> funciont like   rel   (nrl/create conn john paul :friend)]
>
> I hope this example explain better my needs.
>
> Thanks in advance
>
> Francesco
>
>
> On Tuesday, June 10, 2014 6:11:16 PM UTC+2, James Reeves wrote:
>
>> Could you explain a little more what your end goal is?
>>
>> It sounds like you want a map, but without knowing more about the
>> purpose, it's difficult to say.
>>
>> - James
>>
>>
>> On 10 June 2014 16:43, Francesco Lunelli  wrote:
>>
>>> Hello everybody, I have a newbie question about destructuring and
>>> assigning and didn't find an answer in documentation or books.
>>>
>>> I have a list that contains an arbitrary number of elements for example
>>> '("one" "two" "three" ...) I now only that elements are strings.
>>>
>>> I need to to take every element and use it as the name of a variable
>>> inside a let and assign the result of a funcion on that element to that
>>> variable.
>>> Somthing like this for example:
>>>
>>> (let [one  (clojure.string/capitalize "one")
>>>   two (clojure.string/capitalize "two")
>>>   three (clojure.string/capitalize "three")]
>>>  ;; here I have access to vars one two three etc.
>>>   )
>>>
>>> where the names of the vars are taken from the list and values are
>>> obtained applying a function on the corresponding element of the list (the
>>> capitalize function il only an example, it could be everything else).
>>>
>>> If I do in this way
>>> (for [word ["the" "quick" "brown" "fox"]] (let [word
>>> (clojure.string/capitalize word)] (prn word)))
>>> it works, but I need to access the variables outside of the cycle for,
>>> after having defined and assigned everyone because I need to put in
>>> relation some of them.
>>>
>>> Thanks to everybody
>>>
>>> Francesco
>>>
>>>
>>>
>>>  --
>>> 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/d/optout.
>>>
>>
>>  --
> You received this message because you are subscribed to the Google
> Groups "Clojure" gro

Looking to pair to help expedite my learning

2014-06-10 Thread Henry Ventura
In a similar vein to Nelson Morris 
 (his 
availability is booked), I'd like to pair with someone to help get my foot 
further in the door than it already is. I have a couple months of 
experience under me. I'd love to help with whatever project you might be 
working on. A project of my own is integrating TeamworkPM 
 with Google Calendars.

Cheers.

-- 
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: destructuring let and for

2014-06-10 Thread Francesco Lunelli
Thanks for the answer, I try to explain better what I have to do.

I need to create some nodes in Neo4j then I need to create relationships 
between those nodes.

This is an example taken from necons doc.

(let [conn  (nr/connect "http://localhost:7474/db/data/";)
page1 (nn/create conn {:url "http://clojurewerkz.org"})
page2 (nn/create conn {:url "http://clojureneo4j.info"})
;; a relationship that indicates that page1 links to page2
rel   (nrl/create conn page1 page2 :links)]
(println rel)))

They create two nodes called page1 and pag2 then connect them.

In my case I have a list of names, I want to create one node for each of 
them with the possibility to work on nodes after they are created.
So if I have for example  a list like this one (def mylist '(j"john" "paul" 
"mary")) I want to create three nodes calling them john paul and mary 
storing the value "John" "Paul" "Mary" and after having created them I want 
to be albe to connect nodes creating a relationship among them, with a 
funciont like   rel   (nrl/create conn john paul :friend)]

I hope this example explain better my needs.

Thanks in advance

Francesco


On Tuesday, June 10, 2014 6:11:16 PM UTC+2, James Reeves wrote:
>
> Could you explain a little more what your end goal is?
>
> It sounds like you want a map, but without knowing more about the purpose, 
> it's difficult to say.
>
> - James
>
>
> On 10 June 2014 16:43, Francesco Lunelli  > wrote:
>
>> Hello everybody, I have a newbie question about destructuring and 
>> assigning and didn't find an answer in documentation or books.
>>
>> I have a list that contains an arbitrary number of elements for example 
>> '("one" "two" "three" ...) I now only that elements are strings.
>>
>> I need to to take every element and use it as the name of a variable 
>> inside a let and assign the result of a funcion on that element to that 
>> variable.
>> Somthing like this for example:
>>
>> (let [one  (clojure.string/capitalize "one")
>>   two (clojure.string/capitalize "two")
>>   three (clojure.string/capitalize "three")]
>>  ;; here I have access to vars one two three etc. 
>>   )
>>   
>> where the names of the vars are taken from the list and values are 
>> obtained applying a function on the corresponding element of the list (the 
>> capitalize function il only an example, it could be everything else).
>>
>> If I do in this way 
>> (for [word ["the" "quick" "brown" "fox"]] (let [word 
>> (clojure.string/capitalize word)] (prn word)))
>> it works, but I need to access the variables outside of the cycle for, 
>> after having defined and assigned everyone because I need to put in 
>> relation some of them.
>>
>> Thanks to everybody
>>
>> Francesco
>>
>>  
>>
>>  -- 
>> 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/d/optout.
>>
>
>

-- 
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] Leiningen 2.4.0

2014-06-10 Thread Marco Ehrentreich
The same for me:


AccessDenied
Access Denied
8BF2847E2A8F7FEF

xGsEqKhBDcDZb6mc41WeQdJoHgUQRnILPzWuVZZsVJSDWK4/SYUQ2game588rvm/




On 10.06.2014 18:42, David Powell wrote:
> I'm getting a 403 error
> on https://leiningen.s3.amazonaws.com/downloads/leiningen-2.4.0-standalone.jar
> when I run lein upgrade...
> Is this just me?
> 
> 
> On Tue, Jun 10, 2014 at 3:31 PM, Sun Ning  > wrote:
> 
> I have been using lein-release
> (https://github.com/__relaynetwork/lein-release
> ) for a while. It's
> surely nice to see this feature built into core.
> 
> 
> On Tue 10 Jun 2014 06:11:06 PM CST, Atamert Ölçgen wrote:
> 
> Thanks for bringing deploy-repositories to my attention, I
> didn't know
> it was there.
> 
> 
> 
> On Tue, Jun 10, 2014 at 5:22 AM, Phil Hagelberg  
> >> wrote:
> 
> 
> Greetings!
> 
> I'm pleased to announce the release of Leiningen 2.4.0, our most
> significant release in quite some time. The star of the show is
> the new
> `release` task, which can automate all the common steps
> behind the
> release of a new version of a library.
> 
> The idea is that `lein release` will run a series of tasks
> you've
> specified as release steps. This defaults to running the
> equivalent of
> these commands:
> 
> * lein vcs assert-committed
> * lein change version leiningen.release/bump-version release
> * lein vcs commit
> * lein vcs tag
> * lein deploy
> * lein change version leiningen.release/bump-version patch
> * lein vcs commit
> * lein vcs push
> 
> The `vcs` and `change` tasks are also new. The `vcs` subtasks
> above are
> self-explanatory, but the `change` task allows for programmatic
> modification of any given key in defproject using an arbitrary
> function,
> without altering formatting or comments. Out of the box we
> ship a
> function to bump version numbers, but you can call functions
> from
> plugins, and we hope to add more built-in functions in future
> releases.
> 
> Note that the release task runs `lein deploy` rather than
> `lein deploy
> clojars`; this is in order to prevent accidental deploys of
> private
> artifacts to Clojars. In order to deploy an open source
> library to
> Clojars it's necessary to add `:deploy-repositories {"releases"
> :clojars}`
> to your project.clj file.
> 
> Other highlights include fixes to the search task to report
> index
> download progress, improved multi-field queries, and the default
> to make
> useful uberjars even when not AOTing a -main function.
> 
> A full list of significant changes:
> 
> * Allow aliases to splice in values from the project map. (Phil
> Hagelberg)
> * Allow plugins to override built-in tasks. (Phil Hagelberg)
> * Add `release` task for automating common release steps. (Wayne
> Warren, Chris Truter, Phil Hagelberg)
> * Add `change` task for programmatc `project.clj` manipulation.
> (Chris Truter, Max Barnash)
> * Abort when `defproject` contains duplicate keys. (Peter
> Garbers)
> * Add `vcs` task to automate version control. (Phil Hagelberg,
> Wayne Warren)
> * Automatically `clean` before `deploy` to avoid AOT in
> libraries.
> (Phil Hagelberg)
> * Emit warnings to stderr. (Andy Chambers)
> * Use `clojure.main` for uberjars that don't declare their own
> `:main`. (Phil Hagelberg)
> * Allow templates to load from `:plugin-repositories`. (Phil
> Hagelberg)
> * Fix a race condition on printing during dependency resolution.
> (Phil Hagelberg)
> * Allow `new` templates to operate on existing directories with
> `--force` option. (Matthew Blair)
> * Fix `search` task to allow queries on multiple fields.
> (Colin Jones)
> * Fix a bug where errors in `run` task were mis-reported. (Gary
> Fredericks)
> * Report download progress of search indices. (Matthew Blair)
> * Protection from harmful `:clean-targets` settings. (Craig
> McDaniel)
> * Faster loading of help text. (David Grayson, Ryan Mulligan)
> * Add `LEIN_SILENT` option to suppress `*info*` output. (Phil

Re: [ANN] Leiningen 2.4.0

2014-06-10 Thread David Powell
I'm getting a 403 error on
https://leiningen.s3.amazonaws.com/downloads/leiningen-2.4.0-standalone.jar
when I run lein upgrade...
Is this just me?


On Tue, Jun 10, 2014 at 3:31 PM, Sun Ning  wrote:

> I have been using lein-release (https://github.com/
> relaynetwork/lein-release) for a while. It's surely nice to see this
> feature built into core.
>
>
> On Tue 10 Jun 2014 06:11:06 PM CST, Atamert Ölçgen wrote:
>
>> Thanks for bringing deploy-repositories to my attention, I didn't know
>> it was there.
>>
>>
>>
>> On Tue, Jun 10, 2014 at 5:22 AM, Phil Hagelberg > > wrote:
>>
>>
>> Greetings!
>>
>> I'm pleased to announce the release of Leiningen 2.4.0, our most
>> significant release in quite some time. The star of the show is
>> the new
>> `release` task, which can automate all the common steps behind the
>> release of a new version of a library.
>>
>> The idea is that `lein release` will run a series of tasks you've
>> specified as release steps. This defaults to running the equivalent of
>> these commands:
>>
>> * lein vcs assert-committed
>> * lein change version leiningen.release/bump-version release
>> * lein vcs commit
>> * lein vcs tag
>> * lein deploy
>> * lein change version leiningen.release/bump-version patch
>> * lein vcs commit
>> * lein vcs push
>>
>> The `vcs` and `change` tasks are also new. The `vcs` subtasks
>> above are
>> self-explanatory, but the `change` task allows for programmatic
>> modification of any given key in defproject using an arbitrary
>> function,
>> without altering formatting or comments. Out of the box we ship a
>> function to bump version numbers, but you can call functions from
>> plugins, and we hope to add more built-in functions in future
>> releases.
>>
>> Note that the release task runs `lein deploy` rather than `lein deploy
>> clojars`; this is in order to prevent accidental deploys of private
>> artifacts to Clojars. In order to deploy an open source library to
>> Clojars it's necessary to add `:deploy-repositories {"releases"
>> :clojars}`
>> to your project.clj file.
>>
>> Other highlights include fixes to the search task to report index
>> download progress, improved multi-field queries, and the default
>> to make
>> useful uberjars even when not AOTing a -main function.
>>
>> A full list of significant changes:
>>
>> * Allow aliases to splice in values from the project map. (Phil
>> Hagelberg)
>> * Allow plugins to override built-in tasks. (Phil Hagelberg)
>> * Add `release` task for automating common release steps. (Wayne
>> Warren, Chris Truter, Phil Hagelberg)
>> * Add `change` task for programmatc `project.clj` manipulation.
>> (Chris Truter, Max Barnash)
>> * Abort when `defproject` contains duplicate keys. (Peter Garbers)
>> * Add `vcs` task to automate version control. (Phil Hagelberg,
>> Wayne Warren)
>> * Automatically `clean` before `deploy` to avoid AOT in libraries.
>> (Phil Hagelberg)
>> * Emit warnings to stderr. (Andy Chambers)
>> * Use `clojure.main` for uberjars that don't declare their own
>> `:main`. (Phil Hagelberg)
>> * Allow templates to load from `:plugin-repositories`. (Phil
>> Hagelberg)
>> * Fix a race condition on printing during dependency resolution.
>> (Phil Hagelberg)
>> * Allow `new` templates to operate on existing directories with
>> `--force` option. (Matthew Blair)
>> * Fix `search` task to allow queries on multiple fields. (Colin Jones)
>> * Fix a bug where errors in `run` task were mis-reported. (Gary
>> Fredericks)
>> * Report download progress of search indices. (Matthew Blair)
>> * Protection from harmful `:clean-targets` settings. (Craig McDaniel)
>> * Faster loading of help text. (David Grayson, Ryan Mulligan)
>> * Add `LEIN_SILENT` option to suppress `*info*` output. (Phil
>> Hagelberg)
>>
>> As usual, for those who manually installed `lein upgrade` will pull in
>> the latest, and `lein upgrade 2.3.4` will back it down to the previous
>> version if you run into any issues.
>>
>> Thanks to all the contributors who made this happen!
>>
>> -Phil
>>
>> ps. The Clojars artifacts for this release are still pending
>> investigation of some deploy issues, but they should be right
>> around the
>> corner.
>>
>>
>>
>>
>>
>>
>> --
>> Kind Regards,
>> Atamert Ölçgen
>>
>> -+-
>> --+
>> +++
>>
>> www.muhuk.com 
>>
>>
>> --
>> 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, v

Re: [ANN] RPC library Slacker and Slacker Cluster 0.12

2014-06-10 Thread Robert Luo
Cool update!

On Tuesday, June 10, 2014 10:29:34 PM UTC+8, Sun Ning wrote:
>
> Hello Everyone, 
>
> I just released Slacker 0.12 and its cluster support module. In this 
> release, several bugs got fixed and there are also lovely features added 
> (nippy serialization, leader election, etc). For more detail, please 
> move to the project pages: 
>
> https://github.com/sunng87/slacker 
> https://github.com/sunng87/slacker-cluster 
>
> In case you have no idea about Slacker, it's a clojure library provides 
> completely transparent experience on remote function call. And the 
> cluster module supports large scale high availability architecture. The 
> development of slacker was started in late 2011. Now it's used in 
> avoscloud.com for backend service integration 
>
>

-- 
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] CrossClj, a tool for cross-referencing the clojure ecosystem

2014-06-10 Thread Ghadi Shayban
This is so cool and extremely useful.  Thank you so much for this!

Ghadi

On Tuesday, June 10, 2014 11:39:12 AM UTC-4, Francesco Bellomi wrote:
>
> Hello everyone,
>
> http://crossclj.info
>
> I've been working on CrossClj for some time now, and I feel it has grown 
> usable (and useful) enough to make a public announcement.
>
> CrossClj is a tool to explore the whole Clojure(-script) open-source 
> ecosystem as an interconnected codebase.
>
> The source code of Leiningen projects published as Clojars artifacts is 
> rendered as a hypertext; each var occurrence is linked to its definition 
> (namespaces belonging to different artifacts are resolved using maven 
> coordinates), and each reference to a method/class of the standard Java JDK 
> lib is linked to the Oracle documentation.
>
> Starting from a var definition, it is possible to list all the qualified 
> occurrences of the var across all the indexed projects; or it is possible 
> to search all namespaces in all projects for vars with a given name.
>
> A project should be automatically listed, provided that the following 
> conditions are met:
> - The project is deployed on Clojars under a public group (not a 
> org.clojars.* user group)
> - The project uses Leiningen and provides a project.clj with a description.
> - The project has at least one non-SHAPSHOT release.
> - Source code is incuded into project's artifact, and hosted publicly on 
> GitHub (i.e. there is a github reference on the project's POM under the url 
> or scm/connection fields). This almost ensures that the source code license 
> is compatible with CrossClj's usage.
>
> Some examples illustrating various features:
>
>
> http://crossclj.info/ns/org.clojure/tools.analyzer/0.2.1/clojure.tools.analyzer.html#_macroexpand
> http://crossclj.info/fun/clojure.core/reduce.html
> http://crossclj.info/search?q=map
> http://crossclj.info/ns/ring/ring-core/1.3.0/project.clj.html
> http://crossclj.info/ns/org.clojure/clojure/1.6.0/clojure.core.html
> http://crossclj.info/ns/garden/1.1.7/garden.stylesheet.cljs.html
>
> The cross-reference index and the website content is updated daily, by 
> looking at Clojars' feed (http://clojars.org/repo/feed.clj.gz), and by 
> fetching the new artifacts that match the above constraints. The impact in 
> terms of bandwidth is negligible.
> The update process is designed to be fully automated, but as of today it 
> is still initiated manually because there are some quality issues that 
> needs to be worked out.
>
> There are some scattered defects in the code analysis, due to my not yet 
> perfect use of the tools.analyzer.* toolchain. 
> Clojurescript macros definitions aren't yet cross-references.
>
> The fact that the open source Clojure ecosystem still has a manageable 
> size (about 3500 projects are indexed now) makes this kind of tools very 
> cheap to operate, and opens up many possibilities for the future, like 
> batch-executing other static analysis tools.
>
> Francesco Bellomi
> @fbellomi
> @crossclojure
>

-- 
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: destructuring let and for

2014-06-10 Thread James Reeves
Could you explain a little more what your end goal is?

It sounds like you want a map, but without knowing more about the purpose,
it's difficult to say.

- James


On 10 June 2014 16:43, Francesco Lunelli 
wrote:

> Hello everybody, I have a newbie question about destructuring and
> assigning and didn't find an answer in documentation or books.
>
> I have a list that contains an arbitrary number of elements for example
> '("one" "two" "three" ...) I now only that elements are strings.
>
> I need to to take every element and use it as the name of a variable
> inside a let and assign the result of a funcion on that element to that
> variable.
> Somthing like this for example:
>
> (let [one  (clojure.string/capitalize "one")
>   two (clojure.string/capitalize "two")
>   three (clojure.string/capitalize "three")]
>  ;; here I have access to vars one two three etc.
>   )
>
> where the names of the vars are taken from the list and values are
> obtained applying a function on the corresponding element of the list (the
> capitalize function il only an example, it could be everything else).
>
> If I do in this way
> (for [word ["the" "quick" "brown" "fox"]] (let [word
> (clojure.string/capitalize word)] (prn word)))
> it works, but I need to access the variables outside of the cycle for,
> after having defined and assigned everyone because I need to put in
> relation some of them.
>
> Thanks to everybody
>
> Francesco
>
>
>
>  --
> 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.
>

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


destructuring let and for

2014-06-10 Thread Francesco Lunelli
Hello everybody, I have a newbie question about destructuring and assigning 
and didn't find an answer in documentation or books.

I have a list that contains an arbitrary number of elements for example 
'("one" "two" "three" ...) I now only that elements are strings.

I need to to take every element and use it as the name of a variable inside 
a let and assign the result of a funcion on that element to that variable.
Somthing like this for example:

(let [one  (clojure.string/capitalize "one")
  two (clojure.string/capitalize "two")
  three (clojure.string/capitalize "three")]
 ;; here I have access to vars one two three etc. 
  )
  
where the names of the vars are taken from the list and values are obtained 
applying a function on the corresponding element of the list (the 
capitalize function il only an example, it could be everything else).

If I do in this way 
(for [word ["the" "quick" "brown" "fox"]] (let [word 
(clojure.string/capitalize word)] (prn word)))
it works, but I need to access the variables outside of the cycle for, 
after having defined and assigned everyone because I need to put in 
relation some of them.

Thanks to everybody

Francesco

 

-- 
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] CrossClj, a tool for cross-referencing the clojure ecosystem

2014-06-10 Thread Francesco Bellomi
Hello everyone,

http://crossclj.info

I've been working on CrossClj for some time now, and I feel it has grown 
usable (and useful) enough to make a public announcement.

CrossClj is a tool to explore the whole Clojure(-script) open-source 
ecosystem as an interconnected codebase.

The source code of Leiningen projects published as Clojars artifacts is 
rendered as a hypertext; each var occurrence is linked to its definition 
(namespaces belonging to different artifacts are resolved using maven 
coordinates), and each reference to a method/class of the standard Java JDK 
lib is linked to the Oracle documentation.

Starting from a var definition, it is possible to list all the qualified 
occurrences of the var across all the indexed projects; or it is possible 
to search all namespaces in all projects for vars with a given name.

A project should be automatically listed, provided that the following 
conditions are met:
- The project is deployed on Clojars under a public group (not a 
org.clojars.* user group)
- The project uses Leiningen and provides a project.clj with a description.
- The project has at least one non-SHAPSHOT release.
- Source code is incuded into project's artifact, and hosted publicly on 
GitHub (i.e. there is a github reference on the project's POM under the url 
or scm/connection fields). This almost ensures that the source code license 
is compatible with CrossClj's usage.

Some examples illustrating various features:

http://crossclj.info/ns/org.clojure/tools.analyzer/0.2.1/clojure.tools.analyzer.html#_macroexpand
http://crossclj.info/fun/clojure.core/reduce.html
http://crossclj.info/search?q=map
http://crossclj.info/ns/ring/ring-core/1.3.0/project.clj.html
http://crossclj.info/ns/org.clojure/clojure/1.6.0/clojure.core.html
http://crossclj.info/ns/garden/1.1.7/garden.stylesheet.cljs.html

The cross-reference index and the website content is updated daily, by 
looking at Clojars' feed (http://clojars.org/repo/feed.clj.gz), and by 
fetching the new artifacts that match the above constraints. The impact in 
terms of bandwidth is negligible.
The update process is designed to be fully automated, but as of today it is 
still initiated manually because there are some quality issues that needs 
to be worked out.

There are some scattered defects in the code analysis, due to my not yet 
perfect use of the tools.analyzer.* toolchain. 
Clojurescript macros definitions aren't yet cross-references.

The fact that the open source Clojure ecosystem still has a manageable size 
(about 3500 projects are indexed now) makes this kind of tools very cheap 
to operate, and opens up many possibilities for the future, like 
batch-executing other static analysis tools.

Francesco Bellomi
@fbellomi
@crossclojure

-- 
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: solving an equation for all solutions with constraints: core.logic.fd

2014-06-10 Thread David Nolen
That's that's the suggested way - just pick a large bound.

David

On Tue, Jun 10, 2014 at 11:28 AM, cej38  wrote:
> I found the solution to my first problem at
> https://github.com/clojure/core.logic/wiki/Features (with a few small
> changes by me):
>
> (run* [q]
>   (fresh [x y]
> (fd/in x y (fd/interval 0 9))
> (fd/eq
>   (= (+ (* x 3) (* y 2)) 8))
> (== q [x y])))
>
>
> I suppose that I could set (fd/interval 0 9) to do a fair
> approximation of the non-negative integers, but out of curiosity, would
> there be a better way of doing this?
>
>
>
> On Tuesday, June 10, 2014 11:12:11 AM UTC-4, cej38 wrote:
>>
>> I am interested in solving a simple equation for all of its solutions when
>> some constraints are applied.  This sounds like a problem for core.logic.fd.
>>
>> Let's use a toy example:
>>
>> 8 = 3*x + 2*y,  where x and y must be non-negative integers.
>>
>> Here are the possible solutions:  [x,y]= {[2,1],[0,4]}.
>>
>>
>> I tried something like this:
>>
>> (run* [q]
>>   (fresh [x y]
>>  (== q [x y])
>>(project [x y]
>>   (fd/+ (* x 2) (y 3) 8
>>
>> But I get a exception:
>> "java.lang.ClassCastException: clojure.core.logic.LVar cannot be cast to
>> java.lang.Number"
>>
>> So I have two questions:
>> 1. How should I rewrite the above command to get the solutions?
>> 2. Are there any good blog posts/online presentations/etc. on
>> core.logic.fd?
>>
>>
>>
> --
> 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.

-- 
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: solving an equation for all solutions with constraints: core.logic.fd

2014-06-10 Thread cej38
I found the solution to my first problem at 
https://github.com/clojure/core.logic/wiki/Features (with a few small 
changes by me):

(run* [q]
  (fresh [x y]
(fd/in x y (fd/interval 0 9))
(fd/eq
  (= (+ (* x 3) (* y 2)) 8))
(== q [x y])))


I suppose that I could set (fd/interval 0 9) to do a fair 
approximation of the non-negative integers, but out of curiosity, would 
there be a better way of doing this?



On Tuesday, June 10, 2014 11:12:11 AM UTC-4, cej38 wrote:
>
> I am interested in solving a simple equation for all of its solutions when 
> some constraints are applied.  This sounds like a problem for core.logic.fd.
>
> Let's use a toy example:
>
> 8 = 3*x + 2*y,  where x and y must be non-negative integers.
>
> Here are the possible solutions:  [x,y]= {[2,1],[0,4]}.
>
>
> I tried something like this:
>
> (run* [q]
>   (fresh [x y]
>  (== q [x y])
>(project [x y]
>   (fd/+ (* x 2) (y 3) 8
>
> But I get a exception:
> "java.lang.ClassCastException: clojure.core.logic.LVar cannot be cast to 
> java.lang.Number"
>
> So I have two questions:
> 1. How should I rewrite the above command to get the solutions?
> 2. Are there any good blog posts/online presentations/etc. on 
> core.logic.fd?
>
>
>
>

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


solving an equation for all solutions with constraints: core.logic.fd

2014-06-10 Thread cej38
I am interested in solving a simple equation for all of its solutions when 
some constraints are applied.  This sounds like a problem for core.logic.fd.

Let's use a toy example:

8 = 3*x + 2*y,  where x and y must be non-negative integers.

Here are the possible solutions:  [x,y]= {[2,1],[0,4]}.


I tried something like this:

(run* [q]
  (fresh [x y]
 (== q [x y])
   (project [x y]
  (fd/+ (* x 2) (y 3) 8

But I get a exception:
"java.lang.ClassCastException: clojure.core.logic.LVar cannot be cast to 
java.lang.Number"

So I have two questions:
1. How should I rewrite the above command to get the solutions?
2. Are there any good blog posts/online presentations/etc. on core.logic.fd?



-- 
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] packthread 0.1.2

2014-06-10 Thread Jason Felice
*New: *+> and +>> will now thread through try and catch, and leave finally
alone.

packthread

Threading macros for working with globs of state.
Why?

Many descriptions about state in Clojure fit into the following form:

State is hard to reason about, and so we use pure functions in Clojure. But
then we have a problem, we need to pass around *all*the application's
state. And that's just too hard, and it's basically just like having all
the global variables anyway, and you've coupled every function in the
system to this big ball of mud. So we need to separate it out and
encapsulate and therefore we've invented $library which does *x*, where *x* ∈
{*OO programming*, *global mutable state*, *...*}.

Packthread is for threading state through programs in a simple, composable
way. It does not compromise the ability to be functionally pure or reason
about one's program. It's pretty similar to the -> and ->> macros, with a
helper macro named in for creating different *projections* of the state to
manipulate with different functions.
+>

Threads value through forms in much the same way as ->, except for special
handling of the following forms:
if,
if-not, if-let, when, when-not, when-let:

The value is threaded through the then and else clauses independently,
leaving the test conditions alone. If an else clause is missing, it is will
be supplied as though the value had been threaded through identity in that
case.

For example,

(+> 42 (if true inc)) ;=> 43(+> 42 (if false inc)) ;=> 42

In when, when-not, and when-let forms, the value is threaded through each
form in the body, not just the last.
cond

The test clauses are left untouched and the value is threaded through the
expr clauses of each condition. If no :else condition was supplied, +> pretends
as though it has been (identity), and threads the value through that.

For example,

(+> 42
  (cond
(= 1 2)
inc)) ;=> 42
(+> 42
  (cond
(= 1 1)
dec)) ;=> 41

do

The current expr is threaded through the body forms of the do.
let

The current expression is threaded through the body of the let form, with
the bindings in place. For example:

(+> 42
  (let [x 1]
(+ x))) ;=> 43

try

The current expression is threaded through the body of the try form. The
*same* value is threaded through each catch clause. Anyfinally clauses are
left alone.

(+> 42 (try
 inc
 (catch Exception e
   dec)) ;=> 43
(+> 42 (try
 (+ :foo)
 (catch Exception e
   dec))) ;=> 41
(+> 42 (try
 inc
 (finally dec))) ;=> 42

in

Threads the inner expressions through a projection of value.

projector is a function which takes two arguments: a value and a function.
It should apply the function to a *projection* of the value, take the
function's result, and reassemble from that result a value which can be
used again in the outer context.

For example,

(+> 42
(in (fn [v f]
  (* 2 (f (/ v 2
  inc)) ;=> 42.5

This can be thought of as 'lifting' the body expressions into the 'world
where things are twice as large'.

As a special case, if projector is a keyword, in assumes that value is a
map and that sub-key are threaded through the inner expressions.

For example,

(+> {:hello 42}
(in :hello
  (+ 5))) ;=> {:hello 47}

This macro can only be used inside +> or +>>.
+>>

Threads expressions like ->>, except with the handling of the special forms
above.

Installing

Leiningen  dependency information:

[com.maitria/packthread "0.1.1"]

Usage

(require '[packthread.core :refer :all])
(+> 42
(if true
  inc)) ;=> 43

See core_test.clj

for
examples of usage.
License

Copyright 2014 Maitria

You have permission to use this in any way you like (modify it, sell it,
republish it), provided you agree to all the following conditions:

   - you don't mislead anyone about it
   - you don't interfere with our ability to use it
   - you release us from any claims of liability if it causes problems for
   you

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
T

Re: [ANN] Leiningen 2.4.0

2014-06-10 Thread Sun Ning
I have been using lein-release 
(https://github.com/relaynetwork/lein-release) for a while. It's surely 
nice to see this feature built into core.


On Tue 10 Jun 2014 06:11:06 PM CST, Atamert Ölçgen wrote:

Thanks for bringing deploy-repositories to my attention, I didn't know
it was there.



On Tue, Jun 10, 2014 at 5:22 AM, Phil Hagelberg mailto:p...@hagelb.org>> wrote:


Greetings!

I'm pleased to announce the release of Leiningen 2.4.0, our most
significant release in quite some time. The star of the show is
the new
`release` task, which can automate all the common steps behind the
release of a new version of a library.

The idea is that `lein release` will run a series of tasks you've
specified as release steps. This defaults to running the equivalent of
these commands:

* lein vcs assert-committed
* lein change version leiningen.release/bump-version release
* lein vcs commit
* lein vcs tag
* lein deploy
* lein change version leiningen.release/bump-version patch
* lein vcs commit
* lein vcs push

The `vcs` and `change` tasks are also new. The `vcs` subtasks
above are
self-explanatory, but the `change` task allows for programmatic
modification of any given key in defproject using an arbitrary
function,
without altering formatting or comments. Out of the box we ship a
function to bump version numbers, but you can call functions from
plugins, and we hope to add more built-in functions in future
releases.

Note that the release task runs `lein deploy` rather than `lein deploy
clojars`; this is in order to prevent accidental deploys of private
artifacts to Clojars. In order to deploy an open source library to
Clojars it's necessary to add `:deploy-repositories {"releases"
:clojars}`
to your project.clj file.

Other highlights include fixes to the search task to report index
download progress, improved multi-field queries, and the default
to make
useful uberjars even when not AOTing a -main function.

A full list of significant changes:

* Allow aliases to splice in values from the project map. (Phil
Hagelberg)
* Allow plugins to override built-in tasks. (Phil Hagelberg)
* Add `release` task for automating common release steps. (Wayne
Warren, Chris Truter, Phil Hagelberg)
* Add `change` task for programmatc `project.clj` manipulation.
(Chris Truter, Max Barnash)
* Abort when `defproject` contains duplicate keys. (Peter Garbers)
* Add `vcs` task to automate version control. (Phil Hagelberg,
Wayne Warren)
* Automatically `clean` before `deploy` to avoid AOT in libraries.
(Phil Hagelberg)
* Emit warnings to stderr. (Andy Chambers)
* Use `clojure.main` for uberjars that don't declare their own
`:main`. (Phil Hagelberg)
* Allow templates to load from `:plugin-repositories`. (Phil
Hagelberg)
* Fix a race condition on printing during dependency resolution.
(Phil Hagelberg)
* Allow `new` templates to operate on existing directories with
`--force` option. (Matthew Blair)
* Fix `search` task to allow queries on multiple fields. (Colin Jones)
* Fix a bug where errors in `run` task were mis-reported. (Gary
Fredericks)
* Report download progress of search indices. (Matthew Blair)
* Protection from harmful `:clean-targets` settings. (Craig McDaniel)
* Faster loading of help text. (David Grayson, Ryan Mulligan)
* Add `LEIN_SILENT` option to suppress `*info*` output. (Phil
Hagelberg)

As usual, for those who manually installed `lein upgrade` will pull in
the latest, and `lein upgrade 2.3.4` will back it down to the previous
version if you run into any issues.

Thanks to all the contributors who made this happen!

-Phil

ps. The Clojars artifacts for this release are still pending
investigation of some deploy issues, but they should be right
around the
corner.






--
Kind Regards,
Atamert Ölçgen

-+-
--+
+++

www.muhuk.com 

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


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

[ANN] RPC library Slacker and Slacker Cluster 0.12

2014-06-10 Thread Sun Ning

Hello Everyone,

I just released Slacker 0.12 and its cluster support module. In this 
release, several bugs got fixed and there are also lovely features added 
(nippy serialization, leader election, etc). For more detail, please 
move to the project pages:


https://github.com/sunng87/slacker
https://github.com/sunng87/slacker-cluster

In case you have no idea about Slacker, it's a clojure library provides 
completely transparent experience on remote function call. And the 
cluster module supports large scale high availability architecture. The 
development of slacker was started in late 2011. Now it's used in 
avoscloud.com for backend service integration


--
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: Clojure Contributor Agreement process update

2014-06-10 Thread Michael O'Keefe
Thank you for all you do. This is wonderful!

-Michael O'Keefe

On Tuesday, June 10, 2014 6:49:52 AM UTC-6, Tim Visher wrote:
>
> (boom) 
>
> On Mon, Jun 9, 2014 at 1:23 PM, Alex Miller  > wrote: 
> > Starting today, we have updated the Clojure Contributor Agreement 
> process. 
> > The prior process which involved signing and mailing a form has been 
> > replaced with an online e-signing process. 
> > 
> > Existing contributors that have signed the Contributor Agreement are 
> > unaffected - those agreements are still in effect. New signers will use 
> the 
> > online process. 
> > 
> > Information has been updated at: 
> > http://clojure.org/contributing 
> > 
> > As always, we welcome your contributions to the Clojure community and 
> hope 
> > that we can continue to improve Clojure together! 
> > 
> > - Alex Miller, Rich Hickey, and the Clojure team 
> > 
> > 
> > 
> > -- 
> > You received this message because you are subscribed to the Google 
> Groups 
> > "Clojure Dev" group. 
> > To unsubscribe from this group and stop receiving emails from it, send 
> an 
> > email to clojure-dev...@googlegroups.com . 
> > To post to this group, send email to cloju...@googlegroups.com 
> . 
> > Visit this group at http://groups.google.com/group/clojure-dev. 
> > For more options, visit https://groups.google.com/d/optout. 
>

-- 
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 cheatsheet with search capability

2014-06-10 Thread John Gabriele

On Monday, June 9, 2014 7:09:01 PM UTC-4, Andy Fingerhut wrote:
>
> On Mon, Jun 2, 2014 at 6:54 AM, John Gabriele  > wrote:
>
>> On Sunday, June 1, 2014 5:15:52 PM UTC-4, Andy Fingerhut wrote:
>>>
>>> Thanks to Francois du Toit, the versions of the Clojure cheatsheet 
>>> available at the link below now have the ability to let you search for all 
>>> symbols beginning with a string you type in, with color highlighting of 
>>> matches.
>>>
>>> http://jafingerhut.github.io
>>>
>>>
>> Oooh, that's nifty. Removes blocks with no results too. And I see that it 
>> actually searches for string anywhere in the function name (not just at the 
>> beginning). Thanks Francois and Andy!
>>
>> One minor thing: if a search string doesn't turn up any results at all, 
>> it would be nice if it turned red in the search field to indicate so.
>>
>> -- John
>>
>
> This 'turn search box red if there are no matches' functionality has been 
> implemented.
>
>
Cool!
 

> Also, before today searching would only find matches at the beginning of a 
> whole "word" in a symbol, e.g. typing "last" would find "last" and 
> "but-last", because the "last" in "but-last" had a hyphen before it, but it 
> would not highlight "butlast".  Now it will highlight all of those.
>
>
Ah, I'd missed that distinction.

Such a nice new feature for the cheatsheet!

-- 
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: Clojure Contributor Agreement process update

2014-06-10 Thread Tim Visher
(boom)

On Mon, Jun 9, 2014 at 1:23 PM, Alex Miller  wrote:
> Starting today, we have updated the Clojure Contributor Agreement process.
> The prior process which involved signing and mailing a form has been
> replaced with an online e-signing process.
>
> Existing contributors that have signed the Contributor Agreement are
> unaffected - those agreements are still in effect. New signers will use the
> online process.
>
> Information has been updated at:
> http://clojure.org/contributing
>
> As always, we welcome your contributions to the Clojure community and hope
> that we can continue to improve Clojure together!
>
> - Alex Miller, Rich Hickey, and the Clojure team
>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Clojure Dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure-dev+unsubscr...@googlegroups.com.
> To post to this group, send email to clojure-...@googlegroups.com.
> Visit this group at http://groups.google.com/group/clojure-dev.
> For more options, visit https://groups.google.com/d/optout.

-- 
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: Available for Contracting

2014-06-10 Thread Henry Ventura
And I don't know if the level of off-topic contained in this reply is 
appropriate, but I'd love to take on or help with any projects pro bono 
Allen, just for the sake of having an experienced resource (i.e. you) that 
I can ask questions! I have about three months of combined Clojure + Scheme 
experience.

-- 
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] Leiningen 2.4.0

2014-06-10 Thread Atamert Ölçgen
Thanks for bringing deploy-repositories to my attention, I didn't know it
was there.



On Tue, Jun 10, 2014 at 5:22 AM, Phil Hagelberg  wrote:

>
> Greetings!
>
> I'm pleased to announce the release of Leiningen 2.4.0, our most
> significant release in quite some time. The star of the show is the new
> `release` task, which can automate all the common steps behind the
> release of a new version of a library.
>
> The idea is that `lein release` will run a series of tasks you've
> specified as release steps. This defaults to running the equivalent of
> these commands:
>
> * lein vcs assert-committed
> * lein change version leiningen.release/bump-version release
> * lein vcs commit
> * lein vcs tag
> * lein deploy
> * lein change version leiningen.release/bump-version patch
> * lein vcs commit
> * lein vcs push
>
> The `vcs` and `change` tasks are also new. The `vcs` subtasks above are
> self-explanatory, but the `change` task allows for programmatic
> modification of any given key in defproject using an arbitrary function,
> without altering formatting or comments. Out of the box we ship a
> function to bump version numbers, but you can call functions from
> plugins, and we hope to add more built-in functions in future releases.
>
> Note that the release task runs `lein deploy` rather than `lein deploy
> clojars`; this is in order to prevent accidental deploys of private
> artifacts to Clojars. In order to deploy an open source library to
> Clojars it's necessary to add `:deploy-repositories {"releases" :clojars}`
> to your project.clj file.
>
> Other highlights include fixes to the search task to report index
> download progress, improved multi-field queries, and the default to make
> useful uberjars even when not AOTing a -main function.
>
> A full list of significant changes:
>
> * Allow aliases to splice in values from the project map. (Phil Hagelberg)
> * Allow plugins to override built-in tasks. (Phil Hagelberg)
> * Add `release` task for automating common release steps. (Wayne Warren,
> Chris Truter, Phil Hagelberg)
> * Add `change` task for programmatc `project.clj` manipulation. (Chris
> Truter, Max Barnash)
> * Abort when `defproject` contains duplicate keys. (Peter Garbers)
> * Add `vcs` task to automate version control. (Phil Hagelberg, Wayne
> Warren)
> * Automatically `clean` before `deploy` to avoid AOT in libraries. (Phil
> Hagelberg)
> * Emit warnings to stderr. (Andy Chambers)
> * Use `clojure.main` for uberjars that don't declare their own `:main`.
> (Phil Hagelberg)
> * Allow templates to load from `:plugin-repositories`. (Phil Hagelberg)
> * Fix a race condition on printing during dependency resolution. (Phil
> Hagelberg)
> * Allow `new` templates to operate on existing directories with `--force`
> option. (Matthew Blair)
> * Fix `search` task to allow queries on multiple fields. (Colin Jones)
> * Fix a bug where errors in `run` task were mis-reported. (Gary Fredericks)
> * Report download progress of search indices. (Matthew Blair)
> * Protection from harmful `:clean-targets` settings. (Craig McDaniel)
> * Faster loading of help text. (David Grayson, Ryan Mulligan)
> * Add `LEIN_SILENT` option to suppress `*info*` output. (Phil Hagelberg)
>
> As usual, for those who manually installed `lein upgrade` will pull in
> the latest, and `lein upgrade 2.3.4` will back it down to the previous
> version if you run into any issues.
>
> Thanks to all the contributors who made this happen!
>
> -Phil
>
> ps. The Clojars artifacts for this release are still pending
> investigation of some deploy issues, but they should be right around the
> corner.
>
>
>
>


-- 
Kind Regards,
Atamert Ölçgen

-+-
--+
+++

www.muhuk.com

-- 
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: A drawback of the less-parentheses approach

2014-06-10 Thread Karsten Schmidt
Also, if you write your let bindings (according to common convention)
so that you have one binding per line, you can use ;; to create a line
comment, like:

(let [x 1
 ;;y 2
 ]
  x)

(Ps. A single semicolon would suffice, but the double version keeps
indentation when formatting the buffer in Emacs (and other editors))


On 10 June 2014 06:01, Alex Miller  wrote:
> The only place I've found the comment macro to be useful is at the top-level
> of a ns to hold a bunch of test/temp code.
>
>
> On Monday, June 9, 2014 11:22:10 PM UTC-5, Taegyoon Kim wrote:
>>
>> Ah, reader macro! Thanks!
>>
>> Ignore next form (#_)
>> The form following #_ is completely skipped by the reader. (This is a more
>> complete removal than the comment macro which yields nil).
>>
>> (from http://clojure.org/reader)
>>
>> Conclusion: Don't use the comment macro. It makes runtime overhead.
>>
>>
>> 2014년 6월 10일 화요일 오후 12시 22분 50초 UTC+9, guns 님의 말:
>>>
>>> On Mon  9 Jun 2014 at 07:07:42PM -0700, Taegyoon Kim wrote:
>>> > And you can't do this:
>>> > user=> (let [x 1 (comment y 2)] x)
>>>
>>> Alex Miller (?) once pointed out that the #_ reader macro can be chained
>>> like this:
>>>
>>> (let [x 1 #_#_y 2] x)
>>>
>>> Pretty nifty.
>>>
>>> guns
>
> --
> 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.



-- 
Karsten Schmidt
http://postspectacular.com | http://toxiclibs.org | http://toxi.co.uk

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