gofpher
lo
gofpher | lo | |
---|---|---|
2 | 65 | |
9 | 18,481 | |
- | 2.5% | |
0.0 | 8.7 | |
almost 8 years ago | 23 days ago | |
Go | Go | |
Apache License 2.0 | 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.
gofpher
-
Functional Programming Library for Golang by IBM
I'm glad to see this idea getting some traction again. I haven't used Go much in the last few years, but I started writing playing around with a similar idea back in 2016 when I was working on a small compiler for a configuration management tool, and later put together a [small stand-alone proof of concept library](https://github.com/rebeccaskinner/gofpher) as part of a [talk](https://speakerdeck.com/rebeccaskinner/monadic-error-handlin...).
At the time, I remember finding FP in go surprisingly ergonomic. Implementing the library to support it was a pain since the type system wasn't expressive enough to prevent everything from devolving into a pile of untyped reflection, but it was reasonably easy to keep that an implementation detail. On the whole, I felt like go would have lent itself well to the "dash of FP for flavor" style of programming that seems to be gaining popularity these days. Unfortunately, in 2017 at least, the Go community seemed to have very little interest in the idea.
I still have a fondness for Go. It always felt nice to use. If the language features have caught up to the point where a robust library like this is feasible, and the communities attitude has shifted, I might take another look at the language.
-
Learn Go in ~5mins
Monadic error handling like in ML work-alikes, Rust etc. would be a good start. Adopt:
• https://github.com/rebeccaskinner/gofpher
• https://speakerdeck.com/rebeccaskinner/monadic-error-handlin...
I've been talking to the local Go user group. No one even knows about that concept. This continues a pattern of general ignorance/lack of looking beyond one's horizon I've noticed.
lo
-
Fun with Go Iterators
Might be interesting to make a library that competes with https://github.com/samber/lo?
-
Go 1.22 Release Notes
On the other hand, I advise you NOT to use this kind of library and write simple, fast go code most of the time, with the occasional generics helper. Why the hell would I clutter my code with, for example: https://github.com/samber/lo?tab=readme-ov-file#fromentries-...
-
Go is not an easy language (2021)
This wasn't feasable without generics, and now with generics they're already adding some convenience functions to the stdlib, like in the slices package.
For map, reduce etc it's not in the stdlib yet, but you can use https://pkg.go.dev/github.com/samber/lo
- I wrote a for loop so you don't have to. Parallel Map, Filter, Reduce library
-
What is your recommendation for a package beyond std?
In particular, I'd like recommend samber/lo, this is a lodash generic tool for golang.
-
What 3rd-party libraries do you use often/all the time?
What are some 3rd-party libraries for Go that you use often/all the time? Instead of "just implement everything yourself", I would really like to get some tips. For instance, a few days ago I discovered https://github.com/samber/lo , which looks very good if I want to have list comprehensions (Python) / LINQ methods (C#). https://pkg.go.dev/github.com/atotto/clipboard is also good for clipboard operations. What else do you suggest and for what task?
- Fourteen Years of Go
-
Functional Programming Library for Golang by IBM
A simple alternative is the combination of:
- https://github.com/samber/lo
- https://github.com/samber/mo
The split is also nice as you can choose to just use the generic convenience functions from lo without the more FP related things from mo.
- Khan Academy's switch from a Python 2 monolith to a services-oriented backend written in Go.
-
In what ways are channels are better than the traditional await?
Some packages offer utilities to gather results from goroutines, such as multierror.Group or parallel.Map in samber/lo.
What are some alternatives?
FuncFrog - Stream api (kind of) implementation for go, other useful functions and packages to use go in a functional way
fpGo - Monad, Functional Programming features for Golang
fp-go - functional programming library for golang
mo - 🦄 Monads and popular FP abstractions, powered by Go 1.18+ Generics (Option, Result, Either...)
gotests - Automatically generate Go test boilerplate from your source code.
fp-go - fp-go is a collection of Functional Programming helpers powered by Golang 1.18+ generics.
scala - Scala 2 compiler and standard library. Scala 2 bugs at https://github.com/scala/bug; Scala 3 at https://github.com/scala/scala3
underscore - 🌟 Useful functional programming helpers for Go
gofp - A super simple Lodash like utility library with essential functions that empowers the development in Go
fp-ts - Functional programming in TypeScript
go-godash - An experimental generic functional utility library inspired by Lodash