Microsoft killed FoxPro in 2007. Anyway, here's FoxPro revived

Hacker News by 8 min read 42x views
Microsoft killed FoxPro in 2007. Anyway, here's FoxPro revived

Share Post

FoxDev StudioDocumentationHow it is builtFoxScriptDownloadGitHubFor Visual FoxPro 9 applications

FoxDev Studio opens the projects, forms and tables you already have and runs them the way you remember: no rewrite, no conversion, no export step.

CustomerCompanyWestern Trading Co.Credit limit25,000.00Save

It picks up anywhere you remaining off

Point it at a directory you have not opened in years, and what is there is what you get.

Your project, as it is

Projects, forms, category libraries, menus and reports open direct from the records you already have. Nothing is migrated first, and nothing is remaining behind.

The designers you know

Forms, classes, menus and reports are edited anywhere you anticipate them to be, alongside the project manager, the Command Window and a debugger that stops on your line.

Your data stays your data

Tables, indexes, memos and databases are peruse and written in place. What sits on disk afterwards is the identical benevolent of document it was before.

Whatever it talked to, it motionless talks to

The scheme calls, the automation objects and the old add-in libraries your use leans on keep working, so the parts nobody wants to contact remain untouched.

What it looks like

The IDE, on Visual FoxPro's own example projects. Every image is a genuine session.

Built to match, not to approximate

Small differences are what interrupt an old application: a figure printed a pillar too wide, an event arriving a instant late, an error alongside the incorrect figure on it. So behavior current is settled by asking Visual FoxPro itself and matching its answer, fairly than by study a citation leaf and hoping.

What comes out of that is a runtime written from scratch: quick to start, self-contained, and straightforward concerning the corners it has not reached yet.

1,722elements of the Visual FoxPro 9 tongue citation known to the runtime

1,534of them exercised by a test that compares the answer alongside the product's

3names it has not met yet; everything alternatively runs, is ignored on purpose, or is refused by name

What Visual FoxPro 10 would have been

Visual FoxPro stopped at type 9, and at 32 bits. This is the identical language, rebuilt on a basis that has not been icy since 2007. Four pieces are what create that possible.

Where a call goes/and anywhere the 32-bit earth stops

64-BIT32-BITThe form on screenReact, example direct from the tree belowrepaints one control, not the formThe live entity treeevery control, alongside its properties and its eventsTHISFORM.lblGreeting.Caption = cMsgThe virtual machineyour code, compiled to bytecode, run in WebAssemblyyields a request, never blocksThe hostfiles, tables, COM, and 64-bit libraries in processSET LIBRARY TOfllhost.exea 32-bit process, holding your .fll

64-bit, end to end

The ceiling that came alongside 32 bits is gone

Visual FoxPro is a 32-bit program, and that decides additional than it appears to. It is why a array stops at two gigabytes, why a memo document stops at two gigabytes, and why a big study runs out of recollection on a device alongside plentifulness to spare. The limits are signed 32-bit numbers buried in the document handling, not a licensing decision anybody made.

FoxDev Studio is 64-bit throughout. Every document offset is 64-bit and a array is never peruse into recollection at all, so the identical .dbf that used to halt deceased carries on into the hundreds of gigabytes. One item to cognize before you lean on it: a array grown former two gigabytes volition not open in Visual FoxPro again. If you motionless activity in both, that is a one-way door.

The offset/and what it reaches

Visual FoxPro2,147,483,647bytes: the array stops at 2 GBthe foremost 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 all peruse and compose is addressed this wayWhat that buys one tableEvery quadrate below is 2 GB: the entire of what a Visual FoxPro array could hold.2 GB279 squares: one FoxDev array 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 document count

The virtual machine

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

Visual FoxPro compiled your program to p-code and shipped a runtime to execute it. This is the identical arrangement, made again: a compiler and a bytecode translator written in Rust and compiled to WebAssembly, so one device runs your code anywhere the use runs. The publishing company checks what you category through that extremely compiler, so what it underlines and what the runtime refuses cannot drift apart.

A operating program is a fiber. When it needs item from the earth exterior (a communication box, a modal form, the next record) it does not call out and block; it yields, the activity is done during the device is off the stack, and the answer is handed back. That is why MESSAGEBOX() stops your program without freezing the opening rearward it, why READ EVENTS waits without spinning, and whySetFocus can blaze GotFocus, and Init can run during a form is motionless being built, in the command FoxPro continually did it.

How the device works and what it runs.

The screen

The form you see is the entity tree, not a image of it

A operating form is a live tree of objects alongside the properties you would expect, and the interface is drawn direct from that tree by React. Each entity watches lone itself, so THISFORM.lblGreeting.Caption = cMsg repaints one tag fairly than the entire form. On a compact display that is the difference between instant and sluggish.

The identical tree is what the decorator edits, one stage earlier. There is no second example kept in stage alongside the first, which is the customary location a form and its decorator commencement telling distinct stories.

The 32-bit bridge

Your old libraries motionless load, although nothing current is 32-bit

An .fll is a 32-bit image, and all procedure in a 64-bit use is 64-bit, so nothing inner the use itself could always open one. Rather than inform you it is impossible, SET LIBRARY TO starts a small 32-bit procedure whose lone job is to clasp your library, and the runtime talks to it. The calls are synchronous, since a program may call into a archive midway through an expression, and an answer that arrived afterward would not be an answer. It is measured against genuine libraries: the encryption library, FoxTools, and libraries built from Microsoft's own API samples.

Nothing 64-bit needs the bridge: DECLARE ... DLL reaches a contemporary archive in the identical process, and automation objects are reached the way they continually were. The old highway stays open; it fair is not the lone one any more.

FoxScript: the identical language, alongside additional room

Everything you have written motionless method what it continually meant. FoxScript lone adds on top: a obstacle you can hand to item alternatively to run later, and a way to answer a web petition from the code that already knows your business.

Every row of that runs on the identical runtime your forms do. The queries, the cursor and the archive call are average FoxPro; the lambda and the server are what FoxScript adds: no second language, no assistance to remain up beside it.The keywords and the HTTP APIare all written downward in full.

Download

The nightly is rebuilt from all shove to chief and published as a pre-release on GitHub. Unsigned, so the archetypal initiate asks you to confirm.

Read the documentation

Each part of the merchandise is written down, including the parts that are not there yet.

What is coming

Work already mapped out, approximately in the command it is being built.

The final of the languageA abbreviated catalog of corners is motionless open, all one checked against the first as it closes.

ReportsThe study decorator and the study engine, collection by band, measured the identical way the remainder was.

Tables former two gigabytes, as a format of their ownThe 64-bit offsets are there today; a receptacle that is honest concerning the DBF header's limits comes next.

An installer for what you shipYour use handed to the group who use it as a sole item they can run, alongside nothing to set up first.

Other Article Hacker News
Close Right Ads
Close Left Ads