clojurescript

ClojureScript, a dialect of Clojure that compiles to JavaScript http://clojurescript.org | Currently at 1.10.879
Alessandro Solbiati 2020-10-20T00:19:43.133100Z

hey guys, how do I make figwheel auto-testing work in my lein figwheel project? I am getting this error from project.cli and was following this guide https://figwheel.org/docs/testing.html 63 :css-dirs ["resources/public/css"] ;; watch and update CSS 64 :auto-testing true ^--- The key :auto-testing is unrecognized

Alessandro Solbiati 2020-10-20T00:27:44.133800Z

looks like that in lein-figwheel (that I thought was the same as figwheel) they took away the option…. https://github.com/bhauman/lein-figwheel/wiki/Configuration-Options

lilactown 2020-10-20T02:14:25.134700Z

lein-figwheel is I think properly deprecated? or at least, figwheel-main (which I think http://figwheel.org are docs for) is the latest version

kah0ona 2020-10-20T09:56:57.135900Z

how can i :require an library starting with an ’@'

kah0ona 2020-10-20T09:57:18.136200Z

“dependencies”: { “@uppy/core”: “^1.13.2”, }

kah0ona 2020-10-20T09:58:02.136900Z

I got this bundling stuff working with figwheel-main, and :target :bundle , so now I’m ready I think to use an npm library, but not sure how to include this

kah0ona 2020-10-20T09:58:34.137100Z

using latest clojurescript

thheller 2020-10-20T10:06:11.137400Z

(:require ["@uppy/core" :as x])

kah0ona 2020-10-20T10:32:34.137800Z

Ah check thx

kah0ona 2020-10-20T11:35:39.138900Z

should I also use :exclusions [cljsjs/react cljsjs/react-dom] and use those in my package.json? Do i also have to (:require [react] [react-dom]) then

kah0ona 2020-10-20T13:00:34.139500Z

ah got it working thanks

Andrei Stan 2020-10-20T13:45:19.149300Z

hello, can someone point me in the direction of how can i better customize a semantic-ui-react Dropdown component (especially the options/children ?! ) ? • i want an right-positioned "delete icon" for each option, so far the icon is by-default in the left-side of the "text" prop; Thanks.

(let [opt [{:value "apples" :text "Apples" :icon "delete"])}
                       {:value "oranges" :text "Oranges"}
                       {:value "grapes" :text "Grapes"}]]
    [:> ui/Dropdown
      {:fluid true
       :selection true
       :search true
       :allow-additions true
       :options opt
        }]) 
I would like to have:

p-himik 2020-10-20T13:49:02.149600Z

It's not really a ClojureScript question. But the API docs at https://react.semantic-ui.com/modules/dropdown/ mention renderLabel.

Andrei Stan 2020-10-20T13:57:31.149900Z

Thanks. it also mentioned that "Only applies to multiple Dropdowns."

p-himik 2020-10-20T13:58:30.150100Z

Well, it's something you'd have to take up with the guys behind semantic-ui-react, because CLJS cannot do anything about it.

Andrei Stan 2020-10-20T14:01:39.150500Z

thank you

mathpunk 2020-10-20T17:54:55.154400Z

Hello, I had a probably-terrible idea, but if it works it might make something terrible I have to do every day, less terrible. Summary: mathpunk wants to figure out if it's feasible or desirable to sneak a repl into selenium-webdriver's executeAsyncScript function, to turn errors while running protractor scripts into data and generally power up the end-to-end tests we write. Details: <thread>

mathpunk 2020-10-21T17:03:07.179100Z

that does look useful, thank you

mathpunk 2020-10-20T17:55:11.154500Z

I just used protractor as directed for a couple of years

mathpunk 2020-10-20T17:55:20.154700Z

finally I looked into the implementation details just a little bit

mathpunk 2020-10-20T17:56:05.154900Z

If I understand right, code gets into the browser right around here https://github.com/SeleniumHQ/selenium/blob/004be30a0ac7b18e90583145c9b7ee245465554d/javascript/node/selenium-webdriver/lib/webdriver.js#L328

mathpunk 2020-10-20T17:56:33.155200Z

(that's the documentation, the implementation of executeAsync is down-page)

mathpunk 2020-10-20T17:56:54.155400Z

I've been very impressed with some of the wild places that people have put repls

mathpunk 2020-10-20T17:58:24.155600Z

so I'm asking: Is there a way that I could use a repl to like.... I dunno, • pause the script to examine errors • parse error data into something more meaningful, since I know a lot about the application and what could be going wrong as the app code drifts from the test code and I gotta go figure out what happened • recover from common errors

mathpunk 2020-10-20T17:59:33.156400Z

I find that when I have a repl, I learn very quickly about what is truly going on. So my intuition tells me that if it is possible to drop a repl into webdriver, it might empower me to make our testing pipeline a whole lot better

mathpunk 2020-10-20T17:59:36.156700Z

thank you for your thoughts!

unbalanced 2020-10-20T22:20:01.157600Z

This isn't exactly the answer you were looking for, but if you want to find a way to sneak a REPL into any webpage: https://chrome.google.com/webstore/detail/chrepl/ablpgchfbbfachdiakmieocbdgflgfjj

unbalanced 2020-10-20T22:20:35.158300Z

So... I'm curious about this code from cljs.core

(defn ^number *
  "Returns the product of nums. (*) returns 1."
  ([] 1)
  ([x] x)
  ([x y] (cljs.core/* x y))
  ([x y &amp; more] (reduce * (cljs.core/* x y) more)))
Seems... infinitely recursive.

unbalanced 2020-10-20T22:21:17.158900Z

Is it a protocol kinda thing or a dispatch somehow?

dpsutton 2020-10-20T22:23:00.159200Z

confusing but

(core/defmacro ^::ana/numeric *
  ([] 1)
  ([x] (core/list 'js* "(~{})" x))
  ([x y] (core/list 'js* "(~{} * ~{})" x y))
  ([x y &amp; more] `(* (* ~x ~y) ~@more)))

unbalanced 2020-10-20T22:23:10.159400Z

ohhhhh

unbalanced 2020-10-20T22:23:20.159700Z

cljs.core is the Clojure namespace

unbalanced 2020-10-20T22:23:26.159900Z

🙏 thank you