Live data from Hacker News

Bongo Cat

bongo.cat

131–140 of 208 posts

Re: Bongo Cat

#132
post #12

Please add `return false` or `event.preventDefault()` to your keyboard handlers! Otherwise the browser assumes the page didn't do anything with the events and uses its default keyboard handlers. I have find-as-you-type enabled, and pressing keys launches search for me. Handlers need to "eat" the keyboard events to prevent default browser behavior.

Also: I had Russian keyboard layout when I opened the link, and nothing at all worked. Switching to English fixed it. You should be using key codes, not characters, unless you're accepting text input. Key codes correspond to physical keys on the keyboard, but characters they type don't necessarily.

edit: oh it's on github, gonna submit an issue

Re: Bongo Cat

#133
post #34

Earlier quoted context omitted.

Sad state of JS frontend. Overcomplicating things is the first thought that we have now, then we think about the requirements.

It really isnt. Poor developers might, but poor developers will over complicate things in any domain.

The problem is, the industry favors overcomplicating developers, because there's more of them, over those who actually have a clue what their code is doing.

Re: Bongo Cat

#134
post #7

It uses jQuery extensively. The frontend developer in me wants to make a fork written in typescript using react and redux toolkit to manage keystrokes. Then I realize it is just a fun toy.

Why so oldschool? Isn’t the new coolness to rewrite your frontend in Rust compiled to WASM? :P

Yet, it's fast. Browsers will always be optimised for the most common JS functions, which even today are nothing else, but showing very basic jQuery based interactive pages.

Re: Bongo Cat

#136
post #82

Earlier quoted context omitted.

What about logging? Elastic is a must in every deployment!

And we haven't even discussed microservices architecture & CI/CD pipelines. Should we included AI powered monitoring?

Let's bake in some blockchain while we're rewriting this to run serverless with rust->wasm on cloudflare workers to make it 5G ready!

Re: Bongo Cat

#137

In case you want (like me) to share your best art with you colleagues: let e = $.Event('keyup'); '09090586 '.split('').map((k, i) => {setTimeout(()=>{$.play(InstrumentPerKeyEnum[k],k,e.type==="keydown")}, i * 200); setTimeout(() => {$.play(InstrumentPerKeyEnum[k],k,e.type==="keyup")}, i * 250)});

I think bongo cat needs a MIDI interpreter

Re: Bongo Cat

#139

Earlier quoted context omitted.

This industry’s best kept secret is that jQuery is as awesome today as it was 10 years ago. The DOM API is so much nicer than the native one it’s not even funny. And when you are not dealing with thousands of buttons you realize you don’t need a virtual DOM. You may even come to the conclusion that if you have so much state in a single view, maybe your UI sucks. And that beneath all the React hype, there were people…

While i use React at work for bigger things, I've come to use Vue for almost all my "smaller" hacks since it becomes a win to use almost as soon as you start using inputs. After this it scales pretty well up for anything that is on "one page". Apart from work things the main example would be a that I built a small audio sequencer hacked together with Vue. That project would've been suicidal to do in JQuery but also w…

> My main "issue" right now is if i should just leave it and let it be useful at the current level [...]. Or [...] making it more "application" like rather than just a small one-page hack.

Both, perhaps (ie. fork it)?

Re: Bongo Cat

#140

Earlier quoted context omitted.

This industry’s best kept secret is that jQuery is as awesome today as it was 10 years ago. The DOM API is so much nicer than the native one it’s not even funny. And when you are not dealing with thousands of buttons you realize you don’t need a virtual DOM. You may even come to the conclusion that if you have so much state in a single view, maybe your UI sucks. And that beneath all the React hype, there were people…

While i use React at work for bigger things, I've come to use Vue for almost all my "smaller" hacks since it becomes a win to use almost as soon as you start using inputs. After this it scales pretty well up for anything that is on "one page". Apart from work things the main example would be a that I built a small audio sequencer hacked together with Vue. That project would've been suicidal to do in JQuery but also w…

Have you tried webcomponents?
Post reply on HN