Ina UNIX take?

Gaisuwa ga duka 🙂 awannan makon naji dadi sosai dan karanta wasu litattafai akan shirye-shirye, gaskiya itace mafi kyawun hanyar koyon shirye shiryen koyaushe tana tare da littafi, duk wani labari, koyo, jagorar da mutum zai iya samu (gami da nawa) kawai ma'auni yayin kwatanta su zuwa littafi na ainihi kan batun. Yanzu, dole ne mu bayyana abin da "ainihin" littafi yake, tunda ba duka littattafai yawanci ke da kyau ba, kuma yawancin su ma suna iya tsada fiye da yadda suke da ƙimar gaske da ɓata lokaci.

A tsawon waɗannan shekarun jerin littattafan da na karanta da jerin littattafan da zan iya ba da shawara sun ɗan bambanta kaɗan, amma ba tare da wata shakka ba a tsakanin wasu abubuwan da na fi so muna da su (ba tare da takamaiman tsari ba):

  • CEH Certified icalabi'ar Dan Dandatsa ta Matt Walker.
  • Farkon Python: Daga Novice zuwa Mai sana'a daga Magnus Lie Hetland.
  • Hacking: fasahar amfani da Jon Erickson.
  • Farawa tare da Arduino daga Massimo Banzi.
  • Koyon babban Shell ta Cameron Newbam & Bill Rosenblatt.
  • Koyon vi da vim editocin ta Arnold Robbins, Elbert Hannah & Linda Lamb.
  • Linux Kernel a cikin Nutshell ta Greg Kroah-Hartman (mai gabatar da shirye-shiryen Gentoo shima).
  • Modern C ta Jens Gustedt
  • Littafin littafin Shellcoder na Chris Anley, John Heasman, Felix «FX» Linder & Gerardo Richarte.
  • Harshen shirye-shiryen C ta Brian W. Kernighan & Dennis M. Ritchie (masu kirkirar C)
  • Yin kuskure tare da GDB ta Richard Stallman, Roland Pesch, Stan Shebs, et al.
  • Karkatar da Inginin Hacking Linux: Asirin Tsaron Linux da Magani daga babban rukuni na masu binciken ISECOM, gami da Pete Herzog, Marga Barceló, Rick Tucker, Andrea Barisani (wani tsohon mai kirkirar Gentoo ne), Thomas Bader, Simon Biles, Colby Clark, Raoul Chiesa, Pablo Endres , Richard Feist, Andrea Ghirardini, Julian "HammerJammer" Ho, Marco Ivaldi, Dru Lavigne, Stephane Lo Presti, Christopher Low, Ty Miller, Armand Puccetti & et al.
  • Tsarin Ayyuka: Hanyar da aka kirkira da Dhananjay M. Dhamdhere
  • Pro Git na Scott Chacon da Ben Straub
  • Shirye-shiryen Gwanayen C: Babban sirri na Peter Van Der Linden.

Zan iya yin magana sosai game da kowane ɗayan waɗannan littattafan, amma a yau za mu ɗauki wasu sassa daga na ƙarshe a cikin jerin, tunda yawancin waɗannan maganganun sun mamaye ni kuma sun taimaka mini in fahimci wasu sirrin ɓoye na C da shirye-shirye. gaba ɗaya. 🙂

Unix da C

Lokacin da muke magana game da UNIX, tarihi yana da alaƙa da asalin wannan tsarin da haɓaka harshe wanda har wa yau yana ɗaya daga cikin waɗanda aka fi amfani da su wajen haɓaka shi da kuma abubuwan da suka samo asali (haɗe da Linux). Kuma mai ban sha'awa, waɗannan biyu an haife su daga "kuskure".

Masana kimiyya Aikin mega ne wanda ya tattaro dakunan gwaje-gwaje na Bell, General Electric da MIT da kanta don ƙirƙirar tsarin aiki.Wannan tsarin ya gabatar da kurakurai da yawa, kuma daga cikin mahimman mahimmanci, gazawar aiki wanda ya sanya tsarin a aikace. Muna magana ne game da shekara ta 1969, don haka kayan aikin wancan lokacin ba za su iya tallafawa adadin kayan aikin da ake buƙata don gudanar da tsarin kanta ba.

