User Tools

Site Tools


newsletters:2025-12

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
newsletters:2025-12 [2026/01/17 15:24] – [Editor refactor] osnrnewsletters:2025-12 [2026/01/17 23:48] (current) – [folk2 launch party] osnr
Line 45: Line 45:
 === Vulkan memory allocation === === Vulkan memory allocation ===
  
-As we tested the system before the party, we noticed huge amounts of blinking when you had a bunch of camera slices / animation out.+As we tested the system before the party, we noticed huge amounts of blinking when you had a bunch of camera slices / animation / sprites out.
  
 {{newsletters:img_7263.mp4?250px}} {{newsletters:img_7263.mp4?250px}}
  
-And the blinking got worse and worse over time. I profiled the system and saw that we would be spending tens of milliseconds on GPU memory allocation of new textures for the camera slices / animations.+And the blinking got worse and worse over time. I profiled the system and saw that we would be spending milliseconds up to tens of milliseconds on each GPU memory allocation of new texture for the camera slices / animations / sprites. See how long the gpu/textures.folk:669 blocks take here:
  
-(which is a form of workload that Folk really struggles with; we can cope with a long-running task, and we can do lots of short tasks, but lots of medium-length tasks is really hard for us. The blinking is a symptom of underlying slowdown / bottleneck in the evaluator, where we're missing deadlines to respond to things because we're spending too much compute time elsewhere)+{{newsletters:image-alloc.png?500px}}  
 + 
 +{{.:pasted:20260117-231138.png?500px}} 
 + 
 +(this is a form of workload that Folk really struggles with; we can cope with a long-running task, and we can do lots of short tasks, but lots of medium-length tasks is really hard for us. The blinking is a symptom of underlying slowdown / bottleneck in the evaluator, where we're missing deadlines to respond to things because we're spending too much compute time elsewhere)
  
 Well, memory allocation shouldn't take that long. The problem was that I had hand-rolled the memory allocation, which you're really not supposed to do. Vulkan doesn't defragment or anything, so your allocation performance just gets worse and worse over time if you're making lots of little allocations (it's fragmented, has to walk to find new areas, whatever). Well, memory allocation shouldn't take that long. The problem was that I had hand-rolled the memory allocation, which you're really not supposed to do. Vulkan doesn't defragment or anything, so your allocation performance just gets worse and worse over time if you're making lots of little allocations (it's fragmented, has to walk to find new areas, whatever).
Line 135: Line 139:
  
 Whenever I got the editor freeze bug, I'd see that that Hold! block was executing, and most of the statements from the block were in the database, but one was missing & would never show up as a result to any queries (so we'd be lacking a ''max cursor x'' or ''view dimensions'' or ''cursor position'' statement, which meant the editor Whens wouldn't fire, breaking the editor). Whenever I got the editor freeze bug, I'd see that that Hold! block was executing, and most of the statements from the block were in the database, but one was missing & would never show up as a result to any queries (so we'd be lacking a ''max cursor x'' or ''view dimensions'' or ''cursor position'' statement, which meant the editor Whens wouldn't fire, breaking the editor).
 +
 +I walked the database trie by hand and confirmed that the ''has max cursor x'' statement wasn't there at all (there's no ''max'' branch under ''has''):
 +
 +{{.:pasted:20260117-231251.png?580px}}
  
 This made me feel that there was some really bad race in the evaluator (this behavior violates what I would think of as core Folk invariants), so I did more digging. This made me feel that there was some really bad race in the evaluator (this behavior violates what I would think of as core Folk invariants), so I did more digging.
Line 170: Line 178:
 ==== Editor refactor ==== ==== Editor refactor ====
  
-Mason did a big [[https://github.com/FolkComputer/folk/pull/240|editor refactor]] that removes traces of the old "code view" terminology, cleans up the state, and makes the line numbers render more cleanly. Scroll also works better (retains more context)+Mason did a big [[https://github.com/FolkComputer/folk/pull/240|editor refactor]] that removes traces of the old "code view" terminology, cleans up the state, and makes the line numbers render more cleanly (no more snapping around when you go from 1-digit to 2-digit line numbers + dynamic left margin so the line numbers don't take up a tiny or huge amount of space on extreme zoom). Scroll also works better (retains more context).
  
-This mostly came out of us trying to fix a bug where the scroll viewport was weirdly small on editor reboot (due to some race in the old way we were doing state).+This mostly came out of a bug where the scroll viewport was weirdly small on editor reboot (due to some race in the old way we were doing state). The refactor fixes this bug
  
 {{newsletters:img_7668.mp4?400px}} {{newsletters:img_7668.mp4?400px}}
 +
 +Some other funny line number situations we saw (and fixed) while doing the refactor:
 +
 +{{.:pasted:20260117-232906.jpeg?300px}} {{newsletters:img_7924.jpeg?300px}}
 +
 +Now the editor feels pretty solid and comfortable across zooms, restarts, etc.
 ==== Folk for DnD ==== ==== Folk for DnD ====
  
Line 186: Line 200:
 {{.:pasted:20260105-142658.png?450px}} {{.:pasted:20260105-142658.png?450px}}
  
 +The branch works okay in small tests, but slows down the system a lot when I run the whole thing. 
 === Richer captures === === Richer captures ===
  
Line 204: Line 219:
  
 I want to clean it up and do some more stuff (maybe texture the quads with the camera slices of each quad). It'd be cool for this to be a livestream UI with these 'computational objects' in the stream for all viewers to interact with. I want to clean it up and do some more stuff (maybe texture the quads with the camera slices of each quad). It'd be cool for this to be a livestream UI with these 'computational objects' in the stream for all viewers to interact with.
 +
 +==== New gadget1 ====
 +
 +Omar: I printed a new (pink!) gadget1 to bring to China. This one uses top/bottom threading for the front panel so we don't need space-eating wells to screw the front panel into.
 +
 +{{.:pasted:20260117-232319.jpeg?250px}}
 +
 +It also now has a bottom hole for the trigger button, so we can do trigger button stuff on the gadget1 as well. And it supports dual Pi cameras to mount and to stick through front panel.
 +
 +{{.:pasted:20260117-231800.png?300px}}
 +
 +New (left) and old (right):
 +
 +{{newsletters:img_8057.jpeg?250px}}
 +
 +I've just been doing each one by hand, but it feels like we now have a number of implicit variants:
 +
 +  * Battery (gadget2) vs. no-battery (gadget1)
 +  * Orange Pi (gadget2) vs. Raspberry Pi (gadget1)
 +    * retail AnyBeam (gadget2) vs. Ultimems devkit (gadget1)
 +      * (the retail AnyBeam requires USB-C video in, so needs the Orange Pi)
 +      * (it is somewhat more stable to mount the devkit because it has multiple threaded holes underneath, though)
 +  * ELP stereo camera (gadget2) vs. dual Raspberry Pi cameras (gadget1)
 +
 +It would be nice to be able to mix and match these attributes.
 +
 +I haven't yet updated the repo with this info or with the new CAD model, but I also figured out the pins to plug the trigger button into on the gadget1's Raspberry Pi (as opposed to the gadget2's Orange Pi).
 +
 +{{.:pasted:20260117-231948.jpeg?300px}}
 +
 +See how it changes output when I press the trigger button:
 +
 +{{.:pasted:20260117-231935.png?500px}}
 +
  
 ==== Experimental tcl interpreter update ==== ==== Experimental tcl interpreter update ====
Line 223: Line 272:
 === folk2 launch party === === folk2 launch party ===
  
-We had a [[https://partiful.com/e/Y5L66oPibgDt4PcRQptx|launch party for folk2]] on Friday, Dec 12. It was very fun. [[https://github.com/brianshl007|Brian Lee]] helped out, and Daniel came in from Utah to help out as well. Was a good way to bring people in who hadn't seen Folk in a while, announce nonprofit and folk2 updates, and force ourselves to make progress on public-facing niceties in the Folk system. (We probably made a couple months' worth of progress on little nits in the week before the party.)+We had a [[https://partiful.com/e/Y5L66oPibgDt4PcRQptx|launch party for folk2]] on Friday, Dec 12. It was very fun. [[https://github.com/brianshl007|Brian Lee]] helped out, and Daniel came in from Utah to help out as well. 
 + 
 +{{newsletters:img_7318.jpeg?0x300px}} {{newsletters:img_7322.jpeg?0x300px}} 
 + 
 +{{newsletters:img_7261.mp4}} 
 + 
 +Was a good way to bring people in who hadn't seen Folk in a while, announce nonprofit and folk2 updates, and force ourselves to make progress on public-facing niceties in the Folk system. (We probably made a couple months' worth of progress on little nits in the week before the party.)
  
 Omar made some programs to do the merge live on stage: Omar made some programs to do the merge live on stage:
Line 239: Line 294:
 {{newsletters:board.jpeg?400px}} {{newsletters:board.jpeg?400px}}
  
-Omar and Andrés gave a short talk about their work on folk2 and the hopes they have for the future of the project. Afterward Daniel talked about the non-profit and funding this work:+Omar and Andrés gave a short talk about their work on folk2 and the hopes they have for the future of the project. We had a /camera livestream of a table (via the Folk Web sevrer) projected on the screen, to show the actual merge and to show what people were doing with the system: 
 + 
 +{{newsletters:img_7327.jpeg?300px}} 
 + 
 +Afterward Daniel talked about the non-profit and funding this work:
  
-{{newsletters:daniel_speech.jpeg?400px}}+{{newsletters:daniel_speech.jpeg?0x300}} {{newsletters:img_7366.jpeg?0x300}}
  
 === Folk gadgets at SVA === === Folk gadgets at SVA ===
newsletters/2025-12.1768663487.txt.gz · Last modified: by osnr

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki