4 ms·
If you look at C and UNIX, you will see that there is a very intimate relation between those two. If you write an operating system, what is the easiest language
by constantcrying 4y ago
If you look at C and UNIX, you will see that there is a very intimate relation between those two.
If you write an operating system, what is the easiest language to use if you want to build on top of that operating system? The answer is almost certainly the language you wrote that operating system in.
In some sense C was the DSL to build UNIX. It becomming a general purpose language happened after that and because of the success of UNIX.
Also in general operating systems are extremely complex and need a wide range of functionality and extensibility while being able to easily interface with assembly. That makes a DSL tend towards a general purpose language, as has happened with C.
- abrax3141 4y agoInterestingly, the same is true for Lisp -- it was not initially a GPL. Perhaps the same is true for every GPL? (We may just be playing semantic games here because, for example, Fortran being a "math-oriented GPL" is the same as it being a "DSL for math."...hmmm)
- constantcrying 4y agoTo me the distinction is largely in the eyes of the user. Most modern programming languages have facilities to achieve a wide range of goals. I think the question "is there a programming language made specifically for X?", is far less important than the question "is there a language in which I can do X, efficiently/securely/scalable/...?" There are some languages which are clearly domain specific. Markdown is not a general computing language.
- sargstuff 4y agoOriginal Lisp was invisioned as a way to not have to write assembly. Note: That's avoid having to write os, interpreter, compiler, shell, etc 1st before writting application.
- abrax3141 4y agoI don't think that this is true, except perhaps indirectly. According to Duncan McGreggor's wonderful (and very well researched) "Hidden History of Lisp" https://blog.lfe.io/excerpts/2015/03/27/1101-the-hidden-origins-of-lisp-future/ https://blog.lfe.io/excerpts/2015/03/27/1101-the-hidden-orig... McCarthy was interested in computer intelligence, logic, and mathematics. Shaw, Newell, and Simon, at RAND and CIT, were already working on exactly these topics in their Logic Theorist project, using IPL, an ugly language that they designed, and ran on one the first digital computers, called JOHNNIAC - after John Von Neumann. I you are interested in just how ugly IPL(V) was, you can see more of it than you'll ever want to here: https://exhibits.stanford.edu/feigenbaum/catalog/ff363pt6522 https://exhibits.stanford.edu/feigenbaum/catalog/ff363pt6522 Ugly as it may have been, IPL language did exactly what McCarthy wanted, and introduced the concepts of list processing, symbols, and recursion. But, a bit to your point, it's ugliness, being akin to assembly, was exceedingly off-putting. A couple years later, at MIT, McCarthy (who was simultaneously and coincidentally playing around with lambda calculus) and his students (most centrally, Steve Russell) figured out how to do list processing etc in a much simpler syntax. Still, the "modern" homoiconic Lisp of s-expressions was a bit farther down the line, as it was originally conceived with M-expressions, which were a bit more algol-like. S-expressions were initially just the data representation. Russell realized that the s-expression syntax could be used for both. Thus the birth of Lisp, probably the world's most influential and enduring programming language. Sorry, this got a bit off topic.
- sargstuff 4y agoNot if contrast with MUMPS language (pre-algo) as viewed from issues with today's lisp & multiprocessing. But that's a discussion more for a separate post.
- samuell 4y agoThis was exactly my thought too, that C is pretty much the DSL for (many) OSes.
- sargstuff 4y agoDSL for assembler might be more in-line with original C language intent.