Author Topic: Asking OS/2 things to OpenAI - Fun and maybe Insightful.  (Read 2054 times)

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4407
  • Karma: +41/-1
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Re: Asking OS/2 things to OpenAI - Fun and maybe Insightful.
« Reply #15 on: December 28, 2022, 11:48:38 pm »
What is UCONV.DLL

Quote
UCONV.DLL is a dynamic-link library (DLL) in the OS/2 operating system that provides support for character set and code page conversion. It is used to convert text data between different character sets and code pages, which can be useful when working with text data that has been encoded in a different character set or code page than the one being used by the current program or system.

UCONV.DLL is typically located in the \OS2\DLL folder of the OS/2 system folder. It is loaded automatically by the system when it is needed, and does not need to be explicitly loaded by programs that use it.

Here is an example of how UCONV.DLL might be used in a program:

#include <os2.h>
#include <uconv.h>

int main() {
   // Convert a string from the ISO-8859-1 character set to the UTF-8 character set
   char *input = "Hello, world!";
   size_t input_len = strlen(input);
   char output[128];
   size_t output_len = sizeof(output);

   if (UconvFromUcs(input, &input_len, output, &output_len, "ISO-8859-1", "UTF-8")) {
      // An error occurred
      return -1;
   }

   // Use the converted string...

   return 0;
}

In this example, the UconvFromUcs function from UCONV.DLL is used to convert the string input from the ISO-8859-1 character set to the UTF-8 character set. The input_len and output_len variables are used to specify the length of the input and output strings, respectively. The UconvFromUcs function returns zero on success or an error code if an error occurred.
Martin Iturbide
OS2World NewsMaster
... just share the dream.

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4510
  • Karma: +92/-1
    • View Profile
Re: Asking OS/2 things to OpenAI - Fun and maybe Insightful.
« Reply #16 on: December 28, 2022, 11:50:55 pm »
I notice that it is missing the needed defines before include os2.h, eg for the screensaver module, it should be something like,
Code: [Select]
#define INCL_DOS
#define INCL_WIN
#define INCL_GPI
#define INCL_ERRORS
#define INCL_TYPES
#include <os2.h>

The defines are so os2.h actually includes various things. Still for an AI, it isn't too bad at searching Google.

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4407
  • Karma: +41/-1
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Re: Asking OS/2 things to OpenAI - Fun and maybe Insightful.
« Reply #17 on: January 10, 2023, 02:05:12 pm »
But when I asked "Where is OS/2 source code?" it replied:
Quote
The source code for OS/2 is not publicly available by default. OS/2 was originally developed by IBM and Microsoft as a proprietary operating system, meaning that the source code was not made available to the public.

However, in 2001, IBM released the source code for a version of OS/2 called "Warp 4" under an open source license called the Common Public License (CPL). This made it possible for developers to access the source code and modify it as they saw fit, as long as they followed the terms of the CPL.

If you are interested in obtaining a copy of the OS/2 source code, you can try searching online for repositories or archives that contain the source code for Warp 4 or a later version of OS/2. You may also be able to find copies of the source code on forums or discussion boards for OS/2 enthusiasts.

Keep in mind that the source code for OS/2 is copyrighted and is subject to the terms of the CPL. You may need to obtain permission from IBM or other copyright holders if you want to modify or distribute the source code.

Even that I want it to be real, I guess it is wrong. But I wonder what is confusing OpenAI to think that Warp 4 was released under the CPL license?

Today I found it the OpenAI got partially corrected.

where did you find that Warp 4 was released under the CPL license?

Quote
I apologize for any confusion - I misspoke earlier. The IBM OS/2 Warp 4 operating system was actually released under a proprietary license and was not available under the Common Public License (CPL). IBM did open source some parts of OS/2, but it wasn't the entire OS and didn't happen at the same time of Warp 4 release. IBM has also ended support for OS/2 in December 2006 and development was halted.

It's possible that there may be some open source projects or forks of OS/2 that have been released under the CPL or other open source licenses, but these would be separate and distinct from the official IBM release of OS/2 Warp 4.

If you are looking for a version of OS/2 that is available under an open-source license, you can look for projects like eComStation or ArcaOS, these are modern versions of OS/2 and available for purchase, but their license may be different than the CPL

Again, I apologize for any confusion caused, and please let me know if you have any further questions.
Martin Iturbide
OS2World NewsMaster
... just share the dream.