Closed jpellegrini closed 8 months ago
Maybe some others would be interesting?
- ,apropos Search for symbol in documentation
- ,describe ,d Describe an object
- ,time Run the next expression while evaluating the time to do so
- ,require ,r Require a feature
- ,expand ,e Macroexpand a form
Those are things I usually do and would be nice to have quick access to, but maybe they're redundant, since one can also type them as Scheme forms?
By the way... It seems that the shell command ,! stklos
can be nested an arbitrarily large number of times. Quite nice! :)
And when comparing output with other Schemes, we can do things like
stklos> (+ 2 3)
5
stklos> ,! gosh
gosh$ (+ 2 3)
5
gosh$ ^D
stklos>
:grin:
I added more commands, including ,+
and ,*
(inspired by CL's +
and *
).
I only thing the time
command is not actually good, since it discards the result of the expression.
Hmm, @egallesio -- the REPL uses an output port and an error port:
(define (repl :key (in default-in)
(out default-out)
(err default-err))
.
.
.
(for-each (lambda (x) (write-shared x out) (newline out))
v))
But the REPL commands don't:
(define (do-repl-command l)
.
.
.
((pwd) (printf "~S\n" (getcwd)))
Shouldn't the REPL commands also be accepting error and output ports as arguments?
If #598 is accepted in the future, we could also include a ,manual
command... :)
describe
command may not be interesting the way it was implemented:stklos> (define x 20)
;; x
stklos> ,d x
x is a symbol, with mutable binding.
Not sure what do do here... eval
it, maybe? Would that be ok?
I have mostly applied all your propositions, but in a different manner as explained in PR #598. Thanks for all your ideas.
It looks like this PR is also not needed! :)
Hi @egallesio ! What do you think of this one?