[NTLK] Einstein 64-bit

Morgan Aldridge morgant at makkintosshu.com
Wed Dec 3 11:55:03 EST 2014


On Wed, Dec 3, 2014 at 11:39 AM, Steven Frank <stevenf at panic.com> wrote:
>
>> On Dec 3, 2014, at 4:25 AM, Morgan Aldridge <morgant at makkintosshu.com> wrote:
>>
>> Apologies if I'm way off here, but I' coming from the NEWT/0 side of
>> things. Paul Guyot contributed his "Relativity" (calling native methods on
>> the host OS from NewtonScript code)  support to NEWT/0 and it uses libffi
>> to do that. I'm not sure if Matthias used that at all for his Ethernet card
>> emulation (probably not), so it may be something that looks like it's not
>> really being used now, but would be a loss for extending packages on the
>> Newton OS side to take advantage of features inherent in newer OSes that
>> Einstein would be running on.
>
> To be perfectly honest, I'm still a little fuzzy on what ffi actually _does_.  I read the web page, and I'm only slightly less stumped.  :)
>
> If you know, could you explain it to me really simply (and slowly :))?  I understand things like ABIs and stack frames, but I'm just not grokking what ffi's intent is at a basic level.

As far as I understand from <https://sourceware.org/libffi/> and
poking around in
<https://github.com/gnue/NEWT0/tree/master/contrib/NativeCalls> while
working with NEWT/0, libffi allows one to interface directly to a
compiled code library at runtime, without having had to link that
library in at compile time. Unlike shared libraries where the headers
are still included and library is referenced, nothing happens until
runtime and by using libffi's interface, it'll map calls correctly
across the various library formats.

While I haven't looked at the Einstein source to confirm, the fact
that Paul Guyot contributed NativeCalls to NEWT/0 and that the
functionality mimics the "Relativity" feature he built for Einstein
(see <http://wwnc.newtontalk.net/resources/WWNC2006_Guyot_EinsteinRelativity.pdf>),
I'd guess that would be at least on reason for the use.

-- 
Morgan
---
http://makkintosshu.com/
http://seriesparts.com/
http://rikuwoiku.com/
http://unna.org/



More information about the NewtonTalk mailing list