Clojure + ClojureScript + Electron + Om.Next + Boot and ProtoRepl on Atom to co-exist?

2016-10-03 Thread Ray King
Is there a blog post or has anyone tried to get a Clojure + ClojureScript + 
Electron + Om.Next + Boot and ProtoRepl on Atom to co-exist?

TL;DR
Background - Why?

1. We have a Clojure code base which deploys as a Jar local on a user's PC. 
It is running as a web socket server, serving a local browser application 
which talks to it, using messages and response events. It also as an 
intelligent proxy gateway to remote servers. 

2. We have started to build a new client application and that progressing 
nicely (Om.next). We are going to need to pop it into an Electron Shell 
(Local File Access and Needs to talk to some hardware device). We are 
approaching the client like a server.  The Render threads handling 'defui' 
and process thread handling the state reconciliation and talk to the local 
socket server.

3. Today we have Clojure Server in one code base, and separate Repo, the 
Clojurescript in another, ProtoRepl in Atom for the Clojure stuff and 
'binaryage / Dirac and cljs-devtools'. All very nice and everyone is happy.

4. The objective is to bring both the new client (Om.Next Electron) and the 
socket client-server and into one project. The rationale here is that start 
blurring the line between the main thread in electron and the socket server 
and move code into the client as we deprecate some of the Java 
dependencies. We are going to have to maintain a Clojure code base, as the 
Application is simulation intensive and multi-treaded, in Clojure the 
steady progression towards Java treading insanity is indeed halted. We hope 
to simplify the server side down to an nRepl like architecture where we are 
just sending evals from the client and farm out processing locally or 
remotely.

5. Before attempting to bring all these project elements together, I wanted 
to see if anyone has done the above and published a blog about it? I also 
wanted to get some community feedback. From Googling the pieces are out 
there, just not in a unified fashion.
Should the above be unique and appears to be of interest to others. I will 
ensure that we publish and share anything we come up with in the area.
Then we will feedback our experiences.

-- 
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: Is Pallet abandoned? Alternatives?

2016-10-03 Thread Karel Miarka
I'm very happy with Ansible https://github.com/ansible/ansible (it is not 
Ansible Tower = their commercial product). You need only ssh server on the 
controled machine, no state, idempotent execution.

-- 
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: multi-spec and unqualified keys

2016-10-03 Thread Beau Fabry
Changing these two lines works, but I don't know whether it would cause 
other issues

```
(defmulti event-type :type)
(s/def :event/event (s/multi-spec event-type :type))
```

On Monday, October 3, 2016 at 4:01:32 AM UTC-7, Karol Hosiawa wrote:
>
> I don't know how to define multi-spec so that it works with unqualified 
> keys and generators.
>
> An example from the official guide:
>
> https://clojure.org/guides/spec#_multi_spec
>
>
> (s/def :event/type keyword?)
> (s/def :event/timestamp int?)
> (s/def :search/url string?)
> (s/def :error/message string?)
> (s/def :error/code int?)
>
> (defmulti event-type :event/type)
> (defmethod event-type :event/search [_]
>   (s/keys :req-un [:event/type :event/timestamp :search/url]))
> (defmethod event-type :event/error [_]
>   (s/keys :req-un [:event/type :event/timestamp :error/message 
> :error/code]))
>
> (s/def :event/event (s/multi-spec event-type :event/type))
>
>
> I changed :req to :req-un 
>
> Now when I try to generate some data:
>
> (s/exercise :event/event 1)
>
> I get both :type and :event/type keys:
>
> ([{:type :V, :timestamp -1, :message "", :code -1, :event/type 
> :event/error} 
>   {:type :V, :timestamp -1, :message "", :code -1, :event/type 
> :event/error}])
>
> I'd like to have only the unqualified :type key in there.
>
> What am I missing ?
>
> Any help much appreciated.
> Karol
>
>

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


[CfP]: :clojureD Berlin Conference 2017

2016-10-03 Thread doctronic
Final month of CfP  for 
:clojureD  Berlin 2017!
Be part of the biggest annual Clojure conference in Germany, file a 
proposal and help us creating an awesome conference. Again. :)
(Ticket sale  starts Monday, 10th October 2016.)

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


multi-spec and unqualified keys

2016-10-03 Thread Karol Hosiawa
I don't know how to define multi-spec so that it works with unqualified 
keys and generators.

An example from the official guide:

https://clojure.org/guides/spec#_multi_spec


(s/def :event/type keyword?)
(s/def :event/timestamp int?)
(s/def :search/url string?)
(s/def :error/message string?)
(s/def :error/code int?)

(defmulti event-type :event/type)
(defmethod event-type :event/search [_]
  (s/keys :req-un [:event/type :event/timestamp :search/url]))
(defmethod event-type :event/error [_]
  (s/keys :req-un [:event/type :event/timestamp :error/message 
:error/code]))

(s/def :event/event (s/multi-spec event-type :event/type))


I changed :req to :req-un 

Now when I try to generate some data:

(s/exercise :event/event 1)

I get both :type and :event/type keys:

([{:type :V, :timestamp -1, :message "", :code -1, :event/type 
:event/error} 
  {:type :V, :timestamp -1, :message "", :code -1, :event/type 
:event/error}])

I'd like to have only the unqualified :type key in there.

What am I missing ?

Any help much appreciated.
Karol

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