Live data from Hacker News

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

android.googlesource.com

151–160 of 259 posts

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

#151
post #91

Earlier quoted context omitted.

Do you have an actual response? How is iostream any better than *printf? At least you can read the format of the former without needing to google un-googleable operators.

> How is iostream any better than [ ]printf? What consistent mechanism do you use to printf an instance of an arbitrary user-defined type? With ostream, you implement ostream& operator and you're done. with printf, you have to have a convention and remember to stick to it. (Do I call .toString(), .stringize(), .getString()... ??) For one-off things, printf is great . You take it from me when you pry it from my goddam…

With printf, you do have to look at the docs to see what the string conversion function is. With iostream, you still have to look at the docs to see if the ostream operator is implemented for the class, it's certainly not universal.

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

#152
post #113

Earlier quoted context omitted.

If you're lucky it's off-chip and your soldering iron and a very sharp knife will come in handy. The problem with 'patching' hardware these days (oh, I'm that old) is that most of the time you'll find your problem is located inside a chip, and it isn't the traces are in planes that you can't access (if you're lucky they might run in a spot where you can dremel through and then cut and solder two small wires to the bu…

I guess the counterpoint is that there are things you can now fix in microcode that would have previously required messing with the hardware?

That depends. Microcode tends to be used in CPUs rather than regular ASICs and not all CPUs have re-writable microcode (though quite a few of them do). So unless you're talking about a CPU the answer is probably 'no'.

You probably have a bigger chance that there is an FPGA on board that you can re-load.

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

#153

Earlier quoted context omitted.

> How is iostream any better than [ ]printf? What consistent mechanism do you use to printf an instance of an arbitrary user-defined type? With ostream, you implement ostream& operator and you're done. with printf, you have to have a convention and remember to stick to it. (Do I call .toString(), .stringize(), .getString()... ??) For one-off things, printf is great . You take it from me when you pry it from my goddam…

With printf, you do have to look at the docs to see what the string conversion function is. With iostream, you still have to look at the docs to see if the ostream operator is implemented for the class, it's certainly not universal.

I never said io*stream support was universal, [0] I said that it provided a _consistent_ mechanism. :)

[0] I mean, it's obvious that anything that you don't get for free out of the box is bound to _not_ be universal. Edit: Actually, the thing you get out of the box when you present an instance of a non-trivial user-defined class to both printf and ostream is equally useless... unless you're debugging and are interested in the address of the instance of an object.

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

#154
post #144
post #93

Earlier quoted context omitted.

>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 e…

Better UX is definitely part of making the world a better place. Maybe the free software people should invest in UX as well.

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

#155
post #144
post #93

Earlier quoted context omitted.

>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 e…

>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.

True, mostly thanks to shitty companies like Apple, Microsoft, Autodesk, etc.

>You as a developer and a user should want the freedoms afforded to you by the GPL or any copyleft license for that matter.

I do.

>In the ideal world your high performance software would be released under the GPL you would have the best of both worlds.

We don't live in an ideal world and never will.

>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.

This doesn't work, especially in software for engineering where there are often sole, hegemonic powers and established monopolies and where the cost to enter the market as a new competitor is non-trivial. We're not talking a desktop manager or a text editor here, we're talking millions of dollars of R&D for things like CFD suites. Open alternatives exist (like, say, OpenFOAM) but they often lack accreditation/certification/rigorous testing and when you're dealing with people's lives the choice is often proscribed entirely.

>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.

There's a financial incentive to creating walled gardens and proprietary software that you can charge for.

>yet people dismiss them because the company worth hundreds of billions of dollars has a better UX.

When the choice is between "being able to function at my job, at all" and "use free software", well, the choice is clear.

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

#156

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 original idea behind the FSFs idea of open source was an ecosystem where every new development resulted in more open and free code.

So let's put it this way: The FSF didn't pivot when they had a chance to capture a larger market!

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

#157

Earlier quoted context omitted.

No words like "free" or "freedom" appear anywhere on the http://llvm.org/ homepage. The license merely says "free of charge" without any kind of rationale. Certainly there's no GNU-style manifesto explaining their carefully-considered views on the rights a software user ought to have. Think what you like about whether they should talk about freedom, but we can easily confirm that they don't .

Similarly, no words like "freedom" appear on the home pages of many popular GPL-licensed projects. That doesn't mean that, "Mono doesn't talk about freedom". It doesn't mean that, "Python doesn't talk about freedom". It means they didn't use the word, "freedom" on their home page. OpenBSD people care about and talk about freedom, I assure you. They have a track record of ejecting software with insufficiently free lic…

Python is not licensed under the GPL, and it is not clear to me that they care about this sort of thing.

As for Mono, I was there at the conception of the project, and can thereby tell you off the top of my head that if you go to the History section of the documentation they have an archived copy of the premise, and it is dropping with "free as in freedom" language.

http://www.mono-project.com/archived/mailpostlongreply/

(More "current", "Free Software" also listed as a "Feature Highlight" in the about page.)

http://www.mono-project.com/docs/about-mono/

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

#158
post #10

Earlier quoted context omitted.

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.

FWIW, most of these options revert back to default as soon as you format something; but I agree that I would have preferred iomanip to generally be a wrapper around values rather than a silent modifier of the stream.

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

#159
post #157

Earlier quoted context omitted.

Similarly, no words like "freedom" appear on the home pages of many popular GPL-licensed projects. That doesn't mean that, "Mono doesn't talk about freedom". It doesn't mean that, "Python doesn't talk about freedom". It means they didn't use the word, "freedom" on their home page. OpenBSD people care about and talk about freedom, I assure you. They have a track record of ejecting software with insufficiently free lic…

Python is not licensed under the GPL, and it is not clear to me that they care about this sort of thing. As for Mono, I was there at the conception of the project, and can thereby tell you off the top of my head that if you go to the History section of the documentation they have an archived copy of the premise, and it is dropping with "free as in freedom" language. http://www.mono-project.com/archived/mailpostlongre…

So they in fact talk about freedom with using the word on their home page. That is exactly my point.

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

#160
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…

That solution is good, but it assumes you can break the message up into those parts for every language and use the same iostream sequence for every language.

With printf, we have gettext. I don't really see how there's any analogy for gettext in iosream-world.

Post reply on HN