Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Dec 03 2022 15:45
    dependabot[bot] labeled #173
  • Dec 03 2022 15:45
    dependabot[bot] opened #173
  • Dec 03 2022 15:45

    dependabot[bot] on npm_and_yarn

    build(deps): bump decode-uri-co… (compare)

  • Jul 07 2022 06:45

    dependabot[bot] on npm_and_yarn

    (compare)

  • Jul 07 2022 06:45
    dependabot[bot] closed #171
  • Jul 07 2022 06:45
    dependabot[bot] commented #171
  • Jul 07 2022 06:45
    dependabot[bot] labeled #172
  • Jul 07 2022 06:45
    dependabot[bot] opened #172
  • Jul 07 2022 06:45

    dependabot[bot] on npm_and_yarn

    build(deps): bump moment from 2… (compare)

  • Apr 09 2022 02:14
    dependabot[bot] labeled #171
  • Apr 09 2022 02:14
    dependabot[bot] opened #171
  • Apr 09 2022 02:14

    dependabot[bot] on npm_and_yarn

    build(deps): bump moment from 2… (compare)

  • Jan 15 2022 04:43
    dependabot[bot] labeled #170
  • Jan 15 2022 04:43
    dependabot[bot] opened #170
  • Jan 15 2022 04:43

    dependabot[bot] on npm_and_yarn

    build(deps): bump shelljs from … (compare)

  • Jan 15 2022 01:38
    dependabot[bot] labeled #169
  • Jan 15 2022 01:38
    dependabot[bot] opened #169
  • Jan 15 2022 01:38

    dependabot[bot] on npm_and_yarn

    build(deps): bump marked from 0… (compare)

  • Aug 11 2021 04:06
    dependabot[bot] labeled #168
  • Aug 11 2021 04:06
    dependabot[bot] opened #168
lostintime
@lostintime
Here is my first take on this https://github.com/lostintime/node-rx-stream, quick and dirty, if you need to use right now, further work will be done in https://github.com/funfix/monix.js
Alexandru Nedelcu
@alexandru
That's actually a very decent start @lostintime
My problem with it is that the Observable class will get huge due to having so many operators.
And I was thinking to expose those operators as simple functions.
And then Observable could have a transform or pipe on it that takes one of those functions which should have been methods.
This helps with tree shaking via Webpack / Rollup.
Which are pretty dumb and can't minify classes like Google Closure.
Just a thought.
lostintime
@lostintime
What about core interfaces? ex: I used string constants for Stop/Continue Ack, what do you think? https://github.com/lostintime/node-rx-stream/blob/master/src/main/lib/Reactive.ts
Alexandru Nedelcu
@alexandru
That Ack definition is cool, not sure about the namespace, I think that's a TypeScript specific thing.
lostintime
@lostintime
It’s converted to a variable, members initialized in an anonymous function call, dunno is that good or bad
var Ack;
(function (Ack) {
    function syncOn(ack, callback) {
        if (ack === exports.Continue || ack === exports.Stop) {
            callback(funfix_1.Success(ack));
        }
        else {
            ack.onComplete((result) => {
                callback(result);
            });
        }
        return ack;
    }
    Ack.syncOn = syncOn;
...
Alexandru Nedelcu
@alexandru
Interesting.
Maybe we can use that too, although I guess that in the Flow types we'll define it as a constant
lostintime
@lostintime
any comments on interfaces?:
export interface Observer<T> {
  onNext(elem: T): Ack

  onComplete(): void

  onError(e: Throwable): void
}

export namespace Observer {
  export interface Sync<T> extends Observer<T> {
    onNext(elem: T): SyncAck
  }
}

export interface WithScheduler<T> {
  readonly scheduler: Scheduler
}

export interface Subscriber<T> extends WithScheduler<T>, Observer<T> {
}

export namespace Subscriber {
  export interface Sync<T> extends WithScheduler<T>, Observer.Sync<T> {

  }
}

export type Operator<I, O> = (s: Subscriber<O>) => Subscriber<I>
Alexandru Nedelcu
@alexandru
Looks pretty good
So one thing
I think I'd rather see Ack | Future<Ack> explicitly. Just an opinion. I think here it's important for people to see Future in there.
lostintime
@lostintime
here onNext(elem: T): Ack ?
Alexandru Nedelcu
@alexandru
Yeah.
So Ack to be SyncAck and AsyncAck to not exist.
It's a feeling, one of those cases where if you look at the type, it should immediately be obvious because in Monix I've had a lot of people having problem with that Future and hiding it would probably make it worse.
lostintime
@lostintime
maybe, but Ack as as a type is alo unknown for the user initially, so have to check it’s definition anyway … follow this we can expand it to `”Stop” | “Continue” | Future<“Stop” | “Continue”> :)
Alexandru Nedelcu
@alexandru
Well, atm that's bike shedding, so ignore 😀 we could use pull requests for such discussions
So when are you going to push some code in that repo? :)
lostintime
@lostintime
On Cons of propose rename - is that Ack is used in many places
Alexandru Nedelcu
@alexandru
Would like us to publish a monix package, even if it's blank, to take over the current description — at least let people know that we are working on it.
Would you like publish permissions on npmjs? Not sure how that works.
lostintime
@lostintime
Unfortunately was busy last weeks :(, scheduled for this weekend to work on it, maybe I can push some basic functionality, but will need your assistance with tests
no need for permission for now
btw - funfix packages are kinda fat .. because of documentation
is there any reason to keep it there?
ex: 11M node_modules/funfix-types/
9.8M node_modules/funfix-types/dist/docs/
Alexandru Nedelcu
@alexandru
Hmm, yeah, not good.
The packages are meant to be minified, but yeah, maybe we should not package the docs.
lostintime
@lostintime
in some projects (servers) we’re not using webpack or something, just packaging prod dependencies to docker image, so it adds to final size
Alexandru Nedelcu
@alexandru
OK, will work on removing the docs from the package.
Alexandru Nedelcu
@alexandru

@/all I released the initial version of https://funland-js.org

This is the replacement for funfix-types. It's a refactoring, the types are plain interfaces with no code, compatible with static-land and the higher-kinded encoding is also compatible with fp-ts. And the laws are provided as a separate project, because size matters.

And then this is going to be a dependency for all of funfix's sub-projects, so all data types are going to be compatible with the static-land spec by default.

Alexandru Nedelcu
@alexandru
I also pushed a dummy at https://www.npmjs.com/package/monix
Alvaro Carrasco
@alvaroc1
@alexandru ha awesome :D
Alexandru Nedelcu
@alexandru

@/all Released a new Funfix version: https://github.com/funfix/funfix/releases/tag/v7.0.0-rc.2

It’s a pre-release, with breaking changes, exports its “types” sub-project into https://funland-js.org; the theme of the release being compatibility with static-land, Fantasy-Land and reuses the HTKs encoding of fp-ts.

Alexandru Nedelcu
@alexandru

@lostintime here's the latest release candidate:

$ du -h node_modules
884K    node_modules/funfix-exec/dist
176K    node_modules/funfix-exec/src
1.1M    node_modules/funfix-exec
176K    node_modules/funland/dist
 72K    node_modules/funland/src
264K    node_modules/funland
492K    node_modules/funfix-core/dist
108K    node_modules/funfix-core/src
616K    node_modules/funfix-core
612K    node_modules/funfix-effect/dist
120K    node_modules/funfix-effect/src
748K    node_modules/funfix-effect
 48K    node_modules/funfix/dist
8.0K    node_modules/funfix/src
 68K    node_modules/funfix
2.7M    node_modules

So docs are gone from the packages.

lostintime
@lostintime
@alexandru Thanks!
Alvaro Carrasco
@alvaroc1
i'm not very familiar with frontend packaging... i noticed that in our node_modules/funfix/dist directory there's individual js files like future.js, cancelable.js, etc... and also a es5.js that seems to contains ES5 versions of all of it...
we're importing like this: import { Future } from 'funfix';
but we're getting syntax errors on IE11... it seems like the ES6 code with class Future ... is making it to the browser...
IE6 doesn't support that syntax, so I am guessing I need to somehow make use of the es5.js files in the dist folder, but not sure how
we're using webpack, any ideas?
how do i make webpack load the ES5 js files instead of the ES6 ones?