fun fact: if you write an API (of any sort) which has a toggle and no way to query the current state, you are going to hell!
Conversation
Notices
-
Foone🏳️⚧️ (foone@digipres.club)'s status on Wednesday, 06-Dec-2023 09:04:25 JST Foone🏳️⚧️ -
lorddimwit: not a typewriter (lorddimwit@mastodon.social)'s status on Wednesday, 06-Dec-2023 09:24:34 JST lorddimwit: not a typewriter …or am I? How could you tell??
-
Foone🏳️⚧️ (foone@digipres.club)'s status on Wednesday, 06-Dec-2023 09:24:34 JST Foone🏳️⚧️ @lorddimwit good point. every time you do this, it toggles if you are going to hell or not. but there's no way to tell if you were already going to hell
-
Foone🏳️⚧️ (foone@digipres.club)'s status on Wednesday, 06-Dec-2023 09:26:09 JST Foone🏳️⚧️ I've got a camera system and I need to turn it on and off at specific points. it takes several seconds to start up, so stopping it completely is not going to really work, but I can pause it. or unpause it. I have no way to tell if I'm pausing or unpausing it at any time
-
Foone🏳️⚧️ (foone@digipres.club)'s status on Wednesday, 06-Dec-2023 09:32:26 JST Foone🏳️⚧️ the best way I could tell if it's paused or not would be to set it to flush the video every frame and then watch the file and see if it changes in 1/framerate seconds.
but that's JANK AS HELL
-
Foone🏳️⚧️ (foone@digipres.club)'s status on Wednesday, 06-Dec-2023 09:35:58 JST Foone🏳️⚧️ @growf that's how I designed nuclear weapons back when I worked for the US government.
who needs an is_exploded() function when you can just call detonate() twice? -
Bruce Preston (growf@mastodon.org.uk)'s status on Wednesday, 06-Dec-2023 09:35:59 JST Bruce Preston @foone "The toggle call returns the final state. To read the current state, just toggle it twice."
-