<commit_before>require 'rubygems'
require 'bud'
require 'delivery/delivery'

#randomly reorders messages, but reports success upon first send
#may delay messages up until max_delay timesteps if no other messages are sent

module DastardlyDeliveryControl
  state do
    #percentage chance of message loss, 0 to 100
    interface input, :set_max_delay, [] => [:delay]
  end
end

module DastardlyDelivery
  include DeliveryProtocol
  include DastardlyDeliveryControl

  state do
    table :max_delay, [] => [:delay]
    table :buf, [:msg, :whenbuf]
    channel :pipe_chan, [:@dst, :src, :ident] => [:payload]
    periodic :clock, 1

    scratch :send_cand, buf.schema
  end<commit_msg>removing extraneous comment<commit_after>require 'rubygems'
require 'bud'
require 'delivery/delivery'

#randomly reorders messages, but reports success upon first send
#may delay messages up until max_delay timesteps if no other messages are sent

module DastardlyDeliveryControl
  state do
    interface input, :set_max_delay, [] => [:delay]
  end
end

module DastardlyDelivery
  include DeliveryProtocol
  include DastardlyDeliveryControl

  state do
    table :max_delay, [] => [:delay]
    table :buf, [:msg, :whenbuf]
    channel :pipe_chan, [:@dst, :src, :ident] => [:payload]
    periodic :clock, 1

    scratch :send_cand, buf.schema
  end
{'fraction_non_alphanumeric': 0.09029345372460497, 'fraction_numerical': 0.004514672686230248, 'mean_word_length': 4.518672199170124, 'pattern_counts': {'":': 0, '<': 3, '<?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': '6934821', 'n_tokens_mistral': 432, 'n_tokens_neox': 421, 'n_words': 141}