skip to main content
10.1145/3486606.3486783acmconferencesArticle/Chapter ViewAbstractPublication PagessplashConference Proceedingsconference-collections
research-article

A small scheme VM, compiler, and REPL in 4k

Published:19 October 2021Publication History

ABSTRACT

Compact language implementations are increasingly popular for use in resource constrained environments. For embedded applications such as robotics and home automation, it is useful to support a Read-Eval-Print-Loop (REPL) so that a basic level of interactive development is possible directly on the device. Due to its minimalistic design, the Scheme language is particularly well suited for such applications and several implementations are available with different tradeoffs. In this paper we explain the design and implementation of Ribbit, a compact Scheme system that supports a REPL, is extensible and has a 4 KB executable code footprint.

Skip Supplemental Material Section

Supplemental Material

splashws21vmilmain-p3-p-video.mp4

mp4

29.9 MB

References

  1. Harold Abelson, R Kent Dybvig, Christopher Thomas Haynes, Guillermo Juan Rozas, Norman I Adams IV, Daniel Paul Friedman, Eugene Kohlbecker, Guy Lewis Steele Jr, David H Bartley, Robert Halstead, et al. 1991. Revised4 Report on The Algorithmic Language Scheme. ACM SIGPLAN Lisp Pointers 4, 3 ( 1991 ), 1-55. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. The Chicken Scheme Authors. 2021. Chicken Scheme. Website. ( 2021 ). https://www.call-cc.org/Google ScholarGoogle Scholar
  3. The PyPy Authors. 2021. PyPy. Website. ( 2021 ). https://www.pypy.org/Google ScholarGoogle Scholar
  4. Cesar Blum. 2020. sectorforth. Github Repository. ( 2020 ). https://github.com/cesarblum/sectorforthGoogle ScholarGoogle Scholar
  5. Niels Brouwers, Peter Corke, and Koen Langendoen. 2008. Darjeeling, a Java Compatible Virtual Machine for Microcontrollers. In Proceedings of the ACM/IFIP/USENIX Middleware '08 Conference Companion (Companion '08). Association for Computing Machinery, New York, NY, USA, 18-23. https://doi.org/10.1145/1462735.1462740 Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Alexander Burger. 2014. Mailing List. ( 2014 ). https://www.mail-archive. com/[email protected]/msg04823.htmlGoogle ScholarGoogle Scholar
  7. Alexander Burger. 2021. Project Website. ( 2021 ). https://picolisp.com/ wiki/?homeGoogle ScholarGoogle Scholar
  8. George J. Carrette. 1997. SIOD v3.4. Website. ( 1997 ). https://www. nongnu.org/muesli/ulsiod.htmlGoogle ScholarGoogle Scholar
  9. C. J. Cheney. 1970. A Nonrecursive List Compacting Algorithm. Commun. ACM 13, 11 (Nov. 1970 ), 677-678. https://doi.org/10.1145/362790. 362798 Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. The Espruino Developers. 2021. Javascript for Microcontrollers. ( 2021 ). https://www.espruino.com/Google ScholarGoogle Scholar
  11. The Micropython Developers. 2021. Python for Microcontrollers. ( 2021 ). https://micropython.org/Google ScholarGoogle Scholar
  12. The NodeJs Developers. 2021. NodeJS. Website. ( 2021 ). https://nodejs. org/en/Google ScholarGoogle Scholar
  13. Danny Dubé and Marc Feeley. 2005. BIT: A Very Compact Scheme System for Microcontrollers. Higher-order and symbolic computation 18, 3-4 ( 2005 ), 271-298. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Marc Feeley. 2021. Gambit Scheme. Github Repository. ( 2021 ). https://github.com/gambit/gambitGoogle ScholarGoogle Scholar
  15. Dmitry Grinberg. 2013. uJVM. Website. ( 2013 ). https://dmitry.gr/index. php?r= 05.Projects&proj= 12.%20uJ% 20-% 20a% 20micro % 20JVMGoogle ScholarGoogle Scholar
  16. Roberto Ierusalimschy, Luiz Henrique de Figueiredo, and Waldemar Celes. 2007. The Evolution of Lua. In Proceedings of the third ACM SIGPLAN conference on History of programming languages. 2-1. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Aubrey Jafer. 2021. The SCM Implementation of Scheme. Website. ( 2021 ). https://people.csail.mit.edu/jafer/SCM.htmlGoogle ScholarGoogle Scholar
  18. David Johnson-Davies. 2021. uLisp. Project Website. ( 2021 ). http://www.ulisp.comGoogle ScholarGoogle Scholar
  19. Hubert Montas. 2006. Armpit Scheme. SourceForge Repository. ( 2006 ). http://armpit.sourceforge.net/Google ScholarGoogle Scholar
  20. Atsushi Moriwaki. 1989. A Mini-Scheme Implementation. Website. ( 1989 ). tfp://ftp.cs.indiana.edu/pub/scheme-repository/imp/ minischeme.tar.gzGoogle ScholarGoogle Scholar
  21. Zoe Paraskevopoulou and Andrew W Appel. 2019. Closure Conversion Is Safe for Space. Proceedings of the ACM on Programming Languages 3, ICFP, 1-29. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. David Peter. 2021. Hyperfine. Github Repository. ( 2021 ). https://github. com/sharkdp/hyperfineGoogle ScholarGoogle Scholar
  23. Manuel Serrano. 2021. Bigloo: a Practical Scheme Compiler. Website. ( 2021 ). https://www-sop.inria.fr/mimosa/fp/Bigloo/index.htmlGoogle ScholarGoogle Scholar
  24. Zhong Shao and Andrew W Appel. 2000. Eficient and Safe-for-Space Closure Conversion. ACM Transactions on Programming Languages and Systems (TOPLAS) 22, 1, 129-161. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Dimitrios Souflis, Kevin Cozens, and Jonathan Shapiro. 2021. TinyScheme. SourceForge Repository. ( 2021 ). http://tinyscheme. sourceforge.net/home.htmlGoogle ScholarGoogle Scholar
  26. Vincent St-Amour and Marc Feeley. 2009. PICOBIT: a Compact Scheme System for Microcontrollers. In International Symposium on Implementation and Application of Functional Languages. Springer, 1-17. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. Guy Lewis Steele Jr and Gerald Jay Sussman. 1979. Design of LispBased Processors, or SCHEME: A Dielectric LISP, or Finite Memories Considered Harmful, or LAMBDA: The Ultimate Opcode. ( 1979 ).Google ScholarGoogle Scholar
  28. Ryan Suchocki and Sara Kalvala. 2014. Microscheme: Functional programming for the Arduino. In Scheme and Functional Programming Workshop, Washington, DC. 21-29.Google ScholarGoogle Scholar
  29. Gerald J Sussman, Jack Holloway, GL Steele, and Alan Bell. 1981. SCHEME-79-LISP on a chip. Computer 14, 7 ( 1981 ), 10-21. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. Justine Tunney. 2020. SectorLisp. Github Repository. ( 2020 ). https://github.com/jart/sectorlispGoogle ScholarGoogle Scholar
  31. Benoît Vaugon, Philippe Wang, and Emmanuel Chailloux. 2015. Programming Microcontrollers in OCaml: The OCaPIC Project. In Practical Aspects of Declarative Languages, Enrico Pontelli and Tran Cao Son (Eds.). Springer International Publishing, Cham, 132-148. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. Göran Weinholt. 2021. Loko Scheme. GitLab Repository. ( 2021 ). https://scheme.fail/Google ScholarGoogle Scholar
  33. Samuel Yvon and Marc Feeley. 2021. Running Scheme On Bare Metal (Experience Report). In Proceedings of the 2020 Scheme and Functional Programming Workshop. 51-65.Google ScholarGoogle Scholar

Index Terms

  1. A small scheme VM, compiler, and REPL in 4k

    Recommendations

    Comments

    Login options

    Check if you have access through your login credentials or your institution to get full access on this article.

    Sign in
    • Published in

      cover image ACM Conferences
      VMIL 2021: Proceedings of the 13th ACM SIGPLAN International Workshop on Virtual Machines and Intermediate Languages
      October 2021
      32 pages
      ISBN:9781450391092
      DOI:10.1145/3486606

      Copyright © 2021 ACM

      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 ACM 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]

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 19 October 2021

      Permissions

      Request permissions about this article.

      Request Permissions

      Check for updates

      Qualifiers

      • research-article

      Acceptance Rates

      Overall Acceptance Rate4of4submissions,100%

      Upcoming Conference

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader