Surprise! We've been running on hardware provided by BuyVM for a few months and wanted to show them a little appreciation.
Running a paste site comes with unique challenges, ones that aren't always obvious and hard to control. As such, BuyVM offered us a home where we could worry less about the hosting side of things and focus on maintaining a clean and useful service! Go check them out and show them some love!
Submitted on October 1, 2018 at 01:12 AM

New Paste 1 (Crystal)

def distance_between(obj1, obj2)
  a = obj1.x - obj2.x
  b = obj1.y - obj2.y
  Math.hypot(a, b)
end

struct Vector2
  property x = 0
  property y = 0

  def initialize(@x : Int32, @y : Int32)
  end
end

a = Vector2.new(100, 100)
b = Vector2.new(100, 100)

# fake game loop
loop do
  distance_between(a, b)
  sleep 0 # 100 CPU USAGE!
end

puts "Started..."