Random Articles

Have a deep view into what people are curious about.

🔗 Constraint Programming

🔗 Computing

Constraint programming (CP) is a paradigm for solving combinatorial problems that draws on a wide range of techniques from artificial intelligence, computer science, and operations research. In constraint programming, users declaratively state the constraints on the feasible solutions for a set of decision variables. Constraints differ from the common primitives of imperative programming languages in that they do not specify a step or sequence of steps to execute, but rather the properties of a solution to be found. In addition to constraints, users also need to specify a method to solve these constraints. This typically draws upon standard methods like chronological backtracking and constraint propagation, but may use customized code like a problem specific branching heuristic.

Constraint programming takes its root from and can be expressed in the form of constraint logic programming, which embeds constraints into a logic program. This variant of logic programming is due to Jaffar and Lassez, who extended in 1987 a specific class of constraints that were introduced in Prolog II. The first implementations of constraint logic programming were Prolog III, CLP(R), and CHIP.

Instead of logic programming, constraints can be mixed with functional programming, term rewriting, and imperative languages. Programming languages with built-in support for constraints include Oz (functional programming) and Kaleidoscope (imperative programming). Mostly, constraints are implemented in imperative languages via constraint solving toolkits, which are separate libraries for an existing imperative language.

Discussed on

🔗 Taarof

🔗 Iran

Taarof or Tarof (also transliterated as Taʿârof; Persian: تعارف‎) is a Persian word which refers to an Iranian form of civility or art of etiquette that emphasizes both deference and social rank.

Etymologically the origins of the word trace back to an Arabic word meaning "acquaintance" or "knowledge", but Iranians have transformed taarof into something "uniquely Iranian" and tend to understand it as a ritual politeness that levels the playing field and promotes equality in a hierarchical culture. Taarof between friends, or a host and guest, emphasizes the value of friendship as a priority to everything else in the world. Another understanding is that taarof is a way of managing social relations with decorous manners. It could be used as a basis for mutual goodwill (positively) or as "a social or political weapon that confuses the recipient and puts him at a disadvantage" (negatively). Those who are intimately familiar with Iranian culture seem to agree that taarof is one of the most fundamental things to understand about Iranian culture.

According to Middle East scholar William O. Beeman, "Taarof is an extraordinarily difficult concept encompassing a broad complex of behaviors which mark and underscore differences in social status." For example, in Iranian culture, whoever walks through a doorway first gets a form of status, but the person who makes the other go through the door first also gains status by having made the other person do it through their show of grace and deference. When it comes to matters of rank, "one defers to superiors (tribute), and confers on inferiors (favor), presses honor on equals (neither tribute nor favor) or accepts the honor from a proper source, and thereby "wins". Status is relative for individuals in different interactions, according to Beeman, and rights and obligations shift constantly with changes in social environments.

Discussed on

🔗 1989 Tiananmen Square Protests

🔗 Human rights 🔗 History 🔗 Military history 🔗 Crime 🔗 China 🔗 Politics 🔗 Socialism 🔗 Law Enforcement 🔗 Sociology 🔗 Sociology/social movements 🔗 Military history/Cold War 🔗 Military history/Asian military history 🔗 Military history/Chinese military history

The Tiananmen Square protests or Tiananmen Square Incident, commonly known in mainland China as the June Fourth Incident (Chinese: 六四事件; pinyin: liùsì shìjiàn, literally six-four incident), were student-led demonstrations held in Tiananmen Square in Beijing during 1989. The popular national movement inspired by the Beijing protests is sometimes called the '89 Democracy Movement (Chinese: 八九民運; pinyin: bājiǔ mínyùn). The protests started on April 15 and were forcibly suppressed on June 4 when the government declared martial law and sent the military to occupy central parts of Beijing. In what became known as the Tiananmen Square Massacre (Chinese: 天安門大屠殺; pinyin: tiān'ānmén dà túshā), troops with assault rifles and tanks fired at the demonstrators and those trying to block the military's advance into Tiananmen Square. Estimates of the death toll vary from several hundred to several thousand, with thousands more wounded.

Set off by the death of pro-reform Communist general secretary Hu Yaobang in April 1989, amid the backdrop of rapid economic development and social changes in post-Mao China, the protests reflected anxieties about the country's future in the popular consciousness and among the political elite. The reforms of the 1980s had led to a nascent market economy which benefited some people but seriously disaffected others, and the one-party political system also faced a challenge of legitimacy. Common grievances at the time included inflation, corruption, limited preparedness of graduates for the new economy, and restrictions on political participation. The students called for greater accountability, constitutional due process, democracy, freedom of the press, and freedom of speech, although they were highly disorganized and their goals varied. At the height of the protests, about 1 million people assembled in the Square.

As the protests developed, the authorities responded with both conciliatory and hardline tactics, exposing deep divisions within the party leadership. By May, a student-led hunger strike galvanized support for the demonstrators around the country, and the protests spread to some 400 cities. Ultimately, China's paramount leader Deng Xiaoping and other Communist Party elders believed the protests to be a political threat and resolved to use force. The State Council declared martial law on May 20 and mobilized as many as 300,000 troops to Beijing. The troops advanced into central parts of Beijing on the city's major thoroughfares in the early morning hours of June 4, killing both demonstrators and bystanders in the process.

The international community, human rights organizations, and political analysts condemned the Chinese government for the massacre. Western countries imposed arms embargoes on China. The Chinese government made widespread arrests of protesters and their supporters, suppressed other protests around China, expelled foreign journalists, strictly controlled coverage of the events in the domestic press, strengthened the police and internal security forces, and demoted or purged officials it deemed sympathetic to the protests. More broadly, the suppression halted the policies of liberalization in the 1980s. Considered a watershed event, the protests set the limits on political expression in China up to the present day. Its memory is widely associated with questioning the legitimacy of Communist Party rule and remains one of the most sensitive and most widely censored topics in China.

Discussed on

🔗 Six Nines in Pi

🔗 Mathematics

A sequence of six 9's occurs in the decimal representation of the number pi (π), starting at the 762nd decimal place. It has become famous because of the mathematical coincidence and because of the idea that one could memorize the digits of π up to that point, recite them and end with "nine nine nine nine nine nine and so on", which seems to suggest that π is rational. The earliest known mention of this idea occurs in Douglas Hofstadter's 1985 book Metamagical Themas, where Hofstadter states

I myself once learned 380 digits of π, when I was a crazy high-school kid. My never-attained ambition was to reach the spot, 762 digits out in the decimal expansion, where it goes "999999", so that I could recite it out loud, come to those six 9's, and then impishly say, "and so on!"

This sequence of six nines is sometimes called the "Feynman point", after physicist Richard Feynman, who allegedly stated this same idea in a lecture. It is not clear when, or even if, Feynman made such a statement, however; it is not mentioned in published biographies or in his autobiographies, and is unknown to his biographer, James Gleick.

Discussed on

🔗 Pearson Hashing

🔗 Computer science

Pearson hashing is a hash function designed for fast execution on processors with 8-bit registers. Given an input consisting of any number of bytes, it produces as output a single byte that is strongly dependent on every byte of the input. Its implementation requires only a few instructions, plus a 256-byte lookup table containing a permutation of the values 0 through 255.

This hash function is a CBC-MAC that uses an 8-bit substitution cipher implemented via the substitution table. An 8-bit cipher has negligible cryptographic security, so the Pearson hash function is not cryptographically strong, but it is useful for implementing hash tables or as a data integrity check code, for which purposes it offers these benefits:

  • It is extremely simple.
  • It executes quickly on resource-limited processors.
  • There is no simple class of inputs for which collisions (identical outputs) are especially likely.
  • Given a small, privileged set of inputs (e.g., reserved words for a compiler), the permutation table can be adjusted so that those inputs yield distinct hash values, producing what is called a perfect hash function.
  • Two input strings differing by exactly one character never collide. E.g., applying the algorithm on the strings ABC and AEC will never produce the same value.

One of its drawbacks when compared with other hashing algorithms designed for 8-bit processors is the suggested 256 byte lookup table, which can be prohibitively large for a small microcontroller with a program memory size on the order of hundreds of bytes. A workaround to this is to use a simple permutation function instead of a table stored in program memory. However, using a too simple function, such as T[i] = 255-i, partly defeats the usability as a hash function as anagrams will result in the same hash value; using a too complex function, on the other hand, will affect speed negatively. Using a function rather than a table also allows extending the block size. Such functions naturally have to be bijective, like their table variants.

