twinBASIC Update: November 19, 2023
Highlights include an overhaul of the IntelliSense system, a project to get full paths of all running processes, and a new Kernel Mode Support Package.
On April 23, 2021, I helped Wayne Phillips introduce the world to twinBASIC at the Access DevCon Vienna conference. I boldly predicted that twinBASIC (along with the Monaco editor) would replace VBA and its outdated development environment by 2025. With that goal in mind, this weekly update is my attempt to keep the project fresh in the minds of the VBA development community.
Every Sunday, I will be providing updates on the status of the project, linking to new articles discussing twinBASIC, and generally trying to increase engagement with the project. If you come across items that should be included here, tweet me @NoLongerSet or email me at mike at nolongerset dot com.
Here are some links to get involved with the project:
- Custom twinBASIC IDE Installation Guide
- GitHub Issue Tracker (report bugs)
- twinBASIC Discord Server (chat about the project)
- twinBASIC/VBx LinkedIn Group
Highlights
IntelliSense Overhaul
With the release of BETA 422, the IntelliSense system has been completely overhauled.
Apparently, the earlier version of IntelliSense was simply a tweak of the built-in Monaco IntelliSense functionality. With BETA 422, Wayne has replaced the stock Monaco IntelliSense with a system built entirely from scratch, providing a better fit for the specific twinBASIC use case.
Along with the rewrite, there are now three IntelliSense "modes" to choose from:
- LEGACY: similar to VB6
- MODERN (default): presumably more in line with modern code editors, such as VS Code
- MANUAL: for those power users who are trying to squeeze an extra 5% of productivity out of the IDE by matching IntelliSense behavior to their own personal style
Anecdotal reports are that the IntelliSense rewrite has also resulted in improved performance, though I have not seen any benchmarks that quantify the actual differences.
Wayne Paying Off Technical Debt
As posted by Wayne on Wednesday, November 15, in Discord:
Just FYI, for the remainder of this week I'm tackling some big tech-debt; necessary to keep the project manageable. I mention it because I'm inundated with private messages asking when feature X will be ready. I know you're all just eager to see your projects working fully, and I understand it's frustrating... please bear with me.
Discord Chat Summary
* Auto-generated via Claude-2-100k on poe.com
Here is a summary of the key points from the General channel transcript:
-
Intellisense and signature help have been improved to be more customizable and less intrusive. There are now options for Legacy, Modern, and Manual modes.
-
The project reached 400 Discord members, highlighting the growing interest in twinBASIC.
-
A recurring theme was troubleshooting and fixing issues importing VB6 projects, like setting the correct DLL directories and file paths.
-
Conversations covered awaiting upcoming features like MDI forms, a Printer object, and full SQLite support.
-
There were technical discussions around exception handling, COM object creation, intrinsic functions, and emulating VB6 bugs.
-
Multiple international users joined from Brazil and Vietnam, showing twinBASIC's global reach.
-
The new customizable intellisense popups sparked debates around ideal colors to reduce looking like errors.
-
Excitement built around the project nearing v1.0, but patience was preached as some key features still need implemented.
-
There was pride in twinBASIC feeling like a rebirth of VB6 if it had continued evolving the past 20 years.
Overall, progress continued with beta releases as twinBASIC marches towards 1.0, driven by engaged users worldwide eager to migrate old projects.
Around the Web
EnumProc: Getting the full path of all processes when not elevated
Over on vbforums.com, fafalone posted some new code to get the full path of all running processes–including processes running under elevation, even those of the SYSTEM user–from within a non-elevated process.
If you've used programs like ProcessHacker or ProcessExplorer you might have noticed that you don't need to run them elevated to see the full paths of all the running processes. ... So how can we find the full path...? ... One way is to ask Windows itself, since it maintains a list of all process paths internally.
To get the full sample code–which is compatible with both VB6 and, of course, twinBASIC, head over to fafalone's post at vbforums.com.
tbKMode - Kernel Mode Support
fafalone posted the following in the twinBASIC show-and-tell Discord channel:
While I've only released the proof-of-concept HelloWorldDriver, I've got several mode kernel mode projects in the works, some in quite advanced stages of development including 2 90% of the way to initial tests. So I've done enough API translation to make a worthwhile package to help others who might want to explore the novel concept of writing kernel mode drivers in twinBASIC, even though right now only a very, very tiny portion of a huge API surface is covered. But that's enough to make some simple projects.
tbKMode is the same idea behind the API base in tbShellLib, only constructed purely for kernel mode, which can't important from anywhere except ntoskrnl.exe, and theoretically, a few other kernel mode modules, though currently tB I believe has a bug preventing use of fltmgr.sys. Once that's fixed, minifilter drivers are very much accessible from tB, unlike other driver frameworks that would be difficult or impossible.
...
tbKMode is available from the package manager as twinBASIC Kernel Mode Support Package, v0.1.1 or from it's GitHub project page: https://github.com/fafalone/tbKMode
Changelog
Here are the updates from the past week. You can also find this information by visiting the GitHub twinBASIC Releases page.
ChatGPT Changelog Summary
* Auto-generated via ChatGPT, sorted in order of ChatGPT's opinion of "most impactful changes."
- Improved Intellisense System: The monaco intellisense and signature-help systems, essential for code autocompletion and guidance, have been completely replaced with custom versions for better compatibility with twinBASIC's use case.
- Added Intellisense Mode Setting: An 'IDE: Intellisense mode' setting has been introduced, offering LEGACY (closer to VBx), MODERN, and MANUAL options, defaulting to MODERN, allowing users to adjust the autocompletion behavior to their preference.
- Enhanced Markdown Support: Markdown files (.MD) now receive syntax highlighting in the IDE, improving readability and user experience.
- Extended WebView2 Package Support: Support for the NavigationStarting event has been added to the WebView2 package, enhancing the web content display capabilities within the application.
- Fixed Intellisense Triggers: Fixed an issue where intellisense was triggering incorrectly after specific key combinations such as CTRL+C, CTRL+V, improving the accuracy and reliability of the autocompletion feature.
WARNING: The following issue is present in BETA builds 202 - 423 (the latest build as of publication):
- there are known memory leaks in these versions, so memory usage will be higher than normal
BETA 422
- improved: completely replaced the monaco intellisense system with a custom verion better suited for our use case
- improved: completely replaced the monaco signature-help system with a custom verion better suited for our use case
- added: IDE setting of 'IDE: Intellisense mode' with options LEGACY (closer to VBx) / MODERN / MANUAL, default MODERN
- improved: markdown files (.MD) now get syntax higlighting in the IDE
BETA 423
- added support for NavigationStarting event to the WebView2 package, and updated WebView2 demo with it
- fixed: intellisense was sometimes incorrectly triggering after pressing key combinations such as CTRL+C, CTRL+V