[Ur] How to design JSON interface?
Adam Chlipala
adamc at impredicative.com
Wed Dec 1 10:29:46 EST 2010
Marc Weber wrote:
> Today its hard to make a project successful unless you create interfaces
> for others to join or use a service. JSON is a very easy format which is
> implemented in all languages I know. If you ever have tried creating
> xmlrpc stuff you know that generating JSON can be simpler. So I want to
> use it for two reasons:
> - interface with external applications (because I don't know urweb
> enough to recode everything in it)
> - provide interfaces for other users. Letting users do what they want
> can be a way to be successful.
>
I'm thinking that the most pragmatic way forward is to build a
parsing/pretty-printing tool that takes as input a description of a
protocol and then outputs (as text) the Ur/Web code for participating in
it. Alternatively, you could even output C/JavaScript code for
efficiency. How does that sound? It requires no knowledge of any
existing compiler's implementation.
>> I mask out the tests when building distributions for a reason: a lot of
>> them don't compile anymore. :-)
>>
> I learned something from them. Its worth keeping them up to date. There
> is not much ur code at the momemnt. If you understand all test
> cases you know that you learned something about a language.
>
I feel that time spent on that would be even better spent writing a
tutorial, which I'm still putting off. So, if I feel like doing this
kind of thing, it will be in the latter form.
More information about the Ur
mailing list