Live data from Hacker News

Show HN: Lfi – a lazy functional sync, async, and concurrent iteration library

lfi.dev

1–10 of 51 posts

Show HN: Lfi – a lazy functional sync, async, and concurrent iteration library

#1
Hey HN! Roughly 4 years ago I started building a lazy functional iteration library for JS/TS. I had a few goals for the library:

- Supporting sync, sequential async, and concurrent async iteration

- Limiting it to a small number of orthogonal concepts that compose beautifully to solve problems

- Making it fully tree-shakeable

I built it for myself and have (mostly) been its only user as I refined it. I've used it in lots of personal projects and really enjoyed it.

I recently decided it would be nice to spread that enjoyment so I created a documentation website complete with a playground where you can try out the library.

I hope you enjoy using it as much as I do! Looking forward to hearing your thoughts :)

Show HN: Lfi – a lazy functional sync, async, and concurrent iteration library
lfi.dev

Re: Show HN: Lfi – a lazy functional sync, async, and concurrent iteration library

#2
Call 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

#4

Call 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...

should probably say "JS" in the title too - there are all sorts of devs on HN afterall

Re: Show HN: Lfi – a lazy functional sync, async, and concurrent iteration library

#5

Call 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...

I came to comment the same thing, having clicked through from the link and not seen the OP’s text. In my case, I searched for and found the GitHub link at the bottom of the landing page and saw the language in the repo details.

Please add “for JavaScript” to the title!

Re: Show HN: Lfi – a lazy functional sync, async, and concurrent iteration library

#6

Call 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...

> nowhere on the home page does it say it's for JavaScript

Yeah, and it is not mentioned in the post title. It's like JS is considered the default programming language.

Re: Show HN: Lfi – a lazy functional sync, async, and concurrent iteration library

#8

Call 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...

That's fair! Agreed it would be good to mention on the home page :)

I did mention in the HN post description, but probably should also say so in the title

Re: Show HN: Lfi – a lazy functional sync, async, and concurrent iteration library

#9

Call 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...

That's fair! Agreed it would be good to mention on the home page :) I did mention in the HN post description, but probably should also say so in the title

Actually, looks like HN doesn't allow me to update the HN title at this point. Sorry about that

Re: Show HN: Lfi – a lazy functional sync, async, and concurrent iteration library

#10

Were 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://lfi.dev/docs/concepts/optional

Post reply on HN