HNHacker News
TopNewBestAskShowJobs

theThree

236 karma · joined March 16, 2024

submissionscomments
theThree··on I tried Gleam for Advent of Code
I don't know if I'm the only one experiencing this: It's too hard to find the download link from their website.
theThree··on Pipelining in psql (PostgreSQL 18)
I developed a JS pg client that use pipeline mode by default: https://github.com/stanNthe5/pgline
theThree··on Node.js is able to execute TypeScript files without additional configuration
I'm using Bun, but I avoid using any Bun.* function, because I don't want to bind my typescript project to a runtime.
theThree··on Modern Node.js Patterns
It's still not ready for use. I don't care Enum. But you can not import local files without extensions. You can not define class properties in constructor.
theThree··on Run TypeScript code without worrying about configuration
It still have issues. Example: `import foo from "./Foo"` doesn't work. You have to `import foo from "./Foo.ts"`
theThree··on A job queue in two lines of JavaScript
Something like this?

async function runTasks(tasks: Job[]) { for (let task of tasks) { try { await task() } catch (e) { } } }

theThree··on 10 Years of Betting on Rust
Async/await is the only thing prevent me from using Rust.
theThree··on A 10x Faster TypeScript with Anders Hejlsberg [video]
Good to see there is already a preview version (@typescript/native-preview). Can tsc/ts-node use it now?
theThree··on Ask HN: What are you working on? (May 2025)
The fastest PostgreSQL Node driver written in TypeScript: https://github.com/stanNthe5/pgline
theThree··on A Go string concatenation library that is more efficient than strings.Builder
Will do that. Thank you.
theThree··on Automatically add missing "async/await" keywords to your TypeScript code
You can still control it by adding "//no-await". In fact, the "//no-await" makes me feel more clear.
theThree··on Deno's Decline
From my own testing. In high-concurrency scenarios, their performance is roughly the same, and Node uses less memory. When it comes to string concatenation, Go has to do a lot of extra work (no "+",Estimating string length, Preallocate memory ) just to catch up with the speed of Node (simply using "+").
theThree··on Deno's Decline
Maybe at some point. Their vsCode extension has 1M downloads, while Bun has 155k.
theThree··on Deno's Decline
In web backend, Node.js is not slower than Go.
theThree··on On JavaScript's Weirdness

    function f1(a:number, b:number, c:number, d:number) {
        [a, b] = [b, a]
        [c, d] = [d, c]
        console.log(a, b, c, d)
    }
For the above codes Typescript gives error message: Type 'number[]' is not assignable to type 'number'.
theThree··on Go Optimization Guide
>That means you have 1 GiB in the pool.

This only happen when every request last 1 second.

theThree··on DeepSeek surpasses ChatGPT in new monthly visits
Chinese are unable to visit ChatGPT.
theThree··on TypeScript types can run DOOM [video]
Can anyone explain to me what is "TypeScript types“?
theThree··on Go Is a Well-Designed Language
The appeal of Go is goroutine.
theThree··on Go Is a Well-Designed Language
> a, b := 20, 30 // accepted. why ??

I guess it is a dept of error handling. Otherwise you have to write "foo,err1 := Foo();bar,err2 := Bar(),.."

theThree··on Context should go away for Go 2 (2017)
Context is useful in many cases. In go I have to pass ctx from func to func. In nodejs I can easily create&use context by using AsyncLocalStorage (benefit of single-thread).
theThree··on New Architecture is here
OK,just now I tested the new version and it is still slow.

Use "npx create-expo-app@latest --template default@beta" to install new version. Start with production mode, using android device, it takes about 300ms to render 2000 Views. The same test on React web is still much faster.

theThree··on New Architecture is here
Only the "recommended" section.
theThree··on New Architecture is here
I did a performance test last year, rendering thousands of views, and Flutter's rendering speed was 5 times faster than React Native. I wonder if this version will be improved after the update. Interestingly, I used React on the web to render the same number of views, and its speed was much faster than React Native.
theThree··on Bun 1.1
When will `worker` API be ready for production?