Hacker News new | past | comments | ask | show | jobs | submit | boundchecked's comments login

If you count optimizing your ill-formed function into an inlined panic [1] as "bug eliminated at compile-time", then it may be true!

https://godbolt.org/z/M7Gr3TazE


While it would obviously be nice to error at compile time, the docs of the slice type clearly say the code mudt panic in this case. Depending on the context, [T; 3] may be better


Reminds me of this post just from few days ago[1]. I wish HN had a rule or two dedicated to PL tribalism.

https://news.ycombinator.com/item?id=33382003


D has scopeguards similar to defer.


I don't think Rust will ever consider FFI'in with another language "100% safe."


You can use C libraries in Rust, even compiled .so files where you dont have the corresponding C headers.


I'm rooting for Golden C++.


>// Hard-to-read CaMeLcAsEvArIaBlE

Absolutely.


I don't know what motivate you to keep repeating this narrative, Clang currently have good support of C++23 while MSVC have none[1], if your emphasis is on the standard library side, Clang is the only one that is compatible to all three major implementations and do use libstdc++ and MS STL on their respective "main" platforms.

Also, why isn't Microsoft in the "profit from Clang" list? Is Clang-CL not shipped in Visual Studio Installer? Did they find a way to compile Edge with VC++?

https://en.cppreference.com/w/cpp/compiler_support/23


I am not the only one, this is a common discussion point on C++ communities.

Clang first should spend it's resources catching up with C++20, instead of spending them on C++23. The standard is yet to be fully finished.


Who exactly cares about C++20? Most (mis)features of the “standard” won’t be used for years anyway, until the codegen stabilizes and performance impact will be known. Most of people in these communities never got a dollar for a line of C++, and people who did rarely express their opinion (but you can still find it online if you try)


It seems pretty obvious to me that you never lived through the bad old days when compilers all did whatever they wanted.

Tell me again how much you care about C++20 when a library with a feature you want uses it but your toolchain doesn't support it.


Good to mention Microsoft is also depending on Clang for a lot of things (Microsoft is also quietly pushing devs to use Clang-Cl, as MSVC has really showed its age and is still notorious for bad error messages and subpar compiler optimizations…)

Some console vendors are also depending on it as well (Sony, Nintendo). Clang really is the most important C++ project of all time, because it’s the only compiler that’s truly cross-platform (Windows, Mac, Linux, iOS, Android, game consoles, etc…) And recent failures in it catching up with C++20 should be very alarming.


Where? MSVC is not going anywhere and has been partially rewritten.


> Microsoft is also quietly pushing devs to use Clang-Cl

Source?


Have you tried using ranges with latest clang? That's a pretty central part of C++20 and it doesn't work.


> Ranges [are] pretty central part of C++20

Just shows how distant the committee is from the developers.


Have you tried converting iterations to SIMD and using vector extension to target x86, ARM, Webassembly and compile for Linux/Windows/MacOS with a simple piece of code? It's a pretty significant speed up and it only work with Clang.


What does that have to do with standards support?


None of that is part of ISO C++ compliance.


How is ISO C++ compliance relevant to actual development?


For many places it is quite relevant when choosing official compiler toolchains.

By the way, nice way of creating a throwaway account for the anti-ISO posts all over the place.


I'm also curious, especially they seem to be gearing towards analysis as well.

https://github.com/llvm/clangir/blob/main/clang/lib/CIR/Dial...


These are great questions! We think our approaches are complimentary. We think that CIR, or ClangIR, can be a codegen target from a combination of our high-level IR and our medium-level IR dialects.

Our understanding of ClangIR is that it has side-stepped the problem of trying to relate/map high-level values/types to low-level values/types -- a process which the Clang codegen brings about when generating LLVM IR. We care about explicitly representing this mapping so that there is data flow from a low-level (e.g. LLVM) representation all the way back up to a high-level. There's a lot of value and implied semantics in high-level representations that is lost to Clang's codegen, and thus to the Clang IR codegen. The distinction between `time_t` and `int` is an example of this. We would like to be able to see an `i32` in LLVM and follow it back to a `time_t` in our high-level dialect. This is not a problem that ClangIR sets out to solve. Thus, ClangIR is too low level to achieve some of our goals, but it is also at the right level to achieve some of our other goals.


>Direct Rendering Manager and graphics drivers

>Updated drm(4) to Linux 5.15.69

>inteldrm(4): support for Alder Lake, Raptor Lake

I have fond memory of booting OpenBSD the first time last year on an AMD RDNA GPU, after installation a simple "fw_update" got me a hardware accelerated graphic environment going. Very impressive in my book.


To be honest, this just described your grand post.


Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: