HN user

alixanderwang

1,481 karma

Founder of https://terrastruct.com

alex at terrastruct dot com

Posts35
Comments226
View on HN
d2lang.com 11mo ago

D2 (text to diagram tool) now supports ASCII renders

alixanderwang
441pts73
softwarediagrams.com 2y ago

Software Architecture Diagrams Gallery

alixanderwang
2pts0
softwarediagrams.com 2y ago

Gallery of software diagrams

alixanderwang
1pts0
d2lang.com 3y ago

Text to PowerPoint Presentations

alixanderwang
3pts0
d2lang.com 3y ago

Animated Diagrams with Text

alixanderwang
1pts0
github.com 3y ago

D2 0.3: text to animated diagrams

alixanderwang
9pts0
github.com 3y ago

D2 v0.2.5 (text-to-diagram language)

alixanderwang
1pts0
d2lang.com 3y ago

Hand-Drawn Diagram Aesthetic

alixanderwang
2pts0
blog.logrocket.com 3y ago

Guide to diagramming with D2 (text-to-diagram language)

alixanderwang
2pts2
github.com 3y ago

D2 v0.2 (open-source text-to-diagram language)

alixanderwang
2pts0
github.com 3y ago

D2 v0.2.2 (text-to-diagram language)

alixanderwang
3pts0
d2lang.com 3y ago

Dark Mode Responsive Diagrams

alixanderwang
2pts0
github.com 3y ago

Diagrams that change colors for dark mode preference

alixanderwang
1pts0
github.com 3y ago

D2 0.2.1

alixanderwang
2pts0
www.terrastruct.com 3y ago

Deep dive into diagram layout engines: Minimizing hierarchical edge crossings

alixanderwang
70pts13
terrastruct.com 3y ago

Diagram layout engines: Minimizing hierarchical edge crossings

alixanderwang
2pts0
terrastruct.com 3y ago

Generating diagrams programmatically

alixanderwang
2pts0
terrastruct.com 3y ago

Generate diagrams programmatically with D2

alixanderwang
9pts2
github.com 3y ago

Athens (open-source Roam Research) is no longer being actively maintained

alixanderwang
31pts8
github.com 3y ago

D2 v0.14

alixanderwang
1pts0
play.d2lang.com 3y ago

D2 Playground – Online text-to-diagram runner

alixanderwang
2pts0
github.com 3y ago

D2 0.1

alixanderwang
2pts0
github.com 3y ago

D2, a diagram scripting language that turns text to diagrams, is now open source

alixanderwang
629pts155
github.com 3y ago

Show HN: byelinear – Migrate from Linear to GitHub Issues

alixanderwang
1pts0
www.youtube.com 4y ago

Declarative Diagramming demo

alixanderwang
3pts0
news.ycombinator.com 5y ago

Ask HN: Router recommendation to replace Ubiquiti?

alixanderwang
10pts16
terrastruct.com 5y ago

Terrastruct Is 1.0

alixanderwang
2pts0
terrastruct.com 5y ago

Terrastruct Is 1.0

alixanderwang
2pts0
engchannel.com 6y ago

Show HN: Service for aspiring programers to get code reviews from experts

alixanderwang
3pts3
terrastruct.com 6y ago

Functional testing with your database in Go

alixanderwang
1pts0

I love this hahah. Diagrams as a comic book.

The urge to add silly stuff like this vs working on v2 of sequence diagram that has much more demand is often tempting.

The purpose is to make use of a dimension of the visual space previously unused to make diagrams more expressive.

Even if it's something simple like a node turning from green to red to convey it's shutting down. Maybe something like that before animations would be a text saying, "this node will shut down now", which takes reading/zooming into text.

I also think it can, if used well, result in diagrams that ⋆⋆spark joy⋆⋆. People like to see diagrams like that, even if it's not more utilitarian. I think sketch mode is an example of this. It changes the font to an objectively less readable one, yet I often hear people make all their D2 diagrams in sketch mode.

At the very least, assuming you're correct the current slow infrastructure is by design, it seems good there are options.

A business can choose if they want

1. slow, pay for customer support and fraud protection

2. instant, lower cost, mistakes are irreversible

