Is anyone else using VB6 in their forever project?

I've been working on my forever project a long time. My overarching metaproject is a form of strong AI that will eliminate human coding and allow human language to be the primary form of interaction between people and computers. With a view to making some concrete progress on something useful, I have come up with some slightly more achievable subgoals: I'm going to need some libraries for the UI, general I/O, and data manipulation, a new programming language (like 50% of the posters on the thread that lead to the creation of this subreddit), an IDE for that language (with some support for other languages just so that it can be useful before I complete my own compiler), a web-based clone of the Windows operating system and Win32 API so that I can show off some of my works in progress to a public that is disinterested in downloading stuff. I am also working on a graphics editor that will compete with Adobe Illustrator and Photoshop when complete and act as a testbed for various libraries that I am working on in the meantime.

The graphics editor was my original forever application before I lost my focus. I originally developed some libraries in turbo pascal that I later ported to C++. My day job in the late nineties revolved around pumping out VB6 code and I totally bought into the VB6+C++/ATL ecosystem, but by the time I developed adequate skill with the ATL/COM side of that, it was 2003 and I realized that I had invested a lot in learning something that was completely unmarketable. Nevertheless, I kept toiling away on my own projects even as my day jobs evolved into C# & VB.Net.

Most of the library code I have developed has more sophisticated and mature counterparts in the python world or Java or .Net or Ruby. I think if I was a sane person I would have stopped a long time ago, but my forever projects have kept me motivated in the face of adversity and has lead me to learn all kinds of seemingly unrelated things.

For a while, I got paid to apply my expertise on someone else's forever VB6 project, but after a year it became clear to me that their project was never going to be finished which depressed me as it led to a moment of personal clarity with regard to the likelihood of my own projects ever being finished. At the same time, I felt vindicated when I first started using LINQ in my day job as I had developed something similar for VB6 years earlier.

