HackerTrans
TopNewTrendsCommentsPastAskShowJobs

bts

no profile record

comments

bts
·ปีที่แล้ว·discuss
Quadratic Voting and Quadratic Funding have some ideas in common, but they refer to separate concepts. To learn more about these topics, I would probably check out the website for RadicalxChange. IIUC RxC is the main public body attempting to realize the theoretical benefits of QF and related ideas.

Here's an explanation of Quadratic Funding from their website[1], which I guess they now refer to as "Plural Funding":

  Plural Funding (also known as Quadratic Funding or QF) is a more democratic and scalable form of matching funding for public goods, i.e. any projects valuable to large groups of people and accessible to the general public.
  
  “Matching funding” is a model of funding public goods where a fund from governments or philanthropic institutions matches individual contributions to a project. Plural Funding optimizes matching funds by prioritizing projects based on the number of people who contributed. This way, funds meant to benefit the public go towards projects that really benefit a broad public, instead of things that only have a few wealthy backers. In Plural Funding, [total funding] for a proposal is [the square root of each contribution to it → summed up, then squared.] Plural Funding strongly encourages people to make contributions, no matter how small, and ensures a democratic allocation of funds meant to benefit the public.
[1] https://www.radicalxchange.org/wiki/plural-funding/

EDIT: formatting
bts
·ปีที่แล้ว·discuss
Indeed they call for new names, as they encompass far more than iterators.

If you read a bit more about them, I think you will be surprised to see the breadth of what these abstractions can be used for. To start, they've been used to build a new compositional foundation for game theory[1], and they can be used to model gradient-based learning in machine learning[2].

As for their simpler applications as getters and setters, they are programmable in the sense that you can think of lens/prism types as interfaces that can be implemented arbitrarily. So you can create your own lenses and combine them like legos to construct new, "bigger" getters and setters from the smaller components.

[1] https://arxiv.org/pdf/1603.04641 [2] https://arxiv.org/abs/2103.01931

EDIT: fixed typo
bts
·ปีที่แล้ว·discuss
Agreed; also Traversable in Haskell is a simpler abstraction than lenses and pretty directly addresses what they seem to be looking for: https://hackage.haskell.org/package/base-4.21.0.0/docs/Data-...
bts
·ปีที่แล้ว·discuss
And functional programmers would argue that contravariance is the real meaning of Liskov’s substitution principle: https://apocalisp.wordpress.com/2010/10/06/liskov-substituti...
bts
·2 ปีที่แล้ว·discuss
Hi! A few years ago I found myself wanting an equivalent of `column` that didn’t strip color codes. After I implemented it in Haskell, I found it was useful to use Nix to force statically linking against libraries like gmp to reduce startup time. Perhaps what I ended up doing might be helpful for you too: https://github.com/bts/columnate/blob/master/default.nix
bts
·2 ปีที่แล้ว·discuss
FWIW there is prior art here. e.g. see IntMap in Haskell: https://hackage.haskell.org/package/containers-0.7/docs/Data...
bts
·3 ปีที่แล้ว·discuss
You should look into the "comonad" abstraction from the functional programming world. Dual to monads, they're a natural fit for situations where you might have a value with some sort of (possibly infinite) context (think: neighborhood, or history, etc.) that can be either pre-computed or computed on-demand.

This StackOverflow post[1] is a good starting point for understanding comonads. It points out that they can be used to model cellular automata (like Conway's Game of Life), sequences, streams, etc.

[1] https://stackoverflow.com/questions/8428554/what-is-the-como...
bts
·4 ปีที่แล้ว·discuss
Data Race Patterns in Go: https://eng.uber.com/data-race-patterns-in-go/