Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tonyg/racket-explorer
Utility for interactive exploration of complex data structures.
https://github.com/tonyg/racket-explorer
racket
Last synced: 26 days ago
JSON representation
Utility for interactive exploration of complex data structures.
- Host: GitHub
- URL: https://github.com/tonyg/racket-explorer
- Owner: tonyg
- Created: 2013-10-19T00:05:40.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2016-11-19T19:25:05.000Z (almost 8 years ago)
- Last Synced: 2024-08-21T21:27:09.360Z (3 months ago)
- Topics: racket
- Language: Racket
- Size: 84 KB
- Stars: 32
- Watchers: 6
- Forks: 3
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Squeak-style Explorer for Racket
A utility for interactive exploration of complex data structures,
intended as an alternative to `pretty-print` and friends.$ raco pkg install explorer
$ racket -l explorer/example![Example](doc/example.png)
- Supports:
- integers (displays in binary, octal, decimal and hex)
- other atoms
- pairs, vectors and lists
- hash-tables and sets
- object fields
- non-opaque structs, struct-types
- procedures
- syntax objects
- paths
- boxes
- promises (forces the promise when you click on the arrow)
- exceptions
- user-defined extensions
- Interactive
- bottom panel in explorer widget is an interactive REPL
- currently-selected explorer item is bound to `this` global in REPL
- Extensible
- implement the `explorable` generic, returning an `explorer-item` from `->explorer-item`
- override methods in subclasses of `explorer%` to customize built-in support
- `hash-item->explorer-item` for key/value pairs
- `procedure-explorer-items` for information on procedures## Installation
raco pkg install explorer
## Use
#lang racket/base
(require explorer)
(explore `(some complicated #(data structure)))You can also add items to an existing explorer:
#lang racket/base
(require explorer)
(require racket/class)
(define e (explore `(some complicated #(data structure))))
(send e add-item! 'second-item)
(send e add-item! 'third-item)## Known problems and bugs
- There is no copy and paste from the hierarchical list widget.
(Workaround: select the item, type `this` into the REPL, hit enter,
copy and paste from there.)## License (MIT)
Copyright (c) 2013, 2015 Tony Garnock-Jones
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.