Functional Programming Library for C++. Write concise and readable C++ code.

logo

CI (License Boost 1.0)

FunctionalPlus

helps you write concise and readable C++ code.

Table of contents

Introduction

Great code should mostly be self-documenting, but while using C++ in reality you can find yourself dealing with low-level stuff like iterators or hand-written loops that distract from the actual essence of your code.

FunctionalPlus is a small header-only library supporting you in reducing code noise and in dealing with only one single level of abstraction at a time. By increasing brevity and maintainability of your code it can improve productivity (and fun!) in the long run. It pursues these goals by providing pure and easy-to-use functions that free you from implementing commonly used flows of control over and over again.

Say you have a list of numbers and are interested in the odd ones only.

bool is_odd_int(int x) { return x % 2 == 1; }

int main()
{
    typedef vector<int> Ints;
    Ints values = {24, 11, 65, 44, 80, 18, 73, 90, 69, 18};
    // todo: get odd numbers from values ...
}

There are different possibilities to attain your goal. Some of them are:

  1. write a (range based) for loop
    Ints odds;
    for (int x : values)
    {
        if (is_odd_int(x))
        {
            odds.push_back(x);
        }
    }
  1. use std::copy_if from the STL
    Ints odds;
    std::copy_if(std::begin(values), std::end(values),
            std::back_inserter(odds), is_odd_int);
  1. use keep_if from FunctionalPlus
    auto odds = fplus::keep_if(is_odd_int, values);

If you think version 3 could be the one most pleasant to work with, you might like FunctionalPlus. And if you still think the hand-written for loop is easier to understand, also consider what would happen if the loop body (i.e. a corresponding lambda function in the call to fplus::keep_if) would be much longer. When reading keep_if you would still immediately know that odds can only contain elements that came from values and were selected by some, possibly complicated, predicate. In the for loop case you have no idea what is happening until you read the whole loop body. The loop version probably would need a comment at the top stating what the use of keep_if would tell at first glance.

Usage examples

Below you find some short examples showing nice things you can do with functions and containers using FunctionalPlus.

The same old song

You can test the content of a container for various properties, e.g.

#include <fplus/fplus.hpp>
#include <iostream>

int main()
{
    std::list<std::string> things = {"same old", "same old"};
    if (fplus::all_the_same(things))
        std::cout << "All things being equal." << std::endl;
}

The I in our team

There also are some convenience functions for retrieving properties of containers. For example you can count the occurrences of a character in a string.

#include <fplus/fplus.hpp>
#include <iostream>

int main()
{
    std::string team = "Our team is great. I love everybody I work with.";
    std::cout << "There actually are this many 'I's in team: " <<
        fplus::count("I", fplus::split_words(false, team)) << std::endl;
}

Output:

There actually are this many 'I's in team: 2

The cutest kitty

Finding the highest rated element in a container is very simple compared to a hand-written version(1, 2).

#include <fplus/fplus.hpp>
#include <iostream>

struct cat
{
    double cuteness() const
    {
        return softness_ * temperature_ * roundness_ * fur_amount_ - size_;
    }
    std::string name_;
    double softness_;
    double temperature_;
    double size_;
    double roundness_;
    double fur_amount_;
};

void Test_example_TheCutestCat()
{
    std::vector<cat> cats = {
        {"Tigger",   5, 5, 5, 5, 5},
        {"Simba",    2, 9, 9, 2, 7},
        {"Muffin",   9, 4, 2, 8, 6},
        {"Garfield", 6, 5, 7, 9, 5}};

    auto cutest_cat = fplus::maximum_on(std::mem_fn(&cat::cuteness), cats);

    std::cout << cutest_cat.name_ <<
        " is happy and sleepy. *purr* *purr* *purr*" << std::endl;
}

Output:

Muffin is happy and sleepy. *purr* *purr* *purr*

Function composition, binding and map creation

Let's say you have the following function given.

std::list<int> collatz_seq(int x);

And you want to create an std::map<std::uint64_t, std::string> containing string representations of the Collatz sequences for all numbers below 30. You can implement this nicely in a functional way too.

#include <fplus/fplus.hpp>
#include <iostream>

// std::list<std::uint64_t> collatz_seq(std::uint64_t x) { ... }

