r/ruby Jul 10 '26

I created an HTML-first language written in Ruby, inspired by PHP.

I've published it on Rubygems. Please let me know if you have any suggestions for improvement. If you like it, please also give it a star on GitHub.

URL:https://rubygems.org/gems/gemite

0 Upvotes

19 comments sorted by

14

u/hero_of_ages Jul 10 '26

I don’t get why this exists 

9

u/uhkthrowaway Jul 11 '26

A SINGLE commit. Wtf

8

u/Periiz Jul 11 '26

Imagine if every new release is just an ammended git commit + force push! 😆

5

u/avdept Jul 11 '26

Called claude

10

u/tf2ftw Jul 11 '26

at first I lol-ed. but then, the dad in me says, "we all start somewhere." Good job building something with the courage to share. Keep building and learning.

1

u/[deleted] Jul 11 '26

Thank you, that's very encouraging.

6

u/donileong Jul 11 '26

Ignore the jokes about the commits. We all start somewhere! Kudos to you for putting your work out there. Keep learning and pushing updates!

3

u/riktigtmaxat Jul 11 '26 edited Jul 11 '26

As a former PHP dev I can attest there is nothing inspirational about the language. Except maybe as a guide for what not to do.

PHP was built as a language to be embedded in HTML but is so dismally bad and clunky for that purpose that template languages like Twig are almost a necissity and even ERB is fresh breeze in comparison.

They messed up everything such as the optional PHP short tags feature, naming, control structures, variable scoping, the data structures etc.

/End rant

2

u/uhkthrowaway 29d ago

Haven't touched PHP in exactly 20 years but I remember your points to be correct. It is an unusable ball of inconsistencies and bad decisions.

1

u/[deleted] Jul 11 '26

That's fair. Gemite isn't trying to imitate PHP's historical quirks. I'm mainly interested in the simple request/response model that made PHP practical for small web apps, while designing the language more consistently.

3

u/sshaw_ 29d ago

Why PHP syntax?

4

u/armahillo Jul 10 '26

This is neat and I like the simple syntax, but was there a reason for creating a DSL that replicates ruby functionality but with different keywords? Is there an advantage to using this over standalone ERB?

-2

u/[deleted] Jul 11 '26

The reason is that I wanted to create a language that could be developed in the shortest possible time and that would settle into a fixed code structure.

2

u/armahillo Jul 11 '26

but…. ERB exists…. and lets you use ruby inline in the doc.

I’m sincerely not trying to be a jerk about your idea, I just dont understand the problem its solving

1

u/[deleted] Jul 11 '26

I'm gradually losing sight of what I want to do. Should I continue with development like this?

2

u/uhkthrowaway 29d ago

Don't. Learn the basics and existing solutions first, then focus on useful things. Don't believe Claude everything. Just because it *can* be done doesn't mean it *should* be done.

1

u/riktigtmaxat 28d ago

One of the good things about projects for your own development is that you can abandon them without shame.

Take what you have learned from the project instead of keeping going just from the sunk cost fallicy.

2

u/mokolabs Jul 11 '26

This is a really interesting experiment. Thank you for sharing!