News for hackers. Stuff that matters.
Re:WTF is a container? by pjmlp on Monday October 17, 2016 @05:32AM (#12723657)
As others say Docker is probably over-hyped technology.

However, I do see it as positive, because its hype, regardless if good or not, has created the traction for Go and OCaml on the data center, thus eventually leading to less C code for such use cases.

So hype or not, maybe we do get some security improvements on the overall stack.

Re:WTF is a container? by shoover on Monday October 17, 2016 @10:57AM (#12725529)
I'm missing the initial assumption. What is the connection between Docker and traction for Go and OCaml? People are using the latter in order to simply avoid containers?
Re:WTF is a container? by pjmlp on Monday October 17, 2016 @12:21PM (#12726488)
Parts of Docker are implemented on them.

So anyone that wants to improve Docker or adapt it to their distribution of choice needs to eventually use them.

For example, Microsoft did several contributions in Go for making Docker run on Windows.

The TCP/IP stack used by Docker on OS X is taken from MirageOS, written in OCaml.

Re:WTF is a container? by shoover on Monday October 17, 2016 @01:20PM (#12727049)
Got it. Thanks.
Re:WTF is a container? by saji13 on Monday October 17, 2016 @06:09AM (#12723796)
Out of curiosity, why is less C code a good thing?
Re:WTF is a container? by pjmlp on Monday October 17, 2016 @07:12AM (#12724025)
Security exploits caused by memory corruption, undefined behavior, ability to inject code, numeric overflows plus whatever is common to all memory safe languages.

https://www.cvedetails.com/vulnerabilities-by-types.php

Re:WTF is a container? by pm90 on Monday October 17, 2016 @07:08AM (#12724011)
Maintenance. A lot of the younger programmers have very little experience with running/working with C code and stack; they are a lot more comfortable with Java/Python/Go (for backend). So the less C code you have to deal with in your stack, the easier it is for deployment/debugging. Not to mention, the more modern languages also provide many features that allow pinpointing errors faster etc.
Re:WTF is a container? by sidlls on Monday October 17, 2016 @09:04AM (#12724620)
There are legitimate reasons to not want to use C, but I find around here it's mainly reflexive hate and language zealotry.

It's popular to hate on C (and C++) because the languages are so ubiquitous and long-used that a large body of terrible, unsecure, and poorly written code exists using them. Other languages haven't had the same success as these two yet, so haven't had their warts exposed enough to be dumped in the "automatically hated" category. Java comes close, but it also is typically lumped in the "automatically hate it" bucket and for similar reasons.

Re:WTF is a container? by pjmlp on Monday October 17, 2016 @09:20AM (#12724713)
It was already clear in the late 70's and early 90's that C wasn't a reliable option to write safe systems.

Dennis M. Ritchie himself on the history of the language[0]

"To encourage people to pay more attention to the official language rules, to detect legal but suspicious constructions, and to help find interface mismatches undetectable with simple mechanisms for separate compilation, Steve Johnson adapted his pcc compiler to produce lint [Johnson 79b], which scanned a set of files and remarked on dubious constructions."

Lint which is still mostly ignored by the masses to this day. At CppCon 2015, about 1% of the audience acknowledge using static analyzers.

Per Brinch Hansen letter to C.A.R. Hoare in 1993a [1]

"The 1980s will probably be remembered as the decade in which programmers took a gigantic step backwards by switching from secure Pascal-like languages to insecure C-like languages. I have no rational explanation for this trend. But it seems to me that if computer programmers cannot even agree that security is an essential requirement of any programming language, then we have not yet established a discipline of computing based on commonly accepted principles."

There are many other sources of similar statements since C exists, so the hate isn't something new.

Regarding C++, yes unfortunately it inherits C flaws, but at least the community tends to embrace language features to improve the language safety and push for type based programming.

[0] https://www.bell-labs.com/usr/dmr/www/chist.html

[1] brinch-hansen.net/papers/1999b.pdf

Re:WTF is a container? by rbmiller on Monday October 17, 2016 @09:44AM (#12724888)
Where is this mythical C++ community that promotes safe and auditable programs?

Whenever I'm forced to use a C++ program it's buggier than the C equivalent.

Re:WTF is a container? by pjmlp on Monday October 17, 2016 @10:14AM (#12725168)
They are here:

https://isocpp.org/

http://cppcon.org/

https://github.com/isocpp/CppCoreGuidelines/blob/master/CppC...

http://erdani.com/index.php/books/modern-c-design/

https://msdn.microsoft.com/en-us/library/hh279654.aspx

http://stroustrup.com/Tour.html

http://elementsofprogramming.com/book.html

Most of the C++ bugs I found happened to be written by former C developers that disregard using C++ stronger type safety, RAII, the standard library containers and usually use naked pointers alongside malloc() and free().

And that is the biggest problem with C++, its copy-paste compatibility with C, which allowed its adoption by C compiler vendors, but made it as safe as C when developers disregard best practices.

Re:WTF is a container? by sidlls on Monday October 17, 2016 @12:26PM (#12726528)
Except for relatively uncomplicated, or relatively low level programs I have had the opposite experience.
Re:WTF is a container? by fanf2 on Tuesday October 18, 2016 @03:39AM (#12732753)
Lint is built in to modern C compilers.