Why is it that on HN when somebody posts a link to a cool project, the top comment is systematically something like "here's an alternative"? Can we just talk about the posted link instead of just stealing the light?
because HN isn't a place to merely advertise a product to gain traction and marketing. These alternatives and comments on other competitors shed light on the entire eco system, and prevent astroturfing as well as group think. It may even widen somebody's lack of knowledge.
Personally I think this isn't a good way to look at it. Nothing exists in a void and to contextualize things, it's often useful to compare it to other similar things. In the startup world, it's often explained in the vein of "Uber for X" type of companies. Since Graphviz is one of the oldest and most widely used pieces of software in this space it makes sense to compare any new developments against it.
Either the OP shared because they found a useful tool and wanted others to be able to know too, in which case sharing another related tool is in the spirit of what OP intended.
Or, OP wanted to use HN as a sales platform to pitch their work. In this case, sorry pal but HN is not your personal marketing megaphone. You want to put something out into the public here, you should expect it to be scrutinized and compared against alternatives. IMO, HN as a platform should put readers first, not authors.
Edit: Just want to add that in this particular case, I think both the draw.io and graph viz plugins are awesome. Love to see these kinds of tools.
I'd say that's one of the top reasons I like HN, as you can see what other people are using. Most of the time when I search the web for comparison between x and y, I find little useful info.
I clicked through on the comments to this because I'm looking for something similar to Draw.io and now I know about Graphviz as well. Once again, serendipity provides.
Even if a particular project isn't that interesting to me, the landscape surrounding the project may be. The community here provides some context for the world this project lives in and that's pretty valuable, IMHO.
I can't say I agree with you 100%, but I see your point. That is part of the reason I don't stop at the top comment. There's usually a lot of good information further down as well.
I'd rather read about someone's experience with the tool mentioned. If they prefer something else, I hope they share that and why. The graphviz thing in particular feels like someone who has an interest in the future of graphviz hijacks any alternative to say that graphviz exists.
Graphviz has been the old standby forever. I had an internship in 1999 where my mentor used graphviz to debug the compiler he was working on. Everyone should have this tool in their debugging tricks library.
I'm actually doing the same thing right now. I had been using a textual output to make sure my AST was correct, but that is a real pain. Graphviz made it extremely easy it is so much easier to read.
You can use it for whatever you want. Instead of dumping text to a log file, you can dump out graph nodes and connection info to a dot file instead, to then be laid out and rendered into a graph by dotty or whatever else you want to use. It doesn’t require any extra libraries.
I use asciidoc extension by the same author. It works well with kroki.io so you can do a wide variety of diagrams (including graphviz, plant uml and others)
How do the both of you make graphviz diagrams look decent?
I often resign myself to using it for generating the first structure, and then laying it out better in an svg editor. Of course that way I lose some of the maintainability of it.
I had to brush off Graphviz today; I dumped a dependency graph from CMake into a series of dot diagrams, and now I'm trying to figure out how to force the SVG generated by dot to space itself out - by default, the edges are so densely packed that you can't see anything on the diagram :/.
I think this extension demonstrates the flexibility of VSCode and how easy it can be to extend the platform with an extension.
Although it's supported by Microsoft, it's heavily influenced by the Open-Source community. I believe that's the reason it's so popular and user-friendly for both developers and users.
Can you imagine someone trying to implement this extension on a proprietary platform like Visual Studio or IntelliJ? ... going through proprietary documentation with no access of the Source-Code to the underlying system... It would be a nightmare
Not to knock VS Code, but I suspect this has more to do with draw.io Desktop[0] and VS Code both being JS/electron apps and draw.io officially supporting an embedded mode[1]. IIRC, most of IntelliJ is open source but it is probably much harder to embed a JS app in a Java app.
it really shines when apps open their internals via a web-like API to allow embedding.
I wish more apps have such extensibility, so that it's easy to embed apps within, and that apps be made more modular so that they can be embedded.
Microsoft had the same vision with their COM architecture, which allowed apps to be embedded inside other apps. But sadly it's too complicated, and difficult to really use (so you won't have seen much other than microsoft's own apps using such features to embed other microsoft apps).
And the web would've been a great API/protocol level for an app to be embedded via such a way, but a lot of apps dislike being framed/embedded.
It does have almost all the features of VSCode and more. The features of ultimate are far ahead of what VSCode offers, like showing where a particular dependency is injected from in Guice or Spring.
In fairness, Visual Studio has all of the features of VSCode and many more out of the box too - however, I find myself ducking into VSCode for it's better UI/UX - e.g. JSON/XML formatting, Git source control, code colouring and theming etc.
Visual Studio is not open source. The community edition has T&C unlike IntelliJ community edition. Also IIRC asks you to login with a Microsoft account for sustained usage.
And it is still not good as the equivalent Jetbrains products. Jetbrains products have almost no restrictions either in the free version or in the personally paid versions as far as I remember.
IntelliJ also has a very good git support story, and I find myself using less and less cli git for anything from rebase to selectively staging certain chunks of code.
Yup, but that is the same as how VSCode makes extending itself more difficult than emacs, but is more full featured and requires less tweaking. They lie on different points of the continuum.
In theory, for a big system like intellij or VS you want to use the docs over the source code; both are projects with millions of LOC, at which point reading the code to write an extension becomes unfeasible.
That said, I do really enjoy being able to go to the source for libraries I use, recently in Go. What helps with that is that the code is consistent and readable no matter what project I open up.
> In theory, for a big system like intellij or VS you want to use the docs over the source code
Sadly for IntelliJ the documentation is lacking. There is some very general documentation online but they do not publish a generated API documentation, so as an extension developer you are often in the dark trying to figure out what classes / methods to use, unless you learn how to compile the documentation yourself.
Had the same experience while working on an extension. Looking at their forum and extensions with similar features you want to implement is the way to go. IntelliJ's documentation is very superficial and lacking.
WebKit doesn’t count? Google, BlackBerry, Amazon, Opera, Tizen, etc all maintain different derivations based off of Apple’s work with WebKit, with the most well known being Google Chrome.
(Although I’ll grant that WebKit itself is a fork of KHTML from the KDE project).
WebKit doesn't have nearly the same amount of community engagement as VS Code does probably because it's a piece of infrastructure code rather than user-facing software.
Where is WebKit source and issue management anyway? It's not on GitHub. I don't imagine Apple providing very well for people, who ask for endless options on a product like VS Code.
I suppose the open source Swift language might be comparable, but I don't think it's anywhere in the same league as VS Code regarding the number of users.
I believe WebKit source and issue management is on webkit.org; not being on GitHub seems to make sense to me, as (according to Wikipedia) WebKit was released three years before GitHub was founded. This is the Apple release, not KHTML existing (which was another seven years before that).
apple has plenty of messy approaches though. they simply aren't interested in creating anything that will itself run or allow creation of anything that is intended to be used outside of their devices and ecosystem.
> Although it's supported by Microsoft, it's heavily influenced by the Open-Source community.
Isn't it developed by an external studio in switzerland which just happend to be attatched with microsoft? I always got the impression this independance from the old Redmond-Cancer is a main reason why it could propsper so well.
By which I mean that in Redmond there seems to be some gangwars going on between the different departments, projects and generations of developers, which in external Studios seems to mostly non-existent. There was also that studio in israel which seem to propser quite well. Maybe Microsoft is accidently a perfect example for diversity in culture working out beneficial with software-projects?
The project has an embed mode, which was used in this case.
It needs a sequence embed, but basically you load draw in embed mode within an iFrame, do a handshake using postMessage, then load and save is direct between parent and frame, again using postMessage.
The idea is to be able to embed into hosts that are capable of storing the diagram data, without any code changes to draw. It can embed either the main site (which was renamed to app.diagrams.net), or a locally hosted/internally packaged version of the project.
Yes I've been using it offline with the electron app and on my phone as an offline website. It works really well that way. The advantage of the electron version is that for local files, it doesn't ask Everytime you want to save, where to save and if you want to overwrite, or save in downloads depending on browser settings.
I've been looking at draw.io and PlantUML - what has worked well for others? draw.io is much easier to get into, but I can see declarative diagrams making maintenance easier for long-lived docs.
Being a person who doesn't typically want to draw diagrams, I opted to go with draw.io as it looked very simple and easy. However, I was nudged to try PlantUML and to my surprise it was a lot simpler and faster to create diagrams. A point which you mentioned is maintaining the diagrams for long-term. We have a docs folder in our repository which includes all our PlantUML. It's quite easy to pick up as a language, and because it generates the diagrams for you, you don't waste minutes fiddling with getting the arrows all matched up. I would definitely give it a try - makes life so much easier!
Plus, there is a VS Code extension for it as well, which auto generates the diagrams when you save.
After having used both Draw.io and PlantUML, I prefer the latter. Far easier to get consistent drawings from the whole team without fiddling. And updating the drawings later is also easier because the language is much better than Draw.io's XML.
If we could get an extension like this for every file type VS Code could basically become your OS (desktop environment) or file manager at the very least.
It would be handy. I wonder if it is possible to create one that opens the file in your default OS way, and embeds that window inside a VSC tab. Can dream!
I guess the main reason is so you can see your file explorer while working on a file. You could put your file manager side by side with whatever program you're using also I suppose.
A better OS with beautiful lisp language already exists called emacs (which happens to be an excellent text editor as well), try it. VSCode is built on a foundation of electron which is riding on chrome v8 engine. If one day webassembly becomes common and vscode can shed it’s weight and become close to 50-60% of what emacs is, then it might be possible to think of it as OS, right now it looks 2-3 decades behind emacs.
It’s only popular among programmers who wants an IDE not a programmable environment like emacs. Emacs attract scientists and researchers and people who write OS, compilers, DB, language specs, HPC systems and algorithms, design algorithms, performant OS utilities etc. VSCode attract web development crowd which mostly spend time on building web forms (making it dynamic using JavaScript with some framework may be react) on top of database schema or some document storage. Given this I doubt it will be anywhere as programmable as emacs.
I am also an Emacs user, but please don’t be so dismissive of other people’s work. This looks like a great extension.
Despite my qualms about memory use and latency, VS Code is a fully programmable editor just like Emacs, except using Javascript in place of Lisp. I don’t see much of a difference, except that JavaScript is much more popular (and thus the VS Code ecosystem develops faster) and Electron is a much more modern runtime, which enables easier integration of visual tools.
I think rather than criticizing Code all the time, we should look and learn. Clearly, Code is doing a lot of things right. And it’s not just the web dev crowd. I have seen a lost of Rust folks go to either Code or IntelliJ.
> Emacs attract scientists and researchers and people who write OS, compilers, DB, language specs, HPC systems and algorithms, design algorithms, performant OS utilities etc. VSCode attract web development crowd which mostly spend time on building web forms (making it dynamic using JavaScript with some framework may be react) on top of database schema or some document storage.
Yeah, about that. What do you think those extensions do? Do you think they all cross-compile to Javascript and plug into the famed C-bindings for React? :-D
No need for elitism. I'm sure there are scientists and researchers perfectly happy with Notepad++ and I've worked with web developers who've used emacs.
I agree that VSCode is unlikely to reach the level of emacs in terms of being a fully programmable environment. But what it does offer is an easy and modern out-of-the-box experience.
VSCode is literally the only electron that doesn't bother me because it doesn't chew memory like Chrome, Slack, or every other electron app I've ever tried.
Yes they have architected it so well that it performs amazingly well. The plugin architecture is well done too. The memory consumption goes up only when the plugins consume more memory as all of them run in separate processes. In the future, I'm thinking that they might start to replace parts of the app with WASM and make it even more performant. But I'm pretty sure it's not going to be the entire application.
Nevertheless, they have a somewhat easy path to migrate in the form of AssemblyScript which is a subset of Typescript that compiles to webassembly. The future of VScode is exciting!!
One of the performance details noted in the last update's release notes was that RegEx library specifically used by the syntax highlighting engine was a native dependency on desktop and a slightly slower WASM dependency on the web, and they improved the WASM bindings enough specifically for the syntax highlighter that now all platforms are using the custom WASM build.
Performance details in the release notes are really interesting to follow.
Better OS is highly disputable. Emacs has point where can win against against VS Code, as also points where is lose. It all depends on your demand and usage.
> Given this I doubt it will be anywhere as programmable as emacs.
Customizing can be a curse. Seeking it purely for the sake of customizing is an harmful poison. VS Code has some areas for improvement, but it's good enough as it is now. It doesn't need to be as programmable as emacs.
That looks quite interesting. Can it detected embedded diagrams in PNG? I usually just save the PNG files, so I don't have to separately store the XML file.
I would feel pretty bad accepting donations for this integration - compared to my other extensions, this one wasn't much work at all, thanks to the awesome embed mode of Draw.io!
I could see both working well when depending on the situation and audience. In my role I'm seeing a need for plain diagrams that need to be kept up-to-date and a "pretty" diagram for showing the bosses for 30 seconds in presentations.
Plus that "embed in png" feature (assuming it is ever stable enough for release) looks genuinely useful for source controlling editable images that would appear automatically in something like README.md.
The diagram can be part of documentation of the code in the the same working directory, possibly version controlled.
It is going to be very useful to be able to just edit the diagram within the same editor as the rest of the files in the same working directory. You just double click the file in VS Code, and it opens there.
I am looking forward for the completion of the PNG part so that it is even more seamless.
Looks cool. However I've created a .drawio file after installing (and reloading) and I do not see any diagram editor. It's just a blank space. Is there anything else I need to do? I installed via VSCode extension marketplace.
Can you file a bug report on github [1]? That would be awesome!
Please mention your OS and your VS Code version.
You should not do more than what you did and it's working for me.
Sorry, I'd rather not, since this is my alt and don't want to dox myself.
But I think I figured why: I installed it during remote development, and it does not appear to work on the remote host. After installing it locally, it works (for local files only, though).
Is it a known issue that it does not work as a remote extension? I do all my development remotely so it would be nice if that worked.
EDIT: Just saw https://github.com/hediet/vscode-drawio/issues/8 -- disabling offline mode does indeed make it work in remote development. Awesome! :) (Would be cool if you could somehow integrate File -> Export so that it could export directly to a file on the remote host)
For more information about graphviz: https://graphviz.org/