[ANN] expresso 0.1.0 released

2013-08-26 Thread Maik Schünemann
Hi, 
I released a first version of my gsoc project expresso [1].
This is an important Milestone in my gsoc project.
What is there:
an expressive and powerful rule based translator, on top of which many 
transformations can be based.
functions to simplify (currently without ratio test), differentiate, 
rearrange, solve expressions.
functions to optimize an expression (includes 
common-sub-expression-elimination, constant-folding, replacement
with special operators, matrix-chain-optimization, ...)

The solver can solve multiple simultaneous equations.
currently it solves equations, which are polynomials up to degree 2, in 
which the number of occurrences of the unknown
can be reduced to one by simplifying the expression or which consists of 
factors in above form. variables as parameters
are supported everywhere.

The last weeks of gsoc I will be making the above transformations more 
stable, eliminate as many bugs as I can find
(feel free to report some you notice), and extending the range of 
expressions which can be transformed by these transformations, 
as well as thoroughly documenting the work that has been done.
See the github repository and README.md for details [1]

[1] https://github.com/clojure-numerics/expresso

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


Re: [ANN] optparse-clj: Functional GNU-style command line options parsing

2013-08-26 Thread guns
On Sun 25 Aug 2013 at 09:05:15PM -0500, gaz jones wrote:

> Hey, i am the current maintainer of tools.cli - i have very little
> time to make any changes to it at the moment (kids :) ). I'm not sure
> what the process is for adding you as a developer or transferring
> ownership etc but if I'm happy to do so as I have no further plans for
> working on it.

I would be honoured to have commit access to tools.cli. I am very keen
on API stability and smooth transitions, so there would be no need to
worry about crazy breaking changes at the hands of a new maintainer.

My Clojure CA will be in the post today, and when I receive confirmation
I will mail you a proposal of how I would like to add to the project.

I see that you're in Chicago; perhaps I can convince you to meet in
person so that I may procure one of these secret rings of power that
Rich Hickey is rumoured to pass to Clojure developers.

:)

guns


pgpNErNn80zRF.pgp
Description: PGP signature


Re: [ANN] optparse-clj: Functional GNU-style command line options parsing

2013-08-26 Thread Cedric Greevey
You already got the ring of power when you downloaded Clojure. ;)


On Mon, Aug 26, 2013 at 8:57 AM, guns  wrote:

> On Sun 25 Aug 2013 at 09:05:15PM -0500, gaz jones wrote:
>
> > Hey, i am the current maintainer of tools.cli - i have very little
> > time to make any changes to it at the moment (kids :) ). I'm not sure
> > what the process is for adding you as a developer or transferring
> > ownership etc but if I'm happy to do so as I have no further plans for
> > working on it.
>
> I would be honoured to have commit access to tools.cli. I am very keen
> on API stability and smooth transitions, so there would be no need to
> worry about crazy breaking changes at the hands of a new maintainer.
>
> My Clojure CA will be in the post today, and when I receive confirmation
> I will mail you a proposal of how I would like to add to the project.
>
> I see that you're in Chicago; perhaps I can convince you to meet in
> person so that I may procure one of these secret rings of power that
> Rich Hickey is rumoured to pass to Clojure developers.
>
> :)
>
> 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/groups/opt_out.


Place of function?

2013-08-26 Thread Christian Sperandio
Hi,

Does anyone know why the functions like: map?, number?, vector?, … belongs to 
the clojure.core but not  function? ?

Christian

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


clojure.java.jdbc: suggestion to name mapping

2013-08-26 Thread Alice
It would be convenient if I can specify the default entities and 
identifiers functions in a database spec. I usually want those mappings to 
be applied all the time.

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


Re: clojure.java.jdbc: suggestion to name mapping

2013-08-26 Thread Shantanu Kumar
Hi Alice,

Do you mean default `values` for entity columns for INSERT statements? And 
by `identifiers function` did you mean functions that decorate an 
identifier representation in an SQL statement -- for example, column name 
emp_id could become `emp_id` on MySQL?

Shantanu

On Monday, 26 August 2013 18:36:16 UTC+5:30, Alice wrote:
>
> It would be convenient if I can specify the default entities and 
> identifiers functions in a database spec. I usually want those mappings to 
> be applied all the time.
>

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


Re: Place of function?

2013-08-26 Thread Jay Fields
you're probably looking for fn?

On Mon, Aug 26, 2013 at 9:11 AM, Christian Sperandio
 wrote:
> Hi,
>
> Does anyone know why the functions like: map?, number?, vector?, … belongs to 
> the clojure.core but not  function? ?
>
> Christian
>
> --
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with your 
> first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups 
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

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


Re: Place of function?

2013-08-26 Thread Christian Sperandio
I didn't think search this term.

Thanks :) 


Le 26 août 2013 à 15:13, Jay Fields  a écrit :

> you're probably looking for fn?
> 
> On Mon, Aug 26, 2013 at 9:11 AM, Christian Sperandio
>  wrote:
>> Hi,
>> 
>> Does anyone know why the functions like: map?, number?, vector?, … belongs 
>> to the clojure.core but not  function? ?
>> 
>> Christian
>> 
>> --
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Clojure" group.
>> To post to this group, send email to clojure@googlegroups.com
>> Note that posts from new members are moderated - please be patient with your 
>> first post.
>> To unsubscribe from this group, send email to
>> clojure+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/clojure?hl=en
>> ---
>> You received this message because you are subscribed to the Google Groups 
>> "Clojure" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to clojure+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/groups/opt_out.
> 
> -- 
> -- 
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with your 
> first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

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


Re: clojure.java.jdbc: suggestion to name mapping

2013-08-26 Thread Alice
Yes. It's described at 
http://clojure-doc.org/articles/ecosystem/java_jdbc/name_mapping.html.

On Monday, August 26, 2013 10:13:22 PM UTC+9, Shantanu Kumar wrote:
>
> Hi Alice,
>
> Do you mean default `values` for entity columns for INSERT statements? And 
> by `identifiers function` did you mean functions that decorate an 
> identifier representation in an SQL statement -- for example, column name 
> emp_id could become `emp_id` on MySQL?
>
> Shantanu
>
> On Monday, 26 August 2013 18:36:16 UTC+5:30, Alice wrote:
>>
>> It would be convenient if I can specify the default entities and 
>> identifiers functions in a database spec. I usually want those mappings to 
>> be applied all the time.
>>
>

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


Re: problem with edn

2013-08-26 Thread Jim - FooBar();

On 23/08/13 10:49, Jim wrote:
I do regret not having checked whether Java serialization preserves 
the metadata or not .I plan to do it this afternoon. If it does ,I've 
got 2 perfectly working ways to achieve what I want, with no extra 
dependencies added... 


I finally got the chance to check whether standard java serialisation 
preserves meta-data and actually it does...so from the looks of it, it 
seems like that would be more appropriate for my use-case, especially if 
I had any specific reasons against the hackish approach demonstrated by 
Meikel. In any case, this can only be good news...both approaches work :)


thanks again :)

Jim

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

To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: ANN Gemini 0.3.0

2013-08-26 Thread Christian Sperandio
Hi,

I released a minor version 0.3.1.

This version provide a way to get a function to find expressions likeness.

I implemented a macro too. This macro reduces the code size by limiting the 
declarations for the expressions likeness.

Christian
https://github.com/chrix75/Gemini 

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


Re: ANN Gemini 0.3.0

2013-08-26 Thread Christian Sperandio
After realising the 0.3.1 version, I wondered if it's a good idea  the
with-likeness macro returns always nil.
it's a mistake,  isn't it?
 Le 26 août 2013 16:50, "Christian Sperandio" 
a écrit :

> Hi,
>
> I released a minor version 0.3.1.
>
> This version provide a way to get a function to find expressions likeness.
>
> I implemented a macro too. This macro reduces the code size by limiting
> the declarations for the expressions likeness.
>
> Christian
> https://github.com/chrix75/**Gemini 
>
>  --
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>

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


Re: ANN Gemini 0.3.0

2013-08-26 Thread Christian Sperandio
I released a version 0.3.2.

The macro with-likeness doesn't return nil anymore. I think this behavior is 
more correct.

Christian
https://github.com/chrix75/Gemini


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


Re: lazy seq from reducers with core.async

2013-08-26 Thread Timothy Baldridge
Although this also ties up a thread for every reduce. Not exactly efficient
IMO.

Timothy


On Sun, Aug 25, 2013 at 11:50 PM, Alan Busby  wrote:

>
> On Mon, Aug 26, 2013 at 1:37 PM, Timothy Baldridge 
> wrote:
>
>> Since reducers use fork-join pools,
>
>
> Reducers use multiple threads and fork-join pools when called with "fold"
> on vectors (anything else?), not "reduce".
> By making the single producer thread of the reducer block on writes, per
> Jozef's code, he's making it act like a lazy-seq.
>
> If fold was used, then something similar to the code snippet I provided
> may be more appropriate.
> It would really depend on the use-case though.
>
> --
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>



-- 
“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/groups/opt_out.


ANN: abracad 0.4.2 – Avro de/serialization for Clojure

2013-08-26 Thread Marshall Bockrath-Vandegrift
Abracad is a library for de/serializing Clojure data structures 
as Avro [1], leveraging the Java Avro implementation.

Avro is a schema-based binary serialization system similar to Thrift or
Protocol Buffers, but with some philosophical differences and better
support for dynamic languages.  In particular, and unlike Thrift or
Protocol Buffers, Avro does not require pre-generated schema-specific
de/serialization code.

Abracad provides Clojure integration for Avro.  Unlike previous Clojure
Avro libraries, Abracad works directly in terms of native Clojure data.
Abracad support: a generic mapping between Avro and Clojure data for
arbitrary schemas; customized protocol-based mappings between Avro
records and any JVM types; and “schema-less” EDN-in-Avro serialization
of arbitrary Clojure data.

Source code is on Github:

  https://github.com/damballa/abracad

Release artifacts are on Clojars.

[1] http://avro.apache.org/

-- 
Marshall Bockrath-Vandegrift 
Damballa Staff Software Engineer

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


