News for hackers. Stuff that matters.
Re:GCC Rust: GCC Front-End for Rust by chrisseaton on Sunday January 10, 2021 @12:48PM (#25717236)
I'd find that very surprising and interesting - I can't imagine which semantics could leak from LLVM into a language specification. Can you give some examples?
Re:GCC Rust: GCC Front-End for Rust by Blikkentrekker on Sunday January 10, 2021 @01:00PM (#25717377)
For instance `std::ptr::offset` which is apparently a trivial wrapper around some LLVM internal: https://llvm.org/docs/LangRef.html#getelementptr-instruction

I'm not sure as to what capacity GCC has a similar instruction but I heard that LLVM's using of signed integers here is apparently nonstandard and what lead to Rust's decisions for vectors to be limited to a certain size: https://doc.rust-lang.org/nomicon/vec-alloc.html

Re:GCC Rust: GCC Front-End for Rust by stouset on Sunday January 10, 2021 @01:06PM (#25717447)
I don’t know why you’re italicizing LLVM, gcc, and Rust, but I (and perhaps others) find it relatively jarring as my brain automatically parses it as emphasis even though it clearly isn’t intended to be.

I only bring it up because it pretty drastically harms readability (for me at least, and to a degree I frankly find surprising). Just thought you may want to know.

Re:GCC Rust: GCC Front-End for Rust by balnaphone on Sunday January 10, 2021 @01:39PM (#25717896)
This is common nomenclature to enhance readability in fields that have a large number of neologisms and proper nouns, such as some technical domains, medicine, investment banking, and so on. It's particularly useful when names are in the same language as the base language (e.g. in English "Peter" is easily recognized as a name, but "better fish" means something in the language, but can also be used as a proper noun, so using italics for proper nouns serves to disambiguate the intended meaning).
Re:GCC Rust: GCC Front-End for Rust by tssva on Sunday January 10, 2021 @01:56PM (#25718133)
Maybe he is used to writing in MLA style which calls for the titles of software to be italicized just as books, movies, etc are.
Re:GCC Rust: GCC Front-End for Rust by Blikkentrekker on Sunday January 10, 2021 @02:11PM (#25718374)
This is indeed a point of contention among different styles of whether software titles should be italicized. Though the position that they should uniformly be is the minority one, it is certainly used by some outlets with considerable weight, and I believe it to be the consistent one if titles of books and films are too.

Some style guides make the even more inconsistent distinction that only titles of video games be italicized, but titles of “application software” not be.

I suppose that on H.N., where such software is frequently mentioned, it does stand out more.

Re:GCC Rust: GCC Front-End for Rust by unanswered on Sunday January 10, 2021 @02:55PM (#25718933)
The video games example seems consistent to me; we regularly italicize the names of plays (for example) but not the names of tools and businesses.
Re:GCC Rust: GCC Front-End for Rust by Blikkentrekker on Sunday January 10, 2021 @03:26PM (#25719284)
Because tools and businesses are not titles that qualify for intellectual property, a piece of software is.

I do not italicize Google the company either, but I do that of Google the search engine.

The titles of scientific research papers are also typically italicized.

Re:GCC Rust: GCC Front-End for Rust by samb1729 on Sunday January 10, 2021 @01:36PM (#25717862)
Looking at their commenting history, they have a habit of italicising really often, so it's not specific to this topic. It does indeed make a lot of their comments annoying to read without obviously adding any value.
Re:GCC Rust: GCC Front-End for Rust by codetrotter on Sunday January 10, 2021 @02:15PM (#25718427)
> It does indeed make a lot of their comments annoying to read without obviously adding any value

I’m going to assume that you mean that the italics don’t add value, and not their comments as a whole. I think your comment could be read either way. Anyways, even so others have since pointed out reasons why the might be used to doing so.

Re:GCC Rust: GCC Front-End for Rust by chrisseaton on Sunday January 10, 2021 @01:14PM (#25717564)
getelementptr is just some pointer arithmetic - all backends can do that.

And using signed integers is unusual yes, but again all backends (obviously) also support signed integers.

Re:GCC Rust: GCC Front-End for Rust by steveklabnik on Sunday January 10, 2021 @01:41PM (#25717923)
IMHO, "Just some pointer arithmetic" is selling it a bit short. There's a lot of stuff there around provenance that matters, that is, there's a reason this is an intrinsic and not just a subtraction after casting both to an int.

(I agree on the signed integer thing though.)

Re:GCC Rust: GCC Front-End for Rust by CUViper on Sunday January 10, 2021 @01:08PM (#25717475)
Glibc malloc also limits the maximum according to ptrdiff_t, which is effectively the same as Rust isize.