Giter Club home page Giter Club logo

Comments (4)

CDSoft avatar CDSoft commented on September 17, 2024 1

Hello,

You're right. To avoid regenerating all the graphs each time pp (or dpp) is started, pp calls dot (or neato) only is the source of the graph has changed.
Maybe a solution (easier than an additional metadata file) is to put the graph type as a comment in the graph source code generated by pp.
I'll fix this.

A workaround is to delete the .gv file when you change the graph type. Or to add the graph type in the source of the graph (layout = neato).

As you have noticed it, dpp is deprecated since all its features have been reimplemented as pp macros. I'm interested in your feedback. Do you think it's worth maintaining both preprocessors?

Regards,
Christophe.

from pp.

CDSoft avatar CDSoft commented on September 17, 2024 1

That could work well as a temporary solution, but I feel that having an additional metadata file (or just merging eventual metadata with block data in a single file with custom format) would be better in the long run. As an example, imagine adding support for a diagram generator that uses a language with no comments.

You're right. Generic is better.
pp now creates a medata file in addition to the graph source file. The graph is generated whenever one of both files has changed.

I don't think it's worth to maintain both preprocessors as pp can do anything dpp can, and more.

That's my opinion too. One day I'll make a separate repository for the legacy dpp.

from pp.

vittorioromeo avatar vittorioromeo commented on September 17, 2024

Maybe a solution (easier than an additional metadata file) is to put the graph type as a comment in the graph source code generated by pp.

That could work well as a temporary solution, but I feel that having an additional metadata file (or just merging eventual metadata with block data in a single file with custom format) would be better in the long run. As an example, imagine adding support for a diagram generator that uses a language with no comments.

A workaround is to delete the .gv file when you change the graph type. Or to add the graph type in the source of the graph (layout = neato).

I wrote a script to delete all .gv files, but adding the type in the source sounds "cleaner". I think I will do that until you commit an updated version :)

As you have noticed it, dpp is deprecated since all its features have been reimplemented as pp macros. I'm interested in your feedback. Do you think it's worth maintaining both preprocessors?

I'll be honest - I didn't realize that pp wasn't calling dpp until I checked the Haskell source code. I would definitely opt to remove dpp from the pp project (and maybe put it in a separate repository for historical reasons). I don't think it's worth to maintain both preprocessors as pp can do anything dpp can, and more.

Thanks for the quick reply, by the way - I'm using pp to write my BCS thesis and I'm loving it so far. I would like to directly contribute but I've only briefly experimented with Haskell in the past.

from pp.

vittorioromeo avatar vittorioromeo commented on September 17, 2024

Thanks! I've tested the new version and it correctly regenerates graphs when the command is changed. I can delete my remove_generated_figures.sh script.

from pp.

Related Issues (20)

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.