Re: What to use for serializing reference types?

2014-08-11 Thread Jozef Wagner
Assign a unique name to the prototype object. Serialize instances as
map and put the reference to the prototype object under one of their
keys. Something like

{:prototype-components {:r10k {:resistance 10, :type :fixed, :unit :kΩ}}
 :components [{:name resistor 1, :proto :r10k}, {:name resistor 2,
:proto :r10k}]}

Jozef

On Sun, Aug 10, 2014 at 8:36 PM, MS 5lvqbw...@sneakemail.com wrote:
 I'm trying to write an EE schematic capture program in clojure.  I'd like to
 be able to define a prototype component, say a resistor with value=10k, then
 be able to instantiate that many times, with each instance having an
 additional property such as a name string.  It's easy to ensure (identical?
 (proto instance1) (proto instance2)) returns true while in-memory, however
 I'm not sure how to write this out to disk.

 It seems the serialization libraries, print-dup, edn, etc., operate on
 values, so reading the database back in won't guarantee it's really the same
 object.  I'd like to have the thing defined *once* then instantiated many
 times, and have this captured in the on-disk version.

 Am I barking up the wrong tree?  ie, given immutable data structures,
 there's kind of no point in doing this.  I'm actually trying to save disk
 space, so I'd like to be able to refer in a few characters a potentially
 large structure that was defined earlier.  It would also be nice to have
 this be human readable.

 Would one of the JSON serializers do this for me?


 --
 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: using Stuarts component library correctly

2014-08-11 Thread Sven Richter
Hi,

Following the tips I removed the middleware wrappers, separated the handler 
and created closures over the routes. Now, when I do a reset after every 
change I am having a nice experience.
So it was not much that was missing.

Thanks everybody for your help,
Sven


