May 2024 newsletter
What we've been up to
Demos
Cristóbal Sciutto has been working on a demo that uses Folk to display book covers from a digital library – under the hood, it's doing some fun new things with
calibre-server:
Vedran Budimcic has been building a Scratch-like environment in Folk. This month, he added support for multiple characters:
Vedran: I think I only need to do a few more things before I can let me kids try to break it: 1. Put the cards on something thicker like cardboard. Easier for little hands. Maybe laminate as well. 2. Consider character actions from left to right instead of order of appearance. Right now it only considers the actions on the right of the “play” pages, but doesn't consider their order.
NYU ITP Fellowship show
Small system improvements
Omar added Commit (on PAGE)
so Andrés could make 'copy program source code into tabletop editor' work properly – fixes a long-standing omission where you couldn't change Commits from outside the committing program
-
-
-
Omar did a cleanup of the repo, removing the pi/ and play/ folder (preparing for opening the repo more to the public)
Inlined hardware interface code into the virtual-programs – should make it much easier to read since all GPU stuff is in one file, all AprilTag stuff is in one file, all camera stuff is in one file, etc
Removed a lot of globals, publishing code/lambda through statements instead
-
0xNNN
or 0xNNNNNN
rgb(N,N,N)
hsl(N,N%,N%)
-
-
Omar has been working a bit on the portable gadget from last month
Got a good hand grip, working on and off on CAD for enclosure (need to fit Pi, Pi camera, threaded inserts for hand grip and projector, and be able to physically fit my hand in to assemble all of it; think I need to break it up into panels)
-
-
Omar did a tiny amount of work on RFID localization, fixing some misaligned RX/TX spacing issues – still trying to get it to reliably run for more than 1 round (not slow down over time, bail/reset properly on fail so it can continue):
CNC
folk-cnc is now working and released in a basic form. You can follow the link for installation and usage instructions. This feels like the absolute minimum useful thing, and we're looking forward to taking it further.
Omar finished porting Owen's gcode parser and tool calibration and preview logic from the original prototype. Here's how CNC tool calibration looks, where you move the machine to the 4 points and type their CNC coordinates in:
Tested it with a basic job – notice the projected preview in green vs. the actual cut in the wood:
Not perfect accuracy, but already useful & exciting.
Potential next steps:
Once 3D calibration is in, and assuming the machine is stable, you might be able to get by just specifying the material plane for each session (drag a tag) and reuse most of the existing 3D-space calibration (might also make calibration more accurate on average if you have that model already)
3D calibration
Prompted by the portable gadget and the CNC demo, Omar has been picking 3D calibration back up. We're hoping to get it merged next month in a backward-compatible way, so we don't have to port everything from 2D to 3D immediately.
It was in decent shape in December, so work on 3D calibration this month has involved a lot of small/polish tasks:
brought it back up to date with main
adding 2D compatibility in (it should be able to also do 2D calibration at the same time, if you capture some flat poses)
support for choosing display and choosing camera (so we can reinitialize the camera at higher resolution when we calibrate – 720p usually isn't enough – and so I can test on a laptop plugged into external webcam and projector)
worked on calibration UI
maybe trying to improve accuracy a little bit
performance stuff (actually very related to improving accuracy, it might be the main problem – the more latency you have, the more time the board position can drift in your hand, reducing calibration accuracy)
New parallel evaluator
Omar has been doing a lot of work on the new folk2 evaluator (as discussed in previous newsletters, aiming for much better performance, lower latency, higher reliability, something more like Erlang w/ preemptive multitasking).
Added basic support for Collect
Added support for text & labelling
Added support for images
Fixed boolean support, array rtype support with C FFI
Fixed some C/library concurrency issues, fixed incorrect locking on Holds
Fixed really weird lldb issue with C FFI? Don't really understand this
Either very clever or a terrible hack: use SIGUSR1 to interrupt arbitrary work on other threads that depends on a retracted statement
works for anything in Tcl, even infinite loops, etc. but doesn't interrupt C work (like a C infinite loop) because it depends on the Jim interpreter running its internal signal handler and checking its internal signal flag a lot (which is built-in behavior in Jim)
It's not even clear if this is desirable in all cases: what if you 'livelock' because you're doing work that takes 500ms per camera frame? the behavior you want is to let each iteration run to completion, then start the next one, not just interrupt them all the time so that none of them ever finishes
useful for code that infinite-loops (like the Collect implementation right now) so it can get automatically reaped by the evaluator when the Collect goes away
-
Added trace page (like the log we have in mainline Folk) for debugging specific leak or elision issues (why is this statement still around? why didn't this statement go through?)
In terms of functionality, it's surprisingly almost caught up to mainline Folk – the real issues are around performance and correctness
(Some of the changes in the rewrite are already paying off and got backported to mainline Folk: inlining of pi/ libraries into virtual programs, use of Vulkan built-in mode-finding for displays instead of fbset)
Friends and outreach
May open house:
A lot of playing around with Folk programs / talking to
Robert about reactivity and spreadsheets and text editing. Andrés put a program on their hat, allowing them to look at things on the table and label them “Hello”.
-
-
Forrest O. has been organizing their Folk table – it's looking really nice:
What we'll be up to in June
-
Video support?
We want to do a larger event as 3D calibration and/or the new evaluator and/or a new program count milestone come in. Watch this space
Merge 3D calibration into main and start porting decorations/apps to use it natively
Performance and correctness push on the parallel evaluator…
Try to get RFID caught up
Do another projector gadget iteration
CNC + 3D calibration?
Open up the repo? Docs for that?
s-ol working on international keyboard support; need to review and merge
Links we've enjoyed
Omar
Andrés