Live data from Hacker News

VTM: A Text-Based Desktop Environment

web.archive.org

51–60 of 145 posts

Re: VTM: A Text-Based Desktop Environment

#51
post #9

Tried to connect with Juice SSH on mobile and it looked quite ... abstract.

Also with Terminal.app from macOS...very..er..."colorful". https://www.dropbox.com/s/q52w26jsyv086hn/Screen%20Shot%2020...

Looks fun like that on iOS Prompt, too.

Must be looking for ANSI instead of VT100.

Mismatched emulator modes reminds me of BBS days.

Re: VTM: A Text-Based Desktop Environment

#52

Earlier quoted context omitted.

Oh yeah. I'm going to date myself here, but I was just going to say this reminds me a lot of Borland Turbo C++ way back in the day. They had this thing called Turbo Vision for building text UIs. It seemed super cool back then. https://en.wikipedia.org/wiki/Turbo_Vision

It definitely was super cool. The windows had types, could be resized, had titles, dropdown menus, and form controls. The editor had syntax highlighting. And most importantly (at least for me at the time), there was a language reference included with the help system which had hyperlinking, so you could click through pages about the supported syntax and various topics, gleaning a wealth of information. All on DOS!

Hypertext integrated help has been available earlier than turbo vision even. It has been available from turbo pascal 3 at least. For a young like me who ... copied it on two disks, it was awesome what you could learn.

Re: VTM: A Text-Based Desktop Environment

#54
post #38

Earlier quoted context omitted.

Windows 1.0, while having a framebuffer-based layout engine, clearly evolved from a pure TUI, and retains elements (title bars, scroll bars, etc.) whose drawing algorithm emulates a TUI within the framebuffer, by just drawing DOS-like lines or grids of box-drawing characters. In fact, it’s only window content that is arbitrarily graphical in Windows 1.0; if you only have DOS VMM windows open, you’re essentially seein…

Windows 1.0 didn't actually use box-drawing characters for any of this, of course. For example, the System menu in the top left corner of each window was three horizontal lines, just like a hamburger menu of today. Scrollbar buttons did not look like any box-drawing character. The Maximize button in the top right did look like a box-drawing character, but that's really about the only resemblance I see. (I developed a…

Right, I'm not saying that the GUI was rendered using the DOS box-drawing characters, i.e. the monitor's built-in codepage 437 text mode; nor were they using a monospace bitmap font of codepage 437.

What I'm saying, is that I'm pretty sure that a lot of the Windows 1.0 GUI was drawn by emulating the "technique" TUIs use to draw box-drawing characters, but on a framebuffer and with a custom (monospace) bitmap font:

1. create any-and-all graphical detail you need on screen, by repurposing the "leftover" parts of the bitmap font you're using to draw control-label text to the screen, adding a set of additional, custom symbol-drawing elements, which are all 'characters' of that bitmap font, and so all stuck being the same size+shape as the label text;

2. create a graphical "monospace text" drawing primitive, that takes as input a pair of buffers representing the text itself, and its hardware-text-mode-alike per-character drawing attributes (i.e. FG + BG color);

3. implement your OS widget library almost entirely in terms of calls into that graphical "monospace text" drawing primitive, passing a static data-section buffer holding the positional+attribute data for your box-drawing character.

(For example, look at the drive icons in the File Manager. Those are just clearly just "text" composed of four drawing-element characters from the bitmap font, like this: [-=-]. So the whole drive-chooser area can be drawn with a single text-draw command, passing a string like "A[-=-] C[-=-] C: \WINDOWS".)

-----

You might say "but look at any screenshot of Windows 1.0 — the first thing you'll notice is that the menu-item labels in each window's menu bar are offset by a half-character-width horizontally! And modal dialogs are, in their entirety, offset by a half-character horizontally and vertically! How's that possible?"

Well, the GUI "monospace text"-drawing primitive might be drawing a grid of characters to the framebuffer; but it's not drawing them to an imaginary grid on the framebuffer. It accepts an arbitrary pixel offset for where it should start to draw the block of monospace text.

So, with that in mind, the algorithm for drawing the menu bar very likely has two passes:

1. render some box-drawing characters representing the "background" of the menu (i.e. yellow with a black border)

2. render a layer of regular non-box-drawing characters on top, offset by +4px on the X axis, in "black on transparent", representing the menu-item labels.

It's pretty clear (to me, at least) how a drawing algorithm like this could be a natural evolution and outgrowth of a TUI: first, replace the TUI's backing text buffer with a framebuffer, and the character-plotting calls with draw calls to a "draw monospace text character at emulated-grid position on framebuffer" primitive; then refactoring the draw calls to use a window-local coordinate basis; and only then adding the ability to draw anything other than monospace characters—but gradually, starting only with defined grid-snapped "rich graphical content" regions within windows (sort of like how Windows today has "Direct3D drawing surface" regions); and then going back and gradually enhancing the GUI widgets with little flourishes like draw offsets.

Within the Windows 1.0 codebase, I would bet money that—at least in some previous revision in early development—there was probably a #define flag for whether the "framebuffer driver" was enabled; and that all these windowing-system and common-controls drawing algorithms were written in a "hybrid" way where, instead of one TUI-based and an entirely-distinct framebuffer-based implementation, the framebuffer-based implementation is just #ifdef'ed ornamentation on top of the base TUI implementation.

Re: VTM: A Text-Based Desktop Environment

#56
post #46

Is this running on top of Windows and just replaces the GUI?

Nope, I guess this is a Linux or at least platform-independent command line interface program. You are probably confused by the powershell which seems to be available for multiple platforms nowadays, see https://aka.ms/pscore6

There's also a window claiming to be Windows' CMD. As I can't figure out how to enter text in any of these windows (I'm assuming it's disabled, otherwise CHAOS) I can't tell if it's just a vestigial window of if it's a true output.

The topics on the Github repo list both Linux and Windows. The Readme calls itself "aka Monotty Desktop". That makes me think they may have written the code for the Mono runtime, so I'm expecting it's C#.

I had played around with a similar idea in C# some months back, though I was targeting only Windows because it took P-Invoking into some Win32 APIs to get most of the functionality.

Re: VTM: A Text-Based Desktop Environment

#59
Along with DESQView and IBM’s TopView as already mentioned, this reminded me of the first version of PC Smalltalk put out by Digitalk that was called “Smalltalk Methods”. It was a character based windowed Smalltalk.

This was quickly followed with the full bit mapped windowed Smalltalk/V. I believe all of this was when MS Windows still only had tiled windows without overlap.

Post reply on HN