Jump to content
  • Advertisement
Sign in to follow this  
claesson92

Tiny interpreter/compiler

This topic is 3984 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

Advertisement
Interpreter and compiler are two completely different things, and media it's stored on is irrelevant.

It's the platform you want to run it on that matters.

For example, a complex Java application will be <100kb in size (GUI and all). But the run-time can be 15Mb, but you can assume it's installed on the host machine.

On the other hand, VC++ will produce an executable 8Kb in size, but the compiler platform is 300Mb.

An example would be also Java ring, which has a total 128kb memory (working and storage), but runs Java standard compliant JVM.

Share this post


Link to post
Share on other sites
Quote:
Original post by hydroo
luas interpreter is 100kb afaik.


Apparently Lua's interpreter is only ~40K, the rest is the parser/compiler...

Share this post


Link to post
Share on other sites
Depends on what you need. The Caml Light installer is 1.55 Mb, and you could certainly rip out some of the useless data to lose a few hundred kilobytes. tinycc is around 100 kilobytes and compiles C code. javascript can be executed in any compliant browser (which most platforms have). Also, your typical linux install comes with a C compiler by default, to compile relevant things from source.

Share this post


Link to post
Share on other sites
It's pretty trivial to write a brainf*ck interpreter that's only a few Kb. The utility of such a beast remains somewhat questionable, however :)

Edit: realistically, I would also suggest looking in to Lua.

Edd

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!