Heroku and lein-cljsbuild

2012-03-02 Thread Timothy Licata
Hello all, I'm having trouble getting clojurescript to compile with lein-cljsbuild on heroku. It works locally through foreman and runs fine on heroku other than the cljs compilation issue. I've tried a few things. First of all, heroku doesn't put :dev-dependencies on the classpath by

ClojureScript: browser REPL omitting namespace in generated JS

2012-03-02 Thread Stuart Campbell
Hello, I'm encountering a problem where the browser REPL sometimes omits the ClojureScript namespace in its generated JavaScript, e.g. (def x 42) compiles to .x = 42 instead of foo.x = 42. I've put together a minimal project, with steps to reproduce, on GitHub:

Re: Clojurescript One: (def fiv 5) compiles to .fiv = 5;\n ?

2012-03-02 Thread Stuart Campbell
Hi, I've come across this too. Please see my message ClojureScript: browser REPL omitting namespace in generated JS. Regards, Stuart On 16 January 2012 08:14, Indy inder...@indy.io wrote: Having the same issue and the only way I've resolved it is by having both the server and the cljs-repl

Re: Clojurescript One and Websockets

2012-03-02 Thread Jay Fields
clojure + web sockets, not using aleph: http://blog.jayfields.com/2011/02/clojure-web-socket-introduction.html On Mar 1, 2012, at 10:51 PM, Brian Rowe wrote: Hi, I'm thinking about using clojurescript one a starting point for a web game. I would like to use websockets as the primary

Re: defmulti and defmethods in separate namespaces without circular references?

2012-03-02 Thread Tim Visher
On Thu, Mar 1, 2012 at 8:33 PM, Cymen Vig cymen...@gmail.com wrote: I attempted to do something like this: (ns parent) (defmulti my-method (fn [x] (:method x)) (ns child1) (defmethod my-method :zzz   ...) (ns child2) (defmethod my-method :aaa   ...) However the problem is the

Re: Is it possible to extend a parameterized type using gen-class?

2012-03-02 Thread Daniel Solano Gomez
On Thu Mar 1 21:53 2012, sim wrote: Hi all, This has me stumped and I found another message: https://groups.google.com/forum/?fromgroups#!searchin/clojure/parameterised$20type/clojure/8YxzIYXH49c/xCxkMaGXBzUJ that says it isn't possible, but that was back in 2009, is it still not

Clojurescript wiki needs updating

2012-03-02 Thread László Török
Hi, I noticed that [1] in the Runtime Polymorphism section says that multimethods are not currently implemented in cljs. I don't think that is correct. [1] https://github.com/clojure/clojurescript/wiki/Differences-from-Clojure -- László Török -- You received this message because you are

Re: for behavior difference between clojure and clojurescript?

2012-03-02 Thread Benjamin Peter
Hi all, thanks for responding. On Mar 1, 1:21 am, David Nolen dnolen.li...@gmail.com wrote: Yes it's a known issue. Right now, = only works for two args. For the time being this is for performance reasons, a decent = is critical. I see. Is there a know issues list or is the problem something

Re: need hint for A nil key on 4clojure

2012-03-02 Thread weiyongq
thanks On 2月29日, 下午10时00分, Roman Perepelitsa roman.perepeli...@gmail.com wrote: Most 4clojure exercises are meant for you to familiarize yourself with the clojure standard library. Usually you'll spend more time looking for the appropriate function on clojuredocs than actually coding the

Looking to help out with an open source project...

2012-03-02 Thread Sam Garrett
Hello google Clojure group. I'm fairly new to clojure but what I've used and implemented so far has been quite interesting. So I was wondering if anyone knew of/or has some open source projects written in Clojure that I could get involved in and help out, preferably something small as this

Re: Bret Victor's live editable game in ClojureScript

2012-03-02 Thread Rostislav Svoboda
Hi Chris I think you may have actually missed the point in the video :) There's no pausing necessary - if I made the guy move on his own and changed his speed, you'd see it happen immediately. The thing is, in order to change the speed of the guy you need to refocus your eyes from the guy and

Re: for behavior difference between clojure and clojurescript?

2012-03-02 Thread David Nolen
On Thu, Mar 1, 2012 at 3:21 AM, Benjamin Peter benjaminpe...@arcor.dewrote: Hi all, thanks for responding. On Mar 1, 1:21 am, David Nolen dnolen.li...@gmail.com wrote: Yes it's a known issue. Right now, = only works for two args. For the time being this is for performance reasons, a

Re: ClojureScript: browser REPL omitting namespace in generated JS

2012-03-02 Thread David Nolen
Please open a ticket in JIRA. Thanks! On Fri, Mar 2, 2012 at 4:50 AM, Stuart Campbell stu...@harto.org wrote: Hello, I'm encountering a problem where the browser REPL sometimes omits the ClojureScript namespace in its generated JavaScript, e.g. (def x 42) compiles to .x = 42 instead of

[ANN] Leiningen HTML5 Docs Plugin (first release)

2012-03-02 Thread Tassilo Horn
Hi all, since I've never managed to get autodoc or marginalia running, I've written my own API docs generator. It lived happily as a leiningen task in some project of mine with anything needed for generating docs for this project shamelessly hard-coded, but today I found some spare time to rip

Re: Clojure in Python

2012-03-02 Thread Daniel Gagnon
Well first of all, the real main drive, is that I don't know Java libs nearly as well as Python libs. Secondly, there's a lot of cruft (imo) in Clojure that doesn't need to exist in a dynamic VM. For instance, there's no reason to new up something with (Foo. 1 2). In python objects are

Re: Clojure in Python

2012-03-02 Thread Timothy Baldridge
On a similar note, are you using Python's approach to characters (they are simply a string of length 1)? Yes, that's exactly what we're doing. As an aside note, the fact that Python is so dynamic allows us to do some really interesting things with sequences:

Serializing ClojureScript data structures

2012-03-02 Thread Chris McBride
In Clojure (str {:a 1}) returns {:a 1}. In ClojureScript (str {:a 1}) returns [Object object]. As a result, in order to send data to and from the server I've been doing this: (goog.json/serialize (cljs-js x)). This seems like unnecessary overhead to convert everything a JS object first, is there

Re: Serializing ClojureScript data structures

2012-03-02 Thread David Nolen
pr-str will do what you want. That said we should probably add toString methods to the core datatypes to prevent this surprise. David On Fri, Mar 2, 2012 at 11:14 AM, Chris McBride cmm7...@gmail.com wrote: In Clojure (str {:a 1}) returns {:a 1}. In ClojureScript (str {:a 1}) returns [Object

Re: inconsistency in (keyword…) constructor

2012-03-02 Thread joegallo
PS. same issue with (symbol name) and (symbol ns name)… Huh, somehow I noticed this issue with symbol, but didn't see it with keyword. I guess I've need the two arg version of symbol, but never needed the two arg version of keyword. See some related discussion here:

Re: Serializing ClojureScript data structures

2012-03-02 Thread Chris McBride
Ok Thanks On Mar 2, 11:19 am, David Nolen dnolen.li...@gmail.com wrote: pr-str will do what you want. That said we should probably add toString methods to the core datatypes to prevent this surprise. David On Fri, Mar 2, 2012 at 11:14 AM, Chris McBride cmm7...@gmail.com wrote: In

Re: Serializing ClojureScript data structures

2012-03-02 Thread Alan Malloy
Related: str is a terrible way to serialize things in JVM-clojure as well - pr-str is what you want. For example, {:x a} and {:x 'a} both print the same with str. pr-str also handles lazy sequences, which str doesn't. On Mar 2, 8:19 am, David Nolen dnolen.li...@gmail.com wrote: pr-str will do

Re: defmulti and defmethods in separate namespaces without circular references?

2012-03-02 Thread lambdatronic
I built a modeling system that uses the multi-method namespace separation you are talking about. The solution that I use simply leverages the difference between require, use, and refer. In each namespace that implements the multi-method, put (refer 'parent) after the ns form. In the parent

Re: Looking to help out with an open source project...

2012-03-02 Thread Moritz Ulrich
I might have something for you. It's a small personal (and currently unpublished) project involving Emacs, Clojure and ClojureScript. It isn't very useful if you don't use Emacs :-) Drop me an Email if you're interested. On Thu, Mar 1, 2012 at 04:46, Sam Garrett samdgarr...@gmail.com wrote:

Re: inconsistency in (keyword…) constructor

2012-03-02 Thread Frank Siebenlist
Just found your CLJ-891 and added a comment there that keyword has similar issues with a link to this thread. See that you tried to solve it in java… while I tried to stay up in clj … but any protocol-based solution seems to be up in the air still (?). Hopefully both interfaces can be enhanced

Re: ClojureScript: browser REPL omitting namespace in generated JS

2012-03-02 Thread Stuart Campbell
Done! http://dev.clojure.org/jira/browse/CLJS-157 On 3 March 2012 01:15, David Nolen dnolen.li...@gmail.com wrote: Please open a ticket in JIRA. Thanks! On Fri, Mar 2, 2012 at 4:50 AM, Stuart Campbell stu...@harto.org wrote: Hello, I'm encountering a problem where the browser REPL

Clojure STM vs Java Locks dissertation help data structure database connection

2012-03-02 Thread Riccardo
Hi! I am a student at Swansea University (UK), trying to present a Project about Clojure STM performance and Java Locks performance during the simulation of concurrent Banking transactions: I intend to execute a concurrent transfer of (fixed amount of) money from an account A to an account B in a

How I can use InteractionEvent in clojure?

2012-03-02 Thread Antonio Recio
How I can translate this InteractionEvent written for a java example to clojure? void myCallback() { vtkTransform t = new vtkTransform(); boxWidget.GetTransform(t); boxWidget.GetProp3D().SetUserTransform(t);} boxWidget.AddObserver(InteractionEvent, this, myCallback);

Re: Bret Victor - Inventing on Principle

2012-03-02 Thread Nicolas
The talk was really enligthing... but I would say it is still research. While I can trust you can make, say an intuitive and reactive UI for flash like animations, I think there are still problems to take care of for the program example. Here this is just a simple algorithm without long calls

Re: ClojureScript: browser REPL omitting namespace in generated JS

2012-03-02 Thread Brenton
Thanks Stuart, Looks like the problem might be here: https://github.com/clojure/clojurescript/blob/master/src/clj/cljs/repl.clj#L117 I'll dig into this this weekend. On Mar 2, 6:30 pm, Stuart Campbell stu...@harto.org wrote: Done!http://dev.clojure.org/jira/browse/CLJS-157 On 3 March 2012

Pretty print defn

2012-03-02 Thread Nikem
Hi. Is it possible to pretty print a source code of the function defined with defn? I have tried the following: (defn qw [] (inc 2)) (with-pprint-dispatch code-dispatch (pprint qw)) And got #user$qw user$qw@4743bf3d. But I would like to get at least (inc 2). Is it possible at all? Nikem --

Re: defmulti and defmethods in separate namespaces without circular references?

2012-03-02 Thread Cymen Vig
On Friday, March 2, 2012 7:03:10 AM UTC-6, tim.visher wrote: I will not in any way claim to know how or why this works. I'm just starting to use multimethods myself, but I'll give you my set up that appears to be working at the moment. I have a namespace: (ns store.store)

Re: Pretty print defn

2012-03-02 Thread Mark Rathwell
(clojure.repl/source-fn 'qw) will give you the source. On Fri, Mar 2, 2012 at 10:32 AM, Nikem gni...@gmail.com wrote: Hi. Is it possible to pretty print a source code of the function defined with defn? I have tried the following: (defn qw []  (inc 2)) (with-pprint-dispatch code-dispatch

Re: defmulti and defmethods in separate namespaces without circular references?

2012-03-02 Thread Daniel E. Renfer
I use a lot of multimethods with my framework, Ciste[0] and it can work, the only thing is you have to be very careful about what you put where, and it helps to have a lot of namespaces. What I do is try to keep all of my defmulti's in one namespace and have only defmethod's in another namespace.

Re: Pretty print defn

2012-03-02 Thread Phil Hagelberg
Mark Rathwell mark.rathw...@gmail.com writes: (clojure.repl/source-fn 'qw) will give you the source. You can also use serializable-fn to create a function that will carry its source around with it in metadata: https://github.com/technomancy/serializable-fn But it's not very well tested.

lein run and standard input (*in*) with read-line

2012-03-02 Thread Tim Cross
Hi All, I've been working on my first little clojure project for the past couple of days, but have now run into a problem with leiningen and was hoping someone could point me in the right direction to find a solution. I'm using lein 1.7.0, clojure 1.3.0 and openJDK 6 on a ubuntu based system.

clj-time mailing list!

2012-03-02 Thread Sean Corfield
By popular request: http://groups.google.com/group/clj-time -- Sean A Corfield -- (904) 302-SEAN An Architect's View -- http://corfield.org/ World Singles, LLC. -- http://worldsingles.com/ Perfection is the enemy of the good. -- Gustave Flaubert, French realist novelist (1821-1880) -- You