Popular Articles (Page 27)
Hint: You are looking at the most popular articles. If you are interested in popular topics instead, click here.
π Duffs Device
In the C programming language, Duff's device is a way of manually implementing loop unrolling by interleaving two syntactic constructs of C: the do-while loop and a switch statement. Its discovery is credited to Tom Duff in November 1983, when Duff was working for Lucasfilm and used it to speed up a real-time animation program.
Loop unrolling attempts to reduce the overhead of conditional branching needed to check whether a loop is done, by executing a batch of loop bodies per iteration. To handle cases where the number of iterations is not divisible by the unrolled-loop increments, a common technique among assembly language programmers is to jump directly into the middle of the unrolled loop body to handle the remainder. Duff implemented this technique in C by using C's case label fall-through feature to jump into the unrolled body.
Discussed on
- "Duff's Device" | 2020-05-25 | 145 Upvotes 59 Comments
- "Duffs Device" | 2016-10-21 | 19 Upvotes 4 Comments
- "Duff's device: do + switch fall-through = loop unrolling" | 2009-08-13 | 16 Upvotes 11 Comments
π Law of Jante
The Law of Jante (Danish: Janteloven) is a code of conduct known in Nordic countries that characterizes not conforming, doing things out of the ordinary, or being overtly personally ambitious as unworthy and inappropriate. The attitudes were first formulated in the form of the ten rules of Jante Law by the Dano-Norwegian author Aksel Sandemose in his satirical novel A Fugitive Crosses His Tracks (En flyktning krysser sitt spor, 1933), but the actual attitudes themselves are older. Sandemose portrays the fictional small Danish town Jante, which he modelled upon his native town NykΓΈbing Mors in the 1930s, where nobody was anonymous, which is typical of all small towns and communities.
Used generally in colloquial speech in the Nordic countries as a sociological term to denote a social attitude of disapproval towards expressions of individuality and personal success, it emphasizes adherence to the collective.
Discussed on
- "Law of Jante" | 2024-07-31 | 10 Upvotes 4 Comments
- "The Law of Jante" | 2023-11-19 | 12 Upvotes 1 Comments
- "Law of Jante" | 2023-05-23 | 13 Upvotes 2 Comments
- "Law of Jante" | 2017-09-30 | 87 Upvotes 61 Comments
π A Tesla Valve
A Tesla valve, called by Tesla a valvular conduit, is a fixed-geometry passive check valve. It allows a fluid to flow preferentially in one direction, without moving parts. The device is named after Nikola Tesla, who was awarded U.S. Patent 1,329,559 in 1920 for its invention. The patent application describes the invention as follows:
The interior of the conduit is provided with enlargements, recesses, projections, baffles, or buckets which, while offering virtually no resistance to the passage of the fluid in one direction, other than surface friction, constitute an almost impassable barrier to its flow in the opposite direction.
Tesla illustrates this with the drawing, showing one possible construction with a series of eleven flow-control segments, although any other number of such segments could be used as desired to increase or decrease the flow regulation effect.
One computational fluid dynamics simulation of Tesla valves with two and four segments showed that the flow resistance in the blocking (or reverse) direction was about 15 and 40 times greater, respectively, than the unimpeded (or forward) direction. This lends support to Tesla's patent assertion that in the valvular conduit in his diagram, a pressure ratio "approximating 200 can be obtained so that the device acts as a slightly leaking valve".
The Tesla valve is used in microfluidic applications and offers advantages such as scalability, durability, and ease of fabrication in a variety of materials.
Discussed on
- "Tesla Valve" | 2021-08-12 | 100 Upvotes 40 Comments
- "A Tesla Valve" | 2019-12-18 | 197 Upvotes 42 Comments
π Ghoti
Ghoti is a creative respelling of the word fish, used to illustrate irregularities in English spelling and pronunciation.
Discussed on
- "Ghoti" | 2020-06-20 | 317 Upvotes 239 Comments
π Geneva drive
The Geneva drive or Maltese cross is a gear mechanism that translates a continuous rotation movement into intermittent rotary motion.
The rotating drive wheel is usually equipped with a pin that reaches into a slot located in the other wheel (driven wheel) that advances it by one step at a time. The drive wheel also has an elevated circular blocking disc that "locks" the rotating driven wheel in position between steps.
Discussed on
- "Geneva drive" | 2013-12-17 | 481 Upvotes 71 Comments
π Wikipedia Turns 15
Discussed on
- "Wikipedia Turns 15" | 2016-01-15 | 441 Upvotes 109 Comments
π Kasparov versus the World
Kasparov versus the World was a game of chess played in 1999 over the Internet. Conducting the white pieces, Garry Kasparov faced the rest of the world in consultation, with the World Team moves to be decided by plurality vote. Over 50,000 people from more than 75 countries participated in the game.
The host and promoter of the match was the MSN Gaming Zone, with sponsorship from First USA bank. After 62 moves played over four months, Kasparov won the game. Contrary to expectations, the game produced a mixture of deep tactical and strategic ideas, and although Kasparov won, he admitted that he had never expended as much effort on any other game in his life. He later said, "It is the greatest game in the history of chess. The sheer number of ideas, the complexity, and the contribution it has made to chess make it the most important game ever played."
Discussed on
- "Kasparov versus the World" | 2018-04-28 | 256 Upvotes 60 Comments
- "In 1999, Kasparov played chess against 50000 people." | 2008-12-10 | 33 Upvotes 25 Comments
π 112 Gripes About the French
112 Gripes About the French was a 1945 handbook issued by the United States military authorities to enlisted personnel arriving in France after the Liberation. It was meant to defuse the growing tension between the American military and the locals.
The euphoria of victory over Germany was short-lived, and within months of Liberation, tensions began to rise between the French and the U.S. military personnel stationed in the country, with the former seeing the latter as arrogant and wanting to flaunt their wealth, and the latter seeing the former as proud and resentful. Fights were breaking out more often, and fears were raised, even among high officials, that the situation might eventually lead to a breakdown of civil order.
Set out in a question-and-answer format, 112 Gripes about the French posed a series of well-rehearsed complaints about the French, and then provided a common-sense rejoinder to each of them β the aim of the authors being to bring the average American soldier to a fuller understanding of his hosts.
It has recently been republished in the United States (ISBNΒ 1-4191-6512-7), and in France under the title "Nos amis les FranΓ§ais" ("Our friends the French"), ISBNΒ 2-7491-0128-X.
Discussed on
- "112 Gripes About the French" | 2021-07-16 | 408 Upvotes 339 Comments
π Run Commands, the 'rc' in '.bashrc'
In the context of Unix-like systems, the term rc stands for the phrase "run commands". It is used for any file that contains startup information for a command. It is believed to have originated sometime in 1965 at a runcom facility from the MIT Compatible Time-Sharing System (CTSS).
From Brian Kernighan and Dennis Ritchie:
There was a facility that would execute a bunch of commands stored in a file; it was called runcom for "run commands", and the file began to be called "a runcom". rc in Unix is a fossil from that usage.
Tom Van Vleck, a Multics engineer, has also reminisced about the extension rc: "The idea of having the command processing shell be an ordinary slave program came from the Multics design, and a predecessor program on CTSS by Louis Pouzin called RUNCOM, the source of the '.rc' suffix on some Unix configuration files."
This is also the origin of the name of the Plan 9 from Bell Labs shell by Tom Duff, the rc shell. It is called "rc" because the main job of a shell is to "run commands".
While not historically precise, rc may also be expanded as "run control", because an rc file controls how a program runs. For instance, the editor Vim looks for and reads the contents of the .vimrc file to determine its initial configuration. In The Art of Unix Programming, Eric S. Raymond consistently refers to rc files as "run-control" files.
Discussed on
- "Run Commands, the 'rc' in '.bashrc'" | 2019-09-01 | 620 Upvotes 125 Comments
π Etaoin shrdlu
Discussed on
- "Etaoin Shrdlu" | 2023-09-17 | 22 Upvotes 1 Comments
- "Etaoin Shrdlu" | 2021-11-01 | 116 Upvotes 33 Comments