Re: Using parallellisation

2014-04-11 Thread Cecil Westerhof
2014-04-11 3:10 GMT+02:00 Andy Fingerhut andy.finger...@gmail.com:

 Your check-concurrent2 is a much better way to use parallelism in your
 program -- create a few threads, each of which does a lot of work.

 I haven't analyzed the values you are computing in detail, but note that
 your program still has lots of inter-thread 'communication' because of the
 use of a common atom in your main-function.  If you can get the correct
 final answer by having each thread calculate independent values, or
 collections of values, and then somehow combining them together when they
 are all finished with a bit of quick-running sequential code, that might
 give you even better parallel speedup than check-concurrent2.


I display immediately found worse values and those are dependent on what
is found in the other t
hreads, but I will 
think about it. I am certainly impressed by the result: less as 10%
overhead.

I do not think that the inter-thread communication is a real problem,
because when I calculate it for ten time as much values it takes 309
seconds. That is almost exactly ten times as much time, so this
communication is (in this case) not a bottleneck.



 The use of asterisks at beginning and end of a symbol name is
 traditionally used on Clojure (and Common Lisp, from whence this tradition
 came) if the var is dynamically bound, meaning different threads typically
 do things like (binding [*dynamic-var* value-to-use-in-my-thread] code
 here).  There is no need for that in your program, and leaving off the
 asterisks (or earmuffs) is common practice.


So my code is not to bad? :-D




 For the explanation of the 1-minute delay, see the end of the last example
 on ClojureDocs for the future function:

 http://clojuredocs.org/clojure_core/clojure.core/future


I added (shutdown-agents) and the delay is gone.


On Thu, Apr 10, 2014 at 4:35 PM, Cecil Westerhof cldwester...@gmail.comwrote:

 2014-04-10 16:45 GMT+02:00 Andy Fingerhut andy.finger...@gmail.com:

 Forcing small bits of computation to be done in parallel using the tools
 Clojure and the JVM have at hand, e.g. pmap, future, etc., which rely on
 creating JVM Thread objects, tends to slow things down rather than speed
 things up, because the extra overhead of creating threads and waiting for
 them to finish is higher than the cost of sequentially doing the small bits
 of computation.

 If you want to force parallelism in your example anyway, to compare the
 most-likely-slower-performance against what you have now, you can try this:

 (let [val (Math/sqrt i)
a1 (future (Math/pow val 2))
a2 (future (* val val))
diff (Math/abs (- @a1 @a2))]


 The first form of concurrency was very bad indeed. I attached the script
 I made. (With the first form of concurrency disabled.) The sequential
 version takes between 1:52 and 1:56 with 18% CPU.

 The first form of concurrency took 2 hours and 45 minutes with 26% CPU.
 That is about 87 times as long, so very bad indeed. A future seems to be
 very expensive.

 The second form of concurrency takes around 31 seconds with 57% CPU. So
 about 3.7 times as fast. So that is a good improvement. The output is
 not complete the same, but that is not important in this case.

 By the way: is this the right way to write Clojure code? Especially: are
 the names max-diff and max-factor correct, or should the names be called
 different? For example: *max-fiff*.

 I call the script with:
 date +%T ; clojure ~/Clojure/check-power.clj ; date +%T

 This gives:
 00:52:10
 00:52:11: Start sequential
 00:52:11: Different for  838 (1.136868e-13, 1.356645e-16)
 00:52:11: Different for 3352 (4.547474e-13, 1.356645e-16)
 00:52:11: Different for 5343 (9.094947e-13, 1.702217e-16)
 00:52:11: Different for 9470 (1.818989e-12, 1.920791e-16)
 00:52:11: Different for19922 (3.637979e-12, 1.826111e-16)
 00:52:11: Different for33757 (7.275958e-12, 2.155392e-16)
 00:52:11: Different for65830 (1.455192e-11, 2.210529e-16)
 00:52:11: Different for   132323 (2.910383e-11, 2.199454e-16)
 00:52:11: Different for   263320 (5.820766e-11, 2.210529e-16)
 00:52:12: Different for   524523 (1.164153e-10, 2.219451e-16)
 00:52:12: Different for  1052879 (2.328306e-10, 2.211371e-16)
 00:52:12: Different for  2097255 (4.656613e-10, 2.220337e-16)
 00:52:12: Different for  4194573 (9.313226e-10, 2.220304e-16)
 00:52:12: Different for  8389020 (1.862645e-09, 2.220337e-16)
 00:52:13: Different for 1681 (3.725290e-09, 2.220371e-16)
 00:52:16: Different for 33554486 (7.450581e-09, 2.220442e-16)
 00:52:19: Different for 67110098 (1.490116e-08, 2.220405e-16)
 00:52:27: Different for134217944 (2.980232e-08, 2.220442e-16)
 00:52:42: Different for268436271 (5.960464e-08, 2.220439e-16)
 00:53:13: Different for536871776 (1.192093e-07, 2.220442e-16)
 

Re: [ANN] Zengarden. A Clojure library for generating CSS

2014-04-11 Thread Dave Sann
ok, I understand now. thx D

On Friday, 11 April 2014 12:16:02 UTC+10, frye wrote:

 I actually did take Joel up on his offer. But my feature requests are on 
 the back burner for the moment. 

 I happen to be building a product, that needs what Zengarden provides. 
 Mainly authoring gnarly things like @import, @media queries, pseudo 
 classes, etc, *declaratively, from edn*. That was the main impetus for 
 this tool. I tried, and couldn't get that working with garden. You have to 
 drop down to a repl to generate @import and @media queries. 

 So while I personally need these things, I'm also happy to fold those 
 features, back into garden. I'd actually prefer that, so we can have all of 
 these features in one place. 


 Tim Washington 
 Interruptsoftware.com http://interruptsoftware.com 
  

 On Thu, Apr 10, 2014 at 9:09 PM, Dave Sann dave...@gmail.comjavascript:
  wrote:

 what is different from what Joel already did?

 I think Joel was asking for input to help develop garden further it would 
 be great to see efforts go into one thing - unless you have really 
 divergent ideas

 Dave


 On Friday, 11 April 2014 01:07:47 UTC+10, frye wrote:

 Zengarden is a riff on Joel Holdbrooks' excellent 
 gardenhttps://github.com/noprompt/gardenlibrary. Zengarden is a simple 
 tool for generating CSS in Clojure. The goal 
 is to cover most of 
 CSS3https://developer.mozilla.org/en-US/docs/Web/CSS/CSS3. 
 The spirit of the library is to have declarative syntax, and be 
 controllable from edn. Github https://github.com/twashing/zengarden
  and Clojars https://clojars.org/zengarden resources are in the 
 expected locations. 

 This is an alpha release, so there's a lot of TODOs, and stuff that I 
 haven't thought of. I've just built it for my own use case(s). When that 
 happens, you can *i)* input raw CSS *ii)* send me feature requests or 
 *iii)* send me a pull request. These are some things you get out of the 
 box. 

- nesting syntax
- declarative, controllable from edn 
- @import https://developer.mozilla.org/en-US/docs/Web/CSS/@import
 calls 
- @media https://developer.mozilla.org/en-US/docs/Web/CSS/@media
 queries 
- namespaceshttps://developer.mozilla.org/en-US/docs/Web/CSS/@namespace
 
- pass in raw CSS 


 I'm in the process of doing these other things. Pass in raw CSS, in lieu 
 of.

- pretty-printed or compressed output 
- inlined styling (for style attributes)
- selectors (incl. *i.* attribute 
 selectorshttp://dev.w3.org/csswg/selectors3/#attribute-selectors(ex: 
 div[foo^=bar]) 
*ii.* combinators http://dev.w3.org/csswg/selectors3/#combinators 
*iii.* parent selectors )
 - pseudo-elements (incl. pseudo-element functions (ex: 
div:lang(fr)))
- @charsethttps://developer.mozilla.org/en-US/docs/Web/CSS/@charset, 
@supportshttps://developer.mozilla.org/en-US/docs/Web/CSS/@supports, 
( @page https://developer.mozilla.org/en-US/docs/Web/CSS/@page, 
@documenthttps://developer.mozilla.org/en-US/docs/Web/CSS/@document, 

 @font-facehttps://developer.mozilla.org/en-US/docs/Web/CSS/@font-faceand 
@keyframeshttps://developer.mozilla.org/en-US/docs/Web/CSS/@keyframes, 
not implemented; most are still experimental ) 


 Please note that.

