[m-dev.] pragma proc_rep proposal
Ian MacLarty
maclarty at cs.mu.OZ.AU
Fri Jun 30 17:42:08 AEST 2006
On Fri, Jun 30, 2006 at 02:35:35PM +1000, Peter Moulder wrote:
> For executing Mercury code, it sounds like you want a javascript backend
> (or possibly a "generic imperitive representation" backend), similar to
> the existing Java backend. But javascript is very slow, sometimes
> orders of magnitude slower than C/Mercury/Java. How about... using the
> existing Java backend, and execute Java on client side? I suspect that
> this is less work, and more useful, than executing (interpreting)
> whatever representation is output by the proposed pragma.
>
That idea might work for someone else, but it won't work for us. We
want to execute javascript on the client, because we use XUL for the
user interface. I would also say that using javascript and html or XUL
for interactive interfaces feels much snappier than using Java (have you
ever tried using Oracle apps? - they are horribly slow and all in
Java). We use javascript for light client side tasks and the server
(written in Mercury) for heavier tasks.
We only want to execute small pieces of Mercury code on the client, so a
complete javascript backend is not what we're after (I doubt such a
backend would even be feasible).
Zoltan discussed this with me and the proposed solution is to add an
option to the compiler which would generate a representation of the body
of all the predicates in a module. The representation will look like
that in mdbcomp/program_representation.
Ian.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to: mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions: mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------
More information about the developers
mailing list