Email or username:

Password:

Forgot your password?
Top-level
lispm

@snyssfx when you call "ls" in a shell, then it takes an executable file named "ls" in a search path. It calls the executable. Combining two executables could be done like by piping the output of "ls" into the input of "grep".

The REPL is a Lisp function, which read an s-expression (atoms and nested lists), evaluates it, prints the result as an s-expression and loops. By default any Function called by the evaluator is not an external program, but resides and executes in the same memory space.

1 comment
Gleb Zakharov

@lispm got it, it looks like I can emulate part of REPL functionality on Bash if we are not considering the serialization part. And this is how shells in terminals works.

But differences arise when one need to change a runtime state of the program, for example. In Bash (and Unix) it can be done with signals, but it's just not flexible enough.

And also the difference is that REPL separates serialization and evaluation, and shells are not, and thus it's much harder to tinker with shells.

Go Up