2,319 questions
Advice
0
votes
3
replies
81
views
Clojure inline print for debugging
In clojure, the println function returns a nil:
\>(println "a"
a
nil
This makes it awkward to use print to access an intermediate value when print debugging:
Say I have:
(* (+ 5 10) (- ...
1
vote
0
answers
76
views
No *cider-error* buffer and no stacktraces with shadow-cljs
I am using Emacs+Cider to develop a ClojureScript project with shadow-cljs.
When I am using Cider with a .clj project, everything works fine. But in shadow-cljs projects specifically, I don't get the ...
0
votes
1
answer
77
views
How to include a file with shadow-cljs/inline, but preprocess it first?
Shadow-cljs has a resource loader that can include literal files into the Clojurescript code
(ns app.my
(:require
[shadow.resource :as rc]))
(rc/inline "file.txt")
I need a macro that ...
1
vote
1
answer
86
views
How to connect twsapi with @stoqey/ib in clojurescript
When execute the script in javascript, it is normal as expected, however,
using @stoqey/ib with clojurescript unsuccessfully.
Please comment how to access the constructor of @stoqey/ib with ...
1
vote
1
answer
88
views
How to us math.js with clojurescript correctly?
Using math.js with clojurescript unsuccessfully. Please comment how to access the function of math.js with clojurescript correctly.
Error lines
1. product (math/dot v1 v2)]
2. Ainv (math/inv A)]
...
0
votes
1
answer
84
views
Writing Grafana K6 test in ClojureScript
I'm trying to use K6 with a test written in ClojureScript. K6 is written in Golang, runs a bundled JS runtime, which in turn runs tests written in JavaScript.
I don't have a problem running a ...
1
vote
2
answers
98
views
How to use js-pytorch with clojurescript on MacOS?
Using js-pytorch with clojurescript unsuccessfully. Please comment how to fix the installation issue of js-pytorch with clojurescript
execute in calva-repl:
(ns server.ros2
(:require ["js-...
1
vote
1
answer
121
views
Cors request failure in clojure application
I am learning how to use reagent clojure and I am creating a password management application with some basic crud operations as well. Right now when I try to delete a password or use my password ...
1
vote
1
answer
90
views
Error when trying to run ClojureScript on Windows
I try to run ClojureScript "hello-world" project on Windows 10 Home 22H2 19045.4529. I follow documentation from https://clojurescript.org/guides/quick-start and get following output:
C:\...
1
vote
2
answers
187
views
Trying to import libraries in Clojure
I have a problem with a code I am developing in Clojure:
(ns problem2 (:require [cheshire.core :as json]
[clojure.spec.alpha :as s]
[invoice-spec]))
(...
2
votes
2
answers
111
views
Tailwind-Elements React integration into ClojureScript
I am currently trying to use TailWindElements-React in Clojure Script.
In JS an example would look like this:
import React, { useState } from "react";
import { TECollapse, TERipple } from &...
0
votes
1
answer
102
views
Using TWE-React with ClojureScript (import() in cljs)
I am currently trying to use TailWindElements-React in Clojure Script.
In JS an example would look like this:
import React, { useState } from "react";
import { TECollapse, TERipple } from &...
1
vote
1
answer
102
views
Counting items within indexed map
How do you index and count items within an indexed map? Here's an example -
I have example JSON data that looks like this -
[ {
"id" : "z1",
"content_type" : "...
2
votes
3
answers
149
views
Are there any way to treat Javascript methods like ClojureScript functions?
I like ClojureScript, but to interop between CLJS and Javascript is difficult. I would like to create a function that can perform date culculations in arbitrary units, such as the following. But this ...
0
votes
1
answer
116
views
What difference between syntax-quote in Clojure and syntax-quote in Clojurescript?
In Clojure REPL:
(macroexpand-1 `(sum 2 1)) ; (user/sum 2 1)
In Clojurescript REPL:
(macroexpand-1 `(sum 2 1)) ; AssertionError: Assert failed: Argument to macroexpand-1 must be quoted
Why it ...