Re: [ANN] ClojureScript release 0.0-1535 with G.Closure 0.0-2029

2012-11-13 Thread Herwig Hochleitner
I've seen this same NPE in my project. I managed to work around it by temporarily throwing out the browser repl. It seems to trigger the NPE. Not sure how and why. 2012/11/13 Evan Mezeske emeze...@gmail.com The policy is: update the default version as quickly as possible when a new

Re: [ClojureScript] Single Output File for Multiple Pages or Multiple Output Files?

2012-11-13 Thread Mimmo Cosenza
Hi Zhao, sorry to be so late, but I did not see your question until now. I was investigating a similar issue in writing a short series of clojurescript tutorials (https://github.com/magomimmo/modern-cljs). The problem of sharing in more pages the same js emitted by the clojurescript/closure

Re: Clojurescript/facebook JS-SDK

2012-11-13 Thread Mimmo Cosenza
Hi Kris, sorry to be so late to thank you. For reasons I don't know I read your answer just know. I think you're right in suggesting jayq. At the moment I'm investigating domina, but as soon as I'll come back to js-sdk integration I'll follow your suggestion. thanx again Mimmo On Friday,

question concerning macros by a newbie

2012-11-13 Thread Johannes
Hi, I define a record (defrecord point [x y]) and the following macro: (defmacro drg [typename components] `(def ~(symbol (str typename - (str (first components (fn [~(symbol obj)] (get ~(symbol obj) ~(symbol (str : (str (first components the call user (macroexpand-1

Re: question concerning macros by a newbie

2012-11-13 Thread Christophe Grand
(symbol (str : (str (first components should be (keyword (first components)) In your expansion, :x is not a keyword but a symbol starting by a colon -- the symbol fn performs no validation on its input. When you copied/pasted it for evaluation it was then read as a keyword. Btw I'm a little

Re: question concerning macros by a newbie

2012-11-13 Thread Jim foo.bar
You can't convert to keyword simply by (str : (str (first components))...you need the (keyword (first components))...also why is your argument (symbol obj)? I'd prefer obj# or (gensym obj)... Jim On 13/11/12 10:06, Johannes wrote: Hi, I define a record (defrecord point [x y]) and the

Re: question concerning macros by a newbie

2012-11-13 Thread Thorsten Wilms
On 11/13/2012 11:06 AM, Johannes wrote: I define a record (defrecord point [x y]) and the following macro: (defmacro drg [typename components] `(def ~(symbol (str typename - (str (first components (fn [~(symbol obj)] (get ~(symbol obj) ~(symbol (str : (str (first

Re: Interactive form workflow with Friend, can't log in

2012-11-13 Thread Haim Ashkenazi
Hi On Mon, Nov 12, 2012 at 9:23 PM, Thorsten Wilms t...@freenet.de wrote: On 11/12/2012 03:20 PM, Chas Emerick wrote: Looks like you're not using the keyword-params middleware, which Friend requires (among others). Please check the last paragraph in the 'Authentication' section here:

Re: [ANN] ClojureScript release 0.0-1535 with G.Closure 0.0-2029

2012-11-13 Thread Herwig Hochleitner
I've debugged a bit, the underlying cause seems to be that goog.net.xpc.CrosspageChannel uses goog.async.Deferred, which lives in third_party. In my project, I could indeed successfully compile again with the browser repl, by adding the third-party jar. This leaves two open issues: Why the NPE

Re: question concerning macros by a newbie

2012-11-13 Thread Johannes
Am Dienstag, 13. November 2012 12:06:10 UTC+1 schrieb Christophe Grand: (symbol (str : (str (first components should be (keyword (first components)) In your expansion, :x is not a keyword but a symbol starting by a colon -- the symbol fn performs no validation on its input. When you

Re: question concerning macros by a newbie

2012-11-13 Thread Johannes
Am Dienstag, 13. November 2012 12:09:39 UTC+1 schrieb Jim foo.bar: You can't convert to keyword simply by (str : (str (first components))...you need the (keyword (first components)) in the meantime I learned this from Christophe ...also why is your argument (symbol obj)? I'd prefer

Re: question concerning macros by a newbie

2012-11-13 Thread Johannes
Am Dienstag, 13. November 2012 12:15:17 UTC+1 schrieb thorwil: On 11/13/2012 11:06 AM, Johannes wrote: I define a record (defrecord point [x y]) and the following macro: (defmacro drg [typename components] `(def ~(symbol (str typename - (str (first components

Re: [ANN] ClojureScript release 0.0-1535 with G.Closure 0.0-2029

2012-11-13 Thread Stuart Sierra
My original reason for splitting the third-party JAR was the licensing: the main G.Closure library is under the Apache license; the third-party libraries are under a variety of different licenses. One simple solution would be to make ClojureScript itself have a dependency on the third-party

Re: Interactive form workflow with Friend, can't log in

2012-11-13 Thread Thorsten Wilms
On 11/13/2012 12:28 PM, Haim Ashkenazi wrote: Here's how you wrap your application with middleware (root-routes is your main routes: (def app (- #'root-routes (friend/authenticate …) (wrap-keyword-params) (wrap-params) …)) Now following

Re: question concerning macros by a newbie

2012-11-13 Thread Tassilo Horn
Johannes bra...@nordakademie.de writes: Hi Johannes, I am trying to build an alternative record building macro. For example (define-record point [x y]) should define - a new type point - a constructor make-point (defrecord Point [x y]) generates also a constructor function (-Point x y).

Re: [ANN] ClojureScript release 0.0-1535 with G.Closure 0.0-2029

2012-11-13 Thread Herwig Hochleitner
I concur, but maybe we could make a second release of the closure lib main jar, with a dependency on third-party? That would reflect the actual dependency. I know, you asked for testing before the release. Sorry for not catching this one. 2012/11/13 Stuart Sierra the.stuart.sie...@gmail.com

Re: First foray into clojure - questions for new project

2012-11-13 Thread Jonathon McKitrick
Thanks, Mark. So leiningen has made a significant update lately? On Monday, November 12, 2012 8:49:32 PM UTC-5, Mark Rathwell wrote: These 4 should help you get from zero to a simple web app running on Heroku pretty quickly: https://github.com/technomancy/leiningen/wiki/Upgrading So

Re: First foray into clojure - questions for new project

2012-11-13 Thread Jonathon McKitrick
Thanks, Michael. Should I dive into Ring as well? What about Compojure versus Noir? On Monday, November 12, 2012 9:26:25 PM UTC-5, Michael Klishin wrote: 2012/11/13 Jonathon McKitrick jmcki...@gmail.com javascript: - Any caveats I should be aware of running clojure on heroku? For small

Re: First foray into clojure - questions for new project

2012-11-13 Thread Jonathon McKitrick
Hmm. Is this something I could work around, by paying for an extra dino during busy periods, then cutting back after the activity passes? On Tuesday, November 13, 2012 1:50:13 AM UTC-5, puzzler wrote: Only catch is that the free level of Heroku isn't very useful with Clojure. The app keeps

Re: Where did the idea of metadata come from?

2012-11-13 Thread Paul deGrandis
Here's one use case: Let's say you want to develop a library that monitors system behavior and resources while functions are executed (or while collections are processed). You might have a collection of monitoring functions (we'll call them sensors) that check various things, like disk I/O

Re: First foray into clojure - questions for new project

2012-11-13 Thread David Powell
cemerick made a screencast of how to get started with Clojure, which takes you through getting started with the tools, and making a web app. It is probably a great place to start: http://cemerick.com/2012/05/02/starting-clojure/ For details on the Clojure web stack, I really like this guide:

[ANN] moderns-cljs tutorial 6

2012-11-13 Thread Giacomo Cosenza
Hi all, I'm always a little bit afraid in announcing my small results as a clojure/cljurescript newbie to such a smart community of programmers. I just published on github my learning efforts in the 6th tutorial on clojurescript https://github.com/magomimmo/modern-cljs Hope it can help

Re: [ANN] moderns-cljs tutorial 6

2012-11-13 Thread Laurent PETIT
Hi Giacomo, I haven't had the time to read your articles in-depth, but what I've seen so far seems pretty good, and I'm certain to follow them closely before finishing my clojurescript discovery journey. Thanks for that ! -- Laurent 2012/11/13 Giacomo Cosenza mimmo.cose...@gmail.com Hi all,

Re: First foray into clojure - questions for new project

2012-11-13 Thread John Gabriele
On Tuesday, November 13, 2012 10:26:18 AM UTC-5, Jonathon McKitrick wrote: Thanks, Mark. So leiningen has made a significant update lately? Yes, but my understanding is that most folks have already upgraded (or have plans to upgrade --- thus the upgrading guide) to lein 2. I suggest

Re: First foray into clojure - questions for new project

2012-11-13 Thread Michael Klishin
2012/11/13 Jonathon McKitrick jmckitr...@gmail.com Should I dive into Ring as well? What about Compojure versus Noir? Noir is built on top of Compojure. I guess just use what you like better. I don't think you will use Ring directly initially. So get familiar with it as you need to, the API

Re: First foray into clojure - questions for new project

2012-11-13 Thread Mark Rathwell
Should I dive into Ring as well? What about Compojure versus Noir? Noir is higher level than Compojure, and usually easier for new people to jump into, but not always as flexible, functional or composable. On Tue, Nov 13, 2012 at 10:27 AM, Jonathon McKitrick jmckitr...@gmail.com wrote:

Can't go to the Conj, I have 2 tickets

2012-11-13 Thread Kyle R. Burton
Please contact me off list if anyone is interested in purchasing either of them. I contacted the organizers and they are transferable. I'm sorry I'm not going to be able to make it. Best Regards, Kyle -- Twitter: @kyleburton Blog: http://asymmetrical-view.com/ Fun: http://snapclean.me/ --

Re: First foray into clojure - questions for new project

2012-11-13 Thread kinleyd
It was helpful for me to start from the ground up: Got familiar with ring, then compojure, hiccup, noir, etc. Getting familiar a library at a time prepared me better for managing the more comprehensive frameworks when it came time to customization. FWIW. On Wednesday, November 14, 2012

Re: Where did the idea of metadata come from?

2012-11-13 Thread Raoul Duke
On Tue, Nov 13, 2012 at 7:56 AM, Paul deGrandis paul.degran...@gmail.com wrote: It's difficult to spot the best time to apply metadata, since we've become accustomed to working in languages without support for it. not exactly, it is just that most java people put all their metadata in extra xml

Re: Where did the idea of metadata come from?

2012-11-13 Thread David Nolen
Macros. Metadata is a perfect way to annotate symbols that need to be processed in some specific way or to provide extra information when debugging. Many serious macros I've written use metadata on forms symbols. David On Mon, Nov 12, 2012 at 11:55 PM, Takahiro Hozumi

Dynamically building SQL queries with core.match dynamic variables

2012-11-13 Thread David Jagoe
G'day all, I am building a reporting interface on top of a database with a star schema. The star schema makes it very easy to restrict queries by various combinations of dimension. Some combinations are legal; others are not. Hence core.match. The number of possible combinations is large, and I

ANN concerto 0.1.0-SNAPSHOT

2012-11-13 Thread Jamie Brandon
Concerto extends nrepl (and nrepl.el) with a broadcast mechanism so that multiple users can colloborate within a single repl. Just an experiment, I'm curious to see whether anyone has a use for this. My eventual goal is to use it for collaborative ovetone sessions but for now I have to get back

Re: Where did the idea of metadata come from?

2012-11-13 Thread Mimmo Cosenza
I would to the list the :export metadata used in ClojureScript to prevent Google Closure Compiler from minifying variable and function names which need to be exposed to regular JS code. Mimmo On Monday, November 12, 2012 10:01:43 PM UTC+1, JvJ wrote: Metadata is a really useful feature, and

Re: ANN concerto 0.1.0-SNAPSHOT

2012-11-13 Thread Bruce Durling
I know at least one clojure dojo that would be interested. On Nov 13, 2012 7:24 PM, Jamie Brandon ja...@scattered-thoughts.net wrote: Concerto extends nrepl (and nrepl.el) with a broadcast mechanism so that multiple users can colloborate within a single repl. Just an experiment, I'm curious

Re: [ANN] moderns-cljs tutorial 6

2012-11-13 Thread Mimmo Cosenza
Thanks Laurent, you're right about CLJS, it's a journey, a good one to me. I'm not a client-side guy and for the first time I can enjoy programming the browser. My best Mimmo On Tuesday, November 13, 2012 5:44:49 PM UTC+1, lpetit wrote: Hi Giacomo, I haven't had the time to read your

code waiting on something - cannot debug - driving me insane!!!

2012-11-13 Thread Jim - FooBar();
Hi all, I've had this unbelievable problem for some time now but I'm sick and tired of ignoring it! It is literally driving nuts...Due to the nature of the problem my terminal hangs and Eclipse crashes altogether (potentially losing work)! So what is the problem...Well I really don't have a

Re: ANN concerto 0.1.0-SNAPSHOT

2012-11-13 Thread Florian Over
Hi Jamie, will take a look on this. :) Thursday is our Meetup (Cologne Clojure User Group). Thanks Florian 2012/11/13 Bruce Durling b...@otfrom.com: I know at least one clojure dojo that would be interested. On Nov 13, 2012 7:24 PM, Jamie Brandon ja...@scattered-thoughts.net wrote:

Re: code waiting on something - cannot debug - driving me insane!!!

2012-11-13 Thread Dave Ray
Just a wild guess, but if something's shown on the screen, #'draw-tiles will probably get invoked to paint the canvas and it might end up blocking on the #'curr-game promise. Dave On Tue, Nov 13, 2012 at 12:19 PM, Jim - FooBar(); jimpil1...@gmail.com wrote: Hi all, I've had this unbelievable

Re: ANN concerto 0.1.0-SNAPSHOT

2012-11-13 Thread Chas Emerick
Bravo. I suspect there's lots of fertile ground for supporting alternative topologies using custom middlewares and transports. Carry on. :-) - Chas On Nov 13, 2012, at 2:24 PM, Jamie Brandon wrote: Concerto extends nrepl (and nrepl.el) with a broadcast mechanism so that multiple users can

Re: code waiting on something - cannot debug - driving me insane!!!

2012-11-13 Thread Laurent PETIT
Hello, As of the freeze of Eclipse: you're probably using 0.10.1. A problem of hangs in relation with the way Counterclockwise was talking to the repl has been fixed in the beta. You could either switch right now to the beta channel ( http://ccw.crand.net/updatesite-betas/ ) either wait until

Re: code waiting on something - cannot debug - driving me insane!!!

2012-11-13 Thread Jim - FooBar();
On 13/11/12 20:36, Dave Ray wrote: Just a wild guess, but if something's shown on the screen, #'draw-tiles will probably get invoked to paint the canvas and it might end up blocking on the #'curr-game promise. thanks for your response Dave, even though I'm not entirely sure what you mean, I

Re: code waiting on something - cannot debug - driving me insane!!!

2012-11-13 Thread Dave Ray
Dump the JVM's threads [1] and see what it's stuck on? Dave [1] http://www.crazysquirrel.com/computing/java/basics/java-thread-dump.jspx On Tue, Nov 13, 2012 at 1:42 PM, Jim - FooBar(); jimpil1...@gmail.com wrote: On 13/11/12 20:36, Dave Ray wrote: Just a wild guess, but if something's shown

Re: code waiting on something - cannot debug - driving me insane!!!

2012-11-13 Thread Jim - FooBar();
On 13/11/12 21:45, Dave Ray wrote: Dump the JVM's threads [1] and see what it's stuck on? What am I looking for? I don't see anything related with my project...IT is pretty obvious from the output though that everything is waiting! No clue what though... Jim

Re: code waiting on something - cannot debug - driving me insane!!!

2012-11-13 Thread Laurent PETIT
Could you create a small lein2 project on github with what you previously pasted in this thread correctly spread over files, etc., so that it's really quick to reproduce the error? Thanks, Laurent Sent from a smartphone, please excuse the brevity/typos. Le 13 nov. 2012 à 22:52, Jim - FooBar();

ANN: Spyscope 0.1.2

2012-11-13 Thread David Greenberg
Spyscope is a library that allows you to write very little code to get threadsafe tracing of your Clojure. Example: (println #spy/d (+ 1 2 3)) traces the execution of the form '(+ 1 2 3) Spyscope also supports interactive querying of trace results with a repl toolkit (see README) This version

Re: code waiting on something - cannot debug - driving me insane!!!

2012-11-13 Thread Jim - FooBar();
The original project is already on github...I just committed the dummy namespace as well so you can have a look... so, do: git clone https://github.com/jimpil/Clondie24.git cd Clondie24 lein2 repl (load-file Clondie24.games.dummy.clj) (ns Clondie24.games.dummy) (-main) then close the frame

lein 2.x not working on Mac OS X 10.7.5 -- Exception in thread main java.lang.ClassNotFoundException:

2012-11-13 Thread Alec Ramsay
When I do lein run now, I get Exception in thread main java.lang.ClassNotFoundException:. I'm early in the process of getting a Clojure development environment set up--I coded a lot of LISP years ago and want to dust off my skills with Clojure--and I have previously successfully done the

Re: lein 2.x not working on Mac OS X 10.7.5 -- Exception in thread main java.lang.ClassNotFoundException:

2012-11-13 Thread Marek Šrank
I also had the same issue some time ago and it was caused by incorrect using of dash ('-') vs. underscore ('_') in project/namespace name... I don't remember what concretely was wrong, but you at least can try all possibilities Also, are you using gen-class ? Marek. On Wednesday,

Re: Change var in other namespace

2012-11-13 Thread himangshu
this reply was god sent to me. I use tomcat and war to deploy my clojure code. the default thing was just not compiling. Although I do not have slf4j in my classpath. find logger was still giving slf4j and when it encountered first logging statement, the code used to crap out saying class not

Re: lein 2.x not working on Mac OS X 10.7.5 -- Exception in thread main java.lang.ClassNotFoundException:

2012-11-13 Thread Herwig Hochleitner
Am 14.11.2012 01:30 schrieb Marek Šrank markus.mas...@gmail.com: I also had the same issue some time ago and it was caused by incorrect using of dash ('-') vs. underscore ('_') in project/namespace name... I don't remember what concretely was wrong, but you at least can try all possibilities

Re: lein 2.x not working on Mac OS X 10.7.5 -- Exception in thread main java.lang.ClassNotFoundException:

2012-11-13 Thread Sean Corfield
On Tue, Nov 13, 2012 at 4:11 PM, Alec Ramsay a...@frontseat.org wrote: But while lein new still works, lein run does not. I get the following exception: How did you create that project? lein new http_hello3 - or - lein new http-hello3? -- Sean A Corfield -- (904) 302-SEAN An Architect's View

Re: [ANN] ClojureScript release 0.0-1535 with G.Closure 0.0-2029

2012-11-13 Thread Evan Mezeske
I agree with Herwig, in that if the ClojureScript JAR makes use of goog.async.Deferred, which is from the third party library, then the JAR really needs to depend on the third-party library. I doubt that lein-cljsbuild is the only thing broken by this -- I expect this would break things like

run-jetty doesn't shut down the server after ctrl+c?

2012-11-13 Thread Satoru Logic
Hi, all. I am playing with the `ring` library in `repl`. After using `run-jetty` to start a server, I typed `ctrl+c` to send the SIGINT signal, this ended the `run-jetty` function, but it didn't kill the server: user= (require '[ring.adapter.jetty :refer [run-jetty]]) user= (require

Re: run-jetty doesn't shut down the server after ctrl+c?

2012-11-13 Thread Sean Corfield
On Tue, Nov 13, 2012 at 8:33 PM, Satoru Logic satorulo...@gmail.com wrote: BindException Address already in use sun.nio.ch.Net.bind (Net.java:-2) user= 2012-11-14 11:44:21.370:WARN:oejuc.AbstractLifeCycle:FAILED SelectChannelConnector@0.0.0.0:3000: java.net.BindException: Address already in

Re: run-jetty doesn't shut down the server after ctrl+c?

2012-11-13 Thread Satoru Logic
On Wednesday, November 14, 2012 12:38:55 PM UTC+8, Sean Corfield wrote: On Tue, Nov 13, 2012 at 8:33 PM, Satoru Logic sator...@gmail.comjavascript: wrote: BindException Address already in use sun.nio.ch.Net.bind (Net.java:-2) user= 2012-11-14

Are there projects similar to meteor.js and derby.js but for clojure/clojurescript?

2012-11-13 Thread Leon Talbot
These two JS projects are bluring the boundaries between server and client. -- 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: run-jetty doesn't shut down the server after ctrl+c?

2012-11-13 Thread Satoru Logic
I've found a related question on StackOverflow. http://stackoverflow.com/questions/2706044/how-do-i-stop-jetty-server-in-clojure#2706239 What I have to do is invoking `stop` on the `server` object returned by `run-jetty`. On Wednesday, November 14, 2012 12:38:55 PM UTC+8, Sean Corfield

core.match - how to simplify patterns with repeated guards

2012-11-13 Thread David Jagoe
Hi all, I have a core.match pattern that looks something like this: (def !nil? (complement nil?)) (match [*a* *b*] [(a :guard !nil?) nil] (dosomething a) [nil (b :guard !nil?)] (dosomething b) [(a :guard !nil?) (b :guard !nil?)] (dosomething a b) :else (throw (Exception. Not