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

Re: What?



In article <200208111149.g7BBnba3015457@life.ai.mit.edu>,
 Gabor Greif <gabor@mac.com> wrote:

> >> Scheme for basic semantics.
> >
> > What is that exactly? Lisp1, tail-recursion, "?" naming convention for
> > predicates. What else?
> 
> No special function bindings, i.e. literal lambdas.

That's the "Lisp1".

> "!" for mutating 
> operations,
> but not always. "-setter" is also indicating mutation.
> 
> >
> >> Common Lisp Object System (CLOS) for the object system, and exception
> >> handling.
> >
> > What about: parameter list , keywords, numerics, setters,
> > multiple values, lots of the library functions, ... ?
> > Looks a lot like Common Lisp to me.
> 
> The numeric tower is scheme-like.

Wasn't the Scheme numeric tower also taken from CL? ;-)

> > (defmethod read-lines ((stream stream))
> >   (loop for line = (read-line stream nil nil)
> >         while line collect line))
> 
> Something like this would be interesting:
> 
> define method read-lines ( stream )
>    choose-until(identity, lazy-sequence(curry(read-line, stream, 
> on-end-of-stream: #f )))
> end;
> 
> With appropriate definitions of choose-until and lazy-sequence.

Using the series package from Richard Waters it would be something
like this (just a raw version):

(defun sum-stream (stream)
  (series:collect-sum
   (series:map-fn 'string
                  #'parse-integer
                  (series:scan-fn t
                                  (lambda ()
                                    (read-line stream nil nil))
                                  (lambda (ignore)
                                    (read-line stream nil nil))
                                  #'null))))

> Actually it is an interactive listener/interpreter similar to the 
> AppleDylan and Fun-O listeners.
> It is in an embryonal state right now. We intend it to be invocable from 
> the macro expander too.
> We do not plan to adapt the CL(ish) syntax.

It would be like bringing back the prefix Dylan feeling. ;-)

Rainer Joswig