[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [groff] A macro package for lists in TROFF
From: |
Stephanie Björk |
Subject: |
Re: [groff] A macro package for lists in TROFF |
Date: |
Thu, 7 Dec 2017 02:07:06 +0700 |
> I don't see anything weird or fancy that hasn't been a part of groff
> for at least fifteen years. To what are you referring? I'm
> intrigued.
Perhaps my word choices weren't so good. "Weird, fancy" is kind of
subjective, actually.
I still do think that my macros are using "weird, fancy" stuff, not least
because it takes advantage of Troff's ability to seemingly rewrite itself?
About the stack implementation, I just had this weird idea of escaping the
macro definition within the macro definition with backslashes and see if it
works and stuff. However, Troff's ability to take values of a numerical
register and use it as a name to another register (.nr my_\na_\nb)
intrigues me very much.
I'm not exactly sure how I found this ability, but I think I found it by
accident. Then I decided to extend my accident and make a reverse polish
notation calculator in Troff, which seems to work for some reason. (
https://rosettacode.org/wiki/Parsing/RPN_calculator_algorithm#N.2Ft.2Froff)
Nonetheless, I find it rather interesting that Troff can use parts of
itself to rewrite itself. I've never seen other programming languages able
to do this, but I do think there are a few like this that I've not heard of
yet.
On Wed, Dec 6, 2017 at 6:04 AM, Peter Schaffter <address@hidden> wrote:
> On Tue, Dec 05, 2017, Stephanie Björk wrote:
> > as my macros really use weird, fancy stuff.
>
> I don't see anything weird or fancy that hasn't been a part of groff
> for at least fifteen years. To what are you referring? I'm
> intrigued.
>
> --
> Peter Schaffter
> http://www.schaffter.ca
>
>
- [groff] A macro package for lists in TROFF, Stephanie Björk, 2017/12/04
- Re: [groff] A macro package for lists in TROFF, Steffen Nurpmeso, 2017/12/04
- Re: [groff] A macro package for lists in TROFF, Pierre-Jean, 2017/12/05
- Re: [groff] A macro package for lists in TROFF, Stephanie Björk, 2017/12/05
- Re: [groff] A macro package for lists in TROFF, Peter Schaffter, 2017/12/05
- Re: [groff] A macro package for lists in TROFF,
Stephanie Björk <=
- Re: [groff] A macro package for lists in TROFF, Stephanie Björk, 2017/12/06
- Re: [groff] A macro package for lists in TROFF, Pierre-Jean, 2017/12/06
- Re: [groff] A macro package for lists in TROFF, Ralph Corderoy, 2017/12/06
- Re: [groff] A macro package for lists in TROFF, Stephanie Björk, 2017/12/07
- Re: [groff] A macro package for lists in TROFF, Ralph Corderoy, 2017/12/07
- Re: [groff] A macro package for lists in TROFF, Pierre-Jean, 2017/12/08