Hacker News new | past | comments | ask | show | jobs | submit login

Some commands issue multiple queries and include logic for stitching the results into a nice table. There’s not a one-to-one mapping from commands to queries by any means.



Yeah, that's right; but the "glue code" I've had to write for this has been really minimal. Certainly less effort than translating C to JavaScript with regexps (that on its own is something of an accomplishment). I didn't port everything so maybe I missed some more complex bits.

I mean, if this works well for you then that's grand; just wanted to point out to others that \-commands are typically very "non-magic" and you don't need to go the route of translating C code.


Certainly there’s a decently long tail of rarely-used commands, obscure features of commands, and multiple code paths supporting multiple server versions.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: