New note on my website:

> Lately I've been spending time learning Scheme and using it to implement the concepts I'm learning in my physics classes as time permits. One of the most exciting things I've been doing with this is getting my Scheme to compile to the Web thanks to Hoot.

https://gracefulliberty.com/notes/scheme-is-a-hoot/

#Scheme #Hoot #Guile #WASM

Scheme is a Hoot

Lately I've been spending time learning Scheme and using it to implement the concepts I'm learning in my physics classes as time permits. One of the most exciting things I've been doing with this is getting my Scheme to compile to the Web thanks to Hoot. One of the biggest challenges has been the fact that Hoot is unstable. It's currently at version 0.9.0. The documentation is decent, but it could be better. The error messages can be cryptic. But it's a massive accomplishment to see Scheme code running on the Web via WASM. It's even more incredible to know that it's running on a stack the team created themselves, not relying on Emscripten. My initial understanding of Hoot was that it could compile any Guile program to the Web. I quickly learned that I was mistaken when my code wouldn't compile. I then ported my code to use the Hoot versions of all of the functions, causing my code to be unable to run independently from Hoot. I then realized that Hoot actually supported more of Guile than I thought. I just had to manually import a lot of the stuff I previously took for granted. Now I have set up my code to run on native Guile and on WASM via Hoot, with tests automatically running in both to make sure everything's set up correctly for both environments. It's a bit of a pain, but it works now. Most of my code is agnostic to whether it's running with the system's Guile interpreter or if it's been compiled to WASM and being run in the browser. I think that's amazing. Currently, most of the work I've done has been on the backend. Working on getting this whole setup to work at all has been a hassle. I've also been working on getting the more fundamental physics logic working, which is especially difficult as a someone new to Scheme. But I've been making progress, and I've published a small prototype on a new page on my website and have published the source code. In the future I'm curious to see if it's reasonable to compile Zig + Scheme programs to the Web with Hoot. I'm starting to feel more and more that Zig + Scheme is the perfect combination and I want to do more experimentation in that direction. That may be too complicated! I don't know yet. There's a lot for me to learn in the WASM world, and that's a large part of the fun. This has been an insightful exploration into the depths of Scheme. I can't wait to do even more.

Found out about this while i was scrolling through andy windo blog, #Wastrel compiles Wasm modules to C, and thence to native code. we can compile #guilescheme #hoot code to native code.

https://codeberg.org/andywingo/wastrel

wastrel

WebAssembly-to-C compiler

Codeberg.org

Hoot 0.9.0 has been released! Time to update my project.

I'm going to like the new hoot compile --bundle command

#scheme #hoot

Finally got some of my physics code running on the Web via Hoot!

Right now it's just a barebones Lorentz transformation visualization tool. Most of the work was under the hood.

https://gracefulliberty.com/physics/

It took a lot of digging around documentation, examples, issue trackers, and source code, but I made it happen and I'm making progress on creating more physics simulations.

#Physics #Hoot #Scheme

Physics Simulations for the Web

Been working on porting my physics simulations to the Web with #WASM via #Hoot.

Something like they did here: https://spritely.institute/news/building-interactive-web-pages-with-guile-hoot.html

I've been having to thoroughly read the examples, documentation, and hit my head against the wall, but I'm making progress! Still can't seem to get canvas drawing to work though.

#Guile #Scheme #programming

Building interactive web pages with Guile Hoot — Spritely Institute

Whoa what on earth is this Scheme evaluation visualization tool named EnvDraw made in Hoot? https://jmacd.github.io/envdraw/

And apparently EnvDraw has existed since 1995 and this is a port! Here's an old mailing list post https://groups.google.com/g/comp.lang.scheme/c/AU3HKB9plKk/m/TCkArQA51rcJ

Cool as hell

#hoot #spritely

EnvDraw — Environment Diagrams

This week I revisited my #Nerdy side and installed #Gentoo on one of my beefiest #Laptop

So far it's been a #Hoot and I can feel my 20 year old inside scream with joy!

Haven't felt this alive since ca 2000!

#Linux #Distro #Oldies #HavingFun

I am hella excited to try the new #hoot release, thank you @spritely

Trying out #hoot from #spritelyinstitute which is a #guile to #wasm compiler.
If you have an external emacs like I do and still use guix package manager for guile packages.

guix install guile-goblins guile-hoot guile-next

create a file (use-modules) then
open shell,
guild compile-wasm --run <your_example.scm> file.