This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-09-25
Channels
- # aleph (15)
- # beginners (65)
- # boot (46)
- # chestnut (3)
- # cider (1)
- # clara (11)
- # cljs-dev (5)
- # cljsjs (4)
- # cljsrn (13)
- # clojure (180)
- # clojure-dev (2)
- # clojure-italy (10)
- # clojure-russia (62)
- # clojure-spec (6)
- # clojure-uk (85)
- # clojurescript (45)
- # community-development (11)
- # crypto (3)
- # cursive (10)
- # datomic (94)
- # defnpodcast (2)
- # fulcro (4)
- # heroku (1)
- # hoplon (4)
- # jobs (3)
- # juxt (10)
- # leiningen (1)
- # luminus (4)
- # mount (13)
- # music (1)
- # off-topic (10)
- # onyx (2)
- # portkey (15)
- # proton (2)
- # re-frame (16)
- # reagent (10)
- # shadow-cljs (194)
- # spacemacs (2)
- # specter (2)
@bolasblack make-browser-overrides
is new, will fix. it doesn’t support "foo":false
yet which is used to “ignore” certain require
calls in the browser
@bolasblack do you know which npm package caused that error? need to find a package I can test my fix with 😛
I think aws-sdk
caused this issue
And I got another exception:
package airtable tries to map request but it doesn't exist
{:from "request", :to "xhr", :package-name "airtable"}
ExceptionInfo: package airtable tries to map request but it doesn't exist
clojure.core/ex-info (core.clj:4725)
clojure.core/ex-info (core.clj:4725)
shadow.build.npm/make-browser-overrides/fn--19590 (npm.clj:33)
clojure.core/fn--7874/fn--7876 (core.clj:6716)
I'm trying to use the package airtable
in nodejs, and current shadow-cljs.edn
:target
is :npm-module
@bolasblack I think I fixed that, I’ll make a release now so you can test it
"browser": {
"lib/aws.js": "./lib/browser.js",
"fs": false,
"./global.js": "./browser.js",
"./lib/node_loader.js": "./lib/browser_loader.js"
},
Hi thheller, https://github.com/bolasblack/airtable-notifier-temp this is the example project. I'm trying to create a project runing on nodejs, check records changing in Airtable per minutes
I tried 2.0.0-alpha8
, and get the error:
java.lang.AssertionError: Assert failed: (cljs-util/is-file-instance? cache-root)
at shadow.cljs.devtools.config$make_cache_dir.invokeStatic(config.clj:112)
at shadow.cljs.devtools.config$make_cache_dir.invoke(config.clj:112)
at shadow.cljs.devtools.server.worker.impl$build_configure.invokeStatic(impl.clj:116)
at shadow.cljs.devtools.server.worker.impl$build_configure.invoke(impl.clj:90)
at shadow.cljs.devtools.server.worker.impl$fn__21954.invokeStatic(impl.clj:207)
at shadow.cljs.devtools.server.worker.impl$fn__21954.invoke(impl.clj:199)
at clojure.lang.MultiFn.invoke(MultiFn.java:233)
at shadow.cljs.devtools.server.util$server_thread$fn__21838$fn__21839$fn__21843.invoke(util.clj:159)
at shadow.cljs.devtools.server.util$server_thread$fn__21838$fn__21839.invoke(util.clj:158)
at shadow.cljs.devtools.server.util$server_thread$fn__21838.invoke(util.clj:143)
at clojure.core.async$thread_call$fn__7981.invoke(async.clj:442)
at clojure.lang.AFn.run(AFn.java:22)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:748)
do you think it's possible that we bundle ClojureScript projects with a shared library called clojure-x.x.x.js
and put this file in CDN?
if people are building multiple page websites, they can share this library without bundling it into each project
meanwhile, there might be people who want to try ClojureScript as a part of project, like using :target :npm-module
.
not sure about this part, but we have to make sure when he imports the package, he does not require ClojureScript multiple times
@jiyinyiyong this would only be possible without :advanced
optimizations …
in CLJS for :browser
target you can :modules {:shared {:entries [cljs.core]} :page-a {:entries [app.page-a] :depends-on #{:shared}}, ...}
but no you cannot create something like jquery.js
that is included in every project and never changed
well you could with a whole bunch of effort and sacrificing :advanced
.. so not sure that would be worth anything
:thinking_face: getting more and more confused about scaling ClojureScript into multiple pages
if we have a solution for hosting ClojureScript libraries on CDN, that would be another factor to convince others of using ClojureScript. Anyway...
but if some has like 10 websites, each using ClojureScript, what's the best solution to reduce the bundle sizes?
also your-site/cljs.js
will only contain code that your-site
uses. so no useless code is executed
don’t think that something is the best solution in the world only because the JS world is doing it
btw. google is using the closure compiler for pretty much all their public projects. I think they know a thing or two about optimizing download sizes
it seems that there will be multiple versions of runtime library, if the code are precompiled to js or somehow
I really don’t understand what problem you are trying to solve. is there an actual problem you have right now that is not just theoretical?
when I'm learning new things, I just want to use my old technology and try if it works well.. and I'm not alone.
it is absolutely true that CLJS (and shadow-cljs) needs better documentation for these topics
its just rare to find someone that has experience with the JS solutions and the CLJS ones
I was using CoffeeScript too, it's like in Shanghai there's only one company choosing CoffeeScript as primary language. Now no company...
Not only one company, the company I'm working for is also worked with CoffeeScript as the main programming language in backend and frontend. After nodejs 6.x and react, we start use JavaScript because of ES6 feature
I only used it because I was doing ruby at the time and coffeescript looked more like ruby than JS
before that I learnt to write scripts in Python. learnt C in classes also but never really know how to use it.
well it took me a couple of years to unlearn some crap, wish I started functional earlier 🙂
I'm not sure if you hate on the same parts of OOP as I do... I don't know much about OOP, although heard a lot.
I feel the most when people say Redux is so complicated. and I think it should not be like that.
oh, just old topic, actually someone told me he wants to use ClojureScript in his project, partially. and I recommended shadow-cljs somehow...
I see whenever someones “stars” shadow-cljs
on github … most of the people are from your region
just have to finish the JS integration story since that has been bothering me for quite a while now
well since day #1 but cljsjs was a good enough fix for me since I basically only used cljsjs.react
yeah … good because you learn how everything works .. bad because it takes way too much time from doing actual useful stuff 😉
even though it's good to learn things in detail, but there are too many things to learn, and working in a startup company in my age, I feel not good
lots of code on npm is also written by inexperienced coders, so sometimes their solution may not be “good” either
I know that, many js programmers do not have computer science background. I'm one of them.
I have no formal education either … I learned programming by reading a book when I was 14 or so
I still don’t know how to program really .. always amazed why anything works at all 😉
I was learning math, but felt so boring, and taught myself using Linux and creating webpages.
https://twitter.com/jcsrb/status/807242764438138884 thats how I started programming 😉
Not only one company, the company I'm working for is also worked with CoffeeScript as the main programming language in backend and frontend. After nodejs 6.x and react, we start use JavaScript because of ES6 feature