Re: how do we go about promoting new clojure libraries?

2012-09-26 Thread Baishampayan Ghose
On Wed, Sep 26, 2012 at 12:40 PM, Michael Klishin michael.s.klis...@gmail.com wrote: No, that's not how it works. You *first* make contribution process easy, *then* ask people to volunteer. Michael, Don't want to sound snarky here, but as we all know, easy != simple :) Regards, BG --

Re: how do we go about promoting new clojure libraries?

2012-09-26 Thread Michael Klishin
2012/9/26 Baishampayan Ghose b.gh...@gmail.com IMHO it's not that archaic. There are _many_ FOSS projects which mandate a CLA of some sort (even the hippest projects like Node.js have this http://nodejs.org/cla.html). The only contention is the snail-mailing part, which I understand is

Re: how do we go about promoting new clojure libraries?

2012-09-26 Thread Baishampayan Ghose
On Wed, Sep 26, 2012 at 12:44 PM, Michael Klishin michael.s.klis...@gmail.com wrote: I am only talking about the snail mail part. I have no problem with CAs, legal aspects of OSS project governance or anything like that. It took me a few hours to pass through the Neo4J contributor agreement

Re: how do we go about promoting new clojure libraries?

2012-09-26 Thread John Gabriele
On Sunday, September 23, 2012 4:00:28 PM UTC-4, zcaudate wrote: is there some sort of categorised list/wiki that we can add to for new libraries? I've started the [Clojure Dining Car](http://www.unexpected-vortices.com/clojure/dining-car.html), but haven't announced it yet because I still

Re: how do we go about promoting new clojure libraries?

2012-09-26 Thread Aaron Cohen
On Wed, Sep 26, 2012 at 3:40 PM, Michael Klishin michael.s.klis...@gmail.com wrote: 2012/9/26 Stuart Sierra the.stuart.sie...@gmail.com http://dev.clojure.org/display/community/Libraries is unorganized and out of date - volunteers welcome. Stuart, No, that's not how it works. You *first*

Re: how do we go about promoting new clojure libraries?

2012-09-26 Thread Michael Klishin
zcaudate: is there some sort of categorised list/wiki that we can add to for new libraries? There are clojuresphere.com, clojure-toolbox.com and some groups of people have their own sites for their stuff: clojurewerkz.org, http://flatland.org. If you want to make your library more visible,

Re: how do we go about promoting new clojure libraries?

2012-09-26 Thread Tamreen Khan
I think the consensus is that an electronic way to send the CA is just the right amount of effort required. You stil have to take the time to fill out a legally binding agreement but it also doesn't rule out those for whom snail mail is just too unpractical because they live outside the US or

Re: how do we go about promoting new clojure libraries?

2012-09-26 Thread Michael Klishin
2012/9/26 Aaron Cohen aa...@assonance.org No, only if you want an unfiltered stream of absolutely anyone to contribute is that true. If you're ok with restricting volunteers to the subset who are actually willing show a little effort, making the process slightly cumbersome might even be a net

Re: how do we go about promoting new clojure libraries?

2012-09-26 Thread Wes Freeman
updates. It's high noise, but I sometimes discover something that looks interesting. Clojars could do something similar--I'd follow. Wes On Wed, Sep 26, 2012 at 3:52 PM, Michael Klishin michael.s.klis...@gmail.com wrote: zcaudate: is there some sort of categorised list/wiki that we can add

Re: how do we go about promoting new clojure libraries?

2012-09-26 Thread John Gabriele
On Wednesday, September 26, 2012 3:48:27 PM UTC-4, John Gabriele wrote: On Sunday, September 23, 2012 4:00:28 PM UTC-4, zcaudate wrote: is there some sort of categorised list/wiki that we can add to for new libraries? I've started the Clojure Dining Car ... Oh, sorry. You were

Re: how do we go about promoting new clojure libraries?

2012-09-26 Thread Mayank Jain
, although there is indeed a fair amount of effort involved in maintaining the promotion. I like the https://twitter.com/nodenpm for node.js npm package updates. It's high noise, but I sometimes discover something that looks interesting. Clojars could do something similar--I'd follow. Wes On Wed

Re: how do we go about promoting new clojure libraries?

2012-09-26 Thread Michael Klishin
questions about how we do marketing for clojurewerkz.org or individual projects, just ask. It's not a secret and I am as interested in helping other good Clojure libraries become more visible as the other developer. -- MK http://github.com/michaelklishin http://twitter.com/michaelklishin -- You

how do we go about promoting new clojure libraries?

