Live data from Hacker News

Signals, the push-pull based algorithm

willybrauner.com

21–30 of 42 posts

Re: Signals, the push-pull based algorithm

#21

Beautiful presentation... @willybrauner, I would like to read your spin on a follow-up piece on `glitch-freedom`. But in all honesty, this journal entry/post is a work of art; a testament to your journey as a technologist!. Cheers

Writing technical articles without adding a graphic and playful touch would indeed interest me less. I find that it's the intersection of these two worlds that makes reading enjoyable. Thanks for your kind words!

Re: Signals, the push-pull based algorithm

#22
post #20

Why create an array each time it iterates a Set rather than just iterating the Set?

I create a new copy of the Set because the functions called during the loop might modify it by removing elements via cleanup functions. Without a copy, iterating directly on the Set could cause unpredictable behavior.

Re: Signals, the push-pull based algorithm

#24

Overall, very nice article. A few notes: * I think the first implementation in JS land was Flapjax, which was around 2008: https://www.flapjax-lang.org/publications/ * The article didn't discuss glitch-freedom, which I think is fairly important.

I didn't know about Flapjax, thanks I'll check it out. Glitch-freedom is indeed a gap in this article. I focused on the signal algorithm exclusively without some implementation optimisation like batching updates; there is so much more to cover! Maybe in a next one, Thanks!

And before there was "reactive", there were (oneway) dataflow constraints.

And a lot of literature on the algorithms.

I wrote a bit about the connection here:

https://blog.metaobject.com/2014/03/the-siren-call-of-kvo-an...

(It starts in a slightly different place, but gets there)

Also about constraints as an architectural connector.

https://dl.acm.org/doi/10.1145/2889443.2889456?cid=813164912...

Re: Signals, the push-pull based algorithm

#25

Overall, very nice article. A few notes: * I think the first implementation in JS land was Flapjax, which was around 2008: https://www.flapjax-lang.org/publications/ * The article didn't discuss glitch-freedom, which I think is fairly important.

I didn't know about Flapjax, thanks I'll check it out. Glitch-freedom is indeed a gap in this article. I focused on the signal algorithm exclusively without some implementation optimisation like batching updates; there is so much more to cover! Maybe in a next one, Thanks!

Batching isn't just an optimisation, not having transactional semantics can cause bugs.

Re: Signals, the push-pull based algorithm

#26

What an amazing article. I really like the presentation of text scrolling together with the code. Wonder how this is done under the hood.

Thanks a lot! The left column containing the text is sticky, The right column is absolute and translate on Y and depend on an intersection observer triggered by each scroll section from the left.

Super cool, thanks for explaining! Is the code available somewhere?

Re: Signals, the push-pull based algorithm

#27

Earlier quoted context omitted.

Thanks a lot! The left column containing the text is sticky, The right column is absolute and translate on Y and depend on an intersection observer triggered by each scroll section from the left.

Super cool, thanks for explaining! Is the code available somewhere?

No, unfortunately, my website is not open source. I may consider externalizing the blog in the future, while keeping all the internal article modules.

Re: Signals, the push-pull based algorithm

#29

Overall, very nice article. A few notes: * I think the first implementation in JS land was Flapjax, which was around 2008: https://www.flapjax-lang.org/publications/ * The article didn't discuss glitch-freedom, which I think is fairly important.

I wrote a whole screed here about how glitches are evil and Rx is evil for teaching people they’re normal, but then I thought about it a bit more— The system as described isn’t actually glitchy, is it? It doesn’t eagerly run any user computations, just dirtying, and that is idempotent so the order is irrelevant. It’s also a bit useless because it only allows you to pull out values of your own initiative, not subscrib…

> whether push-pull as TFA understands it has much to do with Conal Elliott’s definition.

Virtually nothing that is getting sold/branded as "FRP" has anything to do with Conal Eliott's definition.

I once gave a long talk about this here in Berlin, but I don't remember if there was a video.

I've also explained it on twitter a bunch of times, including this memorable sequence:

https://x.com/mpweiher/status/1353716926325915648

Kinda like the Marshall McLuhan scene in Annie Hall ("if only real life were like this")

https://www.youtube.com/watch?t=136&v=sXJ8tKRlW3E

Re: Signals, the push-pull based algorithm

#30

Overall, very nice article. A few notes: * I think the first implementation in JS land was Flapjax, which was around 2008: https://www.flapjax-lang.org/publications/ * The article didn't discuss glitch-freedom, which I think is fairly important.

[flagged]
Post reply on HN