Re: [ANN] Jig

2014-06-25 Thread Joachim De Beule
Hi Malcolm, me again :-) I've been using (and loving) jig now for quite some time and have reached the point where I want to start using my code in a production environment. There are several things that need to get fixed though, most importantly: 1) Testing. Have you by any chance thought

Re: [ANN] Jig

2014-06-25 Thread Joachim De Beule
Just a small follow up, in the mean time I did manage to get the code running as daemon using Tanuki's service wrapper by setting the wrapper.working.dir to the main project's root. -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this

Re: [ANN] Jig

2014-03-18 Thread Joachim De Beule
Got it! :-) One more thing. While developing, I often have to deal with large amounts of data that take quite a while to load. However, the data is lost and so has to be reloaded after every reset, which is a bit annoying. Is there a way to prevent this? -- You received this message

Re: [ANN] Jig

2014-03-18 Thread Malcolm Sparks
It's a nice idea to load your schema and data on every reset, if you can. But if you need to, place you data anywhere under the :safe key in the system map and it will survive a reset. On 18 Mar 2014 15:57, Joachim De Beule joachim.de.be...@gmail.com wrote: Got it! :-) One more thing. While

Re: [ANN] Jig

2014-03-12 Thread Malcolm Sparks
Hi Joachim, What you're describing is a dynamic system map, whereas the current pattern as described by Stuart in his classic blog post http://thinkrelevance.com/blog/2013/06/04/clojure-workflow-reloadeddescribes a static system map which is established at the beginning of a reset cycle and

Re: [ANN] Jig

2014-03-11 Thread Joachim De Beule
Dear Malcolm. I'm still having trouble seeing the intended flow, and I have the feeling I'm missing something. My first question is why I would create two separate components C and A, instead of just having one component A that both installs a channel in the system map and starts a thread

Re: [ANN] Jig

2014-03-11 Thread Joachim De Beule
update: I made mistake at the end of my previous post: I mean that the db component does NOT sufficiently encapsulate the internals of course... -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to

Re: [ANN] Jig

2014-02-06 Thread Malcolm Sparks
Hi Joachim, I suggest you create a component, C, that assocs a channel in the system map. Now create a component, A that depends on C. A should start and stop a thread in the usual start/stop Lifecycle. The component should get the channel from the system map. The thread should check the

Re: [ANN] Jig

2014-02-06 Thread Joachim De Beule
Thanks so much for your suggestions Malcolm, very helpful and illuminating! Joachim. -- 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

Re: [ANN] Jig

2014-02-05 Thread Joachim De Beule
Hi Malcolm, I have a follow up question if you don't mind. Suppose I want to define a component that starts a thread and regularly checks a resource. If the resource changes, this has repercussions for other (dependent) components. How would you do that in jig? Maybe this question is too

Re: [ANN] Jig

2014-01-23 Thread Joachim De Beule
Op maandag 21 oktober 2013 02:41:43 UTC+2 schreef frye: Also, is there a Google Group for Jig? I'm playing around with it, can see the potential, and already have some questions. +1 for the google group .. -- -- You received this message because you are subscribed to the Google Groups

Re: [ANN] Jig

2014-01-23 Thread Malcolm Sparks
Hi Joachim The component lifecycle protocol is used to group together the init, start and stop functions tied to ephemeral services common to many Java server-side applications. I'm not sure it makes sense for components to satisfy other protocols that are functional in nature, as this invite

Re: [ANN] Jig

2014-01-23 Thread Joachim De Beule
Hi Malcolm, Thank you for your very helpful reply! Indeed, I've also been thinking about database components, elasticsearch components, memcache components and so on that all are async/channels (or something) but failed to find the right abstraction so far, so probably it is best to separate

Re: [ANN] Jig

2014-01-22 Thread Joachim De Beule
Very impressive work! I was thinking of letting components not only implement the Lifecycle protocol but also a protocol that defines the functionality of the component. To give a simple example, there could be a jdbc component that establishes a connection on init etc., and which also

Re: [ANN] Jig

2014-01-22 Thread Joachim De Beule
(follow up) I just realized that another approach would be to hold the jdbc connection type implementing the JDBCProtocol in system under [:jdbc-component :db] or something, and then call the clojure.java.jdbc/query like functions on that. Anyway, I would be very happy to hear your comments on