int main()
{
    typedef std::list<int> Ints;

    // [1, 2, 3 ... 29]
    auto xs = fplus::numbers<Ints>(1, 30);

    // A function that does [1, 2, 3, 4, 5] -> "[1 => 2 => 3 => 4 => 5]"
    auto show_ints = fplus::bind_1st_of_2(fplus::show_cont_with<Ints>, " => ");

    // A composed function that calculates a Collatz sequence and shows it.
    auto show_collats_seq = fplus::compose(collatz_seq, show_ints);

    // Associate the numbers with the string representation of their sequences.
    auto collatz_dict = fplus::create_map_with(show_collats_seq, xs);

    // Print some of the sequences.
    std::cout << collatz_dict[13] << std::endl;
    std::cout << collatz_dict[17] << std::endl;
}

Output:

[13 => 40 => 20 => 10 => 5 => 16 => 8 => 4 => 2 => 1]
[17 => 52 => 26 => 13 => 40 => 20 => 10 => 5 => 16 => 8 => 4 => 2 => 1]

The functions shown not only work with default STL containers like std::vector, std::list, std::deque, std::string etc., but also with custom containers providing a similar interface.

Type deduction and useful error messages

FunctionalPlus deduces types for you where possible. Let's take one line of code from the Collatz example:

    auto show_collats_seq = fplus::compose(collatz_seq, show_ints);

collatz_seq is a function taking an uint64_t and returning a list<uint64_t>. show_ints takes a list<uint64_t> and returns a string. By making use of function_traits, written by kennyim, it is possible to automatically deduce the expression fplus::compose(collatz_seq, show_ints) as being a function taking an uint64_t and returning a string, so you do not have to manually provide type hints to the compiler.

If two functions whose "connecting types" do not match are passed in, an unambiguous error message describing the issue will be generated. FunctionalPlus uses compile time assertions to avoid the confusingly long error messages compilers generate when faced with type errors in function templates.

Changing the way you program from "writing your own loops and nested ifs" to "composing and using small functions" will result in more errors at compile time but will pay out by having fewer errors at runtime. Also, more precise compile time errors will reduce the time spent debugging.

Tutorial

The article "Functional programming in C++ with the FunctionalPlus library; today: HackerRank challenge Gemstones" provides a smooth introduction into the library by showing how one could develop an elegant solution to a problem using the FunctionalPlus approach.

Also on Udemy there is a course "Functional Programming using C++" that makes heavy use of FunctionalPlus to explain general functional concepts.

Forward application and composition

The "Gemstones" tutorial above explains how one can apply functional thinking to arrive at the solution below for the following problem:

Find the number of characters present in every line of an input text.

std::string gemstone_count(const std::string& input)
{
    using namespace fplus;

    typedef std::set<std::string::value_type> characters;

    const auto lines = split_lines(false, input); // false = no empty lines

    const auto sets = transform(
        convert_container<characters, std::string>,
        lines);

    // Build the intersection of all given character sets (one per line).
    const auto gem_elements = fold_left_1(
        set_intersection<characters>, sets);

    return show(size_of_cont(gem_elements));
}

By using the functionality from namespace fwd, you can get along without temporary variables, and make it clear that the whole process is simply pushing the input through a chain of functions, similar to the pipe concept in the Unix command line.

std::string gemstone_count_fwd_apply(const std::string& input)
{
    using namespace fplus;
    typedef std::set<std::string::value_type> characters;
    return fwd::apply(
        input
        , fwd::split_lines(false)
        , fwd::transform(convert_container<characters, std::string>)
        , fwd::fold_left_1(set_intersection<characters>)
        , fwd::size_of_cont()
        , fwd::show()
    );
}

In fplus::fwd:: you find many fplus:: functions again, but in a partially curried version, i.e. fplus::foo : (a, b, c) -> d has its counterpart with fplus::foo : (a, b) -> (c -> d). This makes the style above possible.

Alternatively to the forward application version, you can also write point-free and define your function by composition:

using namespace fplus;
typedef std::set<std::string::value_type> characters;

const auto gemstone_count_fwd_compose = fwd::compose(
    fwd::split_lines(false),
    fwd::transform(convert_container<characters, std::string>),
    fwd::fold_left_1(set_intersection<characters>),
    fwd::size_of_cont(),
    fwd::show()
);

By the way, in case you need the parameters of a binary function in different order, namespace fplus::fwd::flip also exists. fplus::bar : (a, b) -> c does not only have its analogue in fplus::fwd::bar : a -> b -> c but also in fplus::fwd::flip::bar : b -> a -> c.

Finding the functions you need

If you are looking for a specific FunctionalPlus function you do not know the name of yet, you can of course use the auto-complete feature of your IDE to browse the content of the namespace fplus. But the recommended way is to simply use the FunctionalPlus API search website. You can quickly search by keywords or function type signatures with it. If you prefer, you can also simply browse the source code using Sourcegraph.

Performance

The basic functions are fast, thanks to C++'s concept of abstraction without overhead. Here are some measurements from the first example, taken on a standard desktop PC, compiled with GCC and the O3 flag.

5000 random numbers, keep odd ones, 20000 consecutive runs accumulated
----------------------------------------------------------------------

| Hand-written for loop | std::copy_if | fplus::keep_if |
|-----------------------|--------------|----------------|
|               0.632 s |      0.641 s |        0.627 s |

So the compiler seems to do a very good job in optimizing and inlining everything to basically equal machine code performance-wise.

The more complex functions though sometimes could be written in a more optimized way. If you use FunctionalPlus in a performance-critical scenario and profiling shows you need a faster version of a function please let me know or even help improving FunctionalPlus.

FunctionalPlus internally often can operate in-place if a given container is an r-value (e.g. in chained calls) and thus avoid many unnecessary allocations and copies. But this is not the case in all situations. However, thanks to working with a multi-paradigm language one easily can combine manually optimized imperative code with fplus functions. Luckily experience (aka. profiling) shows that in most cases the vast majority of code in an application is not relevant for overall performance and memory consumption. So initially focusing on developer productivity and readability of code is a good idea.

Comparison with range-v3

Range-v3 and FunctionalPlus do have things in common, as the following code snippet shows.

const auto times_3 = [](int i){return 3 * i;};
const auto is_odd_int = [](int i){return i % 2 == 0;};
const auto as_string_length = [](int i){return std::to_string(i).size();};

// FunctionalPlus
using namespace fplus;
const auto result_fplus = fwd::apply(
    numbers(0, 15000000)
    , fwd::transform(times_3)
    , fwd::drop_if(is_odd_int)
    , fwd::transform(as_string_length)
    , fwd::sum());

// range-v3
const auto result_range_v3 =
    accumulate(
        view::ints(0)
        | view::take(15000000)
        | view::transform(times_3)
        | view::remove_if(is_odd_int)
        | view::transform(as_string_length)
        , 0);

There are some differences though. Range-v3 ranges are lazy, which means no intermediate memory is allocated during the single steps of a processing chain like above. Also range-v3 will probably be part of the C++ standard at some point in the future. When using FunctionalPlus on the other hand you work with normal STL-containers. Also implementing a new function is simpler compared to writing a new range adaptor. Additionally FunctionalPlus provides much more functions out of the box and has the API search website. So the choice between the two libraries depends on your preferences and project's needs.

Requirements and Installation

A C++14-compatible compiler is needed. Compilers from these versions on are fine:

  • GCC ( >= 4.9 )
  • Clang ( >= 3.7 with libc++ >= 3.7 )
  • Visual Studio ( >= 2015 )
  • XCode ( >= 9 )

Guides for different ways to install FunctionalPlus can be found in INSTALL.md.

Disclaimer

The functionality in this library initially grew due to my personal need for it while using C++ on a regular basis. I try my best to make it error free and as comfortable to use as I can. The API still might change in the future. If you have any suggestions, find errors, miss some functions or want to give general feedback/criticism, I'd love to hear from you. Of course, contributions are also very welcome.

License

Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE or copy at http://www.boost.org/LICENSE_1_0.txt)

