Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Logo > Re: New Logo In...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 5 of 9 Topic 1579 of 1596
Post > Topic >>

Re: New Logo Interpreter [Help Required]

by bh@[EMAIL PROTECTED] (Brian Harvey) Apr 12, 2008 at 04:06 AM

alexmcneil@[EMAIL PROTECTED]
 writes:
>off to study CS at degree level in September... (I probably shouldn't
>be writing an interpreter at this age, its just one of those things
>i've allways wanted to do [...]

There's no "should" about it -- the worst that'll happen is that it won't
be a perfect interpreter! :-)

>I just don't know whether I have the time to wait for the ****pping
>from the US.

Sigh, okay, look in 
	http://www.cs.berkeley.edu/~bh/logoworks
and you'll find 21 jpegs of the relevant pages.  They're not perfect,
since
the book isn't bound in a way that allows for laying it flat on the
scanner,
but it'll do.  (Also, if I were more computer literate I'd have figured
out
how to eliminate all the greyscale stuff so the files would be smaller!)

> The one problem I have with your
>suggestion is that, it would mean essentially programming a lisp or
>list orientated language... Is this needed for LOGO? I know it is
>essentially LISP based but I was hoping just to store multiple repeats
>in the same array string and just evaluate by first going to the
>middle repeat E.g. REPEAT 30 [ REPEAT 20 [ REPEAT 10 [ ] ] ] and
>working backwards <<< (outwards) until I got to the last REPEAT...

You can implement lists in pretty much any language that lets you
manipulate
pointers.  But I agree that VB isn't my implementation language of choice.
It'd be much easier if you did it in Lisp!  That way you could focus your
attention on the interesting parts instead of having to invent basic data
structures.

Why are you so focused on REPEAT as a special case?  For one thing, IF and
IFELSE and TEST and RUN all use the same kind of instruction list input as
REPEAT.  But, more im****tantly, even without any of those, when you say

	forward sum 20 30

the EVAL of that instruction requires an EVAL of the subexpression

	sum 20 30

If you use infix arithmetic, it's just that much harder to find the right
subexpression to evaluate next.

>Anyway, Thanks for your help so far... One final point, If I won't be
>able to get that book, is there a chance I could find something
>similar that could teach me the basics? (preferably available for free
>in electronic form)

It depends what you mean by "basics."  What you /really/ should read is
the
best computer science book ever written, _Structure and Interpretation of
Computer Programs_ by Abelson and Sussman and Sussman, which will teach
you
the hidden mysteries of interpreters.  But it's not an easy read.  But it
/is/ available free online:

	http://mitpress.mit.edu/sicp/full-text/book/book.html

P.S.  Be sure to come to the Eurologo conference next summer (2009) in
Paris!
 




 9 Posts in Topic:
New Logo Interpreter [Help Required]
alexmcneil@[EMAIL PROTECT  2008-04-10 12:56:33 
Re: New Logo Interpreter [Help Required]
alexmcneil@[EMAIL PROTECT  2008-04-10 12:59:16 
Re: New Logo Interpreter [Help Required]
bh@[EMAIL PROTECTED] (Br  2008-04-11 04:22:48 
Re: New Logo Interpreter [Help Required]
alexmcneil@[EMAIL PROTECT  2008-04-11 10:42:32 
Re: New Logo Interpreter [Help Required]
bh@[EMAIL PROTECTED] (Br  2008-04-12 04:06:53 
Re: New Logo Interpreter [Help Required]
alexmcneil@[EMAIL PROTECT  2008-04-16 06:20:18 
Re: New Logo Interpreter [Help Required]
bh@[EMAIL PROTECTED] (Br  2008-04-16 14:20:13 
Re: New Logo Interpreter [Help Required]
alexmcneil@[EMAIL PROTECT  2008-04-19 02:31:40 
Re: New Logo Interpreter [Help Required]
bh@[EMAIL PROTECTED] (Br  2008-04-19 15:57:25 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Jul 26 5:09:13 CDT 2008.