parinfer

2017-07-28T04:16:44.163966Z

is there any reason to use parinfer over paredit if i'm already used to paredit?

mattly 2017-07-28T04:44:27.414688Z

@cjhowe I think they complement each other nicely

2017-07-28T05:06:12.624461Z

you can use both?

2017-07-28T05:06:27.626751Z

maybe i'll try it then

tianshu 2017-07-28T09:43:28.995537Z

It's there any plan to make parinfer-codemirror an ide or feature-rich editor for clojure?

shaunlebron 2017-07-28T15:30:41.522177Z

@cjhowe in theory, as long as paredit operations result in properly indented code (according to our inference thresholds), it should work fine.

2017-07-28T15:31:20.544920Z

parinfer doesn't have things like slurp and stuff right? that seems like the main benefit to me

shaunlebron 2017-07-28T15:31:28.549863Z

I’ve seen some people graduate from parinfer to paredit, and that’s more of what I expect

shaunlebron 2017-07-28T15:31:36.554486Z

parinfer is to get people in the door

shaunlebron 2017-07-28T15:32:15.576887Z

in some cases, parinfer behaves like that, but it’s not as granular as paredit slurp/barf

2017-07-28T15:36:27.722403Z

so is paredit's and parinfer's indentation compatible? are there any reports of teams using both?

shaunlebron 2017-07-28T15:37:41.764008Z

i only used on paredit on vim, and I can’t remember how it behaved in terms of indentation

shaunlebron 2017-07-28T15:37:57.773240Z

does emacs-paredit auto-indent code after operations?

shaunlebron 2017-07-28T15:38:55.805835Z

there are only two rules that we follow: https://github.com/shaunlebron/parlinter#two-rules

shaunlebron 2017-07-28T15:39:59.841793Z

@cjhowe I’d love to have help looking into paredit/parinfer compatibility. I’m guessing it will be editor-specific since implementations might differ

2017-07-28T15:40:16.851179Z

yes it auto-indents

2017-07-28T15:40:47.868463Z

in my experience it's compatible with those two rules

shaunlebron 2017-07-28T15:40:51.870527Z

it might be easiest just to try it, I’ve heard of folks using them together though

2017-07-28T15:41:05.878775Z

i'll try it, then!

2017-07-28T15:41:35.895624Z

i would consider myself a paredit beginner honestly, but there are some functions i use regularly that i don't want to lose

2017-07-28T15:41:39.898358Z

so i think it's a good fit

shaunlebron 2017-07-28T15:41:59.909214Z

cool, thanks for asking, looking forward to hearing how it works 🙂

shaunlebron 2017-07-28T15:43:10.949835Z

@doglooksgood codemirror is used by LightTable. I don’t know of other clojure editors that use it

shaunlebron 2017-07-28T15:43:54.975543Z

I don’t have plans to turn it into one. I am aware of some sites that use it for small editors and REPLs

shaunlebron 2017-07-28T15:45:37.035659Z

I mainly created it for the parinfer home page and demo editor, so it could be a proper environment for showing canonical behavior

2017-07-28T15:48:51.145139Z

oh, there's an online parinfer repl?

shaunlebron 2017-07-28T15:49:45.176132Z

https://jaredforsyth.com/reepl/

tianshu 2017-07-28T15:50:04.187139Z

I'm always searching for a good Clojure development environment, but never satisfied with any of them.

shaunlebron 2017-07-28T15:50:50.213857Z

@cjhowe and in case you don’t know, this is the demo editor for playing with: http://shaunlebron.github.io/parinfer/demo

2017-07-28T15:51:24.233469Z

thanks!

2017-07-28T15:52:16.262857Z

the online demo is actually really useful because there's a lot of online clojure challenges that don't have a good text editor (like codefights)

shaunlebron 2017-07-28T15:52:59.287533Z

i was in an interview the other day where I could choose my language of choice

shaunlebron 2017-07-28T15:53:11.294654Z

the clojure editor was so bad, I had to switch to js

😱 1
shaunlebron 2017-07-28T15:54:02.323498Z

so yeah, parinfer-codemirror could help there

tianshu 2017-07-28T15:56:38.411944Z

we can see a lot of shining ideas in all kinds of Clojure development tools, but there's no one make people feel perfect.

tianshu 2017-07-28T15:57:21.436576Z

I recently use Emacs, but it has almost no support for Java and JavaScript.

2017-07-28T16:07:43.793045Z

well, there's http://jdee.sourceforge.net/ if you're into that

shaunlebron 2017-07-28T16:15:55.053441Z

do you have an example of a perfect environment in another language?

👍 1
2017-07-28T16:18:51.145024Z

tbh cider is by far the closest i've found to perfect for any functional language

dominicm 2017-07-28T17:17:48.959430Z

@shaunlebron were you using their provided editor or something?

shaunlebron 2017-07-28T17:18:08.968900Z

what do you mean?

rgdelato 2017-07-28T17:19:20.004800Z

Atom + Parinfer + Proto REPL has been pretty good for me, but I'm also in Clojure beginner-land

rgdelato 2017-07-28T17:20:26.037021Z

and Proto REPL still needs quite a bit more work on the CLJS side of things

rgdelato 2017-07-28T17:22:08.087836Z

(P.S. I wrote a set-up guide: https://clojurescript.org/tools/atom ...but things that work in CLJ like saved values, autocompletion, and jump-to-definition still don't work in CLJS)

shaunlebron 2017-07-28T17:22:22.095187Z

@dominicm oh, it was an online collaborative editor, I can’t remember which

shaunlebron 2017-07-28T17:23:11.120041Z

https://codebunk.com

shaunlebron 2017-07-28T17:24:07.148489Z

@rgdelato I’m excited about shadow-cljs for that reason—better tool integration

shaunlebron 2017-07-28T17:24:31.160680Z

it exposes the analyzer data for things like that

dominicm 2017-07-28T17:25:15.183512Z

Floobits is the only good one afaik :)

👍 1
shaunlebron 2017-07-28T17:25:49.201466Z

i talked to thomas heller for several hours about all the things it could do and agreed to help him write documentation to get more people involved with it

dominicm 2017-07-28T17:25:54.204329Z

Oh interesting, I wonder if we should look at shadow for our translation needs if it exposes that info.

dominicm 2017-07-28T17:26:11.212588Z

My current plan was to write to a file every time the macro expanded.

shaunlebron 2017-07-28T17:26:12.213216Z

I’m stretched too thin on cljs stuff though

shaunlebron 2017-07-28T17:28:19.280710Z

wow, goog hangout video chat while screensharing, i want to try that

rgdelato 2017-07-28T17:28:28.284865Z

I've heard of it, but haven't given it a good look. I'll take a closer look at shadow-cljs

shaunlebron 2017-07-28T17:29:05.304259Z

it might be hairy trying to look into it, but he’s got very ambitious goals and I’m excited for it

dominicm 2017-07-28T17:29:17.310846Z

@shaunlebron I hadn't even thought of mentioning it to you as a code streaming thing: yah you can use it for that.

dominicm 2017-07-28T17:29:33.319215Z

Better than twitch because I can jump around files. Less viewers though.

dominicm 2017-07-28T17:29:42.323715Z

I the viewer.

shaunlebron 2017-07-28T17:30:42.355184Z

he has fundamental disagreements over what should be in cljs core vs separate tooling. he still uses cljs.analyzer, cljs.compiler, but replaces cljs.closure to control how it creates files to support better options and deterministic build things

shaunlebron 2017-07-28T17:32:08.400940Z

his latest server thing allows instant subsequent startup times, and a code analysis UI viewable on browser, and eventually visual stuff like we did in cuttle: https://github.com/oakmac/cuttle

shaunlebron 2017-07-28T17:33:14.435986Z

it’s had support for figwheel-like hotloading for years, and solves a lot of small problems he’s encountered over the years—like warnings only showing up on the most recently saved file

shaunlebron 2017-07-28T17:33:57.458668Z

and he cares about easy integration of cljs into existing js projects

dominicm 2017-07-28T17:36:08.525508Z

I'm mostly waiting on native boot support before switching.

shaunlebron 2017-07-28T17:36:59.551514Z

i put that together for him after chatting with him, and then @rgdelato had to distract me with the Smart Mode idea 😉

rgdelato 2017-07-28T17:37:17.560378Z

even if I don't understand how it really works under the hood, if I can understand -enough- to intergrate it with ProtoREPL, that would be awesome

shaunlebron 2017-07-28T17:37:47.575309Z

he’s been using it for production-level stuff for years

shaunlebron 2017-07-28T17:38:30.597221Z

my only worry was that it was too far from native cljs compiler, but it uses the same stuff and only replaces the file creation, so it stays in sync with latest stuff from core

shaunlebron 2017-07-28T17:39:30.627572Z

i’ll actually put that in a PR on readme, and try to connect folks who want to help

shaunlebron 2017-07-28T17:42:46.727954Z

the downside right now is that he is changing it all the time, but he will probably stabilize the interface a bit more if more people start using it

rgdelato 2017-07-28T17:47:03.859971Z

man, Smart Mode is so nice, I can't wait for it to actually be out in Atom

👍 2
shaunlebron 2017-07-28T17:56:47.161146Z

drafting the communication of new parinfer stuff

👍 3
dominicm 2017-07-28T18:19:49.887091Z

You've built a really nice tool there. Must have taken some time.

shaunlebron 2017-07-28T18:30:37.224992Z

filed an issue here for protorepl support: https://github.com/thheller/shadow-cljs/issues/76

shaunlebron 2017-07-28T18:32:38.290029Z

@dominicm it was kinda scary ripping out some of that code for a standalone parinfer-codemirror, but I’m glad that it worked out because the recording code got a little crazy and edge-casey

shaunlebron 2017-07-28T18:33:37.321781Z

codemirror reports on changes pretty well, and I just playback the change and parinfer does its normal processing after it is applied

shaunlebron 2017-07-28T20:18:31.221143Z

could I get feedback on these animations? http://shaunlebron.github.io/parinfer/2017.html

mattly 2017-07-28T20:44:28.877205Z

@shaunlebron looks good! I think they illustrate the concepts clearly

rgdelato 2017-07-28T20:44:56.888667Z

"snap" and "compromise" animations look good. "indent" animation feels a little off and I'm not sure why. (maybe because it begins and ends with invalid code?)

shaunlebron 2017-07-28T20:52:42.082097Z

@rgdelato yeah I think I agree

shaunlebron 2017-07-28T20:53:10.092773Z

I’ll try a second pass, will take suggestions too

shaunlebron 2017-07-28T20:53:18.096061Z

thanks for looking!

shaunlebron 2017-07-28T20:54:11.117250Z

“safeguards” is hard to show