by jezze · 6y ago · 0 comments
Replacing HTML/JS/CSS with a language called ALFI. It is stupidly simple in its design but still very powerful. Similarly to HTML you use it to create widgets, place them, and define their behavior. It is humanly readable like HTML but line-based instead of markup-based. Instead of nesting it uses references. This allows it to be streamed.
A big difference is that the language itself doesn't allow styling (like CSS), the downside being you get less flexibility but the upside being it will render correctly on any display with any resolution.
For this I have also written a new type of web browser called NAVI which takes ALFI code and produces (somewhat) beautiful widgets and renders them using OpenGL.
Source for both ALFI and NAVI: https://github.com/jezze/alfi
My own ALFI website: http://www.blunder.se/
You need NAVI to actually browse blunder.se properly. otherwise you will just see ALFI code. Also this is still very early so all features are not done yet.
HTML without styling will render correctly on any display with any resolution. The facts of the history of the web tell us that people want custom styling, though, and businesses want it even more, because marketing says so. Your widgets need styling for each device they're rendered on, in which case you're back to the exact original problem as HTML and CSS. All you've done is move the problem to someplace else.
Frankly, I don't see why this isn't a markdown extension, since that seems much better suited to solving your base problem and is WAY more readable than the mess you have currently (which only seems readable to someone versed in high-level programming, either functional or OO)
The lack of styling I do understand can make it feel as if your site lacks personality when all sites look kinda the same so I see your point here. I might later allow some minor themeing, like say allowing you to select a color scheme, with the understanding that this might be ignored by the user. I will have to think about this more. What you will never get to decide are things lika margins and paddings and things like that.
I don't think you can compare Markdown with ALFI like that exactly. Markdown will generate HTML in the end and it is the resulting HTML that you need to compare with because that is what the browsers understands. Also, Markdown only solves the trivial cases and that is why it can be kept simple and readable but how do you for instance create a three column layout in Markdown with an image in the middle column? I don't know, maybe there are extensions for that these days too.
It would be interesting to have a Markdown to ALFI generator, but I suspect that when you are used to reading ALFI code you might find it to be a bit overkill because even though I am a bit biased of course I do think ALFI is pretty readable.
Also, there is no intentional OOP or funcional aspects, I did not quite understand what you wanted to convey there.
Wait, what? Are we on different webs? The facts of the history of the web tell us that some of the most popular services for publishing are Facebook, Twitter, LinkedIn, Medium, etc - places that allow for very limited custom styling.
I think you misunderstand what OP is trying to do, and are criticizing them for not instead making a thing you already know.
Since a “creator” is also a user of the web, I guess you mean “user” as in someone who only consumes content? I’m confused by that since nothing in the discussion seems to be about user stylesheets.
It’s completely besides the point that these platforms have custom styling with regards to the web in general. The point is that people are publishing enormous amounts of content on these platforms despite not having the ability to control what that content styled like. Ergo, lack of styling is not a deal breaker for people to publish stuff on a platform.
I guess that alternative or even non-graphical interfaces (like CLI or voice) are possible?
If someone else is interested in a less radical version of this topic, maybe you can share some insights here https://news.ycombinator.com/item?id=23737903
What js does is that it allows you to dynamically update the contents of your website like changing an image when you hover over it for example. This is something you can actually do with ALFI by itself without having to depend on a second language like js. I'm glad you asked this question.
So, no
http://www.blunder.se/screenshots/s1.png http://www.blunder.se/screenshots/s2.png http://www.blunder.se/screenshots/s3.png
But these look great! You should definitely show them off. Adding them to the repo for others to see might generate the tinest bit more excitement for people stumbling on the project. :)