Back to Blog

Telar: from concept to complete ecosystem

· telar compilers open source web development

A few days ago, I wrote about how I built the lexer and parser for Telar — the declarative web language with Spanish syntax. If you didn’t read that post, the summary is: I parsed Spanish code and built a syntax tree. It worked, but it was a compiler without an ecosystem.

This week, everything changed.


From lexer to ecosystem

When I published the first post, Telar compiled .telar code to static HTML. That was it. To use it, you had to clone the repo, install dependencies, and run a TypeScript command directly.

Today, Telar has:

npm install -g @davidbc01/telar
telar nuevo mi-proyecto
cd mi-proyecto
telar servir app.telar

That’s it. Four commands and you’ve got a project up and running with live reload in your browser.


What was built

JavaScript Generator — the compiler now generates not only HTML and CSS but also the JavaScript runtime that handles dynamic conditions, data fetching from APIs, and button actions.

CComplete CLI with seven commands:

telar nuevo mi-proyecto     # create a project from scratch
telar compilar app.telar    # compile to HTML + CSS + JS
telar servir app.telar      # serve with live reload
telar verificar app.telar   # validate syntax
telar añadir navbar         # install a package
telar quitar navbar         # remove a package
telar buscar <término>      # search for packages on GitHub

Live reload — WebSocket integrated without external dependencies. Save the file and the browser reloads automatically.

Package manager — packages are GitHub repositories with the prefix telar-. No own registry, no infrastructure. Three official packages available:

telar añadir formulario
telar añadir navbar
telar añadir lista

VS Code Extension — syntax highlighting for .telar files published in the marketplace.

Error messages with visual context:

✗  app.telar:12:9 — se esperaba un número

   10 │  mostrar productos recientes
   11 │    ordenados por precio
→  12 │    máximo muchos
                    ^^^^^
   13 │    si falla

  Sugerencia: los números van sin comillas. Prueba con: máximo 10

The feedback that changed the course

I shared Telar in developer communities and received direct technical criticism. The most important one: “there are no variables, no functions, no real reusability — it looks like pseudocode.”

They were partly right. And that led to two important design decisions.

The código block — an escape hatch for direct JavaScript when Telar doesn’t cover your case:

página login en "/entrar"
  título "Entrar"

  código
    console.log('Página cargada')
    analytics.track('login_view')
  fin código

All opinionated languages have this. Rails has raw SQL, SwiftUI has UIViewRepresentable. Telar has código ... fin código.

The usar syntax — to include reusable components:

página inicio en "/"
  usar navbar
  usar formulario
  título "Mi App"

Those two features together eliminate 90% of technical objections. 80% of the code remains declarative. The 20% that needs full control has its hatch.


What I learned this week

Negative feedback is more valuable than positive feedback. Each direct technical criticism was a design decision to make — not to please the critic, but to understand what the language was missing.

Building in public accelerates learning. Without sharing it, it would have taken months to find those gaps.

An ecosystem is built in order. First the compiler, then the CLI, then the package manager, then the packages. Each layer makes the previous one more useful.


Where Telar is now

npm install -g @davidbc01/telar
telar nuevo mi-proyecto
cd mi-proyecto
telar servir app.telar

Version 0.5 has been released. Version 0.6 will include comprehensive tests and CI/CD. Version 1.0 will feature online documentation and a community.

🔗 github.com/davidbc01/telar