# scmutils-\>chez-\>Racket

**URL:** <https://racket.discourse.group/t/scmutils-chez-racket/3977>\
**Category:** Languages\
**Created:** [October 20, 2025, 11:49am UTC](https://racket.discourse.group/t/scmutils-chez-racket/3977 "2025-10-20T11:49:12Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![AlexG](https://avatars.discourse-cdn.com/v4/letter/a/ecc23a/32.png) [@AlexG](https://racket.discourse.group/u/AlexG)\
**Post date:** [October 20, 2025, 11:49am UTC](https://racket.discourse.group/t/scmutils-chez-racket/3977/1 "2025-10-20T11:49:12Z")

</div>

I see that Gerry Sussman's scmutils has finally been ported to chez

> **[GitHub - fedeinthemix/chez-scmutils: Port of the 'MIT Scmutils' library to Chez Scheme.](https://github.com/fedeinthemix/chez-scmutils)**
>
> Port of the 'MIT Scmutils' library to Chez Scheme.

In a sentence or two, could anyone let me know what would be involved in making it run as a Racket #lang, now that Racket runs off cs?

I'd like to have a stab at that soon, but any hints, guidelines, suggestions along the way very welcome.

Racket could help solve one or two remaining issues with the port, plus provide a great graphical interactive environment for it. (At the moment the authors recommend a GnuPlot interface)

Thanks!

---

<div class="post-metadata">

**Author:** ![soegaard](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/soegaard/32/19_2.png) [@soegaard](https://racket.discourse.group/u/soegaard)\
**Post date:** [October 20, 2025, 9:59pm UTC](https://racket.discourse.group/t/scmutils-chez-racket/3977/2 "2025-10-20T21:59:44Z")

</div>

Here are my first impressions:

The Chez Scheme code uses the R6RS module system.  
This is a good sign, since it is easier to port R6RS modules to Racket modules,  
than a mess of `load` and `include`.

The individual files are written in MIT Scheme, but are included in a module which import a compatibility layer. The separation seems clean in the sense that the MIT Scheme parts are in a separate repo called `chez-mit`.

> **[GitHub - fedeinthemix/chez-mit: MIT/GNU Scheme compatibility library for Chez...](https://github.com/fedeinthemix/chez-mit)**
>
> MIT/GNU Scheme compatibility library for Chez Scheme for use with 'Scmutils'.

First step in porting to Racket would be to port `chez-mit`.

The nice thing about this approach is that it will make porting other MIT Scheme programs easier.

---

<div class="post-metadata">

**Author:** ![AlexG](https://avatars.discourse-cdn.com/v4/letter/a/ecc23a/32.png) [@AlexG](https://racket.discourse.group/u/AlexG)\
**Post date:** [October 21, 2025, 5:57pm UTC](https://racket.discourse.group/t/scmutils-chez-racket/3977/3 "2025-10-21T17:57:16Z")

</div>

Thanks Jens

> The separation seems clean in the sense that the MIT Scheme parts are in a separate repo called `chez-mit`.  
> [...]  
> First step in porting to Racket would be to port `chez-mit`.

Agreed.  
So I guess I treat all the supplied chez code as R6RS under Racket. Should be interesting.

---

<div class="post-metadata">

**Author:** ![samth](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/samth/32/3_2.png) [@samth](https://racket.discourse.group/u/samth)\
**Post date:** [October 21, 2025, 5:58pm UTC](https://racket.discourse.group/t/scmutils-chez-racket/3977/4 "2025-10-21T17:58:50Z")

</div>

I think the main challenge would be the environment-manipulating code here: [chez-mit/mit/environment.sls at master · fedeinthemix/chez-mit · GitHub](https://github.com/fedeinthemix/chez-mit/blob/master/mit/environment.sls)

---

<div class="post-metadata">

**Author:** ![AlexG](https://avatars.discourse-cdn.com/v4/letter/a/ecc23a/32.png) [@AlexG](https://racket.discourse.group/u/AlexG)\
**Post date:** [October 21, 2025, 6:03pm UTC](https://racket.discourse.group/t/scmutils-chez-racket/3977/5 "2025-10-21T18:03:27Z")

</div>

Hm, yes, the goofy MIT-Scheme environments code. Bit of a throwback, isn't it?

Would there be any possibility of compiling the code under chez, since that works, allegedly 🙂 and then importing it into Racket somehow?

---

<div class="post-metadata">

**Author:** ![samth](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/samth/32/3_2.png) [@samth](https://racket.discourse.group/u/samth)\
**Post date:** [October 21, 2025, 9:01pm UTC](https://racket.discourse.group/t/scmutils-chez-racket/3977/6 "2025-10-21T21:01:35Z")

</div>

That code appears to rely on the Chez treatment of the top-level environment and is likely to only work with definitions at the REPL. I think this would likely run into problems in porting to Racket but one would have to try it out.

---

<div class="post-metadata">

**Author:** ![bdeket](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/bdeket/32/1835_2.png) [@bdeket](https://racket.discourse.group/u/bdeket)\
**Post date:** [October 22, 2025, 10:56am UTC](https://racket.discourse.group/t/scmutils-chez-racket/3977/7 "2025-10-22T10:56:26Z")

</div>

@AlexG I know you have tried out my (partial) port of scmutils. Based on the timestamps this chez-scheme version is based on code from 9y ago (instead of Susman's latest version from 2023).  
Is there anything in particular missing, unintuitive or broken in my port that you are looking for?  
[[GitHub - bdeket/rktsicm](https://github.com/bdeket/rktsicm)]

---

<div class="post-metadata">

**Author:** ![AlexG](https://avatars.discourse-cdn.com/v4/letter/a/ecc23a/32.png) [@AlexG](https://racket.discourse.group/u/AlexG)\
**Post date:** [October 29, 2025, 3:51pm UTC](https://racket.discourse.group/t/scmutils-chez-racket/3977/8 "2025-10-29T15:51:21Z")

</div>

Hey pal, No, no problem with your port, nor have I found anything missing for my needs so far. In fact I quite enjoy using it.

I guess I'm just exploring the matter further, maybe I'm asking the wrong question. Like, for instance, could a working version of MIT-Scheme be implemented in Racket with chez. 🤪  
No matter...
