Muutke küpsiste eelistusi

Strange Code: Esoteric Languages That Make Programming Fun Again [Pehme köide]

  • Formaat: Paperback / softback, 496 pages, kõrgus x laius: 234x177 mm
  • Ilmumisaeg: 27-Sep-2022
  • Kirjastus: No Starch Press,US
  • ISBN-10: 1718502400
  • ISBN-13: 9781718502406
Teised raamatud teemal:
  • Formaat: Paperback / softback, 496 pages, kõrgus x laius: 234x177 mm
  • Ilmumisaeg: 27-Sep-2022
  • Kirjastus: No Starch Press,US
  • ISBN-10: 1718502400
  • ISBN-13: 9781718502406
Teised raamatud teemal:
"Beginning with a foundation in the history and theory of programming languages, then guiding readers through a tour of novel, atypical, and esoteric programming languages (esolangs), this book probes the limits and boundaries of what a programming language can be. Readers will become more knowledgeable and confident programmers by exploring the different, surprising, and often "strange" ways in which programming languages can express thought"--

Strengthen your overall coding skills by exploring the wonderful, wild, and often weird world of esoteric languages (esolangs).

Strange Code starts with a dive into the underlying history of programming, covering the early computer-science concepts, like Turing machines and Turing completeness, that led to the languages we use today. It then explores the realm of “atypical” programming languages, introducing you to the out-of-the-box thinking that comes from these unusual approaches to coding. 

Later chapters address the even more unusual esolangs, nearly all of which are like nothing you’ve ever seen. Finally, author Ron Kneusel helps you develop and use two entirely new programming languages. You may not apply these languages in your day job, but this one-of-a-kind book will motivate you to think differently about what it means to express thought through code, while discovering the far-flung boundaries of programming.
 
