Re: ClojureScript; How to set a field in an external JS library?

2012-11-15 Thread Pierre-Henry Perret
Perhaps this thread can help : javascript properties Le jeudi 15 novembre 2012 17:26:33 UTC+1, Thomas a écrit : > > Hi, > > I have an external JS library I want to use and I can call methods on > objects from the external library

Re: problem with extern file using cljsbuild

2012-10-14 Thread Pierre Henry
Following the link to the extern file it seems the *google.map *lib is not found when the VM loader try to load your code... Le dimanche 14 octobre 2012 13:14:33 UTC+2, Wei Hsu a écrit : > > I'm using the Google Maps API in my Clojurescript project, which worked > fine until I compiled in adva

Re: `defrecord` produces warning in CLJS 0.0-1503 (lein-cljsbuild 0.2.8)

2012-10-14 Thread Pierre Henry
Protocol IWriter is not loaded at creation time Le dimanche 14 octobre 2012 09:29:40 UTC+2, Shantanu Kumar a écrit : > > Hi, > > I noticed every instance of using `defrecord` with CLJS > 0.0.1503/lein-cljsbuild 0.2.8 is emitting the following warning during > compilation: > > WARNING: Protocol I

Re: Packaging ClojureScript libraries for use with Leiningen

2012-10-13 Thread Pierre-Henry Perret
This project /bOOtOne/ could be of some help . It uses *enfocus* * *and make use of *dynamic *libs by referencing *git * repo. Take a look at the *project;.clj *with the usage of *lein-cljsbuild * and *cross languages *inclusion. Le vendredi 12 octobre 201

{ ANN bOOtOne }

2012-10-11 Thread Pierre-Henry Perret
b.com/brentonashworth/one> clojurescript *mvc *ide. So one can browse in the not less excellent clj-ns-nrowser of @franks42. Would like some *comments / feedback *on installing it as a new project, which is done with the *bootstrap *command from cjone (ClojureScript One). Thanks -- P

Re: Clojure web framework

2012-10-03 Thread Pierre-Henry Perret
It seems you have missed one important framework: ClojureScript One So I have choosed to make the *TodoMVC* template (see [0]) application with *ClojureScript One* and *Enfocus*. ( see [1] for running app ) What I could say now, is that CjOne is a little hard to embrace, but when it's done ,

{:new "ClojureScript One TodoMVC" }

2012-10-02 Thread Pierre-Henry Perret
The best way to learn is to practice ! So I have choosed to make the *TodoMVC* template (see [0]) application with *ClojureScript One* and *Enfocus*. ( see [1] for running app ) What I could say now, is that CjOne is a little hard to embrace, but when it's done , this is a real pleasure to wor

Re: Pattern of Succinctness

2012-08-12 Thread Pierre-Henry Perret
I prefer (filter (partial not nil?) coll) as a HOF Le dimanche 12 août 2012 20:46:59 UTC+2, rmarianski a écrit : > > On Sun, Aug 12, 2012 at 11:22:55AM -0700, Takahiro Hozumi wrote: > > > (filter (partial not nil?) coll) > > You mean (filter (comp not nil?) coll). > > I'm not sure which is mo

Re: Strange coercions

2012-08-12 Thread Pierre-Henry Perret
Project is here : bOOtOne <http://phperret.github.com/bOOtOne/> Le dimanche 5 août 2012 03:45:59 UTC+2, Pierre-Henry Perret a écrit : > > Running a lein2 check gives -> > ___ > Exception in thread "main" java.lang.IllegalArgumentExc

Re: Immutability rules when it comes to Ref type

2012-08-10 Thread Pierre-Henry Perret
If you want to stay with atomic transactions this is a Clojure feature , STM, if my souvenirs sont bons Le vendredi 10 août 2012 18:21:12 UTC+2, Hussein B. a écrit : > > Hi, > I have a ref type that wraps a map, this map is going to embed many nested > other maps. > According to immutability rul

