HNHacker News
TopNewBestAskShowJobs

_pgon

176 karma · joined September 16, 2016

submissionscomments
_pgon··on Developers Who Use Spaces Make More Money Than Those Who Use Tabs (2017)
So you don't care how readable your code is?
_pgon··on Relearn CSS layout
Yes, functional CSS goes against current best practices, so people write it off without giving it a try. It's a shame as I think it's the best way of doing CSS at this point. For web apps at least.
_pgon··on SwiftUI
I disagree. I'd argue React is most useful when doing something highly interactive.

There's nothing stopping you from writing imperative, side-effect heavy code. But it's something you deliberately opt into, usually on the edges of the program, rather than something you have to deal with by default. Absolutely nothing about React discourages this.

_pgon··on I don’t know who the Web Audio API is designed for
I think you're missing the point entirely. It's like a modular synthesiser. It's not "serious business" but this is the browser after all.

Plug a few oscillators into each other and you have an FM synth. Feed delays into each other, etc, etc. You can do that in a few lines of code with no dependencies.

To me, that's a huge potential audience.

If you want a array of samples and depend on dozens of JS libs for functionality, well, I'm sure the AudioWorkers will catch up eventually.

_pgon··on I don’t know who the Web Audio API is designed for
It's a higher level API and you're deliberately ignoring all of its higher level features and concentrating on the part that clearly is underdeveloped. Maybe you should use your imagination instead of putting a square peg in a round hole?
_pgon··on I don’t know who the Web Audio API is designed for
How to play a sine wave:

  const audioContext = new AudioContext();
  const osc = audioContext.createOscillator();
  osc.frequency.value = 440;
  osc.connect(audioContext.destination);
  osc.start();
"BufferSourceNode" is intended to play back samples like a sampler would. The method the author proposes of creating buffers one after the other is a bizarre solution.