Talk at Kitware next week, input requested!

56 views
Skip to first unread message

Anthony Scopatz

unread,
Aug 14, 2014, 8:55:34 PM8/14/14
to xdress
Hello All, 

I am giving a lunchtime talk on xdress next Wednesday at Kitware, see the abstract below. If anyone has any feedback or input please let me know!  I am particularly interested in any successes or (catastrophic) failures people have had to date. 

Be Well
Anthony

PS I am thinking of using the Bohemian Cats theme again but I am open to suggestions.

Title: XDress - Idiomatic, Automatic Wrapper Generation

Abstract: XDress is an automatic wrapper generator for C/C++ written in pure Python. Currently xdress may generate Python bindings (via Cython) for C++ classes & functions and in-memory wrappers for C++ standard library containers (sets, vectors, maps). In the future, other tools and bindings will be supported.

The purpose of xdress is to create APIs that are a pleasant and natural to use in the target language as the original library. This means that interfaces are translated idiomatically. In some cases this is easy - functions are functions, classes are classes, and so on. In other cases this is more difficult - overloaded functions and templated classes. In still other cases it means that common data structures need special attention - std::maps are not dicts, but std:vectors should be NumPy arrays. In all cases the wrappers should be fast. Unlike other wrapper generators, xdress does its best to fully translate these language constructs.

All of this is done on the backdrop of a modular bring-your-own-parser architecture. To date xdress supports Clang, GCC-XML, and pycparser which makes it the first Python automatic wrapper generator to fully support C++11. Additionally, Python, C, and C++ are only the beginning. Other language plugins may be added with relative ease as interest and demand dictate.

This talk will a discussion on xdress’s parsers, the idiomatic translations it implements, and some type system basics.

jelle feringa

unread,
Nov 23, 2014, 4:57:07 AM11/23/14
to xdr...@googlegroups.com
That Bohemian Cats theme was cool, why not keep it as a xdress signature?

It took a long time for the VTK bindings to be complete and pythonic, so -and this surely is stating the obvious- why not wrap some part of the API and show the kitware dev's how xdress can make their lives easier and improve their product?

What's really hard in wrapping a vast project like VTK is that you'd like to wrap the library in such a way that your no longer following C++ idioms, but create a pythonic wrapper.
Of course, its great that xdress does so out of the box.

However, the true power of SWIG, IMHO is typemap. With little effort you can create transformer functions that describe a pattern ( say an C++ idiom and map this to a pythonic idiom ) and wham, apply it to the whole damn API.
I've been involved in developing PythonOCC and this has been something of a killer feature. Here's what I'm talking about. 

"Just" generating a wrapper, isn't powerful enough, how can you generate a super pythonic wrapper, how does xdress provide you with tools such that you can map you API idiomaticaly.
I think your Scipy 2013 very clearly explained how C++ types are mapped ( with views, map seems more appropriate than wrap? ) in a pythonic manner with little effort.
That said, I think a large project like VTK requires a high degree of control of how this mapping is performed.
Short and sweet, what's xdress's analogy of typemap?

-jelle




jelle feringa

unread,
Dec 10, 2014, 2:21:27 PM12/10/14
to xdr...@googlegroups.com
Have you had an interesting response of your talk?
Reply all
Reply to author
Forward
0 new messages