Re: Nested R-expressions in r..eal

"Pukite, Paul R (US SSA)" <[email protected]>
Newsgroups gmane.comp.ai.prolog.swi
Message-ID <[email protected]>
Wouter said:
"
Btw, for those who have used the older R
interface<http://www.swi-prolog.org/pldoc/package/R.html>in the past,
I have found r..eal to be a significant improvement over that
one (link to paper on
r..eal<http://bioinformatics.nki.nl/~nicos/pbs/padl2013-real.pdf
"
I agree that it is much better. However, I still use the older version because it is thread-safe.
If you use SWIPL in a web-served configuration, one needs to be careful in which server thread that R is called in.
With the new version, R is a dynamic library and so is not re-entrant safe against being called by different threads.
The old version used spawned R instances so although slower and more resource hungry this was guaranteed thread-safe as each thread had its own instance of R to communicate with.

I have a simple example of using Nicos's original R..eal interface in a web server configuration here:
http://entroplet.com/context_demos/navigate
Click on the "Use R .." link

This is slower than having R as a dynamic link ready for service requests.

This doesn't address the question of nested calls but we do support the idea of using R in Prolog apps, as R is the right tool for certain numerical and graphing applications.
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.