Great project

98 views
Skip to first unread message

Rohit Garg

unread,
Aug 11, 2012, 3:22:05 PM8/11/12
to bi...@googlegroups.com
Hi David,

How do I thank you for this? This is so useful and so simple. As some
one who has written C extensions, I can't tell you how useful this is.
Using a lot of extern "C" seems almost harmless compared to the
benefits of using this.

This project is fairly new, but where do you think it might need some work?

Cheers,

--
Rohit Garg

http://rpg-314.blogspot.com/

Graduate Student
Applied and Engineering Physics
Cornell University

David Beazley

unread,
Aug 12, 2012, 11:48:47 AM8/12/12
to bi...@googlegroups.com, David Beazley
On Aug 11, 2012, at 2:22 PM, Rohit Garg wrote:
>
> This project is fairly new, but where do you think it might need some work?
>

In the big picture, I don't see Bitey a direct alternative to tools designed to wrap existing C libraries into Python (Swig, Boost, SIP, etc). So, that's not a direction that interests me so much.

Instead, I'm much more interested in the idea of exploring what LLVM+Bitey can bring to small, custom-written extensions. The ability to directly import bitcode into a module is one thing, but I think that only scratches the surface of what might be possible--especially when you're freed from the confines of the normal C compiler+linker+shared library environment. For example, you could blast LLVM bitcode out to nodes on a compute cluster and instantiate extension modules directly (never even touching the file system). You might be able to solve some tricky problems such as the reload problem (i.e., not being able to reload C extensions). Since LLVM bitcode can be inspected and manipulated, you could write tools that alter or wrap
the bitcode in various ways. You could even use llvm-py to make LLVM bitcode on the fly and bind it into an extension module.

LLVM is also not specific to C. Potentially, you make extensions with any language capable of exporting LLVM bitcode. That opens up some interesting new possibilities as well.

Short term plans involve making Bitey play a bit better with Python itself. For instance, allowing interaction with PyObject * types, possible integration with numpy, that sort of thing. After that, there's more exploration of the runtime environment. For instance, using multiple modules, linking between modules, defining module overlays, etc.

Cheers,
Dave



Reply all
Reply to author
Forward
0 new messages