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 19:05] – [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 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: | ||
- | I got rid of the implicit parameter that passes screen resolution into every shader/ | + | 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 |
+ | |||
+ | (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 == | + | == Destructors |
To cleanly do GPU texture destruction when a page is flipped over, I added support for // | To cleanly do GPU texture destruction when a page is flipped over, I added support for // | ||
- | I 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, or doing it on match unmatch which is unsafe since it doesn' | + | (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 115: | 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 120: | 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 134: | 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 160: | 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 170: | Line 196: | ||
* {{newsletters: | * {{newsletters: | ||
* {{newsletters: | * {{newsletters: | ||
- | |||
=== aci-d club visit === | === aci-d club visit === | ||
Line 186: | 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 216: | 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.1746039922.txt.gz · Last modified: 2025/04/30 19:05 by osnr