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
ChrisB 2019-09-09T13:32:47.176800Z

@mauricio.szabo Not sure if you can post videos I would love to see the video of the new console you're working on.

mauricio.szabo 2019-09-09T13:56:16.176900Z

Of course, here it is. The new console implementation is fully on reagent, and I think it would be really easy to add something like "if you're printing a very big string, truncate it so it don't lock up Atom" or something

ChrisB 2019-09-09T14:01:47.177400Z

ah, that expand feature is awesome

mauricio.szabo 2019-09-09T14:08:29.179200Z

There are also other features. For example, suppose you're refreshing your code and there's an error. The current REPL (on version 0.1.13) will return this:

mauricio.szabo 2019-09-09T14:09:02.179700Z

If you look at the console tab, you'll see that there's no information at all. It's only on the Atom info that a serialized version of the error appears

ChrisB 2019-09-09T14:09:27.179900Z

right, i was subconsiously copying the error to track down the line

mauricio.szabo 2019-09-09T14:10:47.181100Z

This is the new console. Also, on some new version of Chlorine I intend to add links to "goto file" on stacktraces too

ChrisB 2019-09-09T14:11:51.181600Z

i think that would remove a lot of cognitive load. I'm assuming go to file won't work in cljs

ChrisB 2019-09-09T14:12:45.182300Z

so, as a slight tangent, i saw you discussing inspect-block with sean corfield, the way he implemented it was by having a hook on the eval. Is it possible to nominate a more general hook/wrap like he did in inspect block with (wrap-in-rebl-submit). The use case i'm thinking of is to enable a repl driven refresh of reagent. eval-block -> (reagent-mount [root])

mauricio.szabo 2019-09-09T14:13:37.182400Z

Maybe... I'm working on it, I'm thinking about integrating Orchard so it would give a richer experience on documentation, autocomplete, and goto var definition on both CLJ and CLJS files

ChrisB 2019-09-09T14:14:09.182700Z

it can however be used for including other things like sending output to rebl or running tests or w/e

ChrisB 2019-09-09T14:14:29.182900Z

or am i misunderstanding where the code runs

mauricio.szabo 2019-09-09T14:15:20.183100Z

Yes, I'll probably go to that route. The current implementation only supports Clojure, but on next versions I'm making the code more generic so it can work with the "current" REPL

mauricio.szabo 2019-09-09T14:15:44.183300Z

I'm also working more and more with ClojureScript, so these are becoming pain points for me too 🙂

ChrisB 2019-09-09T14:15:56.183500Z

i'm not too hung up on the code navigation for cljs i think. errors tend to be pretty easy to find if you give namespace and line numbers

ChrisB 2019-09-09T14:16:44.183700Z

yea, so where i've found this to be the biggest pain is in react native. i'm able to manually compile a function then run my mount function

ChrisB 2019-09-09T14:17:27.183900Z

or i can hit save, which runs a namespace refresh and then a mount hook, but it's much slower than just evaling a function and running mount

mauricio.szabo 2019-09-09T14:19:00.184100Z

Yes, I'm currently using block comments to run it, something like:

#_
(r/mount [my-view] my-root)
And I keep evaluating over and over until I'm satisfied with the result

ChrisB 2019-09-09T14:20:46.184300Z

i've started doing that for iterating on single components as well, but iterating on a component while it's in the larger context of the page gets lost

ChrisB 2019-09-09T14:22:05.184500Z

for instance (mount [rn/view {:style {:margin-top 45}} [rn/button {:title "hi" :on-press #()}]])

ChrisB 2019-09-09T14:23:40.184700Z

one more think on the console, having a button to clear would be useful. i don't have the muscle memory for binding the chlorine:clear-console command on a keybind yet

mauricio.szabo 2019-09-09T14:25:18.184900Z

Yes, a toolbar would be useful too. I just don't know which more action the toolbar on the console could have besides "clear console"

ChrisB 2019-09-09T14:25:57.185100Z

collapse all?

ChrisB 2019-09-09T14:26:31.185300Z

like a truncate/untruncate outputs

ChrisB 2019-09-09T14:29:05.185500Z

i'll start paying attention to the things I actually do in the console and write them down. It's quite hard to notice when you're not in the moment

mauricio.szabo 2019-09-09T14:31:01.185700Z

Great, that would help a lot! Truncation of "outputs" may be easy, but for results I don't think so... these things are independent from each other, but let's see if I can find some way around it 🙂

ChrisB 2019-09-09T14:32:34.185900Z

yea, i mean printed outputs. sometimes you get a screen full of errors but you don't want to clear the whole thing (in the terminal i mean)

seancorfield 2019-09-09T17:04:14.186100Z

@bronkhorst.chris Did you see how I'd refactored the inspect-related eval stuff? https://github.com/seancorfield/atom-chlorine-setup/blob/master/init.coffee#L50-L77 I think I posted a link before but can't remember.

seancorfield 2019-09-09T17:06:45.189Z

Looks like great work on the new console @mauricio.szabo! I must admit I have the console squished down to just three lines at the bottom of the screen and mostly ignore it -- since all my results go into REBL which I have split-screen with Atom (Atom on the left, REBL on the right). About the only time I expand the console is to read a stacktrace for a compile or eval failure -- so having those via Atom pop-ups would be a nice enhancement (that's what I think I saw in those screen shots -- I'm about to watch the video)...

seancorfield 2019-09-09T17:08:37.189800Z

Nice. I like the separation of stdout/stderr. I guess I'd still rather have the error in a popup that I can either read or dismiss with esc.

1👍
henrik 2019-09-09T20:32:46.190400Z

pprint last output

mauricio.szabo 2019-09-09T21:33:23.193Z

Great, I'll check if there's any way of adding a popup that can be dismissed. In fact, I was studying about the possibility of hiding the console tab completely, and only show it when necessary (sometimes I'm programming on small screens and I don't like the REPL cluttering things too). Currently I'm using a package called "Hey Pane" that maximizes / minimizes panes, but maybe a baked-in solution could be better

mauricio.szabo 2019-09-09T21:34:33.193100Z

I think printed outputs truncation can be really easy to implement 🙂

seancorfield 2019-09-09T21:36:43.194Z

Between inline results and REBL, I'd be very happy to hide the Console altogether -- as long as exceptions are displayed inline and/or via a popup.