Been away a while

2017-07-14 Thread Adrian Mowat
Hi Everyone,

I've been out of the Clojure scene for about 18 months due to an 
ill-advised detour into management.  Don't worry!  I've recovered pretty 
well but I was wondering if anyone can suggest what I should be looking at 
to bring me back up to speed.

My current context is that I have a mediums sized rails monolith (~27,000 
LOC excluding tests) that I want to gradually break up into an event 
sourced/CQRS architecture.  I'm evaluating different approaches to writing 
my read and write services and I'm happy to rewrite some code. Spec looks 
like a very exciting way to define services.  Maybe there are some good 
libraries that might help.

Thanks very much

Adrian

-- 
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: Streaming a large file onto a channel

2015-03-18 Thread Adrian Mowat
Hi Erick

Thanks for getting back to me.  On my system, I wasn't seeing the contents 
of my file being listed in the REPL.  Your code is working fine though and 
I can't see anything significantly different so I wonder if I had managed 
to corrupt my session in some way.

Anyway, it's good to know I'm on the right path.  I'll post my solutions as 
I get things up and running

Cheers

Adrian



On Wednesday, 18 March 2015 13:45:33 UTC, Erick Pintor wrote:

 Hi Adrian,

 What is exactly the issue that you're facing?
 I did my own version and it seems to be working fine.

 Please, take a look and I hope it helps.

 (defn process-file [ch file]
   (async/thread
 (with-open [input (io/reader file)]
   (doseq [line (line-seq input)]
 (async/!! ch line)

 (defn parse [line]
   (str Parsed:  line)) ; change it to do whatever you want

 (defn mapping [ch]
   (async/map parse [ch]))

 (defn start []
   (let [events (mapping
  (async/chan))]
 (process-file events 10_events.json)
 (async/go-loop []
(let [v (async/! events)]
  (println v)
  (recur)

 About your approach. For me, it seems a legitimate usage for core.async.
 Please, send us your impressions once you finish.

 Cheers,


 Em terça-feira, 17 de março de 2015 09:52:17 UTC-3, Adrian Mowat escreveu:

 Hi,

 I've played around with core.async a bit but now I'm trying to use it for 
 a real project and I'm running into a problem getting data off a file and 
 into a channel on the JVM (i.e. as opposed to ClojureScript)

 I have around 1GB of data sitting in a file.  Each line of the file 
 contains a separate JSON document.  There are different types of document 
 in the file and I would like use core.async to setup a pipeline of 
 concurrent operations as follows so I can start processing the data before 
 I've finished reading the file.

 1. Stream the raw data out of the file one line at a time, parse it as 
 JSON and write each line to channel (1)
 2. Read channel (1) and divide the messages up by type and write them to 
 new channels (2..n)
 3. Read channels (2..n) and apply business logic as appropriate

 I'd like the initial read to run in it's own thread because it will be IO 
 blocking.  The others can run in core.async's thread pool 

 I'm running into problems getting channels (1) and (2) to talk to one 
 another.  Here's my initial spike and I would expect it to write the 10 
 lines of json from the example file to stdout. 

 (defn file-to-chan [ch file]
   (do
 (async/thread
   (with-open [rdr (io/reader file)]
 (doseq [line (line-seq rdr)]
   (!! ch line
 ch))

 (defn parse-line [s]
   (json/parse-string s (comp keyword str/lower-case)))

 (def events (chan 1 (map parse-line)))

 (go
   (while true
 (println (! events

 (file-to-chan events 10_events.json)

 I have a few questions...

 * Can anyone help me understand what's going wrong? (I'm sure it's 
 something silly, but I'm going cross eyed looking at it)
 * It's effectively a batch process.  Is this an appropriate use case for 
 core.async?
 * If so, am I on the right track or is there a better way to approach 
 this?

 Many Thanks

 Adrian







-- 
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: Streaming a large file onto a channel

2015-03-18 Thread Adrian Mowat
Hi Adam

I'm using the latest version on cider + cider-nrepl but it's a possibility.  I 
suspect it's more of a case that I tried so many different combinations I 
polluted my repl beyond repair.  My fault for not just using components from 
the outset :-(

Thanks

Adrian 

Sent from my iPhone

 On 18 Mar 2015, at 18:57, Adam Clements adam.cleme...@gmail.com wrote:
 
 It's possible you are simply not seeing the println output from a background 
 thread, depending on how your repl etc is set up.
 
 
 On Wed, 18 Mar 2015 3:19 pm Adrian Mowat adrian.mo...@gmail.com wrote:
 Hi Erick
 
 Thanks for getting back to me.  On my system, I wasn't seeing the contents 
 of my file being listed in the REPL.  Your code is working fine though and I 
 can't see anything significantly different so I wonder if I had managed to 
 corrupt my session in some way.
 
 Anyway, it's good to know I'm on the right path.  I'll post my solutions as 
 I get things up and running
 
 Cheers
 
 Adrian
 
 
 
 On Wednesday, 18 March 2015 13:45:33 UTC, Erick Pintor wrote:
 Hi Adrian,
 
 What is exactly the issue that you're facing?
 I did my own version and it seems to be working fine.
 
 Please, take a look and I hope it helps.
 
 (defn process-file [ch file]
   (async/thread
 (with-open [input (io/reader file)]
   (doseq [line (line-seq input)]
 (async/!! ch line)
 
 (defn parse [line]
   (str Parsed:  line)) ; change it to do whatever you want
 
 (defn mapping [ch]
   (async/map parse [ch]))
 
 (defn start []
   (let [events (mapping
  (async/chan))]
 (process-file events 10_events.json)
 (async/go-loop []
(let [v (async/! events)]
  (println v)
  (recur)
 
 About your approach. For me, it seems a legitimate usage for core.async.
 Please, send us your impressions once you finish.
 
 Cheers,
 
 
 Em terça-feira, 17 de março de 2015 09:52:17 UTC-3, Adrian Mowat escreveu:
 
 Hi,
 
 I've played around with core.async a bit but now I'm trying to use it for 
 a real project and I'm running into a problem getting data off a file and 
 into a channel on the JVM (i.e. as opposed to ClojureScript)
 
 I have around 1GB of data sitting in a file.  Each line of the file 
 contains a separate JSON document.  There are different types of document 
 in the file and I would like use core.async to setup a pipeline of 
 concurrent operations as follows so I can start processing the data before 
 I've finished reading the file.
 
 1. Stream the raw data out of the file one line at a time, parse it as 
 JSON and write each line to channel (1)
 2. Read channel (1) and divide the messages up by type and write them to 
 new channels (2..n)
 3. Read channels (2..n) and apply business logic as appropriate
 
 I'd like the initial read to run in it's own thread because it will be IO 
 blocking.  The others can run in core.async's thread pool 
 
 I'm running into problems getting channels (1) and (2) to talk to one 
 another.  Here's my initial spike and I would expect it to write the 10 
 lines of json from the example file to stdout. 
 
 (defn file-to-chan [ch file]
   (do
 (async/thread
   (with-open [rdr (io/reader file)]
 (doseq [line (line-seq rdr)]
   (!! ch line
 ch))
 
 (defn parse-line [s]
   (json/parse-string s (comp keyword str/lower-case)))
 
 (def events (chan 1 (map parse-line)))
 
 (go
   (while true
 (println (! events
 
 (file-to-chan events 10_events.json)
 
 I have a few questions...
 
 * Can anyone help me understand what's going wrong? (I'm sure it's 
 something silly, but I'm going cross eyed looking at it)
 * It's effectively a batch process.  Is this an appropriate use case for 
 core.async?
 * If so, am I on the right track or is there a better way to approach this?
 
 Many Thanks
 
 Adrian
 
 -- 
 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

Streaming a large file onto a channel

2015-03-17 Thread Adrian Mowat
Hi,

I've played around with core.async a bit but now I'm trying to use it for a 
real project and I'm running into a problem getting data off a file and 
into a channel on the JVM (i.e. as opposed to ClojureScript)

I have around 1GB of data sitting in a file.  Each line of the file 
contains a separate JSON document.  There are different types of document 
in the file and I would like use core.async to setup a pipeline of 
concurrent operations as follows so I can start processing the data before 
I've finished reading the file.

1. Stream the raw data out of the file one line at a time, parse it as JSON 
and write each line to channel (1)
2. Read channel (1) and divide the messages up by type and write them to 
new channels (2..n)
3. Read channels (2..n) and apply business logic as appropriate

I'd like the initial read to run in it's own thread because it will be IO 
blocking.  The others can run in core.async's thread pool 

I'm running into problems getting channels (1) and (2) to talk to one 
another.  Here's my initial spike and I would expect it to write the 10 
lines of json from the example file to stdout. 

(defn file-to-chan [ch file]
  (do
(async/thread
  (with-open [rdr (io/reader file)]
(doseq [line (line-seq rdr)]
  (!! ch line
ch))

(defn parse-line [s]
  (json/parse-string s (comp keyword str/lower-case)))

(def events (chan 1 (map parse-line)))

(go
  (while true
(println (! events

(file-to-chan events 10_events.json)

I have a few questions...

* Can anyone help me understand what's going wrong? (I'm sure it's 
something silly, but I'm going cross eyed looking at it)
* It's effectively a batch process.  Is this an appropriate use case for 
core.async?
* If so, am I on the right track or is there a better way to approach this?

Many Thanks

Adrian





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


[JOB] Senior Mid Level Clojure roles in Glasgow

2014-11-26 Thread Adrian Mowat
Hi All,

Arnold Clark are looking for Clojure Developers and Senior Clojure 
developers to join the web development team at our offices in Glasgow City 
Centre.

We're kicking off some projects in the new year and we are looking for some 
strong developers to form the backbone of the Clojure team to deliver 
projects alongside our existing Ruby/Rails and Front End Developers in a 
good Agile environment.  These are green-field projects so you'll have a 
major input into the architecture of the systems and the day-to-day working 
practices we adopt.

We realise that there are not a lot of experienced Clojure around so we 
have created a Senior role for people who really know the language and a 
mid-level role for people who have some experience but want to make it a 
full-time job.

Hopefully that makes sense but let me know if you have any questions.  I'll 
also be in London at Clojure Exchange next week if you are around and would 
like to talk in person.

Many Thanks

Adrian

Here are the details of the 2 roles.

Senior Clojure Developer: http://www.arnoldclark.com/careers/jobs/R5_010

Must haves:

• Fluent working in Clojure (open source contributes and significant hobby 
projects are acceptable)
• Industrial experience with Java
• Senior Developer/Technical Lead experience in an Enterprise setting
• Excellent grasp of Functional Programming
• Agile development, especially Test Driven Development
• Working on Unix/Linux environments

Nice-to-haves:

• Semantic Web
• Datomic and/or other graph databases
• Android Development
• Exposure to Ruby on Rails
• Experience working with UX designers and Front End Developers
• MySQL or other database experience
• A good computer science degree
• Working on a Mac


Clojure Developer: http://www.arnoldclark.com/careers/jobs/R5_011

Must haves:

• Working knowledge of Clojure
• Strong development experience
• Experience in an Enterprise setting
• Good grasp of Functional Programming
• Agile development, especially Test Driven Development
• Working on Unix/Linux environments

Nice-to-haves:

• Industrial experience with Java
• Semantic Web
• Datomic and/or other graph databases
• Android Development
• Exposure to Ruby on Rails
• Experience working with UX designers and Front End Developers
• MySQL or other database experience
• A good computer science degree
• Working on a Mac

-- 
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: Clojure CLR Experiences

2014-11-12 Thread Adrian Mowat
Ah, OK.  Sorry about that!

On Wednesday, 12 November 2014 02:32:23 UTC, dmiller wrote:

 Re versions: look at the tags, not the branches.  The 1.4.1 branch was 
 anomalous, due to needing to get out a bug fix.


 On Tuesday, November 11, 2014 2:17:29 PM UTC-6, Aaron wrote:

 Hi Adrian,

 I'll share some of my experiences.

 * Is Clojure CLR production ready?
 Yes, I have been using it in production for about 2 years now.

 * Do its version numbers correspond to the core Clojure version numbers? 
  (would it be fair to say the Java version is the core version)
 It's fair to say that the Java is the core version, but Dave Miller (the 
 ClojureCLR maintainer) does a pretty good job of keeping it up to date with 
 the Java version.

 * Is it sensible to think in terms of writing platform independent code 
 in the same way as we do with cljx files in ClojureScript?
 It is feasible if you put the effort into testing and writing the code 
 correctly, but currently I don't think cljx supports ClojureCLR - you'd 
 probably need to add that functionality yourself.

 * How good is the Visual Studio support for Clojure?
 I use emacs and *inferior-lisp* and am pretty happy with them so I can't 
 comment on the Visual Studio workflow.

 * Does Leiningen work?
 There is Shantanu's lein plugin and I've tried to do a proof of concept 
 nlein, but there really isn't the equivalent thing in ClojureCLR. I 
 mostly deploy my .clj files as embedded resources in C# DLL's and have C# 
 call into Clojure to bootstrap things. I'm sure other people use other 
 strategies.

 * Are there any significant pitfalls to be aware of?
 Not as many libraries are available and you'll have to do a fair amount 
 of groundwork yourself. Startup time is similar to the JVM verison.

 Overall, once I got past the initial hurdles, I found the environment to 
 be quite stable and a huge productivity boost. I would definitely recommend 
 ClojureCLR for projects with a big existing .NET code base. For new 
 projects, I do usually go with JVM Clojure mainly for access to more 
 libraries and IDE's. At the time when I started using ClojureCLR our team 
 was heavily invested in .NET so it made a lot of sense and was definitely 
 well worth it...

 Be sure to check out the ClojureCLR google group: 
 https://groups.google.com/forum/#!forum/clojure-clr


 On Tuesday, November 11, 2014 10:38:58 AM UTC-5, Adrian Mowat wrote:

 Hi All,

 We are using Clojure on the JVM but one of our .Net developers has asked 
 me whether I have considered using it on the CLR.  I haven't tried doing it 
 so I wondered if anyone can share any experiences using Clojure on the CLR? 
  A quick google search suggests the project is still active but not 
 especially vibrant (current version 1.4, last commit 24 days ago) but maybe 
 that's unfair.

 I'm broadly interested in the following...

 * Is Clojure CLR production ready?
 * Do its version numbers correspond to the core Clojure version numbers? 
  (would it be fair to say the Java version is the core version)
 * Is it sensible to think in terms of writing platform independent code 
 in the same way as we do with cljx files in ClojureScript?
 * How good is the Visual Studio support for Clojure?
 * Does Leiningen work?
 * Are there any significant pitfalls to be aware of?

 Any other comments would be greatly appreciated.

 Many Thanks

 Adrian







-- 
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: Clojure CLR Experiences

2014-11-12 Thread Adrian Mowat
Hi Aaron,

That really helpful.  Just what I was looking for.

Adrian



On Tuesday, 11 November 2014 20:17:29 UTC, Aaron wrote:

 Hi Adrian,

 I'll share some of my experiences.

 * Is Clojure CLR production ready?
 Yes, I have been using it in production for about 2 years now.

 * Do its version numbers correspond to the core Clojure version numbers? 
  (would it be fair to say the Java version is the core version)
 It's fair to say that the Java is the core version, but Dave Miller (the 
 ClojureCLR maintainer) does a pretty good job of keeping it up to date with 
 the Java version.

 * Is it sensible to think in terms of writing platform independent code in 
 the same way as we do with cljx files in ClojureScript?
 It is feasible if you put the effort into testing and writing the code 
 correctly, but currently I don't think cljx supports ClojureCLR - you'd 
 probably need to add that functionality yourself.

 * How good is the Visual Studio support for Clojure?
 I use emacs and *inferior-lisp* and am pretty happy with them so I can't 
 comment on the Visual Studio workflow.

 * Does Leiningen work?
 There is Shantanu's lein plugin and I've tried to do a proof of concept 
 nlein, but there really isn't the equivalent thing in ClojureCLR. I 
 mostly deploy my .clj files as embedded resources in C# DLL's and have C# 
 call into Clojure to bootstrap things. I'm sure other people use other 
 strategies.

 * Are there any significant pitfalls to be aware of?
 Not as many libraries are available and you'll have to do a fair amount of 
 groundwork yourself. Startup time is similar to the JVM verison.

 Overall, once I got past the initial hurdles, I found the environment to 
 be quite stable and a huge productivity boost. I would definitely recommend 
 ClojureCLR for projects with a big existing .NET code base. For new 
 projects, I do usually go with JVM Clojure mainly for access to more 
 libraries and IDE's. At the time when I started using ClojureCLR our team 
 was heavily invested in .NET so it made a lot of sense and was definitely 
 well worth it...

 Be sure to check out the ClojureCLR google group: 
 https://groups.google.com/forum/#!forum/clojure-clr


 On Tuesday, November 11, 2014 10:38:58 AM UTC-5, Adrian Mowat wrote:

 Hi All,

 We are using Clojure on the JVM but one of our .Net developers has asked 
 me whether I have considered using it on the CLR.  I haven't tried doing it 
 so I wondered if anyone can share any experiences using Clojure on the CLR? 
  A quick google search suggests the project is still active but not 
 especially vibrant (current version 1.4, last commit 24 days ago) but maybe 
 that's unfair.

 I'm broadly interested in the following...

 * Is Clojure CLR production ready?
 * Do its version numbers correspond to the core Clojure version numbers? 
  (would it be fair to say the Java version is the core version)
 * Is it sensible to think in terms of writing platform independent code 
 in the same way as we do with cljx files in ClojureScript?
 * How good is the Visual Studio support for Clojure?
 * Does Leiningen work?
 * Are there any significant pitfalls to be aware of?

 Any other comments would be greatly appreciated.

 Many Thanks

 Adrian







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


Clojure CLR Experiences

2014-11-11 Thread Adrian Mowat
Hi All,

We are using Clojure on the JVM but one of our .Net developers has asked me 
whether I have considered using it on the CLR.  I haven't tried doing it so 
I wondered if anyone can share any experiences using Clojure on the CLR?  A 
quick google search suggests the project is still active but not especially 
vibrant (current version 1.4, last commit 24 days ago) but maybe that's 
unfair.

I'm broadly interested in the following...

* Is Clojure CLR production ready?
* Do its version numbers correspond to the core Clojure version numbers? 
 (would it be fair to say the Java version is the core version)
* Is it sensible to think in terms of writing platform independent code in 
the same way as we do with cljx files in ClojureScript?
* How good is the Visual Studio support for Clojure?
* Does Leiningen work?
* Are there any significant pitfalls to be aware of?

Any other comments would be greatly appreciated.

Many Thanks

Adrian





-- 
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: Clojure CLR Experiences

2014-11-11 Thread Adrian Mowat
Hi,


Thanks for the info and the link to the lein plugin.




I checked git hub and the latest branch was 1.4.1. That coupled with this blog 
http://clojureclr.blogspot.co.uk suggested the latest version was 1.4. Looks 
like I missed the crucial link :-)




Cheers




Adrian


—
Sent from Mailbox

On Tue, Nov 11, 2014 at 5:00 PM, Shantanu Kumar kumar.shant...@gmail.com
wrote:

 Not sure why you say that 1.4 is the current version. ClojureCLR releases 
 are here: https://www.nuget.org/packages/Clojure - as of today 1.6.0.1 is 
 the current stable version.
 Leiningen plugin is here: https://github.com/kumarshantanu/lein-clr
 Shantanu
 On Tuesday, 11 November 2014 21:08:58 UTC+5:30, Adrian Mowat wrote:

 Hi All,

 We are using Clojure on the JVM but one of our .Net developers has asked 
 me whether I have considered using it on the CLR.  I haven't tried doing it 
 so I wondered if anyone can share any experiences using Clojure on the CLR? 
  A quick google search suggests the project is still active but not 
 especially vibrant (current version 1.4, last commit 24 days ago) but maybe 
 that's unfair.

 I'm broadly interested in the following...

 * Is Clojure CLR production ready?
 * Do its version numbers correspond to the core Clojure version numbers? 
  (would it be fair to say the Java version is the core version)
 * Is it sensible to think in terms of writing platform independent code in 
 the same way as we do with cljx files in ClojureScript?
 * How good is the Visual Studio support for Clojure?
 * Does Leiningen work?
 * Are there any significant pitfalls to be aware of?

 Any other comments would be greatly appreciated.

 Many Thanks

 Adrian






 -- 
 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 a topic in the Google 
 Groups Clojure group.
 To unsubscribe from this topic, visit 
 https://groups.google.com/d/topic/clojure/Vz6C9rMeu8Q/unsubscribe.
 To unsubscribe from this group and all its topics, 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: Acceptance testing with Clojure

2014-09-29 Thread Adrian Mowat
Thanks for pointing out prism - it's just what I needed.

Is there any way to add colours to the output so I can easily see if a test 
failed?


On Sunday, 28 September 2014 15:34:39 UTC+1, Ashton Kemerling wrote:

 -BEGIN PGP SIGNED MESSAGE- 
 Hash: SHA1 

 I can answer this in two ways: 

 1. Acceptance testing Clojure code. 
 2. Acceptance testing other code with Clojure. 

 I have significantly more experience with the latter than the former. 

 All in all, I prefer the built in clojure.test library over more 
 opinionated libraries like Midje. In particular I recommend adding in 
 Aphyr's excellent Prism plugin to your profiles.clj to do auto 
 testing, and pjstadig`s similarly excellent humane-test-output for 
 readability. 

 My dislike of midje stems from how awkward I found it to share setup 
 code between tests. I feel that clojure.test nests more, allowing me 
 to save more code up front. I also haven't used Midje in a while, so 
 Brian might've upgraded it without me noticing. 

 You also cannot go wrong with test.check. I really enjoy using it for 
 both correctness and simple profiling (e.g. print to console and see 
 if anything gets too slow). 

 On the latter front, test.check + JDBC/Selenium/HTTP appears to be one 
 of the most fruitful ways of hunting down bugs in single-page 
 applications that I've ever seen. I think at this point the bug count 
 for our testing code is close to 5 for an average of 3 hours per bug. 
 Most of these bugs were either concurrency, caching, or SQL based, and 
 some were close to 4 years old. I'll be giving a talk on this subject 
 at the Conj this year, and the video will be posted later if you 
 aren't attending. 

 For more info on test.check, you should check out Reid Draper's 
 Cognicast episode 
 (
 http://thinkrelevance.com/blog/2013/11/11/reid-draper-cognicast-episode-045) 

 and my Cognicast episode 
 (http://blog.cognitect.com/cognicast/ashton-kemerling-064) 

 On 09/28/2014 08:24 AM, Ruslan Prokopchuk wrote: 
  I've googled around a little bit, but didn't found any relevant 
  info about subject. Please, share your experience about acceptance 
  testing with Clojure! 
  

 - -- 
 Ashton 
 -BEGIN PGP SIGNATURE- 
 Version: GnuPG v1 

 iQIcBAEBAgAGBQJUKBxtAAoJEIkUqIW02x05kBMQALUcIDvGO+ohCVUJw2xC2HMT 
 UPBK3eFHVhrgp84EqFx00A/+/sFmXM6wKWzcbTuEeG4YEuiea2UiZjqs7bFvqg3w 
 L2j3CwGpG+eENSP4CQ4L2qB0n4ljuWSqHgH1eWYIGC98f6hKfMC2Itb7SEKWdm1M 
 iYTQdFKhULbsmahwL1Z+dKuxe9Q6Vv20HahQan5T7JY8jE8QJI5d/icXI8xel6OV 
 3wlsW1AfBec1d7r/67R0MRnWqD2swE3WFbh+SlNQz/orSNvHvOLufhS5s0Xamtji 
 xo59pX7xrAMkyf/a40HopHTcWD1Qkp9T0VBO0X43dfdbTH5gMdc7iOFmpHXj5EAi 
 wbRRAtXp75F6tdYHf4n6I9y+N2auRz1SF1KOPb69mjkjx8Pujy8EwZdfpwABqLtu 
 4D06KlRrVmCiduvc0eVBcUVOa0o2lait2y0cMLa1M2Tt3rwNZb23nrJ3T9xXhrIY 
 GKW/N+uQ2uC028Wqh3oFcOrjN6S6XU6rahhojCSSXsfMddmzsgz6qPdy3voAa68j 
 e4Z/aP5Q9fPViW3j/E9FGmrQU89eOUdPVabbrJNu2J3DqGu3eaRLpAJP9oa5v7Q+ 
 iEOGU38ZbLwMXhvw8VvMOnF9MKn9JAsoDZOPFOfuftZWmP1q0HqmBxxxg4WBW3hC 
 2EldloS4hNyaSJ4tIlex 
 =djIk 
 -END PGP SIGNATURE- 


-- 
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: An Averaging function

2014-07-11 Thread Adrian Mowat
Hi Blake

Brian Marick's book on FP for OO programmers is an excellent book for Clojure 
beginners who already have a programming background.

https://leanpub.com/fp-oo

Cheers

Adrian

-- 
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: OT: Github Alternatives

2014-07-02 Thread Adrian Mowat
@charles yes, I'm more than happy with git - it's really the code browser end 
other features github provides that I'm interested in replacing. I'm not keen 
to get down a git hole either (must remember that term) and with the benefit of 
hindsight I can see my previous post was unhelpful.


@alex I've had some very good feedback from everyone on this so I'm very happy 
to put this discussion to sleep now if everyone else is




Thanks everyone!



—
Sent from Mailbox

On Wed, Jul 2, 2014 at 1:19 AM, Charles Harvey III
charlesnhar...@gmail.com wrote:

 I didn't mean to derail this post asking for hosting options. I certainly 
 do not want it to go down a git-hole.
 I have had a good amount of experience with CVS, SVN, Git and Bazaar. Years 
 worth. Usually when you complain about Git the first thing you hear is that 
 I wasn't doing it right or that its a flexible tool and I just have to 
 learn it. The amount of Git vitriol out there must be somewhat justified.
 I just found Bazaar to be really friendly. Commands work like they do in 
 SVN so it is easy to make the move. And I don't see a lot of Bazaar hate 
 out there. Then again, hardly anyone is using it. :)
 Original poster, Adrian, you are using Git and you are happy with it. I 
 don't actually have any private hosting options for you besides setting up 
 an sftp server of your own.
 But that is usually a great idea. You just need a browser/viewer ala 
 viewcvs:
 http://viewgit.fealdia.org/
 https://github.com/toolmantim/bananajour
 http://git.zx2c4.com/cgit/about/
 https://git.wiki.kernel.org/index.php/Gitweb
 https://github.com/chad/gitjour
 Total control of your repository and essentially free - you just pay for 
 hard drives/backups.
 On Tuesday, July 1, 2014 5:37:57 PM UTC-4, Adrian Mowat wrote:

  What were the horrible experiences? I agree that git allows you to make 
 a mess if you want to but then again Unix has rm -Rf and we all learned 
 quickly enough to use it carefully


  
 Sent from Mailbox https://www.dropbox.com/mailbox 
  
 On Tue, Jul 1, 2014 at 02:24 PM, Charles Harvey IIIcharles...@gmail.com 
 javascript:, wrote:

 That is truly sad if Bzr dies out. I have had such horrible experiences 
 with Git that I still can't understand what people like about it. Well, 
 aside from the fact that it is not SVN and that there is github. 





 On Tuesday, July 1, 2014 6:58:32 AM UTC-4, Thorsten Jolitz wrote:

 Charles Harvey III charles...@gmail.com writes: 

  You could abandon Git and save yourself a lot of money and pain. 
  
  Start using Bazaar! http://bzrinit.com/ 
  (http://bazaar.canonical.com/en/) 
  
  Hosting is seriously you setting up an ftp server (sftp, ssh, scp) - 
  whatever. There is web viewer plugin: 
  https://launchpad.net/loggerhead. it is basically an apache module. 
  
  Seriously, take a look at Bzr. All the features of Git with much nicer 
  commands and it won't ever lose your history. And hosting it yourself 
  is just so easy. 

 Too bad that even GNU Emacs development is moving (has already moved?) 
 from bzr to git. See 

 , 
 | From: e...@thyrsus.com (Eric S. Raymond) 
 | Subject: bzr is dying; Emacs needs to move 
 | Newsgroups: gmane.emacs.devel 
 | To: emacs...@gnu.org 
 | Date: Thu,  2 Jan 2014 04:53:47 -0500 (EST) (25 weeks, 5 days, 1 hour 
 ago) 
 | 
 | I am posting this because I think it is my duty as a topic expert in 
 | version-control systems and the surrounding tools to do so, not 
 because 
 | I have any desire to be in the argument that is certain to ensue. 
 | 
 | The bzr version control system is dying; by most measures it is 
 | already moribund.  [...] 
 ` 

 and the following long thread on gmane.emacs.devel. 

 -- 
 cheers, 
 Thorsten 

   -- 
 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 a topic in the 
 Google Groups Clojure group.
 To unsubscribe from this topic, visit 
 https://groups.google.com/d/topic/clojure/FQS0UdKQebI/unsubscribe.
 To unsubscribe from this group and all its topics, 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

Re: OT: Github Alternatives

2014-07-01 Thread Adrian Mowat
What were the horrible experiences? I agree that git allows you to make a mess 
if you want to but then again Unix has rm -Rf and we all learned quickly enough 
to use it carefully






Sent from Mailbox





On Tue, Jul  1, 2014 at 02:24 PM, Charles Harvey IIIcharlesnhar...@gmail.com, 
wrote:

That is truly sad if Bzr dies out. I have had such horrible experiences with 
Git that I still can't understand what people like about it. Well, aside from 
the fact that it is not SVN and that there is github. 





On Tuesday, July 1, 2014 6:58:32 AM UTC-4, Thorsten Jolitz wrote:Charles Harvey 
III charles...@gmail.com writes:


 You could abandon Git and save yourself a lot of money and pain.



 Start using Bazaar! http://bzrinit.com/

 (http://bazaar.canonical.com/en/)



 Hosting is seriously you setting up an ftp server (sftp, ssh, scp) -

 whatever. There is web viewer plugin:

 https://launchpad.net/loggerhead. it is basically an apache module.



 Seriously, take a look at Bzr. All the features of Git with much nicer

 commands and it won't ever lose your history. And hosting it yourself

 is just so easy.


Too bad that even GNU Emacs development is moving (has already moved?)

from bzr to git. See 


,

| From: e...@thyrsus.com (Eric S. Raymond)

| Subject: bzr is dying; Emacs needs to move

| Newsgroups: gmane.emacs.devel

| To: emacs...@gnu.org

| Date: Thu,  2 Jan 2014 04:53:47 -0500 (EST) (25 weeks, 5 days, 1 hour ago)

| 

| I am posting this because I think it is my duty as a topic expert in

| version-control systems and the surrounding tools to do so, not because

| I have any desire to be in the argument that is certain to ensue.

| 

| The bzr version control system is dying; by most measures it is

| already moribund.  [...]

`


and the following long thread on gmane.emacs.devel.


-- 

cheers,

Thorsten









-- 

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 a topic in the Google 
Groups Clojure group.

To unsubscribe from this topic, visit 
https://groups.google.com/d/topic/clojure/FQS0UdKQebI/unsubscribe.

To unsubscribe from this group and all its topics, 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.


OT: Github Alternatives

2014-06-30 Thread Adrian Mowat
Hi All,

Sorry for the off topic thread but my company is looking at alternatives to 
gihub that are a) hosted internally and b) cheaper (!)

I was wondering what everyone else is using out there?  The features we use 
most on github are easy creation and navigation of repos, commit/diff 
browsing and user/team management facilities

Many Thanks

Adrian

-- 
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: OT: Github Alternatives

2014-06-30 Thread Adrian Mowat
Lots of great suggestions here!  Thanks guys


On Mon, Jun 30, 2014 at 2:11 PM, Andrey Antukh n...@niwi.be wrote:

 We are using gitlab and it's works very well! ;)

 Andrey


 2014-06-30 15:01 GMT+02:00 François Rey fmj...@gmail.com:

  Tuleap http://www.tuleap.org/ is fully open source and integrates
 gitolite, gerrit, hudson/jenkins, etc. along with an agile dashboard,
 trackers, and more.

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




 --
 Andrey Antukh - Андрей Антух - andrei.anto...@kaleidos.net / 
 n...@niwi.be
 http://www.niwi.be http://www.niwi.be/page/about/
 https://github.com/niwibe

 --
 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 a topic in the
 Google Groups Clojure group.
 To unsubscribe from this topic, visit
 https://groups.google.com/d/topic/clojure/FQS0UdKQebI/unsubscribe.
 To unsubscribe from this group and all its topics, 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: Hosting Providers

2014-04-30 Thread Adrian Mowat
Hi Richard

Sorry for the delay.  We'll check that out!

Having said that, my inclination would be to avoid the compile step if we
can and just run on top of the leiningen project (e.e. analogous to ruby
apps).

Putting Engine Yard aside, it raises an interesting question so I am
wondering what other people on this list do.  Do you compile your code or
just run from the sources as you would in development?

Many Thanks

Adrian




On Thu, Apr 24, 2014 at 2:51 PM, Richard Watson rwat...@engineyard.comwrote:

 Hi Adrian,

 You don't have far to look ... Engine Yard now supports Java, and by
 extension, Clojure.  If you can package up your Clojure app into a WAR file
 (using Leiningen's 'lein ring uberwar', for example) you can deploy it onto
 a Jetty or Tomcat server in an Engine Yard Java environment.

 This is a post I published recently on the Engine Yard blog describing the
 components of a basic Clojure Web app and how to deploy onto Engine Yard.
 https://blog.engineyard.com/2014/clojure-web-app-engine-yard

 I'm Richard, Product Manager for Java at Engine Yard. Please, drop me a
 line if you're interested in trying your Clojure code on Engine Yard, or
 just go ahead and try it out at http://ui.engineyard.com . We're offering
 a $100 credit to try out the Java platform and give us feedback.

 Richard.


 On Friday, April 18, 2014 11:36:05 AM UTC+1, Adrian Mowat wrote:

 Hi Everyone,

 I am currently looking at hosting providers for Clojure for my company.
  We are using Engine Yard for our Ruby applications and we looking for
 something comparable in terms of providing an easy path to getting started
 and easy ongoing maintenance (they allow you to apply OS patches with zero
 downtime by simply clicking a button for example).  We also need 24/7
 support for server issues.

 I was wondering if anyone here could share any experiences and/or
 recommendations?

 Many Thanks

 Adrian

  --
 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 a topic in the
 Google Groups Clojure group.
 To unsubscribe from this topic, visit
 https://groups.google.com/d/topic/clojure/rdV-idmmGh0/unsubscribe.
 To unsubscribe from this group and all its topics, 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.


Hosting Providers

2014-04-18 Thread Adrian Mowat
Hi Everyone,

I am currently looking at hosting providers for Clojure for my company.  We 
are using Engine Yard for our Ruby applications and we looking for 
something comparable in terms of providing an easy path to getting started 
and easy ongoing maintenance (they allow you to apply OS patches with zero 
downtime by simply clicking a button for example).  We also need 24/7 
support for server issues.

I was wondering if anyone here could share any experiences and/or 
recommendations?

Many Thanks

Adrian

-- 
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: Hosting Providers

2014-04-18 Thread Adrian Mowat
Hi,

Thanks for the advice.  I should have mentioned that are are going to use
Datomic but I'm not sure of the tradeoffs around different storage
platforms.  Have I understood correctly that Heroku only offers Postgres as
a storage option?

Many Thanks

Adrian



On Fri, Apr 18, 2014 at 1:43 PM, Mike Haney txmikes...@gmail.com wrote:

 In addition to heroku, there is Amazon Elastic Beanstalk, which lets you
 deploy a WAR file on EC2 without having to setup the infrastructure
 yourself.  Both are great ways to go.

 I lean towards using Heroku for it's simplicity, but Amazon makes sense
 when you need to use other Amazon services like Dynamo DB (which looks like
 a great option for a Datomic backing store).

 --
 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 a topic in the
 Google Groups Clojure group.
 To unsubscribe from this topic, visit
 https://groups.google.com/d/topic/clojure/rdV-idmmGh0/unsubscribe.
 To unsubscribe from this group and all its topics, 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: Hosting Providers

2014-04-18 Thread Adrian Mowat
Hi Mike,

That would be really helpful. Thanks!

We're much earlier in the process than you at the moment but I would be
delighted to share anything that comes up

Cheers

Adrian


On Fri, Apr 18, 2014 at 4:11 PM, Mike Haney txmikes...@gmail.com wrote:

 I know they also have Mongo and Neo4j available on Heroku, but neither of
 those are supported as a Datomic back end.  Postgres will work with Datomic
 just fine, though.  The only hitch with Heroku is that I'm not sure how to
 go about deploying a transactor.  Maybe someone has done it and blogged
 about it (i haven't looked), otherwise you'll have to figure it out on your
 own.

 If you go the AWS route, there is good documentation for configuring
 Dynamo and deploying a transactor on the Datomic site.  Then you could
 deploy your peer through Beanstalk and you're good to go.

 That's the route I'm planning to take, but I'm still weeks away from
 setting up a staging environment.  When I do get to that point, I can share
 my experience and any gotchas I encounter.  If you get there first, or
 especially if you figure out how to do it on Heroku, maybe you could do the
 same?

 --
 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 a topic in the
 Google Groups Clojure group.
 To unsubscribe from this topic, visit
 https://groups.google.com/d/topic/clojure/rdV-idmmGh0/unsubscribe.
 To unsubscribe from this group and all its topics, 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: [ANN] reloadable-app - lein template for component apps and reloaded workflow

2014-04-07 Thread Adrian Mowat
Hi James

I fired up a repl and tried to replicate the warning I was seeing but I 
couldn't make it happen again.  I must have done something one of my test 
projects that broke my repl session so I'll keep an eye out for it 
happening again and see if I can debug the problem.

Thanks for your help

Adrian  





On Sunday, 6 April 2014 20:22:25 UTC+1, Adrian Mowat wrote:

 I was getting warnings before I added the exclude so its definitely there.

 I'm mobile at the mo. Will post more detail when I get to a proper computer
 —
 Sent from Mailbox https://www.dropbox.com/mailbox for iPhone


 On Sun, Apr 6, 2014 at 7:52 PM, James Reeves ja...@booleanknot.comwrote:

 As far as I know, there's no clojure.core/refresh function, as your 
 template seems to indicate via :refer-clojure.

 - James
  

 On 6 April 2014 14:03, Adrian Mowat adrian.mo...@gmail.com wrote:

 Hi,

 I have created a Leiningen template that creates a new project setup to 
 use Stuart Sierra's component library (
 https://github.com/stuartsierra/component) and reloaded workflow (
 http://thinkrelevance.com/blog/2013/06/04/clojure-workflow-reloaded)

 See https://github.com/mowat27/reloadable-app for more details.  

 It's deployed to clojars so you can create a new project by running

 lein new reloadable-app project name

 I also added it to the plugin list at 
 https://github.com/technomancy/leiningen/wiki/Plugins - although I'm 
 not sure if it's up to date

 As this is my first foray into lein templating, any comments would be 
 greatly appreciated

 Many Thanks

 Adrian



  -- 
 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 a topic in the 
 Google Groups Clojure group.
 To unsubscribe from this topic, visit 
 https://groups.google.com/d/topic/clojure/XeaFsa2lEkk/unsubscribe.
 To unsubscribe from this group and all its topics, 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] reloadable-app - lein template for component apps and reloaded workflow

2014-04-06 Thread Adrian Mowat
Hi,

I have created a Leiningen template that creates a new project setup to use 
Stuart Sierra's component library 
(https://github.com/stuartsierra/component) and reloaded workflow 
(http://thinkrelevance.com/blog/2013/06/04/clojure-workflow-reloaded)

See https://github.com/mowat27/reloadable-app for more details.  

It's deployed to clojars so you can create a new project by running

lein new reloadable-app project name

I also added it to the plugin list 
at https://github.com/technomancy/leiningen/wiki/Plugins - although I'm not 
sure if it's up to date

As this is my first foray into lein templating, any comments would be 
greatly appreciated

Many Thanks

Adrian



-- 
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: Leiningen: referring to another project on local disc

2014-04-06 Thread Adrian Mowat
That's neat.  I didn't know you could do that.  Thanks



On Sunday, 6 April 2014 17:04:48 UTC+1, Jony Hudson wrote:

 Or, you could make a directory called 'checkouts' inside the poker project 
 directory, and put a symlink in there to the testgen project directory. 
 Lein will look in the checkouts directory before it looks to any 
 repository. See  here:


 https://github.com/technomancy/leiningen/blob/master/doc/TUTORIAL.md#checkout-dependencies

 This way is nice if you're going to work on both projects in parallel as 
 you don't need to run lein install every time you change testgen.


 Jony


 On Sunday, 6 April 2014 14:31:55 UTC+1, Luc wrote:

 Use lein install 

 This command will install your testgen jar in your local repo folder. 
 This local repo is hit first when searching for a dependency before 
 escalating 
 to network repos if the dependency is not found there first. 

 No need for a uberjar. 

 Luc P. 


  I'm trying to reference one of my leiningen projects from another, and 
 not 
  succeeding. My error must be simple and obvious... 
  
  Essentially the projects 'poker' and 'testgen' are both in 
  /home/simon/workspace, and both are standard leiningen projects using 
 just 
  the default project template. I've done 'lein uberjar' in testgen, so 
 there 
  are the following jars: 
  
  simon@engraver:~/workspace/poker$ ls -l 
  /home/simon/workspace/testgen/target/ 
  total 3588 
  drwxr-xr-x 2 simon simon4096 Apr  2 20:04 classes 
  -rw-r--r-- 1 simon simon   5 Apr  6 00:06 repl-port 
  drwxr-xr-x 2 simon simon4096 Apr  2 20:04 stale 
  -rw-r--r-- 1 simon simon   11226 Apr  6 00:10 
 testgen-0.1.0-SNAPSHOT.jar 
  -rw-r--r-- 1 simon simon 3646079 Apr  6 00:10 
  testgen-0.1.0-SNAPSHOT-standalone.jar 
  
  
  In poker/project.clj I've done the following (added lines highlighted): 
  
  (defproject poker 0.1.0-SNAPSHOT 
:description Poker scoring kata 
:url http://example.com/FIXME; 
:license {:name Eclipse Public License 
  :url http://www.eclipse.org/legal/epl-v10.html} 
  :repositories [[testgen 
  file:///home/simon/workspace/testgen/target]] 
  :dependencies [[org.clojure/clojure 1.5.1] 
  [testgen 0.1.0-SNAPSHOT] 
  ]) 
  
  
  When I try to run lein repl, I get the following: 
  
  simon@engraver:~/workspace/poker$ lein repl 
  Could not find artifact testgen:testgen:jar:0.1.0-SNAPSHOT in clojars 
  (https://clojars.org/repo/) 
  Could not find artifact testgen:testgen:jar:0.1.0-SNAPSHOT in testgen 
  (file:///home/simon/workspace/testgen/target) 
  This could be due to a typo in :dependencies or network issues. 
  
  
  So clearly lein is failing to recognise the jar file(s) as the artefact 
  it's looking for. What do I need to do differently? Do I need a pom 
 file, 
  and if so what should be in it? 
  
  Cheers 
  
  Simon 
  
  -- 
  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 
  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 
  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. 
  For more options, visit https://groups.google.com/d/optout. 
  
 -- 
 Softaddictslprefo...@softaddicts.ca sent by ibisMail from my ipad! 



-- 
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] reloadable-app - lein template for component apps and reloaded workflow

2014-04-06 Thread Adrian Mowat
I was getting warnings before I added the exclude so its definitely there.


I'm mobile at the mo. Will post more detail when I get to a proper computer
—
Sent from Mailbox for iPhone

On Sun, Apr 6, 2014 at 7:52 PM, James Reeves ja...@booleanknot.com
wrote:

 As far as I know, there's no clojure.core/refresh function, as your
 template seems to indicate via :refer-clojure.
 - James
 On 6 April 2014 14:03, Adrian Mowat adrian.mo...@gmail.com wrote:
 Hi,

 I have created a Leiningen template that creates a new project setup to
 use Stuart Sierra's component library (
 https://github.com/stuartsierra/component) and reloaded workflow (
 http://thinkrelevance.com/blog/2013/06/04/clojure-workflow-reloaded)

 See https://github.com/mowat27/reloadable-app for more details.

 It's deployed to clojars so you can create a new project by running

 lein new reloadable-app project name

 I also added it to the plugin list at
 https://github.com/technomancy/leiningen/wiki/Plugins - although I'm not
 sure if it's up to date

 As this is my first foray into lein templating, any comments would be
 greatly appreciated

 Many Thanks

 Adrian



  --
 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 a topic in the Google 
 Groups Clojure group.
 To unsubscribe from this topic, visit 
 https://groups.google.com/d/topic/clojure/XeaFsa2lEkk/unsubscribe.
 To unsubscribe from this group and all its topics, 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: Events in Scotland

2014-03-01 Thread Adrian Mowat
Hi All,

Just a quick note to let everyone know about events in Scotland over the 
coming weeks.

First up the inaugural meeting of the Glasgow Clojurians with be this 
Thursday (6th March) at Spaarks, 70 W Regent St, Glasgow at 7pm.  We'll be 
running a Clojure Dojo based on what the guys in London are doing.  If you 
are interested, please join our group at 
https://groups.google.com/forum/#!forum/glasgow-clojurians.

Second, Malcolm Sparks and I will be re-running the Clojure Launchpad 
course for beginners and improvers on the 22nd of March at NCR in 
Edinburgh.  Tickets are £10 at 
http://www.eventbrite.co.uk/e/clojure-launchpad-tickets-10626788009?aff=estw

Finally, the monthly Code Craft group are covering the functional language 
chapters from 7 languages in 7 weeks on the 20th of March in Glasgow. More 
info at http://www.codecraftuk.org/events/2014/02/seven-languages-part-2/

Cheers

Adrian


-- 
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: Do you recommend the book: Web Development with Clojure

2014-02-20 Thread Adrian Mowat
Hi Laurent

If you are making the switch from OO then I recommend https://leanpub.com/fp-oo

Cheers

Adrian

-- 
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: OT: Enterprise Schedulers

2014-02-12 Thread Adrian Mowat
Hi Luca

Thanks for the links!

I definitely have a lot of hammock time ahead of me :-)

Cheers

Adrian


On 11 Feb 2014, at 14:37, icamts wrote:

 Hi Adrian,
 the answer is more off-topic than the question :) but have a look to Spagic 
 (I'm a member of the developers' team), Mule ESB, Petals ESB or Talend ESB. 
 You may already know Talend as an ETL solution. You'll find tools to define, 
 configure and run instances of services or processes. Monitong application 
 with re-start / re-run facilities. Connectors for services / processes 
 integration.
 
 In a ESB scenario developers will design simple processes with a quartz or 
 file polling connector followed by a script / custom component designed to 
 accomplist the batch task. 
 
 Custom components can be written in clojure if you reify the required 
 interface. The only cavevat is the AOT compilation.
 
 Some other ideas are below, along your problem statement.
 
 Cheers,
 Luca
 
 Be controlled by artifacts developers control
 Probably be github friendly
  
 Put service deployment directory and estensions / plugins directory under 
 version control and copy them as a part of the deployment process. An ESB can 
 be deployed like a simple webapp.
 Provide a direct relationship between an application and its tasks
 
 Choose meaningful service names. Deploy a local ESB in the same AS of your 
 application and use an in-memory invoker / connector. 
 Support separate sandbox, staging and production environments
 
  Use different ESB instances.
 Be scalable
 
 Single task scalability is up to your code.
 Be distributed - jobs for application X can run on the same host as 
 application X or on a different host or cluster as needed
 
 Sevices / processes can be run on every ESB instance. Use in-memory invoker / 
 connector or soap invoker / connector.
 Be secure
 
 Use https for remote connection. Use sftp for file transfer. 
 Be easy to administer
 Job progress and status is visible
 
 Service progress notification is up to your code and not a monitor console 
 feature. Process running step is available. 
 Alert when a job fails
 
 Use a mail connector to alert on job fails
 Easy to re-run a job
 
 Restart / rerun through monitoring console. 
 Easy to spin up new hosts and/or move all processing to a different host
 
 Deploy a new instance with the same configuration. No running service can be 
 moved. Running processes may be moved. It depends on workflow engine 
 implementation details.
 Provide a standard way of organising assets like files and configs across all 
 our applications
  
 (Not sure what you mean.)
 Comply with our hybrid infrastructure (stuff runs internally and in the cloud)
 Data can move internal - cloud
  
 Is it an ETL task?
 Data can move cloud - internal
 
 Same as before 
 Data can be processed entirely within a host
  
 That's so
 Support different ways of triggering a job
 Scheduled tasks
 
 Use a quartz input connector 
 Run when file x arrives
 
 Use a file poller input connector 
 Run job y after job x completes
  
 Use an output connector to trigger the next job start or design a process 
 with jobs in a sequence.
 
 -- 
 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 a topic in the Google 
 Groups Clojure group.
 To unsubscribe from this topic, visit 
 https://groups.google.com/d/topic/clojure/95W4MlkFgnY/unsubscribe.
 To unsubscribe from this group and all its topics, send an email to 
 clojure+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.


Adrian Mowat

Tweet: @mowat27

Am I being a bit short?  Here's why: http://emailcharter.org/, 
http://inboxzero.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/groups/opt_out.


OT: Enterprise Schedulers

2014-02-10 Thread Adrian Mowat
Hi Everyone,

This is a wee bit off topic, but given the sorts of problems the Clojure 
community likes to solve and the enterprise background of a lot of people I 
thought this list might be a good place to start.

We are building a fairly large web-infrastructure running over a 
combination of internal and cloud-hosted VMs.  It's basically 
service-oriented, but we have a number of cases where we need to bulk load 
data from CSV file and largish JSON files.  At the moment, we are using 
cron to run the jobs, but it's not really providing the level of visibility 
and control we need.

I've added my problem statement below and I am thinking of a solution that 
is something along the lines of a cheaper and more agile-friendly version 
the enterprise schedulers I used to use when I was building ETL/data 
warehouse solutions a few years ago.  Before I dive in and start building 
something, does anyone know of any open-source projects and/or libraries I 
might want to look at?  

Also, if anyone else is interested in this space, I would love to hook up 
and bounce some ideas around.

Many Thanks

Adrian

The Problem

We need a reusable solution that allows us to schedule, execute and monitor 
batch processes accross all our applications.

It should...

   - Be controlled by artifacts developers control
  - Probably be github friendly
  - Provide a direct relationship between an application and its tasks
   - Support separate sandbox, staging and production environments
   - Be scalable
   - Be distributed - jobs for application X can run on the same host as 
   application X or on a different host or cluster as needed
   - Be secure
   - Be easy to administer
  - Job progress and status is visible
  - Alert when a job fails
  - Easy to re-run a job
  - Easy to spin up new hosts and/or move all processing to a different 
  host
  - Provide a standard way of organising assets like files and configs 
  across all our applications
   - Comply with our hybrid infrastructure (stuff runs internally and in 
   the cloud)
  - Data can move internal - cloud
  - Data can move cloud - internal
  - Data can be processed entirely within a host
   - Support different ways of triggering a job
  - Scheduled tasks
  - Run when file x arrives
  - Run job y after job x completes
   

-- 
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: OT: Enterprise Schedulers

2014-02-10 Thread Adrian Mowat
Hi François

Thanks for the info.  Quartz and it's Clojure DSLs seem to do some of what I 
need.  I had a quick scan of the docs and they don't appear to support triggers 
that are not time based (on arrival of a file, on completion of a job etc) - 
but it was only a quick scan so I wondered if you had noticed these facilitates 
during your investigations?

 Do let us know what you find out and decide.


I definitely will!

Many Thanks

Adrian



On 10 Feb 2014, at 14:33, François Rey wrote:

 Perhaps I should be more precise: quartz (http://quartz-scheduler.org/) is a 
 java-based open source scheduler, and the link I gave earlier is to the 
 clojure integration layer quartzite (http://clojurequartz.info/).
 Immutant (http://immutant.org/tutorials/jobs/) seems to use another 
 integration library named quartz-clj 
 (https://github.com/mdpendergrass/quartz-clj).
 I have no idea how quartzite and quartz-clj compare to each other.
 Finally the enterprise/proprietary version of quartz is named Terracotta 
 Quartz Scheduler and it includes the ability to specify where to run jobs.
 Do let us know what you find out and decide.
 
 -- 
 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 a topic in the Google 
 Groups Clojure group.
 To unsubscribe from this topic, visit 
 https://groups.google.com/d/topic/clojure/95W4MlkFgnY/unsubscribe.
 To unsubscribe from this group and all its topics, send an email to 
 clojure+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.


Adrian Mowat

Tweet: @mowat27

Am I being a bit short?  Here's why: http://emailcharter.org/, 
http://inboxzero.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/groups/opt_out.


Re: OT: Enterprise Schedulers

2014-02-10 Thread Adrian Mowat
Hi François

I totally agree about the scheduling library being only part of the solution.

I'm aware of Pallet but I have never used it in anger.  The links you have 
provided look like an interesting angle.  I'll start working through them and 
see if I can figure out an architecture that meets my needs and I can share 
with you though this list

Many Thanks

Adrian


On 10 Feb 2014, at 16:59, François Rey wrote:

 On 10/02/14 16:20, Toby Crawley wrote:
 Actually, Immutant has its own Quartz integration, and is not based on 
 quartz-clj. You can, however, use the Quartzite API with the cluster-aware 
 Quartz scheduler that Immutant provides if you prefer the Quartzite API over 
 the Immutant one. - Toby
 Thanks for being more precise, as I said I've have not used any of these 
 libraries, yet (project still in the starting block)...
 
 On 10/02/14 14:30, Adrian Mowat wrote:
 Also, if anyone else is interested in this space, I would love to hook up 
 and bounce some ideas around.
 A scheduling library would provide much of what's needed for managing these 
 jobs, but that would be at a level which may not be too low for certain use 
 cases, e.g. finer control over job distribution, job composition, exception 
 handling, manual retry, etc. A layer above the scheduler would make sense for 
 this.
 Recently, while investigating the use of a finite state machine and thus 
 searching for fsm libraries in the clojure world, I ended up looking at a 
 couple fsm libraries used in pallet (http://palletops.com/):
 - pallet-fsm (https://github.com/pallet/pallet-fsm)
 - pallet-fsmop (https://github.com/pallet/pallet-fsmop)
 They are used in the pallet api for managing cloud operations on remote nodes:
 http://palletops.com/pallet/marginalia/0.8/uberdoc.html#pallet.core.primitives
 http://palletops.com/pallet/marginalia/0.8/uberdoc.html#pallet.api (see 
 converge method)
 I don't know if you use pallet but this may be of interest, especially when 
 reading the rationale:
 https://github.com/pallet/pallet-fsmop/wiki/Rationale
 An example of usage can also be found in this discussion:
 https://groups.google.com/forum/#!topic/pallet-clj/ZcBrmUn-mAI
 From what I understand pallet-fsmop is based on pallet-fsm and provides 
 higher-level operations over sets of fsm that must have certain states for 
 that purpose. These higher-level operations trigger the remote operation 
 encapsulated by each fsm, adding some delay, timeouts, comprehensions, 
 reducers, reporting, etc. So in your case one could imagine a similar library 
 that uses a scheduling library instead of doing immediate or delayed 
 execution.
 In any case a single library won't satisfy all your requirements, so you will 
 have to choose a scheduling library and compose with others...
 
 -- 
 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 a topic in the Google 
 Groups Clojure group.
 To unsubscribe from this topic, visit 
 https://groups.google.com/d/topic/clojure/95W4MlkFgnY/unsubscribe.
 To unsubscribe from this group and all its topics, send an email to 
 clojure+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.


Adrian Mowat

Tweet: @mowat27

Am I being a bit short?  Here's why: http://emailcharter.org/, 
http://inboxzero.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/groups/opt_out.


Why does Clojure at times use Java classes as their base type?

2014-02-03 Thread Adrian Mowat
In a broader sense, it's because Clojure was designed to embrace the underlying 
runtime.  As well as eliminating problems with leaky abstractions (as others 
have pointed out), it also encourages post to other runtimes like the CLR and 
JavaScript (clojurescript)

Does anyone have a link to a Rich Hickey video or article where he covers this 
off?  I know I've seen a few but I haven't stored the links

Cheers

Adrian

-- 
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: ANN: bidi, a URI dispatch and formation library for Clojure

2014-01-01 Thread Adrian Mowat
Hi Malcolm,

I'm working through the examples and I am getting exceptions when I try 
defining multiple routes.  I noticed the 1.8.0 is mentioned in the docs but 
the highest version on clojars is 1.7.0.  Is clojars up to date.

Stacktraces as follows

user= (def routes [/ {index.html :index
  #_= articles/ {index.html :article-index
  #_=  article.html :article}}])
#'user/routes
user= (match-route routes /index.html)

java.lang.IllegalArgumentException: No implementation of method: 
:resolve-handler of protocol: #'bidi.bidi/Matched found for class: 
clojure.lang.PersistentHashMap
   clojure.core/-cache-protocol-fn 
core_deftype.clj:  541
   bidi.bidi/eval3017/fn/G 
bidi.clj:   87
  bidi.bidi/match-pair 
bidi.clj:   97
 bidi.bidi/match-route 
bidi.clj:  193
clojure.lang.RestFn.invoke 
 RestFn.java:  425
  user$eval3329.invoke 
  NO_SOURCE_FILE:1
user= 
clojure.lang.Compiler.evalCompiler.java: 6619
clojure.lang.Compiler.eval 
   Compiler.java: 6582
 clojure.core/eval 
core.clj: 2852
  clojure.main/repl/read-eval-print/fn 
main.clj:  259
 clojure.main/repl/read-eval-print 
main.clj:  259
  clojure.main/repl/fn 
main.clj:  277
 clojure.main/repl 
main.clj:  277
clojure.lang.RestFn.invoke 
 RestFn.java: 1096
 clojure.tools.nrepl.middleware.interruptible-eval/evaluate/fn 
  interruptible_eval.clj:   56
clojure.lang.AFn.applyToHelper 
AFn.java:  159
  clojure.lang.AFn.applyTo 
AFn.java:  151
clojure.core/apply 
core.clj:  617
   clojure.core/with-bindings* 
core.clj: 1788
clojure.lang.RestFn.invoke 
 RestFn.java:  425
clojure.tools.nrepl.middleware.interruptible-eval/evaluate 
  interruptible_eval.clj:   41
clojure.tools.nrepl.middleware.interruptible-eval/interruptible-eval/fn/fn 
  interruptible_eval.clj:  171
  clojure.core/comp/fn 
core.clj: 2330
 clojure.tools.nrepl.middleware.interruptible-eval/run-next/fn 
  interruptible_eval.clj:  138
  clojure.lang.AFn.run 
AFn.java:   24
 java.util.concurrent.ThreadPoolExecutor.runWorker 
 ThreadPoolExecutor.java: 1110
java.util.concurrent.ThreadPoolExecutor$Worker.run 
 ThreadPoolExecutor.java:  603
  java.lang.Thread.run 
 Thread.java:  722
(match-

user= 

user= (path-for routes :index)

java.lang.IllegalArgumentException: No implementation of method: 
:unresolve-handler of protocol: #'bidi.bidi/Matched found for class: 
clojure.lang.PersistentHashMap
   clojure.core/-cache-protocol-fn 
core_deftype.clj:  541
   bidi.bidi/eval3017/fn/G 
bidi.clj:   87
bidi.bidi/unmatch-pair 
bidi.clj:  149
bidi.bidi/path-for 
bidi.clj:  201
clojure.lang.RestFn.invoke 
 RestFn.java:  425
  user$eval3331.invoke 
  NO_SOURCE_FILE:1
clojure.lang.Compiler.eval 
   Compiler.java: 6619
clojure.lang.Compiler.eval 
   Compiler.java: 6582
 clojure.core/eval 
core.clj: 2852
  clojure.main/repl/read-eval-print/fn 
main.clj:  259
 

Re: ANN: bidi, a URI dispatch and formation library for Clojure

2014-01-01 Thread Adrian Mowat
HI Malcolm

Yup, that's much better.  Thanks for the quick reply

Cheers

Adrian


On Wednesday, 1 January 2014 20:16:50 UTC, Malcolm Sparks wrote:

 Hi Adrian,

 Yes, it was the missing clojars deployment. 1.8.0 is up there now. 1.7.0 
 doesn't have the map representation, which I added to the existing 
 vector-of-vectors syntax and moved the README examples to. Please try now.

 Regards,

 Malcolm


 On 1 January 2014 20:06, Adrian Mowat adrian...@gmail.com 
 javascript:wrote:

 Hi Malcolm,

 I'm working through the examples and I am getting exceptions when I try 
 defining multiple routes.  I noticed the 1.8.0 is mentioned in the docs but 
 the highest version on clojars is 1.7.0.  Is clojars up to date.

 Stacktraces as follows

 user= (def routes [/ {index.html :index
   #_= articles/ {index.html :article-index
   #_=  article.html :article}}])
 #'user/routes
 user= (match-route routes /index.html)

 java.lang.IllegalArgumentException: No implementation of method: 
 :resolve-handler of protocol: #'bidi.bidi/Matched found for class: 
 clojure.lang.PersistentHashMap
   
  clojure.core/-cache-protocol-fn core_deftype.clj:  541
   
  bidi.bidi/eval3017/fn/G bidi.clj:   87
   
 bidi.bidi/match-pair bidi.clj:   97
 
  bidi.bidi/match-route bidi.clj:  193
 
 clojure.lang.RestFn.invoke  RestFn.java:  425
   
 user$eval3329.invoke   NO_SOURCE_FILE:1
 user= 
 clojure.lang.Compiler.evalCompiler.java: 6619
 
 clojure.lang.Compiler.evalCompiler.java: 6582
 
  clojure.core/eval core.clj: 2852
   
 clojure.main/repl/read-eval-print/fn main.clj:  259
 
  clojure.main/repl/read-eval-print main.clj:  259
   
 clojure.main/repl/fn main.clj:  277
 
  clojure.main/repl main.clj:  277
 
 clojure.lang.RestFn.invoke  RestFn.java: 1096
 
  clojure.tools.nrepl.middleware.interruptible-eval/evaluate/fn   
 interruptible_eval.clj:   56
 
 clojure.lang.AFn.applyToHelper AFn.java:  159
   
 clojure.lang.AFn.applyTo AFn.java:  151
 
 clojure.core/apply core.clj:  617
   
  clojure.core/with-bindings* core.clj: 1788
 
 clojure.lang.RestFn.invoke  RestFn.java:  425
 
 clojure.tools.nrepl.middleware.interruptible-eval/evaluate   
 interruptible_eval.clj:   41
 clojure.tools.nrepl.middleware.interruptible-eval/interruptible-eval/fn/fn 
   interruptible_eval.clj:  171
   
 clojure.core/comp/fn core.clj: 2330
 
  clojure.tools.nrepl.middleware.interruptible-eval/run-next/fn   
 interruptible_eval.clj:  138
   
 clojure.lang.AFn.run AFn.java:   24
 
  java.util.concurrent.ThreadPoolExecutor.runWorker 
  ThreadPoolExecutor.java: 1110
 
 java.util.concurrent.ThreadPoolExecutor$Worker.run 
  ThreadPoolExecutor.java:  603
   
 java.lang.Thread.run  Thread.java:  722
 (match-

 user= 

 user= (path-for routes :index)

 java.lang.IllegalArgumentException: No implementation of method: 
 :unresolve-handler of protocol: #'bidi.bidi/Matched found for class: 
 clojure.lang.PersistentHashMap
   
  clojure.core/-cache-protocol-fn core_deftype.clj:  541
   
  bidi.bidi/eval3017/fn/G bidi.clj:   87
 
 bidi.bidi/unmatch-pair bidi.clj:  149
 
 bidi.bidi/path-for bidi.clj:  201
 
 clojure.lang.RestFn.invoke  RestFn.java:  425

Re: cider status

2013-12-12 Thread Adrian Mowat


Is cider just a new release of nrepl.el or a different thing entirely?

Sorry to be a noob, but this is awfully confusing to the uninitiated.



-- 
-- 
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] exercism.io

2013-09-15 Thread Adrian Mowat
Hi Folks

I wanted to promote a new site I have been rather hooked on for the past few 
weeks.

http://exercism.io is a crowd sourced/social coding practice site.  When you 
login, you can download an exercise and a test suite.  Once you have coded your 
best solution to the problem, you submit it back up to the site for people to 
nitpick.  You can also nitpick other people's submissions.

exercism.io is intended to be a conversation about what good code might look 
like. There's no right answer, and many good questions.

There are exercises in Clojure, Ruby, Elixir, JavaScript, Python and Haskell.

Hopefully you will find this useful too

Adrian 


-- 
-- 
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: Data Profiling

2013-08-11 Thread Adrian Mowat
Hi Alex,

I think I'll do that as a starter for 10, but most of my users don't know SQL 
so it's only going to get us so far

Cheers

Adrian

On 10 Aug 2013, at 23:21, Alex Baranosky wrote:

 You could possibly batch import it all into MySQL, and let people SQL query 
 over it.
 
 On Sat, Aug 10, 2013 at 9:21 AM, Adrian Mowat adrian.mo...@gmail.com wrote:
 Hi,
 
 I have about 2.5 Gb of web transaction data (values submitted to forms etc) 
 held as CSV files that my fairly non-technical users want to analyse.  I want 
 to make it easy for them to run basic analytics - averages, distribution of 
 values, percentage nil etc - across all or a subset of the files.  I've seen 
 commercial data profilers do this kind of thing and I think I could knock up 
 something fairly quickly using incanter.  However, I can't help but feel it's 
 a solved problem and I was wondering if anyone here knows of any github 
 projects I could use to get me started? 
 
 Many Thanks
 
 Adrian
 
 -- 
 -- 
 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 a topic in the Google 
 Groups Clojure group.
 To unsubscribe from this topic, visit 
 https://groups.google.com/d/topic/clojure/Rygnv5BmEgk/unsubscribe.
 To unsubscribe from this group and all its topics, send an email to 
 clojure+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.
  
  


Adrian Mowat

Tweet: @mowat27

Am I being a bit short?  Here's why: http://emailcharter.org/, 
http://inboxzero.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/groups/opt_out.


Re: Data Profiling

2013-08-11 Thread Adrian Mowat
Looks like a great tool.  Thanks for the link


On 11 Aug 2013, at 02:13, Ignacio Thayer wrote:

 Doesn't exactly fit the bill, but for doing this type of stuff at the repl, 
 we use babbage.
 
 ignacio
 cto/co-founder ReadyForZero.com
 
 On Saturday, August 10, 2013 9:21:46 AM UTC-7, Adrian Mowat wrote:
 Hi,
 
 I have about 2.5 Gb of web transaction data (values submitted to forms etc) 
 held as CSV files that my fairly non-technical users want to analyse.  I want 
 to make it easy for them to run basic analytics - averages, distribution of 
 values, percentage nil etc - across all or a subset of the files.  I've seen 
 commercial data profilers do this kind of thing and I think I could knock up 
 something fairly quickly using incanter.  However, I can't help but feel it's 
 a solved problem and I was wondering if anyone here knows of any github 
 projects I could use to get me started? 
 
 Many Thanks
 
 Adrian
 
 -- 
 -- 
 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 a topic in the Google 
 Groups Clojure group.
 To unsubscribe from this topic, visit 
 https://groups.google.com/d/topic/clojure/Rygnv5BmEgk/unsubscribe.
 To unsubscribe from this group and all its topics, send an email to 
 clojure+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.
  
  


Adrian Mowat

Tweet: @mowat27

Am I being a bit short?  Here's why: http://emailcharter.org/, 
http://inboxzero.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/groups/opt_out.


Data Profiling

2013-08-10 Thread Adrian Mowat
Hi,

I have about 2.5 Gb of web transaction data (values submitted to forms etc) 
held as CSV files that my fairly non-technical users want to analyse.  I 
want to make it easy for them to run basic analytics - averages, 
distribution of values, percentage nil etc - across all or a subset of the 
files.  I've seen commercial data profilers do this kind of thing and I 
think I could knock up something fairly quickly using incanter.  However, I 
can't help but feel it's a solved problem and I was wondering if anyone 
here knows of any github projects I could use to get me started? 

Many Thanks

Adrian

-- 
-- 
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: Clojure contrib profiler error

2012-08-06 Thread Adrian Mowat
@odyssomay, @Luc thanks very much.  That explains the problems I was having

@Peter, timbre looks very interesting.  Thanks for posting it


On Monday, 6 August 2012 10:08:19 UTC+1, Peter Taoussanis wrote:

 I cannibalized most of the old contrib profiling stuff for Timbre, btw: 
 https://github.com/ptaoussanis/timbre#profiling

  - Peter Taoussanis (@ptaoussanis)


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

Clojure contrib profiler error

2012-08-04 Thread Adrian Mowat
Hi All

I'm trying to run the clojure contrib profiler and I'm getting an error. 
 Has anyone faced the same problem?

user= (use 'clojure.contrib.profile)
nil
user= (defn my-function [x y]
(let [sum (prof :addition (+ x y))
  product (prof :multiplication (* x y))]
  [sum product]))
#'user/my-function
user= (profile (dotimes [i 1] (my-function 3 4)))
IllegalStateException Can't dynamically bind non-dynamic var: 
clojure.contrib.profile/*profile-data*  clojure.lang.Var.pushThreadBindings 
(Var.java:353)

user= *enable-profiling*
true



my project.clj looks like this

(defproject clam 0.1.0-SNAPSHOT
  :description Data description language for parsing text streams
  :url https://github.com/mowat27/clam;
  :license {:name MIT Licence
:url http://copyfree.org/licenses/mit/license.txt}
  :dependencies [[org.clojure/clojure 1.4.0]
 [org.clojure/clojure-contrib 1.2.0]
 [midje 1.4.0]
 [com.stuartsierra/lazytest 1.2.3]]
  :repositories {stuart http://stuartsierra.com/maven2})


Thanks very much


Adrian

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

Re: Repeatedly applying functions until a condition is met

2012-07-27 Thread Adrian Mowat
Brilliant!  Thanks Denis

Those are 2 great tips.  I had looked through the documentation until my 
eyes went square but I'm not very well practiced with all the functions so 
I decided to ask the community for help.  take-while was exactly what I 
needed.

Many Thanks

Adrian

On Thursday, 26 July 2012 08:58:13 UTC+1, Adrian Mowat wrote:

 Hi Folks

 I have a program that parses a string into rows and fields by repeatedly 
 applying a sequence of functions repeatedly until the end of the string is 
 reached.  Each function (or chunker, as I have called them) knows how to 
 find the next field in the stream and returns the field and the remainder 
 of the input text.

 I've come up with a recursive implementation as shown below but I am 
 wondering if this is idomatic or if there is a better way using while, for 
 or something like that?

 (defn read-row [chunkers text]
   Applies a list of functions to a string. Returns
   a vector of fields found and any remaining text.
   (read-row comma-chunkers \foo,bar,bop,baz,\)  = [[\foo\ \bar\] 
 \bop,baz,\]

   (reduce #(read-chunk %2 %1) (cons text chunkers)))

 (defn read-all-rows [chunkers starting-text]
   Repeatedly applies chunkers to text until the end of the
   text is reached.

   (reverse (loop [text starting-text result []]
 (if (empty? text)
   result
   (let [[row remainder] (read-row chunkers text)]
 (recur remainder (cons row result)))

 The full source is at https://github.com/mowat27/clam

 Hopefully that makes sense but please let me know if you have any queries

 Many Thanks

 Adrian


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

Repeatedly applying functions until a condition is met

2012-07-26 Thread Adrian Mowat
Hi Folks

I have a program that parses a string into rows and fields by repeatedly 
applying a sequence of functions repeatedly until the end of the string is 
reached.  Each function (or chunker, as I have called them) knows how to 
find the next field in the stream and returns the field and the remainder 
of the input text.

I've come up with a recursive implementation as shown below but I am 
wondering if this is idomatic or if there is a better way using while, for 
or something like that?

(defn read-row [chunkers text]
  Applies a list of functions to a string. Returns
  a vector of fields found and any remaining text.
  (read-row comma-chunkers \foo,bar,bop,baz,\)  = [[\foo\ \bar\] 
\bop,baz,\]

  (reduce #(read-chunk %2 %1) (cons text chunkers)))

(defn read-all-rows [chunkers starting-text]
  Repeatedly applies chunkers to text until the end of the
  text is reached.

  (reverse (loop [text starting-text result []]
(if (empty? text)
  result
  (let [[row remainder] (read-row chunkers text)]
(recur remainder (cons row result)))

The full source is at https://github.com/mowat27/clam

Hopefully that makes sense but please let me know if you have any queries

Many Thanks

Adrian

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

Re: ClojureScript for form

2012-02-22 Thread Adrian Mowat
Hi David

That worked a treat.  Thanks!

Adrian

On Feb 21, 4:55 am, David Nolen dnolen.li...@gmail.com wrote:
 for creates lazy sequences - this can be a problem if you need side
 effects. I suggest using doseq instead.

 David

 On Mon, Feb 20, 2012 at 11:26 AM, Adrian Mowat adrian.mo...@gmail.comwrote:







  Hi Everyone,

  I have been coding clojure for a few months and I've just started
  using clojurescript and I am struggling to use for forms inside event
  handlers.  Sorry if this is covered elsewhere but I have searched as
  best I can without finding the answers.

  I have an event handler that listens for changes in an input element

  (def search-input (dom/get-element search))
  (def test-area (dom/get-element test-area))
  (event/listen search-input
   :keyup
   (fn [e]
     (let [search-results [a b]]
       (dom/append test-area (dom/element :p {} (first search-
  results)))
       (dom/append test-area (dom/element :p {} (second search-
  results))

  It works fine.  Everytime I type in the input box, some text is
  appended to 'test-area'

  However, this doesn't work any more when I switch to using for

  (event/listen search-input
   :keyup
   (fn [e]
     (let [search-results [a b]]
       (for [x search-results] (dom/append test-area (dom/element :p {}
  x))

  Stepping through the generated code, I noticed that the generated
  javascript calls the function with null as the first argument (second
  last line below) but I can't figure out why or how to change the
  behaviour.

  clojure.browser.event.listen.call(null,
  smws_numbers.cljs.smws_numbers.search_input, \ufdd0'keyup,
  function() {
   return function b(c) {
     return new cljs.core.LazySeq(null, !1, function() {
       for(;;) {
         if(cljs.core.truth_(cljs.core.seq.call(null, c))) {
           var d = cljs.core.first.call(null, c);
           return cljs.core.cons.call(null,
  clojure.browser.dom.append.call(null,
  smws_numbers.cljs.smws_numbers.test_area,
  clojure.browser.dom.element.call(null, \ufdd0'p,
  cljs.core.ObjMap.fromObject([], {}), d)), b.call(null,
  cljs.core.rest.call(null, c)))
         }
         return null
       }
     })
   }.call(null, cljs.core.Vector.fromArray([a, b]))
  });

  I fell sure I'm missing something fairly basic, but it's escaping me
  for now so any help you can provide would be greatly appreciated.

  Many Thanks

  Adrian

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


ClojureScript for form

2012-02-20 Thread Adrian Mowat
Hi Everyone,

I have been coding clojure for a few months and I've just started
using clojurescript and I am struggling to use for forms inside event
handlers.  Sorry if this is covered elsewhere but I have searched as
best I can without finding the answers.

I have an event handler that listens for changes in an input element

(def search-input (dom/get-element search))
(def test-area (dom/get-element test-area))
(event/listen search-input
  :keyup
  (fn [e]
(let [search-results [a b]]
  (dom/append test-area (dom/element :p {} (first search-
results)))
  (dom/append test-area (dom/element :p {} (second search-
results))

It works fine.  Everytime I type in the input box, some text is
appended to 'test-area'

However, this doesn't work any more when I switch to using for

(event/listen search-input
  :keyup
  (fn [e]
(let [search-results [a b]]
  (for [x search-results] (dom/append test-area (dom/element :p {}
x))

Stepping through the generated code, I noticed that the generated
javascript calls the function with null as the first argument (second
last line below) but I can't figure out why or how to change the
behaviour.

clojure.browser.event.listen.call(null,
smws_numbers.cljs.smws_numbers.search_input, \ufdd0'keyup,
function() {
  return function b(c) {
return new cljs.core.LazySeq(null, !1, function() {
  for(;;) {
if(cljs.core.truth_(cljs.core.seq.call(null, c))) {
  var d = cljs.core.first.call(null, c);
  return cljs.core.cons.call(null,
clojure.browser.dom.append.call(null,
smws_numbers.cljs.smws_numbers.test_area,
clojure.browser.dom.element.call(null, \ufdd0'p,
cljs.core.ObjMap.fromObject([], {}), d)), b.call(null,
cljs.core.rest.call(null, c)))
}
return null
  }
})
  }.call(null, cljs.core.Vector.fromArray([a, b]))
});


I fell sure I'm missing something fairly basic, but it's escaping me
for now so any help you can provide would be greatly appreciated.

Many Thanks

Adrian

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