<commit_before>package main

import (
	"fmt"
	"io/ioutil"
	"os"
)

func brainfuck(src string) []uint8 {
	tape := []uint8{0}
	tapeIndex := 0

	srcLength := len(src)

	for srcIndex := 0; srcIndex < srcLength; srcIndex++ {

		switch src[srcIndex] {
		case '>':
			tapeIndex += 1
			if len(tape) <= tapeIndex {
				tape = append(tape, 0)
			}

		case '<':
			if tapeIndex > 0 {
				tapeIndex -= 1
			}

		case '+':
			tape[tapeIndex] += 1

		case '-':
			tape[tapeIndex] -= 1

		case '.':
			fmt.Print(string(tape[tapeIndex]))

		case ',':
			b := make([]byte, 1)
			os.Stdin.Read(b)
			tape[tapeIndex] = b[0]

		case '[':
			if tape[tapeIndex] == 0 {
				depth := 1
				for depth > 0 {
					srcIndex++
					srcCharacter := string(src[srcIndex])
					if srcCharacter == "[" {
						depth++
					} else if srcCharacter == "]" {
						depth--
					}
				}
			}

		case ']':
			depth := 1
			for depth > 0 {
				srcIndex--
				srcCharacter := string(src[srcIndex])
				if srcCharacter == "[" {
					depth--
				} else if srcCharacter == "]" {
					depth++
				}
			}
			srcIndex--
		}
	}

	return tape<commit_msg>more runes<commit_after>package main

import (
	"fmt"
	"io/ioutil"
	"os"
)

func brainfuck(src string) []uint8 {
	tape := []uint8{0}
	tapeIndex := 0

	srcLength := len(src)

	for srcIndex := 0; srcIndex < srcLength; srcIndex++ {

		switch src[srcIndex] {
		case '>':
			tapeIndex += 1
			if len(tape) <= tapeIndex {
				tape = append(tape, 0)
			}

		case '<':
			if tapeIndex > 0 {
				tapeIndex -= 1
			}

		case '+':
			tape[tapeIndex] += 1

		case '-':
			tape[tapeIndex] -= 1

		case '.':
			fmt.Print(string(tape[tapeIndex]))

		case ',':
			b := make([]byte, 1)
			os.Stdin.Read(b)
			tape[tapeIndex] = b[0]

		case '[':
			if tape[tapeIndex] == 0 {
				depth := 1
				for depth > 0 {
					srcIndex++
					srcCharacter := src[srcIndex]
					if srcCharacter == '[' {
						depth++
					} else if srcCharacter == ']' {
						depth--
					}
				}
			}

		case ']':
			depth := 1
			for depth > 0 {
				srcIndex--
				srcCharacter := src[srcIndex]
				if srcCharacter == '[' {
					depth--
				} else if srcCharacter == ']' {
					depth++
				}
			}
			srcIndex--
		}
	}

	return tape
{'fraction_non_alphanumeric': 0.17327861377108983, 'fraction_numerical': 0.016415868673050615, 'mean_word_length': 2.1342857142857143, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1471052', 'n_tokens_mistral': 1133, 'n_tokens_neox': 854, 'n_words': 184}