Re: Welcome the new maintainer of Loom: Paul Snyder

2016-02-15 Thread Julio Barros
+1

> On Feb 15, 2016, at 2:29 PM, Paul L. Snyder  wrote:
> 
> On Mon, 15 Feb 2016, Gregg Reynolds wrote:
> 
>> On Feb 11, 2016 6:19 AM, "Aysylu Greenberg"  wrote:
>>> 
>>> I'm pleased to announce that Paul Snyder
>> (@pataprogramming, pataprogramming on Github) has joined me in maintaining
>> Loom. I'm excited for the coming year for Loom, with more excellent
>> contributions accepted faster.
>> 
>> Your Readme doesn't even bother to say what loom is.
> 
> Hi, Gregg,
> 
> Thanks for pointing out an area where additional clarification would be
> helpful to potential users of Loom. 
> 
> Who is the 'you' that this criticism is intended to address? Aysylu, who's
> been serving as maintainer for this library over the last years? Justin,
> who originally created it? The over two dozen contributors who have helped
> build its functionality? Suggesting that they didn't "even bother" with
> something is, frankly, rude and unproductive.
> 
> I'm happy we don't see much of this sort of casual disrespect in the
> Clojure community (with the exception of occasional bad actors on the
> mailing list). The worst of what we do see is, largely, aimed at those who
> contribute the most: the team that maintains Clojure itself.
> 
> People who are willing to invest their time to make and share useful tools
> are a resource. They should be allowed to direct their energy toward making
> those tools better, rather than having it drained by jerky interactions.
> Whether we find a project personally useful or not, we owe Open Source
> authors, at a minimum, politeness. This is at least partially in our own
> interest: we want them to keep making those tools, rather than burning out
> and switching to a more rewarding activity.
> 
> Here's an article on framing feedback in a less confrontational and
> accusatory manner.
> 
>  http://personalexcellence.co/blog/constructive-criticism/
> 
> "Thanks for sharing Loom. There's a lot of information in the README, but
> I found it difficult to figure out what the library actually does. It
> would be helpful to have a concise, up-front description of its purpose."
> 
> Regards,
> Paul
> 
> -- 
> 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: clojure future method

2016-02-15 Thread Mike Sassak
Is the future returning a lazy seq? You might need to walk the seq with
doseq / dorun etc.

On Mon, Feb 15, 2016, 6:02 AM Gary Verhaegen 
wrote:

> `future` starts a function in a separate thread, which comes out of a
> thread pool. It may not be that easy to check if a future has run at
> all if you don't hold onto the future object and wait for it.
>
> How did you check if they run? It's possible, for example, that they
> are sending their print's to a different output than the rest of your
> code, depending on your development setup; it's also possible (though
> less likely) that in your experimentation you have somehow depleted
> your thread pool and so they are queued somewhere.
>
> Ideally, to maximize our chances of helping you, you would provide a
> minimal, stand-alone snippet of code that demonstrates your problem.
>
> On 15 February 2016 at 12:31, Punit Naik  wrote:
> > I have a function which calls a number of functions in sequence. Few of
> them
> > are normal functions and some of them use clojure's 'future' method.
> When I
> > run this function, All the normal fuctions run but the functions which
> use
> > 'future' don't run at all. But if I run the functions which use 'future'
> > individually, they run perfectly fine.
> >
> > Can anyone point me to a solution?
> >
> > Please help!
> >
> > --
> > 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.


Welcome the new maintainer of Loom: Paul Snyder

2016-02-15 Thread Rafik NACCACHE
I want to thank you guys for this library. I use it in milestones,my project 
scheduling library (https://github.com/turbopape/milestones) to detect cycles 
in tasks precedence graph. Keep on the great work, and all the best for the 
maintaibers' team!

-- 
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] Graclj 0.1.0 -- New Gradle Plugin for Clojure

2016-02-15 Thread Andrew Oberstar
Yeah, something closer to that picture is what I'd prefer for a logo. I
ended up just grabbing the first public domain drawing I could find.


On Mon, Feb 15, 2016 at 9:06 AM Michael Willis 
wrote:

> In the event that you're looking for a logo, consider an artistic icon
> based on this: https://en.wikipedia.org/wiki/Common_grackle
>
>
> On Sunday, February 14, 2016 at 8:11:00 PM UTC-6, Andrew Oberstar wrote:
>>
>> I just released the first version of Graclj, which is a new Gradle plugin
>> for Clojure. The goal is to make something that feels native to Gradle,
>> while giving the creature comforts Clojurians are used to from lein or
>> boot. For those familiar with Gradle, this targets their new (and still
>> evolving) software model support.
>>
>> Current features include:
>>
>> - Packaging Clojure code into JARs
>> - AOT compilation
>> - clojure.test execution
>> - Publishing to any repo supported by Gradle (including Clojars)
>>
>> I wouldn't suggest dropping your current build tool yet, but if you'd
>> like to try it out, you can walk through the learning-graclj repo. I'd
>> welcome any feedback on the plugin or documentation.
>>
>> Source: https://github.com/graclj/graclj
>> Documentation:
>> https://github.com/graclj/learning-graclj/tree/learning-0.1.0
>>
>> Thanks,
>> Andrew Oberstar
>>
>> --
> 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: Welcome the new maintainer of Loom: Paul Snyder

2016-02-15 Thread Ghadi Shayban
You're going to be a great maintainer, Paul.

On Monday, February 15, 2016 at 5:30:04 PM UTC-5, Paul L. Snyder wrote:
>
> On Mon, 15 Feb 2016, Gregg Reynolds wrote: 
>
> > On Feb 11, 2016 6:19 AM, "Aysylu Greenberg"  > wrote: 
> > > 
> > > I'm pleased to announce that Paul Snyder 
> > (@pataprogramming, pataprogramming on Github) has joined me in 
> maintaining 
> > Loom. I'm excited for the coming year for Loom, with more excellent 
> > contributions accepted faster. 
> > 
> > Your Readme doesn't even bother to say what loom is. 
>
> Hi, Gregg, 
>
> Thanks for pointing out an area where additional clarification would be 
> helpful to potential users of Loom. 
>
> Who is the 'you' that this criticism is intended to address? Aysylu, who's 
> been serving as maintainer for this library over the last years? Justin, 
> who originally created it? The over two dozen contributors who have helped 
> build its functionality? Suggesting that they didn't "even bother" with 
> something is, frankly, rude and unproductive. 
>
> I'm happy we don't see much of this sort of casual disrespect in the 
> Clojure community (with the exception of occasional bad actors on the 
> mailing list). The worst of what we do see is, largely, aimed at those who 
> contribute the most: the team that maintains Clojure itself. 
>
> People who are willing to invest their time to make and share useful tools 
> are a resource. They should be allowed to direct their energy toward 
> making 
> those tools better, rather than having it drained by jerky interactions. 
> Whether we find a project personally useful or not, we owe Open Source 
> authors, at a minimum, politeness. This is at least partially in our own 
> interest: we want them to keep making those tools, rather than burning out 
> and switching to a more rewarding activity. 
>
> Here's an article on framing feedback in a less confrontational and 
> accusatory manner. 
>
>   http://personalexcellence.co/blog/constructive-criticism/ 
>
> "Thanks for sharing Loom. There's a lot of information in the README, but 
> I found it difficult to figure out what the library actually does. It 
> would be helpful to have a concise, up-front description of its purpose." 
>
> Regards, 
> Paul 
>

-- 
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: confirming a core async channel is empty?

2016-02-15 Thread Stig Brautaset
Alex Miller  writes:

> You could use poll! - it is non-blocking.

My tests thank you! That is indeed what I was after. I suppose since I
was using !! I was looking for another method with two !'s at
the end.

Stig

-- 
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: Welcome the new maintainer of Loom: Paul Snyder

2016-02-15 Thread Paul L. Snyder
On Mon, 15 Feb 2016, Gregg Reynolds wrote:

> On Feb 11, 2016 6:19 AM, "Aysylu Greenberg"  wrote:
> >
> > I'm pleased to announce that Paul Snyder
> (@pataprogramming, pataprogramming on Github) has joined me in maintaining
> Loom. I'm excited for the coming year for Loom, with more excellent
> contributions accepted faster.
> 
> Your Readme doesn't even bother to say what loom is.

Hi, Gregg,

Thanks for pointing out an area where additional clarification would be
helpful to potential users of Loom. 

Who is the 'you' that this criticism is intended to address? Aysylu, who's
been serving as maintainer for this library over the last years? Justin,
who originally created it? The over two dozen contributors who have helped
build its functionality? Suggesting that they didn't "even bother" with
something is, frankly, rude and unproductive.

I'm happy we don't see much of this sort of casual disrespect in the
Clojure community (with the exception of occasional bad actors on the
mailing list). The worst of what we do see is, largely, aimed at those who
contribute the most: the team that maintains Clojure itself.

People who are willing to invest their time to make and share useful tools
are a resource. They should be allowed to direct their energy toward making
those tools better, rather than having it drained by jerky interactions.
Whether we find a project personally useful or not, we owe Open Source
authors, at a minimum, politeness. This is at least partially in our own
interest: we want them to keep making those tools, rather than burning out
and switching to a more rewarding activity.

Here's an article on framing feedback in a less confrontational and
accusatory manner.

  http://personalexcellence.co/blog/constructive-criticism/

"Thanks for sharing Loom. There's a lot of information in the README, but
I found it difficult to figure out what the library actually does. It
would be helpful to have a concise, up-front description of its purpose."

Regards,
Paul

-- 
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: macro to unwrap a list

2016-02-15 Thread Gary Verhaegen
On Monday, 15 February 2016, Sonny To  wrote:

> I am trying to write a macro to unwrap a list:
>
> here's my naive attempt
>
> (defmacro unwrap [s]
>   (-> s pr-str  (clojure.string/replace #"[\(\)]" "") read-string))
>
> (unwrap (1 2 3) ) should give 1 2 3
>
> any ideas how this can be done?
>
> thanks,
> Sonny
>

As pther mentioned, you can't really do that with a macro. Depending on
your use-case, though, you may find the "unquote splicing" ~@ operator
useful.

-- 
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: macro to unwrap a list

2016-02-15 Thread Stuart Sierra
A macro can't do this, it must return a single form. But the `apply` 
function can do something similar in the context of a function call.

(apply foo '(1 2 3))
is the same as
(foo 1 2 3)

–S



On Monday, February 15, 2016 at 2:05:52 PM UTC-5, Sonny To wrote:
>
> I am trying to write a macro to unwrap a list:
>
> here's my naive attempt
>
> (defmacro unwrap [s]
>   (-> s pr-str  (clojure.string/replace #"[\(\)]" "") read-string))
>
> (unwrap (1 2 3) ) should give 1 2 3
>
> any ideas how this can be done?
>
> thanks,
> Sonny
>

-- 
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: Trouble replacing deprecated map< function

2016-02-15 Thread Francis Avila
I think the difficulty here is that Chord has a bidirectional channel, 
where putting and taking operate on different "streams" inside the channel. 
(Internally, Chord is actually using a different channel for reads and 
writes. It constructs the "joined" channel using chord.channels/bidi-ch)

I don't think this was envisioned as a proper way to use channels. I think 
they were envisioned as a queue, and queues hold values, not communication 
streams. When you put onto a channel, it contains what you put until you 
take it off. (Note that channels with attached transducers must be buffered 
because it needs a place to hold the result of the reduction step.) A Chord 
channel isn't like this: when you put on it, the value is gone, and 
different values from some other place appear when you take from it.  The 
more usual solution is to use a pair of channels.

map<, map>, etc happened to work because they always put/take a value 
unchanged in the opposite direction onto the transformed channel.

I suspect the core developers were only using map>, map< et al in pipelines 
(where transducers are fine) and not realizing people were using them in a 
way that relied on the other direction being pass-through.

You will always need either a pair of channels to undo the unification done 
by Chord, or you will need to implement a channel (using reify and the 
WritePort and ReadPort protocols) where take and put mean different things 
and you can attach a transducer independently to each. Something like that 
would probably not make it in to core because it encourages the use of 
Chord-style "multistream" channels.

You could try something like this:

(defn eduction> [xform ch]
  (let [in-stream (chan 1 xform)
out-stream (chan)]
(pipe in-stream ch)
(pipe ch out-stream)
(chord.channels/bidi-ch in-stream out-stream)))

Of course it would be more efficient to use reify and implement the channel 
interfaces directly, like map> does, but with transducer semantics for f 
(including the finalize arity and when the f is called).


On Friday, February 12, 2016 at 1:41:20 PM UTC-6, James Reeves wrote:
>
> I currently have some core.async code that looks like:
>
> (map< :foo ch)
>
> However, map< and map> are now deprecated, with the suggestion to use 
> transducers instead. Unfortunately it's not obvious how to go about that.
>
> At first I thought that I could use a pipe and a new channel:
>
> (pipe ch (chan 1 (map :foo)))
>
> But there's no distinction between channel input and output here. This 
> matters because I'm using a bidirectional channel from Chord 
> .
>
> I'm thinking that it would be nice to have some functions like:
>
> (eduction< ch xform)
> (eduction> ch xform)
> (eduction ch xform)
>
> So I could write something like:
>
> (eduction< ch (map :foo))
>
> Have I missed anything? Is there some equivalent to this functionality 
> already in core.async that I haven't noticed?
>
> - James
>

-- 
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] cljs-rete4f - CLIPS-like expert system shell on ClojureScript

2016-02-15 Thread ru
Hello All,

ClojureScript RETE for frames engine published on 
(https://github.com/rururu/cljs-rete4f). It uses recently added to 
ClojureScript "eval" function. This is only difference with core of 
rete4farmes (https://github.com/rururu/rete4frames).

Sincerely,
  Ru

-- 
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: Welcome the new maintainer of Loom: Paul Snyder

2016-02-15 Thread Gregg Reynolds
On Feb 11, 2016 6:19 AM, "Aysylu Greenberg"  wrote:
>
> I'm pleased to announce that Paul Snyder
(@pataprogramming, pataprogramming on Github) has joined me in maintaining
Loom. I'm excited for the coming year for Loom, with more excellent
contributions accepted faster.

Your Readme doesn't even bother to say what loom is.

-- 
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: macro to unwrap a list

2016-02-15 Thread James Reeves
What do you mean by "unwrap a list"?

If you mean something where:

(foo (unwrap 1 2 3)) == (foo 1 2 3)

Then I'm afraid this can't be done. A macro returns a single data structure.

- James

On 15 February 2016 at 18:54, Sonny To  wrote:

> I am trying to write a macro to unwrap a list:
>
> here's my naive attempt
>
> (defmacro unwrap [s]
>   (-> s pr-str  (clojure.string/replace #"[\(\)]" "") read-string))
>
> (unwrap (1 2 3) ) should give 1 2 3
>
> any ideas how this can be done?
>
> thanks,
> Sonny
>
> --
> 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.


macro to unwrap a list

2016-02-15 Thread Sonny To
I am trying to write a macro to unwrap a list:

here's my naive attempt

(defmacro unwrap [s]
  (-> s pr-str  (clojure.string/replace #"[\(\)]" "") read-string))

(unwrap (1 2 3) ) should give 1 2 3

any ideas how this can be done?

thanks,
Sonny

-- 
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] HugSQL 0.4.0 release

2016-02-15 Thread Ryan Fowler
Great release, Curtis! I'm looking forward to cleaning up some of my
composition hacks.



On Mon, Feb 15, 2016 at 8:04 AM, Curtis Summers <
curtis.summ...@layerware.com> wrote:

> I'm happy to announce the 0.4.0 release of HugSQL.
>
> HugSQL is a Clojure library for embracing SQL in your projects.
>
> This release focuses on composability features.  Specifically, we now have 
> Clojure
> Expressions  providing the full
> power of Clojure within your SQL templates.  We also have Snippets
>  to create partial SQL statements
> that can be composed into larger queries.
>
> http://www.hugsql.org/
>
>
> Changes from 0.3.x to 0.4.0
>
>- Escape colon in SQL (issue #13
>)
>- def-db-fns-from-string & def-sql-fns-from-string (issue #16
>)
>- Added several functions that operate on individual SQL statements,
>which are useful at the REPL or for one-off composing.  (See Other
>Useful Functions )
>- Specify a function as private and other metadata (issue #17
>)
>- Better support for Returning Execute and Insert w/ Return Keys (See 
> Insert
>Usage ) (issues #8
> and #15
>)
>- Clojure Expressions 
>- Snippets 
>- Parameter Name Deep-Get 
>for drilling down into parameter data
>- Better docs & tests
>
> A big thank you to those of you who submitted suggestions and bugs during
> this cycle.  HugSQL is better because of your input.
>
> What is HugSQL?  HugSQL...
>
>
>-
>- is of the opinion that SQL is the right tool for the job when
>working with a relational database.
>- uses simple conventions in your SQL files to define (at compile
>time) database functions in your Clojure namespace, creating a clean
>separation of Clojure and SQL code.
>- supports runtime replacement of SQL Value Parameters (e.g., where id
>= :id), SQL Identifiers (i.e. table/column names), and SQL Keywords. You
>can also implement your own parameter types.
>- features Clojure Expressions and Snippets providing the full
>expressiveness of Clojure and the composability of partial SQL statements
>when constructing complex SQL queries.
>- has protocol-based adapters supporting multiple database libraries
>and ships with adapters for clojure.java.jdbc (default) and clojure.jdbc
>
> Thanks!
>
> Curtis Summers
>
> --
> 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: java web start and clojure application

2016-02-15 Thread Jason Zwolak
I'd also like to point out for the record, since I ran into this problem, 
that the policy related static code must appear before any requires in the 
Java code that loads the application specific functions; like the 
"clojure-main" in the OPs example.

I believe a more modern load of the application Clojure code would look 
like this (before the setPolicy):

public static final IFn require = Clojure.var("clojure.core", 
"require");
static {
require.invoke(Clojure.read("clojure-main"));
}

After setPolicy code, it would look like this:

public static final IFn require = Clojure.var("clojure.core", 
"require");
static {
Policy.setPolicy( new Policy() { 
public PermissionCollection 
getPermissions(CodeSource codesource) { 
Permissions perms = new Permissions(); 
perms.add(new AllPermission()); 
return(perms); 
} 
public void refresh(){ 
} 
}); 
require.invoke(Clojure.read("clojure-main"));
}


On Tuesday, April 22, 2008 at 9:44:27 AM UTC-4, Pawel Ostrowski wrote:
>
> Hello, 
>
> I managed to successfully deploy simple clojure application with java 
> web start. I will share my experience here, because I had some 
> problems with granting enough security privileges to run clojure 
> application as java web start applet (getting AccessControlException) 
> and I did not find complete solution in group's archive. Editing 
> java.policy file was not an option because I wanted to share my 
> application with users who might not understand java policies at all. 
>
> My application is written entirely in clojure except one java class 
> with static main method. This main method looks like this: 
>
>  public static void main(String[] args) throws Exception { 
> RT.init(); 
> // load clj resource 
> loadFromClasspath("alphabet/alphabet.clj"); 
> // get clojure fun 
> StringReader sr = new StringReader("clojure-main"); 
> PushbackReader r = new PushbackReader(sr); 
> IFn clojureFun = (IFn) Compiler.eval(LispReader.read(r, false, 
> null, false)); 
> // call clojure fun 
> clojureFun.invoke(); 
> ... 
>
> So all I do here is: load clojure source file, get clojure main 
> function and then call it. 
>
> To run it as java web start applet I had to: 
>
> 1) Include   element in 
> my .jnlp file. 
> 2) Sign clojure.jar and my application .jar files. Instructions found 
> on http://www.dallaway.com/acad/webstart/ were helpful 
> 3) Put the following code in static section in class with the static 
> main method: 
>
> static { 
> Policy.setPolicy( new Policy() { 
> public PermissionCollection 
> getPermissions(CodeSource codesource) { 
> Permissions perms = new Permissions(); 
> perms.add(new AllPermission()); 
> return(perms); 
> } 
> public void refresh(){ 
> } 
> }); 
> } 
>
> Third step was necessary because all permissions from first step were 
> granted to javaws classloader only and clojure creates it's own 
> classloaders, at least I think so :). 
>
> ps. This is a simple alphabet typing swing application, it measures 
> your time to type whole alphabet. Time starts with typing letter a and 
> ends with letter z. Space resets the game. It may be run with javaws 
> from here: http://www.pasza.org/files/alphabet/alphabet.jnlp 
>
> clojure code may be found in this jar: 
> http://www.pasza.org/files/alphabet/alphabet.jar 
>

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


Clojure Engineer - Top Tech House - Chicago - $180,000 +

2016-02-15 Thread alex
Hey All,

I am currently working alongside a top tech house over in Chicago that is 
building a distributed system using Clojure. They are now on the search for 
talented and experienced Clojure engineers to join their team. 

Paying up to $180,000 + Benefits + Bonus ! 

If you are interested in finding out all the details drop me a line 
a...@functionalworks.com 

thanks,
Alex 

-- 
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] Graclj 0.1.0 -- New Gradle Plugin for Clojure

2016-02-15 Thread Michael Willis
In the event that you're looking for a logo, consider an artistic icon 
based on this: https://en.wikipedia.org/wiki/Common_grackle

On Sunday, February 14, 2016 at 8:11:00 PM UTC-6, Andrew Oberstar wrote:
>
> I just released the first version of Graclj, which is a new Gradle plugin 
> for Clojure. The goal is to make something that feels native to Gradle, 
> while giving the creature comforts Clojurians are used to from lein or 
> boot. For those familiar with Gradle, this targets their new (and still 
> evolving) software model support.
>
> Current features include:
>
> - Packaging Clojure code into JARs
> - AOT compilation
> - clojure.test execution
> - Publishing to any repo supported by Gradle (including Clojars)
>
> I wouldn't suggest dropping your current build tool yet, but if you'd like 
> to try it out, you can walk through the learning-graclj repo. I'd welcome 
> any feedback on the plugin or documentation.
>
> Source: https://github.com/graclj/graclj
> Documentation: 
> https://github.com/graclj/learning-graclj/tree/learning-0.1.0
>
> Thanks,
> Andrew Oberstar
>
>

-- 
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] HugSQL 0.4.0 release

2016-02-15 Thread Curtis Summers
I'm happy to announce the 0.4.0 release of HugSQL.

HugSQL is a Clojure library for embracing SQL in your projects.

This release focuses on composability features.  Specifically, we now
have Clojure
Expressions  providing the full
power of Clojure within your SQL templates.  We also have Snippets
 to create partial SQL statements
that can be composed into larger queries.

http://www.hugsql.org/


Changes from 0.3.x to 0.4.0

   - Escape colon in SQL (issue #13
   )
   - def-db-fns-from-string & def-sql-fns-from-string (issue #16
   )
   - Added several functions that operate on individual SQL statements,
   which are useful at the REPL or for one-off composing.  (See Other
   Useful Functions )
   - Specify a function as private and other metadata (issue #17
   )
   - Better support for Returning Execute and Insert w/ Return Keys (See Insert
   Usage ) (issues #8
    and #15
   )
   - Clojure Expressions 
   - Snippets 
   - Parameter Name Deep-Get 
   for drilling down into parameter data
   - Better docs & tests

A big thank you to those of you who submitted suggestions and bugs during
this cycle.  HugSQL is better because of your input.

What is HugSQL?  HugSQL...


   -
   - is of the opinion that SQL is the right tool for the job when working
   with a relational database.
   - uses simple conventions in your SQL files to define (at compile time)
   database functions in your Clojure namespace, creating a clean separation
   of Clojure and SQL code.
   - supports runtime replacement of SQL Value Parameters (e.g., where id =
   :id), SQL Identifiers (i.e. table/column names), and SQL Keywords. You can
   also implement your own parameter types.
   - features Clojure Expressions and Snippets providing the full
   expressiveness of Clojure and the composability of partial SQL statements
   when constructing complex SQL queries.
   - has protocol-based adapters supporting multiple database libraries and
   ships with adapters for clojure.java.jdbc (default) and clojure.jdbc

Thanks!

Curtis Summers

-- 
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 future method

2016-02-15 Thread Gary Verhaegen
`future` starts a function in a separate thread, which comes out of a
thread pool. It may not be that easy to check if a future has run at
all if you don't hold onto the future object and wait for it.

How did you check if they run? It's possible, for example, that they
are sending their print's to a different output than the rest of your
code, depending on your development setup; it's also possible (though
less likely) that in your experimentation you have somehow depleted
your thread pool and so they are queued somewhere.

Ideally, to maximize our chances of helping you, you would provide a
minimal, stand-alone snippet of code that demonstrates your problem.

On 15 February 2016 at 12:31, Punit Naik  wrote:
> I have a function which calls a number of functions in sequence. Few of them
> are normal functions and some of them use clojure's 'future' method. When I
> run this function, All the normal fuctions run but the functions which use
> 'future' don't run at all. But if I run the functions which use 'future'
> individually, they run perfectly fine.
>
> Can anyone point me to a solution?
>
> Please help!
>
> --
> 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.


clojure future method

2016-02-15 Thread Punit Naik
I have a function which calls a number of functions in sequence. Few of 
them are normal functions and some of them use clojure's 'future' method. 
When I run this function, All the normal fuctions run but the functions 
which use 'future' don't run at all. But if I run the functions which use 
'future' individually, they run perfectly fine.

Can anyone point me to a solution?

Please help!

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