google / google/codeworld

Adjustable runtime Parameters

Open
#491 2 comments 0 reactions 0 assignees View on GitHub
discussion
Dominant language
Haskell
Stars
1.3k
Forks
201
PR merge metrics
No merged PRs in 30d

Description

I was working on trying to get a nice looking [fibonacci tree][1], and I had two constants
```
branchAngle = 30
splayAngle = 30
```
which I keep tweaking, but it's hard to get them right. It'd be pretty neat if I could mark them as "Parameters" or something, and have sliders for their values to adjust and see what happens in realtime, instead of recompiling all the time.

But I'm not sure how it'd look for the code. I mean, it could just be a reader monad, `(Parameters -> Picture)` kinda thing, but that seems like a massive change to the fundementals to have to write everything in monadic style now.

[1]: https://code.world/#PbBOAouMSCYKTj4rseeuyZg

Contributor guide

Open the contributing guide

Research direction

Start with the linked Fibonacci tree example and the current CodeWorld runtime and editor behavior. Determine how user-defined Parameters should be declared, exposed as sliders, and applied during realtime execution without requiring recompilation. Done means the design is agreed and a working example demonstrates adjustable values.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell
Domain
frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.