Learn Physics with Functional Programming

豆瓣
Learn Physics with Functional Programming

登录后可管理标记收藏。

ISBN: 9781718501669
作者: Scott N. Walck
出版社: No Starch Press
发行时间: 2023 -1
装订: Paperback
页数: 648

/ 10

0 个评分

评分人数不足
借阅或购买

A Hands-on Guide to Exploring Physics with Haskell

Scott N. Walck   

简介

This book teaches you to solve physics problems using the functional programming paradigm. Ideal for first-time programmers and science aficionados alike, it introduces the Haskell programming language and encourages the writing of beautiful code to match the elegant ideas of theoretical physics.
Early chapters cover the basics of coding in Haskell, which has a powerful system of types capable of encoding important mathematical structures in physics, like vectors, derivatives, integrals, scalar fields, vector fields, and differential equations. Later sections of the book explore Newtonian mechanics and electromagnetics—two central pillars of theoretical physics. In addition, you’ll get a deep look into source code, and discover why Haskell’s high-order functions and referential transparency serve physics so well. Along the way, you’ll learn:
•How to write beautiful code that expresses fundamental physical principles
•How to make graphs and animations of interesting situations
•How to program in a language that looks like mathematics
•How types, high order functions, and referential transparency serve physics well

contents

ACKNOWLEDGMENTS
INTRODUCTION
PART I A HASKELL PRIMER FOR PHYSICISTS
1 CALCULATING WITH HASKELL
2 WRITING BASIC FUNCTIONS
3 TYPES AND ENTITIES
4 DESCRIBING MOTION
5 WORKING WITH LISTS
6 HIGHER-ORDER FUNCTIONS
7 GRAPHING FUNCTIONS
8 TYPE CLASSES
9 TUPLES AND TYPE CONSTRUCTORS
10 DESCRIBING MOTION IN THREE DIMENSIONS
11 CREATING GRAPHS
12 CREATING STAND-ALONE PROGRAMS
13 CREATING 2D AND 3D ANIMATIONS
PART II EXPRESSING NEWTONIAN MECHANICS AND SOLVING PROBLEMS
14 NEWTON’S SECOND LAW AND DIFFERENTIAL EQUATIONS
15 MECHANICS IN ONE DIMENSION
16 MECHANICS IN THREE DIMENSIONS
17 SATELLITE, PROJECTILE, AND PROTON MOTION
18 A VERY SHORT PRIMER ON RELATIVITY
19 INTERACTING PARTICLES
20 SPRINGS, BILLIARD BALLS, AND A GUITAR STRING
PART III EXPRESSING ELECTROMAGNETIC THEORY AND SOLVING PROBLEMS
21 ELECTRICITY
22 COORDINATE SYSTEMS AND FIELDS
23 CURVES, SURFACES, AND VOLUMES
24 ELECTRIC CHARGE
25 ELECTRIC FIELD
26 ELECTRIC CURRENT
27 MAGNETIC FIELD
28 THE LORENTZ FORCE LAW
29 THE MAXWELL EQUATIONS
APPENDIX: INSTALLING HASKELL
BIBLIOGRAPHY
INDEX

短评
评论