HackerPapers

arXiv:1412.4880cs.CY

Learn Physics by Programming in Haskell

Scott N. Walck

Abstract

We describe a method for deepening a student's understanding of basic physics by asking the student to express physical ideas in a functional programming language. The method is implemented in a second-year course in computational physics at Lebanon Valley College. We argue that the structure of Newtonian mechanics is clarified by its expression in a language (Haskell) that supports higher-order functions, types, and type classes. In electromagnetic theory, the type signatures of functions that calculate electric and magnetic fields clearly express the functional dependency on the charge and current distributions that produce the fields. Many of the ideas in basic physics are well-captured by a type or a function.

arXiv comments
In Proceedings TFPIE 2014, arXiv:1412.4738
Journal reference
EPTCS 170, 2014, pp. 67-77
DOI
doi:10.4204/EPTCS.170.5
Subjects
cs.CYComputers and Society cs.PLProgramming Languages physics.ed-phPhysics Education

On Hacker News

Linked by 5 identifiable commenters in 5 comments across 4 threads, from Feb 2015 to Sep 2023. Found in 4 HN submissions from Feb 2015 to Feb 2018. Open submission discussions.

Comments linking this paper, per year.

Discussed in comments4 threads

    • I don't think the MIT guys have the same motivations as the author of this book. He (Walck) discusses the suitability of (a subset of) Haskell in this article: https://arxiv.org/abs/1412.4880 Maybe someone else can shed light on the MIT mindset. Certainly some of Walck's points…

      ogjdrjvfView on HNParent context

  1. Intro to Computational Physics 1 comment
    • Please don't link straight to PDFs on the arXiv. Link instead to the abstract: http://arxiv.org/abs/1412.4880

      evanbView on HNParent context

    • Continuing my mission to promote links to abstracts over links to PDFs: http://arxiv.org/abs/1412.4880 .

      JadeNBView on HNParent context

Submitted to Hacker News

Connected through shared HN threads, not inferred similarity or a recommendation.