Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

structure dumping with memory addresses and bits #6269

Closed
StefanKarpinski opened this issue Mar 25, 2014 · 8 comments
Closed

structure dumping with memory addresses and bits #6269

StefanKarpinski opened this issue Mar 25, 2014 · 8 comments
Labels
display and printing Aesthetics and correctness of printed representations of objects. help wanted Indicates that a maintainer wants help on an issue or pull request

Comments

@StefanKarpinski
Copy link
Member

We have dump and xdump, which are IMO, both half broken so I end up trying one and then the other and one usually works but it's inconsistent which. I'd like to replace them with something that gives much better low-level information about data structures, including memory addresses and bit patterns. One of the purposes of this should be to illuminate how data is actually laid out in memory – see https://groups.google.com/forum/#!topic/julia-users/9LkAIemc5VE for example. It should be easy to see if fields are stored inline or separately allocated on the heap. I know we work hard to hide that detail, but sometimes it's pretty important and eventually, we're going to have to make documented guarantees about how different structures are laid out for the sake of C interop, if nothing else.

@pao
Copy link
Member

pao commented Mar 26, 2014

You can probably adapt the printing code from StrPack for at least some of this.

@JeffBezanson
Copy link
Member

Useful: the xxd function here: http://nbviewer.ipython.org/gist/mbauman/9121961

@quinnj
Copy link
Member

quinnj commented Jul 2, 2014

I think this would be a great feature. I've already blown some people's minds of how easy it is to get the native and llvm code generated by functions; it would be equally great to be able to interactively take a peak at structures and their memory layout.
There's a CS undgrad course here at Carnegie Mellon called Computer Systems 101 where they spend the entire semester learning the ins and outs of assembly, low-level memory mechanics, etc. Having some of Julia's tools would be sweet for that!

@StefanKarpinski
Copy link
Member Author

Yes, that would be cool. We need fewer ways to show things though. Or more composable ones.

@ivarne
Copy link
Member

ivarne commented Jul 2, 2014

My vote is for more ways to print in a more composable way. That would require a much better structure on the whole display / writemime system though.

@quinnj
Copy link
Member

quinnj commented Jul 2, 2014

Also related #5709

@StefanKarpinski
Copy link
Member Author

This seems very much like a feature that can live outside of Base. @JeffBezanson and/or @vtjnash, please leave open if you disagree, but otherwise just closet this.

@vtjnash
Copy link
Member

vtjnash commented Apr 30, 2020

Yes. Something like this could live inside InteractiveUtils, but probably editor-specific designs (such as Juno, Jupyter, or my toy data exploration tool from JuliaCon London 2018) are more profitable for others to explore.

@vtjnash vtjnash closed this as completed Apr 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
display and printing Aesthetics and correctness of printed representations of objects. help wanted Indicates that a maintainer wants help on an issue or pull request
Projects
None yet
Development

No branches or pull requests

7 participants