🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Are you tired of reading about Epoch yet?

Published August 03, 2008
Advertisement
More progress today; the conversion from a standalone EXE to a DLL has been completed, and the menu has been moved to a small client program that launches the VM DLL in order to execute code. This makes it a trivial step to extend that to embedding VM binary code in a stub EXE, as I've detailed earlier.

Another big thing is that functions can pass their values around to each other, and return values correctly. This makes the following code possible:

entrypoint : () -> (){	integer(foo, 0)	assign(foo, quuxfunction(lexicalcast(integer, debugreadstring())))	debugwritestring(lexicalcast(string, foo))}quuxfunction : (integer var) -> (integer){	add(var, 41)}


Evaluation is lazy; if quuxfunction never accessed var, then the call to debugreadstring would never be evaluated.


Other than that, I've made lots of little tiny tweaks and additions. There's enough major stuff ready that it's probably worth doing another release soon, just to add to the available things for people to toy with (assuming anyone actually is toying with it, of course).


Oh, and the answer to yesterday's challenge question: Visual Basic 3. VB3 ran almost exactly the same pseudo-code scheme I'm working up, down to the shared interpreter DLL. Things changed a bit (IIRC) in VB5 when native code compilation was introduced, but even through VB6 it was necessary to ship the helper DLL with any programs written in the language.
0 likes 2 comments

Comments

evolutional
Cool. What's the plan for adding user-defined types?
August 04, 2008 07:42 AM
ApochPiQ
My plan is for a pretty rich type system, but the details of how to implement it are kind of foggy right now. Once I have some actual specifics I'll probably do a large post on exactly how I plan to make it work.

In brief, though, I expect to support three different sorts of types:
  • Primitive types like integers with specific bit widths

  • "Unit-annotated" primitive types like feet, inches, etc. with dimensional analysis support for converting between units

  • Structures, both with specified bitwise layouts and automatically decided layouts


Functions can be attached to any type, including the built-in primitive types. I haven't sorted out the specifics of object support yet, but it'll be pretty rich as well.

So obviously the type system represents one of the biggest bits of work in the language - aside from the processing model stuff, it's probably the most significant challenge.
August 04, 2008 09:14 AM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement
Advertisement