chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] tinyclos and the repl


From: Elf
Subject: Re: [Chicken-users] tinyclos and the repl
Date: Thu, 24 Jul 2008 08:04:22 -0700 (PDT)


(also, if you (declare (uses eval)) , theres a (repl) procedure that will handle most all of this for you, along with hooks if you want to do your
own modifications... read eval.scm in the chicken source for more details. :)

im not familiar with srfi-49, but the behaviour that i think you were describing contradicts the (read) procedure as described in r5rs: read should
return the next scheme object available on the port, updating the port's
location to exactly one char after the character ending the object. (ie, the next char, not the beginning of the next object, unless the next char
is also the next object.)

what exactly are you trying to do, if i may ask?


-elf



On Thu, 24 Jul 2008, Jörg F. Wittenberger wrote:

Am Donnerstag, den 24.07.2008, 07:19 -0700 schrieb Elf:
are you using the eval unit and using the repl function contained
therein, or
did you roll your own repl?  also, you should be able to require the
chicken-more-macros via (require 'chicken-more-macros) at the top.

Thanks a lot, the additional (require 'chicken-more-macros) right after
the (declare ...) did the trick.

(I'm using "load" as it is, so probably from eval.)

BTW: I noticed, that the SRFI-49 reference implementation (no matter how
bad that may feel on it's own - though I have a lot of single, simple
expressions embedded in XML attributes - there's it is a win for the
lazy programmer) - yeah, that implementation does not play nice with
chicken.  It assumes that it can call "read" on a port when peek-char
returns #\( and assumes that, once "read" read the expression, can
continue to read from the port right after the corresponding #\) .
Unfortunately chicken's read has already read from the port until the
next #\( - so the SRFI-49 code gets confused.  Does anybody have a nice
Scheme reader in pure Scheme or Chicken-Scheme at hand?

best regards

/Jörg

reply via email to

[Prev in Thread] Current Thread [Next in Thread]