This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-08-31
Channels
- # aleph (38)
- # beginners (91)
- # boot (4)
- # cider (20)
- # clara (11)
- # cljs-dev (4)
- # clojure (179)
- # clojure-greece (1)
- # clojure-italy (16)
- # clojure-portugal (1)
- # clojure-russia (1)
- # clojure-sanfrancisco (1)
- # clojure-spec (183)
- # clojure-uk (50)
- # clojurescript (111)
- # core-async (24)
- # cursive (4)
- # datascript (11)
- # datomic (29)
- # fulcro (120)
- # gorilla (2)
- # jobs (1)
- # keechma (2)
- # keyboards (26)
- # leiningen (4)
- # luminus (7)
- # lumo (15)
- # off-topic (2)
- # onyx (31)
- # parinfer (12)
- # portkey (1)
- # protorepl (1)
- # re-frame (50)
- # reagent (106)
- # remote-jobs (1)
- # ring-swagger (2)
- # rum (10)
- # spacemacs (17)
- # sql (16)
- # test-check (1)
- # yada (2)
@lxsameer React works there’s nothing really the matter with it and React Native would take a lot effort. It’s not a complicated choice IMO.
@lxsameer @dnolen On the other hand I've heard news about React's license gotcha (example analysis: https://medium.com/@dwalsh.sdlr/react-facebook-and-the-revokable-patent-license-why-its-a-paper-25c40c50b562 ) and this may drive some people to seek alternatives (whether you agree with them or not) :thinking_face:
Yeah I heard about those problems. Some people moved to preact because of that and I think it would be awesome to reagent and om if they can use preact under the hood as well
but as @dnolen mentioned RN is another important concern. To be honest I can picture clojurescript community to have a pure cljs vdom and react alternative but reinventing RN would be a huge pain
@lxsameer I made one with pure ClojureScript called Respo http://respo.site but it lacks some features to make it really useful in old browsers.
The nice part is I can implement the virtual DOM with persistent data structure thus it reuses old virtual DOM tree well. But I'm not sure if it can perform better in performance.
I want to have some simple way to edit html for the website for my girlfriend, I found this https://github.com/Alex-D/Trumbowyg/blob/develop/src/trumbowyg.js which seems to do what I need, and also I already am using jquery. I’m just in doubt whether to try to rewrite it into clojurescript or not. It would make it easier to do things like saving the data, otherwize I would have to get the data back from the dom again, which is also not a big problem. Has anobody experience with converting js to clojurescript?
How to add 3rd party react native library like react-native-material-design in cljs project made with expo using lein new exponent proj-name.?
does anyone know what changed in recent Clojurescript versions that makes js/process
evaluate to #js {:env #js {:NODE_ENV development}}
under e.g. Phantom? Used to be nil under 1.9.562
@dm3 set :process-shim false
@anmonteiro thanks! Pardon my ignorance, but how is that flag useful?
@dm3 when processing JS modules through Closure we need to emulate the Node runtime
Where certain libraries dispatch on production vs development
Using process.env.NODE_ENV
what’s then the future-proof way to check if js/process
is usable? E.g. I have to determine whether to use process.nextTick
or goog.async/nextTick
in a library.
People shouldn't be using the process shim in Node
Or any env that exports process
This may need more education/docs
I have a package that uses foreign-libs and :optimization :simple
; when I use it from another project it works well in dev-mode, but with release (`:optimization :advanced`) it fails.
but saying it “fails” is skipping a lot of useful information for someone else to help you 🙂
I’ve created an externs-file, but there might be some issue with it that I’m not qualified to see
you can recover the original name by using :pseudo-names true
, make it look nicer with :pretty-print true
@hkjels yes, if you haven’t looked a this yet - this is required reading https://developers.google.com/closure/compiler/docs/api-tutorial3
not just methods, any properties that come from some foreign thing Closure Compiler will never see
@hkjels ^ FWIW this is the big selling point of the new NPM module support
before: we prepend foreign JS libs to the output of Closure advanced compilation
after (now!): Closure sees processed JS modules and in some cases doesn’t need externs
I think I’m hitting an issue with the particular thing I’m trying to mangle. When I use an extern instead of :infer-extern
I get SEVERE: ERROR - Duplicate extern input
that error doesn’t have anything to do with :infer-externs
(unless you can demonstrate something minimal that shows that)
so if that somehow appears in multiple places on the classpath, you will pass dupes to Closure
(.. (Thread/currentThread) (getContextClassLoader) (getResources "js/signal-r.ext.js"))
(In a Clojure REPL)
if that’s not it then you could debug this by calling in cljs.closure/get-upstream-deps*
at a REPL and seeing what got duped
you need to have source-path both in source-path and resource-path, but having the extern in both places messes it up
it’s not logical to me and I’m kind of not using the features of boot, so I think I’ll stick with leiningen for most of my clojure-needs from now on
only thing in favor, is that I can compile garden along with clojurescript with a single command
I'm using :preloads
to monkey-patch createClass
onto React v16
this works perfectly in dev mode, but not in advanced. Is there any proper solution for this, short of forking cljsjs.react
?
A "fun" windows path problem here: https://github.com/funcool/promesa/issues/52#issuecomment-326366789
I'd expect the same thing as for :none
something that is ordered, as if required before requiring any app namespace
so obviously, you don't see a problem in designing such a flag, but you don't want to promise behavior and support it, right? so that means, that you think it's a worthless use case?
ayup, that's gonna be trouble 🙂 https://github.com/clojure/clojurescript/blob/f5af28f814896d3a538cba717331b651a5ef9239/src/main/clojure/cljs/compiler.cljc#L1118
funnily, this is only going to fail for deps that have a first letter that correspond with an ascii control char
@dnolen I will, just spelunking a bit. All the fancy module stuff is new since I've been in here
@dnolen that I haven't been filing tickets and otherwise causing a ruckus is mostly just a sign that you and the team have been doing good work 😄
for anyone following along: https://dev.clojure.org/jira/browse/CLJS-2345