Live data from Hacker News

Bun's experimental Rust rewrite hits 99.8% test compatibility on Linux x64 glibc

twitter.com

551–560 of 754 posts

Re: Bun's experimental Rust rewrite hits 99.8% test compatibility on Linux x64 glibc

#551

Earlier quoted context omitted.

zig is unmanaged memory. But rust also allows memory leaks, and they're not uncommon in large, complex programs. So this rewrite will not necessarily control for that.

What language doesn't allow memory leaks?

There are two kinds of memory leaks: forgotten manual freeing (all references are gone, but allocation is not) and forgetting to get rid of references that keeps an allocation alive. Both are a kind of logical error, but the first is mostly possible in languages with manual memory management. The second one is a universal logical error (only programmer knows which live references are really needed).

Re: Bun's experimental Rust rewrite hits 99.8% test compatibility on Linux x64 glibc

#552
post #533

Earlier quoted context omitted.

What's the human form of a video game ?

Board games? All sorts of toys?

Well not really, since the board game itself doesn't need a paid human to work. It's been crafted by a human, but video games are also crafted by (arguably many more) humans. The closest would be escape games, or larger scale games maybe

Re: Bun's experimental Rust rewrite hits 99.8% test compatibility on Linux x64 glibc

#554
post #73

Earlier quoted context omitted.

It is basically Modula-2 / Object Pascal with C like syntax. While bounds checking, improved argument passing, typed pointers, proper strings and arrays are an improvement over C, it still suffers from use after free cases. C++ already prevents many of those scenarios, at least for those folks that don't use it as a plain Better C, and actually make use of the standard library in hardned mode. When not, naturally is…

> Then there is the whole point that Zig is not yet 1.0, and who knows what will still change until then. Seems like their luck finally ran out. For the longest time, they were getting all kinds of passes, as if a post 1.0 language, that others don't get. 10 years is quite a long time not to hit 1.0 or still be into beta breaking changes. Though I think that (the luck) was significantly aided by their perpetual and o…

Yeah, pity that D somehow lost its adoption opportunity.

Now you can get most of it via C# AOT or Swift, with much better ecosystem.

Still, it is part of the official GCC and LLVM frontends, so there is that.

Re: Bun's experimental Rust rewrite hits 99.8% test compatibility on Linux x64 glibc

#555
post #111
post #91

Earlier quoted context omitted.

When Microsoft rewrote it in go, there was a comment from one of the leads that they chose it over rust because of the similarity in paradigms (garbage collection, etc), and that using rust would've been more difficult, requiring a lot of "hoop jumping". Now that you've done it... Thoughts?

Is GC useful for a static type checker? Or did they make a new runtime?

tyscript compiler is a cli tool. and is run for short periods of time. GC collection and memory leaks should be least of issue to look for

Re: Bun's experimental Rust rewrite hits 99.8% test compatibility on Linux x64 glibc

#556
post #308
post #73

Earlier quoted context omitted.

It is basically Modula-2 / Object Pascal with C like syntax. While bounds checking, improved argument passing, typed pointers, proper strings and arrays are an improvement over C, it still suffers from use after free cases. C++ already prevents many of those scenarios, at least for those folks that don't use it as a plain Better C, and actually make use of the standard library in hardned mode. When not, naturally is…

You would like the T3X language as an exercise to port stuff from Free Pascal too it. In a near future I plan to port two libre text adventures with it, Beyond the Titanic and Supernova. If it fits under T3X, it might run in 'high end' CP/M systems out there. https://t3x.org/t3x/0/index.html https://t3x.org/t3x/0/t3xref.html Beyond these Curses simple games, there's a 6502 assembler and disassembler among a Kim-1 sim…

Have to look into it, thanks.

Re: Bun's experimental Rust rewrite hits 99.8% test compatibility on Linux x64 glibc

#557

I suspect that the test suite isn't that great tho. Bun has so many different behaviors compared to other JS engines, sometimes just plain wrong or contradicting the spec. Test suite didnt catch those.. Not sure how much I trust the rewrite :)

Notably, Bun is not a JS engine. JavaScriptCore is the JS engine. Bun is just a complicated wrapper around it.

Re: Bun's experimental Rust rewrite hits 99.8% test compatibility on Linux x64 glibc

#558
post #162

Earlier quoted context omitted.

It is much harder to write quality stuff in c/c++ that doesn't have memory bugs (use after free, out of bounds access, use of unitialized memory, double free, memory races, etc.). I wouldn't say it isn't feasible to build high quality software in those languages, but even the highest quality software written in those languages has these types of bugs. Zig is better than c, and maybe a little bit better than c++, espe…

Based on what? I am not familiar with this language called called "c/c++" but if you are writing Modern C++, you shouldn't be creating problems like "double free." It's really not that hard to avoid at all. This reminds me of how all the people carried on as if they were making the kernel so much safer not realizing they needed to use unsafe rust. I think so many people call themselves programmers now but so few know…

This kind of argument is why security folks look down on C and C++ developers.

Because instead of discussing serious matters, they missed English grammar class on the use of / and then get up in arms about the use of "and, or".

Additionally, even code bases from companies that seat at WG21, lack the use of the so called Modern C++, without any language feature or header files inherited from C.

Better C with some niceties keeps being the prevalent approach, unfortunately.

C strings, C arrays, pointer math, printf family, C style casts, macros instead of templates, no STL, and if not hardned ...

Re: Bun's experimental Rust rewrite hits 99.8% test compatibility on Linux x64 glibc

#559
post #248

Earlier quoted context omitted.

Even assuming that's a correct interpretation, does "using C/C++ results in having an extremely high amount of crashes/memory bugs" not true?

No, that's provably false by a fairly simple existence proof. If it was true that using C results in an "extremely high amount of crashes/memory bugs", we would expect to not find any substantial pieces of software written in C without an "extremely high amount of crashes/memory bugs". Now where exactly you draw that line is necessarily going to be somewhat arbitrary, but by any definition, I think we can all agree t…

>I think we can all agree that SQLite does not fit that description

One of the reasons WebSQL died was due to how many memory bug related vulnerabilities SQLite had.

Re: Bun's experimental Rust rewrite hits 99.8% test compatibility on Linux x64 glibc

#560
post #32

Earlier quoted context omitted.

This is exactly how Anthropic will market this rewrite towards companies thinking about doing more layoffs. 1 person did a rust rewrite that took 6 days that would have taken hundreds of engineers more than a year to do.

And he has zero idea how it works. His capacity for understanding it is tied to his wallet now.

It's actually tied to his employment at Anthropic.
Post reply on HN