O(1) Fast.com

I will highlight my projects here.

Node++

A high level library to let me do asynchronous c++ programming like that done in Node.js.

I wanted code like the following:

auto socket = create_net_socket_stream( );
socket->on_connected( []( auto s ) mutable {
	std::cout << "Connection from: " << s->remote_address( ) << ":" << s->remote_port( ) << std::endl;
	s->read_async( );
} ).on_data_received( [socket, &current_state]( auto data_buffer, bool ) mutable {
	if( !data_buffer ) {
		return;
	}
	std::cout << std::string { data_buffer->begin( ), data_buffer->end( ) };
	current_state( socket );
} ).set_read_until_values( "READY\r\n", false );
socket->connect( host_name, port );

As you can see, one can create a tcp/ip client quickly and succinctly. Currently, the library focus is on networking and HTTP networking. Other async tasks will be added, such as Sqlite support as I need them

Github

Parse JSON

A JSON parser/encoder that allows one to easily serialize to or from JSON text.

#include <daw/json/daw_json_link.h>

using daw::json;
struct config_t: public JsonLink<config_t> {
    uint16_t port;
    std::string url_path;

    config_t( ):
            JsonLink<config_t>{ },
            port{ 8080 },
            url_path{ u8"/" } {

        link_integral( "port", port );
        link_string( "url_path", url_path );
    }
};    // config_t

int main( int argc, char const **argv ) {
    if( argc < 2 ) {
        exit( EXIT_FAILURE );
    }
    auto config = from_file<config_t>( argv[1] );

    return EXIT_SUCCESS
}

Github

Header Libraries

Additions to the standard template libraries to codify common operations

Github

Parse CSV Data

Quickly import csv data into code. Using the parse_csv_data function exposed in data_table.h I can get an array of rows of variants(Integral, Real, Timestamps, Strings)

Github

Grayscale Filter

A novel approach to creating grayscale images with some recolouring. It uses a binned histogram to compress the colour space to 8bit grayscale maintining more information in the areas of high variability. As you can see it often generates a picture that has more contrast and depth than the standard method that uses up the available colour space whether the value is used or not.

Github