> I put my left hand in a blender. The blender won. (Still have all my fingers, just some stitches). I will not elaborate further. What a shame. I would've read an article about this.
I mean I get confused every time I use blender too but not to the point of losing fingers...
crustc: entirety of `rustc`, translated to C
41–50 of 99 posts
Re: crustc: entirety of `rustc`, translated to C
#42Re: crustc: entirety of `rustc`, translated to C
#43Wait, I thought LLVM had a C backend which could be used for the purpose of transpiling Rust to C? Turns out not for a long time, but now maybe again: https://discourse.llvm.org/t/re-ann-llvm-c-backend-still-abl...
Re: crustc: entirety of `rustc`, translated to C
#44Re: crustc: entirety of `rustc`, translated to C
#45The most interesting part of this to me is not “Rust to C” by itself, but the fact that it widens the pool of people who can help debug portability problems. There are relatively few people who understand Rust’s compiler internals, LLVM backends, and obscure target support deeply. But there are many engineers who understand C compilers, ABIs, linkers, makefiles, cross-compilation, old operating systems, and weird pla…
Guideline: > Don't post generated text or AI-edited text. HN is for conversation between humans.
Probably because in East Asia, we tend to emphasize things with things like "xx" a lot.
Re: crustc: entirety of `rustc`, translated to C
#46The most interesting part of this to me is not “Rust to C” by itself, but the fact that it widens the pool of people who can help debug portability problems. There are relatively few people who understand Rust’s compiler internals, LLVM backends, and obscure target support deeply. But there are many engineers who understand C compilers, ABIs, linkers, makefiles, cross-compilation, old operating systems, and weird pla…
Re: crustc: entirety of `rustc`, translated to C
#47Re: crustc: entirety of `rustc`, translated to C
#48Earlier quoted context omitted.
Guideline: > Don't post generated text or AI-edited text. HN is for conversation between humans.
I saw the reply, and it's not GenAI text. It's just that in the process of translation, people usually use machine translation or LLM translation. The problem is the vocabulary we East Asians use. I experience this issue too. Probably because in East Asia, we tend to emphasize things with things like "xx" a lot.
However, their comments are consistently long, so it may be GenAI after all. Their last comment in particular...
Re: crustc: entirety of `rustc`, translated to C
#49Earlier quoted context omitted.
I saw the reply, and it's not GenAI text. It's just that in the process of translation, people usually use machine translation or LLM translation. The problem is the vocabulary we East Asians use. I experience this issue too. Probably because in East Asia, we tend to emphasize things with things like "xx" a lot.
I thought that may be the case. I shared the guideline so they'd know the likely reason all their comments die immediately. However, their comments are consistently long, so it may be GenAI after all. Their last comment in particular... https://news.ycombinator.com/item?id=48771339
Re: crustc: entirety of `rustc`, translated to C
#50Wait, I thought LLVM had a C backend which could be used for the purpose of transpiling Rust to C? Turns out not for a long time, but now maybe again: https://discourse.llvm.org/t/re-ann-llvm-c-backend-still-abl...
This approach is harder than you might imagine. LLVM can do a lot of things that don't map to C language constructs. You cannot generally roundtrip arbitrary LLVM IR through some C representation. You can emulate most things, but you won't necessarily get the same LLVM IR in the other end.
- You can compare any two pointers, while in C they must point to the same allocation. This is possible to solve by converting to integers first.
- Signed integer overflow is UB in C, defined to wrap/panic in Rust.
- Type-based alias analysis is a big one, does not exist in Rust.