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·قبل شهرين·1 comments

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

github.com
4 points·by amazing42·قبل 3 أشهر·0 comments

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

github.com
85 points·by amazing42·قبل 4 سنوات·44 comments

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

github.com
20 points·by amazing42·قبل 4 سنوات·3 comments

comments

amazing42
·قبل شهرين·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 سنوات·discuss
Thanks for bringing this up. Now you can use cmake find_package with it.
amazing42
·قبل 4 سنوات·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 سنوات·discuss
Yeah, that is super cool feature of compiler explorer compared to other online compiler.
amazing42
·قبل 4 سنوات·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 سنوات·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 سنوات·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 سنوات·discuss
Yeah. That is supported.
amazing42
·قبل 4 سنوات·discuss
Thanks for your comment!