ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Surprising change in function inspect()
@ 2019-10-22 14:13 Tomas Hala
  2019-10-22 15:15 ` Hans Hagen
  0 siblings, 1 reply; 3+ messages in thread
From: Tomas Hala @ 2019-10-22 14:13 UTC (permalink / raw)
  To: Mailing list ConTeXt

Hi all,

using the source code

======
\starttext
\startluacode
  d={} d.data={"a",0} d.tabulka=function () context("pokus") end 
  inspect(d)
  d.tabulka()
\stopluacode
pokus
\stoptext
======

I discovered quite surprising change in the output of inspect:

TL2019:

table={
 ["data"]={ "a", 0 },
}

TL2018 and older:

table={
 ["data"]={ "a", 0 },
 ["tabulka"]=load("\27LuaR\0\1\4\4\4\8\0\25�\13\
\26\
\4\0\0\0\4\0\0\0\0\0\2\4\0\0\0\6\0@\0A@\0\0\29@\0\1\31\0�\0\2\0\0\0\4\8\0\0\0context\0\4\6\0\0\0pokus\0\0\0\0\0\1\0\0\0\0\0\14\0\0\0=[\\directlua]\0\4\0\0\0\4\0\0\0\4\0\0\0\4\0\0\0\4\0\0\0\0\0\0\0\1\0\0\0\5\0\0\0_ENV\0"),
}

Is there any way how to persuade the current inspect to add functions to the output as before?

Best wishes

Tomáš

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: Surprising change in function inspect()
  2019-10-22 14:13 Surprising change in function inspect() Tomas Hala
@ 2019-10-22 15:15 ` Hans Hagen
  2019-10-22 22:32   ` Tomas Hala
  0 siblings, 1 reply; 3+ messages in thread
From: Hans Hagen @ 2019-10-22 15:15 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Tomas Hala

On 10/22/2019 4:13 PM, Tomas Hala wrote:
> Hi all,
> 
> using the source code
> 
> ======
> \starttext
> \startluacode
>    d={} d.data={"a",0} d.tabulka=function () context("pokus") end
>    inspect(d)
>    d.tabulka()
> \stopluacode
> pokus
> \stoptext
> ======
> 
> I discovered quite surprising change in the output of inspect:

indeed, i don't want to see that stuff

> TL2019:
> 
> table={
>   ["data"]={ "a", 0 },
> }
> 
> TL2018 and older:
> 
> table={
>   ["data"]={ "a", 0 },
>   ["tabulka"]=load("\27LuaR\0\1\4\4\4\8\0\25�\13\
> \26\
> \4\0\0\0\4\0\0\0\0\0\2\4\0\0\0\6\0@\0A@\0\0\29@\0\1\31\0�\0\2\0\0\0\4\8\0\0\0context\0\4\6\0\0\0pokus\0\0\0\0\0\1\0\0\0\0\0\14\0\0\0=[\\directlua]\0\4\0\0\0\4\0\0\0\4\0\0\0\4\0\0\0\4\0\0\0\0\0\0\0\1\0\0\0\5\0\0\0_ENV\0"),
> }
you can always use:

   print(table.serialize(d))

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: Surprising change in function inspect()
  2019-10-22 15:15 ` Hans Hagen
@ 2019-10-22 22:32   ` Tomas Hala
  0 siblings, 0 replies; 3+ messages in thread
From: Tomas Hala @ 2019-10-22 22:32 UTC (permalink / raw)
  To: Hans Hagen; +Cc: mailing list for ConTeXt users

# >
# >I discovered quite surprising change in the output of inspect:
# 
# indeed, i don't want to see that stuff

# you can always use:
# 
#   print(table.serialize(d))

Thanks for the explanation. But there is the difference -- serialize says
only the memory address and not the stuff there. Have we got any other tool?
The reason why I am looking for any replacement is the intention 
to show students how it looks inside. 
 
Tomáš

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

end of thread, other threads:[~2019-10-22 22:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-22 14:13 Surprising change in function inspect() Tomas Hala
2019-10-22 15:15 ` Hans Hagen
2019-10-22 22:32   ` Tomas Hala

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 NNTP newsgroup(s).