unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Emacs object type hierarchy
@ 2023-10-22  8:44 Andrea Corallo
  2023-10-22  9:08 ` Gerd Möllmann
                   ` (3 more replies)
  0 siblings, 4 replies; 40+ messages in thread
From: Andrea Corallo @ 2023-10-22  8:44 UTC (permalink / raw)
  To: emacs-devel

Hello all,

for some develepment I need to have the type hierarchy definition,
something more detailed compared to what we have now in
`cl--typeof-types` (see bug#66615).  Because of that I've been trying to
reconstruct the type hierarchy of Emacs objects before coding it in.

So far this [1] is where I'm arrived at.

Do you spot any error? Any comment welcome.

Also I think we might want to document it with something similar in the
manual in the future WDYT?

Thanks

  Andrea

[1] <https://gitlab.com/koral/emacs-type-hierarchy/-/blob/master/h.dot.png?ref_type=heads>



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

* Re: Emacs object type hierarchy
  2023-10-22  8:44 Emacs object type hierarchy Andrea Corallo
@ 2023-10-22  9:08 ` Gerd Möllmann
  2023-10-22  9:37   ` Gerd Möllmann
  2023-10-22 16:11 ` [External] : " Drew Adams
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 40+ messages in thread
From: Gerd Möllmann @ 2023-10-22  9:08 UTC (permalink / raw)
  To: Andrea Corallo; +Cc: emacs-devel

Andrea Corallo <acorallo@gnu.org> writes:

> Do you spot any error? Any comment welcome.

Maybe

fixnum, bignum
keyword
structures/classes



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

* Re: Emacs object type hierarchy
  2023-10-22  9:08 ` Gerd Möllmann
@ 2023-10-22  9:37   ` Gerd Möllmann
  2023-10-23 15:08     ` Andrea Corallo
  0 siblings, 1 reply; 40+ messages in thread
From: Gerd Möllmann @ 2023-10-22  9:37 UTC (permalink / raw)
  To: Andrea Corallo; +Cc: emacs-devel

Gerd Möllmann <gerd.moellmann@gmail.com> writes:

> Andrea Corallo <acorallo@gnu.org> writes:
>
>> Do you spot any error? Any comment welcome.
>
> Maybe
>
> fixnum, bignum
> keyword
> structures/classes

Also, the nil vs. (), maybe



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

* RE: [External] : Emacs object type hierarchy
  2023-10-22  8:44 Emacs object type hierarchy Andrea Corallo
  2023-10-22  9:08 ` Gerd Möllmann
@ 2023-10-22 16:11 ` Drew Adams
  2023-10-24  0:57   ` Richard Stallman
  2023-10-22 22:08 ` Yuan Fu
  2023-10-23 15:20 ` Andrea Corallo
  3 siblings, 1 reply; 40+ messages in thread
From: Drew Adams @ 2023-10-22 16:11 UTC (permalink / raw)
  To: Andrea Corallo, emacs-devel@gnu.org

> for some develepment I need to have the type hierarchy definition,
> something more detailed compared to what we have now in
> `cl--typeof-types` (see bug#66615).

Yes, it would be good to have the Elisp type hierarchy
spelled out.  This is what the Common Lisp doc says
about its hierarchy, FWIW:

https://www.cs.cmu.edu/Groups/AI/html/cltl/clm/node42.html#DATATYPERELATIONSHIPS

> https://urldefense.com/v3/__https://gitlab.com/koral/emacs-type-
> hierarchy/-
> /blob/master/h.dot.png?ref_type=heads__;!!ACWV5N9M2RV99hQ!IhyCFNWIJ2189Wow
> Wz7DAoHYMb6p40qCg6pcM8XAew0Y4r2uH24Sks2loVgvbIO1NJL-Kd18GEMjQ9eQ$

Impressive; thanks.  Dunno how accurate it is, but
bravo for taking this step.




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

* Re: Emacs object type hierarchy
  2023-10-22  8:44 Emacs object type hierarchy Andrea Corallo
  2023-10-22  9:08 ` Gerd Möllmann
  2023-10-22 16:11 ` [External] : " Drew Adams
@ 2023-10-22 22:08 ` Yuan Fu
  2023-10-23 15:06   ` Andrea Corallo
  2023-10-23 15:20 ` Andrea Corallo
  3 siblings, 1 reply; 40+ messages in thread
From: Yuan Fu @ 2023-10-22 22:08 UTC (permalink / raw)
  To: Andrea Corallo; +Cc: emacs-devel



> On Oct 22, 2023, at 1:44 AM, Andrea Corallo <acorallo@gnu.org> wrote:
> 
> Hello all,
> 
> for some develepment I need to have the type hierarchy definition,
> something more detailed compared to what we have now in
> `cl--typeof-types` (see bug#66615).  Because of that I've been trying to
> reconstruct the type hierarchy of Emacs objects before coding it in.
> 
> So far this [1] is where I'm arrived at.
> 
> Do you spot any error? Any comment welcome.

I noticed that you included tree-sitter-parser in there. Then you probably also want tree-sitter-node and tree-sitter-compiled-query.

Yuan


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

* Re: Emacs object type hierarchy
  2023-10-22 22:08 ` Yuan Fu
@ 2023-10-23 15:06   ` Andrea Corallo
  2023-10-23 15:49     ` John Yates
  2023-10-24  3:37     ` Yuan Fu
  0 siblings, 2 replies; 40+ messages in thread
From: Andrea Corallo @ 2023-10-23 15:06 UTC (permalink / raw)
  To: Yuan Fu; +Cc: emacs-devel

Yuan Fu <casouri@gmail.com> writes:

>> On Oct 22, 2023, at 1:44 AM, Andrea Corallo <acorallo@gnu.org> wrote:
>> 
>> Hello all,
>> 
>> for some develepment I need to have the type hierarchy definition,
>> something more detailed compared to what we have now in
>> `cl--typeof-types` (see bug#66615).  Because of that I've been trying to
>> reconstruct the type hierarchy of Emacs objects before coding it in.
>> 
>> So far this [1] is where I'm arrived at.
>> 
>> Do you spot any error? Any comment welcome.
>
> I noticed that you included tree-sitter-parser in there. Then you probably also want tree-sitter-node and tree-sitter-compiled-query.
>
> Yuan

Hello Yuan,

I think they should be there already.  Maybe they ended up far from
'tree-sitter-parser' in the version you've seen, I've no control of the
order graphviz decide to layout the objects in the graph.

Thanks

  Andrea



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

* Re: Emacs object type hierarchy
  2023-10-22  9:37   ` Gerd Möllmann
@ 2023-10-23 15:08     ` Andrea Corallo
  2023-10-23 16:36       ` Gerd Möllmann
  0 siblings, 1 reply; 40+ messages in thread
From: Andrea Corallo @ 2023-10-23 15:08 UTC (permalink / raw)
  To: Gerd Möllmann; +Cc: emacs-devel

Gerd Möllmann <gerd.moellmann@gmail.com> writes:

> Gerd Möllmann <gerd.moellmann@gmail.com> writes:
>
>> Andrea Corallo <acorallo@gnu.org> writes:
>>
>>> Do you spot any error? Any comment welcome.
>>
>> Maybe
>>
>> fixnum, bignum
>> keyword
>> structures/classes
>
> Also, the nil vs. (), maybe

Hi Gerd,

Thanks I've added fixnum, bignum, keyword, struct and class.  I'm just
not sure how to integrate the nil vs. () in such representation.

BR

  Andrea



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

* Re: Emacs object type hierarchy
  2023-10-22  8:44 Emacs object type hierarchy Andrea Corallo
                   ` (2 preceding siblings ...)
  2023-10-22 22:08 ` Yuan Fu
@ 2023-10-23 15:20 ` Andrea Corallo
  2023-10-23 15:46   ` Eli Zaretskii
  3 siblings, 1 reply; 40+ messages in thread
From: Andrea Corallo @ 2023-10-23 15:20 UTC (permalink / raw)
  To: emacs-devel; +Cc: Eli Zaretskii, Stefan Kangas

Andrea Corallo <acorallo@gnu.org> writes:

> Hello all,
>
> for some develepment I need to have the type hierarchy definition,
> something more detailed compared to what we have now in
> `cl--typeof-types` (see bug#66615).  Because of that I've been trying to
> reconstruct the type hierarchy of Emacs objects before coding it in.
>
> So far this [1] is where I'm arrived at.
>
> Do you spot any error? Any comment welcome.
>
> Also I think we might want to document it with something similar in the
> manual in the future WDYT?
>
> Thanks
>
>   Andrea
>
> [1] <https://gitlab.com/koral/emacs-type-hierarchy/-/blob/master/h.dot.png?ref_type=heads>

Hello Eli & Stefan,

any comment on where would be more appropriate to document our type
hierarchy in the manual?  I'd like to give it a go on writing some
documentation 😮😬 (I'll probably need some support).

Thanks

  Andrea



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

* Re: Emacs object type hierarchy
  2023-10-23 15:20 ` Andrea Corallo
@ 2023-10-23 15:46   ` Eli Zaretskii
  2023-10-24  9:21     ` Andrea Corallo
  0 siblings, 1 reply; 40+ messages in thread
From: Eli Zaretskii @ 2023-10-23 15:46 UTC (permalink / raw)
  To: Andrea Corallo; +Cc: emacs-devel, stefankangas

> From: Andrea Corallo <acorallo@gnu.org>
> Cc: Eli Zaretskii <eliz@gnu.org>, Stefan Kangas <stefankangas@gmail.com>
> Date: Mon, 23 Oct 2023 11:20:51 -0400
> 
> any comment on where would be more appropriate to document our type
> hierarchy in the manual?

Somewhere under "Lisp Data Types", I guess?

> I'd like to give it a go on writing some documentation 😮😬 (I'll
> probably need some support).

Help in writing documentation is always available, don't worry about
that.



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

* Re: Emacs object type hierarchy
  2023-10-23 15:06   ` Andrea Corallo
@ 2023-10-23 15:49     ` John Yates
  2023-10-24  3:37     ` Yuan Fu
  1 sibling, 0 replies; 40+ messages in thread
From: John Yates @ 2023-10-23 15:49 UTC (permalink / raw)
  To: Andrea Corallo; +Cc: Yuan Fu, emacs-devel

On Mon, Oct 23, 2023 at 11:06 AM Andrea Corallo <acorallo@gnu.org> wrote:
>
> I've no control of the order graphviz decides to layout the objects in the graph.

Try adding non-constraining invisible edges to declare adjacency:

https://graphviz.gitlab.io/docs/attrs/constraint/
https://graphviz.gitlab.io/docs/attrs/style/

/john



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

* Re: Emacs object type hierarchy
  2023-10-23 15:08     ` Andrea Corallo
@ 2023-10-23 16:36       ` Gerd Möllmann
  2023-10-23 16:48         ` Gerd Möllmann
  2023-10-24  8:28         ` Andrea Corallo
  0 siblings, 2 replies; 40+ messages in thread
From: Gerd Möllmann @ 2023-10-23 16:36 UTC (permalink / raw)
  To: Andrea Corallo; +Cc: emacs-devel

Andrea Corallo <acorallo@gnu.org> writes:

> Hi Gerd,

Hi ANdrea.

>
> Thanks I've added fixnum, bignum, keyword, struct and class.  I'm just
> not sure how to integrate the nil vs. () in such representation.

Hm, yeah, maybe I was confused.  Was there already the lisp <- null, and
lisp <- cons edge, previously?  That's what I meant.  Would "null" also
be subtype of symbol?  (Asumming the arrows show subtype relations.)



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

* Re: Emacs object type hierarchy
  2023-10-23 16:36       ` Gerd Möllmann
@ 2023-10-23 16:48         ` Gerd Möllmann
  2023-10-24  8:28         ` Andrea Corallo
  1 sibling, 0 replies; 40+ messages in thread
From: Gerd Möllmann @ 2023-10-23 16:48 UTC (permalink / raw)
  To: Andrea Corallo; +Cc: emacs-devel

Gerd Möllmann <gerd.moellmann@gmail.com> writes:

> Andrea Corallo <acorallo@gnu.org> writes:
>
>> Hi Gerd,
>
> Hi ANdrea.
>
>>
>> Thanks I've added fixnum, bignum, keyword, struct and class.  I'm just
>> not sure how to integrate the nil vs. () in such representation.
>
> Hm, yeah, maybe I was confused.  Was there already the lisp <- null, and
> lisp <- cons edge, previously?  That's what I meant.  Would "null" also
> be subtype of symbol?  (Asumming the arrows show subtype relations.)

BTW, depending on what you want to do, maybe looking at SBCL is worth
it.  SBCL has done a lot of work on types, also for the benefit of the
compiler.

  https://github.com/sbcl/sbcl

See src/code/type.lisp, for example.  It's in the public domain.



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

* Re: [External] : Emacs object type hierarchy
  2023-10-22 16:11 ` [External] : " Drew Adams
@ 2023-10-24  0:57   ` Richard Stallman
  2023-10-24  2:03     ` Emanuel Berg
  2023-10-24  8:39     ` Andrea Corallo
  0 siblings, 2 replies; 40+ messages in thread
From: Richard Stallman @ 2023-10-24  0:57 UTC (permalink / raw)
  To: Drew Adams; +Cc: acorallo, emacs-devel

[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

  > Yes, it would be good to have the Elisp type hierarchy
  > spelled out.  This is what the Common Lisp doc says
  > about its hierarchy, FWIW:

Have we ever defined such a hierarchy for Emacs Lisp?
(I don't think so.)

If not, do we want to?  What would would that involve?

And would having such a defined hierarchy tend to lead us to think we
need to do other work -- work which, arguably, we don't really need to
do?


-- 
Dr Richard Stallman (https://stallman.org)
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)





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

* Re: [External] : Emacs object type hierarchy
  2023-10-24  0:57   ` Richard Stallman
@ 2023-10-24  2:03     ` Emanuel Berg
  2023-10-24  8:39     ` Andrea Corallo
  1 sibling, 0 replies; 40+ messages in thread
From: Emanuel Berg @ 2023-10-24  2:03 UTC (permalink / raw)
  To: emacs-devel

Richard Stallman wrote:

>> Yes, it would be good to have the Elisp type hierarchy
>> spelled out. This is what the Common Lisp doc says about
>> its hierarchy, FWIW:
>
> Have we ever defined such a hierarchy for Emacs Lisp? (I
> don't think so.)
>
> If not, do we want to? What would would that involve?

Computer Science type theory put into practice for our
favorite language? So very exciting :)

> And would having such a defined hierarchy tend to lead us to
> think we need to do other work -- work which, arguably, we
> don't really need to do?

I bet it has to do with the "inferred type" stuff we have with
native compilation? And possibly applications of that?

Trust me, this guy is our star, the more we have him on the
ice, the better for all of us :) \o/

-- 
underground experts united
https://dataswamp.org/~incal




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

* Re: Emacs object type hierarchy
  2023-10-23 15:06   ` Andrea Corallo
  2023-10-23 15:49     ` John Yates
@ 2023-10-24  3:37     ` Yuan Fu
  1 sibling, 0 replies; 40+ messages in thread
From: Yuan Fu @ 2023-10-24  3:37 UTC (permalink / raw)
  To: Andrea Corallo; +Cc: emacs-devel



> On Oct 23, 2023, at 8:06 AM, Andrea Corallo <acorallo@gnu.org> wrote:
> 
> Yuan Fu <casouri@gmail.com> writes:
> 
>>> On Oct 22, 2023, at 1:44 AM, Andrea Corallo <acorallo@gnu.org> wrote:
>>> 
>>> Hello all,
>>> 
>>> for some develepment I need to have the type hierarchy definition,
>>> something more detailed compared to what we have now in
>>> `cl--typeof-types` (see bug#66615).  Because of that I've been trying to
>>> reconstruct the type hierarchy of Emacs objects before coding it in.
>>> 
>>> So far this [1] is where I'm arrived at.
>>> 
>>> Do you spot any error? Any comment welcome.
>> 
>> I noticed that you included tree-sitter-parser in there. Then you probably also want tree-sitter-node and tree-sitter-compiled-query.
>> 
>> Yuan
> 
> Hello Yuan,
> 
> I think they should be there already.  Maybe they ended up far from
> 'tree-sitter-parser' in the version you've seen, I've no control of the
> order graphviz decide to layout the objects in the graph.

Ah, great. The image might be somehow cropped when I first viewed it so I didn’t see the bottom bits.

Yuan


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

* Re: Emacs object type hierarchy
  2023-10-23 16:36       ` Gerd Möllmann
  2023-10-23 16:48         ` Gerd Möllmann
@ 2023-10-24  8:28         ` Andrea Corallo
  1 sibling, 0 replies; 40+ messages in thread
From: Andrea Corallo @ 2023-10-24  8:28 UTC (permalink / raw)
  To: Gerd Möllmann; +Cc: emacs-devel

Gerd Möllmann <gerd.moellmann@gmail.com> writes:

> Andrea Corallo <acorallo@gnu.org> writes:
>
>> Hi Gerd,
>
> Hi ANdrea.
>
>>
>> Thanks I've added fixnum, bignum, keyword, struct and class.  I'm just
>> not sure how to integrate the nil vs. () in such representation.
>
> Hm, yeah, maybe I was confused.  Was there already the lisp <- null, and
> lisp <- cons edge, previously?

Yes I think so.

> That's what I meant.  Would "null" also
> be subtype of symbol?  (Asumming the arrows show subtype relations.)

It is cause boolean is a subtype of symbolt itself.

Thanks

  Andrea



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

* Re: [External] : Emacs object type hierarchy
  2023-10-24  0:57   ` Richard Stallman
  2023-10-24  2:03     ` Emanuel Berg
@ 2023-10-24  8:39     ` Andrea Corallo
  2023-10-24  9:32       ` Emanuel Berg
  1 sibling, 1 reply; 40+ messages in thread
From: Andrea Corallo @ 2023-10-24  8:39 UTC (permalink / raw)
  To: Richard Stallman; +Cc: Drew Adams, emacs-devel

Hello Richard,

Richard Stallman <rms@gnu.org> writes:

> [[[ To any NSA and FBI agents reading my email: please consider    ]]]
> [[[ whether defending the US Constitution against all enemies,     ]]]
> [[[ foreign or domestic, requires you to follow Snowden's example. ]]]
>
>   > Yes, it would be good to have the Elisp type hierarchy
>   > spelled out.  This is what the Common Lisp doc says
>   > about its hierarchy, FWIW:
>
> Have we ever defined such a hierarchy for Emacs Lisp?
> (I don't think so.)

I'm not the best one to answer this but I think as well was never
explicitly defined, OTOH traces of it are in many places of our
codebase.

> If not, do we want to?

I think so, documenting it would be good.

> What would would that involve?

Essentially just making it explicit in our documentation.

> And would having such a defined hierarchy tend to lead us to think we
> need to do other work -- work which, arguably, we don't really need to
> do?

I don't think so, OTOH new code could make use of it easily and reliably
instead of having to reverse engineer the current implementation.

Best Regards

  Andrea



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

* Re: Emacs object type hierarchy
  2023-10-23 15:46   ` Eli Zaretskii
@ 2023-10-24  9:21     ` Andrea Corallo
  2023-10-24 11:55       ` Eli Zaretskii
  0 siblings, 1 reply; 40+ messages in thread
From: Andrea Corallo @ 2023-10-24  9:21 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel, stefankangas

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Andrea Corallo <acorallo@gnu.org>
>> Cc: Eli Zaretskii <eliz@gnu.org>, Stefan Kangas <stefankangas@gmail.com>
>> Date: Mon, 23 Oct 2023 11:20:51 -0400
>> 
>> any comment on where would be more appropriate to document our type
>> hierarchy in the manual?
>
> Somewhere under "Lisp Data Types", I guess?
>
>> I'd like to give it a go on writing some documentation 😮😬 (I'll
>> probably need some support).
>
> Help in writing documentation is always available, don't worry about
> that.

Thanks 🙏, dumb question: do we have a way to include images into the
manual?

Alternatively WDYT is the best way to include a graph similar to the one
linked in my original message?  I tried a couple of ways in order to
render it to ascii but I'm not satisfied with the result so far.

Bests

  Andrea



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

* Re: [External] : Emacs object type hierarchy
  2023-10-24  8:39     ` Andrea Corallo
@ 2023-10-24  9:32       ` Emanuel Berg
  0 siblings, 0 replies; 40+ messages in thread
From: Emanuel Berg @ 2023-10-24  9:32 UTC (permalink / raw)
  To: emacs-devel

Andrea Corallo wrote:

> I don't think so, OTOH new code could make use of it easily
> and reliably instead of having to reverse engineer the
> current implementation.

One thing I think of immediately is if one could automatically
verify the type system by the way it is constructed and the
types' associated checkers, which would be the the predicate
functions, e.g. `listp', `stringp' and so on, and see if they
can all traverse their parts of the data structure
without fail.

And if it fails to verify it would be interesting to examine
where the problem appeared, and what was to blame, the
definition/relations or the typechecks ...

-- 
underground experts united
https://dataswamp.org/~incal




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

* Re: Emacs object type hierarchy
  2023-10-24  9:21     ` Andrea Corallo
@ 2023-10-24 11:55       ` Eli Zaretskii
  2023-10-24 12:02         ` Andrea Corallo
  0 siblings, 1 reply; 40+ messages in thread
From: Eli Zaretskii @ 2023-10-24 11:55 UTC (permalink / raw)
  To: Andrea Corallo; +Cc: emacs-devel, stefankangas

> From: Andrea Corallo <acorallo@gnu.org>
> Cc: emacs-devel@gnu.org,  stefankangas@gmail.com
> Date: Tue, 24 Oct 2023 05:21:26 -0400
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> >> From: Andrea Corallo <acorallo@gnu.org>
> >> Cc: Eli Zaretskii <eliz@gnu.org>, Stefan Kangas <stefankangas@gmail.com>
> >> Date: Mon, 23 Oct 2023 11:20:51 -0400
> >> 
> >> any comment on where would be more appropriate to document our type
> >> hierarchy in the manual?
> >
> > Somewhere under "Lisp Data Types", I guess?
> >
> >> I'd like to give it a go on writing some documentation 😮😬 (I'll
> >> probably need some support).
> >
> > Help in writing documentation is always available, don't worry about
> > that.
> 
> Thanks 🙏, dumb question: do we have a way to include images into the
> manual?

Texinfo supports inline images, yes.  You can read about that in the
Texinfo manual.

> Alternatively WDYT is the best way to include a graph similar to the one
> linked in my original message?  I tried a couple of ways in order to
> render it to ascii but I'm not satisfied with the result so far.

ASCII art will be needed anyway, as it is the fallback for non-GUI
terminals.  But you can include images for those terminals that
support it.  See, for example, the Gawk manual, in the "Extension
Mechanism Outline" node.



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

* Re: Emacs object type hierarchy
  2023-10-24 11:55       ` Eli Zaretskii
@ 2023-10-24 12:02         ` Andrea Corallo
  2023-10-24 12:53           ` Emanuel Berg
  2024-02-15 17:28           ` Andrea Corallo
  0 siblings, 2 replies; 40+ messages in thread
From: Andrea Corallo @ 2023-10-24 12:02 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel, stefankangas

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Andrea Corallo <acorallo@gnu.org>
>> Cc: emacs-devel@gnu.org,  stefankangas@gmail.com
>> Date: Tue, 24 Oct 2023 05:21:26 -0400
>> 
>> Eli Zaretskii <eliz@gnu.org> writes:
>> 
>> >> From: Andrea Corallo <acorallo@gnu.org>
>> >> Cc: Eli Zaretskii <eliz@gnu.org>, Stefan Kangas <stefankangas@gmail.com>
>> >> Date: Mon, 23 Oct 2023 11:20:51 -0400
>> >> 
>> >> any comment on where would be more appropriate to document our type
>> >> hierarchy in the manual?
>> >
>> > Somewhere under "Lisp Data Types", I guess?
>> >
>> >> I'd like to give it a go on writing some documentation 😮😬 (I'll
>> >> probably need some support).
>> >
>> > Help in writing documentation is always available, don't worry about
>> > that.
>> 
>> Thanks 🙏, dumb question: do we have a way to include images into the
>> manual?
>
> Texinfo supports inline images, yes.  You can read about that in the
> Texinfo manual.
>
>> Alternatively WDYT is the best way to include a graph similar to the one
>> linked in my original message?  I tried a couple of ways in order to
>> render it to ascii but I'm not satisfied with the result so far.
>
> ASCII art will be needed anyway, as it is the fallback for non-GUI
> terminals.  But you can include images for those terminals that
> support it.  See, for example, the Gawk manual, in the "Extension
> Mechanism Outline" node.

Wonderful thanks for the info

  Andrea



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

* Re: Emacs object type hierarchy
  2023-10-24 12:02         ` Andrea Corallo
@ 2023-10-24 12:53           ` Emanuel Berg
  2024-02-15 17:28           ` Andrea Corallo
  1 sibling, 0 replies; 40+ messages in thread
From: Emanuel Berg @ 2023-10-24 12:53 UTC (permalink / raw)
  To: emacs-devel

Andrea Corallo wrote:

>>> Alternatively WDYT is the best way to include a graph
>>> similar to the one linked in my original message? I tried
>>> a couple of ways in order to render it to ascii but I'm
>>> not satisfied with the result so far.
>>
>> ASCII art will be needed anyway, as it is the fallback for
>> non-GUI terminals. But you can include images for those
>> terminals that support it. See, for example, the Gawk
>> manual, in the "Extension Mechanism Outline" node.
>
> Wonderful thanks for the info

What happens if you add to or change that list of type
relations, are you going to manually redraw the ASCII art
as well to keep in synch?

Maybe there is some package that can draw it for you, and
then again upon change?

Of all the ASCII art one can draw, this should be a very
simple box diagram? Org mode?

<+sth>     \        \               .         .-                .
<+sth> .    |   \    |
<+sth>  \__  \   |   |  /             .                 .           +
<+sth>     \ |  /   /   |
<+sth> ___  \| |   |    /   __--'                             .
<+sth>    '-_\ \    \  |   :__                  The
<+sth> ''-__       /   _-'``  '-             Swamplands
<+sth> ____ \  \   |  /___,---''`
<+sth> ___ \ \  |  |   __:_.-'''`-
<+sth>    : \|  |  |  /    ``-.
<+sth>     \    |  | |
<+sth>      \   \  \ |      /   \         /  \     /
<+sth>  .    |   |  ||    \ | / | /     \ |/  \ / /         \   \   .  .
<+sth>       |   |  ||   \ ||/ ||/ /     |\| ||/ /|          \ | \ / \ |/
<+sth> ____ /  / |  || __ \|/ \|/|/ ___  | \/ ||/ \     ____  \| |/| /||
<+sth>      | |  |  | \    \|/ __                              \ / |/ ||/
<+sth> ___  | | /   \ |               ____        _______     ___     |/
<+sth>      | | | |  ||  __  _______                   __     ______
<+sth> _   _/ | | |  ||                  ___   _____       _____      ___
<+sth>    /  / /   \ | \   ________                   ___

-- 
underground experts united
https://dataswamp.org/~incal




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

* Re: Emacs object type hierarchy
  2023-10-24 12:02         ` Andrea Corallo
  2023-10-24 12:53           ` Emanuel Berg
@ 2024-02-15 17:28           ` Andrea Corallo
  2024-02-15 17:40             ` Andrea Corallo
  2024-02-16 20:31             ` Basil L. Contovounesios
  1 sibling, 2 replies; 40+ messages in thread
From: Andrea Corallo @ 2024-02-15 17:28 UTC (permalink / raw)
  To: emacs-devel; +Cc: Eli Zaretskii, stefankangas

Hello all,

back on this subject.

I've pushed on feature/type-hierarchy a branch that does the following
things:

- Define the type hierarchy for builtin types with `cl--type-hierarchy'
  and generates automatically `cl--typeof-types' from it.  The format of
  `cl--type-hierarchy' is I believe more compact and less error prone.

- Generates automatically a graphical and textual representation of the
  type hierarchy using etc/syncdoc-type-hierarchy.el. (This relies on
  graphviz and graph-easy which AFAIU are both Free Software)

- Add an initial "Type Hierarchy" under "Lisp Data Types" in the elisp
  manual.

- Include the generated representation of the type hierarchy in it.

Here [1] the current image it renders of the hierarchy.

There are still edges that needs to be rounded but I wanted to share it
in order to collect some feedback.

Thanks!

  Andrea

[1] <https://git.savannah.gnu.org/cgit/emacs.git/plain/doc/lispref/type_hierarchy.jpg?h=feature/type-hierarchy>



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

* Re: Emacs object type hierarchy
  2024-02-15 17:28           ` Andrea Corallo
@ 2024-02-15 17:40             ` Andrea Corallo
  2024-02-17  9:04               ` Emanuel Berg
  2024-02-17  9:19               ` Eli Zaretskii
  2024-02-16 20:31             ` Basil L. Contovounesios
  1 sibling, 2 replies; 40+ messages in thread
From: Andrea Corallo @ 2024-02-15 17:40 UTC (permalink / raw)
  To: emacs-devel; +Cc: Eli Zaretskii, stefankangas

Andrea Corallo <acorallo@gnu.org> writes:

> Hello all,
>
> back on this subject.
>
> I've pushed on feature/type-hierarchy a branch that does the following
> things:
>
> - Define the type hierarchy for builtin types with `cl--type-hierarchy'
>   and generates automatically `cl--typeof-types' from it.  The format of
>   `cl--type-hierarchy' is I believe more compact and less error prone.
>
> - Generates automatically a graphical and textual representation of the
>   type hierarchy using etc/syncdoc-type-hierarchy.el. (This relies on
>   graphviz and graph-easy which AFAIU are both Free Software)
>
> - Add an initial "Type Hierarchy" under "Lisp Data Types" in the elisp
>   manual.
>
> - Include the generated representation of the type hierarchy in it.
>
> Here [1] the current image it renders of the hierarchy.
>
> There are still edges that needs to be rounded but I wanted to share it
> in order to collect some feedback.
>
> Thanks!
>
>   Andrea
>
> [1] <https://git.savannah.gnu.org/cgit/emacs.git/plain/doc/lispref/type_hierarchy.jpg?h=feature/type-hierarchy>


One thing I forgot to mention I'm not very satisfied of.

Unfortunatelly the textual represantation in ascii art does not render
very well on a regular terminal size unless trucate-lines is null.
Maybe a simple table would be just a better option for text?  Of the
tools I tried graph-easy is IME the one I managed to produced the best
output already.

Thanks

  Andrea



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

* Re: Emacs object type hierarchy
  2024-02-15 17:28           ` Andrea Corallo
  2024-02-15 17:40             ` Andrea Corallo
@ 2024-02-16 20:31             ` Basil L. Contovounesios
  2024-02-18 19:14               ` Andrea Corallo
  1 sibling, 1 reply; 40+ messages in thread
From: Basil L. Contovounesios @ 2024-02-16 20:31 UTC (permalink / raw)
  To: Andrea Corallo; +Cc: emacs-devel, Eli Zaretskii, stefankangas

[-- Attachment #1: Type: text/plain, Size: 292 bytes --]

Andrea Corallo [2024-02-15 12:28 -0500] wrote:

> I've pushed on feature/type-hierarchy a branch

Thanks!  Just a quick note from me for now:

> [1] <https://git.savannah.gnu.org/cgit/emacs.git/plain/doc/lispref/type_hierarchy.jpg?h=feature/type-hierarchy>

Looks like there's a small typo:


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: fixum.diff --]
[-- Type: text/x-diff, Size: 1317 bytes --]

diff --git a/doc/lispref/type_hierarchy.txt b/doc/lispref/type_hierarchy.txt
index c6e762b04a8..2ffee0b6a85 100644
--- a/doc/lispref/type_hierarchy.txt
+++ b/doc/lispref/type_hierarchy.txt
@@ -5,7 +5,7 @@
                            |
                            v
      +-------------+     +--------------------+     +----------------------+     +--------+
-     |    fixum    | --> |      integer       | --> |  integer-or-marker   | <-- | marker |
+     |   fixnum    | --> |      integer       | --> |  integer-or-marker   | <-- | marker |
      +-------------+     +--------------------+     +----------------------+     +--------+
                            |                          |                            |
                            |                          |                            |
diff --git a/lisp/emacs-lisp/cl-preloaded.el b/lisp/emacs-lisp/cl-preloaded.el
index 323d826f323..0b30e10b344 100644
--- a/lisp/emacs-lisp/cl-preloaded.el
+++ b/lisp/emacs-lisp/cl-preloaded.el
@@ -65,7 +65,7 @@ cl--type-hierarchy
      number-or-marker symbol array)
     (number float integer)
     (number-or-marker marker number)
-    (integer bignum fixum)
+    (integer bignum fixnum)
     (symbol keyword boolean symbol-with-pos)
     (array vector bool-vector char-table string)
     (list null cons)

[-- Attachment #3: Type: text/plain, Size: 11 bytes --]


-- 
Basil

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

* Re: Emacs object type hierarchy
  2024-02-15 17:40             ` Andrea Corallo
@ 2024-02-17  9:04               ` Emanuel Berg
  2024-02-18 19:25                 ` Andrea Corallo
  2024-02-17  9:19               ` Eli Zaretskii
  1 sibling, 1 reply; 40+ messages in thread
From: Emanuel Berg @ 2024-02-17  9:04 UTC (permalink / raw)
  To: emacs-devel

Andrea Corallo wrote:

> Unfortunatelly the textual represantation in ascii art does
> not render very well on a regular terminal size unless
> trucate-lines is null. Maybe a simple table would be just
> a better option for text? Of the tools I tried graph-easy is
> IME the one I managed to produced the best output already.

Interesting work!

Well, can you please yank it here for us to take a look at
with and without `truncate-lines' as nil.

Or if you would upload the pics somewhere for all to see.
That would be interesting!

How was the type hierarchy established and are there Elisp
functions to do that, with checkers for example to see if
something is a subtype of something else?

-- 
underground experts united
https://dataswamp.org/~incal




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

* Re: Emacs object type hierarchy
  2024-02-15 17:40             ` Andrea Corallo
  2024-02-17  9:04               ` Emanuel Berg
@ 2024-02-17  9:19               ` Eli Zaretskii
  2024-02-17  9:38                 ` Emanuel Berg
                                   ` (2 more replies)
  1 sibling, 3 replies; 40+ messages in thread
From: Eli Zaretskii @ 2024-02-17  9:19 UTC (permalink / raw)
  To: Andrea Corallo; +Cc: emacs-devel, stefankangas

> From: Andrea Corallo <acorallo@gnu.org>
> Cc: Eli Zaretskii <eliz@gnu.org>,  stefankangas@gmail.com
> Date: Thu, 15 Feb 2024 12:40:56 -0500
> 
> Andrea Corallo <acorallo@gnu.org> writes:
> 
> > [1] <https://git.savannah.gnu.org/cgit/emacs.git/plain/doc/lispref/type_hierarchy.jpg?h=feature/type-hierarchy>
> 
> 
> One thing I forgot to mention I'm not very satisfied of.
> 
> Unfortunatelly the textual represantation in ascii art does not render
> very well on a regular terminal size unless trucate-lines is null.

Null or non-nil?  And why is it a problem to force some special value
of truncate-lines?

> Maybe a simple table would be just a better option for text?

Could be, but how do you show a DAG in a table?



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

* Re: Emacs object type hierarchy
  2024-02-17  9:19               ` Eli Zaretskii
@ 2024-02-17  9:38                 ` Emanuel Berg
  2024-02-17  9:41                 ` Emanuel Berg
  2024-02-18 19:23                 ` Andrea Corallo
  2 siblings, 0 replies; 40+ messages in thread
From: Emanuel Berg @ 2024-02-17  9:38 UTC (permalink / raw)
  To: emacs-devel

Eli Zaretskii wrote:

>> Unfortunatelly the textual represantation in ascii art does
>> not render very well on a regular terminal size unless
>> trucate-lines is null.
>
> Null or non-nil? And why is it a problem to force some
> special value of truncate-lines?

My guess is, either it gets truncated so don't really tell
anything, or it overflows like crazy so you still don't see
much :)

-- 
underground experts united
https://dataswamp.org/~incal




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

* Re: Emacs object type hierarchy
  2024-02-17  9:19               ` Eli Zaretskii
  2024-02-17  9:38                 ` Emanuel Berg
@ 2024-02-17  9:41                 ` Emanuel Berg
  2024-02-18 19:23                 ` Andrea Corallo
  2 siblings, 0 replies; 40+ messages in thread
From: Emanuel Berg @ 2024-02-17  9:41 UTC (permalink / raw)
  To: emacs-devel

Eli Zaretskii wrote:

>> Maybe a simple table would be just a better option
>> for text?
>
> Could be, but how do you show a DAG in a table?

Directed Acyclic Graph meaning a bunch of boxes with arrows
between them, those arrows are always unidirectional and you
can never return to where you have been following them.

-- 
underground experts united
https://dataswamp.org/~incal




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

* Re: Emacs object type hierarchy
  2024-02-16 20:31             ` Basil L. Contovounesios
@ 2024-02-18 19:14               ` Andrea Corallo
  0 siblings, 0 replies; 40+ messages in thread
From: Andrea Corallo @ 2024-02-18 19:14 UTC (permalink / raw)
  To: Basil L. Contovounesios; +Cc: emacs-devel, Eli Zaretskii, stefankangas

"Basil L. Contovounesios" <basil@contovou.net> writes:

> Andrea Corallo [2024-02-15 12:28 -0500] wrote:
>
>> I've pushed on feature/type-hierarchy a branch
>
> Thanks!  Just a quick note from me for now:
>
>> [1] <https://git.savannah.gnu.org/cgit/emacs.git/plain/doc/lispref/type_hierarchy.jpg?h=feature/type-hierarchy>
>
> Looks like there's a small typo:

Hi Basil,

thanks for having spotted this, should be fixed now.

Ciao!

  Andrea



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

* Re: Emacs object type hierarchy
  2024-02-17  9:19               ` Eli Zaretskii
  2024-02-17  9:38                 ` Emanuel Berg
  2024-02-17  9:41                 ` Emanuel Berg
@ 2024-02-18 19:23                 ` Andrea Corallo
  2024-02-18 19:33                   ` Eli Zaretskii
  2 siblings, 1 reply; 40+ messages in thread
From: Andrea Corallo @ 2024-02-18 19:23 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel, stefankangas

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Andrea Corallo <acorallo@gnu.org>
>> Cc: Eli Zaretskii <eliz@gnu.org>,  stefankangas@gmail.com
>> Date: Thu, 15 Feb 2024 12:40:56 -0500
>> 
>> Andrea Corallo <acorallo@gnu.org> writes:
>> 
>> > [1] <https://git.savannah.gnu.org/cgit/emacs.git/plain/doc/lispref/type_hierarchy.jpg?h=feature/type-hierarchy>
>> 
>> 
>> One thing I forgot to mention I'm not very satisfied of.
>> 
>> Unfortunatelly the textual represantation in ascii art does not render
>> very well on a regular terminal size unless trucate-lines is null.
>
> Null or non-nil?

Hi Eli,

Ops sorry non-nil. It does not render well when lines are not truncated.

> And why is it a problem to force some special value
> of truncate-lines?

I don't know if would be acceptable to force trucate-lines non-nil by
default for objects.texi.

>> Maybe a simple table would be just a better option for text?
>
> Could be, but how do you show a DAG in a table?

I think is not possible to show the DAG in a table but we could describe
it with a table like:

| type    | derived types                   |
|---------+---------------------------------|
| integer | bignum fixnum                   |
| symbol  | keyword boolean symbol-with-pos |
...

Maybe is more readable? I'm not sure ATM what's the best option.

Bests

  Andrea




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

* Re: Emacs object type hierarchy
  2024-02-17  9:04               ` Emanuel Berg
@ 2024-02-18 19:25                 ` Andrea Corallo
  0 siblings, 0 replies; 40+ messages in thread
From: Andrea Corallo @ 2024-02-18 19:25 UTC (permalink / raw)
  To: emacs-devel

Emanuel Berg <incal@dataswamp.org> writes:

> Andrea Corallo wrote:
>
>> Unfortunatelly the textual represantation in ascii art does
>> not render very well on a regular terminal size unless
>> trucate-lines is null. Maybe a simple table would be just
>> a better option for text? Of the tools I tried graph-easy is
>> IME the one I managed to produced the best output already.
>
> Interesting work!
>
> Well, can you please yank it here for us to take a look at
> with and without `truncate-lines' as nil.

https://git.savannah.gnu.org/cgit/emacs.git/plain/doc/lispref/type_hierarchy.txt?h=feature/type-hierarchy
https://git.savannah.gnu.org/cgit/emacs.git/plain/doc/lispref/type_hierarchy.jpg?h=feature/type-hierarchy

  Andrea



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

* Re: Emacs object type hierarchy
  2024-02-18 19:23                 ` Andrea Corallo
@ 2024-02-18 19:33                   ` Eli Zaretskii
  2024-02-18 19:37                     ` Eli Zaretskii
  2024-02-19  7:52                     ` Andrea Corallo
  0 siblings, 2 replies; 40+ messages in thread
From: Eli Zaretskii @ 2024-02-18 19:33 UTC (permalink / raw)
  To: Andrea Corallo; +Cc: emacs-devel, stefankangas

> From: Andrea Corallo <acorallo@gnu.org>
> Cc: emacs-devel@gnu.org,  stefankangas@gmail.com
> Date: Sun, 18 Feb 2024 14:23:14 -0500
> 
> >> Maybe a simple table would be just a better option for text?
> >
> > Could be, but how do you show a DAG in a table?
> 
> I think is not possible to show the DAG in a table but we could describe
> it with a table like:
> 
> | type    | derived types                   |
> |---------+---------------------------------|
> | integer | bignum fixnum                   |
> | symbol  | keyword boolean symbol-with-pos |
> ...
> 
> Maybe is more readable? I'm not sure ATM what's the best option.

I think such a table should be fin on TTY frames.  You can use the
Texinfo @image machinery, which allows text replacements for when
images cannot be displayed.



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

* Re: Emacs object type hierarchy
  2024-02-18 19:33                   ` Eli Zaretskii
@ 2024-02-18 19:37                     ` Eli Zaretskii
  2024-02-19  7:52                     ` Andrea Corallo
  1 sibling, 0 replies; 40+ messages in thread
From: Eli Zaretskii @ 2024-02-18 19:37 UTC (permalink / raw)
  To: acorallo; +Cc: emacs-devel, stefankangas

> Date: Sun, 18 Feb 2024 21:33:43 +0200
> From: Eli Zaretskii <eliz@gnu.org>
> Cc: emacs-devel@gnu.org, stefankangas@gmail.com
> 
> I think such a table should be fin on TTY frames.  You can use the
                                 ^^^
I meant "fine", of course.  Sorry.



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

* Re: Emacs object type hierarchy
  2024-02-18 19:33                   ` Eli Zaretskii
  2024-02-18 19:37                     ` Eli Zaretskii
@ 2024-02-19  7:52                     ` Andrea Corallo
  2024-02-19 16:51                       ` Andrea Corallo
  1 sibling, 1 reply; 40+ messages in thread
From: Andrea Corallo @ 2024-02-19  7:52 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel, stefankangas

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Andrea Corallo <acorallo@gnu.org>
>> Cc: emacs-devel@gnu.org,  stefankangas@gmail.com
>> Date: Sun, 18 Feb 2024 14:23:14 -0500
>> 
>> >> Maybe a simple table would be just a better option for text?
>> >
>> > Could be, but how do you show a DAG in a table?
>> 
>> I think is not possible to show the DAG in a table but we could describe
>> it with a table like:
>> 
>> | type    | derived types                   |
>> |---------+---------------------------------|
>> | integer | bignum fixnum                   |
>> | symbol  | keyword boolean symbol-with-pos |
>> ...
>> 
>> Maybe is more readable? I'm not sure ATM what's the best option.
>
> I think such a table should be fin on TTY frames.  You can use the
> Texinfo @image machinery, which allows text replacements for when
> images cannot be displayed.

Agreed, the table is probably the best option we have.  Okay I'll work
in this direction.

Thanks

  Andrea



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

* Re: Emacs object type hierarchy
  2024-02-19  7:52                     ` Andrea Corallo
@ 2024-02-19 16:51                       ` Andrea Corallo
  2024-02-26 17:50                         ` Andrea Corallo
  0 siblings, 1 reply; 40+ messages in thread
From: Andrea Corallo @ 2024-02-19 16:51 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel, stefankangas

Andrea Corallo <acorallo@gnu.org> writes:

> Eli Zaretskii <eliz@gnu.org> writes:
>
>>> From: Andrea Corallo <acorallo@gnu.org>
>>> Cc: emacs-devel@gnu.org,  stefankangas@gmail.com
>>> Date: Sun, 18 Feb 2024 14:23:14 -0500
>>> 
>>> >> Maybe a simple table would be just a better option for text?
>>> >
>>> > Could be, but how do you show a DAG in a table?
>>> 
>>> I think is not possible to show the DAG in a table but we could describe
>>> it with a table like:
>>> 
>>> | type    | derived types                   |
>>> |---------+---------------------------------|
>>> | integer | bignum fixnum                   |
>>> | symbol  | keyword boolean symbol-with-pos |
>>> ...
>>> 
>>> Maybe is more readable? I'm not sure ATM what's the best option.
>>
>> I think such a table should be fin on TTY frames.  You can use the
>> Texinfo @image machinery, which allows text replacements for when
>> images cannot be displayed.
>
> Agreed, the table is probably the best option we have.  Okay I'll work
> in this direction.

All right, I've implemented the generation of the table and replaced the
ascii art representation.  It looks fine now in the info page on my TTY
frame.

Thanks

  Andrea



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

* Re: Emacs object type hierarchy
  2024-02-19 16:51                       ` Andrea Corallo
@ 2024-02-26 17:50                         ` Andrea Corallo
  2024-03-01  8:36                           ` Andrea Corallo
  0 siblings, 1 reply; 40+ messages in thread
From: Andrea Corallo @ 2024-02-26 17:50 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel, stefankangas

Andrea Corallo <acorallo@gnu.org> writes:

> Andrea Corallo <acorallo@gnu.org> writes:
>
>> Eli Zaretskii <eliz@gnu.org> writes:
>>
>>>> From: Andrea Corallo <acorallo@gnu.org>
>>>> Cc: emacs-devel@gnu.org,  stefankangas@gmail.com
>>>> Date: Sun, 18 Feb 2024 14:23:14 -0500
>>>> 
>>>> >> Maybe a simple table would be just a better option for text?
>>>> >
>>>> > Could be, but how do you show a DAG in a table?
>>>> 
>>>> I think is not possible to show the DAG in a table but we could describe
>>>> it with a table like:
>>>> 
>>>> | type    | derived types                   |
>>>> |---------+---------------------------------|
>>>> | integer | bignum fixnum                   |
>>>> | symbol  | keyword boolean symbol-with-pos |
>>>> ...
>>>> 
>>>> Maybe is more readable? I'm not sure ATM what's the best option.
>>>
>>> I think such a table should be fin on TTY frames.  You can use the
>>> Texinfo @image machinery, which allows text replacements for when
>>> images cannot be displayed.
>>
>> Agreed, the table is probably the best option we have.  Okay I'll work
>> in this direction.
>
> All right, I've implemented the generation of the table and replaced the
> ascii art representation.  It looks fine now in the info page on my TTY
> frame.

Hi all,

any check/improvement we want still do on this? Or shall we merge it?

Thanks

  Andrea



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

* Re: Emacs object type hierarchy
  2024-02-26 17:50                         ` Andrea Corallo
@ 2024-03-01  8:36                           ` Andrea Corallo
  2024-03-01  8:56                             ` Eli Zaretskii
  0 siblings, 1 reply; 40+ messages in thread
From: Andrea Corallo @ 2024-03-01  8:36 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel, stefankangas

Andrea Corallo <acorallo@gnu.org> writes:

> Andrea Corallo <acorallo@gnu.org> writes:
>
>> Andrea Corallo <acorallo@gnu.org> writes:
>>
>>> Eli Zaretskii <eliz@gnu.org> writes:
>>>
>>>>> From: Andrea Corallo <acorallo@gnu.org>
>>>>> Cc: emacs-devel@gnu.org,  stefankangas@gmail.com
>>>>> Date: Sun, 18 Feb 2024 14:23:14 -0500
>>>>> 
>>>>> >> Maybe a simple table would be just a better option for text?
>>>>> >
>>>>> > Could be, but how do you show a DAG in a table?
>>>>> 
>>>>> I think is not possible to show the DAG in a table but we could describe
>>>>> it with a table like:
>>>>> 
>>>>> | type    | derived types                   |
>>>>> |---------+---------------------------------|
>>>>> | integer | bignum fixnum                   |
>>>>> | symbol  | keyword boolean symbol-with-pos |
>>>>> ...
>>>>> 
>>>>> Maybe is more readable? I'm not sure ATM what's the best option.
>>>>
>>>> I think such a table should be fin on TTY frames.  You can use the
>>>> Texinfo @image machinery, which allows text replacements for when
>>>> images cannot be displayed.
>>>
>>> Agreed, the table is probably the best option we have.  Okay I'll work
>>> in this direction.
>>
>> All right, I've implemented the generation of the table and replaced the
>> ascii art representation.  It looks fine now in the info page on my TTY
>> frame.
>
> Hi all,
>
> any check/improvement we want still do on this? Or shall we merge it?
>
> Thanks
>
>   Andrea

Okay I've merged this into master with c55694785e9.

As usual happy to work on it further there if necessary or to see it
improved by others.

Thanks

  Andrea



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

* Re: Emacs object type hierarchy
  2024-03-01  8:36                           ` Andrea Corallo
@ 2024-03-01  8:56                             ` Eli Zaretskii
  2024-03-01  9:46                               ` Andrea Corallo
  0 siblings, 1 reply; 40+ messages in thread
From: Eli Zaretskii @ 2024-03-01  8:56 UTC (permalink / raw)
  To: Andrea Corallo; +Cc: emacs-devel, stefankangas

> From: Andrea Corallo <acorallo@gnu.org>
> Cc: emacs-devel@gnu.org,  stefankangas@gmail.com
> Date: Fri, 01 Mar 2024 03:36:05 -0500
> 
> Okay I've merged this into master with c55694785e9.
> 
> As usual happy to work on it further there if necessary or to see it
> improved by others.

Thanks, I've fixed a few minor problems there.  However, the changes
lack the Makefile magic to install the JPEG image file where the Info
manual is installed.  The JPEG file should be copied to the info/
subdirectory of the build tree when Emacs is built, so that the Info
manual could be read from there, and then "make install" should
install it in the same directory where the Info manual is installed.

Thanks.



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

* Re: Emacs object type hierarchy
  2024-03-01  8:56                             ` Eli Zaretskii
@ 2024-03-01  9:46                               ` Andrea Corallo
  0 siblings, 0 replies; 40+ messages in thread
From: Andrea Corallo @ 2024-03-01  9:46 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel, stefankangas

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Andrea Corallo <acorallo@gnu.org>
>> Cc: emacs-devel@gnu.org,  stefankangas@gmail.com
>> Date: Fri, 01 Mar 2024 03:36:05 -0500
>> 
>> Okay I've merged this into master with c55694785e9.
>> 
>> As usual happy to work on it further there if necessary or to see it
>> improved by others.
>
> Thanks, I've fixed a few minor problems there.

Thanks

> However, the changes
> lack the Makefile magic to install the JPEG image file where the Info
> manual is installed.  The JPEG file should be copied to the info/
> subdirectory of the build tree when Emacs is built, so that the Info
> manual could be read from there, and then "make install" should
> install it in the same directory where the Info manual is installed.

Right good point, I think I tried the html render and the textual
version of the info manual so I missed this.  Will do!

Thanks

  Andrea



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

end of thread, other threads:[~2024-03-01  9:46 UTC | newest]

Thread overview: 40+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-22  8:44 Emacs object type hierarchy Andrea Corallo
2023-10-22  9:08 ` Gerd Möllmann
2023-10-22  9:37   ` Gerd Möllmann
2023-10-23 15:08     ` Andrea Corallo
2023-10-23 16:36       ` Gerd Möllmann
2023-10-23 16:48         ` Gerd Möllmann
2023-10-24  8:28         ` Andrea Corallo
2023-10-22 16:11 ` [External] : " Drew Adams
2023-10-24  0:57   ` Richard Stallman
2023-10-24  2:03     ` Emanuel Berg
2023-10-24  8:39     ` Andrea Corallo
2023-10-24  9:32       ` Emanuel Berg
2023-10-22 22:08 ` Yuan Fu
2023-10-23 15:06   ` Andrea Corallo
2023-10-23 15:49     ` John Yates
2023-10-24  3:37     ` Yuan Fu
2023-10-23 15:20 ` Andrea Corallo
2023-10-23 15:46   ` Eli Zaretskii
2023-10-24  9:21     ` Andrea Corallo
2023-10-24 11:55       ` Eli Zaretskii
2023-10-24 12:02         ` Andrea Corallo
2023-10-24 12:53           ` Emanuel Berg
2024-02-15 17:28           ` Andrea Corallo
2024-02-15 17:40             ` Andrea Corallo
2024-02-17  9:04               ` Emanuel Berg
2024-02-18 19:25                 ` Andrea Corallo
2024-02-17  9:19               ` Eli Zaretskii
2024-02-17  9:38                 ` Emanuel Berg
2024-02-17  9:41                 ` Emanuel Berg
2024-02-18 19:23                 ` Andrea Corallo
2024-02-18 19:33                   ` Eli Zaretskii
2024-02-18 19:37                     ` Eli Zaretskii
2024-02-19  7:52                     ` Andrea Corallo
2024-02-19 16:51                       ` Andrea Corallo
2024-02-26 17:50                         ` Andrea Corallo
2024-03-01  8:36                           ` Andrea Corallo
2024-03-01  8:56                             ` Eli Zaretskii
2024-03-01  9:46                               ` Andrea Corallo
2024-02-16 20:31             ` Basil L. Contovounesios
2024-02-18 19:14               ` Andrea Corallo

Code repositories for project(s) associated with this public inbox

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

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).