exchange
Finance and crypto
order book
SHOW HN2020
How HN took it
1 positive, 10 neutral or asking, 2 mixed, 2 critical, out of 15 comments about the project. Thread score -0.02.
Idea: 1 for, 0 againstDesign: 0 for, 1 againstPerformance: 0 for, 1 against
The thread, comment by comment
Each row is a top-level comment and its replies, in HN's order. Select a cell to open that comment on HN.
positive neutral or mixed critical about another commenter or something else the maker
What HN said
What people liked
Readable code.
From 1 comment
I don’t do Rust but that was nicely readable. One comment: using Enums for stock symbols presumably forces a recompile on each new symbol. What would be the idiomatic…
asplake on HN
Interesting project for learning Rust.
From 2 comments
Great stuff! Since we're working on things like that on the daily, you have inspired me to do something like that in elixir :)
aloukissas on HNThey aren't that unusual on an absolute basis but relative to the number of orders in a stock they are quite rare (iirc - it's been a while since I was directly involved in…
seanhunter on HN
Objections
Storing full order struct in book is wasteful.
From 1 comment
If this is intended as anything more than a toy, you don't want to store the full OpenLimitOrder in the book data structure. The symbol should be allocated once on the book. The…
Misdicorl on HN
Vec is a poor choice versus a B-tree for price levels.
From 2 comments
Why use a Vec instead of a B-Tree?
evdubs on HNWhy a B-tree if it's supposed to be in-memory? A heap would be easier to implement and more efficient.
globular-toast on HN
Requests
Explain how Vec vs B-tree choice was made.
From 1 comment
Why use a Vec instead of a B-Tree?
evdubs on HN
Feed real market data to test performance.
From 1 comment
Are you planning to hook your order book up to a data feed like, for example, binance[1] to see how your book performs? [1]…
evdubs on HN
Questions
Why use UUIDs instead of user and order ids?
From 1 comment
Also, why use Uuids instead of a pair of user_id: u64, order_id: u64?
evdubs on HN
How would enums for stock symbols work in Rust?
From 1 comment
I don’t do Rust but that was nicely readable. One comment: using Enums for stock symbols presumably forces a recompile on each new symbol. What would be the idiomatic…
asplake on HN
Alternatives named
BTreeMap from Rust std library.
From 1 comment
Rust provides a built in B-tree[1] and it offers this over a binary search tree to avoid pointer chasing. With respect to heaps, are you thinking that a BinaryHeap[2] could be…
evdubs on HN
once_cell Lazy instead of lazy_static.
From 1 comment
Instead of lazy static, use once_cell’s Lazy type[0]! It is a replacement that does away with the macro-based approach, possible thanks to improvements in const fn. This leads to…
roblabla on HN