Fork me on GitHub
#clojurescript
<
2015-08-21
>
mfikes00:08:45

@bostonaholic and others on Mountain Lion: Planck master now passes tests there. You can download pre-built binary from http://planck.fikesfarm.com, or Homebrew your own by brew edit planck adding head "", update depends_on :macos => :mountain_lion and then brew install --HEAD planck

aengelberg01:08:46

Is there a way to connect Cider to a Figwheel repl?

oskarth09:08:54

Anyone used slurp in Planck? I saw a video of mfikes doing it, but when I run (slurp "foo") I get an "undeclared Var cljs.user/slurp at line 1" error. Installed planck via homebrew, v1-3.

andre.richards10:08:38

@mfikes I dusted off old machine with OSX 10.7.5 When running Planck 1.6 beta 2: Segmentation fault: 11

cfleming10:08:03

@juhoteperi: I see you packaged stripe.js for cljsjs - have you also done anything with Stripe’s jquery.payment?

juhoteperi10:08:12

@cfleming: rwillig originally packaged it, I'm maintaining Cljsjs. I haven't used Stripe.

mfikes12:08:50

@oskarth: There are a few things that could end up in cljs.core. (CLJS-1426, CLJS-1427, CLJS-1428). Perhaps anything that is in planck.core that is imitating clojure.core could be a candidate for proposal to go into cljs.core. (So for example, with slurp you could imagine an associated *slurp-fn*, in a manner similar to the way I/O is currently handled for printing in cljs.core.)

mfikes12:08:20

@andre.richards: Interesting. If I can find such a machine, I can probably fix it.

andre.richards12:08:28

@mfikes sorry, I know nothing about Xcode/Objective C else I would have offered... If there is a way to get debug info to you, happy to help, but you would have to point me to some info how. I have Xcode installed. I don't think many people will be running 10.7 anymore, so not a high priority anyway...?

mfikes12:08:27

@andre.richards: I can make Planck show numeric dump info, but I’d like to have it show a “symbolicated” stack trace in that case. Let me see what I can do.

mfikes13:08:01

@donmullen: I it being used in a single app in the App Store, so I maintain it. But to be honest, I’m focused more on React Native style development these days.

donmullen13:08:52

OK - thanks. I saw the reagent/react-native video - is that your current focus?

mfikes13:08:04

@donmullen: Really for me, it is the Om / React Native combination, but essentially. yes. It leads to a functional style, IMHO, instead of mutating UIKit elements directly.

timgilbert14:08:20

Hey @atroche, did you make any progress generating an externs for material-UI?

tel15:08:41

Why is there no alter-var-root in cljs?

spinningtopsofdoom15:08:29

IIRC it's because vars in cljs are static

tel15:08:12

yeah, they are, but it’s not clear to me as to why

tel15:08:46

I mean, they’re going to be atop Js variables/properties which are about as dynamic as you like simple_smile

spinningtopsofdoom15:08:44

vars != variables they have richer semantics you'll take a code / perf hit

spinningtopsofdoom15:08:43

since the compiled JS goes through Google Closure producing an leaner runtime then Clojure on the JVM

spinningtopsofdoom15:08:40

It's basically a tradeoff between speed / code size of the compiled JS vs nicer runtime env. Clojure is looking at a similar lean runtime (http://dev.clojure.org/display/design/'Lean'+Runtime).

oskarth15:08:43

mfikes: ah I see, thanks! Is there a reason planck.core isn't imported upon planck startup?

mfikes15:08:25

@oskarth: I’ve been debating whether there is a suitable way to do that.

oskarth15:08:46

@mfikes: how about a standard dotfile with imports?

mfikes15:08:35

@oskarth: Hmm… is there an existing Clojure or ClojureScript convention for that? Or is that a shell thing?

oskarth15:08:26

@mfikes: I think lein has some option for this in the ~/lein/ directory

oskarth15:08:31

~/.lein/user.clj it seems like

