Live data from Hacker News

Android NDK: GCC is now deprecated, everyone should be switching to Clang

android.googlesource.com

141–150 of 259 posts

Re: Android NDK: GCC is now deprecated, everyone should be switching to Clang

#141
post #107

Earlier quoted context omitted.

> The Clang and LLVM developers reach different conclusions from ours because they do not share our values and goals. It's hard for me to trust the values of a man who thinks sex with children should be legalized. Not ad hominem'ing here, just saying that if his bigger-picture idea of "freedom" includes freedom to have sex with children, he and I have different ideas of what freedom mean, and I can't really say I tru…

> It's hard for me to trust the values of a man who thinks sex with children should be legalized. [citation needed]

[deleted]

Re: Android NDK: GCC is now deprecated, everyone should be switching to Clang

#142
post #48

Earlier quoted context omitted.

How do you internationalize strings built up from multiple string fragments?

The same way you'd do it in printf? Stringize data and insert it in the middle of static text? (Pardon my inelegant code, I've been away from C++ and doing Erlang for quite a while now.) void printStuff(ostream Os, string WarningPart, string SizePart, string EndPart, int Size) { //The English version might look like: //"Warning: Size too big (200). Get smaller." Os I expect that if I thought about the problem for a f…

POSIX printf allows a translator to write a conversion spec like "%1$d" that says which arg to print. This lets you do stuff like put currency before or after the amount depending on what's idiomatic for the locale, without recompiling (if you lookup your format strings at runtime).

Re: Android NDK: GCC is now deprecated, everyone should be switching to Clang

#143
post #107

Earlier quoted context omitted.

> The Clang and LLVM developers reach different conclusions from ours because they do not share our values and goals. It's hard for me to trust the values of a man who thinks sex with children should be legalized. Not ad hominem'ing here, just saying that if his bigger-picture idea of "freedom" includes freedom to have sex with children, he and I have different ideas of what freedom mean, and I can't really say I tru…

> It's hard for me to trust the values of a man who thinks sex with children should be legalized. [citation needed]

https://en.wikiquote.org/wiki/Richard_Stallman#On_sex

Re: Android NDK: GCC is now deprecated, everyone should be switching to Clang

#144
post #93

Earlier quoted context omitted.

If you have the design, and you have access to FPGAs, I'd say that's got you pretty close already. Edit: We were talking about CPUs, not complete systems. And yes, the performance would be poor, but RMS has already strongly established that in his book performance is a distant runner-up to free.

>RMS has already strongly established that in his book performance is a distant runner-up to free. To him, maybe. Not all of us have the luxury of getting paid to be a techno-luddite, using antiquated workflows and having the spare time available to re/write drivers when necessary. If I made the same performance/freedom trade-offs I'd be completely unable to do my job.

The fact that you consider performance and freedom to be a trade off means that you've already given up even the slightest hope of freedom. You as a developer and a user should want the freedoms afforded to you by the GPL or any copyleft license for that matter. In the ideal world your high performance software would be released under the GPL you would have the best of both worlds. The war won't be won by rewriting every single tool and releasing it under the GPL, it will be won by pressuring existing companies to license their software under the GPL.

The people who want non-copyleft licenses to succeed are those who which to make a profit from the control and ignorance they can impose on their users by closing their source and platform or those who are willing to trade their user's freedoms to appease them.

Businesses have a huge amount of leverage on the OSS software ecosystem and so it's really no surprise that the licensing choices are to benefit the businesses funding the development rather than the users. It's to be expected but no less sad. There's a small group of passionate people who have basically dedicated their lives to making the world a better place by writing software that's truly free and respects its users, they built an entire community and movement around the idea, and actually stand by their beliefs -- yet people dismiss them because the company worth hundreds of billions of dollars has a better UX.

Re: Android NDK: GCC is now deprecated, everyone should be switching to Clang

#145

The sad thing is that "easy to link and embed" and "permissive license" really didn't have to go together like they did in LLVM. GCC could have provided a library that made it easy to do code generation or compiler development. That library could still have used the GPL, so that only Free Software could use it. Some of the work that has happened around LLVM wouldn't have happened around such a library, but some of it…

I feel like you're missing the point of the GNU GPL. The original idea behind the FSFs idea of open source was an ecosystem where every new development resulted in more open and free code. We're talking about people who truly believed in getting away from commercial software entirely. There were people who felt that one day, Linux desktops could replace Windows and even high end tools like Photoshop and Final Cut wou…

> The dream of a GPL world where the software is free and you only pay for the hardware, is pretty much gone.

I feel like you are missing the point of the GNU GPL.

Re: Android NDK: GCC is now deprecated, everyone should be switching to Clang

#146

Earlier quoted context omitted.

The same way you'd do it in printf? Stringize data and insert it in the middle of static text? (Pardon my inelegant code, I've been away from C++ and doing Erlang for quite a while now.) void printStuff(ostream Os, string WarningPart, string SizePart, string EndPart, int Size) { //The English version might look like: //"Warning: Size too big (200). Get smaller." Os I expect that if I thought about the problem for a f…

POSIX printf allows a translator to write a conversion spec like "%1$d" that says which arg to print. This lets you do stuff like put currency before or after the amount depending on what's idiomatic for the locale, without recompiling (if you lookup your format strings at runtime).

Sure, but that's l10n, which is a different -but related- thing. :)

printf format strings are well thought-out. I was demonstrating that the same ideas can easily be used with io*stream.

Re: Android NDK: GCC is now deprecated, everyone should be switching to Clang

#147
post #48

Earlier quoted context omitted.

How do you internationalize strings built up from multiple string fragments?

Am I being downvoted for asking an honest question?

It's better to engage with the folks who have provided responses to your questions than to complain about downvotes.

Re: Android NDK: GCC is now deprecated, everyone should be switching to Clang

#148
post #10
post #6

Earlier quoted context omitted.

That's probably a bug in libc++, not Clang. They're under the same roof, but different people work on them. Also, I would mock you for using at all but you've probably got legacy code just the same as I do.

I'm curious, what's wrong with iostream?

It's a pain to format text. Things like: printing an int in hex, printing a zero-padded int of a specific length, printing a float to two decimal places. And having those formatting changes be stored silently as global state leads to unexpected behavior.

Re: Android NDK: GCC is now deprecated, everyone should be switching to Clang

#149

The sad thing is that "easy to link and embed" and "permissive license" really didn't have to go together like they did in LLVM. GCC could have provided a library that made it easy to do code generation or compiler development. That library could still have used the GPL, so that only Free Software could use it. Some of the work that has happened around LLVM wouldn't have happened around such a library, but some of it…

The FSF ideology was born at a time where the level of bidirectional mistrust between closed source software vendors and open source advocates was a lot higher than it is currently. The world has evolved since then and the business world now embraces open source, possibly for reasons that have nothing to do with ideology (shared r&d costs, commoditising lower layers of the stack and the realization that you can just as easily get lock in with open source software as you can with closed source). In a world where even Microsoft is releasing more and more of its crown jewels as open source every given week, the FSF position can appear out of place but this I think is a testament of how far we have come on the original goals of the project.

Re: Android NDK: GCC is now deprecated, everyone should be switching to Clang

#150

I'm not sure if this will stoke a flamewar, because I've never seen a discussion here on this (might just be hanging around different articles). Is there any technical reason to prefer clang over gcc other than ideological reasons? I get the modular nature of llvm is useful, but is the android NDK using this feature? Quick google search shows clang lagging gcc in all but one test[0] at least on Intel Broadwell. Again…

The permissive license of LLVM means that you can build it into tools. So in that one case, the political difference of the license does lead to a technical difference.
Post reply on HN