forward-to-board.ose
/#/ Where a machine goes when an unbound /away name takes it.
/#/
/#/ ./o.se -f o.se.osen/osen.ose \
/#/ /,/s/./examples/forward-to-board.ose /!/load \
/#/ '/$/away/somewhere' <the program to run over there>
/#/
/#/ Edit the address below to your board's -- it is a fact about
/#/ somebody's network, and it changes when the network does. The
/#/ board prints its own on the serial console at boot:
/#/ arduino-cli monitor -p <port> -c baudrate=115200
/#/ and if you cannot catch the boot, reset it from the OTHER USB port
/#/ while the monitor holds this one.
/#/
/#/ TWO bindings, and nothing forwards without both:
/#/ /forward/prefix the address prefix that means "send this away"
/#/ /forward where it goes, and how
/#/ osekit's handler reads the first as DATA -- an ose handler cannot be
/#/ consulted from inside a C hook, because application here is scheduled
/#/ rather than called -- and runs the second after the machine is safely
/#/ in /tv. ose_repl.c's /unbound handler
/#/ copies the five registers into /tv, clears them, and then runs this --
/#/ so using the VM to send the computation is not a paradox: it is not in
/#/ the VM any more, it is five elements in a register.
/#/
/#/ ose_udp_sendto pops the socket, then the port, then the address, and
/#/ sends whatever element is beneath them. Hence this order.
/'/>/tv
/'/,/s/10.0.0.242
/'/,/i/8889
/'/!/udp/sock/create
/'/!/udp/sendto
/!/bundle/all
/>/_x
/!/swap
/,/s//forward
/!/assign
/</_x
/#/ The prefix. Bound second so that nothing can forward while /forward is
/#/ still unbound, however this file is interrupted.
/,/s//away
/>/_x
/!/swap
/,/s//forward/prefix
/!/assign
/</_x