• Using Vale With Emacs for Prose Linting

    After looking into linting prose in Emacs, I found a way to roll your own prose linter setup using vale (an extensible prose linter), efm-langserver (a generic language server), and eglot (a language server mode for Emacs).

    Configure efm-langserver

    In /${HOME}/.config/efm-langserver/config.yaml add the following setup for linting with vale. (This was difficult to figure out because of the non-existent documentation, but I found someone else’s efm-langserver config for vale).

    version: 2
    root-markers:
      - .git/
    log-file: /{SOME PATH FOR LOGS}/efm.log
    log-level: 1
    tools:
      vale: &vale-lint
        prefix: vale
        lint-command: 'vale --output line ${INPUT}'
        lint-stdin: false
        lint-ignore-exit-code: true
        lint-formats:
          - '%f:%l:%c:%m'
    
    languages:
      org:
        - <<: *vale-lint
    

    Configure Emacs

    In your Emacs init.el, configure eglot to use efm-langserver when using org-mode. Vale has support for org-mode files as of v2.2.

    (add-hook 'org-mode-hook #'eglot-ensure)
    (add-to-list 'eglot-server-programs '((org-mode) "efm-langserver"))
    

    Now when you open an org-mode file in Emacs you’ll see all your prose linting issues!

    See also:


  • Turn Emacs Into a Focused Writing Tool

    Emacs can be customized to create a beautiful, focused writing environment akin to Ulysses, iA Writer, Bear, or other minimalist markdown editors.

    Reduce visual noise

    • Use writeroom-mode to hide frames and headings in the default emacs chrome
    • Compile emacs for the natural title bar in macOS. This further reduces visual noise and makes for a more minimalist look and feel.
    • Use a theme like doom-plain-dark or doom-plain-light for fewer colors and visual cues that can be distracting.
    • Change links styles to remove bold (it’s already underlined).
    • Hide markup characters like ~/emphasis/ by enabling org-hide-emphasis-markers to reduce the number of sigils like brackets, parenthesis, tick marks, etc.

    Use a different font for writing than for coding I personally prefer monospace fonts for writing because it pairs well with org-mode headings and gives it a typewriter look and feel.

    I don’t like to use the same font for writing as I do for coding. Mainly because it needs to look good larger than what I code in (Cascadia Code) and having a separation between writing and coding makes it easier to concentrate (“I’m in writing mode now”).

    Monospace font recommendations:

    Other proportional fonts:

    • Monotype Bembo (used by Edward Tufte, similar to Georgia or a Garamond to give it a journal-y feel)

    Transparency You can add a little extra flair by adding transparency to the background. Eval the following elisp expression using M-:, (set-frame-parameter (selected-frame) 'alpha 80).

    See also:


  • Zk-SNARKs Can Prove Possession of Information Privately

    Zero-knowledge succinct non-interactive argument of knowledge (zk-SNARK) can verify that another party is in possession of information without the other party needing to reveal that information or leak parts of it. This is useful because it provides a way of doing private transactions in public.

    In a distributed, trust-less system like a cryptocurrency, zk-SNARKs can be used to make private transactions that are verifiable and stored on the blockchain (Zcash already does this, but for the most part blockchains are anonymous, not private). That means privacy conscious parties can benefit from using a blockchain while maintaining privacy at the transaction level and decreasing the chances of being de-anonymized at the transaction history level.

    What is this used for?

    Extrapolating a bit, there are interesting things you can do using zk-SNARKs with blockchains. You could verify an account balance by checking if it has enough available funds without leaking the balance or the account. You could verify the possession of a certificate or license without revealing any information about the certificate itself (like checking an ID without having to look at it). You could pay taxes without revealing your assets. You could automate verification of things like lottery tickets or possessing a certain NFT.

    See also:


  • How Zk-SNARKs Work

    Epistemic status: low

    1. Translate the check function into a polynomial equation (how do you translate information into a polynomial equation?)
    2. Verifier picks a random point encrypted using homomorphic encryption
    3. The prover computes the polynomial encrypting the values in the polynomial
    4. The verifier checks equality in encrypted form zero knowledge is achieved by adding some random numbers to both sides

    One downside to SNARKs is that they need a trusted setup which some consider a flaw.

    See also: