News for hackers. Stuff that matters.
Re:Bun v0.2.0 by com2kid on Friday October 14, 2022 @12:14AM (#33199554)
Of the languages you mentioned, Go and Nim both have runtimes, for a product focused on performance above all else, that is just asking to leave performance on the table.

As for Rust and Zig, IMHO, programming in Zig is more fun, so if I was OP, I'd also have gone for Zig.

Re:Bun v0.2.0 by winrid on Friday October 14, 2022 @03:48AM (#33200712)
The nim runtime overhead is very small. In my tests it was very easy to out perform the latest Node and Java runtimes with shorter, and still type safe, code.
Re:Bun v0.2.0 by generichuman on Friday October 14, 2022 @05:24AM (#33201356)
It is _really_ small, especially if you're using the ARC.

I have some criticism for the language itself around personal preferences, such as "concepts need to be finished ASAP", "don't depend on libc" (Zig is doing a much better job here) and some syntax pet-peeves.

Nim needs to be more popular IMO. Well, the same goes for D too. Sigh.

Re:Bun v0.2.0 by himujjal on Friday October 14, 2022 @10:16AM (#33203809)
I would have used Nim for just about everything, had there been:

1. Support for cyclic imports 2. Official WASM support. I know nlvm exists. But those are two separate runtimes to be managed for long time.

Re:Bun v0.2.0 by sekao on Friday October 14, 2022 @01:37PM (#33206558)
I believe cyclic imports are coming. And Nim does supports wasm...you can target it with `--cpu:wasm32`. You most likely want to pair that with emscripten as in https://github.com/treeform/nim_emscripten_tutorial
Re:Bun v0.2.0 by himujjal on Friday October 21, 2022 @07:15AM (#33286793)
Yeah. checked out wasm part. But man. I am not going to go into Nim without cyclic imports.

I was writing a compiler I remember where I hit the 5k LOC mark in Nim. And then the errors and stuff. It was a terrible experience putting all the types into one file, the functions into others etc etc. The DevExp is bad that way.

Other than that, I don't see much issues with Nim to be fair. Its quite a good language that ticks all boxes

Re:Bun v0.2.0 by winrid on Friday October 14, 2022 @12:37PM (#33205789)
I want to use D for a new company idea I have. The library situation just isn't there though, which is always the problem.
Re:Bun v0.2.0 by generichuman on Friday October 14, 2022 @02:02PM (#33206787)
Its interoperability with C and C++ is top notch, if you're willing to work with libraries in those languages.
Re:Bun v0.2.0 by winrid on Friday October 14, 2022 @04:12PM (#33208303)
That's what I've been hearing.

Some problems are - vibe.d does not look nearly as performant or supported as, say, Drogon, which is what I was seriously considering using (I love the idea of using C++ with modern move semantics and coroutines to make async code easy).

I know and love Java and Node a lot - just want to try not using a VM for a bit :)