Readit News logoReadit News
pilliq commented on Ask HN: Does anyone use sound effects in their dev environment?    · Posted by u/jack_riminton
mattlondon · a year ago
Something I have often thought about for years but never implemented was "sound logging" where you get specific points of your code to play audio clips or tones instead of/as well as logging to console etc.

The idea being that you can test the app.and hear the sound logs going off as you go. In a tight loop that executes quickly I would hope that you could hear something "being off" in the same way that a mechanic can hear if an engine is "running rough" etc.

Of course... It might just be a totally inscrutable and useless wall of noise too! Won't know until I try it out

pilliq · a year ago
A bit late to the party, but I had a similar idea a while back and built a prototype of this here: http://pilliq.com/companion

It's a "runtime" that executes arbitrary JS code while continuously playing a single tone. Every loop iteration increases the tone's frequency, and every recursive function call increases the tone's pitch (when the function returns, the tone's pitch is decreased).

  * There are visual markers to show what is currently being executed
  * You can increase or decrease the speed of playback
  * You write your own code and execute it in the browser.
I included two examples of fibonacci: one that's iterative and one recursive. I think the audio/visual feedback helps you "feel" the difference of why the iterative implementation is faster than the recursive one.

It's a bit of a hack, and you may need to refresh the page after it finishes running through the code once.

pilliq commented on Ask HN: Fastest concurrent HTTP server library for Python?    · Posted by u/Hydraulix989
pilliq · 13 years ago
I vote Gevent because of its speed, small resource footprint, and its simple synchronous-looking API, but be aware of its limitations. The greenlets (threads) spawned by gevent run in a single OS thread, so you won't be able to take full advantage of all the cores on your server with Gevent alone. Also, Greenlets run cooperatively meaning each one gains control of the CPU until it's done with its computation or hits an IO call. This is great for IO bound computation, not so much for CPU bound work. Even with these limitations, I still think it'll work well with in your application.

Check out this comparison of Python servers: http://nichol.as/benchmark-of-python-web-servers

u/pilliq

KarmaCake day13May 3, 2012View Original