Jim Donegan ✅ · @jimdonegan
1560 followers · 4702 posts · Server mastodon.scot
Jim Donegan ✅ · @jimdonegan
1560 followers · 4688 posts · Server mastodon.scot
Jim Donegan ✅ · @jimdonegan
1557 followers · 4684 posts · Server mastodon.scot
posixgnulinux · @posixgnulinux
0 followers · 10 posts · Server fosstodon.org

I enjoyed this talk, when I saw it recently on yt:

Little things and big things: lessons for building large systems. Peter van Roy

youtube.com/watch?v=h8sE3Ai8Ds

#programming #systems #distributed #determinism #nondeterminism #softwaredesign #functionalprogramming

Last updated 1 year ago

Jim Donegan ✅ · @jimdonegan
1546 followers · 4605 posts · Server mastodon.scot
Steve Dustcircle ⍻ · @dustcircle
140 followers · 3136 posts · Server mastodon.cloud
Answers in Reason · @AnswersInReason
22 followers · 61 posts · Server masto.nu
Jim Donegan ✅ · @jimdonegan
1502 followers · 4412 posts · Server mastodon.scot
Jim Donegan ✅ · @jimdonegan
1498 followers · 4384 posts · Server mastodon.scot

I actually believe in , so everything that happens is unavoidable bc. of determined physical formulas. 🙄 You basically don't have a choice.

So I saw this donut and I thought, well, really bad to eat that now. And then I looked again and thought, well it is basically unavoidable, because everything is determined.

I cannot escape. 😋

#determinism

Last updated 1 year ago

steve dustcircle ⍻ · @dustcircle
197 followers · 5828 posts · Server masto.ai
Karsten Schmidt · @toxi
1674 followers · 809 posts · Server mastodon.thi.ng

Pragmatist that I am, I've been spending a lot of time over the past 24h to abstract & extract the fixed timestep/lockstep simulation update logic so that I (or others) don't need to re-implement the boilerplate for this type of update cycle for each new project. So a new (small) package is born:

thi.ng/timestep

Aside from the main update logic which entirely separates simulation state (and its update/integration) from rendering state (which will be derived/interpolated), the package also provides convenience wrappers for numeric or vector-based state variables. These are very useful, since the update logic requires 3 distinct versions of each sim state var: previous, current (next) and its interpolated version. Only the latter should be used outside the simulation (e.g. for rendering). It's all explained in the readme and the classic article by Glenn Fiedler (from 2008 or so) upon which the core logic is based on...

In related news, I've also uploaded an updated version of which is fully deterministic now (pixel perfection verified several times via difference images exported after 1000 and 2000 frames). Obviously I cannot update the version on fx(hash), but you can just copy your hash & params query string and append it as I've done here:

demo.thi.ng/umbrella/bubbleman

#bubblemania #thingumbrella #generativeart #simulation #determinism #typescript

Last updated 1 year ago

Karsten Schmidt · @toxi
1668 followers · 803 posts · Server mastodon.thi.ng

Okay, I found the non-determinism issue! Get ready for a deep dive:

Just as with Apple's "natural scrolling direction", there're really two ways of thinking about this issue and IMHO it's not even a bug as such, just me prioritizing a different aspect of the whole piece: realtime performance (since this is animated)

The "offending" code to update a single cell/bubble is attached, see if you can spot the issue...

It took me little while, but as predicted, it _is_ timing related:

The animation code is trying to be "best practice" (aka using the highres timestamp supplied by requestAnimationFrame(), computing the delta time to the previous frame and so be adaptive to any dropped frames or unexpected delays, e.g. due to window resizing, garbage collection or any other external factors). Because of that, each bubble is updating using realtime deltas and hence the animation WILL sooner or later become non-deterministic in terms of individual bubble movements (but nothing else!).

Btw. The official MDN docs[1] are having an explicit warning about making sure to use the realtime timestamp future-proofing animation code (see 2nd screenshot)

Everything else in , i.e. the layout, the positions, shapes, colors & texture assignments of the bubbles, all that _is_ fully deterministic. I just verified this (several times) by serializing the entire state to JSON and then diffing results. The issue is (real)timing!

This is useful food for thought though in general (and for others): There are only two choices for _any_ such generative, realtime animated project:

1) Locking the frame rate to ensure a "theoretical determinism", but eventually having to irrevocably accept a change of character of the entire piece in the future (e.g. due to higher or uneven display frame rates, e.g. more common 120Hz screens in a few years or low powered machines with frequent dropped frames on the other side of the spectrum...)

OR

2) Prioritizing realtime animation and accepting the fact that minute/unimportant details might/will become variable (e.g. in this case, bubbles bobbing in a non-guaranteed order)

IMHO you can only pick one of these and it seems I picked the wrong one... (just like with Brexit, you can't both eat your cake and have it too! 😉)

What would you have done/prioritized? Which aspect is more important here (really)?

[1] developer.mozilla.org/en-US/do

#bubblemania #debugging #determinism #realtime #animation #generativeart

Last updated 1 year ago

Jim Donegan ✅ · @jimdonegan
1462 followers · 4299 posts · Server mastodon.scot
Yogi Jaeger · @yoginho
106 followers · 163 posts · Server spore.social

Ich hatte heute Morgen leider keine andere Wahl, als diesen kompletten Unsinn von Tanja Traxler (Wissenschaftsredaktorin, Der Standard) zu lesen: derstandard.at/story/200014507.

Warum es den freien Willen doch gibt, erforschen wir mit biologischen und philosophischen Methoden in unserem Projekt an der Uni Wien: expandingpossibilities.org.

#freewill #determinism #agency #organisms #evolution

Last updated 1 year ago

Sparx (Electric Dragon) · @electricdragon
58 followers · 335 posts · Server mas.to

Imagine having a brain tumor that controls your behavior, but you believe it's YOU making all the choices. Now remove the "tumor" from the previous sentence and read it again.

#buddhism #nihilism #determinism #freewill

Last updated 1 year ago

The great moral sadism in society – indeed, of every civilized society up till now - is that you must accept responsibility for yourself - your ENTIRE self/personality/identity i.e., your behaviors, beliefs, assumptions, decisions, values, theories, commitments, fears, biases, prejudices, likes, dislikes - your WHOLE FUCKING IDENTITY – even though you were NOT FREE to choose the majority of it.

#gnosticism #determinism #freewill #morality

Last updated 1 year ago

Jim Donegan ✅ · @jimdonegan
1450 followers · 4233 posts · Server mastodon.scot
Jim Donegan ✅ · @jimdonegan
1446 followers · 4200 posts · Server mastodon.scot
Jim Donegan ✅ · @jimdonegan
1447 followers · 4182 posts · Server mastodon.scot