I 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…
REPL vs CLI: IDE wars
21–30 of 110 posts
Re: REPL vs CLI: IDE wars
#22This 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.
Re: REPL vs CLI: IDE wars
#23I 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…
Homoiconicity isn't required for that, all you need is to be able to map between source and AST enough to identify expression boundaries. Plenty of development environments for non-homoiconic languages provide the ability to evaluate a selected expression (not just the last one) in a linked REPL on demand. I love the Lisp family, but I don't know why its advocates often sound like they haven't seen a dev environment…
Re: REPL vs CLI: IDE wars
#24I 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…
Homoiconicity isn't required for that, all you need is to be able to map between source and AST enough to identify expression boundaries. Plenty of development environments for non-homoiconic languages provide the ability to evaluate a selected expression (not just the last one) in a linked REPL on demand. I love the Lisp family, but I don't know why its advocates often sound like they haven't seen a dev environment…
Those boundaries you talk of are the crux of the issue. A highly dynamic, completely expression based language is going to enable a much different experience. Homoiconicity also plays an important role here, because you can ispect and parse code within the language, with the same functions and algorithms as everything else.
Re: REPL vs CLI: IDE wars
#25I 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…
Homoiconicity isn't required for that, all you need is to be able to map between source and AST enough to identify expression boundaries. Plenty of development environments for non-homoiconic languages provide the ability to evaluate a selected expression (not just the last one) in a linked REPL on demand. I love the Lisp family, but I don't know why its advocates often sound like they haven't seen a dev environment…
Re: REPL vs CLI: IDE wars
#26Thanks for introducing me to `add-lib` This is going to be a huge time saver :) More info here: https://insideclojure.org/2018/05/04/add-lib/ Hopefully there will be some way to just "reload" your whole `deps.edn` though "If you get an error, the execution stops by default and you get a stack trace." I'd say the other missing piece of REPL development is that while you get a stack trace, you don't get a program state…
It is a completely non-problem for functional code. It is a big problem for imperative code.
You can't just write all of your code in a functional style, but depending on what you are doing the limit gets larger or smaller. So it's normal that this will be a showstopper for some people, and irrelevant to others.
Re: REPL vs CLI: IDE wars
#27Re: REPL vs CLI: IDE wars
#28Thanks for introducing me to `add-lib` This is going to be a huge time saver :) More info here: https://insideclojure.org/2018/05/04/add-lib/ Hopefully there will be some way to just "reload" your whole `deps.edn` though "If you get an error, the execution stops by default and you get a stack trace." I'd say the other missing piece of REPL development is that while you get a stack trace, you don't get a program state…
> Maybe I'm "holding it wrong" but this causes a lot of friction and lost time. It is a completely non-problem for functional code. It is a big problem for imperative code. You can't just write all of your code in a functional style, but depending on what you are doing the limit gets larger or smaller. So it's normal that this will be a showstopper for some people, and irrelevant to others.
Just because things are functional doesn't mean you always knows the inputs at all times
Re: REPL vs CLI: IDE wars
#29Thanks for introducing me to `add-lib` This is going to be a huge time saver :) More info here: https://insideclojure.org/2018/05/04/add-lib/ Hopefully there will be some way to just "reload" your whole `deps.edn` though "If you get an error, the execution stops by default and you get a stack trace." I'd say the other missing piece of REPL development is that while you get a stack trace, you don't get a program state…
(csv/read-csv (slurp "my-csv-file.csv"))
Or if you prefer the threading-macro style: (-> "my-csv-file.csv" slurp csv/read-csv)Re: REPL vs CLI: IDE wars
#30Thanks for introducing me to `add-lib` This is going to be a huge time saver :) More info here: https://insideclojure.org/2018/05/04/add-lib/ Hopefully there will be some way to just "reload" your whole `deps.edn` though "If you get an error, the execution stops by default and you get a stack trace." I'd say the other missing piece of REPL development is that while you get a stack trace, you don't get a program state…
This should work just as well: (csv/read-csv (slurp "my-csv-file.csv")) Or if you prefer the threading-macro style: (-> "my-csv-file.csv" slurp csv/read-csv)
Always nice to learn something new