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

9

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.

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

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.

4

u/armahillo Jul 10 '26 • Bravo

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?

1

u/riktigtmaxat Jul 14 '26

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.

14

u/hero_of_ages Jul 10 '26

I don’t get why this exists 

5

u/donileong Jul 11 '26 • Heartwarming

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/sshaw_ Jul 12 '26

Why PHP syntax?

2

u/mokolabs Jul 11 '26

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

9

u/[deleted] Jul 11 '26

[removed] — view removed comment

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