escherize15:08:23

It's ~/.lein/profiles.clj iirc

escherize15:08:59

at least that's where it is on mine simple_smile

oskarth15:08:20

yeah you are right escherize, they changed from user to profile in lein2 or something I think

mfikes15:08:34

@oskarth: I wonder if that is similar in essence to repl-requires

mfikes15:08:13

@oskarth: What you really want is to be able freely use slurp in your code anywhere. (Not just at a REPL.)

oskarth15:08:39

mfikes: that's true. Anything that supports that use case (with possibility to turn it off, if perf is an issue) would be awesome

mfikes15:08:12

@oskarth: Some things like pp for example are automatically aliased into cljs.user.

aengelberg16:08:53

I've been writing an app using figwheel (none optimizations), and the first time I try :whitespace optimizations I get this in the developer console:

Uncaught Error: goog.require could not find: cljsjs.react

aengelberg16:08:58

Any ideas on how to diagnose?

aengelberg16:08:08

I'm using reagent 0.5.0 so I figured I don't need cljsjs.react as an explicit dependency

aengelberg17:08:51

nvm, a lein clean did the trick simple_smile

arohner18:08:19

@aengelberg: I’m pretty sure that’s not supposed to work

arohner18:08:45

I believe goog.require only works in :none

arohner18:08:00

whitespace compiles your app to a single file, so there’s nothing to require

arohner18:08:12

ah, I’m thinking of something else

aengelberg18:08:06

@arohner that's why I was confused. But lein clean worked, so maybe there were some spare compiler artifacts lying around from :none that got into the compiled js?

arohner18:08:26

yeah, sounds likely

peterschwarz19:08:23

As I’ve been having trouble with lein-cljsbuild and reader conditionals (it has some strange behavior), I’ve been trying to use the following in my project.clj:

:aliases {"cljs:test" ["trampoline" "run" "-m" "clojure.main/main" "build-tests.clj”]}
where my build-tests.clj file uses cljs.build.api to build things. This ends up failing due to not finding a dependency (in my case, core.async). Anyone tried/had any luck with this route? Me project as it stand now: https://github.com/peterschwarz/clj-gpio/tree/nodejs

peterschwarz19:08:34

For some context, working on running clj-gpio via ClojureScript on Node.js (JVM on Raspberry PI’s is a tad slow)

kamn19:08:34

@peterschwarz: Which Pi? I have been thinking of getting a Pi 2 and was wondering how it would do with the JVM

peterschwarz19:08:14

@kamn The Pi 2 is great and the JVM runs very well on it.

kamn19:08:20

Good to know. I will probably end up getting one then to run some of m projects on

timgilbert20:08:03

Hi all, my code is causing the cljs compiler to throw a Stack Overflow error, anything obvious I should try in order to get past it? (I’ve tried with 1.7.28 and 1.7.107)

darwin20:08:25

cyclic deps?

timgilbert20:08:02

Unfortunately it’s right after a big refactor and the code is huge so I can’t provide a sample ATM, will try to boil it down to a reproducable test case when I get more time

timgilbert20:08:13

Thanks @darwin, will look for that

timgilbert20:08:44

…don’t see an obvious way to TCO that

bhauman21:08:11

@timgilbert: do you have a circular dependency? That's probably what's causing the overflow.

atroche21:08:47

@timgilbert: i decided to use react-bootstrap instead, but there are some more chats about it here: https://gitter.im/tonsky/rum?at=55d65a51e3dd18904433ba83. looks like @currentoor is going to keep trying, though. do you have any ideas?

timgilbert22:08:35

@atroche, not offhand, was just hoping you had already integrated it. 😉 I’m currently using http://materializecss.com/ which is all jquery-based so it’s not the most natural fit with reagent, but it is usable

timgilbert22:08:45

I will check my code for circular dependencies and report back here in case anyone is interested. I have just been refactoring namespaces in my project, so it seems like a strong possibility. Thanks all.