Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> errno: look up errno names and descriptions

I like this. Reminds me of a couple very useful things I've done:

1. Add a -man switch to command line programs. This causes a browser to be opened on the web page for the program. For example:

    dmd -man
opens https://dlang.org/dmd-windows.html in your default browser.

2. Fix my text editor to recognize URLs, and when clicking on the URL, open a browser on it. This silly little thing is amazingly useful. I used to keep bookmarks in an html file which I would bring up in a browser and then click on the bookmarks. It's so much easier to just put them in a plain text file as plain text. I also use it for source code, for example the header for code files starts with:

    /*
     * Takes a token stream from the lexer, and parses it into an abstract syntax tree.
     *
     * Specification: $(LINK2 https://dlang.org/spec/grammar.html, D Grammar)
     *
     * Copyright:   Copyright (C) 1999-2020 by The D Language Foundation, All Rights Reserved
     * Authors:     $(LINK2 http://www.digitalmars.com, Walter Bright)
     * License:     $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
     * Source:      $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/parse.d, _parse.d)
     * Documentation:  https://dlang.org/phobos/dmd_parse.html
     * Coverage:    https://codecov.io/gh/dlang/dmd/src/master/src/dmd/parse.d
     */
and I'll also use URLs in the source code to reference the spec on what the code is implementing, and to refer to closed bug reports that the code fixes.

Very, very handy!



P.S. I mentioned having links in the source code to the part of the spec. The only problem with this is when the spec (i.e. the C11 Standard) is not in html form. I can only add the paragraph number in the code. What an annoying waste of time every time I want to check that the implementation is exactly right.

For contrast, there's this site:

https://www.felixcloutier.com/x86/index.html

which is a godsend to me. Now, in the dmd code generator, I put in links to the detail page for an instruction when the code generator is generating that instruction. Oh, how marvelous that is! And there is joy in Mudville.


Intel actually lags behind the industry in that they don't really have a formal specification. Arm have a machine readable specification that can be verified by a computer whereas Intel have this weird pseudocode.

Also uops.info is a good reference for how fast the instructions are




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

Search: