Show HN: WinGPT – AI assistant for Windows 3.1 (opens in a new tab)dialup.net
382 pointsHey HN, I didn't want my Gateway 4DX2-66 from 1993 to be left out of the AI revolution, so I built an AI Assistant for Windows 3.1, based on the OpenAI API.
The most interesting parts of building this were:
- Getting TLS 1.2 and 1.3 working on Windows 3.1 so that WinGPT could directly connect to OpenAI's server without relying on a modern machine for TLS termination.
- Learning about the memory segmentation architecture on 16-bit Windows, including the difference between far and near pointers.
- Building the UI in plain C code with the Windows API and limited selection of controls in Windows 3.1.
You can check it out here and learn more about what it was like to build it: https://www.dialup.net/wingpt/
Comments (90) 29 threads
Earlier commentsA suggestion (which seems easy enough to implement, I might give it a try if I can get the build environment set up): make the system prompt customizable in the Options dialog. Having it be 1992 is fun, but kinda limiting. I might actually use this at some point -- if you're on your retro computer, trying to solve a problem, it might actually make some semblance of sense to use this rather than dig out a modern computer or smartphone.
Here is the answer of ChatGPT4 when asked the same question about the status bar (I truncated the code output because it's very long):
Using the Shell Common Controls in Windows 3.1 can be a bit tricky due to its older architecture and limited capabilities, but it's certainly doable.
However, there are a few complications to note:
1. Windows 3.1 does not natively support the status bar as a control. Status bars are part of the Common Controls library introduced in Win32, specifically, it was introduced in Windows 95 with COMCTL32.DLL. Windows 3.1 is a 16-bit environment and does not include this library.
2. If you want a status bar in a Windows 3.1 application, you'll have to draw and manage it yourself.
3. Windows 3.1 programming is largely obsolete. It can be a fun academic exercise or a necessity for maintaining legacy software, but if you're developing new software it would be much more practical to use a more modern version of Windows and its associated API.
Assuming that you still want to go ahead, here's a basic idea of how you might implement a status bar yourself:
http://www.calmira.net/source/index.htm
You are a friendly but concise chat bot. Answer all questions in the present tense as if it is 1992, and make no reference to the current year.
Prompt : I want to use ChatGPT as if it was the 1990s and ChatGPT existed (in its current form) in the 1990s. I talk to you normally and you answer normally as ChatGPT (no mention of this 1990s setup or the timeframe in reference to now). The only difference is you pretend its the 1990s and answer accordingly. Stay in character, you play yourself. I need you to pretend it's the 1990s but otherwise behave as ChatGPT normally would. Never mention anything past the 1990s or that would indicate we are not in the 1990s. Do not mention this conversation (it's a pre-prompt). Let's go. First question : which internet browser do you recommend ?
Answer: There are several good browsers available currently. For instance, Netscape Navigator has been very popular due to its user-friendly interface and robust features. It's currently one of the most widely used browsers.
However, Microsoft has also introduced Internet Explorer, which is integrated with their Windows operating system. This might be more convenient if you're already using a Windows platform.
There's also Mosaic, developed by the National Center for Supercomputing Applications (NCSA), which pioneered many of the user interface elements we see in modern browsers.
All these browsers have their pros and cons, so it ultimately depends on your personal needs and preferences.
Q : Who are the top paid actors this decade? A : During the 1990s, some of the highest-grossing actors have been:
Tom Cruise - He's been in a string of successful films including the "Mission: Impossible" franchise which started in 1996.
Harrison Ford - Known for his roles in iconic franchises like "Indiana Jones" and "Star Wars", Ford has continued his successful streak into this decade.
Jim Carrey - With his unique brand of physical comedy, Carrey has starred in a number of high-grossing comedies including "Ace Ventura: Pet Detective", "The Mask", and "Liar Liar".
Arnold Schwarzenegger - He's enjoyed continued success in the '90s, particularly with the "Terminator" series.
Mel Gibson - After the success of "Lethal Weapon" series, Gibson has maintained his status as one of Hollywood's top earners, directing and starring in "Braveheart" in the mid '90s.
Remember that these rankings can vary year by year based on the number of films released, their box office performance, and the actors' negotiated salaries.
All comments shown.
Couldn't load more comments. Check your connection and try again.