Fork me on GitHub
#clojurescript
<
2015-06-13
>
mfikes00:06:13

@maria Just read through your commit. Awesome! I think I’ll build a local copy of Closure to try it out. simple_smile

maria01:06:39

mfikes: thank you :) they just released a new version of the Google Closure compiler (v20150609) including our changes, so you only need to adjust the version when building the ClojureScript compiler ;)

dnolen02:06:39

bumping Closure Compiler!

dnolen02:06:19

@ivar good chance EuroClojure video will be up sooner simple_smile And it will be more relevant for Clojure(Script) programmers.

escherize07:06:52

I'm also interested in seeing this talk @ivar @dnolen

mfikes12:06:49

@maria: Ignoring JSX for now, I’m experimenting with a gigantic :foreign-libs specifying :commonjs for React Native https://github.com/mfikes/rn-commonjs/blob/master/project.clj#L15

dnolen13:06:10

@mfikes: curious to see how that goes. re: JSX, looks like that’s now dropped for Babel

mfikes13:06:57

@dnolen: I didn't quite comprehend what they are doing. Is the JSX dialect going away or just the current transformer impl?

dnolen14:06:51

@mfikes: JSX is their custom transform tool, they’re just switching to a standard system and their transforms will be plugins far as I understand to Babel.

mfikes14:06:49

@dnolen: Ahh. OK. So if ClojureScript ends up supporting a transform plugin, the plugin for JSX is likely to be built in terms of Babel instead of the older implementation. I also wonder if it is just possible to pre-transform all of the React Native code manually prior to it even being seen by ClojureScript’s :commonjs (that’s at least what I might try in the interim)

dnolen14:06:43

@mfikes: that’s possible but too, but that just means more tools / more steps. I think better if you can just setup ClojureScript to do all the bits.

mfikes14:06:13

@dnolen: Yeah. I’m also wondering if the generation of the (gigantic) :foreign-libs can ever be automated, or if it would end up being packaged up into something perhaps in CLJSJS.

dnolen14:06:04

mfikes: it could probably be automated with some work

mfikes14:06:37

@dnolen: I’m cool with doing things manually in order to learn what the hurdles are simple_smile

jrychter14:06:37

I need to allow the user to download (JSON) data as a file. Since I'm using Sente, I figured the easiest way would be to send the data to the cljs client, and then use https://github.com/eligrey/FileSaver.js — anybody know of an easier way?

borkdude14:06:34

@jrychter: change the mime type?

jrychter14:06:48

@borkdude: of what? I have the data as a JavaScript string. Getting from there to a "download as" box isn't as obvious as I thought.

borkdude14:06:02

@jrychter: ah ok, you want to save a client side string (which happens to be json) to a file

ul15:06:32

Somebody could explain to me, what exactly happens when I do:

(deftype AType []
  Object
  (foo [_] "Hi!"))
I mean, when I implement methods for Object instead of regular protocols in cljs

ul16:06:07

In compiled code I see that it simply extends prototype of AType

ul16:06:34

Will it be compatible with advanced compilation?

ul16:06:02

How to call those methods? I will test this by myself, but maybe somebody knows any tricky parts of it?

dnolen16:06:21

@ul the only thing that isn’t compatible with advanced compilation - using strings for properties

dnolen16:06:26

Object methods are fully supported

ul16:06:58

so, (.foo atype-instance) will work fine?

ul16:06:14

if foo declared as described above

ul16:06:05

thanks!

shaunlebron19:06:51

@ul, that’s cool, didn’t know that

shaunlebron19:06:34

I have a special namespace question

shaunlebron19:06:29

where are the special namespaces js/ and Math/ handled?

shaunlebron19:06:34

I mean, clearly, they’re not real namespaces since they can’t be required.

shaunlebron19:06:20

@juhoteperi: thanks, I saw that and I think it’s just for invocation

juhoteperi19:06:58

shaunlebron: What else would be needed?

shaunlebron19:06:34

just looking through the analyzer trying to see how it’s resolved

juhoteperi19:06:24

Maybe analyzer/analyze-symbol -> compiler/emit* :var

ghadi19:06:49

Who has recommendations for a decent calendar view through a cljs/react wrapper?

ghadi19:06:10

I'd like something that looks good on a phone. I've 95% rolled my own because cljs+closure makes it so easy, but I'm concerned that there is something I haven't thought of, like old IE

ghadi19:06:53

And obviously I want to drive the calendar view through EDN data.

ghadi19:06:16

I want it to function exactly like http://bookofmormonbroadway.com/tickets

shaunlebron20:06:24

thanks @juhoteperi, that’s what I was looking for

shaunlebron20:06:36

Math passes as an implicit namespace during analysis, passes through munge during emit* :var, where the / is replaced with a . here: https://github.com/clojure/clojurescript/blob/f8af10da6429bab8e9838ac90a622b1858ffe983/src/main/clojure/cljs/compiler.cljc#L78

shaunlebron20:06:52

@ghadi, if you’re using closure, you probably don’t have to worry about old IE

ghadi20:06:44

i'm not actually using closure for anything but generating vectors of weeks to layout using om

ghadi20:06:59

I hadn't really considered their widgets tbh

ghadi20:06:06

think I should?

shaunlebron20:06:24

I can’t speak on closure widgets though