News for hackers. Stuff that matters.
Re:Poul-Henning Kamp: The Most Expensive One-byte Mistake by zurn on Thursday April 26, 2012 @01:17AM (#3892544)
Very good article.

There is a huge cultural blindfold that Unix/C have formed indirectly formed on everybody's thinking about computers. Most of us have never used computers outside the Unix sphere of influence.

The point about hardware (in this case instruction set) adapting to Unix/C strings is also a recurring pattern, and makes it hader to climb out of the pit of local optimum /path dependence.

Fun thought experiment to think how things might have turned out if ideas from Burroughs mainframes, Transputer, Lisp machines or Intel i432 type of things had taken off.

But Unix was easy to port because of simplicity, kinda-open-source for universities, etc. even though those properties soon disappeared after it became popular. And we know the rest.

Re:Poul-Henning Kamp: The Most Expensive One-byte Mistake by wladimir on Thursday April 26, 2012 @05:06AM (#3893032)
Unix is not all-terrible though. It also has quite a few very sane ideas such as combining simple commands into pipelines and "everything is a file descriptor".

I do agree that zero-terminated strings are the worst idea ever. It's almost impossible to use them in a secure and performant way (at the least it requires a lot of extra thinking). Alternative string libraries such as bstring make string handling in C sane, but unfortunately the default C strings mean a lot of people still use char* and str(l)cpy/str(l)cat/strlen/...

The worst thing is that many are religiously convinced that it is a good idea just because it's the UNIX and C way (TM). It's so deeply ingrained.

Re:Poul-Henning Kamp: The Most Expensive One-byte Mistake by epo on Thursday April 26, 2012 @05:50AM (#3893123)
Actually most have never knowingly used computers outside the Windows sphere of influence but we shall let that pass. Unix was a massive breath of fresh air at the time, it became popular and widespread because it was so much better (and more accessible/cheaper) than commercial operating systems of the time.

The cultural bindfold you refer to is because there has been no comparable revolution in operating systems design since Unix, people tinker (comparatively) at the edges because Unix got so much right. NUL terminated strings is a minor aspect of library design. Yes with hindsight if things had been done differently then things might now be different, but like the QWERTY keyboard once decisions get out in the world they become too difficult to reverse.

Re:Poul-Henning Kamp: The Most Expensive One-byte Mistake by zokier on Thursday April 26, 2012 @07:49AM (#3893391)
Windows, especially the NT line, has certainly been inside "the UNIX sphere of influence".
Re:Poul-Henning Kamp: The Most Expensive One-byte Mistake by jpitz on Thursday April 26, 2012 @08:12AM (#3893474)
Well, more like VMS.
Re:Poul-Henning Kamp: The Most Expensive One-byte Mistake by gaius on Thursday April 26, 2012 @06:30AM (#3893194)
Yes; it's next to impossible to buy a processor now that isn't really a "C-machine", just as Symbolics made "Lisp machines" (or Chuck Moore will sell you a "Forth machine" with hardware designed to efficiently deal with stacks). The concept that processors really aren't language-agnostic (i.e. they actually do care whence originated the machine code) needs more publicity.
Re:Poul-Henning Kamp: The Most Expensive One-byte Mistake by arethuza on Thursday April 26, 2012 @05:54AM (#3893134)
"Fun thought experiment to think how things might have turned out if ideas from Burroughs mainframes"

Have you ever used a Burroughs mainframe? They did have a rather wonderful architecture but the interactive user experience from CANDE left a lot to be desired.

Re:Poul-Henning Kamp: The Most Expensive One-byte Mistake by daeken on Thursday April 26, 2012 @07:58AM (#3893422)
I don't think anyone is saying that we should go back to Burroughs mainframes, or anything else from the past for that matter. But we should definitely draw more inspiration from them.
Re:Poul-Henning Kamp: The Most Expensive One-byte Mistake by arethuza on Thursday April 26, 2012 @08:16AM (#3893487)
Sorry, bit of a knee jerk reaction there, clearly the eldritch horror that was Burrough's idea of an interactive user environment left me with some mental scars.

However, one positive thing about briefly using CANDE was that it made me REALLY appreciate Unix when we eventually moved to using it.

Re:Poul-Henning Kamp: The Most Expensive One-byte Mistake by wglb on Sunday April 29, 2012 @09:27AM (#3905924)
Like the idea of virtual memory?