Wiki With Programmable Content

Who knows a Wiki-System in which programmers can experiment with programmable content, integrated in a Wiki forum? -- Fridemar Pache - c2.com

Why would we want to do this?

Security reasons aside (see below), why not? -- fp

The risk is running high of becoming a never-ending process yielding no results. Why indeed. With no purpose, there is no design. Of course, from an aesthetic perspective, Wiki is its own reward. Still, computers are already wiki enough. Software is never truly complete. Bug fixes and third-party support and beta testing and the like. It's all relative. Even the hardware is dynamic when the software becomes more static, but it's a cycle. It only serves us humans when we make the effort to break the cycle by obtaining and using output, or merely turning it off and breaking from the loop somewhere. Editing is not power, neither is restraint. Wiki enthusiasts need to read more *Godel, Escher, Bach: an Eternal Golden Braid*.

Swiki can do this - you can embed Small Talk code directly in the pages you edit. See www.cc.gatech.edu

Seed Wiki can also do this, but it's not really limited to a particular language. www.seedwiki.com

I've explored this space with a wiki behind my own firewall. Although it gives my windows/browser environment a bit of the feel I've always had with Smalltalk, some errors I made while using it could only be debugged by the author of the server, i.e. me. -- Ward Cunningham

This boils down to Security Policy development. How does one create a Security Policy that implements a Secure Sand Box and a Functional Sand Box at the same time? Capability Systems like Eros Os supposedly provide Provable Security. It would be interesting to put a Capability System into a Wiki With Programmable Content. -- Taral Dragon

Tcl allows scripts inside a Secure Sand Box to implement a Capability System in the form of nested Secure Sand Boxes. Soft Wiki can use this to build a hierarchical access control system where each interpreter can impose its own arbitrary restrictions on interpreters that it creates. Of course the first and most important restriction of this kind is something to prevent the Security Policy script from being rewritten. -- Zygo Blaxell

I did made a Wiki With Programmable Content, which we could call Lukes Programmable Wiki, which takes the path of of running programs in a custom interpreter which simply doesn't provide any primitives that could be harmful. -- Luke Gorrie

*Part of the Wiki Nature as I understand it means that anyone can edit anything. Surely we don't want everybody to be able to run any script on our wiki servers. The really interesting question here is:"what security model do we use?" This causes an essential conflict between the safety and integrity of the server and the open-ended trust of the Wiki Nature. (N.B. I believe that Niki Niki already embeds JPython.) --*

Niki Niki has some access control, so it's a bit safer to allow code, but allowing some pages to be active queries, and authored from a browser, is really cool. -- Steve Freeman

One of my perpetual prototypes allows edit access to the underlying Perl scripts, though I've found it more convenient to use an editor in a separate window. -- Dave Smith

Platform For Information Applications does some very neat stuff using Extensible Markup Language, <if>,<let>,<while> tags, very interesting, plus the fact that they are using Servlet Handlers to implement the active tags adds another layer of indirection enhancing the security model a bit, and it's Open Source, and it works. Definite potential, it might be the Next Big Thing.

To whet the appetite, what about Java Script Enabled Wikis. -- Fridemar Pache

<i>There is a simple Lisp interpreter written in Java Script, I wonder how they'd go together :-).</i>

Also a pretty complete Forth Language interpreter has been written in Java Script: Js Forth. Works now best with Mozilla Firefox, Mozilla Browser, and Netscape Navigator. Opera Browser, Konqueror Browser, and Safari Browser don't get the cursor position right, Internet Explorer the Backspace key (try alternative backspace keys: Pause, Scroll Lock, center-5, Windows key...)

Together with the wiki markup in work here: fwiki.logilan.com , this may become a bundle which, server and client side, bases everything on Forth, though the interpreter is meant in first place as tutorial and practicing system. It can dynamically load Forth screen from cookies, ram drive and web servers!

Zwi Ki does this too. The default markup mode permits embedded DTML (a reporting language) and limited python code. I believe these are interpreted in a safe manner. Some of the wiki functionality is implemented this way, eg the recent changes and jumpsearch pages.

Swiki, jslisp, Zwi Ki: Then you or every user in your Wiki Forum could easily program

the one-click solution in Opportunity For Wiki Entrepreneur and

an automatic email notification for an Addressed And Signed Message like this one.

Wiki Type Framework has this too. But there is security to allow only 'trusted' individuals to create code. On wtfw.sourceforge.net there are two examples of code that can be placed on pages: a calendar where clicking on a date generates the option of a new page, and the idea of accessing web services on a page. Of course, several other pages are also created on the fly by code.

Question: Fridemar, are you playing with all these constructs like Double Colon Message and the {} tagging to see how they'd work in the normal stream of text and how easy they are to maintain? So that if and when you write a Wiki With Programmable Content you have some experience with them?

You are just testing/playing? <i>(positioning 'Question:' at the start of your writing. You could have omitted it, without loss of content, thus making your note an Addressed And Signed Message:-).</i> I thought of doing this, using the public-domain Win32Forth editor component Win View of Tom Zimmer. (See Forth Language) This amazing editor comes as Forth source, has two independent hypertext subsystems implemented. In browse-mode html-links (and some other elementary html-format-tags) are supported, and additionally each clicked Forth Word let you jump to its definition). This editor has even built-in a rudimentary online Web Browser. My main activity behind the scenes, the Data Music Project doesn't allow me to do that at moment. Besides that, I think that there might be better existing solutions, as extensions of the standard Web Browsers. At moment I look urgently for existing DHTML-capable Wiki Forum<i>s</i>. You would make me happy to add your favorite forum with programmable content in Java Script Enabled Wiki, if you know one more. -- Fridemar

See Smart Wiki for Wiki (Engines) With Programmable Content.

Sounds like Wiki With Programmable Content and Smart Wiki refer to any Wiki that allows code (store and execute) as well as text.

And Meta Wiki says it's a Wiki With Programmable Content that includes global options for trusted peers to reprogram the underlying Wiki Engine of the respective Wiki Forum.

So Meta Wiki is a subset of Smart Wikis.

Zzo Wiki you can enter programs in the text. Is that consider Smart Wiki, or Wiki With Programmable Content? Does it have enough commands?

There is no need that publicly programmable Wiki Clones impose a security threat at all. You only have to do it the right way. I'm currently into writing a Server Side Java Script interpreter running in the Php Language (phpjs.berlios.de ), which will allow to run user contributed code in a Sand Box (mixing it with Erfurt Wiki and Php Wiki somewhen). That is safe as long as you do not provide raw access interfaces to the filesystem or allow unfiltered SQL queries. With a powerful API this would still allow for the majority of interesting features to be written, despite any security restrictions. See also the discussions on wikifeatures.wiki.taoriver.net -- Mario Salzer

Flex Wiki uses a custom programming language called Wiki Talk to provide a very simple way to add dynamic content to the Wiki. Wiki Talk is based on an object model that is capable of searching pages for Wiki Properties and acting on them.

jot.com is a wiki with structured forms and programmable pages. Jot's wiki markup includes search, if, etc.

Why would we want to do this?

On the Cryptodox wiki, it would be nifty to have "live examples" of encryption and cryptanalysis algorithms. Type in some text, see what the encrypted text looks like, etc. I imagine that "live example" for "simple substitution cipher" might look something like the substitution solving tool Simon Singh wrote ( www.simonsingh.net ).

If I ever get my data compression wiki online, "live examples" of data compression algorithms would be nifty. Type in (or paste) some text into one textbox, see several following textboxes show the several stages in compression, followed by the resulting compressed text (in hex?) and the compression ratio. But how do I allow people to improve, wiki-style, each other's experimental compression algorithms, without doing something harmful? I thought that was the whole point of Java and Java Script -- that they could be contained in a Sand Box, guaranteed impossible for them to do anything harmful? -- David Cary

Collaborative Programming is also a related term - see my summary keinze.wordpress.com

Mirko 20.05.2012

# See also