Hacker News new | past | comments | ask | show | jobs | submit login
Debugging across pipes and sockets with strace [pdf] (github.com)
111 points by nh2 12 months ago | hide | past | web | favorite | 11 comments



"95% of all computer problems can be solved with strace" -- if you do system/network programming, probably yes, if you want to master Microsoft Word, probably not.

Side question: How did the author create the PDF from the markdown source at https://github.com/nh2/strace-pipes-presentation/blob/master... ?


> How did the author create the PDF from the markdown source

Not with strace, that's for sure.


> How did the author create the PDF from the markdown source

He used a tool called Marp [1].

At the top of the Markdown file you can see a code that reads "page_number: true" which can be found in the sample file provided by Marp here [2]. There are other tools out there that can be used to convert a Markdown into slides or PDF. I personally use Deckset.app [3] but searching "markdown presentation" — or — "markdown slides" on the Internet seems to bring a long list of projects aiming for the same feature set.

[1] https://yhatt.github.io/marp/

[2] https://raw.githubusercontent.com/yhatt/marp/master/example....

[3] https://www.decksetapp.com/2/


> There are other tools out there that can be used to convert a Markdown into slides or PDF

For example Pandoc which I personally enjoy


95% of all documents can be converted with pandoc. But in all seriousness I'm guessing author is using pandoc with syntax highlighting flag. http://pandoc.org/MANUAL.html#syntax-highlighting


I made a little tool some time ago to show the relations of processes, fifos, pipes and sockets in a handy picture. This turns out to be very handy when debugging these kind of problems:

https://github.com/zevv/lsofgraph


This looks cool! I tried to use it, but I don't have "dot". It's kind of hard to search for, can you point me in the right direction?


dot - "hierarchical" or layered drawings of directed graphs. This is the default tool to use if edges have directionality.

http://www.graphviz.org


That’s very cool, thanks. I’ll be using it.

Do you write all your system scripts in Lua? How do you like it?


Usually it's just bash, as long as I don't need any nifty data structures. But keeping track of data in bash is a pita , so that's where Lua comes in for me.

I like Lua for how thin and simple it is, with virtually no dependencies on anything. The good thing is that it runs anywhere where I have a C compiler, the bad thing is that it comes with no batteries included - there's not even a native function for creating a directory.

I use Lua a lot in my professional work as embedded software engineer, where the main business logic of the apps are written in Lua, with some thin C layers underneath for integration with various libraries and the OS.

Still, there are a lot of downsides to Lua, mostly the weak typing that bites me a lot. I'm slowly moving away from Lua to Nim these days, you should check that out if you haven't yet.





Applications are open for YC Summer 2019

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

Search: