Re: Announcement: Homage to SWI-Prolog

Anne Ogborn <[email protected]>
Newsgroups gmane.comp.ai.prolog.swi
Message-ID <[email protected]>
Years ago I fiddled with what I called a 'code injection server' in Clojure named Sui.

It allowed a remote connection to call sandboxed code on the server.

Some 'base' URI was declared http://myserver.com/sui/  and the rest of the URI interpreted as a call

so   http://myserver.com/sui/foo/bar/baz/      became    (foo bar baz) on the server
while
http://myserver.com/sui/?clojure=(foo+bar+baz)  did the same thing more flexibly, since it could be arbitrary code.

Clojure allows metadata, so to make foo callable needed

(deffn foo  # { :cD }  [bar baz]  .... )

where :cD is a Clojure keyword.  Some other keyword (yes, also a smiley) allowed you to define an authorization function that
had to return true to allow the main function call.

Presence of a sandbox makes many things like this do-able in a language.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.