Re: is there a tutorial about working at the REPL?

2013-12-28 Thread John Mastro
Hi Larry, > 4.) load whatever file holds the (main-) function that starts the app. So for > me, for instance, it might be: (load-file "src/admin/core.clj") I don't think the `load-file` should be necessary. Do things not work if you omit it? The code on disk when you jacked in will already have

Re: In your opinion, what's the best, and what's the worst aspects of using Clojure?

2013-12-28 Thread Colin Fleming
Sure, in general I think your criticisms are very constructive, and I think we do need to try to identify the pain points as much as possible. Thanks for the explanation! I agree that the community is one of the best features of Clojure. On 29 December 2013 16:37, Lee Spector wrote: > > On Dec

Re: In your opinion, what's the best, and what's the worst aspects of using Clojure?

2013-12-28 Thread Lee Spector
On Dec 28, 2013, at 8:51 PM, Colin Fleming wrote: > Just out of interest (and I'm not trying to be combative here, I'm genuinely > curious) - it seems from many of your posts here that this is a serious pain > point for you. Why not just use another lisp? High-performance numeric > programming

Re: Recommendations for a project with learning-friendly bugs and devs?

2013-12-28 Thread Tim Visher
Leiningen as well. :) On Fri, Dec 27, 2013 at 1:53 PM, Jakub Holy wrote: > Hello, > > I'd like to sharpen my Clojure skill by contributing to an open source > project and getting feedback on my patches from its developers. Can you > recommend a project that would be suitable? Preferably something

Re: In your opinion, what's the best, and what's the worst aspects of using Clojure?

