DEV Community

Fast4word
Fast4word

Posted on

GlintCode: A Beginner-Friendly Language That Runs in the Browser

Introducing GlintCode ✨

I've been building GlintCode, a lightweight scripting language for the browser that runs on top of JavaScript.

The goal is simple: make building browser apps easier with a clean, beginner-friendly API while still using the power of JavaScript under the hood.

Features

  • 🚀 Runs directly in the browser
  • 📝 Uses <script type="glint">
  • 🌐 Built-in DOM helpers
  • 🎨 Simple UI creation functions
  • 🔁 Built-in loop helpers
  • 📦 Optional module system
  • ⚡ No build tools or compilation required

Hello, World

<script src="https://fast4word.github.io/glintcode/glint.js"></script>

<script type="glint">
page("Hello")

heading("Welcome to GlintCode", 1)
paragraph("Your first Glint app!")

button("Click Me", () => {
    print("Hello from Glint!")
})
</script>
Enter fullscreen mode Exit fullscreen mode

Why GlintCode?

JavaScript is incredibly powerful, but for beginners or small browser projects it can sometimes feel more verbose than necessary. GlintCode provides a set of simple, readable functions that make creating interfaces and interacting with the page easier, while still letting you use JavaScript features whenever you need them.

Because GlintCode runs on top of JavaScript, you can gradually learn the underlying language without giving up access to the browser's APIs.

What's next?

I'm continuing to expand GlintCode with new functions, modules, examples, and documentation. Future plans include additional built-in libraries, a richer module ecosystem, and more developer tools.

I'd love to hear your feedback, suggestions, or ideas for features you'd like to see!

GitHub: https://github.com/Fast4word/glintcode

Top comments (3)

Collapse
 
nazar_boyko profile image
Nazar Boyko

The fact that you can drop in one script tag and get something on screen with no build step is what makes this fun to try, you're basically playing before you'd even have a project set up. One thing that might bite early adopters, the glint.js link points at whatever's newest on GitHub Pages, so the day the API changes, every page using that URL changes with it. Shipping versioned files like glint-0.1.js would let people pin to something that won't move under them. Also curious what the module system ends up looking like, that's usually where these small languages get interesting.

Collapse
 
hari_haran_144973263df174 profile image
Info Comment hidden by post author - thread only accessible via permalink
Hari Haran

is this help for our work

Collapse
 
fast4word profile image
Fast4word

What work?

Some comments have been hidden by the post's author - find out more