Re: anybody here who use emacs to edit closure? is emacs lisp a good starting point to learn closure?

2015-04-03 Thread Bozhidar Batsov
You can definitely start using Emacs without having to learn Emacs Lisp.
Unless you're planning to write some custom extensions or customize your
setup wildly you can go a very long way with just cursory knowledge of
Emacs Lisp. At any rate - knowing any Lisp dialect makes it relatively easy
to pick up other dialects. I had learned Common Lisp back in the day and
this made it pretty easy for me to pick up Emacs Lisp when I had to dive
deeper into it.

I'm kind of biased, but I believe that the Emacs tooling for Clojure is
pretty nice. :-) If you're in to IDEs, however, guess you should check out
Cursive or CCC instead.

On 4 April 2015 at 05:46, Juvenn Woo  wrote:

> Agree with Andy. As a starter, it is better and faster to learn Clojure
> alone. After you grasped one, the other lisps will be easy to follow.
>
> Emacs has been the de facto goto choice for most here, it is highly
> recommended to invest into it. Other than that, there're vim fireplace, as
> well as IDE plugin Cursive that might be your liking.
>
> PS: I use vim + fireplace :)
>
> —
> Sent from Mailbox 
>
>
> On Sat, Apr 4, 2015 at 10:02 AM, Andy Fingerhut 
> wrote:
>
>> If your goal is to learn Clojure, I would recommend not learning Emacs
>> Lisp at the same time, just to avoid confusion that may arise in your mind
>> due to the differences between the two.
>>
>> You can use Emacs without learning Emacs Lisp with no problem.  I've used
>> Emacs for 20 years, and only know a little tiny bit of Emacs Lisp.
>>
>> Andy
>>
>> On Fri, Apr 3, 2015 at 6:54 PM,  wrote:
>>
>>> i am about to use emas and start to learn emacs lisp, would the study of
>>> emacs lisp help to learn clojure, both of them are lisp dialect, so would
>>> it take a long time to swich from emacs lisp to clojure?
>>> i just want to learn clojure, but i wanna to start from emacs and emacs
>>> lisp, is that an effective way to master lisp and the great editor emacs?
>>> or it's better to start from clojure and some other ide directly?
>>> need some suggestions and advices:)
>>>
>>> --
>>> 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.
>>
>
>  --
> 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.


Should Clojure/GSoC join a non-profit?

2015-04-03 Thread Daniel Solano Gómez
Hello, all,

The student application deadline has passed and we now have over twenty
student applications to review.  We will not know for another week and a
half or so how many students we will be able to accept, and Google will
announce final decisions on the 24th.

In the meantime, I would like to bring up the question of whether or not
Clojure/GSoC should seek fiscal sponsorship from an organisation like
the Software Freedom Conservancy or Software in the Public Interest.

Naturally, the first question is to ask is: Why?  In the case of GSoC,
the reason is money.  As part of GSoC, Google gives money to mentoring
organisations.  We have used this money in previous years to help get
successful GSoC students to Clojure conferences.  However, there are a
couple of problems with taking Google's money:

1. If an individual takes it, they incur a tax liability as it counts as
personal income.

2. It's not enough to get our students to conferences.  Our students
come from around the world, and it's not possible to fly, house, and
feed them entirely on what Google gives.  As a result, even with the
help from Google, it may be that students who cannot afford some of
these expenses are unable to take advantage of this opportunity.


Last year, Cognitect was extremely helpful in helping Clojure/GSoC with
the first problem in particular, and I am very grateful to Alex Miller
and Lynn Grogan for all of their help in dealing with all of the
administrative paperwork and coordinating travel arrangements with our
students.

I would like to be able to do even better this year.  I would like to
try to raise money from the community to help get our students to
conferences.  While non-profit status doesn't matter for corporations
and is not relevant for international donors, I think it can make a
difference for individual donors.  Additionally, I believe that ensuring
the organisation is open and transparent in how it handles donor's money
is important.

I believe that the overhead necessary to create a non-profit just for
this is simply overwhelming.  As such, I think it makes sense for
Clojure/GSoC to seek fiscal sponsorship with a non-profit.

Nonetheless, I would like to invite the community to comment on this
proposal.  In particular, questions that should be addressed are:

1. Does this proposal make sense?  Is it worth the effort?

2. Should the scope of a fiscal sponsorship be restricted to Clojure's
participation in GSoC?  There was an unsession at the Conj last year
where a number of us talked about the idea of a Clojure community
non-profit.  It could potentially do things such as supporting 
community projects such as Clojars, helping out local user groups,
providing training, or even running events.

3. Are you interested in getting involved?  Especially if the scope of a
fiscal sponsorship extends beyond Clojure's involvement in GSoC, it will
take a group effort to ensure the success of this effort.

Thank you all for taking the time to read this, and I hope to get some
constructive feedback.

Sincerely,

Daniel

-- 
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: anybody here who use emacs to edit closure? is emacs lisp a good starting point to learn closure?

2015-04-03 Thread Juvenn Woo
Agree with Andy. As a starter, it is better and faster to learn Clojure alone. 
After you grasped one, the other lisps will be easy to follow.

Emacs has been the de facto goto choice for most here, it is highly recommended 
to invest into it. Other than that, there're vim fireplace, as well as IDE 
plugin Cursive that might be your liking.

PS: I use vim + fireplace :)



—
Sent from Mailbox

On Sat, Apr 4, 2015 at 10:02 AM, Andy Fingerhut 
wrote:

> If your goal is to learn Clojure, I would recommend not learning Emacs Lisp
> at the same time, just to avoid confusion that may arise in your mind due
> to the differences between the two.
> You can use Emacs without learning Emacs Lisp with no problem.  I've used
> Emacs for 20 years, and only know a little tiny bit of Emacs Lisp.
> Andy
> On Fri, Apr 3, 2015 at 6:54 PM,  wrote:
>> i am about to use emas and start to learn emacs lisp, would the study of
>> emacs lisp help to learn clojure, both of them are lisp dialect, so would
>> it take a long time to swich from emacs lisp to clojure?
>> i just want to learn clojure, but i wanna to start from emacs and emacs
>> lisp, is that an effective way to master lisp and the great editor emacs?
>> or it's better to start from clojure and some other ide directly?
>> need some suggestions and advices:)
>>
>> --
>> 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.

-- 
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: anybody here who use emacs to edit closure? is emacs lisp a good starting point to learn closure?

2015-04-03 Thread Andy Fingerhut
If your goal is to learn Clojure, I would recommend not learning Emacs Lisp
at the same time, just to avoid confusion that may arise in your mind due
to the differences between the two.

You can use Emacs without learning Emacs Lisp with no problem.  I've used
Emacs for 20 years, and only know a little tiny bit of Emacs Lisp.

Andy

On Fri, Apr 3, 2015 at 6:54 PM,  wrote:

> i am about to use emas and start to learn emacs lisp, would the study of
> emacs lisp help to learn clojure, both of them are lisp dialect, so would
> it take a long time to swich from emacs lisp to clojure?
> i just want to learn clojure, but i wanna to start from emacs and emacs
> lisp, is that an effective way to master lisp and the great editor emacs?
> or it's better to start from clojure and some other ide directly?
> need some suggestions and advices:)
>
> --
> 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.


anybody here who use emacs to edit closure? is emacs lisp a good starting point to learn closure?

2015-04-03 Thread mnzhzf
i am about to use emas and start to learn emacs lisp, would the study of 
emacs lisp help to learn clojure, both of them are lisp dialect, so would 
it take a long time to swich from emacs lisp to clojure?
i just want to learn clojure, but i wanna to start from emacs and emacs 
lisp, is that an effective way to master lisp and the great editor emacs? 
or it's better to start from clojure and some other ide directly?
need some suggestions and advices:)

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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

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

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: clojure, not the go to for data science

2015-04-03 Thread Rafael de F. Ferreira
I would be awesome if you could provide links to some of the books, YouTube
videos, and clojure wrappers that you'd recommend.

On Thursday, April 2, 2015, A  wrote:

>
> Clojure is an Amazing tool for data science.  If people are slow to
> realize this, that is their disadvantage.
>
> The premise that "Clojure hasn't developed as a go to for data science"
> simply doesn't ring true to me at all.  There are numerous examples of
> Clojure use for data science, there are books about it, there are youtube
> videos about it, there are practitioners, there is Incanter, there are
> Transducers, there are Notebooks (Gorilla is awesome), there are Java
> libraries, there are wrapper Clojure libraries, there are a lot of useful
> tools.
>
> Clojure is my "go to for data science" and I often use it either directly,
> or to manage runs using fast tools (like vw), or to prepare SQL-izations of
> data etc... (Btw, your SQL often runs as easily in
> Postgres/Redshift/Hive/Spark with minimal changes if any if you need to
> scale etc... If you treat your SQL the way you treat HTML, let your customs
> functions write it, you get a lot of analytic power that is not tied to any
> particular database).  There is Clojurescript for visualization... There is
> so much that I am certain I am forgetting to mention some of it.
>
> Also, Big +1 for emacs use (cider is awesome! I rarely want to touch a
> mouse... )
>
> Thanks for an amazing, innovative Emacs and Clojure commuity!!
>
> -Avram
>
> The sky is the limit.
>
>
>
>
>
>
>
> On Sunday, March 29, 2015 at 2:55:34 AM UTC-7, Sayth Renshaw wrote:
>>
>> Hi
>>
>> I last learned clojure in 1.2. Just curious why Clojure hasn't developed
>> as a go to for data science?
>>
>> It never seems to get a mention R,Python and now Julia get the attention.
>> By design it would appear that Clojure would be a good fit. Is it a lack of
>> libraries, ease of install, no good default environment  (R Rstudio,
>> IPython ) where as you would need to use emacs with clojure, or is there
>> just a better default use of Clojure?
>>
>> Sayth
>
>  --
> 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.
>


-- 
--
Rafael de F. Ferreira.
http://www.rafaelferreira.net/

-- 
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] Buddy 0.5.0: Security library for clojure.

2015-04-03 Thread Andrey Antukh
Hi!

I am happy to announce a new release of buddy, a security library for
clojure.

Since the buddy is split in different modules, here relevant changes across
all modules:

buddy-core:

- Add support for AEAD mode of operations (gcm)
- Add support for AES Key Wrapping algorithms.
- Add support for deflate compression algorithm.
- Several fixes for padding, codecs and keys namespaces.

buddy-sign:

- Add support for JWE (Json Web Encryption) specification. With support for
all specified (in RFC) content encryption algorithms and good subset of key
encryption algorithms, including asymmetric key encryption schemes.
- Add support also for JWE and JWS registered claims validation: aud, iss
(exp, nbf are already supported previously).
- The default JWE and JWS api not raises descriptive exceptions instead of
returning a useless nil in case of something goes wrong on unsing/decrypt
process (breaking change).
- Implement security considerations from
https://auth0.com/blog/2015/03/31/critical-vulnerabilities-in-json-web-token-libraries/
(breaking change because now is more strict with parameters)

buddy-auth:

- Improved exception based authorization system, removing all java source
(now is 100% clojure source).
- Add JWE authentication/authorization backend.
- Add the ability to match by http method on access rules.
- Add the ability to set multiple authentication backends in
`wrap-authentication` middleware.
- Several bugfixes on all parts of the library.

Github:
https://github.com/funcool/buddy-core
https://github.com/funcool/buddy-auth
https://github.com/funcool/buddy-hashers
https://github.com/funcool/buddy-sign

Documentation:
https://funcool.github.io/buddy-core/latest/
https://funcool.github.io/buddy-auth/latest/
https://funcool.github.io/buddy-hashers/latest/
https://funcool.github.io/buddy-sign/latest/

Cheers.
Andrey

-- 
Andrey Antukh - Андрей Антух -  / 
http://www.niwi.be 
https://github.com/niwibe

-- 
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: Update multiple values in vector at once

2015-04-03 Thread Leon Grapenthin
(defn upd-vec [input-vector ids new-values]
  (apply assoc input-vector (interleave ids new-values)))

(upd-vec [0 0 0 0 0] [1 3] [1.44 1.45])

;=> [0 1.44 0 1.45 0] 


On Monday, March 30, 2015 at 8:05:44 PM UTC+2, Alexandr wrote:
>
> Hello everybody,
>
> How can I update values in the vector given vector of id-s and new values?
>
> For example
>
> (defn upd-vec [input-vector ids new-values]
> 
> )
>
> (upd-vec [0 0 0 0 0] [1 3] [1.44 1.45]) 
>
> Output: [0 1.44 0 1.45 0]  (1st and 3rd elements are replaced)
>

-- 
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: Transducers: sequence versus eduction

2015-04-03 Thread Alex Miller
I understand your point and there are several competing comparisons here. 
Generally only collection functions take the coll first. eduction is 
similar to sequence (and into and reduce and transduce) in taking it last 
(but differs in taking multiple xforms). The multiple xforms are similar to 
->> though which works left to right and puts the source first. I think I'd 
rather emphasize it's similarity to sequence than its similarity to ->>.


On Friday, April 3, 2015 at 10:08:38 AM UTC-5, miner wrote:
>
>
> > On Apr 1, 2015, at 11:16 AM, Alex Miller  > wrote: 
> > 
> > - eduction now takes multiple transformations, not just one, and 
> composes them. This is designed for mechanical rewriting (hello tool 
> developers!!) of ->> chains like this: 
> > 
> > (->> s (interpose 5) (partition-all 2)) 
> > 
> > to this: 
> > 
> > (->> s (eduction (interpose 5) (partition-all 2))) 
> > 
>
> Maybe it’s just me, but the eduction argument order just looks strange to 
> me.  For a variadic function, I would have expected the single collection 
> to come first, then any number of xforms.  There must be a better reason 
> than mechanical rewriting.  Wouldn't a macro make more sense? 
>
> (defmacro educe->> [coll & xfs] `(->Eduction (comp ~@xfs) ~coll)) 
>
> So the rewrite could be just educe->> for ->>, without having to wrap the 
> xforms at all. 
>
> (educe->> s (interpose 5) (partition-all 2)) 
>
>
>
> Steve Miner 
> steve...@gmail.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: Transducers: sequence versus eduction

2015-04-03 Thread Steve Miner

> On Apr 1, 2015, at 11:16 AM, Alex Miller  wrote:
> 
> - eduction now takes multiple transformations, not just one, and composes 
> them. This is designed for mechanical rewriting (hello tool developers!!) of 
> ->> chains like this:
> 
> (->> s (interpose 5) (partition-all 2))
> 
> to this:
> 
> (->> s (eduction (interpose 5) (partition-all 2)))
> 

Maybe it’s just me, but the eduction argument order just looks strange to me.  
For a variadic function, I would have expected the single collection to come 
first, then any number of xforms.  There must be a better reason than 
mechanical rewriting.  Wouldn't a macro make more sense?

(defmacro educe->> [coll & xfs] `(->Eduction (comp ~@xfs) ~coll))

So the rewrite could be just educe->> for ->>, without having to wrap the 
xforms at all.

(educe->> s (interpose 5) (partition-all 2))



Steve Miner
stevemi...@gmail.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.


[ANN] ednsl-0.2.0: a super-simple DSL for building DSLs

2015-04-03 Thread James Laver
It’s not quite as stupid as it sounds and it’s mostly the result of factoring 
out the config handling code from oolong[1]

https://github.com/jjl/ednsl/
https://clojars.org/ednsl

Happy hacking!

James

[1] https://github.com/jjl/oolong/


-- 
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: into still losing metadata (CLJ-916)

2015-04-03 Thread Gregg Reynolds
On Fri, Apr 3, 2015 at 8:06 AM, Alex Miller  wrote:

> The CLJ-916 commit (
> https://github.com/clojure/clojure/commit/b5d0e84f92038449312bea4c31dcdedd499e28b8)
> looks like it preserved meta on the to collection but did not merge meta
> from the from collection, so as far as I can tell this is a new
> enhancement. Feel free to file a ticket for that but seems unlikely we'll
> get it into 1.7.
>

CLJ-1693, thanks.

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: into still losing metadata (CLJ-916)

2015-04-03 Thread Alex Miller
The CLJ-916 commit 
(https://github.com/clojure/clojure/commit/b5d0e84f92038449312bea4c31dcdedd499e28b8)
 
looks like it preserved meta on the to collection but did not merge meta 
from the from collection, so as far as I can tell this is a new 
enhancement. Feel free to file a ticket for that but seems unlikely we'll 
get it into 1.7.

On Friday, April 3, 2015 at 7:14:31 AM UTC-5, Gregg Reynolds wrote:
>
> Hi,
>
> http://dev.clojure.org/jira/browse/CLJ-916 reports that into loses 
> metadata; it is marked closed and fixed in 1.5.  However, into still seems 
> to be losing metadata.  The relevant code from 1.7-alpha6 (core.clj) is:
>
>  (if (instance? clojure.lang.IEditableCollection to)
>(with-meta (persistent! (reduce conj! (transient to) from)) (meta 
> to))
>
> What I need is something like
>
>  (if (instance? clojure.lang.IEditableCollection to)
>(with-meta (persistent! (reduce conj! (transient to) from)) (merge 
> (meta to) (meta from))
>
> Did the fix get lost, or is there a problem with changing into's handling 
> of metadata?
>
> Thanks,
>
> Greggg
>
>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ANN] Clojure 1.7.0-alpha6 released

2015-04-03 Thread Alex Miller
If you want caching behavior, then use it as a sequence. If you want faster 
iteration, use it via reduce. The whole point of this change is to open the 
faster reduce path, which you won't get if you also cache.

I did some research a few months back via crossclj looking at how people 
typically use iterate. I can't actually remember finding any use cases other 
than inc or something similar (but it's been a while).



> On Apr 2, 2015, at 6:11 PM, Nicola Mometto  wrote:
> 
> 
> The recent changes to iterate come with an interesting consequence:
> reducing an iterate multiple times will cause the entire chain of x, (f
> x), (f (f x)) .. to be recalculated every time.
> 
> I'd argue that this is not desiderable and a regression (even though
> probably one considered by design), and that this change in behaviour is
> going to produce a degradation in performance when the function to
> iterate actually does some computation rather than being a trivial
> function like the one used in the benchmarks in the CLJ-1603 ticket
> (inc) since its result won't be cached.
> 
> If changing the new behaviour is out of the question I'd suggest to at
> least document this new behaviour. The docstring of iterate talks about
> returning a lazy-seq while when used with reduce it is actually a
> generator.
> 
> To show what I mean here's a silly example using Threa/sleep to simulate
> computation:
> 
> Clojure 1.7.0-alpha5
> user=> (def a (iterate #(do (Thread/sleep 2) (inc %)) 0))
> #'user/a
> user=> (time (reduce (fn [_ x] (if (= 50 x) (reduced nil))) nil a))
> "Elapsed time: 106.385891 msecs"
> nil
> user=> (time (reduce (fn [_ x] (if (= 50 x) (reduced nil))) nil a))
> "Elapsed time: 0.560275 msecs"
> nil
> 
> Clojure 1.7.0-master-SNAPSHOT
> user=> (def a (iterate #(do (Thread/sleep 2) (inc %)) 0))
> #'user/a
> user=> (time (reduce (fn [_ x] (if (= 50 x) (reduced nil))) nil a))
> "Elapsed time: 109.088477 msecs"
> nil
> user=> (time (reduce (fn [_ x] (if (= 50 x) (reduced nil))) nil a))
> "Elapsed time: 109.51494 msecs"
> nil
> 

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


into still losing metadata (CLJ-916)

2015-04-03 Thread Gregg Reynolds
Hi,

http://dev.clojure.org/jira/browse/CLJ-916 reports that into loses
metadata; it is marked closed and fixed in 1.5.  However, into still seems
to be losing metadata.  The relevant code from 1.7-alpha6 (core.clj) is:

 (if (instance? clojure.lang.IEditableCollection to)
   (with-meta (persistent! (reduce conj! (transient to) from)) (meta
to))

What I need is something like

 (if (instance? clojure.lang.IEditableCollection to)
   (with-meta (persistent! (reduce conj! (transient to) from)) (merge
(meta to) (meta from))

Did the fix get lost, or is there a problem with changing into's handling
of metadata?

Thanks,

Greggg

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ANN] Clojure 1.7.0-alpha6 released

2015-04-03 Thread tcrayford
Alex:

I'd bet heavily on the "slower" ones being measurement noise (they only 
differ by a few percent) - I typically see that much variation between 
runs. I probably shouldn't have reported them as "slower" - 1-5% is (in my 
experience) typically just noise, so don't think it's worth digging into.

On Thursday, 2 April 2015 21:39:54 UTC+9, Alex Miller wrote:
>
> Great to hear feedback like this! I'd be particularly interested if you 
> had any suspicions about the characteristics of the ones that are slower.
>
>
>
> On Apr 2, 2015, at 3:22 AM, tcrayford > 
> wrote:
>
> Yeller (yellerapp.com) (which I maintain) has a comprehensive benchmark 
> suite
> (using criterium, with a heck of a lot of work put into getting real and 
> good
> results). I've run Yeller's benchmark suite against clojure 1.7 alpha6 - 
> it's
> pretty comprehensive, and covers a wide range of things. Results are below.
>
> Mostly some things got very minorly slower (but not enough to make a real
> impact for the application), but quite a few benchmarks saw **dramatic**
> speedups.
>
> Given these promising results, I ran Yeller's `test.check` suite for 8 
> hours in
> CI, and didn't see any failures, so I've deployed 1.7 alpha6 to 
> production, and
> haven't seen any issues as of yet.
>
> Yeller's build also got ~24 seconds faster, which is super awesome (and it 
> no
> longer breaks under CLJ-1604 because that patch is in).
>
> Much love to all the folk who put time and work into this release.
>
> Benchmark names retracted because they're proprietary. Each line is a 
> seperate benchmark, recorded on production level hardware, with the same 
> jvm options/version used in production. Each benchmark is run in its own 
> JVM (because otherwise JIT path dependence will kill you).
>
> Benchmarks that were slower under 1.7 alpha6 vs 1.6.0 (with percentage 
> changed amounts):
> 3.12%
> 2.62%
> 2.27%
> 2.19%
> 2.17%
> 2.06%
> 1.97%
> 1.43%
> 1.29%
> 0.89%
> 0.74%
> 0.71%
> 0.58%
> 0.45%
> 0.42%
> 0.34%
> 0.27%
> 0.25%
> 0.21%
> 0.2%
> 0.08%
> 0.03%
>
> Benchmarks that were faster under 1.7 alpha6 vs 1.6.0 (with percentage 
> changed amounts):
> +0.0%
> +0.0%
> +0.01%
> +0.02%
> +0.03%
> +0.03%
> +0.03%
> +0.04%
> +0.04%
> +0.09%
> +0.12%
> +0.16%
> +0.31%
> +0.33%
> +0.52%
> +0.53%
> +0.85%
> +1.74%
> +1.84%
> +1.99%
> +2.14%
> +2.17%
> +2.42%
> +2.96%
> +3.0%
> +5.18%
> +5.36%
> +9.86%
> +11.93%
> +12.41%
> +14.36%
> +16.95%
> +24.71%
> +53.5%
> +53.62%
> +72.07%
>
> Thanks again! Super excited about this release.
>
> On Wednesday, 1 April 2015 01:51:13 UTC+9, Alex Miller wrote:
>
> Clojure 1.7.0-alpha6 is now available.
>
> Try it via
> - Download: 
> https://repo1.maven.org/maven2/org/clojure/clojure/1.7.0-alpha6/
> - Leiningen: [org.clojure/clojure "1.7.0-alpha6"]
>
> Regression fixes from previous alphas (and one from 1.6):
>
> 1) CLJ-1544 was rolled back and will be investigated for a future release.
> 2) CLJ-1637 fixed regression with vec on MapEntry 
> 3) CLJ-1663 fixed regression in classloader (affected Cursive)
> 4) CLJ-1638 fixed regression with removed PersistentVector.create(List) 
> method
> 5) CLJ-1681 fixed regression in 1.6 with NPE on reflection warning for 
> literal nil arg
> 6) CLJ-1604 fixed problem with AOT and shadowing clojure.core symbols that 
> prevented update
>
> Some highlights new in alpha6:
>
> ## Transducer-related changes:
>
> The LazyTransformer introduced to create lazy transforming sequences has 
> been 
> replaced with a TransformingIterator. This was done to simplify the code
> around transformations and to make certain use cases around eduction more 
> efficient.
>
> ## Faster reduce, iterator, and sequence paths
>
> A lot of work has been done across a set of tickets to improve the ability 
> of
> collections to provide more efficient reduce or iterator performance, and 
> also to
> make common sequence generators create faster sequence and reduce paths. 
> You
> should see significant performance in many reduce-related paths (this 
> includes 
> reduce, transduce, into, and anything else built on reduce). 
>
> Many of those changes also have beneficial sequence performance, so you 
> may see
> some benefits even in code that does not use transducers.
>
> * Most uses of SeqIterator have now been replaced with iterators that 
> directly walk
> the underlying source for improved efficiency. This includes maps, sets, 
> records, etc.
> * repeat - now returns a faster sequence with a fast reduce path
> * cycle - now returns a faster sequence with a fast reduce path
> * iterate - now returns a faster sequence with a fast reduce path
> * range - (did not quite make it in, but coming soon...)
> * keys - iterates directly over the keys of a map, without seq or MapEntry 
> allocation
> * vals - iterates directly over the vals of a map, without seq or MapEntry 
> allocation
> * iterator-seq - now creates a chunked sequence when previously it was 
> unchunked
> * vec and set - were not changed in this releas