clojurescript Questions

1

Solved

In this blog post by Dmitri Sotnikov a function eval-str is provided for running a string containing ClojureScript: (defn eval-str [s] (eval (empty-state) (read-string s) {:eval js-eval :sourc...
Chifley asked 13/6, 2018 at 1:39

5

Solved

In Clojure and clojurescript you can have a private version of defn called defn-, but how do you do the same for def, as def- doesn't seem to be included?
Passport asked 7/12, 2013 at 16:16

2

Solved

Clojure uses a number of special characters such as ^String #(xyz ...) %& #_(some form here) >! and many more. How can I search for documentation for these special characters, given tha...
Victual asked 22/5, 2018 at 4:55

1

Solved

I'm having trouble with the Production Builds section the ClojureScript quickstart. Specifically, when I run: java -cp "cljs.jar;src" clojure.main release.clj I get a java exception: Exception in ...
Trimmer asked 15/11, 2017 at 6:21

1

Solved

The 'add' and 'remove' items of shoppinglist ratom updates the 'shopping-list' component, but the 'update' doesn't. I used cljs REPL for updating the shoppinglist ratom. add: shopping.app=>...
Cerement asked 24/2, 2018 at 16:4

3

Solved

I'm reaching a point where GUI coding with Backbone.js object-oriented MVC pattern is getting quite complex, and looking around at other paradigms. MDV, FRP, ECS, oh my. How does Elm compare to Cl...
Tirado asked 23/8, 2013 at 14:20

0

I'm trying to set up Cypress tests written in ClojureScript for a project that uses lein-cljsbuild. Using the following configuration, I'm able to compile a single test namespace into a single .js ...

5

Anyone have any docs for idiomatic clojurescript for access a javascript object (returned as json, essentially a hash)? I have a JSON object returned via an AJAX request: { list: [1,2,3,4,5], b...
Incurious asked 22/3, 2012 at 10:55

3

I have been coming up to speed using the Clojure Specter library (https://github.com/nathanmarz/specter). What I am having an issue with is removing a key using transform or setval. I can set it to...
Oehsen asked 7/11, 2015 at 21:17

2

Solved

Given the following code: [:input {:type "text" :value (:text @app-state) :on-change (fn [e] (if (= 31 (.-keyCode e)) (println "ENTER") (println "NOT ENTER")))}] How to change the if condi...
Ration asked 6/10, 2015 at 8:24

3

Solved

I started using Clojure with leiningen (and now boot). Now I sometimes want to get quickly to a Clojure{Script} CIDER REPL in Emacs to execute just a few instructions. I don't want to create a pro...
Schinica asked 12/10, 2015 at 21:32

2

Solved

I've been reading this, but there seems to be no tutorial/doc about the difference between these two or whatnot. Is socket repl going to replace nrepl?
Midnight asked 15/6, 2016 at 15:54

2

Solved

Setup Consider the following DataScript database of films and cast, with data stolen from learndatalogtoday.org: the following code can be executed in a JVM/Clojure REPL or a ClojureScript REPL, as...
Hubby asked 13/5, 2016 at 2:0

2

Solved

consider this inside a reduce loop: (if (contains? m k) (update m k conj v) (assoc m k [v])) Is there a way to get rid of the if statement?
Sierrasiesser asked 11/2, 2016 at 0:29

5

Solved

I have the following code in the file client.cljs : (ns onn.client (:require [enfocus.core :as ef] [enfocus.effects :as effects] [enfocus.events :as events] [clojure.browser.repl :as repl] [g...
Alexandrina asked 4/11, 2013 at 14:25

1

Solved

I followed this example: https://github.com/Day8/re-frame/blob/master/docs/FAQs/PollADatabaseEvery60.md And here is my interval handler (defonce interval-handler (fn [{:keys [action id frequency...
Bedazzle asked 9/10, 2017 at 16:13

2

Solved

I'm writing an Electron application, and in this application I need to interact with some of the Node.js APIs - read files, get directory entries, listen to events. Of course, I can write ClojureS...
Cosh asked 2/9, 2016 at 11:52

2

I need to share a namespace between my Clojure (Garden) and my ClojureScript (Reagent). Currently the project folder looks like this: src/ clj/ name/ css.clj cljs/ name/ core.cljs cljc/ n...
Premeditation asked 7/2, 2016 at 15:30

1

Solved

I just learn Reagent in Clojurescript, I am just following some tutorial but maybe I miss something I have this code for the state (defonce app-state (atom {:text "Hello Chestnut!" :click-count 0}...
Slim asked 20/9, 2017 at 14:2

2

Solved

I'm fetching thousands of entities from an API one at a time using http requests. As next step in the pipeline I want to shovel all of them into a database. (->> ids (pmap fetch-entity) (p...
Mitchel asked 15/9, 2017 at 11:33

3

Solved

Is it possible to compile ClojureScript without Java? I read the clojurescript nodejs quickstart but I see they still use java to compile. I checked cljs-bootstrap but they also depend on java. ...
Wonted asked 16/7, 2015 at 18:2

1

I have a macro that slurps a markdown file from resources. It provides a convenient way to provide some content. But when I edit the markdown file, Figwheel has no way to know that it needs to re-e...
Kaiulani asked 3/9, 2017 at 19:11

1

Solved

I tried to adapt this example in Google Chart. To re-frame framework, reagent. I would like to create a real-time chart, based on subscriptions. I tested with a simple counter =+-1. I got error: A...
Radices asked 30/8, 2017 at 16:17

3

Solved

how implement $(document).ready(function(){}) in clojurescript. I tried this: (. ready js/document ());;but i am trying to achieve the callback function But doesn't seem right to me. Any idea...
Kootenay asked 29/2, 2016 at 18:12

1

What is happening when I get this error in Clojure? java.lang.RuntimeException: No reader function for tag db/id
Brook asked 23/8, 2017 at 1:31

© 2022 - 2024 — McMap. All rights reserved.