Giter Site home page Giter Site logo

aperlambda / lambdacommon Goto Github PK

View Code? Open in Web Editor NEW
5.0 2.0 0.0 482 KB

A library written in C++ with common features.

License: MIT License

CMake 2.91% C++ 91.52% Shell 0.38% C 5.19%
lambdacommon aperlambda cpp cpp-library filesystem-library common-library

lambdacommon's Introduction

λcommon

Website C++ GitHub license Version Codacy Badge Language grade: C/C++ Build Status Build status Downloads GitHub issues

A library written in C++ with common features.

Features:

  • OS detection.
  • System information (username, user directory, CPU name, memory usage, etc...).
  • Terminal manipulation.
  • Resources management.
  • Basic string manipulation.
  • Basic maths utilities.
  • Graphics:
    • Color manipulation.
    • Very basic scene system.
  • Files manipulation.
  • URI manipulation.
  • and more!

Packaging status

Compatibility table

OS Compatibility
Windows
Mac OSX
Linux
Android
iOS
WebAssembly
FreeBSD
OpenBSD ⚠ Not tested ⚠
NetBSD ⚠ Not tested ⚠
DragonFly ⚠ Not tested ⚠
Solaris ❌ Not tested
Haiku

✔: Supported ⚠: Partial support / Not tested ❌: Not working

on:

  • i686
  • amd64
  • ARMv7
  • ARMv8
  • riscv32
  • riscv64

Quick example

#include <lambdacommon/system/system.h>

using namespace std;
namespace sys = lambdacommon::system;
namespace term = lambdacommon::terminal;

int main()
{
  term::setup();
  term::set_title("λcommon - example");

  cout << "Starting lambdacommon example with " << term::CYAN << "lambdacommon" << term::RESET << " v" << lambdacommon::get_version() << endl;
  cout << endl;
  cout << "Hello " << term::LIGHT_YELLOW << sys::get_user_name() << term::RESET << endl;
  // Sleep for 250ms
  sys::sleep(250);
  cout << endl << "I like your CPU, it is " << term::LIGHT_GREEN << sys::get_cpu_name() << term::RESET << " right?" << endl;
  sys::sleep(1000);
  // Clear all the content of the terminal.
  term::clear();
  cout << "Because I like my creators I want you to see their website!" << endl;
  sys::open_uri("https://aperlambda.github.io/");
  return 0;
}

Installation

Windows

Download the latest ZIP file of, the compiled binaries and the headers for Windows on GitHub. Or install from source.

Mac OSX

Please install from source.

Linux

ArchLinux (and variants)

Just install lambdacommon from AUR

Others

Please install from source.

Android

As an app dependency

Include the source files in your project.

Termux

Please install from source.

The CMake command will change a bit, please use cmake -DCMAKE_INSTALL_PREFIX="${PREFIX}" -DCMAKE_BUILD_TYPE="Release" .. instead.

BSD systems

Install from source. Other than FreeBSD may not work correctly.

From source

Build the sources with CMake and make and install with make install, and keep the install manifest to allow the uninstallation with make uninstall.

Use in CMake

Use Findlambdacommon.cmake in LambdaCMakeModules to find λcommon on your computer.

lambdacommon's People

Contributors

lambdaurora avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

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.