Skip to content

Repository files navigation

🔥 BurnedLang — BHTML

Compressed HTML for AI code generation. Fewer tokens, same output.

experimentallicenselanguageopcodes


What is BHTML?

BHTML is the HTML module of BurnedLang — an experimental family of compressed symbolic languages designed for AI-assisted code generation.

Instead of writing verbose HTML tags repeatedly, an AI generates compact Unicode opcodes. A converter then expands them back into valid, standard HTML.

▢ → <div class="container">
♥ → <header>
★☆✦☀☁⌂My Site⌃✧✩ → Full HTML boilerplate

BurnedLang is not a new programming language. It is a symbolic compression layer — a shorthand that LLMs can generate efficiently, designed to be expanded deterministically back into normal code.


Why does this exist?

LLMs operate within token budgets. Traditional HTML is token-heavy:

<divclass="container"><header><nav><ul><li><ahref="index.html">Home</a></li>

Every repeated tag, attribute, and boilerplate fragment costs tokens. Over a large codebase, this adds up fast.

BHTML replaces the most frequent HTML patterns with single Unicode characters:

▢
♥
♝
→
↦△§index.html">Home▷↤

The AI generates far fewer tokens. The converter does the rest.


How it works

Human prompt
↓
AI generates BHTML (compact Unicode opcodes)
↓
bhtml.converter.py (string replacement, longest-first)
↓
Valid HTML output

Reverse mode is also supported — compress existing HTML into BHTML:

index.html → converter (--reverse) → index.bhtml

Quick Start

Convert BHTML → HTML

python bhtml.converter.py input.bhtml output.html

Convert HTML → BHTML (reverse)

python bhtml.converter.py input.html output.bhtml --reverse

Requirements

  • Python 3.7+
  • No external dependencies

The dictionary file (bhtml.dictionary.json) must be in the same directory as the converter.


Opcode Reference

BHTML uses Unicode symbols as atomic opcodes. Each opcode maps to exactly one HTML fragment.

Document Structure

OpcodeExpands to
<!DOCTYPE html>
<html lang="en">
</html>
<head>
</head>
<body>
</body>
<title>
</title>

Meta & Resources

OpcodeExpands to
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<link rel="stylesheet" href="style.css">
<script src="script.js"></script>

Layout Divs

OpcodeExpands to
<div>
</div>
<div class="container">
<div class="card">
<div class="row">
<div class="col">
<div class="grid">
<div class="wrapper">
<div class="content">
<div class="sidebar">
<div class="hero">
<div class="footer">

Semantic Elements

OpcodeExpands to
<section>
<article>
<header>
<footer>
<main>
<nav>

Forms & Inputs

OpcodeExpands to
<form action="" method="post">
<input type="text">
<input type="password">
<input type="email">
<button type="submit">
<textarea>
<select>

Common Attributes (partial — append value + ")

OpcodeExpands to
¤class="
¢id="
§href="
µsrc="
alt="
¬placeholder="
Ëonclick="

Boolean Attributes

OpcodeExpands to
Ûrequired
Üdisabled
Ýreadonly
àchecked

Full opcode list: see bhtml.dictionary.json — 130+ mappings total.


Example

BHTML input

★
☆
✦
☀
☁
⌂My Page⌃
✭
✧
✩
▢
♥
<h1>Hello World</h1>
♡
♜
<p>Welcome to my site.</p>
♞
■
✫
✪

Expanded HTML output

<!DOCTYPE html><htmllang="en"><head><metacharset="UTF-8"><metaname="viewport" content="width=device-width, initial-scale=1.0"><title>My Page</title><linkrel="stylesheet" href="style.css"></head><body><divclass="container"><header><h1>Hello World</h1></header><main><p>Welcome to my site.</p></main></div></body></html>

Design Rules

BHTML is built on a strict, simple model:

  • String replacement only — the converter is not an HTML parser
  • Longest match first — prevents partial replacements
  • One opcode = one fragment — atomic, never merged
  • Fully reversible — every .bhtml file can be expanded back to valid HTML
  • JSON-driven — all mappings live in bhtml.dictionary.json, nothing is hardcoded
  • No runtime — no interpreter, no compiler, no VM

Attribute placement rule

Attribute opcodes replace the attribute name inside an HTML tag, not the tag itself.

✅ <div ¤card"> → <div class="card">
❌ □¤card" → <div>class="card" (broken!)

Pre-built layout opcodes (, , etc.) already include their class — never append attributes to them.


Project Structure

BHTML/
├── bhtml.converter.py # CLI converter (BHTML ↔ HTML)
├── bhtml.dictionary.json # All opcode mappings
├── bhtml.skill.md # AI prompt skill (for LLM integration)
├── output.html # Example output file
└── README.md

BurnedLang Family

BHTML is the first released module. Planned modules:

ModuleTargetStatus
BHTMLHTML✅ Released
BCSSCSS🔧 Planned
BJSJavaScript🔧 Planned
BPYPython🔧 Planned
BSQLSQL💡 Concept
BJSONJSON💡 Concept
BYAMLYAML💡 Concept

Intended Use Cases

  • AI code generation with reduced token usage
  • Prompt compression for large HTML codebases
  • AI coding assistants generating boilerplate faster
  • Tokenizer and compression research
  • Educational experiments in symbolic language design

Limitations

  • BHTML is not meant for hand-editing in production
  • Generated files should be expanded before manual maintenance
  • The converter performs text replacement — it does not validate HTML structure
  • Some complex custom attributes still require manual HTML syntax

Disclaimer

BurnedLang is an experimental research project exploring symbolic source-code compression for AI systems.

It is not intended to replace HTML or any existing web standard. Its purpose is to reduce repetitive syntax overhead during AI-assisted code generation, while remaining fully reversible through deterministic converters.


Made with 🔥 by BnBurned

About

🔥 BurnedLang BHTML — Compressed HTML with Unicode opcodes for AI-assisted code generation. Fewer tokens, same output.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages