Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ”₯ BurnedLang β€” BHTML

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

experimental license language opcodes


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:

<div class="container">
  <header>
    <nav>
      <ul>
        <li><a href="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

Opcode Expands to
β˜… <!DOCTYPE html>
β˜† <html lang="en">
βœͺ </html>
✦ <head>
✧ </head>
✩ <body>
✫ </body>
βŒ‚ <title>
βŒƒ </title>

Meta & Resources

Opcode Expands 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

Opcode Expands 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

Opcode Expands to
β™  <section>
♣ <article>
β™₯ <header>
♦ <footer>
β™œ <main>
♝ <nav>

Forms & Inputs

Opcode Expands to
β—† <form action="" method="post">
β—Œ <input type="text">
◍ <input type="password">
◐ <input type="email">
β—ˆ <button type="submit">
βŒ— <textarea>
⌜ <select>

Common Attributes (partial β€” append value + ")

Opcode Expands to
Β€ class="
Β’ id="
Β§ href="
Β΅ src="
ΒΆ alt="
Β¬ placeholder="
Γ‹ onclick="

Boolean Attributes

Opcode Expands 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>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>My Page</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="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:

Module Target Status
BHTML HTML βœ… Released
BCSS CSS πŸ”§ Planned
BJS JavaScript πŸ”§ Planned
BPY Python πŸ”§ Planned
BSQL SQL πŸ’‘ Concept
BJSON JSON πŸ’‘ Concept
BYAML YAML πŸ’‘ 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