Re: clojurescript multimethod error

2012-07-02 Thread David Nolen
On Tue, Jul 3, 2012 at 1:01 AM, Robert Marianski wrote: > I can confirm that this patch resolves the issue for me. Thanks! > > As to whether null and undefined should be interchangeable, I'm not sure > what the right answer is. I think that depends on how many times > undefined is returned as a re

Re: clojurescript multimethod error

2012-07-02 Thread Robert Marianski
I can confirm that this patch resolves the issue for me. Thanks! As to whether null and undefined should be interchangeable, I'm not sure what the right answer is. I think that depends on how many times undefined is returned as a result from a cljs function. If it happens pretty often, then we pro

Re: clojurescript multimethod error

2012-07-02 Thread Michał Marczyk
The problem is partly with (hash js/undefined) and partly with (:foo {}) -- the former is broken on master, the latter returned js/undefined. Ticket is here with a fix for the first problem is here: http://dev.clojure.org/jira/browse/CLJS-330 The ticket description mentions further issues. In pa

Re: clojurescript multimethod error

2012-07-02 Thread Michał Marczyk
I see where the problem is and I've got a possible fix. I'll go ahead and open a ticket; I'll be right back with a link. Cheers, Michał On 3 July 2012 04:40, David Nolen wrote: > Please open a ticket with these details: > http://dev.clojure.org/jira/browse/CLJS > > Thanks! > > David > > On Mon

Re: clojurescript multimethod error

2012-07-02 Thread David Nolen
Please open a ticket with these details: http://dev.clojure.org/jira/browse/CLJS Thanks! David On Mon, Jul 2, 2012 at 10:37 PM, Robert Marianski wrote: > I'm getting an error when trying to call a multimethod in a certain > scenario. I'm unfortunately not able to reproduce this when running it

clojurescript multimethod error

2012-07-02 Thread Robert Marianski
I'm getting an error when trying to call a multimethod in a certain scenario. I'm unfortunately not able to reproduce this when running it as a test case with v8. But, I was able to trim it down to the following test case which fails for me in a browser (with a connected repl). (defmulti foo (fn

Light Table on Windows XP

2012-07-02 Thread Mark Engelberg
I have been unable to get Light Table to work on Windows XP. I suspect this has something to do with not installing the proper version of Power Shell, but the install instructions are exceedingly sparse and no such details have been provided. I submitted feedback through official channels but (un

Protocol specific type hierarchy

2012-07-02 Thread Warren Lynn
When I re-read the thread "defrecord with inheritance" https://groups.google.com/forum/?fromgroups#!searchin/clojure/inherit/clojure/mr-o9sRyiZ0/oM4zRz4dXYsJ I am thinking: conceptually, for code reuse, is it a good idea to have protocol specific type hierarchy? I mean something like this: (defr

Re: NoSuchMethodError clojure.lang.Numbers.lt(ILjava/lang/Object;)Z clojure.contrib.string/drop (string.clj:121)

2012-07-02 Thread Sean Corfield
On Mon, Jul 2, 2012 at 1:24 AM, omer wrote: > anyway, i have a .clj file i want to run but the error above doesn't let me, > i have to solve this isue quickly becouse  i have an excersie to deliver on > time! It looks like you are trying to mix the old, outdated clojure.contrib libraries with Clo

ANN Neocons 1.0.0-rc2

2012-07-02 Thread Michael Klishin
Neocons 1.0.0-rc2 is released to clojars.org. This release adds support for indexing of relationships. This is likely to be the last RC before 1.0. Now our focus is on finishing documentation guides. Change log: https://github.com/michaelklishin/neocons/blob/master/ChangeLog.md Documentation: h

Re: defstruct defrecord metadata

2012-07-02 Thread JDuPreez
Hi, I only needed the 'annotations' to work with structmaps and records (data structures I use to define my domain model), therefore ignored other data structures: (defn cut-key [it] (if (keyword? it) it (keyword (str it (def decorations (atom {})) ; Argument "decor" should be

Re: 'last' on empty collections

2012-07-02 Thread Sean Corfield
On Sun, Jul 1, 2012 at 4:58 PM, Warren Lynn wrote: > Sure it will be. That is why I said this is an academic one, and I don't > expect any change to current one. :) > I am very interested in Clojure and am thinking about using it in a kind-of > mission critical project (except my mission is not

Re: :auto-refresh in ring apps

2012-07-02 Thread Tim Visher
On Mon, Jul 2, 2012 at 9:46 AM, Murtaza Husain wrote: > I am developing an app in clojurescript with cljsbuild doing the compiling. > ring has a configuration option where if :auto-refersh? is set to true in > the project.clj, then browser will be refreshed when any resource files are > changed.

:auto-refresh in ring apps

2012-07-02 Thread Murtaza Husain
Hi, I am developing an app in clojurescript with cljsbuild doing the compiling. ring has a configuration option where if :auto-refersh? is set to true in the project.clj, then browser will be refreshed when any resource files are changed. This will be ideal, as any generated clojurescript fi

Re: Announcing dyscord

2012-07-02 Thread David Jagoe
Nice! Thanks. On 2 July 2012 12:29, Andreas Kostler wrote: > Hi all, > A little exercise to get me started with clojurescript turned into > something people might actually find useful: > > dyscord, a clojurescript library to bring emacs-like key sequences to > web-apps. > > usage > = > > A k

Re: Problems With BigDecimal Precision

2012-07-02 Thread Pierre-Henry Perret
Hi Eric, The fundamental reason on that behaviour , is that Java Math library which takes *double *as args, truncates its arguments, which is the case with *Math.pow .* >From *The Joy of Clojure, sec. 4.1.1:* __ (let [imadeuapi 3.141592653589793238462643

Re: Problems With BigDecimal Precision

2012-07-02 Thread Pierre-Henry Perret
Hi Eric, I tried to see what was going on with this calculation, knowing that when working with Java libraries which takes primitive type (as it is the cas with Math.pow) this can be easily corrupted, which is the case in the * probability-collision* fn So , I think that Java lib cant be used.

Re: Protocol as an abstract data type

2012-07-02 Thread Vinzent
IIndexed is the protocol that maps to nth. Well, IIndexed is the protocol behind -nth, and some dispatching also happens in nth itself. So there is two levels of dispatch: in the nth function (closed) and in the IIndexed protocol (open). See the Michał Marczyk's comment about IIndexable and

Re: Clojure in OSGi and *use-context-classloader*

2012-07-02 Thread Jacek Laskowski
On Sun, Jul 1, 2012 at 12:03 AM, Maris wrote: > Why booleanCast(USE_CONTEXT_CLASSLOADER.deref()) doesn't always return false > ? Could it be that you run multiple threads and the var is true in a thread and false in the other? Just a guess. Jacek -- Jacek Laskowski Functional languages (Cloju

Announcing dyscord

2012-07-02 Thread Andreas Kostler
Hi all, A little exercise to get me started with clojurescript turned into something people might actually find useful: dyscord, a clojurescript library to bring emacs-like key sequences to web-apps. usage = A key sequence, is a sequence of keyboard key presses. Any element in such a sequenc

Re: ClojureScript instead of CoffeeScript for complete web app development?

2012-07-02 Thread Jacobo Polavieja
On Monday, June 25, 2012 6:31:42 AM UTC+2, Christian Mueller wrote: > > I have developed a tiny web app in Clojure/ClojureScript and have written > an overview here . In > general, it was an exciting experience, but I also faced several problems

Re: 64 or 32 bit eclipse

2012-07-02 Thread Chas Emerick
Clojure should not have any sensitivity to the underlying CPU architecture. Based on the stack trace, it looks like either some REPL expression or file in a project you're working on is attempting to load a library namespace, but is failing…probably due to not having the right dependencies on th

Re: 'last' on empty collections

2012-07-02 Thread Vinzent
This decision definitely is a part of clojure design; as far as I can tell, clojure tends to not throw an exception unless the input is terribly wrong (e.g. can't be converted to a seq in your case). Of course, it has some drawbacks, but is pretty convenient for the programmer and doesn't cause

Re: NoSuchMethodError clojure.lang.Numbers.lt(ILjava/lang/Object;)Z clojure.contrib.string/drop (string.clj:121)

2012-07-02 Thread omer
ok i see, do you have an answer to my other problem? very important... thanks anyway! :) בתאריך יום שני, 2 ביולי 2012 11:30:53 UTC+3, מאת Niels van Klaveren: > > In the new Counterclockwise 9.0, just clicking the 'play' button should be > enough to start a REPL and load the the current clj file i

Re: NoSuchMethodError clojure.lang.Numbers.lt(ILjava/lang/Object;)Z clojure.contrib.string/drop (string.clj:121)

2012-07-02 Thread Niels van Klaveren
In the new Counterclockwise 9.0, just clicking the 'play' button should be enough to start a REPL and load the the current clj file if it has the focus. On Monday, July 2, 2012 10:24:38 AM UTC+2, omer wrote: > > hi, i'm new to clojure and i keep running in to this error! > i'm using eclipse in w

NoSuchMethodError clojure.lang.Numbers.lt(ILjava/lang/Object;)Z clojure.contrib.string/drop (string.clj:121)

2012-07-02 Thread omer
hi, i'm new to clojure and i keep running in to this error! i'm using eclipse in win7, in addition when i press run tab, there supposed to be an "as clojure project" but there is nothing there?! i'm know from toturials that it should be there...( its a different problem i think..) anyway, i have

Re: Repeatedly asking for user input i.e. calling (read-line) hangs?

2012-07-02 Thread Meikel Brandmeyer (kotarak)
Hi, you wait for five lines. So you have to enter five lines. Enter three more and the "hung" will go away. If you want to read an arbitrary number of lines and bail out depending on some decision you may use a lazy sequence. (loop [lines (repeatedly read-line)] (let [line (first lines)]