That is to say, source code which gets translated into Lua, and then run by ZDoom? Or Lua code that gets translated into something ZDoom can run? Because the second scenario barely makes any sense at all, and as for the first, it's a little roundabouts and it doesn't solve Graf's problem in that engine is still internally dealing with Lua.Doomguy0505 wrote:We could make an intermediate language and use an external compiler.
That's the point of Esotoric Programming Languages -- Some of them are designed to be as obfuscated (difficult to read) as possible. And I'd say Malbolge wins at that. XDDoomguy0505 wrote:That's like Brain rape!
"""Print a smooth sine from 0.0 to 1.0 and wait 1/35th sec. between each print.
A very simple, fully working Python example."""
from math import sin, radians
from time import sleep
TIC = 0.0266666666667 # This is *pretty much* 1/35th of a second as far as my guesses go.
angle = 0
while angle < 90:
print sin(radians(angle)) # sin() takes radians, not degrees.
angle += 3
sleep(TIC)
print "Finished."
randy wrote:What's so unreadable about it? It's perfectly understandable to me. And the "problems" of dynamic typing aren't obvious either. You still get type-checking, just at run-time instead of compile-time.
Need I also mention that OBLIGE is written primarily in Lua?
randy wrote:What's so unreadable about it? It's perfectly understandable to me. And the "problems" of dynamic typing aren't obvious either. You still get type-checking, just at run-time instead of compile-time.
Need I also mention that OBLIGE is written primarily in Lua?
Doomguy0505 wrote:Is there a p-code version of Lua or anything like that?
randy wrote:It'd be easier to write a new one from scratch. It's not too hard to write a compiler. Some time back, I whipped up a working prototype in a single week. (Unfortunately, the language it compiled was too underspecified, so all the work went to waste. e.g. It had no functions and no easy way to add them, so it wasn't good for much.)
Graf Zahl wrote:I think what should be done first is to collect a list of language features that would be useful. Obviously the language doesn't need to be able to handle everything C can do but on the other hand should be able to make interfacing Doom's engine capabilities easier.
bool: bool var;
int: int var;
name: name var;
float: float var;
string: string var;
class: class</parentclass/> var;
struct: /structname/ var;
object: /classname/ var;
array: array</type/> var;
static array: /type/[/count/] var;
map: map</keytype/, /valuetype/> var;
delegate: delegate /type/ var (/args/);
actor Something
{
states
{
Spawn:
SOME A 1
SOME A 0 {
if (something)
do something;
do another something;
}
loop
}
}Users browsing this forum: Yandex [Bot] and 0 guests