Sam Lanning
samlanning.com
Sam Lanning
@samlanning.com
Software, Security, Music & Lights.

https://github.com/s0
Great read!
October 14, 2025 at 10:05 PM
Then you benefit from react handling the lifecycle and initialization of all the intervals / animation frames when the components render etc…
October 14, 2025 at 9:41 PM
If you need to model a simulation with a constant interval, then you could have:

- 1 use ref and useEffect & interval to update the simulation at a constant time, storing the result in a ref
- 1 state & useEffect & animation frame to derive the state from the information in the ref
October 14, 2025 at 9:41 PM
and you can have as many states as you want, but I find for animations, it’s best to only change state once per frame.

Then using the data in state, return JSX with the SVG nodes, and react will diff the changes, only making the required changes to the dom, making rendering pretty seamless.
October 14, 2025 at 9:38 PM
Something like (from memory, apologies)

const Sim = () => {

const [state, setState] = useState();

useEffect(() => {
let i
const f = () => {
setState(current => ({}))
i = requestAnimationFrame(f)
}
f()
return () => cancelAnimationFrame(i);
}, [])

// …
}
October 14, 2025 at 9:35 PM
😅
October 3, 2025 at 3:50 PM
Oh wait I think I get it, its just sharing one of the pairs of valid values 🤦‍♂️ not trying to be an equivalent expression to the above! Nvm
October 3, 2025 at 11:21 AM
Right, but isn’t it also possible to be both unsafe and unsound, which isn’t allowed by the last expression, but is allowed by the ones above that?

Using OR would allow every combination except unsafe and sound
October 3, 2025 at 11:18 AM
Not to be that guy, but shouldn’t the logical operator on the last line be ∨ (or) not ∧ (and) 😅
October 3, 2025 at 5:32 AM
Rack was £140 - www.thomann.co.uk/flyht_pro_ra... UDM ~£360, Mac mount £200, power ~ £200, then whatever additional modules you want. Netcon was £280
Flyht Pro Rack 8U Double Door Profi
19" Double Door Rack Usable height: 8U, Unit depth: 520 mm, Infinitely adjustable rail (no fixed increments or steps) at the front and rear, Material: 10 mm Plywood, Robust aluminium profile, Ball co...
www.thomann.co.uk
June 7, 2025 at 11:58 AM
I don’t have any of my own to hand, but it’s really secure in there: youtu.be/9SFQjIcq-XA?...
June 7, 2025 at 10:38 AM
Directly below the dream machine. The rack mount has space for 2, but I’ve only used one of them. Unfortunately the latest gen Mac minis don’t fit in 1U any more 😥
June 7, 2025 at 10:18 AM
🙈
June 7, 2025 at 10:13 AM
Nice dream machine! 😄 I don’t have a homelab setup, but I do have

- A custom built NAS running Debian and ZFS (where I run my home services)
- A portable rack in a flight case (for event lighting) with a dream machine, M2 Mac Mini, DMX output, power twist power distribution & 16A Power in 😄
June 7, 2025 at 10:08 AM
Cue complete lack of surprise… 🤦

Exactly as we expected, but worse than we thought
May 4, 2025 at 10:17 PM
We’re about to open up some roles for boilerroom.tv, let’s have a chat?
BOILER ROOM
Connecting club culture to the wider world, on screen and through parties, film and video.
boilerroom.tv
March 3, 2025 at 3:44 PM