gbury / ocaml-memgraph Goto Github PK
View Code? Open in Web Editor NEWA small library to output memory graph for ocaml values
License: MIT License
A small library to output memory graph for ocaml values
License: MIT License
Normally Graphviz accepts unquoted keywords (such as SVG or X11 colours) but hex values must be quoted. Calling memgraph after initialising the config with unquoted hex values triggers a syntax error. The following is how I properly configure the colours:
let config =
Memgraph.Dot.config
~external_node_color:(Some "#bababa")
~block_node_color:(Some "#535955")
~root_node_color:(Some "#0a0a0a")
~outline_color:"\"#cccccc\""
~background_color:(Some "\"#252a2a\"")
~direction:`Horizontal
()
From a cursory look at the code, I suspect only the values parsed in styles_with_color
get properly quoted and the others parsed in print_list
don't.
Using memgraph with js_of_ocaml currently raises a few warnings because of the dependency on unix (for Dot.to_file
). It would be slightly cleaner to avoid depending on unix in the core library, and expose file-related helpers in a separate package.
Running ocaml-memgraph under js_of_ocaml means that the closure representation is different from native and bytecode.
For instance, trying to display the graph for (fun () () -> ())
will raise an assertion failure in mk_closinfo
.
One idea would be to read Sys.backend_type
to avoid reading into a closure block in the Other
case.
Hello,
In case you were not aware of it, caml-inspect seems to do almost the same as ocaml-memgraph. And by the way, I use it in a document for an OCaml course.
Do you have precise needs or ideas to implement ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.