The algorithm can be described by the following pseudocode, which computes the hash of message C using the permutation table T:

algorithm pearson hashing is
    h := 0

    for each c in C loop
        h := T[ h xor c ]
    end loop

    return h

The hash variable (h) may be initialized differently, e.g. to the length of the data (C) modulo 256; this particular choice is used in the Python implementation example below.

🔗 Barbie Liberation Organization

🔗 Sociology 🔗 Organizations 🔗 Media 🔗 Culture 🔗 Sociology/social movements 🔗 Toys

The Barbie Liberation Organization or BLO, sponsored by RTMark, were a group of artists and activists involved in culture jamming. They gained notoriety in 1993 after switching voice boxes in talking G.I. Joes and Barbie dolls. The BLO performed "surgery" on a reported 300–500 dolls from retail and returned them to shelves, an action they refer to as shopgiving. Thus, Teen Talk Barbie dolls would say phrases such as "Vengeance is mine", while G.I. Joe dolls would say phrases such as "The beach is the place for summer!"

Discussed on

🔗 The most remote tree in the world

🔗 Africa 🔗 Plants 🔗 Africa/Niger

The Ténéré Tree (French: L'Arbre du Ténéré) was a solitary acacia, of either Acacia raddiana or Acacia tortilis, that was once considered the most isolated tree on Earth—the only one for over 400 kilometres (250 mi). It was a landmark on caravan routes through the Ténéré region of the Sahara Desert in northeast Niger, so well known that it and the Arbre Perdu (Lost Tree) to the north are the only trees to be shown on a map at a scale of 1:4,000,000. The Tree of Ténéré was located near a 40-metre (130 ft) deep well. It was knocked down in 1973, by a truck driver.

Discussed on

🔗 Hydraulic Telegraph

A hydraulic telegraph (Greek: υδραυλικός τηλέγραφος) is either of two different hydraulic-telegraph telecommunication systems. The earliest one was developed in 4th-century BC Greece, while the other was developed in 19th-century AD Britain. The Greek system was deployed in combination with semaphoric fires, while the latter British system was operated purely by hydraulic fluid pressure.

Although both systems employed water in their sending and receiver devices, their transmission media were completely different. The ancient Greek system transmitted its semaphoric information to the receiver visually, which limited its use to line-of-sight distances in good visibility weather conditions only. The 19th-century British system used water-filled pipes to effect changes to the water level in the receiver unit (similar to a transparent water-filled flexible tube used as a level indicator), thus limiting its range to the hydraulic pressure that could be generated at the transmitter's device.

While the Greek device was extremely limited in the codes (and hence the information) it could convey, the British device was never deployed in operation other than for very short-distance demonstrations. Although the British device could be used in any visibility within its range of operation, it could not work in sub-zero temperatures without additional infrastructure to heat the pipes. This contributed to its impracticality.

Discussed on

🔗 SmartWater – Anti-theft Asset Marking System

🔗 Law Enforcement

SmartWater is a traceable liquid and forensic asset marking system (taggant) that is applied to items of value to identify thieves and deter theft. The liquid leaves a long lasting and unique identifier, whose presence is invisible except under an ultraviolet black light.

Discussed on

🔗 Jove (Jonathan's Own Version of Emacs)

🔗 Computing

JOVE (Jonathan's Own Version of Emacs) is an open-source, Emacs-like text editor, primarily intended for Unix-like operating systems. It also supports MS-DOS and Microsoft Windows. JOVE was inspired by Gosling Emacs but is much smaller and simpler, lacking Mocklisp. It was originally created in 1983 by Jonathan Payne while at Lincoln-Sudbury Regional High School in Massachusetts, United States on a PDP-11 minicomputer. JOVE was distributed with several releases of BSD Unix, including 2.9BSD, 4.3BSD-Reno and 4.4BSD-Lite2.

As of 2022, the latest development release of JOVE is version 4.17.4.4; the stable version is 4.16. Unlike GNU Emacs, JOVE does not support UTF-8.

Discussed on