Re: Is Caribou Dormant ?

2015-02-25 Thread gvim
Caribou was Clojure's Rails so I'm sad to see it wither. I think Clojure adoption continues to suffer from the lack of a full-featured, strongly-backed web framework like Play and Rails. I don't see why support for a big framework can't co-exist with lightweight library composition options. The

[ANN] thi.ng collection update (CLJ/CLJS)

2015-02-25 Thread Daniel
This is incredible work. Thanks for sharing! -- 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 uns

Re: [ClojureScript] [ANN] thi.ng collection update (CLJ/CLJS)

2015-02-25 Thread Karsten Schmidt
This draft anim was created for The ODI and shows 2 years (summer 2011-2013) worth of London knife crime (based on open data ambulance & A&E reports): http://media.thi.ng/2013/odi/20131029-heatmap-draft-1280x960.mp4 On 26 February 2015 at 00:42, Dylan Butman wrote: > I totally thought that map w

Re: [ClojureScript] [ANN] thi.ng collection update (CLJ/CLJS)

2015-02-25 Thread Dylan Butman
I totally thought that map was a photo of 3d printed shapes, but it makes sense that you're using luxrender now. Is there a video of the animation online somewhere? On Wed Feb 25 2015 at 6:13:25 PM Karsten Schmidt wrote: > That's a good point, Bruce! To be honest, I don't know anymore, but it >

Re: Is Caribou Dormant ?

2015-02-25 Thread Michael Blume
Sure looks dormant to me. My usual rule is, if you think you'd feel comfortable maintaining it yourself if it ever became necessary, use it, otherwise look elsewhere. On Wed, Feb 25, 2015 at 3:36 PM Geraldo Lopes de Souza wrote: > Hi, > > I'm checking Caribou, and wanna know if anyone is using i

Re: [ClojureScript] [ANN] thi.ng collection update (CLJ/CLJS)

2015-02-25 Thread Karsten Schmidt
Computational design = using computational approaches to design problems, for anything from analysis, implementation to representation... CSG is indeed only for meshes since it's based on BSP partitioning and because of that also has a few edge cases (due to float precision) where it breaks down a

Is Caribou Dormant ?

2015-02-25 Thread Geraldo Lopes de Souza
Hi, I'm checking Caribou, and wanna know if anyone is using it. It appears that it is a dormant project by the looks of the last update https://github.com/caribou/caribou Thanks in advance, Geraldo Lopes de Souza -- You received this message because you are subscribed to the Google Groups "Cl

Re: [ClojureScript] [ANN] thi.ng collection update (CLJ/CLJS)

2015-02-25 Thread Jason Felice
So... what is "computational design"? I've been using OpenSCAD to make models for 3D printing, and I keep wishing for a Clojure syntax and real functions and things. Is this it? (It doesn't seem to have constructive solid geometry for things which aren't meshes.) -Jason On Wed, Feb 25, 2015 at

Re: [ClojureScript] [ANN] thi.ng collection update (CLJ/CLJS)

2015-02-25 Thread Karsten Schmidt
That's a good point, Bruce! To be honest, I don't know anymore, but it makes complete sense to change it. Consider it done! :) As for your mapping question, yes, of course! I've done a few of them. E.g. the first pic on the website [1] was a project for The ODI in 2013 and is a map of different co

Re: [ClojureScript] [ANN] thi.ng collection update (CLJ/CLJS)

2015-02-25 Thread Bruce Durling
Karsten, Is there a reason why you went with a README.md and then an index.org rather than a plain README.org? (love all the rest of it and loved your use of it at The Barbican. I need to get my head around it all. I'm wondering if I can use it for some of the geographic and other charting things

Re: Border cases for doseq

2015-02-25 Thread Sean Corfield
Cecil, Have you looked at the community documentation for java.jdbc? It has some examples of DDL and metadata: http://clojure-doc.org/articles/ecosystem/java_jdbc/using_ddl.html Sean On Feb 25, 2015, at 10:35 AM, Cecil Weste

Re: Border cases for doseq

2015-02-25 Thread Aaron Cohen
As penance, here's an example that is closer to what I was describing: (require '[clojure.java.jdbc :as j]) (require '[clojure.pprint :as pp]) (def db-spec {:subprotocol "derby" :classname "org.apache.derby.jdbc.EmbeddedDriver" :subname "testDb" :create true}) (j/db-do-command

Re: How not to drop core.async publication items?

2015-02-25 Thread Leon Grapenthin
Docstring says "Items received when there are no matching subs get dropped." You would have to implement your own version of the Pub interface which caches all messages and broadcasts them all to a newly subscribed channel within sub. Notice that an unlimited cache would imply a possible memory

Re: Border cases for doseq

2015-02-25 Thread Aaron Cohen
On Wed, Feb 25, 2015 at 1:35 PM, Cecil Westerhof wrote: > 2015-02-25 19:23 GMT+01:00 Aaron Cohen : > >> On Wed, Feb 25, 2015 at 1:08 PM, Cecil Westerhof >> wrote: >> >>> >>> >>> 2015-02-25 18:14 GMT+01:00 Andy Fingerhut : >>> doseq does not have anything precisely like C/Java/Perl/etc.'s 'b

Re: Border cases for doseq

2015-02-25 Thread Erik Price
Another way to structure this problem is as sequences: 1. Start with a sequence of tables. (show-tables db-spec) 2. Filter down to only the tables you care about. (filter my-pred tables-seq) 3. Take only the first of these. (take 1 filtered-tables-seq) 4. If there is a table, do you

Re: Border cases for doseq

2015-02-25 Thread Cecil Westerhof
2015-02-25 19:23 GMT+01:00 Aaron Cohen : > On Wed, Feb 25, 2015 at 1:08 PM, Cecil Westerhof > wrote: > >> >> >> 2015-02-25 18:14 GMT+01:00 Andy Fingerhut : >> >>> doseq does not have anything precisely like C/Java/Perl/etc.'s 'break' >>> or 'continue'. The closest thing might be the :while keywo

Re: Border cases for doseq

2015-02-25 Thread Aaron Cohen
On Wed, Feb 25, 2015 at 1:08 PM, Cecil Westerhof wrote: > > > 2015-02-25 18:14 GMT+01:00 Andy Fingerhut : > >> doseq does not have anything precisely like C/Java/Perl/etc.'s 'break' or >> 'continue'. The closest thing might be the :while keyword. You can see >> some one example of its use near

Re: Border cases for doseq

2015-02-25 Thread Cecil Westerhof
2015-02-25 18:14 GMT+01:00 Andy Fingerhut : > doseq does not have anything precisely like C/Java/Perl/etc.'s 'break' or > 'continue'. The closest thing might be the :while keyword. You can see > some one example of its use near the end of the examples on this page: > http://clojuredocs.org/cloju

Re: Idiomatic access to collaborators/services

2015-02-25 Thread Colin Yates
Hi James, Agreed, and I did feel a little dirty using a protocol simply to satisfy the swap out for testing (when in fact redef isn't *that* bad). I had made a flawed assumption all along that accessing a protocol method was different than a normal function (I though the 'cache' and 'queue' carri

Re: Idiomatic access to collaborators/services

2015-02-25 Thread James Reeves
The question you should be asking is: do I need polymorphism? If the services you're passing in are distinct and not interchangeable, then you can just use functions: (defn my-service [cache queue payload] (cache/store cache payload) (queue/push queue payload)) On the other hand,

Re: Border cases for doseq

2015-02-25 Thread Andy Fingerhut
Oh, and the page of examples for 'for' has more examples of :when and :while that work similarly to doseq, and may be more informative: http://clojuredocs.org/clojure.core/for On Wed, Feb 25, 2015 at 9:14 AM, Andy Fingerhut wrote: > doseq does not have anything precisely like C/Java/Perl/etc.'s

Re: Border cases for doseq

2015-02-25 Thread Andy Fingerhut
doseq does not have anything precisely like C/Java/Perl/etc.'s 'break' or 'continue'. The closest thing might be the :while keyword. You can see some one example of its use near the end of the examples on this page: http://clojuredocs.org/clojure.core/doseq The best way I know to get such behavi

Re: [ANN] thi.ng collection update (CLJ/CLJS)

2015-02-25 Thread Dylan Butman
Hey Karsten, Really glad to see you've been continuing the awesome work here! I used toxiclibs extensively when I first starting programming in processing and it was hugely influential for me! I've been drifting away from computational design since then but I'm hoping to get some serious time t

Border cases for doseq

2015-02-25 Thread Cecil Westerhof
At the moment I have the following function: (defn do-show-table [table] (doseq [{:keys [table_name]} (show-tables db-spec)] (when (= (lower-case table) (lower-case table_name)) (let [format "%-20s %-30s %-5s %-5s %-20s\n"] (printf format

Re: Idiomatic access to collaborators/services

2015-02-25 Thread Colin Yates
Thanks Shantanu. I am using component but not graph. Although based on their schema library and om-tools I expect it to be pretty nifty :). On 25 February 2015 at 14:32, Shantanu Kumar wrote: > Having tried few other ways earlier, I now prefer the `first` approach you > described. Protocols decou

Re: Idiomatic access to collaborators/services

2015-02-25 Thread Shantanu Kumar
Having tried few other ways earlier, I now prefer the `first` approach you described. Protocols decouple the contract and the implementation very well, and can be reified for various profiles (unit tests, scenario tests, integration etc.) For constructing the graph I have found Prismatic graph

Re: defmethod inside of a (stuart sierra) component?

2015-02-25 Thread Colin Yates
I see where you are going. You don't actually need to store the system in an atom as it can be directly referenced from reloaded.repl.system, but I get your point (i.e. adapters). Thanks Marc. On 25 February 2015 at 14:26, Marc Limotte wrote: > Hi Colin, > > Nesting defmethod in the start fn of

Re: defmethod inside of a (stuart sierra) component?

2015-02-25 Thread Marc Limotte
Hi Colin, Nesting defmethod in the start fn of the Component does have a bad smell. This actually seems counter to the intention of Component, which is to make these dependencies explicit and external. I might do it like this: 1. Create a "pure" implementation using Component as it was intended.

Road: one clojure web framwork

2015-02-25 Thread zhujinxian
I create a new web framework using clojure. https://github.com/zhujinxian/road.git It implements a servelet filter, transfer parameters of http request to handler and rendering the results of handler using hiccup lib. you can use like: (defn handler [^Integer x] {:text (str "hello world, roa

Re: defmethod inside of a (stuart sierra) component?

2015-02-25 Thread Colin Yates
Not as curious as me! Naval gazing is happening right now :). I realised this is part of a bigger question: https://groups.google.com/d/msg/clojure/C3mYu9fMXec/gGUF5rhhZfwJ On 25 February 2015 at 13:19, Jeroen van Dijk wrote: > Sounds reasonable. Though destructuring a component (I was guessing

Idiomatic access to collaborators/services

2015-02-25 Thread Colin Yates
Hi, I ran into a bit of a brick wall when thinking about how to register to and dispatch to multiple micro-services and it made me realise the underlying tension came from not having peace about a fundamental design decision; how do you access your collaborators. Note: I am specifically talking

Re: defmethod inside of a (stuart sierra) component?

2015-02-25 Thread Jeroen van Dijk
Sounds reasonable. Though destructuring a component (I was guessing "db" etc were fields of this particular component) isn't the same as passing the whole system. I'm guessing that you have a lot bigger system in mind than these few commands. I don't have experience with that approach. I'm curious

Re: defmethod inside of a (stuart sierra) component?

2015-02-25 Thread Colin Yates
Yes, I did consider that but didn't like the idea of passing the system around. Also handle-command would need access to the system as well. I am wondering whether simply having a 'registry' component which handlers register themselves with (e.g. a map of {predicate handler}) isn't a way forward a

Re: defmethod inside of a (stuart sierra) component?

2015-02-25 Thread Jeroen van Dijk
So I guess another question is where "handle-command" is being called. What about providing the component as argument to the multimethod (there are other approaches too depending on your need). So: (defmulti handle-command(fn [component command] (first command))) (defmethod handle-command :add-cu

Re: defmethod inside of a (stuart sierra) component?

2015-02-25 Thread Colin Yates
Hi Jeroen - sure. I have a gateway which can handle a number of 'commands', let's say: AddCustomerCommand ExportQueryCommand to handle the AddCustomerCommand I need access to a database and an eventstore. To handle ExportQueryCommand I need access to the database, a PDF service and so on. One w

Re: defmethod inside of a (stuart sierra) component?

2015-02-25 Thread Jeroen van Dijk
I would try to stay away from any nested def's in components (but also in other functions). I'm using component a lot and I never had the need for this. Maybe you can elaborate on why you think you need a multimethod inside the component? Maybe a full example? Cheers, Jeroen On Wed, Feb 25, 20

defmethod inside of a (stuart sierra) component?

2015-02-25 Thread Colin Yates
Hi, I have a number of commands flying around which need to be handled. defmulti/defmethod seem a nice answer. The problem is that each command handler will need different collaborators (those with long memories will realise this isn't new ground here ;)). I want to do something like: (ns one

Re: should edn recognise defrecord?

2015-02-25 Thread Colin Yates
Thanks miner. I see, so I have to treat each record individually. Never mind - I was only using defrecord so I could dispatch on class and protocols. multi-methods and keywords will suffice here. Thanks again. On Tuesday, 24 February 2015 22:04:55 UTC, miner wrote: > > The edn format does not i

Re: Why no h2 1.4.176

2015-02-25 Thread Cecil Westerhof
2015-02-25 10:43 GMT+01:00 Shantanu Kumar : > > > On Wednesday, 25 February 2015 15:11:14 UTC+5:30, Cecil Westerhof wrote: >> >> 2015-02-25 10:10 GMT+01:00 Shantanu Kumar : >> >>> This has nothing to do with Leiningen, I think. The H2 artifacts are >>> here: >>> http://mvnrepository.com/artifact/c

Re: Why no h2 1.4.176

2015-02-25 Thread Shantanu Kumar
On Wednesday, 25 February 2015 15:11:14 UTC+5:30, Cecil Westerhof wrote: > > 2015-02-25 10:10 GMT+01:00 Shantanu Kumar >: > >> This has nothing to do with Leiningen, I think. The H2 artifacts are here: >> http://mvnrepository.com/artifact/com.h2database/h2 >> >> You can only use the artifacts th

Re: Why no h2 1.4.176

2015-02-25 Thread Cecil Westerhof
2015-02-25 10:10 GMT+01:00 Shantanu Kumar : > This has nothing to do with Leiningen, I think. The H2 artifacts are here: > http://mvnrepository.com/artifact/com.h2database/h2 > > You can only use the artifacts that are available, which doesn't include > 1.4.176 on Maven Central. > ​In the mvnrepo

Re: Why no h2 1.4.176

2015-02-25 Thread Shantanu Kumar
This has nothing to do with Leiningen, I think. The H2 artifacts are here: http://mvnrepository.com/artifact/com.h2database/h2 You can only use the artifacts that are available, which doesn't include 1.4.176 on Maven Central. Shantanu On Wednesday, 25 February 2015 14:27:51 UTC+5:30, Cecil West

Why no h2 1.4.176

2015-02-25 Thread Cecil Westerhof
I am starting to play with SQL and Clojure. My choice (at least to start with is H2). With Leiningen you can use version 1.4.77 up-to 1.4.185, but those are all beta version. I would prefer to work with the last stable version which is 1.4.176. Why is that not included in central or clojars? -- C

Re: [ANN] thi.ng collection update (CLJ/CLJS)

2015-02-25 Thread adriaan . sticker
Just took a look at your website, Very nice project. In my opinion a prime example that clojure is suitable for large projects. I don't know if anyone ever thought about it. But I guess the geom library would be a good option as a backend for a plotting library (ggplot style). (eg in incanter,