Re: Immutability rules when it comes to Ref type

2012-08-10 Thread Pierre-Henry Perret
Would answer, if you want to be atomic, means transactional memory, that is a feature of Clore . Le vendredi 10 août 2012 18:21:12 UTC+2, Hussein B. a écrit : > > Hi, > I have a ref type that wraps a map, this map is going to embed many nested > other maps. > According to immutability rules, wha

Re: A "ClojureScript One" Question: Why is so much html created on the client side.

2012-08-10 Thread Pierre-Henry Perret
Enlive is abstractement conceive : if you put a remote on client you could cache it... To do that with the same abstract language , you have the awesome enfocus [0] lib with a sample app here [1], and for those clojururians interested in MVC [2] Any way, there will be some *remote *to get tha

Re: ClojureScript compilation error

2012-08-07 Thread Pierre-Henry Perret
Ouups.. COrrect please Le mardi 7 août 2012 17:33:33 UTC+2, Pierre-Henry Perret a écrit : > > Operators with appending ! are noted as special > > clojure.core=> (doc set!) > - > set! > (set! var-symbol expr) &g

Re: ClojureScript compilation error

2012-08-07 Thread Pierre-Henry Perret
Operators with appending ! are noted as special clojure.core=> (doc set!) - set! (set! var-symbol expr) (set! (. instance-expr instanceFieldName-symbol) expr) (set! (. Classname-symbol staticFieldName-symbol) expr) Special Form Used to set th

Re: Strange coercions

2012-08-06 Thread Pierre-Henry Perret
urce-paths * in local = *:source-paths **"src/clj"* * * Would have also *"src/cljs" * but block here (= THT ( inverse HTH ) ) Thanks Le dimanche 5 août 2012 10:32:14 UTC+2, Pierre-Henry Perret a écrit : > > Sean, > > It works now.. ! > > I have at last pr

Re: Strange coercions

2012-08-06 Thread Pierre-Henry Perret
Problem solved, Thanks all Le dimanche 5 août 2012 10:32:14 UTC+2, Pierre-Henry Perret a écrit : > > Sean, > > It works now.. ! > > I have at last precated th lein1 project. > > You'll see in the code a *file:// *url that is particular to my current > checkout

Re: Strange coercions...

2012-08-06 Thread Pierre-Henry Perret
ys : > :source-paths > :resource-paths > :test-paths > Etc. > > HTH, > > Laurent > > > Le 5 août 2012 à 03:42, Pierre-Henry Perret a écrit : > > > Running a lein2 check gives -> > ___ > Exception in thread "

Re: Strange coercions

2012-08-05 Thread Pierre-Henry Perret
écrit : > > Could you post your project.clj file? (I asked in the other thread so > you can post it there or here) > > On Sat, Aug 4, 2012 at 8:02 PM, Pierre-Henry Perret > wrote: > > More precisely: > >

Re: ANN a CjOne TodoMVC implementation

2012-08-05 Thread Pierre-Henry Perret
RECTIF Must *cljs-ns-browser* browser by by hand using repl cmd: one.todomvc.repl=> *('use 'cljs-ns-browser.ns)* one.todomvc.repl=> *( sdoc ) * Have fun ! Le dimanche 5 août 2012 10:16:17 UTC+2, Pierre-Henry Perret a écrit : > > New free sources CjOne Appli at [1] >

Re: Strange coercions

2012-08-05 Thread Pierre-Henry Perret
"target/"], :dependencies [[clj-ns-browser "1.2.0"] [jline "0.9.94"] [marginalia "0.7.0-SNAPSHOT"]]}} :development "development" :main one.todomvc.repl :repl-init one.todomvc. :m

Re: ANN a CjOne TodoMVC implementation

2012-08-05 Thread Pierre-Henry Perret
New free sources CjOne Appli at [1] The source tree is in branch *development *. NEW: lauch automatically *cljs-ns-browser !* * * -- [1] https://github.com/phperret/peer-one.git Le dimanche 5 août 2012 01:03:46 UTC+2, Pierre-Henry Perret a écrit : > > Using it in Chrome and then typi

Re: Strange coercions

2012-08-04 Thread Pierre-Henry Perret
More precisely: ___ Unsupported character: \\- Le dimanche 5 août 2012 03:45:59 UTC+2, Pierre-Henry Perret a écrit : > > Running a lein2 check gives -> > ___ > Exception

Strange coercions

2012-08-04 Thread Pierre-Henry Perret
Running a lein2 check gives -> ___ Exception in thread "main" java.lang.IllegalArgumentException: No implementation of method: :as-file of protocol: #'clojure.java.io/Coercions found for class: c lojure.lang.PersistentVector ___

Strange coercions

2012-08-04 Thread Pierre-Henry Perret
Running a lein2 check gives -> ___ Exception in thread "main" java.lang.IllegalArgumentException: No implementation of method: :as-file of protocol: #'clojure.java.io/Coercions found for class: c lojure.lang.PersistentVector ___

Strange coercions...

2012-08-04 Thread Pierre-Henry Perret
Running a lein2 check gives -> ___ Exception in thread "main" java.lang.IllegalArgumentException: No implementation of method: :as-file of protocol: #'clojure.java.io/Coercions found for class: c lojure.lang.PersistentVector ___

Re: ANN a CjOne TodoMVC implementation

2012-08-04 Thread Pierre-Henry Perret
Using it in Chrome and then typing F12 allows to see all the clojure structures travelling along .. Le samedi 4 août 2012 23:20:50 UTC+2, Pierre-Henry Perret a écrit : > > Hello, > > I have published a local! -able - just dblClik ont index.html to load app, > here [1] >

ANN a CjOne TodoMVC implementation

2012-08-04 Thread Pierre-Henry Perret
Hello, I have published a local! -able - just dblClik ont index.html to load app, here [1] based on CjOne Running app here [0] [0] http://todomvc.herokuapp.com [1] https://github.com/phperret/peer-one.git -- You received this message because you are subscribed to the Google Groups "Clojure"

Re: ClojureScript reactor

