# pretty printing

Published articles for pretty printing.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## Small improvement for pretty-printing in paste.depesz.com

DevFeed: [Small improvement for pretty-printing in paste.depesz.com](<https://devfeed.tech/articles/small-improvement-for-pretty-printing-in-paste-depesz-com-33672.md>)

Original publisher: [Read original article](<https://www.depesz.com/2026/01/06/improvement-for-pretty-printing-in-paste-depesz-com/>)

Author: depesz

Published: 2026-01-06T15:13:10Z

Content type: release

Language: en

Sources: [select \* from depesz;](<https://devfeed.tech/sources/select-from-depesz.md>)

Topics: [pretty printing](<https://devfeed.tech/topics/pretty-printing.md>), [JOIN](<https://devfeed.tech/topics/join.md>), [Command-line interface](<https://devfeed.tech/topics/cli.md>), [Script](<https://devfeed.tech/topics/script.md>)

Tags: [announce](<https://devfeed.tech/tags/announce.md>), [announcements](<https://devfeed.tech/tags/announcements.md>), [command-line](<https://devfeed.tech/tags/command-line.md>), [formatting](<https://devfeed.tech/tags/formatting.md>), [irc](<https://devfeed.tech/tags/irc.md>), [join](<https://devfeed.tech/tags/join.md>), [paste-depesz-com](<https://devfeed.tech/tags/paste-depesz-com.md>), [perl](<https://devfeed.tech/tags/perl.md>), [pg-prettify](<https://devfeed.tech/tags/pg-prettify.md>), [postgresql](<https://devfeed.tech/tags/postgresql.md>), [pretty](<https://devfeed.tech/tags/pretty.md>), [pretty-printing](<https://devfeed.tech/tags/pretty-printing.md>), [script](<https://devfeed.tech/tags/script.md>), [uncategorized](<https://devfeed.tech/tags/uncategorized.md>)

### AI overview

The article describes an improvement to the pretty printer on paste.depesz.com that produces better indentation for complex SQL join conditions. It also notes that the printer can be used from the command line or through a previously described script without storing content on the site.

### Source excerpt

As you maybe know, some time ago I made paste service, mostly to use for queries, or related text to share on IRC. One part of it is that it also has pretty printer of provided queries. Recently I realized that in case of complex join conditions, the output is, well, sub-optimal. For example: SELECT ... Continue reading "Small improvement for pretty-printing in paste.depesz.com"

## Interfaces 101 : Go's Logging Interface Ep. 4

DevFeed: [Interfaces 101 : Go's Logging Interface Ep. 4](<https://devfeed.tech/articles/interfaces-101-go-s-logging-interface-ep-4-22214.md>)

Original publisher: [Read original article](<https://www.ardanlabs.com/blog/2023/02/interfaces-101-go-logging-interface.html>)

Published: 2023-02-21T00:00:00Z

Content type: tutorial

Language: en

Sources: [William Kennedy](<https://devfeed.tech/sources/william-kennedy.md>)

Topics: [Go Language](<https://devfeed.tech/topics/go-language.md>), [interfaces](<https://devfeed.tech/topics/interfaces.md>), [Logging](<https://devfeed.tech/topics/logging.md>)

Tags: [enum](<https://devfeed.tech/tags/enum.md>), [enumerators](<https://devfeed.tech/tags/enumerators.md>), [formatting](<https://devfeed.tech/tags/formatting.md>), [function](<https://devfeed.tech/tags/function.md>), [go](<https://devfeed.tech/tags/go.md>), [golang](<https://devfeed.tech/tags/golang.md>), [interface](<https://devfeed.tech/tags/interface.md>), [interfaces](<https://devfeed.tech/tags/interfaces.md>), [log-interface](<https://devfeed.tech/tags/log-interface.md>), [pretty-printing](<https://devfeed.tech/tags/pretty-printing.md>), [server-logs](<https://devfeed.tech/tags/server-logs.md>)

### AI overview

This video tutorial explains Go interfaces through error-interface nil behavior and custom string formatting. It covers defining an enumerated type, implementing the required interface method, and controlling how values are represented and printed.

### Source excerpt

Introduction In episode 3, Miki implemented a type that satisfied Go's error interface. The odd thing about his type was it would be considered not-nil although no value was set for it. To get a better understanding of the situation, Miki gives a brief explanation of how Go determines if an error value is nil, and in this case, Miki specified the type of the variable returned to be a pointer of his custom error type which blindsided Go's mechanism to determine a nil value. Miki chose this example because it demonstrated the importance of declaring an error with its type set as the error interface.

## The Simple Essence of Algebraic Subtyping: Principal Type Inference with Subtyping Made Easy

DevFeed: [The Simple Essence of Algebraic Subtyping: Principal Type Inference with Subtyping Made Easy](<https://devfeed.tech/articles/the-simple-essence-of-algebraic-subtyping-principal-type-inference-with-subtyping-made-easy-29481.md>)

Original publisher: [Read original article](<http://lambda-the-ultimate.org/node/5597>)

Published: 2020-07-24T07:46:20Z

Content type: article

Language: en

Sources: [Lambda the Ultimate](<https://devfeed.tech/sources/lambda-the-ultimate.md>)

Topics: [Algorithm](<https://devfeed.tech/topics/algorithm.md>), [Code](<https://devfeed.tech/topics/code.md>), [Parser](<https://devfeed.tech/topics/parser.md>), [pretty printing](<https://devfeed.tech/topics/pretty-printing.md>)

Tags: [algorithm](<https://devfeed.tech/tags/algorithm.md>), [blog-post](<https://devfeed.tech/tags/blog-post.md>), [code](<https://devfeed.tech/tags/code.md>), [parsing](<https://devfeed.tech/tags/parsing.md>), [pretty-printing](<https://devfeed.tech/tags/pretty-printing.md>), [type-theory](<https://devfeed.tech/tags/type-theory.md>)

### AI overview

The article presents Simple-sub, an alternative algorithm for algebraic subtyping and principal type inference. It argues that MLsub's biunification-based specification can be understood without bisubstitution, polar types, and advanced abstract algebra, and reports that the implementation fits in under 500 lines of code.

### Source excerpt

The Simple Essence of Algebraic Subtyping: Principal Type Inference with Subtyping Made Easy, Lionel Parreaux, ICFP 2020. MLsub extends traditional Hindley-Milner type inference with subtyping while preserving compact principal types, an exciting new development. However, its specification in terms of biunification is difficult to understand, relying on the new concepts of bisubstitution and polar types, and making use of advanced notions from abstract algebra. In this paper, we show that these are in fact not essential to understanding the mechanisms at play in MLsub. We propose an alternative algorithm called Simple-sub, which can be implemented efficiently in under 500 lines of code (including parsing, simplification, and pretty-printing), looks more familiar, and is easier to understand. There's also an introductory blog post and an online demo. Stephen Dolan's Algebraic Subtyping (discussion) unexpectedly provided a solution to the problem of combining type inference and subtyping, but used somewhat heavy and unusual machinery. Now Lionel Parreaux shows that the system can be implemented in a very straightforward and pleasing way. Here's to hoping that it makes it into real languages!

## BPF: the forgotten bytecode

DevFeed: [BPF: the forgotten bytecode](<https://devfeed.tech/articles/bpf-the-forgotten-bytecode-38935.md>)

Original publisher: [Read original article](<https://idea.popcount.org/2014-05-21-bpf-the-forgotten-bytecode>)

Author: Marek

Published: 2014-05-20T22:00:00Z

Content type: tutorial

Language: en

Sources: [Marek Majkowski](<https://devfeed.tech/sources/marek-majkowski.md>)

Topics: [Kernel](<https://devfeed.tech/topics/kernel.md>), [networking](<https://devfeed.tech/topics/networking.md>), [debugging](<https://devfeed.tech/topics/debugging.md>), [Parser](<https://devfeed.tech/topics/parser.md>), [pretty printing](<https://devfeed.tech/topics/pretty-printing.md>), [systems](<https://devfeed.tech/topics/systems.md>)

Tags: [article](<https://devfeed.tech/tags/article.md>), [blog](<https://devfeed.tech/tags/blog.md>), [debugging](<https://devfeed.tech/tags/debugging.md>), [filter](<https://devfeed.tech/tags/filter.md>), [kernel](<https://devfeed.tech/tags/kernel.md>), [network](<https://devfeed.tech/tags/network.md>), [pretty-printing](<https://devfeed.tech/tags/pretty-printing.md>)

### AI overview

This article explains the history and operation of the Berkeley Packet Filter (BPF), including how tcpdump parses filter expressions into BPF bytecode, attaches the filter to a network interface, and pretty-prints the resulting packets. It also describes kernel-level packet filtering for network debugging.

### Source excerpt

BPF: the forgotten bytecode This article was originally published on the CloudFlare blog: Every once in a while I run into an obscure computer technology that is a hidden gem, which over the years has become mostly forgotten. This is exactly how I feel about the tool and its kernel counterpart the packet filter interface. For example, say you run: For most of us this command is pure magic, almost nobody understands what happens behind the scenes.