chlorine-clover

About Chlorine for Atom and Clover for VS Code: https://atom.io/packages/chlorine and https://marketplace.visualstudio.com/items?itemName=mauricioszabo.clover
mauricio.szabo 2020-05-26T20:18:15.001300Z

@seancorfield just published a new version that changed eval-and-render to return a promise. This means that if you (let [res (editor/eval-and-render ...)] (prn res)) you'll see the result being printed. I believe this can help on commands that take too long to run. eval-and-render now also returns :result (in case of success) or :error (on failure). It can return nil too, in case of some internal error, but I believe it'll happen only on some really edge-cases 🙂

seancorfield 2020-05-26T20:45:21.001500Z

Cool! Thank you!

seancorfield 2020-05-26T20:52:12.001900Z

What sort of thing will :error be in that situation @mauricio.szabo?

mauricio.szabo 2020-05-26T20:54:54.003Z

For example, (/ 10 0) - the exception will come inside :error But, (try (/ 10 0) (catch Throwable t t)) will come inside :result

seancorfield 2020-05-26T20:55:30.003600Z

"the exception" -- just a message or an entire data structure?

mauricio.szabo 2020-05-26T20:56:19.004300Z

Entire data structure. It's not "suitable for extension" yet, but it'll be soon~ish

mauricio.szabo 2020-05-26T20:56:38.004800Z

(Something like that Browsable that we were having trouble)

seancorfield 2020-05-26T20:56:49.005100Z

Just wanted to check before I put it in an Atom popup warning 🙂

seancorfield 2020-05-26T21:00:46.005400Z

Works beautifully! https://github.com/seancorfield/atom-chlorine-setup/blob/master/chlorine-config.cljs#L71-L89

👍 1