open-index/open-npm huggingface dataset:
npm package: @rougelang/language
Description: Teach your grandmother how to program.
Latest version: 0.26.4

# Rouge Programming Language

Teach your grandmother how to program.

## State of development

Rouge is in active development (WIP) with many core features still missing.
Until its initial 1.0 release, breaking changes may occur without warning.

## Build

The language can be compiled into a single ES-module.
The module can be run in the browser and is found in `dist/` after bundling.

```
npm install
npm run build
```

Deno is used to run/debug the language locally.
The entrypoint for the program can be found in `src/cli.ts`.
Deno version >= 2.0 is required.

```
deno run --allow-all src/cli.ts
```

To build a self-contained executable, Deno is used as well.

```
deno compile --allow-all --output rouge src/cli.ts
```

## Usage

Assuming the language has been compiled into an executable called `rouge` and is available on PATH, a file called `my_app.rouge` can be executed with the following command:

```
rouge run main.rouge
```

Further information about the command line interface can be obtained by running:

```
rouge --help
```
npm package: @rough/rx-gremlin
Description: The simplest RxJS wrapper around gremlin lib
Author: Igor Ostapenko
Latest version: 2.0.1

# The simplest RxJS wrapper around gremlin lib

[![Build Status](https://travis-ci.com/ihoro/rough-rx-gremlin.svg?branch=master)](https://travis-ci.com/ihoro/rough-rx-gremlin)
[![npm version](https://badge.fury.io/js/%40rough%2Frx-gremlin.svg)](https://badge.fury.io/js/%40rough%2Frx-gremlin)

Rough implementation of [rxified](https://npmjs.com/rxjs) wrapper of [gremlin](https://npmjs.com/gremlin) lib.

## Usage examples

```js
const { tap } = require('rxjs/operators');
const RxGremlin = require('@rough/rx-gremlin');

const gremlin = new RxGremlin('ws://gremlin-server:8182/gremlin');

gremlin.traverse(g => g.V().hasLabel('Person').valueMap(true).next())
  .pipe(
    tap(({ value }) => console.log(value))
  )
  // .subscribe ...
```

Also, each `g` instance has handy shortcuts as follows:

```js
g.T = gremlin.process.t;
g.G = gremlin.process.statics;
g.P = gremlin.process.P;
g.TextP = gremlin.process.TextP;
g.C = gremlin.process.cardinality;
g.O = gremlin.process.order;
```

What can be used right away without additional imports:

```js
// ...
g => g.V()
  .has(g.T.label, g.P.within('Entity', 'Person'))
  .has('description', g.P.not(g.TextP.containing(['word1', 'word2'])))
  .where(g.G.not(g.G.outE('parent')))
  .order().by('updated_at', g.O.desc)
  .valueMap(true)
  .toList()
// ...
```

## Configuration

For connection options see official [DriverRemoteConnection class](https://tinkerpop.apache.org/jsdocs/3.6.0/DriverRemoteConnection.html).
You may pass such options as the second parameter of the constructor, e.g. in order to switch from default GraphSON to GraphBinary protocol you would do the following:
```js
new RxGremlin('ws://gremlin-server:8182/gremlin', { mimeType: 'application/vnd.graphbinary-v1.0' });
```
npm package: @rough/rx-grpc
Description: The simplest RxJS wrapper around grpc lib
Author: Igor Ostapenko
Latest version: 2.1.1

# The simplest RxJS wrapper around grpc lib

[![Build Status](https://travis-ci.com/ihoro/rough-rx-grpc.svg?branch=master)](https://travis-ci.com/ihoro/rough-rx-grpc)
[![npm version](https://badge.fury.io/js/%40rough%2Frx-grpc.svg)](https://badge.fury.io/js/%40rough%2Frx-grpc)

Rough implementation of [rxified](https://npmjs.com/rxjs) wrapper and tools for [grpc-js](https://www.npmjs.com/package/@grpc/grpc-js) lib.

## Usage example

```proto
// GreetingService.proto

syntax = "proto3";

package org.example;

service GreetingService {
  rpc Greet(Request) returns (Response);
}

message Request {
  string name = 1;
}

message Response {
  string message = 1;
}
```

```js
// server.js

class GreetingService {
  Greet(call, callback) {
    const name = call.request.name;
    if (name)
      callback(null, { message: `Hello, ${name}!` });
    else
      callback(new Error('Name is not defined.'));
  }
}

const RxGrpc = require('@rough/rx-grpc');
new RxGrpc()
  .withProtoFiles(__dirname + '/*.proto')
  .serve('org.example.GreetingService', new GreetingService())
  .startServer()
  .subscribe(
    started => console.log('Listening at grpc://0.0.0.0:50051 ...'),
    err => console.log(err),
    complete => {}
  );
```

```js
// client.js

const { flatMap } = require('rxjs/operators');
const RxGrpc = require('@rough/rx-grpc');

const rxgrpc = new RxGrpc().withProtoFiles(__dirname + '/*.proto');

const name = (process.argv.length > 2) ? process.argv[2] : null;

rxgrpc.service('org.example.GreetingService', 'localhost:50051').pipe(
  flatMap(GreetingService => GreetingService.Greet({ name }))
)
.subscribe(
  response => console.log(response.message),
  err => console.log(err),
  complete => {}
);
```
npm package: @rough/rx-mysql
Description: A simple RxJS wrapper around mysql lib
Author: Igor Ostapenko
Latest version: 1.0.5

# Rx MySQL

[![Build Status](https://travis-ci.com/ihoro/rough-rx-mysql.svg?branch=master)](https://travis-ci.com/ihoro/rough-rx-mysql)
[![npm version](https://badge.fury.io/js/%40rough%2Frx-mysql.svg)](https://badge.fury.io/js/%40rough%2Frx-mysql)

Rough implementation of [rxified](https://npmjs.com/rxjs) wrapper of [mysql](https://npmjs.com/mysql) lib.

## Getting started

Installation
```
$ npm i mysql @rough/rx-mysql
```

A simple query
```js
const { finalize } = require('rxjs/operators');
const { createPool } = require('mysql');
const RxMySQL = require('@rough/rx-mysql');

const pool = createPool({
  host: 'localhost',
  user: 'root',
  password: 'root',
  database: 'myproject'
});

const rxsql = new RxMySQL(pool);

rxsql
  .query('select * from users')
  .pipe(finalize(_ => pool.end()))
  .subscribe(result => console.log(result));
```

A simple transaction
```js
rxsql
  .transaction(
    (rxsql, prevResult) => rxsql.query('select * from users where id = ? for update', 42),
    (rxsql, prevResult) => rxsql.query('delete from deals where user_scope_id = ?', prevResult[0].user_scope_id),
    (rxsql, prevResult) => rxsql.query('delete from inventory where user_id = ?', 42),
  )
  .pipe(finalize(_ => pool.end()))
  .subscribe(result => console.log(result));
```
npm package: @rough/rx-pg
Description: A simple RxJS wrapper around node-postgres lib
Author: Igor Ostapenko
Latest version: 1.1.0

# Rx'ified node-postgres (pg)

[![Build Status](https://travis-ci.com/ihoro/rough-rx-pg.svg?branch=master)](https://travis-ci.com/ihoro/rough-rx-pg)
[![npm version](https://badge.fury.io/js/%40rough%2Frx-pg.svg)](https://badge.fury.io/js/%40rough%2Frx-pg)

Rough implementation of [rxified](https://npmjs.com/rxjs) wrapper of [node-postgres](https://npmjs.com/pg) lib.

## Getting started

Installation
```
$ npm i pg @rough/rx-pg
```

A simple query
```js
const { finalize } = require('rxjs/operators');
const { Pool } = require('pg');
const RxPg = require('@rough/rx-pg');

const pool = new Pool({
  host: 'localhost',
  user: 'root',
  password: 'root',
  database: 'myproject',
  max: 50,
  idleTimeoutMillis: 30000,
  connectionTimeoutMillis: 2000
});

const rxpg = new RxPg(pool);

rxpg
  .query('select * from users')
  .pipe(finalize(_ => pool.end()))
  .subscribe(result => console.log(result));
```

A simple transaction
```js
rxpg
  .transaction(
    (rxpg, prevResult) => rxpg.query('select * from users where id = ? for update', 42),
    (rxpg, prevResult) => rxpg.query('delete from deals where user_scope_id = ?', prevResult[0].user_scope_id),
    (rxpg, prevResult) => rxpg.query('delete from inventory where user_id = ?', 42),
  )
  .pipe(finalize(_ => pool.end()))
  .subscribe(result => console.log(result));
```