Ex-HTML
CSEF · 2014 Mathematics & Software
Overview
Objectives/Goals Create an alternative syntax for HTML called Lima, modeled around the LISP family of programming languages. HTML is quite verbose for many tasks, and that#s what I wanted to improve, while allowing Lima to be compiled down to HTML. Similar projects have been created for CSS (Sass, LESS) and JavaScript (CoffeeScript), but HTML didn#t yet have anything similar. I chose LISP because its syntax is versatile and simple, allowing the same syntax to be portable to HTML, CSS, and even JavaScript. Methods/Materials The Lima prototype was written in the Scala programming language, which includes a parser combinator library that was an integral part of the project. Additionally, it used a Java library called JTidy for cleaning up outputted HTML, the RSyntaxTextArea Java library for creating a live-updating GUI, and the ScalaJS compiler to create a web interface. The syntax was based on LISP S-expressions, but it used Clojure-style vectors for tag properties. The final project is written in the Clojure programming language itself, without the use of any external libraries. The code is considerably better than the original, although it lacks JTidy integration, a GUI, and a web interface. I plan to add those features. Results The Scala version came out to around 400 lines of code. The parser was the slowest part, taking about 80 milliseconds to parse a 50-line document with complicated syntax. The HTML generator was faster, taking about 18 milliseconds to generate the HTML for that same document. The Clojure version is much shorter and much faster: at around 130 lines of code, it parses and generates the same document in less than 10 milliseconds (usually closer to 5) and has many features that the original lacked. Lima#s syntax is fairly simple, but it can be very powerful. Conclusions/Discussion Lima tends to be at least as readable as HTML, but requires much less typing. The compiler is fast, even for larger projects, and the syntax error messages are informative. It generates HTML5-compliant output, provided the user doesn#t make use of any deprecated tags. Anything that can be written with HTML can also be written with Lima, and conveniences like macros and inline Clojure evaluation make creating web pages easier than before. I think that Lima is useful to web developers seeking refuge from the verbosity of HTML. JavaScript (through ClojureScript) and CSS
Summary statement
An alternative syntax for HTML, focused on usability, extensibility, and consistency.
Competition history
- CSEF 2014
Resources
Related projects
CSEF · 2015
Lingua: A Programming Language for the Uninitiated
CSEF · 2002
Behind the HyperText Markup Language
ISEF · 2016
FLscript--An Experimentation of Logic and Functional Programming Language for the Web: Design and Implementation
ISEF · 2021
Lucia: Creating Performance-Focused Web Applications
ISEF · 2024
LinkDev: A Programming Language That Combines All Programming Languages Into One Designed To Boost Coding Experience
AJAS · 2022
Lucia.js: Creating Performance-Focused Web Applications
CSEF · 2023
Albio.js: A Fine-Grained User Interface Compiler for Building Reactive Web Applications
ISEF · 2024
AuralStudio: A Multisensory Development Environment With a Novel, Bytecode-Compiled Programming Language
Closest projects by meaning, across every fair and year in the corpus.
Browse more like this
Source: California Science & Engineering Fair public projects