HackerTrans
TopNewTrendsCommentsPastAskShowJobs

amazing42

no profile record

Submissions

Show HN: The Name in the Bracket (a free book on naming tensor dimensions)

einlang.github.io
2 points·by amazing42·2 mesi fa·1 comments

Show HN: Einlang, a math-intuitive language with lots of good stuff

github.com
4 points·by amazing42·3 mesi fa·0 comments

Show HN: Match(it): A C++17 pattern-matching library with lots of good stuffs

github.com
85 points·by amazing42·4 anni fa·44 comments

Show HN: Mom, can we have (Haskell flavored) post-modern C++ at home?

github.com
20 points·by amazing42·4 anni fa·3 comments

comments

amazing42
·2 mesi fa·discuss
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
·4 anni fa·discuss
Thanks for bringing this up. Now you can use cmake find_package with it.
amazing42
·4 anni fa·discuss
That is true. Hopefully, adding more static_assert to the lib can fail the compiler early and give more instructive error message.
amazing42
·4 anni fa·discuss
Yeah, that is super cool feature of compiler explorer compared to other online compiler.
amazing42
·4 anni fa·discuss
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
·4 anni fa·discuss
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
·4 anni fa·discuss
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
·4 anni fa·discuss
Yeah. That is supported.
amazing42
·4 anni fa·discuss
Thanks for your comment!