News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Standard library questions

Started by donkey, June 09, 2010, 07:40:32 PM

Previous topic - Next topic

donkey

I've been thinking it might be a good idea to develop a standard library for distribution with the header files. I will of course need submissions but for now I have a few questions:

1) Should the library be pre-compiled into lib format or should it be in source format ?
2) Should there be a limited set of predefined switches for more optimized output (ie USEMMX, USESSE etc...) ?
3) What type of functions should be included, just the raw essentials or more high level stuff like string arrays ?
4) Who would be interested in making some submissions of their code (it has to be your own or I need proof of permission)

Give me some ideas and hopefully I can start work on it this summer if time allows.

Edgar
"Ahhh, what an awful dream. Ones and zeroes everywhere...[shudder] and I thought I saw a two." -- Bender
"It was just a dream, Bender. There's no such thing as two". -- Fry
-- Futurama

Donkey's Stable

Yuri

I personally would prefer sources, though maybe because I am unfamiliar with libs. Never used them, in fact.
Switches look like a reasonable idea. Again, maybe just because I'm now on an old machine that only has MMX and not even SSE.
Probably, functions of any level would be useful. Though it's unclear to me what exactly you mean by 'raw essentials'.
As for submissions of code, perhaps some day in the future. Right now I doubt my code is any close to optimal and can be regarded as 'standard'. It's straightforward and its main merit is that I understand how it works.

donkey

Hi Yuri,

I prefer source level libraries as well. By raw essentials I mean simply conversion and manipulation functions for example conversions between strings and numbers as well as basic string manipulations such as instring. Higher level functions would be flat wrappers for COM only functions like creating shortcuts or as I said above a string array or maybe even a binary tree. The great thing about a community developed library of functions is that once submitted it can be expanded or improved upon by the whole community, this benefits everyone including the original author. For this reason I would suggest that any code whether or not the author thinks its worthy helps in the development of both our skills as programmers as well as adding to the library of code.
"Ahhh, what an awful dream. Ones and zeroes everywhere...[shudder] and I thought I saw a two." -- Bender
"It was just a dream, Bender. There's no such thing as two". -- Fry
-- Futurama

Donkey's Stable

Yuri

Shortcut creation should definitely be useful. I remember my irritation at the discovery that such an apparently ordinary operation is so complicated. At that moment I had absolutely no desire to learn some weird stuff absolutely not related to my current project. I am still surprised there is no API like SHCreateShortcut.

ecube

well m32lib,fpublib and gensys lib already have tons of useful functions. What's lacking is a lot of unicode equivilant function which GoAsm would excell at, also theres not very many COM examples. Even though GoASM macro abilities are limited theres not many macro examples. I also prefer source over lib.

Dharam

I also prefer source over lib.  In fact, a souce with a clear title at the top of what the name is and what the input parameters are and what and where the output is and the pointer.  Preferrably there would be exact information of which registers are saved and which are altered.  The sort of thing that allows one to make a call without worrying about the details at the same time looking at details if something is different from expected.

donkey

I think the consensus is for a source code based library. I am no longer sure that I will have the time to spend on it but am actively trying to recruit someone to manage the project. If there are any volunteers please post here. The following is what I envision for the library:

Each function must be self contained
All imports must be explicit (ie invoke SomeDLL.dll:function) so the user is not expected to link the appropriate libraries
The functions cannot depend on the header project, they must include their own definitions.
The function names cannot conflict with any in the headers or macros.
All functions that accept or return strings must be available in both Unicode and ANSI versions
Although copyrights are fine, no usage restrictions or credit requirements should be allowed
I have thought it might be nice to have a fast version and a safe version for some functions
The code should be well commented in English and a reasonable explanation of usage should be supplied
For the usage documentation, I like the MSDN format but any consistent format will do.

If there is anything I have missed please feel free to post it, for this project since it is a standard library we should have clear objectives before we start. Also some suggestions for functions that should be included would help quite a bit.

Edgar
"Ahhh, what an awful dream. Ones and zeroes everywhere...[shudder] and I thought I saw a two." -- Bender
"It was just a dream, Bender. There's no such thing as two". -- Fry
-- Futurama

Donkey's Stable