Marco Antoniotti <marcoxa@gmail.com> wrote:
+---------------
| rpw3@rpw3.org (Rob Warnock) wrote:
| > "OPFR" == "Outer-Parenthesis-Free REPL". It's a meme/pattern/library(?)...
| > ...a command-line reader that wrap a set of parens around whatever the
| > user types and then passes that to EVAL [with some minor tweaks so the
| > most common cases "do the right thing"]. ...
...
|
| Ok. I use it pretty often in LW. It does exactly that.
+---------------
Interesting. A couple of questions about the LW version:
- Will it let you continue a line? E.g.,
opfr> + 1 2 \
3 4
10
opfr>
- OPFR tries to guess whether a single symbol on a line is a function
or a value and "do the right thing". This creates an ambiguity if
a symbol has both a functional and variable value. OPFR favors the
functional value, since you can always get the variable value by
prefixing it with VALUES, e.g.:
opfr> get-universal-time
3443692633
opfr> most-positive-fixnum
536870911
opfr> defun foo () "A function value"
FOO
opfr> defvar foo "A variable value"
FOO
opfr> foo
"A function value"
opfr> values foo
"A variable value"
opfr>
How does LW handle that?
- Because of the previous, one can overload naked keywords as "commands",
if one likes. OPFR currently uses only :Q (and :QUIT), but others
could be added easily. Does LW do anything like that?
-Rob
-----
Rob Warnock <rpw3@rpw3.org>
627 26th Avenue <URL:http://rpw3.org/>
San Mateo, CA 94403 (650)572-2607