Re: [ANN] Jig

2013-11-22 Thread Ivan Kozik
On Sat, Nov 2, 2013 at 11:05 PM, Timothy Washington twash...@gmail.com wrote: C) Now, I run my environment in a Virtual Machine. So when using the browser to try and go to each of the url end points, I got an HTTP 404, Not Found error for all of these URLs. Ie, Compojure and Pedestal were

Re: [ANN] Jig

2013-11-07 Thread Timothy Washington
Umm I can't think of parallel dependency tree walking algos, off the top of my head. Sorry :/ But niiice. Yeah, we're definitely thinking along the same lines. But you're way ahead of me. Now just to be able to isolate that browser repl on a per project basis. Sweet Tim Washington

Re: [ANN] Jig

2013-11-07 Thread Cedric Greevey
If you are just visiting every node as a tree, and you have core.async, then there's (let [c (chan)] (go (doseq [n (tree-seq ... (depends on tree implementation) ...)] (! c n))) (dotimes [_ (.availableProcessors (Runtime/getRuntime))] (go (loop [] (when-let [n (!

Re: [ANN] Jig

2013-11-07 Thread Malcolm Sparks
This is a good question, but not so much one for Jig as for Stuart's workflow pattern on which Jig's based. Generally, I write my Clojure bottom-up, so that functions that do work against database connections and the like, take these as parameters, and not the whole system map. This leads to

Re: [ANN] Jig

2013-11-07 Thread Cedric Greevey
Ah, for that you need to layer your DAG (directed acyclic graph -- if A and B both depend on C, and are dependencies of D, you don't have a tree). Start with S an empty set and n = 0. Iteratively let Sn be the items with no dependencies not in S, S become S U Sn, and n = n + 1 until no items are

Re: [ANN] Jig

2013-11-06 Thread Timothy Washington
Too right. Yes, wrt the multi-project / classpath thing, running isolated test for a particular project is only one aspect. I also have an eye to running a i) browser-connected repl and ii) debugger for a particular project. So those things, along with iii) running tests, make very high, the

Re: [ANN] Jig

2013-11-06 Thread Malcolm Sparks
Hi Tim, It's interesting you're thinking about browser-connected repls. Today I added clojurescript support to Jig, it's pushed to master but I haven't documented the config options yet, but below is an example. Nothing fancy like crossovers yet, it's basically a thin wrapper over

Re: [ANN] Jig

2013-11-06 Thread julius
+1 On Friday, October 18, 2013 7:30:20 AM UTC+8, zcaudate wrote: Would it be possible to put up a video of a typical workflow example with pedestal. It's quite difficult for me to piece everything together just by reading the documentation. Chris -- -- You received this message

Re: [ANN] Jig

2013-11-06 Thread julius
Another question, using jig, the connection/db/cache/storage will be everywhere in our code as a parameter of functions, is it flexible? ,currently I prefer to managing those side effect at one place but will not spread out to our other core functions. Thanks On Saturday, October 12, 2013

Re: [ANN] Jig

2013-11-05 Thread Malcolm Sparks
Hi Tim, Thanks for the great feedback, it's really useful. I've tried to keep the config so that it works out-of-the-box for examples, but is possible to point at other configurations without mutating the Jig repo itself. But I see there's more refinements needed. If you look in

Re: [ANN] Jig

2013-11-05 Thread Malcolm Sparks
Hi Tim, The tests in JUXT accounting are using clojure.core.test. I'm fairly sure Midje's :autotest feature does something dynamic to determine the tests to run and that may not work with Jig's classloading approach. For example, if something uses (System/getProperty java.class.path) it will

Re: [ANN] Jig

2013-11-03 Thread Timothy Washington
Ok, some more feedback for Jig. *A)* Testing - Let's say I have a multi-project jig, with dependencies across projects. There doesn't seem to be a way to run tests (midje :autotest) for a specific project. I tried creating a Midje component (see https://www.refheap.com/20442). But when I *i)* put

Re: [ANN] Jig

2013-11-02 Thread Timothy Washington
Hey Malcolm, *A)* Ok, so just playing around with jig some more. I'm looking to get working *Compojure* and *Pedestal* examples. *B)* I started with a raw `*git clone g...@github.com:juxt/jig.git*`. Then in that directory, I ran the commands in blue. *C)* Now, I run my environment in a Virtual

