[IPOL discuss] python as an addition to c++

Nicolas Limare nicolas at limare.net
Wed Jun 5 16:42:26 CEST 2013


Hi,

> I was wondering whether python could be used in addition to c++.
> It is a free language (unlike Matlab) and has math packages such as NumPy
> and SciPy.

Python is interesting and could be added to the list of languages
accepted by IPOL. For me, its advantages over Matlab are a public
language reference, multiple implementations, very large portability,
useful types and constructs, rich standard library, and free software
interpreters and modules.

But I think a few points must be discussed before a decision can be
reached. Some are quite sensible, some are less important. I'l like
your opinion on them, and answers on the questions included would help
close some points.

1. Language

Which Python are we talking about? There are currently two major
and incompatible versions of the language, Python2 and Python3. I have
no idea how long the Python Foundation intends to provide
implementations for the Python2 language, and how long this
implementation will be available for IPOL machines.

Moreover, Python is not very useful without its standard library,
and this library has frequent updates, about once every two years. Do
we have some guarantee that any code working with Python 2.N will
always work with Python 2.N+1. Is there an official policy on backward
compatibility?

2. Packages

The standard library may not be enough for real image processing
algorithm. You mentioned NumPy (the "efficient numeric array"
package), and SciPy (the "everyting for sciences using NumPy"
package), but how stable are they. I haven't used them for years and
in ~2008 things were still moving. Numpy may have stabilized now, but
what about SciPy. Can we trust a code written for SciPy to still work
and give the same results 10 years from now? 10 years is not much,
it's just the time from entering university to getting a PhD...

Another package is essential: something to read and write
images. Unfortunately, the quasi-standard PIL package is buggy and
unmaintained. Is there an alternative? I know about scikit-image, but
I am afraid it is still young. In fact, we do not need an iomage
processing package, just a VERY RELIABLE solution to read and write
standard image formats from a Python code.

3. Reuseability

So far, with only in C and C++, all the codes published in IPOL are
quite compatible, in the sense that one can build a new C or C++
software by reusing parts of these codes. On ne can also reuse them
with other languages, like Fortran, Java, Python, or Matlab, via the
compatibility all these languages have with the C binary interface and
types.

If we publish codes in Python, how well can they be reused by other
researchers not using Python?

4. Expertise

To accept Python code, we need to update the Software Guidelines with
details for this language, and we need to have enough editors and
reviewers capable of not only reading and analyzing Python code, but
also able to say when a code is well written. I do not know if we have
them.

5. Safety

With the power of the Python standard library, it is very easy to do
vthings very annoying on the demo serve, including exploring the
filesystem and talking over the network. This is possible in any
language, but not as easy as in Python. So, to avoid abuses of the
demo server, I think demos will have to be run in an isolation
environment. This sandboxing will be good for other demos as well, but
its implementation has not started yet.

All the best,

-- 
Nicolas LIMARE
http://nicolas.limare.net/                         pgp:0xFA423F4F
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <https://tools.ipol.im/mailman/archive/discuss/attachments/20130605/cce1cc6c/attachment.pgp>


More information about the discuss mailing list