GML is a better-designed Web language suite, designed for efficiency, simplicity, elegance, and flexibility.
it's designed with the current state of the Web as a priority, instead of trying to make a text markup language function as a layout engine, along with being backwards compatible for over 20 years.
See here if it's unclear why. This is just the natural result of forcing an XML-based text markup language to be a whole layout engine along with being backwards compatible for over 20 years; not to mention having to be the sole backbone of a Web page. HTML is still very useful, and nowhere near as bad as it could be! But something designed with the current state of the Web (and also system application UI, too) in mind will naturally be more tuned to the needs of developers, users, and readers.
Not what you can make with it, there are a lot of things you can make with it! (Check out CSS Zen Garden if you wanna see some fantastic creations)
It's the syntax that's ugly, confusing to beginners, and again, forced to be backwards-compatible over 20 years.
You have flexboxes and grids, justify- and align- self-, content- and items- (what's the difference between content and items?). You have parents changing the child's size and children changing the parent's size; even so much that the simple act of centering a div has become a famous roadblock. Plus, different browsers support different feature sets, so sites do not work the same across various browsers.
No explanation necessary.
We like hide this messiness behind framework after framework, but a system is only as reliable as its foundation, and a simple, solid base would make everything built atop it much more manageable.
Plus, it's just plain fun to write languages!
GML is more a suite than a language, encompassing GML, GATTR, and GMLOAD, along with an unspecified-as-of-yet scripting language, to be decided upon later (but it's probably Rust)
The entire design, logic, and implementation of GML is entirely written by human hands, or generated by hard-coded template systems designed with intent. No probabilistic generative black-box AI used here, just obsessive human nerdiness. The Web was made for humans (though it sure doesn't seem like it, JavaScript could be used as a type of torture)
Features include:
- a built in component system
- an incredibly simple syntax
- a simple but immensely powerful attribute system
- extensive control over asset loading
GML is focused on extensive features, modularity, abstraction, funny comments, writing itself in itself, and above all, simplicity.
GML syntax is straightforward:
page {
// This is a comment, in case you weren't sure
navigation-menu (border-color(red)) {
menu-option (link("https://example.com/home)) {"Home"}
menu-option (link("https://www.purelyhuman.xyz/artists/JoshuaWard)) {"Art"}
menu-option (link("https://example.com/store)) {"Store"}
menu-option (link("https://example.com/games)) {"Games"}
menu-option (link("https://example.com/about)) {"About"}
}
/*
This is the comment that never ends,
yes it goes on and on my friends,
you poor fool started reading it,
not knowing what it was,
and you will keep on reading it
forever just because
*/
content {
canvas-title {"Draw on the canvas!"}
canvas (main-canvas) {}
subtitle {"Copyright 1995 BananaHead Systems, Ltd.}
}
}
The loading of assets is handled by GMLOAD, with extensive control over order and priority:
// We load a loading page first
https://example.com/loading-page
// This block loads second
{
// We here load some basic assets
https://example.com/page-source
style: https://example.com/basic-style
font: https://example.com/basic-font
}
// Third, we load whatever localized profile image is faster
profile-image: (
https://example.com.uk/profile-image
https://example.com.us/profile-image
https://example.com.ch/profile-image
)
// Finally, we load a better font and style
[
// These fields replace the old font and style fields
font: https://example.com/better-font
style: https://example.com/better-style
]
The styling, scripting, component design, and practically everything else is managed by the (elegantly designed!) (self-referential!) (modular!) (immensely powerful!) GATTR language:
(menu-option) {
border-color("red");
color("blue");
}
canvas-title {
title();
color("red");
}
And that's all there is to it!
... In case you were wondering, centering a div in GML is done in this way:
box (rows([; ; ;])) {
inner-box {}
}
Or alternatively:
box (center) {
inner-box {}
}
Fun! This project is there to fulfill the human desire to make things clean, simple, and efficient, and who knows? Maybe find some sort of practical application someday, if it ever ends up with enough features to be useful.
- Do you wanna obsess over the little details? Do you have some problems with Web design?
- Do you know a lot about Web design that would fill in the knowledge gaps of the current contributors to this spec and make the GML suite much more relevant to people like you?
- Do you like Markdown somewhat?
The answer may be yes!
Click on this link to check out our presentation for newcomers.
Then check out CONTRIBUTING.md to get started!
Do keep in mind that some things may be a bit vague, as GML is a developing language, and many thanks.