Inspiration
Obesity is a rampant problem in America. Approximately forty percent of adults in the United States are obese, according to the National Center for Health Statistics (2015-2016). As students at Carnegie Mellon, we are all too aware of the sedentary lifestyle of the average college student - with unhealthy dining options and difficult courseloads leaving little to no time to exercise. We wanted to go beyond simply creating a fitness app that would interest consumers for a few days - we wanted to appeal to the culture of Carnegie Mellon to instill a brand new lifestyle.
What it does
Runtime is a simple, lightweight programming language that is designed for real-life support - upon reading a particular movement of the programmer, it interprets it to Runtime commands. There are seven supported gestures for Runtime commands, all corresponding to particular physical exercises - those being lunges, toe-touching, squats, turning around, torso twists, jumping jacks, and backwards stretches. This format means that not only does the programmer become healthier by programming in Runtime, but can simultaneously do so while being productive.
A .run (Runtime) file has the following commands in it:
Lunge forward [x] time(s) Turn around Do [x] jumping jack(s) Squat [x] time(s) Touch your toes Stretch your back Twist right [x] time(s)
How we built it
Runtime uses an Arduino with MPU6050 3-axis accelerator-gyroscope combo sensor in order to detect the specific exercises that the user is carrying out, which then interfaces with a computer (carried on the user's person) to compile down to an intermediary state. A translation program implemented in Python then translates to Runtime, which consists of the commands as stated above.
These are then run through the Runtime interpreter. Some have had concerns with the safety of a programming language that entails physical movement - citing hazards such as streets and walls. We understand such potential for risk, so in order to neutralize this, we implemented the Runtime interpreter in the safest language that we know - Standard ML.
Combined together, these programs allow the programmer to quickly (and safely) remain efficient, while being healthy. Due to the dual nature of Runtime programs as exercise routines and salient computer programs, one could imagine programming tutorials that take the form of workout videos.
Additionally, Runtime is Turing-complete (which is left as an exercise to the reviewer). As such, it loses no computing power as compared to other mainstream languages, which we feel makes a compelling case for Carnegie Mellon students to adopt Runtime as their language of choice - not only as a language, but as a lifestyle.
Challenges we ran into
A particular challenge was the sensors - given that we only had access to an accelerator and gyroscope, there was a limited amount of movements that we could recognize. Another was how to appropriately theme the language - all the commands correspond to particular stretches and aerobic exercises, in order to properly promote the feel that the programmer is actually exercising.
Accomplishments that we're proud of
We are particularly proud of the potential social good that Runtime can achieve. No longer will programmers be confined to their desks, working menially on producing the same repetitive code patterns - instead, that repetitiveness can be put to good use, as it is a common practice in workout routines for particular routines to be done for a certain number of reps - meaning that Runtime has good temporal locality with respect to workout inputs.
Making an app is something transient - and for that matter, cookie-cutter. Everyone follows the same mold in a hackathon - we wanted to diverge from the standard pattern. Create an app, and someone will use it for a little while - create a programming language, and you can change a fundamental part of someone's life.
What we learned
In this project, we learned how to make use of hardware and software. In addition, we learned a lot about the obesity problem in America, as well as physical exercises and routines to maintain fitness. Implementing a project in Standard ML was also a nice challenge, as previous classes taught the language, but never for the purposes of implementing something like a hackathon project.
What's next for Runtime
We aim to make Runtime more versatile, adding more techniques and exercises. We would like there to be more options for flavor text / commands, such as certain commands that stand for the same thing.
Log in or sign up for Devpost to join the conversation.