public static function stdin($raw = false)
    {
        $promise = new Promise(function($r, $c) use ($raw) {
            static::getStdInStream()->once('data', function($chunk) use ($r, $raw) {
                if (!$raw) {
                    $chunk = rtrim($chunk, PHP_EOL);
                }
                $r($chunk);
            });
        });
        return $promise;
    }