In the course of my forever projects I have developed some outputs along the way that have mostly only been useful for me, and could only be useful to someone developing in VB6:

  • Virtualization add-in for the VB6 IDE. This adds a "Build and Deploy" menu item that builds the project and packages all dependancies into a self extracting exe that can run off a thumb drive without any installation.

  • Geometry DLL for applying 2D and 3D coordinate transformations and a few other geometry operations like calculating distance from a line to a point. I guess not all that useful if you're using OpenGL or DirectX, but useful for GDI based WYSIWYG apps.

  • An Activex DLL for png image support. Includes in-memory encode/decode which is useful for embedding png images into composite file formats.

  • Documentation generator that is basically a lamer version of doxygen that only works off IDL.

  • Command line utility that generates syntax highlighted HTML from Visual Basic or JavaScript source files. Inline SQL and inline JavaScript is also highlighted with a different color scheme from the outer language.

  • Code generator based on templates and its own scripting language (comparable to T4 but slower, in some ways more flexible but in other ways less so). This one isn't just useful for VB6 but it addresses some VB6-specific issues that are difficult with other code generators.

  • Expression evaluator embeddable in VB6. Slower than embedding vbscript, but has a Sum() function that works over collections - eg. eval(context, "Parent.Age + Sum(Parent.Children.Age)"

  • Various things I've found on CodeProject that I've packaged as ActiveX DLLs.

  • Image and comic book viewer for Windows (supports .cbz)

My Windows clone work-in-progress is here

It has a basic file system with two built-in drive letters: "R:" is a ram drive that resides in the browser, "W:" is the "web drive" that resides on the server.

So far, you can't do much with it. There's a command prompt, but I've only implemented "cd", "dir", and "type", and none of the command line options for those.

The production site is minified with the YUI minifier, but you can get a feel for what the code is like by viewing the source of this page.

The server side is written in C++ as an apache module.

I'm not going to write out a full list of goals for my programming language as I don't think that other people's programming language ideas are terribly interesting, especially syntax, but mine is basically like Boo with some BASIC-isms, except with

  • reference counted memory management (like VB6)

  • a compatibility mode for VB6 (making it a drop-in replacement for Microsoft's VB6 compiler)

  • embeddable into other applications like VBA

  • able to be compiled to either native code using LLVM or to Javascript (using my Win32 clone for portability).

My plan of attack is to start with an IDE that is a viable alternative to the one that shipped with VB6 that can be used with either Microsoft's compiler or my own and then develop the compiler initially as a VB6 clone before implementing my own syntax ideas.

I've made some headway using Scintilla as the code editor (wrapped in an ActiveX DLL of course) and using GOLD for the parser, although I still use my own parser for syntax highlighting based on my earlier HTML generator.

I plan to embed my programming language and IDE into my graphics editor, so that repeated operations can easily be automated.

Both the IDE and the graphics editor are fertile ground for developing natural language interfaces. I am spurred on by the knowledge of an earlier VB6 IDE Add-in that I made in the 90's using the Dragon Naturally Speaking SDK which helped me out a lot at the time but my needs far outgrew the bowl of spaghetti code I'd written.

If I ever finish the aforementioned projects, I would like to write a worthy successor to Elite with the in-flight graphics on a par with Orbiter but with the ability interact with artificially intelligent NPC's on each planet & space station.

tldr; I thought about writing an operating system from scratch, but it seemed a little overambitions. It's best to start small.

Posted Jan 28, 2013, 4:48 PM UTC · edited

611
pnpbios•

I don't know who down-voted you, this is actually some really cool shit.

VB6 was an interesting time to be a programmer. And in 1998, vb6 was nothing to complain about. It would be interesting to see where things went if vb would have continued to be an ActiveX based language instead of joining the .net family.

1
adelleOP•

Ah, for a lot of people, VB6 was the language they used at school, which doesn't exactly endear it to them. A lot of my contemporaries felt the same way about Pascal.

It doesn't help that most of the VB6 example code, even in the MSDN samples, is ridiculously non-idiomatic. For example, it's rare that it is actually necessary to "Set MyObject = Nothing", but there it is in every VB6 example that ever instantiates an object.

And Microsoft did cripple VB6 to the point that it wasn't a full participant in its own ecosystem. For example, certain types of add-ins could only be written in C++ and there are a number of important interfaces that are needlessly incompatible with VB6, notably IStream and IEnumVARIANT. And you couldn't load a VB6 DLL directly into IIS, you needed to bootstrap it from ASP. I could go on.

I had a lot of fun learning about the limitations and working out how to circumvent them, but that's only productive in the sense that smashing windows creates work for glaziers but those same glaziers could have been contributing something more useful to society if the windows weren't broken in the first place.

However, there is a certain geniusmanship in making something simple, and VB6 was a simple solution to the sorts of problems we had at the time, but then the web happened, and I don't believe that there is anything out there that addresses the programming needs of today in the same way that VB6 did back then.

I think the big hurdle for us forever-projecters is in conveying our ideas to others and winning people over. I've never been good at that, and I'm sure I'm not alone in that.

I hope this subreddit stays active, because I plan to post additional items as I make concrete progress. I don't expect to find an enthusiastic audience for my ideas here, but the smallest expression of interest is enough to make my day and it beats starting a blog.

1
MisterSnuggles•

However, there is a certain geniusmanship in making something simple, and VB6 was a simple solution to the sorts of problems we had at the time, but then the web happened, and I don't believe that there is anything out there that addresses the programming needs of today in the same way that VB6 did back then.

I'll admit that it's been a long time since I've done web stuff, but it does seem like there are a lot of tools (Ruby on Rails, jQuery, Bootstrap, for example - none of which I've actually used) to make things easier. What kind of needs do you see that aren't being addressed?

2
adelleOP•

jQuery & Bootstrap go a long way, but you still need to know a lot before you can write even a simple app of the kind you could throw together in Visual Studio and ASP.Net in half an hour if you don't mind the lagginess of interacting with your app via postbacks. I think we'll see more IDEs in the browser to address this.

2
MisterSnuggles•

Ahh, I think I understand what you're getting at.

You want something with the ease of use of Visual Studio and ASP.NET, but that's designed for the way the web works instead of trying to make a web site behave like a desktop app.

I'll admit that this is something that I wanted myself (and I had a few false-starts at building such a beast), but now that I no longer do much web stuff any of my forever projects related to that have disappeared off my radar.

2
Pourush•

Seems like people are pretty polarized by this post, judging by the vote counter. I liked it, at least.

I thought about writing an operating system from scratch, but it seemed a little overambitious

As soon as I learned programming, this was the first major project that I attempted. Learned a lot about researching from the experience. I only recently put that off of my list of goals, and even then it was in favor of reverse engineering a Linux operating system, and making changes to that. If you're wondering why I have to reverse engineer it, it's because that's the only fun and proper way.

Moral of the story, I was a little confused by that line even though it makes perfect sense.

1
adelleOP•

The thing is, the bar keeps moving. Thinking back to Windows 3.1, I think I could make something similar if I put my mind to it, but I couldn't have back then and there'd be no point now, except as a hobby.

I don't see anything wrong with spending time on a hobby. That's why we work right? To pay for our hobbies.

1
Pourush•

The thing is, the bar keeps moving.

Now I get why you stopped with the operating system. For me, this was not a factor, since I was perfectly alright with having my operating system have fewer drivers than DOS. Also, I was almost certainly more attached to my idea. Mystery solved.

1
adelleOP•

I don't have RES installed so I'm unaware of the downvotes. Given the vote total is in the single digits, the downvotes could just be fuzzing. If any downvoters want to explain their reasoning, that'd be cool too.

Just writing out this post helped me clarify some thoughts on what I'm doing & why, so I'm glad I did it.

1
Pourush•

Oops. I forgot about fuzzing. And yeah, I've found that writing posts explaining your forever project in detail helps, even if you don't wind up posting them.

1