Re: Including core.cache in clojurescript?

2012-07-03 Thread Stephen Cagle
And five seconds later, I changed my project.clj's :cljsbuild to {:crossovers [clojure.core.cache rpc.tree rpc.display] :builds [{:source-path "src/rpc/client" :compiler {:output-to "resources/public/main.js" :optimizat

Including core.cache in clojurescript?

2012-07-03 Thread Stephen Cagle
I have no actual idea whether this is possible, but I would like to include core.cache in clojurescript. It might be the case that core.cache makes use of something that would cause it to be incompatible, I don't know, I am not at that point yet. Anyway

Re: Protocol specific type hierarchy

2012-07-03 Thread Warren Lynn
Michal: Thanks a lot. This is very helpful. I have not given much thought yet on the implementation, but there seems to be obstacles: 1. get the protocol method implementation dynamically (your suggestion solved part of it) 2. metadata can only be attached to symbols, not the types themselves.

Re: Using type hints to document return types

2012-07-03 Thread skuro
Il giorno martedì 3 luglio 2012 15:33:17 UTC+2, Herwig Hochleitner ha scritto: > > The problem with using type hints for doc is, that they actually alter > runtime behavior, non - locally: > - They replace expensive reflective method call sites with casts to a > known type > - Hence they effecti

Re: Using type hints to document return types

2012-07-03 Thread skuro
Il giorno martedì 3 luglio 2012 18:43:39 UTC+2, Vinzent ha scritto: > > See http://kotka.de/blog/2012/06/Did_you_know_IX.html. I'd propose to use > Trammel or clojure-contracts for such purpose. I don't see the part of tying the Clojure code to the specific target host as a problem in my case, a

Re: Protocol specific type hierarchy

2012-07-03 Thread Michał Marczyk
On 3 July 2012 18:40, Vinzent wrote: > Well, as far as I understand, protocols was made as they were on purpose, so > inability to create hierarchies is a "feature" (like it or not), while the > lack of `get-method`-like thing is clearly a defect (in my mind). You can get hold of a protocol's imp

Re: Understand extends? result

2012-07-03 Thread Warren Lynn
Is it possible that "satisfies?" is a better predicate to use than "extends?"? > > But it only works on instances, not types. -- 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 tha

Re: Problems With BigDecimal Precision

2012-07-03 Thread Eric Scrivner
Thank you for your response, exactly what I was looking for. I knew I was missing something. On Monday, July 2, 2012 5:55:49 AM UTC-7, Pierre-Henry Perret wrote: > > Hi Eric, > > The fundamental reason on that behaviour , is that Java Math library which > takes *double *as args, truncates its ar

Re: Clojure Sticker

2012-07-03 Thread Eric Scrivner
+1 I was just looking for this the other day and was disappointed to find I could only get a t-shirt. On Saturday, June 9, 2012 6:03:46 PM UTC-7, aboy021 wrote: > > Is there anywhere that I can get a Clojure sticker? -- You received this message because you are subscribed to the Google Groups "

Re: Understand extends? result

2012-07-03 Thread Aaron Cohen
On Tue, Jul 3, 2012 at 1:32 PM, Warren Lynn wrote: > In the following example: > > (defprotocol testp (foo[this])) > (extend-protocol testp clojure.lang.PersistentVector (foo [this] > "PersistentVector impl")) > (extend-protocol testp clojure.lang.Seqable (foo [this] "Seqable impl")) > (foo []) =

Re: Light Table on Windows XP

2012-07-03 Thread Mark Engelberg
I've emailed Mark Rathwell offline with some more questions to see if I can troubleshoot the Powershell problems I had. Also, Chris Granger contacted me saying he wouldn't necessarily expect it to work on XP, but he gave me instructions on how to run LightTable without the Powershell script if nee

Re: Understand extends? result

2012-07-03 Thread Warren Lynn
On Tuesday, July 3, 2012 2:33:52 PM UTC-4, Ambrose Bonnaire-Sergeant wrote: > > Hi Warren, > > You could use "extenders" to get all Classes that extend to the protocol > and then iterate over them, testing with isa?. > > (some #(isa? MyClass %) (extenders MyProtocol)) > > Thanks, > Ambrose > > Th

Re: Java 7 & GC Settings

2012-07-03 Thread Edward Garson
For those deploying to Oracle Java 7, an updated GC reference (including valid combinations) is available at http://www.fasterj.com/articles/oraclecollectors1.shtml. Regards Edward On Tuesday, July 3, 2012 5:48:15 AM UTC-4, Niels van Klaveren wrote: > > I haven't got much experience with large

Re: Understand extends? result

2012-07-03 Thread Ambrose Bonnaire-Sergeant
Hi Warren, You could use "extenders" to get all Classes that extend to the protocol and then iterate over them, testing with isa?. (some #(isa? MyClass %) (extenders MyProtocol)) Thanks, Ambrose On Wed, Jul 4, 2012 at 1:32 AM, Warren Lynn wrote: > In the following example: > > (defprotocol te

Re: Light Table on Windows XP

2012-07-03 Thread Mark Rathwell
What problem are you seeing? I got it working on 64-bit Windows 7, but the instructions on the site set the policy for all users and my user did not have the authority, so I think I had to specify it for the current user only. I also don't remember if I needed RemoteSigned or Unrestricted as the

Re: Using type hints to document return types

2012-07-03 Thread Sean Corfield
On Tue, Jul 3, 2012 at 9:43 AM, Vinzent wrote: > See http://kotka.de/blog/2012/06/Did_you_know_IX.html. I'd propose to use > Trammel or clojure-contracts for such purpose. > > https://github.com/fogus/trammel > https://github.com/dnaumov/clojure-contracts Or the new contrib library https://github

Understand extends? result

2012-07-03 Thread Warren Lynn
In the following example: (defprotocol testp (foo[this])) (extend-protocol testp clojure.lang.PersistentVector (foo [this] "PersistentVector impl")) (extend-protocol testp clojure.lang.Seqable (foo [this] "Seqable impl")) (foo []) => "PersistentVector impl" (foo '()) => "Seqable impl" (extends?

Re: Protocol specific type hierarchy

2012-07-03 Thread Warren Lynn
On Tuesday, July 3, 2012 12:40:24 PM UTC-4, Vinzent wrote: > > Well, as far as I understand, protocols was made as they were on purpose, > so inability to create hierarchies is a "feature" (like it or not), while > the lack of `get-method`-like thing is clearly a defect (in my mind). > > Anyway

Re: Using type hints to document return types

2012-07-03 Thread Vinzent
See http://kotka.de/blog/2012/06/Did_you_know_IX.html. I'd propose to use Trammel or clojure-contracts for such purpose. https://github.com/fogus/trammel https://github.com/dnaumov/clojure-contracts вторник, 3 июля 2012 г., 17:16:15 UTC+6 пользователь skuro написал: > > Hi *, > > I'm developing

Re: Clojure Sticker

2012-07-03 Thread Chip Collier
+1 for an official way to get the goods! On Mon, Jul 2, 2012 at 12:59 PM, gnarmis wrote: > +1 > > Also, Zazzle seems like a pretty painless option to do this ( > http://www.zazzle.com/custom/stickers), but there might be better ones. > > > On Tuesday, June 19, 2012 5:26:40 AM UTC-5, Raju Bitter

Re: Protocol specific type hierarchy

2012-07-03 Thread Vinzent
Well, as far as I understand, protocols was made as they were on purpose, so inability to create hierarchies is a "feature" (like it or not), while the lack of `get-method`-like thing is clearly a defect (in my mind). Anyway, you have multimethods which can do almost anything, so I think it'd b

Re: Protocol specific type hierarchy

2012-07-03 Thread Warren Lynn
On Tuesday, July 3, 2012 4:18:44 AM UTC-4, Vinzent wrote: > > I believe the protocol's analogue for get-method would be enough. > > > If here you mean we just need to use get-method to directly reuse a protocol method anywhere, I think that is not adequate. We need to maintain the hierarchy s

Re: Light Table on Windows XP

2012-07-03 Thread Tom Maynard
On 07/03/2012 02:36 AM, mnicky wrote: http://www.chris-granger.com/2012/06/24/its-playtime/ The download link given there returns an amusing 404-message: You can find instructions for getting it here:http://app.kodowa.com/playground At least for the nonce. Tom. -- You received this messag

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

2012-07-03 Thread vxm
it is a bug in leiningen repl. > lein repl user=> (doall (repeatedly 3 read-line)) line1 line2 line3 line4 line5 ("line1" "line3" "line5") > java -cp clojure.jar clojure.main user=> (doall (repeatedly 3 read-line)) line1 line2 line3 ("line1" "line2" "line3") --

Re: Using type hints to document return types

2012-07-03 Thread Herwig Hochleitner
The problem with using type hints for doc is, that they actually alter runtime behavior, non - locally: - They replace expensive reflective method call sites with casts to a known type - Hence they effectively narrow the accepted type at the call site - They change the exception thrown in error cas

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

2012-07-03 Thread Meikel Brandmeyer (kotarak)
Hi, Am Dienstag, 3. Juli 2012 14:49:34 UTC+2 schrieb Stuart Sierra: > > Reading from STDIN is often broken by custom REPL environments that manage > STDIN on their own, such as Leiningen or an IDE. > > Try running from a "bare" REPL (e.g. java -cp ... clojure.main). > > I ran a bare repl via java

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

2012-07-03 Thread Stuart Sierra
Reading from STDIN is often broken by custom REPL environments that manage STDIN on their own, such as Leiningen or an IDE. Try running from a "bare" REPL (e.g. java -cp ... clojure.main). -S On Monday, July 2, 2012 2:51:23 AM UTC-4, Swaroop wrote: > > Hi, > > This might be a naive question, b

Re: Atom validator ?

2012-07-03 Thread Stuart Sierra
Usually, any error like "cannot do X on undefined" in ClojureScript means that you're using a symbol that was not defined anywhere. Check your symbol names for typos or things that have been removed. -S On Monday, July 2, 2012 12:56:45 AM UTC-4, Pierre-Henry Perret wrote: > > > I get an error o

Re: 'last' on empty collections

2012-07-03 Thread Rick
Don't use exceptions for flow control: http://c2.com/cgi/wiki?DontUseExceptionsForFlowControl Depending on you perspective, calling last on an empty sequence is: - A mistake -> You should check the sequence before you call last. Otherwise you might depend on exceptions for flow control

:arglist metadata for partially-applied functions

2012-07-03 Thread MerelyAPseudonym
When abstracting out common behavior by creating higher-order functions, I would like the resulting function to retain the arglist metadata. Has anyone already solved this problem? If not, are there kosher ways of going about it? I have a feeling it'd be possible to create a new def-form that w

Re: Clojure Sticker

2012-07-03 Thread gnarmis
+1 Also, Zazzle seems like a pretty painless option to do this (http://www.zazzle.com/custom/stickers), but there might be better ones. On Tuesday, June 19, 2012 5:26:40 AM UTC-5, Raju Bitter wrote: > > +1 > -- You received this message because you are subscribed to the Google Groups "Clojur

Using type hints to document return types

2012-07-03 Thread skuro
Hi *, I'm developing a Clojure bridge to the Alfresco APIs, where I use a protocol, Node, to extend a class coming from the original Java API (NodeRef). Now, one of the project contributors proposed to add type hints to the return values of the Clojure API functions, so to have, e.g.: (defn ^N

Re: File not found exception: instant.clj running: lein cljsbuild

2012-07-03 Thread diego
> > To follow up on my own post: looks like installing a later version of > clojure should fix this: https://gist.github.com/3019801 > -- 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

Re: Java 7 & GC Settings

2012-07-03 Thread Sam Aaron
Hi Bruce, at the bottom of this file you can see the options we use in Overtone to try and reduce latency (i.e. we're not so worried about throughput, but are trying to minimise the occurrence of long GC pauses) https://github.com/overtone/overtone/blob/master/project.clj Sam --- http://sam.a

6 December 2012 - London - Clojure eXchange - Call for Presentations

2012-07-03 Thread Bruce Durling
Fellow Clojurians, Following on from the brilliant community in solidarity success of last December's Clojure eXchange and this May's fantastic EuroClojure, I'd like to announce the call for presentations for the 2012 Clojure eXchange in London. The event will be hosted by Skills Matter again on

Re: Java 7 & GC Settings

2012-07-03 Thread Niels van Klaveren
I haven't got much experience with large scale Clojure environments, but I do know something from managing a lot of JVM production environments. The biggest lesson is: All applications behave differently, usually more so in type of application than JVM language used. No hard and fast rules can b

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

2012-07-03 Thread Meikel Brandmeyer (kotarak)
Hi, I suspect some terminal issue here. When providing a file with some lines in it, things work as expected: user=> (with-open [in (clojure.lang.LineNumberingPushbackReader. (clojure.java.io/reader "foo.txt"))] (binding [*in* in] (loop [lines (repeate

Re: Protocol specific type hierarchy

2012-07-03 Thread Vinzent
I believe the protocol's analogue for get-method would be enough. вторник, 3 июля 2012 г., 2:58:49 UTC+6 пользователь Warren Lynn написал: > > When I re-read the thread "defrecord with inheritance" > > https://groups.google.com/forum/?fromgroups#!searchin/clojure/inherit/clojure/mr-o9sRyiZ0/oM4zRz

Re: Light Table on Windows XP

2012-07-03 Thread mnicky
http://www.chris-granger.com/2012/06/24/its-playtime/ On Tuesday, July 3, 2012 9:25:24 AM UTC+2, Jim foo.bar wrote: > > Light table has been released? when did that happen? > > Jim > > > On Tue, Jul 3, 2012 at 3:44 AM, Mark Engelberg > wrote: > >> I have been unable to get Light Table to work on

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

2012-07-03 Thread Swaroop
Hi Meikel, I'm not sure I'm following your example, I ran this code (in Clojure 1.4) - it does not echo back the input and it does not seem to work lazily i.e. also hangs: (defn -main [& args] ;; https://groups.google.com/d/msg/clojure/kYNWcfajHhY/5FcSk3B71mwJ (println "Input something:

Re: Light Table on Windows XP

2012-07-03 Thread Dimitrios Jim Piliouras
Light table has been released? when did that happen? Jim On Tue, Jul 3, 2012 at 3:44 AM, Mark Engelberg wrote: > 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 instructio