News for hackers. Stuff that matters.

sidharthv

Re:TikTok's 'Addictive Design' Found to Be Illegal in Europe on Friday February 06, 2026 @01:25PM (#46916284)
I naively searched in the mobile app settings for a way to turn off shorts, before realising there will not be one.
fabric.js looks interesting. We should theoretically be able to add a fabric.js based renderer for mermaid once the refactoring work is done.
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.

Thank you, will try that option.
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.

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.
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

Re:Ask HN: What is your go-to stack for the web? on Friday February 09, 2024 @04:35AM (#39313122)
SvelteKit, with Zenstack handling access control on top of Prisma. Postgres as DB.
Re:Bun v0.7.0 on Saturday July 22, 2023 @08:08AM (#36825528)
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?

Re:Mermaid Cheat Sheet on Thursday February 23, 2023 @06:14AM (#34909101)
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.

Re:Mermaid Cheat Sheet on Thursday February 23, 2023 @05:34AM (#34908899)
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

Re:Mermaid Cheat Sheet on Thursday February 23, 2023 @05:28AM (#34908866)
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).

Re:Mermaid Cheat Sheet on Thursday February 23, 2023 @05:25AM (#34908845)
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.

Re:Mermaid Cheat Sheet on Thursday February 23, 2023 @05:19AM (#34908803)
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.

Re:Mermaid Cheat Sheet on Thursday February 23, 2023 @03:56AM (#34908393)
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

Re:How to store your app's entire state in the url on Monday January 09, 2023 @01:21PM (#34313884)
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...

Re:Stop Validating Email Addresses with Regex (2012) on Wednesday April 20, 2022 @12:37PM (#31099530)
I've been using sam.sung@domain for them. First time I've come across this block in years of using this method.
Re:Include diagrams in your Markdown files with Mermaid on Monday February 14, 2022 @02:08PM (#30336680)
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.

Re:The State of Web Scraping in 2021 on Monday October 11, 2021 @01:31PM (#28830753)
If you don't want to install another extension, Playwright has built in support for recording.

npx playwright codegen wikipedia.org

https://playwright.dev/docs/next/codegen

Re:The Framework is the most exciting laptop I've used on Tuesday September 21, 2021 @02:44PM (#28608316)
It was from the WAN show. https://youtu.be/B7f3DTDsocA?t=339
Re:macOS in Svelte on Saturday August 14, 2021 @04:06AM (#28178959)
Taken from their homepage: https://svelte.dev/chat
I wasn't sure if a Lenovo Monitor Plugged in via VGA to a Dell Dock to my MBP 13" would support DDC.

MonitorControl wasn't able to control my Brightness, it just set it to lowest level. This made me realise that there was some support to DDC, I tried trouble shooting using ddctl which was able to set the values, but not poll it.

Finally tried Lunar (https://lunar.fyi/) and it works like a charm. It's more of a set it and forget approach and has a unique UI.

Adding a clear button to the product search might boost productivity.

Editing quantities from cart will also be helpful.