Fork me on GitHub
#clojurescript
<
2016-08-10
>
manishkumarmdb05:08:26

@porglezomp: just look this examples, in this example i used production mode, also you can see results on development mode https://github.com/manishkumarmdb/cljsjs-interop-workshop

nilrecurring08:08:53

Hi! My cljsbuild has started hanging (i.e. not exiting) after successful compilation (and after applying optimization levels). Anyone ever stumbled on this?

tap08:08:00

Is is possible for you to share your cljsbuild config and build command you use?

nilrecurring08:08:27

@tap ofcourse! I'm using lein cljsbuild once min to build

nilrecurring08:08:47

with the following config:

:cljsbuild {:builds
              [{:id "min"
                :source-paths ["src"]
                :compiler {:output-to "resources/public/js/compiled/compiled.js"
                           :main mynamespace.core
                           :optimizations :simple
                           :verbose true
                           :pretty-print false}}]}

nilrecurring08:08:16

(edited out all the nonrelevant stuff)

nilrecurring08:08:30

(I'm doing lein do clean before building)

tap08:08:59

They look good to me so probably something else

nilrecurring08:08:00

I refactored some namespaces and yesterday wasn't working because the source-paths were wrong (so it had nothing to compile and "failed" silently). Now I honestly don't know what to do, because the config looks fine.

nilrecurring10:08:06

@tap I finally hunted it down with git bisect. It was a call to (flake/init!) in the clj backend namespace that made the cljs compiler hang, even if it was totally another source path (no overlapping). Is this a cljs compiler bug?

manishkumarmdb11:08:40

@nilrecurring: i think you'r using in development mode, so you should update :optimizations :simple to :none , because :none is the recommended setting for development.

nilrecurring11:08:03

@manishkumarmdb: if you read up we're talking about the production build, which I do with the "min" profile, and optimizations advanced (simple in the snipped I pasted because I was invastigating about where the issue was exactly)

nilrecurring11:08:26

In dev I use figwheel with no optimization of course

nilrecurring11:08:23

But the issue here is that the cljs compiler was looking into the clojure source path and hanging on that direct call to the flake init ^

nilrecurring11:08:46

While this shouldn't happen

sivakumargsk11:08:47

How to write this one in cljs

sivakumargsk11:08:49

"SivaKumar25689".match(/[A-Z][a-z]+|[0-9]+/g).join(" ")

sivakumargsk11:08:42

=> "Siva Kumar 25689"

sivakumargsk12:08:31

or how to split a string at Capital letter in clojure script

borkdude12:08:34

Has anyone used ClojureScript to program the Pebble watch?

darwin12:08:09

@borkdude: I haven’t personally, but pebble is quite memory constrained I think, 64kb only? they have a custom javascript engine and I don’t think cljs persistent data structures would play well in such memory constrained environment even with DCE

pesterhazy12:08:40

javascript in 64k. crazy

borkdude12:08:31

I didn't know it was that contrained

mfikes12:08:11

@sivakumargsk: (clojure.string/join " " (re-seq #"[A-Z][a-z]+|[0-9]+" "SivaKumar25689”)) works for your example

sivakumargsk12:08:02

@mfikes: thanks its working

jkrasnay13:08:14

Just getting started with spec and I’m getting the following error. Looks to me like cljs.spec/coll-of should indeed take a single arg.

jkrasnay13:08:19

Wrong number of args (1) passed to: spec/coll-of

  89  (s/def ::orig-pdf-blob-id (s/nilable string?))
  90
  91  (s/def ::pages (s/coll-of ::page))
                     ^--- Wrong number of args (1) passed to: spec/coll-of
  92  (s/def ::recipients (s/coll-of ::recipient))
  93  (s/def ::fields (s/coll-of ::field))

jkrasnay13:08:42

Anyone have an idea what’s going on?

dnolen13:08:05

@jkrasnay first problem - cljs.spec isn’t done yet

dnolen13:08:25

later when we have a release at parity with Clojure we can take feedback about problems

jkrasnay13:08:34

Ah, that would explain it. Thanks!

borkdude14:08:12

@anmonteiro: very cool, thanks for the blog - I didn't know clojurescript supported use though

mac19:08:07

@martinklepsch: Starts with eval and goes downhill from there.

dnolen21:08:57

I just cut 1.9.183 it’s mostly for testing purposes especially getting cljs.spec in sync with Clojure 1.9.0-alpha10, please give it a spin when you get a chance

dnolen21:08:25

would like to cut an official release by Friday - so looking for show stopping issues