all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* ELPA submission: show-conses.el
@ 2024-10-20  5:18 Eduardo Ochs
  2024-10-23 19:14 ` Philip Kaludercic
  0 siblings, 1 reply; 3+ messages in thread
From: Eduardo Ochs @ 2024-10-20  5:18 UTC (permalink / raw)
  To: Emacs developers

Hi list,

I just finished the first version of a package called
"show-conses.el", that at first sight is a tool that receives sexps
and draws their cons-cell diagrams in a format that looks like this,

  (1 (2 "3") . 4)

  .__._______4
  |  |
  1  .__.
     |  |
     2  "3"

but with text properties: if we type `C-c C-c' on a node of the tree
it highlights the corresponding part of the sexp above.

At second sight show-conses.el is a library that uses an extensible
DSL to draw these diagrams with text properties; that library builds
tree diagrams by composing rectangles, and it should be easy to make
it produce other kinds of diagrams besides parse trees.

At third sight show-conses.el demonstrates several techniques for
documenting code using "tests in comments". I use those techniques a
lot in my other package - "eev" - and I would like to make them more
popular. I discussed some of these techniques - the ones related to
"test blocks" - in my presentation at the EmacsConf 2021; see
<http://anggtwu.net/eepitch.html#test-blocks>. These techniques are
somewhat controversial: apparently Kids These Days believe that all
tests should be unit tests, or at least automated tests - and some of
these Kids These Days reacted very angrily when I showed them my test
blocks. But more on that later.

At fourth sight show-conses.el is a very early prototype - everything
works, but many parts are undocumented and many names are bad and need
to be changed. But I made a page about it here,

  http://anggtwu.net/show-conses.html

and it has lots of links and screenshots, and it has instructions for
installing and trying it with a sexp - this one:

  (progn
    (package-initialize)
    (package-refresh-contents)
    (package-install 'eev)
    (package-vc-install "https://github.com/edrx/show-conses")
    (eev-beginner)
    (find-2a ' (find-eev-quick-intro "2. Evaluating Lisp")
             ' (find-show-conses-intro)
    )
  )

The explanations are at <http://anggtwu.net/show-conses.html>.

I would like to submit it to ELPA after lots of clean-ups.
Does it look like something that deserves to be put in ELPA?
Should I start to do these clean-ups following what I know about
the conventions for ELPA packages?

  Thanks in advance!
    Eduardo Ochs
    http://anggtwu.net/#eev
    http://anggtwu.net/eepitch.html



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: ELPA submission: show-conses.el
  2024-10-20  5:18 ELPA submission: show-conses.el Eduardo Ochs
@ 2024-10-23 19:14 ` Philip Kaludercic
  2024-10-24  2:18   ` Eduardo Ochs
  0 siblings, 1 reply; 3+ messages in thread
From: Philip Kaludercic @ 2024-10-23 19:14 UTC (permalink / raw)
  To: Eduardo Ochs; +Cc: Emacs developers

Eduardo Ochs <eduardoochs@gmail.com> writes:

> Hi list,
>
> I just finished the first version of a package called
> "show-conses.el", that at first sight is a tool that receives sexps
> and draws their cons-cell diagrams in a format that looks like this,
>
>   (1 (2 "3") . 4)
>
>   .__._______4
>   |  |
>   1  .__.
>      |  |
>      2  "3"
>

[...]

> I would like to submit it to ELPA after lots of clean-ups.
> Does it look like something that deserves to be put in ELPA?
> Should I start to do these clean-ups following what I know about
> the conventions for ELPA packages?

Sounds like a neat idea that can certainly be added to {GNU,NonGNU}
ELPA, my main wish is that it would be nice if the package could also
operate stand-alone without too many dependencies.

>   Thanks in advance!
>     Eduardo Ochs
>     http://anggtwu.net/#eev
>     http://anggtwu.net/eepitch.html
>
>

-- 
	Philip Kaludercic on icterid



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: ELPA submission: show-conses.el
  2024-10-23 19:14 ` Philip Kaludercic
@ 2024-10-24  2:18   ` Eduardo Ochs
  0 siblings, 0 replies; 3+ messages in thread
From: Eduardo Ochs @ 2024-10-24  2:18 UTC (permalink / raw)
  To: Philip Kaludercic; +Cc: Emacs developers

On Wed, 23 Oct 2024 at 16:14, Philip Kaludercic <philipk@posteo.net> wrote:
>
> Sounds like a neat idea that can certainly be added to {GNU,NonGNU}
> ELPA, my main wish is that it would be nice if the package could also
> operate stand-alone without too many dependencies.

Hi Pkal!

Great! Thanks!

The only dependency of show-conses.el is eev, and show-conses only
uses eev for some displaying and debugging functions... its core
doesn't depend on anything(*). For example, this sexp

  (show-conses-insert-lines (show-conses-lisp-and-constree '(* 2 3)))

inserts something like this in the current buffer,

  (* 2 3)

  .__.__.
  |  |  |
  *  2  3

with text properties in the nodes of the trees, and sets some markers.

(*): IIRC the "core functions" of show-conses.el call one function for
eev: `ee-intern', whose definition is:

  (defun ee-intern (fmt &rest args)
    "The result of (format FMT ARGS), converted to a symbol"
    (intern (apply 'format fmt args)))

but I still need to define precisely what is the "core"...

  Cheers,
    Eduardo Ochs
    http://anggtwu.net/#eev



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-10-24  2:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-20  5:18 ELPA submission: show-conses.el Eduardo Ochs
2024-10-23 19:14 ` Philip Kaludercic
2024-10-24  2:18   ` Eduardo Ochs

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.