Boa の Web フレームワーク Rlyeh でへろーわーるどしてみた

寒いですね! いやその、エアコンのリモコンの電池が妊娠していまして、まだ替えていないので暖房が効いていないってだけなんですが。

ああ、そうそう。Boa というのはまだ架空のプログラミング言語です。
Python っぽいインデント嗜好で、括弧の少ない Lisp って感じ。
私が Ruby 話者なので、非常に Ruby, Ruby しています。

Rlyeh (るるいえ)は言わずと知れたクトゥルフ神話の有名な地名から取りました。
Rlyeh は Pyramid をリスペクトしています。

# rlyeh-hello-world.boa
import create_server from western.simple_server
import Configuration from rlyeh.config
import Response from rlyeh.response


defun hello_world(request)
    Response.new "Hello, %{name}s!" % request.match_dict


if __FILE__ == $0
    config = Configuration.new
    config.add_route "hello", "/hello/{name}"
    config.add_view hello_world, :route_name => "hello"

    app = config.create_western_app

    server = create_server "0.0.0.0", 8080, app
    server.serve_forever

ええーっと、この様にプログラミング言語を考える時はどの様に使うかを考えるといいと思います。
まだ一つも作ったことはないのですが、其の様に信じています。