What is a Shim?

Simple Explanation via Cartoon An example of a shim: Summary A shim is some code that takes care of what’s asked (by ‘interception’), without anyone being any wiser about it. Example of a Shim An example of a shim would be rbenv (a neat ruby tool). Calls to ruby commands are “shimmed”. i.e. when you … Read more

What do pty and tty mean?

tty originally meant “teletype” and “pty” means “pseudo-teletype”. In UNIX, /dev/tty* is any device that acts like a “teletype”, i.e: a terminal. (Called teletype because that’s what we had for terminals in those benighted days.) A pty is a pseudotty, a device entry that acts like a terminal to the process reading and writing there, … Read more

What is the difference between a shim and a polyfill?

A shim is any piece of code that performs interception of an API call and provides a layer of abstraction. It isn’t necessarily restricted to a web application or HTML5/CSS3. A polyfill is a type of shim that retrofits legacy browsers with modern HTML5/CSS3 features usually using Javascript or Flash. Answering your specific question, call … Read more