2012-07-31 Thread Pierre-Henry Perret
gards, > BG > > On Tue, Jul 31, 2012 at 5:31 PM, Pierre-Henry Perret > wrote: > > Evaluating this form: > > _ > > (dispatch/react-to #{:dom-loaded} > >(fn [t d] (do > >

ClojureScript reactor

2012-07-31 Thread Pierre-Henry Perret
Evaluating this form: _ (dispatch/react-to #{:dom-loaded} (fn [t d] (do (load-todos!) ;; init !todos OK (log-console (str "todos=" @!todos)) ;; OK

Re: Reader errors with Datomic free

2012-07-26 Thread Pierre-Henry Perret
I've that result (with same config): ___ user> #db/id[:db.part/db] #db/id[:db.part/db -125] ___ The # char is a special char for the reader. Be careful to have redefined it in your namespace ?.. Le jeudi 26 juillet 2012 00:02:50 UTC+2, tbc++ a écrit :

Re: { :new { :cjone-app "TodoMVC" }}

2012-07-26 Thread Pierre-Henry Perret
Added missing *:dblclick *event. Will this go on the *todomvc *sample MVC model applications ? Le samedi 21 juillet 2012 14:26:47 UTC+2, Pierre-Henry Perret a écrit : > > The best way to learn is to practice ! > > So I have choosed to make the *TodoMVC* template (see [0]) applica

Re: [ANN] Datomic Free Edition

2012-07-25 Thread Pierre-Henry Perret
The datomic free is *correctly* pushed at [com.datomic/datomic "0.8.3335"] Thanks to datomic team. Le mardi 24 juillet 2012 20:16:17 UTC+2, stuart@gmail.com a écrit : > > 0.8.3335 is now on the site, and includes the correct pom.xml. > > http://www.datomic.com/get-datomic.html > > Cheers, >

Re: [ANN] Datomic Free Edition

2012-07-24 Thread Pierre-Henry Perret
Sorry , not so simple ...! I did that with an earlier release, and in my hurry forgot to list all those dependencies... Le mardi 24 juillet 2012 19:00:48 UTC+2, Herwig Hochleitner a écrit : > > Neither of those clojars upload work, because you haven't listed any > required dependencies in the p

Re: [ANN] Datomic Free Edition

2012-07-24 Thread Pierre-Henry Perret
Done! [datomic-free-transactor "0.8.3331"] Le mardi 24 juillet 2012 18:48:01 UTC+2, Pierre-Henry Perret a écrit : > > Yes, this is just the datomic-free > Transactor is missing. > > Le mardi 24 juillet 2012 18:37:07 UTC+2, tbc++ a écrit : >> >> > I have

Re: [ANN] Datomic Free Edition

2012-07-24 Thread Pierre-Henry Perret
Yes, this is just the datomic-free Transactor is missing. Le mardi 24 juillet 2012 18:37:07 UTC+2, tbc++ a écrit : > > > I have just pushed datomic-free on clojars.org: > > [datomic-free "0.8.3331"] > > > I don't think your push worked correctly. I don't seem to be getting > all the deps needed

Re: [ANN] Datomic Free Edition

2012-07-24 Thread Pierre-Henry Perret
I have just pushed datomic-free on clojars.org: [datomic-free "0.8.3331"] Le mardi 24 juillet 2012 17:48:44 UTC+2, puzzler a écrit : > > Sounds exciting. FYI, the links from the blog post to the pricing and > download pages don't seem to be working. > -- You received this message because you

Re: is their a Clojure framework for handling form validation?

2012-07-23 Thread Pierre-Henry Perret
See [1]. This is a web framework which has a form validation included. [1] http://www.clojurescriptone.com Le lundi 23 juillet 2012 01:46:52 UTC+2, larry google groups a écrit : > > Since 2000 I've been doing web development, first with PHP and then with > Ruby On Rails. In the world of PHP, t

{ :new { :cjone-app "TodoMVC" }}

2012-07-21 Thread Pierre-Henry Perret
The best way to learn is to practice ! So I have choosed to make the *TodoMVC* template (see [0]) application with *ClojureScript One* and *Enfocus*. ( see [1] for running app ) What I could say now, is that CjOne is a little hard to embrace, but when it's done , this is a real pleasure to wor

Access denied with clojure.java.io/copy

2012-07-08 Thread Pierre-Henry Perret
Using *clojure.java.io/copy *I get the following output: ___ Exception in thread "main" java.io.FileNotFoundException: .lein-git-deps\project\cljs-src (Access denied) (NO_SOURCE_FILE:0 The sources files are in *lein-git-deps\project\cljs-sr *and destination in a *s

Re: Problems With BigDecimal Precision

2012-07-02 Thread Pierre-Henry Perret
Hi Eric, The fundamental reason on that behaviour , is that Java Math library which takes *double *as args, truncates its arguments, which is the case with *Math.pow .* >From *The Joy of Clojure, sec. 4.1.1:* __ (let [imadeuapi 3.141592653589793238462643

Re: Problems With BigDecimal Precision

2012-07-02 Thread Pierre-Henry Perret
Hi Eric, I tried to see what was going on with this calculation, knowing that when working with Java libraries which takes primitive type (as it is the cas with Math.pow) this can be easily corrupted, which is the case in the * probability-collision* fn So , I think that Java lib cant be used.

Atom validator ?

2012-07-01 Thread Pierre-Henry Perret
I get an error on a declared CLJS atom when compiled : Uncaught TypeError: Cannot read property 'validator' of undefined But the metadata :validator is not compulsory

Re: Last element of sequence returned by 'take' not showing side effects

2012-06-06 Thread Pierre-Henry Perret
A form like: (def lazy2 (map #(str "+" %) (range))) would work. Le mercredi 6 juin 2012 11:24:06 UTC+2, Z.A a écrit : > > Hi > > user=> (def lazy1(take3 (iterate#(do (print "+") > (inc %))0))) > #'user/lazy1 > user=> lazy1 > (+0+1 2) > > Why am I not gettin

Re: Last element of sequence returned by 'take' not showing side effects

2012-06-06 Thread Pierre-Henry Perret
This is due to the fact that the evaluation of a do form returns the last expr... Le mercredi 6 juin 2012 12:23:07 UTC+2, Jim foo.bar a écrit : > > It's obvious that you're looking for: > > (def lazy1 (interleave (repeat '+) (range 3))) > > > but I still haven't figured out why you get: (+0 +

ClojureScript One

2012-05-27 Thread Pierre-Henry Perret
Sometimes, I dont know when/why, I get the following response from clj-repl: WARNING: The form (. this toString) is no longer a property access. Maybe > you meant (. this -toStrin > g) instead? > I use the M003 branch of cj One Have any idea ? -- You received this message because you are sub

Re: Can't start clojurescript browser-connected repl

2012-05-22 Thread Pierre Henry Perret
Right, just follow that, it should work. -- Pierre 2012/5/22 Дмитрий Бушенко > No, I didn't try that since it wasn't in the README.md file. I thought the > steps described in the readme should be sufficient to run the repl, isn't > it? > > > 2012/5/2

Re: Can't start clojurescript browser-connected repl

2012-05-22 Thread Pierre-Henry Perret
gt; nothing happens. The server doesn't respond to the first URI at all, the > second URI just doesn't exist. > > 2012/5/22 Pierre Henry Perret > >> Hi Dimitry, >> >> Have you tried http://localhost:8080/development >> >> ? >> >> -

Re: Can't start clojurescript browser-connected repl

2012-05-22 Thread Pierre Henry Perret
Hi Dimitry, Have you tried http://localhost:8080/development ? -- Pierre 2012/5/22 D.Bushenko > Hi all, > > I'm trying to run clojurescript repl connected to browser and have failed > in all my attempts. I'm running the "clojurescript/samples/repl" project > provided with the clojurescript

How to use an Enlive template in ClojureScript file

2012-04-26 Thread Pierre-Henry Perret
Hi, In ClojureScriptOne view, the *snippets* macros are required (with 'require-macros' ) in the view.cljs file. My question is : how to use an Enlive *html/deftemplate* * *in this same file. For instance in snippets I have this macro: (html/deftemplate a-template & > forms...) If in the

Re: ClojureScriptOne remote

2012-04-26 Thread Pierre-Henry Perret
Yes, that was it, just adding a key solved it. Thanks Le mercredi 25 avril 2012 20:42:42 UTC+2, David Nolen a écrit : > > Perhaps you are calling 'get' on something which has not implemented or > not been extended to ILookup. > > On Wed, Apr 25, 2012 at 2:38 PM, P

ClojureScriptOne remote

2012-04-25 Thread Pierre-Henry Perret
When returning a response from a remote call, it fails to a server error: __ Uncaught Error: No protocol method ILookup.-lookup defined for type object: [object Object] Have someone any idea what it origins from ? Thanks -- You received this message because you a

Re: Boolean

2012-04-08 Thread Pierre-Henry Perret
Steven, Have you tried that: (if "Jesus" "Christ" true) ? Le samedi 7 avril 2012 16:53:17 UTC+2, Steven Obua a écrit : > > Hi, > > I am using Clojure for a month now. I like it a lot so far, but there > are a couple of little details that make me very afraid. Foremost: > > (if (Boolean. false

Re: ClojureScript repl error

2012-04-07 Thread Pierre-Henry Perret
CANCELED Le vendredi 6 avril 2012 16:16:21 UTC+2, Pierre-Henry Perret a écrit : > > I constantly get the following error when trying evaluating a clojures > script exp (from remoting sample, a request) > > __ > # > SyntaxError: Unexpected tok

ClojureScript repl error

2012-04-06 Thread Pierre-Henry Perret
I constantly get the following error when trying evaluating a clojures script exp (from remoting sample, a request) __ # SyntaxError: Unexpected token . at http://localhost:8080/javascripts/out/clojure/browser/repl.js:21:158 at evaluate_javascript (http://localhos

Re: ClojureScript One Debug info

2012-04-02 Thread Pierre-Henry Perret
That solved it! Thanks Le lundi 2 avril 2012 16:26:08 UTC+2, David Nolen a écrit : > > Remove all generated JS as well as the invisible .repl folders. Does the > problem still persist? > > On Saturday, March 31, 2012, Pierre-Henry Perret wrote: > >> Hi all, after launchi

ClojureScript Debug

2012-04-02 Thread Pierre-Henry Perret
The following clojurescript code : (def *peers* (agent {})) compiles to this js code: one.peer.peer._STAR_peers_STAR_ = one.peer.peer.agent.call(null,cljs. core.ObjMap.fromObject([],{})); which throws _ 1. Uncaught TypeError: Cannot call method 'call' of undefined 1. (

Re: Appcache

2012-04-02 Thread Pierre-Henry Perret
> On Sun, Mar 25, 2012 at 9:17 AM, Pierre-Henry Perret > wrote: > > How to disable/enable the appcache in One ? > > > > This is related to a manifest cache which is present in the root folder > of > > the application. > > But in One, it seems to be automatica

ClojureScript One Debug info

2012-04-02 Thread Pierre-Henry Perret
Hi all, after launching the repl in clj-one I get this st: Type (go) to launch the development server and setup a browser-connected REPL. Type (dev-server) to launch only the development server. Type (stop) to stop the running instance server Type (restart) to restart server

Appcache

2012-03-25 Thread Pierre-Henry Perret
How to disable/enable the appcache in One ? This is related to a manifest cache which is present in the root folder of the application. But in One, it seems to be automatically generated... -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to

Re: beginner help with views in ClojureScript One?

2012-03-22 Thread Pierre-Henry Perret
Hi, I have succeeded in creating another development page by restarting the vm. I dont know why it is not recompiled when reloading the page... Le vendredi 16 mars 2012 04:50:17 UTC+1, George Oliver a écrit : > > hi, I'm starting to modify the One sample application and can't get > the hang of re

Re: ClojureScriptOne design

2012-03-22 Thread Pierre-Henry Perret
Le mardi 20 mars 2012 17:59:02 UTC+1, Pierre-Henry Perret a écrit : > > I have added a new model cljs file in my dev One app , but when I use it > in the controller, that one doesnt see it. > > Any idea, suggestion? > > Thanks > Also, to effectively recoompile the snipp

ClojureScriptOne design

2012-03-20 Thread Pierre-Henry Perret
I have added a new model cljs file in my dev One app , but when I use it in the controller, that one doesnt see it. Any idea, suggestion? Thanks -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegrou

Re: how to restart Clojurescript One repl the right way?

2012-03-11 Thread Pierre-Henry Perret
Yes, good question. It leads to another one: is ther a clojure hook to stop the server ? I personally kill the process to sweep out the vm and then can restart again. Le jeudi 8 mars 2012 09:21:58 UTC+1, George Oliver a écrit : > > hi, I'm just starting with ClojureScript and ClojureScript One

Socket error when integrating a templet in topBar

2012-02-26 Thread Pierre-Henry Perret
Brutal error when trying a new login fom on top of C-ONE (just addin a login form as an li inside div topBar ) Then when REPLing the new atom 'login-form' I get the here after st : __ ClojureScript:one.sample.model> login-form java.lang.RuntimeException: java.net.SocketException: