Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jul 14 15:56
    Avaq edited #337
  • Jul 14 15:49
    Avaq synchronize #337
  • Jul 14 15:39
    Avaq edited #337
  • Jul 14 15:38
    Avaq edited #337
  • Jul 14 15:38
    Avaq edited #337
  • Jul 14 15:38
    Avaq opened #337
  • Jun 22 05:52
    dependabot[bot] labeled #336
  • Jun 22 05:52
    dependabot[bot] opened #336
  • Jun 22 05:52

    dependabot[bot] on npm_and_yarn

    chore(deps): bump shell-quote f… (compare)

  • May 02 16:35
    PEZO19 commented #46
  • May 02 16:34
    PEZO19 commented #46
  • May 02 16:34
    PEZO19 commented #46
  • Apr 01 08:52
    staltz opened #335
  • Feb 07 13:38

    dependabot[bot] on npm_and_yarn

    (compare)

  • Feb 07 13:38

    staltz on master

    chore(deps): bump elliptic from… (compare)

  • Feb 07 13:38
    staltz closed #319
  • Feb 07 13:32
    dependabot[bot] synchronize #319
  • Feb 07 13:32

    dependabot[bot] on npm_and_yarn

    chore(deps): bump elliptic from… (compare)

  • Feb 07 13:32
    dependabot[bot] edited #319
  • Feb 07 13:30
    staltz commented #319
fiatjaf
@fiatjaf
just found a diamond: http://i.imgur.com/YKiSZKM.png
André Staltz
@staltz
yep and Elm nowadays doesn't have signals : )
Samuel DeSota
@mrapogee

@staltz Has anybody created this? Proxies with imitate() kinda suck, I was thinking they could be replaced with a lazy stream function, this:

const proxy$ = xs.create()
const child = Child({value: proxy$})
proxy$.imitate(child.value)

becomes:

const childValue$ = lazy(() => child.value)
const child = Child({value: childValue$})
They lazy() function returns a xstream that doesn't call the () => child.value until it is subscribed to.
Churchill Lee
@FeliciousX
why do they suck? @mrapogee
André Staltz
@staltz
@mrapogee that's smart, and would work. imitate is just a bit more general because the streams don't need to be all in the same variable scope/closure
Michal Vanko
@michalvankodev
How can I describe a type of Stream that will never emit any value, but it can emit error ?
André Staltz
@staltz
Stream<any>
errors are untyped
throughout the entire JavaScript and TypeScript, actually (note that try/catch is never typed)
Michal Vanko
@michalvankodev
Thanks man :) I've noticed that xs.never() -> Stream<any>
André Staltz
@staltz
:+1:
jfcha
@jfcha
Is there a good way to access the stored value in MemoryStream? I'm guessing I could use a listener to update an environment variable, but that seems pretty messy.
adz5a
@adz5a
as the memory stream will emit its last emitted value, you could stream.take(1).addListener to retrieve the stored value
jfcha
@jfcha
I was hoping to avoid going through a listener, but good to know that'll work. Thanks. I suppose getting values outside of the stream isn't really ideal behavior so having to pay a tax on it makes some sense.
adz5a
@adz5a
i don't think there is another way to "unwrap" values from a stream apart from a listener, what is your use case, maybe i can help :)
jfcha
@jfcha
It's a bit complicated and I have a work around. I was just hoping for a lazy answer :) . Thanks for the offer though! If I come up with a succinct case I'll ask again.
adz5a
@adz5a
hello, I have a case
a problem, that i don't quite understand, I made gist of it
i'm trying to understand why my get function is getting increasedly more called
it's not a bug I guess ( i made a similar gist with most.js and I have the same behaviour ) : I receive only "1--lol--lol" the expected number of times, but my get function is being called a lot : once the first time, two times the second and so on...
André Staltz
@staltz
Hi @adz5a. There are 3 nested flattens, that looks very weird
I suspect, depending on what you want to achieve, you can simplify this a lot
adz5a
@adz5a
Probably, the idea is this :
i have a stream with a low frequency : props$. When it emits I generate a second stream which models input from the user, and at each new value from the second one, i make an asynchronous operation and merge back the results
( I am using the componentFromStream operator from recompose )
I will try and simplify it, I think I don't understand fully what i am trying to achieve here...
Jules Sam. Randolph
@jsamr
Hi ! Really enjoying reactive programming thanks to cycle + xtream. I can't find the zip operator ; has anyone written a custom extra ?
Michal Vanko
@michalvankodev
Jules Sam. Randolph
@jsamr
@michalvankodev thanks, but unfortunately it's different, see those marbles : http://rxmarbles.com/#zip http://rxmarbles.com/#concat
Churchill Lee
@FeliciousX
@sveinburne u might want to read up on this https://staltz.com/rx-glitches-arent-actually-a-problem.html
Jules Sam. Randolph
@jsamr
@FeliciousX Oh thanks of lot, now I understand I might have had a design issue in the first place ! Will go for sampleCombine now.
Churchill Lee
@FeliciousX
:D
Max Battcher
@WorldMaker
I've got a map(...fromArray(Stream<any>[])).flatten().compose(flattenConcurrently) and I remove a Stream from the array but its handlers never get removed and it's dispose()/cancel() is never called.
Is there some better way I'm missing for such a dynamic set of streams with xstream?
Or did I discover some edge case bug? I don't recall having an issue like this with Rx, but this particular code is brand new so I don't have a direct Rx equivalent to compare so I could be forgetful.
Max Battcher
@WorldMaker
Worse, the final Listeners down the line seem to somehow get rebound every time the top level Stream[] changes, so start to see duplicate notifications, etc.
The answer could also be my brain is mush today and I'm missing something obvious.
Max Battcher
@WorldMaker
Ah, yeah: It's probably that I want map(...fromArray().compose(flattenConcurrently)).flatten(), instead, isn't it? Another case where writing the problem down makes it more obvious.
Max Battcher
@WorldMaker
Huh, but now I need to prune already completed ones to keep them from resubscribing... Fun.
Max Battcher
@WorldMaker
Ah yes, I already have an out-of-band signal to help with that. Thanks for listening mostly inactive room.
André Staltz
@staltz
:D
Thomas Grainger
@graingert
is there a .debug that's just for errors?
@staltz ^
André Staltz
@staltz
I think you'd have to use replaceError @graingert
Thomas Grainger
@graingert
@staltz yeah I did that and it was way better. I can put the error message in the virtual Dom
And a progress indicator for submitting to sentry!
Michal Vanko
@michalvankodev
Is it wanted behaviour for xs.combine to not emit anything when you only combine one stream? eg. xs.combine(match$).map....
?