Reuse, not rework
Home

License Awareness



Highly Reusable Software

By activity
Professions, Sciences, Humanities, Business, ...

User Interface
Text-based, GUI, Audio, Video, Keyboards, Mouse, Images,...

Text Strings
Conversions, tests, processing, manipulation,...

Math
Integer, Floating point, Matrix, Statistics, Boolean, ...

Processing
Algorithms, Memory, Process control, Debugging, ...

Stored Data
Data storage, Integrity, Encryption, Compression, ...

Communications
Networks, protocols, Interprocess, Remote, Client Server, ...

Hard World
Timing, Calendar and Clock, Audio, Video, Printer, Controls...

File System
Management, Filtering, File & Directory access, Viewers, ...



The goal of the librock collection is software which enables adoption and reuse in the widest possible way. Here are some of the design choices we made, and at the same time tried to make it easy for you to override or wrap our implementations. (You can modify the source code as well.)

Librock License
MIT-style (Free, Open-source, not copyleft, and no advertising clause.) An MIT-style license is compatible (allows use) with every license we know, including all Free, and Open Source licenses as well as closed source and commercial licences. For obvious reasons, the license requires that you propagate the disclaimer of warranty.

Portability and Adaptation
A header file for each platform (compiler + architecture combination) is used to set typedefs, memory models, and the macros which control conditional compilation. Librock can be used on a platform which has multiple memory pointer widths (near, far)

Source code with no warranty
The software is provided without warranty. We supply source code, it is up to you to ensure it is suitable for your use. if you want to make a change, you can.

Librock respects your global name space
So that there is no conflict with your names, all librock global names (functions, storage, macros, etc.) begin with the prefix "librock_". You will not have naming conflicts.

As an added benefit, when others read the code, this prefix will provide immediate recognition of the functions supplied by librock.

If you are using C++: you always have the option to declare librock in a namespace, and you can #define short names so that you do not have to use the prefix.

Librock file names and the base name for source language files are unique
You can compile all the files in the library into one target directory, and never have any need to rename certain outputs because the base name was the same.

Well-Documented
Functions are documented in a browseable catalog by subject, to make them easy to locate, even if you do not know the name. The documentation pages include a synopsis, plus dependencies, requirements, and example uses that you can cut and paste.

Completely Stable API
Once we document and publish an API as non-experimental, the header file, function name, purpose, interface, and features will not be changed in future revisions. The point is to reduce the risk of rework. [More about this]
Thread Safety
Thread safety means that any write accesses to a shared object or variable are done only when the object is "locked" to prevent other simultaneous readers or writers. Most librock functions reference only local variables and arguments. Functions which are called, and any global or static variables which are referenced are listed in the <USES> section of the manual page. Among other uses, this aids in verifying thread safety.
[More about this]
For performance and logistical reasons the caller always has the responsibility to manage locks, when multiple threads could write to identical objects. Librock locks what it should in the rare case when it accesses global variables. It is up to the caller to manage some locks too. [More about this]
Debugging and tracing
Librock includes compile-time support for renaming functions so that they can be "wrapped." All calls to a function can be intercepted. Assertions, debugging checks, and trace logging can be done before and after calling the original function body. More about this
The #librock_DEBUG macro enables some automatic parameter validation and debugging checks in some functions. This behavior is documented on the manual pages.

C++ implementation choices
Some librock features are supplied for use in C++. A separate page describes the librock choices to enable high reuse and wide adoption in C++.