News for hackers. Stuff that matters.
Re:Writing a SQLite clone from scratch in C (2017) by dleslie on Sunday July 04, 2021 @05:10PM (#27732642)
It pains me that Rust targets LLVM, and doesn't use C as an intermediary language.

I would _love_ to use Rust on embedded and older hardware on which LLVM simply isn't available.

Re:Writing a SQLite clone from scratch in C (2017) by _d7dt on Sunday July 04, 2021 @05:52PM (#27732922)
I'm not sure what value you're suggesting rustc would be able to bring there. If you want that in LLVM you can try your luck with the "resurrected" C backend: https://github.com/JuliaComputingOSS/llvm-cbe

I don't understand why I see so many requests for LLVM-based languages to change around their backend or IR, that seems to be a huge amount of work for comparatively little benefit. The correct thing to do there is to just add support for those to LLVM.

Re:Writing a SQLite clone from scratch in C (2017) by dleslie on Monday July 05, 2021 @10:35AM (#27738417)
I don't want to "try my luck", I want to build software.

GCC, and various proprietary vendor compilers, are often the only C compilers available on some hardware; and llvm doesn't have a mature, stable and supported backend for them, either.

Re:Writing a SQLite clone from scratch in C (2017) by sp33der89 on Sunday July 04, 2021 @05:18PM (#27732697)
You might be interested in https://nim-lang.org/ and it's new deterministic memory management method!
Re:Writing a SQLite clone from scratch in C (2017) by dleslie on Sunday July 04, 2021 @05:28PM (#27732764)
Neat! I have tomorrow off so I'll give it a shot.
Re:Writing a SQLite clone from scratch in C (2017) by pugz on Sunday July 04, 2021 @06:05PM (#27732999)
It's a surprisingly fantastic language. In my opinion, it's the perfect language. But here are some issues in my eyes:

* The community is tiny. A rounding error compared to Go, Rust, etc.

* The core team of contributors is even smaller. You could comfortably have an intimate dinner party with all of them. If they lose interest, the language would likely die.

* The library distribution story wasn't great last I checked.

Caveat: I haven't used Nim for more than a year now. Maybe all these issues are no longer relevant. I really want it to succeed, but who knows what the future holds.

Re:Writing a SQLite clone from scratch in C (2017) by cryo on Sunday July 04, 2021 @07:40PM (#27733495)
Fair points, although I'd like to keep in mind: Never underestimate a single stubborn person or small team dedicated to an idea.

I'm a C++ developer and, for now, sticking to it on larger projects since I love the thinking behind the C++ evolution over the decades. Rust still feels like a hype/moving target. The big selling point appears to be memory safety, but that's just a detail and not enough to justify a switch. I'm keeping an eye on how Rust and Nim will evolve in the next 5–10 years, but for now, C++, Erlang, and Lisp are my go-to choices for projects which should last the upcoming decades.

Re:Writing a SQLite clone from scratch in C (2017) by not2b on Sunday July 04, 2021 @09:10PM (#27733890)
I have spent my career as a C++ developer. What is more interesting to me about Rust isn't memory safety, but safe concurrency. But I have so much legacy code to deal with that all I can do is be influenced by Rust ideas: force all code to document assumptions about ownership and lifetimes, as if we had a borrow checker, and focus attention on redesign of code where this doesn't work cleanly.
Re:Writing a SQLite clone from scratch in C (2017) by lelanthran on Monday July 05, 2021 @04:12AM (#27735646)
> I have spent my career as a C++ developer. What is more interesting to me about Rust isn't memory safety, but safe concurrency.

The safety is limited to data races, not concurrency or parallelism problems.