Re: [ANN] clj-ns-browser 1.3.0 - the cool button-row widget release

2012-09-18 Thread Mayank Jain
This is really nice to learn and play with clojure :) Thanks! On Sun, Sep 16, 2012 at 10:02 PM, Denis Labaye denis.lab...@gmail.comwrote: On Fri, Sep 14, 2012 at 7:53 PM, Frank Siebenlist frank.siebenl...@gmail.com wrote: We're happy to announce the new clj-ns-browser 1.3.0 - the cool

Problems trying to run the M003 branch of clojurescript one

2012-09-18 Thread Taylor Sando
I'm having trouble getting the M003 branch to work. I would like to update the project so that it will work with the newest dependencies, and work with leiningen 2. The problem is that when I do: lein repl (go) The chrome browser loads properly, and the page works, but I can't connect with

Re: Some feedback on clojurescript

2012-09-18 Thread Wes Freeman
Glad I'm not the only one! A separate mailing list for ClojureScript would be great. Also, enabling the label [Clojure] for all subjects of emails would be great (this must be a setting in google groups, because most of the larger groups have it enabled), as I filter through a great deal of email

Why does cljs.core redefine String.prototype.apply?

2012-09-18 Thread Matt Campbell
I noticed that cljs.core redefines String.prototype.apply. Being new to Clojure, I don't understand what this redefinition does or what it is for. But I do know that redefining functions in the JS standard library, or defining new ones on standard objects, is something that should be done with

Why does cljs.core redefine String.prototype.apply?

2012-09-18 Thread Matt Campbell
I noticed that cljs.core redefines String.prototype.apply. Being new to Clojure, I don't understand what this redefinition does or what it is for. But I do know that redefining functions in the JS standard library, or defining new ones on standard objects, is something that should be done

Re: Calling Clojurescript code from Clojure

2012-09-18 Thread Frank Siebenlist
I have the same requirement to have a clojurescript-form in my clojure-environment that I want to evaluate in the browser… To make the following code-snippet work, you're supposed to have a browser-repl session running, and start a new repl-session on that same JVM from where you invoke the

Re: ANN Quartzite 1.0 (final)

2012-09-18 Thread Luis Reyes
Hi, I'm trying to use Quartzite so followed the tutorial but I have a problem at executing the -main function. I already add the dependency of [clojurewerkz/quartzite 1.0.1] user= (-main) SLF4J: Failed to load class org.slf4j.impl.StaticLoggerBinder.#StdScheduler

Data Structure server (Redis in Clojure)

2012-09-18 Thread Artem Yankov
Hi, So I really wanted to learn Clojure and get familiar with the functional programming. As a side project I decided to write a simple data structure server similar to Redis. It uses Redis protocol and already supports same data structures and main commands. So any standard redis client can be

Re: Data Structure server (Redis in Clojure)

2012-09-18 Thread Moritz Ulrich
Hi! I don't have the time to look at your code right now, but I have one suggestion: Artem Yankov writes: 2. What would be a best way to implement sorted sets (like in Redis)? I used sorted maps and sorting them by values which I highly doubt is a log(n) operation..

Re: Why does cljs.core redefine String.prototype.apply?

2012-09-18 Thread David Nolen
On Mon, Sep 17, 2012 at 11:26 AM, Matt Campbell mattcampb...@pobox.com wrote: I noticed that cljs.core redefines String.prototype.apply. Being new to Clojure, I don't understand what this redefinition does or what it is for. But I do know that redefining functions in the JS standard library, or

Re: ANN Quartzite 1.0 (final)

2012-09-18 Thread Softaddicts
Look at this around the middle of the page: http://www.slf4j.org/codes.html Quartz is linked to the slf4j api. At runtime this API tries to find an implementation of the static log binder. It will not prevent your code from running. If you want to get rid of the warning and get logging (which

Re: Request to create new contrib: data.dependency

2012-09-18 Thread Stuart Sierra
It's open source. You can do whatever you want, under the terms of the EPL. -S -- 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

Re: Why does cljs.core redefine String.prototype.apply?

2012-09-18 Thread Matt Campbell
On 9/18/2012 8:06 AM, David Nolen wrote: It's a yucky bit of code that needs to be removed. It's there to support using keywords as functions - in ClojureScript keywords are just JS Strings. Is there another way to do the same thing, without a significant performance penalty? Matt

