Fork me on GitHub
#clojurescript
<
2016-02-09
>
elsehow05:02:15

what are the pros/cons of sente compared to chord?

jaen05:02:03

sente has long polling fallback

jaen05:02:47

also sente can run on immutant and clojure-nginx as well, doesn't require http-kit anymore

elsehow05:02:59

i see, so sente is more like a http://socket.io all-in-one solution, and chord is websocket specific

jaen05:02:40

Yeah, though it seems to have less problems than http://socket.io used to have

elsehow05:02:05

hopefully so, that is a low baseline c:

mbertheau08:02:26

It's so frustrating when clojurescript libraries are documented in the fashion "it's just like in clojure, with the following differences". Similar with clojure, when they expect Java knowledge.

jaen08:02:43

Well, it's a bit better since at least the languages are pretty similar.

jaen08:02:11

But yeah, it can be vexing - for example having to read transit-cljs, transit-cljs and transit-java to be sure you understand what it's doing completely.

mbertheau08:02:47

I try to add tests to some cljs code. adzerk-oss/boot-cljs-example has a test task, but it doesn't actually run the test that is in the source code. The example in crisptrutski/boot-cljs-test apparently uses a different test runner called doo. Can I use the cljs.test test runner?

jaen09:02:17

I've only tried this and it worked well - https://github.com/boot-cljs-test/testem-runner - don't know about other plugins; there's probably higher chance someone in #C053K90BR will know.

Pablo Fernandez09:02:37

Why isn’t there a resolve or ns-resolve in ClojureScript?

jaen09:02:45

IIRC there is

jaen09:02:49

Just at compile time

jaen09:02:36

You can't do it at runtime, because a) the compiler is not available, b) that wouldn't work with advanced optimisation - either code will break, or you will have to stop using that optimisation level

jaen09:02:48

But as I said, that will work only in during compilation (that is, macros).

Pablo Fernandez09:02:49

I have a circular dependency that I’m not sure how to resolve.

Pablo Fernandez09:02:10

I’m confused: No such namespace: cljs.analyzer.api. Why is it not finding it?

jaen09:02:02

It should. Are you sure your macro is in a clj file?

Pablo Fernandez09:02:57

Ah… nevermind. I haven’t implemented any macros, I was just accessing the file from clojurescript.

mobileink14:02:40

Hello, aot question here. I need to aot compile src/main/clojure/migae/servlets.clj to build/exploded-app/WEB-INF/classes. I've studied to docs on filesets and experimented but I'm stumped. I can't even get this to work: (core/deftask compile-clj "compile clj" [] (bi/aot :all))

dnolen14:02:48

@mobileink: is that a boot thing?

mobileink14:02:56

Not sure what you mean. I'm writing a boot module for google app engine development; does that answer your question?

mobileink14:02:14

oops !!! Sorry, thought I was on the boot channel (Slack newbie here)

martinklepsch14:02:18

@mobileink: maybe better asked in #C053K90BR

mobileink14:02:52

how embarrassing

meow14:02:39

I'm glad I've never, ever done anything the least bit embarassing on Slack ever. 😇 😎 💯

sander14:02:21

does anyone here have experience with using cljs on Meteor? there are some examples and blog posts from years ago, but i wonder whether it has become easier

spieden19:02:48

i found a lein plugin that helps with cache busting by substituting hashes for your compiled js into html files, but now i can’t find it again 🙁

spieden19:02:02

does anyone know of which i speak or have their own technique they like?

progzilla20:02:07

Has anyone tried leafletJS in ClojureScript before? I would appreciate some help..thanks

exupero20:02:27

@progzilla: I have, though it’s been a while.

progzilla20:02:39

oh awesome...ok. Am actually still growing in clojure. Did you encounter any major challenge...just asking before I go deep into using it

exupero20:02:05

None that I recall. I just used JS interop and it worked fine.

progzilla20:02:30

@exupero: thanks would consider that.

iwankaramazow20:02:42

If you specify code splitting in the project.clj is there a reason if no files appear (only main.js which contains everything)? E.g.

:compiler {:main portfolio.core
                           :asset-path "js/compiled/out"
                          ;; :output-to "resources/public/js/compiled/portfolio.js"
                           :output-dir "resources/public/js/compiled/out"
                           :modules {
                                     :index {
                                             :output-to "resources/public/js/compiled/index.js"
                                             :entries #{portfolio.containers.index}
                                             }
                                     :about {
                                             :output-to "resources/public/js/compiled/about.js"
                                             :entries #{portfolio.containers.about}}
                                     }
                           :source-map-timestamp true
                           :parallel-build true
                           :optimizations :advanced}}}}

iwankaramazow20:02:40

the resources/public/js/compiled contains main.js, not index.js or about.js

aria_22:02:19

What are your thoughts on Scala.js?

cjmurphy22:02:03

When I used Scala.js they were yet to have a React framework. I came to cljs from Scala.js. There seemed like a lot more ideas and maturity here. Lots more going on.

cjmurphy22:02:58

But Scala.js worked just fine. Do they even have a React framework now? I prefer ClojureScript the language as well as it trains you to be functional.

cjmurphy22:02:03

I was especially attracted to the ideas behind Om Next, as sort of a return to 4GL programming where the view the user interacts with comes directly from the database structure.

cjmurphy22:02:17

We used to talk in terms of master detail and lookup relationships. Now all joins.

cjmurphy22:02:17

At the time I was involved there wasn't much of a community either. I'm sure that will have expanded by now.

aria_22:02:47

Okay interesting. I’m relatively new to clojurescript so I was curious what scalajs had going for it that cljs didn’t

cjmurphy22:02:15

And too much wasted time with SBT. Lein (and boot) much better here.

cjmurphy22:02:42

Well its got types.

aria_22:02:40

I always hear a lot about types, but I never have had a chance to realize their value because I mostly program in JS

cjmurphy23:02:06

But I had to do terrible things (like write my own parser) as the data (its type structure) I was loading from the server changed. Much easier not to have types for that part.

cjmurphy23:02:32

I'm the opposite. But using a framework will make up in some ways for the lack of types.

aria_23:02:15

Alright thanks!

cjmurphy23:02:11

No problem. The comparison is kind of interesting I think. Will be interesting to see if Scala.js takes off. Seemed to be a fizzer wrt to people actually using it.

spieden23:02:18

@cjmurphy: i also came from scala and had my breaking point trying to model something with types one day

cjmurphy23:02:01

On the client or the server or inbetween?