clojurescript Questions

3

Solved

I'm playing with Figwheel and writing a simple single-page app that doesn't require any server-side intelligence. In principle, this app. could be placed on any static web-server. But how do I a...
Nisi asked 6/6, 2016 at 22:42

6

Solved

I installed Clojurescript following its quick start guide. I pulled the git repo to ~/clojurescript. CLOJURESCRIPT_HOME is set ~/clojurescript and clojurescript/bin is added to system path. When ...
Feingold asked 12/2, 2015 at 15:25

2

Solved

I have a simple data file in EDN format I need to read in a ClojureScript cli app running on NodeJS, but none of the relevant core libraries from Clojure seem to be available (core.java.io/read, cl...
Cheerless asked 20/6, 2017 at 19:21

2

Solved

Google's <model-viewer> provides all the key features I need without having write a custom solution via something like react-three-fiber or directly in three.js. I am struggling with how to p...
Schilit asked 17/3, 2022 at 13:1

3

Solved

I am considering building a website using ClojureScript. Does it make sense to write ClojureScript on both the client side and the serverside, much like node.js?
Janeejaneen asked 29/7, 2011 at 11:31

2

how to rerender the whole reagent tree when we save file and shadow-cljs reloads? react 18 has new createRoot api and even before - if nothing changed calling render has no effect
Kana asked 26/5, 2022 at 9:22

4

I'm trying to run lein figwheel on a ClojureScript app and I keep getting this error: Exception in thread "main" java.lang.ClassNotFoundException: javax.xml.bind.DatatypeConverter, compiling:(c...
Bertie asked 26/6, 2019 at 18:53

5

Total rookie here. I am trying to run ClojureScript for the first time and followed the quickstart tutorial. However, upon entering... clj --main cljs.main --compile hello-world.core --repl I ge...
Teryl asked 28/4, 2018 at 16:3

3

Solved

What is the difference between def and defonce in Clojure? When to use def over defonce or vice versa?
Ball asked 20/5, 2016 at 12:39

1

I have the following code in a cljc file: (ns proj #?(:cljs (:require-macros [proj :refer [define-project-version]]))) (declare project-version) #?(:clj (defmacro define-project-version [] ...
Tilley asked 12/1, 2017 at 12:8

3

Solved

I could not understand the difference between these two (mod & rem) functions.
Kidding asked 13/5, 2016 at 13:12

4

Receiving the error Could not load file 'worker.js' for content script. It isn't UTF-8 encoded. > file -I chrome/worker.js chrome/worker.js: text/plain; charset=utf-8 With to-utf8-unix > ...

2

Solved

I'm using shadow-cljs in a ClojureScript project. When I do shadow-cljs watch app the console log the error shadow-cljs - socket connect failed, server process dead?. I restarted my computer bu...
Alidis asked 8/3, 2019 at 19:40

3

Solved

As a newcomer to Clojurescript it appears to me that every Clojurescript project will have some snippet of code like this: (extend-type js/NodeList ISeqable (-seq [array] (array-seq array 0))) ...
Barby asked 12/5, 2014 at 18:16

2

Solved

I recently learned about namespaced maps in clojure. Very convenient, I was wondering what would be the idiomatic way of programmatically namespacing a map? Is there another syntax that I am not aw...
Cherianne asked 1/5, 2017 at 15:54

5

Solved

I'd like to do some basic, but not very basic date-related operations on ClojureScript, like getting the days between two dates. There is clj-time which is a wrapper around Joda time, so it's Cloju...
Rockbottom asked 11/6, 2013 at 9:45

3

I wonder how showing and hiding of a modal dialog should be implemented with Om or Reagent. Since my UI is a function on the state, the show/hide should be triggered by a property in this state. B...
Capitalization asked 29/2, 2016 at 20:39

1

I'm new to Clojure and Lisp as a whole. Following Chapter 14 of the Getting Clojure book, it suggests loading clojure.test.check.generators in a way that appeared to me as if it's a native library ...
Unbacked asked 7/10, 2020 at 19:27

1

Solved

I have a problem using the Material UI's Autocomplete with Reagent (ClojureScript). The element renders fine, but when I try to click on it, I get the following exceptions: Uncaught TypeError: Cann...

4

Solved

I am trying to convert a Javascript object to a Clojure. However, I get the following error : (js/console.log (js->clj e)) ;; has no effect (pprint (js->clj e)) ;; No protocol method IWrit...
Florencia asked 8/9, 2015 at 21:10

4

Solved

The number of possible executions of a function should be throttled. So after calling a function, any repeated call should be ignored within a time period. If there where calls in the meantime, the...
Swede asked 26/2, 2016 at 23:11

3

Solved

I was wondering if there was a way to get ClojureScript destructuring to work with JavaScript objects, such as: (let [{:keys [a b]} #js{:a 10, :b 20}] (print a) ;=> I get nil, but I'd want to ...
Snowclad asked 9/4, 2018 at 5:17

3

Solved

I need to quote without namespace and combine it with unquoting. Something like: '[a b ~c] Unfortunately, unquoting works only with syntactic quoting: `[a b ~c] But then it expands to [user/...
Varnado asked 29/4, 2020 at 2:20

4

Solved

(defn string-to-string [s1] {:pre [(string? s1)] :post [(string? %)]} s1) I like :pre and :post conditions, they allow me to figure out when I have put "square pegs in round holes" more quick...
Mcquade asked 18/7, 2014 at 21:33

2

Solved

How can I get a timestamp in ClojureScript, similar to Unix's timestamp, a single number that represents the current time and date, as a number. I know that: if (!Date.now) { Date.now = function(...
Rillings asked 2/1, 2015 at 10:28

© 2022 - 2024 — McMap. All rights reserved.