HackerTrans
TopNewTrendsCommentsPastAskShowJobs

unixr

no profile record

comments

unixr
·3 anni fa·discuss
Imagine this:

You start a fresh REPL session with a vague idea of something you want to build. You have good tooling that enables you to write code in your favourite editor and pipe it to the REPL through a socket. You write a couple of functions and send them to the REPL. You call them a few times with some test arguments, maybe define a couple global variables while testing, and realize one of the functions doesn't quite behave the way you want. You tweak the code and send it again to the REPL. The function is redefined and works properly now.

You're happy with what you have for now, so you save the entire current environment of the REPL, functions and global variables and all, into a file (called an image) on your disk. The next day, you come up with a great new feature so you load up the image and continue exactly where you left off yesterday, with all your functions and even global variables as they were defined previously. You add your new feature, all while testing and tweaking your functions interactively, and then you save the new environment into an updated image. Any other code that loads that image will be able to take advantage of your updated functions and variables now.

The power of lisp is not just the fact that there's a REPL — a lot of languages have that now. It's the ability to save and reload the entire current state of the REPL (interactively or programmatically), which enables the powerful interactive development that so many lispers, including myself, rave about.
unixr
·3 anni fa·discuss
This is a terrible and very un-empathetic take. The internet would be a much more enjoyable place if we strive to make it as secure, useful, and accessible as possible to as many people as possible instead of gatekeeping it to a certain group we decide are worthy because they are capable of browsing HN with curl instead of Chrome or something like that