Show HN: Buttercoin (YC S13) US Bitcoin Marketplace – Free Trading Through Dec
buttercoin.com69 pointsby revcbh44 comments
data Point = Point { x :: Float, y :: Float }
deriving(Generic)
data Shape =
Circle { center :: Point, radius :: Float }
| Rectangle { topLeft :: Point, bottomRight :: Point }
deriving(Generic)
In C# you could similarly define class Point {
public float _x, _y;
public Point(float x, float y) {
_x = x;
_y = y;
}
}
interface Shape {}
class Circle {
public Point _center;
public float _radius;
public Circle(Point center, float radius) {
_center = center
_radius = radius
}
}
// etc, for Rectangle ...
Let's start from the C# end of things. Let's say we want to do some tests on random Shapes and that we want to get an instance of a random shape by calling Generate.random<Shape>(). There are a couple of different ways to do this. We could explicitly define a RandomShapeFactory and a RandomPointFactory and then wire those up into the Generate class. Maybe we could use reflection to dynamically generate instances of Points and Shapes from their definitions at runtime. It would probably end up looking like some combination of the two.
That repo was the initial open source attempt at a better trade engine in node. It suffered from too-many-cooks syndrome after being started as an announce-first project. There was no clear direction, some people wanted it to be a distributed market, etc. After a couple of months, we thought it would be best to start from scratch with a small team on a focused implementation in Scala. That's available at http://github.com/buttercoin/engine.
The other contentious point was bitcoins that were donated. We posted a couple of times over the course of the year that anyone who had donated should get in touch with us to have their coins returned as the original project looked dead. Nobody contacted us, so we decided the best course of action was to simply return the coins to the address they came from. That irritated a couple of people, but I still think it was the right thing to do, especially as the person who had originally collected donations had left and there was no clear governance setup for their use.
The original impetus for the project was to create a more robust and secure way for people to access bitcoin liquidity. Specifically in the US, since that's where people seemed to be having the hardest time getting money in and out of other platforms. In that respect we've succeeding. We're also still committed to open sourcing as much as we can and will continue to expand the buttercoin/engine repo.