Hacker Newsnew | past | comments | ask | show | jobs | submit | sidharthv's commentslogin

I naively searched in the mobile app settings for a way to turn off shorts, before realising there will not be one.


You can't turn it off entirely, but if you keep using "show less shorts" from the 3 dot menu it eventually goes away, mostly...


It comes back. It acts like it executed shortiness+=1 every day, and "show fewer shorts" does shortiness-=10 or thereabouts. The shorts position on the home screen is based on this hidden shortiness variable. It always bubbles back to the top unless you keep pressing "show fewer shorts" whenever you see it.


Strange, for me it only comes back up if I get baited into clicking on any short (or have one linked to me)


You can use NewPipe or YouTube ReVanced, or set up a “child” account and disable Shorts in the parental restrictions settings.


If you're on android it's better to just use revanced or something


We are doing some fundamental changes to how diagrams are rendered, which would enable us to support more renderers. This will enable us to do server side rendering without a browser.

The main reason why we need a browser currently is size calculations of the SVG boxes, which libraries like jsdom does not support.


Please don't take the, in my opinion, excessive criticism to heart. Mermaid is fantastic. It would be even better if it supported more renderers but as it stands to day its an invaluable tool.


That I can bring GraphViz into a browser but not Mermaid out of the browser forces GraphViz for some usecases. Unless browser-native was the intent (idk, it could be... maybe thats why it was named Mermaid), I do think it should be a high priority thing.


FWIW I gave up trying to render SVG for our project and switched to using fabric.js (and node-canvas for server side rendering). For us it was mostly because it had far better text support.


fabric.js looks interesting. We should theoretically be able to add a fabric.js based renderer for mermaid once the refactoring work is done.


Hi Peter,

My wife is going to pursue her PhD in US in the coming months, and I'm working as part-time remote employee of a US startup, while owning a startup in India. What options do I have, which would allow me to visit her for 1-2 months, without affecting my work?

I've heard B1/B2 holders being questioned during entry after they stayed for a month during previous trips. As I'm not working full time for the US company, I'm not eligible for L1.


A B-1/B-2 visa would not allow you to work for the U.S. company while here or your Indian startup while here. It might seem like overkill but possibly get an O-1 through the U.S. company. There's no minimum amount of time that you must spend in the U.S.


How can US dictate an alien to not work for a foreign country while in US for visit?


Thank you, will try that option.


Mermaid, the open source library and Mermaid Live editor[1] are free to use.

Mermaid chart has a paid tier[2], and gives storage, sharing, visual editor, and more.

Disclosure: Long time maintainer of Mermaid and works on Mermaid Chart

[1] https://mermaid.live

[2] https://www.mermaidchart.com/pricing


Huh, never knew mermaidchart existed. Love mermaidjs though. Any plans to ever add styling/placement options? I know that’s not the idea behind it, but optionally, perhaps?


Styling is already present in most charts, and we do have plans to support different layout algorithms which could enable support for custom placement of nodes as well.


SvelteKit, with Zenstack handling access control on top of Prisma. Postgres as DB.


There was a discussion in MermaidJS community to move away from Slack into Discord. But we were thinking about moving to a FOSS platform instead.

What are some viable options that communities have had success with?


IRC is very low bandwidth & offers the minimal requirements for communication which can be accessible/acceptable for many projects. If something heavier is needed or wanted, XMPP MUCs & Matrix Spaces may be a good option since they are federated & decentralized (although Matrix has unfortunate defacto centralization around Matrix.org, because it requires quite a lot of resources to self-host in both the Python server as well as mirroring all content for all users for its take on federation). Mattermost & Zulip are fine, but require an account (I believe) to the central server but are FOSS & used enough places to be considered stable/trustworthy.

All options can by bridged to all other options (even the proprietary ones) in some manner, but if possible, the defacto server would be FOSS & owned/operated by the community so that that community can define their ToS and/or CoC. This way they are in control of the community rather than requiring users agree to someone else’s—especially a for-profit US corporation’s—terms in order to participate. Some users will want privacy, anonymity, control of personal data, or to get around a firewall/sanctions …and these desires should be considered acceptable. If not self-hosted (requires time/money), it’s still better to choose something using open protocols, like a space on Matrix.org, a big chatroom on XMPP’s Blabber/Conversations, Libera.Chat/OFTC, etc.


I'd second the recommendation for Zulip. It's pretty similar to Slack/Discord, but unlike those it has good support for making the archives public. It also has much better threading support, which is a nice bonus.


Self host Zulip, very easy, awesome integrations, etc.


Matrix is the way to go for FOSS.


It’s expensive to self-host, and centralized if using Matrix.org. It has its uses, but XMPP MUCs have a lot of overlapping features & Prosody/ejabbard can run on a potato by comparison.


It might be expensive for an organization to host, but for individual / small groups it can be as low as $6/mo. I've been running a small Matrix server on a DigitalOcean droplet for years now, and the $6/mo plan has been working fine for 5 users, and three bridges running on that server.


I believe all messages/multimedia from all users & the history all the rooms & private messages need to be mirrored which can end up being a lot even with a few users depending on what they’ve joined. If my understand is wrong tho, I’d like to know so I’m not running around with this notion.


No, you're right...that can be an issue. I had to configure my server to disallow large rooms and enforce some file size limits.


Mattermost is my favorite.


This is wonderful. I've always felt docs are a weak point of Mermaid as there are many features that are undocumented, and it's a little incoherent overall. Will add a link to this cheat sheet from the official docs.

Also, we just released v10 which

- is 70% smaller (<100 kB gzipped)

- has lazy loaded diagrams (only download diagrams that are used in the site)

- fully async rendering and parsing

- cleaner internals

Disclosure: Mermaid maintainer here


