Re: How to get unit test failure details

2012-08-27 Thread Mayank Jain
Try calling with-test-out :- user (use 'clojure.test) *nil* user (deftest test1 (is (= a b)) (is (= 1 1))) *#'user/test1* user (with-test-out (run-tests)) *Testing user FAIL in (test1) (NO_SOURCE_FILE:1) expected: (= a b) actual: (not (= a b))

Code retreat exercices where Clojure could shine?

2012-08-27 Thread Denis Labaye
Hi, I am organizing a code retreat in September. All languages are accepted, I want to use Clojure for this time, which exercises would make Clojure shine? Thanks! Denis -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send

Re: having trouble setting the cursor with seesaw

2012-08-27 Thread Jim - FooBar();
OK I will address further questions on the proper mailing list...just a quick comment about your snippet though It doesn't exactly help me because you've got 'invoke-later' as the 2nd arg to the future which means I'm losing the value that should be returned from the long running

Re: How to get unit test failure details

2012-08-27 Thread Erlis Vidal
I'm expecting the expected actual detail. Maybe my problem is due to I'm executing this from lighttable insta repl. Running this code in the web repl give me the same result. http://tryclj.com/ Enter some Clojure code to be evaluated. Clojure (use 'clojure.test) nil Clojure (is (= a b)) false

Re: Clojure on PyPy

2012-08-27 Thread Dax Fohl
Wow I can't believe my silly question actually led to a whole independent project! On Friday, February 10, 2012 9:36:53 AM UTC-6, tbc++ wrote: I have some set of algorithms that needs such-and-such operations to be as fast as possible. Can I create a VM that is tailored for that? Yes, this

Re: Parser combinators in parsatron

2012-08-27 Thread Panduranga Adusumilli
Alexsandro, I don't know about Parsatron, but Parse-EZ ( https://github.com/protoflex/parse-ez) provides the 'line-pos function that returns [line# column#] vector. Here is the equivalent code for your example using Parse-EZ: (use 'protoflex.parse) (defn anbn [] (let [as (regex

Dynamic functions not throwing arity-error in CLJS (possibly a bug?)

2012-08-27 Thread Shantanu Kumar
Hi, I noticed the following at the CLJS REPL: ClojureScript:cljs.user (let [f #(do 1)] (f 2)) 1 ClojureScript:cljs.user (let [f (fn [] (do 1))] (f 2)) 1 ClojureScript:cljs.user (let [f (fn [_] (do 1))] (f 2)) 1 ClojureScript:cljs.user (let [f (fn [_ _] (do 1))] (f 2)) 1 ClojureScript:cljs.user

Re: Dynamic functions not throwing arity-error in CLJS (possibly a bug?)

2012-08-27 Thread David Nolen
We don't throw on arity, only warn. On Monday, August 27, 2012, Shantanu Kumar wrote: Hi, I noticed the following at the CLJS REPL: ClojureScript:cljs.user (let [f #(do 1)] (f 2)) 1 ClojureScript:cljs.user (let [f (fn [] (do 1))] (f 2)) 1 ClojureScript:cljs.user (let [f (fn [_] (do 1))]

Re: Dynamic functions not throwing arity-error in CLJS (possibly a bug?)

2012-08-27 Thread Shantanu Kumar
On Aug 27, 6:45 pm, David Nolen dnolen.li...@gmail.com wrote: We don't throw on arity, only warn. It doesn't seem to be warning in the other examples (let ...) in CLJS I showed above. Shantanu -- You received this message because you are subscribed to the Google Groups Clojure group. To

Re: Dynamic functions not throwing arity-error in CLJS (possibly a bug?)

2012-08-27 Thread David Nolen
On Mon, Aug 27, 2012 at 9:50 AM, Shantanu Kumar kumar.shant...@gmail.com wrote: On Aug 27, 6:45 pm, David Nolen dnolen.li...@gmail.com wrote: We don't throw on arity, only warn. It doesn't seem to be warning in the other examples (let ...) in CLJS I showed above. Shantanu Yes it only

Re: Dynamic functions not throwing arity-error in CLJS (possibly a bug?)

2012-08-27 Thread Shantanu Kumar
On Aug 27, 6:53 pm, David Nolen dnolen.li...@gmail.com wrote: On Mon, Aug 27, 2012 at 9:50 AM, Shantanu Kumar kumar.shant...@gmail.com wrote: On Aug 27, 6:45 pm, David Nolen dnolen.li...@gmail.com wrote: We don't throw on arity, only warn. It doesn't seem to be warning in the other

Re: Howto not reindent in (emacs) clojure-mode

2012-08-27 Thread Timothy Washington
Nice, ok thanks. Tim On Sun, Aug 26, 2012 at 7:59 PM, Alan Malloy a...@malloys.org wrote: I just use C-j instead of RET in the rare cases that I want to leave the previous line alone. On Sunday, August 26, 2012 4:15:54 PM UTC-7, frye wrote: Hey all, There'll probably be a quick

Re: How to get unit test failure details

2012-08-27 Thread Erlis Vidal
Hi Mayank, I'm still unable to see why the test failed! Anyone knows why I'm getting this? [image: Inline image 1] On Mon, Aug 27, 2012 at 7:22 AM, Erlis Vidal er...@erlisvidal.com wrote: I'm expecting the expected actual detail. Maybe my problem is due to I'm executing this from

Re: How to get unit test failure details

2012-08-27 Thread Mayank Jain
On Mon, Aug 27, 2012 at 10:17 PM, Erlis Vidal er...@erlisvidal.com wrote: Hi Mayank, I'm still unable to see why the test failed! The test failed because a is not equal to b ! Is that part confusing you? or is the question something else? Total tests = 1 (deftest declaration i.e.) How many

Re: How to get unit test failure details

2012-08-27 Thread Mayank Jain
correction : (a != b) I mean (b has around it i..e) On Mon, Aug 27, 2012 at 10:31 PM, Mayank Jain firesof...@gmail.com wrote: On Mon, Aug 27, 2012 at 10:17 PM, Erlis Vidal er...@erlisvidal.comwrote: Hi Mayank, I'm still unable to see why the test failed! The test failed because a is

Re: How to get unit test failure details

2012-08-27 Thread Erlis Vidal
Hi Mayank, That's not the part that's confusing me. Suppose I have 100 tests, and when I run my tests I only get {:type :summary, :pass 99, :test 100, :error 0, :fail 1} Can you tell which one was the one that filed? I need more information, the information that's described in the

Re: How to get unit test failure details

2012-08-27 Thread Moritz Ulrich
This is a result of Light Table's instarepl: The test details get printed as string to *test-out*, which instarepl doesn't display. Tryclj seems to have a bug where it doesn't redirect *out* to the web-repl. Anyway, try the following in instarepl: (binding [*test-out* *out*] (run-tests))

Re: How to get unit test failure details

2012-08-27 Thread Erlis Vidal
Hi Moritz, Simply beautiful. That works! Thank you all Erlis On Mon, Aug 27, 2012 at 2:06 PM, Moritz Ulrich ulrich.mor...@gmail.comwrote: This is a result of Light Table's instarepl: The test details get printed as string to *test-out*, which instarepl doesn't display. Tryclj seems to have

Re: Deprecation of Swank Clojure, long live nrepl.el

2012-08-27 Thread Warren Lynn
On Thursday, August 23, 2012 3:34:50 PM UTC-4, Warren Lynn wrote: I don't think it is nREPL server related. It has to do with with clojure.complete and lein repl. https://github.com/kingtim/nrepl.el/issues/63 -Tim Thanks. I did not understand it correctly. I will wait for lein to

Re: Deprecation of Swank Clojure, long live nrepl.el

2012-08-27 Thread Tim King
But if I do the same in an Emacs nrepl buffer, I got the exception as described in the ac-nrepl issue. So it does seems nrepl related. Can someone explain why? Thank you. I am using lein2 preview 10, and nrepl.el 0.1.4 preview Hi Warren, I added an explanation to the issue you referenced

clojure.org down

2012-08-27 Thread Chris Ford
Hi, clojure.org seems to be down. I've mailed h...@wikispaces.com. Cheers, Chris -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be

Re: clojure.org down

2012-08-27 Thread Chris Ford
Looks like it's back up. On 27 August 2012 20:28, Chris Ford christophertf...@gmail.com wrote: Hi, clojure.org seems to be down. I've mailed h...@wikispaces.com. Cheers, Chris -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this

Re: clojure.org down

2012-08-27 Thread Mayank Jain
Working fine for me. On Tue, Aug 28, 2012 at 12:58 AM, Chris Ford christophertf...@gmail.comwrote: Hi, clojure.org seems to be down. I've mailed h...@wikispaces.com. Cheers, Chris -- You received this message because you are subscribed to the Google Groups Clojure group. To post to

Re: clojure.org down

2012-08-27 Thread Chris Ford
Adam Frey from wikispaces pinged me back. Seems like he fixed whatever the problem was. On 27 August 2012 20:42, Mayank Jain firesof...@gmail.com wrote: Working fine for me. On Tue, Aug 28, 2012 at 12:58 AM, Chris Ford christophertf...@gmail.comwrote: Hi, clojure.org seems to be down.

getting a new socket at the repl

2012-08-27 Thread larry google groups
I am in emacs at a clojure swank slime repl. I do this: user (def ss (Socket. localhost, 4)) #'user/ss user ss #Socket Socket[addr=localhost/127.0.0.1,port=4,localport=62125] All is good. All is working. I now do this, which is exactly the same thing: (def client5 (Socket. localhost

clj-http's json + enlive's selectors

2012-08-27 Thread Denis Labaye
Hi, I am happily using clj-http to fetch JSON from my REST URIs. And happily extracting data from XML using enlive. Now I would like to combine the two: Fetch JSON with clj-http AND extract informations from it with enlive. Does anyone know what's the most straightforward way to do that?

Re: getting a new socket at the repl

2012-08-27 Thread Denis Labaye
On Mon, Aug 27, 2012 at 11:23 PM, larry google groups lawrencecloj...@gmail.com wrote: I am in emacs at a clojure swank slime repl. I do this: user (def ss (Socket. localhost, 4)) #'user/ss user ss #Socket Socket[addr=localhost/127.0.0.1,port=4,localport=62125] All is good.

Re: getting a new socket at the repl

2012-08-27 Thread Denis Labaye
On Mon, Aug 27, 2012 at 11:56 PM, Denis Labaye denis.lab...@gmail.comwrote: On Mon, Aug 27, 2012 at 11:23 PM, larry google groups lawrencecloj...@gmail.com wrote: I am in emacs at a clojure swank slime repl. I do this: user (def ss (Socket. localhost, 4)) #'user/ss user ss

Re: clojure.org down

2012-08-27 Thread William Oliveira
Same here. Working fine. On Mon, Aug 27, 2012 at 4:42 PM, Mayank Jain firesof...@gmail.com wrote: Working fine for me. On Tue, Aug 28, 2012 at 12:58 AM, Chris Ford christophertf...@gmail.comwrote: Hi, clojure.org seems to be down. I've mailed h...@wikispaces.com. Cheers, Chris --

Re: Parser combinators in parsatron

2012-08-27 Thread Panduranga Adusumilli
Alexsandro, I don't know about Parsatron, but Parse-EZ ( https://github.com/protoflex/parse-ez) provides the 'line-pos' function that returns the line and column info. Here is the equivalent code for your example using Parse-EZ: -- (use 'protoflex.parse) (defn anbn [] (let [as

Re: A Performance Comparison of SBCL Clojure

2012-08-27 Thread Stuart Sierra
Maybe my impressions are out of date. Personally, I have neither the time nor the interest, but optimizers do your stuff! -S -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts

Re: [emacs over ssh limitations]

2012-08-27 Thread Stuart Sierra
It's easy enough to test: fire up a small EC2 instance and use Emacs over an SSH+tmux session. You could also try using your own local Emacs that way by SSH'ing to localhost. In my experience, commands don't work in a terminal if they use modifier keys (Control, Meta, Shift) AND non-letter

Re: A Performance Comparison of SBCL Clojure

2012-08-27 Thread Ben Mabey
Looking at clojure's benchmarks they seem to already be highly optimized (in terms of employing all the standard tricks). Does anyone have any idea if more could be done to lessen the gap between java and clojure[1]? Or are these benchmarks representative of the performance gap between