All Projects → raffaellod → Lofty

raffaellod / Lofty

Licence: lgpl-2.1
Coroutines, stack traces and smart I/O for C++11, inspired by Python and Golang.

Projects that are alternatives of or similar to Lofty

Switchio
asyncio powered FreeSWITCH cluster control
Stars: ✭ 160 (+3100%)
Mutual labels:  asyncio, coroutines
Paco
Small utility library for coroutine-driven asynchronous generic programming in Python 3.4+
Stars: ✭ 198 (+3860%)
Mutual labels:  asyncio, coroutines
Cppcoro
A library of C++ coroutine abstractions for the coroutines TS
Stars: ✭ 2,118 (+42260%)
Mutual labels:  asyncio, coroutines
Pytask Io
Python Async Task Queue
Stars: ✭ 81 (+1520%)
Mutual labels:  asyncio, coroutines
Aiotutorial
code snippets for asyncio tutorial
Stars: ✭ 257 (+5040%)
Mutual labels:  asyncio, coroutines
yutto
🧊 一个可爱且任性的 B 站视频下载器(bilili V2)
Stars: ✭ 383 (+7560%)
Mutual labels:  coroutines, asyncio
Fooproxy
稳健高效的评分制-针对性- IP代理池 + API服务,可以自己插入采集器进行代理IP的爬取,针对你的爬虫的一个或多个目标网站分别生成有效的IP代理数据库,支持MongoDB 4.0 使用 Python3.7(Scored IP proxy pool ,customise proxy data crawler can be added anytime)
Stars: ✭ 195 (+3800%)
Mutual labels:  asyncio, coroutines
Aiotasks
A Celery like task manager that distributes Asyncio coroutines
Stars: ✭ 375 (+7400%)
Mutual labels:  asyncio, coroutines
asynchronous
A D port of Python's asyncio library
Stars: ✭ 35 (+600%)
Mutual labels:  coroutines, asyncio
think-async
🌿 Exploring cooperative concurrency primitives in Python
Stars: ✭ 178 (+3460%)
Mutual labels:  coroutines, asyncio
Awesome Asyncio
A curated list of awesome Python asyncio frameworks, libraries, software and resources
Stars: ✭ 3,279 (+65480%)
Mutual labels:  asyncio, coroutines
Gevent
Coroutine-based concurrency library for Python
Stars: ✭ 5,656 (+113020%)
Mutual labels:  asyncio, coroutines
Swiftcoroutine
Swift coroutines for iOS, macOS and Linux.
Stars: ✭ 690 (+13700%)
Mutual labels:  coroutines
Nonocaptcha
An asynchronized Python library to automate solving ReCAPTCHA v2 using audio
Stars: ✭ 744 (+14780%)
Mutual labels:  asyncio
Fibertaskinglib
A library for enabling task-based multi-threading. It allows execution of task graphs with arbitrary dependencies.
Stars: ✭ 679 (+13480%)
Mutual labels:  coroutines
Coil
Image loading for Android backed by Kotlin Coroutines.
Stars: ✭ 7,469 (+149280%)
Mutual labels:  coroutines
Korge
KorGE Game Engine. Multiplatform Kotlin Game Engine
Stars: ✭ 780 (+15500%)
Mutual labels:  coroutines
Hardhat
Hardhat is a development environment to compile, deploy, test, and debug your Ethereum software. Get Solidity stack traces & console.log.
Stars: ✭ 727 (+14440%)
Mutual labels:  stack-traces
Rxjava2debug
RxJava 2.x extension to provide meaningful Stack Traces
Stars: ✭ 673 (+13360%)
Mutual labels:  stack-traces
Hbmqtt
MQTT client/broker using Python asynchronous I/O
Stars: ✭ 667 (+13240%)
Mutual labels:  asyncio

Lofty – coroutines, stack traces and smart I/O for C++11, inspired by Python and Golang.

1. Introduction

Lofty is a C++11 framework featuring:

  • Multiple platform compatibility: Linux and Windows, partial with macOS and FreeBSD (see § 5. Compatibility);

  • Built on top of the C++11 STL;

  • Coroutines and threads as easy as declaring a function, with a rich suite of I/O classes to enable truly asynchronous code;

  • Crash-free execution: every error condition (including dereferencing a null pointer) results in an exception, with support for integrated stack tracing (see LOFTY_TRACE_FUNC());

  • An I/O class hierarchy that leaves the STL behind, making working with files and sockets a breeze – say goodbye to vulnerable printf() and clunky cout;

  • Testing framework integrated in the library, fully supported by the recommended build tool, Complemake;

  • Full support for Unicode and the C++11 char32_t character type (see lofty::text).

2. Getting Lofty

Lofty is available on GitHub; to download it, just clone the repository:

git clone https://github.com/raffaellod/lofty.git
cd lofty

See § 4. Versioning and branching for more information on available branches.

2.1. Building

Complemake

Building Lofty is easiest with Complemake, which works as an improved make utility and dependency manager.

To build Lofty, run Complemake from Lofty’s repo clone:

complemake build

This will create outputs in the bin and lib folders (you can change that with Complemake’s flags).

Conan and CMake

Alternatively, Lofty can also be built as a Conan package with CMake.

With Conan and CMake installed, build Lofty by running the following commands from Lofty’s repo clone:

conan install .
conan build .

This will create outputs in the bin and lib folders.

2.2. Installing

At the moment, Lofty lacks any means for installation. If you’re using Complemake to build your project, Complemake will take care of making Lofty available during builds to projects that declare it as a dependency, and the exec Complemake command will allow running any generated executables; see § 3. Using Lofty.

TODO: make Lofty installable.

3. Using Lofty

For usage examples, please see the source files in the examples folder. Examples are built as part of Lofty (see § 2.1. Building Lofty), and the generated executables can be found in the bin output folder.

If Lofty is not installed (see § 2.2. Installing Lofty), programs will fail to run due to being unable to load Lofty shared libraries; this can be worked around by using the exec command of Complemake:

complemake exec bin/hello-world

4. Versioning and branching

Lofty uses semantic versioning: MAJOR.MINOR.REVISION .

While the major version number is 0, changes to the minor indicate breaking changes, while the revision is incremented for non-breaking changes such as bug fixes and minor improvements.

Version 1.0.0 will indicate the first production-grade release, and the meaning of the versioning schema will shift accordingly: the major number will indicate breaking changes, the minor non-breaking changes (e.g. for maintenance releases), and the revision will be incremented for bug fixes and other minor improvements.

Revisions are tags named vX.Y.Z where X is the major version, Y is the minor version, and Z is the revision.

Versions are branches named vX.Y where X is the major version and Y is the minor version. Version branches start with a revision tag, and may have more revision tags for maintenance releases.

Currently there are no version branches, as long as the major version remains 0.

The default branch is master; this branch tracks the most common ancestor of all development branches, which are one for each platform:

  • Linux: linux
  • Windows: win
  • macOS: macos
  • FreeBSD: freebsd

When Lofty will have version branches, each version branch should proably get a development branch of its own in the form of platform_vX.Y, with the version branch vX.Y being a tracker in the same way master tracks the main development branches.

5. Compatibility

Lofty is in full development, so its compatibility can and will change over time (hopefully expanding).

Supported build systems:

  • GNU toolchain

    • GCC 4.7 to 5.2
    • binutils 2.20 or later
  • Microsoft Visual Studio 2010-2013 (Visual C++ 10-12 / MSC 16-18)

Clang/LLVM is not fully supported at this moment due to missing compiler features. If and when these will get integrated in LLVM, Lofty will support these additional build systems:

  • Clang + GNU LD

    • Clang 3.5
    • binutils 2.20 or later
  • Apple SDK for macOS (included in Xcode)

Supported operating systems:

  • GNU/Linux 2.6 or later, using glibc 2.17 or later;
  • Microsoft Windows – currently via Visual C++ 10 or later, which means Windows XP and later versions are supported.

These operating systems are supported at the source code level, but binaries built for them are fundmentally flawed due to the above-mentioned LLVM limitations:

  • macOS 10.9 Mavericks or later;
  • FreeBSD – officially only the latest -RELEASE is supported.

Additionally, Lofty requires Python 2.7 or 3.2 or later to be installed on the build host system.

6. Past, present and future

6.1. Some history

Lofty was started in the mid-2000s with a dual scope: on one hand explore if it was possible, (ab)using templates and other C++ features, to have automatic error reporting similar to what higher-level languages such as Python and Java offer; on the other hand, a required target was to be able to write programs that would be light, fast, easy to write, and easy to read years later.

At the time, the features of C++ were insufficient to accomplish all that without using some sort of pre-preprocessor, so the project goals lead to several dead-ended projects.

When C++11 finally reached the final draft status, it turned out that it allowed for most of the features that had originally been planned, so development of Lofty as it is now was finally started.

6.2. Current status of Lofty

Lofty can be considered of “alpha” grade, and tinkering with it is strongly encouraged.

6.3. Project goals

Lofty has very ambitious goals (hence its name):

  1. Supersede other C++ libraries that fail to exploit the features of C++11 – especially libraries developed as C++ bindings for C libraries;

  2. Demonstrate that C++ programs can be as sleek as Java or Python programs, while being considerably more efficient;

  3. Encourage writing of software in C++ instead of other less efficient languages such as C (development efficiency) or Java (execution efficiency).

All future development will be geared towards getting closer to accomplishing these objectives.


Copyright 2010-2018 Raffaello D. Di Napoli

This file is part of Lofty.

Lofty is free software: you can redistribute it and/or modify it under the terms of version 2.1 of the GNU Lesser General Public License as published by the Free Software Foundation.

Lofty is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].