newsletters:2025-04
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
newsletters:2025-04 [2025/04/30 18:27] – [New Folk evaluator] osnr | newsletters:2025-04 [2025/05/01 01:57] (current) – osnr | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== April 2025 newsletter | + | ====== April 2025 newsletter ====== |
We've had a funding shortfall recently -- we'd really appreciate it if you [[https:// | We've had a funding shortfall recently -- we'd really appreciate it if you [[https:// | ||
- | We’ll be set up at Rhizome World on this Sunday, May 4 (at 161 Water Street in the Financial District). Feel free to say hello; we’ll also be running [[https:// | + | We’ll be setting |
If you want to stop by the studio, our next Folk open house is **[[https:// | If you want to stop by the studio, our next Folk open house is **[[https:// | ||
Line 11: | Line 11: | ||
==== Demos and applications ==== | ==== Demos and applications ==== | ||
- | * | + | * (Andrés) I gave a small talk and workshop to [[https:// |
==== General system improvements ==== | ==== General system improvements ==== | ||
- | * (Andrés) We merged | + | * (Andrés) We merged [[https:// |
* Re-activate [[https:// | * Re-activate [[https:// | ||
* {{youtube> | * {{youtube> | ||
* This also means the laser capability is back! (Side note: I love the dog getting to play with the laser here ... it makes me wonder what a Folk system specifically for entertaining / training pets could look like!) | * This also means the laser capability is back! (Side note: I love the dog getting to play with the laser here ... it makes me wonder what a Folk system specifically for entertaining / training pets could look like!) | ||
* {{youtube> | * {{youtube> | ||
- | * Add `Wish $this draws text " | + | * Add '' |
* {{youtube> | * {{youtube> | ||
* Tools for creating subregions: | * Tools for creating subregions: | ||
Line 75: | Line 75: | ||
Omar: I would say work this month has been driven by three different pushes (not really separable that cleanly, but oh well): | Omar: I would say work this month has been driven by three different pushes (not really separable that cleanly, but oh well): | ||
- | 1. Continuing the performance/ | + | 1. Continuing the performance/ |
- | 2. Gadget: memory | + | 2. Run folk2 on my gadget: it quickly leaks memory |
- | 3. Fix calibrate on folk2 (given the changes | + | 3. Fix calibrate |
I feel pretty good about folk2 right now. Beyond fixing the memory leak, a lot of the remaining work is functionality work, honestly, where we need to get calibration and the editor running again under the new regime (as well as camera slices, animation, other smaller modules). I've been putting that off because I really want to fix the memory leaks... | I feel pretty good about folk2 right now. Beyond fixing the memory leak, a lot of the remaining work is functionality work, honestly, where we need to get calibration and the editor running again under the new regime (as well as camera slices, animation, other smaller modules). I've been putting that off because I really want to fix the memory leaks... | ||
Line 87: | Line 87: | ||
I've spent a lot of this month working on the [[newsletters/ | I've spent a lot of this month working on the [[newsletters/ | ||
- | I added support for drawing text and images and AprilTags on the textures, which was hard to debug, so I added a /images endpoint that shows all textures in memory (including placeholder image 0, font atlases, page textures, projected calibration board texture, other images): | + | Weird design choice for now: I got rid of the implicit parameter that passes screen resolution into every shader/ |
+ | |||
+ | == /images debug page == | ||
+ | |||
+ | I added support for drawing text and images and AprilTags on the textures, which was hard to debug, so I added a [[https:// | ||
{{newsletters: | {{newsletters: | ||
- | == Destructors == | + | The ability to get 'the stuff projected onto this page' as an image feels really cool and useful in itself, like Folk is now a compositor like Wayland or macOS Quartz and it has internal semantically useful knowledge of what all the layers are. I think we could have some cool applications for this gpu->cpu image transfer capability, like compositing the rendered page graphics on top of a livestream of the camera, or or printing what's projected on a page. |
+ | |||
+ | (most writable image textures are square 1024x1024 by default, and then we just resample them when we project them onto the display, which is why they' | ||
+ | |||
+ | == Destructors | ||
+ | To cleanly do GPU texture destruction when a page is flipped over, I added support for // | ||
- | To cleanly do texture destruction when a page is flipped over, I added support for per-statement destructors: | + | I also use this to clean up camera images now, which feels really nice: |
+ | {{: | ||
- | I also use this to clean up camera images now, which feels really nice (instead of just timing out camera images after some fixed period of time): | + | (instead of just timing out camera images after some fixed period of time, or doing it on match unmatch which is unsafe since it doesn' |
+ | This involved some changes to statement acquisition behavior and some new constructs: | ||
+ | * When a When matches a statement, the statement is now acquired for the duration of the When block' | ||
+ | * But Query!, which returns a static set of result statements, **does not acquire any of those statements.** **So the destructor of any statement in the result set may run at any time once Query! has returned.** So it'd be unsafe to access a camera image that you got from Query! without explicitly acquiring the owning statement first to make sure it sticks around (and that it's still around). | ||
+ | * So ForEach! has been added for both ergonomic and safety reasons: ForEach! is like Query!, but you pass it a code block as last arg; it iterates and binds each result statement and runs the code block. In other words, it's like a mix of Query! (imperative semantics, doesn' | ||
+ | * < | ||
+ | set omarAdjs [list] | ||
+ | ForEach! Omar is /adj/ { | ||
+ | lappend omarAdjs $adj | ||
+ | } | ||
+ | puts "Omar is all of these: $omarAdjs" | ||
+ | </ | ||
+ | * (Andrés and Mason helped to name this one -- I suspect we'll be using it a lot) | ||
+ | * Manual StatementAcquire! and StatementRelease! have also been added if you want to use those with Query! (some of your queried statements may be invalid, though, and you'd have to ignore/toss those) | ||
== Bilinear interpolation == | == Bilinear interpolation == | ||
Line 113: | Line 136: | ||
=== Memory leak === | === Memory leak === | ||
+ | |||
+ | Because I've been trying to run folk2 on the (RAM-constrained) gadget, I've been really wanting to fix the memory leaks in it. It's been tough. My hypothesis (from seeing Jim allocations get out of control and from manually inspecting the heap) is that it's mostly little Jim Tcl heap objects (Jim_Objs, mostly). But hard to trace causation beyond that point so far. | ||
< | < | ||
Line 118: | Line 143: | ||
- Address Sanitizer (new this month) | - Address Sanitizer (new this month) | ||
+ | - (This has been really useful for finding more serious bugs, too -- I found some use-after-frees and stuff like that) | ||
- {{newsletters: | - {{newsletters: | ||
- pprof (libtcmalloc) heap profiler | - pprof (libtcmalloc) heap profiler | ||
Line 132: | Line 158: | ||
</ | </ | ||
+ | |||
+ | It's getting kind of ridiculous how many different execution modes we have for folk2: | ||
+ | |||
+ | {{: | ||
+ | |||
+ | (it is a lot easier to do all this in folk2 than in folk1, though, because folk2 is all one big process and most of its kernel is statically compiled) | ||
=== Disabling cache === | === Disabling cache === | ||
Line 158: | Line 190: | ||
For now, I guess we'll try to merge folk2 without even the cache, just string reparsing every block, and then later see if some of these other approaches can be revived and can help further. | For now, I guess we'll try to merge folk2 without even the cache, just string reparsing every block, and then later see if some of these other approaches can be revived and can help further. | ||
- | |||
- | ==== Outreach and other systems ==== | ||
- | |||
- | * TODO: Discord updates | ||
=== Open house === | === Open house === | ||
Line 168: | Line 196: | ||
* {{newsletters: | * {{newsletters: | ||
* {{newsletters: | * {{newsletters: | ||
- | |||
=== aci-d club visit === | === aci-d club visit === | ||
Line 184: | Line 211: | ||
=== Other visitors and interactions === | === Other visitors and interactions === | ||
- | * Andrés went to Christina Huang' | + | * (Andrés) I went to Christina Huang' |
- | * TODO (Andrés): | + | |
===== What we'll be up to in May ===== | ===== What we'll be up to in May ===== | ||
Line 214: | Line 240: | ||
==== Andrés ==== | ==== Andrés ==== | ||
- | * Vox graphics | + | * I've been reading about " |
+ | * I also really like NYU's Institute of Fine Arts' video [[https:// | ||
+ | * Fascinating paper on [[https:// | ||
+ | ]] — basically making small compliant mechanism machines using scoring and folding | ||
+ | * [[https:// | ||
+ | * [[https:// |
newsletters/2025-04.1746037647.txt.gz · Last modified: 2025/04/30 18:27 by osnr