back
5 comments
> Why not just use Scheme directly, what's the benefit of porting to Hoot?

Scheme is not a thing you use directly, you have to select an implementation. Hoot is one such implementation (targeting execution on WASM).

Presumably to run in the browser? Guile Scheme is great for native programs but you need Hoot to run it in a browser.
Did you click the link? https://gracefulliberty.com/physics/

They are making little web applets demonstrating the physics concepts. You obviously can't do this in pure R6RS/etc., you need to pick some implementation that either has JS/WASM FFI or something built in. Likewise if they were doing this as a desktop application, etc. Pure Scheme can model the physics and return the correct numbers, but you need something more for graphics and interactivity.

I think the second sentence of the article covers that pretty simply? To run it in the browser with wasm?

> One of the most exciting things I've been doing with this is getting my Scheme to compile to the Web thanks to Hoot.

Yes, but why? If the purpose is to run Scheme, run Scheme: why jump through Hoots oops I mean hoops.
> Yes, but why?

Most likely answer is "because that's what they wanted to do", which is a totally legit reason.

How do you run Scheme directly in the browser?
Why would anyone want to run scheme in the browser? That's what I'm trying to understand.

If the goal is to run scheme, run scheme. If the goal is to port Hoop then I get it.

Why walk in water when you can take the ferry?

A couple of reasons that come to mind:

- For the same reasons people run js server-side: single codebase in the same language; familiarity with the language; other?

- Because some people simply like scheme and want to code the frontend of webapps in scheme

- Because they want to port Goblins to the browser and Goblins already work with scheme.

> Why not just use Scheme directly, what's the benefit of porting to Hoot?

In other terms: Why not just use C directly, why use gcc?