Re: eval-after-load

2013-10-29 Thread Phillip Lord

Well, yes, but it always does it and needs modification of the source.

Anyway, I found a solution; requires usage of a private var,
unfortunately, but it does work.


(defn eval-after-load [library form]
  (let [key
(keyword
 (str "eval-after-load-" library))]
(add-watch
 (var-get #'clojure.core/*loaded-libs*) key
 (fn[key ref old new]
   (when (= library
(first (clojure.set/difference new old)))
 (eval form
library))

(eval-after-load
'bob
'(println "Hello Bob!"))


Cedric Greevey  writes:

> Doesn't simply putting some executable forms at the end of the namespace's
> source code do that? e.g.
>
> (ns foo
>   ...)
>
> (defn ...)
>
> (def ...)
>
> (defn ...)
>
> ...
>
> (do-something!)
>
>
>
> On Mon, Oct 28, 2013 at 1:05 PM, Phillip Lord
> wrote:
>
>>
>> I want to add some additional configuration after I have loaded a
>> library. Is there anything equivalent to eval-after-load in emacs, which
>> enables me to do something after a namespace has been loaded? Or a file?
>>
>> Phil
>>
>> --
>> --
>> 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/groups/opt_out.
>>
>
> -- 

-- 
Phillip Lord,   Phone: +44 (0) 191 222 7827
Lecturer in Bioinformatics, Email: phillip.l...@newcastle.ac.uk
School of Computing Science,
http://homepages.cs.ncl.ac.uk/phillip.lord
Room 914 Claremont Tower,   skype: russet_apples
Newcastle University,   twitter: phillord
NE1 7RU 

-- 
-- 
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/groups/opt_out.


Re: What non-deprecated Clojure Web libraries to use?

2013-10-29 Thread Brian Craft
Try create-db.

On Monday, October 28, 2013 1:06:49 AM UTC-7, Manuel Paccagnella wrote:
>
> Il giorno lunedì 28 ottobre 2013 04:12:50 UTC+1, Christopher Allen ha 
> scritto:
>
> You can use Korma with Stuart Sierra's workflow just fine.
>>
>> Really? Nice! Last time I tried I didn’t managed to get it to work 
> properly. 
>
> What happens to an open connection binded to a Var (via defdb) when the 
> ns gets reloaded? Or maybe I should use korma.db/get-connectionexplicitly in 
> the system starting phase?
>
> Thank you for your feedback.
>
> On Sunday, October 27, 2013 5:07:02 PM UTC-7, Manuel Paccagnella wrote:
>>>
>>> Il giorno lunedì 28 ottobre 2013 00:30:06 UTC+1, Alexander Hudek ha 
>>> scritto:
>>>
>>> http://www.luminusweb.net/ gives a reasonable starting setup. The only 
 thing I would recommend doing differently is to use clojure/java.jdbc or 
 honeysql instead of korma for an sql dsl.

>>> I agree. Korma is quite interesting as a DSL, but currently 
>>> usesVars 
>>> under the hood to manage connections and this doesn’t play well with 
>>> dynamic workflows as the 
>>> oneby 
>>> Stuart Sierra.
>>>
>>> Personally I’ve used just 
>>> clojure.java.jdbc(
>>> here  is a micro-tutorial that 
>>> I’ve written for it) that is going under an API overhaul to make 
>>> connections management more explicit and functional. If you need an SQL 
>>> generation library you could look at Honey 
>>> SQL. 
>>>
>>>
>>> Hope it helps,
>>>
>>> Manuel 
>>>
>>> PS: You could also take a look at the new book Web Development in 
>>> Clojure by 
>>> the author of 
>>> Luminus .
>>>
>>

-- 
-- 
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/groups/opt_out.


Re: What non-deprecated Clojure Web libraries to use?

2013-10-29 Thread Brian Craft


On Monday, October 28, 2013 4:51:54 PM UTC-7, Alexander Hudek wrote:
>
>
> It is incredibly hard to write a clean sql dsl due to differences in how 
> various database drivers work, and also due to how complex sql itself is. 
> It's worth noting that you can always selectively fall back to jdbc if you 
> encounter any of these issues. Korma uses jdbc itself and works well with 
> it. We instead mix jdbc with light honeysql usage.
>

Of course, this is one of the big reasons an abstraction layer is critical 
for any project larger than a toy: it makes absolutely no sense for every 
application developer to independently discover every fiddling little 
difference between every sql implementation, and to work around every 
complexity in structuring sql queries for boilerplate tables. It's a 
completely waste of time. It only makes sense to dive into that when 
dealing with data that do not fit the 99% use case of simple tables, with 
standard relations (1-1, 1-m, m-m), and low performance requirements. 
 Application engineering time should be spent on the problems that aren't 
already solved, e.g. the petabyte scale data, the low-latency data, the 
data that doesn't fit in squares, etc.

-- 
-- 
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/groups/opt_out.


Re: What non-deprecated Clojure Web libraries to use?

2013-10-29 Thread Brian Craft


On Monday, October 28, 2013 4:36:56 PM UTC-7, Chris Kuttruff wrote:
>
> Separate from DSLs like Korma, etc.  I have written a simple library for 
> doing database migrations with clojure (clj-sql-up ( 
> https://github.com/ckuttruff/clj-sql-up )).  There are also other 
> libraries still maintained along these lines (drift, migratus, ragtime, 
> etc.)
>
>
It's unfortunate that these are separate, because you need the schema 
information not just for migrations, but also for query abstraction (sql 
dsl, etc.). The argument for small, composable libraries only works if they 
can actually be meaningfully composed: if, in this case, a declared schema 
can be used for migrations, and query abstraction, and administrative UI, 
and anything else that requires it. So far there's not much like this in 
clojure that I've found.

-- 
-- 
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/groups/opt_out.


SQL to logic rule mapping

2013-10-29 Thread ArturoH
I am interested in writing a better SQL mapping tool for clojure. Because I 
am not convinced that simple SQL composition is effective, for various 
reasons. I rather have some kind of logic construct that I could use to 
generate SQL from. My main concern is to eliminate the hard boundary 
between the RDBMS and the rest of the code. Any given logic construct would 
a candidate to be translated into SQL or executed inside the JVM.

One option that I have been considering is a production rule system. The 
most popular are based on the rete algorithm. I know there are a few open 
source productions systems out there, but I think translating into SQL from 
an established rule language may be too complicated. At this point I plan 
to use the language extensions proposed by Anurag Acharya, that eliminate 
sequential guards and adds collection support. The reason is that I want to 
process the rules in parallel, and I want to be as close to SQL as 
possible. Clojure pure functions could also be called from within a 
production rule.

The use case I have in mind is regular IT apps, not necessarily complex 
decision systems. I just find myself writing too much code, and often an 
SQL a clojure procedure and a function in the GUI will have some aspect of 
the same business rule embedded in the code. A layered approach helps to 
alleviate the problem, but it still persists. More support for declarative 
code may be the answer. But other than SQL or LINQ and other minor 
examples, there is little support for declarative code for average IT 
systems.

Anyone has any ideas/opinions?

I would appreciate any feedback.

Arturo Hernandez

-- 
-- 
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/groups/opt_out.


[ANN] modern-cljs - Tutorial 22

2013-10-29 Thread Mimmo Cosenza
Hi all,
I just published the 22th tutorial - Learn by Contributing (Part 3) - of the 
modern-cljs series. 

https://github.com/magomimmo/modern-cljs/blob/master/doc/tutorial-22.md

In this tutorial I introduced in the 'enfocus' lib what we learnt about the 
separation of concerns principle in previous tutorial and the I started 
implementing few CLJ/CLJS shared unit tests by using clojurescript.test lib by 
the great Chas and introducing again clix to make the unit tests sharable 
between CLJ and CLJS.

In doing this stuff we'll run in few hidden bugs which are discover by adopting 
a unit test strategy which minimizes the pain of writing unit tests.  Those 
bugs are then first correct by using the REPL and then ported into the codebase.

I want to thanks a lot Creighton Kirkendall for the support he gave me during 
the last week while working on this tutorial and for being so open minded with 
me and my proposed improvements. 

HIH

Mimmo

-- 
-- 
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/groups/opt_out.


Incanter/vector-clj use error

2013-10-29 Thread P Martin
Hello,

I am trying to use incanter to plot the results from my ode solving 
routines. I use vectorz-clj to maintain the matrices and then want to use 
incanter to display. When I go to use incanter, I get the following error:

(use '(incanter core charts pdf))

IllegalStateException tan already refers to: #'clojure.core.matrix/tan in 
namespace: opttranspower.support-test  
clojure.lang.Namespace.warnOrFailOnReplace (Namespace.java:88)


Am I not managing my library references correctly? I load vectors-clj with 
the following:

(use '[clojure.core.matrix :as mat])

(set-current-implementation :vectorz)


Thanks for your help!

Patrick

-- 
-- 
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/groups/opt_out.


Re: Incanter/vector-clj use error

2013-10-29 Thread Jim - FooBar();
No you're not managing your libraries quite right...If you want to use 
"use", which is generally frowned upon, then you don't need the alias.


 (use '[clojure.core.matrix])

I would suggest to use 'require' instead though, which takes an alias

(require '(clojure.core.matrix :as mat))
(require '(incanter core charts pdf :as stat))

now in your code whenever you want use a function from core.matrix you 
use the alias => (mat/esum .. ... ... ..)

the same for incanter. Use the alias and the function name.

hope that helps,
Jim



On 29/10/13 20:23, P Martin wrote:

Hello,

I am trying to use incanter to plot the results from my ode solving 
routines. I use vectorz-clj to maintain the matrices and then want to 
use incanter to display. When I go to use incanter, I get the 
following error:


(use '(incanter core charts pdf))

IllegalStateException tan already refers to: #'clojure.core.matrix/tan 
in namespace: opttranspower.support-test 
clojure.lang.Namespace.warnOrFailOnReplace (Namespace.java:88)



Am I not managing my library references correctly? I load vectors-clj 
with the following:


(use '[clojure.core.matrix :as mat])

(set-current-implementation :vectorz)


Thanks for your help!

Patrick

--
--
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/groups/opt_out.


--
--
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/groups/opt_out.


Any interest in Compojure/Ring screencasts?

2013-10-29 Thread James Reeves
I'm considering putting together a screencast, or a series of screencasts,
based on my Functional Web
Architecture
talk.
The base presentation would be improved, and I'd probably wind up going
into more detail on certain topics. I'll probably charge a small fee
(perhaps $10 or so) to cover costs.

Would there be any interest in this?

- James

-- 
-- 
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/groups/opt_out.


Re: Any interest in Compojure/Ring screencasts?

2013-10-29 Thread Russell Whitaker
I, for one, would happily pay (my employer's) money for such a thing.

R

On Tue, Oct 29, 2013 at 3:39 PM, James Reeves  wrote:
> I'm considering putting together a screencast, or a series of screencasts,
> based on my Functional Web Architecture talk. The base presentation would be
> improved, and I'd probably wind up going into more detail on certain topics.
> I'll probably charge a small fee (perhaps $10 or so) to cover costs.
>
> Would there be any interest in this?
>
> - James

-- 
Russell Whitaker
http://twitter.com/OrthoNormalRuss

-- 
-- 
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/groups/opt_out.


Re: Any interest in Compojure/Ring screencasts?

2013-10-29 Thread Marcus Blankenship
Agreed, and it’s worth money to me…


On Oct 29, 2013, at 3:47 PM, Russell Whitaker  
wrote:

> I, for one, would happily pay (my employer's) money for such a thing.
> 
> R
> 
> On Tue, Oct 29, 2013 at 3:39 PM, James Reeves  wrote:
>> I'm considering putting together a screencast, or a series of screencasts,
>> based on my Functional Web Architecture talk. The base presentation would be
>> improved, and I'd probably wind up going into more detail on certain topics.
>> I'll probably charge a small fee (perhaps $10 or so) to cover costs.
>> 
>> Would there be any interest in this?
>> 
>> - James
> 
> -- 
> Russell Whitaker
> http://twitter.com/OrthoNormalRuss
> 
> -- 
> -- 
> 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/groups/opt_out.

marcus blankenship
\\\ Partner, Problem Solver, Linear Thinker
\\\ 541.805.2736 \ @justzeros \ skype:marcuscreo

-- 
-- 
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/groups/opt_out.


Re: Any interest in Compojure/Ring screencasts?

2013-10-29 Thread Mimmo Cosenza
Me too.

Inviato da iPad
Scusate gli errori d'ortografia

> On 29/ott/2013, at 23:51, Marcus Blankenship  wrote:
> 
> Agreed, and it’s worth money to me…
> 
> 
>> On Oct 29, 2013, at 3:47 PM, Russell Whitaker  
>> wrote:
>> 
>> I, for one, would happily pay (my employer's) money for such a thing.
>> 
>> R
>> 
>>> On Tue, Oct 29, 2013 at 3:39 PM, James Reeves  wrote:
>>> I'm considering putting together a screencast, or a series of screencasts,
>>> based on my Functional Web Architecture talk. The base presentation would be
>>> improved, and I'd probably wind up going into more detail on certain topics.
>>> I'll probably charge a small fee (perhaps $10 or so) to cover costs.
>>> 
>>> Would there be any interest in this?
>>> 
>>> - James
>> 
>> -- 
>> Russell Whitaker
>> http://twitter.com/OrthoNormalRuss
>> 
>> -- 
>> -- 
>> 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/groups/opt_out.
> 
> marcus blankenship
> \\\ Partner, Problem Solver, Linear Thinker
> \\\ 541.805.2736 \ @justzeros \ skype:marcuscreo
> 
> -- 
> -- 
> 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/groups/opt_out.

-- 
-- 
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/groups/opt_out.


Re: What non-deprecated Clojure Web libraries to use?

2013-10-29 Thread Chris Kuttruff
Well things were kept separate intentionally.  If someone wants to use 
Korma or some other DSL within their migrations, they can augment their 
migration file to use that to generate the SQL, but having the migrations 
set up such that instructions to jdbc are simple clojure strings is very 
intentional.  This way I don't limit anyone's decision about what other 
libraries they use, but complicated migrations can easily be dynamically 
generated (since they are being picked up within the context of a clojure 
file).

Not sure I fully understand your point, but this seems like a reasonable 
case for modularity.


On Tuesday, October 29, 2013 8:49:55 AM UTC-7, Brian Craft wrote:
>
>
>
> On Monday, October 28, 2013 4:36:56 PM UTC-7, Chris Kuttruff wrote:
>>
>> Separate from DSLs like Korma, etc.  I have written a simple library for 
>> doing database migrations with clojure (clj-sql-up ( 
>> https://github.com/ckuttruff/clj-sql-up )).  There are also other 
>> libraries still maintained along these lines (drift, migratus, ragtime, 
>> etc.)
>>
>>
> It's unfortunate that these are separate, because you need the schema 
> information not just for migrations, but also for query abstraction (sql 
> dsl, etc.). The argument for small, composable libraries only works if they 
> can actually be meaningfully composed: if, in this case, a declared schema 
> can be used for migrations, and query abstraction, and administrative UI, 
> and anything else that requires it. So far there's not much like this in 
> clojure that I've found.
>

-- 
-- 
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/groups/opt_out.


Re: Any interest in Compojure/Ring screencasts?

2013-10-29 Thread Luc Prefontaine
Count me in,

Luc P.


> I'm considering putting together a screencast, or a series of screencasts,
> based on my Functional Web
> Architecture
> talk.
> The base presentation would be improved, and I'd probably wind up going
> into more detail on certain topics. I'll probably charge a small fee
> (perhaps $10 or so) to cover costs.
> 
> Would there be any interest in this?
> 
> - James
> 
> -- 
> -- 
> 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/groups/opt_out.
> 
--
Luc Prefontaine sent by ibisMail!

-- 
-- 
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/groups/opt_out.


Re: What non-deprecated Clojure Web libraries to use?

2013-10-29 Thread Brian Craft
In general, my point is that libraries don't compose if they have 
incompatible or hidden representations of the data structures over which 
they operate, which is the default condition if no one has thought about 
how the libraries might be used together. A consequence of this is that a 
framework is much, much greater than the sum of its parts.

A dsl that can abstract away details of building queries (e.g. joins) 
requires a declared schema. In contrast, the clojure migration tools 
describe a schema as a series of functions, or sql string literals. It's 
hard to derive one from the other. You wouldn't want to start trying to 
parse the sql to deduce the schema, for instance. Consequently you end up 
repeating the schema. Then you add an administrative UI, and you have the 
same problem: the pages and forms for the admin depend on the schema. You 
end up repeating the schema a third time. And so forth. It quickly becomes 
unmanageable.

For this case, migrations, it's easier to derive the sql for the migrations 
from a declared schema (doing a diff against the previous version) than the 
other way around (parsing sql to find the schema). This is how django-south 
works (it automatically generates the sql for the migrations, in most 
cases), but there's nothing like it for clojure that I'm aware of. Also, 
the sql dsls in clojure that I've seen cover very little of sql for data 
model creation, so you can't actually compose them with the migration tools 
as you suggest: they can't represent migrations.

Having a declared schema also makes the code more maintainable. It can be 
bewildering to work on code where the schema is written as a series of 
"alter table" statements. Any non-trivial project will have a dozen or two 
boilerplate tables (users, sessions, settings, etc.).  If they are all 
written as a series of "alter table" statements, there is a huge cognitive 
load just in figuring out what the tables are, and how they are related.

On Tuesday, October 29, 2013 4:09:33 PM UTC-7, Chris Kuttruff wrote:
>
> Well things were kept separate intentionally.  If someone wants to use 
> Korma or some other DSL within their migrations, they can augment their 
> migration file to use that to generate the SQL, but having the migrations 
> set up such that instructions to jdbc are simple clojure strings is very 
> intentional.  This way I don't limit anyone's decision about what other 
> libraries they use, but complicated migrations can easily be dynamically 
> generated (since they are being picked up within the context of a clojure 
> file).
>
> Not sure I fully understand your point, but this seems like a reasonable 
> case for modularity.
>
>
> On Tuesday, October 29, 2013 8:49:55 AM UTC-7, Brian Craft wrote:
>>
>>
>>
>> On Monday, October 28, 2013 4:36:56 PM UTC-7, Chris Kuttruff wrote:
>>>
>>> Separate from DSLs like Korma, etc.  I have written a simple library for 
>>> doing database migrations with clojure (clj-sql-up ( 
>>> https://github.com/ckuttruff/clj-sql-up )).  There are also other 
>>> libraries still maintained along these lines (drift, migratus, ragtime, 
>>> etc.)
>>>
>>>
>> It's unfortunate that these are separate, because you need the schema 
>> information not just for migrations, but also for query abstraction (sql 
>> dsl, etc.). The argument for small, composable libraries only works if they 
>> can actually be meaningfully composed: if, in this case, a declared schema 
>> can be used for migrations, and query abstraction, and administrative UI, 
>> and anything else that requires it. So far there's not much like this in 
>> clojure that I've found.
>>
>

-- 
-- 
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/groups/opt_out.


Testing Clojurescript Code with the Karma Test Runner

2013-10-29 Thread zcaudate

I thought this may also be of interest to those that are not subscribed to 
planet clojure.. 

>From http://z.caudate.me/testing-clojurescript-code-with-karma/



The karma  test runner is an 
amazingly fully featured testing platform. Its lead developer Vojta Jina, 
is an integral part of google's the angular.js  team 
and it is the default test runner for*angular.js* projects. Karma also 
works without *angular.js* and can also be used as a standalone tool for 
testing code on multiple browsers.

purnam  includes *clojurescript* testing 
using jasmine  and 
karma. 
I updated the library to version 0.1.5 and a couple of examples from the 
wiki
 has 
gone out of date.

I thought that it'll be much easier for everyone if I provided a sample 
project  and a quick 
videoto 
get people started on cljs testing using this fantastic framework: 
[image: ScreenShot] 

-- 
-- 
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/groups/opt_out.


Clojure + BDD + TDD + Pairing...

2013-10-29 Thread Marcus Blankenship
Hi Folks,

I’m a Clojure n00b, but am interested in finding another n00b who aspires to 
learn Clojure, and do so using BDD / TDD practices through regular pairing 
sessions.  I’ve found novice <-> novice pairing to be a great way to ramp up on 
skills, but I don’t live near anyone who I can pair with.  

I’m thinking that doing 3 1-hour sessions a week, for a month, would give us a 
nice start.  Obviously, this would be remote pairing via ScreenHero (or some 
other tool).

Anyone interested?

Best,
Marcus


marcus blankenship
\\\ Partner, Problem Solver, Linear Thinker
\\\ 541.805.2736 \ @justzeros \ skype:marcuscreo

-- 
-- 
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/groups/opt_out.


Re: Any interest in Compojure/Ring screencasts?

2013-10-29 Thread Yuan
Count me in too..

>_>
Best regards
-
Yuan blog  github 





On Wed, Oct 30, 2013 at 7:19 AM, Luc Prefontaine <
lprefonta...@softaddicts.ca> wrote:

> Count me in,
>
> Luc P.
>
>
> > I'm considering putting together a screencast, or a series of
> screencasts,
> > based on my Functional Web
> > Architecture
> > talk.
> > The base presentation would be improved, and I'd probably wind up going
> > into more detail on certain topics. I'll probably charge a small fee
> > (perhaps $10 or so) to cover costs.
> >
> > Would there be any interest in this?
> >
> > - James
> >
> > --
> > --
> > 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/groups/opt_out.
> >
> --
> Luc Prefontaine sent by ibisMail!
>
> --
> --
> 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/groups/opt_out.
>

-- 
-- 
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/groups/opt_out.