Giter VIP home page Giter VIP logo

boom's People

Contributors

moodymudskipper avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

statunizaga

boom's Issues

rig a function to exlode its code when it's run

The proof of concept is easy enough :

image

But this will fail if there are calls to sys.call, match.arg, missing ...

Exceptions need to be added for all of those, and rlang functions like enquo, enquos, ensym.

I don't know if we can really have something robust enough.

Maybe there's a way without wrapping into a boom() call, make the boobytrapped function's environment a child of the original function's environment, where we store the modified functions. No idea if it will make the exceptions easier to deal with, but the code will look the same.

clock argument to display time taken by operations

Works locally already

image

Maybe it's a bit too crazy, but I'm thinking we might plot those.

We could have a line chart :

  • x axis would be number of calls
  • y axis would be total ellapsed time
  • start of each segment would be labelled with call, using heuristics if there is too much to plot, maybe plotting just 10 longer times for instance

And/or a bar chart

  • calls on x
  • time on y

now do we use base plot, some interactive charts...

The times also might be slightly overestimated as we're clocking modified functions, but to spot the calls that are problematic I believe the approach is valid.

custom printing behavior

We have 2 main use cases I think :

  • I want to print the str or glimpse (or anything else) instead of printing the whole thing
  • I want to shorten what is printed (long lists, long tables)

long tables can be handled by {tibbleprint}, but it's not a fully satisfying solution.

boom() could have a ... arg, which could be named or not.

Only one unnamed ... arg would be allowed, this arg would be a function or a list :

  • we would print the output of the function used on the output of the step, e.g., boom(transform(iris, a = 1), head) would show the head of each intermediate step
  • a list such as list(head, 4) would be the same as doing function(x) head(x, 4), not 100% sure we need it, esp if we support lambda notation

named arguments would work the same but will be applied on outputs of the class given by the name only. e.g. boom(transform(iris, a = 1), data.frame = head)

Another option would be to manipulate it through options, it would be a shame if we couldn't use the addin just because it prints too long lists for instance.

Maybe it should be a unique list argument that defaults to options, instead of ..., print = getOption("boom.print"), if it's formula or a function, use it on all outputs, if it's a named list, use it if we inherit from the class, one element of this list can be unnamed and be the default/fallback.

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.