fp-ts
ramda
Our great sponsors
fp-ts | ramda | |
---|---|---|
96 | 80 | |
10,386 | 23,529 | |
- | 0.4% | |
7.5 | 6.6 | |
7 days ago | 5 days ago | |
TypeScript | JavaScript | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
fp-ts
-
Type-Safe Printf() in TypeScript
While I certainly agree, I've found that this is often an indication of too-complex an architecture, and a fundamental re-think being necessary. I've had projects that depend on [fp-ts], which end up incredibly generic-heavy, but still make it entirely through a typecheck(not build- typescript's just worse at that than other tools like esbuild) in seconds-at-worse.
Obviously depends on your organization/project/application, but I do like these things as complexity-smells.
[fp-ts]: https://gcanti.github.io/fp-ts/
-
Introducing fp-utils a functional utility library for Deno / Node
Unlike more comprehensive functional libraries like fp-ts, each module can be imported and resolved separately. If you just need options, simply add the option module and you're good to go.
-
Blog post: graphs and monads with Typescript
While it's quite abstract, I believe it may be useful to those of you who is interested to learn more about functional programming [in Typescript] and also get more intuition on diverse programming ideas. I use fp-ts as a functional programming library there.
-
Functional Programming Library for Golang by IBM
The library for TypeScript that this is influenced by is here:
https://github.com/gcanti/fp-ts
Interesting how both languages with this library converge to a similar syntax, due to heavy use of functions.
-
Is Scala worth learning in 2023?
Learn something that pays the bill first - nowadays it's Golang/Rust react/typescript. Then you can try some pure fp libs like fp-ts and fp-core.rs, and look through existing scala cats docs. If you'll feel bad about it - that's totally fine and expectable, fp takes a paradigm shift and not that many dev able to shift their brains way of thought due to basic psychological rigidity) (inability to change habits and to modify concepts/attitudes once developed). And that's purely a staffing and management issue - folks hired randoms out of the blue, and called 'em a team.
-
Application Bootstrapping with fp-ts
fp-ts, a library that caters to functional programming in TypeScript, comes with some micro-abstractions that already solve a few of our needs.
-
Error Handling Patterns
looks like more ergonomic/focused version of fp-ts[1]
-
To`class` or not to `class`?
The approach of checked errors is making a comeback. See Swift, Rust, Kotlin + Arrow.kt, and several takes on it in TypeScript: purify, fp-ts, etc.
-
For Production Users: Haskell in an age of Rust and Python
Yeah, TypeScript is shockingly good for a language that is so compatible with JavaScript. For example fp-ts. The main problem with TypeScript is pervasive mutability and side-effects.
-
Why I use Typescript nominal types [3via series part 3]
Back at my last job I was lucky enough to stumble upon some pretty awesome colleagues thanks to which I found even greater depths in Typescript which cemented the love even more. We used FP-TS to rewrite a legacy Feathers.js application and I learned many principles I later applied to my own full-stack "framework".
ramda
-
Tacit Programming
JavaScript is great for point-free programming! Make sure you check out Ramda.js https://ramdajs.com/
It’s fun in the sense that solving a puzzle is fun, but I avoid it for anything I need to maintain long-term.
But it’s good practice for understanding combinators which is useful for some kinds of problems.
-
Pipeline-Oriented Programming [video]
This is very cool. I remember I got sucked into things like Ramda going down this functional programming rabbit hole :-)
-
Level up your Typescript game, functionally - Part 2
To create our pipeline, I'm going to use the pipe function from the NodeJS ramda library instead of building my own.
- Ramda: A practical functional library for JavaScript programmers
-
FP and JavaScript/TypeScript
I recently took ownership of the new types/ramda repo. This repo is re-exported by @types/ramda and is the first step to bringing type definitions for ramda in-house. We're already hard at work correcting major issues, adding full currying support, and general bug fixes
- [AskJS] Auto-Generated Documentation from JSDoc comments, nice modern themes?
-
No Lodash
Lodash gets so many things wrong I’d rather not see it in most projects. I appreciate a good utility library for JS projects but my go-to choice has to be Ramda[1]. Every function it exports is curried and works great with pipe which enables me to write highly reusable and composable functions in pointfree notation. I have never been as productive with lodash, and I find the functional style easier to read
-
Snap.js - A competitor to Lodash
Do note though that ramda is different from rambda. 👍 (Granted they are very similar!)
-
Mastering Internationalization and Localization in JavaScript: A Comprehensive Guide
It's worth noting that using Intl.Collator() and localeCompare() is not the only way to sort the strings for different languages, you can also use other libraries like lodash or ramda .
-
A code mod to replace Immutable.js with Ramda
Like yes, if you're choosing between the two, Ramda is functionally immutable, but it creates a brand new copy, every time, of arrays and maps, by looping through them iteratively.
What are some alternatives?
lodash - A modern JavaScript utility library delivering modularity, performance, & extras.
RxJS
Rambda - Faster and smaller alternative to Ramda
effect - A fully-fledged functional effect system for TypeScript with a rich standard library
immutable-js - Immutable persistent data collections for Javascript which increase efficiency and simplicity.
lazy.js - Like Underscore, but lazier
Sanctuary - :see_no_evil: Refuge from unsafe JavaScript
proposal-pattern-matching - Pattern matching syntax for ECMAScript
purescript - A strongly-typed language that compiles to JavaScript
underscore - JavaScript's utility _ belt
mori - ClojureScript's persistent data structures and supporting API from the comfort of vanilla JavaScript
io-ts - Runtime type system for IO decoding/encoding