skip to main content
10.1145/3609023.3609806acmconferencesArticle/Chapter ViewAbstractPublication PagesicfpConference Proceedingsconference-collections
research-article

The Beauty and Elegance of Functional Reactive Animation

Published: 31 August 2023 Publication History

Abstract

It has been over 20 years since Elliott and Hudak published Functional Reactive Animation, which outlined the principles of interactive programming in functional languages. As a result, Functional Reactive Programming (FRP) has seen numerous implementations and has been applied to multiple areas, like robotics, physics simulations, game programming and user interfaces. The use of the term FRP has itself broadened, and nowadays covers both continuous-time purely functional abstractions and discrete-time reactive implementations. This paper presents a series of increasingly complex FRP animations in a current implementation. With a main focus on clarity and meaning, we explore three independent dimensions: space, time, and color. We demonstrate that, when embraced fully, Functional Programming can result in declarative constructs that are aesthetically beautiful and notationally elegant.

References

[1]
Heinrich Apfelmus. 2011. Reactive-banana. http://www.haskell.org/haskellwiki/Reactive-banana Accessed: 2014-10-20.
[2]
Engineer Bainomugisha, Andoni Lombide Carreton, Tom van Cutsem, Stijn Mostinckx, and Wolfgang de Meuter. 2013. A Survey on Reactive Programming. ACM Comput. Surv., 45, 4 (2013), Article 52, Aug., 34 pages. issn:0360-0300 https://doi.org/10.1145/2501654.2501666
[3]
Manuel Bärenz and Ivan Perez. 2018. Rhine: FRP with type-level clocks. In Proceedings of the 11th ACM SIGPLAN International Symposium on Haskell. 145–157.
[4]
Koen Claessen and John Hughes. 2000. QuickCheck: A Lightweight Tool for Random Testing of Haskell Programs. In Proceedings of the Fifth ACM SIGPLAN International Conference on Functional Programming (ICFP ’00). ACM, New York, NY, USA. 268–279. isbn:1-58113-202-6 https://doi.org/10.1145/351240.351266
[5]
Antony Courtney. 2001. Frappé: Functional Reactive Programming in Java. In Third International Symposium on Pratical Aspects of Declarative Languages (PADL).
[6]
Antony Courtney. 2003. Functionally modeled user interfaces. In Interactive Systems. Design, Specification, and Verification. Springer, 107–123.
[7]
Antony Courtney and Conal Elliott. 2001. Genuinely Functional User Interfaces. In Haskell Workshop. 41–69.
[8]
Antony Courtney, Henrik Nilsson, and John Peterson. 2003. The Yampa arcade. In Haskell Workshop. 7–18.
[9]
Antony Alexander Courtney. 2004. Modeling User Interfaces in a Functional Language. Ph.D. Dissertation. New Haven, CT, USA. AAI3125177.
[10]
Conal Elliott. 2009. Push-Pull Functional Reactive Programming. In Proceedings of the 2nd ACM SIGPLAN symposium on Haskell. 25–36.
[11]
Conal Elliott and Paul Hudak. 1997. Functional Reactive Animation. In ACM SIGPLAN Notices. 32(8), 263–273.
[12]
Paul Hudak. 2000. The Haskell School of Expression: Learning Functional Programming through Multimedia. Jan., isbn:0-521-64408-9 http://dl.acm.org/citation.cfm?id=330777
[13]
Paul Hudak, Antony Courtney, Henrik Nilsson, and John Peterson. 2003. Arrows, robots, and functional reactive programming. In Advanced Functional Programming. Springer, 159–187.
[14]
Paul Hudak and Donya Quick. 2018. The Haskell School of Music: From signals to Symphonies. Cambridge University Press.
[15]
John Hughes. 2000. Generalising monads to arrows. Science of Computer Programming, 37, 1 (2000), 67 – 111.
[16]
Wolfgang Jeltsch. 2008. Improving Push-based FRP. Draft Proceedings of Trends in Functional Programming (TFP’08).
[17]
Neelakantan R Krishnaswami. 2013. Higher-order functional reactive programming without spacetime leaks. In Proceedings of the 18th ACM SIGPLAN international conference on Functional programming. 221–232.
[18]
Ben Lippmeier. 2010. Gloss. http://gloss.ouroborus.net/
[19]
2010. Haskell Language Report, Simon Marlow (Ed.). Available at: https://www.haskell.org/onlinereport/haskell2010
[20]
Henrik Nilsson, Antony Courtney, and John Peterson. 2002. Functional reactive programming, continued. In Haskell Workshop. 51–64.
[21]
Gergely Patai. 2009. Eventless reactivity from scratch. Draft Proceedings of Implementation and Application of Functional Languages (IFL’09), 126–140.
[22]
Gergely Patai. 2010. Efficient and compositional higher-order streams. In Functional and Constraint Logic Programming. 137–154.
[23]
Ross Paterson. 2001. A New Notation for Arrows. In Proceedings of the Sixth ACM SIGPLAN International Conference on Functional Programming (ICFP ’01). ACM, New York, NY, USA. 229–240. isbn:1-58113-415-0 https://doi.org/10.1145/507635.507664
[24]
Ivan Perez. 2017. Back to the Future: Time Travel in FRP. In Proceedings of the 10th ACM SIGPLAN International Haskell Symposium (Haskell 2017). ACM, New York, NY, USA. isbn:978-1-4503-5182-9 https://doi.org/10.1145/3122955.3122957
[25]
Ivan Perez. 2018. Fault Tolerant Functional Reactive Programming (Functional Pearl). Proc. ACM Program. Lang., 2, ICFP (2018), Article 96, July, 30 pages. issn:2475-1421 https://doi.org/10.1145/3236791
[26]
Ivan Perez, Manuel Bärenz, and Henrik Nilsson. 2016. Functional Reactive Programming, Refactored. In Proceedings of the 9th International Symposium on Haskell (Haskell 2016). ACM, New York, NY, USA. 33–44. isbn:978-1-4503-4434-0 https://doi.org/10.1145/2976002.2976010
[27]
Ivan Perez and Henrik Nilsson. 2017. Testing and Debugging Functional Reactive Programming. Proc. ACM Program. Lang., 1, ICFP (2017), Article 2, Aug., 27 pages. issn:2475-1421 https://doi.org/10.1145/3110246
[28]
M Pouzet. 2001. Lucid Synchrone, version 2. Tutorial and reference manual.
[29]
Simon Thompson. 2000. A functional reactive animation of a lift using Fran. Journal of Functional Programming, 10, 3 (2000), 245–268.
[30]
Zhanyong Wan, Walid Taha, and Paul Hudak. 2002. Event-driven FRP. In Practical Aspects of Declarative Languages. Springer, 155–172.
[31]
Christina Zeller and Ivan Perez. 2019. Mobile Game Programming in Haskell. In Proceedings of the 7th ACM SIGPLAN International Workshop on Functional Art, Music, Modeling, and Design (FARM 2019). Association for Computing Machinery, New York, NY, USA. 37–48. isbn:9781450368117 https://doi.org/10.1145/3331543.3342580

Cited By

View all

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
FARM 2023: Proceedings of the 11th ACM SIGPLAN International Workshop on Functional Art, Music, Modelling, and Design
August 2023
46 pages
ISBN:9798400702952
DOI:10.1145/3609023
  • General Chair:
  • Mae Milano,
  • Program Chair:
  • John Leo
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 31 August 2023

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. Functional Reactive Programming
  2. animation
  3. dataflow
  4. domain-specific languages

Qualifiers

  • Research-article

Conference

FARM '23
Sponsor:

Acceptance Rates

Overall Acceptance Rate 19 of 23 submissions, 83%

Upcoming Conference

ICFP '25
ACM SIGPLAN International Conference on Functional Programming
October 12 - 18, 2025
Singapore , Singapore

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)51
  • Downloads (Last 6 weeks)3
Reflects downloads up to 16 Jan 2025

Other Metrics

Citations

Cited By

View all

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media