Re: [ClojureScript] Please test CLJS-418, fixing browser REPL

2013-02-09 Thread Jonas Enlund
On Thursday, February 7, 2013 7:11:35 PM UTC+2, David Nolen wrote: > http://dev.clojure.org/jira/browse/CLJS-418 > > > > Some of you may have encountered bizarre problems when trying to use browser > REPL with the latest releases of ClojureScript. This ticket contains a patch > that should res

Re: Clojure - Python Style suggestion

2013-02-09 Thread Softaddicts
For those too young to have seen this: http://www.globalnerdy.com/2009/02/05/hacklabtos-lisp-machine-keyboard/ -- Softaddicts sent by ibisMail from my ipad! -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to c

Re: Clojure - Python Style suggestion

2013-02-09 Thread Softaddicts
:)) Luc P. > ITT: emacs users complaining about modifier keys. > > Sorry, but as a Vim guy, I couldn't help laughing. > On Feb 9, 2013 6:46 PM, "Gregory Graham" wrote: > > > > > I like the parentheses better. My only complaint is that I have to press > >>> the shift key to type them. > >>

Re: Clojure - Python Style suggestion

2013-02-09 Thread Jason Lewis
ITT: emacs users complaining about modifier keys. Sorry, but as a Vim guy, I couldn't help laughing. On Feb 9, 2013 6:46 PM, "Gregory Graham" wrote: > > I like the parentheses better. My only complaint is that I have to press >>> the shift key to type them. >>> >> >> You can always remap your ke

Re: Clojure 1.5 RC 14

2013-02-09 Thread Aaron Bedra
Yeah, I know what would fix it, but I would like to make sure the right defaults are in place for folks who pull it down. -Aaron On Feb 9, 2013, at 4:29 PM, AtKaaZ wrote: > maybe jvm arg would help > -XX:MaxPermSize=256m > > > > On Sat, Feb 9, 2013 at 11:17 PM, Aaron Bedra wrote: > I just

Re: Passing ordinary Clojure data into incanter.stats.linear-model

2013-02-09 Thread Conrad
I just saw there's a special Incanter group- I will move my question over there... On Saturday, February 9, 2013 4:34:56 PM UTC-6, Conrad wrote: > > Hi, I'm having trouble finding any examples of how to use linear-model > with simple clojure data. As per the documentation it says both x and y ca

Re: pr-str captures stdout- Is this intentional or a bug?

2013-02-09 Thread Conrad
OK, that viewpoint does sound reasonable- Thanks. On Saturday, February 9, 2013 6:55:32 PM UTC-6, Armando Blancas wrote: > > There's nothing wrong with pr-str. Debug output should go to stderr. > > user=> (def k (pr-str (for [x (range 5)] >(do (.println *err* x

Re: `let` to automatically add metadata / fn names?

2013-02-09 Thread Víctor M . V .
Thanks for the advice Stu! I might give it a shot at Confluence at some point. Just for the record, I like to defend my hypotethical approach: Non-Clojure consumers most likely win nothing from extended metadata facilities etc. So on second thoughts, the best default for "mylib-*1.0.0*.jar" is to

Re: pr-str captures stdout- Is this intentional or a bug?

