Scheme Script

Started by
25 comments, last by PeterTarkus 19 years, 11 months ago
Hi Folks, I have been toying with a few script languages. I have decided though I am going to spend all my effort on building a Scheme setup specifically for game programming. I have been thinking of taking Tiny Scheme and working with it to build it into a small Game programming system by connecting it to SDL or other libraries. If I can get it to run an asteroids game it is a good start :-) I am curious how many people are interested in seeing Scheme become more popular for game programming. If we had a decent system I think it would rock. Peace->Out
Advertisement
The only problem I see with Scheme is that the functional programming paradigm isn''t exactly easy for non-programmers (the main audience for scripting languages) to grasp.
Scheme can be written in a non-functional style. Try taking a look some of the script-fu that was done for Gimp. (Or if you''re a functional language purist, don''t, because it will set you on fire.)
I think more to the point is the terseness of the usual Scheme syntax, not exactly human friendly (and if you argue - YOU AREN''T HUMAN! ).
Well, if you took away the ( ) and allowed infix (C style) notations what you would get would look alot like Python :-)

define foo(x):
if(x = 1):
return 1
else:
return foo( x - 1 )

You could hack it in scheme to parse this structure into Scheme code.

In fact I say Python is really just a mutated Scheme!
quote:Original post by PeterTarkus
I have been toying with a few script languages. I have decided though I am going to spend all my effort on building a Scheme setup specifically for game programming.


Scheme is one of those languages which shouldn't really be called a scripting language. As others have pointed out here and elsewhere) Scheme/Lisp isn't very readable for one. I guess you'll have to choose who your target audience is; it shouldn't be game designers, artists or other non-(real)-programmers. You'll also find some programmers are put off, just because it's Scheme; mainly because they've never come across such a radically different syntax.

See the Scripting Language Proposal thread.

You probably change your mindset and design a *programming* language for *programmers*. I'm not sure this is the right forum for discussing that?

Interestingly enough, Scheme or Lisp is a pretty good language to design and implement a scripting language in; you get some tools straight out of the box; read, eval. For this sort of thing I recommend this text, which has been my faithful friend over the years. He describes modern languages using a Lisp like interpreter, which is written in Pascal.


Programming Languages: An interpreter-Based Approach, Samuel N. Kamin, Addison-Wesley


--
Harvey Thompson (aka Viper)
Software Engineer/Games Researcher, UK.

[edited by - Viper3369 on April 23, 2004 8:37:56 AM]

[edited by - Viper3369 on April 23, 2004 8:39:40 AM]
I know of only 1 game that used a Lisp interpreter for scripting.

I agree Scheme is hard to read but it is not a difficult language, no more difficult than any of the other scripting languages. I could easily argue that Python is a programmers language too.

My definition of a script language might be different than yours.
Scheme is not as big as Lisp. Compared to Lisp Scheme *is* a scripting language in my eyes. You can prototype very fast in the language. You can use the REPL to alter the behavior of objects dynamically. It is extremely small and embeddable and can connect to C/C++ through FFI.

I don''t think I have violated the integrity of this forum with my proposal. I was meaning to find out how many others might be interested in such a thing. Apparently, not many :-)

Close the thread...

Peace
One last thing:
quote:...I think that if you try to ignore the fact that millions of programmers around the world have learned lisp and don''t prefer to use it, you''re in the land of morbid cognitive dissonance.
I wonder where you found that quote :-)

Well, maybe I can take it to a different direction. Instead of using Scheme as the script language, instead use Scheme to build script languages both dynamically and statically.

I am working around the details, perhaps in the future some people might be interested and I will make a tutorial on how to use tiny-scheme to build custom mini-languages for their projects.

The nice thing about Tiny Scheme is it supports dynamic loading so you could say (dynamic-load (library)) and plop, all your C functions have been embedded into the interpreter. Than you just whip up a top level loop to interpret the syntax of your script language :-)

See yah guys
Scheme is an extremely good choice in my opinion. Its syntax is the simplest of any programming language, its semantics fit in 55 pages (slimmest standard of any programming language), many people have been exposed to Scheme in college and Scheme is just fun

This topic is closed to new replies.

Advertisement