View on GitHub

uwuScript

Language implementation project for CMSI 488

uwuScript ( ́ ◕◞ε◟◕`)

uwuScript logo

Introduction (づ。◕‿‿◕。)づ

uwuScript is a cute scripting language that is designed to be fun (and possibly cringey) to use. Because of the use of adorable emoticons and keywords, you will not only feel cuter, but look cuter by the end of developing your program!❀ This language compiles to Javascript and pulls inspiration from other sugoi すごい languages such as Java’s static typing and Swift’s for-in loops. uwuScript also allows the user to more effectively convey their emotions through comments due to the various comment emoticons!

This language was born out of the need to make programming in groups more enjoyable. It makes reading code out loud in groups funny and goofy. If you don’t believe us, try reading some of the example programs out loud (including all of the uwus and owos)! Of course, the user is expected to use what we are going to call “uwu case” where all identifier names are typed in a cute fashion wherever possible.

Visit our GitHub page here: https://github.com/adamhirata/uwuScript

Features

Code Examples

Max Number


Numbwer mwax(Numbwer n, Numbwer m) uwu
	if (n > m) uwu
    	retuwn n
    owo ewse uwu
    	retuwn m
    owo
owo

function max(n, m) {
  if (n > m) {
    return n;
  } else {
    return m;
  }
}

Factorial


Numbwer factoiwal (Numbwer n) uwu
  if (n == 1)  uwu 
    retuwn 1
  owo ewse uwu
    retuwn n * factorial(n - 1)
  owo
 owo

function factorial(n) {
    if(n == 0) {
        return 1
    } else {
        return n * factorial(n - 1);
    }
}

Bubble Sort


Aww<Numbwer> bubbuwSwort(Aww<Numbwer> aww) uwu 
  Numbwer len = length(aww)
  fow i in 0...len uwu 
    fow j in 0...len uwu
      if (aww[j] > aww[j+1]) uwu
        [aww[j], aww[j+1]] = [aww[j+1], aww[j]]
      owo
    owo
  owo
  retuwn arr
owo
</pre>


function bubbleSort(arr) {
  let len = arr.length;
  for (let i = 0; i < len; i++) {
      for (let j = 0; j < len; j++) {
        if (arr[j] > arr[j + 1]) {
 	  [arr[j], arr[j+1]] = [arr[j+1], arr[j]];
        }
      }
  }
  return arr;
};
</pre>
### Nested for-in loop

fow i in 0...10 uwu
  fow j in 0...10 uwu
    pwint(i + j)
  owo
  if (i % 2 == 0) uwu
    aww[i - 1] = stwing(i)
  owo
owo

for(int i = 0; i <= 10; i++) {
  for(int j = 0; i <= 10; j++) {
    console.log(i + j);
  }
  if (i % 2 == 0) {
    aww[i-1] = i.toString()
  }
}