Re: s48_extract_string?
Richard Kelsey <[email protected]>
| Newsgroups | gmane.lisp.scheme.scheme48 |
|---|---|
| Message-ID | <[email protected]> |
Date: Tue, 3 Mar 2009 07:17:15 -0500 From: Donald Allen <[email protected]> So in "Command Programs", commands, normally typed at the REPL in ",command args" syntax are now in s-exp syntax and s-expressions need to be wrapped in run in order to be evaluated properly? "Command Programs" are just Scheme programs that have access to procedures that correspond to the commands. The 'run' is needed to evaluate expressions in the current user environment. If you just want to evaluate them in the exec package you don't need the 'run'. > ,exec (let ((a '(2 3))) (apply + a)) 5 > When your program (open 'external-calls) (open 'load-dynamic-externals) (load-dynamic-externals ...) gets evaluated in the 'exec' package, 'open' is a procedure that, like the ,open command, opens a package in the current user package. 'load-dynamic-externals' is free in the 'exec' package, which is where the program is running. It's bound in the user package, and (run '(load-dynamic-externals ...)) is one way to evaluate the expression in that package. When there's REPL code that already distinguishes quite nicely between commands and s-expressions? Why wasn't the latter used to read from a file, so that "command programs" would have the same syntax as accepted by the REPL, instead of introducing this grossly underdocumented new command language? It isn't a new language at all, which is why there is no documentation for it. The language is Scheme, with some additional functions added. I believe that Scheme is adequately documented. It may be that the additional functions in the exec package could use additional documentation, but that doesn't seem to be the problem you are running into. -Richard Kelsey