Re:Show HN: Tt – a Python library/cli for Boolean expressions
by knight123 on Thursday March 23, 2017 @12:57PM
(#13941582)
It actually would not be too hard to add a separate parser for S-expressions; this would allow the existing "backend" tooling (converting to postfix, generating trees, filling tables, etc.) to be used unchanged. I actually think this would be a really powerful feature to add; thanks for the idea!
Re:Show HN: Tt – a Python library/cli for Boolean expressions
by DKordic on Friday March 24, 2017 @05:33AM
(#13947693)
I forgot to mention SMT-LIB[1] and pySMT[2]. I don't want to say their are optimal, I just think You might find it interesting.
I think it would be even better with Curryed[0] Functions. As an example ``'(f a1 a2)'' is just a Syntactic Sugar for ``'((f a1) a2)''.
Don't forget something like `help' in Python :) .
[0]: https://en.wikipedia.org/wiki/Currying
[1]: http://www.smtlib.org/
[2]: https://github.com/pysmt/pysmt
Re:Show HN: Tt – a Python library/cli for Boolean expressions
by brudgers on Thursday March 23, 2017 @02:16PM
(#13942480)
Greenspun's Tenth Rule: https://en.wikipedia.org/wiki/Greenspun%27s_tenth_rule
Example: '(iff (not (and (P 1) (P 2))) (or (not (P 1)) (not (P 2))) )