Re: Comprehensive ClojureScript Optimizations - Please Try!

2012-04-15 Thread Brandon Bloom
> > Why not just analyze the source path? Also re-analyze changed files? > That would probably work. The benefit to doing it the way I'm doing it is that it loads the analysis results of the build that is loaded. Imagine: 1. Write some CLJS 2. Compile it 3. Load it up in the browser

Re: Practical Clojure

2012-04-15 Thread faenvie
hi, glad to hear that. Up the Ladder of Abstraction ;-) with the books. Gruesse On Apr 14, 7:55 pm, Stuart Sierra wrote: > Hi, faenvie, > > Thanks for your comments about "Practical Clojure," really glad you enjoyed > it! > > Unfortunately, it seems unlikely right now that there will be a secon

Re: ANN: New VimClojure plug-in now known as lein-tarsier

2012-04-15 Thread Evan Mezeske
On Saturday, April 14, 2012 9:07:39 PM UTC-7, Daniel Solano Gómez wrote: > > Thanks for your thoughts. After considering your points, I've decided > to rename the plug-in 'lein-tarsier', after the animal that appears on > the cover of 'Learning the vi and Vim Editors'. > Awesome choice. A relevan

Re: Light Table - a new IDE concept

2012-04-15 Thread Eric Springer
On Saturday, 14 April 2012 04:34:54 UTC+10, looselytyped wrote: > > This is an awesome implementation of Brett Victors "Inventing On > Principle" [http://vimeo.com/36579366] using Clojure and Noir by Chris > Granger (who also wrote Noir). > > Figured I would share it with the group. > > http:

Re: Parallel SSH and system monitoring in Clojure

2012-04-15 Thread Paulo Suzart
I forked the server-stats to add a small and simple feature . Ii was quite useful for me, and can be to others. I'm using server-stats (with my fork) plus cron to monitor an artifactory server running on EC2. Thanks On Friday, March 23, 2012 1:

How Do I Install New Version Of Clojure?

2012-04-15 Thread Anto
I want to install clojure version 1.3, which I guess is the latest. I tried "sudo apt-get install clojure" which installs clojure 1.1 by default. I use Ubuntu 10.10 Thanks in advance. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this

Re: How Do I Install New Version Of Clojure?

2012-04-15 Thread Qiu Xiafei
I advice you download the clojure package from clojure.org, and unzip it. Then you can put it to any where you want. Finally, write a shell script named clojure, and put the script to $PATH #! /bin/sh java -cp /path/to/your/downloaded/clojure.jar clojure.main On Sun, Apr 15, 2012 at 1:45 PM, Anto

Re: How Do I Install New Version Of Clojure?

2012-04-15 Thread Anto
Thanks for your reply! Will look into it! -- 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 patient with your first post. To unsubs

Re: How Do I Install New Version Of Clojure?

2012-04-15 Thread James Reeves
On 15 April 2012 15:35, Anto wrote: > Thanks for your reply! Will look into it! You'll likely want to use Clojure via Leiningen, rather than use the raw jar: https://github.com/technomancy/leiningen - James -- You received this message because you are subscribed to the Google Groups "Clojure"

How does this code works.

2012-04-15 Thread Anto
I'm very new to Clojure. And I was pretty much interested to learn about vectors, list . maps in clojure. I have a code like this : (defn factorial-1 [number] "computes the factorial of a positive integer in a way that doesn't consume stack space" (loop [n number factorial 1] (if (zero

Re: How does this code works.

2012-04-15 Thread Roberto Mannai
if (n == 0) return the "factorial", else go to the "loop label" and recur with the two parameters (n--) and (factorial * n). Go on until n-- reaches 0. In a Java-like translation we could have: int n = number; factorial = 1; while(n > 0){ factorial *= n--; } return factorial; On Sun, Apr

Re: == is not always transitive

2012-04-15 Thread Andrea Chiavazza
> > I must agree that the behaviour of == is not correct here. The problem is in this method in Numbers.java: public boolean equiv(Number x, Number y){ return toBigDecimal(x).equals(toBigDecimal(y)); } The behaviour we currently have is: user=> (let [ones [1 1.0 1N 1M 1.0M 1.00M] ] (doseq [a o

Re: [ANN] Leiningen 2.0.0-preview3

2012-04-15 Thread Niels van Klaveren
lein new error under Windows 7 x64: >lein version Leiningen 2.0.0-preview3 on Java 1.6.0_31 Java HotSpot(TM) 64-Bit Server VM >lein new quiltest Generating a project called quiltest based on the 'default' template. java.lang.IllegalArgumentException: No implementation of method: :make-reader of

Re: How does this code works.

2012-04-15 Thread Zach Allaun
I'm new to clojure as well, so someone please correct me if the following explanation is wrong, but I'll give it a shot :). The JVM does not natively support TCO; clojure uses the recur form to accomplish what is effectively the same thing despite that shortcoming of its host. The recur form wo

Re: compile dynamic ns ?

2012-04-15 Thread Stuart Sierra
Hi Olle, gen-class only operates when *compile-files* is true, which happens when you call `compile`, which in turn calls `require`, which looks for .clj files on disk. Clojure doesn't currently support generating Java classes dynamically, but you could hack the compiler to allow it. -Stuart

Re: compile dynamic ns ?

2012-04-15 Thread Marshall T. Vandegrift
Stuart Sierra writes: > Clojure doesn't currently support generating Java classes dynamically, > but you could hack the compiler to allow it. And if you don't feel like doing it yourself, check out shady and `shady.gen-class/gen-class`: https://github.com/llasram/shady/blob/master/src/shady

ClojureScript multitouch support!

2012-04-15 Thread Jason Hickner
Hello folks, I work on primarily on multitouch installations for clients. Historically these are built in processing, flash, openframeworks, etc., but a simple full-screen browser is becoming a more and more viable platform due to WebGL, WebSockets, and hardware-accelerated performance. Howe

Tornado-like async (web) server framework?

2012-04-15 Thread Stefan Arentz
There is a lovely little web server for Python called Tornado. Tornado is an async server that also includes an async http client that plugs right in the server's event loop. This makes it really simple to build scalable web services that call other web services, which is what I mostly use it fo

Re: Tornado-like async (web) server framework?

2012-04-15 Thread Mark Rathwell
https://github.com/ztellman/aleph On Sun, Apr 15, 2012 at 9:51 PM, Stefan Arentz wrote: > There is a lovely little web server for Python called Tornado. > > Tornado is an async server that also includes an async http client that plugs > right in the server's event loop. This makes it really simp

Re:Tornado-like async (web) server framework?

2012-04-15 Thread Baishampayan Ghose
Take a look at Aleph http://github.com/ztellman/aleph Regards, BG Sent from phone, please excuse brevity. On Apr 16, 2012 7:21 AM, "Stefan Arentz" wrote: > There is a lovely little web server for Python called Tornado. > > Tornado is an async server that also includes an async http client that

Should I better use a state monad (and how)?

2012-04-15 Thread Nicolas Buduroi
I'm working on a turn-based game and I'm looking for a good way to manage states. In the game each turn is composed of multiple phases. I started by using atoms for the phases field (this is a sequence of functions) in a record and realized that it wouldn't be ideal to keep track of states in t

Re: Should I better use a state monad (and how)?

2012-04-15 Thread kovas boguta
You can try using the in-memory version of Datomic. Besides keeping track of the state at every point, it can help with the reasoning about what should happen next for each state change. On Sun, Apr 15, 2012 at 11:25 PM, Nicolas Buduroi wrote: > I'm working on a turn-based game and I'm looking

Re: Should I better use a state monad (and how)?

2012-04-15 Thread Nicolas Buduroi
On Monday, April 16, 2012 12:08:30 AM UTC-4, kovasb wrote: > > You can try using the in-memory version of Datomic. > > Besides keeping track of the state at every point, it can help with > the reasoning about what should happen next for each state change. > Hum, I hadn't though about using a servi

Re: Tornado-like async (web) server framework?

2012-04-15 Thread Michael Klishin
Stefan Arentz: > Who has some hints or pointers? github.com/momentumclj/momentum is another option. It is still evolving rapidly but I've had very good experience with it. MK -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group,

Re: Should I better use a state monad (and how)?

2012-04-15 Thread Nicolas Buduroi
I couldn't resist writing some more macros! (defmacro << [k-or-ks f] `(fn [state#] (update-in state# ~(if (vector? k-or-ks) k-or-ks (vector k-or-ks)) ~f))) (defn >>* [state form] (condp = (first form) '>>> `(fn [~s

Re: Should I better use a state monad (and how)?

2012-04-15 Thread kovas boguta
Its just a library with some functions; if you can understand macros and the STM I'm confident you can understand it too. On Mon, Apr 16, 2012 at 12:34 AM, Nicolas Buduroi wrote: > On Monday, April 16, 2012 12:08:30 AM UTC-4, kovasb wrote: >> >> You can try using the in-memory version of Datomic

Problems embedding Himera (multiple clojurescript compiler libs in same project?)

2012-04-15 Thread kovas boguta
I'm trying to use Himera as a library, to compile clojurescript forms I'm getting from somewhere. In my project, I also have clojurescript files that I want to compile with other means, using cljsbuild and/or noir-cljs. The issue is, having Himera on the classpath is making this impossible. The