Re: lein midje not working

2018-04-11 Thread Renata Soares
I found the problem... in my core.clj i was using (slurp *in*) to get 
contents via stdin. 
'lein midje' performs 'lein run' first?

Em quarta-feira, 11 de abril de 2018 20:27:04 UTC-3, Renata Soares escreveu:
>
> Hello,
>
> I am running 'lein midje' on my project and looks like an infinite loop. 
> Doesn't show any message of error. 
>
> Project.clj:
>
> (defproject job-queue "0.1.0-SNAPSHOT"
>   :description "FIXME: write description"
>   :url "http://example.com/FIXME;
>   :main job-queue.core
>   :license {:name "Eclipse Public License"
> :url "http://www.eclipse.org/legal/epl-v10.html"}
>   :dependencies [[org.clojure/clojure "1.8.0"]
>  [org.clojure/data.json "0.2.6"]
>  [midje "1.9.0"]]
>   :plugins [[lein-midje "3.2.1"]])
>
> I created this test just to check the midje:
>
> (ns job-queue.core-test
> (:require [job-queue.core :refer :all]
>   [midje.sweet :refer :all]))
>
> (fact
>   [1 3 5 8] => (contains even?))
>
> What can it be?
>
> Thanks.
>
>

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


Re: lein midje not working

2018-04-11 Thread Andy Fingerhut
The contents of your $HOME/.lein/profiles.clj file can affect the behavior
of all 'lein' commands run from any project, if you have one.

Andy

On Wed, Apr 11, 2018 at 4:31 PM, Renata Soares 
wrote:

> It happens with 'lein repl' too (gives timeout in this case).
>
>
> Em quarta-feira, 11 de abril de 2018 20:27:04 UTC-3, Renata Soares
> escreveu:
>>
>> Hello,
>>
>> I am running 'lein midje' on my project and looks like an infinite loop.
>> Doesn't show any message of error.
>>
>> Project.clj:
>>
>> (defproject job-queue "0.1.0-SNAPSHOT"
>>   :description "FIXME: write description"
>>   :url "http://example.com/FIXME;
>>   :main job-queue.core
>>   :license {:name "Eclipse Public License"
>> :url "http://www.eclipse.org/legal/epl-v10.html"}
>>   :dependencies [[org.clojure/clojure "1.8.0"]
>>  [org.clojure/data.json "0.2.6"]
>>  [midje "1.9.0"]]
>>   :plugins [[lein-midje "3.2.1"]])
>>
>> I created this test just to check the midje:
>>
>> (ns job-queue.core-test
>> (:require [job-queue.core :refer :all]
>>   [midje.sweet :refer :all]))
>>
>> (fact
>>   [1 3 5 8] => (contains even?))
>>
>> What can it be?
>>
>> Thanks.
>>
>> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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: lein midje not working

2018-04-11 Thread Sean Corfield
Do you mean you type `lein repl` and you don’t get a prompt at all? It just 
hangs before then?

I tried to reproduce based on the information below and it seems to work for me:

(! 1115)-> lein new app job-queue
Generating a project called job-queue based on the 'app' template.

Wed Apr 11 16:40:54
(sean)-(jobs:0)-(~/clojure)
(! 1116)-> cd job-queue/

Wed Apr 11 16:40:57
(sean)-(jobs:0)-(~/clojure/job-queue)
(! 1117)-> cat > project.clj
(defproject job-queue "0.1.0-SNAPSHOT"
  :description "FIXME: write description"
  :url "http://example.com/FIXME;
  :main job-queue.core
  :license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
  :dependencies [[org.clojure/clojure "1.8.0"]
 [org.clojure/data.json "0.2.6"]
 [midje "1.9.0"]]
  :plugins [[lein-midje "3.2.1"]])
^D
Wed Apr 11 16:41:07
(sean)-(jobs:0)-(~/clojure/job-queue)
(! 1118)-> lein repl
nREPL server started on port 59357 on host 127.0.0.1 - nrepl://127.0.0.1:59357
…
job-queue.core=> Bye for now!

Wed Apr 11 16:41:16
(sean)-(jobs:0)-(~/clojure/job-queue)
(! 1119)-> cat > test/job_queue/core_test.clj
(ns job-queue.core-test
(:require [job-queue.core :refer :all]
  [midje.sweet :refer :all]))

(fact
  [1 3 5 8] => (contains even?))
^D
Wed Apr 11 16:41:43
(sean)-(jobs:0)-(~/clojure/job-queue)
(! 1120)-> lein midje
nil
All checks (1) succeeded.

Wed Apr 11 16:41:57
(sean)-(jobs:0)-(~/clojure/job-queue)
(! 1121)->

Sean Corfield -- (970) FOR-SEAN -- (904) 302-SEAN
An Architect's View -- http://corfield.org/

"If you're not annoying somebody, you're not really alive."
-- Margaret Atwood


From: clojure@googlegroups.com  on behalf of Renata 
Soares 
Sent: Wednesday, April 11, 2018 4:31:15 PM
To: Clojure
Subject: Re: lein midje not working

It happens with 'lein repl' too (gives timeout in this case).

Em quarta-feira, 11 de abril de 2018 20:27:04 UTC-3, Renata Soares escreveu:
Hello,

I am running 'lein midje' on my project and looks like an infinite loop. 
Doesn't show any message of error.

Project.clj:

(defproject job-queue "0.1.0-SNAPSHOT"
  :description "FIXME: write description"
  :url "http://example.com/FIXME;
  :main job-queue.core
  :license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
  :dependencies [[org.clojure/clojure "1.8.0"]
 [org.clojure/data.json "0.2.6"]
 [midje "1.9.0"]]
  :plugins [[lein-midje "3.2.1"]])

I created this test just to check the midje:

(ns job-queue.core-test
(:require [job-queue.core :refer :all]
  [midje.sweet :refer :all]))

(fact
  [1 3 5 8] => (contains even?))

What can it be?

Thanks.


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

-- 
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: lein midje not working

2018-04-11 Thread Renata Soares
It happens with 'lein repl' too (gives timeout in this case).

Em quarta-feira, 11 de abril de 2018 20:27:04 UTC-3, Renata Soares escreveu:
>
> Hello,
>
> I am running 'lein midje' on my project and looks like an infinite loop. 
> Doesn't show any message of error. 
>
> Project.clj:
>
> (defproject job-queue "0.1.0-SNAPSHOT"
>   :description "FIXME: write description"
>   :url "http://example.com/FIXME;
>   :main job-queue.core
>   :license {:name "Eclipse Public License"
> :url "http://www.eclipse.org/legal/epl-v10.html"}
>   :dependencies [[org.clojure/clojure "1.8.0"]
>  [org.clojure/data.json "0.2.6"]
>  [midje "1.9.0"]]
>   :plugins [[lein-midje "3.2.1"]])
>
> I created this test just to check the midje:
>
> (ns job-queue.core-test
> (:require [job-queue.core :refer :all]
>   [midje.sweet :refer :all]))
>
> (fact
>   [1 3 5 8] => (contains even?))
>
> What can it be?
>
> Thanks.
>
>

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


lein midje not working

2018-04-11 Thread Renata Soares
Hello,

I am running 'lein midje' on my project and looks like an infinite loop. 
Doesn't show any message of error. 

Project.clj:

(defproject job-queue "0.1.0-SNAPSHOT"
  :description "FIXME: write description"
  :url "http://example.com/FIXME;
  :main job-queue.core
  :license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
  :dependencies [[org.clojure/clojure "1.8.0"]
 [org.clojure/data.json "0.2.6"]
 [midje "1.9.0"]]
  :plugins [[lein-midje "3.2.1"]])

I created this test just to check the midje:

(ns job-queue.core-test
(:require [job-queue.core :refer :all]
  [midje.sweet :refer :all]))

(fact
  [1 3 5 8] => (contains even?))

What can it be?

Thanks.

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


Re: [ANN] clj-tree-layout

2018-04-11 Thread Frozenlock
Looks great, thanks!

On Tuesday, April 10, 2018 at 5:19:59 PM UTC-4, Juan Monetta wrote:
>
> Hi everybody!
>
> Maybe someone else find this useful.
>
> clj-tree-layout  A library 
> for laying out tree nodes in 2D space for Clojure and ClojureScript.
>
> Since in Clojure we are surrounded by trees (deps, specs, namespaces, 
> sexp, execution flow, etc) I think having a way to represent them 
> graphically could lead to interesting tools.
>
> Juan
>

-- 
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: global-hierarchy.. private?

2018-04-11 Thread Francis Avila
I'm not certain I know what use case you're getting at. It sounds like you 
want to take the current state of the global hierarchy and "fork" it into a 
private hierarchy? Even though the var is private you can still access its 
value:

@#'clojure.core/global-hierarchy (same as (deref (var 
clojure.core/global-hierarchy)))

I think you are already aware you can make and use your own hierarchies: 
all multimethod-related functions have an optional argument to accept a 
hierarchy directly as a value (or in a mutable ref container such as a var 
or atom in defmulti's case).

So to "fork" your own hierarchy, grab a snapshot the global-hierarchy var's 
value and use the derive and underive on that value to make your own 
hierarchy. Note that the heirarchy-explicit arities of derive and underive 
are pure: they return the new hierarchy map and do not mutate anything. 
(You also don't have to use namespace keywords for the type names.)

I hope you are not talking about something like a "live fork", where you 
want your own hierarchy expressed as a diff against the global-hierarchy 
and updated when the global hierarchy's value changes? You can probably do 
that with enough ILookup magic or a var watcher to recompute the derived 
hierarchy, but that sounds like a bad idea in general. Hierarchies are only 
useful with the named multimethods that explicitly use them, so it's hard 
to imagine a case where you want a multimethod to be "global hierarchy plus 
changes" and not just an entirely separate hierarchy.

On Sunday, April 8, 2018 at 1:57:41 PM UTC-5, Pedro Iago Carvalho Martins 
wrote:

> Ok, this is part of a theme that haunts me and I would like to know if 
> anyone shares my view or has a insteresting point.
>
> The #'global-hierarchy in clojure.core is used to enable things such as 
> multi-methods, and the isa? function.
> Now, we can change a var with alter-var-root, and I see it mostly being 
> used for configuration, as with *unchecked-math* or *warn-on-reflection*.
> But for some reason the global-hierachy is private, and in a weird way 
> where you can change it, as long you play the game.
>
> Example:
> (def a {:type ::a :val 1})
>
> (defn cons-a-foo [bar in]
>   (if (isa? (:type in) ::foo)
> (cons (:val in) bar)
> bar))
>
> (cons-a-foo [] a); => []
> (derive ::a ::foo)   ; we change the global-hierarchy
> (cons-a-foo [] a); => [1]
> (underive ::a ::foo) ; yet again
> (cons-a-foo [] a); => []
>
> ;And then isa? also supports a 3-ary version, which takes a hierarchy as:
>
> (make-hierarchy) ; => {:parents {} :descendants {} :ancestors {}} ;omg it 
> is just a map! glad I know those
>
> This is all good, except for one reason: global-hierarchy is private.
> We can't for instance try a "alternate-hierarchy" that is mostly the 
> global one with some expeculations.
> We lose all the other map functions in dealing with, especifically, the 
> global-hierarchy.
> And then we're back to oop.
>
> If the global-hierarchy was not made private (or any function for that 
> matter), then we could choose if we want to deal it with, or not.
> In my experience, making something private is only worth the trouble if we 
> give a complete substitute, that does everything and better.
> Let's say a rocket would explode if we set it to nil.. Then, just don't.
>
> With all that say, can we please remove the ^{:private true} from the 
> global-hierarchy definition?
> Sorry if I rant.
>
>

-- 
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: Anyone spent time with Kawa Scheme?

2018-04-11 Thread Didier
Haven't tried Kawa, and my only other Lisp experience is Emacs Lisp.

That said, I think Clojure as a Lisp differentiate itself from other Lisps in 
that all its data-structures are built on abstractions. They default to be 
immutable in a performant and low memory profile way. Its got great added 
concurrency constructs like STM, CSP, Atom, Futures, Promises, Delays, etc. Its 
syntax includes very convenient default data-literals that has contributed to 
it having a culture of data-driven logic. EDN is great for serialization of 
code and data. It has powerful support for lazy evaluation, as well as strict. 
Finally, its interop with Java is excellent.

So, I don't know much about scheme and Kawa, but I suspect you'd have to build 
a lot to get all this back.

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