Re: [ClojureScript] My new projects to extend React: Respo and Quamolit

2016-04-22 Thread Julien Eluard
If you want to keep the node path with an incremental-dom approach you
almost implement a regular virtual dom.

Le ven. 22 avr. 2016 à 15:20, jiyinyiyong <jiyinyiy...@gmail.com> a écrit :

> Reading code from others is always challenging. I've tried incremental-dom
> once, I suppose in the DOM the node path is already losing, which in
> virtual DOM I can always keep the path.
>
> On Fri, Apr 22, 2016 at 6:15 PM Julien Eluard <julien.elu...@gmail.com>
> wrote:
>
>> Currently I'm doing a one pass merge (similar to
>> https://github.com/google/incremental-dom). I am considering moving to
>> diff/patch to be able to diff in a service worker and patch in the main
>> thread.
>> You can find all details here:
>> https://github.com/jeluard/hipo/blob/master/src/hipo/interpreter.cljs#L195
>>
>> Le ven. 22 avr. 2016 à 11:59, jiyinyiyong <jiyinyiy...@gmail.com> a
>> écrit :
>>
>>> I'm not a big fan of Hiccup actually. As you mention the diff/patch
>>> library, what's your solution? I tried in my project and only got a very
>>> simple solution with some bugs. How about yours?
>>>
>>> On Fri, Apr 22, 2016 at 3:58 PM Julien Eluard <julien.elu...@gmail.com>
>>> wrote:
>>>
>>>> It's more a merge implementation based on hiccup syntax. You can use it
>>>> to replace React, especially to create components.
>>>> Maybe there is an opportunity to extract a generic diff/patch library?
>>>>
>>>> Le ven. 22 avr. 2016 à 03:19, jiyinyiyong <jiyinyiy...@gmail.com> a
>>>> écrit :
>>>>
>>>>> So you created another React too?
>>>>>
>>>>> My projects are not yet stable, I will add examples later.
>>>>>
>>>>> On Thu, Apr 21, 2016 at 11:56 PM Julien Eluard <
>>>>> julien.elu...@gmail.com> wrote:
>>>>>
>>>>>> Hi Jiyin Yiyong,
>>>>>>
>>>>>> nice to see some alternatives to React in Clojure! I have to dig more
>>>>>> into your blog posts to understand your ideas but it definitively looks
>>>>>> interesting.
>>>>>> May I suggest to have some documentation/examples in raw
>>>>>> ClojureScript to help people grasp the syntax?
>>>>>>
>>>>>> You might also be interested in some libraries I wrote:
>>>>>> * https://github.com/jeluard/hipo create/reconciliate DOM nodes from
>>>>>> hiccup syntax
>>>>>> * https://github.com/jeluard/lucuma CustomElements boilerplate
>>>>>> * https://github.com/jeluard/picada a collection of google material
>>>>>> elements, built on both former libraries (WIP)
>>>>>>
>>>>>> Julien
>>>>>>
>>>>>>
>>>>>> Le jeu. 21 avr. 2016 à 12:13, Jiyin Yiyong <jiyinyiy...@gmail.com> a
>>>>>> écrit :
>>>>>>
>>>>>>> I want to see if anyone is already getting bored about React.js like
>>>>>>> me. It's still fun to try React Native but React.js is old, its 2012
>>>>>>> technology(not quite sure about 2012, but old enough even 2013). React 
>>>>>>> is
>>>>>>> not nicely decoupled, and not a great framework for animations. It's
>>>>>>> becoming as useful and as mature like jQuery. I think we can go beyond.
>>>>>>>
>>>>>>> Well, I've been programming for 5 years only from learning C in
>>>>>>> school and trying Python on my own(not counting course on Visual Basic
>>>>>>> since it was only a course). I can't build a whole framework like React.
>>>>>>> However, I can see some vision ahead and try them with my code. So they 
>>>>>>> are
>>>>>>> Respo and Quamoit. Both are experimental project and in early 
>>>>>>> stages(Docs
>>>>>>> not ready, sorry for that). Just hope they may be sources of 
>>>>>>> inspirations.
>>>>>>>
>>>>>>> Respo
>>>>>>>
>>>>>>> repo https://github.com/mvc-works/respo/
>>>>>>> example app https://github.com/Memkits/wanderlist/
>>>>>>>
>>>>>>> Respo is like React but a lot simplified and decoupled. I
>>>>>>> implemented a simpler DOM diff algorithm and bound events. By now I can
>>

Re: [ClojureScript] My new projects to extend React: Respo and Quamolit

2016-04-22 Thread Julien Eluard
Currently I'm doing a one pass merge (similar to
https://github.com/google/incremental-dom). I am considering moving to
diff/patch to be able to diff in a service worker and patch in the main
thread.
You can find all details here:
https://github.com/jeluard/hipo/blob/master/src/hipo/interpreter.cljs#L195

Le ven. 22 avr. 2016 à 11:59, jiyinyiyong <jiyinyiy...@gmail.com> a écrit :

> I'm not a big fan of Hiccup actually. As you mention the diff/patch
> library, what's your solution? I tried in my project and only got a very
> simple solution with some bugs. How about yours?
>
> On Fri, Apr 22, 2016 at 3:58 PM Julien Eluard <julien.elu...@gmail.com>
> wrote:
>
>> It's more a merge implementation based on hiccup syntax. You can use it
>> to replace React, especially to create components.
>> Maybe there is an opportunity to extract a generic diff/patch library?
>>
>> Le ven. 22 avr. 2016 à 03:19, jiyinyiyong <jiyinyiy...@gmail.com> a
>> écrit :
>>
>>> So you created another React too?
>>>
>>> My projects are not yet stable, I will add examples later.
>>>
>>> On Thu, Apr 21, 2016 at 11:56 PM Julien Eluard <julien.elu...@gmail.com>
>>> wrote:
>>>
>>>> Hi Jiyin Yiyong,
>>>>
>>>> nice to see some alternatives to React in Clojure! I have to dig more
>>>> into your blog posts to understand your ideas but it definitively looks
>>>> interesting.
>>>> May I suggest to have some documentation/examples in raw ClojureScript
>>>> to help people grasp the syntax?
>>>>
>>>> You might also be interested in some libraries I wrote:
>>>> * https://github.com/jeluard/hipo create/reconciliate DOM nodes from
>>>> hiccup syntax
>>>> * https://github.com/jeluard/lucuma CustomElements boilerplate
>>>> * https://github.com/jeluard/picada a collection of google material
>>>> elements, built on both former libraries (WIP)
>>>>
>>>> Julien
>>>>
>>>>
>>>> Le jeu. 21 avr. 2016 à 12:13, Jiyin Yiyong <jiyinyiy...@gmail.com> a
>>>> écrit :
>>>>
>>>>> I want to see if anyone is already getting bored about React.js like
>>>>> me. It's still fun to try React Native but React.js is old, its 2012
>>>>> technology(not quite sure about 2012, but old enough even 2013). React is
>>>>> not nicely decoupled, and not a great framework for animations. It's
>>>>> becoming as useful and as mature like jQuery. I think we can go beyond.
>>>>>
>>>>> Well, I've been programming for 5 years only from learning C in school
>>>>> and trying Python on my own(not counting course on Visual Basic since it
>>>>> was only a course). I can't build a whole framework like React. However, I
>>>>> can see some vision ahead and try them with my code. So they are Respo and
>>>>> Quamoit. Both are experimental project and in early stages(Docs not ready,
>>>>> sorry for that). Just hope they may be sources of inspirations.
>>>>>
>>>>> Respo
>>>>>
>>>>> repo https://github.com/mvc-works/respo/
>>>>> example app https://github.com/Memkits/wanderlist/
>>>>>
>>>>> Respo is like React but a lot simplified and decoupled. I implemented
>>>>> a simpler DOM diff algorithm and bound events. By now I can build very
>>>>> simple apps with it. I think the shiny parts are:
>>>>>
>>>>> * components are designed to fit with caching so that server side
>>>>> rendering would be faster
>>>>> * DOM diff/patching are decoupled, so possible to diff on server and
>>>>> patch at clients
>>>>> * element DSL in ClojureScript syntax, not JSX style
>>>>> * component states are stored global, so not losing during hot swapping
>>>>>
>>>>> You may find more on Hashnode and Youtube:
>>>>> https://hashnode.com/@jiyinyiyong/stories
>>>>> https://www.youtube.com/user/jiyinyiyong/videos
>>>>>
>>>>> Quamolit
>>>>>
>>>>> repo(alse example) https://github.com/Quamolit/quamolit
>>>>> components source code
>>>>> https://github.com/Quamolit/quamolit/tree/master/cirru-src/quamolit/component
>>>>>
>>>>> Quamolit is an experiment on canvas and it relies on Hit Regions APIs
>>>>> to work, so not even usable for build r

Re: [ClojureScript] My new projects to extend React: Respo and Quamolit

2016-04-22 Thread Julien Eluard
It's more a merge implementation based on hiccup syntax. You can use it to
replace React, especially to create components.
Maybe there is an opportunity to extract a generic diff/patch library?

Le ven. 22 avr. 2016 à 03:19, jiyinyiyong <jiyinyiy...@gmail.com> a écrit :

> So you created another React too?
>
> My projects are not yet stable, I will add examples later.
>
> On Thu, Apr 21, 2016 at 11:56 PM Julien Eluard <julien.elu...@gmail.com>
> wrote:
>
>> Hi Jiyin Yiyong,
>>
>> nice to see some alternatives to React in Clojure! I have to dig more
>> into your blog posts to understand your ideas but it definitively looks
>> interesting.
>> May I suggest to have some documentation/examples in raw ClojureScript to
>> help people grasp the syntax?
>>
>> You might also be interested in some libraries I wrote:
>> * https://github.com/jeluard/hipo create/reconciliate DOM nodes from
>> hiccup syntax
>> * https://github.com/jeluard/lucuma CustomElements boilerplate
>> * https://github.com/jeluard/picada a collection of google material
>> elements, built on both former libraries (WIP)
>>
>> Julien
>>
>>
>> Le jeu. 21 avr. 2016 à 12:13, Jiyin Yiyong <jiyinyiy...@gmail.com> a
>> écrit :
>>
>>> I want to see if anyone is already getting bored about React.js like me.
>>> It's still fun to try React Native but React.js is old, its 2012
>>> technology(not quite sure about 2012, but old enough even 2013). React is
>>> not nicely decoupled, and not a great framework for animations. It's
>>> becoming as useful and as mature like jQuery. I think we can go beyond.
>>>
>>> Well, I've been programming for 5 years only from learning C in school
>>> and trying Python on my own(not counting course on Visual Basic since it
>>> was only a course). I can't build a whole framework like React. However, I
>>> can see some vision ahead and try them with my code. So they are Respo and
>>> Quamoit. Both are experimental project and in early stages(Docs not ready,
>>> sorry for that). Just hope they may be sources of inspirations.
>>>
>>> Respo
>>>
>>> repo https://github.com/mvc-works/respo/
>>> example app https://github.com/Memkits/wanderlist/
>>>
>>> Respo is like React but a lot simplified and decoupled. I implemented a
>>> simpler DOM diff algorithm and bound events. By now I can build very simple
>>> apps with it. I think the shiny parts are:
>>>
>>> * components are designed to fit with caching so that server side
>>> rendering would be faster
>>> * DOM diff/patching are decoupled, so possible to diff on server and
>>> patch at clients
>>> * element DSL in ClojureScript syntax, not JSX style
>>> * component states are stored global, so not losing during hot swapping
>>>
>>> You may find more on Hashnode and Youtube:
>>> https://hashnode.com/@jiyinyiyong/stories
>>> https://www.youtube.com/user/jiyinyiyong/videos
>>>
>>> Quamolit
>>>
>>> repo(alse example) https://github.com/Quamolit/quamolit
>>> components source code
>>> https://github.com/Quamolit/quamolit/tree/master/cirru-src/quamolit/component
>>>
>>> Quamolit is an experiment on canvas and it relies on Hit Regions APIs to
>>> work, so not even usable for build real apps. The nice thing is, in React
>>> it's difficult to make nice animations, in declarative canvas libraries
>>> there's no abstractions to compose components like React, Respo is maybe a
>>> way to combine them. You can browse the source code and take a look on my
>>> Youtube.
>>>
>>> For each component, there's functions of `init-state update-state
>>> init-instant on-tick on-update on-unmount render`, you may see what's going
>>> on by the names. So besides **state**, Quamoit introduced **instant** as
>>> the animations states, and it will be updated by **on-tick**(as
>>> requestAnimationFrame calls) **on-update**(as global store and states
>>> changes) **on-unmount**(as the component start leaving).
>>>
>>> Currently there are only videos and tweets(@jiyinyiyong) on Quamolit. I
>>> will add post when it's more stable.
>>>
>>> Projects are in early stage and when I go back to work a weeks later I
>>> will probably spend much time on them. I think my experience is not enough
>>> for real world frameworks, I hope someone may pick my ideas and use them in
>>> their own projects. I used to write in Chinese at
>>&g

Re: [ClojureScript] My new projects to extend React: Respo and Quamolit

2016-04-21 Thread Julien Eluard
Hi Jiyin Yiyong,

nice to see some alternatives to React in Clojure! I have to dig more into
your blog posts to understand your ideas but it definitively looks
interesting.
May I suggest to have some documentation/examples in raw ClojureScript to
help people grasp the syntax?

You might also be interested in some libraries I wrote:
* https://github.com/jeluard/hipo create/reconciliate DOM nodes from hiccup
syntax
* https://github.com/jeluard/lucuma CustomElements boilerplate
* https://github.com/jeluard/picada a collection of google material
elements, built on both former libraries (WIP)

Julien


Le jeu. 21 avr. 2016 à 12:13, Jiyin Yiyong <jiyinyiy...@gmail.com> a écrit :

> I want to see if anyone is already getting bored about React.js like me.
> It's still fun to try React Native but React.js is old, its 2012
> technology(not quite sure about 2012, but old enough even 2013). React is
> not nicely decoupled, and not a great framework for animations. It's
> becoming as useful and as mature like jQuery. I think we can go beyond.
>
> Well, I've been programming for 5 years only from learning C in school and
> trying Python on my own(not counting course on Visual Basic since it was
> only a course). I can't build a whole framework like React. However, I can
> see some vision ahead and try them with my code. So they are Respo and
> Quamoit. Both are experimental project and in early stages(Docs not ready,
> sorry for that). Just hope they may be sources of inspirations.
>
> Respo
>
> repo https://github.com/mvc-works/respo/
> example app https://github.com/Memkits/wanderlist/
>
> Respo is like React but a lot simplified and decoupled. I implemented a
> simpler DOM diff algorithm and bound events. By now I can build very simple
> apps with it. I think the shiny parts are:
>
> * components are designed to fit with caching so that server side
> rendering would be faster
> * DOM diff/patching are decoupled, so possible to diff on server and patch
> at clients
> * element DSL in ClojureScript syntax, not JSX style
> * component states are stored global, so not losing during hot swapping
>
> You may find more on Hashnode and Youtube:
> https://hashnode.com/@jiyinyiyong/stories
> https://www.youtube.com/user/jiyinyiyong/videos
>
> Quamolit
>
> repo(alse example) https://github.com/Quamolit/quamolit
> components source code
> https://github.com/Quamolit/quamolit/tree/master/cirru-src/quamolit/component
>
> Quamolit is an experiment on canvas and it relies on Hit Regions APIs to
> work, so not even usable for build real apps. The nice thing is, in React
> it's difficult to make nice animations, in declarative canvas libraries
> there's no abstractions to compose components like React, Respo is maybe a
> way to combine them. You can browse the source code and take a look on my
> Youtube.
>
> For each component, there's functions of `init-state update-state
> init-instant on-tick on-update on-unmount render`, you may see what's going
> on by the names. So besides **state**, Quamoit introduced **instant** as
> the animations states, and it will be updated by **on-tick**(as
> requestAnimationFrame calls) **on-update**(as global store and states
> changes) **on-unmount**(as the component start leaving).
>
> Currently there are only videos and tweets(@jiyinyiyong) on Quamolit. I
> will add post when it's more stable.
>
> Projects are in early stage and when I go back to work a weeks later I
> will probably spend much time on them. I think my experience is not enough
> for real world frameworks, I hope someone may pick my ideas and use them in
> their own projects. I used to write in Chinese at
> segmentfault.com/blog/jiyinyiyong and I will later write on Hashnode in
> English to see if someone is interested.
>
> Hope you like my ideas. Thanks.
>
> --
> Note that posts from new members are moderated - please be patient with
> your first post.
> ---
> You received this message because you are subscribed to the Google Groups
> "ClojureScript" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojurescript+unsubscr...@googlegroups.com.
> To post to this group, send email to clojurescript@googlegroups.com.
> Visit this group at https://groups.google.com/group/clojurescript.
>

-- 
Note that posts from new members are moderated - please be patient with your 
first post.
--- 
You received this message because you are subscribed to the Google Groups 
"ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojurescript+unsubscr...@googlegroups.com.
To post to this group, send email to clojurescript@googlegroups.com.
Visit this group at https://groups.google.com/group/clojurescript.


[ClojureScript] [ANN] Happy 0.5.0 - a Clojure(Script) HTTP async client library

2015-09-20 Thread Julien Eluard
Hi,

I am pleased to announce the first release of happy [1] - a Clojure(Script)
HTTP async client library with swappable client implementation.

Happy is a low-level HTTP async client callback driven following RING spec.
Most advanced usage can be implemented on top of an interceptor [2]
abstraction, notably media-type driven body transformation via a
representor  [3] protocol.
This first release ships with a Clojure client based on OkHttp and a
ClojureScript client based on XHR.

Julien

[1] https://github.com/jeluard/happy/
[2] https://github.com/jeluard/happy#interceptor
[3] https://github.com/jeluard/happy#representor

-- 
Note that posts from new members are moderated - please be patient with your 
first post.
--- 
You received this message because you are subscribed to the Google Groups 
"ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojurescript+unsubscr...@googlegroups.com.
To post to this group, send email to clojurescript@googlegroups.com.
Visit this group at http://groups.google.com/group/clojurescript.


Re: [ClojureScript] Scripting with Clojure(Script) : Plain Clojure ? Node.js ? Boot ? Planck ? Pixie ?

2015-08-26 Thread Julien Eluard
Hi Mike,

thanks for sharing those details! It makes much more sense now.
BTW congrats for all your work on Planck: it is quickly proving invaluable.

Cheers,
Julien

Le mer. 26 août 2015 à 11:06, mikefike...@gmail.com a écrit :

 Hi Julien,

 AFAIK there isn't any technical limitation preventing a similar effort
 built atop Node. In fact, Joel Martin has created a Node REPL based on
 self-hosting ClojureScript. See
 https://twitter.com/bus_kanaka/status/631252967987875840

 Why wasn't Planck created using Node? Planck was created on a whim—an
 experiment to see just how quickly it could launch:
 http://blog.fikesfarm.com/posts/2015-07-16-fast-javascriptcore-desktop-clojurescript-repl.html

 What about the long-term pragmatic aspects of Planck with respect to
 portability, Node, etc.? Those are mulled over here:
 https://gist.github.com/mfikes/c7da1e7dfded26c7ceb9

 - Mike


 On Aug 26, 2015, at 9:01 AM, Julien Eluard julien.elu...@gmail.com
 wrote:

 Hi Khalid,

 I agree with you that there is some potential here.

 Planck would be my favorite option but the OSX restriction and the lack of
 standard lib support probably will prevent me to use it.

 It makes me wonder why Planck has not been built on top of
 node.js/electron. It would offer free cross-platform support and access to
 the npm ecosystem. Are there any technical limitations that prevented it?

 Julien

 Le mar. 25 août 2015 à 10:52, Khalid Jebbari khalid.jebb...@gmail.com a
 écrit :

 Hi every one,

 Just starting this thread to gather feedback from people who used CLJ(S)
 to script and replace, you know, shell/Python/Ruby/Whatever. Pretty sure
 it's a dream to code AND script with CLJ(S). I know that it's possible to
 do it with CLJS backed by Node.js/io.js, with Boot somehow, with plain
 Clojure, with Mike Fikes' Planck (only OSX for now though), and Timothy
 Baldridge's Pixie which is not Clojure but quite close.

 If you use any or several, please post your feeback here. It's a nice
 time to CLJ(S) all the things :)

 --
 Note that posts from new members are moderated - please be patient with
 your first post.
 ---
 You received this message because you are subscribed to the Google Groups
 ClojureScript group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to clojurescript+unsubscr...@googlegroups.com.
 To post to this group, send email to clojurescript@googlegroups.com.
 Visit this group at http://groups.google.com/group/clojurescript.

 --
 Note that posts from new members are moderated - please be patient with
 your first post.
 ---
 You received this message because you are subscribed to the Google Groups
 ClojureScript group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to clojurescript+unsubscr...@googlegroups.com.
 To post to this group, send email to clojurescript@googlegroups.com.
 Visit this group at http://groups.google.com/group/clojurescript.

 --
 Note that posts from new members are moderated - please be patient with
 your first post.
 ---
 You received this message because you are subscribed to the Google Groups
 ClojureScript group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to clojurescript+unsubscr...@googlegroups.com.
 To post to this group, send email to clojurescript@googlegroups.com.
 Visit this group at http://groups.google.com/group/clojurescript.


-- 
Note that posts from new members are moderated - please be patient with your 
first post.
--- 
You received this message because you are subscribed to the Google Groups 
ClojureScript group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojurescript+unsubscr...@googlegroups.com.
To post to this group, send email to clojurescript@googlegroups.com.
Visit this group at http://groups.google.com/group/clojurescript.


[ClojureScript] Re: [ANN] Clojure 1.7.0-RC1 now available

2015-05-26 Thread Julien
I just ported an app with significant CLJX usage (55 files) to reader 
conditionals and it works perfectly!

It looks like there is a small issue related to map literal containing 
comments but I am not sure if it has been reported yet.

Julien

Le jeudi 21 mai 2015 13:31:16 UTC-3, Alex Miller a écrit :

 Clojure 1.7.0-RC1 is now available.

 Try it via
 - Download: https://repo1.maven.org/maven2/org/clojure/clojure/1.7.0-RC1/
 - Leiningen: [org.clojure/clojure 1.7.0-RC1]

 The only change since 1.7.0-beta3 is CLJ-1706, which makes reader 
 conditional splicing an error at the top level (previously it would 
 silently drop all but the first spliced element).

 For a full list of changes since 1.6.0, see:
 https://github.com/clojure/clojure/blob/master/changes.md

 Please give it a try and let us know if things are working (or not). The 
 more and quicker feedback we get, the sooner we can release 1.7.0 final!

 - Alex


-- 
Note that posts from new members are moderated - please be patient with your 
first post.
--- 
You received this message because you are subscribed to the Google Groups 
ClojureScript group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojurescript+unsubscr...@googlegroups.com.
To post to this group, send email to clojurescript@googlegroups.com.
Visit this group at http://groups.google.com/group/clojurescript.


Re: [ClojureScript] Re: freactive vs rum

2015-04-21 Thread Julien Eluard
I am also curious about the advantages of using something like Clara versus 
DataScript listen feature. Especially there has been discussions [1] of 
improving listen so that it can accept a query details argument.
Alan I can see you commented on this ticket how do you think it compares to 
Clara?

Cheers,
Julien

[1] https://github.com/tonsky/datascript/pull/12

-- 
Note that posts from new members are moderated - please be patient with your 
first post.
--- 
You received this message because you are subscribed to the Google Groups 
ClojureScript group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojurescript+unsubscr...@googlegroups.com.
To post to this group, send email to clojurescript@googlegroups.com.
Visit this group at http://groups.google.com/group/clojurescript.


Re: [ClojureScript] Re: freactive vs rum

2015-04-19 Thread Julien Eluard
Nice! Let me know if I can help.
Also keep in mind hipo is lower level than those libraries. In particular there 
is nothing reactive and the reconciliation call must be managed manually.

Cheers,
Julien

Le dimanche 19 avril 2015 11:57:06 UTC-3, marc fawzi a écrit :
 I agree starting with something basic and simple offers more learning 
 potential.
 
 
 We're actually expanding the focus of our SF Reagent Meetup to be Reactive 
 ClojureScript with heavy focus still on the more accessible Reagent/Re-frame 
 tools, while also bringing in one other Reactive ClojureScript framework to 
 talk about at each meetup. I'm inclined to go with Julien's work for our 
 first exploration.
 

-- 
Note that posts from new members are moderated - please be patient with your 
first post.
--- 
You received this message because you are subscribed to the Google Groups 
ClojureScript group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojurescript+unsubscr...@googlegroups.com.
To post to this group, send email to clojurescript@googlegroups.com.
Visit this group at http://groups.google.com/group/clojurescript.


Re: [ClojureScript] Re: freactive vs rum

2015-04-18 Thread Julien Eluard
Hi Alan,

you might be interested by the latest release of the hipo [1] library which 
provides reconciliation (à la react) [2] of live DOM nodes. It is essentially a 
native ClojureScript 'virtual-dom' implementation using hiccup vectors as 
syntax.

Cheers,
Julien

[1] https://github.com/jeluard/hipo
[2] https://github.com/jeluard/hipo#reconciliation


Le samedi 18 avril 2015 14:20:14 UTC-3, Alan Moore a écrit :
 Sorry for the delayed response. Yes, I stand corrected, I evaluated just 
 about every front end library there is for ClojureScript and some of the 
 names are starting to get confusing to my age addled brain (react, reagent, 
 freactive, re-frame, etc..)
 
 
 
 I really just want the DOM diffing from React and don't need any of the other 
 stuff. I'm considering making a ClojureScript wrapper for:
 
 
 https://github.com/Matt-Esch/virtual-dom
 
 
 My goal is to write most of the front end logic using rules (Clara is the 
 best candidate ATM) so the view portion needs to be as simple as possible for 
 the rules to manipulate the DOM. The rule engine provides all the data 
 reactivity I need - any data (normal clojure data) you put into it is 
 automatically pattern matched against the rules, including 
 unification/relationships with existing data - as defined by your rules. Here 
 is the general idea:
 
 
 Model: Data inserted into the rule engine's working memory
 View: DOM/React/Rum/vdom
 Controller: Rules in the engine
 
 
 It is reactive in the sense that inserting data/facts/events (from server or 
 user/view events) into the engine triggers rules to fire, those rules may 
 then update the UI or the server, rinse and repeat. There is no polling the 
 data for changes because the engine maintains a data structure (a Rete 
 graph) that pattern matches against your data as you insert it, 
 edge-triggered as it were... You can query the data stored in the engine 
 using a defquery... which is like a defrule without a RHS.
 
 
 The goal for my app is to keep all the core app logic in the rules which 
 makes them easily unit tested because the primary externalities are just 
 data. Think of it as a reactive version of Datascript, at least that is how I 
 see it. Also, in theory, Clara artifacts such as rulesets and sessions can be 
 moved around a system as self contained units of logic giving you a lot of 
 flexibility in how you organize (or re-organize) your architecture. According 
 to Ryan Brush, the author of Clara, they deploy Clara in Hadoop jobs to great 
 effect.
 
 
 Along the same lines, another experiment I want to look into is extending the 
 core Clojure data protocols (ISeq, Iterable, etc.) to the Clara sessions so 
 that, to the rest of the system, the session looks just like a regular 
 Clojure data container... or something like that (e.g. conj == insert, etc.)
 
 
 
 I'm curious to hear how Rum works out for you. I think Rum and Quiescent are 
 both excellent minimalist React wrappers. Om is awesome but is more than I 
 need. If my experiments don't work out I may go back to it... TBD. If you 
 like Datascript and Quiescent then you might want to check out:
 
 
 
 https://github.com/thegeez/clj-crud
 
 
 
 It is a really cool app template to get you started.
 
 
 
 I'll let you know how it goes, my app is still very much a work in progress. 
 I'm currently working on converting the Clara codebase from crossovers to 
 using reader conditionals so that is a bit of a diversion from the UI side of 
 things.
 
 
 As with your project, this is one of many side projects for me. I need the 
 day job to pay the bills... :-/
 
 
 Take care.
 
 
 Alan


-- 
Note that posts from new members are moderated - please be patient with your 
first post.
--- 
You received this message because you are subscribed to the Google Groups 
ClojureScript group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojurescript+unsubscr...@googlegroups.com.
To post to this group, send email to clojurescript@googlegroups.com.
Visit this group at http://groups.google.com/group/clojurescript.


Re: [ClojureScript] ANN: ClojureScript 0.0-3196, Conditional Reading, REPLs, and Code Motion

2015-04-10 Thread Julien Eluard
Hi,

that looks like a tools.reader version conflict. You can get more details about 
all your project dependencies using `lein deps :tree`. Make sure the only 
tools.reader is the one coming from ClojureScript.

Julien

Le vendredi 10 avril 2015 23:42:35 UTC-3, Ravindra Jaju a écrit :
 Hi.
 
 
 I need some help here to understand some errors I see after switching to 
 0.0-3196
 
 
 Top-level exception message:
 clojure.lang.ArityException: Wrong number of args (2) passed to: reader/read
 
 
 
 This was working okay with 0.0-3169
 
 
 The change commit-id 6d4ee9c0f938ac62147ecda6a2a47fcb2cca69e4 has the 
 following diff around reader/read
 
 -                          (reader/read pbr nil eof-sentinel opts nil))]
 +                          (reader/read opts pbr))]
 
 
 I'm using leiningen (lein-cljsbuild) to build this, but a direct build from 
 REPL as follows (as suggested in the Wiki)
 (require 'cljs.closure)
 
 (cljs.closure/build src {:output-to out/main.js})
 
 
 also throws the same exception.
 
 
 What could I be missing?
 
 
 Thanks,
 jaju
 

-- 
Note that posts from new members are moderated - please be patient with your 
first post.
--- 
You received this message because you are subscribed to the Google Groups 
ClojureScript group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojurescript+unsubscr...@googlegroups.com.
To post to this group, send email to clojurescript@googlegroups.com.
Visit this group at http://groups.google.com/group/clojurescript.


Re: [ClojureScript] When is something recognized as a JavaScript object ?

2015-02-22 Thread Julien Eluard
Hi Roger,

the proper syntax to refer to JS object is js/my-object. Also I believe it
is not recommended to rely on internal dots.
So in your case either (.-stdin js/process) or (.. js/process -stdin).

Julien

2015-02-22 11:19 GMT-03:00 Roger Gilliar roger.gill...@googlemail.com:

 process.stdin ist recognized as a JavaScript Object, process not. Why ?

 (defn -main []
   (.on process.stdin data
(fn [_]
  (.disconnect ipcon)
  (.exit process 0

 The created JavaScript looks like this:

 irb.core._main = (function _main(){
 return process.stdin.on(data,(function (_){
 irb.core.ipcon.disconnect();
 return irb.core.process.exit((0));
 }));
 });

 --
 Note that posts from new members are moderated - please be patient with
 your first post.
 ---
 You received this message because you are subscribed to the Google Groups
 ClojureScript group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to clojurescript+unsubscr...@googlegroups.com.
 To post to this group, send email to clojurescript@googlegroups.com.
 Visit this group at http://groups.google.com/group/clojurescript.


-- 
Note that posts from new members are moderated - please be patient with your 
first post.
--- 
You received this message because you are subscribed to the Google Groups 
ClojureScript group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojurescript+unsubscr...@googlegroups.com.
To post to this group, send email to clojurescript@googlegroups.com.
Visit this group at http://groups.google.com/group/clojurescript.


Re: [ClojureScript] Re: ANN: ClojureScript 0.0-2814, Nashorn REPL, async testing, and much more

2015-02-10 Thread Julien Eluard
Great job as usual!

A recent change makes the compiler trigger warnings for single segment
namespaces. Are there real limitations with those or is it a best practice?

Thanks,
Julien

2015-02-10 9:37 GMT-03:00 David Nolen dnolen.li...@gmail.com:

 Cut 0.0-2816. The only change is a fix for reader metadata leakage around
 `reify`.

 David

 On Mon, Feb 9, 2015 at 7:47 PM, David Nolen dnolen.li...@gmail.com
 wrote:

 ClojureScript, the Clojure compiler that emits JavaScript source code.

 README and source code: https://github.com/clojure/clojurescript

 New release version: 0.0-2814

 Leiningen dependency information:

 [org.clojure/clojurescript 0.0-2814]

 There are numerous enhancements in this release including: a Nashorn
 REPL, Node.js 0.12 support, cljs.test async testing support,
 `cljs.closure/watch`, extra JSDoc annotation support, unified source
 mapping on client/server (thus REPLs!), and many small fixes.

 I'm particularly excited about unified source mapping as this means we
 get a much better debugging experience on newer targets (for us) like
 iOS, see https://github.com/omcljs/ambly

 ## 0.0-2814

 ### Enhancements
 * add simple source directory `cljs.closure/watch` watcher using java.nio
 * CLJS-1022: Concatenate foreign dependencies safely
 * CLJS-988: Support async testing in cljs.test
 * CLJS-1018: Add support for cljs.core/*e Modify the JavaScript that is
 sent for evaluation to wrap in a try and then catch any exception thrown,
 assign it to *e, and then rethrow.
 * CLJS-1012: Correct behavior when *print-length* is set to 0
 * Added new :closure-extra-annotations compiler option allowing to define
 extra JSDoc annotation used by closure libraries.
 * Mirrored source map support APIs on server/client
 * Unified source mapping support in REPLs
 * Nashorn REPL (thanks Pieter van Prooijen)

 ### Fixes
 * CLJS-1023: regression, macro-autoload-ns? and ns-dependents need to
 throw on cyclic dependencies
 * fix require with browser REPL, set base path to goog/
 * CLJS-1020: off by one error in REPL source map support
 * Node.js 0.12 support
 * browser REPL needs to respect :output-dir
 * CLJS-1006: Implicit dependency of clojure.browser.repl on cljs.repl
 * CLJS-1005: Browser REPL creates 'out' directory no matter what
 * CLJS-1003: fix cljs.test run-tests do-report :summary issues
 * CLJS-1003: Cannot pass custom env to run-tests
 * Windows Node.js REPL issues


  --
 Note that posts from new members are moderated - please be patient with
 your first post.
 ---
 You received this message because you are subscribed to the Google Groups
 ClojureScript group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to clojurescript+unsubscr...@googlegroups.com.
 To post to this group, send email to clojurescript@googlegroups.com.
 Visit this group at http://groups.google.com/group/clojurescript.


-- 
Note that posts from new members are moderated - please be patient with your 
first post.
--- 
You received this message because you are subscribed to the Google Groups 
ClojureScript group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojurescript+unsubscr...@googlegroups.com.
To post to this group, send email to clojurescript@googlegroups.com.
Visit this group at http://groups.google.com/group/clojurescript.


Re: [ClojureScript] Re: Request for feedback: Virtual DOM for hiccup and macro compilation

2014-12-13 Thread Julien Eluard
Hi James,

I saw your ClojureX video about Flow, cool stuff!

I believe there are some synergies between a lower level hiccup Virtual DOM
style library (direction hipo might evolve) and the various UI library
based on hiccup, either relying on React or implementing their own DOM
manipulation strategies like Flow. Ideally those libraries could just use
hipo (or equivalent) and focus on the higher level features they provide.

To achieve this hipo needs to provide the proper hooks so that it is
flexible enough to be used in various scenario. I created a separate ticket
[1] to start the conversation around this.

Please feel free (and anyone interested) to participate!

[1] https://github.com/jeluard/hipo/issues/10

Cheers,
Julien


2014-12-12 14:44 GMT-03:00 James Henderson james.hender...@likely.co:

 On Tuesday, 9 December 2014 20:45:47 UTC, Julien Eluard  wrote:
  Hi,
 
  Following the release of the hipo library (DOM templating based on
 hiccup syntax) I started thinking about expanding its scope to updates.
 
 
 
  Applying Virtual DOM style techniques to hiccup template at macro
 expansion time might offer opportunity for even more optimisation.
  I detailed this here: https://github.com/jeluard/hipo/issues/9
 
 
  I would be interested in any feedback before I invest more time into it,
 especially if some important details have been left out or the whole
 approach is too naïve.
 
 
  Thanks!
  Julien

 Hi Julien - this sounds pretty similar to the approach I've been taking
 with Flow (https://github.com/james-henderson/flow)

 Flow doesn't use a virtual DOM, but does generate the ClojureScript
 required to effect updates at macro-expansion time. Currently, it's quite a
 naive macro-expansion (but does support reasonably fast updates) but I,
 like you, believe there're more possibilities for using the information we
 have at compile-time to get better performance :)

 It's in alpha at the moment (but pretty stable and performant enough to
 start playing with) - would be great to chat through ideas!

 James

 --
 Note that posts from new members are moderated - please be patient with
 your first post.
 ---
 You received this message because you are subscribed to the Google Groups
 ClojureScript group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to clojurescript+unsubscr...@googlegroups.com.
 To post to this group, send email to clojurescript@googlegroups.com.
 Visit this group at http://groups.google.com/group/clojurescript.


-- 
Note that posts from new members are moderated - please be patient with your 
first post.
--- 
You received this message because you are subscribed to the Google Groups 
ClojureScript group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojurescript+unsubscr...@googlegroups.com.
To post to this group, send email to clojurescript@googlegroups.com.
Visit this group at http://groups.google.com/group/clojurescript.


Re: [ClojureScript] Re: [ANN] Hipo 0.2.0 - a DOM templating library based on hiccup syntax

2014-12-10 Thread Julien Eluard
Nice! Yes cloneNode looks interesting but in the general case you also
would need to rehydrate properly some data. That cost probably mitigates
the cloneNode benefit but up to some threshold it's still probably
interesting.
I plan to look into that at some point but the rehydration logic is
non-trivial, especially in macro land.

Julien

2014-12-10 15:25 GMT-03:00 Thomas Heller th.hel...@gmail.com:

 I got curious, think I found a way to get closer to the macro. Only does
 element contruction no attributes are set except id/className but that
 happens later anyways.

 Uses element.cloneNode
 https://gist.github.com/thheller/7faf1c28ca14c9865376

 See the related js-perf (not by me)
 http://jsperf.com/clonenode-vs-createelement-performance/32

 I reused your parse-keyword function but wrapped into a memoize (well not
 memoize, but as low level as possible) and did a little benchmark.

 PARSE: 782.984ms
 CLONE: 141.103ms

 Looked nice, altough I did only test Chrome on my Mac. Results probably
 vary on every system but looks like a 4-5x speedup.

 Cheers,
 /thomas

 --
 Note that posts from new members are moderated - please be patient with
 your first post.
 ---
 You received this message because you are subscribed to the Google Groups
 ClojureScript group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to clojurescript+unsubscr...@googlegroups.com.
 To post to this group, send email to clojurescript@googlegroups.com.
 Visit this group at http://groups.google.com/group/clojurescript.


-- 
Note that posts from new members are moderated - please be patient with your 
first post.
--- 
You received this message because you are subscribed to the Google Groups 
ClojureScript group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojurescript+unsubscr...@googlegroups.com.
To post to this group, send email to clojurescript@googlegroups.com.
Visit this group at http://groups.google.com/group/clojurescript.


Re: [ClojureScript] Re: [ANN] Hipo 0.2.0 - a DOM templating library based on hiccup syntax

2014-12-09 Thread Julien Eluard
Hi Dave,

dommy removed the templating support from its latest release. In fact hipo
is based on the dommy code and try to push it further.

I am not aware of another library that creates DOM nodes from hiccup using
macro to reduce the cost of hiccup parsing . See the original dommy blog
post for some context:
http://blog.getprismatic.com/the-magic-of-macros-lighting-fast-templating-in-clojurescript/

Cheers,
Julien

2014-12-09 17:56 GMT-03:00 Dave Sann daves...@gmail.com:

 can you give a few words as to what is different and why dommy or other
 similar libs did not meet your needs?

 Dave

 --
 Note that posts from new members are moderated - please be patient with
 your first post.
 ---
 You received this message because you are subscribed to the Google Groups
 ClojureScript group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to clojurescript+unsubscr...@googlegroups.com.
 To post to this group, send email to clojurescript@googlegroups.com.
 Visit this group at http://groups.google.com/group/clojurescript.


-- 
Note that posts from new members are moderated - please be patient with your 
first post.
--- 
You received this message because you are subscribed to the Google Groups 
ClojureScript group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojurescript+unsubscr...@googlegroups.com.
To post to this group, send email to clojurescript@googlegroups.com.
Visit this group at http://groups.google.com/group/clojurescript.


Re: [ClojureScript] Re: [ANN] Hipo 0.2.0 - a DOM templating library based on hiccup syntax

2014-12-09 Thread Julien Eluard
Hi Thomas,

thanks for the perf tips! I will give them a shot. I need to setup some
benchmark page too so that is the perfect opportunity.

Cheers,
Julien

2014-12-09 19:32 GMT-03:00 Thomas Heller th.hel...@gmail.com:

 I've been using my own DOM library for a while now which always was fast
 enough for me.

 I started a new-ish implementation for my react/om experiments and I
 started using a simple memoization trick to do the parsing bit at most
 once. Basically its just (pseudo-ish code, not the actual code)

 (defn dom-fn* [kw]
(let [[tag id class] (parse-dom-tag kw)]
  (fn [] (create-element tag id class)))

 (def dom-fn (memoize dom-fn*))

 Trades the parsing bits for one map lookup and one extra function
 invocation, seems promising performance wise but too early to tell. Macro
 proved very difficult when I tried it because of the nesting of runtime
 components which you still need an interpreter for anyways.

 Also you don't need to use a regexp to parse the :div.something.other a
 simple replace . with   yields something other which looks alot like
 the class string you want. You can translate that in one single loop over
 the source string which is faster than a regexp but I never did a real
 benchmark, it seemed fast enough. ;)

 Maybe these ideas are useful for your library as well, but consider them
 half-baked. I don't have anything to show for it yet. :P

 Cheers,
 /thomas

 On Tuesday, December 9, 2014 10:09:40 PM UTC+1, Julien Eluard wrote:
  Hi Dave,
 
 
  dommy removed the templating support from its latest release. In fact
 hipo is based on the dommy code and try to push it further.
 
 
  I am not aware of another library that creates DOM nodes from hiccup
 using macro to reduce the cost of hiccup parsing . See the original dommy
 blog post for some context:
 http://blog.getprismatic.com/the-magic-of-macros-lighting-fast-templating-in-clojurescript/
 
 
  Cheers,
  Julien
 
 
  2014-12-09 17:56 GMT-03:00 Dave Sann dave...@gmail.com:
  can you give a few words as to what is different and why dommy or other
 similar libs did not meet your needs?
 
 
 
  Dave
 
 
 
  --
 
  Note that posts from new members are moderated - please be patient with
 your first post.
 
  ---
 
  You received this message because you are subscribed to the Google
 Groups ClojureScript group.
 
  To unsubscribe from this group and stop receiving emails from it, send
 an email to clojurescrip...@googlegroups.com.
 
  To post to this group, send email to clojur...@googlegroups.com.
 
  Visit this group at http://groups.google.com/group/clojurescript.

 --
 Note that posts from new members are moderated - please be patient with
 your first post.
 ---
 You received this message because you are subscribed to the Google Groups
 ClojureScript group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to clojurescript+unsubscr...@googlegroups.com.
 To post to this group, send email to clojurescript@googlegroups.com.
 Visit this group at http://groups.google.com/group/clojurescript.


-- 
Note that posts from new members are moderated - please be patient with your 
first post.
--- 
You received this message because you are subscribed to the Google Groups 
ClojureScript group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojurescript+unsubscr...@googlegroups.com.
To post to this group, send email to clojurescript@googlegroups.com.
Visit this group at http://groups.google.com/group/clojurescript.


[ClojureScript] Re: Defining defmethod used at macroexpansion time

2014-12-07 Thread Julien Eluard
What I am trying to achieve also applies to clojurescript.test.

How can I provide my own defmethod implementation to assert-expr [1] ?

Thanks!

[1] 
https://github.com/cemerick/clojurescript.test/blob/master/src/cemerick/cljs/test.clj#L340

-- 
Note that posts from new members are moderated - please be patient with your 
first post.
--- 
You received this message because you are subscribed to the Google Groups 
ClojureScript group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojurescript+unsubscr...@googlegroups.com.
To post to this group, send email to clojurescript@googlegroups.com.
Visit this group at http://groups.google.com/group/clojurescript.


Re: [ClojureScript] Re: Defining defmethod used at macroexpansion time

2014-12-07 Thread Julien Eluard
Thanks Thomas for the detailed answer! It definitively helped me.

In my scenario I actually had a ClojureScript file but my issue was how to
reference the Clojure file defining the defmethods. As this file doesn't
define any macro I didn't realize I could reference it using require-macros
anyway. Best option seems to be #3.

e.g.

some Clojure file defining defmethods:

(ns my-defmethods)

(defmethod assert-expr :always-fail [msg form]
  ...)

some ClojureScript file defining tests:

(ns my-tests
  ... ; clojurescript.test imports
   (:require-macros [my-defmethods]))

It works perfectly!

 The gist is that ClojureScript must be told to load a Clojure file, it
can't figure this out by itself.
Actually it looks like any .clj file containing a macro will be loaded
anyway. Now it is definitively a more fragile option especially regarding
loading order.

Cheers,
Julien

2014-12-07 14:25 GMT-03:00 Thomas Heller th.hel...@gmail.com:

 Hey,

 I'm honestly not quite sure what you are asking but maybe I can shed some
 light on the way the ClojureScript compiler handles Clojure code (ie.
 macros).

 Whenever the cljs.analyzer reads a (ns ...) form and encounters anything
 that mentions a macro, like

 (:require-macros [some.ns :refer (my-macro)])
 (:require [some.ns :include-macros true])
 (:require [some.ns :refer-macros (my-macro)])

 It will 'clojure.core/require the corresponding Clojure Namespace
 ('some.ns in my example), normal Clojure loading rules apply so everything
 is loaded (if there is a defmethod it will be eval'd).

 Now, my guess is that you want to load a Clojure file without a
 corresponding ClojureScript file? Say, a bunch of (defmethod assert-expr
 ...)?

 Option #1: Create an empty ClojureScript (ns ...) with the same name as
 the Clojure Namespace and (:require [some.ns :include-macros true]).

 Option #2: Create an empty ClojureScript (ns ... (:require-macros
 [my.clojure-ns])) and require it as normal in CLJS

 Option #3: Just (:require-macros [my.clojure-ns])

 Option #4: Could be achieved with shadow-build but I wouldn't recommend it
 since it would only work with YOUR build configuration.

 The gist is that ClojureScript must be told to load a Clojure file, it
 can't figure this out by itself.

 (ns my-app.my-tests
   (:require-macros [my-app.test-utils])
   (:require [clojurescript.test]))

 Note that you don't actually have to define any macros, the 'ns will be
 required nonetheless. Its basically just a way to tell the cljs compiler
 that there is some clojure code we want loaded.

 HTH,
 /thomas

 --
 Note that posts from new members are moderated - please be patient with
 your first post.
 ---
 You received this message because you are subscribed to the Google Groups
 ClojureScript group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to clojurescript+unsubscr...@googlegroups.com.
 To post to this group, send email to clojurescript@googlegroups.com.
 Visit this group at http://groups.google.com/group/clojurescript.


-- 
Note that posts from new members are moderated - please be patient with your 
first post.
--- 
You received this message because you are subscribed to the Google Groups 
ClojureScript group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojurescript+unsubscr...@googlegroups.com.
To post to this group, send email to clojurescript@googlegroups.com.
Visit this group at http://groups.google.com/group/clojurescript.


[ClojureScript] [ANN] Lucuma 0.3.0 - a Web Components library for ClojureScript

2014-12-04 Thread Julien Eluard
Hi,

I am pleased to announce the release 0.3.0 of lucuma [1] - a Web Components
library for ClojureScript.

Lucuma helps with creating custom HTML elements encapsulating document,
style and logic.

This release relax the ShadowDOM dependency which is now optional. This
implies most browser can now support Web Components created with lucuma.
Documentation has also been improved.

If you are skeptical about Web Components maturity note that both google
[2] and github [3] now ship Web Components in production.

Cheers,
Julien

[1] https://github.com/jeluard/lucuma/
[2] https://santatracker.google.com/
[3] http://webcomponents.org/articles/interview-with-joshua-peek/

-- 
Note that posts from new members are moderated - please be patient with your 
first post.
--- 
You received this message because you are subscribed to the Google Groups 
ClojureScript group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojurescript+unsubscr...@googlegroups.com.
To post to this group, send email to clojurescript@googlegroups.com.
Visit this group at http://groups.google.com/group/clojurescript.


[ClojureScript] Re: [ANN] shadow-build 1.0.0-alpha1, now beginner friendly

2014-12-03 Thread Julien Eluard
Hi Thomas,

congrats! This looks like a great step forward for shadow-build! I always have 
been curious about it but never invested the time to test.

One thing lein-cljsbuild can help with is running headless tests (using 
phantomjs for instance). Is that something you are considering?

Julien

-- 
Note that posts from new members are moderated - please be patient with your 
first post.
--- 
You received this message because you are subscribed to the Google Groups 
ClojureScript group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojurescript+unsubscr...@googlegroups.com.
To post to this group, send email to clojurescript@googlegroups.com.
Visit this group at http://groups.google.com/group/clojurescript.


Re: [ClojureScript] Standard way to provide externs for library authors

2014-11-13 Thread Julien Eluard
Looks like both boot cljs and lein-cljsasset have their own way to define
externs/lib. This makes the task for library writer harder.

By defining a common standard directly supported by the ClojureScript
compiler we would have a generic solution all tools / IDE could benefit.
Probably the best option would be to rely on a directory layout / filename
convention so that non leiningen based solution are not penalized.

Is that something we want to include in the compiler?

2014-11-13 18:14 GMT-03:00 Micha Niskin micha.nis...@gmail.com:

 The boot cljs compiler task solves these problems:
 https://github.com/adzerk/boot-cljs#preamble-externs-and-lib-files

 On Thursday, November 13, 2014 11:18:18 AM UTC-5, Paul Bostrom wrote:
  remove the need to rely on :preamble for non closure dependencies.
  I took a stab at solving this problem with a lein plugin:
  https://github.com/pbostrom/lein-cljsasset
  It would be simple to expand to support an :externs field. Then the
 workflow would be that libraries declare the externs path in their
 project.clj, and users declare the target externs file in their
 environment, which they would then specify in their cljsbuild config. I'll
 admit it sounds a bit cumbersome still, and the whole workflow should
 probably be managed by a single tool. Just thinking out loud, the ideal
 tool would:
  1) Resolve JS/CSS dependencies from classpath and concat (and minify?)
 to a single file for each
  2) Resolve externs dependencies from classpath
  3) Advanced compile all CLJS/Closure dependencies and CLJS application
 code with externs file(s) from step 2
  4) Generate initialization/loading JS to load the JS/CSS files from step
 1
  5) Output a single JS file that initializes and loads your application
 
  There would probably need to be another step in there which resolves
 image dependencies.
 
  On Monday, November 10, 2014 8:29:30 AM UTC-5, Julien Eluard wrote:
   I agree this would be a really great feature.
  
  
   There used to be a similar facility part of lein-cljsbuild allowing to
 package both the externs and eventual JS dependencies (see [1]) but it does
 not work anymore.
  
  
   Maybe something equivalent could be part of the clojurescript
 compiler? There already are some projects packaging externs and JS files
 (see [2]) so it would be a matter of defining a convention. It could also
 be an opportunity to remove the need to rely on :preamble for non closure
 dependencies.
  
  
   This would allow the creation of self-contained libraries and would
 greatly lower the barrier of using clojurescript libraries with
 dependencies.
  
  
   [1]
 https://github.com/jeluard/cljs-ol3js/tree/master/resources/closure-js
   [2] https://github.com/swannodette/react-cljs/tree/master/src/react
  
  
  
  
   2014-11-10 8:37 GMT-03:00 Nikita Prokopov prok...@gmail.com:
   Hi!
  
  
  
   Right now lein-cljsbuild allows for externs to be specified on user
 side. E.g. I’m building app with react-cljs, I add dependency, but there’s
 also a second step: I need to put :externs [react/externs/react.js] into
 _my_ project.clj.
  
  
  
   This is tedious and easy to forget, leading to a lot of confusion (I
 developed for 2 month and everything was fine, then I turn on advanced
 build and nothing works).
  
  
  
   On the other hand, conceptually, externs are part of a library, not my
 user code. So, if library author thinks his library needs externs, he
 specifies it and packs externs along with library code, and they’re
 automatically used when I add dependency. So as a user I don’t manage
 external deps’ externs at all. As Thomas Heller puts it, it might be [a
 quality of life change](
 https://github.com/tonsky/datascript/issues/30#issuecomment-62253696).
  
  
  
   Any thought on it? Maybe there’s already a way to do that?
  
  
  
   Nikita.
  
  
  
   --
  
   Note that posts from new members are moderated - please be patient
 with your first post.
  
   ---
  
   You received this message because you are subscribed to the Google
 Groups ClojureScript group.
  
   To unsubscribe from this group and stop receiving emails from it, send
 an email to clojurescrip...@googlegroups.com.
  
   To post to this group, send email to clojur...@googlegroups.com.
  
   Visit this group at http://groups.google.com/group/clojurescript.

 --
 Note that posts from new members are moderated - please be patient with
 your first post.
 ---
 You received this message because you are subscribed to the Google Groups
 ClojureScript group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to clojurescript+unsubscr...@googlegroups.com.
 To post to this group, send email to clojurescript@googlegroups.com.
 Visit this group at http://groups.google.com/group/clojurescript.


-- 
Note that posts from new members are moderated - please be patient with your 
first post.
--- 
You received this message because you are subscribed to the Google Groups 
ClojureScript group

Re: [ClojureScript] Standard way to provide externs for library authors

2014-11-10 Thread Julien Eluard
I agree this would be a really great feature.

There used to be a similar facility part of lein-cljsbuild allowing to
package both the externs and eventual JS dependencies (see [1]) but it does
not work anymore.

Maybe something equivalent could be part of the clojurescript compiler?
There already are some projects packaging externs and JS files (see [2]) so
it would be a matter of defining a convention. It could also be an
opportunity to remove the need to rely on :preamble for non closure
dependencies.

This would allow the creation of self-contained libraries and would greatly
lower the barrier of using clojurescript libraries with dependencies.

[1] https://github.com/jeluard/cljs-ol3js/tree/master/resources/closure-js
[2] https://github.com/swannodette/react-cljs/tree/master/src/react


2014-11-10 8:37 GMT-03:00 Nikita Prokopov proko...@gmail.com:

 Hi!

 Right now lein-cljsbuild allows for externs to be specified on user side.
 E.g. I’m building app with react-cljs, I add dependency, but there’s also a
 second step: I need to put :externs [react/externs/react.js] into _my_
 project.clj.

 This is tedious and easy to forget, leading to a lot of confusion (I
 developed for 2 month and everything was fine, then I turn on advanced
 build and nothing works).

 On the other hand, conceptually, externs are part of a library, not my
 user code. So, if library author thinks his library needs externs, he
 specifies it and packs externs along with library code, and they’re
 automatically used when I add dependency. So as a user I don’t manage
 external deps’ externs at all. As Thomas Heller puts it, it might be [a
 quality of life change](
 https://github.com/tonsky/datascript/issues/30#issuecomment-62253696).

 Any thought on it? Maybe there’s already a way to do that?

 Nikita.

 --
 Note that posts from new members are moderated - please be patient with
 your first post.
 ---
 You received this message because you are subscribed to the Google Groups
 ClojureScript group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to clojurescript+unsubscr...@googlegroups.com.
 To post to this group, send email to clojurescript@googlegroups.com.
 Visit this group at http://groups.google.com/group/clojurescript.


-- 
Note that posts from new members are moderated - please be patient with your 
first post.
--- 
You received this message because you are subscribed to the Google Groups 
ClojureScript group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojurescript+unsubscr...@googlegroups.com.
To post to this group, send email to clojurescript@googlegroups.com.
Visit this group at http://groups.google.com/group/clojurescript.


[ClojureScript] Re: ANN: ClojureScript 0.0-2371

2014-10-10 Thread Julien Eluard
Hi David,

thanks once again for the continuous effort to improve the ClojureScript 
compiler.

Some warnings are now printed when using a specific `include-macros` syntax. I 
wanted to confirm that this syntax was indeed incorrect.
An example is: [secretary.core :as secretary :include-macros true :refer 
[defroute]]

Is the proper way to include macros to rely on the top-level `require-macros` 
keyword?

Thanks,
Julien

Le vendredi 10 octobre 2014 09:07:31 UTC-3, David Nolen a écrit :
 ClojureScript, the Clojure compiler that emits JavaScript source code.
 
 
 
 README and source code: https://github.com/clojure/clojurescript
 
 
 
 New release version: 0.0-2371
 
 
 
 Leiningen dependency information:
 
 
 
 [org.clojure/clojurescript 0.0-2371]
 
 
 
 This release includes minor fixes, faster collection iterators, and
 
 stays in sync with the latest transducers changes in Clojure master.
 
 
 
 ### Fixes
 
 * CLJS-862: fix inconsistent re-pattern
 
 * CLJS-866: Faulty ns macro desugaring
 
 * CLJS-869: When preamble is not found in source directory, compiler
 
 does not report it

-- 
Note that posts from new members are moderated - please be patient with your 
first post.
--- 
You received this message because you are subscribed to the Google Groups 
ClojureScript group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojurescript+unsubscr...@googlegroups.com.
To post to this group, send email to clojurescript@googlegroups.com.
Visit this group at http://groups.google.com/group/clojurescript.


Re: [ClojureScript] Re: ANN: ClojureScript 0.0-2371

2014-10-10 Thread Julien Eluard
Thanks Shaun that does the trick and is a nice improvement.

Julien

2014-10-10 10:58 GMT-03:00 Shaun LeBron shaunewilli...@gmail.com:

 (:require [secretary.core :as secretary :include-macros true])
 ; desugars to add=  (:require-macros [secretary.core :as secretary])

 (:require [secretary.core :as secretary :refer-macros [defroute])
 ; desugars to add= (:require-macros [secretary.core :as secretary :refer
 [defroute]])

 This changed to its original intended behavior so we can use :refer and
 :refer-macros together in the same require spec, without using a redundant
 `:include-macros true` as a separator to distinguish what we're referring.

 On Friday, October 10, 2014 8:29:07 AM UTC-5, Julien Eluard wrote:
  Hi David,
 
 
 
  thanks once again for the continuous effort to improve the ClojureScript
 compiler.
 
 
 
  Some warnings are now printed when using a specific `include-macros`
 syntax. I wanted to confirm that this syntax was indeed incorrect.
 
  An example is: [secretary.core :as secretary :include-macros true :refer
 [defroute]]
 
 
 
  Is the proper way to include macros to rely on the top-level
 `require-macros` keyword?
 
 
 
  Thanks,
 
  Julien
 
 
 
  Le vendredi 10 octobre 2014 09:07:31 UTC-3, David Nolen a écrit :
 
   ClojureScript, the Clojure compiler that emits JavaScript source code.
 
  
 
  
 
  
 
   README and source code: https://github.com/clojure/clojurescript
 
  
 
  
 
  
 
   New release version: 0.0-2371
 
  
 
  
 
  
 
   Leiningen dependency information:
 
  
 
  
 
  
 
   [org.clojure/clojurescript 0.0-2371]
 
  
 
  
 
  
 
   This release includes minor fixes, faster collection iterators, and
 
  
 
   stays in sync with the latest transducers changes in Clojure master.
 
  
 
  
 
  
 
   ### Fixes
 
  
 
   * CLJS-862: fix inconsistent re-pattern
 
  
 
   * CLJS-866: Faulty ns macro desugaring
 
  
 
   * CLJS-869: When preamble is not found in source directory, compiler
 
  
 
   does not report it

 --
 Note that posts from new members are moderated - please be patient with
 your first post.
 ---
 You received this message because you are subscribed to the Google Groups
 ClojureScript group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to clojurescript+unsubscr...@googlegroups.com.
 To post to this group, send email to clojurescript@googlegroups.com.
 Visit this group at http://groups.google.com/group/clojurescript.


-- 
Note that posts from new members are moderated - please be patient with your 
first post.
--- 
You received this message because you are subscribed to the Google Groups 
ClojureScript group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojurescript+unsubscr...@googlegroups.com.
To post to this group, send email to clojurescript@googlegroups.com.
Visit this group at http://groups.google.com/group/clojurescript.


[ClojureScript] Example of closure friendly library integration: OpenLayers

2014-05-14 Thread Julien Eluard
Hi,

I just published a simple project [1] wrapping OpenLayers 3 library [2] in a 
lein-cljsbuild friendly package. Just add as a leiningen dependency and you are 
good to go (works great in closure advanced mode).

Nothing fancy but I thought it was worth sharing as it's not a widely known 
feature.

[1] https://github.com/jeluard/cljs-ol3js
[2] http://ol3js.org/

Cheers,
Julien

-- 
Note that posts from new members are moderated - please be patient with your 
first post.
--- 
You received this message because you are subscribed to the Google Groups 
ClojureScript group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojurescript+unsubscr...@googlegroups.com.
To post to this group, send email to clojurescript@googlegroups.com.
Visit this group at http://groups.google.com/group/clojurescript.


[ClojureScript] Re: cljs.core.async.dispatch and exists?

2014-04-25 Thread Julien Eluard
Hi Wes,

'exists?' is a macro part of ClojureScript. You can find its definition here: 
https://github.com/clojure/clojurescript/blob/master/src/clj/cljs/core.clj#L300 
.

Julien

-- 
Note that posts from new members are moderated - please be patient with your 
first post.
--- 
You received this message because you are subscribed to the Google Groups 
ClojureScript group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojurescript+unsubscr...@googlegroups.com.
To post to this group, send email to clojurescript@googlegroups.com.
Visit this group at http://groups.google.com/group/clojurescript.


Re: [ClojureScript] Re: Dependency issue with ClojureScript 0.0-2173 and lein-cljsbuild

2014-03-26 Thread Julien Eluard
Hi Paul,

the following should work:

(ns example.hello
  (:require [goog.dom :as dom]))

(dom/append .. ..)

Julien


2014-03-26 9:53 GMT-03:00 Paul Butcher p...@paulbutcher.com:

 I'd be grateful for suggestions on how to address this - the problem
 affects the ClojureScript examples that accompany the book that I'm in the
 process of writing (Seven Concurrency Models in Seven Weeks
 http://pragprog.com/book/pb7con) and means that the examples don't work
 when updated to use the most recent ClojureScript release :-(

 Thanks in advance.

  --
 paul.butcher-msgCount++

 Silverstone, Brands Hatch, Donington Park...
 Who says I have a one track mind?

 http://www.paulbutcher.com/
 LinkedIn: http://www.linkedin.com/in/paulbutcher
 Skype: paulrabutcher

 Author of Seven Concurrency Models in Seven Weeks: When Threads Unravel
 http://pragprog.com/book/pb7con

 On 24 March 2014 at 12:45:17, Paul Butcher (p...@paulbutcher.com) wrote:

  I'm not sure whether it's an issue with lein-cljsbuild, the most recent
 ClojureScript, or my understanding of how dependencies work in
 ClojureScript. Here's how to reproduce it.

  If you take the simple example project from lein-cljsbuild:


 https://github.com/emezeske/lein-cljsbuild/tree/master/example-projects/simple

  And modify hello.cljs so that it references goog.dom:

  (ns example.hello
(:require [goog.dom :refer [append createDom getElement]]))

  (js/alert Hello from ClojureScript!)


 Everything compiles just fine. If you then, however, update the version of
 ClojureScript in project.clj to 0.0-2173, do a lein cljsbuild clean
 followed by lein cljsbuild once, you get the following warnings:

WARNING: Referred var goog.dom/createDom does not exist at line 1
 src-cljs/example/hello.cljs

 WARNING: Referred var goog.dom/append does not exist at line 1
 src-cljs/example/hello.cljs

 WARNING: Referred var goog.dom/getElement does not exist at line 1
 src-cljs/example/hello.cljs


 This works fine with all the earlier versions of ClojureScript I've tried.
 What's the approved way to use goog.dom in the most recent ClojureScript?

   --
 paul.butcher-msgCount++

 Silverstone, Brands Hatch, Donington Park...
 Who says I have a one track mind?

 http://www.paulbutcher.com/
 LinkedIn: http://www.linkedin.com/in/paulbutcher
 Skype: paulrabutcher

 Author of Seven Concurrency Models in Seven Weeks: When Threads Unravel
 http://pragprog.com/book/pb7con

  --
 Note that posts from new members are moderated - please be patient with
 your first post.
 ---
 You received this message because you are subscribed to the Google Groups
 ClojureScript group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to clojurescript+unsubscr...@googlegroups.com.
 To post to this group, send email to clojurescript@googlegroups.com.
 Visit this group at http://groups.google.com/group/clojurescript.


-- 
Note that posts from new members are moderated - please be patient with your 
first post.
--- 
You received this message because you are subscribed to the Google Groups 
ClojureScript group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojurescript+unsubscr...@googlegroups.com.
To post to this group, send email to clojurescript@googlegroups.com.
Visit this group at http://groups.google.com/group/clojurescript.


Re: [ClojureScript] Re: Dependency issue with ClojureScript 0.0-2173 and lein-cljsbuild

2014-03-26 Thread Julien Eluard
I am not quite sure, I could not find much info about it. It might be that
it wasn't supposed to work and recent improvements now prevent this.

Julien


2014-03-26 12:16 GMT-03:00 Paul Butcher p...@paulbutcher.com:

 Thanks Julien - that does seem to work.

 Can you help me to understand why using :as works but :refer doesn't? And
 what changed between 0.0-2138 and 0.0-2173 to mean that :refer stopped
 working?

 Thanks!

  --
 paul.butcher-msgCount++

 Silverstone, Brands Hatch, Donington Park...
 Who says I have a one track mind?

 http://www.paulbutcher.com/
 LinkedIn: http://www.linkedin.com/in/paulbutcher
 Skype: paulrabutcher

 Author of Seven Concurrency Models in Seven Weeks: When Threads Unravel
 http://pragprog.com/book/pb7con

 On 26 March 2014 at 14:20:45, Julien Eluard (julien.elu...@gmail.com)
 wrote:

 Hi Paul,

 the following should work:

  (ns example.hello
(:require [goog.dom :as dom]))

  (dom/append .. ..)

 Julien


 2014-03-26 9:53 GMT-03:00 Paul Butcher p...@paulbutcher.com:

  I'd be grateful for suggestions on how to address this - the problem
 affects the ClojureScript examples that accompany the book that I'm in the
 process of writing (Seven Concurrency Models in Seven Weeks
 http://pragprog.com/book/pb7con) and means that the examples don't work
 when updated to use the most recent ClojureScript release :-(

  Thanks in advance.

  --
 paul.butcher-msgCount++

 Silverstone, Brands Hatch, Donington Park...
 Who says I have a one track mind?

 http://www.paulbutcher.com/
 LinkedIn: http://www.linkedin.com/in/paulbutcher
 Skype: paulrabutcher

 Author of Seven Concurrency Models in Seven Weeks: When Threads Unravel
 http://pragprog.com/book/pb7con

  On 24 March 2014 at 12:45:17, Paul Butcher (p...@paulbutcher.com) wrote:

   I'm not sure whether it's an issue with lein-cljsbuild, the most
 recent ClojureScript, or my understanding of how dependencies work in
 ClojureScript. Here's how to reproduce it.

  If you take the simple example project from lein-cljsbuild:


 https://github.com/emezeske/lein-cljsbuild/tree/master/example-projects/simple

  And modify hello.cljs so that it references goog.dom:

  (ns example.hello
(:require [goog.dom :refer [append createDom getElement]]))

  (js/alert Hello from ClojureScript!)


 Everything compiles just fine. If you then, however, update the version
 of ClojureScript in project.clj to 0.0-2173, do a lein cljsbuild clean
 followed by lein cljsbuild once, you get the following warnings:

WARNING: Referred var goog.dom/createDom does not exist at line 1
 src-cljs/example/hello.cljs

 WARNING: Referred var goog.dom/append does not exist at line 1
 src-cljs/example/hello.cljs

 WARNING: Referred var goog.dom/getElement does not exist at line 1
 src-cljs/example/hello.cljs


 This works fine with all the earlier versions of ClojureScript I've
 tried. What's the approved way to use goog.dom in the most recent
 ClojureScript?

   --
 paul.butcher-msgCount++

 Silverstone, Brands Hatch, Donington Park...
 Who says I have a one track mind?

 http://www.paulbutcher.com/
 LinkedIn: http://www.linkedin.com/in/paulbutcher
 Skype: paulrabutcher

 Author of Seven Concurrency Models in Seven Weeks: When Threads Unravel
 http://pragprog.com/book/pb7con

   --
 Note that posts from new members are moderated - please be patient with
 your first post.
 ---
 You received this message because you are subscribed to the Google Groups
 ClojureScript group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to clojurescript+unsubscr...@googlegroups.com.
 To post to this group, send email to clojurescript@googlegroups.com.
 Visit this group at http://groups.google.com/group/clojurescript.


  --
 Note that posts from new members are moderated - please be patient with
 your first post.
 ---
 You received this message because you are subscribed to the Google Groups
 ClojureScript group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to clojurescript+unsubscr...@googlegroups.com.
 To post to this group, send email to clojurescript@googlegroups.com.
 Visit this group at http://groups.google.com/group/clojurescript.



-- 
Note that posts from new members are moderated - please be patient with your 
first post.
--- 
You received this message because you are subscribed to the Google Groups 
ClojureScript group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojurescript+unsubscr...@googlegroups.com.
To post to this group, send email to clojurescript@googlegroups.com.
Visit this group at http://groups.google.com/group/clojurescript.


[ClojureScript] [ANN] Lucuma 0.2.0

2014-02-20 Thread Julien Eluard
Hi,

I am pleased to announce release 0.2.0 of lucuma [1][2] - a Web Components
library for ClojureScript.

Lucuma helps with creating custom HTML elements encapsulating document,
style and logic. You can think of it as Google polymer in ClojureScript
world.

This release [3] introduces element definition reusability, greatly
improves properties support and rationalizes the syntax. I consider its API
fairly stable at this stage.

Next release [4] will focus on introducing a new syntax to unify document
definition with dynamic document changes. [5]

Feedback welcomed!

Thanks,
Julien

[1] http://jeluard.github.io/lucuma/
[2] https://github.com/jeluard/lucuma/
[3] https://github.com/jeluard/lucuma/blob/master/CHANGELOG.md
[4] https://github.com/jeluard/lucuma/issues?milestone=2page=1state=open
[5] https://github.com/jeluard/lucuma/issues/8

-- 
Note that posts from new members are moderated - please be patient with your 
first post.
--- 
You received this message because you are subscribed to the Google Groups 
ClojureScript group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojurescript+unsubscr...@googlegroups.com.
To post to this group, send email to clojurescript@googlegroups.com.
Visit this group at http://groups.google.com/group/clojurescript.


Re: [ClojureScript] cljs-http with CORS problem...

2014-02-13 Thread Julien Eluard
Hi,

make sure the web server you are interacting with sets the right CORS headers 
in the response.
If you control it you can find more info here: 
http://enable-cors.org/server.html

Julien

Le 13 févr. 2014 à 18:40, Thomas th.vanderv...@gmail.com a écrit :

 Hi Everyone,
 
 I am trying to build a little cljs app and I want to call a REST API that 
 potentially will run on a different machine (testing with localhost at the 
 moment).
 
 I am using the cljs-http library which seems to be quite easy to use. But I 
 get the following error when I do a GET call:
 
 XMLHttpRequest cannot load https://localhost:9443/path/. No 
 'Access-Control-Allow-Origin' header is present on the requested resource. 
 Origin 'null' is therefore not allowed access.  
 
 When I do the same call however from a normal browser window or with Poster I 
 do get a good response.
 
 Any idea how I can avoid it? I did bit of Googling and the error is related 
 to Cross Origin Resources, but couldn't find a solution :((  Any ideas how to 
 avoid this?
 
 Thanks in advance!!!
 
 Thomas
 
 -- 
 Note that posts from new members are moderated - please be patient with your 
 first post.
 --- 
 You received this message because you are subscribed to the Google Groups 
 ClojureScript group.
 To unsubscribe from this group and stop receiving emails from it, send an 
 email to clojurescript+unsubscr...@googlegroups.com.
 To post to this group, send email to clojurescript@googlegroups.com.
 Visit this group at http://groups.google.com/group/clojurescript.

-- 
Note that posts from new members are moderated - please be patient with your 
first post.
--- 
You received this message because you are subscribed to the Google Groups 
ClojureScript group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojurescript+unsubscr...@googlegroups.com.
To post to this group, send email to clojurescript@googlegroups.com.
Visit this group at http://groups.google.com/group/clojurescript.


Re: [ClojureScript] Re: Runtime installation of valid JS property

2014-01-29 Thread Julien Eluard
Hi Adrian,

essentially I want to install some function on a JS object from
ClojureScript, and make sure it can be called from JS.

My issue is that I don't know how to enforce a valid function name from the
ClojureScript side. Because the function name is only known at runtime I
can only use aget/aset which in turns rely on the JS bracket operator. The
bracket operator doesn't appear to restrict property names while function
name have some restrictions.

For instance I could install 'invalid-name' from ClojureScript but
obj.invalid-name() would fail from JS side (the trick being that
obj['invalid-name'] would reference the function).

Looking at the code from goog.reflect I can see it relies on the bracket
operator so I don't think it can help.

Julien


2014-01-29 adrian.med...@mail.yu.edu

 goog.reflect (
 http://docs.closure-library.googlecode.com/git/namespace_goog_reflect.html)
 might be what you're looking for - but I'm not sure I understand your
 problem.

 --
 Note that posts from new members are moderated - please be patient with
 your first post.
 ---
 You received this message because you are subscribed to the Google Groups
 ClojureScript group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to clojurescript+unsubscr...@googlegroups.com.
 To post to this group, send email to clojurescript@googlegroups.com.
 Visit this group at http://groups.google.com/group/clojurescript.


-- 
Note that posts from new members are moderated - please be patient with your 
first post.
--- 
You received this message because you are subscribed to the Google Groups 
ClojureScript group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojurescript+unsubscr...@googlegroups.com.
To post to this group, send email to clojurescript@googlegroups.com.
Visit this group at http://groups.google.com/group/clojurescript.


Re: [ClojureScript] Re: Runtime installation of valid JS property

2014-01-29 Thread Julien Eluard
That's definitively a workaround that would work for most common cases.

Googling around I found the definition of a JS identifier (ES 5.1) is not
exactly trivial: http://mathiasbynens.be/notes/javascript-identifiers . I
can't even see what part of the definition prevents dash in names. The
author of this article also states a complete regex would be 11,236
characters long..

I figured the best option would be to rely on the browser itself by
checking the function would be accessible after installing it.

Julien


2014-01-29 David Nolen dnolen.li...@gmail.com

 This seems like a non-problem to me. Valid JavaScript identifiers are
 easily identifiable with a regex no?


 On Wed, Jan 29, 2014 at 9:23 PM, Julien Eluard julien.elu...@gmail.comwrote:

 Hi Adrian,

 essentially I want to install some function on a JS object from
 ClojureScript, and make sure it can be called from JS.

 My issue is that I don't know how to enforce a valid function name from
 the ClojureScript side. Because the function name is only known at runtime
 I can only use aget/aset which in turns rely on the JS bracket operator.
 The bracket operator doesn't appear to restrict property names while
 function name have some restrictions.

 For instance I could install 'invalid-name' from ClojureScript but
 obj.invalid-name() would fail from JS side (the trick being that
 obj['invalid-name'] would reference the function).

 Looking at the code from goog.reflect I can see it relies on the bracket
 operator so I don't think it can help.

 Julien


 2014-01-29 adrian.med...@mail.yu.edu

 goog.reflect (
 http://docs.closure-library.googlecode.com/git/namespace_goog_reflect.html)
 might be what you're looking for - but I'm not sure I understand your
 problem.

 --
 Note that posts from new members are moderated - please be patient with
 your first post.
 ---
 You received this message because you are subscribed to the Google
 Groups ClojureScript group.
 To unsubscribe from this group and stop receiving emails from it, send
 an email to clojurescript+unsubscr...@googlegroups.com.
 To post to this group, send email to clojurescript@googlegroups.com.
 Visit this group at http://groups.google.com/group/clojurescript.


  --
 Note that posts from new members are moderated - please be patient with
 your first post.
 ---
 You received this message because you are subscribed to the Google Groups
 ClojureScript group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to clojurescript+unsubscr...@googlegroups.com.
 To post to this group, send email to clojurescript@googlegroups.com.
 Visit this group at http://groups.google.com/group/clojurescript.


  --
 Note that posts from new members are moderated - please be patient with
 your first post.
 ---
 You received this message because you are subscribed to the Google Groups
 ClojureScript group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to clojurescript+unsubscr...@googlegroups.com.
 To post to this group, send email to clojurescript@googlegroups.com.
 Visit this group at http://groups.google.com/group/clojurescript.


-- 
Note that posts from new members are moderated - please be patient with your 
first post.
--- 
You received this message because you are subscribed to the Google Groups 
ClojureScript group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojurescript+unsubscr...@googlegroups.com.
To post to this group, send email to clojurescript@googlegroups.com.
Visit this group at http://groups.google.com/group/clojurescript.


Re: [ClojureScript] Re: Runtime installation of valid JS property

2014-01-29 Thread Julien Eluard
Ok thanks!


2014-01-30 David Nolen dnolen.li...@gmail.com

 No there isn't.


 On Wed, Jan 29, 2014 at 9:59 PM, Julien Eluard julien.elu...@gmail.comwrote:

 Just to make sure I have all the info: there is no option in
 ClojureScript to do the equivalent of (.-property obj) but with a string
 identifying the property that would not rely on the bracket operator?


 2014-01-29 David Nolen dnolen.li...@gmail.com

  On Wed, Jan 29, 2014 at 9:40 PM, Julien Eluard julien.elu...@gmail.com
  wrote:

 That's definitively a workaround that would work for most common cases.

 Googling around I found the definition of a JS identifier (ES 5.1) is
 not exactly trivial:
 http://mathiasbynens.be/notes/javascript-identifiers . I can't even
 see what part of the definition prevents dash in names. The author of this
 article also states a complete regex would be 11,236 characters long..


 The other option is to use the one of good pure JavaScript parsers such
 as Esprima, I'm assuming they provide accurate and fast facilities for
 validating JS identifiers.

 David

 --
 Note that posts from new members are moderated - please be patient with
 your first post.
 ---
 You received this message because you are subscribed to the Google
 Groups ClojureScript group.
 To unsubscribe from this group and stop receiving emails from it, send
 an email to clojurescript+unsubscr...@googlegroups.com.
 To post to this group, send email to clojurescript@googlegroups.com.
 Visit this group at http://groups.google.com/group/clojurescript.


  --
 Note that posts from new members are moderated - please be patient with
 your first post.
 ---
 You received this message because you are subscribed to the Google Groups
 ClojureScript group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to clojurescript+unsubscr...@googlegroups.com.
 To post to this group, send email to clojurescript@googlegroups.com.
 Visit this group at http://groups.google.com/group/clojurescript.


  --
 Note that posts from new members are moderated - please be patient with
 your first post.
 ---
 You received this message because you are subscribed to the Google Groups
 ClojureScript group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to clojurescript+unsubscr...@googlegroups.com.
 To post to this group, send email to clojurescript@googlegroups.com.
 Visit this group at http://groups.google.com/group/clojurescript.


-- 
Note that posts from new members are moderated - please be patient with your 
first post.
--- 
You received this message because you are subscribed to the Google Groups 
ClojureScript group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojurescript+unsubscr...@googlegroups.com.
To post to this group, send email to clojurescript@googlegroups.com.
Visit this group at http://groups.google.com/group/clojurescript.