5 ms·
Beads is an excellent language I feel, but the killer feature in the works is being able to travel "back" in time
by zubairq 5y ago
Beads is an excellent language I feel, but the killer feature in the works is being able to travel "back" in time
- nicaragua 5y agoI have been using it to travel forward in time, but am currently getting a 1:1 ratio with normal time so the forward time travel is not extremely apparent yet.
- magicmouse 5y agoThere are two aspects of time travel. The fancier one is time travel debugging. To use TTD, you run a program inside another. The outer program is called the monitor, and the monitor can freeze the inner program, and rewind the time back to some point. There is an API to do this, and examples showing how you have your own debugger. When you rewind, you can truncate the history and start fresh from that point onward. This is very useful for testing. The second aspect of time control, the more simple one, is that you can jump the clock forward, and change the scaling of time at will, so that you can write tests to see if the alarm clock would ring as expected. That feature is as simple the std library functions that control the clock value and scaling. (set_clock_scale(), and set_clock()). The ability to speed up time by a factor of 10 or 100 is a great time saver for those programs that have key sections, and slowing down time to 1/20th the normal rate (slo-motion) is wonderful for debugging animations. Many languages can set the clock, but not many have time scaling; a nicety. Beads has a small standard library (compared to OSX or Java), but it has the key features you really need.
- daenz 5y agoIs this like a time-travelling debugger like rr[0]? 0. https://rr-project.org/ https://rr-project.org/
- magicmouse 5y agoBeads is a tracked mutable state language. It used the State-Action-Model pattern (see sam.js.org), and is built from the start to support time travel debugging. Unlike `rr` and its sequel `pernosco`, it is not an instruction level reversibility, but a state change stepwise reversibility, which is efficient enough to stick around and be used in production use (not just in the lab). There is a "blackbox_write' and 'blackbox_send" feature, which allows you to send session information sufficient to replay the user's session for debugging purposes. This is a very powerful feature, and one that we are seeing more and more efforts to offer, because in a world with so many computers, being able to reproduce rarely occurring, data-dependent bugs, is very important.