Ba har zuwa 1970 ba wasu injiniyoyin Bell suka fara aiki akan tsarin aiki mai sauki, mai sauri, da mara nauyi ga PDP-7. An rubuta dukkan tsarin a ciki Mai tara taro kuma an kira shi UNIX a matsayin parody na Masana kimiyya tunda kawai yana son yin thingsan abubuwa ne, amma ya yi su da kyau maimakon gagarumin aikin ɓarnar da na biyun yake nufi. Yanzu zaku iya fahimtar dalilin Epoch farawa 1 ga Janairu, 1970. 🙂 Gaskiya mai ban sha'awa a wurina. A wancan lokacin har yanzu ba a yi maganar C kanta ba, amma game da a Sabon B tunda ra'ayoyin Ritchie sun fito ne daga yaren B da ake amfani dashi a wancan lokacin.

Farkon C

A cikin shekaru (1972-3) an fara amfani da kalmar C tun lokacin da sabon harshe ya fara bayyana, kuma a wannan lokacin an haifi wata gaskiyar mai ban sha'awa, yawancin masu shirye-shirye da barkwancin shirye-shirye suna cewa:

Masu shirya shirye-shirye sun sani cewa zaka fara kirgawa daga 0 ne maimakon 1.

To, wannan ba gaskiya bane 🙂 ainihin dalilin da yasa ake ɗaukar wannan haka har zuwa yau saboda saboda ƙirƙirar ta, ga marubuta masu harhaɗawa ya fi sauƙi lissafin tsararru ta amfani kashewa, waɗannan suna nuna nisan da ya wanzu daga asalin asali zuwa maƙasudin da ake so, shi ya sa:

array[8]=2;

Yana gaya mana cewa kashi na tsararru an bayyana shi a matsayin 2, saboda an ƙara raka'a 8 a tsararren don isa sararin ƙwaƙwalwar ajiya inda za'a adana kashi 2. Kafin C, yare da yawa sun fara kirgawa daga 1, godiya ga C, yanzu kusan duk suna farawa da 0 🙂 saboda haka ba laifin masu shirin bane, amma na marubuta masu harhaɗa cewa haka abin yake.

Filin Bourne

Wannan batun ne wanda, kodayake bashi da alaƙa da C kai tsaye, zai iya taimakawa fiye da ɗaya don fahimtar dalilin da yasa shirye-shiryen Shell ya zama na musamman, kuma lallai yana da sha'awar sani. Steve Bourne ya rubuta mai tarawa don Algol-68 a wancan lokacin, wannan yare ne wanda mabuɗan ( {} ) ana maye gurbinsu da kalmomi, saboda haka zamu iya fassara ta kamar haka a C:

#define IF if(

#define THEN ){

#define ELSE }else{

#define FI };

Waɗannan su ne wasu misalai na abin da Algol ya fahimta, amma idan muka yi amfani da shi don shirye-shiryen harsashi a yau, za ku fahimci dalilin da ya sa a cikin kwasfan shirye-shiryenku ke buƙatar fi ga kowane if 🙂 lalle ne mai ban sha'awa.

Fara karatu

Ba zan iya gaya muku dukkan bayanan littafin ba, musamman tunda yawancin waɗannan tuni sun kasance batutuwan shirye-shiryen da ke buƙatar fahimtar abubuwan da suka gabata, amma na yi tunanin zan raba muku wasu labarai na ban mamaki waɗanda na samo a kan hanya 🙂 Ni ba su da lokacin yin aiki a kan wasu abubuwan abubuwan da suka kasance a jerin abubuwan yi saboda waɗannan booksan littattafan ƙarshe sun kama ni kawai kuma ina jin daɗin su a kowace rana kuma sama da ƙoƙarin ƙoƙari in fahimce su sosai. Gaisuwa da sannu zan iya raba muku wasu batutuwa, gaisuwa.


Abubuwan da ke cikin labarin suna bin ka'idodinmu na ka'idojin edita. Don yin rahoton kuskure danna a nan.

13 comments, bar naka

Bar tsokaci

Your email address ba za a buga.

*

