Open
Conversation
Use git rev-parse --git-path to choose the temporary ignore file for make sync/remote instead of assuming .git is a directory. Worktrees store .git as a file, so writing .git/ignores.tmp breaks remote deployment from branches checked out in a git worktree.
Move the remaining drawing primitive implementations out of the legacy display/root locations and into builtin-programs/draw. This keeps arc, curve, fill, and shape drawing alongside the rest of the new draw APIs.\n\nUpdate fill drawing to target a canvas explicitly, add has-demo-code snippets for the primitive programs, and adjust the README/demo examples to use meter-scale draw-shape values. Add focused draw primitive coverage for the moved APIs.
Add a draw-space library with vector, quad, projection, and display-length helpers for building display-space drawing demos from a page quad. Move the drawing primitives booklet entry into builtin-programs/draw/space.folk and make Wish <page> runs demo code from <program> evaluate that program's has-demo-code claim.\n\nTeach title.folk to pass drawing options through for titled, footnoted, left-margined, and right-margined text. Styled variants can now choose font, color, scale, anchor, and padding, while plain no-options wishes normalize through the same rendering path. Add demo coverage for the composite drawing demo, per-program demo execution, source-code left margins, and styled title/margin examples.
Rewrite connections.folk around quads instead of the old region helpers. Connection endpoints are resolved through quad vertices, projected into the target display, and rendered with the new draw line and fill triangle primitives.\n\nKeep the friendly shorthand wishes for static and dynamic connections while normalizing them into the explicit with from/to option form. Add regression coverage for centroid endpoints, option forwarding, display projection, and dynamic arrowhead placement.
Fix four-value text anchors so the block anchor places the whole text block and the line anchor only aligns each line inside that block. Previously the X offset subtracted the block offset again, so a left-aligned source-code block anchored on its right edge started at the margin point and spilled into the page.\n\nAdd a glyph-level regression test that draws multi-line Courier text with anchor {1.0 0.5 0.0 0.5} and checks the generated glyph instances stay to the left of the anchor point.
The live Folk machine may not have a public internet route, so fetching https://folk.computer/_media/logo.png can fail even though the URL is valid elsewhere. Bundle the small logo asset and resolve that well-known Folk media URL locally before falling back to curl.\n\nAlso harden URL downloads: preserve a useful extension for loader matching, write through a temporary file, reject empty downloads, and avoid leaving poisoned cache files behind after curl failures. Add a regression test for Wish <page> displays image "https://folk.computer/_media/logo.png".
ppkn
reviewed
May 7, 2026
| lassign $center cx cy | ||
| set points [list] | ||
| for {set i 0} {$i < $sides} {incr i} { | ||
| set theta [expr {$radians + $i * 2.0 * 3.141592653589793 / $sides - 1.5707963267948966}] |
Collaborator
There was a problem hiding this comment.
I'm slightly surprised that there's no PI (or TAU) constants. Only slightly surprised though.
Collaborator
Author
There was a problem hiding this comment.
Oh yeah, I should definitely just expose PI and Tau globals
Collaborator
|
I plan to test this out on my system today. |
ppkn
approved these changes
May 8, 2026
Collaborator
ppkn
left a comment
There was a problem hiding this comment.
This looks good. The drawSpaceLib api feels a little clunky always having to pass poselib and display. I wonder if there is a cleaner way we could do that in the future.
I wrote a small way to preview all of the drawing demos every 2 seconds so I could quickly preview them. It didn't work for shapes.folk though so I had to check that out separately.
When the clock time is /t/ {
set demos {arc circle curve dashed-line fill image line shapes space text}
set i $(int($t)/2 % [llength $demos])
set demo [lindex $demos $i]
Wish $this runs demo code from builtin-programs/draw/${demo}.folk
}
Wish $this is outlined white
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR is a little large because it touches a bunch of drawing files. We get back a suite of drawing capabilities. This PR also has an unrelated change to running
make remotewhen working out of a git worktree, happy to splice this into another PR.Some examples of running the demo code via
Wish $this runs demo code from builtin-programs/title.folk(which is a new wish added in this PR):