Lisp Dialects & Interpreters in Games
For the Lisp interpreter I was writing before entering a black hole of a project, I only defined the basic functionality such as car, cdr and other very primitive functions in C++. Everything else was written and interpreted in my Lisp in terms of these primitives. In that way isn''t Common Lisp sort of scheme with a huge library of functionality bundled with it? In that case I think that you''d obviously forego the massive package that is CL in favor of scheme, but then wouldn''t you effectively be using a smaller Lisp (not going into arguments about the differences between the two) and rewriting the parts of the functionality you need?
If a plant cannot live according to its nature, it dies; so a man.
Woodman: Yes, CL is mostly defined by the libraries that come with it. But even trimming all the libraries from CL doesn''t give Scheme. From reading that link I posted last, there are subtle differences in the design of Scheme and Lisp as basic interpreters and environments. For example, Lisp has a different address space for variables and functions. Scheme also has hieginic macros (I''m not sure they are hieginic in Lisp)... I''m still reading, i''ll let you know what else
.
Anyway, the choice between low-fat lisp and scheme is much harder than Scheme vs. CL. I quite like the design principles that went into Scheme though...

Anyway, the choice between low-fat lisp and scheme is much harder than Scheme vs. CL. I quite like the design principles that went into Scheme though...
Join us in Vienna for the nucl.ai Conference 2015, on July 20-22... Don't miss it!
Well, in my case, I wrote a Lisp interpreter, not a compiler. It was a very good interpreter, but it was an interpreter nonetheless. So it was better for me to write most of the commonly-used functions in C.
Besides, a lot of the libraries are for I/O.
- Josh
Besides, a lot of the libraries are for I/O.
- Josh
quote:
Original post by alexjc
I''m still reading, i''ll let you know what else.
Great! I''m bogged down in a CL/C++ program at present and I''m trying to pick up a little x86 assembly on the side but I''ve been meaning to start The Structure and Interpretation of Computer Programs (using Scheme) so this may get me to just that. Hopefully it discussses such aspects of Scheme.
If a plant cannot live according to its nature, it dies; so a man.
(princ(substitute #\Space #\0(format()"~36R"5688852237040631986030796883)))
If a plant cannot live according to its nature, it dies; so a man.
For my interests (low download-size shareware games) I''m afraid Lisp is out of the question. I also dread having to solve all the dreary technical details all over again..
I''ve briefly skimmed over some Scheme implementations I can then embed in a C program, and I think I''ll stick with SIOD (the one they use in GIMP). One thought: though SIOD is a limited version of Scheme (it doesn''t seem to have macros), it should still be possible to make a Lisp program that acts as an extra layer taking as input source files in a custom Scheme-like language and outputs Scheme code SIOD understands.
I''ve briefly skimmed over some Scheme implementations I can then embed in a C program, and I think I''ll stick with SIOD (the one they use in GIMP). One thought: though SIOD is a limited version of Scheme (it doesn''t seem to have macros), it should still be possible to make a Lisp program that acts as an extra layer taking as input source files in a custom Scheme-like language and outputs Scheme code SIOD understands.
quote:It''s probably only as out of the question as Java. Once you have the runtime environment, everything else is an acceptable size. Except Java had a design goal of compiling to a very small amount of code and Lisp had a design goal of being good. If you really wanted, you could write come CL macros to compile your s-expressions to Java bytecode. I''d also be suprised if someone hasn''t already done that.
Original post by Diodor
For my interests (low download-size shareware games) I''m afraid Lisp is out of the question. I also dread having to solve all the dreary technical details all over again..
Yes, Java is out of the question too. I can''t throw away 20% of the customers (I don''t know if Java is available on 80% of the computers - I suppose it''s less), nor do I trust to make a program for Java runtime versions I haven''t tested it on.
flangazor, scheme is better suited to being compiled to java byte-code because it''s easier to implement. See Kawa.
Join us in Vienna for the nucl.ai Conference 2015, on July 20-22... Don't miss it!
Here''s a lightweight S-expression parser:
http://sexpr.sourceforge.net/
It doesn''t cover all valid S-expressions, but it''s fast. Worth looking into.
http://sexpr.sourceforge.net/
It doesn''t cover all valid S-expressions, but it''s fast. Worth looking into.
Join us in Vienna for the nucl.ai Conference 2015, on July 20-22... Don't miss it!
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement