diff options
| -rw-r--r-- | README.md | 6 | ||||
| -rw-r--r-- | folk.tcl | 41 | ||||
| -rw-r--r-- | pi.tcl | 29 |
3 files changed, 57 insertions, 19 deletions
@@ -19,3 +19,9 @@ $ /opt/homebrew/Cellar/tcl-tk/8.6*/bin/tclsh folk.tcl - make as solid / permanent a mount as you can. you shouldn't be scared of it falling and you shouldn't have to take it apart and put it back together every time + +## stuff +- implement generators +- implement even-better fake lexical scope +- share (axiom) statements from laptop -> Pi +- mmap or otherwise hw-accelerate pi graphics @@ -1,7 +1,3 @@ -# a When Trace has -# - childWhenTraces -# - statements - proc Claim {args} { # TODO: get the caller instead of `someone` dict set ::statements [list someone claims {*}$args] true @@ -100,6 +96,10 @@ socket -server accept 4273 # With all /matches/ # To know when +set ::alwaysCbs [list] +proc Always {cb} { + lappend ::alwaysCbs $cb +} proc Step {cb} { # clear the statement set # TODO: support 'assumed'/'prelude' statements @@ -108,6 +108,7 @@ proc Step {cb} { set ::currentMatchStack [dict create] + foreach alwaysCb $::alwaysCbs {uplevel 1 $alwaysCb} uplevel 1 $cb # event: an incoming statement bundle @@ -122,15 +123,25 @@ proc Step {cb} { # (for now, draw all the graphics requests) } -# we probably don't need this -after 0 { Step {} } +Always { + When /rect/ is a rectangle with x /x/ y /y/ width /width/ height /height/ { + When /someone/ wishes $rect is highlighted /color/ { + # it's not really correct to just stick a side-effect in the + # When handler like this. but we did it in Realtalk, and it + # was ok, so whatever for now + Display::fillRect device $x $y [expr $x+$width] [expr $y+$height] $color + } + Wish $rect is highlighted $Display::blue + } -# on each frame { -# global fb black green + When /program/ has program code /code/ { + set this $program + eval $code + } +} -# # clear the screen -# fbFillScreen $fb $black -# } +# we probably don't need this +after 0 { Step {} } # With all matches -> clear screen, do rendering # or When unmatched -> clear that thing @@ -155,14 +166,6 @@ after 400 { Step { puts Step2 - When /rect/ is a rectangle with x /x/ y /y/ width /width/ height /height/ { - When /someone/ wishes $rect is highlighted /color/ { - # it's not really correct to just stick a side-effect in the - # When handler like this. but we did it in Realtalk, and it - # was ok, so whatever for now - Display::fillRect device $x $y [expr $x+$width] [expr $y+$height] $color - } - } Claim "rect1" is a rectangle with x 300 y 400 width 50 height 60 Wish "rect1" is highlighted $Display::green @@ -28,3 +28,32 @@ namespace eval Display { fillRect $fb 0 0 $WIDTH $HEIGHT $color } } + +if 0 { +sudo apt install git build-essential + +# TODO: clone folk + +https://forums.libretro.com/t/retroarch-raspberry-pi-4-vulkan-without-x-howto/31164 + +sudo apt install python3-pip ninja-build +sudo pip3 install meson +sudo pip3 install mako + +sudo apt install libdrm-dev +sudo apt install bison flex + +git clone -b 20.3 https://gitlab.freedesktop.org/mesa/mesa.git mesa_vulkan +cd mesa_vulkan +meson -Dplatforms= -Dglx=disabled -Dvulkan-drivers=broadcom -Dgallium-drivers=kmsro,v3d,vc4 -Dbuildtype=release build +sudo ninja -C build install +} + +if 0 { +git clone --recursive https://github.com/SaschaWillems/Vulkan.git +cd Vulkan + +mkdir build +cd build +cmake .. -DUSE_D2D_WSI=ON +} |