Re: clojure.java.jdbc: suggestion to name mapping

2013-08-26 Thread Sean Corfield
The db-spec is not used by the DSL. Name mapping is a function of the
DSL, in general. This request has come up in the past and it just
isn't practical since the db-spec is completely independent of the
DSL.

On Mon, Aug 26, 2013 at 6:06 AM, Alice  wrote:
> It would be convenient if I can specify the default entities and identifiers
> functions in a database spec. I usually want those mappings to be applied
> all the time.
>
> --
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with your
> first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.



-- 
Sean A Corfield -- (904) 302-SEAN
An Architect's View -- http://corfield.org/
World Singles, LLC. -- http://worldsingles.com/

"Perfection is the enemy of the good."
-- Gustave Flaubert, French realist novelist (1821-1880)

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


Re: ANN: clj-tuple, efficient small collections

2013-08-26 Thread Kevin Downey
A Tuple protocol that defines get0 get1 get3 etc for fast element access
that doesn't tie you to using field names might be a good idea.

On 8/25/13 9:35 AM, Zach Tellman wrote:
> I don't think so, even the existence of all the Tuple* types are an 
> implementation detail, and you'd need to hint it as the right one to get 
> sane performance.  (nth t n) has good performance, you should prefer that.
> 
> On Saturday, August 24, 2013 8:15:40 PM UTC-7, Ben wrote:
>>
>> Are the element names .e0, .e1 etc. considered part of the public 
>> interface of tuple objects?
>>
>>
>> On Sat, Aug 24, 2013 at 7:38 PM, Zach Tellman 
>>> wrote:
>>
>>> I just pulled some code I wrote while trying to optimize 'memoize' into 
>>> its own library: https://github.com/ztellman/clj-tuple.  It only has the 
>>> one function, so I assume no one will need too much explanation.  However, 
>>> there may still be room for performance improvements, so if anyone wants to 
>>> take a stab, pull requests are welcome.
>>>
>>> Zach
>>>
>>> -- 
>>> -- 
>>> You received this message because you are subscribed to the Google
>>> Groups "Clojure" group.
>>> To post to this group, send email to clo...@googlegroups.com
>>> Note that posts from new members are moderated - please be patient with 
>>> your first post.
>>> To unsubscribe from this group, send email to
>>> clojure+u...@googlegroups.com 
>>> For more options, visit this group at
>>> http://groups.google.com/group/clojure?hl=en
>>> --- 
>>> You received this message because you are subscribed to the Google Groups 
>>> "Clojure" group.
>>> To unsubscribe from this group and stop receiving emails from it, send an 
>>> email to clojure+u...@googlegroups.com .
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>
>>
>>
>>
>> -- 
>> Ben Wolfson
>> "Human kind has used its intelligence to vary the flavour of drinks, which 
>> may be sweet, aromatic, fermented or spirit-based. ... Family and social 
>> life also offer numerous other occasions to consume drinks for pleasure." 
>> [Larousse, "Drink" entry]
>>
>>  
> 


-- 
And what is good, Phaedrus,
And what is not good—
Need we ask anyone to tell us these things?



signature.asc
Description: OpenPGP digital signature


Re: ANN: clj-tuple, efficient small collections

2013-08-26 Thread Asim Jalis
I believe this is what clj-tuple is doing under the hood with macros.

On Aug 26, 2013, at 10:38 AM, Kevin Downey  wrote:

> A Tuple protocol that defines get0 get1 get3 etc for fast element access
> that doesn't tie you to using field names might be a good idea.
> 
> On 8/25/13 9:35 AM, Zach Tellman wrote:
>> I don't think so, even the existence of all the Tuple* types are an 
>> implementation detail, and you'd need to hint it as the right one to get 
>> sane performance.  (nth t n) has good performance, you should prefer that.
>> 
>> On Saturday, August 24, 2013 8:15:40 PM UTC-7, Ben wrote:
>>> 
>>> Are the element names .e0, .e1 etc. considered part of the public 
>>> interface of tuple objects?
>>> 
>>> 
>>> On Sat, Aug 24, 2013 at 7:38 PM, Zach Tellman 
>>> 
 wrote:
>>> 
 I just pulled some code I wrote while trying to optimize 'memoize' into 
 its own library: https://github.com/ztellman/clj-tuple.  It only has the 
 one function, so I assume no one will need too much explanation.  However, 
 there may still be room for performance improvements, so if anyone wants 
 to 
 take a stab, pull requests are welcome.
 
 Zach
 
 -- 
 -- 
 You received this message because you are subscribed to the Google
 Groups "Clojure" group.
 To post to this group, send email to clo...@googlegroups.com
 Note that posts from new members are moderated - please be patient with 
 your first post.
 To unsubscribe from this group, send email to
 clojure+u...@googlegroups.com 
 For more options, visit this group at
 http://groups.google.com/group/clojure?hl=en
 --- 
 You received this message because you are subscribed to the Google Groups 
 "Clojure" group.
 To unsubscribe from this group and stop receiving emails from it, send an 
 email to clojure+u...@googlegroups.com .
 For more options, visit https://groups.google.com/groups/opt_out.
