Fork me on GitHub
#clojurescript
<
2017-08-22
>
anmonteiro03:08:03

just tested locally and react-dnd “just works”

coetry05:08:18

I’m trying to play with http-kit from planck and am running this command to add it to my classpath, but I’m getting an error

coetry05:08:27

boot --dependencies org.clojars.micha/boot-cp --dependencies http-kit "2.2.0" with-cp -w --file .classpath

coetry05:08:42

java.lang.IllegalStateException: with-cp already refers to: #'boot.task.built-in/with-cp in namespace: boot.user
     clojure.lang.ExceptionInfo: with-cp already refers to: #'boot.task.built-in/with-cp in namespace: boot.user
    file: "/var/folders/hm/cj8702kn7g58hz0v33mppl3c0000gn/T/boot.user4358301752709614093.clj"
    line: 1

coetry05:08:08

ohhh, i should skip the first --dependencies because its built in right?

andrea.crotti11:08:23

I realised that there are many ways to include something like bootstrap in my project

andrea.crotti11:08:32

I had simply included the "//maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" in my index.html file

andrea.crotti11:08:57

but then I found out about webjars, and also many other packages that package bootstrap-react

andrea.crotti12:08:14

I guess including it in index.html is not great since it means always needing a connection right, but what's the advantage of https://github.com/luxbock/bootstrap-cljs for example over bootstrap from https://www.webjars.org/ ?

andrea.crotti12:08:38

is it just being able to modify bootstrap classes and similar things dynamically maybe?

mac12:08:22

Any idea why I would get Exception in thread "main" java.lang.NoClassDefFoundError: clojure/tools/logging/impl/LoggerFactory when trying to do lein repl in a cljs project?

konato13:08:22

react-navigation

axl31614:08:44

Hi! I'm a newbie to Clojurescript.. can someone point me to a good resource on quickly learning Clojurescript and Reagent?.. I've worked with clojure, JavaScript, react and eventually want to use reframe to build my web app

wilkerlucio14:08:57

CLJS does translate function names like some-fn* to some_fnSTAR, can I use the function that does this translation? is that available at runtime?

gardnervickers16:08:53

Hello, I’m attempting to upgrade our clojurescript version but for any version past 1.9.562 I no longer see warnings when using (set! *warn-on-infer* true). I noticed that it’s meant to be scoped to a file, so I’ve placed it in each file where we use foreign JS libs but when compiling I don’t see warnings. I am able to specify inference hints though and they do make it into my generated externs file. Anyone run into anything similar?

hlolli16:08:20

this is a snippet from instaparse, could this be a issue with the clojurescript reader?

(def inside-comment #?(:clj #"(?s)(?:(?!(?:\(\*|\*\))).)*(?x) #Comment text"
                       :cljs #"(?:(?!(?:\(\*|\*\)))[\s\S])*"))
causes
instaparse.cfg=> :cljs
#"(?:(?!(?:\(\*|\*\)))[\s\S])*"
Unmatched delimiter ).
but
(def inside-comment #"(?:(?!(?:\(\*|\*\)))[\s\S])*")
works.

aengelberg16:08:50

try evaluating just #"(?:(?!(?:\(\*|\*\)))[\s\S])*" in the repl, not :cljs #"(?:(?!(?:\(\*|\*\)))[\s\S])*"

hlolli16:08:32

yes that works. Im attempting to make it run in lumo at the moment, so in my case clj compatability is not needed.

misha19:08:31

Does anyone have a recommendation for a twilio/video api wrapper, or whether I even need one? Context: video calls in react native app. Should one even bother with their js api, or should I accept I'd have to write it in swift?

mikethompson21:08:09

See also the #reagent channel

ingesol22:08:46

I'm trying to compile ES6 style javascript with imports in the CLJS compiler. Is stuff like this supposed to work?

ingesol22:08:59

import React from 'react'; export var main = function() { console.log("This is my JSX component: " + <div/>); };

ingesol22:08:50

Getting the following error: goog.require could not find: module$react

anmonteiro22:08:19

@ingesol yes that can be made to work, can you show me your compiler options?

ingesol22:08:07

{:main splort.core :closure-defines {process.env/NODE_ENV "development"} :npm-deps {:react "15.6.1" :react-dom "15.6.1"} :install-deps true :foreign-libs [{:file "js" :module-type :es6 :preprocess cljsjs.babel-standalone/transform}] :asset-path "js/compiled/out" :output-to "resources/public/js/compiled/splort.js" :output-dir "resources/public/js/compiled/out" :source-map-timestamp true}

ingesol22:08:59

I'm running this through figwheel by the way, testing how figwheel/cljsbuild/closure performs as a pure JS build tool

anmonteiro22:08:40

looks good to me, what CLJS version are you trying this with?

ingesol22:08:08

So imports are supposed to work in project JS files compiled through cljsbuild. I can see that react folder is in my node_modules.

anmonteiro22:08:59

@ingesol thanks for bringing this up

anmonteiro22:08:09

I think we can make this work in CLJS but it currently doesn’t

anmonteiro22:08:18

I’ll work on a patch tonight

juhoteperi22:08:40

I think we currently find the needed npm modules from only .cljs sources

anmonteiro22:08:50

hah, that would make sense

juhoteperi22:08:11

It could (or maybe it does?) look at closure JS

anmonteiro22:08:13

trying that now

juhoteperi22:08:34

but it is probably problematic to check for npm modules that are only used by other JS files that are going to be processed?

ingesol22:08:47

Ok, that's what i suspected. So currently the required/imported JS must be required from CLJS to work

anmonteiro22:08:26

@juhoteperi there might be another bug here

anmonteiro22:08:37

it doesn’t work even if I also require react in CLJS

juhoteperi22:08:18

Could be related to Closure node dependency resolution also, I think there were some difficulties there to resolve files from different "roots"

anmonteiro22:08:50

let me try that

juhoteperi22:08:22

If the JS was inside node_modules/foo, Closure should be able to resolve the dep. Maybe.

ingesol22:08:14

Thanks for looking into this! I'm writing a blog post about "Leiningen as a JS build tool", but it's much less interesting without JS imports.

anmonteiro22:08:55

@juhoteperi I actually think that module roots doesn’t really matter in this case

anmonteiro22:08:42

I’m just puzzled that this doesn’t work, given that my mental model is that we’re passing all the dependencies along when processing these modules