(Our next Folk open house is at noon on Sunday, December 15, at our studio in East Williamsburg, Brooklyn.)
/programs
design with categories; much easier to read:Omar: I've spent most of this month working on the new evaluator (folk2).
I've made a huge amount of progress; it honestly feels like I spent months stuck on blinking/flickering/ghosting bugs and then solved them all last week.
(Remember, the goal of folk2 is to have 60fps under bigger workloads, so we can use multiple tabletop editors at once & do other demanding stuff natively in the system. I think it's just important that the system feel really good and smooth, anyway. Need to be running programs in parallel, avoiding queueing, also just general evaluator optimization. Another goal is to make the system hard to crash or freeze just because one program misbehaves, as in any other operating system.)
There's still a lot of blinking under the new evaluator, but no ghosting, and I think the blinking all now emerges from genuine failures to meet timing (the label blinks out because the program region wasn't regenerated in time for the current frame).
Notice how the camera hits 60fps but the full-frame detection is only 20-30fps (this is using a 1080p image):
When (serially)
construct to replace infinite loops (statements retract properly)Performance (CPU, stack) profiling is most of what I'm up to now, trying to eliminate the blinking.
I've already fixed a lot of weird issues using flamegraph profiling and made it noticeably smoother. Like replacing rand with rand_r to fix this:
I'm surprised at how much of the flamegraphs are just threading stuff, not Tcl-bound. Maybe I'm misreading and need different graphs (the mutex time is just time when it's scheduled off the CPU, not wasted time). Here is an average worker thread:
Now working on actually using Tracy to get a full view of what's going on, which I've been curious about for years.
There are still persistent and pretty bad memory leaks on folk2, from 10MB to 200MB per second depending on how much stuff is out. I want to get to these soon after I fix the performance stuff.
Omar: Didn't have time to do much this month, but I did figure out how to make the IB program not crash in its new connection-dependent style. We now just drop samples from the radio until a PC connects and we set up a FIFO and RFID protocol parser then. (The current goal is to get IB and OOB both running and synced up to a reset signal over TCP from a PC, then stream info from IB and OOB to the PC.)
This project isn't particularly blocked on anything, thankfully – just needs more time to put IB and OOB together and implement localization and then release it.
Omar: Minor improvements:
Right now, the biggest issues with the gadget in practice are:
These are all 'minor' additions to the gadget that I want to throw into future revisions (and have ordered parts for).
I've been talking about a trigger button for a while, but been blocked by figuring out what connectors/cables to use so the handle grip with trigger button can be removable (in case you want to mount onto an arm). Realized that some commercially available camera grips just use a 2.5mm jack for a button output. This seems good. Let's use a 3.5mm audio jack (TRRS) instead. Threw that into part orders and will probably throw it into next design rev.
as for what to do with the trigger button, I'm thinking about the Super Mario Galaxy Wii remote interactions and sounds…
(I also threw a speaker into part orders.)
(And the battery system – there are a bunch of Waveshare products that can supply the needed 5V5A to power everything – I'm hoping something more hat-like will work and can be built into a future gadget case. It'll be bigger, but I'm tired of carrying around power supply, battery charger, battery module all separately, and I don't think we can easily just do USB-C anyway so the connection'll be awkward if it's an external module.)
I've been working on a new revision that uses the new off-the-shelf commercially available AnyBeam projector (you can just buy it on Amazon), so we'd actually be able to make them in quantity and give them to people. Trying to use as easy-to-get parts as possible.
The main (surprisingly big) issue is that this new AnyBeam only has a single USB-C port – no more HDMI in – which means it is incompatible with the standard Raspberry Pi 5, which can only do HDMI out.
(On the other hand, this'll be nice if we can get it to work, because it means one USB-C cable for everything, no more weird adapters and separate HDMI and power cables to fit inside the device. And it means probably more reliable power delivery to the projector through the standard USB-C cable, not running off a random USB-A port on the Pi anymore.)
So I spent a while looking at Pi alternatives.
(Both of these use Rockchip chipsets, and I have some concerns about Vulkan support on those, too..)
Anyway, I realized this week that the right thing to do might be to use the new Pi Compute Module 5 and design a new PCB carrier board for it (which would have a HDMI or MIPI-DSI to USB-C converter that could feed the projector, and proper MIPI-CSI ports for 1-2 cameras, and could fit onto a battery). Then we'd have full Pi camera and software and long-term support, plus the right outputs for the projector, plus we could probably shrink the hardware down a bit. But I'd need to learn how to do that