Comments (7)
Implemented as a special case by wrapping Slips in Data::Dump::Tree::Type::SlipWrapper, Another attempt, handling the Slip as an object as long as possible before passing it in a list, had too large an impact on the code base.
from p6-data-dump-tree.
FWIW, Slip
s need special handling throughout the Rakudo code base to give them their magical properties.
from p6-data-dump-tree.
It made me crazy, once I got it to display properly I found it that the changes broke everything else, I didn't have enough tests to find the errors, running the examples in the distribution, which unfortunately don't all have corresponding tests, showed that even making a diff between two data structures was broken (my favorite part of DDT).
10 lines to handle Slip, and everything works like before, not sure if a hack like that shouldn't be called the best solution.
Thank you for reporting it, maybe ;), I am not sure how many people need to render Slips.
from p6-data-dump-tree.
I needed it because I have a large array of arrays and hashes and wanted a cheap way of making it object oriented. So I have a role that you just like the keys, and it will automatically create methods for that accessing that key in the hash (very much like standard Perl 5 objects). The problem was with the arrays, because they got itemized. This meant you couldn't do for $obj.array", because it wouldn't iterate. But it *does* if you bind the key to a
Slip` :-) Which is a bit of a hack, but it works really nicely and smoothly :-)
from p6-data-dump-tree.
An example of the data structure, what you wanted to do with it and how the Slips where used would make a nice technical article for many I think.
from p6-data-dump-tree.
The thought has crossed my mind
from p6-data-dump-tree.
If you write an article, I need to see more of P6 usage, and do dumps with DDT, let me know if you want some help with filters if the wrap_highlight example is not enough, or a review.
for presentation, and quite often for oneself too, :flat(0) can give a nicer/more usable display, even if it is slooooow.
from p6-data-dump-tree.
Related Issues (20)
- documentation changes needed
- Couldn't find DDT when trying to install Data::Dump::Tree HOT 16
- zef install gives an error HOT 3
- document typo
- Add :max_lines
- Could not find Data::Dump::Tree::RemoteFoldObject HOT 2
- "all lines" test fails to install in long path HOT 1
- Terminal::Print not included in dependencies
- num64.new does not create a num64 HOT 2
- Many typos Date::Dump instead of Data::Dump
- Installation problems: Preceding context expects a term, but found infix HOT 1
- Installation failing in 2018.03 HOT 3
- Argument :display_address is of type DDT_Address_Display, when I believe it should be bool. HOT 1
- :does() in the constructore doesn't seem to work HOT 2
- display_address documentation
- Bags can not be shown with DDT HOT 1
- Variable names not display properly
- Match object rendering on failure
- remove "Cannot mix in non-composable type Any into object" fix from examples
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from p6-data-dump-tree.