[NTLK] Love Notes ?2? Newton

Matthias Melcher m.melcher at robowerk.de
Sun Oct 27 07:46:24 PDT 2024



> On 27. Oct 2024, at 13:49, Noah Leon <moosefuel at gmail.com> wrote:
> 
> 
>> On Oct 24, 2024, at 15:00, newtontalk-request at newtontalk.net wrote:
>> 
>> So the question is, should we finally start a concerted effort to recreate the Newton source code? I know that there are only a hand full of people here who can write C++ and/or NewtonScript, but if we have a strategy and a goal, maybe it is doable with modern developer tools?
> 
> I have some questions!
> 
> Matthias, is cleaning up the source code something that our good friend A.I. could help with? I don’t know what it would take to get the few people who know how to code C++ and NewtonScript, but I imagine it would be a big time investment and there should be some sort of fundraiser or something for them. I feel like we might have discussed this before, but people’s time is precious so I want to make sure we don’t waste it.

Sigh, thanks for reminding me of my silly suggestions.

AI learns from what others already did, so unfortunately AI needs a few gigabytes of already translated code, and then it may be able to easily and quickly translate our ROM. I have searched the web to see if anyone has done something like this, but could not find anything.

Another strategy was to write some C++ code, translate it with the old C++ compiler, and see if the result is what we find in the ROM, and then have AI generate more code and find the matching sequences in the ROM. As tempting as that is, it is not guarantee that the generated C++ code is correct. Not sure if there are other ways.

Starting with a fundraiser is an option, and I have paid devs before to fix bugs in OpenSource projects, and while it does attract a bunch of devs, someone still needs to be able to verify the code before anyone gets paid. For a few bug fixes, that was easy, but for this reverse engineering effort, I wouldn't know how to do that. 

As for not wasting time, yes, you are so right! The ROM code is about 940'000 instructions long. Assuming 20 seconds to translate an instruction and typing the result, we look at 5200 man hours or 650 work days. Even if half the code is not needed (hardware specific, HWR, floating point math), we still need the equivalent of a full year of work to get something unverified and mostly undocumented. Or for a software engineer's salary, at least $100k to get started, and probably the same amount to make that into a portable app. So unless someone has a better approach or finds a way to automatically translate most of the code, this does not seem realistic.

Unless we convince eight or so enthusiastic developers to spend an hour a day translating code for free as a hobby, giving us a great base within a year... .

> As far as end goal, I guess we should have a way to either supercharge Einstein and run it over top of devices such as iPad or those e-ink readers with pens, or else have it run natively on a device.

That was yet another strategy. Translating parts of the ROM into something that can run inside Einstein, speeding up only the most time critical stuff. I did get some parts to work, but the Newton virtual memory setup made things really difficult.

So, yeah, if we could see and have and use the original source code, that would be best. Until then, Einstein is great, and finding bugs and fixing the 2040 issue is at least thinkable.

 - Matthias


More information about the NewtonTalk mailing list