NHacker Next
  • new
  • past
  • show
  • ask
  • show
  • jobs
  • submit
Examples for the tcpdump and dig man pages (jvns.ca)
mccanne 2 hours ago [-]
Hey really cool! Tcpdump co-author here. If you're interested in the origin story of the tcpdump language, bpf, and pcap, I had fun putting together a talk a number of years ago... https://www.youtube.com/watch?v=XHlqIqPvKw8
loudmax 3 hours ago [-]
For normal, day to day use, examples in documentation is absolute gold. As a practical matter, that's how we human learn to do things. Perhaps surprisingly, even AI benefits from examples.

Children don't learn to speak a language by learning all the grammar and conjugation rules first. They learn by repeating phrases they've heard before and they generalize. Usually we learn tools the same way. We see someone else using a tool, and we do what they're doing, and generalize.

That's not to say that man pages should consist only of examples. There are times when you really do need to understand how the tool processes corner cases and really understand how it works. But I expect most of us here can relate to the experience of opening the man page for a tool and being completely baffled by a wall of unfamiliar jargon. Most of the time you just want to see how to do the most normal common functions, especially when you're learning a tool the first time.

drob518 45 minutes ago [-]
A simple Markdown to roff translator seems like an ideal project for an AI to tackle.
ctmnt 14 minutes ago [-]
I’ve looked at that a bit. Roff and mandoc etc have specialized tagging that’s not easily representable in markdown. You’d wind up with a lot of boilerplate or special non-standard markup, which would undermine the point.

The LLMs are super good at doing that translation, though. They can write those formats no problem.

stephenlf 3 hours ago [-]
My go-to for examples is ‘tldr’ Maybe you could add the examples there, too? Then again, if every man page had basic usage examples, maybe I wouldn’t go to ‘tldr’
imiric 3 hours ago [-]
I also like:

  cheat() {
     curl "cht.sh/$1"
  }
Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact
Rendered at 15:14:28 GMT+0000 (Coordinated Universal Time) with Vercel.