Fork me on GitHub
Marc Rios12:12:56

Hello, I have never been able to get Clojurescript examples to work properly when I try them. The defaults seem to be broken. For example, I tried following the instructions here ( and the first repl page is broken. The error I get is goog.require could not find: cljs.pprint. The webpage just says "Item1". What am I missing?

Marc Rios12:12:20

The main Clojurescript repl page appears for a short moment, then disappears.

Marc Rios12:12:50

The problem is replicated whenever I reload the page. I am using Firefox on the most recent version of Mint Linux.


Where does Item1 come from?

Marc Rios12:12:17

I'm not sure. It's not in any of my source files.

Marc Rios12:12:40

I think Clojurescript is using files from a completely different directory.


If you follow all the directions up to the point of executing the first clj command - does it work correctly?

Marc Rios12:12:32

Curiously, it flashes the screen that I'm supposed to see for a fraction of a second, and then it switches to something else.

Marc Rios12:12:16

I think that clojurescript is executing an old clojurescript file from a completely different project.

Marc Rios12:12:30

That's some very bizarre hidden state.


I don't think your setup is correct. Try creating a project from the ground up. Just in case, make sure there's nothing in ~/.clojure/. Clear the browser cache.

Marc Rios13:12:39

that's curious because this project was from the ground up. I'll check the cache.

Marc Rios13:12:34

I'm going to delete the old project and try again.

Marc Rios13:12:25

Deleting the old project solved the problem.

Marc Rios13:12:53

thank you!

👍 3
Otis van Duijnen Montijn14:12:48

Hi all! I am currently writing tests for some cljs functions used in a Fulcro app. The result of a certain function is: ({:id :app.client/buttonchange1, :states (:initial :state/state1 :state/state2), :active-state :state/button1} {:id :app.client/buttonchange2, :states (:initial :state/button1 :state/button2), :active-state :initial})

Otis van Duijnen Montijn14:12:32

How should I define an expected result in this case?

Otis van Duijnen Montijn14:12:55

Just making a def and pasting this result doesn't work as the :states won't show using ()


Are you using just () or '()?


Using it without quoting is the same as (get {...} {...}).


Also note that in Clojure (= [...] '(...)) if both ... are the same.

Otis van Duijnen Montijn14:12:14

This helps, Thanks! Pretty new to cljs 🙂

👍 3

Just to make my second statement clear - it's only like that for maps and keywords. Because they're both callable via implementing IFn and their invoke implementations work like get. (something ...) just invokes something on ... when evaluated. something can be anything, not just a symbol.


@U01AGMXNQ3X Did you mean to ask in this particular thread or in #clojurescript?

Dan Maltbie21:12:15

yes. i miss-placed it. I'll move it over. thanks.


Team, (re-matches #"^[a-z\-]+$" "abc--") will give us the result, But if i send 2 hypen it should return nil, How can I achieve this


What exactly do you mean? Just --? Or two consecutive hyphens anywhere in a larger string? Or just two hyphens anywhere in the string? I.e. what strings from these should not be matched? --, a--, a-b-.