gurgeous
Joined 18 years ago
Joined 18 years ago
https://www.linkedin.com/feed/update/urn:li:activity:7374472...
Disclaimer: I've enjoyed many delicious meals at Rand's table
The knife is amazing and exactly as shown in the video. Rand Fishkin has a nice short on LinkedIn trying out the knife too. I think he shows one his (sharp) kitchen knives slicing through a lemon, then the Ultrasonic. It's astounding.
Disclaimer: I am a (tiny) angel investor in Seattle Ultrasonics.
Anyway, I ended up with a hack like this, which works fine but didn't feel great.
def some_method(arg)
@_memo_wise[__method__].tap { _1.clear if _1.length > 100 }
...
end
memo_wise :some_methodTableTennis is a new gem for printing stylish tables in your terminal. We've used ad-hoc versions of this in our data projects for years, and I decided to bite the bullet and release it as a proper gem.
- auto-theme to pick light or dark based on your terminal background - auto-layout to fit your terminal window - auto-format floats and dates - auto-color numeric columns - titles, row numbers, zebra stripes...
By far the hardest part is detecting the terminal background color so we can pick light vs dark theme for the table. This requires putting the console into raw mode and sending some magic queries. These queries are widely supported but not universal. There are some great libraries for doing this in Go & Rust, but as far as I know nothing like it exists for Ruby. Check out the long comment at the bottom of this helper if you are curious:
https://github.com/gurgeous/table_tennis/blob/main/lib/table...
As always, feedback, feature requests and contributions are welcome.