Owner
Tobias Hermann
likes machine learning and functional programming.
Tobias Hermann
Comments
  • Feature/generic lambdas

    Feature/generic lambdas

    Hello, I made zip_with work with generic lambdas/transparent function objects/etc ..., after spending two days on making invoke fully work (I still have to tests some volatile const&& stuff, but was too lazy to do so before showing you the result first!

    This PR is not meant to be merged at all, just to know if you have some ideas to improve the static_assert machinery introduced here, and to discuss some points/questions.

    invoke was definitely fun to do :)

  • Changing the header files does not trigger a rebuild of the unittests

    Changing the header files does not trigger a rebuild of the unittests

    Since #112 I encounter a new effect when changing the library and running the unittests.

    My usual workflow looks like this:

    initially:

    rm -r build
    mkdir build
    cd build
    cmake -DUNITTEST=ON ..
    make unittest
    

    later:

    # change something in one of the header files
    make unittest
    

    With the old versions of CMakeLists.txt and test/CMakeLists.txt it still works, but with the new ones the second make unittest does not rebuild the tests. It just ignores the changes in the header files. I have to run sudo make install to rebuild the tests.

    @offa and @theodelrieu Is this intended and my workflow is just strange? Or do you think it would be possible and helpful to change the cmake configuration to support this again?

  • Compile error when using transparent function objects

    Compile error when using transparent function objects

    Hello, awesome lib! I was playing a bit with it and I have the following example code that compiles and runs as expected:

    #include <iostream>
    #include <vector>
    #include <string>
    
    #include <fplus/fplus.hpp>
    
    using namespace std::string_literals;
    
    int main()
    {
      auto const l1 = {"Hello"s, "World"s};
      auto const l2 = {","s, "!"s};
      auto const v = fplus::zip_with(std::plus<std::string>{}, l1, l2);
      std::cout << fplus::show_cont_with(" ", v) << std::endl;
    }
    

    However, when I use std::plus<>{}, I get a compiler error (VS2017 on Win10 x64):

    include\fplus/function_traits.hpp(79): error C3556: 'std::plus::operator ()': incorrect argument to 'decltype' include\fplus/pairs.hpp(42): note: see reference to class template instantiation 'utils::function_traits' being compiled C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.10.25017\include\chrono(227): note: see reference to class template instantiation 'std::chrono::duration<__int64,std::nano>' being compiled C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.10.25017\include\chrono(1002): note: see reference to class template instantiation 'std::chrono::time_pointstd::chrono::steady_clock,std::chrono::steady_clock::duration' being compiled include\fplus/function_traits.hpp(80): error C2955: 'utils::function_traits': use of class template requires template argument list include\fplus/function_traits.hpp(79): note: see declaration of 'utils::function_traits' include\fplus/pairs.hpp(42): error C2039: 'arity': is not a member of 'utils::function_traits' include\fplus/pairs.hpp(42): note: see declaration of 'utils::function_traits' include\fplus/pairs.hpp(42): error C2065: 'arity': undeclared identifier include\fplus/pairs.hpp(45): error C2903: 'arg': symbol is neither a class template nor a function template include\fplus/pairs.hpp(45): error C2039: 'type': is not a member of 'utils::function_traits' include\fplus/pairs.hpp(42): note: see declaration of 'utils::function_traits' include\fplus/pairs.hpp(45): warning C4091: 'typedef ': ignored on left of 'int' when no variable is declared include\fplus/pairs.hpp(45): error C2144: syntax error: 'unknown-type' should be preceded by ';' include\fplus/pairs.hpp(46): error C2903: 'arg': symbol is neither a class template nor a function template include\fplus/pairs.hpp(46): error C2039: 'type': is not a member of 'utils::function_traits' include\fplus/pairs.hpp(42): note: see declaration of 'utils::function_traits' include\fplus/pairs.hpp(46): warning C4091: 'typedef ': ignored on left of 'int' when no variable is declared include\fplus/pairs.hpp(46): error C2144: syntax error: 'unknown-type' should be preceded by ';' include\fplus/pairs.hpp(49): error C2923: 'std::is_convertible': 'FIn0' is not a valid template type argument for parameter '_To' include\fplus/pairs.hpp(45): note: see declaration of 'FIn0' include\fplus/pairs.hpp(49): error C2955: 'std::is_convertible': use of class template requires template argument list C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.10.25017\include\type_traits(416): note: see declaration of 'std::is_convertible' include\fplus/pairs.hpp(50): error C2057: expected constant expression include\fplus/pairs.hpp(51): error C2923: 'std::is_convertible': 'FIn1' is not a valid template type argument for parameter '_To' include\fplus/pairs.hpp(46): note: see declaration of 'FIn1' include\fplus/pairs.hpp(51): error C2955: 'std::is_convertible': use of class template requires template argument list C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.10.25017\include\type_traits(416): note: see declaration of 'std::is_convertible' include\fplus/pairs.hpp(52): error C2057: expected constant expression

    I never really used transparent function objects, so it might very well be a silly mistake.

  • Timed

    Timed

    Hi,

    Here is a first proposition for an implementation of the profiling decorator. I added a new type timed<T> + a make_timed_function<Fn>(Fn f>decorator.

    This is still work in progress, but your input would be welcomed

    Cheers

  • Improve CMake integration

    Improve CMake integration

    This PR reworks the CMake files for this library. For trivial consumption by dependents.
    With this PR one can trivially import this library:

    # As part of the build tree:
    # - add_subdirectory() (e.g. external git clone)
    add_subdirectory("${PROJECT_SOURCE_DIR}/external/FunctionalPlus")
    # - FetchContent (in CMake 3.14+)
    include(FetchContent)
    FetchContent_Declare(fplus
            GIT_REPOSITORY https://github.com/Dobiasd/FunctionalPlus
            GIT_TAG ...)
    FetchContent_MakeAvailable(fplus)
    # As a package installed to the system:
    find_package(FunctionalPlus REQUIRED)
    
    # but in all cases the usage is unified
    target_link_libraries(my_target PRIVATE FunctionalPlus::fplus)
    

    Notice that the dependent isn't required to set any variables beforehand and in all of the cases the header files are included as system headers, which will prevent warnings from being emitted from this library. However, if the library is made part of the build tree, there is still an option to set FunctionalPlus_INCLUDE_WITHOUT_SYSTEM to a truthy value to have warnings.

    Important things to note:

    • Root lists file should be nothing more than build and usage requirements. Dependents should not have to bother with options to turn examples, tests and whatnot off. For this reason there are separate subprojects for tests (test), examples (examples) and development that loads the entire project for discovery in IDEs (all).
    • Install rules were not using standard, cross-platform install paths. Those are provided by GNUInstallDirs, despite what the name implies.
    • Tests' lists file does not use conan anymore. It was only causing conflict and deprives this library from using additional functionality provided by the doctest library's config file, such as test discovery. Yes, I tried using conan, it just broke things.
    • The file providing install rules had a name that was suggesting that it did something in relation to pkg-config, which was not the case.
    • Toolchain files in relation to CMake are used to set up compiler, linker and such variables crucial for building, but this project was using "toolchain" files which did something completely different.

    The commits have a body if the change required an explanation.

  • GCC 6 warnings in variadic min_on and max_on

    GCC 6 warnings in variadic min_on and max_on

  • Github Actions

    Github Actions

    CI builds moved to Github Actions (fixes #206). The build shield appears after the first build on master.

    This PR includes a commit removing Travis CI.

    Changes compared to Travis CI:

    • Update to Focal image
    • Older compiler are not included (not supported by Focal without additional effort)
    • Building of libc++ no longer necessary (Clang)
    • Separate jobs for Linux (GCC / Clang) and OS X (Clang)
    • Up-to-date CMake (3.19)

    To Do:

    • [x] GCC 4.9+
    • [x] Clang ~~3.7+~~ 4.0+
    • [x] Update with master
    • [x] Doctest fixed version 2.3.4

    Discussion:

    • [x] Conan builds necessary (Fplus builds on conan-center already)? --> no
  • Allow use `std::locale` in `to_upper_case` and `to_lower_case`

    Allow use `std::locale` in `to_upper_case` and `to_lower_case`

    I recently encountered a problem while changing string case in Russian. Quick googling showed that it is possible to easily upgrade FPlus to support std::locale which can be used in toupper and tolower. The only problem - on Windows I couldn't find a way to properly encode UTF-8, it looks like there is no such locale there, but I may be worng. I tried my best to supply tests and fwd + fwd-flip, but the generator script didn't work for me and I had to rewrite include files manually.

  • Fix master

    Fix master

    Reverts every commit related to generic lambda support. They will be moved into a feature branch right after.

    This should be merged only once the work is 100% done, otherwise some combination of functions will fail to compile.

  • Taking advantage of move-semantics.

    Taking advantage of move-semantics.

    e.g. let's look at keep_if

    template <typename Pred, typename Container>
    Container keep_if(Pred pred, const Container& xs)
    {
        internal::check_unary_predicate_for_container<Pred, Container>();
        Container result;
        auto it = internal::get_back_inserter<Container>(result);
        std::copy_if(std::begin(xs), std::end(xs), it, pred);
        return result;
    }
    

    It looks to me it would be better implemented as

    template <typename Pred, typename Container>
    Container keep_if(Pred pred, Container xs)
    {
        // erase-remove elements from xs, per predicate
        return xs;
    }
    

    This way if the container is passed as rvalue, as would most likely be the case, then we have no copy-overhead: xs is passed by-move, edited in-place, and returned by-move.

    This is not just applicable to keep_if, but the family of functions where input and output types are the same, and the input is likely to be passed as rvalue, and the type is potentially heavy to copy.

  • Restore include_all_in_one build

    Restore include_all_in_one build

    Hello,

    I saw that the generation of the file include_all_in_one/include/fplus/fplus.hpp is not included anymore in the make step

    This file is part of the repository so that it is easily accessible via an URL, for easy install via only one file, or for use on tools such as compiler explorer.

    I suspect this happened during the merge of the PR "Improve CMake integration", since this PR vastly refactored the cmake scripts.

    So, I open this PR as a way to discuss what can be done on this subject:

    • This PR proposes to restore the original status: this file is generated automatically at each build. The advantage is that developers will not forget to commit it, since it is refreshed automatically for them

    • However, we could imagine less intrusive ways to do it: either by mentioning inside CONTRIBUTING the need to call manually cd include_all_in_one && python3 make_all_in_one.py && cd .. for each PR, or by calling this script during other deploy scripts (such as compile_all_and_deploy.sh or generate_derived_functions.sh)

    What do you think?

    Note: this PR also update the include_all_in_one/include/fplus/fplus.hpp with the latest modifications.

  • IO Monad

    IO Monad

    Hi @Dobiasd,

    I worked through your Udemy functional programming course and found functional programming and fplus to be highly interesting. Am currently attempting to refactor some code and am just wondering if there is a way to model IO monads using fplus?

    I have a function that is currently as such:

    //func : [String] -> Result String String
    fplus::result< std::string, std::string > func( const std::vector< std::string >& param )
    

    However, I would like to add some logging at the start of the function. This would change the return type since logging is an IO action which may fail, but not too sure how it can be done using fplus.

    Be great if I could get your advice :)

  • Reconsider install location

    Reconsider install location

    This came up in the C++ Slack earlier and reminded me that this library could cause the same issue as well.

    Consider that include/fplus gets installed as the <prefix>/include/fplus directory and adds <prefix>/include to the include paths of the installed target. If you link against the installed FunctionalPlus::fplus target, then you get the whole of <prefix>/include added to your include paths. I'm sure you can guess what kind of trouble that could cause.

    My preferred install path where I have control is <prefix>/include/<project-name>-<project-version>, so when linking against the CMake package target, you don't get the whole world in your include paths implicitly, just the library you linked against and possibly dependencies.

    I propose that this be changed and instead of <prefix>/include FunctionalPlus be installed to <prefix>/include/FunctionalPlus. Anyone not using CMake (why would anyone want to do that???) can still reach the library with #include <FunctionalPlus/fplus/fplus.hpp> via the implicit system include paths, but anyone using the CMake package will get the correct include path that makes only FunctionalPlus available, so #include <fplus/fplus.hpp> can be used like usual.

EASTL stands for Electronic Arts Standard Template Library. It is an extensive and robust implementation that has an emphasis on high performance.

EA Standard Template Library EASTL stands for Electronic Arts Standard Template Library. It is a C++ template library of containers, algorithms, and i

Dec 1, 2022
An open-source C++ library developed and used at Facebook.

Folly: Facebook Open-source Library What is folly? Folly (acronymed loosely after Facebook Open Source Library) is a library of C++14 components desig

Dec 3, 2022
Embedded Template Library

Embedded Template Library (ETL) Motivation C++ is a great language to use for embedded applications and templates are a powerful aspect. The standard

Nov 26, 2022
? A glib-like multi-platform c library
? A glib-like multi-platform c library

A glib-like cross-platform C library Supporting the project Support this project by becoming a sponsor. Your logo will show up here with a link to you

Nov 27, 2022
NIH Utility Library

libnih is a light-weight "standard library" of C functions to ease the development of other libraries and applications. Its goals are: * despite it

Sep 15, 2022
An open source library for C

Homo Deus - C Library Introduction The Homo Deus C Library (hdelibc) is an open source collection of tools for the C programming language. The project

Nov 28, 2022
JUCE is an open-source cross-platform C++ application framework for desktop and mobile applications, including VST, VST3, AU, AUv3, RTAS and AAX audio plug-ins.
JUCE is an open-source cross-platform C++ application framework for desktop and mobile applications, including VST, VST3, AU, AUv3, RTAS and AAX audio plug-ins.

JUCE is an open-source cross-platform C++ application framework used for rapidly developing high quality desktop and mobile applications, including VS

Dec 1, 2022
A toolkit for making real world machine learning and data analysis applications in C++

dlib C++ library Dlib is a modern C++ toolkit containing machine learning algorithms and tools for creating complex software in C++ to solve real worl

Dec 4, 2022
An eventing framework for building high performance and high scalability systems in C.

NOTE: THIS PROJECT HAS BEEN DEPRECATED AND IS NO LONGER ACTIVELY MAINTAINED As of 2019-03-08, this project will no longer be maintained and will be ar

Nov 20, 2022
C++14 evented IO libraries for high performance networking and media based applications

LibSourcey C++ Networking Evolved LibSourcey is a collection of cross platform C++14 modules and classes that provide developers with an arsenal for r

Nov 28, 2022
Easy to use, header only, macro generated, generic and type-safe Data Structures in C
Easy to use, header only, macro generated, generic and type-safe Data Structures in C

C Macro Collections Easy to use, header only, macro generated, generic and type-safe Data Structures in C. Table of Contents Installation Contributing

Dec 1, 2022
A collection of single-file C libraries. (generic containers, random number generation, argument parsing and other functionalities)

cauldron A collection of single-file C libraries and tools with the goal to be portable and modifiable. Libraries library description arena-allocator.

Oct 26, 2022
C++ Parallel Computing and Asynchronous Networking Engine

As Sogou`s C++ server engine, Sogou C++ Workflow supports almost all back-end C++ online services of Sogou, including all search services, cloud input method´╝îonline advertisements, etc., handling more than 10 billion requests every day. This is an enterprise-level programming engine in light and elegant design which can satisfy most C++ back-end development requirements.

Dec 5, 2022
Idle is an asynchronous and hot-reloadable C++ dynamic component framework
Idle is an asynchronous and hot-reloadable C++ dynamic component framework

Idle is an asynchronous, hot-reloadable, and highly reactive dynamic component framework similar to OSGI that is: ?? Modular: Your program logic is en

Nov 29, 2022
AMD K6-2 (CXT) / K6-2+ / K6-3 / K6-3+ Write Allocate / Write Combine / Write Ordering / Frequency Multiplier Initialization driver for MS-DOS

K6INIT What is this? This is a driver for MS-DOS to replace k6dos.sys which is a bit useless and unflexible. It does not support the CXT versions of t

Sep 11, 2022
Nov 12, 2022
MissionImpossible - A concise C++17 implementation of automatic differentiation (operator overloading)
MissionImpossible - A concise C++17 implementation of automatic differentiation (operator overloading)

Mission : Impossible (AutoDiff) Table of contents What is it? News Compilation Meson CMake Examples Jacobian example Complex number example Hessian ac

Oct 13, 2022
Concise CMake templates for creating C++ libraries or executables.

cmake_templates Concise cmake templates for creating C++ libraries and executables. Creating a normal cmake project Copy the chosen project template s

Oct 20, 2022
An operating system. Its main goal? Readable code, developer experience and documentation.

OS Dependencies Required for development. sudo apt install build-essential nasm grub-pc-bin grub-common xorriso Required for building cross-compiler.

Nov 15, 2022
An open source, portable, easy to use, readable and flexible SSL library

README for Mbed TLS Mbed TLS is a C library that implements cryptographic primitives, X.509 certificate manipulation and the SSL/TLS and DTLS protocol

Dec 5, 2022