Re: New Relic installation on Heroku

2013-05-08 Thread Jonathon McKitrick
It's currently called 'relic-app'.


--
Jonathon McKitrick


On Wed, May 8, 2013 at 12:52 PM, Phil Hagelberg  wrote:

>
> Jonathon McKitrick writes:
>
> > That's a good suggestion.  I made that change, and there definitely was a
> > different because the heroku log said New Relic agent was already running
> > because it had been specified in the JVM_OPTS.  So I removed it from
> there,
> > restarted, but no change in the New Relic reports.  I even tried running
> > without trampoline, but not success.
> >
> > I'm still seeing the 'instances' chart updated, but nothing else.
>
> If you send me your app name off the list I can take a look at this.
>
> -Phil
>

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




Re: New Relic installation on Heroku

2013-05-08 Thread Phil Hagelberg

Jonathon McKitrick writes:

> That's a good suggestion.  I made that change, and there definitely was a 
> different because the heroku log said New Relic agent was already running 
> because it had been specified in the JVM_OPTS.  So I removed it from there, 
> restarted, but no change in the New Relic reports.  I even tried running 
> without trampoline, but not success.
>
> I'm still seeing the 'instances' chart updated, but nothing else.

If you send me your app name off the list I can take a look at this.

-Phil


pgp8W66i6kJR8.pgp
Description: PGP signature


Re: Separating Out .cljs Content

2013-05-08 Thread Timothy Washington
Hey Jonathan,

I just tried adding *base.js*. But another batch of dependency errors pop
up. It just seems that there's no straightforward way of keeping *my-code.js
* out of cljs' *main.js*.


   1. goog.require could not find: cljs.core
base.js:333


   1. Uncaught Error: goog.require could not find: cljs.core
base.js:337


   1. Uncaught ReferenceError: cljs is not defined
edgar.js:5


Hmm
Tim

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




Adopting plumbing/graph - But how?

2013-05-08 Thread Wolodja Wentland
Hi all,

I am quite interested in using plumbing in one of my projects and have the
feeling that it is a perfect fit and indeed a better solution to something I
have written before. I can't, however, quite figure out the best way to
translate what I have into an implementation that uses graphs.

Consider a function such as:

(defn reducekv-fun
  [m]
  (let [m (reduce-kv
(fn [ret k v]
  (let [first-result (map inc v)
ret (assoc ret :first-result first-result)
ret (assoc ret :second-result (map #(- % 2) (get ret 
:first-result)))
ret (assoc-in ret [:third-result k] (map #(* 2 %) v))]
ret))
m
(get m :foo))]
   m))

where m would be something like {:foo {:first-set #{a b c} :second-set #{a b
c}}}. I want to keep keys present in m, but "update" some of them.

Which is something that I use in some places in my current codebase. It
essentially tries to model a graph and uses a map to move data from
one computation "node" to another. I don't really like this approach because it
is hard to change the actual implementation that is being called, there is no
verficiation that all necessary keys are present and it feels made up on
the spot. plumbing/graph looks as if it would fit perfectly.

I think that it should be pretty easy to translate this into an implementation
that uses plumbing's graphs, but I am running into problems with call like

   ret (assoc-in ret [:third-result k] (map #(* 2 %) v))

and am simply not sure how to handle them elegantly. What I would like to be
able to do in the end is:

* Replace the entire computation by a call to a single function (rather
  "hook" that returns a map that can be merged with the old map
* An easy way to compose that hook, essentially by adding multiple
  "subgraphs" together.

My basic idea is to have something like (but feel free to suggest something
completely different):

(defn reducekv-fun
  [m hook-function]
  (let [m (reduce-kv
(fn [ret k v] (hook-function ret k v))
m
(get m :foo))]
   m))

And the ability to define the computation as combination of multiple subgraphs
in the sense of (invalid code, but you get the idea):

(def compute1-graph
   { :first-result (fnk [v] (map inc v))
 :second-result (fnk [first-result] (map #(- % 2) first-result))})

(def compute2-graph
  { :third-result {k (fnk [v] (map #(* 2 %) v))}})

(def hook-function
  (fn [???] ...
(graph/???-compile (merge compute1-graph compute2-graph …
  compute5-graph

But I have problems with nested dynamic keys (such as the k in compute2-graph)
and am also not sure if this whole approach is a good idea. It looks as if
your library is *exactly* what I need, but I am stuck at making the first
step without breaking everything.

Thanks a lot!
-- 
Wolodja 

4096R/CAF14EFC
081C B7CD FF04 2BA9 94EA  36B2 8B7F 7D30 CAF1 4EFC


signature.asc
Description: Digital signature


Re: New Relic installation on Heroku

2013-05-08 Thread Jonathon McKitrick
That's a good suggestion.  I made that change, and there definitely was a 
different because the heroku log said New Relic agent was already running 
because it had been specified in the JVM_OPTS.  So I removed it from there, 
restarted, but no change in the New Relic reports.  I even tried running 
without trampoline, but not success.

I'm still seeing the 'instances' chart updated, but nothing else.

On Wednesday, May 8, 2013 9:12:31 AM UTC-4, Leonardo Borges wrote:
>
> Are you using lein with "lein trampoline"?
>
> If so, your app is running on a separate JVM, so you need to add this to 
> your project.clj:
>
>   :jvm-opts ["-javaagent:newrelic/newrelic.jar"]
>
> That was the bit missing for me. Hope this helps.
>
> Cheers,
>
> Leonardo Borges
> www.leonardoborges.com
>
>
> On Wed, May 8, 2013 at 11:09 PM, Jonathon McKitrick 
> 
> > wrote:
>
>> I should add... when the idle dyno spins up, I *do* see that in the 
>> instance chart on New Relic.  But none of the other stats show any activity.
>>
>>
>>  -- 
>> -- 
>> 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/groups/opt_out.
>>  
>>  
>>
>
>

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




Re: New Relic installation on Heroku

2013-05-08 Thread Leonardo Borges
Are you using lein with "lein trampoline"?

If so, your app is running on a separate JVM, so you need to add this to
your project.clj:

  :jvm-opts ["-javaagent:newrelic/newrelic.jar"]

That was the bit missing for me. Hope this helps.

Cheers,

Leonardo Borges
www.leonardoborges.com


On Wed, May 8, 2013 at 11:09 PM, Jonathon McKitrick wrote:

> I should add... when the idle dyno spins up, I *do* see that in the
> instance chart on New Relic.  But none of the other stats show any activity.
>
>
>  --
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

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




Re: New Relic installation on Heroku

2013-05-08 Thread Jonathon McKitrick
I should add... when the idle dyno spins up, I *do* see that in the 
instance chart on New Relic.  But none of the other stats show any activity.

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




New Relic installation on Heroku

2013-05-08 Thread Jonathon McKitrick
I followed these directions to install New Relic on my Heroku app:

http://www.rafael-chacon.com/post/19069499949/new-relic-clojure-heroku-easy-steps-integration

I added my license key to the yml file, and restarted the app.  It's a 
simple app, with an import run from the CLI and an export as JSON web 
services.  I ran a few of both to trigger the New Relic agent.  At least I 
hoped so.

Though my New Relic account page located my app, it said no data was being 
received.  I thought this was an out-of-the-box setup.  Any ideas on what I 
can check to see what's going wrong?  I checked for log files, and found 
none created so far for New Relic.

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




Re: Parallel code execution in ClojureScript?

2013-05-08 Thread Paul deGrandis
David is right, it can be done with workers.

I created a proof of concept in Shoreleave to do this dynamically.  The 
dynamic workers implemented IFn and supported IWatchable via the HTML5 
Messaging API.
https://gist.github.com/ohpauleez/2914039

About a month or so ago, I started creating a new proof of concept around 
parallel.js but haven't finished it yet 
(http://adambom.github.io/parallel.js/)
Parallel.js just wraps up the web workers stuff in a more convenient API.

Hope this helps,
Paul // ohpauleez
 

On Tuesday, May 7, 2013 2:39:48 PM UTC-7, Ghassan Ayesh wrote:
>
> Hi:
>
> In Javascript language, and while the language is inherently functional, 
> Javascript's *implementation* until now, does not support parallel code 
> execution against available CPU cores, unlike Erlang for example or Clojure 
> on JVM, so I am thinking that the actor pattern in Clojure when targetting 
> JavaScript does not run in parallel natively. Am I right?
>
> -Ghassan.
>

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




Re: Separating Out .cljs Content

2013-05-08 Thread Jonathan Fischer Friberg
That's odd, it should definitely be possible to do - I've done it before.

Did you include the scripts something like this (from the dom example):




   goog.require('dom.test');


Jonathan



On Wed, May 8, 2013 at 2:30 AM, Timothy Washington wrote:

> That fixed one of the dependency problems. But now there are a bunch of
> other dependency errors. AndI'm not sure if I have to independently include
> all the library generated .js files. It looks like you have no choice but
> to glom your .js code into main.js. Hmmm.
>
>
>1. Uncaught ReferenceError: goog is not defined 
> http_rpc.js:1
>
>
>1. Uncaught ReferenceError: shoreleave is not defined 
> edgar.js:1
>
> Tim
>
>
> On Tue, May 7, 2013 at 5:26 PM, Jonathan Fischer Friberg <
> odysso...@gmail.com> wrote:
>
>> You have to import the google closure library when compiling without
>> optimisation.
>>
>> Given your build, probably something like this:
>>
>> > src="public/javascript/goog/base.js">
>>
>> Just make sure the base.js file is actually there.
>>
>> Jonathan
>>
>>  --
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

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