[PD] Porting PD to Java (feasible with Cibyl?)

Andrew VanderVeen avanderveen+pd at gmail.com
Wed Jul 27 20:00:16 CEST 2011


Hi, I'm trying to port pdlib (http://gitorious.org/pdlib/libpd) to Java
using Cibyl (http://code.google.com/p/cibyl/) so that I can use pdlib on
Blackberry devices. You can see the project at
https://github.com/appsfactory/jlibpd if you like.  I've also been keeping a
log of my progress on a GitHub wiki page at
https://github.com/appsfactory/jlibpd/wiki/Cibyl-Log.

I've been successful in compiling most of it to intermediate MIPS code
(which Cibyl then translates to Java byte code), however there are two c
library files that are not implemented in the Cibyl toolchain (dlfcn.h and
socket.h).

There are three files in pure data that link to these two:
socket.h: s_inter.c and x_net.c
dlfcn.h: s_loader.c

I have two options for getting around this. I could either:
1. Write my own socket.h and dlfcn.h, with the implementation in Java, and
use Cibyl to link to these (example:
https://github.com/SimonKagstrom/cibyl/tree/master/examples/host-java/exporting-java-functionality-to-cibyl),
OR
2. Port libpd without using these headers.

So, since it's not exactly ideal to re-implement these headers in Java (I
don't even know if it's possible), is there a way that I can pull these
files out of the pure data project?  I'm not entirely sure what they do, or
how essential/core they are to the project.  Can I just remove certain
(unneeded?) functionality?

Another option is to rewrite these files so that they don't use socket.h or
dlfcn.h.  I don't know how possible that is either.  I thought that before I
dive in and start figuring out the whole project structure and what each of
the files do, I should see if anyone that already knows could fill me in on
the feasibility of this...

Thanks,
-Andrew
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20110727/a76e8c70/attachment.htm>


More information about the Pd-list mailing list