| |
[May. 15th, 2008|12:08 am] |
|
I support the relocation of polar bears to Antarctica and penguins to the Arctic. |
|
|
| html with io |
[May. 13th, 2008|07:50 pm] |
As promised, here is the code of my Io-based HTML DSL. The syntax looks like this:html(
head(title("ryan's web page"))
body(
h1("sign my guest book!")
form(action="/guestbook",
p(
label(for="name", "name")
input(name="name", type="text")
)
p(
label(for="msg", "msg")
textarea(name="msg", "")
)
input(type="submit",value="sign")
)
h2("here is a list of numbers!")
ul( 5 repeat(j,
li("item number #{j}" interpolate)
))
)
)Does anyone care? Probably not :) |
|
|
| markaby-like html generation in io |
[May. 11th, 2008|06:17 pm] |
i'm working on a little DSL for making HTML using Io. Here's what it looks likehtml(
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... ) |
|
|
| |
[May. 11th, 2008|05:31 pm] |
|
paul simon makes me want to move to new england. |
|
|
| 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. |
|
|