Yeah that one's a community plugin vs an officially maintained one, which can have a range of activity from graveyard to some being maintained better than many of our official ones. That maintainer seems active on GitHub though and the d2-emacs plugin is his top pinned repo (https://github.com/andorsk), I think he'd be receptive if you let him know your interest!

1. It depends on what you value =). For some, those 2 you mentioned are enough. For others, it can be something like the our CLI doesn't require a chromium browser to render SVGs (https://news.ycombinator.com/item?id=31275754). It doesn't cover every difference, but we made a little comparison site if it helps: https://text-to-diagram.com

2. I'm not trying to advertise our paid product in this post about the open source product, but since you mentioned it, we make an IDE that adds the ability to lock in positions and dimensions: https://docs.terrastruct.com/tour/freehand

Unfortunately not, I've tried reaching out to GH folks but no dice. However it should be noted that d2.js, which enables client-side renders, didn't really become usable until this month and still isn't really officially released (kind of hidden). So, we'll see if the official release (soon™) changes things. If any D2-enjoyers reading this knows anyone on the GH frontend team, plz bend their ear =)

It does now! (As of a week ago)

Check out the network tab in the d2 playground. It's powered by d2.js, a wrapper around a wasm port of d2, which we've recently been working on. Not super officially ready yet but soon to be, and will be a separate announcement.

Good system design 11 months ago

I’m often alone on this. Engineers look at complex systems with many interesting parts and think “wow, a lot of system design is happening here!” In fact, a complex system usually reflects an absence of good design.

For any job-hunters, it's important you forget this during interviews.

In the past I've made the mistake of trying to convey this in system design interviews.

Some hypothetical startup app

Interviewer: "Well what about backpressure?"

"That's not really worth considering for this amount of QPS"

Interviewer: "Why wouldn't you use a queue here instead of a cron job?"

"I don't think it's necessary for what this app is, but here's the tradeoffs."

Interviewer: "How would you choose between sql and nosql db?"

"Doesn't matter much. Whatever the team has most expertise in"

These are not the answers they're looking for. You want to fill the whiteboard with boxes and arrows until it looks like you've got Kubernetes managing your Kubernetes.

Played around with it for a serious task for 15 mins. Compared to Claude Code:

Pros:

- Beautiful UI

- Useful sidebar, keep track of changed files, cost

- Better UX for accepting changes (has hotkeys, shows nicer diff)

Cons:

- Can't combine models. Claude Code using a combination of Haiku for menial search stuff and Sonnet for thinking is nice.

- Adds a lot of unexplained junk binary files in your directory. It's probably in the docs somewhere I guess.

- The initial init makes some CHARM.md that tries to be helpful, but everything it had did not seem like helpful things I want the model to know. Simple stuff, like, my Go tests use PascalCasing, e.g. TestCompile.

- Ctrl+C to exit crashed my terminal.

I work on the D2 project ([0]) and we switched from other Javascript runners (v8go) to Goja. Using a JS runtime with a dependency on cgo means your Go program loses the (huge) benefit of cross-compiling to different architectures, since at build time it gets linked to the current system's libc.

If you're interested in some production code with Goja, this is our code for calling RoughJS ([1]) from Go in order to produce the hand-drawn diagram look: [2]

[0] https://github.com/terrastruct/d2

[1] https://roughjs.com/

[2] https://github.com/terrastruct/d2/blob/master/d2renderers/d2...

No worries at all, the API is definitely a bit hidden. Anyway, best of luck and feel free to reach out if you want to chat diagrams!

If you'd like to try it out on a specific repo, you can always use our extension for further analysis.

VSCode extension marketplace doesn't have the best security rails or reputation for security, and with this being closed source, just personally, installing and running it on my machine isn't something I'm comfortable doing.

The idea is that CodeViz can replace or augment search and directory tree by providing a more intuitive interface for navigation!

That to me is a different goal than the one in your post (maybe it's just phrasing or I didn't understand the OP correctly), and is something I'd be excited to have!

ideally the definition of an architecture diagram would be rigorous enough that there is no ambiguity

Rigor is a big "if" in software ;). See: UML's attempt. C4 is some very loose guidelines. IIRC, a big part of its attraction is the lack of rigor/formal standards.

Anyway, best of luck! Feel free to reach out if you'd like to chat diagrams