Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ruby DSL (Domain Specific Language) repositories, examples

Tags:

ruby

dsl

I am seeking excellent examples of Ruby DSLs (Domain Specific Languages). Which repositories, projects do you know of that are worth a read? Why is it (or: are they) great examples?

I am particularly interested in more complex examples that are well thought-out and designed.

like image 787
Demi Avatar asked May 22 '09 19:05

Demi


People also ask

What is domain specific language examples?

DSLs implemented via an independent interpreter or compiler are known as External Domain Specific Languages. Well known examples include LaTeX or AWK.

Is Ruby a domain specific language?

Ruby is not a Domain Specific Language, it is a General Purpose Language.

What is domain specific language projects?

A Domain Specific Language is a programming language with a higher level of abstraction optimized for a specific class of problems. A DSL uses the concepts and rules from the field or domain.


1 Answers

Rake and Rack are some good examples of DSL's. If you want some more examples, check these out:

  • Sinatra is a very popular DSL for building web applications, and it's open source on GitHub.
  • Twibot is a newer DSL inspired by Sinatra that lets you create Twitter bots that automatically respond to messages and replies.

If you want to get started on making your own, here's an excellent tutorial called Building a DSL in Ruby.

like image 127
Justin Poliey Avatar answered Oct 04 '22 21:10

Justin Poliey