clojurescript

ClojureScript, a dialect of Clojure that compiles to JavaScript http://clojurescript.org | Currently at 1.10.879
p-himik 2021-02-20T00:01:34.262200Z

You might get responses sooner in the designated channels - #cursive and #cider

jasmith 2021-02-20T00:14:03.262400Z

Thanks. I just found and joined those two channels. Perhaps another answer might be to give up on those and use another IDE/environment?

p-himik 2021-02-20T00:34:14.000100Z

I'd say that giving up on the most popular choices just because one thing (potentially easily fixable) doesn't work is more probable to cause more problems in the long run. But if you really want to try something else, IIRC VSCode + Calva is the third most popular choice.

jasmith 2021-02-20T00:46:52.000300Z

Thanks for the suggestion! I am stalled on those two at the moment, so glad to try VSCode + Calva in hopes of getting work done.

p-himik 2021-02-20T00:52:06.000500Z

Also a couple of things you could try independently or together: - Downgrade IDEA - Update Cursive to one of the EAP versions (participation in the EAP program can be enabled in the settings)

jasmith 2021-02-20T01:13:40.000800Z

So far VSCode + Calva is working well. Very very helpful! Thanks!! My Cursive version is 1.10.1-eap3-2020.3and downgrading IDEA might be possible but it could run in to trouble with other language plugins .. so I can/will do it if necessary.

2021-02-20T05:20:34.003200Z

Does anybody know where I can find documentation on how to build clojurescript and run the tests? I'd like to try fixing an issue but I've always used cljsbuild and shadow-cljs, so I'm not sure how to build vanilla cljs.

phronmophobic 2021-02-20T05:36:25.003500Z

and https://github.com/clojure/clojurescript/wiki/Running-the-tests for running the tests

Mio Q 2021-02-20T05:50:46.005400Z

is there anything like elm-ui / theme-ui in the cljs ecosystem? closest thing Ive found is this: https://github.com/hoplon/ui

simongray 2021-02-20T10:34:58.006300Z

Can you explain what elm-ui/theme-ui is for those of us who haven't used Elm?

Mio Q 2021-02-20T10:52:05.006500Z

@simongray I havent used elm either, but watched a clip on it. essentially an abstraction on top of html/css that does away with the bad parts. theme-ui is similar but less ambitious, you use design tokens instead of hardcoding with pixels and hex/rgb colors

Mio Q 2021-02-20T10:52:56.006900Z

this should give a good idea

Mio Q 2021-02-20T10:53:33.007100Z

width fill, centerY, spacing 30
el [ alignRight ] myElement

Mio Q 2021-02-20T10:53:38.007300Z

these kinds of things

agold 2021-02-20T13:14:19.007500Z

You can use reagent/hiccup with a simple css frame work like Bulma to accomplish the same thing.

Mio Q 2021-02-20T13:18:40.007700Z

@agold not exactly the same thing unfortunately

lilactown 2021-02-20T17:44:28.008Z

I haven't seen these before, but ostensibly you could build something yourself on top of theme-ui and a more barebones React wrapper

Mio Q 2021-02-20T05:51:28.006Z

but something react based would be cool

Sam Ritchie 2021-02-20T20:38:15.009600Z

Interesting, in Clojure:

[(mod 8.5 1.4) (rem 8.5 1.4)]
;;=> [0.10000000000000142 0.10000000000000142]
But in CLJS:
[(mod 8.5 1.4) (rem 8.5 1.4)]
;;=> [0.10000000000000053 1.5]

Sam Ritchie 2021-02-20T20:40:05.010100Z

Ah, because (quot 8.5 1.4) is 6.0 in Clojure, 5 in js

thheller 2021-02-20T20:40:17.010400Z

more like JVM and JS 🙂

Sam Ritchie 2021-02-20T20:41:05.010800Z

haha, yes, sorry!

Sam Ritchie 2021-02-20T20:41:43.011100Z

sicmutils.numbers-test> (/ 8.5 1.4)
6.071428571428572
sicmutils.numbers-test> (quot 8.5 1.4)
5

Sam Ritchie 2021-02-20T20:42:17.011900Z

but this is a bug for sure, yeah @thheller? wherever the fix goes

Sam Ritchie 2021-02-20T20:43:33.012200Z

sicmutils.numbers-test> (/ (- 8.5 (js-mod 8.5 1.4)) 1.4)
5.999999999999999

Sam Ritchie 2021-02-20T20:43:52.012600Z

it doesn’t QUITE make it internally to the 6 it should be at. floating point shenanigans

Sam Ritchie 2021-02-20T20:46:04.012900Z

is this sort of thing worth filing, or just JS floating point stuff that we inherit?

Sam Ritchie 2021-02-20T20:46:50.013100Z

similar strangeness,

(rem 9037601485536036300227801N 1e4)
1.073741824E9
sicmutils.numbers-test> (rem 9037601485536036300227801N 10000)
7801N
on the JVM side

Sam Ritchie 2021-02-20T20:47:12.013300Z

double on the right gets this wrong, and returns a number greater than the modulus