Fork me on GitHub

What is the fastest and or most appropriate way to parse strings to integers in cljs? cljs.reader/read-string or js/parseInt?


(defn parse-int [x]
  (let [n (js/parseInt x)]
    (if (js/isNaN n) nil n)))


@pesterhazy: Thanks! Any rationale?


well that uses the function provided by the runtime, which is written in C++ presumably


(js/parseInt x 10) - is better


when I write on js I’m use unary plus)


these two should really be added to the cljs stdlib:

(defn parse-int [x]
  (let [n (js/parseInt x 10)]
    (if (js/isNaN n) nil n)))

(defn parse-date [d]
  (let [date (js/Date.parse d)]
    (if (js/isNaN date) nil (js/Date. date))))


I'm pretty sure every cljs developers has written a version of these before


you could write it with if-let to eliminate some code...


(if-let [date (js…)] date nil)


I i’ve seen isNaN. Sorry.


@turbopape: yeah unfortunately NaN is truthy


I want to use the :modules option in the cljs compiler in order to use web workers in my app (I want to have one module with my main app code, and a separate one for the workers). The problem is that my main app has many many namesapces. Do I have to list them all in the entries of the main module or is there a way around it?


@ashercoren: if you are using the standard cljs :modules you will probably need a lot of tweaks for web workers


but you'll only need to list namespaces that you want to be reachable from the "outside" (eg. HTML)


the rest should be managed via their requires


@thheller: I understand that you have a better idea for web workers, other than the standard :modules. Can you elaborate on that?


Well not a better idea, just a different implementation of :modules


shadow-build only injects some setup code to make it easier to work with the worker


so it can share as much code as possible with the normal app


all it does basically is to inject some importScripts statements at the top


cljs itself does not do this


tried to outline how it works in the google group


I saw that thread, and was trying to work with it before realizing it was using shadow-build. Does it require much change to use that instead of the regular cljs?


well it is more of a replacement for figwheel or cljsbuild


it still uses all of normal cljs under the hood


except for the build related stuff


so yes, big change if you are used to other tools 😉


but not on the cljs code side


main problem with cljs :modules is that they aren't supported for :none


Thank you. I will give it a try. Where is a good place to start? Some tutorial?


well, clone the example repo and modify it for your needs and ask questions I guess


I'm horrible at writing docs since I never know what to write


Guys, I have a noobie question) What methods have cljs to work with numbers? Like js/Math


@savelichalex: what do you mean by working with numbers?


sqrt, abs etc...


thats all in js/Math


I thought cljs has his own methods...


don't think there are, they'd probably just call the js/Math ones anyways


does cljs have a different stdlib than clojure.core?


some differences, but mostly the same


goog namespace, isn’t it?


goog is closure stuff, no counterpart in clojure


sorry for the noob questions - but where is that stuff documented? my googling isn’t finding anything...


what do you want to know? 😛


just want to read through the cljs.core documentation


I don't know why this isn't more widely known


Also @ryanguill there is to check out, quickly accessible Repl with a doc panel


The doc is taken from cljs-api-info btw ;)


Not sure if this is a bug or just a weird edge case: I am accessing variables that are defined within an iframe. When I call object? on them, it does a check (identical? (.-constructor my-variable) js/Object) which returns false. This is because js/Object is not the same as my-iframe.contentWindow.Object. I can just do the identical check myself against the iframe's Object, but it seems weird that object? returns false for something that clearly is an object.


@jmmk that Object is from a different context, we’re not going to make that work, object? is meant to be a fast check


use goog.typeOf if you need to check things across JS contexts


@dnolen thanks, will take a look at that


favorited the api docs, every lib should be written like that, resolved almost all my questions since i've been trying to wrap my head around


hi, does clojure.spec work with clojurescript yet?


@johanatan: cljs.spec is impemented in ClojureScript master, just not available in a release yet


@dnolen: ahh, ok. what's the ETA on the next release from master?


