Clojurians
#cljs-dev
<
2016-09-08
>

This page is not created by, affiliated with, or supported by Slack Technologies, Inc.

xcthulhu13:09:00

@dnolen @mfikes - Everyone is really excited about ClojureScript freeing itself from the JVM in the wake of the JavaScript closure compiler. But I was wondering about how ClojureScript would handle one of the more elementary things the JVM gives you, which is IO. I posted my thoughts about this on this little reddit thread, but I was wondering about your take - https://www.reddit.com/r/Clojure/comments/51g31l/google_developers_blog_closure_compiler_in/d7e2vqa

xcthulhu13:09:29

Any possibility of something like a name space emerging, which might encapsulate the chaos of the world of CLI JavaScript runtime IO interfaces? I recognize that it'd be pretty ugly...

mfikes13:09:35

From the compiler codebase perspective, this ticket might lead to at least some hope of using the existing I/O calls that the compiler makes http://dev.clojure.org/jira/browse/CLJS-901 (but then there would still be the need of satisfying I/O requests in something like Node). I’ve been working on CLJS-901 with the mindset of being within the JVM (thus potentially providing sufficient hooks to solve an interesting WebDAV problem with Ambly), but perhaps if a bit more general approach is taken, then any I/O backend could work, even if the compiler is self-hosted and running in Node or some arbitrary JavaScript engine. Interesting.

mfikes13:09:26

I’ve just scratched the surface in beginning to think about CLJS-901 and am essentially in experimentation stage with https://github.com/mfikes/clojurescript/commit/fc794202483345f32ff177362a894bc114426f33

xcthulhu13:09:43

I think a more abstract candidate than File might be FileObject in JVM land

xcthulhu13:09:39

Anyway, it would also be nice if localStorage or a cookie file could be used for IO, because sometimes that's all you've got. Food for thought. I'll leave you all alone now...

pat15:09:28

@xcthulhu i have been working on this : https://github.com/pkpkpk/cljs-node-io

pat15:09:18

Still some rough edges but i've written alot of scripts with it and its great

xcthulhu15:09:05

Problem is, it doesn't work with planck :disappointed:

xcthulhu15:09:27

Nor localstorage

pat15:09:29

Im working on a planck equivalent in node too but not quite ready

xcthulhu15:09:30

IDK, JSCore's JIT is faster than the ancient V8 in node.js, I'm not totally sold

xcthulhu15:09:31

I'd prefer if the competing teams here formed a tiny committee and agreed on an API for and then I didn't have to worry about which horse to back

viebel20:09:09

What about supporting cljs compilation in the browser?

viebel20:09:46

Then we could have a full cljs IDE (inc. compilation) inside the brower

viebel20:09:28

People could work on their github cljs project, without leaving the browser!

richiardiandrea21:09:10

@viebel I so like that! and now that Google Closure compiler is JS only...well why not dreaming :slightly_smiling_face: