On 17/08/10 01:34, Casey Ransberger wrote:
I have a C app that I'd like to port to Squeak. I had this crazy idea that I wanted to incrementally replace parts of it bit by bit with Smalltalk, and was entertained by how that seemed roughly impossible. The first thought that crossed my mind was to try to bolt some sort of C-based RPC onto it, and use that as a way to get it to talk to Squeak. Then I thought about FFI, but what I'm reading about that talks specifically about libraries.
Here's what I'm wondering:
Would it be insanely painful to make parts of the app into libraries that could get called via FFI? Would it just make more sense to do a scratch implementation? Has anyone ever done something like this before?
It's a crazy idea:)
It's difficult to comment without some details of your app. How big/complicated is it? Does it have a UI? Does it call other libs? Does it use threading or do a lot of IO? Is speed a factor? What platform?
If the app is not so big, is already well structured and has no special requirements then you could split it into libs as a first step and then later migrate C-code to Smalltalk in manageable chunks. Alternatively jump in with both feet and re-implement as much as possible in Squeak :-)
-D