Re: Example of a real-world ClojureScript web application

2011-08-10 Thread Filip de Waard
On Thu, Aug 11, 2011 at 4:03 AM, Timothy Washington wrote: > Good on you. I've been looking to find a reliable way to have Javascript > unit testing run in a v8 (or any JS) shell. I've tried Jasmine and am now > trying Google Closure's unit testing framework, but have so far come up > short. > > >

Re: Example of a real-world ClojureScript web application

2011-08-10 Thread Filip de Waard
On Wed, Aug 10, 2011 at 11:22 PM, Scott Jaderholm wrote: > I haven't read the code yet but I have a few questions: > Do you miss backbone.js? Are you going to use it with cljs? > I'm using 100% ClojureScript, with Google Closure as the only external dependency. I don't miss Backbone.js, because i

Re: tasting pinot noir

2011-08-10 Thread Timothy Baldridge
> I've gotten into these over the last week, and I've got to say, Chris is > doing a very nice job on these frameworks.  They are really turning into a > nicely integrated offering to develop Clojure and ClojureScript web apps. So...I've been wanting to get into using Cljs recently for a project I

Re: tasting pinot noir

2011-08-10 Thread Mark Rathwell
> i would love to read other community-member's opinion > on pinot noir ... I've gotten into these over the last week, and I've got to say, Chris is doing a very nice job on these frameworks. They are really turning into a nicely integrated offering to develop Clojure and ClojureScript web apps.

Re: Example of a real-world ClojureScript web application

2011-08-10 Thread Timothy Washington
Good on you. I've been looking to find a reliable way to have Javascript unit testing run in a v8 (or any JS) shell. I've tried Jasmine and am now trying Google Closure's unit testing framework, but have so far come up short. Have you come up with anything that works? For now, i'm just having the

Adding ClojureScript support to a noir-based project

2011-08-10 Thread Daniel Jomphe
For what it may be worth to you: In trying out the Noir framework (which neatly assembles ring+compojure+hiccup+other stuff) for its new bindings to ClojureScript (using noir-cljs and pivot), I thought some people might like to see what kind of diff is needed to add basic ClojureScript support

Passing ClojureScript objects to JavaScript functions

2011-08-10 Thread Kevin Lynagh
What is the best way to pass Clojure vectors and maps to JavaScript functions? Currently when I need to call a JavaScript function that takes an array I do something like (js/my_js_fn (.array (vector 1 2 3))) and I pass Clojure maps like (js/my_js_fn (.strobj (hash-map "a" 1 "b" 2))) T

Re: rebind var for all threads

2011-08-10 Thread Mark Rathwell
Or, more accurately, not whitelisted, on App Engine. On Wed, Aug 10, 2011 at 6:34 PM, Ken Wesson wrote: > On Wed, Aug 10, 2011 at 5:20 PM, Mark Rathwell > wrote: > > The lib B function uses blacklisted Java classes, ... > > "Blacklisted"??? > > -- > Protege: What is this seething mass of parent

Re: rebind var for all threads

2011-08-10 Thread Ken Wesson
On Wed, Aug 10, 2011 at 5:20 PM, Mark Rathwell wrote: > The lib B function uses blacklisted Java classes, ... "Blacklisted"??? -- Protege: What is this seething mass of parentheses?! Master: Your father's Lisp REPL. This is the language of a true hacker. Not as clumsy or random as C++; a langua

Re: rebind var for all threads

2011-08-10 Thread Mark Rathwell
Thank you both for the help. >If it's really this serious of an issue, then perhaps the >makers of the libraries will at least accept a patch from you that >adds a hook that will swap out parts of the libraries. Not a serious issue by any means, but I will see what the sentiment is with the libra

Re: rebind var for all threads

2011-08-10 Thread Timothy Baldridge
> My code calls a function in 3rd party library A, which in turn calls a > function in 3rd party library B.  The lib B function uses blacklisted Java > classes, causing my app to crash when lib A calls it.  I would like to > replace that function with a safe version, so that lib A is forced to use

Re: Example of a real-world ClojureScript web application

2011-08-10 Thread Scott Jaderholm
I haven't read the code yet but I have a few questions: Do you miss backbone.js? Are you going to use it with cljs? Have you shared any code between the frontend and backend? As in run the same functions on both sides. If so, are you duplicating the code in both .clj and .cljs or doing something el

Re: rebind var for all threads

2011-08-10 Thread Mark Rathwell
>Yes. The compiler probably optimized away the var lookup to an >embedded constant. You'll need to use an atom, as Baldridge suggested. My code calls a function in 3rd party library A, which in turn calls a function in 3rd party library B. The lib B function uses blacklisted Java classes, causing

Re: rebind var for all threads

2011-08-10 Thread Ken Wesson
On Wed, Aug 10, 2011 at 4:54 PM, Mark Rathwell wrote: >> alter-var-root > It is still somehow using the original binding.  I am trying change the > binding from aot compiled code, would that change anything? Yes. The compiler probably optimized away the var lookup to an embedded constant. You'll

Re: rebind var for all threads

2011-08-10 Thread Mark Rathwell
> alter-var-root It is still somehow using the original binding. I am trying change the binding from aot compiled code, would that change anything? > Even if you can, I don't think you want to. I agree, I don't want to, however, I am trying to get multiple third party libraries to play together

Small bug in clojure.core/bases?

2011-08-10 Thread Alf Kristian Støyle
I think I found a small bug in clojure.core/bases. Extending the existing unit test reveals it: (deftest test-bases (are [x y] (= x y) (bases java.lang.Math) (list java.lang.Object) (bases java.lang.Integer) (list java.lang.Number java.lang.Comparable) ) (is (seq?

Re: rebind var for all threads

2011-08-10 Thread Timothy Baldridge
> Is what I am trying to do possible? Even if you can, I don't think you want to. This sort of thing would basically remove the immutable nature of Clojure. Instead I would recommend using a atom... Timothy -- You received this message because you are subscribed to the Google Groups "Clojure" g

Re: rebind var for all threads

2011-08-10 Thread Ken Wesson
On Wed, Aug 10, 2011 at 3:52 PM, Mark Rathwell wrote: > Is what I am trying to do possible? alter-var-root Handle with care. -- Protege: What is this seething mass of parentheses?! Master: Your father's Lisp REPL. This is the language of a true hacker. Not as clumsy or random as C++; a languag

rebind var for all threads

2011-08-10 Thread Mark Rathwell
There is a function in a library I am using that I want to have rebound to a function of mine for all threads, and can't seem to figure this out, or if it is even possible. binding, push-thread-bindings, in-ns with def, etc. are not working, seemingly because they are only rebinding for the curren

Re: Creating a map algorithmically

2011-08-10 Thread Justin Kramer
See also David Nolan's post: http://dosync.posterous.com/lispers-know-the-value-of-everything-and-the Justin On Tuesday, August 9, 2011 6:02:00 PM UTC-4, pmbauer wrote: > > For the sieve, if performance matters, clojure's native data structures may > not be the best choice. > A mutable array of

Re: ClojureScript Compile errors

2011-08-10 Thread Rich Hickey
:use … :only doesn't have the problems of full :use. Enhancement ticket and patch for :use … :only welcome. Note it must support :use … :only only, i.e. :only is required. Rich On Aug 9, 2011, at 10:01 AM, David Nolen wrote: > On Sat, Aug 6, 2011 at 5:30 PM, Rich Hickey wrote: > In Clojure, n

Re: at-at

2011-08-10 Thread David Nolen
On Wed, Aug 10, 2011 at 1:37 PM, Sam Aaron wrote: > Hi, > > I just wanted to announce the arrival of the newly-born at-at library - > freshly extracted from Overtone: > > https://github.com/overtone/at-at > > at-at is an ahead-of-time function scheduler which essentially provides a > friendly wra

at-at

2011-08-10 Thread Sam Aaron
Hi, I just wanted to announce the arrival of the newly-born at-at library - freshly extracted from Overtone: https://github.com/overtone/at-at at-at is an ahead-of-time function scheduler which essentially provides a friendly wrapper around Java's ScheduledThreadPoolExecutor. Enjoy! Sam ---

A place to talk Marginalia

2011-08-10 Thread Fogus
If anyone is interested, I have a group for talking about Marginalia and the art of documentation and code reading. Various other topics will be fair-game (within reason). Follow this link if you dare: http://groups.google.com/group/marginalia-clj -- You received this message because you are su

Re: How to read project.clj file.

2011-08-10 Thread mmwaikar
Thanks Shantanu and Daniel. I am trying to merge some functionality from two different projects, so the credentials could be stored in properties file or the project.clj file. And mine is not a leiningen plugin so I parsed the project.clj file. -- You received this message because you are subs

Re: Creating a map algorithmically

2011-08-10 Thread Kevin Sookocheff
Thanks Sumil. Does anyone know what algorithm they are implementing? It looks like a wheel factorization but I can't tell from lack ofcomments. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups

Re: ANN: Optimized Pattern Matching Library for Clojure

2011-08-10 Thread Ambrose Bonnaire-Sergeant
Hi James, On Wed, Aug 10, 2011 at 5:43 PM, James Sofra wrote: > > Just to clarify, you can extend the matching to new types but the match is > 'closed' in the sense that unlike mutimethods you can't add additional > cases? Is that correct? > > For the 0.1 release, that is correct. In future rele

Re: ANN: Optimized Pattern Matching Library for Clojure

2011-08-10 Thread James Sofra
Hi David, Looks really neat! Just to clarify, you can extend the matching to new types but the match is 'closed' in the sense that unlike mutimethods you can't add additional cases? Is that correct? Hope that makes sense, James Sofra -- You received this message because you are subscribed to

Re: Optimizing JDBC code

2011-08-10 Thread Shoeb Bhinderwala
Many thanks for adding this feature. Without it the Clojure code would have been left in the dust. On Aug 9, 11:46 pm, Sean Corfield wrote: > On Tue, Aug 9, 2011 at 9:39 AM, Shoeb Bhinderwala < > > shoeb.bhinderw...@gmail.com> wrote: > > With these options added the Clojure code runs just about a

Re: standalone indentation tool

2011-08-10 Thread Tom Faulhaber
> I've tried pprint and found it lacking as it inserts newlines in > awkward places apart from the medatada/comments issue mentioned. Are you using pprint with code-dispatch? That tends to work a lot better, though it will put newlines where it deems fit. This is either a good thing or a bad thing