# Gambit

> software which interprets and compiles Scheme code into C code

**Wikidata**: [Q5519637](https://www.wikidata.org/wiki/Q5519637)  
**Wikipedia**: [English](https://en.wikipedia.org/wiki/Gambit_(Scheme_implementation))  
**Source**: https://4ort.xyz/entity/gambit

## Summary
Gambit is a free and open-source software system that interprets and compiles Scheme code into highly optimized C code. It serves as both a Scheme interpreter and a compiler, enabling efficient execution of Scheme programs across multiple platforms, including BSD-based operating systems. Gambit is widely used for its performance, portability, and integration capabilities with other programming tools.

## Key Facts
- **Definition**: Gambit is a software system that interprets and compiles Scheme code into C code.
- **Licenses**: Distributed under the GNU Lesser General Public License (LGPL) version 2.1 and the Apache Software License 2.0.
- **Stable Versions**:
  - Version 4.9.7 (released 2025-07-13, preferred stable version).
  - Version 4.9.6 (released 2025-03-10).
  - Version 4.9.3 (released 2019-02-05).
- **Historical Releases**: Over 50 versions released between 2007 and 2025, including major updates like 4.0.0 (2007-08-25) and 4.9.0 (2018-09-03).
- **Operating System**: Primarily runs on BSD-based systems.
- **Typing Discipline**: Supports dynamic typing, strong typing, and latent typing.
- **Related Tools**:
  - **Geiser-Gambit**: Provides support for Gambit in Geiser, a Scheme development environment.
- **Free Software**: Classified as free software, allowing users to run, study, modify, and distribute it freely.
- **Source Code**: Hosted on GitHub at [github.com/gambit/gambit](https://github.com/gambit/gambit).
- **Documentation**:
  - User manual available at [gambitscheme.org/latest/manual/](https://gambitscheme.org/latest/manual/).
  - Official wiki at [gambitscheme.org/wiki/index.php](https://gambitscheme.org/wiki/index.php).
- **Community Resources**:
  - Issue tracker: [github.com/gambit/gambit/issues](https://github.com/gambit/gambit/issues).
  - Mailing list archive: [mailman.iro.umontreal.ca/pipermail/gambit-list/](https://mailman.iro.umontreal.ca/pipermail/gambit-list/).
- **Package Availability**:
  - Debian/Ubuntu: Available as `gambc`.
  - FreeBSD: Ported as `lang/gambit-c`.
  - OpenBSD: Ported as `lang/gambit`.
  - Guix: Available under the variable name `gambit-c`.
- **Website**: [gambitscheme.org](http://gambitscheme.org).

## FAQs

**What is Gambit used for?**
Gambit is used to compile and interpret Scheme code, converting it into efficient C code for execution. It is particularly valued for its performance optimizations and portability across different platforms, especially BSD-based systems.

**Is Gambit free to use?**
Yes, Gambit is free software licensed under the GNU Lesser General Public License (LGPL) version 2.1 and the Apache Software License 2.0. This allows users to freely run, study, modify, and distribute the software.

**What are the latest versions of Gambit?**
As of 2025, the latest stable version is 4.9.7, released on July 13, 2025. Other recent versions include 4.9.6 (March 10, 2025) and 4.9.3 (February 5, 2019).

**Where can I find Gambit’s documentation?**
Gambit’s user manual is available at [gambitscheme.org/latest/manual/](https://gambitscheme.org/latest/manual/), and additional resources can be found on the official wiki at [gambitscheme.org/wiki/index.php](https://gambitscheme.org/wiki/index.php).

**How can I contribute to Gambit?**
You can contribute by reporting issues on the GitHub issue tracker ([github.com/gambit/gambit/issues](https://github.com/gambit/gambit/issues)) or participating in discussions on the mailing list ([mailman.iro.umontreal.ca/pipermail/gambit-list/](https://mailman.iro.umontreal.ca/pipermail/gambit-list/)).

**What operating systems does Gambit support?**
Gambit is designed to run on BSD-based operating systems, including FreeBSD and OpenBSD. It is also available on other Unix-like systems and can be installed via package managers like Debian/Ubuntu’s `gambc`.

## Why It Matters
Gambit plays a crucial role in the Scheme programming ecosystem by providing a robust and efficient compiler and interpreter. Its ability to convert Scheme code into optimized C code makes it a valuable tool for developers seeking high performance and portability. As free software, Gambit empowers users to customize and extend its functionality, fostering innovation in functional programming. Its integration with tools like Geiser further enhances its utility in development environments, making it a key player in both academic and practical applications of Scheme.

## Notable For
- **Performance Optimization**: Gambit is renowned for compiling Scheme code into highly efficient C code, enabling fast execution.
- **Portability**: It supports multiple platforms, particularly BSD-based systems, ensuring broad compatibility.
- **Free Software Licensing**: Gambit’s dual licensing under LGPL 2.1 and Apache 2.0 promotes open collaboration and modification.
- **Extensive Version History**: With over 50 releases since 2007, Gambit has a long-standing track record of continuous improvement.
- **Integration with Development Tools**: Gambit is supported by Geiser, a popular Scheme development environment, enhancing its usability.
- **Strong Community Support**: Active mailing lists, issue trackers, and comprehensive documentation make Gambit accessible to both newcomers and experienced developers.

## Body

### Overview
Gambit is a software system designed to interpret and compile Scheme, a dialect of the Lisp programming language, into C code. This compilation process allows Scheme programs to achieve performance levels comparable to those written in lower-level languages like C. Gambit is classified as free software, meaning it is distributed under terms that permit users to run, study, modify, and redistribute it freely. It is licensed under both the GNU Lesser General Public License (LGPL) version 2.1 and the Apache Software License 2.0.

### History and Development
Gambit has undergone extensive development since its inception, with the first major release (version 4.0.0) dated August 25, 2007. Since then, it has seen numerous updates, with over 50 versions released up to 2025. Key milestones include:
- **Version 4.9.7** (July 13, 2025): The latest stable version as of 2025.
- **Version 4.9.3** (February 5, 2019): A significant release that introduced several optimizations.
- **Version 4.0.0** (August 25, 2007): The initial major release under the current versioning scheme.

The project is actively maintained, with a public source code repository hosted on GitHub ([github.com/gambit/gambit](https://github.com/gambit/gambit)), where users can access the latest developments and contribute to the codebase.

### Technical Features
Gambit supports multiple typing disciplines, including dynamic typing, strong typing, and latent typing, making it versatile for various programming paradigms. It is designed to run on BSD-based operating systems, such as FreeBSD and OpenBSD, and is available as a package in several Linux distributions, including Debian and Ubuntu (under the package name `gambc`).

### Ecosystem and Integration
Gambit integrates with several development tools and environments:
- **Geiser-Gambit**: Provides support for Gambit within Geiser, a Scheme development environment that enhances interactive programming and debugging.
- **Package Managers**: Gambit is available in multiple package managers, including:
  - Debian/Ubuntu: `gambc`.
  - FreeBSD: `lang/gambit-c`.
  - OpenBSD: `lang/gambit`.
  - Guix: `gambit-c`.

### Community and Resources
Gambit has a strong community presence, with resources available for both users and developers:
- **Documentation**:
  - User manual: [gambitscheme.org/latest/manual/](https://gambitscheme.org/latest/manual/).
  - Official wiki: [gambitscheme.org/wiki/index.php](https://gambitscheme.org/wiki/index.php).
- **Communication Channels**:
  - Issue tracker: [github.com/gambit/gambit/issues](https://github.com/gambit/gambit/issues).
  - Mailing list archive: [mailman.iro.umontreal.ca/pipermail/gambit-list/](https://mailman.iro.umontreal.ca/pipermail/gambit-list/).
- **Website**: The official Gambit website ([gambitscheme.org](http://gambitscheme.org)) serves as a hub for downloads, documentation, and community engagement.

### Related Projects and Tools
Gambit is part of a broader ecosystem of Scheme-related tools and projects. Notably, it is supported by Geiser, which provides an interactive development environment for Scheme programmers. This integration allows developers to leverage Gambit’s compilation capabilities within a feature-rich editing and debugging environment.

### Significance in Functional Programming
Gambit’s ability to compile Scheme into efficient C code makes it a critical tool in functional programming. It bridges the gap between high-level functional programming and low-level performance, enabling developers to write expressive Scheme code without sacrificing execution speed. Its open-source nature and active community further contribute to its role as a cornerstone in the Scheme programming landscape.

## References

1. [Source](https://www-labs.iro.umontreal.ca/~gambit/download/gambit/v4.9/source/)
2. [Release 4.0.0. 2007](https://github.com/gambit/gambit/releases/tag/v4.0.0)
3. [Release 4.0.1. 2007](https://github.com/gambit/gambit/releases/tag/v4.0.1)
4. [Release 4.1.0. 2007](https://github.com/gambit/gambit/releases/tag/v4.1.0)
5. [Release 4.1.1. 2007](https://github.com/gambit/gambit/releases/tag/v4.1.1)
6. [Release 4.1.2. 2007](https://github.com/gambit/gambit/releases/tag/v4.1.2)
7. [Release 4.2.0. 2008](https://github.com/gambit/gambit/releases/tag/v4.2.0)
8. [Release 4.2.1. 2008](https://github.com/gambit/gambit/releases/tag/v4.2.1)
9. [Release 4.2.2. 2008](https://github.com/gambit/gambit/releases/tag/v4.2.2)
10. [Release 4.2.3. 2008](https://github.com/gambit/gambit/releases/tag/v4.2.3)
11. [Release 4.2.4. 2008](https://github.com/gambit/gambit/releases/tag/v4.2.4)
12. [Release 4.2.5. 2008](https://github.com/gambit/gambit/releases/tag/v4.2.5)
13. [Release 4.2.6. 2008](https://github.com/gambit/gambit/releases/tag/v4.2.6)
14. [Release 4.2.7. 2008](https://github.com/gambit/gambit/releases/tag/v4.2.7)
15. [Release 4.2.8. 2008](https://github.com/gambit/gambit/releases/tag/v4.2.8)
16. [Release 4.2.9. 2008](https://github.com/gambit/gambit/releases/tag/v4.2.9)
17. [Release 4.3.0. 2008](https://github.com/gambit/gambit/releases/tag/v4.3.0)
18. [Release 4.3.1. 2008](https://github.com/gambit/gambit/releases/tag/v4.3.1)
19. [Release 4.3.2. 2008](https://github.com/gambit/gambit/releases/tag/v4.3.2)
20. [Release 4.4.0. 2008](https://github.com/gambit/gambit/releases/tag/v4.4.0)
21. [Release 4.4.1. 2009](https://github.com/gambit/gambit/releases/tag/v4.4.1)
22. [Release 4.4.2. 2009](https://github.com/gambit/gambit/releases/tag/v4.4.2)
23. [Release 4.4.3. 2009](https://github.com/gambit/gambit/releases/tag/v4.4.3)
24. [Release 4.4.4. 2009](https://github.com/gambit/gambit/releases/tag/v4.4.4)
25. [Release 4.5.0. 2009](https://github.com/gambit/gambit/releases/tag/v4.5.0)
26. [Release 4.5.1. 2009](https://github.com/gambit/gambit/releases/tag/v4.5.1)
27. [Release 4.5.2. 2009](https://github.com/gambit/gambit/releases/tag/v4.5.2)
28. [Release 4.5.3. 2009](https://github.com/gambit/gambit/releases/tag/v4.5.3)
29. [Release 4.6.0. 2010](https://github.com/gambit/gambit/releases/tag/v4.6.0)
30. [Release 4.6.1. 2011](https://github.com/gambit/gambit/releases/tag/v4.6.1)
31. [Release 4.6.2. 2011](https://github.com/gambit/gambit/releases/tag/v4.6.2)
32. [Release 4.6.3. 2012](https://github.com/gambit/gambit/releases/tag/v4.6.3)
33. [Release 4.6.4. 2012](https://github.com/gambit/gambit/releases/tag/v4.6.4)
34. [Release 4.6.5. 2012](https://github.com/gambit/gambit/releases/tag/v4.6.5)
35. [Release 4.6.6. 2012](https://github.com/gambit/gambit/releases/tag/v4.6.6)
36. [Release 4.6.7. 2013](https://github.com/gambit/gambit/releases/tag/v4.6.7)
37. [Release 4.6.8. 2013](https://github.com/gambit/gambit/releases/tag/v4.6.8)
38. [Release 4.6.9. 2013](https://github.com/gambit/gambit/releases/tag/v4.6.9)
39. [Release 4.7.0. 2013](https://github.com/gambit/gambit/releases/tag/v4.7.0)
40. [Release 4.7.3. 2014](https://github.com/gambit/gambit/releases/tag/v4.7.3)
41. [Release 4.7.4. 2015](https://github.com/gambit/gambit/releases/tag/v4.7.4)
42. [Release 4.7.5. 2015](https://github.com/gambit/gambit/releases/tag/v4.7.5)
43. [Release 4.7.6. 2015](https://github.com/gambit/gambit/releases/tag/v4.7.6)
44. [Release 4.7.7. 2015](https://github.com/gambit/gambit/releases/tag/v4.7.7)
45. [Release 4.7.8. 2015](https://github.com/gambit/gambit/releases/tag/v4.7.8)
46. [Release 4.7.9. 2015](https://github.com/gambit/gambit/releases/tag/v4.7.9)
47. [Release 4.8.0. 2015](https://github.com/gambit/gambit/releases/tag/v4.8.0)
48. [Release 4.8.1. 2015](https://github.com/gambit/gambit/releases/tag/v4.8.1)
49. [Release 4.8.2. 2015](https://github.com/gambit/gambit/releases/tag/v4.8.2)
50. [Release 4.8.3. 2016](https://github.com/gambit/gambit/releases/tag/v4.8.3)