fushra / meml-standard Goto Github PK
View Code? Open in Web Editor NEWMEML is a simple LISP-like markup language that translates into HTML/CSS
Home Page: https://meml.fivnex.co
License: GNU Affero General Public License v3.0
MEML is a simple LISP-like markup language that translates into HTML/CSS
Home Page: https://meml.fivnex.co
License: GNU Affero General Public License v3.0
This is an issue tracker for language design around basic SSR, similar to handlebars or pug. Before SSR will be usable, a number of language design decisions need to be made.
There a number of different methods that could be used to specify what MEML should be rendered.
Just pass a MEML file and dump an object into its scope. For example with the following MEML file.
(head
(title "" page " | Fushra")
)
(body
(h1 "Hello " username)
)
Which in JS could be used like:
import { page } from 'meml-ssr'
// Scan and parse on program start
const home = page('./src/index.meml')
app.get('/', (req, res) => {
res.send(home({ page: 'Home', username: 'trickypr' }))
})
Would output:
<!DOCTYPE html>
<html>
<head>
<title>Home | Fushra</title>
</head>
<body>
<h1>Hello trickypr</h1>
</body>
</html>
Advantages:
In your SSR application you can execute components at any time. For example, the following MEML:
(component Home (page, username) (
(head
(title "" page " | Fushra")
)
(body
(h1 "Hello " username)
)
))
(component Logout (page, username) (
(head
(title "" page " | Fushra")
)
(body
(h1 "Goodbye " username)
)
))
(export (Home, Logout))
Which in JS could be used like:
import { page } from 'meml-ssr'
// Scan and parse on program start
const { Home, Logout } = page('./src/index.meml')
app.get('/', (req, res) => {
res.send(Home({ page: 'Home', username: 'trickypr' }))
// or
res.send(Home('Home', 'trickypr'}))
})
Would output:
<!DOCTYPE html>
<html>
<head>
<title>Home | Fushra</title>
</head>
<body>
<h1>Hello trickypr</h1>
</body>
</html>
Advantages:
The following blocks will need to be implemented
(if (a == b)
"equal"
elseif (a > b)
"greater"
else
"something else"
)
(for item in array
item
)
Given
let obj = { name: 'trickypr', twitter: '@_trickypr' }
then
(using obj
"Follow " name " on twitter at " twitter
)
I have used the V programming language for a little over a year now. I want MEML to be a binary, not an interpreted thing. I was looking into several languages, and so far it seems like V is the perfect option for us. I will be working on translating to V immediately.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.