Re: Clojure stack

2011-05-16 Thread Ken Wesson
On Mon, May 16, 2011 at 10:33 PM, Timothy Washington wrote: > This is an interesting discussion. Rich Hickey and Steve Yegge recently > weighed in on the Seajure discussion group (and later discussed on HN). > Yegge basically takes Laszlo's position (clojure needs to start saying yes), > while Hic

Re: Clojure stack

2011-05-16 Thread Sean Corfield
On Mon, May 16, 2011 at 7:33 PM, Timothy Washington wrote: > This is an interesting discussion. Rich Hickey and Steve Yegge recently > weighed in on the Seajure discussion group (and later discussed on HN). > Yegge basically takes Laszlo's position (clojure needs to start saying yes), > while Hick

Re: Clojure stack

2011-05-16 Thread Timothy Washington
This is an interesting discussion. Rich Hickey and Steve Yegge recently weighed in on the Seajure discussion group (and later discussed on HN). Yegge basically takes Laszlo's position (clojure needs to start saying yes), while Hickey takes Nick's position. - http://groups.google.com/group/seaju

Re: Downloading a file using compojure

2011-05-16 Thread Alan
You need to set the Content-Disposition header yourself, probably. Content-Disposition: attachment; filename="fname.ext" On May 16, 5:27 pm, clj123123 wrote: > Hi, > > I need to download files from a server to the client. I'm using jetty > and compojure as the app server. > > (defroutes main-rou

Downloading a file using compojure

2011-05-16 Thread clj123123
Hi, I need to download files from a server to the client. I'm using jetty and compojure as the app server. (defroutes main-route (GET "/download" [] (java.io.File. "testdir/test.zip"))) when the page is called from the browser: http://localhost:8080/download the downloaded file name is "dow

Re: A Leiningen configuration question

2011-05-16 Thread Phil Hagelberg
On May 15, 10:03 am, David Cabana wrote: > There are dev dependencies (Marginalia, swank-clojure) that I want > added to every new Leiningen project.  Is there a way to configure > lein so that these are automatically inserted into the project.clj > file on project creation? Also as long as they

Re: How to defer name resolution till run-time?

2011-05-16 Thread Trastabuga
The (@(resolve 'swank.swank/start-repl) 4006) works well! Thank you, Andrei On May 14, 1:49 pm, Meikel Brandmeyer wrote: > Hi, > > Am 14.05.2011 um 00:35 schrieb Trastabuga: > > > I(defn -main [& args] > >  (do > >    (require 'swank.swank) > >    (swank.swank/start-repl 4006)) > >  (run-jetty

Re: Clojure group in DFW area

2011-05-16 Thread ch...@rubedoinc.com
Meeting tonight, see you there ! Our next meeting is scheduled for May 16th 630PM - 900PM @ Rubedo, inc. 14580 Beltwood Pkwy E Suite 103 Farmers Branch, TX 75244 (wifi available) On May 4, 11:20 am, "ch...@rubedoinc.com" wrote: > Thanks everyone for attending the first meeting.  It was great to

Re: How to defer name resolution till run-time?

2011-05-16 Thread Trastabuga
As I mentioned in my previous post http://groups.google.com/group/clojure/browse_thread/thread/4bb9cfe0d3870c1e If I put (ns ... (:require swank.swank)) in the beginning of the main file, the lein uberjar hangs after copying files. That's why I wanted to try a different approach. Thank you, An

Re: Import other .clj files

2011-05-16 Thread Jonathan Fischer Friberg
Putting (ns test) in both files means that the content of the files are in the same namespace, this is essentially the same as putting everything in the same file. To be able to access something from the other file you need to "require", or "use" the other namespace. If you want to access the cont

Re: Joy of Clojure errata: Chapter 5

2011-05-16 Thread Fogus
Hi Ken, Thanks for this. I agree that a different name would be much more clear. As a side note, maybe we could use a single thread for JoC related flubs so as not to clog the mailing list on a chapter-by-chapter basis? Another option is to use Manning's forum at http://www.manning-sandbox.com/

Re: Subvector

2011-05-16 Thread Christophe Grand
Or: (defn sv [vector value] (let [i (.indexOf ^java.util.List vector value)] (if (neg? i) [] (subvec vector i On Sat, May 14, 2011 at 7:50 PM, Jonathan Fischer Friberg < odysso...@gmail.com> wrote: > I think this should be pretty fast > https://gist.github.com/972423 > > It is at least

Joy of Clojure errata: Chapter 5

2011-05-16 Thread Ken Wesson
In section 5.2.6: "A MapEntry is its own type and has two functions for retrieving its contents: key and val, which do exactly the same thing as (nth my-map 0) and (nth my-map 1), respectively." Er, unclear at best. I think (nth my-map-entry x) would be better. Calling nth on a map throws an exce

Re: A Leiningen configuration question

2011-05-16 Thread Robin Ramael
I asked this question as a leiningen issue on github a week or so a go. Technomancy kindly referred me to the spawn plugin for leiningen. https://github.com/levand/spawn I haven't tried it though. Robin On 15 mei, 19:03, David Cabana wrote: > There are dev dependencies (Marginalia, swank-clojur

Re: Clojure stack

2011-05-16 Thread Nick Zbinden
Coming up with a clojure stack is not really clojury. I think clojure does not really lack far behind scala/akka and its much simpler. I don't really know about IDEs I can see how that could be a problem. -- You received this message because you are subscribed to the Google Groups "Clojure" grou

Re: shell process hangs in REPL

2011-05-16 Thread Wei Hsu
Just to close out this thread, my workaround was to use Clojure to generate a shell script which I then ran manually from the command line. On May 15, 8:40 am, Wei Hsu wrote: > Thanks Meikel, I am using leiningen and that works beautifully! > > So, I'm pretty sure it's a memory issue since the wk

Re: Clojure stack

2011-05-16 Thread László Török
I know about clojure.com. :) Just wanted to point out, that there is some competition in the space. :) Enterprise cloud computing is the new buzz word, and the clojure team (or someelse) will have to come up with a SW stack aiming this space, just as the typesafe.com guys (Martin Odersky et. al) d

Re: Clojure 1.3 Alpha 7

2011-05-16 Thread Tassilo Horn
ataggart writes: Hi, > The min-hash function throwing that exception is no longer used by > case, though it is still used by the protocols internals, so that's > what's running into the collision. Ah, ok. I've thought protocols dispatch using `case', so I expected my problem being fixed. Is t

Aw: Re: Joy of Clojure errata: Chapter 2

2011-05-16 Thread Meikel Brandmeyer
Hi, Am Montag, 16. Mai 2011 09:47:30 UTC+2 schrieb Ken Wesson: > And am I the only one bothered by the "syntaxy" behavior of the ns > related functions and sparse and unclear documentation thereof? > No. There were actions started to revise and improve these things. But obviously the personal li

Re: Clojure stack

2011-05-16 Thread Nick Zbinden
I thing the java guys are late :) http://clojure.com/ On May 16, 9:42 am, László Török wrote: > I've just come across this: > > http://typesafe.com/company > > I believe Clojure will have to take a similar path in order to achieve > broader (enterprise) acceptance. > > I'm sure Rich and the core

Re: Joy of Clojure errata: Chapter 2

2011-05-16 Thread Ken Wesson
On Mon, May 16, 2011 at 3:41 AM, Alan wrote: > The :rename option is not supported in that context. It didn't say it was unsupported in that context; it said it was unsupported period. That is misleading. And am I the only one bothered by the "syntaxy" behavior of the ns related functions and sp

Re: Joy of Clojure errata: Chapter 2

2011-05-16 Thread Alan
The :rename option is not supported in that context. The :reload option is unsupported in that context. I mention this to make it clear that some options are supported, and :rename is not one of them. The fact that :rename is supported in another context does not make it a bug for this message to s

Clojure stack

2011-05-16 Thread László Török
I've just come across this: http://typesafe.com/company I believe Clojure will have to take a similar path in order to achieve broader (enterprise) acceptance. I'm sure Rich and the core dev team are working towards this goal... -- László Török Skype: laczoka2000 Twitter: @laczoka -- You re

Re: Clojure 1.3 Alpha 7

2011-05-16 Thread ataggart
The min-hash function throwing that exception is no longer used by case, though it is still used by the protocols internals, so that's what's running into the collision. On May 15, 10:14 am, Tassilo Horn wrote: > Christopher Redinger writes: > > = 0 Changes from 1.3 Alpha 6 to 1.3 Alpha 7 (05/1

Re: Clojure 1.3 Alpha 7

2011-05-16 Thread Tassilo Horn
Christopher Redinger writes: Hi Christopher, > Can you supply a small example where this is happening? No, I don't have a small, standalone example. :-( The problem appeared when I converted my project from multimethods to protocols. You can clone my mercurial project and run the tests, which