Am Sonntag, 10. August 2014 21:11:12 UTC+2 schrieb Matt Mitchell:

 Here's some relevant info about tools.namespace and protocols: 
 https://github.com/clojure/tools.namespace#warnings-for-protocols

 - Matt

 On Saturday, August 9, 2014 6:04:03 PM UTC-4, Sven Richter wrote:

 Hi,

 First I would like to thank everybody for your answers and hints.

 I setup a small project you can find here: 
 https://github.com/sveri/component_test
 You can run it with lein repl and then calling (go).

 I have three questions/problems for this one:
 1. Did I separate the handler and the server correctly (I was trying to 
 follow your advices)?

 2. In scheduler.clj I defined a protocol (additionally to the lifecycle 
 protocol) and a record implementing that protocol. I create a new instance 
 of that record and pass it down to the handler and there to the routes. 
 Now, when I open a webpage and go to http://localhost:3000/sched 
 everything works fine.
 Next I edit the add-job function in scheduler.cljs to print something 
 different like this:
 (add-job [this]
 (println new sys out))
 Just a small change is enough. If you go to the webpage again and try to 
 reload it an exception will be thrown:
 Sat Aug 09 23:52:28 CEST 2014 [worker-3] ERROR - GET /sched
 java.lang.IllegalArgumentException: No implementation of method: :add-job 
 of protocol: #'component-test.scheduler/ISched found for class: 
 component_test.schedul
 er.Sched
 at clojure.core$_cache_protocol_fn.invoke(core_deftype.clj:544)
 at 
 component_test.scheduler$eval6553$fn__6554$G__6544__6559.invoke(scheduler.clj:6)
 at component_test.routes$sched_in.invoke(routes.clj:8)
 at 
 component_test.routes$home_routes$fn__3312.invoke(routes.clj:19)
 at compojure.core$make_route$fn__2331.invoke(core.clj:99)
 at compojure.core$if_route$fn__2315.invoke(core.clj:45)
 ...

 I dont really understand why that happens and any hints regarding what I 
 am doing wrong would be great. And this leads to my last question.

 3. After having an exception I will usually try to reset the system with: 
 (reset), but in this case (and many different other cases) I will just get 
 another error:
 component-test.user= (reset)
 :reloading (component-test.scheduler component-test.routes 
 component-test.server component-test.handler component-test.core 
 component-test.user component-test.c
 ore-test)
 ;; Starting HTTP-Kit server on port 3000

 BindException Address already in use: bind  sun.nio.ch.Net.bind0 
 (Net.java:-2)

 And now all I can do is exit the repl and start it again to get my code 
 running.

 This is exactly what I dont want to do all the time and the problem I 
 thought would be solved by the component library, so once more, every hint 
 you have for me will be valuable about what I can do and what not.

 Best Regards,
 Sven

 Am Freitag, 8. August 2014 13:16:49 UTC+2 schrieb Sven Richter:

 Hi,

 I am trying to integrate Stuarts component library into my application. 
 I am not sure if I use it correctly or do something else wrong or just have 
 a wrong mindset. So I will explain how I am currently using it and the 
 problem I see with it.

 I have three components: database, a scheduler and web application (note 
 that my example is simplified to get faster to the point). These components 
 are built like this:

 (component/system-map
   :database (db db-uri)
   :scheduler (component/using (scheduler) [:database])
   :web-app (component/using (web-app)
 [:database
  :scheduler] ))

 And in my web-app I do something like this:

 (start [component]
 (let [db-conn (get-in web-app [:database :db-conn])]
   (assoc component :server
(run-server (make-handler web-app db-conn) {:port 
 port}

 And make-handler is a middleware that associates the database component 
 into the request map.

 Now as I added the scheduler to my system it occured to me that I will 
 have to associate the scheduler into the request map too to access it and I 
 might have to do that for every other component that is coming along the 
 road.
 So basically I am tying my web-app to to all these components and I am 
 tying some components to other components (like scheduler component to the 
 database component).

 And by tying this things together this way they do depend on each other 
 and I cannot move them anymore. This came to my mind as I started thinking 
 about microservices.

 So let's say I want to convert the scheduler into a restful 
 microservice, it's hard to pass in a database connection into it via HTTP, 
 so it seems like it's not decoupled enough. Does that 

Re: CIDER vs Org Mode: Symbol's definition is void: nrepl-send-string-sync (workaround)

2014-08-11 Thread Bozhidar Batsov
On August 10, 2014 at 11:51:07 PM, Matching Socks (phill.w...@gmail.com) wrote:
Using Org Mode's org-babel-execute-src-block, I ran into Symbol's definition 
is void: nrepl-send-string-sync after installing a recent update of the cider 
package from Melpa.
This was recently renamed - have a look at CIDER's changelog. Interestingly we 
have an alias with the old name, so people should be getting warnings, not 
errors. I’ll have at the problem.



cider-eval-sync appears to be an adequate substitute for the function that 
vanished.  The new function is in the cider-client module.  The usage that 
needs adjustment is in ob-clojure.
--
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: Core.logic for boardgames

2014-08-11 Thread Henrik Eneroth
I have no idea, but I'm also interested in the answer. ^_^

On Saturday, August 9, 2014 12:51:20 PM UTC+2, Robin Heggelund Hansen wrote:

 Hi.

 I'm starting a new project now, where users are presented with a set of 
 boardgames (chess, checkers, othello...) which they then can play together 
 online.
 Does it make sense to implement the game logic using core.logic, and does 
 it transfer well to cljs (i'd like to share logic between backend and 
 frontend if i can)?

 I don't know core.logic, but would like to learn if it is a good fit for 
 the problem I'm solving.

 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: Core.logic for boardgames

2014-08-11 Thread Mark Engelberg
I don't see how core.logic would apply here.

You might be interested in a Java-based general game playing engine which
you can leverage from Clojure.  Many take logical descriptions of the game
rules in LISP form.

http://www.ggp.org/



On Sat, Aug 9, 2014 at 3:51 AM, Robin Heggelund Hansen skinney...@gmail.com
 wrote:

 Hi.

 I'm starting a new project now, where users are presented with a set of
 boardgames (chess, checkers, othello...) which they then can play together
 online.
 Does it make sense to implement the game logic using core.logic, and does
 it transfer well to cljs (i'd like to share logic between backend and
 frontend if i can)?

 I don't know core.logic, but would like to learn if it is a good fit for
 the problem I'm solving.

 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: Core.logic for boardgames

2014-08-11 Thread Robin Heggelund Hansen
The idea was to implement the game rules (validating a move) using 
core.logic, but I take it that isn't something core.logic would be suited 
for?

kl. 11:42:18 UTC+2 mandag 11. august 2014 skrev puzzler følgende:

 I don't see how core.logic would apply here.

 You might be interested in a Java-based general game playing engine which 
 you can leverage from Clojure.  Many take logical descriptions of the game 
 rules in LISP form.

 http://www.ggp.org/



 On Sat, Aug 9, 2014 at 3:51 AM, Robin Heggelund Hansen skinn...@gmail.com 
 javascript: wrote:

 Hi.

 I'm starting a new project now, where users are presented with a set of 
 boardgames (chess, checkers, othello...) which they then can play together 
 online.
 Does it make sense to implement the game logic using core.logic, and does 
 it transfer well to cljs (i'd like to share logic between backend and 
 frontend if i can)?

 I don't know core.logic, but would like to learn if it is a good fit for 
 the problem I'm solving.

 Thanks!

 -- 
 You received this message because you are subscribed to the Google
 Groups Clojure group.
 To post to this group, send email to clo...@googlegroups.com 
 javascript:
 Note that posts from new members are moderated - please be patient with 
 your first post.
 To unsubscribe from this group, send email to
 clojure+u...@googlegroups.com javascript:
 For more options, visit this group at
 http://groups.google.com/group/clojure?hl=en
 --- 
 You received this message because you are subscribed to the Google Groups 
 Clojure group.
 To unsubscribe from this group and stop receiving emails from it, send an 
 email to clojure+u...@googlegroups.com javascript:.
 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: [ANN] Leiningen 2.4.3

2014-08-11 Thread Andy Dwelly


On Wednesday, August 6, 2014 12:54:16 AM UTC+1, Phil Hagelberg wrote:

 Hello everyone. 

 I'm happy to announce the release of Leiningen 2.4.3. This release 
 includes a number of small fixes and one big fix: access to the Central 
 repository now occurs over HTTPS since Sonatype opened up public SSL 
 access to Central yesterday[1]


Because of the security fix, I upgraded today (1st day back at work after 
the hols) but have run into an issue running lein outside of an existing 
project. nREPL throws an exception on startup. Rather than repeating the 
details here I see that the problem has been covered in some detail 
here: https://github.com/technomancy/leiningen/issues/1625

I've downgraded back to 2.4.2 for the moment as I wasn't clear from the 
discussion on github on how to fix this. Is there something I could do 
quickly to sort this out for my own installation or is waiting the best 
policy?

-- 
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: Core.logic for boardgames

2014-08-11 Thread Kalina Todorova
Core.logic is just Clojure implementation of logic like programming and
actually you can use logic programming for chess games (the example is in
Prolog)
http://stackoverflow.com/questions/9337074/what-is-the-neatest-prolog-implementation-for-conways-game-of-life




On Mon, Aug 11, 2014 at 11:41 AM, Mark Engelberg mark.engelb...@gmail.com
wrote:

 I don't see how core.logic would apply here.

 You might be interested in a Java-based general game playing engine which
 you can leverage from Clojure.  Many take logical descriptions of the game
 rules in LISP form.

 http://www.ggp.org/



 On Sat, Aug 9, 2014 at 3:51 AM, Robin Heggelund Hansen 
 skinney...@gmail.com wrote:

 Hi.

 I'm starting a new project now, where users are presented with a set of
 boardgames (chess, checkers, othello...) which they then can play together
 online.
 Does it make sense to implement the game logic using core.logic, and does
 it transfer well to cljs (i'd like to share logic between backend and
 frontend if i can)?

 I don't know core.logic, but would like to learn if it is a good fit for
 the problem I'm solving.

 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.




-- 

 Best regards | Med venlig hilsen,

 Kalina Todorova
T: 0045 52 64 93 73
E: ad...@ki6i.com

Trongårdsvej 46, 1
2800 Lyngby
 http://www.facebook.com/ki6i.kali http://dk.linkedin.com/in/ki6i90
 https://twitter.com/#%21/ki6i http://blog.ki6i.com

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


Benchmarking structural sharing

2014-08-11 Thread Paul Butcher
Is there any way to benchmark the degree of structural sharing achieved by a 
Clojure algorithm? I'm evaluating two different implementations of an 
algorithm, one which uses zippers and one which uses rrb-vector. It would be 
great if there were some way to quantify the degree to which they both achieved 
(or didn't) structural sharing.

--
paul.butcher-msgCount++

Silverstone, Brands Hatch, Donington Park...
Who says I have a one track mind?

http://www.paulbutcher.com/
LinkedIn: http://www.linkedin.com/in/paulbutcher
Skype: paulrabutcher

Author of Seven Concurrency Models in Seven Weeks: When Threads Unravel
http://pragprog.com/book/pb7con

-- 
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: Core.logic for boardgames

2014-08-11 Thread Moritz Ulrich
Robin Heggelund Hansen skinney...@gmail.com writes:

Implementing non-trivial game-logic in core.logic or any other
logic-programming system is likely harder than implementing the
validation in Clojure, as you'd have to learn many new idioms and a
totally different programming style - but it's really mind-opening too.

You might just want to give it a try by learning some logic programming.
core.logic isn't well-suited nor ill-suited for such a task.

 The idea was to implement the game rules (validating a move) using 
 core.logic, but I take it that isn't something core.logic would be suited 
 for?

 kl. 11:42:18 UTC+2 mandag 11. august 2014 skrev puzzler følgende:

 I don't see how core.logic would apply here.

 You might be interested in a Java-based general game playing engine which 
 you can leverage from Clojure.  Many take logical descriptions of the game 
 rules in LISP form.

 http://www.ggp.org/



 On Sat, Aug 9, 2014 at 3:51 AM, Robin Heggelund Hansen skinn...@gmail.com 
 javascript: wrote:

 Hi.

 I'm starting a new project now, where users are presented with a set of 
 boardgames (chess, checkers, othello...) which they then can play together 
 online.
 Does it make sense to implement the game logic using core.logic, and does 
 it transfer well to cljs (i'd like to share logic between backend and 
 frontend if i can)?

 I don't know core.logic, but would like to learn if it is a good fit for 
 the problem I'm solving.

 Thanks!

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

-- 
Moritz Ulrich


pgpbS5dpyp8yP.pgp
Description: PGP signature


Re: Core.logic for boardgames

2014-08-11 Thread Robin Heggelund Hansen
Ok, thanks for all the answers :)

kl. 15:11:39 UTC+2 mandag 11. august 2014 skrev Moritz Ulrich følgende:

 Robin Heggelund Hansen skinn...@gmail.com javascript: writes: 

 Implementing non-trivial game-logic in core.logic or any other 
 logic-programming system is likely harder than implementing the 
 validation in Clojure, as you'd have to learn many new idioms and a 
 totally different programming style - but it's really mind-opening too. 

 You might just want to give it a try by learning some logic programming. 
 core.logic isn't well-suited nor ill-suited for such a task. 

  The idea was to implement the game rules (validating a move) using 
  core.logic, but I take it that isn't something core.logic would be 
 suited 
  for? 
  
  kl. 11:42:18 UTC+2 mandag 11. august 2014 skrev puzzler følgende: 
  
  I don't see how core.logic would apply here. 
  
  You might be interested in a Java-based general game playing engine 
 which 
  you can leverage from Clojure.  Many take logical descriptions of the 
 game 
  rules in LISP form. 
  
  http://www.ggp.org/ 
  
  
  
  On Sat, Aug 9, 2014 at 3:51 AM, Robin Heggelund Hansen 
 skinn...@gmail.com 
  javascript: wrote: 
  
  Hi. 
  
  I'm starting a new project now, where users are presented with a set 
 of 
  boardgames (chess, checkers, othello...) which they then can play 
 together 
  online. 
  Does it make sense to implement the game logic using core.logic, and 
 does 
  it transfer well to cljs (i'd like to share logic between backend and 
  frontend if i can)? 
  
  I don't know core.logic, but would like to learn if it is a good fit 
 for 
  the problem I'm solving. 
  
  Thanks! 
  
  -- 
  You received this message because you are subscribed to the Google 
  Groups Clojure group. 
  To post to this group, send email to clo...@googlegroups.com 
  javascript: 
  Note that posts from new members are moderated - please be patient 
 with 
  your first post. 
  To unsubscribe from this group, send email to 
  clojure+u...@googlegroups.com javascript: 
  For more options, visit this group at 
  http://groups.google.com/group/clojure?hl=en 
  --- 
  You received this message because you are subscribed to the Google 
 Groups 
  Clojure group. 
  To unsubscribe from this group and stop receiving emails from it, send 
 an 
  email to clojure+u...@googlegroups.com javascript:. 
  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 clo...@googlegroups.com 
 javascript: 
  Note that posts from new members are moderated - please be patient with 
 your first post. 
  To unsubscribe from this group, send email to 
  clojure+u...@googlegroups.com javascript: 
  For more options, visit this group at 
  http://groups.google.com/group/clojure?hl=en 
  --- 
  You received this message because you are subscribed to the Google 
 Groups Clojure group. 
  To unsubscribe from this group and stop receiving emails from it, send 
 an email to clojure+u...@googlegroups.com javascript:. 
  For more options, visit https://groups.google.com/d/optout. 

 -- 
 Moritz Ulrich 


-- 
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: Looking for Clojure freelancers

2014-08-11 Thread Kalina Todorova
Hi to you all,

I am mainly back-end web developer in Denmark.. I have professional 
experience with Clojure and I am looking for some additional experience in 
new Clojure projects.

You can contact me on the following information:
-- 

 Best regards | Med venlig hilsen, 

 Kalina Todorova  
T: 0045 52 64 93 73 
E: ad...@ki6i.com 
 

  
 http://www.facebook.com/ki6i.kali http://dk.linkedin.com/in/ki6i90  
 https://twitter.com/#%21/ki6i http://blog.ki6i.com


On Thursday, July 25, 2013 3:27:18 PM UTC+2, Tosin Oguntuase wrote:

 Hi everyone,

 I am the technical lead for a sport betting platform based in Nigeria. 

 We are in the process of re-writing our community site (fanalysis.net) 
 and betting platform(playcenter.fanalysis.net).

 We intend to use clojure for the development. So far we have recruited two 
 local developers but need at least three other developers to work on the 
 project. We are also working with a designer based in Sweden.

 Kindly send me a mail if you are interested; links to past works, area of 
 expertise/interest,hourly rate would be highly appreciated.

 Thank you.

 On Monday, June 3, 2013 12:38:20 PM UTC+1, Peter Taoussanis wrote:

 Hi all,

 From time to time I have need for one or two extra hands (or, would that 
 be pairs of hands?) on larger projects. Specifically, am looking for 
 Clojure developers that'd be interested in occasional adhoc/freelance 
 development work.

 Most of my work is on the web application side, but it can vary.

 What I'd like to ask is this: if anyone's interested, drop me an email 
 (*ptaoussanis 
 at taoensso.com http://taoensso.com*) with some basic info including:

- Contact details (would prefer an international telephone number 
also if possible).
- Your experience / informal CV (open-source stuff is my preferred 
reference, especially if it's Clojure-based).
- Any particular areas of interest/expertise (e.g. you especially 
want to work with Datomic, backend services, Clojurescript, whatever).
- Your rate + how negotiable it'd be and/or how it'd scale with 
longer-term jobs.

 I can then keep your details on file and give an occasional shout if 
 something comes up that I could potentially use you for.

 Whole thing'd be about as informal as it gets: terms will vary based on 
 the particular job, but I'll include all of that in the email so you can 
 decide if/when something grabs your fancy.

 Cheers!

 - Peter (taoensso.com https://www.taoensso.com)



-- 
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: What to use for serializing reference types?

2014-08-11 Thread James Reeves
If your purpose is just to save disk space, then I'd suggest just using
compression. Two identical data types should produce the same sequence of
bytes, which are easily compressed. I believe Nippy has a fast compression
via Snappy enabled by default.

- James


On 10 August 2014 19:36, MS 5lvqbw...@sneakemail.com wrote:

 I'm trying to write an EE schematic capture program in clojure.  I'd like
 to be able to define a prototype component, say a resistor with value=10k,
 then be able to instantiate that many times, with each instance having an
 additional property such as a name string.  It's easy to ensure (identical?
 (proto instance1) (proto instance2)) returns true while in-memory,
 however I'm not sure how to write this out to disk.

 It seems the serialization libraries, print-dup, edn, etc., operate on
 values, so reading the database back in won't guarantee it's really the
 same object.  I'd like to have the thing defined *once* then instantiated
 many times, and have this captured in the on-disk version.

 Am I barking up the wrong tree?  ie, given immutable data structures,
 there's kind of no point in doing this.  I'm actually trying to save disk
 space, so I'd like to be able to refer in a few characters a potentially
 large structure that was defined earlier.  It would also be nice to have
 this be human readable.

 Would one of the JSON serializers do this for me?


  --
 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: [ClojureScript] Re: ANN: ClojureScript 0.0-2301, Transducers!

2014-08-11 Thread Alex Miller
Sonatype reports the cache has been purged and it should be working again.
Seems to be for me.


On Mon, Aug 11, 2014 at 8:35 AM, Ivan Mikushin i.mikus...@gmail.com wrote:

 The same issue (and workaround) applies to clojurescript-0.0.2311

 --
 Note that posts from new members are moderated - please be patient with
 your first post.
 ---
 You received this message because you are subscribed to a topic in the
 Google Groups ClojureScript group.
 To unsubscribe from this topic, visit
 https://groups.google.com/d/topic/clojurescript/ghpbnZKjx3w/unsubscribe.
 To unsubscribe from this group and all its topics, send an email to
 clojurescript+unsubscr...@googlegroups.com.
 To post to this group, send email to clojurescr...@googlegroups.com.
 Visit this group at http://groups.google.com/group/clojurescript.


-- 
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: What to use for serializing reference types?

2014-08-11 Thread Patrick Logan
Space is one thing, but I would assume the net list should be able to represent 
sequential logic, which implies a cyclic graph.

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


New Functional Programming Job Opportunities

2014-08-11 Thread Functional Jobs
Here are some functional programming job opportunities that were posted

recently:



Big Data Engineer / Data Scientist at Recruit IT

http://functionaljobs.com/jobs/8731-big-data-engineer-data-scientist-at-recruit-it



Cheers,

Sean Murphy

FunctionalJobs.com


-- 
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: Success Stories w/US Government Projects

2014-08-11 Thread rcg
These are the specific objections- BTW we are using clojure as part of 
Server side code for website...

1. This Agreement is governed by the laws of the State of New York. Not 
acceptable: The federal government cannot agree to be bound by state law.

2. Each party waives its rights to a jury trial in any 
resulting litigation. Not acceptable: Only DOJ can control litigation.

On Sunday, August 10, 2014 1:19:48 AM UTC-10, Paul Butcher wrote:

 Out of interest, which aspect(s) of the EPL are your lawyers objecting to?

 --
 paul.butcher-msgCount++

 Silverstone, Brands Hatch, Donington Park...
 Who says I have a one track mind?

 http://www.paulbutcher.com/
 LinkedIn: http://www.linkedin.com/in/paulbutcher
 Skype: paulrabutcher

 Author of Seven Concurrency Models in Seven Weeks: When Threads Unravel
 http://pragprog.com/book/pb7con

 On 9 August 2014 at 01:54:22, rcg (randy.g...@gmail.com javascript:) 
 wrote:

 Hello; 

 We are looking for Clojure success stories within the US Government.

 If you have a success story you'd be willing to share, this may counter or 
 help resolve objections to the EPL license that have been raised by 
 Lawyers. Our development group has had much success with Clojure. 
 Unfortunately, we may be forced away from Clojure. 

 An alternative would be to have the license modified (we understand that 
 is probably a non-starter) or have a dual license setup for Clojure (with 
 acceptable license).

 However, if there are other groups out there that have survived US Govt 
 Lawyer Scrutiny of the EPL, that may be very useful.

 Thanks in advance for any help!
  --
 You received this message because you are subscribed to the Google
 Groups Clojure group.
 To post to this group, send email to clo...@googlegroups.com javascript:
 Note that posts from new members are moderated - please be patient with 
 your first post.
 To unsubscribe from this group, send email to
 clojure+u...@googlegroups.com javascript:
 For more options, visit this group at
 http://groups.google.com/group/clojure?hl=en
 ---
 You received this message because you are subscribed to the Google Groups 
 Clojure group.
 To unsubscribe from this group and stop receiving emails from it, send an 
 email to clojure+u...@googlegroups.com javascript:.
 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.


RICON CFP open - anyone submitting?

2014-08-11 Thread Alex Miller
RICON CFP is open - anyone planning on submitting anything Clojure-related?
CFP ends in one week:

http://ricon.io/event-details/index.html

Event is in Las Vegas, Oct 28-29.

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


handling agent errors

2014-08-11 Thread Brian Craft
Two questions, really. I'm running large batch jobs with an agent. The jobs 
may fail in any number of unanticipated ways (due to user input), so I do a 
try/catch in the agent, log any errors, and continue with the next job.

First question: how to deal with OOM (the Xmx limit, not the OS out of 
mem)? The try/catch doesn't appear to help, here. The agent dies, and all 
subsequent jobs never run. Is there some way to prevent or recover from 
this?

I posed this to a long-time java developer, who said I shouldn't be doing a 
blanket try/catch in the first place, because it's likely to result in 
leaked memory (presumably due to badly-coded libs that don't release 
resources on error). His suggestion: let the thread die on error, and 
restart it from a monitoring thread. I'm not sure how this translates to 
clojure agents. If I don't catch the errors, then log the agent error state 
and restart it, is that equivalent? Is this best practice? Seems like 
badly-coded libs could still leak memory this way, if they've stashed a 
reference in any shared state.

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


workflow with aot compiling

2014-08-11 Thread Brian Craft
A number of clojure tools, like tools.namespaces, and codox, don't work 
with aot compiling, and their docs say to turn it off. However aot 
compiling isn't really optional: we're embracing the platform, and java 
libs like their named classes.

How do you work around this? I can move aot compiling to the uberjar 
target, but then I can't work on the system from the repl, because it can't 
be launched. The java libs won't find the classes they need.

-- 
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: What to use for serializing reference types?

2014-08-11 Thread MS
Thanks, I'm roughly familiar with edif, having seen it on occasion in 
various previous lifetimes.  However I'm trying to get away from Big EDA 
companies in genera.  Without looking at the format in too much detail, it 
seems to want to define how the internal structure of the program would be, 
ie how libraries are done, etc..  Also it appears to be mask-based, ie IC 
design; I'm trying to do something PCB level.I'll take a look at 
JSON-LD.


On Sunday, August 10, 2014 6:37:01 PM UTC-7, Patrick Logan wrote:

 You'll have to adopt some form of reference designator. JSON-LD defines 
 these. More domain specific, you could implement a subset of or borrow 
 ideas from EDIF, a standard Electronic Design Interchange Format, which 
 happens to be based on Lisp. 

 http://en.m.wikipedia.org/wiki/EDIF 


-- 
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: What to use for serializing reference types?

2014-08-11 Thread MS
Thanks, that's what I was starting to converge on, basically relying on a 
unique identifier for the prototype... but in trying to be flexible perhaps 
a component instance would actually just be the search text for a more 
comprehensive search which may in fact pull up several prototypes which the 
user can select in more detail later on.

On Sunday, August 10, 2014 11:19:06 PM UTC-7, Jozef Wagner wrote:

 Assign a unique name to the prototype object. Serialize instances as 
 map and put the reference to the prototype object under one of their 
 keys. Something like 

 {:prototype-components {:r10k {:resistance 10, :type :fixed, :unit :kΩ}} 
  :components [{:name resistor 1, :proto :r10k}, {:name resistor 2, 
 :proto :r10k}]} 

 Jozef 

 On Sun, Aug 10, 2014 at 8:36 PM, MS 5lvq...@sneakemail.com javascript: 
 wrote: 
  I'm trying to write an EE schematic capture program in clojure.  I'd 
 like to 
  be able to define a prototype component, say a resistor with value=10k, 
 then 
  be able to instantiate that many times, with each instance having an 
  additional property such as a name string.  It's easy to ensure 
 (identical? 
  (proto instance1) (proto instance2)) returns true while in-memory, 
 however 
  I'm not sure how to write this out to disk. 
  
  It seems the serialization libraries, print-dup, edn, etc., operate on 
  values, so reading the database back in won't guarantee it's really the 
 same 
  object.  I'd like to have the thing defined *once* then instantiated 
 many 
  times, and have this captured in the on-disk version. 
  
  Am I barking up the wrong tree?  ie, given immutable data structures, 
  there's kind of no point in doing this.  I'm actually trying to save 
 disk 
  space, so I'd like to be able to refer in a few characters a potentially 
  large structure that was defined earlier.  It would also be nice to have 
  this be human readable. 
  
  Would one of the JSON serializers do this for me? 
  
  
  -- 
  You received this message because you are subscribed to the Google 
  Groups Clojure group. 
  To post to this group, send email to clo...@googlegroups.com 
 javascript: 
  Note that posts from new members are moderated - please be patient with 
 your 
  first post. 
  To unsubscribe from this group, send email to 
  clojure+u...@googlegroups.com javascript: 
  For more options, visit this group at 
  http://groups.google.com/group/clojure?hl=en 
  --- 
  You received this message because you are subscribed to the Google 
 Groups 
  Clojure group. 
  To unsubscribe from this group and stop receiving emails from it, send 
 an 
  email to clojure+u...@googlegroups.com javascript:. 
  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: What to use for serializing reference types?

2014-08-11 Thread MS
Thanks, I figure now in 2014 disk space is not a big deal, and any two 
sequences of text will compress to something really small, so saving disk 
space is not a compelling reason for reference data.  There was in fact a 
decent reason I wanted these to reference the same object, but of course I 
can't think of what that was now.  It'll return to me when I'm half asleep.

On Monday, August 11, 2014 7:49:51 AM UTC-7, James Reeves wrote:

 If your purpose is just to save disk space, then I'd suggest just using 
 compression. Two identical data types should produce the same sequence of 
 bytes, which are easily compressed. I believe Nippy has a fast compression 
 via Snappy enabled by default.

 - James


 On 10 August 2014 19:36, MS 5lvq...@sneakemail.com javascript: wrote:

 I'm trying to write an EE schematic capture program in clojure.  I'd like 
 to be able to define a prototype component, say a resistor with value=10k, 
 then be able to instantiate that many times, with each instance having an 
 additional property such as a name string.  It's easy to ensure (identical? 
 (proto instance1) (proto instance2)) returns true while in-memory, 
 however I'm not sure how to write this out to disk.

 It seems the serialization libraries, print-dup, edn, etc., operate on 
 values, so reading the database back in won't guarantee it's really the 
 same object.  I'd like to have the thing defined *once* then instantiated 
 many times, and have this captured in the on-disk version.

 Am I barking up the wrong tree?  ie, given immutable data structures, 
 there's kind of no point in doing this.  I'm actually trying to save disk 
 space, so I'd like to be able to refer in a few characters a potentially 
 large structure that was defined earlier.  It would also be nice to have 
 this be human readable.

 Would one of the JSON serializers do this for me?


  -- 
 You received this message because you are subscribed to the Google
 Groups Clojure group.
 To post to this group, send email to clo...@googlegroups.com 
 javascript:
 Note that posts from new members are moderated - please be patient with 
 your first post.
 To unsubscribe from this group, send email to
 clojure+u...@googlegroups.com javascript:
 For more options, visit this group at
 http://groups.google.com/group/clojure?hl=en
 --- 
 You received this message because you are subscribed to the Google Groups 
 Clojure group.
 To unsubscribe from this group and stop receiving emails from it, send an 
 email to clojure+u...@googlegroups.com javascript:.
 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: What to use for serializing reference types?

2014-08-11 Thread MS
Actually there are several things going on.
In general the database I'm trying to define would include not only the 
actual net list (ie a mapping between nets and pins), but also all the PCB 
junk that goes on. 

The cyclic graph requires some type of mutability if I want to find the net 
that belongs to a node and also find the nodes that belong to a net, but I 
may have come up with something that works without mutability, which  I 
described a while ago 
here: 
http://stackoverflow.com/questions/4580865/how-can-one-create-cyclic-and-immutable-data-structures-in-clojure-without-ext/10242730#10242730
 
 .  I haven't done much with that since I wrote it, so I'm not sure it'll 
work well.

So far I'm overwhelmed at trying to think about how to capture all the 
features I've thought of.  I guess I just need to start small.



On Monday, August 11, 2014 7:58:02 AM UTC-7, Patrick Logan wrote:

 Space is one thing, but I would assume the net list should be able to 
 represent sequential logic, which implies a cyclic graph.

-- 
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: workflow with aot compiling

2014-08-11 Thread Sean Corfield
We've moved to a model where we AOT only those namespaces that need to result 
in Java classes and we resolve into the main code at runtime for the 
implementation. We have all the AOT shims in one project and everything in 
non-AOT projects. That allows us to essentially ignore AOT except for the very 
thin interface Java imposes on our code - and we can work in the REPL with 
nearly all our code and test-drive it etc using a regular Clojure workflow.

Only when the shim actually changes do we need to run `lein install` to AOT 
compile  install an updated JAR, then restart our main project REPL to pick up 
that API change. Since the implementation is require'd and resolve'd in at 
runtime, it can change as much as we want in the meantime.

On Aug 11, 2014, at 2:13 PM, Brian Craft craft.br...@gmail.com wrote:
 A number of clojure tools, like tools.namespaces, and codox, don't work with 
 aot compiling, and their docs say to turn it off. However aot compiling isn't 
 really optional: we're embracing the platform, and java libs like their named 
 classes.
 
 How do you work around this? I can move aot compiling to the uberjar target, 
 but then I can't work on the system from the repl, because it can't be 
 launched. The java libs won't find the classes they need.




signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: What to use for serializing reference types?

2014-08-11 Thread Patrick Logan
Yeah, EDIF is certainly a big, old, consensual standard. It does handle 
PCBs just fine. I thought it might be worth perusing for useful nuggets and 
insights rather than an en masse kind of adoption.

On Monday, August 11, 2014 3:13:17 PM UTC-7, MS wrote:

 Thanks, I'm roughly familiar with edif, having seen it on occasion in 
 various previous lifetimes.  However I'm trying to get away from Big EDA 
 companies in genera.  Without looking at the format in too much detail, it 
 seems to want to define how the internal structure of the program would be, 
 ie how libraries are done, etc..  Also it appears to be mask-based, ie IC 
 design; I'm trying to do something PCB level.I'll take a look at 
 JSON-LD.


 On Sunday, August 10, 2014 6:37:01 PM UTC-7, Patrick Logan wrote:

 You'll have to adopt some form of reference designator. JSON-LD defines 
 these. More domain specific, you could implement a subset of or borrow 
 ideas from EDIF, a standard Electronic Design Interchange Format, which 
 happens to be based on Lisp. 

 http://en.m.wikipedia.org/wiki/EDIF 



-- 
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] ring-middleware-format 0.4.0 with Transit support

2014-08-11 Thread Nils Grunwald
I am pleased to announce a new version of ring-middleware-format 
https://github.com/ngrunwald/ring-middleware-format, with the main 
highlight being transit support both for decoding requests bodies and 
encoding responses. ring-middleware-format is a Ring middleware that 
transparently handles decoding from multiple formats and encoding responses 
in the same formats. As it also supports JSON, it should be possible to 
easily introduce Transit in Ring web apps while still maintaining backward 
compatibility for legacy clients. I hope you find it useful.

Some features:

   - Ring compatible middleware, works with any web framework build on top 
   of Ring
   - Automatically parses requests and encodes responses according to 
   Content-Type and Accept headers
   - Automatically handles charset detection of requests bodies, even if 
   the charset given by the MIME type is absent or wrong (using ICU)
   - Automatically selects and uses the right charset for the response 
   according to the request header
   - Varied formats handled out of the box (*JSON*, *YAML*, *EDN*, *Transit 
   over JSON or Msgpack*)
   - Pluggable system makes it easy to add to the standards encoders and 
   decoders custom ones (proprietary format, Protobuf, specific xml, csv, 
   etc.). Pull requests welcome.
   
Here is the detailed changelog for this version:
https://github.com/ngrunwald/ring-middleware-format/blob/master/Changes.md

Project home
https://github.com/ngrunwald/ring-middleware-format


-- 
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: What to use for serializing reference types?

2014-08-11 Thread Patrick Logan
See inline...

On Monday, August 11, 2014 3:32:21 PM UTC-7, MS wrote:

 Actually there are several things going on.
 In general the database I'm trying to define would include not only the 
 actual net list (ie a mapping between nets and pins), but also all the PCB 
 junk that goes on. 

 The cyclic graph requires some type of mutability...


 I was addressing the serialization of a cyclic structure more than the 
mutability of cyclic structures. Those are two independent issues.
 

 ...if I want to find the net that belongs to a node and also find the 
 nodes that belong to a net, but I may have come up with something that 
 works without mutability, which  I described a while ago here: 
 http://stackoverflow.com/questions/4580865/how-can-one-create-cyclic-and-immutable-data-structures-in-clojure-without-ext/10242730#10242730
  
  .  I haven't done much with that since I wrote it, so I'm not sure it'll 
 work well.


Sure, a cyclic graph can be connected symbolically using any number of 
immutable structures of such symbols. The selection of a structure could 
depend on the required functionality, e.g. if your PCBs might consist of 
millions of pins, if you want to run discrete simulations, etc.

(Having said that, I'm not a fan of immutability for immutability's sake, 
but this is the Clojure list, and you seem determined, so, I'll assume 
there's a good reason and let it go at that.)

So far I'm overwhelmed at trying to think about how to capture all the 
 features I've thought of.  I guess I just need to start small.


There's something to be said for that.
 

-- 
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: What to use for serializing reference types?

2014-08-11 Thread John Wiseman
Interestingly, it looks like early versions of clojure.pprint had
*print-circle* to handle printing of cyclic data structures:
http://clojuredocs.org/clojure_contrib/clojure.contrib.pprint/*print-circle*

Maybe something along the lines of Common Lisp's reference syntax was
considered and rejected?  E.g. #1=(1 2 3 . #1#)



On Sun, Aug 10, 2014 at 11:36 AM, MS 5lvqbw...@sneakemail.com wrote:

 I'm trying to write an EE schematic capture program in clojure.  I'd like
 to be able to define a prototype component, say a resistor with value=10k,
 then be able to instantiate that many times, with each instance having an
 additional property such as a name string.  It's easy to ensure (identical?
 (proto instance1) (proto instance2)) returns true while in-memory,
 however I'm not sure how to write this out to disk.

 It seems the serialization libraries, print-dup, edn, etc., operate on
 values, so reading the database back in won't guarantee it's really the
 same object.  I'd like to have the thing defined *once* then instantiated
 many times, and have this captured in the on-disk version.

 Am I barking up the wrong tree?  ie, given immutable data structures,
 there's kind of no point in doing this.  I'm actually trying to save disk
 space, so I'd like to be able to refer in a few characters a potentially
 large structure that was defined earlier.  It would also be nice to have
 this be human readable.

 Would one of the JSON serializers do this for me?


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


[ANN] Pink and Score

2014-08-11 Thread Steven Yi
Hi All,

I'd like to announce two Clojure libraries for music systems design
and composition called Pink[1] and Score[2].

Pink is a library for music system design. It currently contains code
for an audio engine, events processing, and signal processing. It is
heavily influenced by Music-N systems (i.e. Csound, SuperCollider),
but explores some novel areas of music system design, such as using
audio-rate functions as arguments to instruments.  This allows doing
things such as reusing an instrument whether it has a fixed pitch, a
glissandi, randomized frequencies, etc., depending on what the user
decides to pass in as an argument (rather than encoding that within
the instrument design).  Events are also generalized as delayed
function applications, which allows a great flexibility for the user
to decide what will happen when an event is processed.

Score is a higher-level library for music score generation.  This
library contains two primary score generation models--one based on
CMask[3], the other on SuperCollider's Patterns[4]--each of which
solves various score generation use cases. Score also contains some
useful functions for converting units to frequencies and working with
non-standard scales that have scale degrees different than the western
standard of 12 tone equal temperament. The library is designed to
stand alone and work with various other systems.  I currently use it
in my integrated music environment Blue[5] to generate Csound scores
(I have Clojure embedded within the program), as well as use it with
Pink.

I've also added a music-examples[6] project that I'm using to explore
use of Pink and Score together.  There is also an example there using
Incanter to plot the audio signals generated from a French Horn model
as well as the output of an envelope generator. (This was useful for
debugging some instrument code that went awry. :) )

Some notes:

* In the Clojure world, most people working on music probably use
Overtone. I think Overtone is an excellent project and will probably
handle many people's use cases. However, I am interested in use cases
which are--as far as I understand--not possible with Overtone,
particularly crossing the event boundary with audio-rate functions as
arguments.  (I believe that's a limitation of SuperCollider rather
than Overtone though; if that situation has changed since last I
looked into it, then please let me know.)  I am also very much
interested in encapsulating projects as fully as possible, for the
purpose of having higher preservation of musical works.  This made me
curious to explore a pure-JVM solution.

* Most of the experimentation so far has been done using the REPL and
Vim.  You can check out the code in the demo folders in Pink/src and
Score/src for some hints.  I hope to get around to documentation and
tutorials soon.

* I have not yet fully benchmarked Pink, though it has so far been
adequate for the various test musical ideas I have run.  I don't
expect it to run as quickly as C/C++ based systems such as Csound and
SuperCollider, though I do expect to push things as fast as it can go
on the JVM.  To that end, if you look at the code of Pink, you'll find
lots of typehints, as well as a design that reuses arrays between
function calls. These are done to perform as quickly as possible as
well as minimize memory usage. I'll be continuing to explore
optimizations; any suggestions would be very welcome!

* For those who might know me from my work on Csound, I am very much
planning to continue my work there.  Working on Pink has helped to
experiment with engine design ideas that would be more difficult to do
with Csound's code. I hope to bring back some of the architecture and
design ideas back to Csound when I have a chance.

* These projects are not yet mature, but I felt they have reached a
point where I could invite others to take a look.  At this point, I
have some short-term plans (i.e. working with audio samples, engine
code for writing to disk), but the longer-term is still a bit
nebulous.  As it is, the libraries are not in a shape to submit to
clojars. If you are interested to experiment with them, you can do so
by checking them out with Git and running 'lein install', then adding
dependencies (see the music-examples project.clj for an example).

Thanks!
steven


[1] - https://github.com/kunstmusik/pink
[2] - https://github.com/kunstmusik/score
[3] - http://www.bartetzki.de/en/software.html
[4] - http://doc.sccode.org/Tutorials/A-Practical-Guide/PG_01_Introduction.html
[5] - http://blue.kunstmusik.com/
[6] - https://github.com/kunstmusik/music-examples

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

[JOBS] Clojure/Clojurescript Web Developer + CSS/HTML UI Designer

2014-08-11 Thread Alexander Hudek


Hi everyone,


We have two clojure-related job openings.


Best,

Alex


Clojure/Clojurescript Web Developer 

DiligenceEngine Inc. is a Toronto-based startup using machine learning to 
automate legal work. 

We’re looking for a developer to work on our clojure/clojurescript/om web 
stack. Our team is small, 

pragmatic, and inquisitive; we love learning new technologies and balance 
adoption with good 

analysis.  We prefer to hire near us, but also welcome remote work in a 
time zone within North 

America.

Web technology can be built better. If single-page web design driven by a 
reactive data model 

sounds interesting to you, get in touch!

Technologies to know include:

HTML, CSS, SASS,

Clojure, ClojureScript,

SQL, PostgreSQL, Java, 

and experience with web app security. 

This position starts immediately.

To apply, send an email to j...@diligenceengine.com with your resume and 
links to previous work.

--

CSS/HTML UI Designer 

DiligenceEngine Inc. is a Toronto-based startup using machine learning to 
automate legal work. 

We’re looking for a designer developer to help build our user interface. 
Our team is small, 

pragmatic, and inquisitive; we love learning new technologies and balance 
adoption with good 

analysis.  We prefer to hire near us, but also welcome remote work in a 
time zone within North 

America.

The ideal experience for this position includes strong SASS/CSS knowledge 
and a good sense 

of design. Our style is minimalist with a focus on good typography. 
Knowledge of ClojureScript 

or a willingness to learn it is a big plus.

This position starts immediately.

To apply, send an email to j...@diligenceengine.com with your resume and 
links to previous work.

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


[JOBS] Clojure/Clojurescript Web Developer + CSS/HTML UI Designer

2014-08-11 Thread Alexander K. Hudek
Hi everyone,

We have two clojure-related job openings.

Best,
Alex

Clojure/Clojurescript Web Developer

DiligenceEngine Inc. is a Toronto-based startup using machine learning to 
automate legal work.
We’re looking for a developer to work on our clojure/clojurescript/om web 
stack. Our team is
small, pragmatic, and inquisitive; we love learning new technologies and 
balance adoption 
with good analysis.  We prefer to hire near us, but also welcome remote work in 
a time zone 
within North America.

Web technology can be built better. If single-page web design driven by a 
reactive data model 
sounds interesting to you, get in touch!

Technologies to know include:

HTML, CSS, SASS,
Clojure, ClojureScript,
SQL, PostgreSQL, Java,
and experience with web app security.

This position starts immediately.

To apply, send an email to j...@diligenceengine.com with your resume and links 
to previous work.

--

CSS/HTML UI Designer

DiligenceEngine Inc. is a Toronto-based startup using machine learning to 
automate legal work.
We’re looking for a designer developer to help build our user interface. Our 
team is small, 
pragmatic, and inquisitive; we love learning new technologies and balance 
adoption with good 
analysis.  We prefer to hire near us, but also welcome remote work in a time 
zone within North 
America.

The ideal experience for this position includes strong SASS/CSS knowledge and a 
good sense 
of design.  Our style is minimalist with a focus on good typography. Knowledge 
of ClojureScript 
or a willingness to learn it is a big plus.

This position starts immediately.

To apply, send an email to j...@diligenceengine.com with your resume and links 
to previous work.


-- 
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: handling agent errors

2014-08-11 Thread Jeremy Heiler
On Mon, Aug 11, 2014 at 3:07 PM, Brian Craft craft.br...@gmail.com wrote:

 Two questions, really. I'm running large batch jobs with an agent. The
 jobs may fail in any number of unanticipated ways (due to user input), so I
 do a try/catch in the agent, log any errors, and continue with the next job.

 First question: how to deal with OOM (the Xmx limit, not the OS out of
 mem)? The try/catch doesn't appear to help, here. The agent dies, and all
 subsequent jobs never run. Is there some way to prevent or recover from
 this?


Once it has happened, I don't think there's much you can do to save the
process. I'd suggest that you figure out where you're improperly managing
memory by throwing a profiler at it.


 I posed this to a long-time java developer, who said I shouldn't be doing
 a blanket try/catch in the first place, because it's likely to result in
 leaked memory (presumably due to badly-coded libs that don't release
 resources on error). His suggestion: let the thread die on error, and
 restart it from a monitoring thread. I'm not sure how this translates to
 clojure agents. If I don't catch the errors, then log the agent error state
 and restart it, is that equivalent? Is this best practice? Seems like
 badly-coded libs could still leak memory this way, if they've stashed a
 reference in any shared state.


Agents are not dealing irectly with threads, so unless you are, you don't
need to worry about that. Internally, agents use one of  two
ExecuterServices that to do their work, depending on whether you're calling
send or send-off. These ExecuterServices manage their threads for you, and
will clean them up if they throw an exception.

I think the spirit of that person's advice is to not blindly catch an
exception and do nothing about it. Make sure that you are cleaning up any
resources that your'e using, and do some profiling! Because you question
was so general, it's hard to get into anything specific.

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