@johanatan: sometime this week, probably by Friday


however people are always encouraged to build master themselves and give things a spin


the best way to find bugs before a release goes out


hey, I'm trying to generate data with cljs.spec, I added the test.check dependency and tried to use it, I'm getting this error: #object[TypeError TypeError: Cannot read property 'check' of undefined]


@dnolen: is there a guide on how to do that? i've never done it before


had anyone had success generating data from specs in cljs?


@dnolen: oh, wow! that looks incredibly easy. thx!


@wilkerlucio: yes, but you need to include the test.check dependency and you need to require before trying anything


@dnolen: I added the [org.clojure/test.check "0.9.0"] dependency and the require to [clojure.test.check], is there something else?


I think just requiring clojure.test.check isn’t enough


clojure.test.check.generators &


I’ve been pondering how to make this a bit simpler but we can’t really do runtime require like clojure.spec does so I haven’t come up with anything satisfactory yet


something to sort out before the release


@dnolen: thanks, adding those requires made the trick 🙂


looking into making this nicer today we’ll see what I come up with


Evidently clojure.test.check is sufficient for this use of s/exercise:

cljs.user=> (require '[cljs.spec :as s] 'clojure.test.check)
cljs.user=> (s/def ::even (s/and integer? even?))
cljs.user=> (s/exercise ::even 1)
([0 0])


Is there an easy way to make cljs-bootstrap accept multi-line input? At least in the version running at if I start typing a map and hit return before finishing it I get an error.


@lspector: check, I assure you we have multi-line 😉


Ooo -- I see that shift-return works


And mult-line paste works, even with regular returns in ther -- great!


Thanks @richiardiandrea I'll check that if I get stuck again


@lspector: Another advantage of is that it is running a newer version. is running a version that existed right after bootstrap ClojureScript was created. We’ve fixed a lot of stuff since then.


@richiardiandrea: 👍 to you and the others behind I see it has improvements including tab completion!


Thanks Mike, we are doing our best ;)


It has been an engaging OSS project to contribute to


@mfikes: thanks. Interesting. I'm new here though and confused. Any orientation you can provide would be greatly appreciated. My real goal is to run a simple terminal-based app in a web page on my site. I don't really need a full REPL for this but if I have a REPL then I can easily do what I want... So I was thinking of following the instructions at to get a page running a REPL working and then figuring out where I can stick my code that will change the normal REPL loop to my terminal-based program. Should I be using something at rather than following the cljs-bootstrap instructions? As is probably obvious I'm not at all a javascript/web programer, although I've been writing Clojure for 6 years and programming much longer...


@lspector: I’m the wrong guy to answer those questions. I suspect the terminal handling aspects of these web-based REPLs is a bit disconnected from what it means to be a bootstrapped ClojureScript REPL.


@mfikes: Thanks... Not sure what that means though 😕. But I appreciate the effort and I'll try to figure something out.


@lspector: There’s the concept of “being a terminal”: accepting keystrokes, printing output, etc. Many of the web-based ClojureScript REPLs actually accomplish that using techniques that differ from the stuff needed to take a ClojureScript form, evaluate it, and turn it into a result that can be printed (the bootstrapped ClojureScript aspect). The web REPLs hook both together.


@mfikes: I think that helps. I guess I only need the "being a terminal" part of this, and I'm looking for the simplest way to make that happen, so that a pure Clojure terminal-based program can be run on a web page in a terminal-like field (by a person who knows Clojure but not Javascript or web programming).


@lspector: If your Clojure-based app can be compiled as ClojureScript, you can then essentially compile it all down to JavaScript to be run directly in the broswer. If you can get away with it, there may be no need for the bootstrapped aspect (which gives you the capability of compiling / evaluating ClojureScript in the browser, but at the cost of carrying along the entire ClojureScript compiler into the browser, and precluding the ability to minimize the JavaScript code size using :advanced option of the Google Closure compler).


@lspector: Say, for example, if you wrote a text-based adventure in Clojure.


@mfikes: I think I could indeed get away with that... but the rub is that I don't know how to "essentially compile it all down to JavaScript to be run directly in the broswer."


A text-adventure game is a perfect example. Suppose I have one, that runs in Clojure with a loop that calls read and println, and I can run it in a terminal on my machine via lein run, and I've ensured that everything also runs in cljs (maybe with a couple of substitutions). Then: How do I get that running in a web page?


@lspector: maybe replumb can help in evaluating the instructions, a "terminal-based app" in a browser will maybe mean that you will need to send commands over the wire


Well, if @lspector’s app is self-contained, it could concievably be compiled as ClojureScript.


To make it simple, lets say your program reverses strings that you type in.


@richiardiandrea: Sounds interesting but there's a lot there that I don't understand and I think is more complicated than what I need.


You want to have a “terminal" in the web page to let someone type in a string. You want to then pass that to your ClojureScript code to apply its functionality to the string. And then you want to put the result back in the “terminal”.


@mfikes: Yes, string reversal is also a great example. If I could do that in a terminal-like environment (which can take multi-line input) then I'd be in great shape.


yeah true that, just brainstorming based on a terminal-app that runs in the browser 😄


Right, you don’t need boostrap for that. You just need some terminal capability and your ClojureScript code compiled down to JavaScript.


You could probably even write your terminal code using ClojureScript, but I suspect there are JavaScript things that let you do that.


@richiardiandrea: didn’t write its terminal window code in ClojureScript, right?


Then I will substitute more interesting functionality in place of string reversal.... In the application I currently want to use this for the functionality will be some fancy mathematical inference (finding terms that perform specified operations on finite algebras), but yes, this could be used also for text adventure games, and lots of other things beginners would want to do... and which I want to do, for example letting users run evolutionary searches to solve computational problems... all of which requires only a simple terminal for interaction...


well it could have, but we use the tested CodeMirror


as Mike said, I think that if you want just to "drive" from the terminal you probably don't need bootstrap...bootstrap allows you to compile AND eval clojurescript in a JavaScript environment, that's it


so if you have the requirement that you need to evaluate (+ 1 2) in the browser, with no interaction with a server, wanting all client side, then you use bootstrap


Here is one: Look at the example JavaScript code. You get a command string. You can pass this command to your ClojureScript, and then take the result and call term.echo() with the resulting string.


Thanks @richiardiandrea. I agree that I don't really need bootstrap. I think that what I do need is probably so simple and obvious to most people here that it doesn't seem worth saying, but FWIW I still have a big gap about how to get my pure Clojure/script terminal-based thing running in a web page.


They’ve hooked evaluation into window.eval() to have it evaluate JavaScript as a demo. Instead you could have an ^:exported ClojureScript function called to do anything with the command string.


@mfikes: Thanks. I had looked at that terminal and it looks promising, but the Javascript stuff isn't comprehensible to me, I don't know where to stick my Clojure code, or what to compile, and all that.


ok no, wait, if you want a terminal-based thing in a webpage then you do need bootstrap right? Like 😉


I am maybe lost in requirements now 😄


No… @lspector just wants a window where someone can type a string, and then that string is passed to some ClojureScript code to, say call (apply str (reverse command)) and then put the result back into the terminal.


kk clear...then yes unless the string is a ClojureScript form to compile down to JS and evaluate you don't need bootstrap facilities


In that example @lspector’s code would be AOT compiled to JavaScript and look like a minified version of,cljs.core.str,,command))


ahahah Mike is compiling it already


@lspector’s difficulty is in hooking it all together, using the ClojureScript toolchain, etc.


@mfikes: exactly. Maybe it would help to imagine (not accurately) that I just learned to program a month ago, Clojure is my first language, and I made a spiffy text adventure game that I want to share with the world on a web page. What minimal instructions would let me run this in a web page, given that I don't know Javascript or anything else (but I can follow instructions and move something to a web server).


@lspector: I’d recommend taking a look at the Quick Start. It shows you how to get your code into a page.


(In truth I've been programming a long time in many languages, but that hypothetical is close to true re: Javascript for me.)


Then you can use something like that fancy JQuery thing I linked to above to provide a terminal, and when that JQuery thing gives you a string, you have a tiny bit of JavaScript glue to call your ClojureScript code.


Quick Start is definitely a good foundation, though.


@mfikes: I've gone through the quick start but it doesn't give you a terminal. Output to the console only, and then stuff that requires knowing Javascript to do anything on the page, if I recall correctly.


Where it calls window.eval, you’d replace it with my.namespace.process(command)


So the part I am missing is exactly how I would wire up the JQuery thing and make it call my code. Again, I suspect this is too simple to think you need to say if you know what you know....


Okay, I'm going to try to find that piece of code...


I think it is one line of code to change to hook it in.


Not saying this is the best terminal. It is the first one I saw via Google. 🙂


Any terminal would be fine... although I do want multi-line input


also jqconsole is a good one with multiline (it is the one is using)


Or, just put a text field on the page with a big ENTER button next to it 🙂


Believe me, @lspector , I’m with you… I don’t know the web stack 🙂


While I’ve done a lot with ClojureScript, for me it has always been outside of the web stack. 😜


I went down the path of "a text field on the page with a big ENTER button next to it" last week, which got me to #C08BDAPRA, which worked but was clunky because I was fighting a lot of the spiffy features of hoplon that I don't really want, connecting interface elements to each other etc. I was able to make my code run in a web page, though, so that was good. But I realized that a terminal interface would be more natural and better for my application and also way more general, that lots of people may want to use (and that I'd use for other projects). So I'm trying to get the terminal idea working.


Meanwhile, right now I don't even see where that code to change is... It's not on the Quick Start page, but in code that gets created when you follow those instructions? I can't seem to find the old project so I guess I'll have to go through the instructions again.


@lspector: The main idea is that you compile your ClojureScript code to JavaScript, and have it loaded into the browser (as is done in Quick Start), and the it is there, in the JavaScript engine in the browser, waiting to be called upon. You can then use something to get a string from the user (a text field with an ENTER button, or a terminal supporting multi-line entry), and once the event occurs that the user has supplied a string, you glue that event to call your exported ClojureScript function, which does whatever it wants and returns a string. Your glue code then puts that string in the UI (renders it in the page, or passes it to whatever terminal emulator you are using for display).


@mfikes: Thanks. All of that sounds exactly right. I wish there was a path here for the person who knows only Clojure and can't write the glue without learning another language.


Nah, don’t learn JavaScript. Just figure out enough of it to hook things together.


I’ve gotten a lot of mileage out of that philosophy 🙂


I found this:, maybe you can find some inspiration there too


Yes. I was looking at the same thing 🙂


woah, I got mentioned?


@benzap: Yes, if your terminal is workable, @lspector wants one 🙂


everybody is a rock star here 😄


The main use case is: “I wrote a command line program in Clojure, and I want to toss it in a web page.” Simple enough.


hmm, I don't know if that was where I was going with it, but i'll look into how I might get it working in clojure as well 🙂


The example is: My program accepts a string from the user. It then reverses it, and prints it to stdout.


I realize I don't need to know all of JavaScript, but I don't know what I do/don't need to learn or how to learn just the parts I need. Although I realize that this may come off as lazy and selfish :-O, I'd like to learn exactly none of it, if possible, and just be able to paste my working Clojure terminal code somewhere, issue a magic command or two, and have my code running in a terminal in a web page. I'm old enough that running a terminal-based program was the default for every language environment (well, actually I wrote punch card programs too!), and so it sort of seems natural to me that there should be a simple way to do this always... and that for Clojurescript that would be in a web page...


hmm... for the project, i'm trying to get it to the point where I could write ncurses inspired apps in a browser


hence the "Terminal Emulator with $#!*%& "


If you can do punchcards, you can hook a tiny bit of JavaScript to ClojureScript 🙂


I’m too old to deal with JavaScript… I don’t plan on learning it myself.


Life’s too short.


@benzap: @mfikes's examples are spot on, but also think more generally how great it would be if anyone who can write a text adventure game that would run in a terminal in Clojure with lein run could slap it into a template and issue a command and make it run in a web page. And then instead of a text adventure game, something that does fancy mathematical problem solving, or whatever floats your boat.


that sounds pretty useful


Punch cards were not fun. Except they spun in really cool ways if you threw a deck of them off the top of a tall building 🙂


I do think this would be useful. I teach computer science (including Clojure) and I'm sure my students would love a way to do this. And I have a bunch of projects (like the genetic programming code I described at Clojure/Conj 2015) that I'd love to make available for the world to run in a terminal in a web page.


Actually, @benzap, @lspector’s use case isn’t actually to run Clojure. I think it would be a ClojureScript program that essentially wants access to stdin, stdout, in some fashion.


FWIW a path I went down with Planck is to augment the existing *out* with *in* and *err* and all of the machinery to imitate .


Then it is possible to build things like read-line atop that stuff.


interesting, i'll have to look into it 🙂


Perhaps *in* would make sense in fluch, dunno


would be neat for teaching clojurescript as well. include tools.reader for the clojurescript compiler, and have lessons that imitate a lot of what you see for teaching the scratch programming language


Yes, @mfikes, that is right -- I just want to run a ClojureScript program that interacts with the user in a terminal, using something roughly equivalent to Clojure's read-line, read, print, and println.


For concreteness, if a Clojure/script programmer writes this:

(defn interact
  (print "Type one line: ")
  (println "Backwards, that line is: " (apply str (reverse (read-line))))
  (print "Type a Clojure map: ")
  (println "The values are: " (vals (read))))


Which runs in a terminal with lein run when put in a Clojure project with a -main function like this:

(defn -main
  [& args]


Then how can that programmer make this run in a terminal in a web page, without learning Javascript?


I was searching, but could find any blog post about the performance difference between running the "same" code with clojure on jvm and clojure script on node.js, do you know any websites on this topic? even if it is just some micro benchmark I would like to read about it


@benzap & @mfikes: and note in that interact example the map that the user enters could span multiple lines. Ideally the terminal in a web page would allow that too.


@lspector: Your interact example can be made to work in Planck 🙂

cljs.user=> (defn interact
       #_=>   []
       #_=>   (print "Type one line: ")
       #_=>   (flush)
       #_=>   (println "Backwards, that line is: " (apply str (reverse (read-line))))
       #_=>   (print "Type a Clojure map: ")
       #_=>   (flush)
       #_=>   (println "The values are: " (vals (read))))
cljs.user=> (interact)
Type one line: hello
Backwards, that line is:  olleh
Type a Clojure map: {:a 1 :b 2}
The values are:  (2 1)
So, it could probably work in a web page 🙂


@lspector, for my first stab at it, you would have a static web server running in the background, along with lein cljsbuild auto, with your project.clj pointing at :main example.core.main


a lein plugin would probably be better suited to do the static web server setup


and have it run from -main


@deactivateduser624417: My experience has been that, if you type hint Clojure, you can generally make it run faster than ClojureScript. But, sometimes ClojureScript is faster owing to the tremendous job JavaScript engines do with automatically detecting types, and compiling down to machine code.


@benzap -- interesting... but I don't understand fully. I put things on the web by throwing .html files in my public directory on my institution's website. They're served by whatever my institution is running. For the #C08BDAPRA experiment I did, I put the stuff that resulted from their getting started instructions in my public directory and it ran fine, without any plugins or other servers or anything like that. It's just that what I got was a #C08BDAPRA thing with input/output fields and a button rather than a terminal field. I'd like to get a terminal field instead... Will this really require understanding stuff like running additional servers?


@lspector: hmm, the problem is that most languages came from a time when a terminal and a console were the first thing you usually saw. Javascript comes from making webpages more dynamic, so javascript inherently doesn't really have anything for terminal input/output. I'm hoping to emulate that behaviour fluch to some extent as suggested by @mfikes


However, I think if someone wrote a plugin to make it so that they run this plugin to generate a static web page with all the bells and whistles, it could be as simple as throwing your code in the -main function and running a closely resembled lein run


maybe a lein plugin called lein-webterminal, and you run lein webterminal run which spawns a static web server with additional stuff for spawning fluch, and running the -main function


@benzap It must not be terribly hard to make Clojurescript/Javascript do this because the bootstrap examples do everything I want and more (I don't need the bootstrap part, just the terminal part). And in plain Javascript does all I want but I don't know how to glue it to my Clojurescript code.


@benzap, your suggestion would mean that I would have to run that command on the server, and keep that process running (and restart it if the system goes down), etc? I'm pretty sure that what I'm looking for can be done by having nothing running on my server but the main webserver which hands out .html and .js files. At least, I was able to get the #holon version of what I want working without running anything on the server, and the only problem with that was that I had separate UI elements for input/output/run, rather than a terminal field which is the more general solution that I would like to have.


@lspector: It is nearly a one-line change, if you don’t really need full stdin/stdout, nor multi-line. In other words, you can get a string, and have your ClojureScript code process it, and then put it back out to the terminal.


The challenging aspect is if you want read-line and friends.


And if you do everything in ClojureScript (combined with perhaps some JavaScript), the server can serve up static files.


(I say “challenging” because ClojureScript doesn’t come with machinery to cope with stdin/stdout like —but it can be built in ClojureScript.)


@mfikes: It will be hard to get by without multiline, but if I can get everything else then I'd like to pursue this. But what line, in what file, would I change, to what? And where would my own Clojurescript go?


I'm going to go through the getting started instructions again, but from looking back at it I remember that it has you do and then undo/redo things so it will take a bit for me to recreate the stuff that I expect will have the code that I'm supposed to change.


In the example, you change window.eval(command) to call upon your exported ClojureScript function (whatever you name it).


Like my.namespace.reverse_string(command)


I must be looking at the wrong place... I don's see mention of this example at


I see that image... but where does the code come from? Will it be in a project that results from following the instructions at


Scroll down to Demo and look at the JavaScript box


If you type 1+1 in that Demo box, it will pass that string to the JavaScript engine via window.eval(command) and that will result in 2, which will be put in the terminal.


If you hooked that call to ClojureScript, you could have the ClojureScript program do anything with the string.


Ah -- okay. So I should follow the instructions at, and that will produce a file that contains window.eval(command) which I should change to my.namespace.reverse_string(command) but instead of my.namespace.reverse_string it should be the name of some Clojurescript function... the code for which I put where? And compile how (maybe following instructions at and put in the same folder? Sorry to be so dense, but it's all of these probably-obvious glue parts that I am completely clueless about


Of course, the real problem with this is that it is the pattern of “type a command, process it, spit the result out”. It is not stdin/stdout like yo want.


Yes, @lspector you are on the right path. If you combined with the ideas from Quick Start you could imagine cobbling together something that uses ClojureScript to reverse strings.


And, yes, you could use Quick Start to compile… it talks about how to do that.


Well, I guess stdin/stdout would be better... or whatever the bootstrap examples are using would be 100% fine, so maybe I ought to revert to that, and get bootstrap which I don't need, just because the instructions there will, I think, get me a REPL which I can then use to make a Terminal app. Using a chainsaw when a pair of pliers will do, but I don't know how to work the pliers and it looks like there are clear instructions for the chain saw.


@mfikes: yes, I could "imagine" cobbling that together but sometimes my imagination is a bit unmoored from reality 🙂. I'll look into it more, but at the moment it feels like going back to bootstrap may be the shortest route to a workable solution.


What you really want is an environment that lets you call read-line and read.


@mfikes: yes, but bootstrap must be doing that to implement its REPL. I don't need the E, but the R_PL is what you need for a simple terminal app.


@lspector: I’m assuming you want to be able to execute code like interact.


Yes, interact is a simple example but if I could do that then I could do something with a loop, and much more interesting processing to produce outputs from the users' inputs.


Note: I don't want the user to be able to call interact -- I want a web page in which something like interact is running in a field, e.g. showing the first prompt when the window is opened, and then responding in the field and re-prompting, etc.


@mfikes: The read-line in Planck looks promising... but again, what I don't know is where to use this, with what glue, etc.


I’m just saying that Planck is an existence proof that you can write terminal apps using ClojureScript. You just need some extra code like Planck has to conspire to give you stdin.


@mfikes: Ah -- that's great then!


Making a Planck-like thing with stdin support that can run in a terminal simulation in a browser is possible. I’d call that more than “cobbling” though.


Just saying it is possible. And perhaps very useful.


Hmmm... If it's more than "cobbling" to you, then I think it's not something I can do myself right now.


I've got some code I need to put in a web page soon, without having time to learn much new stuff, and I think the lesson for me for today may be that I should use clj-bootstrap even though it does a lot that I don't need, and that I should dig into it to figure out where its read-eval-print-loop is and replace that with my own code that does my read-[something-other-than-eval]-print-loop.


Does that strike you as reasonable?


Longer term (and for others) I think there's an opportunity here because I think that there would be a lot of takers (esp in education, but in other contexts as well) for a simple way, that doesn't rely on Javascript/web-programming knowledge, to get a terminal-style Clojurescript program running in a browser.


Thanks @mfikes, that's what I'll try next.


@lspector: If done right, a library/stack that supports that could trivially make it possible to run the same ClojureScript programs, un-modified, on mobile devices as well.


console mode for ClojureScript


@mfikes: the mobile idea sounds cool, but FWIW I'd be 90+% satisfied even if it ran only on desktops, only on one specific browser, even if it was hideously ugly, etc. The gap between "Non-programmer users can run my terminal-based thing in their browsers" and "Nobody can run it except me on my computer and others who can deal with installing Clojure on their own machines" is the huge one that I really want to close. Beyond that it's just gravy.


Trying to use cljs-bootstrap to put a minimal terminal-based program in a web-page, as per discussion above with @mfikes. Following instructions at, when I do time ./script/build it looks like it is dying with ./script/aot_core: line 7: mvn: command not found. Makes me think "maven" but I don't know from maven. Any help?


Might just need to install maven


@lspector: maybe you just need to install maven


(`mvn` is definitely the command for maven — on OSX you can just brew install maven.)


I haven’t got a clue why that thing would want it tho 😕


So I've not previously used brew... and now I'm down a rabbit hole trying to install brew so I can install maven...


Oh blarg — there’s a buncha other ways you can get that done. D’you use ports? Prefer a straight installer?


Error: Failure while executing: git clone /usr/local/Library/Taps/homebrew/homebrew-core --config core.autocrlf=false --depth=1 Failed during: /usr/local/bin/brew tap homebrew/core


A straight installer sounds nice


Thanks @gastove -- trying now


Okay -- maven installed -- thanks


A couple steps later: Unable to find npm on your path. Please install it. Any ideas?


npm is the Node Package Manager. Again, available via brew, or from the fine folk at


Ah. I see. So one has to buy this? Can't build cljs-bootstrap without doing so?


Uh no, no purchasing. Free as a song.


Oh, look, that page isn’t very helpful. Erhm, sec.