- Zengarden makes no attempt to validate your CSS. it just knows how 
to handle a string pattern
- Ensure to escape all quotations in a string 
- CSS Object Model http://dev.w3.org/csswg/cssom/ (ex: 

 CSSImportRulehttp://dev.w3.org/csswg/cssom/#the-cssimportrule-interface, 
CSSMediaRulehttp://dev.w3.org/csswg/cssom/#the-cssmediarule-interface) 
is not implemented. I'll wait until the need arises.  


 These are some scss http://sass-lang.com/ features that look 
 interesting. 

- variables 
- partials
- mixins
- operators  
- inheritance  

 But as we are in Clojure, I don't want to pull in sass idioms wholesale. 
 So I think garden has the right idea in that respect. 

- garden declarations 
- garden units 
- garden color  
- garden arithmetic  


 I'll wait for the need to arise, before wasting too much time or energy 
 in any direction. Feedback is welcome. 


 Tim Washington 
 Interruptsoftware.com http://interruptsoftware.com 



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


Re: Advice for building backend REST services from scratch using clojure

2014-04-11 Thread Colin Yates
As others have said - a more focused question would help.

Our back end runs on ring + compojure using https://github.com/jkk/honeysql 
for querying and straight https://github.com/clojure/java.jdbc for writes. 
 We use https://github.com/marick/Midje/wiki rather than clojure.test 
and https://github.com/gdeer81/marginalia for documentation.

This is the first major Clojure app, so lots of lessons have been learnt. 
 Things I wish I knew:

   - read the ring spec - it is all just a map, phenomenally powerful.  Now 
   read it again
   - consider using https://github.com/zcaudate/lein-midje-doc as well 
   as/instead of marginalia
   - consider using https://github.com/jaycfields/expectations instead of 
   midje.  Midje is fantastic, but expectations, particularly the 'diffing' 
   looks like a real win
   - consider using something like https://github.com/prismatic/schema to 
   document your API from day one.
   - you can fight it as hard as you like but you will eventually end up 
   using emacs, clojure-mode, cider, paredit and magit and then wonder how you 
   ever lived without it, but not without spending at least a month or two 
   cursing anything to do with emacs :).

Just my random, off the cuff thoughts.  Hope they help.

On Thursday, April 10, 2014 3:13:19 PM UTC+1, Kashyap CK wrote:

 Hi,
 I have the opportunity to build a set of services from scratch. I plan to 
 use clojure for this.
 I'd like to experiment with options available out there - options such as 
 - what webserver, what database etc. I'd like it very much if you could 
 share some of your experiences in this and possibly some pitfalls to avoid.
 Regards,
 Kashyap


-- 
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: Real World Example

2014-04-11 Thread Alan Moore


 I'm building a fairly large real-world system called Clortex [1], which is 
 a rewrite of the Numenta Platform for Intelligent Computing (NuPIC) [2]. As 
 it's a greenfield project, I've chosen to use Clojure components all the 
 way through instead of fitting in with Java-based or .Net-based frameworks. 
 There are good reasons why you should do this if you can, but obviously 
 that doesn't help you directly with your question.


[off topic]

Wow... good thing I read your post... I was just about to do the same thing 
having followed the development of HTM for some time now and finding their 
reference implementation to be somewhat convoluted. I thought Clojure would 
be a better language for it... TBD.

Let me know if/how I can help.

Alan

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


Re: Using parallellisation

2014-04-11 Thread atucker
I haven't tried it, but for parallelisation it's sometimes worth starting 
from more array-oriented code, e.g.

