Beluga Language is an esoteric programming language based on fundamental implementations of a turing machine. Check the commits for latest updates, as of now the language can accomodate simulation of infinite tapes for turing machines and many more features with it.
You now have the power to directly write and run turing machines!
first.beluga
machine (beluga) => {
consumes : (null)
tape : ({t0,abbb^bab^bab},{t1,abbb^bbedr^})
def: (
{q0,q1} /* finite set of states */
{a,b} /* finite set of input symbols */
{
(q0,a,q0,a,->,t0,t0), /* transition */
(q0,b,q0,b,<-,t0,t1), /* transition */
(q0,^,q1,^,->,t0,t1), /* transition */
(q1,a,q1,a,->,t1,t1), /* transition */
(q1,b,q1,b,->,t1,t1), /* transition */
(q1,^,q1,^,->,t0,t0), /* transition */
} /* finite set of transitions */
(q0) /* initial state */
(^) /* blank symbol */
(q1) /* final states */
) /* tuple of 6 entities */
ignoreUnknowns : (accept) /* ignore unknown tape symbols, basic booleans are accept (true) and reject (false) */
relay : {
onAccept: (console) /* available relays are console, null,turing Machine(pipelined) */
onReject: (null) /* available relays are console, null,turing Machine (pipelined) */
}
}
helloworld.beluga
machine (helloWorld!) => {
consumes : (null)
tape : ({outputTape,^HelloWorld!^})
def: (
{q0,exit} /* finite set of states */
{H,e,l,o,W,o,r,d,!} /* finite set of input symbols */
{
(q0,l,q0,l,->,outputTape,outputTape), /* transition */
(q0,^,q0,^,->,outputTape,outputTape), /* transition */
(q0,H,q0,H,->,outputTape,outputTape), /* transition */
(q0,e,q0,e,->,outputTape,outputTape), /* transition */
(q0,o,q0,o,->,outputTape,outputTape), /* transition */
(q0,W,q0,W,->,outputTape,outputTape), /* transition */
(q0,r,q0,r,->,outputTape,outputTape), /* transition */
(q0,d,q0,d,->,outputTape,outputTape), /* transition */
(q0,!,exit,!,->,outputTape,outputTape) /* transition */
} /* finite set of transitions */
(q0) /* initial state */
(^) /* blank symbol */
(exit) /* final states */
) /* tuple of 6 entities */
ignoreUnknowns : (accept) /* ignore unknown tape symbols, basic booleans are accept (true) and reject (false) */
relay : {
onAccept: (console) /* available relays are console, null,turing Machine(pipelined) */
onReject: (console) /* available relays are console, null,turing Machine (pipelined) */
}
}
Output
helloWorld! (Accept) :
outputTape : ^HelloWorld!^
Get the vscode extension here
The language is designed to be simple, and easy to understand. In theory , it is capable of solving any problem that can be solved by a turing machine/ digital computer. Beluga supports multi tape turing machines
1. Download the beluga exe file from here
for example if the beluga.exe lies in C:/Users/username/Desktop/src/beluga.exe then C:/Users/username/Desktop/src should be the path
Run the file as Beluga <filename.beluga>
1. Download the beluga exe file from here
The path variable for apple silicon machines generally lies in /etc/paths unless it has been set to .zshrc or .bashrc manually.
Run the file as Beluga <filename.beluga>
![image](https://private-user-images.githubusercontent.com/76046349/326255160-1cb1b5ee-3641-4127-9393-1f00cab0301a.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjU5NjMxNjcsIm5iZiI6MTcyNTk2Mjg2NywicGF0aCI6Ii83NjA0NjM0OS8zMjYyNTUxNjAtMWNiMWI1ZWUtMzY0MS00MTI3LTkzOTMtMWYwMGNhYjAzMDFhLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA5MTAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwOTEwVDEwMDc0N1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTg1YWZlZGE0YjZhMmQxZTFjNjUxMTdhMTE5MDVhNmY2NTY3YWRjMTM3OGEyNjQ1YzdiZWU1MWMzOWM1YWFkOTkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.Sza6_jtRuiFBlxi6RS25gsfZXbAZcVSOixOyGCtw6yY)