The Source for Java Technology Collaboration
User: Password:



Start New Message Delete Post a Reply

Article: 
 Scripting with Jython Instead of XML
Subject:  Anyone play with "Curl"
Date:  2003-06-11 11:31:04
From:  ramayer


Curl (www.curl.com), a language created at MIT, with elements of both Lisp and XML, is even nicer for some of these examples.

Instead of

<login trader="Trader1" password="pswd">
<stocks>
<stock>${YHOO}</stock>
</stocks>
</login>

you'd write

{login trader="Trader1" password="Passwd
{stocks {stock yahoo}}
}

in much the same way Lisp works.
It's cool because markup/formating's cleaner than HTML

{text Hello {bold World}}

and you can do anything you can do in Lisp, like constructing a 3D chess piece:

{ChessPiece
{sphere .3in ,dz=1.5in,sz=.25},
{sphere .2in ,dz=1.8in,sz=1.5},
{sphere .05in,dz=2.1in },
{cone .3in ,0in,z2=2in },
{cone .5in ,0in,z2=1in },
{circle .5in}
}

or defining your own classes.
{define-class InfoView {inherits View}
{constructor {default ...} {construct-super ...}}
{method public {destroy}:void {self.hide}}
}

 Feed java.net RSS Feeds