(defn max-diff [check-until]
  (let [val (map #(Math/sqrt %) (range 1 check-until))]
(reduce max (map #(Math/abs (- %1 %2)) (map #(Math/pow % 2) val) (map 
#(* % %) val)


On Friday, 11 April 2014 07:43:44 UTC+1, Cecil Westerhof wrote:

 2014-04-11 3:10 GMT+02:00 Andy Fingerhut andy.fi...@gmail.comjavascript:
 :

 Your check-concurrent2 is a much better way to use parallelism in your 
 program -- create a few threads, each of which does a lot of work.

 I haven't analyzed the values you are computing in detail, but note that 
 your program still has lots of inter-thread 'communication' because of the 
 use of a common atom in your main-function.  If you can get the correct 
 final answer by having each thread calculate independent values, or 
 collections of values, and then somehow combining them together when they 
 are all finished with a bit of quick-running sequential code, that might 
 give you even better parallel speedup than check-concurrent2.


 I display immediately found worse values and those are dependent on what 
 is found in the other t
 hreads, but I will 
 think about it. I am certainly impressed by the result: less as 10% 
 overhead.

 I do not think that the inter-thread communication is a real problem, 
 because when I calculate it for ten time as much values it takes 309 
 seconds. That is almost exactly ten times as much time, so this 
 communication is (in this case) not a bottleneck.

  

 The use of asterisks at beginning and end of a symbol name is 
 traditionally used on Clojure (and Common Lisp, from whence this tradition 
 came) if the var is dynamically bound, meaning different threads typically 
 do things like (binding [*dynamic-var* value-to-use-in-my-thread] code 
 here).  There is no need for that in your program, and leaving off the 
 asterisks (or earmuffs) is common practice.


 So my code is not to bad? :-D

  

  For the explanation of the 1-minute delay, see the end of the last 
 example on ClojureDocs for the future function:

 http://clojuredocs.org/clojure_core/clojure.core/future


 I added (shutdown-agents) and the delay is gone.


 On Thu, Apr 10, 2014 at 4:35 PM, Cecil Westerhof 
 cldwes...@gmail.comjavascript:
  wrote:

 2014-04-10 16:45 GMT+02:00 Andy Fingerhut andy.fi...@gmail.comjavascript:
 :

 Forcing small bits of computation to be done in parallel using the tools 
 Clojure and the JVM have at hand, e.g. pmap, future, etc., which rely on 
 creating JVM Thread objects, tends to slow things down rather than speed 
 things up, because the extra overhead of creating threads and waiting for 
 them to finish is higher than the cost of sequentially doing the small 
 bits 
 of computation.

 If you want to force parallelism in your example anyway, to compare the 
 most-likely-slower-performance against what you have now, you can try this:

 (let [val (Math/sqrt i)
a1 (future (Math/pow val 2))
a2 (future (* val val))
diff (Math/abs (- @a1 @a2))]


 The first form of concurrency was very bad indeed. I attached the script
 I made. (With the first form of concurrency disabled.) The sequential
 version takes between 1:52 and 1:56 with 18% CPU.

 The first form of concurrency took 2 hours and 45 minutes with 26% CPU.
 That is about 87 times as long, so very bad indeed. A future seems to be
 very expensive.

 The second form of concurrency takes around 31 seconds with 57% CPU. So
 about 3.7 times as fast. So that is a good improvement. The output is
 not complete the same, but that is not important in this case.

 By the way: is this the right way to write Clojure code? Especially: are
 the names max-diff and max-factor correct, or should the names be called
 different? For example: *max-fiff*.

 I call the script with:
 date +%T ; clojure ~/Clojure/check-power.clj ; date +%T

 This gives:
 00:52:10
 00:52:11: Start sequential
 00:52:11: Different for  838 (1.136868e-13, 1.356645e-16)
 00:52:11: Different for 3352 (4.547474e-13, 1.356645e-16)
 00:52:11: Different for 5343 (9.094947e-13, 1.702217e-16)
 00:52:11: Different for 9470 (1.818989e-12, 1.920791e-16)
 00:52:11: Different for19922 (3.637979e-12, 1.826111e-16)
 00:52:11: Different for33757 (7.275958e-12, 2.155392e-16)
 00:52:11: Different for65830 (1.455192e-11, 2.210529e-16)
 00:52:11: Different for   132323 (2.910383e-11, 2.199454e-16)
 00:52:11: Different for   263320 (5.820766e-11, 2.210529e-16)
 00:52:12: Different for   524523 (1.164153e-10, 2.219451e-16)
 00:52:12: Different for  1052879 (2.328306e-10, 2.211371e-16)
 00:52:12: Different for  2097255 (4.656613e-10, 2.220337e-16)
 00:52:12: Different for  4194573 (9.313226e-10, 2.220304e-16)
 00:52:12: Different for  8389020 (1.862645e-09, 2.220337e-16)
 

Re: Real World Example

2014-04-11 Thread Fergal Byrne
Hi Alan,

Thanks for your interest - everywhere I mention this in the Clojure world I
get the same reaction! This is one of the reasons why I settled on Clojure
a couple of months back (Erlang and Elixir were also good choices, but the
Clojure movement has so much energy it was a no-brainer).

I'm in the middle of developing the key algorithms for Clortex, and
exploring a number of approaches at the same time, so the code is a bit of
a tangle in places right now. Once it's a little more stable I'll make it
public.

In the meantime, if you're interested (and know HTM/CLA to some extent),
please send me your github handle offlist and I'll add you as a contributor.

Regards,

Fergal


On Fri, Apr 11, 2014 at 10:03 AM, Alan Moore kahunamo...@gmail.com wrote:

 I'm building a fairly large real-world system called Clortex [1], which is
 a rewrite of the Numenta Platform for Intelligent Computing (NuPIC) [2]. As
 it's a greenfield project, I've chosen to use Clojure components all the
 way through instead of fitting in with Java-based or .Net-based frameworks.
 There are good reasons why you should do this if you can, but obviously
 that doesn't help you directly with your question.


 [off topic]

 Wow... good thing I read your post... I was just about to do the same
 thing having followed the development of HTM for some time now and finding
 their reference implementation to be somewhat convoluted. I thought Clojure
 would be a better language for it... TBD.

 Let me know if/how I can help.

 Alan

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




-- 

Fergal Byrne, Brenter IT

Author, Real Machine Intelligence with Clortex and NuPIC
https://leanpub.com/realsmartmachines

http://www.examsupport.iehttp://inbits.com - Better Living through
Thoughtful Technology
http://ie.linkedin.com/in/fergbyrne/
https://github.com/fergalbyrne

e:fergalbyrnedub...@gmail.com t:+353 83 4214179
Formerly of Adnet edi...@adnet.ie http://www.adnet.ie

-- 
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: Advice for building backend REST services from scratch using clojure

2014-04-11 Thread Colin Fleming

 you can fight it as hard as you like but you will eventually end up using
 emacs, clojure-mode, cider, paredit and magit and then wonder how you ever
 lived without it, but not without spending at least a month or two cursing
 anything to do with emacs :).


As the developer of Cursive, I'd like to politely disagree with this point.
I think that Cursive provides a very competitive feature set but without
the swearing :-). Of course I'm totally biased, so take with a grain of
salt, but I think particularly for Clojure newbies it's worth a look -
learning Emacs at the same time as Clojure can be a recipe for frustration.

Of course, it doesn't have to be Cursive, there are other options in case
Emacs gives you hives.


On 11 April 2014 20:17, Colin Yates colin.ya...@gmail.com wrote:

 As others have said - a more focused question would help.

 Our back end runs on ring + compojure using
 https://github.com/jkk/honeysql for querying and straight
 https://github.com/clojure/java.jdbc for writes.  We use
 https://github.com/marick/Midje/wiki rather than clojure.test and
 https://github.com/gdeer81/marginalia for documentation.

 This is the first major Clojure app, so lots of lessons have been learnt.
  Things I wish I knew:

- read the ring spec - it is all just a map, phenomenally powerful.
 Now read it again
- consider using https://github.com/zcaudate/lein-midje-doc as well
as/instead of marginalia
- consider using https://github.com/jaycfields/expectations instead of
midje.  Midje is fantastic, but expectations, particularly the 'diffing'
looks like a real win
- consider using something like https://github.com/prismatic/schema to
document your API from day one.
- you can fight it as hard as you like but you will eventually end up
using emacs, clojure-mode, cider, paredit and magit and then wonder how you
ever lived without it, but not without spending at least a month or two
cursing anything to do with emacs :).

 Just my random, off the cuff thoughts.  Hope they help.

 On Thursday, April 10, 2014 3:13:19 PM UTC+1, Kashyap CK wrote:

 Hi,
 I have the opportunity to build a set of services from scratch. I plan to
 use clojure for this.
 I'd like to experiment with options available out there - options such as
 - what webserver, what database etc. I'd like it very much if you could
 share some of your experiences in this and possibly some pitfalls to avoid.
 Regards,
 Kashyap

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


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


Re: Advice for building backend REST services from scratch using clojure

2014-04-11 Thread C K Kashyap
Just for the record ... I am an emacs fan :)
Had been a vim power user for a long time but switched to emacs after the
fp bug bit me.
Regards,
Kashyap


On Fri, Apr 11, 2014 at 2:50 PM, Colin Fleming
colin.mailingl...@gmail.comwrote:

 you can fight it as hard as you like but you will eventually end up using
 emacs, clojure-mode, cider, paredit and magit and then wonder how you ever
 lived without it, but not without spending at least a month or two cursing
 anything to do with emacs :).


 As the developer of Cursive, I'd like to politely disagree with this
 point. I think that Cursive provides a very competitive feature set but
 without the swearing :-). Of course I'm totally biased, so take with a
 grain of salt, but I think particularly for Clojure newbies it's worth a
 look - learning Emacs at the same time as Clojure can be a recipe for
 frustration.

 Of course, it doesn't have to be Cursive, there are other options in case
 Emacs gives you hives.


 On 11 April 2014 20:17, Colin Yates colin.ya...@gmail.com wrote:

 As others have said - a more focused question would help.

 Our back end runs on ring + compojure using
 https://github.com/jkk/honeysql for querying and straight
 https://github.com/clojure/java.jdbc for writes.  We use
 https://github.com/marick/Midje/wiki rather than clojure.test and
 https://github.com/gdeer81/marginalia for documentation.

 This is the first major Clojure app, so lots of lessons have been learnt.
  Things I wish I knew:

- read the ring spec - it is all just a map, phenomenally powerful.
 Now read it again
- consider using https://github.com/zcaudate/lein-midje-doc as well
as/instead of marginalia
- consider using https://github.com/jaycfields/expectations instead
of midje.  Midje is fantastic, but expectations, particularly the 
 'diffing'
looks like a real win
- consider using something like https://github.com/prismatic/schemato 
 document your API from day one.
- you can fight it as hard as you like but you will eventually end up
using emacs, clojure-mode, cider, paredit and magit and then wonder how 
 you
ever lived without it, but not without spending at least a month or two
cursing anything to do with emacs :).

 Just my random, off the cuff thoughts.  Hope they help.

 On Thursday, April 10, 2014 3:13:19 PM UTC+1, Kashyap CK wrote:

 Hi,
 I have the opportunity to build a set of services from scratch. I plan
 to use clojure for this.
 I'd like to experiment with options available out there - options such
 as - what webserver, what database etc. I'd like it very much if you could
 share some of your experiences in this and possibly some pitfalls to avoid.
 Regards,
 Kashyap

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


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


-- 
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: Advice for building backend REST services from scratch using clojure

2014-04-11 Thread Colin Fleming
Ah, ok - if you're already using Emacs then have at it :-)


On 11 April 2014 21:32, C K Kashyap ckkash...@gmail.com wrote:

 Just for the record ... I am an emacs fan :)
 Had been a vim power user for a long time but switched to emacs after the
 fp bug bit me.
 Regards,
 Kashyap


 On Fri, Apr 11, 2014 at 2:50 PM, Colin Fleming 
 colin.mailingl...@gmail.com wrote:

 you can fight it as hard as you like but you will eventually end up using
 emacs, clojure-mode, cider, paredit and magit and then wonder how you ever
 lived without it, but not without spending at least a month or two cursing
 anything to do with emacs :).


 As the developer of Cursive, I'd like to politely disagree with this
 point. I think that Cursive provides a very competitive feature set but
 without the swearing :-). Of course I'm totally biased, so take with a
 grain of salt, but I think particularly for Clojure newbies it's worth a
 look - learning Emacs at the same time as Clojure can be a recipe for
 frustration.

 Of course, it doesn't have to be Cursive, there are other options in case
 Emacs gives you hives.


 On 11 April 2014 20:17, Colin Yates colin.ya...@gmail.com wrote:

 As others have said - a more focused question would help.

 Our back end runs on ring + compojure using
 https://github.com/jkk/honeysql for querying and straight
 https://github.com/clojure/java.jdbc for writes.  We use
 https://github.com/marick/Midje/wiki rather than clojure.test and
 https://github.com/gdeer81/marginalia for documentation.

 This is the first major Clojure app, so lots of lessons have been
 learnt.  Things I wish I knew:

- read the ring spec - it is all just a map, phenomenally powerful.
 Now read it again
- consider using https://github.com/zcaudate/lein-midje-doc as well
as/instead of marginalia
- consider using https://github.com/jaycfields/expectations instead
of midje.  Midje is fantastic, but expectations, particularly the 
 'diffing'
looks like a real win
- consider using something like https://github.com/prismatic/schemato 
 document your API from day one.
- you can fight it as hard as you like but you will eventually end
up using emacs, clojure-mode, cider, paredit and magit and then wonder 
 how
you ever lived without it, but not without spending at least a month or 
 two
cursing anything to do with emacs :).

 Just my random, off the cuff thoughts.  Hope they help.

 On Thursday, April 10, 2014 3:13:19 PM UTC+1, Kashyap CK wrote:

 Hi,
 I have the opportunity to build a set of services from scratch. I plan
 to use clojure for this.
 I'd like to experiment with options available out there - options such
 as - what webserver, what database etc. I'd like it very much if you could
 share some of your experiences in this and possibly some pitfalls to avoid.
 Regards,
 Kashyap

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


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


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

Re: Advice for building backend REST services from scratch using clojure

2014-04-11 Thread Colin Yates
Colin - you are right - I shouldn't throw out such inflammatory marks, 
particularly when they do a disservice to the excellent work done in 
Cursive Clojure, Lighttable and Counter Clockwise (and others that I am not 
aware off).

For me personally, after years of using Eclipse then IntelliJ and (to a 
much lesser degree) Sublime I am forcing my team to use emacs.  And yes, 
forcing is the word as they are utterly sold on sublime and really don't 
like me much at the moment :).

It is the classical short term/long term win, and emacs is worth the 
investment for us.  But it absolutely is an investment.

Disclaimer - I haven't looked at any of the other editors for months if not 
years.

On Friday, April 11, 2014 10:20:37 AM UTC+1, Colin Fleming wrote:

 you can fight it as hard as you like but you will eventually end up using 
 emacs, clojure-mode, cider, paredit and magit and then wonder how you ever 
 lived without it, but not without spending at least a month or two cursing 
 anything to do with emacs :).


 As the developer of Cursive, I'd like to politely disagree with this 
 point. I think that Cursive provides a very competitive feature set but 
 without the swearing :-). Of course I'm totally biased, so take with a 
 grain of salt, but I think particularly for Clojure newbies it's worth a 
 look - learning Emacs at the same time as Clojure can be a recipe for 
 frustration. 

 Of course, it doesn't have to be Cursive, there are other options in case 
 Emacs gives you hives.


 On 11 April 2014 20:17, Colin Yates colin...@gmail.com javascript:wrote:

 As others have said - a more focused question would help.

 Our back end runs on ring + compojure using 
 https://github.com/jkk/honeysql for querying and straight 
 https://github.com/clojure/java.jdbc for writes.  We use 
 https://github.com/marick/Midje/wiki rather than clojure.test and 
 https://github.com/gdeer81/marginalia for documentation.

 This is the first major Clojure app, so lots of lessons have been learnt. 
  Things I wish I knew:

- read the ring spec - it is all just a map, phenomenally powerful. 
 Now read it again
- consider using https://github.com/zcaudate/lein-midje-doc as well 
as/instead of marginalia
- consider using https://github.com/jaycfields/expectations instead 
of midje.  Midje is fantastic, but expectations, particularly the 
 'diffing' 
looks like a real win 
- consider using something like https://github.com/prismatic/schemato 
 document your API from day one.
- you can fight it as hard as you like but you will eventually end up 
using emacs, clojure-mode, cider, paredit and magit and then wonder how 
 you 
ever lived without it, but not without spending at least a month or two 
cursing anything to do with emacs :). 

 Just my random, off the cuff thoughts.  Hope they help.

 On Thursday, April 10, 2014 3:13:19 PM UTC+1, Kashyap CK wrote:

 Hi,
 I have the opportunity to build a set of services from scratch. I plan 
 to use clojure for this.
 I'd like to experiment with options available out there - options such 
 as - what webserver, what database etc. I'd like it very much if you could 
 share some of your experiences in this and possibly some pitfalls to avoid.
 Regards,
 Kashyap

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




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


Re: Advice for building backend REST services from scratch using clojure

2014-04-11 Thread rossputin
My two cents...

Ring/Compojure, Friend, Datomic.

I've had these in production since 2012, no issues really and its still fun 
to hack on them.

On Thursday, 10 April 2014 15:13:19 UTC+1, Kashyap CK wrote:

 Hi,
 I have the opportunity to build a set of services from scratch. I plan to 
 use clojure for this.
 I'd like to experiment with options available out there - options such as 
 - what webserver, what database etc. I'd like it very much if you could 
 share some of your experiences in this and possibly some pitfalls to avoid.
 Regards,
 Kashyap


-- 
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: Advice for building backend REST services from scratch using clojure

2014-04-11 Thread Colin Fleming
No worries, I didn't think what you wrote was inflammatory and it's
undeniable that Emacs has the largest mindshare in the Clojure world. But
the alternatives are getting better and better and I think I could make a
reasonable case that Cursive is better than Emacs for some circumstances
and/or projects. I personally didn't like the initial versions of
LightTable (it felt like a bit of a one-trick pony and the trick didn't
really work for me) but the guys working on it are smart and I'm sure it's
getting a lot of plugin love now it's open source, so I'm sure that'll be a
real contender soon if it isn't already.

Emacs clearly works for the OP so there's no issue there, but I think it's
less and less a foregone conclusion that everyone will end up there. I
personally wouldn't work for you if you forced me to use it, but that's
just me :-)


On 11 April 2014 22:04, Colin Yates colin.ya...@gmail.com wrote:

 Colin - you are right - I shouldn't throw out such inflammatory marks,
 particularly when they do a disservice to the excellent work done in
 Cursive Clojure, Lighttable and Counter Clockwise (and others that I am not
 aware off).

 For me personally, after years of using Eclipse then IntelliJ and (to a
 much lesser degree) Sublime I am forcing my team to use emacs.  And yes,
 forcing is the word as they are utterly sold on sublime and really don't
 like me much at the moment :).

 It is the classical short term/long term win, and emacs is worth the
 investment for us.  But it absolutely is an investment.

 Disclaimer - I haven't looked at any of the other editors for months if
 not years.


 On Friday, April 11, 2014 10:20:37 AM UTC+1, Colin Fleming wrote:

 you can fight it as hard as you like but you will eventually end up using
 emacs, clojure-mode, cider, paredit and magit and then wonder how you ever
 lived without it, but not without spending at least a month or two cursing
 anything to do with emacs :).


 As the developer of Cursive, I'd like to politely disagree with this
 point. I think that Cursive provides a very competitive feature set but
 without the swearing :-). Of course I'm totally biased, so take with a
 grain of salt, but I think particularly for Clojure newbies it's worth a
 look - learning Emacs at the same time as Clojure can be a recipe for
 frustration.

 Of course, it doesn't have to be Cursive, there are other options in case
 Emacs gives you hives.


 On 11 April 2014 20:17, Colin Yates colin...@gmail.com wrote:

 As others have said - a more focused question would help.

 Our back end runs on ring + compojure using https://github.com/jkk/
 honeysql for querying and straight https://github.com/clojure/java.jdbcfor 
 writes.  We use
 https://github.com/marick/Midje/wiki rather than clojure.test and
 https://github.com/gdeer81/marginalia for documentation.

 This is the first major Clojure app, so lots of lessons have been
 learnt.  Things I wish I knew:

- read the ring spec - it is all just a map, phenomenally powerful.
 Now read it again
- consider using https://github.com/zcaudate/lein-midje-doc as well
as/instead of marginalia
- consider using https://github.com/jaycfields/expectations instead
of midje.  Midje is fantastic, but expectations, particularly the 
 'diffing'
looks like a real win
- consider using something like https://github.com/prismatic/schemato 
 document your API from day one.
- you can fight it as hard as you like but you will eventually end
up using emacs, clojure-mode, cider, paredit and magit and then wonder 
 how
you ever lived without it, but not without spending at least a month or 
 two
cursing anything to do with emacs :).

 Just my random, off the cuff thoughts.  Hope they help.

 On Thursday, April 10, 2014 3:13:19 PM UTC+1, Kashyap CK wrote:

 Hi,
 I have the opportunity to build a set of services from scratch. I plan
 to use clojure for this.
 I'd like to experiment with options available out there - options such
 as - what webserver, what database etc. I'd like it very much if you could
 share some of your experiences in this and possibly some pitfalls to avoid.
 Regards,
 Kashyap

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


  --
 You received this message because you are subscribed to the Google
 Groups Clojure group.
 To post to this group, send email to 

Is it possible to give an atomic message?

2014-04-11 Thread Cecil Westerhof
I have the following functions in my concurrent program:
(def time-format (new java.text.SimpleDateFormat HH:mm:ss))

(defn now []
  (new java.util.GregorianCalendar))

(defn give-message [message]
  (println (format %s: %s (. time-format format (. (now) getTime))
message)))


But sometimes a new message from a different thread is displayed, before
the current message is ready:
10:34:57: Different for  4194573 (9.313226e-10, 2.220304e-16)10:34:57:
Different for  4198042 (9.313226e-10, 2.218469e-16)

10:34:57: Different for  8389473 (1.862645e-09, 2.220217e-16)


Is there a way to make give-message atomic, so it would be displayed as:
10:34:57: Different for  4194573 (9.313226e-10, 2.220304e-16)
10:34:57: Different for  4198042 (9.313226e-10, 2.218469e-16)
10:34:57: Different for  8389473 (1.862645e-09, 2.220217e-16)


I attached the complete program. Any hints to implement it better are
appreciated.

-- 
Cecil Westerhof

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


check-power.clj
Description: Binary data


Re: Is it possible to give an atomic message?

2014-04-11 Thread Alex Robbins
You could do this with core.async. Make a channel that takes messages, and
then run a go loop that pulls messages off the message channel and prints
them. Then only one part of the program is ever printing. Any other part
that wants to print a message can push onto the channel.




On Fri, Apr 11, 2014 at 8:35 AM, Cecil Westerhof cldwester...@gmail.comwrote:

 I have the following functions in my concurrent program:
 (def time-format (new java.text.SimpleDateFormat HH:mm:ss))

 (defn now []
   (new java.util.GregorianCalendar))

 (defn give-message [message]
   (println (format %s: %s (. time-format format (. (now) getTime))
 message)))


 But sometimes a new message from a different thread is displayed, before
 the current message is ready:
 10:34:57: Different for  4194573 (9.313226e-10, 2.220304e-16)10:34:57:
 Different for  4198042 (9.313226e-10, 2.218469e-16)

 10:34:57: Different for  8389473 (1.862645e-09, 2.220217e-16)


 Is there a way to make give-message atomic, so it would be displayed as:
 10:34:57: Different for  4194573 (9.313226e-10, 2.220304e-16)
 10:34:57: Different for  4198042 (9.313226e-10, 2.218469e-16)
 10:34:57: Different for  8389473 (1.862645e-09, 2.220217e-16)


 I attached the complete program. Any hints to implement it better are
 appreciated.

 --
 Cecil Westerhof

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


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


Re: Clojure + BDD + TDD + Pairing...

2014-04-11 Thread Tom George
Marcus,

I think the idea of working on a small project with fellow novices would be 
a great idea.

Tom

On Tuesday, October 29, 2013 11:43:54 PM UTC-4, Marcus Blankenship wrote:

 Hi Folks,

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

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

 Anyone interested?

 Best,
 Marcus


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


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


Re: Meta-eX - The Music of Code

2014-04-11 Thread Samuel Aaron

