HNHacker News
TopNewBestAskShowJobs

amazing42

76 karma · joined August 2, 2022

submissionscomments
amazing42··on Show HN: The Name in the Bracket (a free book on naming tensor dimensions)
The book works through what happens when tensor coordinates have names the compiler can check, from reductions through autodiff and recurrences. There's a small prototype language (github.com/einlang/einlang), but the book is the main thing.
amazing42··on Show HN: Match(it): A C++17 pattern-matching library with lots of good stuffs
Thanks for bringing this up. Now you can use cmake find_package with it.
amazing42··on Show HN: Match(it): A C++17 pattern-matching library with lots of good stuffs
That is true. Hopefully, adding more static_assert to the lib can fail the compiler early and give more instructive error message.
amazing42··on Show HN: Match(it): A C++17 pattern-matching library with lots of good stuffs
Yeah, that is super cool feature of compiler explorer compared to other online compiler.
amazing42··on Show HN: Match(it): A C++17 pattern-matching library with lots of good stuffs
Actually this library (match(it)) is more similar to Racket. You can see there are lots of patterns borrowed from Racket pattern matching, say app pattern and ooo pattern.
amazing42··on Show HN: Match(it): A C++17 pattern-matching library with lots of good stuffs
Sadly lvariant did not get into C++ language. The library supports pattern matching against std::variant/std::any and class inheritance as a replacement.
amazing42··on Show HN: Match(it): A C++17 pattern-matching library with lots of good stuffs
The godbolt link is only a simple sample.

Rust does not support view pattern (called in Haskell) or app pattern (called in Racket). And that has been implemented in this library.

amazing42··on Show HN: Match(it): A C++17 pattern-matching library with lots of good stuffs
Yeah. That is supported.
amazing42··on Show HN: Mom, can we have (Haskell flavored) post-modern C++ at home?
Thanks for your comment!