lout-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: To Jeff/Uwe...just asking...


From: Oliver Bandel
Subject: Re: To Jeff/Uwe...just asking...
Date: Mon, 16 Jul 2001 10:16:58 +0200 (MET DST)

Hello

On Mon, 16 Jul 2001, Jeff Kingston wrote:

> On Sun, 15 Jul 2001 17:44:13 +0100, Graham Douglas wrote:
[...]
>   > Is it possible that one could, somehow,
>   > link directly to a scripting language? Perhaps add a new
>   > primitive called, say, @Script{scripting commands}? 
>   > I have no idea, as yet, how you could, if at all, communicate 
>   > anything back to Lout.
> 
> I'd have to defer to an operating systems expert here.  The only
> way I know to do this is via system(), but I'm no expert.  I would
> advise trying it with @Filter first and worrying about it only if
> the result is too slow.

The system()-call is portable.
A call to the different possible Scripting-languages
needs to re-implement the languages.
Or at least to write wrappers, which can be called from lout.
In Perl for example, one could use the eval()-construct
and call a special perl-Script to evaluate the code.

But normally Perl-Scripts will called via the shell.
One can embedd a Perl-Interpretr into Lout, or uses
a Perl-Server, which does only evaluate Perl-Scripts.
But that may is a lot of work.

Especially, if you want to be able to use every language
in that way (Lua, Python, Scheme, Ruby, Tcl,....).
(Maybe using a C-Interpreter to "script" in C?!).

I think this is maximum effort to get slightly more
performance. I don't think, typesetting is a
maximum-performance-needed application.

If it is, you may go special ways to enhance performance.

Ciao,
   Oliver

P.S.: If the shell is really only used as a starter-program
      for stand-alone scripts (only starting the script-file
      without such things like wildcards for filenames at the
      command line), then on unix-like systems it's more performant
      to start the script with fork() and one of the exec-functions.
      This is not soo much effort to implement.
      But I don't know, how this is handled on non-unix-like
      systems.
      But system() is a function, provided by ANSI C, and is
      therefore independent od the used platform, while
      fork/exec may not.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]