Unix for TOPS-20 Users

Total Page:16

File Type:pdf, Size:1020Kb

Unix for TOPS-20 Users nix for yEPH sers xelson rFpF fee e genter for ienti gomputing heprtment of wthemtis niversityof th lt vke gityD th VRIIP e elX @VHIA SVIESPSR PREtunEVU gontents I sntro dution I P ht9s in the xme P Q gommnd ro essors P R gommnd gorresp ondene S S pile ree yrgniztion IQ T serD hiretoryD nd pile xmes IU U hevie xmes IU V vogil xmes IV W ip esD sGy ediretionD nd fkground tos IW IH erminl upp ort in nix PH II iyp nd vogout PI IP gommnd elises PI IQ invironment gustomiztion PP IR qetting relp ynEline PP IS yp ertorsD heelsD nd up erE sers PQ IT smp ortnt nixools PR IU purther eding PS sndex PU i I sxyh gsyx I I sntro dution his do ument hs een written to provide strting p ointforopsEPH users who will e working on nix systemsD prtiulrly the x worksttionsF st is not smll o ok out nixY the lst setion gives pointers to severl o oks tht should prove usefulF therD it is intended to provide the reder with onnetions etween fmilir opsEPH onepts nd their nlogues on nixF nix hs often e ritiized for tersenessD lk of mnemoni ommndsD nd ommnd inonsistenyD plus for overEemphsis of intertive omputer use s opp osed to thnum er runhing4F o onsiderle extentD these ritiisms re grounded in ftF roweverD nyone who uses nix for n extended p erio d nd lerns how to mke go o d use of the multitude of to ols ville lmost without exeption eomes onvertF hespite its wrtsD nix is in mnywys very eutiful op erting system whih hs hdD nd ontinues to hveD enorE mous inuene on op erting systems designD progrmming lngugesD softwre developmentenvironmentsD nd even on hrdwreofseverl new rhiteturesF sts lenD sleekD design n e ttriuted lrgely to the smll numer of very tlented reserhers t e8 fell v ortories who develop ed it for the rst severl yers of its rst existene on hEIID with susequent p orts to sfw QUH nd roneywell qgy systemsF everl of them deservemention hereD for you will see their nmes mentioned frequently in nix ooksD litertureD nd do umenttionX uen hompson for the op erting system kernel nd le systemY hennis ithie for the g lngugeY teve tohnson for the ortle g ompilerD nd the y nd lex ompiler genertor to olsY frin uernighnD eter ein ergerD nd el eho for numerous softwre to ols nd o oks out nix nd gY tu peldmn for the rst portrn UU ompiler nywhereD fUUD nd for mkeD p ossily the llEtime gretest softwretoolever writtenF smplementtions of nix run on mhines s smll s the sfw gD nd s lrge s the gryPF ith only few exeptions @ghgD pujitsuD nd sfwAD nerly every new sup eromputer intro dued to the mrket sine IWVS hsD or will so on hveD nixF xo other op erting system in the world runs on so mny dierent hrdwre rhiteturesD providingD for the rst time in omputing9s fortyEyer historyD the p ossiility of true progrmmer nd softwre p ortility ross mulE tiple rhiteturesF prom mngement9s p oint of viewD this should mkeitmuh esier to hose omputers more on the sis of hrdwre p erformneD nd less on mintining the sttus quo tht hs left minfrme omputing environments only sup erilly dierent thn they were in IWTQ when the rst multiEmo del rhitetureD the sfw QTH seriesD ws intro duedF P re9 sx ri xewi P P ht9s in the xme uen hompson hose the nme nix s pun on the op erting system wultisD from whih it orrowed mny idesF he initil implementtion on the hEII ws in ssemly o deD ut this ws so on rewritten in the g lngugeF hennis ithie develop ed g from fD whih in turn me from fgvD one of the rst p ortle systems progrmming lngugesF fgv nd f still existD nd f hs pro dued desendntD wrgyD whih is used to write the terlo o wple lger systemF g hs ompletely overshdowed them howeverF e8 fell v ortories hs trdemrked the nme nixD so other vendors who liense it from them must usully ome up with new nmesF e8 hs now gone through puli releses of ersion TD ersion UD ystem sssD ystem D f @rogrmmer9s ork enhAD nd hf @ho umenter9s ork enhAF ersion V is in developmentinternllyF ferkeley hs hd RFHD RFID RFPD nd RFQ of fh @ferkeley tndrd histriE utionA nixF heir ontriutions to nix re legionY the most signintre the originl p ort to the hig e rhitetureD the ddition of virtul memory pging supp ortD the fst le systemD the g shell @shAD nd gGs networking supp ortF rewlettEkrd lls theirs r Y it is sed on ystem with ferkeley extensionsF un9s implementtion is lled nix in their do umenttionY they re pE prently liensed to do soF st is sed on RFQ fh with ystem omptiilityD nd un is working together with e8 to pro due ommon nix merging the fetures of oth these m jor implementtionsF siii hs pulished p ortle op erting system interfe denition lled ysD derived from suset of ersion UD ystem s s sD nd ystem F qould9s implementtion is EQPF he sfw version is lled esF yn the gry PD it is lled xsgyF yn the sfw gD we hve enix from enturegomD nd enix from wiE rosoftF xo o dy to my knowledge hs yet pro dued lenedEup version lled uleenixF Q gommnd ro essors nix oers vriety of ommnd pro essorsD lled shellsD whih re nlogous to omintions of the opsEPH iigD wsgD nd gv F he originl oneD shD is known s the fourne shellD fter its uthorD teve fourneF he most populr one in ferkeley nix environments is fill toy9s shD the g shellD so lled euse of its resemlne to the g progrmming lngugeF sh oers etter progrmmilityD ommnd historyD ommnd lisE ingD nd imp ortntlyD jo ontrol llowing strting nd stopping foreground nd Q gywwexh ygiy Q kground josF e newer shell is the uorn shellD kshD whih omines fetures of oth sh nd shD nd oers ommnd funtions nd imsEstyle ommnd editingF he fpsh is fkus funtionlEprogrmming style shellF xeither ksh nor fpsh hs reeived wide distriutionD ut ksh myeventully reple sh if it reeives strong e8 kingF sn un nixD shells nd other progrms myeonveniently run in winE dowing environmentY see the mn pges on dxtoolD shelltoolD suntoolsDnd tektoolF nlikethe opsEPH iigD nix shells hve only smll num er of uiltEin ommndsD nd these re exlusively for ontrol of shell optionsF ht orreE sp onds to most iig ommnds re tul exeutle progrms whose nmes re not known to the nix shellsY they must therefore e typ ed without E revitionF hey re serhed for in the le system in hin of diretories dened ytheer environmentvrileD muh like the opsEPH X logil nmeF por this resonD nd lso euse nix ws originlly develop ed on slow teletyp e printing terminlsD nix ommnds tend to e shortD with mny PE nd QEletter ommndsF he opsEPH iig hs knowledge of the syntx for ll of its uiltEin omE mndsD nd gv gives ordinry users the ility to dd new ones whih re indistinguishle from iig ommnds s fr s their user interfe is onE ernedF hen you typ e something like gywsvi GcD the iig knows wht swithes re villeD nd will disply them in resp onse to your queryDutno ttempt hs een mde to lod ny prtiulr ompiler into memoryF e progrm whose syntx is not uiltEin to the iigD suhs pyeFiiDnnotgiveyou help until it is runningF ht is why pye Gc do es not workD ut pye followed y rrige return nd Gc do esD sine y tht timeD the progrm is exeutingF he prtiulr order of swithes nd lenmes on the ommnd line is up to who ever dened the prsing syntxD nd onsequentlyD opsEPH ommnds exhiit vriety of stylesD inluding su ommnd mo desD suh s used y the f svh nd hsigy ommndsD whih hve lrge numer of optionsF sn nixD the shells do not rry uiltEin knowledge of individul progrm options nd lenme exp ettionsF snstedD they ssume tht l l ommnds re invoked with the syntx ommndver foptionl swithesg filelistF withes re onventionlly prexed yhyphen @though there re exeptionsD suhstr nd rAF sn nyeventD everything fter the ommndver is ssumed to e p otentil lelistD nd the text is snned for wildrd hrters @whih use lenme expnsionAD nd the ommnd line is expnded into list of lnkEseprted rgumentsF he min routine in the progrm itself is then presented with two prmeters|n integer ount of the num er of rgumentsD nd vetor of p ointers to eh of the rgumentsF por mny purp osesD this is quite dequteF xo progrm hs to hndle wildE rd expnsionD sine it sees only the nl list of ommndEline rgumentsF Q gywwexh ygiy R yption prsing is simple euse the initil hrter of eh rgument is exE mined to see whether it is hyphen or notY if it isD n option swith is ssumedD nd the remining hrters of the rgument re further exmined to lssify the rgumentF ytherwiseD the rgument is ssumed to e lenmeF here re severl disdvntges of this pprohF xo inEline help is ville from the shellD like it is with the opsEPH iigF his is serious wofessentilly every other op erting system ut opsEPHD nd fores user who hs prtilly typ ed ommnd line nd then forgotten the nme of swithtoreh for printed mnulD or ort the typ ein nd go serh for onEline do umenttionF snvlid syntx in the ommnd line is not deteted until the progrm hs lredy een lo ted in the le systemD loded into memoryD nd strtedD whihwstes system resouresF ine typ ogrphil errors re ommonD this hpp ens frequentlyF he lenme expnsion done y the shell is limited to the size of the p ointer vetor uerD whih is unfortuntely xed when the shell is uiltF elthough it is lrgeD it is not lrge enough to hold expnsions of severl lrge diretoriesY for exmpleD ls El GusrGmnGmncGB overows the shell uer nd the ommnd do es nothingF feuse the shells hndle wildrd expnsionD everyone ssumed tht would lwys e suientD nd no nix lirry tht s m wre of proE vides userEllle funtion for wildrd expnsionF husD progrm like nix uermit nnot hndle get BFB ommndD unless tht request ws on the ommnd lineF ixpnding wildrds implies serhing the le systemD nd the wy tht the shellsD nd progrms like trDhve done this is to red the diretory les themselvesD mking user o de unneessrily knowledgele out deE tils tht relly should
Recommended publications
  • Process Text Streams Using Filters
    Process Text Streams Using Filters OBJECTIVE: Candidates should should be able to apply filters to text streams. 1 Process Text Streams Using Filters KeyKEY knowledge KNOWLEDGE area(s): AREAS: Send text files and output streams through text utility filters to modify the output using standard UNIX commands found in the GNU textutils package. 2 Process Text Streams Using Filters KEY FILES,TERMS, UTILITIES cat nl tail cut paste tr expand pr unexpand fmt sed uniq head sort wc hexdump split join tac 3 cat cat the editor - used as a rudimentary text editor. cat > short-message we are curious to meet penguins in Prague Crtl+D *Ctrl+D - command is used for ending interactive input. 4 cat cat the reader More commonly used to flush text to stdout. Options: -n number each line of output -b number only non-blank output lines -A show carriage return Example cat /etc/resolv.conf ▶ search mydomain.org nameserver 127.0.0.1 5 tac tac reads back-to-front This command is the same as cat except that the text is read from the last line to the first. tac short-message ▶ penguins in Prague to meet we are curious 6 head or tail using head or tail - often used to analyze logfiles. - by default, output 10 lines of text. List 20 first lines of /var/log/messages: head -n 20 /var/log/messages head -20 /var/log/messages List 20 last lines of /etc/aliases: tail -20 /etc/aliases 7 head or tail The tail utility has an added option that allows one to list the end of a text starting at a given line.
    [Show full text]
  • The Linux Command Line
    The Linux Command Line Fifth Internet Edition William Shotts A LinuxCommand.org Book Copyright ©2008-2019, William E. Shotts, Jr. This work is licensed under the Creative Commons Attribution-Noncommercial-No De- rivative Works 3.0 United States License. To view a copy of this license, visit the link above or send a letter to Creative Commons, PO Box 1866, Mountain View, CA 94042. A version of this book is also available in printed form, published by No Starch Press. Copies may be purchased wherever fine books are sold. No Starch Press also offers elec- tronic formats for popular e-readers. They can be reached at: https://www.nostarch.com. Linux® is the registered trademark of Linus Torvalds. All other trademarks belong to their respective owners. This book is part of the LinuxCommand.org project, a site for Linux education and advo- cacy devoted to helping users of legacy operating systems migrate into the future. You may contact the LinuxCommand.org project at http://linuxcommand.org. Release History Version Date Description 19.01A January 28, 2019 Fifth Internet Edition (Corrected TOC) 19.01 January 17, 2019 Fifth Internet Edition. 17.10 October 19, 2017 Fourth Internet Edition. 16.07 July 28, 2016 Third Internet Edition. 13.07 July 6, 2013 Second Internet Edition. 09.12 December 14, 2009 First Internet Edition. Table of Contents Introduction....................................................................................................xvi Why Use the Command Line?......................................................................................xvi
    [Show full text]
  • The AWK Programming Language
    The Programming ~" ·. Language PolyAWK- The Toolbox Language· Auru:o V. AHo BRIAN W.I<ERNIGHAN PETER J. WEINBERGER TheAWK4 Programming~ Language TheAWI(. Programming~ Language ALFRED V. AHo BRIAN w. KERNIGHAN PETER J. WEINBERGER AT& T Bell Laboratories Murray Hill, New Jersey A ADDISON-WESLEY•• PUBLISHING COMPANY Reading, Massachusetts • Menlo Park, California • New York Don Mills, Ontario • Wokingham, England • Amsterdam • Bonn Sydney • Singapore • Tokyo • Madrid • Bogota Santiago • San Juan This book is in the Addison-Wesley Series in Computer Science Michael A. Harrison Consulting Editor Library of Congress Cataloging-in-Publication Data Aho, Alfred V. The AWK programming language. Includes index. I. AWK (Computer program language) I. Kernighan, Brian W. II. Weinberger, Peter J. III. Title. QA76.73.A95A35 1988 005.13'3 87-17566 ISBN 0-201-07981-X This book was typeset in Times Roman and Courier by the authors, using an Autologic APS-5 phototypesetter and a DEC VAX 8550 running the 9th Edition of the UNIX~ operating system. -~- ATs.T Copyright c 1988 by Bell Telephone Laboratories, Incorporated. All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, photocopy­ ing, recording, or otherwise, without the prior written permission of the publisher. Printed in the United States of America. Published simultaneously in Canada. UNIX is a registered trademark of AT&T. DEFGHIJ-AL-898 PREFACE Computer users spend a lot of time doing simple, mechanical data manipula­ tion - changing the format of data, checking its validity, finding items with some property, adding up numbers, printing reports, and the like.
    [Show full text]
  • IBM Education Assistance for Z/OS V2R1
    IBM Education Assistance for z/OS V2R1 Item: ASCII Unicode Option Element/Component: UNIX Shells and Utilities (S&U) Material is current as of June 2013 © 2013 IBM Corporation Filename: zOS V2R1 USS S&U ASCII Unicode Option Agenda ■ Trademarks ■ Presentation Objectives ■ Overview ■ Usage & Invocation ■ Migration & Coexistence Considerations ■ Presentation Summary ■ Appendix Page 2 of 19 © 2013 IBM Corporation Filename: zOS V2R1 USS S&U ASCII Unicode Option IBM Presentation Template Full Version Trademarks ■ See url http://www.ibm.com/legal/copytrade.shtml for a list of trademarks. Page 3 of 19 © 2013 IBM Corporation Filename: zOS V2R1 USS S&U ASCII Unicode Option IBM Presentation Template Full Presentation Objectives ■ Introduce the features and benefits of the new z/OS UNIX Shells and Utilities (S&U) support for working with ASCII/Unicode files. Page 4 of 19 © 2013 IBM Corporation Filename: zOS V2R1 USS S&U ASCII Unicode Option IBM Presentation Template Full Version Overview ■ Problem Statement –As a z/OS UNIX Shells & Utilities user, I want the ability to control the text conversion of input files used by the S&U commands. –As a z/OS UNIX Shells & Utilities user, I want the ability to run tagged shell scripts (tcsh scripts and SBCS sh scripts) under different SBCS locales. ■ Solution –Add –W filecodeset=codeset,pgmcodeset=codeset option on several S&U commands to enable text conversion – consistent with support added to vi and ex in V1R13. –Add –B option on several S&U commands to disable automatic text conversion – consistent with other commands that already have this override support. –Add new _TEXT_CONV environment variable to enable or disable text conversion.
    [Show full text]
  • GNU Coreutils Cheat Sheet (V1.00) Created by Peteris Krumins ([email protected], -- Good Coders Code, Great Coders Reuse)
    GNU Coreutils Cheat Sheet (v1.00) Created by Peteris Krumins ([email protected], www.catonmat.net -- good coders code, great coders reuse) Utility Description Utility Description arch Print machine hardware name nproc Print the number of processors base64 Base64 encode/decode strings or files od Dump files in octal and other formats basename Strip directory and suffix from file names paste Merge lines of files cat Concatenate files and print on the standard output pathchk Check whether file names are valid or portable chcon Change SELinux context of file pinky Lightweight finger chgrp Change group ownership of files pr Convert text files for printing chmod Change permission modes of files printenv Print all or part of environment chown Change user and group ownership of files printf Format and print data chroot Run command or shell with special root directory ptx Permuted index for GNU, with keywords in their context cksum Print CRC checksum and byte counts pwd Print current directory comm Compare two sorted files line by line readlink Display value of a symbolic link cp Copy files realpath Print the resolved file name csplit Split a file into context-determined pieces rm Delete files cut Remove parts of lines of files rmdir Remove directories date Print or set the system date and time runcon Run command with specified security context dd Convert a file while copying it seq Print sequence of numbers to standard output df Summarize free disk space setuidgid Run a command with the UID and GID of a specified user dir Briefly list directory
    [Show full text]
  • Multiresolution Recurrent Neural Networks: an Application to Dialogue Response Generation
    Multiresolution Recurrent Neural Networks: An Application to Dialogue Response Generation Iulian Vlad Serban∗◦ Tim Klinger University of Montreal IBM Research 2920 chemin de la Tour, T. J. Watson Research Center, Montréal, QC, Canada Yorktown Heights, NY, USA Gerald Tesauro Kartik Talamadupula Bowen Zhou IBM Research IBM Research IBM Research T. J. Watson Research Center, T. J. Watson Research Center, T. J. Watson Research Center, Yorktown Heights, Yorktown Heights, Yorktown Heights, NY, USA NY, USA NY, USA Yoshua Bengioy◦ Aaron Courville◦ University of Montreal University of Montreal 2920 chemin de la Tour, 2920 chemin de la Tour, Montréal, QC, Canada Montréal, QC, Canada Abstract We introduce the multiresolution recurrent neural network, which extends the sequence-to-sequence framework to model natural language generation as two parallel discrete stochastic processes: a sequence of high-level coarse tokens, and a sequence of natural language tokens. There are many ways to estimate or learn the high-level coarse tokens, but we argue that a simple extraction procedure is sufficient to capture a wealth of high-level discourse semantics. Such procedure allows training the multiresolution recurrent neural network by maximizing the exact joint log-likelihood over both sequences. In contrast to the standard log- likelihood objective w.r.t. natural language tokens (word perplexity), optimizing the joint log-likelihood biases the model towards modeling high-level abstractions. We apply the proposed model to the task of dialogue response generation in arXiv:1606.00776v2 [cs.CL] 14 Jun 2016 two challenging domains: the Ubuntu technical support domain, and Twitter conversations. On Ubuntu, the model outperforms competing approaches by a substantial margin, achieving state-of-the-art results according to both automatic evaluation metrics and a human evaluation study.
    [Show full text]
  • Constraints in Dynamic Symbolic Execution: Bitvectors Or Integers?
    Constraints in Dynamic Symbolic Execution: Bitvectors or Integers? Timotej Kapus, Martin Nowack, and Cristian Cadar Imperial College London, UK ft.kapus,m.nowack,[email protected] Abstract. Dynamic symbolic execution is a technique that analyses programs by gathering mathematical constraints along execution paths. To achieve bit-level precision, one must use the theory of bitvectors. However, other theories might achieve higher performance, justifying in some cases the possible loss of precision. In this paper, we explore the impact of using the theory of integers on the precision and performance of dynamic symbolic execution of C programs. In particular, we compare an implementation of the symbolic executor KLEE using a partial solver based on the theory of integers, with a standard implementation of KLEE using a solver based on the theory of bitvectors, both employing the popular SMT solver Z3. To our surprise, our evaluation on a synthetic sort benchmark, the ECA set of Test-Comp 2019 benchmarks, and GNU Coreutils revealed that for most applications the integer solver did not lead to any loss of precision, but the overall performance difference was rarely significant. 1 Introduction Dynamic symbolic execution is a popular program analysis technique that aims to systematically explore all the paths in a program. It has been very successful in bug finding and test case generation [3, 4]. The research community and industry have produced many tools performing symbolic execution, such as CREST [5], FuzzBALL [9], KLEE [2], PEX [14], and SAGE [6], among others. To illustrate how dynamic symbolic execution works, consider the program shown in Figure 1a.
    [Show full text]
  • 07 07 Unixintropart2 Lucio Week 3
    Unix Basics Command line tools Daniel Lucio Overview • Where to use it? • Command syntax • What are commands? • Where to get help? • Standard streams(stdin, stdout, stderr) • Pipelines (Power of combining commands) • Redirection • More Information Introduction to Unix Where to use it? • Login to a Unix system like ’kraken’ or any other NICS/ UT/XSEDE resource. • Download and boot from a Linux LiveCD either from a CD/DVD or USB drive. • http://www.puppylinux.com/ • http://www.knopper.net/knoppix/index-en.html • http://www.ubuntu.com/ Introduction to Unix Where to use it? • Install Cygwin: a collection of tools which provide a Linux look and feel environment for Windows. • http://cygwin.com/index.html • https://newton.utk.edu/bin/view/Main/Workshop0InstallingCygwin • Online terminal emulator • http://bellard.org/jslinux/ • http://cb.vu/ • http://simpleshell.com/ Introduction to Unix Command syntax $ command [<options>] [<file> | <argument> ...] Example: cp [-R [-H | -L | -P]] [-fi | -n] [-apvX] source_file target_file Introduction to Unix What are commands? • An executable program (date) • A command built into the shell itself (cd) • A shell program/function • An alias Introduction to Unix Bash commands (Linux) alias! crontab! false! if! mknod! ram! strace! unshar! apropos! csplit! fdformat! ifconfig! more! rcp! su! until! apt-get! cut! fdisk! ifdown! mount! read! sudo! uptime! aptitude! date! fg! ifup! mtools! readarray! sum! useradd! aspell! dc! fgrep! import! mtr! readonly! suspend! userdel! awk! dd! file! install! mv! reboot! symlink!
    [Show full text]
  • How Is Dynamic Symbolic Execution Different from Manual Testing? an Experience Report on KLEE
    How is Dynamic Symbolic Execution Different from Manual Testing? An Experience Report on KLEE Xiaoyin Wang, Lingming Zhang, Philip Tanofsky University of Texas at San Antonio University of Texas at Dallas Outline ๏ Background ๏ Research Goal ๏ Study Setup ๏ Quantitative Analysis ๏ Qualitative Analysis ๏ Summary and Future Work "2 /27 Background ๏ Dynamic Symbolic Execution (DSE) •A promising approach to automated test generation •Aims to explore all/specific paths in a program •Generates and solves path constraints at runtime ๏ KLEE •A state-of-the-art DSE tool for C programs •Specially tuned for Linux Coreutils •Reported higher coverage than manual testing "3 /27 Research Goal ๏ Understand the ability of state-of-art DSE tools ! ๏ Identify proper scenarios to apply DSE tools ! ๏ Discover potential opportunities for enhancement "4 /27 Research Questions ๏ Are KLEE-based test suites comparable with manually developed test suites on test sufciency? ๏ How do KLEE-based test suites compare with manually test suites on harder testing problems? ๏ How much extra value can KLEE-based test suites provide to manually test suites? ๏ What are the characteristics of the code/mutants covered/killed by one type of test suites, but not by the other? "5 /27 Study Process KLEE tests reduced KLEE tests program manual tests coverage bug finding quality metrics "6 /27 Study Setup: Tools ๏ KLEE •Default setting for ๏ GCOV test generation •Statement coverage •Execute each program collection for 20 minutes ๏ MutGen •Generates 100 mutation faults for each program
    [Show full text]
  • An Introduction to Ocaml
    An Introduction to OCaml Stephen A. Edwards Columbia University Spring 2021 The Basics Functions Tuples, Lists, and Pattern Matching User-Defined Types Modules and Compilation A Complete Interpreter in Three Slides Exceptions; Directed Graphs Standard Library Modules An Endorsement? A PLT student accurately summed up using OCaml: Never have I spent so much time writing so little that does so much. I think he was complaining, but I’m not sure. Other students have said things like It’s hard to get it to compile, but once it compiles, it works. Why OCaml? It’s Great for Compilers � I’ve written compilers in C++, Python, Java, and OCaml, and it’s much easier in OCaml. It’s Succinct � Would you prefer to write 10 000 lines of code or 5 000? Its Type System Catches Many Bugs � It catches missing cases, data structure misuse, certain off-by-one errors, etc. Automatic garbage collection and lack of null pointers makes it safer than Java. Lots of Libraries � All sorts of data structures, I/O, OS interfaces, graphics, support for compilers, etc. Lots of Support � Many websites, free online books and tutorials, code samples, etc. OCaml in One Slide Apply a function to each list element; save results in a list “Is recursive” Passing a function Case Pattern splitting # let rec map f = function Matching [] -> [] Polymorphic Local name | head :: tail -> declaration let r = f head in Types inferred r :: map f tail;; List support val map : (’a -> ’b) -> ’a list -> ’b list Recursion # map (function x -> x + 3) [1;5;9];; Anonymous - : int list = [4; 8; 12]
    [Show full text]
  • The Linux Command Line
    The Linux Command Line Second Internet Edition William E. Shotts, Jr. A LinuxCommand.org Book Copyright ©2008-2013, William E. Shotts, Jr. This work is licensed under the Creative Commons Attribution-Noncommercial-No De- rivative Works 3.0 United States License. To view a copy of this license, visit the link above or send a letter to Creative Commons, 171 Second Street, Suite 300, San Fran- cisco, California, 94105, USA. Linux® is the registered trademark of Linus Torvalds. All other trademarks belong to their respective owners. This book is part of the LinuxCommand.org project, a site for Linux education and advo- cacy devoted to helping users of legacy operating systems migrate into the future. You may contact the LinuxCommand.org project at http://linuxcommand.org. This book is also available in printed form, published by No Starch Press and may be purchased wherever fine books are sold. No Starch Press also offers this book in elec- tronic formats for most popular e-readers: http://nostarch.com/tlcl.htm Release History Version Date Description 13.07 July 6, 2013 Second Internet Edition. 09.12 December 14, 2009 First Internet Edition. 09.11 November 19, 2009 Fourth draft with almost all reviewer feedback incorporated and edited through chapter 37. 09.10 October 3, 2009 Third draft with revised table formatting, partial application of reviewers feedback and edited through chapter 18. 09.08 August 12, 2009 Second draft incorporating the first editing pass. 09.07 July 18, 2009 Completed first draft. Table of Contents Introduction....................................................................................................xvi
    [Show full text]
  • Gnu Coreutils Core GNU Utilities for Version 5.93, 2 November 2005
    gnu Coreutils Core GNU utilities for version 5.93, 2 November 2005 David MacKenzie et al. This manual documents version 5.93 of the gnu core utilities, including the standard pro- grams for text and file manipulation. Copyright c 1994, 1995, 1996, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in the section entitled “GNU Free Documentation License”. Chapter 1: Introduction 1 1 Introduction This manual is a work in progress: many sections make no attempt to explain basic concepts in a way suitable for novices. Thus, if you are interested, please get involved in improving this manual. The entire gnu community will benefit. The gnu utilities documented here are mostly compatible with the POSIX standard. Please report bugs to [email protected]. Remember to include the version number, machine architecture, input files, and any other information needed to reproduce the bug: your input, what you expected, what you got, and why it is wrong. Diffs are welcome, but please include a description of the problem as well, since this is sometimes difficult to infer. See section “Bugs” in Using and Porting GNU CC. This manual was originally derived from the Unix man pages in the distributions, which were written by David MacKenzie and updated by Jim Meyering.
    [Show full text]