Fork me on GitHub
#clojurescript
<
2015-08-20
>
mfikes00:08:14

@bostonaholic: Looks like OS X 10.8 Mountain Lion will be supportable by Planck and perhaps 10.7 Lion as well.

atroche01:08:09

so I want to make a cljsjs package for https://github.com/callemall/material-ui, but there's no single file to build externs from, unlike react-bootstrap, which has the https://github.com/react-bootstrap/react-bootstrap-bower project. when I try to build material-ui using webpack, it bakes react into the compiled JS, which is not what I want at all. any ideas?

dmich02:08:39

@mfikes: How about Planck on Windows? simple_smile

dmich02:08:16

or Planck on nodejs on Windows?

underplank05:08:51

mfikes: what set of the core libary does planck have access to atm? for example does slurp work?

jonpither11:08:52

anyone using figwheel in the their normal clojure REPL, i.e. perhaps as a component?

not-much-io13:08:19

I have this issue with :optimization options. I get the following cljs->js. cljs: (defn start-upgrading [] (js/setInterval #(.upgradeDom js/componentHandler) 100)) :optimization :whitespace yields: setInterval((function (){ return componentHandler.upgradeDom(); }),(100)); :optimization :advanced yields: setInterval((function (){ return http://componentHandler.pa(); }),(100)); Any ideas?

mcgivernsa13:08:25

closure is allowed to rename property names with advanced compilation

mcgivernsa13:08:48

is upgradeDom defined in cljs, or in js?

not-much-io13:08:12

But closure should not rename the standard library though right? Though Cursive also didn't seem to locate componentHandler.. it tells me it is undefined.

mcgivernsa13:08:01

what do you mean by the 'standard library'? isn't this part of material design, not closure or the various browser standard apis?

not-much-io13:08:57

Sorry, I assumed it was a simple standard javascript function, but you are right, it's a part of mdl.

not-much-io13:08:16

so :advanced compilation also runs over the mdl library and somehow breaks it by renaming properties?

borkdude13:08:28

hey @yogthos, I like your reagent-forms library. have you got any examples including validation that I can borrow from maybe?

mfikes13:08:58

@dmich I'm considering making Planck portable across OS X, Windows, and Linux.

bensu13:08:44

@not-much-io: closure will rename the files it knows about. Are you feeding your mdl library to it?

yogthos13:08:19

@borkdude: hmm the easiest would be to use something like bouncer and hook it in as an event, but I don't have an example handy

borkdude13:08:02

@yogthos: I thought so, just call bouncer in the last function you pass to bind-fields, or use it in add-watch

mcgivernsa13:08:19

@not-much-io: I'm guessing you're including mdl as js (not through closure), and trying to call it from cljs with advanced compilation?

not-much-io13:08:43

@bensu I am not sure if I am, here is the place I included in the project that has the problem.

mfikes13:08:01

@underplank: There are things in clojure.core, , and clojure.java.shell that have imitations in planck.core, , and planck.shell. And planck.core/slurp is available.

not-much-io13:08:53

@mcgivernsa: I guess I am? Sry I'm rather new to clojurescript. How should I include mdl then?

not-much-io13:08:16

@mcgivernsa: @bensu : I'll figure it out based on this: http://lukevanderhart.com/2011/09/30/using-javascript-and-clojurescript.html I just didn't know what I didn't know simple_smile

mcgivernsa13:08:33

OK cool, so you need an externs file?

not-much-io13:08:50

So as I understood it for using advanced compilation I'd need to use the following style for including js files: (closure/build "src/cljs" {:optimizations :advanced :libs ["libs/my-gclosure-library.js"] <-- This way :output-to "helloworld.js"})

not-much-io13:08:45

@mcgivernsa: I'll read up, thanks for the help.

bensu13:08:47

@not-much-io: unfortunately the externs story is not easy. Is your library in cljs? https://github.com/cljsjs/packages

bensu13:08:53

(try to find it there)

not-much-io13:08:47

It's not on cljsjs, already checked.

not-much-io13:08:07

@bensu Is it really that bad?

bensu13:08:23

not that bad but it takes a while to navigate. what's the library?

not-much-io13:08:33

@bensu Is it neccesary to jump through these hoops if I just don't use advanced compilation?

not-much-io13:08:02

@bensu I'm just getting started, so I'd rather not be sidetracked by something like this yet. I'll build something and then try to get advanced compilation up and running. Main thing is I now know this can happen. simple_smile

mcgivernsa13:08:30

yeah, advanced compilation is much more aggressive

bensu13:08:38

@not-much-io: good call. come back then. In any case, you'll need to understand a little bit of what goes on in :advanced and how do externs help. Once you understand the concepts, writing externs for what you need is hard.

borkdude16:08:36

@yogthos: the event function in reagent-forms accepts an id and a value. why is the id a lazy seq?

yogthos16:08:45

If I recall correctly it's actually a path, if you have element with id person.name it gets translated into [:person :name]

yogthos16:08:29

So naming could've been better :)

rauh17:08:27

So compiler option :main doesn't really make sense with :modules right? Is it just ignored?

lvh20:08:35

@dnolen: Do you have any opinions on how putting userscript/Greasemonkey headers in front of compiled JS files should work? I found https://groups.google.com/forum/?fromgroups=#!topic/clojurescript/_qViDrdu30U, but I know a lot has changed in Clojurescript since that happened; specifically ISTR you’re not actively recommending cljsbuild anymore.

rauh20:08:39

How do I specify multiple source paths in the cljs.build.api/build?

juhoteperi20:08:59

@rauh: cljs.build.api/inputs

cfleming21:08:56

Can I mix some simple JQuery with a SPA using, say, reagent, or will bad things happen? There’s a lib I’d rather avoid porting if I can.

spinningtopsofdoom21:08:59

You should be able to use jQuery with React so long as the jQuery changes and react changes are separate.

bostonaholic21:08:35

@cfleming: yup, I've done this

bostonaholic21:08:59

and now porting some of the jQuery to reagent

bostonaholic21:08:35

like, we're using zurb foundation and some of its javascript components use jQuery

bostonaholic21:08:29

and we've extracted our own adapters to make it work more smoothly so there isn't quite as much jQuery, just in the adapters

bostonaholic21:08:52

something we're working to OSS

cfleming21:08:34

I’ll try it out and see how far I get.

cfleming21:08:00

I may be able to just port the input handling and call the JS functions that it calls directly.

cfleming21:08:10

i.e. just port the actual JQuery bit, not the logic

rauh23:08:33

1. Has anybody tried compiler option :closure-warnings {:check-types :warn} with :simple compilation? Crashed for me with an exception in Closure compiler. Not so with :check-types :error.

rauh23:08:47

2. Where would I report this? Closure or CLJS?