Re: No eval in ClojureScript!?

2016-02-14 Thread ru
Thank you Alan for very helpful information. I know about Clara but don't 
watch its progress attentively fore some time :(

Regards,
  Ru

суббота, 13 февраля 2016 г., 18:25:46 UTC+3 пользователь ru написал:
>
> Dear ClojureScript users and team!
>
> Without "eval" function ClojureScript can't be recognized as a 
> full-fledged LISP. "Code as data" paradigm can't be implemented without 
> "eval". What purpose of code constructed programmatically, if it can not be 
> evaluated?! In that sence plain old JavaScript is more LISP than 
> ClojureScript. Am I right? May be I have mised something important in that 
> problem?
>
> 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: No eval in ClojureScript!?

2016-02-14 Thread ru
I took a look at the Clara's code. This is excerpt from the comment of 
"defsession" defmacro: "..Each source is eval'ed at compile time, in 
Clojure (not ClojureScript.)..".
So, this is a solution, but not clear ClojureScript solution :(

-Ru

суббота, 13 февраля 2016 г., 18:25:46 UTC+3 пользователь ru написал:
>
> Dear ClojureScript users and team!
>
> Without "eval" function ClojureScript can't be recognized as a 
> full-fledged LISP. "Code as data" paradigm can't be implemented without 
> "eval". What purpose of code constructed programmatically, if it can not be 
> evaluated?! In that sence plain old JavaScript is more LISP than 
> ClojureScript. Am I right? May be I have mised something important in that 
> problem?
>
> 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: [ANN] dali SVG library 0.7.0

2016-02-14 Thread bernardH

On Thursday, February 11, 2016 at 1:49:54 AM UTC+1, Stathis Sideris wrote:
>
> Hello all,
>
> dali is a Clojure library for representing the SVG graphics format. It 
> allows the creation and manipulation of SVG files. The syntax 
>  used 
> to describe the graphical elements is based on hiccup 
>  with a few extensions.
>
> The main advantage of dali is that it provides facilities to perform 
> complex layouts 
>  
> without having to position elements explicitly.
>
>
Thanks, that looks great and I look forward to try using it to make 
presentations. For now, I am using other tools to make SVG graphs, and I 
was wondering if/how I could embed them. Would it be possible to include 
svg framengts ? Or even better would it ever be possible to round-trip form 
some existing svg to a dali data structure ?

Thanks again for this very interesting lib !

Best Regards. 

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


confirming a core async channel is empty?

2016-02-14 Thread Stig Brautaset

In a unit test I am checking that a core async channel is empty. I
couldn't find any `empty?` function for core async channels, and since
`!! channel sentinel)
(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.


confirming a core async channel is empty?

2016-02-14 Thread Alex Miller
You could use poll! - it is non-blocking.

-- 
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-14 Thread Paul L. Snyder
On Thu, 11 Feb 2016, 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.

Thanks very much, Aysylu, and thanks to Justin for creating Loom and to
everyone who's contributed its lifetime. This library for easily
manipulable, moderate-scale persistent graphs occupies a useful niche in
the Clojure ecosystem.

I'm starting to review the open pull request and issues. If you have
a particular feature that you'd like to see, or a use case that you'd
like to see Loom work toward supporting, please let me know.

One things that I particularly hope to improve is the ability to 
easily visualize and interact with your graphs. Graphviz is a nice
starting point, but it's limited to static images.

In previous projects, I've interfaced Loom with JUNG (http://jung.sf.net)
to add interactive, Swing-based graph visualizations.  As a library, JUNG
is getting rather stale (its last release was in January 2010), but some
of its facilities and APIs may serve as inspiration for future
directions.

I've pulled some of the interface code out of a previous project, cleaned
it up, and added better support for the Seesaw library for using Swing
from Clojure (http://github.com/daveray/seesaw).  This is not likely to
be immediately useful to anyone, but it's a nice proof-of-concept.

You can give it a try from

  http://github.com/pataprogramming/loom-jung

There is a short walkthrough on using the library to visualize simple
graphs. Doing anything more complicated will likely require digging into
JUNG's (exceedingly ugly) API, but it's enough to play around with.  The
library is also available from Clojars:

  [pataprogramming/loom-jung "0.1.0"]

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.


[ANN] Graclj 0.1.0 -- New Gradle Plugin for Clojure

2016-02-14 Thread Andrew Oberstar
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.


Shouldn't we consider this a bug? "Unable to resolve symbol: % in this context"?

2016-02-14 Thread Laws
If I write this in a file: 

(defn different-order [order]
  {:pre [
 (map? order)
 (:waiter order)
 (:customer order)
 (:menu-item-name order)
 ]
   :post [
  (map? %)
  (:waiter %)
  (:customer %)
  (:menu-item-name %)
  ]}

  )

and then I try "lein uberjar" I get: 

Exception in thread "main" java.lang.RuntimeException: Unable to resolve 
symbol: % in this context

but if I add a line of code to the function body: 

(defn different-order [order]
  {:pre [
 (map? order)
 (:waiter order)
 (:customer order)
 (:menu-item-name order)
 ]
   :post [
  (map? %)
  (:waiter %)
  (:customer %)
  (:menu-item-name %)
  ]}

  (println "hi")

  )

Then it compiles. 

At the very least, we should have a better error message than "Unable to 
resolve symbol: % in this context". Something like "function definition is 
incomplete" would at least communicate what the problem is. 

But if this really needs to be treated as an error, I would like to know 
why it needs to be an error. This does not generate an error: 

(defn different-order [order] )

So why does adding a :post assertion create a compile time error? I'd 
expect a runtime error, but not a compile time error. 

-- 
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: Shouldn't we consider this a bug? "Unable to resolve symbol: % in this context"?

2016-02-14 Thread James Reeves
The problem is: how do you tell the difference between a pre- and
post-condition map, and a map you want to return from the function?

The only way to do it is to explicitly return nil.

- James

On 15 February 2016 at 04:48, Laws  wrote:

> If I write this in a file:
>
> (defn different-order [order]
>   {:pre [
>  (map? order)
>  (:waiter order)
>  (:customer order)
>  (:menu-item-name order)
>  ]
>:post [
>   (map? %)
>   (:waiter %)
>   (:customer %)
>   (:menu-item-name %)
>   ]}
>
>   )
>
> and then I try "lein uberjar" I get:
>
> Exception in thread "main" java.lang.RuntimeException: Unable to resolve
> symbol: % in this context
>
> but if I add a line of code to the function body:
>
> (defn different-order [order]
>   {:pre [
>  (map? order)
>  (:waiter order)
>  (:customer order)
>  (:menu-item-name order)
>  ]
>:post [
>   (map? %)
>   (:waiter %)
>   (:customer %)
>   (:menu-item-name %)
>   ]}
>
>   (println "hi")
>
>   )
>
> Then it compiles.
>
> At the very least, we should have a better error message than "Unable to
> resolve symbol: % in this context". Something like "function definition is
> incomplete" would at least communicate what the problem is.
>
> But if this really needs to be treated as an error, I would like to know
> why it needs to be an error. This does not generate an error:
>
> (defn different-order [order] )
>
> So why does adding a :post assertion create a compile time error? I'd
> expect a runtime error, but not a compile time error.
>
> --
> 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-14 Thread Andy Fingerhut
I had never seen JUNG before.  I've not looked at its implementation at
all, but the demos are pretty impressive.  As you say, graphviz is nice for
what it does, but I did not realize there was an open source 'graphical
graph manipulator' like this.

Andy

On Sun, Feb 14, 2016 at 12:38 PM, Paul L. Snyder 
wrote:

> On Thu, 11 Feb 2016, 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.
>
> Thanks very much, Aysylu, and thanks to Justin for creating Loom and to
> everyone who's contributed its lifetime. This library for easily
> manipulable, moderate-scale persistent graphs occupies a useful niche in
> the Clojure ecosystem.
>
> I'm starting to review the open pull request and issues. If you have
> a particular feature that you'd like to see, or a use case that you'd
> like to see Loom work toward supporting, please let me know.
>
> One things that I particularly hope to improve is the ability to
> easily visualize and interact with your graphs. Graphviz is a nice
> starting point, but it's limited to static images.
>
> In previous projects, I've interfaced Loom with JUNG (http://jung.sf.net)
> to add interactive, Swing-based graph visualizations.  As a library, JUNG
> is getting rather stale (its last release was in January 2010), but some
> of its facilities and APIs may serve as inspiration for future
> directions.
>
> I've pulled some of the interface code out of a previous project, cleaned
> it up, and added better support for the Seesaw library for using Swing
> from Clojure (http://github.com/daveray/seesaw).  This is not likely to
> be immediately useful to anyone, but it's a nice proof-of-concept.
>
> You can give it a try from
>
>   http://github.com/pataprogramming/loom-jung
>
> There is a short walkthrough on using the library to visualize simple
> graphs. Doing anything more complicated will likely require digging into
> JUNG's (exceedingly ugly) API, but it's enough to play around with.  The
> library is also available from Clojars:
>
>   [pataprogramming/loom-jung "0.1.0"]
>
> 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.