Live data from Hacker News

Chez Scheme is now free

github.com

161–170 of 185 posts

Re: Chez Scheme is now free

#161

Earlier quoted context omitted.

> That's different. It means C is the most popular language in system programming. And the basis upon which computing sits upon. Take away all C/C++ code and we have nothing or almost nothing. Take away all Lisp/Scheme code and people will barely notice. > Makes so much sense when I explain above that C's prevalence is due to social and economic reasons given you argued it won a popularity contest. If by economic you…

"Take away all C/C++ code and we have nothing or almost nothing." In that meaning, it's true but only as an accident of history that has little to nothing to do with C's design itself. "If by economic you mean "pragmatic" and "engineering considerations", then yes." BCPL was whatever compiled on a machine from the 1960's. C was what compiled on a machine from the 1970's. ALGOL was engineered. C was what compiled and…

>In that meaning, it's true but only as an accident of history that has little to nothing to do with C's design itself.

I don't believe that for a second. C had very specific performance and memory characteristics that alternatives didn't have.

>C was what compiled and ran fast on old hardware. That's it.

That's a HUGE pragmatic benefit, not a "historical accident".

Re: Chez Scheme is now free

#162
post #79

Earlier quoted context omitted.

> C is not the foundation of computing. Why would you say this? Because all the popular OSes, drivers, userlands, servers, GUI libraries, and compilers/languages are 99% written in C (or C++ which is close enough).

That's ignoring all the computing work done before C. C and UNIX were huge steps back in computing, that we're only slowly beginning to recover from.

>That's ignoring all the computing work done before C.

And we can really ignore it software wise. We only use its theoritical heritage now.

Re: Chez Scheme is now free

#163
post #8

Earlier quoted context omitted.

And aside from the JVM implementations and some works in progress the last time I checked, the only one with native instead of green threading.

Racket has native threads, called "places".

Not in the shared memory way I mean (which I did not make clear), per http://docs.racket-lang.org/guide/parallelism.html

The racket/place library provides support for performance improvement through parallelism with the place form. The place form creates a place, which is effectively a new Racket instance that can run in parallel to other places, including the initial place. The full power of the Racket language is available at each place, but places can communicate only through message passing—using the place-channel-put and place-channel-get functions on a limited set of values—which helps ensure the safety and independence of parallel computations.

Compare to current Guile, where the documentation says sharing a hash table without using a mutex will not corrupt memory, but probably won't give you the results you desire.

Re: Chez Scheme is now free

#164

Earlier quoted context omitted.

"Take away all C/C++ code and we have nothing or almost nothing." In that meaning, it's true but only as an accident of history that has little to nothing to do with C's design itself. "If by economic you mean "pragmatic" and "engineering considerations", then yes." BCPL was whatever compiled on a machine from the 1960's. C was what compiled on a machine from the 1970's. ALGOL was engineered. C was what compiled and…

> In that meaning, it's true but only as an accident of history that has little to nothing to do with C's design itself. I don't believe that for a second. C had very specific performance and memory characteristics that alternatives didn't have. > C was what compiled and ran fast on old hardware. That's it. That's a HUGE pragmatic benefit, not a "historical accident".

If C was made a decade later, we'd have been using Pascal or BCPL or something. Other stuff could do the job. Example: Hansen later put a Pascal variant, Edison, on the same machine thst was simpler, safer, and faster to compile. Pascal itself was ported to 70+ architectures from mainframes to 8-bitters.

Nah, we didn't need C. Thompson just really liked BCPL. It was crap. So they tweaked it into C. It still couldn't write UNIX. Ritchie added structs and that version finally did the job. All in the papers I cited. It's facts in their own writings and predecessor papers (eg BCPL) why each decision was made.

Re: Chez Scheme is now free

#165
post #149
post #144

Earlier quoted context omitted.

Yep that one.

Great quote. I had never read that one. The irony of language wars about the monolith that is C vs. the many higher-level languages that allow a human to code according to his mental abstractions and cognitive ability, rather than memorizing machine-specific, or os-specific facts that don't translate over to newer machine architectures. All this on HN, running on a Lisp, Arc, that once sat upon an academic scheme now…

> I agree C is necessary for low-level programming, but for the meat of all the other applications and usages, higher-level languages are needed.

I actually disagree with this for the most part.

C's main advantage as a systems language is its ubiquity -- virtually every platform released in at least the last 25 years has had a reliable C compiler available. Before JavaScript hit it big with Web 2.0, C was a lingua franca among programmers. Starting in the late 80s and continuing throughout much of the 90s, pretty much every textbook that had used Pascal or Pidgin Algol for code listings was edited to contain code listings in C instead.

Of course, as Java gained momentum in the education space in the late 90s and early 00s, many were again updated for code listings in Java. Although a great deal of computer science curricula now crowd around Java, most of them also have at least one required course either on C or that makes good use of C (my own track at NC State contained, beyond the introductory Java courses, "C & Software Tools", "Operating Systems", and "Computer Graphics", all in C).

That all being said, there were historically quite a few systems languages that were better than C in almost every way[1]: they were (typically both memory- and type-) safe, they were higher level in the sense that they offered more and better tools for abstraction (and were therefore considerably more expressive), they offered more opportunities for automatic optimization, they were easier to port to new platforms, many of them were easier to read and had far fewer nuances/"gotchas"/"footguns" than C, the languages themselves were designed in such a way that better tooling was possible, the list goes on and on. The one thing that C had on them was that it was already default. Programmers could (and can) count on the target platform having a C compiler. C programs have access to the wide assortment of C libraries. C was good enough. In a sense, C's popularity was and is perpetuated by the fact that it's the path of least resistance. Once C managed to get into that position, of course it became the "king of systems languages".

I think C's days are numbered. There was a time when systems programming was how you went about learning to program professionally on microcomputers. (Unstructured) BASIC was popular among hobbyists but right-out for professional programs due to abysmal performance. So, you learned assembly/machine language, or, if you were lucky, Turbo Pascal, a similar-in-spirit C system, or QuickBASIC (a compiled, structured language that I'd actually classify as a systems language, given that its feature set is mostly isomorphic to C's). Nothing else offered the level of performance you needed for commercial applications. This continued from the mid 80s through to the early 00s, yielding several generations of programmers who were systems programmers by training.

But things are different now: most programmers nowadays are cutting their teeth on high-level languages like JavaScript, Ruby, Python, Lua, etc., and if they become systems programmers it's due to their own desires and interests rather than out of any real necessity. These programmers know better, and are in an excellent position to notice the many shortcomings of C, and some even outright reject it due to its gnarliness in comparison with the high-level languages they're accustomed to. They know, deep down in their bones, that systems programming doesn't have to be so unsafe, so intricate, so field-of-landmine-ish, so... shitty. And some of them intend to do something about it.

I think we're already seeing the results of this: languages like Rust, Nim, and Myrddin strike me as products of these happenings. And now, I think, is a good time for it, because C's ubiquity has never been less relevant since its rise to power: there's only a handful of platforms anyone needs to support nowadays (POSIX and Windows, desktop and mobile; you can count OS X/iOS as a separate platform if you're feeling squirrely, but even then you haven't reached an unattainable set of targets, and it seems as if soon you may be able to strike Windows from the list as well); if you offer ABI compatibility with C, you get libraries for free; parsing is practically a solved problem; .... And then there's the LLVM, which can handle roughly a third of the compilation process for you -- and it's the backend: the hardest part!

I imagine that within another 20 years to 30 years, C will be hiding within its final strongholds of legacy code and embedded programs. Outside the embedded space, new projects in C will be exceedingly rare, and another decade or two after that will see even the embedded programmers breathing a collective sigh of relief as they become gradually liberated from the tyranny of C.

Only time will tell if the newcomers can usurp C's throne, but I have my fingers crossed. When C gasps its last breath, I will say "good riddance", and happily return to my safe, expressive, pleasant systems language, whatever that may happen to be at that time.

[1]: Just to name a few: Algol 60, Modula-2, Oberon, Ada, Modula-3(one of my personal favorites), ATS, even several non-standard dialects of Pascal such as the ones from UCSD, Apple, and Borland. Then, of course, there are the newcomers: Clay, Rust, Go, D, (does Nim count?), Myrddin (definitely one to keep an eye on), even some dialect(s) of C# were used at Microsoft Research for systems programming. I'd also be remiss not to mention PreScheme (another one of my favorites), used by Jonathan Rees and Richard Kelsey to implement the Scheme48 virtual machine, and its nephew RPython, used for implementing the PyPy JIT framework. I'm sure there are quite a few I'm leaving out, but these are the ones that come to mind at the moment (also, do keep in mind that I'm restricting this to systems languages that are strictly better than C, so some otherwise neat ones like BCPL and BLISS have been intentionally omitted).

Re: Chez Scheme is now free

#166

Earlier quoted context omitted.

> In that meaning, it's true but only as an accident of history that has little to nothing to do with C's design itself. I don't believe that for a second. C had very specific performance and memory characteristics that alternatives didn't have. > C was what compiled and ran fast on old hardware. That's it. That's a HUGE pragmatic benefit, not a "historical accident".

If C was made a decade later, we'd have been using Pascal or BCPL or something. Other stuff could do the job. Example: Hansen later put a Pascal variant, Edison, on the same machine thst was simpler, safer, and faster to compile. Pascal itself was ported to 70+ architectures from mainframes to 8-bitters. Nah, we didn't need C. Thompson just really liked BCPL. It was crap. So they tweaked it into C. It still couldn't…

>Nah, we didn't need C. Thompson just really liked BCPL. It was crap. So they tweaked it into C. It still couldn't write UNIX. Ritchie added structs and that version finally did the job.

Well, Pascal was also inspired by languages that were crap compared to modern (70s/80s needs), and early Pascal's also had tons of missing features -- so I'm not sure what this "C wasn't good enough from the start" is supposed to mean, especially since C already had structs and all by the time it caught on.

Re: Chez Scheme is now free

#167
post #138

Earlier quoted context omitted.

> If by economic you mean "pragmatic" and "engineering considerations", then yes. C didn't won because of "engineering" or "pragmatic" reasons, it won because it run faster on cheap hardware, which was a big selling point. It wasn't a pragmatic choice, but a stupid and short-sighted one - but those tend to usually win. Computing in the last 30 years was done in spite of, not because of, C.

An hardware more powerful than Burroughs machines from 1961, which were happily working with a safe systems programming language based on Algol. Given that I remember the days junior Assembly developers could easily outperform C code, I don't agree with that point. I bet if it wasn't for the rise of free UNIX clones, C would already be sharing drinks with Pascal at some retirement home.

Did I ever tell you about the OS that was written in FORTRAN? Here it is in case I forgot:

https://en.wikipedia.org/wiki/PRIMOS

That's a CPU and OS for Fortran. I found a web framework for Fortran, too. Today, we could do Hacker News in FORTRAN from the metal up. We'll leave that monstrosity to our imaginations, though. Not even that. ;)

Re: Chez Scheme is now free

#168
post #128

Earlier quoted context omitted.

> That's different. It means C is the most popular language in system programming. And the basis upon which computing sits upon. Take away all C/C++ code and we have nothing or almost nothing. Take away all Lisp/Scheme code and people will barely notice. > Makes so much sense when I explain above that C's prevalence is due to social and economic reasons given you argued it won a popularity contest. If by economic you…

> And the basis upon which computing sits upon. How does being the basis follow from being popular > Take away all C/C++ code and we have nothing or almost nothing. We had Lisp machines in the 70s, Oberon system in the 90s, Forth systems basically throughout history... take away C and C++ and something else would've become popular. Probably Pascal, some random low-level Lisp dialect, or Forth, given that those were a…

>How does being the basis follow from being popular

The basis is by definition popular.

If it's not popular (at least where it matters) it's not the basis. Basis is the fundamental thing on top of which something (the IT world as we know it) stands.

One could argue that algorithms are more basic, but we're talking about programming languages here, and at that level, C/C++ has been, and remains king for anything crucial. Even Java, the CLR and V8 are written in C/C++ (to name but a few environments standing on this "base").

>We had Lisp machines in the 70s, Oberon system in the 90s, Forth systems basically throughout history... take away C and C++ and something else would've become popular. Probably Pascal, some random low-level Lisp dialect, or Forth, given that those were all reasonably popular in a similar timeframe as C. For something that is a ‘basis’, C had an awful lot of competition.

Not sure how this argument is supposed to work.

To be the basis of something doesn't mean you don't have competition. Just that you prevailed over it.

>Well, aside from every Emacs and AutoCAD user in the world. Also HN wouldn't exist, so there's that.

Still people would barely notice. If you think Emacs and AutoCAD would make a huge difference to the world if they disappeared (compared to say, Windows, Linux, Android, or, if we're to talk about sites and apps, Google, Facebook, Photoshop, Word, etc) then you've been on an echo chamber for too long.

(Not to mention that most Emacs users use it for if not C/C++ then for languages whose compilers are written with C/C++, on OSes written in C/C++, and that Emacs itself is written in C -- the base were elisp stands on is C).

Re: Chez Scheme is now free

#169
post #127

Earlier quoted context omitted.

> That's different. It means C is the most popular language in system programming. And the basis upon which computing sits upon. Take away all C/C++ code and we have nothing or almost nothing. Take away all Lisp/Scheme code and people will barely notice. > Makes so much sense when I explain above that C's prevalence is due to social and economic reasons given you argued it won a popularity contest. If by economic you…

> And the basis upon which computing sits upon. No, C is the basis of a lot of programs. It is not, nor could it be, the basis of a sane system of computation.

That's an "moral" style judgement.

From a pragmatic perspective computing is just "a lot of programs".

It's not what "should be" -- it's what it is.

Re: Chez Scheme is now free

#170

Earlier quoted context omitted.

> That's different. It means C is the most popular language in system programming. And the basis upon which computing sits upon. Take away all C/C++ code and we have nothing or almost nothing. Take away all Lisp/Scheme code and people will barely notice. > Makes so much sense when I explain above that C's prevalence is due to social and economic reasons given you argued it won a popularity contest. If by economic you…

> If by economic you mean "pragmatic" and "engineering considerations", then yes. C didn't won because of "engineering" or "pragmatic" reasons, it won because it run faster on cheap hardware, which was a big selling point. It wasn't a pragmatic choice, but a stupid and short-sighted one - but those tend to usually win. Computing in the last 30 years was done in spite of, not because of, C.

>C didn't won because of "engineering" or "pragmatic" reasons, it won because it run faster on cheap hardware

Isn't that the very definition of an engineering/pragmatic reason?

Post reply on HN