Skip to content

An implementation of the esoteric language Chef in Rust. (Interpreter for Chef)

Notifications You must be signed in to change notification settings

Siphalor/chef-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

chef-rs

An implementation of the esoteric language Chef in Rust.

Language

This implementation tries to follow the specification as close as possible.

Limitations

Due to the way the parser is implemented, it is quite complicated to differentiate between a loop begin and an auxiliary recipe. That means that often auxiliary recipes need some clear delimiter above them. Choices are:

  • Using a standard Serves statement.
  • Using a non-standard break line. These are defined as three or more dashes, underscores or equal signs and mark the end of a recipe.

Takeing liquid ingredients

This implementation extends the Take syntax:

Takeing an ingredient from a refrigerator will now read a single Unicode character code if the ingredient is liquid.

Checking the refrigerator

There is a new syntax that allows you to check ahead a bit in the input buffer:

Check the refrigerator for <ingredient name>.

  • If the ingredient is dry, it will be checked if the next character in the input buffer belongs to a number. When the buffer is empty, the user will be prompted.
  • If the ingredient is liquid, if there is anything left in the input buffer. The user will not be prompted.

Depending on the outcome, the ingredient will either contain 1.0 or 0.0.

Shakeing the bowl

Shaking the bowl will spill all liquid ingredients out and let the biggest dry ingredients float up.

So, it filters out the liquids and sorts the rest from top to bottom (the biggest ingredient will be on the top).

Examineing stuff

You can Examine ingredients or mixing bowls, which will display their current status.

This is intended for debugging.

About

An implementation of the esoteric language Chef in Rust. (Interpreter for Chef)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages