Live data from Hacker News

A TLS 1.3 stack written in Visual Basic 6

github.com

71–80 of 101 posts

Re: A TLS 1.3 stack written in Visual Basic 6

#71
post #29

Are there still working and available ide and compilers for vb6? Any open source ones? After working on vba for MSAccess for a few years I came to both appreciate and hate it. It’s fast, small in features compared to modern languages, but a pleasure to hack around and find ways to expand its capabilities. I made simple ORM with it, autogenerating classes from a database, went into the rabbit hole of modernising the d…

The VB6 IDE can still be installed on Windows 10 and probably 11. See https://www.vbforums.com/showthread.php?898205-Can-Visual-St... I don't think Microsoft will come after you for doing it even if you use a pirate copy.

My company still maintains a VB6 program that we just keep that IDE alive in an XP VM. I can attest that the VB6 applications will work on Win10 & Win11 with only minimal effort to get the required libraries so I would not be shocked to learn the IDE works too

Re: A TLS 1.3 stack written in Visual Basic 6

#73
For what it's worth. I started my company with a B2B solution developed in VB6. Now 20 years later I moved to Cloud/SAAS long time ago. But wouldn't you know, about half of my clients still run mission critical processes with the desktop client that received it's last update in 2018. Another one is scheduled for this year.

Re: A TLS 1.3 stack written in Visual Basic 6

#74
post #14
post #6

I still can’t comprehend that VB6 had time travel debugging 20 years ago, and we still don’t have that with most other IDEs.

Don’t tell anyone, but I still think we’ve been terrible at UIs since VB6 and Hypercard. We mostly gave up on 2D grids as device resolutions evolved. We made HTML, then made HTML5 as if everything was a blog or newspaper with a navigation bar, semantically (and you still have to learn that the nav contains a bulleted list?) Unfortunately, it became a 3-hour or 3-year or 30-year process for someone to learn “how do I…

> “how do I add a button at the bottom-right of my app?!”

Whenever I work with a WYSIWYG GUI designer I ask myself a different set of questions instead:

Is this button really in the bottom right, or does it just happen to look that way at the current window size?

Is the spacing on all sides actually equal, or are the pixel coordinates just close enough that I can't see the error?

