For the past three months, I have been developing a prototype for a new
programming language called P* (P-star). The language targets to make
life easier when it comes to web programming. P* has in-language syntax
for things like SQL prepared statements and HTML templates.
The P* interpreter is written in C++11, and currently implements enough
language features to create full web pages. The codebase is about 10 000
lines, and it's only tested on Debian.
Maybe you will find this project interesting and can join in to develop
P* further. You can also try running it, creating a few web pages and
finding some bugs.
I could also need som help with project management, as I'm used to
managing only myself :).
P* language details :
- Basic syntax based on the C language
- Run as scripts by the interpreter (written in C++11)
- User must define types for variables, but conversion between
primitives is done implicitly
- Support for dynamic arrays and hash maps
- In-lanugage string type with concatenation operator and double quote
variable interpolation
- Special SCENE blocks are used instead of classes and functions for the
main blocks of the program.
- Special HTML_TEMPLATE blocks are used to hold HTML code, these support
advanced interpolation
- Special blocks inherit the namespace with all variables from where
they are called
- JSON output of variables from HTML templates with automatic
recognition of HTML element IDs.
- MySQL database access with simple syntax for prepared statements
- Not full object-orientation support yet, but structs with functions
are supported
P* Hello World!
#!/usr/bin/wpl -f
SCENE main {
echo "Hello World!\n";
}
Please visit the web page and check-out the documentation. It covers
most of the language with examples.
http://www.p-star.org
The code is GPLv3-licenced, and is available on Github:
https://github.com/atlesn/P-star
I have created two mailing lists, one for developers and one for users:
p-star-...@googlegroups.com
p-star-us...@googlegroups.com
Please let me know if you find P* interesting, or if you have any
suggestions.
Thank you
Atle Solbakken|
|