Kev sib tham: tus qauv UNIX cov khoom siv uas tsawg tus neeg tau siv thiab tseem siv

Ib lub lim tiam dhau los, Douglas McIlroy, tus tsim tawm ntawm UNIX pipeline thiab tus tsim ntawm lub tswvyim ntawm "cov ntsiab lus-oriented programming", hais hais txog qhov nthuav thiab txawv txawv UNIX cov kev pab cuam uas tsis tau siv dav. Cov ntawv tshaj tawm tau tshaj tawm kev sib tham nquag ntawm Hacker Xov Xwm. Peb tau sau cov khoom nthuav tshaj plaws thiab yuav zoo siab yog tias koj koom nrog kev sib tham.

Kev sib tham: tus qauv UNIX cov khoom siv uas tsawg tus neeg tau siv thiab tseem siv
Yog - Virginia Johnson β€” Unsplash

Ua haujlwm nrog ntawv

UNIX-zoo li operating systems muaj cov txheej txheem txheej txheem rau formatting ntawv. Kev siv hluav taws xob typo cov tso cai rau koj los tshuaj xyuas cov ntaub ntawv rau typos thiab xas - cov lus uas tshwm sim hauv cov khoom ib zaug xwb. Interestingly, qhov kev pab cuam nrhiav typos tsis siv phau ntawv txhais lus. Nws tsuas yog nyob ntawm cov ntaub ntawv hauv cov ntaub ntawv thiab ua qhov kev soj ntsuam zaus siv trigrams (ib ntu ntawm peb lub cim). Hauv qhov no, tag nrho cov txee tsim nyog tau khaws cia hauv 26x26x26 array. Raws li Douglas McIlroy, tus nqi ntawm lub cim xeeb no NW nyuam qhuav txaus rau ob peb ib-byte suav. Yog li ntawd, txhawm rau txuag nyiaj, lawv tau sau rau hauv logarithmic daim ntawv.

Niaj hnub no typo tau hloov los ntawm cov niaj hnub thiab muaj tseeb phau ntawv txhais lus raws li spell checkers. Txawm li cas los xij, tib neeg tseem nco txog qhov ntsuas - ob peb xyoos dhau los tus neeg nyiam tswvcuab kev siv typo hauv Go. Lub chaw khaws cia tseem tab tom hloov kho.

Lwm lub cuab yeej rau kev ua haujlwm nrog cov ntaub ntawv los ntawm 80s yog pob Writer's Workbench Los ntawm Lorinda Cherry thiab Nina McDonald ntawm Bell Labs. Nws muaj pes tsawg leeg suav nrog cov cuab yeej los txheeb xyuas qhov chaw ntawm kev hais lus thiab cov ntaub ntawv style, nrhiav tautologies thiab cov kab lus tsis tsim nyog. Cov khoom siv hluav taws xob tau tsim los pab rau cov tub ntxhais kawm, thiab ib zaug lawv siv cov tub ntxhais kawm ntawm Colorado State University hauv Asmeskas. Tab sis thaum ntxov nineties, Writer's Workbench tsis nco qab vim nws tsis suav nrog Version 7 Unix. Txawm li cas los xij, qhov cuab yeej no txuas ntxiv nws txoj hauv kev rau cov neeg xyaum - piv txwv li, Grammatiken rau IBM PC.

UNIX tseem muab cov cuab yeej txheem los ua haujlwm nrog cov qauv yooj yim dua. Muaj ib hom lus preprocessor rau formatting lej kab zauv ua eqn. Nws yog ib qho tseem ceeb rau qhov tseeb tias los tso saib cov qauv, tus tsim tawm tsuas yog yuav tsum tau piav qhia hauv cov lus yooj yim thiab cov cim. Cov ntsiab lus tso cai rau koj hloov cov cim lej vertically thiab kab rov tav, hloov lawv qhov ntau thiab tsawg thiab lwm yam tsis muaj. Yog tias koj hla txoj kab mus rau kev siv hluav taws xob:

sum from { k = 1 } to N { k sup 2 }

Cov zis yuav tsim cov qauv hauv qab no:

Kev sib tham: tus qauv UNIX cov khoom siv uas tsawg tus neeg tau siv thiab tseem siv

