Skip to content

Conversation

ProfDoof
Copy link
Owner

No description provided.

Copy link

@jasikpark jasikpark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice i don't understand at lot that's going on, especially the pong list of one character variables 🙃 but this is pretty sweet

let output_string = output.value();
let mut temp = BrainfunctProgram {
operations: Vec::with_capacity(p_string.len()),
functions: vec![usize::MAX],

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

heh?

func_index += 1;
c
}
_ => {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isn't brainfuck actually permissive in characters allowed? i suppose that's different for brainfunct 🤔

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know that it's actually different. It's just the rules I'm implementing for this interpreter. i could always just have it do nothing.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to decide whether to ignore illegal characters or error.

loop {
if current_index >= op_size {
if stack_head != -1 {
// panic!("Your call stack wasn't completely emptied even though you have reached the end of the main function");
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Get rid of vestigial comments

}
b'@' => {
if tape[tape_ptr] >= func_size {
// panic!("Undefined function {}", tape[tape_ptr])
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Get rid of vestigial comments

func_index += 1;
c
}
_ => {
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to decide whether to ignore illegal characters or error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants