It's time. Rockstar 2: "The Difficult Second Version"
The Build Process
Building codewithrockstar.com works like this:
build-and-test-rockstar-engine
IF THAT WORKS:
build-windows-binary
build-macos-binary
builds the macOS binary
build-and-deploy-website
In dev mode, I use symbolic directory links between the various parts of the project. Rebuilding the .NET solution will rebuild the WASM interpreter, which Jekyll can see as /wasm/**
, and trigger a site rebuild, and all the Rockstar code examples are part of both the Rockstar.Test
.NET test suite project and the codewithrockstar.com
site:
> cd codewithrockstar.com
> mklink /d wasm ..\Starship\Rockstar.Wasm\bin\Debug\net8.0-browser
> mklink /d examples ..\Starship\Rockstar.Test\programs\examples
codewithrockstar.com
/wasm --> [ /Starship/Rockstar.Wasm/bin/Debug/net8.0-browser ]
/examples --> [ /Starship/Rockstar.Test/programs/examples ]
/index.html
/example.md
/js
/rockstar-editor.js (from codemirror)
Function currying
output
function call: product
function call: sum
number: 2
number: 4
function call: sum
number: 5
number: 6
So: product(sum(2,4,sum(5,6))
needs to be translated to product(sum(2,4),sum(5,6))
based on the arity of the functions
So sum(2,4,sum(5,6))
needs to evaluate sum(2,4)
and leave the expression sum(5,6)
in the bucket
Then product(sum(2,4)