Nyob rau hauv lub 1980s-1990s eqn pab Cov kws tshaj lij IT sau phau ntawv qhia rau software. Tab sis tom qab ntawd nws tau hloov los ntawm LaTeX system, uas siv txawm Habr. Tab sis eqn yog thawj cov cuab yeej ntawm nws cov chav kawm kom nyob twj ywm ib feem ntawm UNIX-zoo li kev khiav hauj lwm systems.

Ua haujlwm nrog cov ntaub ntawv

Hauv cov xov xwm thematic, Hacker News cov neeg nyob hauv tau sau tseg ntau yam tsis tshua siv cov khoom siv rau kev ua haujlwm nrog cov ntaub ntawv. Ib tug ntawm lawv yog comm piv rau lawv. Qhov no yog ib qho yooj yim analogue diff, tsim nyog rau kev ua haujlwm hauv cov ntawv sau. Nws sau tau Richard Stallman nws tus kheej nrog David MacKenzie.

Qhov kev pab cuam tso zis muaj peb kab. Thawj kem muaj qhov tseem ceeb tshwj xeeb rau thawj cov ntaub ntawv, kab thib ob muaj cov txiaj ntsig tshwj xeeb rau cov ntaub ntawv thib ob. Sab thib peb suav nrog tag nrho cov nqi. Yuav kom comm ua haujlwm kom raug, cov ntaub ntawv sib piv yuav tsum tau muab faib ua lexically. Yog li ntawd, ib qho ntawm cov neeg nyob hauv qhov chaw pom tias ua haujlwm nrog kev siv hluav taws xob hauv daim ntawv hauv qab no:

comm <(sort fileA.txt) <(sort fileB.txt)

Comm yog qhov yooj yim siv los txheeb xyuas qhov kev sau ntawm cov lus. Nws yog txaus los piv lawv nrog cov ntaub ntawv siv phau ntawv txhais lus. Xav txog cov subtleties cuam tshuam nrog qhov xav tau los txheeb cov ntaub ntawv, muaj lub tswv yim, uas Stallman thiab MacKenzie tau sau lawv cov khoom siv tshwj xeeb rau cov ntaub ntawv siv no.

Kev sib tham: tus qauv UNIX cov khoom siv uas tsawg tus neeg tau siv thiab tseem siv
Yog - Marnix Hogendoorn β€” Unsplash

Kuj yog ib tug neeg koom kev sib tham ntawm HN sau tseg tus neeg ua haujlwm muaj peev xwm muab tshuaj txhuam, uas tsis pom tseeb rau nws. Nws tso cai rau koj los cuam tshuam cov ntaub ntawv ntws los yog faib ib qho kwj rau hauv ob kab thaum tso tawm:

$ paste <( echo -e 'foonbar' ) <( echo -e 'baznqux' )
foo     baz
bar     qux
$ echo -e 'foonbarnbaznqux' | paste - -
foo     bar
baz     qux

Ib ntawm cov neeg siv pom, uas feem ntau tsis yog cov kev daws teeb meem zoo tshaj plaws yog siv los ua cov haujlwm yooj yim no: pib nrog fmt ua, ex thiab xaus mlr ua с j и rs.

Cov txheej txheem zoo li cas ntawm UNIX-zoo li lub tshuab ua haujlwm tau tshawb pom rau koj?

Dab tsi peb sau txog hauv peb cov tuam txhab blog:

Kev sib tham: tus qauv UNIX cov khoom siv uas tsawg tus neeg tau siv thiab tseem siv Yuav Ua Li Cas Domain Name System Evolved: ARPANET Era
Kev sib tham: tus qauv UNIX cov khoom siv uas tsawg tus neeg tau siv thiab tseem siv Keeb kwm ntawm Lub Npe Lub Npe System: Thawj DNS Servers
Kev sib tham: tus qauv UNIX cov khoom siv uas tsawg tus neeg tau siv thiab tseem siv Keeb kwm ntawm DNS: thaum lub npe sau tau them
Kev sib tham: tus qauv UNIX cov khoom siv uas tsawg tus neeg tau siv thiab tseem siv Keeb Kwm ntawm Domain Name System: Protocol Wars

Tau qhov twg los: www.hab.com

Ntxiv ib saib