Live data from Hacker News

Bun’s New Crash Reporter

bun.sh

21–30 of 91 posts

Re: Bun’s New Crash Reporter

#21
So the argument for using this over a regular stack trace is that they don't have to ship megabytes of debug symbols. However they have seemingly just ignored the better option of only including function names in the debug table, which is obviously a much nicer option than having to use a web service to view you stack trace.

This isn't just a theoretical solution either, it's already implemented in LLVM: https://clang.llvm.org/docs/UsersManual.html#cmdoption-gline...

Re: Bun’s New Crash Reporter

#22
Bun is amazing, but I recently tried to make an http/2 server through fastify and was not able to:

     user@host:~/d/temp/server$ bun run index_fastify.js
     14 |   warned.add(feature), console.warn(new NotImplementedError(feature, issue));
     15 | }, $;
     16 |
     17 | class NotImplementedError extends Error {
     18 |   code;
     19 |   constructor(feature, issue) {
                                    ^
     NotImplementedError: node:http2 createServer is not yet implemented in Bun. Track the status & thumbs up the issue: https://github.com/oven-sh/bun/issues/887
      code: "ERR_NOT_IMPLEMENTED"

           at new NotImplementedError (internal:shared:19:27)
           at internal:shared:2:69
           at node:http2:48:53
           at getServerInstance (/Users/user/d/temp/server/node_modules/fastify/lib/server.js:342:16)
           at createServer (/Users/user/d/temp/server/node_modules/fastify/lib/server.js:25:18)
           at fastify (/Users/user/d/temp/server/node_modules/fastify/fastify.js:198:30)
           at /Users/user/d/temp/server/index_fastify.js:4:13
The linked issue is actually about implementing support for http/2 clients, which was already released in v1.0.13 (https://bun.sh/blog/bun-v1.0.13#http2-client-support). The NotImplementedError message should be updated to point to the issue for the server variant: https://github.com/oven-sh/bun/issues/8823

Implementing http/2 server support is in the top few feature requests (https://github.com/oven-sh/bun/issues?q=is%3Aissue+is%3Aopen...). It looks like once they ship this, a lot more people will be able to move over to Bun.

Re: Bun’s New Crash Reporter

#23
post #20

Did you know that bun needs to download 37 packages before the repl becomes available? No internet no repl for you. PS C:\Users\anon> bun repl bun-repl [6/6] error: FailedToOpenSocket downloading package manifest bun-repl error: bun-repl@latest failed to resolve Not a big deal, but I was expecting (and frankly excited) to have a single no-install executable to drop in my PATH and have it just work!

We haven’t prioritized implementing a repl yet. The current repl is a community-implemented bun-repl npm package. `bun repl` internally does the equivalent of `bunx bun-repl`

Re: Bun’s New Crash Reporter

#25

So the argument for using this over a regular stack trace is that they don't have to ship megabytes of debug symbols. However they have seemingly just ignored the better option of only including function names in the debug table, which is obviously a much nicer option than having to use a web service to view you stack trace. This isn't just a theoretical solution either, it's already implemented in LLVM: https://clan…

Another option on macOS/iOS is to ship just the LC_FUNCTION_STARTS section in the Mach-O binary. This is how symbolication can discover function names from system libraries even without full debug symbols on those platforms.

Re: Bun’s New Crash Reporter

#26
post #17

Earlier quoted context omitted.

Bun + uwebsocket cut my server costs and requirements significantly for my websocket app. It's a real delight to work with.

How did it cut your server costs - increased performance and therefore reduced load? Bun looks quite promising, but I've heard mixed feedback on it being a "drop in" replacement of node. Any experience with that aspect?

Perf gain mostly from uwebsocket is what it looks like.

Re: Bun’s New Crash Reporter

#27

So the argument for using this over a regular stack trace is that they don't have to ship megabytes of debug symbols. However they have seemingly just ignored the better option of only including function names in the debug table, which is obviously a much nicer option than having to use a web service to view you stack trace. This isn't just a theoretical solution either, it's already implemented in LLVM: https://clan…

These can still be large. I generally include them unconditionally because I think they bring value but most software does not.

Re: Bun’s New Crash Reporter

#29
post #3

So, anybody using Bun? Does it live up to hype?

It’s good unless you want a repl (they pretend to have one but it’s miserable: >6s latency all the time when it updates), or you plan to use any native modules. The error messages are also significantly worse than node’s. I used it for a bit, but node with ‘—loader tsx’ does everything I want nowadays with none of the downside. If I was building a simple server, perhaps with websockets, and I was sure it need native…

I too would use it if the REPL worked properly. JS developers are often used to working interactively - the browser/console workflow - and have come to rely on testing ideas or problems / solutions in the REPL interactively.

It's efficient, as you can test and narrow things down in isolation and figure out what is working or not-working very quickly. It's also a good way to try a new module, and this is reflected in docs that eg, use node's REPL as a demo.

One bizarre problem with bun's REPL at the moment, which can be quite the unexpected "gotcha", is the REPL itself seems to be cached, and it goes stale. It actually expects to be able to update itself online every day or so, or it breaks!

Yeah, well cool - unless you ever work offline. Eg, had you expected to work on a long flight and now half your dev workflow was broken, for no good reason. (And unfortunately bun's "--prefer-offline" flag had no effect.)

I don't want to criticise bun too much - it is incredibly fast, and has made other significant workflow enhancements.

But a REPL is a dealbreaker for some of us. I guess it's similar to hot code-reloading in compiled languages, you don't go back to the minutes-long compile-wait cycle for the kinds of problems that kind of workflow makes instantaneous.

Re: Bun’s New Crash Reporter

#30
post #19

Microsoft is really good at this BTW. At SQL Server we had mini dumps they were tiny stripped out of personal info and incredibly useful. And a full dump of a production SQL Server even at that time (15 years ago) would be a huge file - too big to move around.

Curious - was this for Microsoft internal services or customer deployments? If the latter, how did they know what was PII?
Post reply on HN