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.
Supplemental Material
- 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 ScholarDigital Library
- The Chicken Scheme Authors. 2021. Chicken Scheme. Website. ( 2021 ). https://www.call-cc.org/Google Scholar
- The PyPy Authors. 2021. PyPy. Website. ( 2021 ). https://www.pypy.org/Google Scholar
- Cesar Blum. 2020. sectorforth. Github Repository. ( 2020 ). https://github.com/cesarblum/sectorforthGoogle Scholar
- 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 ScholarDigital Library
- Alexander Burger. 2014. Mailing List. ( 2014 ). https://www.mail-archive. com/[email protected]/msg04823.htmlGoogle Scholar
- Alexander Burger. 2021. Project Website. ( 2021 ). https://picolisp.com/ wiki/?homeGoogle Scholar
- George J. Carrette. 1997. SIOD v3.4. Website. ( 1997 ). https://www. nongnu.org/muesli/ulsiod.htmlGoogle Scholar
- 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 ScholarDigital Library
- The Espruino Developers. 2021. Javascript for Microcontrollers. ( 2021 ). https://www.espruino.com/Google Scholar
- The Micropython Developers. 2021. Python for Microcontrollers. ( 2021 ). https://micropython.org/Google Scholar
- The NodeJs Developers. 2021. NodeJS. Website. ( 2021 ). https://nodejs. org/en/Google Scholar
- 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 ScholarDigital Library
- Marc Feeley. 2021. Gambit Scheme. Github Repository. ( 2021 ). https://github.com/gambit/gambitGoogle Scholar
- Dmitry Grinberg. 2013. uJVM. Website. ( 2013 ). https://dmitry.gr/index. php?r= 05.Projects&proj= 12.%20uJ% 20-% 20a% 20micro % 20JVMGoogle Scholar
- 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 ScholarDigital Library
- Aubrey Jafer. 2021. The SCM Implementation of Scheme. Website. ( 2021 ). https://people.csail.mit.edu/jafer/SCM.htmlGoogle Scholar
- David Johnson-Davies. 2021. uLisp. Project Website. ( 2021 ). http://www.ulisp.comGoogle Scholar
- Hubert Montas. 2006. Armpit Scheme. SourceForge Repository. ( 2006 ). http://armpit.sourceforge.net/Google Scholar
- Atsushi Moriwaki. 1989. A Mini-Scheme Implementation. Website. ( 1989 ). tfp://ftp.cs.indiana.edu/pub/scheme-repository/imp/ minischeme.tar.gzGoogle Scholar
- 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 ScholarDigital Library
- David Peter. 2021. Hyperfine. Github Repository. ( 2021 ). https://github. com/sharkdp/hyperfineGoogle Scholar
- Manuel Serrano. 2021. Bigloo: a Practical Scheme Compiler. Website. ( 2021 ). https://www-sop.inria.fr/mimosa/fp/Bigloo/index.htmlGoogle Scholar
- 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 ScholarDigital Library
- Dimitrios Souflis, Kevin Cozens, and Jonathan Shapiro. 2021. TinyScheme. SourceForge Repository. ( 2021 ). http://tinyscheme. sourceforge.net/home.htmlGoogle Scholar
- 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 ScholarDigital Library
- 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 Scholar
- Ryan Suchocki and Sara Kalvala. 2014. Microscheme: Functional programming for the Arduino. In Scheme and Functional Programming Workshop, Washington, DC. 21-29.Google Scholar
- Gerald J Sussman, Jack Holloway, GL Steele, and Alan Bell. 1981. SCHEME-79-LISP on a chip. Computer 14, 7 ( 1981 ), 10-21. Google ScholarDigital Library
- Justine Tunney. 2020. SectorLisp. Github Repository. ( 2020 ). https://github.com/jart/sectorlispGoogle Scholar
- 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 ScholarDigital Library
- Göran Weinholt. 2021. Loko Scheme. GitLab Repository. ( 2021 ). https://scheme.fail/Google Scholar
- 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 Scholar
Index Terms
- A small scheme VM, compiler, and REPL in 4k
Recommendations
A Compact and Extensible Portable Scheme VM
Programming '23: Companion Proceedings of the 7th International Conference on the Art, Science, and Engineering of ProgrammingVirtual Machines (VM) tend to evolve over their life cycle with features being added regularly and a growing footprint. In a VM designed for resource constrained environments this trend deteriorates the VM’s primary quality. We present how extensibility ...
Scratch-pad memory allocation without compiler support for java applications
CASES '07: Proceedings of the 2007 international conference on Compilers, architecture, and synthesis for embedded systemsThis paper presents the first scratch-pad memory allocation scheme that requires no compiler support for interpreted-language based applications. A scratch-pad memory(SPM) is a fast compiler-managed SRAM that replaces the hardware-managed cache. Its ...
Compiling scheme to JVM bytecode:: a performance study
ICFP '02: Proceedings of the seventh ACM SIGPLAN international conference on Functional programmingWe have added a Java virtual machine (henceforth JVM) bytecode generator to the optimizing Scheme-to-C compiler Bigloo. We named this new compiler BiglooJVM. We have used this new compiler to evaluate how suitable the JVM bytecode is as a target for ...
Comments