News for hackers. Stuff that matters.
Re:The Development of the C Language (1993) by bitcointicker on Thursday December 17, 2015 @04:22PM (#10754658)
I love C. Perhaps this is because it's the first language I was taught. It fascinated me. It was complex, it allowed you to do dangerous things, but once it clicks, its like an epiphany :-)

I hardly use it much these days, it's much faster to get things done in python, ruby or perl. Unless you need performance. I guess its like an old song, listening to it brings back memories of what was going on in your life when you first heard it. Reminiscing about writing my first C programs brings back the same kind of memories.

Do other people have the same feeling about the first language they learnt? Or is C really special? :)

Re:The Development of the C Language (1993) by ArkyBeagle on Thursday December 17, 2015 @08:50PM (#10756095)
I have no fond memories of Pascal nor BASIC.

Once you get to where you think in terms of mechanism and not language, it doesn't matter what you use.

Re:The Development of the C Language (1993) by pjmlp on Thursday December 17, 2015 @05:22PM (#10755026)
I was able to discover the power of system programming in higher level languages around 5 years before learning C, so it isn't any special to me.
Re:The Development of the C Language (1993) by FraaJad on Thursday December 17, 2015 @05:41PM (#10755164)
curious... what languages did you use?
Re:The Development of the C Language (1993) by nickpsecurity on Thursday December 17, 2015 @08:24PM (#10756001)
I was going to post his list of system languages that came before C (and were better/safer) but can't find his post. Notable examples, before or after C, are:

Burroughs' ALGOL's their safer OS was written in https://en.wikipedia.org/wiki/Burroughs_large_systems#ALGOL

Modula-2 with its better readability and safety invented in Lilith homebrew system:

http://www.cfbsoftware.com/modula2/Lilith.pdf

Hansen's Concurrent Pascal was concurrency-safe in tiny runtime; Edison was C minimalism on same PDP-11 with cleaner, safer design

http://brinch-hansen.net/papers/

Modula-3 had many C++ advantages, Modula-style safety, and without C's BS:

https://en.wikipedia.org/wiki/Modula-3

Note: SPIN OS was written in it. Supported type-safe compilation and linking of code into running kernel for acceleration.

PL/I was one of predominant languages. IBM's mainframe OS's were written in a version of it (PL/S).

https://en.wikipedia.org/wiki/PL/I

Ada was systematically and cleverly designed for safety against most issues. Still is:

http://www.adacore.com/knowledge/technical-papers/safe-secur...

Note: Army Secure OS (ASOS), MarteOS, and Muen kernel were written in Ada leveraging its safety properties.

That should cover the ones that have been around since the 60's-80's. Doesn't even count functional-oriented languages like Common LISP, Schemes, or Standard ML. LISP had both OS's and CPU's made in it and for it. SML & Ocaml kicked ass in app correctness and compiler writing. Also ignored niche-specific ones like COBOL or Fortran that I thought weren't suitable for a C comparison.

Safe, C variants were even made to address its problems:

https://www.cs.uic.edu/pub/Main/PhDQualifyingExam/Sample4.pd...

Note: Cyclone concepts got rolled into Rust. So some benefit there.

There's also modern attempts like D, Go, and Rust that try to replace it to various degrees. Wirth's Modula work lives on in Active Oberon System and Go language. Almost all are moving in a direction with ALGOL68's features being the baseline. That there was better stuff before C on 1960's hardware suggests that people should've ditched it or fixed it up a long time ago when hardware limitations weren't holding it back anymore.

And let it be known that those are the only reason C was designed how it was. BCPL author actually wanted an ALGOL variant but hardware didn't work well enough. Rest was accidents of history. More detail that stretches further back than OP in this link:

http://pastebin.com/UAQaWuWG

Re:The Development of the C Language (1993) by ArkyBeagle on Thursday December 17, 2015 @08:46PM (#10756076)
None of this matters. One (or two) *REALLY big accident(s) of history: The Great Flood of PeeCees came and 'C' was ensconced by Borland and then the use of 'C' in Linux.

We waited for Ada, and she showed up decades late.

Re:The Development of the C Language (1993) by hga on Friday December 18, 2015 @09:39AM (#10758646)
Perhaps the more significant "accident" of history, occurring before IBM-PCs with much memory got out there in large numbers, was all the vendors of 68000 based systems who didn't follow the lead of Apollo Computer and instead got a relatively cheap UNIX(TM) licence.

As PCs got more capable and more and more people were willing to program them in C---I don't remember Borland being a big player in this, in fact, it was Microsoft that produced the first really solid C compiler---the same sorts of constraints that helped birth UNIX(TM) and C were in play, until it was by and large too late to change course.

Re:The Development of the C Language (1993) by ArkyBeagle on Friday December 18, 2015 @12:57PM (#10759778)
You're correct, but before Borland 'C' ( I think to directly compete with Microsoft ) much was done in Borland Pascal. Of course, much was done after as well.

I think the results of Apollo's decision speaks for itself. If something is an order of magnitude cheaper, it will propagate faster, whether it's objectively better or not.

Re:The Development of the C Language (1993) by pjmlp on Friday December 18, 2015 @12:42PM (#10759692)
Maybe I am a bit too much biased to Borland, but Microsoft MS-DOS compilers weren't that great, they were even the last MS-DOS compiler vendor to support C++.

They only started to have something worth buying with the 32 bit version of Visual C++ and Borland loosing their focus, until then not really.

Re:The Development of the C Language (1993) by nickpsecurity on Thursday December 17, 2015 @09:11PM (#10756162)
Plenty of things on that list are better than C in key ways and pre-date Ada. Plus, many issues with C existed due to hardware limitations. The C community could've been improving the situation gradually by changing the bad features as hardware improved plus importing good things from other languages. Would've required gradual rewrites of what depended on it but would've been worth it. Or merely switching to and integrating better options like Pascal/Modula line with safety & maintenance benefits.

Instead, they continued building on the foundation of quicksand with so many systems integrity and availability lost as a result. Lost way, too easily due to developers inability to safety do common things. Things that were safe or easy in alternative languages on 1960's-1980's era hardware. Did I mention this was true in 2015 still on systems with 64 cores?

Least Stroustroup made an attempt to bring in advanced features into C. Substantially improved it in resulting quality on average but still showed how much a bad foundation hurts. Stuff like Modula-3 managed high runtime efficiency, compile time efficiency, safety, integration, and readability all at once.

So, existence of alternatives providing a better path certainly mattered. That all of it was mostly ignored taught important lessons to future people trying to improve IT. Fortunately, some learned them and now we have better stuff coming along with higher chance of adoption. Plus, significant improvements to existing stuff here and there.

Re:The Development of the C Language (1993) by ArkyBeagle on Friday December 18, 2015 @02:50AM (#10757260)
"... developers inability to safely do common things."

Yep. IMO, the buck stops there.

Re:The Development of the C Language (1993) by nickpsecurity on Friday December 18, 2015 @09:56AM (#10758749)
Anyone reading CVE's for code in safer languages vs unsafe ones would disagree. The evidence would support them, too.
Re:The Development of the C Language (1993) by ArkyBeagle on Friday December 18, 2015 @12:53PM (#10759751)
I'm just the wrong guy to ask about this - I know how to limit (if not eliminate) vulnerabilities, at least in what I control.

It's harder to fix culture problems with tools than we might think, in general. Perhaps future generations will look at 'C' the same way we look at open-belt farm machinery. I can't say. But the sheer volume of incumbent 'C' code bases will be around for a while.

Re:The Development of the C Language (1993) by nickpsecurity on Saturday December 19, 2015 @01:08PM (#10764282)
That's honest. :) I agree it will be around a while thanks to all the incumbent code. It's why I push for efforts to automatically deal with its issues at least for legacy code. Astree Analyzer, Softbound + CETS, CHERI processor, and CompCert compiler are all top examples of that. Links below. Enjoy. :)

http://www.absint.com/astree/index.htm

http://www.cs.rutgers.edu/~santosh.nagarakatte/softbound/

https://www.cl.cam.ac.uk/research/security/ctsrd/pdfs/201503...

http://compcert.inria.fr/

Re:The Development of the C Language (1993) by pjmlp on Friday December 18, 2015 @12:57AM (#10756912)
Yep, thanks for jumping in.
Re:The Development of the C Language (1993) by nickpsecurity on Saturday December 19, 2015 @01:03PM (#10764267)
Hey, do you have a link to your comment that lists all the safety advantages of Modula-2? I saw it once then couldn't find it again haha. Google & DuckDuckGo give me jack on the topic past the research papers, etc. Nice to have a simple list to drop in online discussions to get the point across.
Re:The Development of the C Language (1993) by pjmlp on Sunday December 20, 2015 @10:17AM (#10767237)
Re:The Development of the C Language (1993) by nickpsecurity on Monday December 21, 2015 @09:41PM (#10775431)
First and second one are both good. I saved first for future discussions. Appreciate it. :)
Re:The Development of the C Language (1993) by agumonkey on Thursday December 17, 2015 @02:48PM (#10753963)
Re:The Development of the C Language (1993) by acqq on Thursday December 17, 2015 @03:34PM (#10754322)
For those like me who prefer slides:

http://www.pvv.org/~oma/HistoryAndSpirit_NDC_Jun2015.pdf

They are good!

Re:The Development of the C Language (1993) by pjmlp on Thursday December 17, 2015 @05:21PM (#10755020)
"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."

Ignored until clang adopted static analysis as part of the compiler.

Re:The Development of the C Language (1993) by gdwatson on Thursday December 17, 2015 @07:53PM (#10755882)
I'm not sure that's fair. Clang has excellent warnings, but it's not as if no progress was made on that front between 1979 and 2007.
Re:The Development of the C Language (1993) by pjmlp on Friday December 18, 2015 @12:56AM (#10756910)
I am not speaking about the tooling, rather the macho attitude in the C community towards static analysis.
Re:The Development of the C Language (1993) by neonscribe on Thursday December 17, 2015 @11:34PM (#10756659)
BCPL and B were untyped languages, where the fundamental unit of the language was a "cell" that could hold either an integer or a pointer. Also fundamental was that memory was addressable by cells, and that adding one to a pointer (which could also be an integer) must cause it to refer to the next cell. This could only be implemented efficiently on a word-addressed machine. When confronted with the byte-addressed PDP-11, they created a language where the basic unit was a "char". Fortunately, they also added types, so that the language could adapt to changing architectures. However, they were fortunate, or foresighted, in that virtually every architecture after the mid-70's was byte-addressable. C does not adapt well to word-addressed machines, but that didn't slow its adoption because word-addressed machines disappeared rapidly after C was born.
Re:The Development of the C Language (1993) by acqq on Thursday December 17, 2015 @01:54PM (#10753547)
Must see: the html behind the text.
Re:The Development of the C Language (1993) by LukeShu on Thursday December 17, 2015 @02:04PM (#10753620)
Why? Because it's tidy?

It's formatted like troff input. I suspect that DMR wrote the document in troff, and had it convert to HTML.

Re:The Development of the C Language (1993) by btilly on Thursday December 17, 2015 @05:54PM (#10755249)
More hints that this is true.

This paper was presented at the Second History of Programming Languages conference, Cambridge, Mass., April, 1993. That's the same month that CERN decided to publicly release source for the very first web server and client.

There is no conceivable way that DMR would have both found out about the web and chosen to write in HTML at that point in history.

However at that point Dennis Richie had 20 years of experience with troff. The only other reasonable choice at that point was TeX. And the output looks nothing like what I would expect from TeX. So it almost certainly was troff.

Re:The Development of the C Language (1993) by Aloha on Thursday December 17, 2015 @02:28PM (#10753795)
probably was - there has been automated conversion from roff to html for a while