2013-12-28 Thread larry google groups
I like this: (defmacro dump-locals [] `(clojure.pprint/pprint ~(into {} (map (fn [l] [`'~l l]) (reverse (keys &env)) Slingshot also allows one to throw+ an object that is full of local information: https://github.com/scgilardi/slingshot And Michael Drogalis's library Dire rece

Re: In your opinion, what's the best, and what's the worst aspects of using Clojure?

2013-12-28 Thread larry google groups
> What still scars me in terms of incorporating Clojure as a language of choice in more > complicated projects I work on in my other life, is the error reporting facility. The > errors sometimes might as well just say 'I just cannot run!'. It would be nice if > there was some facility to ap

Re: In your opinion, what's the best, and what's the worst aspects of using Clojure?

2013-12-28 Thread Colin Fleming
Just out of interest (and I'm not trying to be combative here, I'm genuinely curious) - it seems from many of your posts here that this is a serious pain point for you. Why not just use another lisp? High-performance numeric programming doesn't seem like Clojure's strong point and the error handlin

is there a tutorial about working at the REPL?

2013-12-28 Thread larry google groups
I have been working with Clojure now some of the time for the last 18 months, so I am no longer a complete noob. But I still have many questions about how to work at the REPL. In particular, I don't understand how the REPL interacts with the class path. I have an app that is working. When I

Re: In your opinion, what's the best, and what's the worst aspects of using Clojure?

2013-12-28 Thread Lee Spector
On Dec 28, 2013, at 4:46 PM, Cedric Greevey wrote: > Eh, the above should just parallelize working with a single big population. > It's not partitioned as far as making-the-cut is concerned, nor crossover > (given that each thread adds its M crossover-generated entities by reference > to the w

Re: Possible to "dual license" open source Clojure project under EPL with commercial option?

2013-12-28 Thread Softaddicts
Re-reading your email, I realize that you may want to license the same code both as an open source and as a commercial product. >From a customer perspective, if they use it as a binary why not. If you are the author of the software you can license it as you wish. Now if your customer get access

Re: How do I serve clojure pages with nginx

2013-12-28 Thread Ahmet Zeynel
Thanks so much! That worked: deploy@ubuntu:~$ sudo start nomilkforme [sudo] password for deploy: nomilkforme start/running, process 19945 deploy@ubuntu:~$ One more question: When I go to www.nomilkfor.me I see the 'jetty' favicon on the browser tab. Is it because ring is using jetty? I assume tha

Re: Possible to "dual license" open source Clojure project under EPL with commercial option?

2013-12-28 Thread Softaddicts
This may help you. http://www.eclipse.org/legal/eplfaq.php#USEINANOTHER If you are not modifying/reusing the licensed source code in your own code and are using the licensed software as a binary component then what you create on top of it is your own. I you touch the source code of the licensed

[ANN] Intro tutorial

2013-12-28 Thread Karsten Schmidt
Dear all, just wanted to briefly announce a new Clojure introduction tutorial series with its first part (15k+ words) just been published: http://www.creativeapplications.net/tutorials/introduction-to-clojure-part-1/ Whereas this intro is purely focused on basics, the following ones will deal wi

Re: How do I serve clojure pages with nginx

2013-12-28 Thread Mark Mandel
I have found in the past I needed to reload-configuration of initctl. Maybe try that? Mark Sent from my mobile doohickey On 29/12/2013 9:14 AM, "James Reeves" wrote: > The script I included in my example assumes that there is a "deploy" user > that owns the "/deploy" directory and everything i

Re: Clojure west?

2013-12-28 Thread boz
I know it's not January yet :) but any firm date set? thanks! chris On Saturday, December 14, 2013 7:21:33 PM UTC-8, Alex Miller wrote: > > Clojure/West will be in San Francisco this year. We are working on a > contract for the last week in March but this IS NOT YET a firm date. We > will of cou

Re: How do I serve clojure pages with nginx

2013-12-28 Thread James Reeves
The script I included in my example assumes that there is a "deploy" user that owns the "/deploy" directory and everything in it. - James On 28 December 2013 19:18, Ahmet Zeynel wrote: > Earlier I changed the permissions in /deploy but now I put it back to root > and now I have: > > z@ubuntu:/

Re: Recommendations for a project with learning-friendly bugs and devs?

2013-12-28 Thread Mikera
It's not really web focused, but core.matrix has quite a few relatively simple / beginner-friendly issues to tackle right now: https://github.com/mikera/core.matrix/issues?state=open Contributions always welcome, and I like to think we are a friendly and helpful crowd :-) On Friday, 27 Decembe

Re: In your opinion, what's the best, and what's the worst aspects of using Clojure?

2013-12-28 Thread Cedric Greevey
Eh, the above should just parallelize working with a single big population. It's not partitioned as far as making-the-cut is concerned, nor crossover (given that each thread adds its M crossover-generated entities by reference to the whole pool of survivors from the previous round). The only constr

Possible to "dual license" open source Clojure project under EPL with commercial option?

2013-12-28 Thread Michael Bradley, Jr.
Do any Clojure developers have experience with "dual licensing" an open source Clojure project under the EPL with the option of a commercial license? I have in mind corporate customer-developers for one of my projects who aren't comfortable with the terms of the EPL – i.e. they desire to embrac

Re: In your opinion, what's the best, and what's the worst aspects of using Clojure?

2013-12-28 Thread Lee Spector
On Dec 28, 2013, at 3:11 PM, Cedric Greevey wrote: > Adding to the above, in the specific context of genetic programming, I'd > suggest dividing the population into N subsets, one per core, and trialling > them in parallel to generate fitness scores; then parallel-mergesort to get a > ranked o

Re: In your opinion, what's the best, and what's the worst aspects of using Clojure?

2013-12-28 Thread Lee Spector
On Dec 28, 2013, at 2:56 PM, Cedric Greevey wrote: > Your requirements are unusual. > > That being said, you might want to consider: > > 1. Using a PRNG with recordable seed, and sane concurrency semantics, to > achieve repeatability -- rerun with same seed to get identical replay of > events.

Re: In your opinion, what's the best, and what's the worst aspects of using Clojure?

2013-12-28 Thread Cedric Greevey
Adding to the above, in the specific context of genetic programming, I'd suggest dividing the population into N subsets, one per core, and trialling them in parallel to generate fitness scores; then parallel-mergesort to get a ranked order; then (apply map vector (partition (/ num-to-keep num-cores

Re: In your opinion, what's the best, and what's the worst aspects of using Clojure?

2013-12-28 Thread Cedric Greevey
On Sat, Dec 28, 2013 at 12:45 PM, Lee Spector wrote: > > On Dec 28, 2013, at 11:27 AM, Cedric Greevey wrote: > > > > It helps to go with the "functional, immutable" flow, in which case if > you get an unwanted exception it should *usually* have bubbled up from some > failing test. Add a dump-local

Re: In your opinion, what's the best, and what's the worst aspects of using Clojure?

2013-12-28 Thread Brian Craft
heh. Yes, well put. On Saturday, December 28, 2013 4:26:18 AM UTC-8, James Reeves wrote: > > The worst aspect of Clojure is probably its dependency on the JVM - which > also happens to be one of its best attributes as well. > > A lot of the rough edges Clojure has can be traced back to trade-offs

Re: In your opinion, what's the best, and what's the worst aspects of using Clojure?

2013-12-28 Thread Brian Craft
Yes, exactly, the error messages are often very obtuse. In part this is just the nature of dynamic languages: if you don't sanity check data structures at API boundaries, you get errors reported from obscure corners of implementation. Also, laziness can lead to very deep, very confusing stack t

Re: How do I serve clojure pages with nginx

2013-12-28 Thread Ahmet Zeynel
Earlier I changed the permissions in /deploy but now I put it back to root and now I have: z@ubuntu:/deploy$ ll total 8164 drwxr-xr-x 2 root root4096 Dec 27 08:20 ./ drwxr-xr-x 24 root root4096 Dec 27 08:09 ../ -rw-r--r-- 1 root root 8351715 Dec 27 08:20 my-webapp-0.1.0-standalone.jar a

Re: How do I serve clojure pages with nginx

2013-12-28 Thread James Reeves
The one with the name of your app, if there is one. There's a log file per upstart service. - James On 28 December 2013 18:00, Ahmet Zeynel wrote: > Great, I used zcat to look at them but I think they are too long to post > here, do you know which one(s) would be relevant? > > z@ubuntu:/var/lo

Re: How do I serve clojure pages with nginx

2013-12-28 Thread Ahmet Zeynel
Great, I used zcat to look at them but I think they are too long to post here, do you know which one(s) would be relevant? z@ubuntu:/var/log/upstart$ ls console-setup.log.1.gz container-detect.log.1.gz module-init-tools.log.1.gz networking.log.1.gz network-interface-eth0.log.1.gz procps.log.1.gz p

Re: In your opinion, what's the best, and what's the worst aspects of using Clojure?

2013-12-28 Thread Lee Spector
On Dec 28, 2013, at 11:27 AM, Cedric Greevey wrote: > > It helps to go with the "functional, immutable" flow, in which case if you > get an unwanted exception it should *usually* have bubbled up from some > failing test. Add a dump-locals where suggested by the stack trace and rerun > the fail

Re: How do I serve clojure pages with nginx

2013-12-28 Thread James Reeves
Logs are automatically gzipped up after a while, I believe. You can use something like zcat to take a look inside. - James On 28 December 2013 17:24, Zeynel wrote: > Yes, but I don't see nomilkforme.log file. There are only .gz files: > > z@ubuntu:/var/log/upstart$ ls > console-setup.log.1.gz

Re: How do I serve clojure pages with nginx

2013-12-28 Thread Zeynel
Yes, but I don't see nomilkforme.log file. There are only .gz files: z@ubuntu:/var/log/upstart$ ls console-setup.log.1.gz container-detect.log.1.gz module-init-tools.log.1.gz networking.log.1.gz network-interface-eth0.log.1.gz procps.log.1.gz procps-static-network-up.log.1.gz procps-virtual-filesy

Re: How do I serve clojure pages with nginx

2013-12-28 Thread James Reeves
Upstart gives you useful tools like respawning failed services, log rotation, and starting on server boot. Have you checked the logs in /var/log/upstart/nomilkforme.log? Perhaps it's got something to do with the permissions of the deploy directory. - James On 28 December 2013 17:08, Zeynel wro

Re: How do I serve clojure pages with nginx

2013-12-28 Thread Zeynel
I tried it like this and it seems to work: z@ubuntu:/etc/nginx/sites-available$ export PORT=4000 z@ubuntu:/etc/nginx/sites-available$ java -jar /deploy/my-webapp-0.1.0-standalone.jar 2013-12-28 11:58:16.307:INFO:oejs.Server:jetty-7.x.y-SNAPSHOT 2013-12-28 11:58:16.409:INFO:oejs.AbstractConnector:

Re: In your opinion, what's the best, and what's the worst aspects of using Clojure?

2013-12-28 Thread Cedric Greevey
On Sat, Dec 28, 2013 at 3:56 AM, Lee Spector wrote: > > On Dec 27, 2013, at 11:33 PM, guns wrote: > > > On Fri 27 Dec 2013 at 11:23:22PM -0500, Lee Spector wrote: > >> > >> On Dec 27, 2013, at 11:18 PM, guns wrote: > >>> > >>> (defmacro dump-locals [] ... > >>> ` > >> When and where do you call t

Re: How do I serve clojure pages with nginx

2013-12-28 Thread Zeynel
Ok, I am having problems starting nginx with upstart as mentioned by James Reeves. Would starting with tmux work as well. Can you give more info? On Wednesday, December 18, 2013 6:40:51 PM UTC-4, Curtis Gagliardi wrote: > > I don't know how to configure an init script, but I just run the command

Re: How do I serve clojure pages with nginx

2013-12-28 Thread Zeynel
Thanks, I just sent them an email asking more info. On Friday, December 27, 2013 7:22:12 PM UTC-4, Alexis Gallagher wrote: > > It's not free, but Kevin Lynagh sells a collection of nicely packaged and > documented examples of basic dev ops setups. The package on server config > illustrates exact

Re: How do I serve clojure pages with nginx

2013-12-28 Thread Zeynel
Can I deploy this as explained here http://www.luminusweb.net/docs/deployment.md#running_standalone with java -jar myapp-0.1.0-SNAPSHOT-standalone.jar On Wednesday, December 25, 2013 10:06:58 AM UTC-4, James Reeves wrote: > > I currently serve a web app on a Ubuntu server. Here's the configurat

Re: How do I serve clojure pages with nginx

2013-12-28 Thread Zeynel
Is there another way to start the server besides using upstart? On Friday, December 27, 2013 9:44:10 PM UTC-4, James Reeves wrote: > > The script looks fine... Are you executing "start nomilkforme" as root or > with sudo? Do you have a "deploy" user and a "/deploy" directory? > > - James > > > On

Re: How do I serve clojure pages with nginx

2013-12-28 Thread Zeynel
I am still unable to "start nomilkforme". I get this error: z@ubuntu:/tmp$ sudo start nomilkforme start: Job failed to start When I try $ init-checkconf -d /etc/init/nomilkforme.conf I get z@ubuntu:/deploy$ init-checkconf -d /etc/init/nomilkforme.conf DEBUG: upstart_path=/sbin/init DEBUG: initct

Re: In your opinion, what's the best, and what's the worst aspects of using Clojure?

2013-12-28 Thread Mikera
On Friday, 27 December 2013 21:17:48 UTC, Kelker Ryan wrote: > > In your opinion, what's the best, and what's the worst aspects of using > Clojure? > The best part is the community + ecosystem: the innovative and useful libraries created by the community that build on Clojure's design strengths

a simple macro to tame the run-away loop-recurs

2013-12-28 Thread Sunil S Nandihalli
Hi Everybody, I just wrote a simple macro to tame the run-away loop-recur infinite loops. Some of you may find use for it. It only handles loop-recur pairs not fn-recur combination. It is trivial but useful .. so thought of sharing. (defmacro limit [max-recurs loop-expr] (let [[_ bindings & bod

Re: Monitoring a Clojure app, possibly with New Relic

2013-12-28 Thread James Thornton
Here's what you need to do to get the New Relic plugin working with a Clojure/Pedestal app on Heroku. It took some fiddling because there are several versions of docs floating around for doing this, but none of them were quite right. See https://gist.github.com/espeed/8159198 - James On Fri

Re: In your opinion, what's the best, and what's the worst aspects of using Clojure?

2013-12-28 Thread James Reeves
The worst aspect of Clojure is probably its dependency on the JVM - which also happens to be one of its best attributes as well. A lot of the rough edges Clojure has can be traced back to trade-offs with running on a VM built for another language. The stacktraces of lazy sequences, the limitations

Re: Namespaces [was Re: Is Clojure right for me?]

2013-12-28 Thread guns
On Sat 28 Dec 2013 at 05:12:24AM -0600, guns wrote: > (defn +. [precision & xs] …) > (defn *. [precision & xs] …) > … > (defmacro with-precision [precision & body] > `(let [~'+ ~(partial +. precision) > …] > ~@body)) I just realized that this does not h

Re: Namespaces [was Re: Is Clojure right for me?]

2013-12-28 Thread guns
On Sat 28 Dec 2013 at 12:21:22AM -0800, Mark Engelberg wrote: > You have to thread your shared state through all the functions (what > I described as "Solution 2"), and if you don't want the difficulty of > refactoring to that way of doing things, you better just do it that > way from the beginnin

Re: Namespaces [was Re: Is Clojure right for me?]

2013-12-28 Thread James Reeves
On 28 December 2013 08:21, Mark Engelberg wrote: > > `with-precision` has the same limitations as bindings -- if you want to > produce, for example, a lazy sequence involving decimal arithmetic, you're > going to get burned. Maybe in some projects you can get away with just > setting a default p

Re: clojure.java.jdbc 0.3.0 column name handling

2013-12-28 Thread rod naph
That's perfect, thanks for taking the time to write back. Look forward to the updated documentation, would be a big help. :) On Saturday, December 21, 2013 7:56:59 PM UTC, rod naph wrote: > > with the new release of java.jdbc 0.3.0 i can't quite work out how the > quoting support for column name

Re: In your opinion, what's the best, and what's the worst aspects of using Clojure?

2013-12-28 Thread Lee Spector
On Dec 27, 2013, at 11:33 PM, guns wrote: > On Fri 27 Dec 2013 at 11:23:22PM -0500, Lee Spector wrote: >> >> On Dec 27, 2013, at 11:18 PM, guns wrote: >>> >>> (defmacro dump-locals [] ... >>> ` >> When and where do you call this? > > I call this inside of the closest function that raised the e

Re: Namespaces [was Re: Is Clojure right for me?]

2013-12-28 Thread Mark Engelberg
I read through the docs on jig and component. Basically, the answer proposed by that workflow is: You have to thread your shared state through all the functions (what I described as "Solution 2"), and if you don't want the difficulty of refactoring to that way of doing things, you better just do i