Out of curiosity I started playing with Elm and the Functional Reactive principles. While still a young language and community, it gives you lot of food for your thoughts, and I like the idea of completely replacing html/css/javascript with one single language. It is particularly remarkable how basic tutorials and games are easy to implement with Elm with little to no setup compared to the tiresome process of setting up clojurescript. The clojure/clojurescript community is way more mature and the language itself would have no problems in doing something similar. Any particular reason why this has not been attempted or should be avoided? I'm not trying to be contentious, I'm honestly curious about your opinion.
--
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.
Can you develop this a little bit further? For example I don't see any point for having to care about dom, tags and divs in a UI and anything that can abstract this assembly-like jargon for me is more than welcome.
> ClojureScript is not focused on FRP research or experimentation - production usage is the main focus.
>
>
That is absolutely one of the the reason why I like clojure community. It's not just a theory bubble, it's enterprise-ready. However, this community is particularly sensible to sound, interesting and 'simple' academics ideas and more often than once you see papers popping out as a reference for certain library implementation. I'm not qualified enough to say that FRP is one of these ideas, but it certainly seems so.
>
> If you want to build an easier ClojureScript environment so more people can play around with it with fewer setup hassles - go for it! I think there are some similar efforts afoot (Light Table, Session, etc.).
>
>
:) Indeed. But let's be more clear with one example. Every time I want to do animations/3d/other effects in clojurescript I end up importing a stateful JS library and try to wrap it with clojure calls. With Elm, you may very well think that JS does not exist at all, if you see what I mean. It's a language for building UI that incidentally compiles to JS.
Can you develop this a little bit further? For example I don't see any point for having to care about dom, tags and divs in a UI and anything that can abstract this assembly-like jargon for me is more than welcome.
That is absolutely one of the the reason why I like clojure community. It's not just a theory bubble, it's enterprise-ready. However, this community is particularly sensible to sound, interesting and 'simple' academics ideas and more often than once you see papers popping out as a reference for certain library implementation. I'm not qualified enough to say that FRP is one of these ideas, but it certainly seems so.
:) Indeed. But let's be more clear with one example. Every time I want to do animations/3d/other effects in clojurescript I end up importing a stateful JS library and try to wrap it with clojure calls. With Elm, you may very well think that JS does not exist at all, if you see what I mean. It's a language for building UI that incidentally compiles to JS.
Hi Frankie,
I have shared your interest in FRP and the general topic of dataflow, the end result of which was the Javelin library [1] which may interest you. While Javelin was motivated by production use of Flapjax from ClojureScript, we chose with Javelin to eschew EventStreams in favor of the simpler and generally more familiar spreadsheet metaphor. We also found along the way that FRP falls out of dataflow modulo type inference, the marginal utility of which - in our experience - fell completely away with EventStreams were gone. What we really wanted was consistency - of which FRP Behaviors are the foundation - and with Javelin, we had it.
Like you I am also interested in the prospect of a single-language "environment" with which to program in browsers. I am interested in this because the browser environment is too comprehensive for a browser-agnostic language to provide a means for modularity and reuse in and between these kind of applications. Elm delivers this modularity by extending scoping rules and other Elm language semantics to every corner of the browser platform.
Because the modularity and reuse facilities of ClojureScript don't pervade the browser, and because CSS and HTML fragments are independently global scopes without composition semantics, we recently released Hoplon [2].
Hoplon is our attempt to deliver an "environment", not unlike Elm, that provides the primitives we've found necessary to build and maintain large single-page applications, addressing the modularity problem that Elm also does.
Unlike Elm, Hoplon is not a language. It is a set of Clojure and ClojureScript libraries that compose under a thin preprocessor. Also unlike Elm, Hoplon and its constituent libraries were designed to cooperate with existing HTML/JS/CSS libraries and to be a friendly environment for the average frontend dev.
In a nutshell, if you're into Elm you might just be into Hoplon :-)
1. https://github.com/tailrecursion/javelin
2. http://hoplon.io/
--
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/ueRyi982UE0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to clojurescrip...@googlegroups.com.
> Being able to directly interact with HTML/CSS/JS is absolutely critical....it is designed to be either the whole front end or an embedded
portion of it. In the latter case you can use the FFI to interact with
the non-Elm portion of the front end. The new "ports" feature provides
a clean bidirectional API between regular HTML/CSS/JS front end code
and Elm's Signal types. Elm certainly recognizes that interacting with
traditional front end technology is "absolutely critical".
It sounds like you believe HTML/CSS/JS cannot be abstracted out tosomething better, yet ClojureScript itself is such an abstraction, at
least for JS - and we have SASS, LESS, Stylus, etc for abstracting