Show HN: Lfi – a lazy functional sync, async, and concurrent iteration library
11–20 of 51 posts
Re: Show HN: Lfi – a lazy functional sync, async, and concurrent iteration library
#12Looks useful and powerful. Nice work!
Re: Show HN: Lfi – a lazy functional sync, async, and concurrent iteration library
#13Were you aware of IxJS [0]? I've used that to good success over the years. It's relationship to RxJS keeps it familiar. Any thoughts on what Lfi does better/different than IxJS? [0] https://github.com/ReactiveX/IxJS
I was not aware of it! As far as I can tell, it has some similar ideas (and seems pretty nice!), but I noticed the following differences: - I don't _think_ it supports "concurrent" iteration [1] - It doesn't have a "reducer" concept with composition and what not [2] - It doesn't have a concept of "optionals" [3] [1] https://lfi.dev/docs/concepts/concurrent-iterable [2] https://lfi.dev/docs/concepts/reducer [3] https:…
I believe what you are calling a "concurrent" iteration is one of the use cases for Observables, so would be on the RxJS side (the "parent" project).
> It doesn't have a "reducer" concept with composition and what not
Interesting. I'll read further on what you are doing there. Seems possibly similar to Lenses/Prisms in FP, with different rules.
> It doesn't have a concept of "optionals"
Good point. So far I've not found a JS approach to optionals I'm entirely happy with. I've had some suggest I should give Effect [0] a deeper look, but given I'm mostly happy with RxJS the bulk of Effect doesn't appeal to me. The dual of an Option being an iterator with 0 or 1 values is something I've seen before and something to keep in mind.
Re: Show HN: Lfi – a lazy functional sync, async, and concurrent iteration library
#14Earlier quoted context omitted.
I was not aware of it! As far as I can tell, it has some similar ideas (and seems pretty nice!), but I noticed the following differences: - I don't _think_ it supports "concurrent" iteration [1] - It doesn't have a "reducer" concept with composition and what not [2] - It doesn't have a concept of "optionals" [3] [1] https://lfi.dev/docs/concepts/concurrent-iterable [2] https://lfi.dev/docs/concepts/reducer [3] https:…
> I don't _think_ it supports "concurrent" iteration I believe what you are calling a "concurrent" iteration is one of the use cases for Observables, so would be on the RxJS side (the "parent" project). > It doesn't have a "reducer" concept with composition and what not Interesting. I'll read further on what you are doing there. Seems possibly similar to Lenses/Prisms in FP, with different rules. > It doesn't have a…
Ah, got it. I don't think I quite understood the relationship between this project and RxJS. I did know about RxJS's observables, yes. I do sort of hint at the relationship between concurrent iterables and the observables [1], but I tried to make concurrent iterables a bit more specialized to what you'd normally use an iterable for.
> Interesting. I'll read further on what you are doing there. Seems possibly similar to Lenses/Prisms in FP, with different rules.
I think I've heard of lenses (but not prisms), but don't think I ever actually learned what they are. Would be curious if you find a connection between those and my reducers :)
> Good point. So far I've not found a JS approach to optionals I'm entirely happy with. I've had some suggest I should give Effect [0] a deeper look, but given I'm mostly happy with RxJS the bulk of Effect doesn't appeal to me. The dual of an Option being an iterator with 0 or 1 values is something I've seen before and something to keep in mind.
Yeah, I liked representing optionals as iterables because you get a lot of functionality for "free" [2]
[1] https://lfi.dev/docs/concepts/concurrent-iterable#:~:text=A%....
[2] https://lfi.dev/docs/concepts/optional#why-use-iterables-to-...
Re: Show HN: Lfi – a lazy functional sync, async, and concurrent iteration library
#15Earlier quoted context omitted.
> I don't _think_ it supports "concurrent" iteration I believe what you are calling a "concurrent" iteration is one of the use cases for Observables, so would be on the RxJS side (the "parent" project). > It doesn't have a "reducer" concept with composition and what not Interesting. I'll read further on what you are doing there. Seems possibly similar to Lenses/Prisms in FP, with different rules. > It doesn't have a…
> I believe what you are calling a "concurrent" iteration is one of the use cases for Observables, so would be on the RxJS side (the "parent" project). Ah, got it. I don't think I quite understood the relationship between this project and RxJS. I did know about RxJS's observables, yes. I do sort of hint at the relationship between concurrent iterables and the observables [1], but I tried to make concurrent iterables…
Re: Show HN: Lfi – a lazy functional sync, async, and concurrent iteration library
#16I like Lfi better, great documentation!
Here is the example I use to compare: https://stackblitz.com/edit/stackblitz-starters-ia9ujg6m?fil...
Re: Show HN: Lfi – a lazy functional sync, async, and concurrent iteration library
#17Re: Show HN: Lfi – a lazy functional sync, async, and concurrent iteration library
#18Call me an idiot, but nowhere on the home page does it say it's for JavaScript. The code samples looked like JS, but I don't know every language, so I wasn't sure. It's not until I got into the docs and saw "npm" was a sure we were talking about JS...
Re: Show HN: Lfi – a lazy functional sync, async, and concurrent iteration library
#19Call me an idiot, but nowhere on the home page does it say it's for JavaScript. The code samples looked like JS, but I don't know every language, so I wasn't sure. It's not until I got into the docs and saw "npm" was a sure we were talking about JS...