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

2016-04-21 Thread jiyinyiyong
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 
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  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 a topic in the
> Google Groups "ClojureScript" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/clojurescript/3AojzHsh3u0/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> 

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  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] Contract - 3 Months - Clojuresript/Clojure/Reagent - London

2016-04-21 Thread alex
Morning,

I have just had a 3 month contract come up for a Clojure/Clojurescript/Reagent 
engineer here in London. Working for a top Clojure house! 

Drop me a line for more info or if you are interested! a...@functionalworks.com 

thanks,
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 https://groups.google.com/group/clojurescript.


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

2016-04-21 Thread Jiyin Yiyong
Not able to edit, corrigendums here... "declarative canvas libraries" shoud be 
"imperative...", most canvas libraries are object oriented with mutable state, 
unlink React. "go back to work...spend much time" should be "less time", real 
world apps are unlikely to pick immature code like Respo.

On Thursday, April 21, 2016 at 6:13:47 PM UTC+8, Jiyin Yiyong wrote:
> 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.


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

2016-04-21 Thread Jiyin Yiyong
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.


[ClojureScript] Re: How to make cljs$core$next faster in ClojureScript?

2016-04-21 Thread Thomas Heller
Hey,

the .cirru code looks quite foreign but I guess I can kinda see what is going 
on. cljs$core$next is probably not what is slow here, next when working on a 
lazy seq will realize the next entry. So while next is fast the actual work 
that happens is "slow". Flame Graphs are generally better for understanding 
what is going on.

Anyways, some general recommendations:

- do not profile in dev mode. compile with :advanced mode. use :pseudo-names 
true so you can still kinda see what code is running. At the very least compile 
with :static-fns true.
- do not use partial. quamolit.alias has a bunch which I assume are called 
frequently.
- do not use concat. Too lazy, too many allocations.
- try transducers as well, they allocate less.

HTH,
/thomas




On Thursday, April 21, 2016 at 5:02:28 AM UTC+2, Jiyin Yiyong wrote:
> I got an app with ClojureScript and it's quite slow 
> http://repo.tiye.me/Quamolit/quamolit/
> 
> My code is doing a lot of rendering work, I haven't yet finished designing 
> the caching solution, but the CPU profile showed there's performance issue in 
> `cljs$core$next`. Why is that slow, did I use it wrong?
> 
> My code is at http://github.com/Quamolit/quamolit if you are interested run 
> `boot compile-cirru` to get ClojureScript code, just another syntax... by 
> running `boot dev` to start development environment. Since I used Hit Regions 
> APIs, you need to turn on "Experimental Canvas features" to run the app, 
> check here 
> https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/addHitRegion

-- 
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.