2012-09-25 Thread zcaudate
is there some sort of categorised list/wiki that we can add to for new libraries? -- 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

Re: Why do Clojure collections have (seq) rather than supporting the ISeq interface directly?

2012-09-17 Thread Alex Dowad
Thanks, SS!!! -- 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

Why do Clojure collections have (seq) rather than supporting the ISeq interface directly?

2012-09-16 Thread Alex Dowad
*seqable* rather than being *seqs*? Or equivalently: Why do Clojure's built-in collections support (seq) rather than (first) and (rest)? A few possible reasons I can think of: 1. From reading the implementation of classes like PersistentHashMap, I can see that running over a map using a seq

Re: Why do Clojure collections have (seq) rather than supporting the ISeq interface directly?

2012-09-16 Thread Stuart Sierra
Mostly efficiency. A Seq generally gives you access to `first` and `rest` in constant time. Vectors, to take one example, cannot give you `rest` efficiently, but a Seq backed by the vector can. Clojure lists are implemented as singly-linked lists, which do have first/rest pointers, so

Re: What does :resource-paths in leiningen do?

2012-09-13 Thread Murtaza Husain
A good use case - You want to place html files, that can be processed in your server side code. Inorder for your code to have access to it, you will have to place them in the src dir. However if you use the :resource-path, you can define a dir relative to the root of your project where you are

How do I get the total memory used by the app?

2012-09-12 Thread larry google groups
I need to know how much memory my app is using (it is a long running service). I see that some people have asked about how to measue memory use. Robert McIntyre asked, get the total memory used by a data structure? Some of the answers imply that it is easy to get the total memory use of the

Re: How do I get the total memory used by the app?

2012-09-12 Thread Sean Corfield
Here's some code we use to get memory and CPU usage in a displayable form: (defn- as-megabytes Given a sequence of byte amounts, return megabyte amounts as string, with an M suffix. [memory] (map #(str (int (/ % 1024 1024)) M) memory)) (defn- as-percentage Given a pair of values,

Re: How do I get the total memory used by the app?

2012-09-12 Thread Dave Ray
You can connect jconsole or visualvm to your running app to monitor memory usage, GC, threads, etc, etc. On my machine, jconsole lives in $JAVA_HOME/bin/jconsole. Cheers, Dave On Wed, Sep 12, 2012 at 10:12 AM, larry google groups lawrencecloj...@gmail.com wrote: I need to know how much

Re: How do I get the total memory used by the app?

2012-09-12 Thread larry google groups
Thank you much! On Wednesday, September 12, 2012 1:21:20 PM UTC-4, Sean Corfield wrote: Here's some code we use to get memory and CPU usage in a displayable form: (defn- as-megabytes Given a sequence of byte amounts, return megabyte amounts as string, with an M suffix. [memory]

Re: How do I get the total memory used by the app?

2012-09-12 Thread Shantanu Kumar
Also look at java.lang.Runtime class methods maxMemory, freeMemory and totalMemory: http://docs.oracle.com/javase/6/docs/api/java/lang/Runtime.html Shantanu On Sep 12, 10:45 pm, larry google groups lawrencecloj...@gmail.com wrote: Thank you much! On Wednesday, September 12, 2012

Re: How do I get the total memory used by the app?

2012-09-12 Thread larry google groups
Sean, Thank you much for this. I am curious about this: (defn cpu-usage Return utilization (as a string) and number of CPUs and load average. [] (let [bean (operating-system-bean) data ((juxt cpus load-average) bean)] (cons (cpu-percentage data) data))) I

Re: How do I get the total memory used by the app?

2012-09-12 Thread larry google groups
Shantanu, Thank you. That is great information. On Wednesday, September 12, 2012 1:50:32 PM UTC-4, Shantanu Kumar wrote: Also look at java.lang.Runtime class methods maxMemory, freeMemory and totalMemory: http://docs.oracle.com/javase/6/docs/api/java/lang/Runtime.html Shantanu On

Re: How do I get the total memory used by the app?

2012-09-12 Thread Sean Corfield
is really reporting with this number? How many cores do you have? -- Sean A Corfield -- (904) 302-SEAN An Architect's View -- http://corfield.org/ World Singles, LLC. -- http://worldsingles.com/ Perfection is the enemy of the good. -- Gustave Flaubert, French realist novelist (1821-1880) -- You

What does :resource-paths in leiningen do?

2012-09-10 Thread larry google groups
a resources folder at the top level of a project, rather than inside of src? 2.) how does this work? If I need a static resource compiled with my code then I need to do something like (clojure.java.io/resource homepage.html), yes? Does Leiningen actually compile in all static resources for me

Re: What does :resource-paths in leiningen do?

2012-09-10 Thread Michael Klishin
into different places, e.g. Web app containers vs standalone apps vs giant ecosystems such as Eclipse. Leinigen lets use follow whatever convention you want. 2.) how does this work? If I need a static resource compiled with my code then I need to do something like (clojure.java.io/resourcehomepage.html

Re: What does :resource-paths in leiningen do?

2012-09-10 Thread Phil Hagelberg
larry google groups lawrencecloj...@gmail.com writes: I see this: :resource-paths [src/main/resource] ; non-code files included in classpath/jar I am confused in 2 ways: 1.) is this a break from java conventions? I thought Java projects tended to put a resources folder at the top level

How do you determine terminal/console width in `lein repl`?

2012-07-23 Thread Gabriel Horner
= (clojure.java.shell/sh tput cols) {:exit 0, :out 80\n, :err } ; This is incorrect as my terminal width is 238 user= (clojure.java.shell/sh stty size) {:exit 1, :out , :err stty: stdin isn't a terminal\n} The only thing that does work is if I `export COLUMNS`, something I don't have to do for a ruby repl

Re: How do you determine terminal/console width in `lein repl`?

2012-07-23 Thread Gabriel Horner
user= (clojure.java.shell/sh stty size) {:exit 1, :out , :err stty: stdin isn't a terminal\n} The only thing that does work is if I `export COLUMNS`, something I don't have to do for a ruby repl. Thoughts on why none of these approaches work and what a correct one would be? Thanks

Re: how do I get primitive typ hints to appear in the output of a macro?

2012-07-19 Thread john
{:tag long}. On Wednesday, July 18, 2012 7:55:31 AM UTC-4, john wrote: Hello, how do I get primitive typ hints to appear in the output of a macro? like : (defmacro aTest [] `(~'defn ~'aFun [^long ~'b ] (meta ~'b) )) (macroexpand-1 '(aTest)) yields : (aFun 7) (macroexpand-1 '(aTest

how do I get primitive typ hints to appear in the output of a macro?

2012-07-18 Thread john
Hello, how do I get primitive typ hints to appear in the output of a macro? like : (defmacro aTest [] `(~'defn ~'aFun [^long ~'b ] (meta ~'b) )) (macroexpand-1 '(aTest)) yields : (aFun 7) (macroexpand-1 '(aTest)) yields : (defn aFun [b] (clojure.core/meta b)) but I wold like

Re: how do I get primitive typ hints to appear in the output of a macro?

2012-07-18 Thread Ambrose Bonnaire-Sergeant
Hi John, The type hint ^long expands to ^{:tag long}. So something like this should do the trick (untested). (defmacro aTest [] `(~'defn ~'aFun [^{:tag '~'long ~'b ] (meta ~'b) )) Thanks, Ambrose On Wed, Jul 18, 2012 at 7:55 PM, john john.vie...@gmail.com wrote: Hello, how do I get

Re: how do I get primitive typ hints to appear in the output of a macro?

2012-07-18 Thread john
) yields nil So I think the type hint are not on the param Am Mittwoch, 18. Juli 2012 14:18:21 UTC+2 schrieb Ambrose Bonnaire-Sergeant: Hi John, The type hint ^long expands to ^{:tag long}. So something like this should do the trick (untested). (defmacro aTest [] `(~'defn ~'aFun [^{:tag

Re: how do I get primitive typ hints to appear in the output of a macro?

2012-07-18 Thread Ambrose Bonnaire-Sergeant
, The type hint ^long expands to ^{:tag long}. So something like this should do the trick (untested). (defmacro aTest [] `(~'defn ~'aFun [^{:tag '~'long ~'b ] (meta ~'b) )) Thanks, Ambrose Hello, how do I get primitive typ hints to appear in the output of a macro? like : (defmacro

Re: how do I get primitive typ hints to appear in the output of a macro?

2012-07-18 Thread Meikel Brandmeyer (kotarak)
Hi, the correct syntax is (defmacro aTest [] `(defn ~'aFun [~(with-meta 'b {:tag 'long})])) ; (meta (first (nth (macroexpand-1 '(aTest)) 2))) = {:tag long} The 'long might also be a `long. I'm not sure about that one. Kind regards Meikel PS: Shameless self-promotion:

Re: how do I get primitive typ hints to appear in the output of a macro?

2012-07-18 Thread dgrnbrg
I don't think that the type hint will appear in the printed output. It is metadata, so it won't be shown by the printer. If you try (let [[_ _ [b] (macroexpand-1 '(aTest))] (meta b)) you should see {:tag long}. On Wednesday, July 18, 2012 7:55:31 AM UTC-4, john wrote: Hello, how do I get

Re: Why do I get Agent Failed when running futures/promise example?

2012-07-16 Thread Tassilo Horn
larry google groups lawrencecloj...@gmail.com writes: I copy and paste the example to my REPL in emacs. Everything seems to work fine, and I get the correct answer, and yet at the end I see a message that says Agent Failed. Why? What does it mean? This is from my REPL: user (def x

Re: Is there a better way to do this

2012-06-17 Thread Joao_Salcedo
Hi ALL, Thanks that is exactly what i was looking for :) On Saturday, June 16, 2012 12:30:45 AM UTC+10, Baishampayan Ghose wrote: Hi Baishampayan, (defn get-events-hlpr [] Retrieves events from MongoDB. (vec (mc/find-maps events))) Is that Emacs Lisp or Common Lisp?

Re: Is there a better way to do this

2012-06-17 Thread Joao_Salcedo
Hi Sean, That works just perfect !!! JS On Saturday, June 16, 2012 11:58:30 AM UTC+10, Sean Corfield wrote: On Fri, Jun 15, 2012 at 7:30 AM, Baishampayan Ghose b.gh...@gmail.com wrote: This is how it should be done, really - (defn get-events-hlpr Retrieves events from MongoDB.

How to do aynchrounous producer/consumer

2012-06-17 Thread Jeff Rose
-- 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

How to do aynchrounous producer/consumer

2012-06-17 Thread Jeff Rose
Java has queues that will do just what you want, as well as thread pools to process the jobs. It's reasonable and idiomatic to use this stuff from Clojure. http://docs.oracle.com/javase/1.5.0/docs/api/java/util/concurrent/ConcurrentLinkedQueue.html -Jeff -- You received this message

Re: How to do aynchrounous producer/consumer

2012-06-17 Thread Warren Lynn
wrote: Java has queues that will do just what you want, as well as thread pools to process the jobs. It's reasonable and idiomatic to use this stuff from Clojure. http://docs.oracle.com/javase/1.5.0/docs/api/java/util/concurrent/ConcurrentLinkedQueue.html -Jeff -- You received

Re: How to do aynchrounous producer/consumer

2012-06-16 Thread Warren Lynn
On Saturday, June 16, 2012 12:47:03 AM UTC-4, Alan Malloy wrote: (map consume (seque (produce-lazily))) Thank you! This is not exactly what I want (my input data is pushed from an external Java framework), but I was not aware there is a seque function, which might be useful for my other

Re: How to do aynchrounous producer/consumer

2012-06-16 Thread Zhitong He
try lamina? https://github.com/ztellman/lamina/ On Sat, Jun 16, 2012 at 9:44 AM, Warren Lynn wrn.l...@gmail.com wrote: What I want to do is something I probably have done dozens of times in C++: two threads, one thread putting items in a queue, another taking it out (FIFO). How to do

Is there a better way to do this

2012-06-15 Thread Joao_Salcedo
HI All, I am receiving a sequence from a particular function so I want to get that sequence and converted to a vector o I can return a vector instead. (defn get-events-hlpr [] Retrieves events from MongoDB. (init) (def items (mc/find-maps events)) ;; get the sequence (loop [vtr [] data

Re: Is there a better way to do this

2012-06-15 Thread Walter Tetzner
On Friday, June 15, 2012 9:54:37 AM UTC-4, Joao_Salcedo wrote: Is the right way? You could just do (vec (mc/find-maps events)). Also, using def creates a top-level var. You probably wanted (let [items (mc/find-maps events)] ...) instead. -- You received this message because you

Re: Is there a better way to do this

2012-06-15 Thread Walter Tetzner
You could just do (vec (mc/find-maps events)). Also, to dissoc :_id from each item, do (vec (map #(dissoc % :_id) (mc/find-maps events))). -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure

Re: Is there a better way to do this

2012-06-15 Thread Baishampayan Ghose
] (if (zero? (count data)) vtr (recur (conj vtr (dissoc (first data) :_id))(rest data) Is the right way? Why do you want to return a vector? Do you absolutely need some of the features that only vectors can provide (indexing, etc.)? Nevertheless, the code that you wrote is not correct

Re: Is there a better way to do this

2012-06-15 Thread Tassilo Horn
Baishampayan Ghose b.gh...@gmail.com writes: Hi Baishampayan, (defn get-events-hlpr [] Retrieves events from MongoDB. (vec (mc/find-maps events))) Is that Emacs Lisp or Common Lisp? Bye, Tassilo Just nitpicking that you adapted the OP's error of adding the docstring after the parameter

Re: Is there a better way to do this

2012-06-15 Thread Baishampayan Ghose
Hi Baishampayan, (defn get-events-hlpr []   Retrieves events from MongoDB.   (vec (mc/find-maps events))) Is that Emacs Lisp or Common Lisp? Bye, Tassilo Just nitpicking that you adapted the OP's error of adding the docstring after the parameter vector. ;-) You are right, Tassilo, I

How to do aynchrounous producer/consumer

2012-06-15 Thread Warren Lynn
What I want to do is something I probably have done dozens of times in C++: two threads, one thread putting items in a queue, another taking it out (FIFO). How to do it in Clojure? I am at a loss. I thought about a few options: 1. watches, but it cannot change the queue itself (can only watch

Re: Is there a better way to do this

2012-06-15 Thread Sean Corfield
On Fri, Jun 15, 2012 at 7:30 AM, Baishampayan Ghose b.gh...@gmail.com wrote: This is how it should be done, really - (defn get-events-hlpr  Retrieves events from MongoDB.  []  (vec (map #(dissoc :_id %) (mc/find-maps events ;; remove the :_id as well Or in Clojure 1.4.0 and later:

Re: How to do aynchrounous producer/consumer

2012-06-15 Thread Alan Malloy
(map consume (seque (produce-lazily))) On Friday, June 15, 2012 6:44:39 PM UTC-7, Warren Lynn wrote: What I want to do is something I probably have done dozens of times in C++: two threads, one thread putting items in a queue, another taking it out (FIFO). How to do it in Clojure? I am

problem compiling a file from with in slime while it works fine when I do a lein jar

2012-06-09 Thread Sunil S Nandihalli
Hi Everybody, I am trying to write a code using the thrift in clojure. The files generated by thrift are present and I am able to run lein jar and it successfully creates a jar. but when I am inside emacs and I try to do C-c C-k it fails to load(import) the class file corresponding to one

Re: problem compiling a file from with in slime while it works fine when I do a lein jar

2012-06-09 Thread Sunil S Nandihalli
at 3:43 PM, Sunil S Nandihalli sunil.nandiha...@gmail.com wrote: Hi Everybody, I am trying to write a code using the thrift in clojure. The files generated by thrift are present and I am able to run lein jar and it successfully creates a jar. but when I am inside emacs and I try to do C-c C

Re: How do I suppress warnings in a Clojurescript compilation?

2012-05-30 Thread Evan Mezeske
It sounds to me like you're using a plain JavaScriupt file as an externs definition. If that's the case, one way to get rid of the warnings is to clean up the externs file so that it only contains the function/variable names that are meant to be publicly used. As an example, here's the

Re: How do I suppress warnings in a Clojurescript compilation?

2012-05-30 Thread Stephen Cagle
David, I am depending on lein-cljsbuild 0.1.10 I am compiling by typing lein cljsbuild once This is the content of my project.clj's cljsbuild section: :cljsbuild {:crossovers [rpc.tree] :builds [{:source-path src/rpc/client :compiler {:output-to

Re: How do I suppress warnings in a Clojurescript compilation?

2012-05-30 Thread Evan Mezeske
Unfortunately, I have not been able to find even a decent resource on the general topic of creating extern definition files. So, please take this with a grain of salt, and let's hope someone more knowledgeable can come along and clear things up. My belief is that using an unmodified JS file

Re: How do I suppress warnings in a Clojurescript compilation?

2012-05-30 Thread Evan Mezeske
I also meant to mention that there are a ton of knobs on the closure compiler that are not exposed by the ClojureScript compiler. This is something I'd like to improve (or see improved) at some point, but it's a tricky problem, due to the vast number of options [1]. I expect the only way to

How do I use a bit of clojure code in clojurescript?

2012-05-28 Thread Stephen Cagle
I have a file (tree.clj) that I have written. All is well with that file. I want to use this file from both clojure and clojurescript. I can see that this works fine on the clojure side of things, as I type (at the repl) (use 'rpc.tree) and get back nil, I can then go ahead and do whatever

Re: How do I use a bit of clojure code in clojurescript?

2012-05-28 Thread Moritz Ulrich
. I can see that this works fine on the clojure side of things, as I type (at the repl) (use 'rpc.tree) and get back nil, I can then go ahead and do whatever with the methods of tree. *** Yes, the name of my project is rpc, I named a namespace tree, I am a monster. *** However, as stated, I

Re: Do you leave a Swank / nREPL in your production servers?

2012-05-26 Thread Denis Labaye
PM, Karl Krukow karl.kru...@gmail.com wrote: If I'm embedding swank clojure server in non-development, the code would need to start up swank - how would I do that? Just add swank as a non-dev dependency. The swank-clojure readme actually covers how to do embedding. Specifically: Add

Re: Do you leave a Swank / nREPL in your production servers?

2012-05-25 Thread Sean Allen
I've never done this w/ clojure but in my last job when we were using Gemstone Smalltalk, I made live code changes on a fairly regular basis. Get the quick fix out. Do the complete release cycle later. It was only a difference of 25 minutes, but often worth it. Not for the faint of heart. I felt

Re: Do you leave a Swank / nREPL in your production servers?

2012-05-25 Thread Karl Krukow
Sorry to ask what may be an obvious question to you. But what is a good way of embedding a swank server inside a production app? I'm kind of an emacs beginning and in development I just do lein swank and slime-connect from Emacs- that works fine. If I'm embedding swank clojure server in non

Re: Do you leave a Swank / nREPL in your production servers?

2012-05-25 Thread Phil Hagelberg
On Fri, May 25, 2012 at 1:41 PM, Karl Krukow karl.kru...@gmail.com wrote: If I'm embedding swank clojure server in non-development, the code would need to start up swank - how would I do that? Just add swank as a non-dev dependency. The swank-clojure readme actually covers how to do embedding

Re: Do you leave a Swank / nREPL in your production servers?

2012-05-25 Thread Karl Krukow
Sorry, and thanks for the info. /Karl On 25/05/2012, at 22.46, Phil Hagelberg wrote: On Fri, May 25, 2012 at 1:41 PM, Karl Krukow karl.kru...@gmail.com wrote: If I'm embedding swank clojure server in non-development, the code would need to start up swank - how would I do that? Just add

Re: Do you leave a Swank / nREPL in your production servers?

2012-05-25 Thread Sean Corfield
On Fri, May 25, 2012 at 1:46 PM, Phil Hagelberg p...@hagelb.org wrote: On Fri, May 25, 2012 at 1:41 PM, Karl Krukow karl.kru...@gmail.com wrote: If I'm embedding swank clojure server in non-development, the code would need to start up swank - how would I do that? Just add swank as a non-dev

Re: Do you leave a Swank / nREPL in your production servers?

2012-05-25 Thread Karl Krukow
swank clojure server in non-development, the code would need to start up swank - how would I do that? Just add swank as a non-dev dependency. The swank-clojure readme actually covers how to do embedding. Specifically: Add a dependency on [swank-clojure 1.4.2] Then in your code

Re: Do you leave a Swank / nREPL in your production servers?

2012-05-25 Thread Alan Malloy
server is trusted), but on a lot of production servers it strikes me as very dangerous to apply this suggestion carelessly. Assuming you have SSH access to the machine, by far the safest way to do it is to have swank only listen on localhost, and then use SSH port forwarding to redirect

Re: Do you leave a Swank / nREPL in your production servers?

2012-05-25 Thread Sean Corfield
On Fri, May 25, 2012 at 2:56 PM, Alan Malloy a...@malloys.org wrote: This may be good advice in some cases (eg when all network access to your server is trusted), but on a lot of production servers it strikes me as very dangerous to apply this suggestion carelessly. I was assuming that network

Do you leave a Swank / nREPL in your production servers?

2012-05-24 Thread blais
Hi, Just curious... Is it common for people deploying Clojure servers in a production environment to leave a swank or nrepl server running for making live bug fixes? Do you guys do this? Would you advise against it? Thanks, -- You received this message because you are subscribed to the Google

Re: Do you leave a Swank / nREPL in your production servers?

2012-05-24 Thread Jay Fields
or nrepl server running for making live bug fixes? Do you guys do this? Would you advise against it? Thanks, -- 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

Re: Do you leave a Swank / nREPL in your production servers?

2012-05-24 Thread Phil Hagelberg
On Thu, May 24, 2012 at 9:07 AM, blais goo...@furius.ca wrote: Is it common for people deploying Clojure servers in a production environment to leave a swank or nrepl server running for making live bug fixes? Do you guys do this?  Would you advise against it? I would recommend having

Re: Do you leave a Swank / nREPL in your production servers?

2012-05-24 Thread Sean Corfield
On Thu, May 24, 2012 at 9:07 AM, blais goo...@furius.ca wrote: Is it common for people deploying Clojure servers in a production environment to leave a swank or nrepl server running for making live bug fixes? Do you guys do this?  Would you advise against it? We've recently added swank server

Re: How do I set jvm options for a lein repl

2012-05-21 Thread Raju Bitter
Check the sample project.clj on Github: https://github.com/technomancy/leiningen/blob/master/sample.project.clj There's an entry for JVM options: ;; You can set JVM-level options here. :jvm-opts [-Xmx1g] In a quick test, that worked for me when lein repl was executed. - Raju -- You

Re: How do I set jvm options for a lein repl

2012-05-21 Thread Raju Bitter
Oh, sorry, misunderstood your question. I found this blog post, maybe this still works, although it's from 2010: http://www.clojurepla.net/2010/05/increase-jvm-memory-when-using-swank.html -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this

Re: How do I set jvm options for a lein repl

2012-05-21 Thread Moritz Ulrich
That blog post is pretty outdated. When using leiningen, you can pass arbitrary jvm opts via project.clj[1]: :jvm-opts [-Xmx1g] [1]: https://github.com/technomancy/leiningen/blob/master/sample.project.clj On Mon, May 21, 2012 at 1:37 PM, Raju Bitter rajubit...@googlemail.com wrote: Oh, sorry,

Re: How do I set jvm options for a lein repl

2012-05-21 Thread Raju Bitter
How do I set jvm options for a lein repl initiated independently of a project?   In particular, I want the heap expansion that results from doing M-x clojure-jack-in in an emacs project.clj buffer with :jvm-opts [ -Xms4G -Xmx4G] in its defproject form. Larry is looking for a way to set

Re: How do I set jvm options for a lein repl

2012-05-21 Thread Roberto Mannai
You could add the following evinroment variable to your OS: LEIN_JVM_OPTS=-Xms4G -Xmx4G On Windows for example, you could add at the top of lein.bat file the following line (under @echo off): SET LEIN_JVM_OPTS=-Xms4G -Xmx4G This should be enough to do the trick. On Mon, May 21, 2012 at 6:51 AM

Re: How do I set jvm options for a lein repl

2012-05-21 Thread Mikhail Kryshen
Also there is an environment variable _JAVA_OPTIONS (note the leading underscore) which is handled by the HotSpot JVM (OpenJDK or Oracle JDK) and can be used with any java application. -- Mikhail -- You received this message because you are subscribed to the Google Groups Clojure group. To post

Re: How do I set jvm options for a lein repl

2012-05-21 Thread Phil Hagelberg
On Mon, May 21, 2012 at 5:28 AM, Raju Bitter rajubit...@googlemail.com wrote: How do I set jvm options for a lein repl initiated independently of a project?   In particular, I want the heap expansion that results from doing M-x clojure-jack-in in an emacs project.clj buffer with :jvm-opts

Re: How do I set jvm options for a lein repl

2012-05-21 Thread Larry Travis
I should be switching over to Leiningen 2 shortly in any case, but I am curious. How does one set JVM_OPTS as an environment variable? --Larry On 5/21/12 11:42 AM, Phil Hagelberg wrote: On Mon, May 21, 2012 at 5:28 AM, Raju Bitterrajubit...@googlemail.com wrote: How do I set jvm options

Re: How do I set jvm options for a lein repl

2012-05-21 Thread Softaddicts
. Luc I should be switching over to Leiningen 2 shortly in any case, but I am curious. How does one set JVM_OPTS as an environment variable? --Larry On 5/21/12 11:42 AM, Phil Hagelberg wrote: On Mon, May 21, 2012 at 5:28 AM, Raju Bitterrajubit...@googlemail.com wrote: How do I

Re: How do I set jvm options for a lein repl

2012-05-21 Thread Softaddicts
wrote: On Mon, May 21, 2012 at 5:28 AM, Raju Bitterrajubit...@googlemail.com wrote: How do I set jvm options for a lein repl initiated independently of a project? In particular, I want the heap expansion that results from doing M-x clojure-jack-in in an emacs project.clj buffer

Re: How do I set jvm options for a lein repl

2012-05-21 Thread Larry Travis
as an environment variable? --Larry On 5/21/12 11:42 AM, Phil Hagelberg wrote: On Mon, May 21, 2012 at 5:28 AM, Raju Bitterrajubit...@googlemail.com wrote: How do I set jvm options for a lein repl initiated independently of a project? In particular, I want the heap expansion that results from doing M-x

How do I set jvm options for a lein repl

2012-05-20 Thread Larry Travis
How do I set jvm options for a /lein repl/ initiated independently of a project? In particular, I want the heap expansion that results from doing M-x clojure-jack-in in an emacs /project.clj/ buffer with :jvm-opts [ -Xms4G -Xmx4G] in its defproject form. --Larry -- You received

How do I modify the clojure.org website?

2012-05-10 Thread Brent Millare
I put an issue [clj-989] about an out of date link clojure. It doesn't seem like anyone payed any attention to it yet. Is there a way I can be more active in making these changes such as having permission to modify the website? -- You received this message because you are subscribed to the

Re: How do I modify the clojure.org website?

2012-05-10 Thread Alex Miller
I updated the link for you. On Thursday, May 10, 2012 5:03:26 PM UTC-5, Brent Millare wrote: I put an issue [clj-989] about an out of date link clojure. It doesn't seem like anyone payed any attention to it yet. Is there a way I can be more active in making these changes such as having

Re: How Do I Install New Version Of Clojure?

2012-04-16 Thread John Gabriele
On Apr 15, 1:45 am, Anto anto.aravinth@gmail.com wrote: I want to install clojure version 1.3, which I guess is the latest. I tried sudo apt-get install clojure which installs clojure 1.1 by default. I use Ubuntu 10.10 Thanks in advance. Hi, Anto. I've got some beginner instructions

How do you use defmulti to create a function with a variable number of args?

2012-04-16 Thread James Thornton
How do you use defmulti to create a function with a variable number of args? For example, add-item is wrapping a Java method that can take a variable number of args, and so here I am trying to make add-item take zero, one, or two args. Notice there are two singe-arg funcs -- each taking

Re: How do you use defmulti to create a function with a variable number of args?

2012-04-16 Thread Ambrose Bonnaire-Sergeant
This should do the trick: (defmulti add-item (fn [i other] (class i)) Thanks, Ambrose On Mon, Apr 16, 2012 at 5:33 AM, James Thornton james.thorn...@gmail.comwrote: How do you use defmulti to create a function with a variable number of args? For example, add-item is wrapping a Java method

Re: How do you use defmulti to create a function with a variable number of args?

2012-04-16 Thread Jay Fields
note, I didn't test any of these, but they should work (possibly with a tweak or 2) There's quite a few ways to do this, here's one. (defmulti add-item (fn [ args] (condp count args 0 :none 1 (class (first args)) :default)) (defmethod add-item :none (add-item nil nil)) (defmethod add-item

Re: How do you use defmulti to create a function with a variable number of args?

2012-04-16 Thread Jay Fields
I might be wrong, but I think that would cause (add-item 1 {:prop here}) to call the wrong defmethod (should call 4th, calls 2nd) On Mon, Apr 16, 2012 at 12:47 PM, Ambrose Bonnaire-Sergeant abonnaireserge...@gmail.com wrote: This should do the trick: (defmulti add-item (fn [i other] (class i

How Do I Install New Version Of Clojure?

2012-04-15 Thread Anto
I want to install clojure version 1.3, which I guess is the latest. I tried sudo apt-get install clojure which installs clojure 1.1 by default. I use Ubuntu 10.10 Thanks in advance. -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this

Re: How Do I Install New Version Of Clojure?

2012-04-15 Thread Qiu Xiafei
I advice you download the clojure package from clojure.org, and unzip it. Then you can put it to any where you want. Finally, write a shell script named clojure, and put the script to $PATH #! /bin/sh java -cp /path/to/your/downloaded/clojure.jar clojure.main On Sun, Apr 15, 2012 at 1:45 PM, Anto

Re: How Do I Install New Version Of Clojure?

2012-04-15 Thread Anto
Thanks for your reply! Will look into it! -- 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

Re: How Do I Install New Version Of Clojure?

2012-04-15 Thread James Reeves
On 15 April 2012 15:35, Anto anto.aravinth@gmail.com wrote: Thanks for your reply! Will look into it! You'll likely want to use Clojure via Leiningen, rather than use the raw jar: https://github.com/technomancy/leiningen - James -- You received this message because you are subscribed to

Re: where do you put the docstring in a deftype declaration?

2012-04-13 Thread Frank Siebenlist
Thanks - I kind of expected this - the previous implementation in contrib for 1.2 was based on vars and still shows docstrings in the signature on clojuredocs. There is CLJ-304 contrib get-source no longer works with deftype which seems related. Too bad that we cannot annotate deftypes (and

where do you put the docstring in a deftype declaration?

2012-04-12 Thread Frank Siebenlist
Confusingly yours, FrankS. -- 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

<    5   6   7   8   9   10   11   12   13   14   >