atom feed9 messages in at.iem.pd-list[PD] Porting PD to Java (feasible wit...
FromSent OnAttachments
Andrew VanderVeenJul 27, 2011 10:59 am 
Mathieu BouchardJul 27, 2011 11:27 am 
Hans-Christoph SteinerJul 27, 2011 12:39 pm 
Hans-Christoph SteinerJul 27, 2011 2:13 pm 
Mathieu BouchardJul 27, 2011 2:32 pm 
Hans-Christoph SteinerJul 27, 2011 2:54 pm 
Andrew VanderVeenJul 28, 2011 1:48 pm 
Hans-Christoph SteinerJul 28, 2011 3:29 pm 
João PaisJul 30, 2011 10:24 am 
Subject:[PD] Porting PD to Java (feasible with Cibyl?)
From:Andrew VanderVeen (avan@gmail.com)
Date:Jul 27, 2011 10:59:53 am
List:at.iem.pd-list

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