HNHacker News
TopNewBestAskShowJobs

mountain_lion

22 karma · joined May 2, 2017

submissionscomments
mountain_lion··on Columbia and NYU Would Lose $327M in Tax Breaks Under Proposal
That's not how Bills of Attainder work. They are primarily about punishments without findings of guilt. Particularly, denial of civil rights without trial. Whatever the merits of this case, removing a tax break is not a criminal finding, and having an organization paying the same taxes as most others is not a denial of civil rights.

"The two main criteria that the courts use to determine whether legislation is a bill of attainder are (1) whether “specific” individuals, groups, or entities are affected by the statute, and (2) whether the legislation inflicts a “punishment” on those individuals. The U.S. Supreme Court has also identified three types of legislation that would fulfill the “punishment” prong of the test: (1) where the burden is such as has “traditionally” been found to be punitive (historical test); (2) where the type and severity of burdens imposed are the “functional equivalent” of punishment because they cannot reasonably be said to further “non-punitive legislative purposes” (functional test); and (3) where the legislative record evinces a “congressional intent to punish (motivational test).” ...

"It would appear that the identification of papers and recordings under the control of a named person (the former President) would meet the per se requirement. The Court in Nixon, however, found that the statute was constitutional despite this specificity. In Nixon, the Court found that the bill failed the second prong (punishment) of the test for a bill of attainder, since the act fulfilled the valid regulatory purpose of preserving information which was needed to prosecute Watergaterelated crimes and was of historical interest.31 As part of this analysis, however, the Court even questioned whether the statute in question met the specificity prong of the two-part test, finding that naming an individual could be “fairly and rationally understood” as designating a “legitimate class of one.”32 Thus, it has been suggested that Nixon stands for the proposition that any level of specificity is acceptable, even the naming of individuals, as long as a rational, non-punitive basis for the legislation can be established."

https://sgp.fas.org/crs/misc/R40826.pdf

Property taxes are not traditionally punishments. The type and severity of the property taxes in this case are entirely in line with taxes that most everyone else pays, and the purpose here entire furthers non-punitive legislative purposes.

Even the single class-member herewould like meet the "rational, non-punitive" test.

There are also a mountain of very carefully crafted tax breaks and subsidies designed to benefit the one particular corporation that qualifies.

I have no idea if the above proposal is a good idea or a bad one, but I would be very surprised if it qualified as a Bill of Attainder.

mountain_lion··on Swig – Connect C/C++ programs with high-level programming languages
CLIF is nice but not under public development and not really getting feature improvements. It's direct connection to LLVM is both a very big strength--it gets industrial-grade C++ parsing from a standards-compliant C++ parser--and it's biggest weakness--building and using it requires sticking with its favored version of llvm sources.

All of that works, especially for Google internally, which uses CLIF quite extensively, but that makes it not so great for external projects.

mountain_lion··on C++ Language Interface Foundation (CLIF)
#pragmas are not portable, and have various problems with compatibility.

Structured comments could work, but because the C++ compiler doesn't parse them, you essentially have a file-with-a-file, and 80% of the problems you encounter with the dual-file system.

You also have the problem of the API's client trying to understand what the API looks like. We don't want to make them read C++ code in any way, and a pyclif file looks a lot like python.

Finally, CLIF is substantially more terse than SWIG--on the order of 1/10th the number of lines. This makes it less of a big deal to have a separate file.

mountain_lion··on C++ Language Interface Foundation (CLIF)
CLIF is used inside Google for some very non-trivial projects.
mountain_lion··on C++ Language Interface Foundation (CLIF)
I was in the room when this person said it (and it was in the context of CLIF's Google-wide adoption), so I think it's reasonable that my interpretation that this was a positive statement is reasonable.

At least if you weren't in the room as well. I'm assuming you weren't?

mountain_lion··on C++ Language Interface Foundation (CLIF)
CLIF does recognize explicit template instatiations, and can instantiate a limited set itself. There is no pain like keeping the two files in sync because clif only allows a very small amount of C++ in its sources--basically just type names.

And cliff takes care to error out when the wrapper description doesn't match the C++. "When in doubt, refuse the temptation to guess."

Our internal clients really like it. Someone described it the other day as "magic".

mountain_lion··on C++ Language Interface Foundation (CLIF)
There are (roughly) two ways of using Clang as a library. The first is a via a C-based API into a libclang.so. This is an API designed to be extremely stable, is fairly powerful, and works relatively well.

That API doesn't expose absolutely everything though, which is one reason it can be so stable. Tools that need more are typically shipped and built along side the clang source code. CLIF is the latter.

You can read about both of them here:

http://clang.llvm.org/docs/Tooling.html

mountain_lion··on C++ Language Interface Foundation (CLIF)
Perhaps the best thing about CLIF is that it never, ever, parses any C++ by hand [0]. It always uses a state-of-the-art, fully-industrial-strength, well-supported compiler: Clang. And it can be updated in lockstep with Clang near trivially.

[0] Actually, there is one tiny exception: CLIF occasionally separates a C++ qualified name on the scope-resolution operator "::".

mountain_lion··on C++ Language Interface Foundation (CLIF)
CLIF is designed to support arbitrary front-end languages--and other languages are in the exploratory phases. But there is no full support for other languages at this time.
mountain_lion··on C++ Language Interface Foundation (CLIF)
It makes sense to write system APIs in C, but there are many more things than system APIs, and many of them find it useful to use C++ constructs.

(edit) Clang's internals are also several orders of magnitude easier to work with than GCC's internals. In fact, clang is designed to be used as a library, and CLIF leverages that very, very highly.

See, for example, https://clang.llvm.org/docs/ClangTools.html . Clang tools are very powerful, and much of CLIF is based on a Clang tool, not a GCC internals hack.