Inspiration
In the realm of hackathons, where innovation and practicality often take center stage, our team decided to take a detour into the wonderfully useless. Inspired by the quirky and eccentric, we set out to create the ASM(R) Emulator, an esolang with a twist. The motivation behind our project was to inject a dose of randomness and musicality into the world of assembly language just for the sheer fun of it.
What it does
The ASM(R) Emulator is an esolang (esoteric programming language) that marches to the tick of its metronome - quite literally. The ASM(R) Emulator commands are not your run-of-the-mill assembly language instructions; instead, they are dynamically generated based on the calendar date. Picture this: a programming language where the commands change daily, taking cues from the calendar. To make things even more entertaining, each executed operation triggers a unique music note, allowing developers using this language to enjoy a novel experience of debugging through sound instead of sight.
So in essence, the ASM(R) Emulator is a celebration of the absurd and the impractical, turning the mundane task of coding into a delightful and unpredictable musical experience.
How we built it
Our journey into the whimsical world of the ASM(R) Emulator involved a fusion of creativity, programming prowess, and a healthy dose of madness. The core logic of our esolang was crafted to generate commands dynamically, leveraging the calendar date as the seed for randomness.
The frontend is created using Typescript and ReactJs, and is deployed on NextJs. NextJs also includes a backend server for us to build an endpoint for our client to call an API to interpret our code and user inputs. We also incorporated Tailwind CSS for stylings and the Tremor library for ready-made React components to streamline our user interface.
The backend calls a Python script, passing in the date, ASM(R) Emulator code and any other user inputs for processing, and outputs a JSON file, which it then reads from and returns to the client. The Python script generates a randomised bijection of the operation codes to the corresponding operation functions based on the date of program execution, then parses the code input and executes the commands based on this mapping. Each operation function executed corresponds to a musical note - this way, one can try to match the code sound generated with the sound generated by a successful execution on a different day to debug the code. Additionally, if an error is returned, an error sound is added to the end of the code sound, so the user has to try to figure out the error by sound.
Challenges we ran into
Building the ASM(R) Emulator was not without its share of challenges. From synchronising the ever-changing commands with the musical composition to ensuring the overall experience remained gloriously useless, we navigated a maze of creative roadblocks. Figuring out how to generate the randomised mapping and converting executed instructions into musical notation required a challenging level of coordination, compounded by the pressure of producing a working product within 24 hours. Additionally, it took us some time to figure out how to play musical notes on the front end, as we all needed to gain experience in JavaScript. Writing and debugging example scripts in a code intentionally designed to be unpredictable and impractical brought its hurdles. However, each challenge was a learning experience that made us appreciate the languages available better.
Accomplishments that we're proud of
Through the chaos and randomness emerged the ASM(R) Emulator, a project that not only embraced impracticality but revelled in it. We take pride in creating an esolang that defies convention, challenges the status quo, and adds a touch of musical absurdity to the coding world. The successful integration of dynamically generated commands and musical tunes is a testament to our team’s ingenuity and willingness to tread the path less taken.
What we learned
The journey of creating the ASM(R) Emulator taught us valuable lessons in thinking outside the box, embracing chaos, and finding joy in the absurd. Working on a project that intentionally defied conventional wisdom allowed us to explore unconventional solutions and cultivate a mindset that celebrates the journey as much as the destination.
What's next for ASM(R) Emulator
While the ASM(R) Emulator may be the epitome of uselessness, we believe there’s always room for more absurdity. We envision expanding the ASM(R) Emulator to include even more unpredictable features, perhaps incorporating external factors beyond the calendar date to influence the commands. Musical note durations can also incorporate greater variation to produce more interesting music. Our goal is to continue pushing the bounds of impracticality and injecting a healthy dose of nonsense into the coding world.
Built With
- nextjs
- python
Log in or sign up for Devpost to join the conversation.