Next vs. rest (and reduce)

2012-02-25 Thread JuanManuel Gimeno Illa
I'm trying to understand the difference between next and rest, so I've taken clojure's implementation of some of the collection functions to view how those functions use them. The source code of reduce is (I've marked in red the calls than I do not understand). (def reduce (fn r

Re: Bret Victor - Inventing on Principle

2012-02-25 Thread Raju Bitter
Didn't have the time to watch thevideo yesterday, and just watched it. Visualizing code in such a way is amazing, could be extremely useful when teaching how to program. I think the browser-connected REPL in ClojureScript is already a good step into the right direction, since it makes testing cha

Hanging ClojureScript REPL in both inferior-lisp and slime-clojure (with latest clojure-mode and clojurescript-mode)

2012-02-25 Thread Lyndon Tremblay
REPL started; server listening on localhost port 6907 user=> nil user=> nil user=> "Type: " :cljs/quit " to quit" WARNING: The form (. this toString) is no longer a property access. Maybe you meant (. this -toString) instead? WARNING: The form (. this toString) is no longer a property access. Maybe

"-function" special?

2012-02-25 Thread ClusterCat
Hi there, in some clojure examples I see function names with a leading dash like -main() -getFoo() (in backing bean) -setBar() (in backing bean) Are these functions with leading dash anything special? Or is this dash required for some interop? I didn't find any documentation about it. Thanks

Re: ns :import / reflection

2012-02-25 Thread ClusterCat
Yes, that did the trick. Thank you. Am 21.02.2012 02:53, schrieb Sean Corfield: On Sat, Feb 18, 2012 at 1:29 PM, ClusterCat wrote: (ns test (:import (java.io File))) This says import the File class from the package java.io (ns test (:import (java.io.File))) Try: (ns test (:import java.

Major lein-cljsbuild update: 0.1.0

2012-02-25 Thread Evan Mezeske
Hey, I just released a major update to the lein-cljsbuild plugin for Leiningen (version 0.1.0). On top of a bunch of bug fixes and minor improvements, there are a couple new features: * Support for running ClojureScript tests, with an example using PhantomJS. * Support for running ClojureScript

Re: clj-webdriver: Clojure API for Selenium-WebDriver

2012-02-25 Thread Yan Aung
Sweet! I'm excited to do browser testing again using this. Screencast is awesome. Thanks for putting it together. -Yan On Feb 18, 4:57 pm, semperos wrote: > Though this library has been in development for several months, I'd like to > publicly announce the availability of clj-webdriver, a Clojure

Re: "-function" special?

2012-02-25 Thread Moritz Ulrich
It's the default prefix for methods in classes generated by gen-class: http://clojure.github.com/clojure/clojure.core-api.html#clojure.core/gen-class On Sat, Feb 25, 2012 at 15:17, ClusterCat wrote: > Hi there, > > in some clojure examples I see function names with a leading dash like > -main() >

Re: Major lein-cljsbuild update: 0.1.0

2012-02-25 Thread Moritz Ulrich
Nice update! Especially because the crossover files don't pollute my cljs-sources anymore :) One suggestion: Wouldn't it be nicer if the default value for :crossover-path would be a hidden (dot-) directory? On Sat, Feb 25, 2012 at 10:06, Evan Mezeske wrote: > Hey, > > I just released a major upd

ClojureScript "use" statement not working

2012-02-25 Thread Chris McBride
I have a namespace statement like this: (ns alephtest.websocket (:require [alephtest.js-utils :as util])) If I change this to: (ns alephtest.websocket (:use alephtest.js-utils)) I get this stack trace from the cljsbuild plugin (it took me a while to figure what was causing this): java.lang

Re: ClojureScript "use" statement not working

2012-02-25 Thread Mark Rathwell
You must (:use ... :only ...) with ClojureScript On Sat, Feb 25, 2012 at 3:31 PM, Chris McBride wrote: > I have a namespace statement like this: > > (ns alephtest.websocket >  (:require [alephtest.js-utils :as util])) > > If I change this to: > > (ns alephtest.websocket >  (:use alephtest.js-util

Re: Next vs. rest (and reduce)

2012-02-25 Thread Stephen Compall
On Sat, 2012-02-25 at 03:32 -0800, JuanManuel Gimeno Illa wrote: > The source code of reduce is (I've marked in > red the calls than I do not understand). Please keep in mind that some mail readers are viewing the plain text part, so can't see HTML markup, especially among an audience likely to b

Re: ClojureScript "use" statement not working

2012-02-25 Thread Cedric Greevey
On Sat, Feb 25, 2012 at 4:04 PM, Mark Rathwell wrote: > You must (:use ... :only ...) with ClojureScript "nth not supported on this type: Symbol" is not a very helpful error message for diagnosing this problem. -- You received this message because you are subscribed to the Google Groups "Clojur

Re: clj-webdriver: Clojure API for Selenium-WebDriver

2012-02-25 Thread Devin Walters
Nicely written library from what I can tell. Thanks for this. (inc) for including a screencast and providing such great documentation. Looking forward to using this in the future. Cheers, '(Devin Walters) On Saturday, February 25, 2012 at 12:19 AM, Yan Aung wrote: > Sweet! I'm excited to do

Re: Bret Victor - Inventing on Principle

2012-02-25 Thread Phil Hagelberg
Raju Bitter writes: > Didn't have the time to watch thevideo yesterday, and just watched > it. Visualizing code in such a way is amazing, could be extremely > useful when teaching how to program. Yes, what a great object lesson in the usefulness of being able to disable locals clearing. Gave me

Re: ClojureScript "use" statement not working

2012-02-25 Thread Chris McBride
Thanks, Also, having a line number that corresponds to my source would be helpful. On Feb 25, 4:41 pm, Cedric Greevey wrote: > On Sat, Feb 25, 2012 at 4:04 PM, Mark Rathwell > wrote: > > You must (:use ... :only ...) with ClojureScript > > "nth not supported on this type: Symbol" is not a very

Re: ClojureScript "use" statement not working

2012-02-25 Thread David Nolen
Patches welcome! :) http://dev.clojure.org/jira/browse/CLJS David On Sat, Feb 25, 2012 at 6:14 PM, Chris McBride wrote: > Thanks, > > Also, having a line number that corresponds to my source would be > helpful. > > On Feb 25, 4:41 pm, Cedric Greevey wrote: > > On Sat, Feb 25, 2012 at 4:04 PM,

Re: Bret Victor - Inventing on Principle

2012-02-25 Thread Craig Brozefsky
Phil Hagelberg writes: > Yes, what a great object lesson in the usefulness of being able to > disable locals clearing. Gave me a lot to think about regarding what > kind of feedback tools should provide. I don't understand what "disable locals clearing" means. -- Craig Brozefsky Premature rei

Re: Bret Victor - Inventing on Principle

2012-02-25 Thread kovas boguta
This is pretty cool, and definitely something that is needed. In terms of images etc, I see these as resources that are referenced by the expressions going over the wire, rather than embedded in the expressions directly. You can just send the url to the image (or data later turned into a url), and

[ANN] clj-json-rpc 0.1: a Ring-compatible handler for JSON-RPC web services

2012-02-25 Thread Daniel Janus
Hi, I've just released version 0.1 of clj-json-rpc to Clojars. clj-json-rpc is a Clojure library that makes it easy to create web services using the JSON-RPC protocol and Ring. Check it out at https://github.com/nathell/clj-json-rpc Enjoy, Daniel -- You received this message because you are

[ANN] shrink 0.1.0 - generative testing tool for finding smallest failure

2012-02-25 Thread Alex Baranosky
This is a library for "shrinking" failure cases. All the major QuickCheck-like testing libraries use a similar approach. I am building Midje support for generative testing, and in the process noticed that test.generative doesn't shrink and (at least at the time) ClojureCheck didn't either. Thus I

Re: Bret Victor - Inventing on Principle

2012-02-25 Thread cameron
Great video, it was interesting that the binary search example only really works with pure functions since you must specify all of the initial state for the debugger/visualiser. In non-pure functions (and oo) the user is unlikely to be able to specify valid values for all the mutable state even

Re: Bret Victor - Inventing on Principle

2012-02-25 Thread Phil Hagelberg
Craig Brozefsky writes: >> Yes, what a great object lesson in the usefulness of being able to >> disable locals clearing. Gave me a lot to think about regarding what >> kind of feedback tools should provide. > > I don't understand what "disable locals clearing" means. In order to avoid memory le

clojure.test on ClojureScript?

2012-02-25 Thread Shantanu Kumar
Hi, Has anybody got clojure.test working with ClojureScript? Is it planned for clojure.test to eventually work on ClojureScript? Shantanu -- 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 N