Turbo Vision 2.0 β a modern port
151 points - today at 4:18 AM
SourceComments
The wrapper gives a higher level API, and solves some of the things like the rather antique palette API (or wraps it), is adding layout, etc.
```
var lMenuBar := new MenuBar;
lMenuBar
.Add(lDocumentMenu)
.Add(lViewMenu)
.Add(lDialogsMenu)
.Add(new Menu('~A~pp').AddItem('E~x~it', Commands.Quit));
fApplication.SetMenuBar(lMenuBar);
```(This is Oxygene, currently compiling to .Net. Can be used from any .Net language of course, even Go or Swift with our toolchain, but as an assembly, consumed by anything. Using PInvoke for the native TV binaries.)
Heavily in progress :D The repo is still private and I'm working on things like basing palettes on the surfaces controls are placed on today and tomorrow. Todos are cleaning up layouts, adding a few more basic (for today) missing controls, etc.
I had experimented with libraries like Terminal.GUI, which was (still is?) in the middle of a v2 transition and really difficult to get behaving without bugs. And Claude is a great lesson about TUIs and libraries that have been built without real terminal consideration -- lots of what not to do. I found myself missing Turbo Vision and thinking, why not just have a modern version? Then I found this repo, saw it was updated for Unicode, etc... I am very grateful to the author.
Compiler performance was superb and the manuals were a work of art - I just wished I had kept all of mine.
This is a cultural treasure.
few quick notes:
- blimey it was like it where i left it 199x :) you can even compile/run code from 1993 without major issues.
- there's even a better internal TV editor based on scintilla, so with syntax highlighting and such. although i was trying to mod it without success, i'll have to ask author for help, probably.
- there's no documentation (in the sense of common wisdom), so you can't ask stack overflow or AI. you have to do it like in old days: learn from examples (that have bugs in them ;) and read those few books on turbo vision again and again.
- manual 'layouting' is kinda annoying, some auto layout like qt would be handy
- i miss splitters, but that should not be hard to implement
- tbh i am kinda surprised how small and compact TV really is. it felt ginormous in the 90ies :)
overall - the author did very good job modernizing the library and i love it.
So this is a modern port of the port. :)
Borland did the same with other frameworks OWL came first in Turbo Pascal for Windows 1.5, and many of C++ Builder tools are actually written in Delphi.
Anyway, Turbo Pascal 5.5 adoption of Object Pascal, followed by Turbo Vision on version 6, was my introduction to OOP, and it I was lucky have gone that path.
Got to learn OOP, and all the goodies that Turbo Vision offered as a framework in an environment like MS-DOS.
There's also this one in C++: https://github.com/kloczek/tvision
The one that comes with FreePascal/Lazarus is written in Pascal.
There's even one in Rust, though it might have been vibe-coded: https://github.com/aovestdipaperino/turbo-vision-4-rust
It does showcase our incompetence. In this age we should be able to point to some online compiler and run it. Or download it and run it on a folder. That should be the extent of our involvement with tools. But apparently they are not tools, but rituals we insist on.
Anyone tested to run this on a high resolution Linux text mode with GPM?
I still need a VT-230 or 330.
"Uses" is keyword in Pascal, for example, so "including" a module by "#define"-ing feels like a "hack"
I guess it doesn't matter, nowadays.
IDEs we had 30 years ago and lost (2023)