<commit_before><commit_msg>Simple Chat App. Just to see how Go routines and channels work<commit_after>package main

import (
	"fmt"
)

/* 
	A program that will chat with you until you enter X.
	Demostrates the use of go routines
*/


func server (ch chan string, msg string) {
	fmt.Println("Message Entered", msg)
	ch <- "Hello " +msg
}

func client(ch chan string){
	serverMsg := <-ch
	fmt.Println("Messsage from Server ", serverMsg)
}

func main(){
	var ch chan string  = make(chan string)
	var input string
	fmt.Println("Say Hi to the Chat Server. X will exit the Program")
	for i:=0;;i++ {
		fmt.Scanln(&input)
		if input=="X" { break}
		go server(ch, input)
		go client(ch)
	}



}


{'fraction_non_alphanumeric': 0.11901306240928883, 'fraction_numerical': 0.001451378809869376, 'mean_word_length': 3.6621621621621623, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, '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': '7074969', 'n_tokens_mistral': 257, 'n_tokens_neox': 236, 'n_words': 88}