From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: References: Date: Thu, 13 Aug 2009 11:22:00 +0100 Message-ID: From: roger peppe To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [9fans] Using proportional fonts in Acme for Programming Topicbox-Message-UUID: 45852258-ead5-11e9-9d60-3106f5b1d025 2009/8/13 Aaron W. Hsu : > Firstly, how many of you using Acme for programming on a daily basis rema= p > your fonts so that the fixed width font is the main one that you use? i use proportional fonts in acme for programming. > Secondly, if you do use proportional width fonts, why, and what troubles = did > you encounter; what benefits did you encounter? i use them because they're more readable, and i get more characters per line than in a similarly sized fixed-width font. in C-like syntax, everything works just fine; a single tab character is ideal for indentation. use of tabs other than at the start of a line won't guarantee alignment with other fonts, but this rarely matters too much. in LISP, i sometimes ended up using a fixed-width font, due to the convention of aligning a subform with part of its parent, as you point out. variable-width fonts can work ok in lisp, although the indentation tends to end up slightly non-standard (although still passable). in haskell, i used proportional spacing with single-tab indentation, and it worked just fine apart from, AFAIR, multiple assignments for a single let - i just always used let...in. > Thirdly, would you continue using proportional width fonts in cases like > Lisp code, where you very often see something like the following indentat= ion > scheme, and how would you resolve these indentation problems with > proportional width fonts if you did continue to use them? > > =C2=A0 =C2=A0 =C2=A0 =C2=A0(let ([foo bar] > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0[something else]) > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(some-func (called again) > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (wi= th fun indentation) > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(and yet) > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(another))) i presume you meant this: (let ([foo bar] [something else]) (some-func (called again) (with fun indentation) (and yet) (another))) using a varwidth font, i'd format this as: (let ([foo bar] [something else]) (some-func (called again) (with fun indentation) (and yet) (another))) (note 4-space indent, not 2-space indent for the some-func arguments. not perfect, but ok, i reckon) i found unlike macros, functions rarely need multiline continuation, but i think the case is arguable. as i said, i've done it both ways. PS. i'd really like to see an acme-integrated lisp environment. one of these years i'll get around to it...