ClojureScript dead-code elimination

2012-09-18 Thread Matt Campbell
When run in advanced mode, the Google Closure Compiler tries to eliminate dead code. This currently doesn't seem to be very effective for ClojureScript. A minimal hello-world example currently compiles to 90 KB in advanced mode. Is this the best that can be done? Is Clojure's dynamism an

Re: Why does cljs.core redefine String.prototype.apply?

2012-09-18 Thread David Nolen
On Tue, Sep 18, 2012 at 9:27 AM, Matt Campbell mattcampb...@pobox.com wrote: On 9/18/2012 8:06 AM, David Nolen wrote: It's a yucky bit of code that needs to be removed. It's there to support using keywords as functions - in ClojureScript keywords are just JS Strings. Is there another way

[ANN] nrepl.el 0.1.4 released

2012-09-18 Thread Tim King
I am happy to announce the release of nrepl.el v0.1.4, an Emacs client for nREPL. https://github.com/kingtim/nrepl.el v0.1.4 is available now on Marmalade, and should also be available on Melpa. See the github Readme for installation and usage instructions. Notable additions since our last

Re: ClojureScript dead-code elimination

2012-09-18 Thread Moritz Ulrich
Hi, Matt Campbell writes: When run in advanced mode, the Google Closure Compiler tries to eliminate dead code. This currently doesn't seem to be very effective for ClojureScript. A minimal hello-world example currently compiles to 90 KB in advanced mode. Is this the best that can be

Re: ClojureScript dead-code elimination

2012-09-18 Thread David Nolen
On Tue, Sep 18, 2012 at 9:40 AM, Matt Campbell mattcampb...@pobox.com wrote: When run in advanced mode, the Google Closure Compiler tries to eliminate dead code. This currently doesn't seem to be very effective for ClojureScript. A minimal hello-world example currently compiles to 90 KB in

Re: ClojureScript dead-code elimination

2012-09-18 Thread Matt Campbell
On 9/18/2012 8:57 AM, David Nolen wrote: I've heard of several large ClojureScript programs that generate 1.2-1.8 *megabytes* of JavaScript. After advanced compilation and gzipping the applications are around 40k-50k (http://blog.mezeske.com/?p=552). This is pretty impressive given that jQuery,

Re: Clojure Programming is a great book

2012-09-18 Thread Chas Emerick
On Sep 13, 2012, at 4:40 PM, larry google groups wrote: I want to offer a big thanks to Chas Emerick, Brian Carper and Christophe Grand. I just got their book Clojure Programming from Amazon yesterday. Spent the whole night reading it. This is my favorite Clojure book so far. Thank you

mixing clojure source with java class files problem!

2012-09-18 Thread Jim - FooBar();
Hi all, I'm having a really ridiculous problem...let's say there is jar on clojars with the following structure: --- top-level (.jar) --foo (clojure namespaces) -a.clj -b.clj -c.clj -- --bar (java .class files - no package declaration when compiled) --baz -d.class

Re: mixing clojure source with java class files problem!

2012-09-18 Thread Aaron Cohen
On Tue, Sep 18, 2012 at 10:52 AM, Jim - FooBar(); jimpil1...@gmail.com wrote: Hi all, I'm having a really ridiculous problem...let's say there is jar on clojars with the following structure: --- top-level (.jar) --foo (clojure namespaces) -a.clj -b.clj -c.clj -- --bar

Re: Calling Clojurescript code from Clojure

2012-09-18 Thread Brent Millare
Shantanu, Quiddity does not fulfill my requirements since I need to control the environment from interop such as load-file and interop. On Tuesday, September 18, 2012 12:03:27 AM UTC-4, Shantanu Kumar wrote: On Sep 18, 8:27 am, Brent Millare brent.mill...@gmail.com wrote: I forgot to

Re: Calling Clojurescript code from Clojure

2012-09-18 Thread Brent Millare
Hi Frank, That is pretty much exactly as I wanted. The only problem is that you are calling a private fn and therefore the code is susceptible to change. I think this should be looked into more and become officially supported. This is a great hook that opens up the door to a more interactive

Re: mixing clojure source with java class files problem!

2012-09-18 Thread Jim - FooBar();
On 18/09/12 16:00, Aaron Cohen wrote: The package is baked into the .class file format. You can't change it after the fack by just moving files in the directory structure. regardless of whether there is an actual package declaration? So, you're saying that if I compile the java source inside

