reazen / relude

FP-inspired prelude/standard library for ReasonML projects
https://reazen.github.io/relude
MIT License
268 stars 41 forks source link

Things that don't belong here #24

Open mlms13 opened 5 years ago

mlms13 commented 5 years ago

...or maybe they do, idk. But these are some utility libraries that I'd like to have a "de facto" standard for.

andywhite37 commented 5 years ago

:+1: Yeah, maybe we can make relude-color and relude-url

phated commented 5 years ago

πŸ˜‚ πŸ˜‚ https://github.com/reasonableconsulting/url - feels like we are all working on very similar things πŸ˜‚ πŸ˜‚

mlms13 commented 5 years ago

Throwing dates on the list... we have a small date library internally at work that I'd love to build out as an open source thing.

jdeisenberg commented 5 years ago

Years ago I did some work on https://metacpan.org/pod/Date::Calc, which has a lot of interesting functions.

andywhite37 commented 5 years ago

I'm kind of wondering if we could justify putting the date/time, URL, and parser stuff in the core relude library. The main reason is to avoid the ecosystem versioning hell, and also because the majority of front-end apps tend to work with URLs and date/times in some form. I would put the parser stuff in core too, because it would nice to be able to write proper parsers for URLs and date times, and have the parser tools available in other projects without the fuss of managing more installs.

We could always start off with these things in core, and then move them out if needed.

The color stuff still probably belongs outside, because manipulating colors is probably not a core concept in most apps.

mlms13 commented 5 years ago

The only downside I see is a psychological one:

I think people are slightly more likely to try out relude-date if it's a specific package that meets a specific need, instead of bundled into something larger. Which is silly... the net effect is that either way, Person A's project will directly or indirectly depend on relude and any half-decent dead-code-elimination tool will produce roughly the same bundle in the end.

Anyway, not sure if this is something we actually care about, but it's the only reason I can think of for not bundling everything together in relude.

mlms13 commented 5 years ago

relude-url and relude-eon now exist, and while there's still plenty of work to be done there, I'm checking them off of this list because we're not likely to forget about them, now that we have dedicated libraries.

andywhite37 commented 5 years ago

If we make relude-color I suggest we shamelessly steal everything from our friend fponticelli/thx.color

esbullington commented 5 years ago

What about a lens implementation? Have you all considered that? (prob as a separate library in reazen, not in Relude itself).

andywhite37 commented 5 years ago

@esbullington - yeah, that is a great idea. I know there are some lens implementations out there, but I haven't looked at them too much, but I agree it would be nice to have something, or figure out which other library works the best with our stuff and wrap it (if needed). I'll add it to the list above.

alavkx commented 4 years ago

Small suggestion β€” it would be nice to have relude-* accessible from the docs. Or maybe an "awesome-relude" repo will pop up... πŸ˜†

rolandpeelen commented 3 years ago

Quicktest is also something I'd love to have at some point! Did not find anything for fuzzy testing in Reason. There is some prior art here: https://github.com/c-cube/qcheck - Not sure of the amount of work involved

andywhite37 commented 3 years ago

Quicktest

Yeah, that was something we always wanted to investigate. bs-bastet (the underlying FP types/interfaces lib) has some of that kind of testing, but it's been awhile since I've looked at it.

rolandpeelen commented 3 years ago

I see lenses in this list. I was looking for a lens library too. I noticed the lenses-ppx, which worked in a rather odd way with sum types... We had a little hackathon at work and I decided to write a ppx that adds the simpler getter / setter functions like here: https://github.com/jonlaing/rationale/blob/master/src/Lens.re

Literally the first steps right now. Working with it locally works as long as you build the PPX manually first. Release mechanism I want to borrow from the Decco guys / push it into a GH action for Linux / MacOs, but that's not working as of yet. I'm currently working on stuff to make it work with option and result too. I've added some escape hatches. Seems to be working rather ok for now. Would love some input!

See the Array / List / Result / Option stuff here: https://github.com/rolandpeelen/bs-pancake/pull/1