Live data from Hacker News

Figma’s Journey to TypeScript

figma.com

131–140 of 257 posts

Re: Figma’s Journey to TypeScript

#131
I like TypeScript and we have a full-stack system on TypeScript but it's not perfect. Configuring TypeScript for monorepos is a nightmare. Having to make sense of it with internal packages under a pnpm monorepo requires lots of manual tsconfig.json work to make all of the paths work with each other. And our production toolchain was basically unmaintainable until the excellent tsx package became available.

It's also crazy slow. We're having issues with Zod where it slows down our TypeScript language server performance significantly, so as a result we've had to introduce project references and disable project reference redirects.

All-in-all, there's plenty of work to be done to make TypeScript better. Especially in monorepos, and especially in making it performant.

Re: Figma’s Journey to TypeScript

#132
post #85

Off topic: Does anyone know of any sites made with Figma so I can see what the UX is like? As a user I don't care about DX if the resulting UX is bad.

You can safely assume everything that comes out of Microsoft is designed with Figma.

Re: Figma’s Journey to TypeScript

#133

Earlier quoted context omitted.

unbelievably snappy until you build something complex with complex components that have a lot of hidden variants, exponentially scales the number of existing layers and it goes dogshit with <10 fps, lag, and screen freezes (even on apple chip)

That sounds more like a "Doc, it hurts when I do this" problem though.

Yes, but it’s hard to explain that to a designer without technical background.

Re: Figma’s Journey to TypeScript

#134
post #51

Earlier quoted context omitted.

It happened in the PHP community as well, facebook being the poster child, but Yahoo also had a fair number of internal optimizations and I saw a few other companies tweak their way to get better perf/security. Then comes a point where the community catches on and has bigger momentum than the company, so it makes sense to move to the standard implementation. I'd kinda see Google's Borg -> k8s move as slightly similar…

That is an impressive misrepresentation of history. PHP and its community were dying by the time FB used it. People here on HN kept talking php down. In 2014 FB made their own flavour of php with a bunch of perf features, called hack. Eventually a lot of the perf features hack made its way into php. FB is still on its own flavour. Php community is still dying.

You’re crazy if you think PHP is dying. Development on the language is steadily pushing forward with big QoL improvements coming to 8.4 later this year.

The popular frameworks are still growing steadily and WordPress is starting to slowly shift off some of its stranglehold on old versions now that most webhosts don’t even offer old versions. That said, even Wordpress will work out of the box with old versions (they just don’t write new features against new PHP versions).

This is arguably the most exciting time to be a PHP dev!

Re: Figma’s Journey to TypeScript

#135
post #109
post #102

Earlier quoted context omitted.

But are the designs lean or bloated. If Figma helps building lean designs it's good otherwise not. Designers tend to put too much useless parts into sites, like unnecessary transparencies and animations.

that's like asking if a pen or keyboard lead to bloat. depends on who's using them.

More like if AI leads to spam or if guns kill people.

The latter one is harder if you only have a knife instead of an assault rifle.

Re: Figma’s Journey to TypeScript

#137
post #131

I like TypeScript and we have a full-stack system on TypeScript but it's not perfect. Configuring TypeScript for monorepos is a nightmare. Having to make sense of it with internal packages under a pnpm monorepo requires lots of manual tsconfig.json work to make all of the paths work with each other. And our production toolchain was basically unmaintainable until the excellent tsx package became available. It's also c…

Do note that Zod is a bit of an outlier in how slow it can make type checking, e.g. https://dev.to/nicklucas/typescript-runtime-validators-and-d... one of the tests hits nearly 300ms, but no other library even touches 100ms.

Re: Figma’s Journey to TypeScript

#138

Earlier quoted context omitted.

Because things like proxies exist, I guess. Also, what's even more crazy is that destructuring {0: foo, 1: bar} can be faster in some javascript engines when destructuring an array with two or three element.

Quite a bit faster it looks like: https://jsbench.me/6zlvrupqmj/1

What a cool website!

Re: Figma’s Journey to TypeScript

#139
post #91

Earlier quoted context omitted.

It's ironic. For the past 5 years I've been writing type strict PHP. People love to shit on PHP yet I found that when I started using strict types my code quality improved, amount of lines needed to produce a result decreased, and necessary unit tests to produce the same result also decreased. Then a few months ago I decided to write a TS project from scratch. For the record I have 18 years of JavaScript experience.…

Yes, so on the only sizeable TS project I did (which was a library, to be used by other teams) I bypassed webpack entirely and went for a mixture of tsc and esbuild. But knowing to steer clear of webpack (or even - that you can!) is a barrier.

Yep. Webpack is absolutely terrible but still unfortunately seems to have a lot of mindshare.

Re: Figma’s Journey to TypeScript

#140

Earlier quoted context omitted.

Can you elaborate what you consider "crutches" in this case?

They had a custom language giving them full flexibility to achieve making a product in the browser that put them ahead of everyone else, and instead of embracing that, they throw it out to be able to hire of the shelve developers to code in a language that doesn't let them move freely. Typescript is like crutches in the sense that it might support you in not falling, but you only really need them if you're crippled i…

> They had a custom language giving them full flexibility to achieve making a product in the browser that put them ahead of everyone else

From the article it sounds like it was only used for the prototyping system so a single code base could run in the iOS client and the Web client.

I believe the main UI of Figma and what makes it so performant and magical to use is C++ https://www.figma.com/blog/webassembly-cut-figmas-load-time-...

Post reply on HN