error when using pomegranate to load datomic and cemerick.piggieback

2012-09-30 Thread Brent Millare
Using the project file
(defproject test "1.0"
  :dependencies [#_ [com.datomic/datomic-free "0.8.3538"]
 [leiningen-core "2.0.0-preview10"]
 [com.cemerick/piggieback "0.0.2"]])
  
Then doing a lein2 repl
and running the following commands in order
user=> (require '[cemerick.pomegranate])
nil
user=> (cemerick.pomegranate/add-dependencies :coordinates 
'[[com.datomic/datomic-free "0.8.3538"]])
...lots of output...
user=> (require '[datomic.api])
NoSuchMethodError 
com.google.common.cache.CacheBuilder.maximumSize(J)Lcom/google
/common/cache/CacheBuilder;  datomic.cache/create-computing (cache.clj:129)

If I use lein2 normally with datomic in the project.clj file, everything 
works as normal. Is there something going on differently that prevents this 
from working when adding dependencies dynamically?

(Note I need to have piggieback in there to create the error).

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

Re: More Concise or Idiomatic Max Sub-Array?

2012-09-30 Thread noahlz
Great use of reductions. Thanks!

On Saturday, September 29, 2012 11:10:27 AM UTC-4, Jean Niklas L'orange 
wrote:
>
> Is there a more concise implementation, perhaps using `filter` or merely 
>> by making the `reduce` version more "idiomatic" somehow?
>>
>  
> Another version I believe is more evident utilizes reductions to build a 
> list over all the *max-ending-here*s. You can then just pick the maximal 
> value in that list, giving you the maximal subarray:
>
> (defn max-subarray [A]
>   (let [pos+ (fn [sum x] (if (neg? sum) x (+ sum x)))
> ending-heres (reductions pos+ 0 A)]
> (reduce max ending-heres)))
>

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

Re: Playing with clojure-encog, Machine-Learning wrapper

2012-09-30 Thread Timothy Washington
Hey All,

Just following up this post, as I'm trying to figure out how to calculate
an error's partial derivative in ANN. I'm constructing a feed-forward
artificial neural network , using resilient
propagation training. At the moment, I'm trying to implement an individual
neuron input's weight update algorithm. For the life of me, I can't seem to
find a clear and straightforward answer on how to calculate the partial
derivative of the error for a given weight. The only thing I can find on
the web, is the fact that a neuron's weight update is a function of dE/dW.
So see the original
Paper(p.
2 & 3). Or this
one(p.
4).

But noone actually outlines how to calculate this. I understand the concept
of a partial derivative in a mathematical
sense.
And I assume that the current neuron input's weight change calculation is
the operation at hand, while all other neuron input values are held
constant. I've also dug through the encog source
code,
and can't find a clear explanation.

So for each of these neurons below, I calculate each inputs' individual
error by taking a total error ( *-0.3963277746392987* ), that's been
multiplied by that neuron input's weight ( each :calculated-error is the
sum of the individual inputs' error ). For both neurons, what would be the
weight change for each input?


:input-layer


 ({:calculated-error -1.0991814559154283,


   :calculated-value 0.9908633780805893,


   :inputs


   ({:error -0.07709937922001887,


 :calculated 0.4377023624017325,


 :key :avolume,


 :value 2.25,


 :weight 0.19453438328965889,


 :bias 0}


{:error -0.19625185888745333,


 :calculated 1.4855269156904067,


 :key :bvolume,


 :value 3.0,


 :weight 0.4951756385634689,


 :bias 0}


{:error -0.3072203938672436,


 :calculated 1.0261589301119642,


 :key :ask,


 :value 1.32379,


 :weight 0.7751674586693994,


 :bias 0}


{:error -0.36920086975057054,


 :calculated 1.2332848282147972,


 :key :bid,


 :value 1.3239,


 :weight 0.9315543683169403,


 :bias 0}


{:error -0.14940895419014188,


 :calculated 0.5036129016361643,


 :key :time,


 :value 1.335902400676,


 :weight 0.37698330460468044,


 :bias 0}),


   :id "583c10bfdbd326ba525bda5d13a0a894b947ffc"},
  ...)

:output-layer


({:calculated-error -1.1139741279964241,


  :calculated-value 0.9275622253607013,


  :inputs


  ({:error -0.2016795955938916,


:calculated 0.48962608882549025,


:input-id "583c10bfdbd326ba525bda5d13a0a894b947ffb",


:weight 0.5088707087900713,


:bias 0}


   {:error -0.15359996014735702,


:calculated 0.3095962076691644,


:input-id "583c10bfdbd326ba525bda5d13a0a894b947ffa",


:weight 0.38755790024342773,


:bias 0}


   {:error -0.11659507401745359



:calculated 0.23938733624830652,


:input-id "583c10bfdbd326ba525bda5d13a0a894b947ff9",


:weight 0.2941885012312543,


:bias 0}


   {:error -0.2784739949663631,


:calculated 0.6681581686752845,


:input-id "583c10bfdbd326ba525bda5d13a0a894b947ff8",


:weight 0.7026355778870271,


:bias 0}


   {:error -0.36362550327135884,


:calculated 0.8430641676611533,


:input-id "583c10bfdbd326ba525bda5d13a0a894b947ff7",


:weight 0.9174868039523537,


:bias 0}),


  :id "583c10bfdbd326ba525bda5d13a0a894b947ff6"})



Thanks in advance


Tim Washington
Interruptsoftware.ca



On Mon, Aug 6, 2012 at 7:03 PM, Timothy Washington wrote:

> Hey Jim,
>
> Yes, that was actually the first place I was going to post the question.
> But what I noticed, was that the "Financial Neural 
> Network"
> section, was geared more towards users of financial software, rather than
> software developers actually. But I'm probably being too cautious in that
> respect. Ok, I've moved that postto 
> the "Financial Neural Network" section.
>
>
> Thanks for the nudge :)
>
> Tim Washington
> Interruptsoftware.ca
>
>
>
> On Mon, Aug 6, 2012 at 12:33 PM, Jim - FooBar(); wrote:
>
>>  I'm surprised you didn't post your question on the "Financial Neural
>> Networks" section of the forum but on the "Using encog in Java" instead!
>> You did see it right?
>>
>> Just trying to help here... :-) . I'm genuinely interested in your
>> problem and I'd love to see the solution unfold! In fact if you get it
>> going I'd love to add it in the clojure-encog examples...
>>
>> Jim
>>
>>

-- 
You received this message because you are subs

Re: Transforming an ugly nested loop into clojure code

2012-09-30 Thread arekanderu
Thank you for your prompt reply Grant.

*> May you share the original code? *
*
*
I will post the original function very soon*
*

*> Why does my-map have vectors storing maps inside instead of a map with 
> maps inside? *
*
*
Because each vector will have more than one hash-map and each hash map will 
have multiple keys. I only posted a simplified version of the map for 
readability, unless I am missing something here...
I think of vector as the equivalent of the "array of" and that's why I used 
it. If i should have done it in some other way please let me know.

*> May you write some tests to demonstrate what you want to accomplish 
> with the ugly map and share them here? *
*
*
I am basically trying to destruct my deep map with a better way than a 
4-nested loop. 

I will post a better code snippet in order to clean things even more.

Thanks again

On Monday, October 1, 2012 12:41:52 AM UTC+3, Grant Rettke wrote:
>
> On Sun, Sep 30, 2012 at 2:59 PM, arekanderu > 
> wrote: 
> > I am trying to port an ugly piece of code from Ruby to clojure. 
>
> May you share the original code? 
>
> > So far I 
> > have only ported it to clojure by keeping the same way it was written in 
> > Ruby and i am trying to re-write it the clojure way 
> because...wellits 
> > very ugly. 
>
> Why does my-map have vectors storing maps inside instead of a map with 
> maps inside? 
>
> > I have a complex hash map which it's structure is always the same and 
> the 
> > keys always known and by using the values in those keys, i make some 
> > function calls with those values as parameters. You can find a 
> simplified 
> > version of the map and the function which steps into the map below. 
>
> May you write some tests to demonstrate what you want to accomplish 
> with the ugly map and share them here? 
>
> > I would really appreciate it if someone could propose an alternative way 
> > of writing the above function or at least to point me where can I look 
> for 
> > some useful clojure functions that will help me do what I want but in a 
> > cleaner way. 
>
> Once you provide tests then we have a better chance at helping. 
>
> -- 
> ((λ (x) (x x)) (λ (x) (x x))) 
> http://www.wisdomandwonder.com/ 
> ACM, AMA, COG, IEEE 
>

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

Re: Transforming an ugly nested loop into clojure code

2012-09-30 Thread Grant Rettke
On Sun, Sep 30, 2012 at 2:59 PM, arekanderu  wrote:
> I am trying to port an ugly piece of code from Ruby to clojure.

May you share the original code?

> So far I
> have only ported it to clojure by keeping the same way it was written in
> Ruby and i am trying to re-write it the clojure way because...wellits
> very ugly.

Why does my-map have vectors storing maps inside instead of a map with
maps inside?

> I have a complex hash map which it's structure is always the same and the
> keys always known and by using the values in those keys, i make some
> function calls with those values as parameters. You can find a simplified
> version of the map and the function which steps into the map below.

May you write some tests to demonstrate what you want to accomplish
with the ugly map and share them here?

> I would really appreciate it if someone could propose an alternative way
> of writing the above function or at least to point me where can I look for
> some useful clojure functions that will help me do what I want but in a
> cleaner way.

Once you provide tests then we have a better chance at helping.

--
((λ (x) (x x)) (λ (x) (x x)))
http://www.wisdomandwonder.com/
ACM, AMA, COG, IEEE

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


Re: Questions about using error-kit

2012-09-30 Thread Thomas Hicks
Thanks Luc and Mayank. I will chuck the monolithic contrib lib and check 
out Slingshot as an error-kit replacement.
-t

On Sunday, September 30, 2012 1:52:08 PM UTC-7, Luc wrote:
>
> Contrib has been separated into separate libs since 1.3 
>
> http://dev.clojure.org/display/design/Where+Did+Clojure.Contrib+Go 
>
> Suggests to use slingshot. 
>
> The are 1.3 compliant monolithic contrib versions out there but it's 
> better to move to 
> the new implementations. 
>
> Luc P. 
>

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

Re: Questions about using error-kit

2012-09-30 Thread Softaddicts
Contrib has been separated into separate libs since 1.3

http://dev.clojure.org/display/design/Where+Did+Clojure.Contrib+Go

Suggests to use slingshot.

The are 1.3 compliant monolithic contrib versions out there but it's better to 
move to
the new implementations.

Luc P.


> I'm trying to learn something about error-kit and encountering some 
> unexpected responses, as follows:
> 
> Clojure 1.3.0
> user=> (use 'clojure.contrib.error-kit)
> Warning: *handler-stack* not declared dynamic and thus is not dynamically 
> rebindable, but its name suggests otherwise. Please either indicate 
> ^:dynamic *handler-stack* or change the name.
> Warning: *continues* not declared dynamic and thus is not dynamically 
> rebindable, but its name suggests otherwise. Please either indicate 
> ^:dynamic *continues* or change the name.
> nil
> user=> (def tm (throw-msg java.lang.IllegalArgumentException))
> #'user/tm
> user=> (tm "hi")
> IllegalArgumentException   
> sun.reflect.NativeConstructorAccessorImpl.newInstance0 
> (NativeConstructorAccessorImpl.java:-2)
> 
> First, note the dynamic variable warnings upon use...(might this possibly 
> indicate an out-of-date version of error-kit (I'm using using 
> clojure-contrib.jar from 1.2.0)?).
> 
> I'm just starting with error-kit but I would have expected that the last 
> call (involving a previous throw-msg function) would have returned 
> something like this:
> 
> -> java.lang.IllegalArgumentException: hi
> 
> and would not have included the additional junk from 
> 'sun.reflect.NativeConstructor'. Is this some OSX Java bug or does this 
> also happen on other JDKs?
> Any help or suggestions appreciated.
> -t
> 
> 
> -- 
> 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
--
Softaddicts sent by ibisMail from my ipad!

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


Re: Questions about using error-kit

2012-09-30 Thread Mayank Jain
As far as I know contrib is deprecated[1].

Perhaps others can shed more light on your problem.

[1] : dev.clojure.org/display/design/Where+Did+Clojure.Contrib+Go

Sent from phone. Please excuse brevity.
On Oct 1, 2012 2:04 AM, "Thomas Hicks"  wrote:

> I'm trying to learn something about error-kit and encountering some
> unexpected responses, as follows:
>
> Clojure 1.3.0
> user=> (use 'clojure.contrib.error-kit)
> Warning: *handler-stack* not declared dynamic and thus is not dynamically
> rebindable, but its name suggests otherwise. Please either indicate
> ^:dynamic *handler-stack* or change the name.
> Warning: *continues* not declared dynamic and thus is not dynamically
> rebindable, but its name suggests otherwise. Please either indicate
> ^:dynamic *continues* or change the name.
> nil
> user=> (def tm (throw-msg java.lang.IllegalArgumentException))
> #'user/tm
> user=> (tm "hi")
> IllegalArgumentException
> sun.reflect.NativeConstructorAccessorImpl.newInstance0
> (NativeConstructorAccessorImpl.java:-2)
>
> First, note the dynamic variable warnings upon use...(might this possibly
> indicate an out-of-date version of error-kit (I'm using using
> clojure-contrib.jar from 1.2.0)?).
>
> I'm just starting with error-kit but I would have expected that the last
> call (involving a previous throw-msg function) would have returned
> something like this:
>
> -> java.lang.IllegalArgumentException: hi
>
> and would not have included the additional junk from
> 'sun.reflect.NativeConstructor'. Is this some OSX Java bug or does this
> also happen on other JDKs?
> Any help or suggestions appreciated.
> -t
>
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en

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

Questions about using error-kit

2012-09-30 Thread Thomas Hicks
I'm trying to learn something about error-kit and encountering some 
unexpected responses, as follows:

Clojure 1.3.0
user=> (use 'clojure.contrib.error-kit)
Warning: *handler-stack* not declared dynamic and thus is not dynamically 
rebindable, but its name suggests otherwise. Please either indicate 
^:dynamic *handler-stack* or change the name.
Warning: *continues* not declared dynamic and thus is not dynamically 
rebindable, but its name suggests otherwise. Please either indicate 
^:dynamic *continues* or change the name.
nil
user=> (def tm (throw-msg java.lang.IllegalArgumentException))
#'user/tm
user=> (tm "hi")
IllegalArgumentException   
sun.reflect.NativeConstructorAccessorImpl.newInstance0 
(NativeConstructorAccessorImpl.java:-2)

First, note the dynamic variable warnings upon use...(might this possibly 
indicate an out-of-date version of error-kit (I'm using using 
clojure-contrib.jar from 1.2.0)?).

I'm just starting with error-kit but I would have expected that the last 
call (involving a previous throw-msg function) would have returned 
something like this:

-> java.lang.IllegalArgumentException: hi

and would not have included the additional junk from 
'sun.reflect.NativeConstructor'. Is this some OSX Java bug or does this 
also happen on other JDKs?
Any help or suggestions appreciated.
-t


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

Re: maplist for core?

2012-09-30 Thread Marc Dzaebel
Well, I might have to collect usecases.

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

Re: maplist for core?

2012-09-30 Thread Marc Dzaebel
*expand *looks really useful too.

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

Transforming an ugly nested loop into clojure code

2012-09-30 Thread arekanderu
Hello,

I am trying to port an ugly piece of code from Ruby to clojure. So far I 
have only ported it to clojure by keeping the same way it was written in 
Ruby and i am trying to re-write it the clojure way because...wellits 
very ugly.
I have a complex hash map which it's structure is always the same and the 
keys always known and by using the values in those keys, i make some 
function calls with those values as parameters. You can find a simplified 
version of the map and the function which steps into the map below.

The map structure:

(def my-map 
>
>   [{:a-key "foo" :items-a 
>
>   [{:another-key "bar" :items-b 
>
>   [{:items-c 
>
> [{:name "bar-bar" :items-d 
>
>   [{:items-e 
>
> [{:name "foo-foo"}]
>
>}]
>
>  }]
>
>}]
>
> }]
>
>   }])
>
>  
And the function:

(defn my-func []
>
>(map (fn [a-hash]
>
>(map (fn [item-a]
>
>   (map (fn [item-b]
>
>  (map (fn [item-c]
>
> (when-not (empty? (:items-e item-c))
>
>   (map (fn [item]
>
>  (doSomething (:a-key item-a) 
>> (:name item))
>
>   (:items-e items-c))
>
>  (doSomethingElse (:a-key item-a) 
>> (:another-key item-b) (:name item-c
>
>   (:items-c item-b)))
>
>(:items-b item-a)))
>
> (:items-a a-hash)))
>
>  my-map))) 
>
>
I would really appreciate it if someone could propose an alternative way of 
writing the above function or at least to point me where can I look for 
some useful clojure functions that will help me do what I want but in a 
cleaner way.

Thank you for your time 
 

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

Re: how to securely store parameters in config files

2012-09-30 Thread Shantanu Kumar


On Friday, 28 September 2012 17:03:14 UTC+5:30, Murtaza Husain wrote:
>
> Hi,
>
> I am using a config file to store passwords / keys for DB and connection 
> to other services like AWS. 
>
> I am using Travis CI for build, and running my tests, and then deploying 
> it to live server. 
>
> I would like to encrypt the variables in my config file and only the 
> application should be able to read it. This is the criteria -
>
> 1) The application should be able to decrypt it in multiple environments, 
> from the build server to multiple deployment servers.
>
> 2) The password used to decrypt the config file is not avalaible to the 
> developers.
>


Possibly a combination of techniques can help:

1. Maintain config as a map of profiles to corresponding env attributes in 
a .clj file. The sensitive attributes can be stored encrypted using the 
public key of the profile owner.

2. The "current" profile can be decided using a well-known system 
environment variable, e.g. APP_ENV

3. Have an app initializer (bootstrap.clj file) that initializes the app 
once at startup. The initialized env can be set using alter-var-root by the 
initializer.

4. The initializer should know in advance which keys are encrypted, and 
should decrypt them for only the relevant profile using the system user's 
private key.

http://www.devco.net/archives/2006/02/13/public_-_private_key_encryption_using_openssl.php

http://www.javamex.com/tutorials/cryptography/rsa_encryption_2.shtml (see 
the rsaEncrypt method; you can write a rsaDecrypt method similarly)

Hope this helps.

Shantanu

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

Re: maplist for core?

2012-09-30 Thread Ben Wolfson
If maplist/tails, why not inits as well?

Prelude GOA Data.List> inits [1,2,3]
[[],[1],[1,2],[1,2,3]]

I've also found haskell's unfold useful:

(defn expand ;; since Clojure has "reduce" and not "foldl"
  [f seed]
  (lazy-seq (when-let [[a b] (f seed)] (cons a (expand f b)

As with maplist it can be implemented in terms of iterate, though I
think that implementation is unattractive. (And iterate can be
implemented in terms of it),

On Sun, Sep 30, 2012 at 7:51 AM, Marc Dzaebel  wrote:
> I often have the need to lazily iterate over rests of lists rather than
> elements. I frequently saw discussions about this topic. In CL it's called
> maplist, in Haskell it's tails (Scala missing?). Of course there are several
> methods to do this, e.g. (take-while identity (iterate next S)), but if you
> use them recursivly, code reads badly. So my proposal would be to have a
> kind of following function in the core:
>
> (defn maplist
>   ([s] (maplist identity s))
>   ([f s] (when-let [s (seq s)] (lazy-seq (cons (f s) (maplist f (next
> s)))
> ;(maplist [1 2 3]) -> ((1 2 3) (2 3) (3))
>
> Questions:
>
> Would such a method help more developers?
> Is there a conceptional reason, to omit a maplist equivalent in Clojure?
>
> Thanks, Marc
>
> --
> 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



-- 
Ben Wolfson
"Human kind has used its intelligence to vary the flavour of drinks,
which may be sweet, aromatic, fermented or spirit-based. ... Family
and social life also offer numerous other occasions to consume drinks
for pleasure." [Larousse, "Drink" entry]

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


Re: Starting a new ClojureScript project, where to start?

2012-09-30 Thread Dima B

Hi Daniel,

CljsBuild is a good starting point 
https://github.com/emezeske/lein-cljsbuild
It automatically sets up environment with latest cljs version and gives 
complete framework with compilation, auto-compilation, support of multiple 
projects, sharing code between clj and cljs.
Also take a look at the examples supplied with cljsbuild.

Cheers,
Dima


On Friday, September 28, 2012 11:30:12 AM UTC-7, Daniel Glauser wrote:
>
> Hi folks,
>
> Where would you point someone if they wanted guidance starting a new 
> ClojureScript project?  I friend who's big into 
> CoffeeScript/Backbone/Require and is looking to kick off a side project 
> with ClojureScript.  He's sold on Clojure but looking for some guidance. 
>  We checked out Pinot which is now broken up:
> https://groups.google.com/d/msg/clj-noir/wsCVajG0-YE/CaFa3FTU7B0J
>
> Are there any sample apps with the new libraries?
>
> I cruised by ClojureScriptOne which is the most expansive ClojureScript 
> sample I've seen.  The last commit was eight months ago and some of the 
> libs look a bit stale in project.clj. Is ClojureScriptOne still a good 
> sample to point folks at or have things changed significantly?
>
> On a separate note I finally have Clojure in production!  It's working 
> great and development is moving forward.  It's currently a Noir app. 
>  Looking to roll in Friend and Datomic shortly.  From there I hope to 
> publish a sample app, with all these well written disconnected libraries it 
> seems like we could use more examples of how to put them together.  Ping me 
> if you'd like to help.
>
> If any Clojure folks are coming through Denver and would be willing to 
> lead a topic at the Den of Clojure we would love to have you.  We do accept 
> presenters but encourage folks to focus on leading a topic and keeping the 
> meetings more hands on.
> http://www.meetup.com/Denver-Clojure-Meetup/
>
> Cheers,
> Daniel
>

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

Re: maplist for core?

2012-09-30 Thread Stuart Sierra
Never had a use for such a thing, myself, but it sounds like a reasonable 
candidate for https://github.com/clojure/core.incubator at least.
-S

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

maplist for core?

2012-09-30 Thread Marc Dzaebel
I often have the need to lazily iterate over rests of lists rather than 
elements. I frequently saw discussions about this topic. In CL it's called *
maplist*, in Haskell it's *tails* (Scala missing?). Of course there are 
several methods to do this, e.g. (take-while identity (iterate next S)), 
but if you use them recursivly, code reads badly. So my proposal would be 
to have a kind of following function in the core:

(defn maplist
  ([s] (maplist identity s))
  ([f s] (when-let [s (seq s)] (lazy-seq (cons (f s) (maplist f (next 
s)))
;(maplist [1 2 3]) -> ((1 2 3) (2 3) (3))

Questions:

   1. Would such a method help more developers?
   2. Is there a conceptional reason, to omit a maplist equivalent in 
   Clojure?

Thanks, Marc

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

Re: how to securely store parameters in config files

2012-09-30 Thread Joshua Ballanco
A common strategy in this sort of scenario is to have a config file containing 
the "real" keys installed in some shared location on your production servers. 
Then, you can generate Travis specific keys that you check into your repo. The 
idea is that if you ever fear the keys you use with Travis have leaked, you can 
quickly revoke them without any effect on your production machines.  

- Josh



--
Joshua Ballanco

ELC Technologies™
1771 NW Pettygrove Street, Suite 140
Portland, OR, 97209
jballanco (mailto:jballa...@elctech.com)@elctech.com 
(mailto:kmil...@elctech.com)

P +1 866.863.7365
F +1 877.658.6313
M +1 646.463.2673
T +90 533.085.5773

http://www.elctech.com (http://www.elctech.com/)


On Friday, September 28, 2012 at 2:33 PM, Murtaza Husain wrote:

> Hi,
>  
> I am using a config file to store passwords / keys for DB and connection to 
> other services like AWS.  
>  
> I am using Travis CI for build, and running my tests, and then deploying it 
> to live server.  
>  
> I would like to encrypt the variables in my config file and only the 
> application should be able to read it. This is the criteria -
>  
> 1) The application should be able to decrypt it in multiple environments, 
> from the build server to multiple deployment servers.
>  
> 2) The password used to decrypt the config file is not avalaible to the 
> developers.
>  
> Also are there any leiningen plugins / features that will aid in this ?
>  
> Thanks,
> Murtaza  
> --  
> 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 
> (mailto: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 
> (mailto:clojure+unsubscr...@googlegroups.com)
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en  

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

Re: [ANN] Remix: mix and match machinery for web and sql

2012-09-30 Thread Michael

Shantanu,

Thanks for taking a look and the feedback. I added a Learn More button and 
navbar hiliting.

On Sunday, September 30, 2012 2:56:12 AM UTC-4, Shantanu Kumar wrote:
>
> This looks cool! Thanks for sharing.
>
> The only nit I'd like to mention (about the website) is it wasn't 
> immediately apparent to me how to find the documentation. The 
> grey-over-black menu text didn't give it away at first. Maybe a "Get 
> started (documentation)" button on the homepage would help.
>
> Shantanu
>
>

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

Re: Clojure web framework

2012-09-30 Thread Simone Mosciatti
Immutant ( http://immutant.org/ ) IMO is moving in a great direction, if I 
have understand is wrapping several libraries in just one enviroment...

And red hat is behind it I just find out, that usually means great doc...

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