sendGenome :: Handle -> Genome -> IO Genome
sendGenome sHandle g = do
  let str = strictEncode g
      gbytes = strictEncode $ B.length str
  hPutStrLn sHandle gbytes
  B.hPut sHandle str
  putStrLn $ "sent " ++ show (B.length str)
  rb <- B.hGetLine sHandle
  let rbytes = strictDecode rb
  resp <- B.hGet sHandle rbytes
  putStrLn $ "received " ++ show rbytes
  return $ strictDecode resp
sendGenome :: Handle -> Genome -> IO Genome
sendGenome sHandle g = do
  let str = strictEncode g
      gbytes = strictEncode $ B.length str
  hPutStrLn sHandle gbytes
  B.hPut sHandle str
  putStrLn $ "sent " ++ show (B.length str)
  rb <- B.hGetLine sHandle
  let rbytes = strictDecode rb
  resp <- B.hGet sHandle rbytes
  putStrLn $ "received " ++ show rbytes
  return $ strictDecode resp
sendGenome sHandle g = do
  let str = strictEncode g
      gbytes = strictEncode $ B.length str
  hPutStrLn sHandle gbytes
  B.hPut sHandle str
  putStrLn $ "sent " ++ show (B.length str)
  rb <- B.hGetLine sHandle
  let rbytes = strictDecode rb
  resp <- B.hGet sHandle rbytes
  putStrLn $ "received " ++ show rbytes
  return $ strictDecode resp