>>> 
>>> 
>>> 
>>> -- 
>>> Ben Wolfson
>>> "Human kind has used its intelligence to vary the flavour of drinks, which 
>>> may be sweet, aromatic, fermented or spirit-based. ... Family and social 
>>> life also offer numerous other occasions to consume drinks for pleasure." 
>>> [Larousse, "Drink" entry]
> 
> 
> -- 
> And what is good, Phaedrus,
> And what is not good—
> Need we ask anyone to tell us these things?
> 

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


Re: ANN: clj-tuple, efficient small collections

2013-08-26 Thread Jim - FooBar();

I had a quick look at clj-tuple and I don't remember seeing any macros...

Jim


On 26/08/13 19:02, Asim Jalis wrote:

I believe this is what clj-tuple is doing under the hood with macros.

On Aug 26, 2013, at 10:38 AM, Kevin Downey  wrote:


A Tuple protocol that defines get0 get1 get3 etc for fast element access
that doesn't tie you to using field names might be a good idea.

On 8/25/13 9:35 AM, Zach Tellman wrote:

I don't think so, even the existence of all the Tuple* types are an
implementation detail, and you'd need to hint it as the right one to get
sane performance.  (nth t n) has good performance, you should prefer that.

On Saturday, August 24, 2013 8:15:40 PM UTC-7, Ben wrote:

Are the element names .e0, .e1 etc. considered part of the public
interface of tuple objects?


On Sat, Aug 24, 2013 at 7:38 PM, Zach Tellman 

wrote:
I just pulled some code I wrote while trying to optimize 'memoize' into
its own library: https://github.com/ztellman/clj-tuple.  It only has the
one function, so I assume no one will need too much explanation.  However,
there may still be room for performance improvements, so if anyone wants to
take a stab, pull requests are welcome.

Zach

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



--
Ben Wolfson
"Human kind has used its intelligence to vary the flavour of drinks, which
may be sweet, aromatic, fermented or spirit-based. ... Family and social
life also offer numerous other occasions to consume drinks for pleasure."
[Larousse, "Drink" entry]


--
And what is good, Phaedrus,
And what is not good—
Need we ask anyone to tell us these things?



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

To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: ANN: clj-tuple, efficient small collections

2013-08-26 Thread Robert Levy
No, Asim is right, and the majority of LOC is macro code (which expands to
a deftype expression).


On Mon, Aug 26, 2013 at 11:51 AM, Jim - FooBar(); wrote:

> I had a quick look at clj-tuple and I don't remember seeing any macros...
>
> Jim
>
>
>
> On 26/08/13 19:02, Asim Jalis wrote:
>
>> I believe this is what clj-tuple is doing under the hood with macros.
>>
>> On Aug 26, 2013, at 10:38 AM, Kevin Downey  wrote:
>>
>>  A Tuple protocol that defines get0 get1 get3 etc for fast element access
>>> that doesn't tie you to using field names might be a good idea.
>>>
>>> On 8/25/13 9:35 AM, Zach Tellman wrote:
>>>
 I don't think so, even the existence of all the Tuple* types are an
 implementation detail, and you'd need to hint it as the right one to get
 sane performance.  (nth t n) has good performance, you should prefer
 that.

 On Saturday, August 24, 2013 8:15:40 PM UTC-7, Ben wrote:

> Are the element names .e0, .e1 etc. considered part of the public
> interface of tuple objects?
>
>
> On Sat, Aug 24, 2013 at 7:38 PM, Zach Tellman  
>
>> wrote:
>> I just pulled some code I wrote while trying to optimize 'memoize'
>> into
>> its own library: 
>> https://github.com/ztellman/**clj-tuple.
>>  It only has the
>> one function, so I assume no one will need too much explanation.
>>  However,
>> there may still be room for performance improvements, so if anyone
>> wants to
>> take a stab, pull requests are welcome.
>>
>> Zach
>>
>> --
>> --
>> 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<**
>> javascript:>
>> Note that posts from new members are moderated - please be patient
>> with
>> your first post.
>> To unsubscribe from this group, send email to
>> clojure+u...@googlegroups.com 
>> For more options, visit this group at
>> http://groups.google.com/**group/clojure?hl=en
>> ---
>> You received this message because you are subscribed to the Google
>> Groups
>> "Clojure" group.
>> To unsubscribe from this group and stop receiving emails from it,
>> send an
>> email to clojure+u...@googlegroups.com .
>> For more options, visit 
>> https://groups.google.com/**groups/opt_out
>> .
>>
>
>
> --
> Ben Wolfson
> "Human kind has used its intelligence to vary the flavour of drinks,
> which
> may be sweet, aromatic, fermented or spirit-based. ... Family and
> social
> life also offer numerous other occasions to consume drinks for
> pleasure."
> [Larousse, "Drink" entry]
>

>>> --
>>> And what is good, Phaedrus,
>>> And what is not good—
>>> Need we ask anyone to tell us these things?
>>>
>>>
> --
> --
> 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+unsubscribe@**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+unsubscribe@**googlegroups.com
> .
> For more options, visit 
> https://groups.google.com/**groups/opt_out
> .
>

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


