[slimpl] The REPL has landed
Brad Beveridge
brad.beveridge at gmail.com
Wed Jan 25 10:16:11 CST 2006
That is super cool!!
Cheers
Brad
On 1/24/06, Larry Clapp <larry at theclapp.org> wrote:
> Hi, all,
>
> I still have some test cases to write, but I got a REPL talking to a
> real Lisp:
>
> use slimpl;
>
> [...]
>
> # Set up a slimpl object.
> my $s = slimpl->new();
> $s->connect( "localhost", 4005 );
> $s->select_connection();
>
> while (1) {
> # print a prompt
> print "> ";
>
> # read a 1-line s-expr
> my $expr = <>; chomp $expr;
>
> # quit?
> last if $expr eq 'q';
>
> # eval the expr
> my $val = $s->eval( [ symbol( "swank:interactive-eval" ), $expr ] );
>
> # print the result
> print "result is $val\n";
> }
>
> Short transcript:
>
> > (+ 1 10)
> result is => 11 (#xB, #o13, #b1011)
> > q
>
> Time permitting, I hope to release some code & documentation this
> weekend.
>
> -- Larry
>
> _______________________________________________
> slimpl mailing list
> slimpl at lispniks.com
> http://www.lispniks.com/mailman/listinfo/slimpl
>
More information about the slimpl
mailing list