Using de Bruijn sequences for this purpose is very well known, I'm not claiming to have invented it, it'd be strange if I did, especially when the Wikipedia page directly references this bit trick.
But if you look closer, my algorithm is actually not de Bruijn. First, using de Bruijn with a 32-bit input requires a 32-element table, or even a 33-element one depending on the circumstances, while I make do with 16 elements (repeated twice because that's how AVX works). Second, the de Bruijn snippet multiplies the constant by `x & -x`, a number that has exactly one bit set, i.e. looks like `2^k`, so the multiplication is effectively a shift by `k`. But in my code, I have to use `~x & (x-1)` to reuse a calculation, which produces values of form `2^k - 1`, for which de Bruijn fails spectacularly: `c * (2^k - 1) = c * 2^k - c`, but this subtraction introduces carries, which affects the top 4 bits unpredictably. The magic number I found kinda sorta looks like de Bruijn, but truth be told I found it by brute-force. If anyone knows how to generate such numbers algorithmically, I'm all ears.
To be fair, the article contains 3 methods. The first one is original, the second one is the same algorithm you linked, and the third one is an evolution of it.
Not sure I agree with this pattern for strings, but if you're gonna multiply for an allocation like that and are concerned about consistent idioms, use calloc or [non-standard] mallocarray, which will check the multiplication for overflow.
After being bitten by mistakenly using int for the result of a sizeof, then overflowing the int multiplication with the count, my personal idiom is only use malloc if it's a count multiplied by a sizeof.
I just grep'ed my code base and found one counter-example, which I did on Aug 29, 2011.
California spends more money on low-income school districts than the average, and I think that's generally true most other places, especially since No Child Left behind (which for all it's problems by-and-large forced states to invest in poorer schools.)
Nationally, per student cost at Catholic parochial schools is roughly 1/2 of public schools. (Couldn't find California specific numbers, but it tracks what I've seen.) That's cost/spending; tuition is even less. Special education programs eat up 1/4-1/3 of public school budgets, so there's still a gap after accounting for that.
1973 was over 50 years ago. Even the poorest, most "backward" states have long ago largely remediated spending inequities. What you hear today to support claims of inequity are cherry-picked esoteric cases to drive outrage, just like every other topic today. In reality there's clearly much more going on than what advocates for this or that would ever admit.
That's true to an extent, but much less true of Catholic parochial schools. In fact, such schools will sometimes have a population with average income less than the local public schools. Of course most parochial schools won't have special education programs, so that's a huge filter, but as I pointed out doesn't account for the budget gap.
In any event, "picking your customers" is exactly the point of the previous poster(s). Money doesn't really explain what we're seeing. Once upon a time there was a very strong correlation, and people presumed causation, but now it's quite clear that the causation wasn't there. Certainly not directly, which is why throwing more money attheschools isn't helping.
Money can be extremely strongly correlated but if I get to kick out the bottom 20% of shitheads I can still outperform you on half the budget. Not talking income wise, talking behavior wise.
Sounds similar to charter schools in NYC. They often get better results than public schools but because they “manage out” kids with bad behavior and/or learning disabilities, in a way public schools cannot.
Some public charter schools do the exact opposite, take in the problem kids so they can be given an environment better suited to their challenges. For example, Gateway Highschool in San Francisco. And they have better outcomes for those kids. But better is relative, and they get alot of criticism from those convinced equity demands the whole student population be perfectly shuffled across all classrooms, and who argue having such options excuses the district from providing even more resources to the average classroom. Many of those same people also work to prohibit ever removing a problem child from a classroom (see recent controversy in SF, about schools secretly doing that despite city prohibitions on suspension or even class removal), arguing instead every classroom should have 2 or 3 additional instructors, as if that would magically cease the disruptions.
It's doubtful that a catholic parochial school has ever turned away a catholic student. Certainly if that happens, it must be rare. If catholic students are superior to non-catholics, through some self-selection process, how does that invalidate his point? They're not being picky intentionally. A great many admit non-catholic students, often on scholarship, those students also tend to do well.
Public schools have to take children that do not want to be there and make it everyone's problem, and their classmates suffer for it. Maybe this public school policy is the issue that should concern you.
Catholic schools turn away Catholics all the time. A good friend of mine, extremely devout Catholic, has two of his kids in Catholic school. He was told that his child with special needs couldn’t be educated there. She’s in public school (and doing great).
> It's doubtful that a catholic parochial school has ever turned away a catholic student.
I went to a catholic high school (not for the catholic part, but because it was a good school at a good price and nearby). Anyone with non-trivial behavior issues was kicked out very swiftly, so yes, they definitely turn away the inconvenient kids.
That is entirely my point. Catholic schools aren’t doing anything special they are just not keeping the problem kids. Why do you assume this doesn’t concern me?
Two kids from my child's parochial middle school were suspended for a day last week. I've seen many suspensions over the years, but never once an expulsion. One time several years ago (at another school, mind you) a half dozen families tried to force the expulsion of a kid for the frequent hitting that occurred. My child was one of the kids to get hit. But the principal pushed back extremely hard and took a ton of flak. She stood her ground, though in the end the family voluntarily changed schools.
Today in many liberal cities kids simply can't be suspended at all, period. In many other areas corporal punishment and suspensions continue to be used way too much. But actual results don't really track the way people assume they do one way or another.
What's the real difference between parochial schools and public schools? IMO it has little to do with policies or resources, but the fact that parochial schools demand parental engagement. It's often a prerequisite for admission. If the school knows the parent is engaged and working with the school, they'll often deal with behavioral problems that most public schools wouldn't or simply can't. By contrast, a friend of mine saw his entire public grammar school get shutdown by a self-identified radically progressive school board in Boston for failing to expel a kindergartner after a single incident (perpetrator, black boy; victim white girl; though really if anyone was paying attention the boy was arguably the victim, both by the ridiculous outrage, but also whatever was happening in his home life). This was at a school specifically created to mix rich white students with poor black students, and every family opted in to the experiment, and the school staff was simply following the gold-standard liberal policies the school was created for; policies which in this case were easily defensible, IMO. Its sad the way things went down, though the hypocrisy exposed was telling. People want to throw money at problems, virtue signal, and demand everybody else do something about these problems, only so long as they're not personally effected.
If the parent isn't engaged or can't be engaged, throwing more resources at the school won't help. If you want better outcomes, shift attention toward helping parents become more engaged. There are myriad ways to do that, and I really don't know what might help. But trying to fix the problem through school policies and resources isn't going to work. That avenue has been exhausted, though it still demands vigilance in maintaining appropriate resource distribution. Unfortunately, suggesting this kind of approach has categorically become a form of victim blaming--i.e. blaming parents for being poor.
I would imagine that catholic parochial schools are selecting for parents that bother to put in the effort to swap their kids from the default, free public schools to the catholic schools.
Cherry-picked? Define cherry-picked. Certainly into the 2000s if you looked at, let's take NJ, and compared the school rankings to spend per pupil you'd find an absolute correlation that ties back to property values. We'd be comparing places like Camden and New Brunswick to places like Princeton, where kids have many more programs and opportunities. I'm talking published numbers of per pupil per year $ spend.
I don't understand your criticism. That 1973, the date of the case in question, is so old that we've solved school inequality?
Maybe the rules have changed in the US, but as of early 2023 SMRs were subject to the same "Aircraft Rule" regarding their containment structures as any other commercial reactor.
The US has been energy independent for many years, now. But the bars on exporting oil and natural gas that were put in place in prior eras were lifted, so American consumers are now exposed to global pricing similar to when we were import dependent.
Are you truly energy independent if you are exporting and the corporations that profit from exporting control your government?
Plenty of famines in history where food was still being exported because the people suffering and the people profiting from exports weren't the same people.
This led to the famous observation that democracy prevents famines. So I guess the question is to what degree the US is a democracy.
It doesn't follow logically at all. The origins of judicial immunity have distinct historical roots, just as Congressional speech & debate immunity has distinct roots.
There's an argument it might effect prosecutorial immunity, presuming someone was a stickler about consistency, but it's tough to say because the justifications are arguably based on a poor historical understanding of how prosecutors took up cases. (Historically prosecutors, even criminal prosecutors, were often private individuals paid by the local government to prosecute a case, or even prosecute a case entirely on their own volition. But today many jurists just assume the prosecutor has always and only been a distinct executive office, which if they're well read enough--but not too well read--might think sometimes had some quirks about who filled the office.)
What version is your compiler? As of GCC 14 and clang 15 an implicit pointer conversion to int is an error, not merely a warning; and this is without specifying any special conformance or warning modes. I think implicit int conversions have been a constraint violation since at least C99, requiring a diagnostic, though I'm not sure if the switch to an error instead of a warning was prompted by a change in wording in C23 or just a general change in attitude and less concern with failing on pre-existing (but wrong) code.
This was GCC 11. I did try clang 15 and got an error (whereas 14 did not), but my point was that the language spec itself allows this, regardless of any specific compiler, and the original argument (as I understood it) was about the type safety of C and C++ (the language specs) themselves.
I'm not very familiar with the C++ standard, but I don't think the C++ standard requires compilation to fail, either. It has similar language to the C standard. Per C++23 4.1.1p2.3,
> Otherwise, if a program contains a violation of any diagnosable rule or an occurrence of a construct described in this document as “conditionally-supported” when the implementation does not support that construct, a conforming implementation shall issue at least one diagnostic message.
The C++ standard does seem to explicitly require the compiler to reject translation units with a failed static_assert. (The requirements for #error are a little confusing; not sure if a failed #error in a conditional block requires failure.) But I couldn't find a rule that mandates failure for invalid implicit int conversions. Implicit pointer to int conversions are invalid for the same reasons in both C and C++. Basically, AFAICT C++'s type safety in this regard is a matter of historical compiler behavior, and now the major C compilers are adopting that behavior, which they previously had allowed (with a mandatory diagnostic message) for backward compatibility reasons.
The debate began with the First Congress, but largely petered out in the early 1800s and didn't really pick up again until the rise of the regulatory state in the early 1900s.
There are newer law review articles but none quite so comprehensive and earnest as Cass R. Sunstein & Lawrence Lessig, "The President and the Administration," 94 Columbia Law Review 1 (1994), https://chicagounbound.uchicago.edu/journal_articles/7779/
That's the same Lawrence Lessig who fought (and lost) copyright extension. 1994 is long before tribal politics became as pervasive and extreme in academia as it is today (not that it didn't exist back then). The paper pulls its punches and assumes unitary executive proponents are arguing in good faith, rather than rationalizing a foregone conclusion.
Thank you for the link. I will certainly give it a read but I'm sure the HN thread will be long dead by the time I read and absorb it.
My main beef with the tenor of this whole thread in general is people do not seem aware of the historical rises and falls in executive power. For example, perhaps they did not call it a "unitary executive" then, but the executive power surely reached its zenith under FDR, with all sorts of behaviors and actions we would regard now with boggled eyes and before which even Trump's more radical actions tend to pale. [Perhaps most applicable to this thread, FDR openly wielded the power of the 'independent' FCC to silence his opposition, to the point where NBC and CBS felt compelled to announce they "would not air any broadcast that was in any way critical of any policy of the Administration.".] Everything worked out OK.
Ironically, of course, that's also the guy who was probably most responsible for the explosion of the size of the administrative state - he really, in a meaningful sense, refounded American government. And while there was good and obvious reasons for the immense expansion of the administrative state, and I'm open to legal reasons either way, I'm becoming increasingly convinced that there's really good social reasons to not have "independent" agencies - I suspect more direct democratic input (the President does X) nets out better in terms of social trust and cohesiveness even when it makes often much dumber decisions.
The unitary executive approach is pretty extreme. In one recent opinion before they pulled the trigger, Roberts court admitted that they could have reigned in the excesses that followed Humphrey's Executor, implicitly admitting its fundamental reasoning was well grounded. That was quite an admission because Roberts had been championing the unitary executive since the 80s.
In fact, few legal scholars dispute that the executive power is unitary, though they might disagree on the implications. As Humphrey's explained in detail, the issue is about areas of the government where the executive nominally overseas work that has a congressional or judicial character. For example, administrative judges and Federal prosecutors exercise a kind of judicial power. And the whole Federal Reserve exception SCOTUS quickly formally carved out is because the Fed exercises a kind of congressional budgetary power.
Humphrey's said that when an agency or officer is exercising a non-executive power, Congress can limit the president's control over how it can be exercised, including reasonable limits on the president's ability to fire the officer.
Ignoring unitary executive proponents like Thomas who choose to ignore the ambiguous intentions of the constitutional drafters, or the early history of the first congresses actually limiting some executive power over officers, people like Roberts primarily argue that Humphrey emphasis on the character of the power is just too difficult for the courts to police; they want a brightline distinction defined by whether the office is nominally under the executive branch, even though that approach is in tension with the actual, if equivocal, original meaning of the constitution. But not too brightline, because letting the president control the Fed was a bridge too far. So they created that exception which clearly is rooted in the same logic as Humphrey's, but they (ironically) pretend it's just something they pulled out of thin air as a one-off.
Legal systems typically use non-monotonic logic. Most formal logic systems, particularly in mathematical fields, use monotonic logic. Monotonic logic isn't well suited for the law or most other areas of human activity.
If you want an entire legal system formally defined in logic, you're going to have to do a ton of novel work in expanding the understanding of and application of non-monotonic logic because there isn't much scholarship compared to monotonic logic systems.
That said, France is one of the only countries that has tried anything like this. Their tax system is required to be defined and expressed algorithmically, and they even built a programming language and compiler tool chain to do this. I think it uses monotonic logic, though, and I don't think anybody has seriously suggested the French tax code is something to be copied, neither as a tax code nor an approach to legal codification more generally.
> Their tax system is required to be defined and expressed algorithmically, and they even built a programming language and compiler tool chain to do this.
A large Greek minority? Please share your sources for that because I'd be very interested in reading that.
AFAIU, Greeks were there, but as traders who came because it was a prosperous kingdom. For the same reason other groups from around that region also had a presence, and vice-versa. Prosperous nations tend to exchange populations and build economic, cultural, and political ties.
But if you're implying the presence of Greeks or an adoption of Greek culture was the reason for the rise of the Aksum empire... I'd certainly like to read those sources.
The very early adoption of Christianity might have had something to do with it, at least in terms of creating a unifying identity within and among the broader region. But Greeks weren't the only Christians. Ethiopia already had ties to non-Greek Levante and non-Greek Arabian peninsula communities, and probably Persian traders, as well--Persians were the Greeks of the Indian Ocean. Not coincidentally, the Horn of Africa sits at the nexus of multiple major economic spheres and sea routes. The Aksum Empire originated in the highlands, but for much of their time they controlled or had a strong presence along the coast.
They had coinage with Greek writing in some periods, as I mentioned, which implies that Greeks must have had a very large influence on Aksum. It was only centuries later that they switched to non-Greek, native writing, possibly around the decline of Aksum.
> The Periplus of the Erythraean Sea mentions that the Aksumite state imported brass (Ancient Greek: ὀρείχαλκος, oreíkhalkos), "which they use[d] for ornaments and for cutting as money", and they imported "a little money (denarion) for [use by] foreigners who live there."
reply