What is the most advanced or creative program you can create using the LOX programming language?

TheFireTheft
2023-06-28T16:44:05Z

Lox is a toy programming language that is designed in Java and C at craftinginterpreters.com.

My challenge to you is: given the constraints of the Lox language, what are some creative or advanced programs you can create?

This page provides a rundown of the design of Lox.

To kick it off, here's a simple function that estimates the value of pi:

fun estimatePi(rounds) {
	var pi = 0;
	var alt = 1;
	for (var i = 0; i < rounds; i = i + 1) {
		pi = pi + alt * 4/(2 * i + 1);
		alt = -alt;
	}
	return pi;
}

print "The value of pi is:";
print getPi(100000);

Comments URL: https://tildes.net/~comp/174s/what_is_the_most_advanced_or_creative_program_you_can_create_using_the_lox_programming_language

Votes: 3

Comments: 4