Home
ryah - May 11th, 2008 [entries|archive|friends|userinfo]
ryah

[ website | tiny clouds ]
[ userinfo | livejournal userinfo ]
[ archive | journal archive ]

May 11th, 2008

libeio [May. 11th, 2008|01:59 pm]
Marc Lehmann, the author of libev, started development on libeio, a C language async io library. It's "similar to both the POSIX functions (just with a continuation/callback) and libev". Uses threads internally. Requests have two options for completion notification: they return an object that can be polled against or they take a callback. It isn't dependent on libev (or any event loop) but integration is easy. Read more about the design here.
LinkLeave a comment

(no subject) [May. 11th, 2008|05:31 pm]
paul simon makes me want to move to new england.
Link1 comment|Leave a comment

markaby-like html generation in io [May. 11th, 2008|06:17 pm]
[Tags|]

i'm working on a little DSL for making HTML using Io. Here's what it looks like
html(
  head(
    title("ryan's web page")
  ) 
  body(
    h1("ryan!")
    br
    form(action="/guestbook",
      h2("sign my guest book!")
      p(
        label(for="name","name")
        input(type="text",name="name")
      )
      p(
        label(for="msg","msg")
        input(type="text",name="msg")
      )
      input(type="submit",value="sign")
    )
  )
)
Currently functional at 80 lines of code. For this I intercept each function call before it does anything, walk through it's argument list and see if it's a single = expression. These are stored as attributes. The last argument of the function is evaluated and added as children. Here is what it looks like
Read more... )
LinkLeave a comment

navigation
[ viewing | May 11th, 2008 ]
[ go | Previous Day|Next Day ]

Advertisement