4 ms·
400mb executable for a terminal text editor? Modern developers have lost their mind
by WhereIsTheTruth 10mo ago
400mb executable for a terminal text editor?
Modern developers have lost their mind
- wg0 10mo agoIs it 400mb? Could be V8 for plugins.
- _sinelaw_ 10mo agoThanks for reminding me. Unfortunately yes, it's because of v8 (for Deno). For extensions, the choice was either TypeScript (and get this bloat) or go with Lua and a much smaller binary (but less popular language). But - I just realized stripping it brings it down to 76MB so I guess that's ok! Will push a commit :)
- wg0 10mo agoGreat! Just wondering maybe Bun (different JS engine) could do the job for plugins.
- _sinelaw_ 10mo agoAnthropic Bun? :) I didn't realize it was an engine as well. I can take a look but we should wait and see where the acquisition takes it
- 20after4 10mo ago"Bun is a new JavaScript runtime built from scratch to serve the modern JavaScript ecosystem. It has three major design goals: Speed. Bun starts fast and runs fast. It extends JavaScriptCore, the performance-minded JS engine built for Safari. Fast start times mean fast apps and fast APIs. Elegant APIs. Bun provides a minimal set of highly-optimized APIs for performing common tasks, like starting an HTTP server and writing files. Cohesive DX. Bun is a complete toolkit for building JavaScript apps, including a package manager, test runner, and bundler. Bun is designed as a drop-in replacement for Node.js. It natively implements thousands of Node.js and Web APIs, including fs, path, Buffer and more." - From the homepage[1] - it's a shame they use semantic html but no anchors for direct linking. 1. https://bun.com/ https://bun.com/
- Defletter 10mo agoI think they're referring to bundling Bun into another program to use Bun as a JS runtime: https://github.com/oven-sh/bun/issues/12017 https://github.com/oven-sh/bun/issues/12017
- 20after4 10mo ago"Bun itself is MIT-licensed. JavaScriptCore Bun statically links JavaScriptCore (and WebKit) which is LGPL-2 licensed. WebCore files from WebKit are also licensed under LGPL2." License compatible, probably safe from a rug pull?
- wg0 10mo agoYes but I believe it would be a safe and lighter choice. The rug pull on deno is more imminent than elsewhere.
- _sinelaw_ 10mo agoMaybe I should see if I can support either one (e.g. cargo feature flag) for insurance
- WhereIsTheTruth 10mo ago> For extensions, the choice was either TypeScript (and get this bloat) or go with Lua and a much smaller binary (but less popular language). Incredible, the technical choice got overridden by popularity, leading straight to bloat
- _sinelaw_ 10mo agoI see extension language choice as a user-facing UX decision, and convenience is a leading concern.
- WhereIsTheTruth 10mo agoI'd argue using lua is is more convenient than typescript What ever suits you, you didn't mind shipping a 400mb executable after all, so what do i know