Orange Site: https://news.ycombinator.com/item?id=31993429
Tell me more about Bun
Bun is a modern JavaScript runtime like Node or Deno. It was built from scratch to focus on three main things:
Start fast (it has the edge in mind).
New levels of performance (extending JavaScriptCore, the engine).
Being a great and complete tool (bundler, transpiler, package manager).
Bun is designed as a drop-in replacement for your current JavaScript & TypeScript apps or scripts --- on your local computer, server or on the edge. Bun natively implements hundreds of Node.js and Web APIs, including ~90% of Node-API functions (native modules), fs, path, Buffer and more.
The goal of Bun is to run most of the worlds JavaScript outside of browsers, bringing performance and complexity enhancements to your future infrastructure, as well as developer productivity through better, simpler tooling.
Batteries included
Web APIs like fetch, WebSocket, and ReadableStream are builtin
node_modules bun implements Node.js' module resolution algorithm, so you can use npm packages in bun.js. ESM and CommonJS are supported, but Bun internally uses ESM.
In bun.js, every file is transpiled. TypeScript & JSX just work.
bun supports
"paths"
,"jsxImportSource"
and more from tsconfig.json filesBun.Transpiler bun's JSX & TypeScript transpiler is available as an API in Bun.js
use the fastest system calls available with Bun.write to write, copy, pipe, send and clone files.
bun.js automatically loads environment variables from .env files. No more
require("dotenv").load()
bun ships with a fast SQLite3 client builtin bun:sqlite
Node-API bun.js implements most of Node-API (N-API). Many Node.js native modules just work.
bun:ffi call native code from JavaScript with bun's low-overhead foreign function interface
node:fs node:path bun.js natively supports a growing list of Node.js core modules along with globals like Buffer and process.
How does Bun work?
Bun.js uses the JavaScriptCore engine, which tends to start and perform a little faster than more traditional choices like V8. Bun is written in , a low-level programming language with manual memory management.
Most of Bun is written from scratch including the JSX/TypeScript transpiler, npm client, bundler, SQLite client, HTTP client, WebSocket client and more.
Why is Bun fast?
An enormous amount of time spent profiling, benchmarking and optimizing things. The answer is different for every part of Bun, but one general theme: 's low-level control over memory and lack of hidden control flow makes it much simpler to write fast software. Sponsor the Zig Software Foundation
Jump in the discussion.
No email address required.
Jump in the discussion.
No email address required.
More options
Context
will this make my minecraft go faster
Jump in the discussion.
No email address required.
No. Minecraft is written in Java which is a completely different thing.
Jump in the discussion.
No email address required.
minecraft got scripts too
Jump in the discussion.
No email address required.
More options
Context
More options
Context
More options
Context
So still slower than python? webcels stay losing
Jump in the discussion.
No email address required.
Isn't it faster than python because of JIT and some other things (for general stuff without numpy and whatnot)?
Jump in the discussion.
No email address required.
Honestly no idea at this point. I stopped being much of a codecel years ago. That being said if ur a based chad u write 90% of ur code in C and D and just use python to glue it together
Jump in the discussion.
No email address required.
FYI you can now run JS on embedded systems thanks to espruino. Was amazed to see it.
Jump in the discussion.
No email address required.
God is dead and we have killed him
Jump in the discussion.
No email address required.
Yeah that was about my reaction too
Jump in the discussion.
No email address required.
More options
Context
More options
Context
More options
Context
More options
Context
More options
Context
More options
Context
those zoomers need to seriously stop with those 1 line installers that pipe their script from the web directly into the interpreter
Jump in the discussion.
No email address required.
wHy iS tHiS a bAd iDeA??? says the zoomer as they download zuorat for the 55th time that day
Jump in the discussion.
No email address required.
More options
Context
More options
Context
What's difference between engine and runtime? How can runtime get so much more performance with same engine?
Jump in the discussion.
No email address required.
More options
Context
they will just give us 20x the JavaScript
Jump in the discussion.
No email address required.
More options
Context
Snapshots:
archive.org
archive.ph (click to archive)
ghostarchive.org (click to archive)
https://news.ycombinator.com/item?id=31993429:
archive.org
archive.ph (click to archive)
ghostarchive.org (click to archive)
Node-API:
archive.org
archive.ph (click to archive)
ghostarchive.org (click to archive)
fetch:
archive.org
archive.ph (click to archive)
ghostarchive.org (click to archive)
WebSocket:
archive.org
archive.ph (click to archive)
ghostarchive.org (click to archive)
ReadableStream:
archive.org
archive.ph (click to archive)
ghostarchive.org (click to archive)
Node-API:
archive.org
archive.ph (click to archive)
ghostarchive.org (click to archive)
Node-API (N-API):
archive.org
archive.ph (click to archive)
ghostarchive.org (click to archive)
JavaScriptCore:
archive.org
archive.ph (click to archive)
ghostarchive.org (click to archive)
to start:
archive.org
archive.ph (click to archive)
ghostarchive.org (click to archive)
Sponsor the Zig Software Foundation:
archive.org
archive.ph (click to archive)
ghostarchive.org (click to archive)
Jump in the discussion.
No email address required.
More options
Context