4 ms·
How awesome to see this on the front page! I've been writing a wrapper for this repo. Right now I'm running Turbo Vision -- this repo -- under .Net on macOS. It
by vintagedave 6mo ago
How awesome to see this on the front page! I've been writing a wrapper for this repo. Right now I'm running Turbo Vision -- this repo -- under .Net on macOS. It's a magical feeling.
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.
- magicalhippo 6mo ago> This is Oxygene For those who aren't familiar[1], it's part of RemObjects' Elements[2] suite, which allows you to use and mix several different popular languages in addition to the Pascal-based Oxygene across Windows, MacOS, Linux, Android etc. [1]: https://www.remobjects.com/elements/oxygene/ https://www.remobjects.com/elements/oxygene/ [2]: https://www.remobjects.com/elements/ https://www.remobjects.com/elements/
- justinclift 6mo agoThat looks interesting. Pity they only have IDE's for Win/macOS though. :( I mean, deploying on Linux is good, but not having an IDE that runs on Linux is a disappointment.
- vintagedave 6mo agoWe've thought of it. Most customers are Win & Mac based. The vast majority of the IDE is shared code with only thin native UI wrappers (genuinely native, done the Right Way, aka non-Electron :D) and I admit to having been tempted to point an AI at the source and a copy of Qt and asking it to add a third one, a Linux GUI. We don't normally use AI for most of our coding, but I think with two prior examples and a thin layer only, it'd be a pretty cool experiment.
- justinclift 6mo agoIf you do have a go at that and want someone to test the end result, you're welcome to ping me to try it out? :) (email addr is in my HN profile) -- As a data point, I develop with Go professionally and use Linux (exclusively) both at home and at work. Some of my developer team mates at work use macOS, and others use Windows. Many of the other places I've worked have been fairly Linux (and/or macOS) heavy too. Not so much Windows heavy in the last few years, and I personally expect the trend of less Windows usage to continue due to Microsoft continuing to degrade its user experience.
- actionfromafar 6mo agoI wanted to do the same. I have used Terminal.Gui but would prefer TV and so considered a wrapper. Would be really interesting to see your wrapper.
- vintagedave 6mo agoHappy to share. It's really not in a shareable state right now, so that's 'happy in a few days maybe' if that's ok :) But you can ping me and I can let you know when it is? Drop me an email, username at gmail.
- lepicz 6mo ago> It's a magical feeling. hehe working with this TV library scratches my nostalgia itch :D it probably saved me from futile efforts like writing apps for GEOS or joining the one person Hurd team.
- FpUser 6mo agoI did not use TV directly but I loved the design so I used basic ideas for my own DOS UI library for Turbo Pascal. It was completely graphical and implemented using built in assembly. In order to save RAM my Window manager would save invisible regions to disk.
- deleted 6mo ago[deleted]
- electroly 6mo agoI've done some work with this tvision port as well. Every time I use a new TUI framework, I'm disappointed. Invariably, Turbo Vision is better. I'm actually working on my own .NET wrapper, too. I don't think I'm as far as you, though. I'm mimicking the Windows Forms API as closely as possible and I want to have a drag-and-drop TUI designer. Some examples of my wrapper: https://github.com/brianluft/terminalforms/tree/main/src/TerminalFormsDemo https://github.com/brianluft/terminalforms/tree/main/src/Ter... I did most of the hard integration work on the C++ side: https://github.com/brianluft/terminalforms/tree/main/src/tfcore https://github.com/brianluft/terminalforms/tree/main/src/tfc... -- exporting simple C functions that I can call with P/Invoke so that the C# side is mainly about organizing into classes. It took a couple tries to find a design that didn't fall apart when I got into more complicated stuff. Initially I went too hard into "everything that you can do in C++ should be possible in C#"--this was maddeningly complex. I was using placement new to stick the C++ objects into C# buffers, you could effectively subclass the C++ classes from the C# side, it was getting way too involved. I switched to a much more direct and less flexible approach. I decided the flexibility should be on the C# side. I'm curious how your P/Invoke system works.
- vintagedave 6mo agoNice! Mimicking that API is a great idea - a very different approach to mine and I love seeing it :) We shall clearly be in great competition in the future! (Joking aside, I actually hope great cooperation, not competition... it's what open source is for. Seeing someone else is making a .Net wrapper as well is just plain awesome and I wish you the best. I really like the different API style.)
- electroly 6mo agoDefinitely. Reach out to me or magiblot if you ever need any help. I love this stuff, and magiblot is extremely responsive. They have helped me many times and even made changes to tvision to support my use cases. As a stretch goal, you might try to integrate https://github.com/magiblot/turbo https://github.com/magiblot/turbo too. This is a Scintilla-based text editor control implemented in tvision. We worked together to make it embeddable in other programs (because I wanted it in mine). Example usage: https://github.com/tmbasic/tmbasic/blob/master/src/tmbasic/CodeEditorWindow.cpp https://github.com/tmbasic/tmbasic/blob/master/src/tmbasic/C... Also, I assume you know about the Turbo Vision Pascal and C++ books. They're really helpful. I transcribed both books to Markdown for easy searching if you want it.