If I click the button to find out, will I accidentally move it and introduce the error I was trying to detect? (And the version control system can't do much to help with blobs of generated layout code/data.)

Re: A TLS 1.3 stack written in Visual Basic 6

#75

I’m seeing in-line x86 assembly encoded as floating-point constants, implementing what looks like indirect function calls (function pointers?). Is this…normal for advanced VB code? Does VB6 not have any other mechanism for function pointers?

You can use the "AddressOf" operator to get a function pointer, but it can only be used to pass to native (Win32) functions. This is how you do things like implementing your own WndProc function. VB itself can't call through the resulting function pointer.

Re: A TLS 1.3 stack written in Visual Basic 6

#76
post #10

Earlier quoted context omitted.

The big lines of code in TLS is x.509 certificate parsing, and supporting multiple protocols. If you just want 1.3 and you've got existing cipher and certificate validation libraries to call, it's not too bad. There's some published test vectors to help you get the cipher setup right as well; it gets fiddly, but it's not going to be a lot of code unless you have an Object Extravaganza, and even then, still not too ba…

I implemented TLS without any external deps by supporting only mandatory stuff from the RFC specifications. DER parsing here: https://github.com/mateuszb/tls1.3/blob/master/der.lisp Elliptic curves here: https://github.com/mateuszb/tls1.3/blob/master/elliptic-curv... Protocol records: https://github.com/mateuszb/tls1.3/blob/master/record.lisp At the time I implemented TLS1.3 there was very little support for it and i…

Does supporting only the mandatory stuff give you acceptable compatibility in the real world, or do too many people rely on things that were supposed to be optional?

Re: A TLS 1.3 stack written in Visual Basic 6

#77
post #35
post #29

Are there still working and available ide and compilers for vb6? Any open source ones? After working on vba for MSAccess for a few years I came to both appreciate and hate it. It’s fast, small in features compared to modern languages, but a pleasure to hack around and find ways to expand its capabilities. I made simple ORM with it, autogenerating classes from a database, went into the rabbit hole of modernising the d…

There are (at least) two project in development aiming to make a modern VB6 with full backwards compatibility: https://twinbasic.com/ https://www.radbasic.dev/ Especially Twin Basic looks good IMHO. Looking forward to testing it on my old applications!

There was also another one written in Java which was (supposedly) very compatible too and had a full working IDE, etc, but it was abandoned long ago and has been lost in the mists of time. Actually there was a much older project that was compatible with VB4 (i think) and IIRC it was made when Microsoft still worked on classic VB, but again, abandoned and lost.

None of these were open source, like the two you mentioned, which if history is any indication it means that they will be eventually lost too.

Re: A TLS 1.3 stack written in Visual Basic 6

#78
post #68

Ah,VB6 - that's how I started programming. There was a book literally called "Visual Basic for Kids" and I got it when I was....12? I think? Anyway it got me into making all kinds of basic games, then I started reading books about C and C++, started programming for the Playstation Portable, went to university to study CS and got a job in the games industry after that. I 100% credit Visual Basic 6 for me being a progr…

Close enough, I found a free pdf on Windows Vista ~2008 and there was a chapter with VBScript. You could write these and just double click them to run, spent many hours in notepad making dialogs and small calculator apps etc. Was pretty shocked when I picked up cpp shortly after and the tutorial told me I needed something called a compiler.

I wonder how much the fidelity of modern games hinders young people from breaking into computer programming.

Games are an amazing mechanism for learning because they can cover a gamut of computing issues in an interesting and motivating environment. The key to learning how to program (or, honestly, most anything) is to have a problem you're keenly interested in and trying to solve it. The "learning" becomes secondary to the problem solving.

My Dad learned programming (badly, wow was his stuff horrible!) through solving financial analysis questions. Kids, however, tend to not have "problems". But games are filled with them, and, done right, in a quick turnaround environment, they can be really fun, and quickly rewarding, to solve.

But, Back In They Day, LOTS of games were crummy, character or text based games. So most of the problem solving was not spent on assets, but just on the logic behind the game. As a student in high school with access to a PET computer, all I did was write games. When all you have is the, albeit robust, PETSCII graphic character set and a 40x24 display, you run into limits quickly (you should have seen my first forays into 3D programming).

But at the same time, the cosmetics cost "nothing". A few characters laid out on the screen. I had a submarine game with ships traveling across "rolling waves water", that, honestly, probably took 10m of coding to make it work.

Today, however, if you look out at most any game, well, the graphics are the graphics. 2D, 3D, etc. They're very involved. Even a web page today is (can be) a time consuming process of making it "look good" beyond simply generating the content for the page.

And I just wonder if that's acting as a barrier to entry for folks even wanting to try their hand at it. This "Alphabet" game, I can see that being very quick, even for a novice to make progress on with Visual Basic. A window is trivial, painting characters is straightforward, adding colors, etc. No worries about frame rates, double buffering, animated sprites, etc. Just clear the screen and stamp a letter (or letters) on it, and watch for a keystroke.

I know there are some child friendly environments that perhaps make this easier, but for teens that want to use a "real programming language", the step up can be quite steep. When your "Star Trek" game looks much like any other, its easy to focus on game play, logic, and "learn programming". When your "Star Trek" is made from E's, K's, and *'s and The Other One is full motion 3D models blasting glittering photons, you can see how for some, that can take the wind out of their sails to even start trying.

Re: A TLS 1.3 stack written in Visual Basic 6

#79
post #74
post #14

Earlier quoted context omitted.

Don’t tell anyone, but I still think we’ve been terrible at UIs since VB6 and Hypercard. We mostly gave up on 2D grids as device resolutions evolved. We made HTML, then made HTML5 as if everything was a blog or newspaper with a navigation bar, semantically (and you still have to learn that the nav contains a bulleted list?) Unfortunately, it became a 3-hour or 3-year or 30-year process for someone to learn “how do I…

> “how do I add a button at the bottom-right of my app?!” Whenever I work with a WYSIWYG GUI designer I ask myself a different set of questions instead: Is this button really in the bottom right, or does it just happen to look that way at the current window size? Is the spacing on all sides actually equal, or are the pixel coordinates just close enough that I can't see the error? If I click the button to find out, wi…

> Is this button really in the bottom right, or does it just happen to look that way at the current window size?

To be fair, that would mean you're not using a WYSIWYG GUI designer. With VB6, you could resize the window, in the editor, and watch the elements move around.

Re: A TLS 1.3 stack written in Visual Basic 6

#80

Earlier quoted context omitted.

I implemented TLS without any external deps by supporting only mandatory stuff from the RFC specifications. DER parsing here: https://github.com/mateuszb/tls1.3/blob/master/der.lisp Elliptic curves here: https://github.com/mateuszb/tls1.3/blob/master/elliptic-curv... Protocol records: https://github.com/mateuszb/tls1.3/blob/master/record.lisp At the time I implemented TLS1.3 there was very little support for it and i…

Does supporting only the mandatory stuff give you acceptable compatibility in the real world, or do too many people rely on things that were supposed to be optional?

It works most of the time unless the "endpoint" employs an engineer who is prone to customizing things too much :) In TLS 1.3 "mandatory" really means it.
Post reply on HN