Live data from Hacker News

A TLS 1.3 stack written in Visual Basic 6

github.com

11–20 of 101 posts

Re: A TLS 1.3 stack written in Visual Basic 6

#11
post #5

Earlier quoted context omitted.

Yep, one of the features of VB was you could call into Win32 fairly easily. I once worked with a guy who was a VB savant. He had reverse-engineered the DOC and PST formats in Visual Basic and was comfortable bit-bashing stuff in that environment. His higher-level code was really not good, that wasn't important to him, so he pasted stuff everywhere. Lost track, but hope he found his niche.

I think we all have similar stories of tools like VB being pushed far beyond their original purpose by someone with enough motivation, and creating perfectly functional, yet extremely unconventional code. Here's another example I found in my links of old interesting web stuff --- a server for the MMO Habbo Hotel, written by (at the time) a teenager: https://files.johno.uk/habbo/h4bbo.net/archive/HabboStuff/Mo...

Oh boy, I remember when this came around. That was incredible to see come together.

Re: A TLS 1.3 stack written in Visual Basic 6

#13
post #10

It's less than 8kLoC, including what seems to be a bunch of tests at the end, although much of the actual crypto appears to be done using the native advapi32/crypt32/ncrypt libraries. (For those used to OpenSSL, I suppose this could be compared to the libssl part of it.)

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…

Let's not forget the ~600 lines of type declarations lol...

To be fair, though, in C, those would just be hidden inside a header file, so you wouldn't notice them as much.

Re: A TLS 1.3 stack written in Visual Basic 6

#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 add a button at the bottom-right of my app?!”

Re: A TLS 1.3 stack written in Visual Basic 6

#15
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…

And this is why I absolutely refuse to do the whole HTML and Co. method of doing GUI's to this day. (XAML etc). I use tools like ETO instead where possible, where I define my UI in code, and it's built to the native UI toolkit whereever relevant. At no point am I writing fucking XML (why does anyone think this is a good idea?!) for a UI. I'm saying I want a title bar with these elements, directly in code. It's fantastic, and should be how it happened in the first place.

Re: A TLS 1.3 stack written in Visual Basic 6

#16
post #5

Earlier quoted context omitted.

Yep, one of the features of VB was you could call into Win32 fairly easily. I once worked with a guy who was a VB savant. He had reverse-engineered the DOC and PST formats in Visual Basic and was comfortable bit-bashing stuff in that environment. His higher-level code was really not good, that wasn't important to him, so he pasted stuff everywhere. Lost track, but hope he found his niche.

I think we all have similar stories of tools like VB being pushed far beyond their original purpose by someone with enough motivation, and creating perfectly functional, yet extremely unconventional code. Here's another example I found in my links of old interesting web stuff --- a server for the MMO Habbo Hotel, written by (at the time) a teenager: https://files.johno.uk/habbo/h4bbo.net/archive/HabboStuff/Mo...

Wow, TIL Habbo still exists: https://en.wikipedia.org/wiki/Habbo

Re: A TLS 1.3 stack written in Visual Basic 6

#17
post #7

wqweto is a genius. Check out his twinbasic project, 99% similar to VB6 with a bunch of extras, modernising the language. Shout out to all the VB6 legends still going at it and extending the language, wqweto, the trick, olaf, retailcoder.

Neat, thanks for sharing!

Re: A TLS 1.3 stack written in Visual Basic 6

#19
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…

I completely agree. I've played with VB6 a few times recently and it feels so fast and natural to make a UI compared to modern frameworks.

A bit part of it feels like a dedication to highly polished developer tooling. A strong GUI editor that works with (mostly) zero configuration is a big feature of VB6 to me.

Post reply on HN