Can you preserve the state of Clojure REPL (or, indeed, can you program complex programs using REPL?)

After defining the variables, functions, etc. can you save what you did in REPL, also a .clj text file?

+5
source share
3 answers

most people work with replicas through an editor such as Eclipse / Emacs / vim, and this editor has the ability to save the replica, although without some zeal on the part of the developers, this is likely to be an incomplete protocol of what happened. Some state of the replica may be related to the loading of files, etc., which will be in a different state.

Thus, a short answer is usually absent.

+4

Linux (my = Ubuntu 16.04.2 LTS), lein, .lein( ) repl-history. , REPL. - geany...

+2

I answer the brackets in your question. For me, Clojure REPL is very useful for testing functions and testing concepts that take up no more than a few lines. I often put hooks in a module, which is not the main one, so I can load the file and run it through a couple of functions. I can also do this from the core using the same approach; i.e. write a debug function.

I found the Eclipse plugin very useful, but these days I don’t use it, mostly Vim and works with one or more special functions and works main. I do not know how to save REPL state.

+1
source

All Articles