Skip to content
/ Sous Public

Compiler for a language combining various different paradigms with a fun, culinary twist

License

Notifications You must be signed in to change notification settings

CSaltx/Sous

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sous

Visit the Home Page

A Compiler made by people who love to cook
Created by Coby Schumitzky, Milla Penelope Markovic, Clifford Phillps, and Christina Choi

About Sous

What are the two most calming things to do? Cooking and programming. What if you could combine the two? Sous is a language that is easy to learn and easy to use. Sous is a language that is made by people who love to cook. Sous is a language that is made by people who love to program. As people from various backgrounds, we chose to develop a language that combines our passions, creating Sous—a unique programming language that infuses culinary art into computer science. Sous is intuitive, blending features like strong and static typing, object-oriented programming, and Pyth-style loops with a playful, cooking-themed syntax. This language, ever-evolving is for those who savor the art of code as much as the art of cooking, offering a flavorful twist to traditional programming.

Features

  • Variables
  • Restaurant-Style Infusion
  • Functions
  • Classes
    • Private Class Variables
    • Objects
  • Static Typing
  • Static Scoping
  • Optionals
  • Allows for Variable Immutability and Variable Mutability
  • Multiple Loops:
    • Regular For Loops (iterations)
    • Collection For Loops
    • Pyth-style for loops
    • While Loops
  • If, Else Statements
  • Error Handling with Try-Catch-Finally Blocks (see example)
    • Throw Errors with the eightysix keyword

Note: Features are tentative and likely will change/update as language develops
More features likely to be realized as development process continues

Grammar

Important: To understand the structure of our language, consult the grammar!

Examples

This section provides a side-by-side comparison of how common programming tasks are accomplished in Sous versus JavaScript. The comparison aims to highlight the syntax, features, and usability of Sous.

Sous JavaScript
serve("Hello World!"); console.log("Hello World");
// valid
ingredient title := "Head Chef";
ingredient title = "Sous Chef";
ingredient age := 86;
ingredient _yoe := 10;

// invalid
ingredient title := 40;
ingredient 4name := "john";
ingredient title = "Dishwasher"
let title = "Head Chef";
const age = 25;
for (ingredient N := 0; N < 10; ++N) {
    serve(N)
}
// format FVrXY
// V is desired var to store value, X, Y are
// predefined values where range is [X, Y), must
be defined before looping
ingredient Z := 0
ingredient T := 10
FNrZT {
    serve(N)
}
for (let N = 0; N < 10; N++) {
    console.log(N);
}

NOTE: See directory examples/ to see more examples

About

Compiler for a language combining various different paradigms with a fun, culinary twist

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published