Re: Calling Clojurescript code from Clojure

2012-09-18 Thread Brent Millare
Actually, after looking through the source myself, I noticed eval-and-print just calls evaluate-form, which is better since its public. I can take care of printing myself so this is probably better. -- You received this message because you are subscribed to the Google Groups Clojure group. To

Re: mixing clojure source with java class files problem!

2012-09-18 Thread Jim - FooBar();
It still not finding the compiled classes! I compiled them all using the exact same package declaration as the one found in the jar that I'm producing! I was also careful to convert the hyphen (directory name) to an underscore (in the .java file)... I am still getting a :

Re: mixing clojure source with java class files problem!

2012-09-18 Thread Jim - FooBar();
decompiling a simple interface gives: *package*encog_java.customGA; *import*org.encog.ml.MLRegression; *import*org.encog.ml.genetic.population.Population; *public**abstract**interface*CalculateScore { *public**abstract**double*calculateScore(MLRegression paramMLRegression);

Re: mixing clojure source with java class files problem!

2012-09-18 Thread Aaron Cohen
What did you use to compile this? I don't believe hyphens are legal in Java package names. It will be hard to use this in clojure, clojure converts hyphens to underscores automatically behind the scenes in package names. But your package actually has a (possibly invalid) hyphen in it's name, so

Re: mixing clojure source with java class files problem!

2012-09-18 Thread Jim - FooBar();
On 18/09/12 17:28, Aaron Cohen wrote: What did you use to compile this? I don't believe hyphens are legal in Java package names. I used regular *javac -cp blah:blah:blah encog-java/customGA/*.java* the compiler did not complain because the actual package declaration uses underscore instead

Re: mixing clojure source with java class files problem!

2012-09-18 Thread Aaron Cohen
On Tue, Sep 18, 2012 at 12:39 PM, Jim - FooBar(); jimpil1...@gmail.com wrote: On 18/09/12 17:28, Aaron Cohen wrote: What did you use to compile this? I don't believe hyphens are legal in Java package names. I used regular javac -cp blah:blah:blah encog-java/customGA/*.java the

Re: mixing clojure source with java class files problem!

2012-09-18 Thread Jim - FooBar();
On 18/09/12 17:50, Aaron Cohen wrote: I actually just tried this (I don't recommend this approach though), and it worked for me, maybe you missed a step. what? seriously? You mean you downloaded the jar and managed to import some class from inside encog_java/customGA/ in some dummy project of

Re: mixing clojure source with java class files problem!

2012-09-18 Thread Jim - FooBar();
On 18/09/12 17:50, Aaron Cohen wrote: I actually just tried this (I don't recommend this approach though), and it worked for me, maybe you missed a step. what jar is lein2 using? the one with the nice name or the one with the numbers at the end? which one of the 2 did you modify? Jim ps:

Re: mixing clojure source with java class files problem!

2012-09-18 Thread Aaron Cohen
On Tue, Sep 18, 2012 at 12:54 PM, Jim - FooBar(); jimpil1...@gmail.com wrote: On 18/09/12 17:50, Aaron Cohen wrote: I actually just tried this (I don't recommend this approach though), and it worked for me, maybe you missed a step. what jar is lein2 using? the one with the nice name or the

Re: ClojureScript dead-code elimination

2012-09-18 Thread Mimmo Cosenza
I'm studying clojurescript/closure to better understand if using clojurescript could be really a step ahead in developing rich web based application. So, I'm still a newbie. I found in some way useful this google service http://closure-compiler.appspot.com/home to evaluate gclosure benefits

Re: mixing clojure source with java class files problem!

2012-09-18 Thread Jim - FooBar();
On 18/09/12 17:54, Jim - FooBar(); wrote: On 18/09/12 17:50, Aaron Cohen wrote: I actually just tried this (I don't recommend this approach though), and it worked for me, maybe you missed a step. what jar is lein2 using? the one with the nice name or the one with the numbers at the end?

instantiating a clojure record from Java

2012-09-18 Thread Jim - FooBar();
I want to instantiate a record and call a fn from java source code... I've got this in my .java file: //prepare java-clojure interop private static IFn requireFn = RT.var(clojure.core, require).fn(); static {requireFn.invoke(Symbol.intern(Clondie24.games.chess));} //the namespace

Re: instantiating a clojure record from Java

2012-09-18 Thread Jim - FooBar();
trying at the repl: (class (Player. nil 1)) =Clondie24.games.chess.Player if the fully-qualified name won't work I don't know what will! weird-stuff... Jim On 18/09/12 19:04, Jim - FooBar(); wrote: I want to instantiate a record and call a fn from java source code... I've got this in

Re: Some feedback on clojurescript

2012-09-18 Thread Alexey Petrushin
issues on JIRA Theres a barrier - You has to register to JIRA to submit issue - many people won't bother with that and just ignore small bugs or proposals vs. almost everyone has github account. JVM Yeah, would be nice to have JS-on-the-fly compiler (like CoffeeScript) Would be also nice to

Re: Some feedback on clojurescript

2012-09-18 Thread David Nolen
On Tue, Sep 18, 2012 at 2:29 PM, Alexey Petrushin alexey.petrus...@gmail.com wrote: issues on JIRA Theres a barrier - You has to register to JIRA to submit issue - many people won't bother with that and just ignore small bugs or proposals vs. almost everyone has github account. Small bugs are

Re: instantiating a clojure record from Java

2012-09-18 Thread Sean Corfield
On Tue, Sep 18, 2012 at 11:04 AM, Jim - FooBar(); jimpil1...@gmail.comwrote: However i get again: ClassNotFoundException Clondie24.games.chess.Player That suggests the Clojure code isn't AOT compiled and/or isn't on your class path? -- Sean A Corfield -- (904) 302-SEAN An Architect's View --

Re: Some feedback on clojurescript

2012-09-18 Thread Gergely Nagy
Wes Freeman freeman@gmail.com writes: A separate mailing list for ClojureScript would be great. Also, enabling the label [Clojure] for all subjects of emails would be great (this must be a setting in google groups, because most of the larger groups have it enabled), as I filter through a

Confused by reference to capturing (as opposed to binding) in C. Grand's talk (not= DSL macros)

2012-09-18 Thread Alex Dowad
In his talk entitled (not= DSL macros), C. Grand recommends designing the core of a DSL with capturing rather than binding, then adding binding macros as an extra layer on top if desired. I'm trying to understand what exactly he means by capturing in this context. I'm familiar with the use of

Re: Confused by reference to capturing (as opposed to binding) in C. Grand's talk (not= DSL macros)

2012-09-18 Thread Baishampayan Ghose
Variable Capture (a common problem with unhygenic macros) can introduce defects in your code. Wikipedia has some info on it - https://en.wikipedia.org/wiki/Common_Lisp#Variable_capture_and_shadowing For more, you should take a look at On Lisp by Paul Graham. Regards, BG On Tue, Sep 18, 2012 at

Re: Confused by reference to capturing (as opposed to binding) in C. Grand's talk (not= DSL macros)

2012-09-18 Thread Alex Dowad
Dear B.G., thanks for your response. I already understand the problem of variable capture in macros well. However, is that really what C. Grand is talking about in (not= DSL macros)? If you have a video of the talk, the part where he talks about capturing comes at about 13:40. -- You received

ANN Welle 1.3.1

2012-09-18 Thread Michael Klishin
Welle is an expressive Clojure client for Riak with batteries included. 1.3.1 is a bug fix release: * Welle now uses reasonable vclock pruning settings by default Detailed change log: https://github.com/michaelklishin/welle/blob/1.3.x-stable/ChangeLog.md Documentation guides:

Re: Confused by reference to capturing (as opposed to binding) in C. Grand's talk (not= DSL macros)

2012-09-18 Thread Baishampayan Ghose
Apparently blip.tv is down now. I will take a look at the video when it's available again and get back to you. Regards, BG On Tue, Sep 18, 2012 at 12:47 PM, Alex Dowad alexinbeij...@gmail.com wrote: Dear B.G., thanks for your response. I already understand the problem of variable capture in

Re: array literal syntax

2012-09-18 Thread Andrew
In my ClojureScript unit tests, the following doesn't evaluate to true (= (array 1 2) (foo)) even though all foo does is return (array 1 2). What should I do differently? On Tuesday, January 10, 2012 2:51:06 PM UTC-5, David Nolen wrote: There is no array literal syntax yet, but (array 22 33)

Re: array literal syntax

2012-09-18 Thread David Nolen
On Tue, Sep 18, 2012 at 4:54 PM, Andrew ache...@gmail.com wrote: In my ClojureScript unit tests, the following doesn't evaluate to true (= (array 1 2) (foo)) even though all foo does is return (array 1 2). What should I do differently? Those are primitive mutable arrays and are compared via

Re: array literal syntax

2012-09-18 Thread Andrew Cheng
FYI, in #clojure, duck11232 suggested the following which works for me. (defn arr= [a b] (not (or ( a b) ( a b On Tue, Sep 18, 2012 at 4:54 PM, Andrew ache...@gmail.com wrote: In my ClojureScript unit tests, the following doesn't evaluate to true (= (array 1 2) (foo)) even though all foo

Re: Modelling for DAG with identity map - or not?

2012-09-18 Thread Bob Hutchison
On 2012-09-16, at 3:21 PM, Patrik Sundberg patrik.sundb...@gmail.com wrote: I'm asking myself though if there's a more functional design for accomplishing the same goals? My main goals are to do things consistently so that changing a value X propagates properly, and being able to find

Re: array literal syntax

2012-09-18 Thread David Nolen
On Tue, Sep 18, 2012 at 5:07 PM, Andrew Cheng ache...@gmail.com wrote: FYI, in #clojure, duck11232 suggested the following which works for me. (defn arr= [a b] (not (or ( a b) ( a b This is not valid Clojure. Using this in CLJS will result in things like the following: (arr= (array 1)

Re: Confused by reference to capturing (as opposed to binding) in C. Grand's talk (not= DSL macros)

2012-09-18 Thread Matching Socks
The Google can find a PDF by that name. It uses capturing in the sense of regular expressions. I think his idea is that in the DSL you identify or produce information (capture it), but you do not specify the names by which the user's program will refer to it (bind it). -- You received this

Re: Request to create new contrib: data.dependency

2012-09-18 Thread Stuart Sierra
I didn't get approval to create data.dependency, so instead I've merged that work into tools.namespace, currently available as 0.2.0-SNAPSHOT. -S -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to

Re: array literal syntax

2012-09-18 Thread Andrew
I tried this but it didn't work. (identical? (array 1 2) (foo)) Did you mean this? On Tuesday, September 18, 2012 5:08:11 PM UTC-4, David Nolen wrote: On Tue, Sep 18, 2012 at 4:54 PM, Andrew ach...@gmail.com javascript: wrote: In my ClojureScript unit tests, the following doesn't evaluate

Re: array literal syntax

2012-09-18 Thread David Nolen
On Tue, Sep 18, 2012 at 9:20 PM, Andrew ache...@gmail.com wrote: I tried this but it didn't work. (identical? (array 1 2) (foo)) Did you mean this? No. Sorry I meant that equality between two primitive arrays is based on whether they point to the same thing in memory. You want to test two

Re: Tagged literals: undefined tags blow up reader

2012-09-18 Thread kovas boguta
So the edn spec gives the following guidelines: If a reader encounters a tag for which no handler is registered, the implementation can either report an error, call a designated 'unknown element' handler, or create a well-known generic representation that contains both the tag and the tagged

Evolving the Clojure contribution process and goals

2012-09-18 Thread Paul deGrandis
Clojure Conj is nearly upon us. Last year there was a very positive meeting to discuss and help improve the contribution process. This year I thought it might be helpful to get some ideas on the table and refined by the community before the Conj. This has also been a common topic in #clojure.

Re: Evolving the Clojure contribution process and goals

2012-09-18 Thread Andy Fingerhut
On Tue, Sep 18, 2012 at 9:01 PM, Paul deGrandis paul.degran...@gmail.comwrote: 1.) Clojure.org should have a better host of documentation, especially for newcomers. We saw from the Clojure Survey, as well as threads here on the mailing list, that documentation is still something on which we

Re: [ANN] nrepl.el 0.1.4 released

2012-09-18 Thread Stefan Hübner
I get the the following error when trying to auto-complete e.g. (pri: --8---cut here---start-8--- java.lang.NullPointerException: null at clojure.lang.Reflector.invokeNoArgInstanceMember (Reflector.java:314) clojure.stacktrace$print_stack_trace.invoke