CFP: CodeMash - Jan 7-10, 2014 - Sandusky, OH

2013-08-26 Thread Alex Miller
(no affiliation, just passing this along)

CodeMash is a large multi-technology conference in a giant water park with
a great secondary track for kids. It is my opinion that they need some more
Clojure submissions. :)

CFP closes Friday, Sept 6th. http://codemash.org/submissions

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


[ANN] nativot 0.1.0 (leiningen plugin) public beta

2013-08-26 Thread Alex Fowler

hi, nativot is a leiningen plugin that is intended to deliver clojurians 
from the burden of classpath hells of any flavour.

highlights:

1) built upon lein uberjar and jdotsoft jarclassloader
2) makes it possible to deploy clojure application that depend upon any 
jar-files, native libraries, binary resources and other goodness
3) you can deploy your application as a single jar, as well as a single jar 
with externalized resources. more on this at 
http://www.jdotsoft.com/JarClassLoader.php
4) simple

notes:

1) still in beta
2) requires active internet connection
3) due to some leiningen project management pecularities, requires some 
manual project.clj adjustment, see the description at clojars, or the 
description in the next post in this thread
4) creates additional source folders in your project
5) worships the "just put that jar/native/binary nearby and it will be 
included" approach instead of the traditional "repeatability" maven-induced 
one. USE WITH CARE. the plugin is not intended to replace the repeatability 
approach. actually they are better used together.


clojars link: https://clojars.org/nativot

disclaimer: this is my first plugin for leningen and i am new to clojure, 
so take it easy. and thanks to Zach Tellman for kind guidance!

any success stories, failure stories, bug reports, ideas on improvement and 
such are welcomed.


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


Re: [ANN] nativot 0.1.0 (leiningen plugin) public beta

2013-08-26 Thread Alex Fowler
---
description
---

A Leiningen plugin to jar your project with arbitrary jars, native libs and 
resources into main jar.

   Based on the wonderful JDotSoft JarClassLoader.

   USAGE:

A.
---
Create a :nativot profile in your project.clj
The map is this:
:nativot {:nativot-inclusions [\"folder-1\" \"folder-2\"]
  :nativot-main your-project.core ;the main of you project as 
it would normally be
  :nativot-aot [your-project.core jcl.ep]} ;although that did 
not save lein.

B.
---
1) Due to the leiningens pecularities, only :nativot-inclusions matter
2) You have to manually specify :java-source-paths 
[\"src/com/jdotsoft/jarloader\"]
3) You have to manually specify :aot [you-project.core jcl.ep]

Note: The jcl.ep is a must.

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


[ANN] zmq-async: A thread safe core.async wrapper for ZeroMQ

2013-08-26 Thread Kevin Lynagh
Hi everyone,

I wrote a core.async-based wrapper for ZeroMQ: 
https://github.com/lynaghk/zmq-async

ZeroMQ is a message-oriented socket library with bindings to lots of 
languages and support for a variety of communication styles (request/reply, 
publish/subscribe, in-process pair sockets, push/pull, &c.).
The biggest issue I had using ZeroMQ directly in Java (via the jzmq 
bindings) is that the socket objects aren't thread safe.
You have to be careful when you want to, e.g, have worker threads send 
completed work over the same socket to a consumer.
This library sets up two message pump threads on your behalf and exposes 
ZeroMQ sockets to you with core.async channels.

Rather than trying to wrap all ZeroMQ socket options, the library accepts a 
configurator function that twiddles newly created socket objects.
(Similar to how Ring's Jetty adapter lets you twiddle the Jetty server.)
You'll need ZeroMQ 3.2 installed on your machine, but the JAR includes 
native JNI bindings for Linux x64 and OS X x64.

The only other up-to-date ZeroMQ library for Clojure that I'm aware of is: 
https://github.com/zeromq/cljzmq

Right now there isn't a non-SNAPSHOT core.async release, so I cannot 
release a 0.1.0 of this library.
However, I have been using it for several weeks on a few different projects 
and don't anticipate making any changes to the (very tiny) API.

Big thanks to: Brandon Bloom, Zach Allaun, Zach Tellman, Alex Miller, 
Timothy Baldridge, and Rich Hickey for help with designing+coding this 
library.

cheers,

Kevin

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


[ANN] jetty7-websockets-async: A core.async wrapper for websocket client/server communications

2013-08-26 Thread Kevin Lynagh
Hi everyone,

I wrote a core.async wrapper for Jetty 7 websockets: 
https://github.com/lynaghk/jetty7-websockets-async

On past projects I've used http-kit, Aleph/Netty, and Jetty 9 for 
websockets.
However, I recently discovered that good 'ol Jetty 7 (of ring-jetty-adapter 
fame) can act both as a websocket client and server with the help of an 
extra JAR.

This tiny library gives you core.async channels for reading/writing to 
websocket connections.
The README shows a small example of running a ring HTTP handler and 
websocket handler on the same Jetty port and server.

