REPL vs CLI: IDE wars
vlaaad.github.io
REPL vs CLI: IDE wars
1–10 of 110 posts
Re: REPL vs CLI: IDE wars
#2Re: REPL vs CLI: IDE wars
#3This post could be summarized as "write as much of your project's tooling as you can in the project's main programming language and the project's main programming language should be Clojure" and I agree wholeheartedly.
This article comes at a perfect time, we're just starting a new Clojure project and were looking into how to automate tooling since we'd been burned by Clojure startup times before. Looks like clj-exec means we can now unify our work on Clojure.
Re: REPL vs CLI: IDE wars
#4In emacs, for instance, you often use `eval-last-sexp`, by default bound to C-x C-e. This lets you move your cursor to a particular point in the file, often deep in a function, and get the results of just the form(s) you're pointing at.
This is a superpower! It lets you test small pieces of your code without writing any test harnesses or scaffolding. Try it with an editor that embeds the repl and has these commands, and you'll never want to develop any other way.
It does cause you to want to structure your code in 'repl-friendly' ways, so that you can, say, restart your main server or reset your state without restarting the whole process.
Re: REPL vs CLI: IDE wars
#5I think you might be missing the main "aha!" of clojure REPLs vs REPLs in non-homoiconic languages: you can very easily execute small parts of the program you're editing without re-typing the code. In emacs, for instance, you often use `eval-last-sexp`, by default bound to C-x C-e. This lets you move your cursor to a particular point in the file, often deep in a function, and get the results of just the form(s) you'r…
Re: REPL vs CLI: IDE wars
#6The startup time criticism is valid, but in context of development you typically don’t restart it except you pull in deps (very rare) or something terrible happens (rare).
Then, there is also borkdude/babashka which is a Clojure powered scripting tool with fast startup times due to GraalVM.
Re: REPL vs CLI: IDE wars
#7I think you might be missing the main "aha!" of clojure REPLs vs REPLs in non-homoiconic languages: you can very easily execute small parts of the program you're editing without re-typing the code. In emacs, for instance, you often use `eval-last-sexp`, by default bound to C-x C-e. This lets you move your cursor to a particular point in the file, often deep in a function, and get the results of just the form(s) you'r…
When you evaluate a form deep in a function, how do you handle variables that are defined "outside"? How can you evaluate such expressions?
Re: REPL vs CLI: IDE wars
#8I think you might be missing the main "aha!" of clojure REPLs vs REPLs in non-homoiconic languages: you can very easily execute small parts of the program you're editing without re-typing the code. In emacs, for instance, you often use `eval-last-sexp`, by default bound to C-x C-e. This lets you move your cursor to a particular point in the file, often deep in a function, and get the results of just the form(s) you'r…
When you evaluate a form deep in a function, how do you handle variables that are defined "outside"? How can you evaluate such expressions?
Re: REPL vs CLI: IDE wars
#9Earlier quoted context omitted.
When you evaluate a form deep in a function, how do you handle variables that are defined "outside"? How can you evaluate such expressions?
Cider (the clojure plugin for emacs) has a variant that prompts you for the the values for those variables.
Re: REPL vs CLI: IDE wars
#10I think you might be missing the main "aha!" of clojure REPLs vs REPLs in non-homoiconic languages: you can very easily execute small parts of the program you're editing without re-typing the code. In emacs, for instance, you often use `eval-last-sexp`, by default bound to C-x C-e. This lets you move your cursor to a particular point in the file, often deep in a function, and get the results of just the form(s) you'r…
When you evaluate a form deep in a function, how do you handle variables that are defined "outside"? How can you evaluate such expressions?