So, I finally get what's going on in the Racket DOS demos docs.racket-lang.org/dos/

Some thoughts:
- I like the naming puns, and the layer abstractions
- The lower layer abstractions esp are interesting, do state joining via a monoid
- The "win" abstraction is... interesting, but also troubling to me? The global registry is an improvement over the usual big-bang'esque single-game-state, but it is still a "global" of sorts. But definitely an improvement over the usual big-bang style

It's still difficult for me to imagine how to make even the higher level win abstraction with something that has a lot of moving and differently behaving entities in it

Using a monoid to combine things at the lower layer also seems hard in the following scenarios:

- Scenario 1: a player hits both a health upgrade and damaging missile at the same time. There may in most systems be a race condition where whether the player dies is determined by which collision is handled first. The DOS approach would be to sum both damage and health I think and then determine live-ness afterwards?

(cotd...)

@cwebber "is game a monoid" is an interesting question indeed.

I see that game theory uses monoids a fair amount, and there is probably a lot of insight there.

Bear in mind that a monoid only needs an associative operation, not necessarily a communative operation.

Follow

@cwebber btw I mostly find monoids useful when I am doing something and realize that it's a monoid and then get monoid stuff for free.

Being forced to use a monoid as part of a framework feels more limiting.

My experience in
joeyh.name/blog/entry/7drl_201 comes to mind..

@joeyh To be clear, the monoid stuff is at the lowest abstraction layer of the kernel. It's possible to write abstractions layers above it which behave differently and are not monoids :)

Sign in to participate in the conversation
Octodon

Octodon is a nice general purpose instance. more