Live data from Hacker News

Plink-plonk.js – hear webpages render with DOM observer and audio API

gist.github.com

21–30 of 61 posts

Re: Plink-plonk.js – hear webpages render with DOM observer and audio API

#21
post #17
post #12

Earlier quoted context omitted.

Semicolons in JS is how you differentiate between someone who understands that code ambiguity leads to pain, vs someone who shouldn't be allowed near multi-line statements.

Please give a concrete example of this pain that you have actually experienced. I understand that ASI (automatic semi-colon insertion) is in theory ambiguous because you are relying on the compiler, or in some cases many different compilers, to execute the statement correctly. In practice, for over a decade, I have never run into such an issue. I suspect it's due to engineers trying to get too cute with their impleme…

    foo=arr[i]


    (counter++)

Re: Plink-plonk.js – hear webpages render with DOM observer and audio API

#22
post #20
post #17

Earlier quoted context omitted.

Please give a concrete example of this pain that you have actually experienced. I understand that ASI (automatic semi-colon insertion) is in theory ambiguous because you are relying on the compiler, or in some cases many different compilers, to execute the statement correctly. In practice, for over a decade, I have never run into such an issue. I suspect it's due to engineers trying to get too cute with their impleme…

if(foo) doX() doY()

For the benefit of the rest of us, can you explain what issues this causes and where/how you are running this code?

Re: Plink-plonk.js – hear webpages render with DOM observer and audio API

#24
post #17
post #12

Earlier quoted context omitted.

Semicolons in JS is how you differentiate between someone who understands that code ambiguity leads to pain, vs someone who shouldn't be allowed near multi-line statements.

Please give a concrete example of this pain that you have actually experienced. I understand that ASI (automatic semi-colon insertion) is in theory ambiguous because you are relying on the compiler, or in some cases many different compilers, to execute the statement correctly. In practice, for over a decade, I have never run into such an issue. I suspect it's due to engineers trying to get too cute with their impleme…

A typical response is

  return

  false
Where the program returns undefined. I can only think of these examples as straw men. Not once did I run in to an ASI bug.

Re: Plink-plonk.js – hear webpages render with DOM observer and audio API

#25
post #17

Earlier quoted context omitted.

Please give a concrete example of this pain that you have actually experienced. I understand that ASI (automatic semi-colon insertion) is in theory ambiguous because you are relying on the compiler, or in some cases many different compilers, to execute the statement correctly. In practice, for over a decade, I have never run into such an issue. I suspect it's due to engineers trying to get too cute with their impleme…

A typical response is return false Where the program returns undefined. I can only think of these examples as straw men. Not once did I run in to an ASI bug.

Thank you. I have yet to see an example in this thread or anywhere else that did not fall into this category.

Re: Plink-plonk.js – hear webpages render with DOM observer and audio API

#27
post #20
post #17

Earlier quoted context omitted.

Please give a concrete example of this pain that you have actually experienced. I understand that ASI (automatic semi-colon insertion) is in theory ambiguous because you are relying on the compiler, or in some cases many different compilers, to execute the statement correctly. In practice, for over a decade, I have never run into such an issue. I suspect it's due to engineers trying to get too cute with their impleme…

if(foo) doX() doY()

Intuitively this becomes:

if(foo) doX() doY();

Intuitively, as a someone who uses C style languages, this becomes:

if(foo) doX(); doY();

Can someone confirm which intuition is correct?

I ask because, to me: it not being intuitive is a problem--even if it is not classified as ambiguous.

It being only contextually intuitive, also seems somewhat problematic--but maybe excusable if it is assumed you know some similar language going into it and it behaves similarly to that other language.

Re: Plink-plonk.js – hear webpages render with DOM observer and audio API

#29
post #6

Anyone have interesting example sites to try it? I thought Youtube would be a good candidate, but very little going on for some reason.

Google maps is pretty funny

This is one is my favourite. Zoom in and out and you're a DOM DJ.

Re: Plink-plonk.js – hear webpages render with DOM observer and audio API

#30
post #11

I cannot help but refer to this old, old joke: https://en.wikipedia.org/wiki/Blinkenlights#Etymology (I used to discern between program stages on 286/386 because sound of power supply was different for different loops)

Just as electric vehicles can have skeuomorphic “engine” sounds for safety [1] or aesthetics [2], I’d love to see a service that emits “fan” noise to track CPU usage.

[1]: https://en.wikipedia.org/wiki/Electric_vehicle_warning_sound...

[2]: https://electrek.co/2018/03/07/jaguar-i-pace-artificial-moto...

Post reply on HN