Skip to content

Instantly share code, notes, and snippets.

@bradland
Created June 4, 2013 23:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bradland/5710400 to your computer and use it in GitHub Desktop.
Save bradland/5710400 to your computer and use it in GitHub Desktop.
Language for working with bid data
# The only operators available would be basic arithmetic (+, -, /, *), modulo,
# and parenthesis for grouping. The variables bid, weight, and adjustment
# would be passed in to the DSL scope. Users can define and assign their own
# variables, but these would be limited to local scope within the DSL only.
# Percentage weighting
bid * (weight * 0.01)
# Percentage weighting with adjustment
(bid * (weight * 0.01)) + adjustment
# Markup weighting
weight + (weight * (bid * 0.01))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment