Fork me on GitHub
#other-languages
<
2023-09-13
>
Bobbi Towers17:09:59

I'm rather biased, but having to highlight the code to be evaluated seems to diminish the ergonomics of in-editor evaluation. I saw a similar thing with an F# plugin and had the same reaction but it's still nice to see https://www.reddit.com/r/emacs/comments/16gf2gs/repl_driven_development_teaching_a_javascript/?rdt=34025 I actually can't tell if the section has to be physically selected or if it can infer a logical block based on the cursor position

respatialized18:09:42

I think a tree-sitter grammar for JS would likely be able to detect expression boundaries, right?

Bobbi Towers18:09:49

I imagine it wouldn't be any more involved than say, formatting

didibus22:09:25

Yup, it's one place where I think the Lisp syntax provides a second order benefit that is non-obvious at first

💯 1
didibus22:09:10

Even if you could define some "selection rules" for other syntaxes, there would be the mental overhead of like, wait what exactly is it going to execute here? Where it's very obvious in a Lisp syntax

Bobbi Towers22:09:10

I asked a question on the Reddit post and the author answered me. He said it wouldn't make sense to infer expression boundaries because it's intended to work for any language

Bobbi Towers22:09:04

But that it's easy enough to make an expand-selection command that would do the thing you want

didibus22:09:58

Emac's smartparens does selection expansion for many languages. It still would be a bit of an extra mental burden. Do you make it two steps, or do you make it it evals and shows what was evaled.

Bobbi Towers22:09:02

Yeah, the ability to just stick the cursor somewhere and immediately know what's going to be evaluated is like 75% of the reason I enjoy Lisps. And why when I hear people say things like "you don't even notice the parens after awhile", I think "How sad".

💯 2
lemuel09:09:31

JS gets you closer but it’s just not the Lisp experience. Trying to do RDD with PHP has been horrible in comparison to JS. Redefining stuff doesn’t really work in the various REPLs you can use. They have a standalone app ‘Tinkerwell’ which is gaining popularity but it’s an electron app with some feeble VSCode support and basic Vim bindings. Oh and you have to pay for it…

😢 1