I love Mermaid. But my biggest pain point is having to manually wrap text to keep the shapes compact. It's glaringly obvious just looking at this cheatsheet.

Incorporating an algorithm that figures out the optimal auto-wrapping for each shape to make them compact or, alternatively, one that tries to make all the shapes about the same size, should go hand-in-hand with the automatic layout Mermaid already has.

Any plans?


This would really be a good UX improvement.

But the implementation might be a little tricky.

Please raise an issue so we can discuss further, and add it to roadmap if feasible.

https://github.com/mermaid-js/mermaid/issues/new



Thank you very much for your work! I learned about mermaid about a year ago, and have used it pretty extensively since, including as a visualization and control interface for a DAG execution framework.

Mermaid’s flow chart layout engine is quite nice, too. I’ve yet to encounter the kind of messes that graphviz comes up with regularly, even with complicated flow charts.


Thank you!

All credits for the layout goes to dagre.

We've recently introduced elk and cytoscape as layout engines for some diagrams (flowchart-elk & mindmap).


Out of interest, is there an EBNF form for mermaid? I'm asking as I'm looking at notation alternatives for comments in code, for a language I'm designing.

I'd like to be able to write orgdown+mermaid+mathjax equivalent into comments in the language. The language itself needs to be quite formally specified hence the question.

I know markdown isn't actually suitable for this purpose as there are too many edge-case anomalies, I'm hoping mermaid is better specced around the edges.


Mermaid as a whole doesn't have a formally specified grammar. Individual diagrams have their grammar in a .jison file.

Flowchart: https://github.com/mermaid-js/mermaid/blob/develop/packages/...

A single grammar to support all the different use cases would be challenging. But we did have some plans to introduce guidelines to make different diagram syntaxes more consistent.


I've had this need to render just part of a mermaid graph, and I thought of creating a parser to do it. Basically I'd like to render just the part of the graph that flows through a particular node.

Before I go off and write my own parser using this grammar, would it be practical to do this in mermaid's parser already?


I just posted parallel to your post. What is your positioning of mermaid (and friends like plantuml) vs. visually crafted diagrams?

Textual editing, auto-layouting, little work, obviously, but where is the niche compared to visual editors. As an architect, I have challenges using mermaid when communicating to stakeholders.


I feel both have their niche carved out.

For developers, text-based editors are an excellent tool to represent not-so-complex logic/procedures where they don't need to spend time worrying about the visual angle. It's easier to integrate into documentation with a ```mermaid, and easy to keep updated.

So there is no context switching involved in opening up a visual editing tool, downloading the image, integrating it to the docs, then having to repeat the whole process again when there are changes.

As an architect, one of your primary responsibilities would be to create high-level diagrams that need to convey a lot more information to the stakeholders, where the weightage of the visual component is high (layout, colors, etc). Which is where Visual editors shine.

Text - Simple, Quick & Dirty diagrams.

Visual - Detailed, well thought out diagrams.


For me it's the exact opposite:

Text - Detailed, well thought out diagrams.

Visual - Simple, Quick & Dirty diagrams.

The reason is mostly that diagrams from visual editors are basically unmaintainable and therefore are only good for throw-away stuff. Also simple diagrams, especially when you are not entirely sure what you want, are quicker done in a visual editor.

If I need to document a complex system and especially when the documentation has to evolve with the system it is generated diagrams from version controlled text files for me hands down.


Very much agree with this. In fact wrote something on this last year almost to the day: https://www.ilograph.com/blog/posts/its-time-to-drop-drag-an...


Thanks. That is exactly my train of thought on this. Nice to see this positioned also from you.


Themes and colors, we can do. I've seen people drawing some spectacular diagrams with Mermaid.

But we cannot easily add layout logic without sacrificing the simplicity of the syntax.


I think the sweet spot of text based diagram generators is when the intent is high levels of information delivery at low levels of effort. It is super easy for me to say "a sequence diagram would help convey this concept better" and write up a diagram. Whereas if I had to use a visual tool, it'd be a higher level of effort.

Text based diagrams are also easy to:

* version control

* get feedback on (it's a PR away)

* change

Even though you can style the text based diagrams (see this for plantuml styling: https://plantuml.com/style-evolution ) for a cohesive look and feel, visual based editors are still going to win out. I use them for free form diagrams and also presentations.


Good summary @moonreds, I fully agree.

For the styling we can't really compete with the visual tools. In Mermaid we have lots of things we can do in that area to make it better though. Both improving the default styling and handling some common use-cases. We could for instance simplify the highlighting of one specific node in a flowchart/class diagram. You can do it right now ofc but you have to make the style/class yourself.

One should be also be aware though that there is a time trap using styling in the visual tools. I spent lots of time making fiddling with styling of boxes in Visio. :)

--- Creator of Mermaid and founder of Mermaid Chart


Have you thought about updating Mermaid's official docs directly with examples like this?


I had to add compression into Mermaid live editor's URL state as the length limit was exceeded with big diagrams.

Wrote this SerDe which can be extended with better algorithms in the future. https://github.com/mermaid-js/mermaid-live-editor/blob/devel...

Eg: https://mermaid.live/edit#pako:eNo9kUGTnCAQhf8K1adNlesoqKiHV...


I've been using sam.sung@domain for them. First time I've come across this block in years of using this method.


Would you be willing to file a feature request in https://github.com/mermaid-js/mermaid-live-editor/issues ?

Disclosure: I'm a maintainer for the project and the feature will be a bit tricky, but should be doable.

One issue is that unlike drawio, mermaid doesn't support custom placement of nodes. We could have different style arrow popups, which could render corresponding connections in default locations.

I also feel that this would be a very nice feature to have.

If anyone is interested in implementing, please let us know, and we can discuss ideas.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: