Archived

This topic is now archived and is closed to further replies.

LISP like interpretter

This topic is 5111 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I''m thinking about making a LISP like interpretter for basic scripting purposes, most likely for a game. I''m debating about implementing some features of Common LISP however, so I thought I''d ask people what they thought. Basically, I''m thinking about not doing: - big numbers (I''m using int64''s now) - complex numbers (for games?!) - perfect compliance with things like eq - bit strings - a few others... So, for in game scripting, should I actually bother to implement these?

Share this post


Link to post
Share on other sites
It depends on what type of game you are making.

If its a game like Stock Market Kid then you need bignums to represent large numbers for when I get the power up and win the game since I will have 52785276827562075682 USD.

[edited by - flangazor on December 16, 2003 12:32:57 PM]

Share this post


Link to post
Share on other sites
I''m actually working on a Lisp interpreter now. What type of game is it? All in all, I think you could get away with not implementing those features, as its really up to you what you need anyway. Cheers.


If a plant cannot live according to its nature, it dies; so a man.

Share this post


Link to post
Share on other sites
Really, I''d suggest you just implement types/functions/macros/etc as you find need for them. If you wrote it to be modular, it shouldn''t be too difficult, and it saves time if you end up not needing something. Off gut feeling, I''d say you probably wont need the things you listed. You don''t need Common Lisp for a simple scripting language. If you decide you want a bit string for ex, you could just use an array of boolean values (or even integers with 0/1). I think a lot of the functionality of Common Lisp is a holdover from ways of the past(or some other issue that you don''t have) and unless your purpose is implementing Common Lisp, just put in whatever you feel like. Just keep the syntax, macros, ''eval'' and a few other things and you should be good to go for a powerful scripting language. You might want to browse through Common Lisp the Language, 2nd Edition if you haven''t already and read the suggestions/ideas/etc put in there. A lot of things were up for change when it was written, and some of them that weren''t chosen would make for a better language imo.

Share this post


Link to post
Share on other sites