[HN Gopher] Plink-plonk.js - hear webpages render with DOM obser... ___________________________________________________________________ Plink-plonk.js - hear webpages render with DOM observer and audio API Author : hicksyfern Score : 121 points Date : 2020-02-14 13:08 UTC (1 days ago) (HTM) web link (gist.github.com) (TXT) w3m dump (gist.github.com) | xrd wrote: | Would love to see a sonic comparison between Todo list apps on | the variety of front end frameworks like React, Vue and Svelte. | swiley wrote: | You can do something similar with an AM radio on a minimalist | Linux install with nothing in the background. | nonbirithm wrote: | I once did something similar. There is this strace-like program | for Windows that captures things like memory allocations or mouse | movement as part of the Win32 API. I modified the source so it | emitted an OSC message on every trace and sent it to PureData | which would output MIDI. The result was, well, pure cacophony. | But it was amusing to, for example, belt out a dissonant piano | piece by typing in VIM or use calc.exe as a (really shitty) | drumpad. | luckylion wrote: | I love this, wow. It's a great idea and I'm sure you could use it | as a fun debugging idea for plenty of things. | thesz wrote: | 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) | divbzero wrote: | 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... | dvh wrote: | I love how he omitted semicolons so that it cannot be used as | bookmarklet. | ylyn wrote: | Just minify it...? | slimed wrote: | Imagine still using semi-colons in JS source in 2020 and | "bookmarklet compatibility" being your reasoning. | jarfil wrote: | 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. | pretty_lorelei wrote: | Honest question: how often does the code ambiguity due to | lack of semicolons lead to non-obvious bugs? I'm nowhere | close to being a JS expert, but I've done some | JavaScript-heavy pet projects and I've got an ambiguous | statement interpreted wrong exactly once, and the cause | was pretty obvious within a minute of looking at the | error. | z3t4 wrote: | If you accidently write a comma instead of semicolon it | can have interesting effects. | slimed wrote: | 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 implementations. | z3t4 wrote: | if(foo) doX() doY() | NoInputSignal wrote: | 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. | slimed wrote: | For the benefit of the rest of us, can you explain what | issues this causes and where/how you are running this | code? | z3t4 wrote: | foo=arr[i] (counter++) | gherkinnn wrote: | 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. | slimed wrote: | Thank you. I have yet to see an example in this thread or | anywhere else that did not fall into this category. | detaro wrote: | Imagine not understanding why bookmarklet compatibility is | cool for something like this and putting people down for it | with a cheap "it's 2020" meme. | slimed wrote: | A bash one-liner solves this problem for you. If you | think it's "cool" to execute JS as a bookmarklet you are | free to distribute your own version of the library. The | original commenter was the one "putting people down" by | demanding the author do it "the right way". | [deleted] | hicksyfern wrote: | This appears quite useful for debugging renders in web apps, and | also just sounds quite cool. | swiley wrote: | Supposedly Alan Turing used a tool like this for debugging his | programs. | detaro wrote: | Anyone have interesting example sites to try it? I thought | Youtube would be a good candidate, but very little going on for | some reason. | Macuyiko wrote: | Facebook is a non-stop symphony | tclover wrote: | I tried with twitch | finnegandewitt wrote: | Google maps is pretty funny | lucasyvas wrote: | This is one is my favourite. Zoom in and out and you're a DOM | DJ. ___________________________________________________________________ (page generated 2020-02-15 23:00 UTC)