Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can you dump contents of Clojure REPL to a file?

So I have been working on a Clojure tutorial and it's pretty fun so far. Unfortunately, every time I close my REPL out, I lose all of the defn and def that I created in the previous session.

So, to save time in the future, is it possible to have the Clojure REPL save everything I've typed to a file so I can dig out what I need for future uses?

like image 636
Nick Klauer Avatar asked Jul 14 '11 10:07

Nick Klauer


People also ask

How do I get out of Clojure REPL?

You can exit the REPL by typing Ctrl+D (pressing the Ctrl and D keys at the same time).

What is Clojure REPL?

A Clojure REPL (standing for Read-Eval-Print Loop) is a programming environment which enables the programmer to interact with a running Clojure program and modify it, by evaluating one code expression at a time.


1 Answers

I think most people work by using their IDE to send fragments of code to the REPL, rather than doing a lot of direct hacking in the REPL. This way you have a better idea of the current state of the program.

like image 138
Adrian Mouat Avatar answered Oct 14 '22 08:10

Adrian Mouat