TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Show HN: FFI Between Gambit Scheme and CPython

2 点作者 belmarca超过 2 年前
Hi HN,<p>Pr. Marc Feeley and I have just released a new module for Gambit. The &#x27;python&#x27; module is available at <a href="https:&#x2F;&#x2F;github.com&#x2F;gambit&#x2F;python" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;gambit&#x2F;python</a>. It is a Foreign Function Interface (FFI) to CPython which combines a low-level API with a syntactic interface that allows Gambit users to interface with Python code. The module also offers a Foreign Procedure Call mechanism that bridges the CPython and Gambit threading models.<p>For example, it is now possible for Gambit users to import Python modules as such:<p>&gt; \import math<p>&gt; (cos \math.pi)<p>-1.<p>This module requires a recent Gambit version compiled with the &#x27;--enable-multiple-threaded-vms&#x27; option. The GitHub repo contains a short README with instructions as well as a few examples to get you started. We will be giving a talk about our work at the upcoming Scheme Workshop (<a href="https:&#x2F;&#x2F;icfp22.sigplan.org&#x2F;details&#x2F;scheme-2022-papers&#x2F;7&#x2F;An-FFI-between-Gambit-Scheme-and-CPython" rel="nofollow">https:&#x2F;&#x2F;icfp22.sigplan.org&#x2F;details&#x2F;scheme-2022-papers&#x2F;7&#x2F;An-F...</a>). You can get a preprint of the accompanying article at <a href="https:&#x2F;&#x2F;andykeep.com&#x2F;SchemeWorkshop2022&#x2F;scheme2022-final22.pdf" rel="nofollow">https:&#x2F;&#x2F;andykeep.com&#x2F;SchemeWorkshop2022&#x2F;scheme2022-final22.p...</a> .<p>We had fun developing this and while there are still a few known kinks, the software is generally quite stable and enjoyable. Please notify us of any problems, or just to showcase your work!<p>Cheers!

2 条评论

belmarca超过 2 年前
I mentioned this upcoming work in a comment last week. Here it is :) Any comments appreciated!
mustermannBB超过 2 年前
Very nice. Congrats. This looks interesting.