An updated list of Open Source Projects
A Stack-Oriented Imperative Programming Language.
MontiLang is similar to other Stack-Oriented languages such as Forth, in that almost every statement refers to a command which can push a value to the parameter stack, or modify the stack in some way. Unlike other similar Concatenative languages such as Forth, Cat and joy, MontiLang has many constructs from programming languages with vastly different designs, such as the use of preprocessor statements, user defined commands and variables of different data types.
Here is FizzBuzz written in MontiLang as an example:
/# loops through numbers 1-100. Prints 'Fizz' if it is a multiple of 3, 'Buzz' if it is a multiple of 5, 'FizzBuzz' if it is a multiple of both, or the number if neither #/ &DEFINE LOOP 100& 1 VAR i . FOR LOOP || VAR ln . i 5 % 0 == IF : . ln |Buzz| + VAR ln . ENDIF i 3 % 0 == IF : . ln |Fizz| + VAR ln . ENDIF ln || == IF : . i PRINT . ENDIF ln || != IF : . ln PRINT . ENDIF i 1 + VAR i . ENDFOR
View more examples of MontiLang on RosettaCode
An Intuitive Minimilistic framework for creating dynamic websites with almost no boilerplate code.
PyMinServer is designed to be easy to implement in any situation or project. It is simple and intuitive, allowing the easy creation of a dynamic website, a RESTful API, or any similar project.
PyMinServer is used to dynamically generate html based on two parameters.
request being the request path associated with a
GET request, and
**headers being the header information associated with the request
(Accept-Language, Accept-Encoding, Host, Accept, User-Agent, DNT, Connection, Cache-Control, Upgrade-Insecure-Requests).
Using PyMinServer is simple, here’s an example:
import pyminserver def main(request, **headers): return "<h1>hello world!</h1>" if __name__ == "__main__": pyminserver.start(port=4000) #default port is 80 if none is specified
pyminserver.start() does not have to be in a
if __name__ == "__main__" conditional, but it is recommended.
Here is a more dynamic example:
import pyminserver def main(request, **headers): request = request[1:] if request in ["", "index", "index.html", "index.htm"]: return "<h1>index of site</h1>" elif request in ["about", "about.html", "about.htm"]: return "<h1>about page</h1>" elif request == "favicon.ico": return open("icon.png", "rb") else: return "<h1>404, file not found</h1>" if __name__ == "__main__": pyminserver.start()
PyMinServer also has support for
POST requests, by simply adding another function