using the same middleware (wrap-multipart-params) with different parameters in one app [ring] [compojure]

2014-04-03 Thread K Livingston
I'm trying to dynamically handle the InputStream in file uploads (ring/compojure app via servlet/jetty). I started with two different versions of the wrap-multipart-params, one is basically a NoOp that just returns the file name, and the other echoes the file back. They both work fine indepen

Re: using contrib functions

2014-04-03 Thread PlĂ­nio Balduino
You can copy the source to your project or write your own. That function basically wraps Socket and SocketServer Java classes inside a loop/recur infinite loop. Exactly as you already did with Java. Regards Plinio Balduino 11 982 611 487 > On 03/04/2014, at 22:27, Alex Wang wrote: > > I

Re: using contrib functions

2014-04-03 Thread Alex Wang
It seems no replacement for 'clojure.contrib.server-socket', any suggestions or libs for socket programming? On Sat, Mar 29, 2014 at 11:05 AM, Sean Corfield wrote: > On Mar 28, 2014, at 7:40 PM, Christopher Howard > wrote: > > I wanted to try out this Contrib function describe on this > > pag

Re: How to troubleshoot FileNotFoundException: Could not locate clojure/tools/namespace/parse...?

2014-04-03 Thread Stuart Sierra
On Wednesday, April 2, 2014 7:49:07 AM UTC-4, Jakub Holy wrote: > > When starting lein (namely lein ring server) I got a little helpful > exception and stack trace with the key line being: > > FileNotFoundException: Could not locate > clojure/tools/namespace/parse__init.class or > clojure/tool

Re: How to troubleshoot FileNotFoundException: Could not locate clojure/tools/namespace/parse...?

2014-04-03 Thread Sean Corfield
On Apr 3, 2014, at 4:30 AM, Jakub Holy wrote: > The stack trace points to ns-tracker as the cause and indeed removing it > fixes the problem. However it is actually conflict between ns-tracker and > clj-ns-browser that causes the failure; removing any one fixes it. But the > stack trace points

Re: cljsbuild dev/release, different debug levels

2014-04-03 Thread t x
The correct statement should be: "I *no longer* use cljx." :-) On Thu, Apr 3, 2014 at 8:05 AM, t x wrote: > I don't use cljx. It slows down "lein cljsbuild auto." > > I'm using pure clojurescript. Is there a way to get the "dev" / > "release" tag passed somehow? > > On Thu, Apr 3, 2014 at 6:58 AM

Re: cljsbuild dev/release, different debug levels

2014-04-03 Thread t x
I don't use cljx. It slows down "lein cljsbuild auto." I'm using pure clojurescript. Is there a way to get the "dev" / "release" tag passed somehow? On Thu, Apr 3, 2014 at 6:58 AM, Alex Robbins wrote: > If you used cljx, you could probably use the feature expressions to do what > you want. > > h

Re: Porting parsley & paredit.clj to Clojurescript: Crazy, or inevitable?

2014-04-03 Thread kovas boguta
Thanks for the input Christophe & Laurent. I'm definitely less inclined to port it if the consensus is that the code is unmaintainable and slated for deprecation. In the meantime I was able to de-lightable-ize Paredit-Plus, which supports a few more crucial commands than Subpar and will let me ge

Re: cljsbuild dev/release, different debug levels

2014-04-03 Thread Alex Robbins
If you used cljx, you could probably use the feature expressions to do what you want. https://github.com/lynaghk/cljx You'd need to set up a custom rule for it, but it seems well within the scope of the project. On Thu, Apr 3, 2014 at 8:50 AM, t x wrote: > Hi, > > I'm trying to figure out h

cljsbuild dev/release, different debug levels

2014-04-03 Thread t x
Hi, I'm trying to figure out how to do the following: Have a shared cljs/* ... For the "dev" build, have (debug ...) compile to (js/console.log ...) For the "release" build, have (debug ...) compile to (do). Basically, I want different things to happen depending on whether the build

[ANN] Eastwood the Clojure lint tool version 0.1.2

2014-04-03 Thread Andy Fingerhut
Version 0.1.2 of the Eastwood the Clojure lint tool has been released to Clojars. Instructions here: https://github.com/jonase/eastwood This version fixes a few bugs in the previous release. It can now analyze a several more projects without throwing exceptions. One known regression from t

Re: Basic string modification question

2014-04-03 Thread Andy Smith
Thanks Josef, I shall digest that reply very closely. I had actually initially tried assoc on the string as you described. (You guys are great. This is why Im really enjoying learning clojure.) -- You received this message because you are subscribed to the Google Groups "Clojure" group. To pos

Re: How to troubleshoot FileNotFoundException: Could not locate clojure/tools/namespace/parse...?

2014-04-03 Thread Jakub Holy
Hello Sean, Thank you for your asnwer! It was a nice and helpful demonstration of how to read stack traces better. The stack trace points to *ns-tracker* as the cause and indeed removing it fixes the problem. However it is actually conflict between ns-tracker and *clj-ns-browser* that causes the

Re: Basic string modification question

2014-04-03 Thread Jozef Wagner
It all boils down to the fact that strings are immutable and are not persistent. What I was trying to say is that the operation of replacing one character with another in an immutable and non persistent string is not a common one and may be a sign of bad design. I was not commenting on the replace

[ANN] - vinyasa 0.2.0 - Give your clojure workflow more flow

2014-04-03 Thread zcaudate
Update to Vinyasa - https://github.com/zcaudate/vinyasa Whats New? 0.2.0 vinyasa has now been repackaged . Functionality can now be accessed via seperate dependencies: [im.chit/vinyasa.inject "0.2.0"][im.chit/viny

Re: Basic string modification question

2014-04-03 Thread Softaddicts
Concatenation, replacing occurrences by another value, formatting values within a string are quite common. Playing with indexes within a string ? I rarely used this in the last 15 years. In the old days yes since space was at premium, many languages did not support dynamic allocations, speed was

Re: Integration with Mutable Object-Oriented Eventing Hell

2014-04-03 Thread icamts
Hi Christian, I think you are looking for this. http://en.wikipedia.org/wiki/Facade_pattern In clojure you can use a def for each private member of the facade. Alternatively you can write a function to instantiate and return private members. Use a defn for each facade's methods. Luca Il giorn

ANN Langohr 2.8.2 is released

2014-04-03 Thread Michael Klishin
Langohr 2.8.2 has no change log entry: there are no user facing changes from 2.8.1, only some corrections to make it compile against RabbitMQ Java client 3.3.0 from scratch (after `lein clean`). -- MK http://github.com/michaelklishin http://twitter.com/michaelklishin -- You received this messag

Re: Basic string modification question

2014-04-03 Thread Andy Smith
Thanks Josef, but could you explain a bit more. Are you saying that the operation of replacing a substring (by index & length) with another substring is not a common operation? i.e. (defn replace-substring [s r start len] (str (subs s 0 start) r (subs s (+ len start If so, that does supr

Re: Porting parsley & paredit.clj to Clojurescript: Crazy, or inevitable?

2014-04-03 Thread Laurent PETIT
Hello, 2014-04-02 11:33 GMT+02:00 Christophe Grand : > Hi Kovas, > > On Wed, Apr 2, 2014 at 3:26 AM, kovas boguta wrote: > >> Looking through the source for parsley & paredit.clj, I'm halfway >> convinced that maybe its not so hard to port these to clojurescript. >> >> Anyone have input in eithe