Code Monkey home page Code Monkey logo

p6-uxmal's Introduction

Uxmal

Analyses the an array of META6.json-ish hashes to determine the required build order and also provides a control mechanism for building as efficiently as possible.

depends-tree(@meta)

Really only needs an array of { :name, :depends([]) } of all of the dependencies required

depends-channel(%tree, $concurrency = 3)

Returns a Channel you can use for flow control for whatever you're doing.

Example:

my %tree = depends-tree(@list-of-metas);
my $flow = depends-channel(%tree);

loop {
  if $flow.poll -> $key {
    # do something with %tree{$k}
    %tree{$k}<promise>.keep; # this is important so the controller
                             # knows it can send the next item to be
                             # built
  }
  if $flow.closed { last }
  sleep .5;
};

Check out t/build-order.t:32 for a more complex example.

generate-dot(%tree)

Returns a very simply graphviz dot format string that you can use to write to a file and generate a chart.

attempt-full-dot-gen(%tree, :$force = False)

Will die if $force ~~ False or if which dot does not return the path to graphviz's dot.

This method attempts to generate the dot file, runs dot -T png -o <tmp-file.png> <tmp-file.dot> and returns the string path to the png file.

p6-uxmal's People

Contributors

tony-o avatar

Stargazers

 avatar

Watchers

James Cloos avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.