<commit_before>module Main (main) where
import Control.Concurrent (threadDelay)
import qualified Ros.Std_msgs.String as S
import Ros.Node
import Ros.RosTypes

genMsg = do threadDelay 3000000
            return s
    where s = S.String "hi, guy"

publish = Stream genMsg publish

handle (Stream m ms) = putStrLn ("roskell got "++S._data m) >> handle ms

main = runNode "/roskell" $ do advertiseIO "/MyMessage" publish
                               chat <- subscribe "/chat"
                               runHandler (handle chat)
             --runNode "/roskell" (advertiseIO "/MyMessage" publish)<commit_msg>Made the RosHask1 example progam's output change over time.<commit_after>module Main (main) where
import Control.Concurrent (threadDelay)
import qualified Ros.Std_msgs.String as S
import Ros.Node
import Ros.RosTypes

wait n = threadDelay (1000000 * n)

publish = go 1
    where go n = Stream (wait 3 >> return (S.String (show n ++ " HA HA HA")))
                        (go (n+1))

handle (Stream m ms) = putStrLn ("roskell got "++S._data m) >> handle ms

main = runNode "/roskell" $ do advertiseIO "/MyMessage" publish
                               chat <- subscribe "/chat"
                               runHandler (handle chat)
{'fraction_non_alphanumeric': 0.09742351046698873, 'fraction_numerical': 0.014492753623188406, 'mean_word_length': 2.3961748633879782, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, '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': '3048422', 'n_tokens_mistral': 377, 'n_tokens_neox': 350, 'n_words': 130}