Fork me on GitHub

Got it -- installed this and it says I should have npm now...


Yeah, there we go


just landed cljs.spec.test in ClojureScript master, generative testing support for speced vars


write a spec, get tests!


@dnolen congrats, this is good news. and of course well done, thanks to @mfikes as well


oh raaaaaaaad


@dnolen @mfikes is it possible to optimize extend-type to output the same optimized code as when implementing protocols in defrecord and accessing properties directly? In defrecord it compiles roughly to, but in extend-type, it has to go through the keyword invocation


just wondering whether you know it's NOT possible, as to save me some time researching it


@mfikes and anyone else watching, I've taken several more steps with cljs-bootstrap (following the instructions at, and digressing for several installations), node repl.js works (except it doesn't allow multi-line input, which is frustrating since that's one of the reasons I'm on this path... but pressing on...), but then ./script/ fails with:

MacBook-Pro-6:cljs-bootstrap leespector$ ./script/
readlink: illegal option -- f
usage: readlink [-n] [file ...]
Any clues anyone? (Context: just trying to get a simple terminal app running in a browser window, without a digression to learn Javascript or web development stuff. Have tried several other paths but currently cljs-bootstrap looks best even though I don't need the bootstrap part, because if I can get something like the terminal at running then I should be in good shape... and that even allows multi-line input with shift-return or by pasting in a multi-line value)


Oh that’s neat. I’m not at all familiar with readlink, but that smells like you might have a different (perhaps too old) version of it. man readlink will tell you if yours supports the -f option.


Oh huh — looks like readlink might just pass -f to stat


(This is probably not helping you, I fear 😕 )


My man readlink does say it takes -f...


Yeah, it seems like this rabbit hole just gets deeper...


And maybe everyone always thinks this about the problems that frustrate them, but it seems like this should be so easy, to put a simple terminal-based program in a browser window, when we have Clojurescript and examples like that are doing essentially what I want and aiming to show people how to do the same thing...


@lspector: Perhaps Replumb is “cleaner,” along with maintainers and a bit of a community around it. was built by the Neil Armstrong of self-hosting


@mfikes: The stuff in the readme at does look good, although I'm a bit worried about the stuff that many would think is too obvious to put there, like how to compile things and what to move to my server, etc. But maybe I should just switch gears to this, try to clone the project, see if I can make the demo REPL work, and then try to dumb it down to a running a simple interactive terminal app...


While was an exploratative experiment leading to fundamentally new capabilities that never before existed, Replumb (upon which is the flagship consumer) is a measured, well-reasoned library, designed for re-use by the community.


Hm. Not sure Replumb can deal with multiline input... Ah -- it can 🙂. It was a bit hard to tell because of parinfer, which was munging my pasted-in multi-line expressions. I don't know if this will be an issue for my usage, but FWIW I think that parinfer is a really clever, really impressive, deeply problematic anti-feature 😕. I know some people love it and it's great that it's available for them, and of course those who have provided it are doing a great service... but for me (and my students when I teach) parindent is problematic and parinfer magnifies the problems...


@skrat probably possible yes


@mfikes: It was a total joy to get repl working, following the excellent directions at, which ran without a hitch and I could move the target folder to my institution's server, point a browser at it, and it runs. Beautiful. Now I just have to remove everything except the terminal window and swap my terminal-based program(s) in to replace the REPL loop. This is definitely the most promising approach I've found, for someone like me who is a Clojure programmer but totally ignorant of Javascript and web programming.


Well, I can vouch that ClojureScript generally allows you to be ignorant of JavaScript (as I am).


@mfikes: awesome. I think if I can nail this terminal-app-in-a-web-page thing then I'll be able to maintain my ignorance indefinitely 🙂... by making anything that I want to put online into an old-school terminal app, and running it in exactly the same shell.


Trying to remove stuff from a copy of the repl ( in order to field a simple terminal-based app. Assuming that the html that's being served comes from the only .html file I see in the project, resources/public/index.html, I edited that, but this seems to have no effect on what I get from running boot dev and then browsing . For example, if I change what's in the title tag I still get the same title... Does anyone know where to hack to change what comes when browsing the site?


Oop -- now that works -- must have been browser cache?


But it's still pretty mysterious to me what I should remove from that .html file to get just the terminal field. Everything I try seems to leave most of the rest (e.g. all of those buttons) intact and/or to mess up the terminal window. I guess a lot must be hidden in those links in the header?


On the plus side, I see the button for switching input mode now, which is great.


But it's looking much less trivial than I hoped to strip out everything except the terminal field from the window, and to replace the REPL loop with a R*PL-like terminal-style interactive program of my own. If anyone has pointers on how to do those things to the REPL I'd love to learn of them.


From a little more poking, it looks like some of what I'll need to remove is in src/cljs/cljs_repl_web/views.cljs and that I may have to understand a fair bit of this just in order to remove it....


what is the best way to record from mic and save from browser?


Working to turn into a way to share a terminal app. Figured out how to hide most of the non-console stuff, by commenting out calls to reagent/render in src/cljs/cljs-repl-web/core.clj. Yay 🙂.


But how to replace the REPL loop of with my own. Not clear from my rummaging through the project code. Alternative, which will work fine for me and seems like it must be easier: Just use the REPL and make my functions available for calling within it, so that the user can just type something like (start) to start my terminal app running in the REPL. But, two questions: 1) Where can I put my code so that it will be callable within the REPL?, and 2) What can I use in that code to get something like read, read-line, print, and println to work properly within the REPL?


With, how can I define functions that will be callable in the REPL, which is in namespace cljs.user? The cljs.user namespace appears not to be defined in the cljs-repl-web-devel project but to be imported somehow (?), so I don't see how to add it directly there. I tried to use in-ns but that appears not to be supported in Clojurescript. I could create a separate file/namespace in src/cljs/cljs_repl_web, but how would I then get that to be visible in the REPL? The only instances of "cljs.user" that I see in the project are in src/cljs/cljs_repl_web/app.cljs, and I don't see how to change that code either to add functions to the cljs.user namespace or to make another namespace also accessible within the REPL.


Hi guys, I'm new to the community and new to Clojure(script).. I've been playing with it over the past week and right now I'm facing a problem using cljsjs that I don't know if it's a bug or just me screwing up. Is this the right place to ask?


alright, here's my current setup: Using boot with:

[adzerk/boot-cljs "1.7.228-1"]
                 [pandeiro/boot-http "0.7.3"]
                 [adzerk/boot-reload "0.4.8"]
                 [adzerk/boot-cljs-repl "0.3.0"]
                 [com.cemerick/piggieback "0.2.2-SNAPSHOT"]
                 [weasel "0.7.0"]
                 [org.clojure/tools.nrepl "0.2.12"]
                 [compojure "1.5.0"]
                 [cljsjs/three "0.0.76-0"]


and I just have this file:


(ns three-test.core
  (:require cljsjs.three))


(println "hey!" (THREE/Scene.))


If I compile and run this, console log shows exactly what I expect


but as soon as I change something, hot reloading throws me a warning


WARNING: No such namespace: THREE, could not locate THREE.cljs, THREE.cljc, or Closure namespace "" at line 8 src/three_test/core.cljs


I get that warning in console and in the browser


you want

(ns three-test.core
  (:require [cljsjs.three]))


(println "hey" (js/THREE.Scene.))


got it.. so stupid!


to access javascript variables from ClojureScript you start with the js/ i..e. js/jQuery, js/React.


right, tried everything but that... thanks!


No problem happy to help


I can't seem to refer to my own namespaces from the repl, whether by trying to include them in cljs.user, or by trying to get the repl to see an additional namespace, or with a call to require or ns in the repl itself. Any help on getting my own code callable within the repl?


Anyone know of a good library for using D3 with React?


Hello, my Jsonp import is not resolving in my cursive ide " cannot be resolved"


is that a bug or is there something wrong with my conf? I'm trying to debug my om next tutorial app


@vinnyataide: it's probably hard for cursive to locate this ns as it's not clojure-provided but included in Google Closure


i.e. it's a special case


@pesterhazy: okay then, my application is giving no error messages, was just a dark shot, thanks.


@vinnyataide: you need to add Google Closure I think as library for that to work?


@dnolen in the project file? I don't think that's the case since the goog Uri import is working


@vinnyataide: hrm weird, might be question for the #C0744GXCJ channel then


Hi @richiardiandrea and @tomek, I'm following up on a thread from the clojure google group. I downloaded the project at and am planning to run a changed copy of it (just the console field) on my own server. I can make that work, but what I can't figure out how to do is to make my own functions callable within the resulting REPL. Can you help with that? Where can I put my code and how can I make it visible from the REPL?


@lspector: of course we can help! I have very limited time now, but I can suggest you to read this: on how a require in bootstrap works. TL; need to provide a file in your :src-paths


Thanks @richiardiandrea -- I'll read that, try to figure it out, and touch base here later.


So I started a new project using lein new re-frame myproject +routes +handler and tried to remove the # URL and use HTML5 push state instead - however it seems that visiting the about page directly loads the homepage instead of the about page. Visiting the about page via the homepage works fine though - code here ->