微软于 2007 年终止了 FoxPro。不过,FoxPro 现在复活了。
Microsoft killed FoxPro in 2007. Anyway, here's FoxPro revived

原始链接: https://foxscript.org/

FoxDev Studio 是 Visual FoxPro 的现代化 64 位演进版本,从底层构建以克服其前身在架构上的局限性。 主要改进包括: * **64 位架构:** 通过突破 32 位的限制,FoxDev Studio 消除了 2GB 的文件大小上限,使数据表能够达到数百 GB 甚至 TB 级别。 * **现代化虚拟机:** 运行时使用 Rust 编写并编译为 WebAssembly,采用基于纤程(fiber)的架构。这实现了非阻塞 I/O,确保用户界面在进行繁重处理时依然保持流畅响应。 * **响应式 UI:** 表单通过 React 渲染为动态对象树,实现了精确的屏幕重绘,性能较原始的传统绘图方法有显著提升。 * **32 位兼容性:** 通过独特的桥接进程,FoxDev Studio 保持了对传统 32 位 `.fll` 库的支持,确保现有代码库能够继续运行,同时允许通过 `DECLARE...DLL` 访问现代 64 位 API。 简而言之,FoxDev Studio 在保留 Visual FoxPro 熟悉逻辑与行为的同时,将该语言迁移到了一个高性能、面向未来的基础之上。

一个名为 **FoxScript** 的新项目旨在复兴经典的 Visual FoxPro (VFP) 开发环境。微软于 2007 年正式停产了 VFP,但许多遗留的商业应用程序仍依赖于这一老旧的 32 位技术,因为重写这些程序的成本和风险太高。 FoxScript 旨在通过在基于 Rust 编译为 WebAssembly 的新运行时上运行原始语言,来实现平台的现代化。该项目引入了多项重大改进,包括打破 2GB 表文件大小的限制,增加了对 Lambda 表达式、JSON 和内置 HTTP 服务器等现代功能的支持,同时保持了与原有 32 位 `.fll` 插件的兼容性。 该项目以 MIT 协议发布,在 Hacker News 用户中引发了怀旧之情,许多用户回忆起职业生涯早期使用 FoxPro 的经历。尽管该项目尚处于开发阶段(报表和签名构建功能尚未实现),但它为那些希望在不进行全面迁移的情况下维护其长期运行的 FoxPro 应用程序的企业提供了一条可行的途径。
相关文章

原文

Visual FoxPro stopped at version 9, and at 32 bits. This is the same language, rebuilt on a foundation that has not been frozen since 2007. Four pieces are what make that possible.

64-bit, end to end

The ceiling that came with 32 bits is gone

Visual FoxPro is a 32-bit program, and that decides more than it appears to. It is why a table stops at two gigabytes, why a memo file stops at two gigabytes, and why a big report runs out of memory on a machine with plenty to spare. The limits are signed 32-bit numbers buried in the file handling, not a licensing decision anybody made.

FoxDev Studio is 64-bit throughout. Every file offset is 64-bit and a table is never read into memory at all, so the same .dbf that used to stop dead carries on into the hundreds of gigabytes. One thing to know before you lean on it: a table grown past two gigabytes will not open in Visual FoxPro again. If you still work in both, that is a one-way door.

The offset/and what it reaches

Visual FoxPro2,147,483,647bytes: the table stops at 2 GBthe leading bit carries the sign, which is why it is 2 GB and not 4FoxDev Studio9,223,372,036,854,775,807bytes: the offset is never what stopsevery byte of every read and write is addressed this wayWhat that buys one tableEvery square below is 2 GB: the whole of what a Visual FoxPro table could hold.2 GB279 squares: one FoxDev table of 130-byte records, 558 GB.At 1 KB records it reaches 4.4 TB, which is 2,200 of them.what stops it now is the DBF header's own record count
The virtual machine

A compiler, and a machine built to run what it makes

Visual FoxPro compiled your program to p-code and shipped a runtime to execute it. This is the same arrangement, made again: a compiler and a bytecode interpreter written in Rust and compiled to WebAssembly, so one machine runs your code wherever the application runs. The editor checks what you type through that very compiler, so what it underlines and what the runtime refuses cannot drift apart.

A running program is a fiber. When it needs something from the world outside (a message box, a modal form, the next record) it does not call out and block; it yields, the work is done while the machine is off the stack, and the answer is handed back. That is why MESSAGEBOX() stops your program without freezing the window behind it, why READ EVENTS waits without spinning, and whySetFocus can fire GotFocus, and Init can run while a form is still being built, in the order FoxPro always did it.

How the machine works and what it runs.

The screen

The form you see is the object tree, not a picture of it

A running form is a live tree of objects with the properties you would expect, and the interface is drawn straight from that tree by React. Each object watches only itself, so THISFORM.lblGreeting.Caption = cMsg repaints one label rather than the whole form. On a dense screen that is the difference between instant and sluggish.

The same tree is what the designer edits, one step earlier. There is no second model kept in step with the first, which is the usual place a form and its designer start telling different stories.

The 32-bit bridge

Your old libraries still load, though nothing here is 32-bit

An .fll is a 32-bit image, and every process in a 64-bit application is 64-bit, so nothing inside the application itself could ever open one. Rather than tell you it is impossible, SET LIBRARY TO starts a small 32-bit process whose only job is to hold your library, and the runtime talks to it. The calls are synchronous, because a program may call into a library halfway through an expression, and an answer that arrived later would not be an answer. It is measured against real libraries: the encryption library, FoxTools, and libraries built from Microsoft's own API samples.

Nothing 64-bit needs the bridge: DECLARE ... DLL reaches a modern library in the same process, and automation objects are reached the way they always were. The old road stays open; it just is not the only one any more.

联系我们 contact @ memedata.com