On 10 Apr 2014, at 03:18, Earl Jenkins ejenkins...@gmail.com wrote:

 Good stuff, all the hard work you've done in the field of live coding, yet no 
 mention of Meta-ex nor clojure in the Computer Music Journal which has a 
 whole issue dedicated to this subject  ;(

To be honest, Overtone was never targeted at academics. It was built for 
Clojure hackers to be able to use their programming skills to realise their 
musical ideas. As such, it's gained a lot of traction with progressional 
programmers.

I'm continuously amazed with what people are doing with Overtone - stretching 
it in incredible ways. However, I feel that the best is still yet to come. Now 
is a fantastic time to get involved...

Sam

---
http://sam.aaron.name

-- 
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: Is it possible to give an atomic message?

2014-04-11 Thread Alan Dipert
Hello,

Here's maybe the easiest way, with locking:

(defn give-message [message]
  (locking *out*
(println (format %s: %s (. time-format format (. (now) getTime)) 
message

Of course, locks can introduce their own problems, so maybe the next 
easiest way is with the combination of agent and send-off:

(def out (agent *out*))

(defn give-message [message]
  (send-off out
   #(binding [*out* %]
 (println (format %s: %s (. time-format format (. (now) getTime)) 
message))
 %)))

Like with a core.async approach, this gives you queue-wise execution of 
give-message requests.  Unlike with core.async, you don't need to manage 
your own consume/print thread.  Personally, I wouldn't go with core.async 
until I was working with multiple consumers or had the need to 'combine' 
resources.

Alan

On Friday, April 11, 2014 9:35:52 AM UTC-4, Cecil Westerhof wrote:

 I have the following functions in my concurrent program:
 (def time-format (new java.text.SimpleDateFormat HH:mm:ss))

 (defn now []
   (new java.util.GregorianCalendar))

 (defn give-message [message]
   (println (format %s: %s (. time-format format (. (now) getTime)) 
 message)))


 But sometimes a new message from a different thread is displayed, before 
 the current message is ready:
 10:34:57: Different for  4194573 (9.313226e-10, 2.220304e-16)10:34:57: 
 Different for  4198042 (9.313226e-10, 2.218469e-16)

 10:34:57: Different for  8389473 (1.862645e-09, 2.220217e-16)


 Is there a way to make give-message atomic, so it would be displayed as:
 10:34:57: Different for  4194573 (9.313226e-10, 2.220304e-16)
 10:34:57: Different for  4198042 (9.313226e-10, 2.218469e-16)
 10:34:57: Different for  8389473 (1.862645e-09, 2.220217e-16)


 I attached the complete program. Any hints to implement it better are 
 appreciated.

 -- 
 Cecil Westerhof 


-- 
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 + BDD + TDD + Pairing...

2014-04-11 Thread Timothy Washington
Hey Marcus,

If you have Google Calendars, you can use that, and invite people to edit a
particular calendar. It would start off as an honour system, so that people
don't trample on each others bookings. But as Tom George points out,
building such a booking tool, is a great project.

Otherwise, I'm sure there's also other calendar / booking tools out there.
I haven't tried basecamp in a while, but it's still popular. Others, feel
free to share :)


Tim Washington
Interruptsoftware.com http://interruptsoftware.com


On Thu, Apr 10, 2014 at 6:41 PM, Marcus Blankenship
mar...@creoagency.comwrote:

 Hi Tim, awesome news!.  I've had other folks today asking about it as
 well.

 Any idea how we could use a shared calendar to let people put down their
 availability, and then others can claim a spot to work with them?  Or,
 maybe that's a Clojure project we should work on!  ;-)

 But really, ideas accepted about what we could use, as I don't have any...



 On Apr 10, 2014, at 7:23 AM, Timothy Washington twash...@gmail.com
 wrote:

 I'm also keen. I'm on EST (GMT - 5). Saturdays and Sundays are good for
 me. But weekday evenings would also work.


 Tim Washington
 Interruptsoftware.com http://interruptsoftware.com/


 On Wed, Mar 26, 2014 at 4:51 PM, Brian Muhia iambrianmu...@gmail.comwrote:

 Hi Josh,
 I'm interested in pairing as well. I'm also based in GMT+3.

 Best,
 - B


 On Wednesday, 30 October 2013 10:23:58 UTC+3, Josh Kamau wrote:

 I can do it with you if we limit the hours to Saturday and sunday.

 I am a noob though i have 2 apps in production. (You can get alot done
 without knowing the whole of clojure)

 I am in GMT  +3

 Thanks.


 On Wed, Oct 30, 2013 at 6:43 AM, Marcus Blankenship 
 mar...@creoagency.com wrote:

 Hi Folks,

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

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

 Anyone interested?

 Best,
 Marcus


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


 Best,
 Marcus

   Marcus Blankenship
 \\\ Problem Solver, Linear Thinker
 \\\ 541.805.2736 \ @justzeros \ skype:marcuscreo


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


Re: Is it possible to give an atomic message?

2014-04-11 Thread Alex Vzorov
You could use a clojure agent http://clojure.org/agents, that would 
output your messages on a separate thread, one by one.

(def *logger* (agent 0))

(defn give-message [message]
  (send *logger*
(fn [_  [msg]] (println (format %s: %s (. time-format format (. 
(now) getTime)) msg)))
message))


On Friday, April 11, 2014 7:20:52 PM UTC+5:45, Cecil Westerhof wrote:

 I have the following functions in my concurrent program:
 (def time-format (new java.text.SimpleDateFormat HH:mm:ss))

 (defn now []
   (new java.util.GregorianCalendar))

 (defn give-message [message]
   (println (format %s: %s (. time-format format (. (now) getTime)) 
 message)))


 But sometimes a new message from a different thread is displayed, before 
 the current message is ready:
 10:34:57: Different for  4194573 (9.313226e-10, 2.220304e-16)10:34:57: 
 Different for  4198042 (9.313226e-10, 2.218469e-16)

 10:34:57: Different for  8389473 (1.862645e-09, 2.220217e-16)


 Is there a way to make give-message atomic, so it would be displayed as:
 10:34:57: Different for  4194573 (9.313226e-10, 2.220304e-16)
 10:34:57: Different for  4198042 (9.313226e-10, 2.218469e-16)
 10:34:57: Different for  8389473 (1.862645e-09, 2.220217e-16)


 I attached the complete program. Any hints to implement it better are 
 appreciated.

 -- 
 Cecil Westerhof 


-- 
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 + BDD + TDD + Pairing...

2014-04-11 Thread Andy Fingerhut
I haven't used it myself, but noted that Alex Miller used
http://ohours.orgfor allowing others to schedule meetings with him.

Andy


On Fri, Apr 11, 2014 at 9:08 AM, Timothy Washington twash...@gmail.comwrote:

 Hey Marcus,

 If you have Google Calendars, you can use that, and invite people to edit
 a particular calendar. It would start off as an honour system, so that
 people don't trample on each others bookings. But as Tom George points out,
 building such a booking tool, is a great project.

 Otherwise, I'm sure there's also other calendar / booking tools out there.
 I haven't tried basecamp in a while, but it's still popular. Others, feel
 free to share :)


 Tim Washington
 Interruptsoftware.com http://interruptsoftware.com


 On Thu, Apr 10, 2014 at 6:41 PM, Marcus Blankenship mar...@creoagency.com
  wrote:

 Hi Tim, awesome news!.  I've had other folks today asking about it as
 well.

 Any idea how we could use a shared calendar to let people put down their
 availability, and then others can claim a spot to work with them?  Or,
 maybe that's a Clojure project we should work on!  ;-)

 But really, ideas accepted about what we could use, as I don't have any...



 On Apr 10, 2014, at 7:23 AM, Timothy Washington twash...@gmail.com
 wrote:

 I'm also keen. I'm on EST (GMT - 5). Saturdays and Sundays are good for
 me. But weekday evenings would also work.


 Tim Washington
 Interruptsoftware.com http://interruptsoftware.com/


 On Wed, Mar 26, 2014 at 4:51 PM, Brian Muhia iambrianmu...@gmail.comwrote:

 Hi Josh,
 I'm interested in pairing as well. I'm also based in GMT+3.

 Best,
 - B


 On Wednesday, 30 October 2013 10:23:58 UTC+3, Josh Kamau wrote:

 I can do it with you if we limit the hours to Saturday and sunday.

 I am a noob though i have 2 apps in production. (You can get alot done
 without knowing the whole of clojure)

 I am in GMT  +3

 Thanks.


 On Wed, Oct 30, 2013 at 6:43 AM, Marcus Blankenship 
 mar...@creoagency.com wrote:

 Hi Folks,

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

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

 Anyone interested?

 Best,
 Marcus


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


 Best,
 Marcus

   Marcus Blankenship
 \\\ Problem Solver, Linear Thinker
 \\\ 541.805.2736 \ @justzeros \ skype:marcuscreo


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

2014-04-11 Thread Andrey Antukh
A JDBC library for clojure.

Released: 2014-04-06

Changes:

- Multiple connection pooling pluggable solutions: dbcp and c3p0 (every one
resides on its own package without hard dependencies on them).
- Set clojure 1.6 as default clojure version.
- Allow set isolation level for transaction.
- Allow set read-only transaction.
- Multiple bugfixes.
- Performance improvements.

Complete changelog:
https://raw.githubusercontent.com/niwibe/clj.jdbc/master/CHANGES.txt
Github: https://github.com/niwibe/clj.jdbc
Documentation: http://niwibe.github.io/clj.jdbc/

-- 
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 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 + BDD + TDD + Pairing...

2014-04-11 Thread Marcus Blankenship
I can't get my google calendar to allow others to add / change events.  If 
anyone else could set this up, it would be great!  Or, if you have ideas on how 
I can do this, contact me off-list and I'll work on it.


On Apr 11, 2014, at 9:38 AM, Andy Fingerhut andy.finger...@gmail.com wrote:

 I haven't used it myself, but noted that Alex Miller used http://ohours.org 
 for allowing others to schedule meetings with him.
 
 Andy
 
 
 On Fri, Apr 11, 2014 at 9:08 AM, Timothy Washington twash...@gmail.com 
 wrote:
 Hey Marcus, 
 
 If you have Google Calendars, you can use that, and invite people to edit a 
 particular calendar. It would start off as an honour system, so that people 
 don't trample on each others bookings. But as Tom George points out, building 
 such a booking tool, is a great project. 
 
 Otherwise, I'm sure there's also other calendar / booking tools out there. I 
 haven't tried basecamp in a while, but it's still popular. Others, feel free 
 to share :)
 
 
 Tim Washington 
 Interruptsoftware.com 
 
 
 On Thu, Apr 10, 2014 at 6:41 PM, Marcus Blankenship mar...@creoagency.com 
 wrote:
 Hi Tim, awesome news!.  I've had other folks today asking about it as well.  
 
 Any idea how we could use a shared calendar to let people put down their 
 availability, and then others can claim a spot to work with them?  Or, 
 maybe that's a Clojure project we should work on!  ;-)
 
 But really, ideas accepted about what we could use, as I don't have any...
 
 
 
 On Apr 10, 2014, at 7:23 AM, Timothy Washington twash...@gmail.com wrote:
 
 I'm also keen. I'm on EST (GMT - 5). Saturdays and Sundays are good for me. 
 But weekday evenings would also work. 
 
 
 Tim Washington 
 Interruptsoftware.com 
 
 
 On Wed, Mar 26, 2014 at 4:51 PM, Brian Muhia iambrianmu...@gmail.com wrote:
 Hi Josh,
 I'm interested in pairing as well. I'm also based in GMT+3.
 
 Best,
 - B
 
 
 On Wednesday, 30 October 2013 10:23:58 UTC+3, Josh Kamau wrote:
 I can do it with you if we limit the hours to Saturday and sunday.
 
 I am a noob though i have 2 apps in production. (You can get alot done 
 without knowing the whole of clojure)
 
 I am in GMT  +3
 
 Thanks. 
 
 
 On Wed, Oct 30, 2013 at 6:43 AM, Marcus Blankenship mar...@creoagency.com 
 wrote:
 Hi Folks,
 
 I'm a Clojure n00b, but am interested in finding another n00b who aspires to 
 learn Clojure, and do so using BDD / TDD practices through regular pairing 
 sessions.  I've found novice - novice pairing to be a great way to ramp up 
 on skills, but I don't live near anyone who I can pair with.  
 
 I'm thinking that doing 3 1-hour sessions a week, for a month, would give us 
 a nice start.  Obviously, this would be remote pairing via ScreenHero (or 
 some other tool).
 
 Anyone interested?
 
 Best,
 Marcus
 
 
 marcus blankenship
 \\\ Partner, Problem Solver, Linear Thinker
 \\\ 541.805.2736 \ @justzeros \ skype:marcuscreo
 
 
 Best,
 Marcus
 
 Marcus Blankenship
 \\\ Problem Solver, Linear Thinker
 \\\ 541.805.2736 \ @justzeros \ skype:marcuscreo
 
 
 -- 
 You received this message because you are subscribed to the Google
 Groups Clojure group.
 To post to this group, send email to clojure@googlegroups.com
 Note that posts from new members are moderated - please be patient with your 
 first post.
 To unsubscribe from this group, send email to
 clojure+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/clojure?hl=en
 --- 
 You received this message because you are subscribed to the Google Groups 
 Clojure group.
 To unsubscribe from this group and stop receiving emails from it, send an 
 email to clojure+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.
 
 
 -- 
 You received this message because you are subscribed to the Google
 Groups Clojure group.
 To post to this group, send email to clojure@googlegroups.com
 Note that posts from new members are moderated - please be patient with your 
 first post.
 To unsubscribe from this group, send email to
 clojure+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/clojure?hl=en
 --- 
 You received this message because you are subscribed to the Google Groups 
 Clojure group.
 To unsubscribe from this group and stop receiving emails from it, send an 
 email to clojure+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.

Best,
Marcus

Marcus Blankenship
\\\ Problem Solver, Linear Thinker
\\\ 541.805.2736 \ @justzeros \ skype:marcuscreo

-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received 

Re: Advice for building backend REST services from scratch using clojure

2014-04-11 Thread Erik Bakstad
You should take a look at 
Liberatorhttp://clojure-liberator.github.io/liberator/ for 
the REST services. We're using it at Ardoq http://ardoq.com to build our 
REST-APIs and we are very happy with it.

kl. 16:13:19 UTC+2 torsdag 10. april 2014 skrev Kashyap CK følgende:

 Hi,
 I have the opportunity to build a set of services from scratch. I plan to 
 use clojure for this.
 I'd like to experiment with options available out there - options such as 
 - what webserver, what database etc. I'd like it very much if you could 
 share some of your experiences in this and possibly some pitfalls to avoid.
 Regards,
 Kashyap


-- 
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: Uberjar woes

2014-04-11 Thread Josh Lehman
Tom, 

Not sure if you every figured this out, but I'm having the same issue. In 
my case, the error points to the Lifecycle protocol in 
https://github.com/stuartsierra/component
 (com/stuartsierra/component/Lifecycle). 

It's a pretty barebones configuration. 
https://gist.github.com/jalehman/10494205

On Thursday, February 27, 2014 11:49:38 AM UTC-8, Tom Connors wrote:

 Hi Everyone,
 I've been having trouble creating an uberjar of a project and I'm hoping 
 someone here can point me toward a solution.
 After cleaning out the target directory (with lein clean) and 
 preprocessing my cljx, I can run the project with no trouble using lein 
 repl and lein run. I can package up the project (lein with-profile prd 
 uberjar) and get the resultant jar files. After that, the trouble starts. 
 Running the jar (java -jar my-standalone.jar) fails with a 
 NoClassDefFoundError error, pointing at a protocol defined in 
 weaverjester's clout - 
 https://github.com/weavejester/cloutclout/core/Route. 
 I highly doubt clout actually has anything to do with the problem. After 
 creating the uberjar, I can no longer run the project with lein run or lein 
 repl - I get the same error, and I can't do anything with lein without 
 getting that error until I remove the target directory. 
 I've inspected the jar and can see that it contains clout, but just 
 clout/core.clj - no .class files. I edited clout's project.clj to include 
 :aot :all, packaged it into a jar, replaced the clout jar in my local maven 
 repo with that new jar, and re-packaged my project. At this point, when I 
 ran the jar, I got another NoClassDefFoundError, this time pointing at 
 another protocol, but this one from clojure.core: clojure/lang/ILookupHost.
 I've been having this problem with the latest leiningen (2.3.4) and 2.2.0. 
 I've been futzing with my project.clj for some time, but to no avail. Any 
 help greatly appreciated.
 -Tom


-- 
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: Helping newcomers get involved in Clojure projects

2014-04-11 Thread Erlis Vidal
Anyone doing something about this? I would like to start contributing to
some OSS it's the only chance I'll have to use clojure in something useful,
I don't have the privilege to use it at work but I really don't know where
to start.


On Wed, Jan 29, 2014 at 3:49 PM, Bridget bridget.hill...@gmail.com wrote:

 On Monday, January 27, 2014 9:35:17 AM UTC-5, Michael Klishin wrote:

 Bridget:

 Are there any other Clojure projects that are doing this?


 Some ClojureWerkz [1] projects do, and eventually all key ones will.

 1. http://clojurewerkz.org

 MK


 That's excellent. One thought is to create and publish a list of open
 source Clojure projects that tag newcomer issues to encourage involvement.
 I can create something new, but maybe it makes sense to do this  under an
 existing project. ClojureWerkz seems pretty close to that type of thing.
 Just a thought. You can contact me off-list if you're interested in talking
 about it.

 Bridget

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


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


Re: Helping newcomers get involved in Clojure projects

2014-04-11 Thread Marcus Blankenship
+1 to this concept. Also, I don't live near a ClojureBridge workshop, or user 
groups.  One thing I've been arranging is pair programming sessions, which may 
turn into something for helping folks meet each other and work on interesting 
stuff.  But, it's a different approach.

On Apr 11, 2014, at 1:07 PM, Erlis Vidal er...@erlisvidal.com wrote:

 Anyone doing something about this? I would like to start contributing to some 
 OSS it's the only chance I'll have to use clojure in something useful, I 
 don't have the privilege to use it at work but I really don't know where to 
 start. 
 
 
 On Wed, Jan 29, 2014 at 3:49 PM, Bridget bridget.hill...@gmail.com wrote:
 On Monday, January 27, 2014 9:35:17 AM UTC-5, Michael Klishin wrote:
 Bridget:
 Are there any other Clojure projects that are doing this?
 
 Some ClojureWerkz [1] projects do, and eventually all key ones will.
 
 1. http://clojurewerkz.org
 
 MK 
 
 That's excellent. One thought is to create and publish a list of open source 
 Clojure projects that tag newcomer issues to encourage involvement. I can 
 create something new, but maybe it makes sense to do this  under an existing 
 project. ClojureWerkz seems pretty close to that type of thing. Just a 
 thought. You can contact me off-list if you're interested in talking about it.
 
 Bridget 
 
 -- 
 -- 
 You received this message because you are subscribed to the Google
 Groups Clojure group.
 To post to this group, send email to clojure@googlegroups.com
 Note that posts from new members are moderated - please be patient with your 
 first post.
 To unsubscribe from this group, send email to
 clojure+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/clojure?hl=en
 --- 
 You received this message because you are subscribed to the Google Groups 
 Clojure group.
 To unsubscribe from this group and stop receiving emails from it, send an 
 email to clojure+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.
 
 
 -- 
 You received this message because you are subscribed to the Google
 Groups Clojure group.
 To post to this group, send email to clojure@googlegroups.com
 Note that posts from new members are moderated - please be patient with your 
 first post.
 To unsubscribe from this group, send email to
 clojure+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/clojure?hl=en
 --- 
 You received this message because you are subscribed to the Google Groups 
 Clojure group.
 To unsubscribe from this group and stop receiving emails from it, send an 
 email to clojure+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.

Best,
Marcus

Marcus Blankenship
\\\ Problem Solver, Linear Thinker
\\\ 541.805.2736 \ @justzeros \ skype:marcuscreo

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


Re: Uberjar woes

2014-04-11 Thread James Reeves
Clout doesn't depend on any protocols in Clojure. The only protocol it uses
is defined within the clout.core namespace itself.

Problems like this are often caused by compiled class files on your
classpath. Often they are in the target directory, which can be solved by a
lein clean. The :clean-non-project-files option being set to false in
Josh's configuration looks very suspicious!

I've also had problems with class files being accidentally included in the
jars of dependencies. In rare cases a dependency may contain class files
from other projects, and because class files outrank clj source files, you
end up with some pretty bizarre behaviour in such cases.

- James


On 11 April 2014 22:09, Tom Connors t.v.conn...@gmail.com wrote:

 Hi Josh,
 My solution ended up being pretty lame: I stopped calling a function from
 clout, and the uberjar magically worked, as disappointing as that
 explanation is. As far as I could tell, the root cause of my problem was
 that clout depends on an old version of clojure (1.2, if I recall
 correctly) that defined a protocol that no longer exists in newer versions.
 It doesn't look to me like you're getting the error for the same reason.
 Have you tried the standard things, like blow away the target directory and
 make sure you've required the ns before using its vars? How about.. and I
 hate this idea too... one by one, remove dependencies + code that uses
 them, and see if you can get a working jar?
 When you do manage to figure this out, please post back here, as I'd like
 to understand this error better (it sure is annoying, huh?).


 On Thursday, February 27, 2014 2:49:38 PM UTC-5, Tom Connors wrote:

 Hi Everyone,
 I've been having trouble creating an uberjar of a project and I'm hoping
 someone here can point me toward a solution.
 After cleaning out the target directory (with lein clean) and
 preprocessing my cljx, I can run the project with no trouble using lein
 repl and lein run. I can package up the project (lein with-profile prd
 uberjar) and get the resultant jar files. After that, the trouble starts.
 Running the jar (java -jar my-standalone.jar) fails with a
 NoClassDefFoundError error, pointing at a protocol defined in
 weaverjester's clout - 
 https://github.com/weavejester/cloutclout/core/Route.
 I highly doubt clout actually has anything to do with the problem. After
 creating the uberjar, I can no longer run the project with lein run or lein
 repl - I get the same error, and I can't do anything with lein without
 getting that error until I remove the target directory.
 I've inspected the jar and can see that it contains clout, but just
 clout/core.clj - no .class files. I edited clout's project.clj to include
 :aot :all, packaged it into a jar, replaced the clout jar in my local maven
 repo with that new jar, and re-packaged my project. At this point, when I
 ran the jar, I got another NoClassDefFoundError, this time pointing at
 another protocol, but this one from clojure.core: clojure/lang/ILookupHost.
 I've been having this problem with the latest leiningen (2.3.4) and
 2.2.0.
 I've been futzing with my project.clj for some time, but to no avail. Any
 help greatly appreciated.
 -Tom

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


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


[ANN] lein-fruit 0.2.0

2014-04-11 Thread Zach Oakes
This is a new release of [lein-fruit](https://github.com/oakes/lein-fruit), 
a Leiningen plugin for building iOS apps in Clojure. It does this by using 
[RoboVM](http://www.robovm.org/), a bytecode-to-native translator.

The template in this version offers a huge improvement over the past 
versions. Due to an issue with Clojure's import 
behaviorhttp://dev.clojure.org/jira/browse/CLJ-1315, 
the only way to use the iOS wrapper classes was through reflection, which 
made for some very awkward code.

Happily, there is a patch available for this issue thanks to Aaron Cohen 
and Colin Fleming. I applied it to Clojure 1.6 and uploaded the fork to 
Clojars, so now lein-fruit's built-in 
templatehttps://github.com/oakes/lein-fruit/blob/master/src/leiningen/new/ios_clojure/core.cljcan
 access these classes the normal way.

-- 
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: Advice for building backend REST services from scratch using clojure

2014-04-11 Thread danneu
Play around with this:

$ lein new compojure myapp
$ cd myapp
$ lein ring server-headless
Started server on port 3000


On Thursday, April 10, 2014 9:13:19 AM UTC-5, Kashyap CK wrote:

 Hi,
 I have the opportunity to build a set of services from scratch. I plan to 
 use clojure for this.
 I'd like to experiment with options available out there - options such as 
 - what webserver, what database etc. I'd like it very much if you could 
 share some of your experiences in this and possibly some pitfalls to avoid.
 Regards,
 Kashyap


-- 
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: Uberjar woes

2014-04-11 Thread Josh Lehman
I've come up with a fix after lots of fiddling, and I cannot quite explain 
it -- but it works!

The component library involves creating records that implement the 
Lifecycle protocol. In every namespace where I implemented that protocol, I 
added a (:gen-class) to the namespace declaration. I also had a *user*namespace 
for development that used required the component library. I moved 
this into the project itself also: (ns user) - (ns fmspider.user). 
Finally, I switched back and forth between having :clean-non-project-files 
set to true and false -- the only thing that worked was having it set to 
*false*. Every time I build, I always start with lein clean to be sure. 

Still not quite sure why it is that things worked this way, or if some 
other combination of the above would yield the same result.

On Friday, April 11, 2014 2:18:27 PM UTC-7, James Reeves wrote:

 Clout doesn't depend on any protocols in Clojure. The only protocol it 
 uses is defined within the clout.core namespace itself.

 Problems like this are often caused by compiled class files on your 
 classpath. Often they are in the target directory, which can be solved by a 
 lein clean. The :clean-non-project-files option being set to false in 
 Josh's configuration looks very suspicious!

 I've also had problems with class files being accidentally included in the 
 jars of dependencies. In rare cases a dependency may contain class files 
 from other projects, and because class files outrank clj source files, you 
 end up with some pretty bizarre behaviour in such cases.

 - James


 On 11 April 2014 22:09, Tom Connors t.v.c...@gmail.com javascript:wrote:

 Hi Josh,
 My solution ended up being pretty lame: I stopped calling a function from 
 clout, and the uberjar magically worked, as disappointing as that 
 explanation is. As far as I could tell, the root cause of my problem was 
 that clout depends on an old version of clojure (1.2, if I recall 
 correctly) that defined a protocol that no longer exists in newer versions.
 It doesn't look to me like you're getting the error for the same reason. 
 Have you tried the standard things, like blow away the target directory and 
 make sure you've required the ns before using its vars? How about.. and I 
 hate this idea too... one by one, remove dependencies + code that uses 
 them, and see if you can get a working jar? 
 When you do manage to figure this out, please post back here, as I'd like 
 to understand this error better (it sure is annoying, huh?).


 On Thursday, February 27, 2014 2:49:38 PM UTC-5, Tom Connors wrote:

 Hi Everyone,
 I've been having trouble creating an uberjar of a project and I'm hoping 
 someone here can point me toward a solution.
 After cleaning out the target directory (with lein clean) and 
 preprocessing my cljx, I can run the project with no trouble using lein 
 repl and lein run. I can package up the project (lein with-profile prd 
 uberjar) and get the resultant jar files. After that, the trouble starts. 
 Running the jar (java -jar my-standalone.jar) fails with a 
 NoClassDefFoundError error, pointing at a protocol defined in 
 weaverjester's clout - 
 https://github.com/weavejester/cloutclout/core/Route. 
 I highly doubt clout actually has anything to do with the problem. After 
 creating the uberjar, I can no longer run the project with lein run or lein 
 repl - I get the same error, and I can't do anything with lein without 
 getting that error until I remove the target directory. 
 I've inspected the jar and can see that it contains clout, but just 
 clout/core.clj - no .class files. I edited clout's project.clj to include 
 :aot :all, packaged it into a jar, replaced the clout jar in my local maven 
 repo with that new jar, and re-packaged my project. At this point, when I 
 ran the jar, I got another NoClassDefFoundError, this time pointing at 
 another protocol, but this one from clojure.core: clojure/lang/ILookupHost.
 I've been having this problem with the latest leiningen (2.3.4) and 
 2.2.0. 
 I've been futzing with my project.clj for some time, but to no avail. 
 Any help greatly appreciated.
 -Tom

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




-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to