Code Monkey home page Code Monkey logo

Comments (10)

hao-lee avatar hao-lee commented on June 12, 2024 1

Graphviz is extremely awesome. I prefer it to any other graph tool. I even want to create a tutorial repository to help other people learn it. 😏

from graphvizer.

hao-lee avatar hao-lee commented on June 12, 2024

😄 Hi, 3.0.0 has more features. I'm eager to release too, but before this, I still need to test it more carefully because the whole codebase is refactored. If everything is OK, I will push the v3.0.0 tag today or tomorrow.

from graphvizer.

michaelblyons avatar michaelblyons commented on June 12, 2024

Haha, no problem. I'm just excited.

from graphvizer.

michaelblyons avatar michaelblyons commented on June 12, 2024

I don't know if you knew this, but since v3211 (released 2019-10-01), there is now a "Build System" for Graphviz. [Edit: Sorry, only the Beta got the improvements]

  • Ctrl+B to render a png image with dot in the same folder.
    • On MacOS, use Cmd as usual.
  • Ctrl+Shift+B to choose svg output or to use a different engine (neato, twopi, etc.).
  • Reports any syntax errors in the build output, and double-click navigates to the error location.

It's not as good as your awesome plugin, but it may help people with less demanding needs.

from graphvizer.

hao-lee avatar hao-lee commented on June 12, 2024

Thanks. I didn't know it before because my v3211 version doesn't have this graphviz build system by default and I have to add it manually from your pull request. It's indeed lightweight and easy to use. It seems you are also a Graphviz enthusiast. 😏 I never thought one can create a build system for Graphviz. This is really a new direction.

from graphvizer.

michaelblyons avatar michaelblyons commented on June 12, 2024

Thanks. I didn't know it before because my v3211 version doesn't have this graphviz build system by default and I have to add it manually from your pull request.

Oh no! I just looked for the next release after the PR was merged. I didn't know that the code didn't make it into that release. 😬 Sorry about that!

from graphvizer.

hao-lee avatar hao-lee commented on June 12, 2024

Hello, 3.0.0 has been released.

By the way, I find that it's very difficult to manage a large graph source file because dot language doesn't support variable definition. If I want to change some attribute values, I have to do a global replacing which is very bored and easy to make mistakes. A straightforward solution is use M4 macro preprocessor. So my next plan is to integrate GNU M4 Macro Syntax to extend the default dot grammar. This should be interesting.

from graphvizer.

michaelblyons avatar michaelblyons commented on June 12, 2024

from graphvizer.

michaelblyons avatar michaelblyons commented on June 12, 2024

Here are the four methods, with their good and bad attributes:

Change the builtin Graphviz package

This is opening a PR at sublimehq/Packages with changes to add M4.

Pros

  • All the code is in one place.
  • Least effort required.

Cons

  • The PR has maybe 30% chance of being accepted, because
  • The builtin syntax is shared by lots of people, many of whom do not use the same macro system, and some of whom may use a conflicting macro syntax

Build your own Graphviz syntax

This is making a self-contained syntax file here in this repository that does not refer to the builtin package in any way.

Pros

  • All of your code is in one place.
  • No need for PRs---you can merge improvements immediately.

Cons

  • Any improvements to the builtin package have to be added here, separately.
  • Any improvements here are not available to the builtin packages.

(simple) Linked syntax

This is what I suggested above: You make a small syntax package that only defines the entry points for M4 and includes the main context of the builtin package.

Pros

  • Any change to the builtin repository is immediately mirrored to all of your package's users
  • The Graphviz syntax is centralized.
  • If someone else has a macro system that they like, they can do the same thing without worrying if the macro syntax conflicts.

Cons

  • Places that embed wrapped Graphviz syntax (e.g. a loop) will include the main syntax scope, which might not be relevant in the place that the loop happens.

Complex Linked syntax

This is similar to the previous example, but instead of - include: scope:source.dot, you append specific subscopes, like - include: scope:source.dot#brackets. There is not a lot of complexity in the Graphviz syntax definition right now, but someone may change that someday. 😉 If you are interested in improving the builtin syntax definition to make it closer to the spec, we'd love to have your help!

Pros

  • (Same as previous)

Cons

  • Chopping up a syntax definition and reconstituting it can be tedious

from graphvizer.

hao-lee avatar hao-lee commented on June 12, 2024

Many thanks. This is really helpful. I'm not familiar with syntax definition, so it's impossible for me without your help to consider these aspects so detailed. I always think your avatar is familiar, but I don't remember where I saw it until I open the contributor list of Sublime Text syntax. I am already eager to implement new features, but for now, I have to learn some basic knowledge. Thanks again for your detailed explanation. 😄

from graphvizer.

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.