5 ms·
At the same time, the POSIX shell can be implemented in a tiny binary (dash compiles to 80k on i386). Shells that implement advanced objects and error handling
by chasil 2y ago
At the same time, the POSIX shell can be implemented in a tiny binary (dash compiles to 80k on i386).
Shells that implement advanced objects and error handling cannot sink this low, and thus the embedded realm is not accessible to them.
- kragen 2y agothat's dramatically larger than any pdp-11 executable, including the original bourne shell, and also, for example, xlisp, which was an object-oriented lisp for cp/m advanced objects and error handling do not require tens of kilobytes of machine code. a lot of why the bourne shell is so error-prone is just design errors, many of them corrected in es and rc
- chasil 2y agoDavid Korn would not agree with you. "A lot of effort was made to keep ksh88 small. In fact the size you report on Solaris is without stripping the symbol table. The size that I am getting for ksh88i on Solaris is 160K and the size on NetBSD on intel is 135K. "ksh88 was able to compile on machines that only allowed 64K text. There were many compromises to this approach. I gave up on size minimization with ksh93." https://m.slashdot.org/story/16351 https://m.slashdot.org/story/16351
- kragen 2y agoit sounds like he did agree, even laboring under the heavy burden of bourne shell compatibility
- ronjakoi 2y agoWhat are es and rc? Can you give some links?
- chubot 2y agoSearch for "rc shell" and "es shell" https://en.wikipedia.org/wiki/Rc_(Unix_shell) https://en.wikipedia.org/wiki/Rc_(Unix_shell) https://wryun.github.io/es-shell/ https://wryun.github.io/es-shell/ They are alternative shells, both from the 90's I believe. POSIX was good in some ways, but bad in that it froze a defective shell design It has been acknowledged as defective for >30 years https://www.oilshell.org/blog/2019/01/18.html#slogans-to-explain-the-project https://www.oilshell.org/blog/2019/01/18.html#slogans-to-exp... --- es shell is heavily influenced by Lisp. And actually I just wrote a comment that said my project YSH has garbage collection, but the es shell paper has a nice section on garbage collection (which is required for Lisp-y data structures) And I took some influence from it Trivia: one of the authors of es shell, Paul Haahr, went on to be a key engineer in the creation of Google
- kragen 2y agoThanks, I didn't know that about es!
- pjmlp 2y agoSure they can, Smalltalk and Lisp environments didn't had the luxury of 80k when they were invented.
- amszmidt 2y agoNo, they had the luxury of having much more.
- pjmlp 2y agoLearn computing history, starting with Lisp REPLs on IBM 704 in 1958! 20 years later we had 64 KB to fit an whole OS and applications on home computers.
- amszmidt 2y agoI am quite aware of computer history. The Xerox Alto had between 90k and 512k of memory, and a disk drive that managed 2.5M. Lisp Machines required a 80M disk with at least 512k of memory. Neither Smalltalk nor Lisp fit in 64k in 1980 (~20 years later). Even the IBM 7094 which ran a very tiny Lisp (1.5) had around 32k 36bit words.
- pjmlp 2y agoUnless I got my math wrong, 32 is less than 80. Also where did I on my comment mentioned Lisp Machines?
- amszmidt 2y ago"20 years later" -- nobody was running IBM 705 in 1980 for Lisp or Smalltalk. The 7601 was backed by hard disk as well. These machines used quite a bit of paging. You are purposefully confusing multiple decades of computing. Smalltalk was much later, and required quite large machines, so did Lisp when it became popular on machines like the PDP-10 and ITS which had much more memory, just running Macsyma was a PITA.