funfix/funfix.js

funfix-reactive package wanted ))

Closed this issue · 4 comments

Hello!

Just published a package to npm: rx-stream which is basically Monix reactive module port to TypeScript.
Basic builders and operators implemented (empty, pure, range, loop, items, fromArray, never, eval, evalOnce, create, fromTask, fromFuture, fromEval, map, flatMap, mapTask, filter, take, drop, ...).
Sources: https://github.com/lostintime/node-rx-stream

Project is proof of concept, no optimizations, no tests, no docs and some useless stuff may be ported too :(.

Ideally this may land in funfix-reactive module or something and I can spend some hours working on it. With your guidance we can make it happen.

If it sounds good to you - we can start from here :).

@lostintime this looks good and I'm very glad to see this request.

I do want to start a Monix port and I actually have the monix package on npmjs.org (was donated to me by its previous owner after asking nicely).

I am interested in working with you on this. However here are some things for consideration:

  1. we cannot do a straight port — one thing that sucks about the JS ecosystem are the minifiers. The current breed of minifiers (e.g. Webpack) work by means of ECMAScript 6 modules, looking at the imports made and the problem with Observable is that it's a huge class, with a lot of methods and builders that cannot be minified by minifiers such as Webpack.

Instead I'm thinking of a function-based design, in which the Observable class only exposes what's needed, with the rest of the operators then exposed as plain functions. E.g...

import * as Mx from "monix"

const source = Mx.Observable.create(...)

source.pipe(Mx.scan(init, (acc, elem) => acc + elem))

In this example an operator such as scan is no longer a method on Observable, but a plain function.

  1. I'm very opinionated about how code should look like and behave and if we'll end up working together, I'll be asking for a lot in code reviews.

For example I want every piece of code we introduce in the repository to have tests, JSDocs and Flow types as requirement for being merged on master.

This is just so you know what you're getting into 😀


But as I said, I'm really happy about it. So I'll setup a new repository for us to work in it and make you a member.

It does need the whole setup we have in Funfix — and it needs to be multi-project, because we'll end up having monix-react and monix-tail in it.

@alexandru completely agree with your points

My original motivation for writing that piece was that I was really missing a rich rx library
with backpressure for TypeScript which is also not using native promises.
rx-stream will some issues with my work projects until we have monix.js.

We can move to monix.js, please ping me with your thoughts on how we can get it started.

Meanwhile I'll take a deeper look to funfix project structure and tooling and tests.

@alexandru after tense 2017 end - I finally got monix.js repo bootstrap done (similar to funfix), will need you assistance from here, on packages, names and types.

I'm closing this issues so we can move to https://github.com/funfix/monix.js or/and gitter (please create a room there).

Thanks @lostintime; I've also been caught in work, holidays and now Monix work.

Funfix has been neglected, but I've got some cool updates / ports of features coming after I'm done with Monix.