Email list hosting service & mailing list manager

A portable implementation for srfi-159 Duy Nguyen (14 Feb 2020 12:39 UTC)
Re: A portable implementation for srfi-159 Lassi Kortela (14 Feb 2020 13:08 UTC)
Re: A portable implementation for srfi-159 Duy Nguyen (14 Feb 2020 13:13 UTC)
Re: A portable implementation for srfi-159 Lassi Kortela (14 Feb 2020 13:23 UTC)
Re: A portable implementation for srfi-159 Duy Nguyen (14 Feb 2020 13:26 UTC)
Standardizing some feature identifiers Lassi Kortela (14 Feb 2020 13:36 UTC)
Re: Standardizing some feature identifiers Lassi Kortela (14 Feb 2020 13:38 UTC)
Re: Standardizing some feature identifiers John Cowan (14 Feb 2020 13:40 UTC)
Re: Standardizing some feature identifiers Duy Nguyen (14 Feb 2020 13:43 UTC)
Re: Standardizing some feature identifiers Lassi Kortela (14 Feb 2020 13:51 UTC)
cond-expand portability Lassi Kortela (14 Feb 2020 13:45 UTC)
Re: cond-expand portability John Cowan (14 Feb 2020 14:29 UTC)
Re: cond-expand portability Lassi Kortela (14 Feb 2020 14:54 UTC)
Re: A portable implementation for srfi-159 Marc Nieper-Wißkirchen (14 Feb 2020 13:24 UTC)
Re: A portable implementation for srfi-159 Duy Nguyen (14 Feb 2020 13:28 UTC)
Re: A portable implementation for srfi-159 Marc Nieper-Wißkirchen (14 Feb 2020 13:33 UTC)
Pretty-printing and auto-formatting Scheme code Lassi Kortela (14 Feb 2020 13:34 UTC)
Re: Pretty-printing and auto-formatting Scheme code Duy Nguyen (14 Feb 2020 13:41 UTC)
Re: Pretty-printing and auto-formatting Scheme code Marc Feeley (14 Feb 2020 13:51 UTC)
Re: Pretty-printing and auto-formatting Scheme code Lassi Kortela (14 Feb 2020 14:02 UTC)
Re: Pretty-printing and auto-formatting Scheme code John Cowan (14 Feb 2020 14:07 UTC)
Re: Pretty-printing and auto-formatting Scheme code Lassi Kortela (14 Feb 2020 14:19 UTC)
Re: Pretty-printing and auto-formatting Scheme code Arthur A. Gleckler (14 Feb 2020 16:28 UTC)
Re: Pretty-printing and auto-formatting Scheme code Lassi Kortela (14 Feb 2020 17:05 UTC)
Re: Pretty-printing and auto-formatting Scheme code Arthur A. Gleckler (14 Feb 2020 20:02 UTC)
Re: Pretty-printing and auto-formatting Scheme code John Cowan (14 Feb 2020 21:59 UTC)
Re: Pretty-printing and auto-formatting Scheme code Lassi Kortela (14 Feb 2020 22:37 UTC)
Re: Pretty-printing and auto-formatting Scheme code John Cowan (15 Feb 2020 07:44 UTC)
Re: Pretty-printing and auto-formatting Scheme code Vladimir Nikishkin (15 Feb 2020 10:15 UTC)
More conventional syntax Lassi Kortela (15 Feb 2020 20:05 UTC)
Re: More conventional syntax John Cowan (15 Feb 2020 20:12 UTC)
Re: Pretty-printing and auto-formatting Scheme code Arthur A. Gleckler (15 Feb 2020 17:44 UTC)
Re: Pretty-printing and auto-formatting Scheme code John Cowan (15 Feb 2020 18:33 UTC)
Re: Pretty-printing and auto-formatting Scheme code Arthur A. Gleckler (15 Feb 2020 18:58 UTC)
Re: Pretty-printing and auto-formatting Scheme code Lassi Kortela (15 Feb 2020 19:47 UTC)
Re: A portable implementation for srfi-159 Arthur A. Gleckler (14 Feb 2020 16:20 UTC)
Re: A portable implementation for srfi-159 Duy Nguyen (15 Feb 2020 00:59 UTC)
Re: A portable implementation for srfi-159 Arthur A. Gleckler (15 Feb 2020 02:26 UTC)
Re: A portable implementation for srfi-159 Duy Nguyen (22 Feb 2020 12:50 UTC)
Re: A portable implementation for srfi-159 Arthur A. Gleckler (23 Feb 2020 07:52 UTC)

Re: Pretty-printing and auto-formatting Scheme code Lassi Kortela 15 Feb 2020 19:47 UTC

>     Making Emacs format a file from the command line is basically a one-line shell script.

Unfortunately Emacs is heavy and fickle to have as a build dependency.
I've had cheap VPS servers run out of disk space due to installing Emacs
from the OS package manager. It also adds bloat to Docker images.
Ephemeral containers are very convenient for CI builds (spin up
container, run build script, save build products, destroy container)
among other purposes.

>     Got it. Line breaking seems to be the hard part, based on the
>     above-linked article and the descriptions in the TeXBook, because of
>     the combinatorial explosion.

It may actually be that the line breaking algorithms in auto-formatters
are descendants of the TeX paragraph filling algorithm :)

> I once implemented a pretty printer for generated C++ code based on this
> paper: Strictly Pretty (Citeseer
> <http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.34.2200>).  The
> algorithm is clearly described, and I'm sure that it would be easy to
> apply to Scheme.

PDF: <https://lindig.github.io/papers/strictly-pretty-2000.pdf>

Very nice. Would you be willing to re-implement one for Scheme?

I suspect that for a really good job we'll end up needing a
penalty-points system like clang-format. It's probably the best
auto-formatter I've used, does a terrific job of C code and very rarely
produces anything ugly. Then again, C's block structure is way simpler
than Lisp since there's a clear separation between statements and
expressions, and a cultural attitude that it's the programmer's own
fault if complex expressions get ugly.

> (Alas, the references give no credit to earlier pretty
> printers in Lisp.  It's written as if Wadler invented pretty printing.)

CS literature can be weird. Perhaps because the field is so young that
we have few authorities.