GithubHelp home page GithubHelp logo

unazed / henrio Goto Github PK

View Code? Open in Web Editor NEW

This project forked from henry232323/henrio

0.0 1.0 0.0 206 KB

im just playing with making event loops. really an async library

License: MIT License

Python 100.00%

henrio's Introduction

henrio

A small project I've been working on.

Two Parts:

  1. An Async Library modeled after others, with lots of inspiration from Curio, Trio, and AsyncIO. It includes many of the same concepts.

    • 3 Types of Loops: Base Loop with no Async-IO; Selector Loop using the Selector Module; and on Windows, the IOCP Loop (Selector is the default)
    • Futures, Tasks, and Conditionals. Wait for a Future to be set, wrap a coroutine, wait for a condition to become true.
    • I/O. Specific operations for avoiding blocking when interacting with raw sockets.
    • File Wrappers: Selector and IOCP Loops provide special wrapped files for interacting with file I/O
    • Queue: A native LIFO/FIFO queue and a Heap Queue; Technically both work with any async lib.
    • Protocols: Selector Only. Modeled after AsyncIO's own protocols, same type of thing but with async callbacks
    • Workers: Using multiprocessing process and thread pools, run sync and async functions in separate threads
    • Loop Methods or Library Functions. Any operation available as a loop method can also be accessed using functions found in the henrio.yields module. These will run the associated operation on the Loop processing the coroutine. Generally only one loop will be running a coroutine.
    • Universals: henrio.universals This is a module containing all classes that can be used between Async libraries. For more information on interoperation see async-recipes
  2. The Language. Sometimes the parsing actually works, realistically this isn't meant to be used and was more of an attempt to learn about parsing, specifically Lex-Yacc style interpretation. The language has one primary feature: all functions are run asynchronously, meaning all function definitions are async and have implicit awaits around every call (turning sync funcs into async funcs) and any top level async calls are run using henrio.run. Whats included

    • A custom import hook for importing .hio files from Python. First parsing then loading
    • A specially built "compiler" / pyc generator. An attempt at recreating how Python handles compiled files.
    • Cool other stuff maybe??
    • parser is actually broken rn

henrio's People

Contributors

henry232323 avatar king1600 avatar

Watchers

 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.