[e-lang] json in E

Kevin Reid kpreid at attglobal.net
Fri Sep 24 19:53:02 EDT 2004


On Sep 24, 2004, at 18:47, Mark S. Miller wrote:

> I had never heard of Lua.

http://www.lua.org/
http://www.lua.org/manual/5.0/

It is primarily a lightweight language for use as an embedded 
configuration/scripting language. I use it in my MudWalker application 
<http://mudwalker.cubik.org/>.

The embedding interface is such that Lua programs can be run with no 
dangerous authorities, and opaque external references (i.e., object 
capabilities) can be passed into the Lua environment, which is why I 
chose it for MudWalker scripting.

However, all functions within a single interpreter have access to a 
mutable global scope, though any number of separate interpreters can be 
created (from the host program).

> The other languages that use '=', and the reason why I originally 
> chose '=', are XML, SGML, HTML, etc., for attributes. I wanted the 
> term-tree embedding of XML to be fairly natural for XML folks. I'm 
> very gratified to hear that Kevin is actually using this embedding.

I was working with two XML applications (RDF/XML and XML-RPC), and the 
obvious way to handle them easily was to write the generic transformer 
so that I could use term-tree quasipatterns and quasiliterals.

> Kevin, thanks for putting an approriate copyright notice on 
> deJSONKit.emaker. Could you please resend your makePipe and 
> w__quasiParser programs with such a copyright as well? I'd like to 
> include both in future E distributions.

The wording of the notice is slightly worrisome to me:

# Copyright 2003 Kevin Reid, under the terms of the MIT X license
# found at http://www.opensource.org/licenses/mit-license.html 
................

What if <http://www.opensource.org/licenses/mit-license.html> no longer 
describes the same license? Will the common understanding of the phrase 
'the MIT X license' override that?

Scenarios:

   * DNS politics

   * Registration of opensource.org expires

   * Man-in-the-middle attacks

Otherwise, I have no objection and will do so after this issue is 
resolved.

>  Your w__quasiParser is a wonderful example for showing off E's 
> support for metaprogramming.
>
> Why "w"?

'w' for Text-W-riter. I wanted something short to avoid cluttering 
programs (though I haven't actually used it). For official namespacing 
I think a longer name would be appropriate. (Of course, a program can 
import it as any name it likes.)

print__quasiParser?

Note that w__quasiParser's language cannot express e`out.quote(...)`. 
Neither can simple__quasiParser, but this is a critical lack if it is 
to be suitable for use in most __printOn definitions.

-- 
Kevin Reid                            <http://homepage.mac.com/kpreid/>




More information about the e-lang mailing list