Git Product home page Git Product logo

sweater's Introduction

SWTR: Software Tools in Rust

Software Tools is Brian W. Kernighan and P. J. Plauger's classic book about how to write good programs that are good tools. It was originally published with programs presented in Ratfor, a language built on top of Fortran. Later, Kernighan and Plauger published Software Tools in Pascal, which adapted the software tools to Pascal and led Kernighan to write Why Pascal is Not My Favorite Programming Language

The programs in Software Tools are simple, but they are not trivial. They do things that real programs would have to do, and they're open-ended, leaving the programmer with room to add more useful behaviors.

Mark Jason Dominus once told me about Software Tools in Haskell, which undertook to produce the Software Tools programs in Haskell. (Obviously). It struck me that these would be good programs for getting a handle on a new language, and I kept meaning to test this out.

This repository is my attempt to finally do so, by writing (so far terrible) implementations of the Software Tools in Rust.

The contents of ./t are basic tests for the programs, written in Perl 5. My hope is that these tests will be useful in future Software Tools in Whatever projects.

The Tools

This is a list, in book order, of the software tools. Names and summaries are sometimes my own, giving the more familiar UNIX name in place of the book's name.

Chapter 1: Getting Started

  • cp: copy a file to a new name
  • wc: count the number of bytes, words, and lines in a file
  • detab: expand tab characters to line up with tabstops

Chapter 2: Filters

  • entab: collapse space characters into tabs
  • overstrike: some sort of weird typewriter filter… better figure this out
  • compress: a quick and lousy compression utility
  • expand: the opposite of compress
  • crypt: symmetric xor-based encryption
  • tr: perform character transliteration

Chapter 3: Files

  • diff: compare two files and print the differences
  • include: print a file, expanding instructions to include other files
  • cat: print n files
  • ar: archive a group of files into a single compressed archive file

Chapter 4: Sorting

  • sort: print the lines of a file in sorted order
  • uniq: strip adjacent duplicate lines in a stream
  • common: print lines found in only one or both of a pair of files

Chapter 5: Text Patterns

Chapter 6: Editing

Chapter 7: Formatting

Chapter 8: Macro Processing

Chapter 9: A Ratfor-Fortran Translator

sweater's People

Contributors

rjbs avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.