Code Monkey home page Code Monkey logo

stuff's Introduction

NOTICE:

What a year 2020 has been (not in a positive way)! I have finally have the time to return to this project. As such, I have been convinced to make some major structural changes AND actually do some innovative things with the library.

This has a few major implications:

  1. I will start splitting the library into small (mostly) standalone libraries.
  2. I will relicense the code to something less restrictive (probably MIT).
  3. I will leave this library here for a while, but unmaintained. Eventually, I will remove this library.

stuff

A library of miscellaneous, random, eclectic C++ code and other stuff. ;-)

Introduction

This library is my attempt to collect code I have written over the years into a shareable and reusable form. At the moment, I have no real agenda or plan other than for this library to be useful. Also, I don't intend for this library to solve some grand problem. It will probably always be a collection of useful but random stuff.

If you find this library useful, I would love to hear about it!

Goals

  • Use the latest C++ standard, techniques, and practices.
  • Prefer the standard library, libraries on track for standardization, or Boost.

Library Contents

(May be slightly out-of-date. See code for definitive list of contents.)

algorithm

  • output: Simplify dumping containers. Great for debugging.
  • random: Simple wrapper for generating random integers and real numbers.

container

  • byte_array Array of bytes. Useful for handling Unicode, compressed
    data, etc.
  • string_array Array of strings (for convenience, clarity, and brevity).

core

  • exception: Ease defining new exceptions, formatting exception messages, checking preconditions/postconditions/invariants, handling nested exceptions, etc.
  • units Compile-time conversions for memory buffers, etc.

datetime

  • types Wrapper for types (as C++20 evolves) and bake-in nanoseconds.
  • datetime Various, useful date/time operations.
  • financial Date/time operations related to financial data.

io

  • filesystem: Transparent file compression, functional-like algorithms for files and directories, etc.

string

  • convert Fast string to integer/floating point conversions.
  • split Fast string tokenizing.

unicode

  • detect Encoding detection.
  • convert Fast conversions of ASCII saved as UTF-16/32.

Dependencies

See the code for a definitive list, but as for now:

Compilers and Platforms

Compilers

  • GCC
  • Clang

Platforms

  • Linux (I use Debian Stable)

Build Options

  • STUFF_WITHOUT_TESTS [Default: OFF] Do not build tests when ON.
  • STUFF_WITHOUT_BENCHMARKS [Default: OFF] Do not build benchmarks when ON.

To use the above build options with CMake, do the following:

cmake -D<option>=ON|OFF .. && make -j

Getting Started

...

Helping

I would love suggestions, fixes, and other contributions. I would be particularly interested in help supporting other platforms. Feel free to discuss major additions/contributions.

See CONTRIBUTING for more information.

stuff's People

Contributors

tonywalker1 avatar

Watchers

 avatar

stuff's Issues

Feedback on Adding New Dependency

After the last set of pushes, I noticed that I have gained a few users of my code (I had not been watching). I hope you find it helpful.

I am considering adding a new dependency. However, because I have users, maybe I should consult you too. I want to start using ranges in some of my projects and the choices are: Boost Range and Range-v3. The main decision points that I see are:

  1. Boost is already a dependency while range-v3 is not.
  2. The Ranges proposal that was accepted for C++20 is based on range-v3.
  3. Boost Range is very well tested; range-v3 less so.
  4. Range-v3 offers more features and will lead to code that is probably closer to C++20 ranges when they ship.

I am leaning toward range-v3. I will leave this open for about a week and then close it. Please discuss/vote here.

Other feedback is welcome (feel free to email me directly)...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.