unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Emanuel Berg <moasen@zoho.com>
To: help-gnu-emacs@gnu.org
Subject: Re: How to draw cons cell diagrams?
Date: Fri, 30 Mar 2018 22:27:38 +0200	[thread overview]
Message-ID: <86o9j5tikl.fsf@zoho.com> (raw)
In-Reply-To: mailman.11410.1522393467.27995.help-gnu-emacs@gnu.org

Marcin Borkowski wrote:

> I'd like to draw ASCII-art diagrams of lists
> and cons cells, like the ones found here:
> (info "(elisp) Building Lists") or here (info
> "(eintr) Lists diagrammed") or something
> like this.

Interesting idea, and I think you could do it
quite well if you just succeed in hooking one
(a single) car into a cdr, because if you do
that, after that everything would follow with
"expanding recursion". This is how a simple
data structure, for example a tree, is turned
into a diagram, and what is a tree if not just
a nested list?

Perhaps this is an Org-mode thing BTW?

The only reservation is, isn't that kind of
expert manipulation of lists, even among
Lispers, a thing of the past?

In all my Elisp I have only 8 "cons". But then
again everyone isn't me, so maybe I'm wrong
here - in all my Elisp, I'd say that has
happened about 8 times as well :)

But to get this post back on the constructive
path, the way I would approach this idea is
like many other ideas that amount to automate
stuff, which Emacs, Elisp and in essence all
programming/computing is all about, the way I'd
take the first step is by doing it manually!

So, if you don't mind, provide us with a list
in code, and then the corresponding "ASCII art"
(yuk, that word), and even tho this kind of
task is more suited for clear-headed kids and
very young men, I think we could pull it off,
God willing :)

-- 
underground experts united
http://user.it.uu.se/~embe8573


       reply	other threads:[~2018-03-30 20:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.11410.1522393467.27995.help-gnu-emacs@gnu.org>
2018-03-30 20:27 ` Emanuel Berg [this message]
2018-03-30 23:42   ` How to draw cons cell diagrams? Drew Adams
     [not found]   ` <mailman.11448.1522453342.27995.help-gnu-emacs@gnu.org>
2018-03-31 16:28     ` Emanuel Berg
2018-03-30  7:03 Marcin Borkowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86o9j5tikl.fsf@zoho.com \
    --to=moasen@zoho.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).