Visual Studio Project/Item Template Parameter Logic

This post is linked from the official Microsoft documentation for MSBuild Conditions as having examples of usage. The syntax for MSBuild conditions is not exactly equivalent to the way templating $if$ statements work but it’s a close approximation. However, it seems the examples here are now obsolete or were never completely accurate to begin with. … Read more

How does Djinn work?

Djinn is a theorem prover. It seems your question is: what does theorem proving have to do with programming? Strongly typed programming has a very close relationship to logic. In particular, traditional functional languages in the ML tradition are closely related to Intuitionist Propositional Logic. The slogan is “programs are proofs, the proposition that a … Read more

AND/OR in Python? [duplicate]

As Matt Ball’s answer explains, or is “and/or”. But or doesn’t work with in the way you use it above. You have to say if “a” in someList or “á” in someList or…. Or better yet, if any(c in someList for c in (“a”, “á”, “à”, “ã”, “â”)): … That’s the answer to your question … Read more

Booleans have two possible values. Are there types that have three possible values? [duplicate]

In Python I’d do that with a wrapper object that holds one of those three values; I’d use True, False, and None. Since the implicit truthiness value of a Boolean-like object with three possible values is problematic, we’ll solve that by disallowing that entirely (raising an exception in __nonzero__(), or in Python 3, __bool__()), thus … Read more

Higher-order unification

State of the art — yes, so far as I know all algorithms more or less take the same shape as Huet’s (I follow theory of logic programming, although my expertise is tangential) provided you need full higher-order matching: subproblems such as higher-order matching (unification where one term is closed), and Dale Miller’s pattern calculus, … Read more

Why are default arguments evaluated at definition time? [duplicate]

The alternative would be quite heavyweight — storing “default argument values” in the function object as “thunks” of code to be executed over and over again every time the function is called without a specified value for that argument — and would make it much harder to get early binding (binding at def time), which … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)