You’ll learn:
  • How to program with pictures using Piet
  • How to write two-dimensional programs in Befunge
  • How to implement machine-learning algorithms using the text pattern matching language SNOBOL
  • How to decipher Brainfuck code like [ ->-[ >+>>]>[ [ -<+>]+>+>>]<<<<<]
  • How to design and create two original programming languages
  •  
    Learning to think in these languages will make you a better, more confident programmer.

    Arvustused

    "[ No Starch Press] had me at 'esolangs' . . . I am almost always a fan of a book that talks about how to build a programming language. This one not only talks about some of the concepts involved in doing that, and shows how to build two custom languages (Filska and Firefly), AND talks about a few popular esoteric languages and how they warp your brain in a good way, it takes the unusual step of examining some languages that Kneusel describes as 'atypical,' which have some interesting and useful properties. His coverage of CLIPS, alone, is worth the price of admission here. 

    The knowledge gained here is foundational, and will help [ you] with all sorts of different kinds of applications . . . I think every programmer should read it."  Ted Neward, "The Dude of Software," Principal, Neward & Associates; Technologist, Executive Leader, Speaker/Author

    "A fascinating and thought-provoking tour through programming languages. Strange Code guides you through some mostly forgotten languagessuch as Forth, SNOBOL, and CLIPSbefore exploring more experimental languagessuch as Pietwhere your source code is an image. I particularly enjoyed Firefly, a language for the BBC micro:bit, created especially for the book." Sean McManus, Author of Mission Python: Code a Space Adventure Game!

    "[ Gives] a grounding in the basics of concepts like Turing Completeness without leaving readers to fend for themselves in a forest of of dense computer science arcana. As a reference and source for teachers, Strange Code has much to commend it." Terry Freedman, Teach Secondary magazine

    Foreword xix
    Acknowledgments xxiii
    Introduction xxv
    PART I ON PROGRAMMING LANGUAGES
    1 A Cherry-Picked Review Of Programming Languages
    3(40)
    Programming Language Paleontology
    4(2)
    The First Programming Languages
    6(1)
    Programming Before Computers
    6(2)
    The First Modern Programming Languages
    8(1)
    ALGOL
    9(2)
    APL
    11(2)
    BASIC
    13(1)
    PL/I
    14(1)
    Logo
    15(1)
    Simula
    16(3)
    Pascal
    19(2)
    Prolog
    21(1)
    Modeling Family Relationships
    21(3)
    Implementing the Fibonacci Sequence
    24(3)
    Smalltalk
    27(2)
    Basic Smalltalk Features
    29(4)
    Going to the Races
    33(3)
    Standard ML
    36(5)
    Summary
    41(2)
    2 The Essentials Of Programming Languages
    43(34)
    Defining Programming Language
    44(1)
    Syntax and Semantics
    44(1)
    Implementing Programming Languages
    45(1)
    Tokens, Lexers, and Parsers
    46(1)
    Interpreters
    47(2)
    Compilers
    49(3)
    Bytecode Compilers
    52(1)
    Data Types
    53(2)
    Primitive Data Types
    55(1)
    Records
    55(2)
    Data Structures
    57(1)
    Arrays
    58(1)
    Linked Lists
    58(1)
    Trees
    59(1)
    Hash Tables
    59(1)
    Variables and Scope
    59(1)
    Lexical Scope
    60(1)
    Dynamic Scope
    61(1)
    Python
    61(1)
    C
    62(1)
    SNOBOL
    62(1)
    Perl
    63(1)
    Controlling Program Flow
    64(1)
    Unstructured Languages
    64(1)
    Structured Languages
    65(3)
    Programming Paradigms
    68(1)
    Imperative
    68(1)
    Object-Oriented
    68(2)
    Declarative
    70(2)
    Array Processing
    72(4)
    Summary
    76(1)
    3 Turing Machines And Turing Completeness
    77(20)
    The Halting Problem
    78(1)
    Turing Machines
    79(2)
    Universal Turing Machine
    81(2)
    Turing Completeness
    83(1)
    Let's Build a Turing Machine
    84(1)
    The Simulator
    85(3)
    The Examples
    88(5)
    Summary
    93(4)
    PART II ATYPICAL PROGRAMMING LANGUAGES
    4 Forth
    97(26)
    Installation
    98(1)
    Origins and Philosophy
    98(1)
    The Language
    99(1)
    Understanding the Stack
    99(1)
    Using the Stack
    100(3)
    Words and Loops
    103(3)
    What Is Truth?
    106(3)
    Other Control Structures
    109(2)
    How Forth Uses Memory
    111
    Input and Output
    110(8)
    Square Root Redux
    118(3)
    Discussion
    121(1)
    Summary
    122(1)
    5 Snobol
    123(40)
    Installation
    124(1)
    Origins and Philosophy
    124(1)
    The Language
    125(1)
    Running SNOBOL
    125(3)
    Variables and Data Types
    128(6)
    Arrays and Tables
    134(5)
    A Blizzard of Patterns
    139(1)
    Functions
    140(9)
    Input and Output
    149(2)
    Machine Learning with SNOBOL
    151(1)
    Machine Learning 101
    151(3)
    Implementing the Classifier
    154(4)
    Using the Classifier
    158(2)
    Discussion
    160(2)
    Summary
    162(1)
    6 Clips
    163(32)
    Installation
    164(1)
    Origins and Philosophy
    164(2)
    The Language
    166(1)
    Working with CLIPS
    166(2)
    Implementing Hello World
    168(1)
    Facts and Rules
    169(4)
    CLIPS in Action
    173(1)
    An Elementary Calculator
    173(4)
    Family Redux
    177(4)
    At the Factory
    181(3)
    An Iris Expert System
    184(6)
    Discussion
    190(1)
    Summary
    191(4)
    PART III ESOTERIC PROGRAMMING LANGUAGES
    7 The Abcs Of Abcs
    195(22)
    ABC
    196(1)
    The Language
    196(1)
    An ABC Implementation
    196(1)
    Testing ABC
    197(2)
    ABC2
    199(1)
    The Extensions
    199(1)
    An ABC2 Implementation
    200(3)
    ABC2 in Action
    203(1)
    HELLO WORLD!
    204(1)
    A Slice of Pi
    205(5)
    The Electromechanical Arithmometer
    210(4)
    Discussion
    214(1)
    Summary
    215(2)
    8 Fractran
    217(26)
    The Fractran Specification
    218(1)
    A Tale of Two Implementations
    218(1)
    A Scheme Implementation
    219(1)
    A Python Implementation
    220(1)
    Using FRACTRAN
    221(1)
    Understanding FRACTRAN
    222(4)
    More FRACTRAN Examples
    226(1)
    Subtraction
    226(1)
    Maximum of Two Integers
    227(3)
    Copying a Register
    230(2)
    Multiplication
    232(2)
    Conway's PRIMEGAME
    234(2)
    The Collatz Conjecture
    236(2)
    A FRACTRAN Greeting
    238(1)
    Discussion
    239(1)
    Is FRACTRAN Turing Complete?
    239(1)
    FRACTRAN and the Collatz Conjecture
    240(1)
    Final Thoughts on FRACTRAN
    241(1)
    Summary
    242(1)
    9 PIET
    243(28)
    Installation
    244(1)
    Understanding Piet
    245(1)
    Piet Colors
    245(1)
    Representing Numbers
    245(1)
    Representing Programs
    246(1)
    Piet Commands
    246(3)
    Program Flow
    249(2)
    Piet in Action
    251(1)
    Proving 2 + 2 = 4
    251(1)
    Saying Hi
    252(2)
    Countdown
    254(3)
    A Pseudorandom Number Generator
    257(4)
    A Tribute to Piet Mondrian
    261(5)
    The Piet Universe
    266(1)
    About Piet
    266(1)
    Code
    267(1)
    Implementations and Tools
    267(1)
    Discussion
    268(1)
    Summary
    269(2)
    10 Brainfuck
    271(26)
    WTF Is BF?
    271(2)
    The Two Implementations
    273(1)
    The Original
    273(2)
    SNOBOL Meets BF
    275(5)
    BF in Action
    280(1)
    Baby Steps
    281(2)
    Bunches O'Bits
    283(5)
    Multiplicative Multiplicity
    288(4)
    The BF Multiverse
    292(1)
    Examples
    292(1)
    Tutorials
    293(1)
    Implementations
    293(1)
    Inspirations
    294(1)
    Academic BF
    294(1)
    Discussion
    295(1)
    Summary
    296(1)
    11 Befunge
    297(22)
    Befunge-93 World Tour
    297(1)
    Building Befunge-93
    298(1)
    Printing Text
    299(2)
    Using BEdit
    301(1)
    Befunge Says Hello
    302(1)
    Befunge in Action
    303(1)
    Going with the Flow
    304(3)
    Building Bridges
    307(1)
    Fun with Dice
    308(2)
    Wandering Around
    310(1)
    Updating the Playfield on the Fly
    311(3)
    Discussion
    314(1)
    Summary
    315(4)
    PART IV HOMEGROWN ESOLANGS
    12 Filska
    319(22)
    Philosophy and Design
    319(2)
    Program Structure and Syntax
    321(2)
    Flow Control
    323(2)
    Memory
    325(2)
    Arithmetic
    327(1)
    Comparisons
    327(2)
    Mathematical Functions
    329(1)
    Input and Output
    330(1)
    Implementating Filska
    331(1)
    Overall Structure and Operation
    332(1)
    Parsing
    333(1)
    The Execution Loop
    334(2)
    Instructions Without Arguments
    336(1)
    Instructions with Arguments
    337(1)
    Flow Control Instructions
    338(2)
    Summary
    340(1)
    13 Using Filska
    341(32)
    Hello, World!
    341(1)
    Hello, Math!
    342(1)
    Hello, Poly!
    343(2)
    Hello, Poly Implementation!
    345(3)
    Fibonacci, Anyone?
    348(4)
    Random Numbers
    352(1)
    Implementing MINSTD
    353(1)
    Evaluating MINSTD
    354(2)
    A Simple Fractal
    356(3)
    Getting to the Roots of the Problem
    359(6)
    Linear Least-Squares Fit to a Line
    365(5)
    Discussion
    370(1)
    Summary
    371(2)
    14 Firefly
    373(18)
    Philosophy and Design
    374(2)
    Movement
    376(1)
    Display
    377(1)
    Music
    378(1)
    What's Left
    379(1)
    Implementation
    380(1)
    Interpreter Structure and Main Loop
    380(3)
    Movement
    383(1)
    Display
    384(2)
    Music
    386(1)
    Configuring the Micro:bit
    386(1)
    Micro:bit Hardware Overview
    386(2)
    Using an External Speaker
    388(1)
    Summary
    389(2)
    15 Using Firefly
    391(24)
    The Process
    392(1)
    Writing Firefly Code
    393(1)
    Using the Console Interpreter
    394(1)
    Packing a Bundle
    395(2)
    Fly Time
    397(3)
    Space Trek
    400(2)
    Beethoven in Lights
    402(3)
    Dance Dance
    405(1)
    The Stances
    406(1)
    The Dance
    407(1)
    The Music
    408(1)
    Tea Time
    409(3)
    Discussion
    412(1)
    Summary
    412(3)
    16 Going Further
    415(18)
    The Runners-Up
    415(1)
    Malbolge
    415(1)
    INTERCAL
    416(3)
    Whitespace
    419(2)
    Shakespeare
    421(2)
    Whirl
    423(2)
    Taxi
    425(3)
    Dathanna
    428(1)
    Programming Language Resources
    428(1)
    Programming Languages
    429(1)
    Data Structures
    430(1)
    Compilers and Interpreters
    430(1)
    Postlude
    431(2)
    Appendix: Genetic Programming With Firefly
    433(22)
    Introduction to Genetic Programming
    433(1)
    How Genetic Programming Works
    434(1)
    Defining Displays
    435(1)
    A Tiny Firefly Interpreter
    435(2)
    The Genetic Algorithm
    437(2)
    Putting It All Together
    439(1)
    Evolving Firefly Programs
    440(1)
    Warning Sign
    440(3)
    Radar Sweep
    443(1)
    Bouncing Ball
    444(2)
    Discussion
    446(1)
    Population Effects
    446(3)
    Final Program Diversity
    449(1)
    Can Genetic Programming Find the Shortest Program?
    450(2)
    Final Thoughts
    452(3)
    Index 455
    A programming language enthusiast, Ronald T. Kneusels experience with programming languages began circa 1980 when he first encountered an Apple II computer. Decades later, he completed a PhD in machine learning from the University of Colorado, Boulder, and now works in the industry developing deep learning systems. He is the author of Practical Deep Learning: A Python-Based Introduction (No Starch Press), Math for Deep Learning (No Starch Press), Numbers and Computers (Springer), and Random Numbers and Computers (Springer).