[ANN] analyze 0.1

2012-01-02 Thread Ambrose Bonnaire-Sergeant
Inspired by the ClojureScript compiler, analyze is an interface to the Clojure analysis phase. Check the README for some cool things you can do. https://clojars.org/analyze https://github.com/frenchy64/analyze I've barely tested the library but it manages to analyze a good part of the core

Re: New home for ClojureCLR

2012-01-02 Thread dmiller
Thanks. I hope 2012 is the year for community building for ClojureCLR, And maybe some IDE building. -David On Jan 1, 12:32 pm, rippinrobr rippinr...@gmail.com wrote: I would also like to thank David for his work on ClojureCLR. ClojureCLR is going to make for a great 2012 for me! -Rob

Re: [ANN] analyze 0.1

2012-01-02 Thread Scott Jaderholm
Very cool. If you think of other potential example errors this would be capable of detecting it might be nice to include them in a TODO list in the README. This might motivate someone to implement them or develop a nice emacs UI for displaying these errors. Scott On Mon, Jan 2, 2012 at 4:14 AM,

accessing multiple return values

2012-01-02 Thread nchurch
Someone was asking on the list here about multiple return values, which Clojure does not have. If the facility were ever added, perhaps multiple values could be accessed via namespaces. Functions would possess another level of namespace and have the ability to inject values into the environment

Potential bug w/ inlined functions

2012-01-02 Thread Sam Ritchie
Hey all, I'm writing a function called barr= that looks just like clojure.core/=, but uses java.util.Arrays/equals instead of equiv. To speed up the function I tried adding type hints to both the function definition and the 2-argument inlined version. Type hinting the inline function threw an

Re: accessing multiple return values

2012-01-02 Thread Tassilo Horn
nchurch nchubr...@gmail.com writes: Hi, Someone was asking on the list here about multiple return values, which Clojure does not have. If the facility were ever added, perhaps multiple values could be accessed via namespaces. Functions would possess another level of namespace and have the

Re: Potential bug w/ inlined functions

2012-01-02 Thread David Nolen
I suspect this has more to do with type-hinting inside a macro. Did you try adding :tag metadata to those symbols? As a side note I do find this approach a bit strange. Why not just define a generic arr= that with multi-arity inlining? David On Mon, Jan 2, 2012 at 1:43 PM, Sam Ritchie

Re: Potential bug w/ inlined functions

2012-01-02 Thread Sam Ritchie
You're right, it's macro more than inlining. Tag metadata doesn't throw an error, but it doesn't fix the reflection warning either (assuming I'm doing it correctly): (defmacro barr= [^{:tag bytes} x ^{:tag bytes} y] `(java.util.Arrays/equals ~x ~y)) (defmacro barr= [ x y]

Re: Potential bug w/ inlined functions

2012-01-02 Thread Alan Malloy
I agree it looks like a type-hinting issue, but since ^bytes x is reader-expanded to ^{:tag 'bytes} x, I don't see that change making any difference. I'd be more inclined to try ^[B instead, to avoid the possibility of var resolution. I don't get the last point. He wants it to be type-hinted so a

Re: Potential bug w/ inlined functions

2012-01-02 Thread Kevin Downey
On Jan 2, 2012 11:43 AM, Sam Ritchie sritchi...@gmail.com wrote: You're right, it's macro more than inlining. Tag metadata doesn't throw an error, but it doesn't fix the reflection warning either (assuming I'm doing it correctly): (defmacro barr= [^{:tag bytes} x ^{:tag bytes} y]

Re: Potential bug w/ inlined functions

2012-01-02 Thread Meikel Brandmeyer
Hi, Am 02.01.2012 um 21:27 schrieb Kevin Downey: (defmacro barr= [ x y] `(java.util.Arrays/equals ^{:tag bytes} ~x ^{:tag bytes} ~y)) The pevious macro is incorrectly written. And to enlighten the astute reader why (and to use the occasion for a shameless

Re: [ANN] analyze 0.1

2012-01-02 Thread Alex Baranosky
Very cool stuff Ambrose! On Mon, Jan 2, 2012 at 1:11 PM, Scott Jaderholm jaderh...@gmail.com wrote: Very cool. If you think of other potential example errors this would be capable of detecting it might be nice to include them in a TODO list in the README. This might motivate someone to

Re: clj-http - how to use cookies in subsequent request

2012-01-02 Thread djh
Excellent thanks Stephen that's done the trick, I've been pulling my hair out over this! On Jan 1, 9:40 pm, Stephen Compall stephen.comp...@gmail.com wrote: On Sun, 2012-01-01 at 08:11 -0800, djh wrote: How do I use this response as part of any subsequent requests? The response contains a

Do you use Monads in your real clojure applications

2012-01-02 Thread Dragan R
Hello, I would like to know do you use Monads in your real clojure applications, and are monads realy useful in impure functional languages like clojure? On the net I read that Impure functional programming doesn't really need monads. and It appears that in the presence of mutable state, a lot

Re: Prefix tree creation in clojure

2012-01-02 Thread Stephen Compall
On Sun, 2012-01-01 at 23:16 -0500, Cedric Greevey wrote: And that will obviously be chock-full of internals changes and miscellaneous tweaks and not just the user-visible feature changes/additions, aimed more at developers of Clojure itself than at developers using Clojure to make other

Re: Do you use Monads in your real clojure applications

2012-01-02 Thread Stephen Compall
On Mon, 2012-01-02 at 05:18 -0800, Dragan R wrote: and are monads realy useful in impure functional languages like clojure? Clojure's impurity doesn't mean that we wouldn't like to avoid side-effecty ways of doing stuff. Monads can help you there, among other things. The monad idea captures a

Re: Do you use Monads in your real clojure applications

2012-01-02 Thread Alex Baranosky
Midje has some of its error handling code implemented with a monad. https://github.com/marick/Midje/blob/master/src/midje/error_handling/monadic.clj#L32 `error-let` is like a regular let, except if there is a validation-error, that error short-circuits out. Alex -- You received this message

Re: [ANN] swank-clojure 1.3.4 released

2012-01-02 Thread Phil Hagelberg
Keith Irwin keith.ir...@gmail.com writes: The only way I could get the colorized stack-trace was to use M-x clojure-jack-in. Normally, I type lein swank on a command line, then use M-x slime-connect from Emacs. This is so that I can see the clojure.tools.logging output. (I've no idea where

Re: Prefix tree creation in clojure

2012-01-02 Thread Cedric Greevey
On Mon, Jan 2, 2012 at 5:28 PM, Stephen Compall stephen.comp...@gmail.com wrote: On Sun, 2012-01-01 at 23:16 -0500, Cedric Greevey wrote: And that will obviously be chock-full of internals changes and miscellaneous tweaks and not just the user-visible feature changes/additions, aimed more at

Re: [ANN] swank-clojure 1.3.4 released

2012-01-02 Thread Baishampayan Ghose
Getting colors outside M-x clojure-jack-in requires a couple extra steps I forgot to document, I just added it here: https://github.com/technomancy/swank-clojure/commit/94fa71f90e52c55d74 Thanks, the above steps worked--almost. I now see the raw ANSI color escape codes and not the colors. How

Re: accessing multiple return values

2012-01-02 Thread Cedric Greevey
On Mon, Jan 2, 2012 at 2:16 PM, Tassilo Horn tass...@member.fsf.org wrote: nchurch nchubr...@gmail.com writes: Hi, Someone was asking on the list here about multiple return values, which Clojure does not have. If the facility were ever added, perhaps multiple values could be accessed via

Re: [ANN] swank-clojure 1.3.4 released

2012-01-02 Thread Cedric Greevey
On Tue, Jan 3, 2012 at 12:28 AM, Baishampayan Ghose b.gh...@gmail.com wrote: Getting colors outside M-x clojure-jack-in requires a couple extra steps I forgot to document, I just added it here: https://github.com/technomancy/swank-clojure/commit/94fa71f90e52c55d74 Thanks, the above steps

Re: [ANN] analyze 0.1

2012-01-02 Thread Jonas
Hi Ambrose I’ve been playing around with your library and find it very intresting. A couple of questions: 1. In order to be able to run your examples I have to comment out the clojure.test, clojure.stacktrace and clojure.template namespaces. Otherwise I get a NullPointerException[1] which I’m

Re: [ANN] analyze 0.1

2012-01-02 Thread Ambrose Bonnaire-Sergeant
Hi Jonas On Tue, Jan 3, 2012 at 2:43 PM, Jonas jonas.enl...@gmail.com wrote: 1. In order to be able to run your examples I have to comment out the clojure.test, clojure.stacktrace and clojure.template namespaces. Otherwise I get a NullPointerException[1] which I’m unable to track down. It

Re: [ANN] analyze 0.1

2012-01-02 Thread Ambrose Bonnaire-Sergeant
Actually, it's my environment which is the issue. Vimclojure seems to load lots of extra libs. It seems to be barfing at the `ns` forms. Ambrose On Tue, Jan 3, 2012 at 3:13 PM, Ambrose Bonnaire-Sergeant abonnaireserge...@gmail.com wrote: Hi Jonas On Tue, Jan 3, 2012 at 2:43 PM, Jonas

Re: [ANN] swank-clojure 1.3.4 released

2012-01-02 Thread Tassilo Horn
Baishampayan Ghose b.gh...@gmail.com writes: Hi Baishampayan, Getting colors outside M-x clojure-jack-in requires a couple extra steps I forgot to document, I just added it here: https://github.com/technomancy/swank-clojure/commit/94fa71f90e52c55d74 Thanks, the above steps worked--almost.

Re: [ANN] analyze 0.1

2012-01-02 Thread Jonas
Hi, I pulled the latest version. How are you running the code? Could you pull the latest master and try again? Nothing fancy: - clone the repo - lein deps - start emacs, clojure-jack-in, - compile e.g., examples/docstring - NullPointerException - comment out the three namespaces I mentioned -

Re: [ANN] swank-clojure 1.3.4 released

2012-01-02 Thread Baishampayan Ghose
On Tue, Jan 3, 2012 at 1:03 PM, Tassilo Horn tass...@member.fsf.org wrote: Thanks, the above steps worked--almost. I now see the raw ANSI color escape codes and not the colors. How do I tell Emacs to interpret the color codes the right way? ,[ C-h f ansi-color-for-comint-mode-on RET ] |

Re: [ANN] analyze 0.1

2012-01-02 Thread Ambrose Bonnaire-Sergeant
Thanks for that. It seems if the namespace is not already loaded, then there are issues. I already suspected this, and to be honest I don't know the Compiler well enough to fully appreciate the problem. Looking into it. Ambrose On Tue, Jan 3, 2012 at 3:37 PM, Jonas jonas.enl...@gmail.com wrote:

Re: [ANN] analyze 0.1

2012-01-02 Thread Jonas
On Tuesday, January 3, 2012 9:45:04 AM UTC+2, Ambrose Bonnaire-Sergeant wrote: It seems if the namespace is not already loaded, then there are issues. That's it! It's simple to fix. Just require the namespaces in the ns form. I can send you a pull request if you want to? /Jonas -- You