2013-02-09 Thread AtKaaZ
this makes it a little more obvious maybe? => (pr-str (seq (println 1))) 1 "nil" => (= "nil" (pr-str (seq (println 1 1 true => (pr-str (lazy-seq (println 1))) "(1\r\n)" => (= "(1\r\n)" (pr-str (lazy-seq (println 1 true On Sun, Feb 10, 2013 at 1:55 AM, Armando Blancas wrote: > There'

Re: `let` to automatically add metadata / fn names?

2013-02-09 Thread Stuart Halloway
It is likely that, once this Pandora's box is opened, there will be more profiles that just debug yes/no. It is almost certain that whatever we do must be maven friendly. (Maven is a de facto standard for 1000x more people than leiningen, and some of them want to use libs written in Clojure.) If

Re: pr-str captures stdout- Is this intentional or a bug?

2013-02-09 Thread Armando Blancas
There's nothing wrong with pr-str. Debug output should go to stderr. user=> (def k (pr-str (for [x (range 5)] (do (.println *err* x) (.println *err* "nothing") x 0 nothing 1 nothing

Re: `let` to automatically add metadata / fn names?

2013-02-09 Thread vemv
I had something like this in mind: - There's a set of clojure.core vars that mean something (potentially) expensive yet convenient, and default to true - Neither library producers or consumers have ever to touch those (unless they want fine-grained control for some specific var/conte

Re: AOT/gen-class docs

2013-02-09 Thread Juan Carlos Kuri Pinto
I was programming a Clojure applet when I had similar problems with java.lang.ExceptionInInitializerError. But my experience with Java told me to delete the old class files generated by my project. And it worked. Always delete the old class files in every compilation and the problem disappears.

Re: `let` to automatically add metadata / fn names?

2013-02-09 Thread Mark
Are you thinking that the client developer (the person using the library) would maintain the proper magic ear-muffs in lein profiles? On Saturday, February 9, 2013 3:17:51 PM UTC-8, vemv wrote: > > Going the build route, probably use maven to produce debug and production >> artifacts of differin

Re: Clojure - Python Style suggestion

2013-02-09 Thread Gregory Graham
> I like the parentheses better. My only complaint is that I have to press >> the shift key to type them. >> > > You can always remap your keyboard / keyboard bindings. For example in > emacs: > > (define-key clojure-mode-map "9" 'paredit-open-round) > Thank-you, I'll try that. -- -- You r

Re: `let` to automatically add metadata / fn names?

2013-02-09 Thread vemv
> > Going the build route, probably use maven to produce debug and production > artifacts of differing versions: blah-1.0.0-DEBUG.jar and blah-1.0.0.jar. > My thoughts too. And there's no need for convention madness - e.g. Leiningen could transparently create those versions to the user: the

Re: pr-str captures stdout- Is this intentional or a bug?

2013-02-09 Thread AtKaaZ
these examples to illustrate what you are saying: => (= "(debug 1\r\n2 nil 3)" (pr-str (lazy-seq (list 2 (println "debug" 1) 3 true => (= "(1\r\n)" (pr-str (lazy-seq (println 1 true On Sat, Feb 9, 2013 at 10:57 PM, Conrad wrote: > For those reading this, the issue is NOT that outpu

Passing ordinary Clojure data into incanter.stats.linear-model

2013-02-09 Thread Conrad
Hi, I'm having trouble finding any examples of how to use linear-model with simple clojure data. As per the documentation it says both x and y can be "vectors of values" so I would think the following would work: (linear-model [1 2 3 4] [5 4 3 4]) Since the second can also be a matrix, I would

Re: Clojure 1.5 RC 14

2013-02-09 Thread AtKaaZ
maybe jvm arg would help -XX:MaxPermSize=256m On Sat, Feb 9, 2013 at 11:17 PM, Aaron Bedra wrote: > I just pulled it down locally and got the dreaded PermGen… > > [java] java.lang.OutOfMemoryError: PermGen space > [java] at > clojure.test_clojure.edn$types_that_should_roundtrip.invok

Re: Clojure 1.5 RC 14

2013-02-09 Thread Aaron Bedra
I just pulled it down locally and got the dreaded PermGen… [java] java.lang.OutOfMemoryError: PermGen space [java] at clojure.test_clojure.edn$types_that_should_roundtrip.invoke(edn.clj:32) [java] at clojure.lang.AFn.applyToHelper(AFn.java:161) [java] at clojure.la

Re: *read-eval* vulnerability

2013-02-09 Thread Chas Emerick
Hi all, It looks like Rich has selected an approach to addressing *read-eval*, #=, and related issues. The sands may still be shifting a bit, but far less than e.g. earlier this week. With that in mind, I thought it might be helpful to point to three authoritative messages from the clojure-de

Re: pr-str captures stdout- Is this intentional or a bug?

2013-02-09 Thread Conrad
For those reading this, the issue is NOT that output in the REPL looks funny. The problem is that if, for instance, you put debug code into a chunk of code that makes use of "pr-str" your debug code is actually WRITTEN TO THE STRING. This is because "pr-str" works by using "with-out-str". This

Re: pr-str captures stdout- Is this intentional or a bug?

2013-02-09 Thread Conrad
OK, if I follow your posts correctly you now agree with me that this is unpleasant behavior :-) On Saturday, February 9, 2013 1:35:48 PM UTC-6, AtKaaZ wrote: > > So, I basically thought that this is what's happening in your case also > (but it's not!): > => (map println '(1 2 3)) > (1 > 2 > nil

delete-file implementation (?!)

2013-02-09 Thread AtKaaZ
Hi, does anyone see anything wrong with this? => (source clojure.java.io/delete-file) (defn delete-file "Delete file f. Raise an exception if it fails unless silently is true." {:added "1.2"} [f & [silently]] (or (.delete (file f)) silently (throw (java.io.IOException. (str "Co

Re: Clojure 1.5 RC 14

2013-02-09 Thread AtKaaZ
thanks, obviously after I posted that I re-read Stu's post and "will be available soon" made me realize how superficially I read his post. lein deps Could not find artifact org.clojure:clojure:jar:1.5.0-RC14 in central ( http://repo1.maven.org/maven2/) Could not find artifact org.clojure:clojure:j

Re: Clojure 1.5 RC 14

2013-02-09 Thread Steve Miner
Maybe the registry has caught up with the updates yet. Leiningen found RC 14. % lein deps Retrieving org/clojure/clojure/1.5.0-RC14/clojure-1.5.0-RC14.pom from sonatype-oss-public Retrieving org/clojure/clojure/1.5.0-RC14/clojure-1.5.0-RC14.jar from sonatype-oss-public On Feb 9, 2013, at 3:29

Re: Clojure 1.5 RC 14

2013-02-09 Thread AtKaaZ
Hi Stu. All I see is beta13as being last (9 feb), and RC6 05-Feb-2013 On Sat, Feb 9, 2013 at 9:13 PM, Stuart Halloway wrote: > Clojure 1.5 RC 14 (fourteen) will be available soon from Maven Central: > > > http

Clojure 1.5 RC 14

2013-02-09 Thread Stuart Halloway
Clojure 1.5 RC 14 (fourteen) will be available soon from Maven Central: http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.clojure%22%20AND%20a%3A%22clojure%22%20AND%20v%3A1.5.0* Please test it! Thanks, Stu -- -- You received this message because you are subscribed to the Google Groups "Cl

Global variables in closure ?

2013-02-09 Thread Bogdan Valentin Neacsa
Hello, I'm a total beginer in Clojure and I've ran into a problem that I'm not even sure if can be done in Closure. So the issue is the following. I've implemeted a function that computes the prime numbers from an interval (up to a limit). (defn gather_primes_in_range [range_start range_end

Re: pr-str captures stdout- Is this intentional or a bug?

2013-02-09 Thread AtKaaZ
So, I basically thought that this is what's happening in your case also (but it's not!): => (map println '(1 2 3)) (1 2 nil 3 nil nil) => (= '(nil nil nil) (map println '(1 2 3))) 1 2 3 true ;so your case is different due to pr-str and pr => (def k (pr-str (for [x (range 5)]

Re: pr-str captures stdout- Is this intentional or a bug?

2013-02-09 Thread AtKaaZ
On Sat, Feb 9, 2013 at 8:25 PM, AtKaaZ wrote: > > > > On Sat, Feb 9, 2013 at 8:22 PM, AtKaaZ wrote: > >> do you mean that, when the string it outputted like: >> => (println k) >> >> (012340 1 2 3 4) >> nil >> => (prn k) >> >> "(012340 1 2 3 4)" >> nil >> >> the side effects of evaluating k bein

Re: pr-str captures stdout- Is this intentional or a bug?

2013-02-09 Thread AtKaaZ
On Sat, Feb 9, 2013 at 8:22 PM, AtKaaZ wrote: > do you mean that, when the string it outputted like: > => (println k) > > (012340 1 2 3 4) > nil > => (prn k) > > "(012340 1 2 3 4)" > nil > > the side effects of evaluating k being mixed into the output could affect > you (other than just visually

Re: pr-str captures stdout- Is this intentional or a bug?

2013-02-09 Thread AtKaaZ
do you mean that, when the string it outputted like: => (println k) (012340 1 2 3 4) nil => (prn k) "(012340 1 2 3 4)" nil the side effects of evaluating k being mixed into the output could affect you (other than just visually in the repl) ? if ie. you redirect *out* to some file with the purpose

Re: pr-str captures stdout- Is this intentional or a bug?

2013-02-09 Thread Conrad
I agree when you print to stdout you'd expect lazily evaluated output to be mangled in. However, it would seem more natural to me that if you print something to a string it is counter intuitive for incidental writes to stdout to be redirected to the string, as well- There is also nothing in the

Re: pr-str captures stdout- Is this intentional or a bug?

2013-02-09 Thread AtKaaZ
here's a simpler example: => (map println '(1 2 3)) (1 2 nil 3 nil nil) => (dorun (map println '(1 2 3))) 1 2 3 nil On Sat, Feb 9, 2013 at 7:44 PM, AtKaaZ wrote: > actually replacing vec with dorun or doall, would've been a better example > :) > > > On Sat, Feb 9, 2013 at 7:42 PM, AtKaaZ wrot

Re: pr-str captures stdout- Is this intentional or a bug?

2013-02-09 Thread AtKaaZ
actually replacing vec with dorun or doall, would've been a better example :) On Sat, Feb 9, 2013 at 7:42 PM, AtKaaZ wrote: > I think it's an illusion from being lazy ? > => (def k (pr-str (vec (for [x (range 5)] > (do (pr x) >

Re: pr-str captures stdout- Is this intentional or a bug?

2013-02-09 Thread AtKaaZ
I think it's an illusion from being lazy ? => (def k (pr-str (vec (for [x (range 5)] (do (pr x) x) 01234 #'datest1.ret/k => k "[0 1 2 3 4]" On Sat, Feb 9, 2013 at 7:30 PM, Conrad wrote: > I tested this in the latest 1.5.0

pr-str captures stdout- Is this intentional or a bug?

2013-02-09 Thread Conrad
I tested this in the latest 1.5.0-RC6: => (def k (pr-str (for [x (range 5)] (do (pr x) x #'user/k => k "(012340 1 2 3 4)" This seems wrong to me... I can see what would be needed to fix it in clojure/core.clj, but it would requ

Re: `let` to automatically add metadata / fn names?

2013-02-09 Thread Mark
Going the build route, probably use maven to produce debug and production artifacts of differing versions: blah-1.0.0-DEBUG.jar and blah-1.0.0.jar. Rather than go that route and the ensuing naming convention madness, I wonder how much we could rely on the JIT to push the decision of debug vs

Re: Simple Network Messaging

2013-02-09 Thread Daniel Bryan
There's any number of answers to this, but when I have to do IPC between different languages I send JSON messages over ZeroMQ sockets. http://www.zeromq.org/ Pretty simple to use, implementations exist in almost all currently popular languages. On Friday, February 8, 2013 8:44:06 AM UTC+11, Jv

Re: `let` to automatically add metadata / fn names?

2013-02-09 Thread Stuart Halloway
+1 on this line of thought. We are definitely interested in decomplecting dev mode utility from production lean-and-meanness. One question along this path is "What options exist in Java/maven land for doing multiple releases of the same artifact with e.g. different performance and debugging charac

Re: Clojure - Python Style suggestion

2013-02-09 Thread vemv
> > I like the parentheses better. My only complaint is that I have to press > the shift key to type them. > You can always remap your keyboard / keyboard bindings. For example in emacs: (define-key clojure-mode-map "9" 'paredit-open-round) -- -- You received this message because you are su

Re: Prismatic Plumbing and Graph Open-Source Release

2013-02-09 Thread Takahiro Hozumi
Thanks for amazing work! I want to know how typical CRUD application is implemented. Do you use single gigantic graph with lazy-compile or separated graph for each operation? How do you handle validation and error? Will almost all x->y function disappear? On Jan 30, 3:46 am, Aria Haghighi wrote:

Re: Building a REST API / efficient RPC interface in Clojure

2013-02-09 Thread vemv
> > Define an API in terms of messages > I'm not familiar with the concept - just out of curiosity, what does a mesagge-based API consist of? Is the drastically different from most REST/JSON web APIs out there? Thank you - Victor -- -- You received this message because you are subscribed t

Re: Building a REST API / efficient RPC interface in Clojure

2013-02-09 Thread bernardH
Hi, On Saturday, February 9, 2013 4:47:26 AM UTC+1, Feng Shen wrote: > > Hi, I did something similar during work (we are using Clojure) > >1. Use HTTP as the transport: browser ajax call, mobile API call, >intertal use >2. JSON as encoding. Javascript support it natively, mobile c

Re: Prismatic Plumbing and Graph Open-Source Release

2013-02-09 Thread Edmund
Hi Jason, That's roughly what I figured, thanks for the helpful reply. Thanks for taking the time release this lib; its really great Edmund On Saturday, 9 February 2013 01:28:09 UTC, Jason Wolfe wrote: > > > > On Friday, February 8, 2013 1:56:27 AM UTC-8, Edmund wrote: >> >> Hey Jason, >> >>

Destructuring Bind on Regex

2013-02-09 Thread JvJ
I wrote this little macro today that lets you do it. However, I feel like it was implemented in a pattern match library or something... but I'm not sure. Someone let me know if I'm re-inventing the wheel. If I'm not, here's the code: (defn re-bind-fn [str re bnds act & forms] `(let [~'__TE