rtsao | 1 year ago | on: Speeding up the JavaScript ecosystem – Isolated Declarations
rtsao's comments
rtsao | 2 years ago | on: Yarn 4.0
I think Yarn Berry with node_modules linker is strictly better than Yarn 1.0, whereas PnP and zero installs involve tradeoffs that might not be right for everyone. There's a lot of great design decisions in Berry that gets muddled with all the PnP-related discussion. I will say Maël deserves a lot of credit for driving corepack, which makes version control of package management totally seamless. It's always been a total nightmare but now it's shockingly easy.
rtsao | 2 years ago | on: Apple Vision Pro: Apple’s first spatial computer
If the hardware is sufficiently good, eventually the software will come, which is probably why this initially targeting the pro market. I'm skeptical the current frameworks make it easy enough to build quality AR apps, but hopefully the difficulty will go down eventually (maybe with the help of AI).
rtsao | 2 years ago | on: Dashcam footage shows driverless cars clogging San Francisco
I believe this scenario was discussed as an argument for congestion pricing, serving as a vital solution to the tragedy of the commons exacerbated by self-driving cars.
rtsao | 3 years ago | on: Turbopack, the successor to Webpack
rtsao | 4 years ago | on: My journey for dual displays with my M1 Pro Mac (2021)
[1] http://www.goodway.com.tw/prodimg/edm/DBD1100.pdf
[2] https://dancharblog.wordpress.com/2021/02/05/usb4-tb4-docks/
rtsao | 4 years ago | on: Ask HN: Who is hiring? (January 2022)
Help develop the foundation for all web applications at Uber! Our team builds and maintains the developer tools, infrastructure, and frameworks that underpin the broad web app ecosystem serving our users (riders, drivers, eaters, shippers, carriers, and our internal operations & logistics teams).
If you’re passionate about developer experience and would be interested in helping advance our React/Node.js/GraphQL stack, apply here: https://www.uber.com/global/en/careers/list/108634/
rtsao | 4 years ago | on: A new public beta of GitHub Releases
By contrast, release notes are meant to be consumed by a much wider audience, who are chiefly concerned with the externally visible aspects of the project. Communication tailored to other maintainers (e.g. commits and PR titles) is rarely also optimal for this broader audience. This is why commit-based generated changelogs have a bad reputation: commits are meant for contributors—not customers—and thus tend to be useless.
This also explains why a good, dedicated CHANGELOG.md is usually so effective: unlike commits or PRs, it affords contribution authors a separate place to write for a broader, different audience. Another nice property of this method is the notes themselves within the CHANGELOG.md can be collaboratively reviewed and edited right within the context of the PR. This is a very helpful mechanism to ensure that release notes are high quality and to distribute the burden of writing release notes to those most familiar with the changes (as opposed to the person creating the release).
I think the ideal scenario is that on a per-PR basis, the "external" release notes are automatically scaffolded from existing metadata such as commits or PR titles (or even sophisticated means such as identifying which packages have changed or knowing if a breaking change has occurred as a result of type interface changes) which are later refined/edited during PR review. I think it would also be great if GitHub Releases themselves could go through a review process akin to PRs in order to help ensure high quality and facilitate collaborative writing of release notes.
rtsao | 5 years ago | on: Why Is Esbuild Fast?
[1]: https://github.com/evanw/esbuild/blob/master/docs/architectu...
rtsao | 5 years ago | on: Introducing Semgrep and r2c
Having a (fast) single tool that can accurately parse most commonly used programming languages is incredibly useful, but it requires the maintenance of dozens of grammars, which is difficult without a large community effort. Hopefully increased adoption means more accurate parsers and support for even more languages.
Tree-sitter powers syntax highlighting on GitHub.com and (soon) neovim and OniVim 2. Hopefully regex-based syntax highlighting is a thing of the past soon. If you haven't seen the Strange Loop conference talk on tree-sitter [2] yet, it's worth a watch.
I think a Prettier-like code formatter using tree-sitter would be cool, both in terms of potentially broader language support and native performance.
rtsao | 6 years ago | on: NPM Is Joining GitHub
The existing npm ownership model is markedly less clear and has led to several problems, including the transfer of package publishing rights to bad actors without anyone being aware. On the whole, npm accounts and orgs were always just an unnecessary abstraction that obscured the actual provenance of software, of which GitHub is the de facto source.
rtsao | 6 years ago | on: GitHub Actions now supports CI/CD, free for public repositories
rtsao | 7 years ago | on: Solve Less General Problems
rtsao | 7 years ago | on: Fusion.js: A Plugin-Based Universal Web Framework
* Wrap the application component tree in a React context provider component (which provides an instance that components will render styles into)
* On the server, extract rendered styles after SSR from provided instance and add necessary markup into the server-rendered page
* On the client, hydrate the provided instance from the server-rendered styles
* On the server and in development, set up a route handler that serves two assets, a web worker implementation and associated WebAssembly binary [1]
* On the client and in development, fetch and execute the web worker. Normally, this would be a somewhat difficult integration because of CSP-related issues with web workers, but because the plugin sets up its own route handlers, the requests will be same-origin, sidestepping most CSP issues that normally arise. Additionally, Fusion plugins can also modify response headers for requests, so if needed, CSP headers could also be set appropriately.
All the code to do this actually is related to a single concern, namely styling, but in a universal web app, such things typically requires the involvement of many different parts of the application lifecycle and both server and client code. Fusion plugins allow you to slice up the independent parts of your application logic in this fashion, somewhat analogous to how colocating HTML/CSS/JS for individual components in CSS-in-JSX is often much nicer than splitting apart component implementations across separate HTML/CSS/JS files.
[1]: This web worker generates debug CSS at runtime that maps rendered CSS to the source styled component definitions in JS using source maps, making it easier to reverse map the rendered CSS to the source CSS-in-JS when inspecting the DOM with the styles pane. https://github.com/rtsao/css-to-js-sourcemap
rtsao | 9 years ago | on: Crafting a high-performance TV user interface using React
rtsao | 9 years ago | on: Show HN: Styletron – Virtual CSS
rtsao | 9 years ago | on: Show HN: Styletron – Virtual CSS
rtsao | 9 years ago | on: Show HN: Styletron – Virtual CSS
It was also built with the excellent Inferno.js [1] library to render static pages while also having a super fast full client-side app, kinda like what Gatsby.js [2] does with React.
rtsao | 9 years ago | on: Show HN: Styletron – Virtual CSS
The point of CSS-in-JS and CSS modules isn't that it's necessary, just that it makes avoiding these sorts of problems much easier.
rtsao | 9 years ago | on: Show HN: Styletron – Virtual CSS
I'll try my best to break it down succinctly:
1) Historically, .d.ts generation is slow because it requires the full TypeScript type checker in order to correctly handle all cases (e.g. exported functions with inferred return types)
2) However, if types were to be fully explicit, then .d.ts generation could be performed without a full type checker (i.e. by a faster compiler via mere syntax transformation)
3) The isolatedDeclarations flag causes the TS compiler to trigger errors when any exports would require inference in order to generate .d.ts
4) Thus, the isolatedDeclarations flag can be used to guarantee compatibility with faster, simpler .d.ts generation using syntax-based transformation
5) A consequence of simpler .d.ts generation is that it can be trivially done in parallel, which can be helpful for large monorepos