*

  1. Mai alhakin bayanan: Miguel Ángel Gatón
  2. Dalilin bayanan: Gudanar da SPAM, gudanar da sharhi.
  3. Halacci: Yarda da yarda
  4. Sadarwar bayanan: Ba za a sanar da wasu bayanan ga wasu kamfanoni ba sai ta hanyar wajibcin doka.
  5. Ajiye bayanai: Bayanin yanar gizo wanda Occentus Networks (EU) suka dauki nauyi
  6. Hakkoki: A kowane lokaci zaka iyakance, dawo da share bayanan ka.

  1.   Juan m

    Labarinku ya kasance mai ban sha'awa a gare ni. Na gode sosai.

  2.   HO2 Gi m

    Mai ban sha'awa kamar koyaushe.

  3.   Jose Rafael m

    Abin sha'awa sosai bayani yayi kyau.

  4.   Alex m

    Excelente

  5.   danielga m

    Abin sha'awa !!! Na gode sosai.

  6.   na biyu m

    multrics? ba zai zama yawa ba (https://en.wikipedia.org/wiki/Multics)

    harsuna tare da fihirisa daga 1 ƙirƙira ce ta shaidan ...

    1.    ChrisADR m

      Bayani mai ban sha'awa 🙂 Ina tsammanin a wani lokaci a cikin tarihi an yi amfani da kalmomin guda biyu:

      https://www.landley.net/history/mirror/collate/unix.htm

      kuma a bayyane yake wannan littafin da aka rubuta a tsakiyar 90s.

      Godiya ga bayani 🙂 gaisuwa

      1.    na biyu m

        wa, abin mamaki ne, kun sanya ni shakku, Na duba a cikin "sayi" kwafin Kwararren C Shirye-shiryen: Asirai masu zurfin kuma akwai masu zuwa da yawa, wannan ne karo na farko da na ji wannan ƙirar. Ta yaya m, shi tuni kadan daga trix zomo

        1.    ChrisADR m

          hahaha hakika mai son sani ne, na duba kwafen turancin na Turanci na zurfin asiri, a can ma ance Multrics (saboda kai ma ka sanya ni shakku) ... watakila ya kasance lokacin ne 😛

          gaisuwa

  7.   ED774 m

    Babban taimako

  8.   m m

    Abin sha'awa, kodayake tabbas, Multrics ya samo asali ne daga kuskuren rubutu, tunda asalin sunan wancan tsarin aiki shine Multics, kuma Unix, wanda asalinsa ake kira Unics, daidai yake magana akan wannan babban tsarin aiki, daga karshe kuma ta hanyar karin magana, Unics se ya canza zuwa Unix, yanzu , kawai sai ka ambaci sunan wanda ake ganin shine marubucin Unix; Ken Thompson, almara ya nuna cewa duka Thompson da Ritchie suna cikin gidan cin abinci a Bell Labs suna yin sharhi game da ayyukansu kuma shine Ritchie ya ba Thomposon shawara cewa ya sake rubuta Unics dinsa da shirin C, yaren da ya rubuta ... da sauran, shine tarihi. 😉

    Af, a baya duk rubutattun shirye-shirye an rubuta su tare da umarnin na'uran, wanda ya sanya su dogaro kacokam kan kayan masarufi, ƙirƙirar C, ban da sauƙaƙa rubuta shirye-shirye, shine cewa yaren yana zaman kansa ga kayan aikin da ke aiwatar da compilers, falsafar da shekaru da yawa daga baya zasu ɗauki Java, a ma'anar cewa shirye-shiryen basu dogara da tsarin aiki ba, yana ƙara shahararren masarrafar java.

    1.    ChrisADR m

      Abu mara kyau game da tatsuniya shine cewa suna gurbata tarihi, ta hanyoyi da yawa fiye da daya ... kuma zasu iya baka damar tunanin cewa wani abu yana faruwa idan ba haka ba ... kamar gaskiyar tattaunawar data kasance tsakanin Thompson da Ritchie (wanda na tsallake a nufin) tunda yana haifar da kuskuren tarihi da fasaha (C bai kasance kafin UNIX ba) ...

      Kuma na biyu ... wani tatsuniya da ke gurbata gaskiya, tunda kafin C akwai B, A, pascal, Ada, algol-60, PL / 1 da fewan kaɗan waɗanda suke shirye-shiryen yare yadda yakamata (sun sha bamban da Majalisar kuma yarukarsa ta tsarin gine-ginen da suka dogara da kayan masarrafar processor) saboda haka C bai "kirkira" ta wannan hanyar ba, kawai ya karbi hanyoyin da suka wanzu a wasu yaruka kuma a karshe ya zama ya shahara kuma ya fi wadannan kyau. ... Sashe kawai Gaskiya ita ce cewa Java ya dogara ne akan wannan tunanin na iya amfani da ita don ƙirƙirar na'urarta ta ƙarshe, amma ba kawai ta dogara ga C don wannan ba, amma ta bi wasu samfuran, in ba haka ba ba za mu sami abin ba- tsarin daidaitaccen tsarin shirye-shirye a cikin java ...

      Na ji ya kamata in fayyace lamarin saboda duk wanda bai kware sosai ba zai iya daukarsa a matsayin gaskiya sannan kuma in yi imani da cewa hakan ta faru ... gaisuwa 🙂

  9.   Ignacio Esquivel ne wanda? m

    Kamar koyaushe, labarin yana da ban sha'awa sosai, godiya ga gudummawar.