Bun v1.3.9

Bun v1.3.9

63 pointsby tosh2026. 2. 8.18 comments
원문 보기 (bun.com)

요약

Bun v1.3.9은 상당한 성능 향상과 새로운 기능을 도입합니다. 주요 업데이트에는 더 나은 출력 라벨링을 갖춘 향상된 동시 및 순차 스크립트 실행 기능, net.Server를 통한 올바른 HTTP/2 연결 업그레이드, 자동 모의 복원을 위한 Symbol.dispose 지원이 포함됩니다. 또한 NO_PROXY 처리 개선, --cpu-prof-interval 플래그 추가, --compile에서 ESM 바이트코드 지원, ARMv8.0 aarch64 CPU 충돌 수정 등이 이루어졌습니다. Markdown 렌더링, AbortSignal.abort(), JavaScriptCore의 RegExp 처리, 다양한 문자열 및 Set/Map 작업에서도 추가 최적화가 이루어졌습니다. Node.js 호환성 및 Web API 수정도 포함되어 있습니다.

댓글 (16)

giorgioz2시간 전
Is it more common in English to use there terms Parallel and Sequential or Parallel and Series ? Made a React Library to generate video as code and named two components <Parallel> <Series> I was wondering if those were two best terms two use...
richbell2시간 전
Parallel and Series makes sense to me; it's also the terminology used for electrical circuits.
smlavine2시간 전
When talking in terms of software parallelism, "parallel" and "sequential" are more common to describe, for example, multi-threaded vs. single-threaded implementations.
gradys2시간 전
Both would be understood and are roughly interchangeable.

"Sequential" feels more appropriate to me for the task runner scenario where we wait for one task to finish before running the next.

"Series" suggests a kind of concurrency to me because of the electrical circuit context, where the outputs of one are flowing into the next, but both are running concurrently. Processes that are Unix piped into each other would be another thing that feels more like a "series" than a "sequence".

cornstalks2시간 전
I think your average person knows what sequential means but might not remember what series means. Personally I always remember the meaning of series in “parallel vs series” because it must be the opposite of parallel. I’m not proud of the fact that I always forget and have to re-intuit the meaning every time, but the only time I ever see “series” is when people are talking about a TV show or electronics.
harshreality2시간 전
Electric engineering talks about parallel and series. (including the old parallel and serial ports on computers, before almost everything became serial)

Programming talks about parallelism or concurrency or threading. (single-threading, multi-threading)

Or synchronous and asynchronous.

The legal system talks about concurrent and consecutive.

Process descriptions might use "sequential" rather than consecutive or series.

"Linear" is another possibility, but it's overloaded since it's often used in reference to mathematics.

johnfn2시간 전
Genuine question out of curiosity. Why do I want parallel and sequential when I can just write a simple bash script to accomplish the same thing? Is there some additional complexity I’m missing?
runjake2시간 전
This is cleaner and you don't have to write a bash script. It's one (well, several: the script, bash, and it's dependencies) less thing, which is important in containers and for scale.
an_ko2시간 전
It lets developers on Windows also build and test your package in parallel mode. If you make your build scripts bash, they're Linux-only.
paulddraper2시간 전
A few reasons.

1. Minor speed boost from not needing bun multiple times (or extract the build/test/lint commands from package.json).

2. You can query/filter commands. E.g. run all my tests (both unit and integration).

3.You avoid needing a separate Bash install (for Windows).

re-thc1시간 전
> when I can just write a simple bash script to accomplish the same thing

At this point you don't need most things...

rafaelmn1시간 전
I get where you're coming from and if this was a package I'd agree - but having this built in/part of the tooling is nice - one less dependency - bash isn't as ubiquitous as you assume.
btown1시간 전
As a note here, there are a lot of resources that make bash seem incredibly arcane, with custom functions often recommended. But a simple interruptible script to run things in parallel can be as simple as:

    (trap 'kill 0' INT TERM; cmd1 & cmd2 & cmd3 & wait)
Or, for 1+2 sequentially, in parallel with 3+4 sequentially:

    (trap 'kill 0' INT TERM;
      (cmd1 && cmd2) &
      (cmd3 && cmd4) &
      wait
    )
(To oversimplify: The trap propagates the signal (with 'kill') to the process group 0 made by the () parens; this only needs to be set at the top level. & means run in background, && means run and continue only on success.)

There are other reasons one might not want to depend on bash, but it's not something to be afraid of!

spankalee1시간 전
Parallel and sequential, especially at the command level, are really the wrong abstractions for running scripts. If you have multiple packages, each with builds, there's a high chance you have dependencies and multiple packages depending on common ones.

What you really want is a way for scripts to describe their dependencies, and then the runner figures out what order to run them is, and cache scripts that don't need to be run because their inputs didn't change.

Wireit[1] is an npm script runner that adds that incrementally on top of package.json. I can't manage an npm monorepo without it now.

Deno started integrating the idea directly into their built-in script runner. I think this is an important enough feature that more runtimes should follow Deno's lead.

[1]: https://github.com/google/wireit