News for hackers. Stuff that matters.
Re:Sinatra 1.0 Released: Major Milestone for Ruby’s Best Web... by wheels on Tuesday March 23, 2010 @09:37PM (#1214662)
Ok, so the answer is, "because Rubyists have redefined that phrase"? ;-)

The sweetening of the syntax in Sinatra seems to be rather straightforward. I assume it's something like:

  # internal route stuff

  @routes = {}

  def get(method, &block)
    @routes[method] = block
  end

  # user provided code

  get 'foo' do
    puts 'foo'
  end

  # something hooked up to execute at the end of the file

  while input = gets.chomp
    @routes[input].call if @routes.include? input
  end
I find it really hard to call that a language – it's just a clever use of normal Ruby syntax.
Re:Sinatra 1.0 Released: Major Milestone for Ruby’s Best Web... by AndrewO on Tuesday March 23, 2010 @09:59PM (#1214702)

  Ok, so the answer is, "because Rubyists have redefined that phrase"? ;-)
Well, by name dropping I was hoping to avoid the appearance of that. :-) Fowler certainly writes about Ruby a lot, but I'd hope he's perceived as general enough to not just be a "Rubyist" (I don't know what he primarily uses). But he also points out that Lisp is a perfectly good host environment for internal DSLs (he calls it the "doyen of internal DSL thinking").

And I also brought up the "fluent interface" thing to suggest that you could call it that if it made you happier. For my tastes, I'm fine with the idea that a "language" reuses a more general purpose language's interpreter and libraries. YMMV.

  I assume it's something like:...
http://github.com/bmizerany/sinatra/blob/work/lib/sinatra/ba...

Sure looks similar, but as you can see from all the code above the method there's a lot more going on. But hey, at least they didn't need to write a parser. ;-)