[Opa] Wiki example

François-Régis Sinot francois-regis.sinot at mlstate.com
Fri Sep 2 04:50:05 EDT 2011


Hello,

Le jeudi 01 septembre 2011 à 12:39 -0700, blake a écrit :
> A few points on the Wiki example:
> 
> 
> -> The import line isn't discussed or noted. 

Yes, it should be.

> -> The wiki doesn't seem to take certain HTML codes that wouldn't seem
> to be security risks, like <b>, <i>, <tt>, <strong>...

Yes, this simple wiki is a plain text wiki. For formatted text, the
developper is free to use whatever he wants. We now provide a markdown
library (stdlib.tools.markdown), for instance. Another approach would be
to use templates (stdlib.web.template).

We do not have in the stdlib thinks such as "white list" tags, because
we think it's not the right way to do it. However, it's not too hard to
implement such a white list function (can be very concise and readable
with Xml.map + the xml_parser construct).

> -> An exception turned up--possibly because I just left the code
> running?
> 
> 
> [SESSION] Uncaught exception: "{OpaRPC_Server: {timeout: {client:
> {client: $"ffbqwdmhrm1e5gxne35i79f7cj6aos26"$; page: $815493968$};
> fun_id: $"_v0_transform_on_client_stdlib.core.xhtml"$}}}"
>   The following message is skipped.:
>     If you want (msg, st, ctx) debug printing set debug variable
> session_debug >= 200

That happens when the server makes a call to the client (= the browser),
but the browser does not answer: then the corresponding server thread
times out and is released. This may happen for a variety of reasons: an
error on the browser, the browser disconnectes, a network problem. So
ntohing to worry about, except if it happens very often.
 
> -> Compilation takes several minutes and really ground the VM to a
> halt! 27 minutes and 11 seconds! 

Wow... Opa compilation is not very fast, but yes, here it's *very* slow.
Probably your VM is very limited (e.g. single core) ?

Note: for a big project, nicely cut into packages, further recompilation
need to be done only for modified files and their downwards
dependencies. This saves a lot of time.

> Let me know if you're interested in these sorts of notes.

Sure, that's the point of the list ;-)

Cheers,

-- 
François-Régis Sinot
R&D @ MLstate
104 rue du Faubourg Saint-Antoine, 75012 Paris, France



More information about the Opa mailing list