Re: [ANN] Jig

2013-11-02 Thread Timothy Washington
Ok, I actually got the compojure example working. I just had to remove the *config/console.edn* and *config/default.edn* files in my jig. They must be disrupting the config that I put in. So that's my only feedback so far. Ok, this is looking really good. Great work :) Tim Washington

Re: [ANN] Jig

2013-10-27 Thread Chris Zheng
Thanks Malcom, Even something really simple like showing your current project setup would be really good for me to get going. On 21/10/2013, at 15:57, Malcolm Sparks malc...@juxt.pro wrote: Hi Chris, yes I will try to do something like that very soon. On Friday, October 18, 2013 12:30:20

Re: [ANN] Jig

2013-10-24 Thread Malcolm Sparks
Hi Tim, I've just pushed Jig 1.2.0 to https://github.com/juxt/jig. This release adds support for Ring and Compojure, which many people have asked for, including proper examples of using both Ring/Compojure and Pedestal services. There are numerous other components included (Git pull, JMX,

Re: [ANN] Jig

2013-10-21 Thread Malcolm Sparks
Hi Tim, Good to hear you're finding Jig useful. There isn't any explicit support for Ring in Jig yet, it's just Pedestal services right now. The separation of jig.web.server and jig.web.app into 2 components is to allow multiple 'virtual hosts' to share the same Jetty server, if necessary.

Re: [ANN] Jig

2013-10-21 Thread Malcolm Sparks
Hi Chris, yes I will try to do something like that very soon. On Friday, October 18, 2013 12:30:20 AM UTC+1, zcaudate wrote: Would it be possible to put up a video of a typical workflow example with pedestal. It's quite difficult for me to piece everything together just by reading the

Re: [ANN] Jig

2013-10-21 Thread Timothy Washington
Hey Malcolm, So since you guys just have Pedestal set up at the moment, I've started there. *My Repos * You can see my project jig herehttps://github.com/stefonweblog/stefon-jig/blob/master/config/config.clj. It connects to

Re: [ANN] Jig

2013-10-20 Thread Timothy Washington
Also, is there a Google Group for Jig? I'm playing around with it, can see the potential, and already have some questions. Anyways, in the meantime, I'll keep digging. I'm finding jig really useful so far. *A)* As taken from the example, I'm using the Jetty :server

Re: [ANN] Jig

2013-10-17 Thread zcaudate
Would it be possible to put up a video of a typical workflow example with pedestal. It's quite difficult for me to piece everything together just by reading the documentation. Chris -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this

Re: [ANN] Jig

2013-10-15 Thread Malcolm Sparks
Hi Tim, Thanks for the feedback. A. By default, nrepl-jack-in will invoke lein from the directory of the project that owns the file in the current Emacs buffer. You need to start Jig from its own project directory, not the project directory of your own application. Normally I load up Jig's

Re: [ANN] Jig

2013-10-15 Thread Malcolm Sparks
On Sunday, 13 October 2013 01:21:40 UTC+1, Manuel Paccagnella wrote: Looks very interesting, thanks for sharing! BTW, documentation is impressive and quite comprehensive. On a related note: I've spotted a couple of typos in your README.md so far. Do you accept pull requests for small

Re: [ANN] Jig

2013-10-14 Thread Timothy Washington
This looks really cool. A few things. *A)* Looks like I have to run nrepl in the jig project directory. I'm finding that emacs also has to be started in the same jig directory. Then all of my code editing has to be referenced from that directory (ie: *C-x C-f ../my-project/my-file.clj*). If I

Re: [ANN] Jig

2013-10-12 Thread Manuel Paccagnella
Looks very interesting, thanks for sharing! BTW, documentation is impressive and quite comprehensive. On a related note: I've spotted a couple of typos in your README.md so far. Do you accept pull requests for small fixes like these? Il giorno venerdì 11 ottobre 2013 18:23:41 UTC+2, Malcolm

[ANN] Jig

2013-10-11 Thread Malcolm Sparks
A few months ago, Stuart Sierra blogged about the workflow he follows for building Clojure applications. One of the great pleasures of working with a dynamic language is being able to build a system while simultaneously interacting with it. --