کتاب یادگیری فیزیک با برنامه‌نویسی تابعی اثرScott N. Walck

عنوان:

Learn Physics with Functional Programming

نویسنده:

Scott N. Walck

انتشارات:

No Starch Press

تاریخ انتشار:

2023

حجم:

5MB

دانلود

معرفی کتاب:" یادگیری فیزیک با برنامه‌نویسی تابعی "

این کتاب به شما آموزش می‌دهد چگونه با استفاده از پارادایم برنامه‌نویسی تابعی، مسائل فیزیک را حل کنید. مناسب برای برنامه‌نویسان تازه‌کار و علاقه‌مندان به فیزیک نظری است و زبان قدرتمند Haskell را معرفی می‌کند؛ زبانی که نگارش کدی زیبا و شبیه به ریاضیات را ممکن می‌سازد.

در فصل‌های ابتدایی، اصول پایه‌ی برنامه‌نویسی در Haskell آموزش داده می‌شود. این زبان دارای سیستم نوع‌دهی قوی است که توانایی مدل‌سازی ساختارهای ریاضی مهم در فیزیک مانند:

  • بردارها
  • مشتق‌ها و انتگرال‌ها
  • میدان‌های نرده‌ای و برداری
  • معادلات دیفرانسیل

در ادامه، مباحثی از مکانیک نیوتنی و الکترومغناطیس — دو ستون اصلی فیزیک نظری — به‌صورت عملی بررسی می‌شوند. همچنین کدهای منبع (source code) با جزئیات تحلیل شده‌اند تا مزایای Haskell در مدل‌سازی علمی نمایان شود.

در این مسیر خواهید آموخت:

  • چگونه کدی زیبا و خوانا بنویسید که اصول بنیادی فیزیک را بیان کند
  • تولید نمودارها و انیمیشن‌هایی از پدیده‌های فیزیکی
  • برنامه‌نویسی با زبانی که ساختار آن مشابه ریاضیات است
  • استفاده از توابع مرتبه‌بالا و شفافیت ارجاعی برای مدل‌سازی دقیق

فهرست مطالب

  • Cover Page
  • Title Page
  • Copyright Page
  • Dedication
  • About the Author
  • About the Technical Reviewer
  • Brief Contents
  • Contents in Detail
  • Acknowledgments
  • Introduction
  • I A Haskell Primer For Physicists
  • Chapter 1 CALCULATING WITH HASKELL
  • A Kinematics Problem
  • The Interactive Compiler
  • Numeric Functions
  • Operators
  • Functions with Two Arguments
  • Numbers in Haskell
  • Approximate Calculation
  • Errors
  • Getting Help and Quitting
  • More Information
  • Summary
  • Exercises
  • Chapter 2 WRITING BASIC FUNCTIONS
  • Constants, Functions, and Types
  • How We Talk About Functions
  • Anonymous Functions
  • Composing Functions
  • Variable Not in Scope Error
  • Summary
  • Exercises
  • Chapter 3 TYPES AND ENTITIES
  • Basic Types
  • Function Types
  • Summary
  • Exercises
  • Chapter 4 DESCRIBING MOTION
  • Position and Velocity on an Air Track
  • Types for Physical Quantities
  • Introducing Derivatives
  • Derivatives in Haskell
  • Modeling the Car’s Position and Velocity
  • Modeling Acceleration
  • Approximate Algorithms and Finite Precision
  • Summary
  • Exercises
  • Chapter 5 WORKING WITH LISTS
  • List Basics
  • Type Variables
  • Type Conversion
  • The Length of Lists
  • A String Is a List of Characters
  • List Comprehensions
  • Infinite Lists
  • List Constructors and Pattern Matching
  • Summary
  • Exercises
  • Chapter 6 HIGHER-ORDER FUNCTIONS
  • How to Think About Functions with Parameters
  • Mapping a Function Over a List
  • Iteration and Recursion
  • Anonymous Higher-Order Functions
  • Operators as Higher-Order Functions
  • Combinators
  • Predicate-Based Higher-Order Functions
  • Numerical Integration
  • Summary
  • Exercises
  • Chapter 7 GRAPHING FUNCTIONS
  • Using Library Modules
  • Plotting
  • Summary
  • Exercises
  • Chapter 8 TYPE CLASSES
  • Type Classes and Numbers
  • Type Classes from the Prelude
  • Exponentiation and Type Classes
  • Sections
  • Example of Type Classes and Plotting
  • Summary
  • Exercises
  • Chapter 9 TUPLES AND TYPE CONSTRUCTORS
  • Pairs
  • Currying a Function of Two Variables
  • Triples
  • Comparing Lists and Tuples
  • Maybe Types
  • Lists of Pairs
  • Tuples and List Comprehensions
  • Type Constructors and Kinds
  • Numerical Integration Redux
  • Summary
  • Exercises
  • Chapter 10 DESCRIBING MOTION IN THREE DIMENSIONS
  • Three-Dimensional Vectors
  • Coordinate Systems
  • Kinematics in 3D
  • Making Your Own Data Type
  • Defining a New Data Type for 3D Vectors
  • Summary
  • Exercises
  • Chapter 11 CREATING GRAPHS
  • Title and Axis Labels
  • Other Labels
  • Plotting Data
  • Multiple Curves on One Set of Axes
  • Controlling the Plot Ranges
  • Making a Key
  • Summary
  • Exercises
  • Chapter 12 CREATING STAND-ALONE PROGRAMS
  • Using GHC to Make a Stand-Alone Program
  • Using Cabal to Make a Stand-Alone Program
  • Using Stack to Make a Stand-Alone Program
  • Summary
  • Exercises
  • Chapter 13 CREATING 2D AND 3D ANIMATIONS
  • 2D Animation
  • 3D Animation
  • Summary
  • Exercises
  • IΙ EXPRESSING NEWTONIAN MECHANICS AND SOLVING PROBLEMS
  • Chapter 14 NEWTON’S SECOND LAW AND DIFFERENTIAL EQUATIONS
  • Newton’s First Law
  • Newton’s Second Law in One Dimension
  • Second Law with Constant Forces
  • Second Law with Forces That Depend Only on Time
  • Air Resistance
  • Second Law with Forces That Depend Only on Velocity
  • The State of a Physical System
  • Second Law with Forces That Depend on Time and Velocity
  • Example: Pedaling and Coasting with Air Resistance
  • Summary
  • Exercises
  • Chapter 15 MECHANICS IN ONE DIMENSION
  • Introductory Code
  • Forces That Depend on Time, Position, and Velocity
  • A Damped Harmonic Oscillator
  • Euler-Cromer Method
  • Solving Differential Equations
  • Summary
  • Exercises
  • Chapter 16 MECHANICS IN THREE DIMENSIONS
  • Introductory Code
  • Newton’s Second Law in Three Dimensions
  • The State of One Particle
  • Solving Newton’s Second Law
  • One-Body Forces
  • State Update for One Particle
  • Preparing for Animation
  • Summary
  • Exercises

مشخصات

نام کتاب

Learn Physics with Functional Programming

نویسنده

Scott N. Walck

انتشارات

No Starch Press

تاریخ انتشار

2023

ISBN

9781718501669

تعداد صفحات

824

زبان

انگلیسی

فرمت

pdf

حجم

5MB

موضوع

programming