Right now the channels handle string data only, but according to the 
JavaDoc 
(http://download.eclipse.org/jetty/stable-7/apidocs/org/eclipse/jetty/websocket/WebSocket.html)
 
it shouldn't be too difficult to also support binary data---ping me if you 
need this.

Big thanks to Zach Allaun and the summer 2013 batch of Hacker School for 
help designing and coding this library

cheers,

Kevin

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


Re: ANN: clj-tuple, efficient small collections

2013-08-26 Thread Zach Tellman
I'm not sure I understand the motivation behind what you're suggesting.
 Why not just (nth tuple 0)?


On Mon, Aug 26, 2013 at 10:38 AM, Kevin Downey  wrote:

> A Tuple protocol that defines get0 get1 get3 etc for fast element access
> that doesn't tie you to using field names might be a good idea.
>
> On 8/25/13 9:35 AM, Zach Tellman wrote:
> > I don't think so, even the existence of all the Tuple* types are an
> > implementation detail, and you'd need to hint it as the right one to get
> > sane performance.  (nth t n) has good performance, you should prefer
> that.
> >
> > On Saturday, August 24, 2013 8:15:40 PM UTC-7, Ben wrote:
> >>
> >> Are the element names .e0, .e1 etc. considered part of the public
> >> interface of tuple objects?
> >>
> >>
> >> On Sat, Aug 24, 2013 at 7:38 PM, Zach Tellman  
> >>> wrote:
> >>
> >>> I just pulled some code I wrote while trying to optimize 'memoize' into
> >>> its own library: https://github.com/ztellman/clj-tuple.  It only has
> the
> >>> one function, so I assume no one will need too much explanation.
>  However,
> >>> there may still be room for performance improvements, so if anyone
> wants to
> >>> take a stab, pull requests are welcome.
> >>>
> >>> Zach
> >>>
> >>> --
> >>> --
> >>> You received this message because you are subscribed to the Google
> >>> Groups "Clojure" group.
> >>> To post to this group, send email to clo...@googlegroups.com
> 
> >>> Note that posts from new members are moderated - please be patient with
> >>> your first post.
> >>> To unsubscribe from this group, send email to
> >>> clojure+u...@googlegroups.com 
> >>> For more options, visit this group at
> >>> http://groups.google.com/group/clojure?hl=en
> >>> ---
> >>> You received this message because you are subscribed to the Google
> Groups
> >>> "Clojure" group.
> >>> To unsubscribe from this group and stop receiving emails from it, send
> an
> >>> email to clojure+u...@googlegroups.com .
> >>> For more options, visit https://groups.google.com/groups/opt_out.
> >>>
> >>
> >>
> >>
> >> --
> >> Ben Wolfson
> >> "Human kind has used its intelligence to vary the flavour of drinks,
> which
> >> may be sweet, aromatic, fermented or spirit-based. ... Family and social
> >> life also offer numerous other occasions to consume drinks for
> pleasure."
> >> [Larousse, "Drink" entry]
> >>
> >>
> >
>
>
> --
> And what is good, Phaedrus,
> And what is not good—
> Need we ask anyone to tell us these things?
>
>

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


Re: ANN: clj-tuple, efficient small collections

2013-08-26 Thread Kevin Downey
looking at clj-tuple a call to (nth some-tuple 0) turns in to a case
dispatch

(case idx
  0 e0
  ...)

or something.

if you have a Tuple protocol with a function like get0 you can avoid the
overhead of the case there, and the jvm has a better change of inlining
the rest away.

for hotspot to optimize the case away is much more challenging (requires
the jit to track the index value, which it may actually do?) than
optimizing a method which is basically just a java getter (very common
code pattern the jvm sees all the time).

the last time I looked in to this was before criterium was available, so
I don't have proper jvm benchmarking for it, but I do believe a Tuple
protocol with something like get0 will be faster than (nth ... 0).

the down side of the get0 approach is you cannot destructuring that way.

On 8/26/13 11:02 AM, Asim Jalis wrote:
> I believe this is what clj-tuple is doing under the hood with macros.
> 
> On Aug 26, 2013, at 10:38 AM, Kevin Downey  wrote:
> 
>> A Tuple protocol that defines get0 get1 get3 etc for fast element access
>> that doesn't tie you to using field names might be a good idea.
>>
>> On 8/25/13 9:35 AM, Zach Tellman wrote:
>>> I don't think so, even the existence of all the Tuple* types are an 
>>> implementation detail, and you'd need to hint it as the right one to get 
>>> sane performance.  (nth t n) has good performance, you should prefer that.
>>>
>>> On Saturday, August 24, 2013 8:15:40 PM UTC-7, Ben wrote:

 Are the element names .e0, .e1 etc. considered part of the public 
 interface of tuple objects?


 On Sat, Aug 24, 2013 at 7:38 PM, Zach Tellman 
 
> wrote:

> I just pulled some code I wrote while trying to optimize 'memoize' into 
> its own library: https://github.com/ztellman/clj-tuple.  It only has the 
> one function, so I assume no one will need too much explanation.  
> However, 
> there may still be room for performance improvements, so if anyone wants 
> to 
> take a stab, pull requests are welcome.
>
> Zach
>
> -- 
> -- 
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clo...@googlegroups.com
> Note that posts from new members are moderated - please be patient with 
> your first post.
> To unsubscribe from this group, send email to
> clojure+u...@googlegroups.com 
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to clojure+u...@googlegroups.com .
> For more options, visit https://groups.google.com/groups/opt_out.



 -- 
 Ben Wolfson
 "Human kind has used its intelligence to vary the flavour of drinks, which 
 may be sweet, aromatic, fermented or spirit-based. ... Family and social 
 life also offer numerous other occasions to consume drinks for pleasure." 
 [Larousse, "Drink" entry]
>>
>>
>> -- 
>> And what is good, Phaedrus,
>> And what is not good—
>> Need we ask anyone to tell us these things?
>>
> 


-- 
And what is good, Phaedrus,
And what is not good—
Need we ask anyone to tell us these things?



signature.asc
Description: OpenPGP digital signature


too circular?

2013-08-26 Thread Dennis Haupt
(defn fib-n [n]
  (let [fib (fn [a b] (cons a (lazy-seq (fib b (+ b a)]
(take n (fib 1 1

can't i do a recursion here? how can i achieve this without doing an "outer
defn"?

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


Re: too circular?

2013-08-26 Thread Marshall Bockrath-Vandegrift
Dennis Haupt  writes:

> (defn fib-n [n] 
> (let [fib (fn [a b] (cons a (lazy-seq (fib b (+ b a)] 
> (take n (fib 1 1
>
> can't i do a recursion here? how can i achieve this without doing an
> "outer defn"?

You just need to give the anonymous function a name it can use to refer
to itself for (non-tail) recursion:

(defn fib-n [n] 
  (let [fib (fn fib [a b] (cons a (lazy-seq (fib b (+ b a)]
(take n (fib 1 1

-Marshall

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


Re: too circular?

2013-08-26 Thread Sean Corfield
If you want the sequence itself, so you can take various prefixes of it:

(def fib (cons 1 (cons 1 (map + fib (rest fib)

(take 5 fib)
(take 10 fib)

Has the advantage of not recalculating any part of it - and the
disadvantage of holding onto the head - so it depends what you want to
do with it.


On Mon, Aug 26, 2013 at 2:40 PM, Dennis Haupt  wrote:
> (defn fib-n [n]
>   (let [fib (fn [a b] (cons a (lazy-seq (fib b (+ b a)]
> (take n (fib 1 1
>
> can't i do a recursion here? how can i achieve this without doing an "outer
> defn"?
>
> --
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with your
> first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.



-- 
Sean A Corfield -- (904) 302-SEAN
An Architect's View -- http://corfield.org/
World Singles, LLC. -- http://worldsingles.com/

"Perfection is the enemy of the good."
-- Gustave Flaubert, French realist novelist (1821-1880)

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


Re: [ANN] nativot 0.1.0 (leiningen plugin) public beta

2013-08-26 Thread Mikera
JarClassLoader looks cool

Aren't there some pretty severe licensing restrictions though? Looks like 
it is GPLv3 or commercial license only from the website, which rules it out 
of most EPL projects I think

On Tuesday, 27 August 2013 03:50:10 UTC+8, Alex Fowler wrote:
>
>
> hi, nativot is a leiningen plugin that is intended to deliver clojurians 
> from the burden of classpath hells of any flavour.
>
> highlights:
>
> 1) built upon lein uberjar and jdotsoft jarclassloader
> 2) makes it possible to deploy clojure application that depend upon any 
> jar-files, native libraries, binary resources and other goodness
> 3) you can deploy your application as a single jar, as well as a single 
> jar with externalized resources. more on this at 
> http://www.jdotsoft.com/JarClassLoader.php
> 4) simple
>
> notes:
>
> 1) still in beta
> 2) requires active internet connection
> 3) due to some leiningen project management pecularities, requires some 
> manual project.clj adjustment, see the description at clojars, or the 
> description in the next post in this thread
> 4) creates additional source folders in your project
> 5) worships the "just put that jar/native/binary nearby and it will be 
> included" approach instead of the traditional "repeatability" maven-induced 
> one. USE WITH CARE. the plugin is not intended to replace the repeatability 
> approach. actually they are better used together.
>
>
> clojars link: https://clojars.org/nativot
>
> disclaimer: this is my first plugin for leningen and i am new to clojure, 
> so take it easy. and thanks to Zach Tellman for kind guidance!
>
> any success stories, failure stories, bug reports, ideas on improvement 
> and such are welcomed.
>
>
>

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


Re: YA regular expression tool

2013-08-26 Thread Paulo Suzart
This will save my time a lot. No more rubular.com :)

great


On 1 August 2013 21:33, Joel Holdbrooks  wrote:

> Thanks. This tool was really more or less for fun but I'd been thinking
> about it for a while. According to some benchmarks it appears the generated
> patterns are pretty fast. When I get some more time, I definitely want to
> see if converting the word trie to a DAWG and then to a regular expression
> will produce even better patterns. Of course, this means pattern
> construction will be slower.
>
> More or less I'd like some input on ways to improve the efficiency of the
> whole thing.
>
>
> On Tuesday, July 30, 2013 3:49:49 AM UTC-7, Mikera wrote:
>>
>> On Monday, 29 July 2013 21:20:49 UTC+1, Joel Holdbrooks wrote:
>>>
>>> I spent some time this weekend writing a little tool for generating
>>> regular expressions *from known inputs*. My goal is to produce regular
>>> expressions that backtrack as few times as possible along with a complete
>>> and total disregard for readability. :)
>>>
>>> The code for the tool is here .
>>> Suggestions/ideas would be greatly appreciated.
>>>
>>
>> Nice - I like the fact that it has a very simple API that focuses on
>> doing just one thing well!
>>
>  --
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>



-- 
Paulo Suzart
@paulosuzart

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


Re: clojure.java.jdbc: suggestion to name mapping

2013-08-26 Thread Alice
Then, how about making them global so that they can be altered?
I know global parameters are ugly, but having to specify them every time is 
really a pain.

On Tuesday, August 27, 2013 2:32:20 AM UTC+9, Sean Corfield wrote:
>
> The db-spec is not used by the DSL. Name mapping is a function of the 
> DSL, in general. This request has come up in the past and it just 
> isn't practical since the db-spec is completely independent of the 
> DSL. 
>
> On Mon, Aug 26, 2013 at 6:06 AM, Alice > 
> wrote: 
> > It would be convenient if I can specify the default entities and 
> identifiers 
> > functions in a database spec. I usually want those mappings to be 
> applied 
> > all the time. 
> > 
> > -- 
> > -- 
> > You received this message because you are subscribed to the Google 
> > Groups "Clojure" group. 
> > To post to this group, send email to clo...@googlegroups.com 
> > Note that posts from new members are moderated - please be patient with 
> your 
> > first post. 
> > To unsubscribe from this group, send email to 
> > clojure+u...@googlegroups.com  
> > For more options, visit this group at 
> > http://groups.google.com/group/clojure?hl=en 
> > --- 
> > You received this message because you are subscribed to the Google 
> Groups 
> > "Clojure" group. 
> > To unsubscribe from this group and stop receiving emails from it, send 
> an 
> > email to clojure+u...@googlegroups.com . 
> > For more options, visit https://groups.google.com/groups/opt_out. 
>
>
>
> -- 
> Sean A Corfield -- (904) 302-SEAN 
> An Architect's View -- http://corfield.org/ 
> World Singles, LLC. -- http://worldsingles.com/ 
>
> "Perfection is the enemy of the good." 
> -- Gustave Flaubert, French realist novelist (1821-1880) 
>

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


Re: clojure.java.jdbc: suggestion to name mapping

2013-08-26 Thread Sean Corfield
You can wrap your code in (entities ...) and/or (identifiers ...) and
it will apply to all the java.jdbc calls inside.

Clojure/core have specifically said they don't want *dynamic-vars* in
contrib libraries.

We have thousands of lines of java.jdbc code at work and name mapping
hasn't been an issue - it's easy enough to wrap calls where name
mapping is really needed - and mostly it isn't.

Can you explain your use case where you have a problem with the current setup?

Sean

On Mon, Aug 26, 2013 at 8:23 PM, Alice  wrote:
> Then, how about making them global so that they can be altered?
> I know global parameters are ugly, but having to specify them every time is
> really a pain.
>
>
> On Tuesday, August 27, 2013 2:32:20 AM UTC+9, Sean Corfield wrote:
>>
>> The db-spec is not used by the DSL. Name mapping is a function of the
>> DSL, in general. This request has come up in the past and it just
>> isn't practical since the db-spec is completely independent of the
>> DSL.
>>
>> On Mon, Aug 26, 2013 at 6:06 AM, Alice  wrote:
>> > It would be convenient if I can specify the default entities and
>> > identifiers
>> > functions in a database spec. I usually want those mappings to be
>> > applied
>> > all the time.
>> >
>> > --
>> > --
>> > You received this message because you are subscribed to the Google
>> > Groups "Clojure" group.
>> > To post to this group, send email to clo...@googlegroups.com
>> > Note that posts from new members are moderated - please be patient with
>> > your
>> > first post.
>> > To unsubscribe from this group, send email to
>> > clojure+u...@googlegroups.com
>> > For more options, visit this group at
>> > http://groups.google.com/group/clojure?hl=en
>> > ---
>> > You received this message because you are subscribed to the Google
>> > Groups
>> > "Clojure" group.
>> > To unsubscribe from this group and stop receiving emails from it, send
>> > an
>> > email to clojure+u...@googlegroups.com.
>> > For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>>
>> --
>> Sean A Corfield -- (904) 302-SEAN
>> An Architect's View -- http://corfield.org/
>> World Singles, LLC. -- http://worldsingles.com/
>>
>> "Perfection is the enemy of the good."
>> -- Gustave Flaubert, French realist novelist (1821-1880)
>
> --
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with your
> first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.



-- 
Sean A Corfield -- (904) 302-SEAN
An Architect's View -- http://corfield.org/
World Singles, LLC. -- http://worldsingles.com/

"Perfection is the enemy of the good."
-- Gustave Flaubert, French realist novelist (1821-1880)

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