{"id":21890,"date":"2023-02-21T01:45:14","date_gmt":"2023-02-21T01:45:14","guid":{"rendered":"https:\/\/www.booksofall.com\/id\/?post_type=product&#038;p=21890"},"modified":"2023-02-21T01:45:14","modified_gmt":"2023-02-21T01:45:14","slug":"unix-system-programming-in-ocaml","status":"publish","type":"product","link":"https:\/\/www.booksofall.com\/id\/unix-system-programming-in-ocaml\/","title":{"rendered":"Unix System Programming in OCaml"},"content":{"rendered":"<p>These course notes originate from a system programming course<a href=\"https:\/\/xavierleroy.org\/\"> Xavier Leroy<\/a> taught in 1994 to the first year students of the Master\u2019s program in fundamental and applied mathematics and computer science at the \u00c9cole Normale Sup\u00e9rieure. This earliest version used the <a href=\"https:\/\/caml.inria.fr\/pub\/docs\/fpcl\/index.html\">Caml-Light\u00a0language<\/a>. For a Master\u2019s course in computer science at the \u00c9cole Polytechnique taught from 2003 to 2006, Didier R\u00e9my adapted the notes to use the OCaml language. During these years, Gilles Roussel, Fabrice Le Fessant and Maxence Guesdon helped to teach the course and also contributed to this document. The new version also brought additions and updates. In ten years, some orders of magnitude have shifted by a digit and the web has left its infancy. For instance, the\u00a0<span class=\"c005\">http<\/span> relay example, now commonplace, may have been a forerunner in 1994. But, most of all, the OCaml language gained maturity and was used to program real system applications like Unison.<\/p>\n<p>Tradition dictates that Unix system programming must be done in C. For this course we found it more interesting to use a higher-level language, namely OCaml, to explain the fundamentals of Unix system programming.<\/p>\n<p>The OCaml interface to Unix system calls is more abstract. Instead of encoding everything in terms of integers and bit fields as in C, <a href=\"https:\/\/ocaml.org\/\">OCaml<\/a> uses the whole power of the <a href=\"https:\/\/en.wikipedia.org\/wiki\/ML_(programming_language)\">ML-type system<\/a> to clearly represent the arguments and return values of system calls. Hence, it becomes easier to explain the semantics of the calls instead of losing oneself explaining how the arguments and the results have to be en\/decoded.<\/p>\n<p>Furthermore, due to the static type system and the clarity of its primitives, it is safer to program in OCaml than in C. The experienced C programmer may see these benefits as useless luxury, however they are crucial for the inexperienced audience of this course.<\/p>\n<p>A second goal of this exposition of system programming is to show OCaml performing in a domain out of its usual applications in theorem proving, compilation and symbolic computation. The outcome of the experiment is rather positive, thanks to OCaml\u2019s solid imperative kernel and its other novel aspects like parametric polymorphism, higher-order functions and exceptions. It also shows that instead of applicative and imperative programming being mutually exclusive, their combination makes it possible to integrate in the same program complex symbolic computations and a good interface with the operating system.<\/p>\n<p>These notes assume the reader is familiar with OCaml and <a href=\"https:\/\/swcarpentry.github.io\/shell-novice\/reference.html\">Unix shell commands<\/a>. For any question about the language, consult the OCaml System documentation\u00a0and for questions about Unix, read section\u00a01 of the Unix\u00a0<span class=\"c001\">man<\/span>ual or introductory books on Unix like.<\/p>\n<p>This document describes only the programmatic interface to the Unix system. It presents neither its implementation, neither its internal architecture. The internal architecture of\u00a0<span class=\"c005\">bsd<\/span> 4.3 is described in\u00a0and of System\u00a0<span class=\"c005\">v<\/span> in. Tanenbaum\u2019s books\u00a0give an overall view of network and operating system architecture.<\/p>\n","protected":false},"excerpt":{"rendered":"<p><iframe style=\"width: 100%; height: 700px; border: none;\" src=\"https:\/\/online.visual-paradigm.com\/share\/book\/ocamlunix-19jimte0ds?enforceShowPromotionBar=true&amp;p=1\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/p>\n","protected":false},"featured_media":21894,"template":"","meta":{"_yoast_wpseo_title":"","_yoast_wpseo_metadesc":""},"product_brand":[],"product_cat":[352],"product_tag":[],"class_list":{"0":"post-21890","1":"product","2":"type-product","3":"status-publish","4":"has-post-thumbnail","6":"product_cat-ocaml","8":"first","9":"instock","10":"shipping-taxable","11":"product-type-simple"},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.1.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Unix System Programming in OCaml - BooksOfAll Indonesian<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.booksofall.com\/id\/unix-system-programming-in-ocaml\/\" \/>\n<meta property=\"og:locale\" content=\"id_ID\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Unix System Programming in OCaml - BooksOfAll Indonesian\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.booksofall.com\/id\/unix-system-programming-in-ocaml\/\" \/>\n<meta property=\"og:site_name\" content=\"BooksOfAll Indonesian\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.booksofall.com\/id\/wp-content\/uploads\/sites\/12\/2023\/02\/img_63f420e0102e8.png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:image\" content=\"https:\/\/www.booksofall.com\/id\/wp-content\/uploads\/sites\/12\/2023\/02\/img_63f420e0102e8.png\" \/>\n<meta name=\"twitter:label1\" content=\"Estimasi waktu membaca\" \/>\n\t<meta name=\"twitter:data1\" content=\"2 menit\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.booksofall.com\/id\/unix-system-programming-in-ocaml\/\",\"url\":\"https:\/\/www.booksofall.com\/id\/unix-system-programming-in-ocaml\/\",\"name\":\"Unix System Programming in OCaml - BooksOfAll Indonesian\",\"isPartOf\":{\"@id\":\"https:\/\/www.booksofall.com\/id\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.booksofall.com\/id\/unix-system-programming-in-ocaml\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.booksofall.com\/id\/unix-system-programming-in-ocaml\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.booksofall.com\/id\/wp-content\/uploads\/sites\/12\/2023\/02\/img_63f420e0102e8.png\",\"datePublished\":\"2023-02-21T01:45:14+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.booksofall.com\/id\/unix-system-programming-in-ocaml\/#breadcrumb\"},\"inLanguage\":\"id\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.booksofall.com\/id\/unix-system-programming-in-ocaml\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"id\",\"@id\":\"https:\/\/www.booksofall.com\/id\/unix-system-programming-in-ocaml\/#primaryimage\",\"url\":\"https:\/\/www.booksofall.com\/id\/wp-content\/uploads\/sites\/12\/2023\/02\/img_63f420e0102e8.png\",\"contentUrl\":\"https:\/\/www.booksofall.com\/id\/wp-content\/uploads\/sites\/12\/2023\/02\/img_63f420e0102e8.png\",\"width\":\"475\",\"height\":\"670\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.booksofall.com\/id\/unix-system-programming-in-ocaml\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.booksofall.com\/id\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Categories\",\"item\":\"https:\/\/www.booksofall.com\/id\/categories\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Unix System Programming in OCaml\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.booksofall.com\/id\/#website\",\"url\":\"https:\/\/www.booksofall.com\/id\/\",\"name\":\"BooksOfAll Indonesian\",\"description\":\"Biggest IT eBooks library and learning resources - Free eBooks for programming, computing, artificial intelligence and more.\",\"publisher\":{\"@id\":\"https:\/\/www.booksofall.com\/id\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.booksofall.com\/id\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"id\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.booksofall.com\/id\/#organization\",\"name\":\"BooksOfAll Indonesian\",\"url\":\"https:\/\/www.booksofall.com\/id\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"id\",\"@id\":\"https:\/\/www.booksofall.com\/id\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.booksofall.com\/id\/wp-content\/uploads\/sites\/12\/2022\/06\/booksofall-logo-2.png\",\"contentUrl\":\"https:\/\/www.booksofall.com\/id\/wp-content\/uploads\/sites\/12\/2022\/06\/booksofall-logo-2.png\",\"width\":166,\"height\":30,\"caption\":\"BooksOfAll Indonesian\"},\"image\":{\"@id\":\"https:\/\/www.booksofall.com\/id\/#\/schema\/logo\/image\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Unix System Programming in OCaml - BooksOfAll Indonesian","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.booksofall.com\/id\/unix-system-programming-in-ocaml\/","og_locale":"id_ID","og_type":"article","og_title":"Unix System Programming in OCaml - BooksOfAll Indonesian","og_url":"https:\/\/www.booksofall.com\/id\/unix-system-programming-in-ocaml\/","og_site_name":"BooksOfAll Indonesian","og_image":[{"url":"https:\/\/www.booksofall.com\/id\/wp-content\/uploads\/sites\/12\/2023\/02\/img_63f420e0102e8.png","type":"","width":"","height":""}],"twitter_card":"summary_large_image","twitter_image":"https:\/\/www.booksofall.com\/id\/wp-content\/uploads\/sites\/12\/2023\/02\/img_63f420e0102e8.png","twitter_misc":{"Estimasi waktu membaca":"2 menit"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.booksofall.com\/id\/unix-system-programming-in-ocaml\/","url":"https:\/\/www.booksofall.com\/id\/unix-system-programming-in-ocaml\/","name":"Unix System Programming in OCaml - BooksOfAll Indonesian","isPartOf":{"@id":"https:\/\/www.booksofall.com\/id\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.booksofall.com\/id\/unix-system-programming-in-ocaml\/#primaryimage"},"image":{"@id":"https:\/\/www.booksofall.com\/id\/unix-system-programming-in-ocaml\/#primaryimage"},"thumbnailUrl":"https:\/\/www.booksofall.com\/id\/wp-content\/uploads\/sites\/12\/2023\/02\/img_63f420e0102e8.png","datePublished":"2023-02-21T01:45:14+00:00","breadcrumb":{"@id":"https:\/\/www.booksofall.com\/id\/unix-system-programming-in-ocaml\/#breadcrumb"},"inLanguage":"id","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.booksofall.com\/id\/unix-system-programming-in-ocaml\/"]}]},{"@type":"ImageObject","inLanguage":"id","@id":"https:\/\/www.booksofall.com\/id\/unix-system-programming-in-ocaml\/#primaryimage","url":"https:\/\/www.booksofall.com\/id\/wp-content\/uploads\/sites\/12\/2023\/02\/img_63f420e0102e8.png","contentUrl":"https:\/\/www.booksofall.com\/id\/wp-content\/uploads\/sites\/12\/2023\/02\/img_63f420e0102e8.png","width":"475","height":"670"},{"@type":"BreadcrumbList","@id":"https:\/\/www.booksofall.com\/id\/unix-system-programming-in-ocaml\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.booksofall.com\/id\/"},{"@type":"ListItem","position":2,"name":"Categories","item":"https:\/\/www.booksofall.com\/id\/categories\/"},{"@type":"ListItem","position":3,"name":"Unix System Programming in OCaml"}]},{"@type":"WebSite","@id":"https:\/\/www.booksofall.com\/id\/#website","url":"https:\/\/www.booksofall.com\/id\/","name":"BooksOfAll Indonesian","description":"Biggest IT eBooks library and learning resources - Free eBooks for programming, computing, artificial intelligence and more.","publisher":{"@id":"https:\/\/www.booksofall.com\/id\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.booksofall.com\/id\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"id"},{"@type":"Organization","@id":"https:\/\/www.booksofall.com\/id\/#organization","name":"BooksOfAll Indonesian","url":"https:\/\/www.booksofall.com\/id\/","logo":{"@type":"ImageObject","inLanguage":"id","@id":"https:\/\/www.booksofall.com\/id\/#\/schema\/logo\/image\/","url":"https:\/\/www.booksofall.com\/id\/wp-content\/uploads\/sites\/12\/2022\/06\/booksofall-logo-2.png","contentUrl":"https:\/\/www.booksofall.com\/id\/wp-content\/uploads\/sites\/12\/2022\/06\/booksofall-logo-2.png","width":166,"height":30,"caption":"BooksOfAll Indonesian"},"image":{"@id":"https:\/\/www.booksofall.com\/id\/#\/schema\/logo\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/www.booksofall.com\/id\/wp-json\/wp\/v2\/product\/21890","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.booksofall.com\/id\/wp-json\/wp\/v2\/product"}],"about":[{"href":"https:\/\/www.booksofall.com\/id\/wp-json\/wp\/v2\/types\/product"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.booksofall.com\/id\/wp-json\/wp\/v2\/media\/21894"}],"wp:attachment":[{"href":"https:\/\/www.booksofall.com\/id\/wp-json\/wp\/v2\/media?parent=21890"}],"wp:term":[{"taxonomy":"product_brand","embeddable":true,"href":"https:\/\/www.booksofall.com\/id\/wp-json\/wp\/v2\/product_brand?post=21890"},{"taxonomy":"product_cat","embeddable":true,"href":"https:\/\/www.booksofall.com\/id\/wp-json\/wp\/v2\/product_cat?post=21890"},{"taxonomy":"product_tag","embeddable":true,"href":"https:\/\/www.booksofall.com\/id\/wp-json\/wp\/v2\/product_tag?post=21890"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}