This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # atlanta-clojurians (1)
- # beginners (148)
- # boot (13)
- # capetown (1)
- # cider (38)
- # cljs-dev (92)
- # clojure (61)
- # clojure-brasil (1)
- # clojure-dev (6)
- # clojure-italy (21)
- # clojure-losangeles (1)
- # clojure-nl (7)
- # clojure-norway (20)
- # clojure-spec (70)
- # clojure-uk (64)
- # clojurescript (69)
- # core-async (11)
- # cursive (6)
- # data-science (2)
- # datomic (50)
- # docker (2)
- # duct (12)
- # figwheel (1)
- # fulcro (81)
- # graphql (19)
- # jobs (3)
- # jobs-discuss (44)
- # keechma (1)
- # leiningen (1)
- # mount (2)
- # off-topic (10)
- # onyx (19)
- # parinfer (3)
- # portkey (6)
- # re-frame (4)
- # reagent (145)
- # reitit (1)
- # ring (1)
- # ring-swagger (2)
- # specter (1)
- # sql (4)
- # tools-deps (43)
- # unrepl (29)
- # vim (1)
I'm trying to follow the new version of the ClojureScript Quick Start guide at https://github.com/clojure/clojurescript-site/blob/96cdf27ff1a2a836ae4f7c706e48a0bff21e95a0/content/guides/quick-start.adoc, but I get the following error after issuing
clj --main cljs.main --compile hello-world.core --repl:
Which I believe is due to the fact that I'm running this inside a Docker container. I have tried to look at the official guide and reference on http://clojure.org and the
Compiling client js ... Serving HTTP on localhost port 9000 Listening for browser REPL connect ... Exception in thread "main" java.awt.AWTError: Assistive Technology not found: org.GNOME.Accessibility.AtkWrapper
clj --helpoutput but nowhere I've found a mention on how to make it not try to launch the browser automatically (headless).
Hmm.. I guess the problem is that I'm specifically asking for a
--repl and in the context it seems to take for granted that it is a browser repl.
Yeah, I just assumed it would have the option to open the browser myself like lein. Thanks @john.
I’ve noticed you asking docker questions here and in #docker, and honestly I recommend running the development tools directly on your machine at least until you’ve worked through the quickstart and have some experience with the toolchain. Then when you come back to running things in Docker you’ll at least know what it looks like when things work as they should.
Thanks @gonewest818, I'll take that into account. I've had the tools locally for a long time, and have been in and out of Docker, so I'm forcing myself to go the hard way and figure how things would work with Docker now that I need to co-op with a friend who is also learning.
No, haven't tried that. Just trying to build a simple cljs setup that I can share with my friend.
Clojure tooling in general have posed as hard obstacles to me (no programming background), even more than the language, so trying to understand what the new tools are doing that may facilitate things my way.
Nice, well I doubt many have treaded your ground, with this trifecta of docker, clj tool and the new cljs.main, so it'd be interesting to read up on your experiences.
I must write about it indeed. I believe the language itself is very appealing to someone who likes elegance and minimalism in code. Front-end developers trying to learn back-end or reactive front-end, especially those who study alone, have a tendency to find the ground in the CLJ/CLJS community really tough because people have a really robust background here. I'm still learning but I'm figuring things out at a faster pace now, maybe it can help others in a similar situation.
We've discussed a bit about this in the new #programming-beginners channel. How the language feels just right and gives us a lot of "wow" moments, but the tooling and the ecosystem are still really harsh for non-programmers.
The tooling is still evolving towards becoming as easy and elegant as the language itself.
This new guide is very refreshing and simple compared with most others. I guess the mindset in the community is going the right way and that feels awesome.
@dnolen @mfikes so this doesn't seem right to me
(let [v-1 1 v_1 2] [v-1 v_1]) => [2 2], ran across it here https://mastodon.social/@Treppenwitz/99677541702540966
Same complexity... The right approach is to store "starting ns + bindings" munged in a separate set. That'd also speed up compilation (possibly by a lot).
Related: Personally, I want to push to emit ES6
let instead of
vars all over the place. Would make this at least fail fast instead of fail silently. And would simplify the compiler a bit, generate faster + smaller code (so: Many wins)
wow i’m surprised that is consider minor defect. it’s the kind of maddening thing that could burn a ton of time.
yeah it's not obvious behavior by any means, and most people coming to Clojure are likely to be used to using
_ instead of
-. I've seen people mix the two commonly as they transition to using dashes.
@danielcompton No but you can just emit code that checks them (with
identical? probably) and rely on DCE
thanks, I thought that might have been the case. Makes the macro a bit trickier to write
In a cljs node repl, I can require node modules easily, but when I try to require a namespace that requires node modules, it can't find them. (The error message also seems like the quotes are removed from the require.) Any ideas?
I don't get
java.lang.AssertionError: Assert failed: cljs.analyzer/foreign-dep? expected symbol got "non-existant" (symbol? dep)
when requiring the namespace.
Similarly calling load-file through emacs doesn't work, but manually evaluating the ns form of the dependency file then the ns form of first file (which refers the the other namespace) works.
If I manually call
(require '["module"]) for each of the modules from the
cljs.user namespace, I can then require the namespace that requires them.
Perhaps this has something to do with my using a boot repl since it runs from cache folders?
I am printing
:testing-contexts it in a
defmulti but it always seems to be empty
This is driving me crazy. Apparently the node cljs repl supports importing arbitrary modules from node_modules via
require, however it doesn't when loading a file (typically by requiring a namespace that requires a module).
@ghopper first thing I would do is check that this works with ClojureScript itself to eliminate other variables
@dnolen Check that what works with ClojureScript? As in no in building instead of a repl?
@dnolen Oh, I am directly running
cljs.repl/repl, if that's what you're saying. Along with a
cljs.build.api/build prior to it with the same
:output-dir. (I'm still not sure how this works)
I'm putting together an example project now.
if there’s a minimal case where the REPL won’t load some node modules then just report that
@dnolen How should multi-file clojurescript issues be formatted and where should they be submitted?
As a Github issue? I'm not seeing an issues link as with most projects, and
/issues takes me to pull requests.