UBF

Rick Pettit rpettit@REDACTED
Thu May 4 16:21:26 CEST 2006


On Thu, May 04, 2006 at 12:14:16AM -0700, Ryan Rawson wrote:
> Ironically enough I would disagree with the statement:
> 
> "While the XML series of languages had the goal of having a human
> readable format the UBF languages take the opposite view and provide a
> "machine friendly" format."
> 
> I would state that XML is machine readable, and not as much human
> readable.

Not readable, but friendly.

Isn't it easier to parse:

  {string,"Hello world"}

than:

  <string>Hello world</string>

or:

  {integer,2}

than:

  <integer>2</integer>

In both cases the latter is clearly more verbose.

> The original specs for the XML described in great detail
> how easy it was to write a parser for it.  While most people don't
> think XML parsers are very simple, they are better than, say HTML or
> SGML.

UBF shouldn't be any harder, and going back and forth from XML to UBF is also
pretty easy.

> But again, i would say that we need more human readable formats. 
> That's why JSON has become so popular.

Is readability really important? Is UBF unreadable?

> I know some people who are using JSON and Erlang, that is working out
> well for them.  Why UBF?

I had a lot of fun playing with Joe's UBF contract checker. You can define
stateful protocols in UBF (you write a "contract") and plug them into a
contract checker (see Joe's download).

This provides a great way to test your protocol, and to catch protocol 
violations in client and server (including timing problems IIRC).

-Rick

> On 5/3/06, Bertil Askelid <Bertil@REDACTED> wrote:
> >   A couple of years ago, Joe Armstrong was working on and idea he
> >   called UBF:
> >
> >      UBF is a language for transporting and describing complex data
> >      structures across a network.
> >
> >      http://www.sics.se/~joe/ubf/site/home.html
> >
> >   I'm wonder if this came to any extended use in the Erlang Community?
> >



More information about the erlang-questions mailing list