Re: eval use ?



In article <1140929811.970351.270010
@e56g2000cwe.googlegroups.com>, amit_h123@xxxxxxxxxxx says...

hello,
i am just tryin to learn lisp from robert wilensky's common lispcraft.
But i am all stuck at the eval function use ..can somebody help me out
what does exactly eval is used for specially can you give me some
examples of complex code where it is being use.. coz its like i can get
the simpler examples but not gettin it utility for complex thinkgs
where it can be used..

Just two examples from my practice - imagine that you write
screen saver, and you want to write program that calculate and
draw some cute 3d objects on the base of random ... formula.
Now, the problem - how to represent formulas? The simplest
answer is to represent them as expressions in the programming
language and evaluate as needed.

Or, second example - imagine that you want to write program
that process Boolean formulas. How will you represent that
formula? It is best to represent them as Lisp expression and in
that case, from time to time, it will be very handy to simply
EVALuate such formula.

I can describe few other problems from top of my mind. Of
course, all this can be done without EVAL, hey, everything can
be done in C. Just data structures and algorithms one develop
with time start to look like interpreter.

EVAL and whole code=data idea is somehow marginalized and
underdeveloped in Lisp. Scheme has better EVAL than Lisp.
However, representation of code as single linked list was
adequate in 1960's when memory was sparse, but it is kinda
obsolete today.


.



Relevant Pages

  • Clipboard Access on Windows
    ... would love to hack it in Lisp, but want to see the lay of the land ... concreteness, imagine a Windows PC, and imagine that I run applications ... imagine that whenever I select some text/images/etc in any of the apps ... application-specific tools like a Firefox extension, ...
    (comp.lang.lisp)
  • Re: Understanding # and function variables
    ... > s-expressions, lisp can't ignore them like Java does. ... > return them from functions or whatever you imagine. ...
    (comp.lang.lisp)
  • Re: Handling Complexity Using Lisp
    ... wrong things about Lisp; just as I did. ... this fix is not possible because it would break .. ... asking all the right questions about a language. ... ability to imagine a better solution and ask "why not this?". ...
    (comp.lang.lisp)
  • Re: eval use ?
    ... i am just tryin to learn lisp from robert wilensky's common lispcraft. ... Just two examples from my practice - imagine that you write ... screen saver, and you want to write program that calculate and ... It is best to represent them as Lisp expression and in ...
    (comp.lang.lisp)
  • Re: Style suggestions?
    ... It struck me that our forefathers had some really great ideas when it came to computing; but somehow the computing world has converged on the worst possible solution to a problem. ... In my minds eye I can imagine a computer that's the size of a house brick, has a froody OS that is based on something like Forth, Lisp or maybe Smalltalk; hardware that "just works" and doesn't require drivers, and you can connect to the internet, and has a graphics display. ... When you write software for a client, you take one of these machines off the shelf, write your software, and then hand the machine over to the client, who then just plugs it into the network. ...
    (comp.lang.forth)