10 interesting stories served every morning and every evening.




1 1,184 shares, 70 trendiness

ICE Using Palantir Tool That Feeds On Medicaid Data

EFF last sum­mer asked a fed­eral judge to block the fed­eral gov­ern­ment from us­ing Med­ic­aid data to iden­tify and de­port im­mi­grants.

We also warned about the dan­ger of the Trump ad­min­is­tra­tion con­sol­i­dat­ing all of the gov­ern­men­t’s in­for­ma­tion into a sin­gle search­able, AI-driven in­ter­face with help from Palantir, a com­pany that has a shaky-at-best record on pri­vacy and hu­man rights.

Now we have the first ev­i­dence that our con­cerns have be­come re­al­ity.

Palantir is work­ing on a tool for Immigration and Customs Enforcement (ICE) that pop­u­lates a map with po­ten­tial de­por­ta­tion tar­gets, brings up a dossier on each per­son, and pro­vides a confidence score” on the per­son’s cur­rent ad­dress,” 404 Media re­ports to­day. ICE is us­ing it to find lo­ca­tions where lots of peo­ple it might de­tain could be based.”

The tool — dubbed Enhanced Leads Identification & Targeting for Enforcement (ELITE) — re­ceives peo­ples’ ad­dresses from the Department of Health and Human Services (which in­cludes Medicaid) and other sources, 404 Media re­ports based on court tes­ti­mony in Oregon by law en­force­ment agents, among other sources.

This rev­e­la­tion comes as ICE — which has gone on a sur­veil­lance tech­nol­ogy shop­ping spree — floods Minneapolis with agents, vi­o­lently run­ning roughshod over the civil rights of im­mi­grants and U. S. cit­i­zens alike; President Trump has threat­ened to use the Insurrection Act of 1807 to de­ploy mil­i­tary troops against pro­tes­tors there. Other lo­cal­i­ties are prepar­ing for the pos­si­bil­ity of sim­i­lar surges.

Different gov­ern­ment agen­cies nec­es­sar­ily col­lect in­for­ma­tion to pro­vide es­sen­tial ser­vices or col­lect taxes, but the dan­ger comes when the gov­ern­ment be­gins pool­ing that data and us­ing it for rea­sons un­re­lated to the pur­pose it was col­lected.

This kind of con­sol­i­da­tion of gov­ern­ment records pro­vides enor­mous gov­ern­ment power that can be abused. Different gov­ern­ment agen­cies nec­es­sar­ily col­lect in­for­ma­tion to pro­vide es­sen­tial ser­vices or col­lect taxes, but the dan­ger comes when the gov­ern­ment be­gins pool­ing that data and us­ing it for rea­sons un­re­lated to the pur­pose it was col­lected.

As EFF Executive Director Cindy Cohn wrote in a Mercury News op-ed last August, While couched in the be­nign lan­guage of elim­i­nat­ing gov­ern­ment data si­los,’ this plan runs roughshod over your pri­vacy and se­cu­rity. It’s a throw­back to the rightly mocked Total Information Awareness’ plans of the early 2000s that were, at least pub­licly, stopped af­ter mas­sive out­cry from the pub­lic and from key mem­bers of Congress. It’s time to cry out again.”

In ad­di­tion to the am­i­cus brief we co-au­thored chal­leng­ing ICEs grab for Medicaid data, EFF has suc­cess­fully sued over DOGE agents grab­bing per­sonal data from the U. S. Office of Personnel Management, filed an am­i­cus brief in a suit chal­leng­ing ICEs grab for tax­payer data, and sued the de­part­ments of State and Homeland Security to halt a mass sur­veil­lance pro­gram to mon­i­tor con­sti­tu­tion­ally pro­tected speech by nonci­t­i­zens law­fully pre­sent in the U.S.

But lit­i­ga­tion is­n’t enough. People need to keep rais­ing con­cerns via pub­lic dis­course and Congress should act im­me­di­ately to put brakes on this run­away train that threat­ens to crush the pri­vacy and se­cu­rity of each and every per­son in America.

...

Read the original on www.eff.org »

2 595 shares, 20 trendiness

Deutsche Telekom is throttling the internet!

Play Video: Deutsche Telekom is throt­tling the in­ter­net. Let’s do some­thing about it!

Play Video: Deutsche Telekom is throt­tling the in­ter­net. Let’s do some­thing about it!

Epicenter.works, the Society for Civil Rights, the Federation of German Consumer Organizations, and Stanford Professor Barbara van Schewick are fil­ing an of­fi­cial com­plaint with the Federal Network Agency against Deutsche Telekom’s un­fair busi­ness prac­tices.

Deutsche Telekom is cre­at­ing ar­ti­fi­cial bot­tle­necks at ac­cess points to its net­work. Financially strong ser­vices that pay Telekom get through quickly and work per­fectly. Services that can­not af­ford this are slowed down and of­ten load slowly or not at all.

This means Telekom de­cides which ser­vices we can use with­out is­sues, vi­o­lat­ing net neu­tral­ity. We are fil­ing a com­plaint with the Federal Network Agency to stop this un­fair prac­tice to­gether!

...

Read the original on netzbremse.de »

3 582 shares, 30 trendiness

tldev/posturr: A macOS app that blurs your screen when you slouch. Uses Vision framework for real-time posture detection.

A ma­cOS app that blurs your screen when you slouch.

Posturr uses your Mac’s cam­era and Apple’s Vision frame­work to mon­i­tor your pos­ture in real-time. When it de­tects that you’re slouch­ing, it pro­gres­sively blurs your screen to re­mind you to sit up straight. Maintain good pos­ture, and the blur clears in­stantly.

* Real-time pos­ture de­tec­tion - Uses Apple’s Vision frame­work for body pose and face track­ing

* Menu bar con­trols - Easy ac­cess to set­tings, cal­i­bra­tion, and sta­tus from the menu bar

* Privacy-focused - All pro­cess­ing hap­pens lo­cally on your Mac

* No ac­count re­quired - No signup, no cloud, no track­ing

brew tap tldev/​tap

brew in­stall –cask pos­turr

Download the lat­est Posturr-vX. X.X.dmg or .zip from the Releases page

Open the DMG and drag Posturr.app to your Applications folder

Launch nor­mally - no Gatekeeper warn­ings (app is signed and no­ta­rized)

Posturr re­quires cam­era ac­cess to mon­i­tor your pos­ture. When you first launch the app, ma­cOS will ask for per­mis­sion. Click OK to grant ac­cess.

If you ac­ci­den­tally de­nied per­mis­sion, you can grant it later:

Once launched, Posturr ap­pears in your menu bar with a per­son icon. The app con­tin­u­ously mon­i­tors your pos­ture and ap­plies screen blur when slouch­ing is de­tected.

* Recalibrate - Reset your base­line pos­ture (sit up straight, then click)

* Sensitivity - Adjust how sen­si­tive the slouch de­tec­tion is (Low, Medium, High, Very High)

* Dead Zone - Set the tol­er­ance be­fore blur kicks in (None, Small, Medium, Large)

* Compatibility Mode - Use pub­lic ma­cOS APIs for blur (try this if blur does­n’t ap­pear)

* Quit - Exit the ap­pli­ca­tion (or press Escape any­where)

* Position your cam­era at eye level when pos­si­ble

* Sit at a con­sis­tent dis­tance from your screen

* The app works best when your shoul­ders are vis­i­ble

Posture Analysis: Measures the ver­ti­cal dis­tance be­tween nose and shoul­ders

The screen blur uses ma­cOS’s pri­vate CoreGraphics API by de­fault for ef­fi­cient, sys­tem-level blur. If the blur does­n’t ap­pear on your sys­tem, en­able Compatibility Mode from the menu to use NSVisualEffectView in­stead.

git clone https://​github.com/​you­ruser­name/​pos­turr.git

cd pos­turr

./build.sh

The built app will be in build/​Pos­turr.app.

# Standard build

./build.sh

# Build with re­lease archive (.zip)

./build.sh –release

swiftc -O \

-framework AppKit \

-framework AVFoundation \

-framework Vision \

-framework CoreImage \

-o Posturr \

main.swift

* Detection ac­cu­racy: Works best with clear view of up­per body/​face

Write com­mands to /tmp/posturr-command. Responses ap­pear in /tmp/posturr-response.

Posturr processes all video data lo­cally on your Mac. No im­ages or data are ever sent to ex­ter­nal servers. The cam­era feed is used solely for pos­ture de­tec­tion and is never stored or trans­mit­ted.

Contributions are wel­come! Please feel free to sub­mit is­sues and pull re­quests.

* Uses pri­vate CoreGraphics API for blur, with NSVisualEffectView fall­back

* Inspired by the need for bet­ter pos­ture dur­ing long cod­ing ses­sions

...

Read the original on github.com »

4 451 shares, 19 trendiness

Yes, It’s Fascism

Until re­cently, I re­sisted us­ing the F-word to de­scribe President Trump. For one thing, there were too many el­e­ments of clas­si­cal fas­cism that did­n’t seem to fit. For an­other, the term has been overused to the point of mean­ing­less­ness, es­pe­cially by left-lean­ing types who call you a fas­cist if you op­pose abor­tion or af­fir­ma­tive ac­tion. For yet an­other, the term is hazily de­fined, even by its ad­her­ents. From the be­gin­ning, fas­cism has been an in­co­her­ent doc­trine, and even to­day schol­ars can’t agree on its de­f­i­n­i­tion. Italy’s orig­i­nal ver­sion dif­fered from Germany’s, which dif­fered from Spain’s, which dif­fered from Japan’s.

I ac­cepted President Biden’s char­ac­ter­i­za­tion of the MAGA move­ment as semi-fascist” be­cause some par­al­lels were glar­ingly ap­par­ent. Trump was def­i­nitely an au­thor­i­tar­ian, and un­ques­tion­ably a pat­ri­mo­ni­al­ist. Beyond that, though, the best de­scrip­tion seemed to be a psy­cho­log­i­cal one pro­pounded by John Bolton, Trump’s first-term na­tional se­cu­rity ad­viser: He lis­tens to Putin, he lis­tens to Xi, he lis­tens to how they talk about gov­ern­ing un­bur­dened by un­co­op­er­a­tive leg­is­la­tures, un­con­cerned with what the ju­di­ciary may do, and he thinks to him­self, Why can’t I do that? This does­n’t amount to be­ing a fas­cist, in my view, [or] hav­ing a the­ory of how you want to gov­ern. It’s just Why can’t I have the same fun they have?”

Writing a year ago, I ar­gued that Trump’s gov­ern­ing regime is a ver­sion of pat­ri­mo­ni­al­ism, in which the state is treated as the per­sonal prop­erty and fam­ily busi­ness of the leader. That is still true. But, as I also noted then, pat­ri­mo­ni­al­ism is a style of gov­ern­ing, not a for­mal ide­ol­ogy or sys­tem. It can be lay­ered atop all kinds of or­ga­ni­za­tional struc­tures, in­clud­ing not just na­tional gov­ern­ments but also ur­ban po­lit­i­cal ma­chines such as Tammany Hall, crim­i­nal gangs such as the Mafia, and even re­li­gious cults. Because its only firm prin­ci­ple is per­sonal loy­alty to the boss, it has no spe­cific agenda. Fascism, in con­trast, is ide­o­log­i­cal, ag­gres­sive, and, at least in its early stages, rev­o­lu­tion­ary. It seeks to dom­i­nate pol­i­tics, to crush re­sis­tance, and to rewrite the so­cial con­tract.

Over Trump’s past year, what orig­i­nally looked like an ef­fort to make the gov­ern­ment his per­sonal play­thing has drifted dis­tinctly to­ward doc­tri­nal and op­er­a­tional fas­cism. Trump’s ap­petite for leben­sraum, his claim of un­lim­ited power, his sup­port for the global far right, his politi­ciza­tion of the jus­tice sys­tem, his de­ploy­ment of per­for­ma­tive bru­tal­ity, his os­ten­ta­tious vi­o­la­tion of rights, his cre­ation of a na­tional para­mil­i­tary po­lice—all of those de­vel­op­ments be­speak some­thing more pur­pose­ful and sin­is­ter than run-of-the-mill greed or gang­ster­ism.

When the facts change, I change my mind. Recent events have brought Trump’s gov­ern­ing style into sharper fo­cus. Fascist best de­scribes it, and re­luc­tance to use the term has now be­come per­verse. That is not be­cause of any one or two things he and his ad­min­is­tra­tion have done but be­cause of the to­tal­ity. Fascism is not a ter­ri­tory with clearly marked bound­aries but a con­stel­la­tion of char­ac­ter­is­tics. When you view the stars to­gether, the con­stel­la­tion plainly ap­pears.

Demolition of norms. From the be­gin­ning of his first pres­i­den­tial run in 2015, Trump de­lib­er­ately crashed through every bound­ary of ci­vil­ity; he mocked Senator John McCain’s war hero­ism, mocked fel­low can­di­date Carly Fiorina’s face, seem­ingly mocked the Fox News host Megyn Kelly’s men­stru­a­tion, slurred im­mi­grants, and much more. Today he still does it, re­cently mak­ing an ob­scene ges­ture to a fac­tory worker and call­ing a jour­nal­ist piggy.” This is a fea­ture of the fas­cist gov­ern­ing style, not a bug. Fascists know that what the American Founders called the republican virtues” im­pede their po­lit­i­cal agenda, and so they glee­fully trash lib­eral pieties such as rea­son and rea­son­able­ness, ci­vil­ity and civic spirit, tol­er­a­tion and for­bear­ance. By mock­ing de­cency and say­ing the un­sayable, they open the way for what William Galston has called the dark pas­sions” of fear, re­sent­ment, and es­pe­cially dom­i­na­tion—the kind of pol­i­tics that shifts the pub­lic dis­course to ground on which lib­er­als can­not com­pete.

Glorification of vi­o­lence. Every state uses vi­o­lence to en­force its laws, but lib­eral states use it re­luc­tantly, whereas fas­cism em­braces and flaunts it. Trump thus praises a vi­o­lent mob; en­dorses tor­ture; muses fondly about punch­ing, body-slam­ming, and shoot­ing pro­test­ers and jour­nal­ists; and re­port­edly sug­gests shoot­ing pro­test­ers and mi­grants. His re­cruit­ment ads for ICE glam­or­ize mil­i­tary-style raids of homes and neigh­bor­hoods; his pro­pa­ganda takes child­ish de­light in the killing of civil­ians; and we have all seen videos of agents drag­ging peo­ple out of cars and homes—partly be­cause the gov­ern­ment films them. Like the de­mo­li­tion of civic de­cency, the val­oriza­tion of vi­o­lence is not in­ci­den­tal to fas­cism; it is part and par­cel.

Might is right. Also char­ac­ter­is­tic of fas­cism is what George Orwell called bully-worship”: the prin­ci­ple that, as Thucydides fa­mously put it, the strong do what they can and the weak suf­fer what they must.” This view came across in Trump’s no­to­ri­ous Oval Office meet­ing with Ukrainian President Volodymyr Zelensky, in which Trump showed open con­tempt for what he re­garded as Ukraine’s weak­ness; it came across ex­plic­itly, and chill­ingly, when Stephen Miller, the pres­i­den­t’s most pow­er­ful aide, told CNNs Jack Tapper: We live in a world, in the real world, that is gov­erned by strength, that is gov­erned by force, that is gov­erned by power. These are the iron laws of the world that have ex­isted since the be­gin­ning of time.” Those words, though alien to the tra­di­tions of American and Christian moral­ity, could have come from the lips of any fas­cist dic­ta­tor.

Politicized law en­force­ment. Liberals fol­low the law whether they like it or not; fas­cists, only when they like it. Nazism fea­tured a dual state,” where, at any mo­ment, the pro­tec­tions of or­di­nary law could cease to ap­ply. Trump makes no se­cret of de­spis­ing due process of law; he has de­manded count­less times that his op­po­nents be jailed (“Lock her up!” chants, with his en­dorse­ment, were a promi­nent fea­ture of his 2016 cam­paign), and he has sug­gested the Constitution’s termination” and said I don’t know” when asked if he is re­quired to up­hold it. His sin­gle most dan­ger­ous sec­ond-term in­no­va­tion is the re­pur­pos­ing of fed­eral law en­force­ment to per­se­cute his en­e­mies (and shield his friends). No prior pres­i­dent has pro­duced any­thing like Trump’s di­rect and pub­lic or­der for the Justice Department to in­ves­ti­gate two for­mer of­fi­cials, or like his bla­tantly re­tal­ia­tory pros­e­cu­tions of James Comey and Letitia James. At least 470 peo­ple, or­ga­ni­za­tions and in­sti­tu­tions have been tar­geted for ret­ri­bu­tion since Trump took of­fice—an av­er­age of more than one a day,” Reuters re­ported in November (and to­day one can add oth­ers to the list, be­gin­ning with Federal Reserve Chair Jerome Powell). Had Trump done noth­ing else, his de­mo­li­tion of in­de­pen­dent and apo­lit­i­cal law en­force­ment would still have moved the U. S. gov­ern­ment closer than ever be­fore to a fascis­tic model.

Dehumanization. Fascism draws its le­git­i­macy from its claims of de­fend­ing the peo­ple from en­e­mies who are an­i­mals, crim­i­nals, brutes. Trump char­ac­ter­izes (for in­stance) po­lit­i­cal op­po­nents as vermin” and im­mi­grants as garbage” who are poisoning the blood of our coun­try” (language straight out of the Third Reich). Vice President Vance, as a sen­a­tor, en­dorsed a book called Unhumans (a ti­tle that refers to the left). And who can for­get his false claim that Haitians abduct and eat pet cats and dogs?

Police-state tac­tics. Trump has turned ICE into a sprawl­ing para­mil­i­tary that roves the coun­try at will, searches and de­tains nonci­t­i­zens and cit­i­zens with­out war­rants, uses force os­ten­ta­tiously, op­er­ates be­hind masks, re­ceives skimpy train­ing, lies about its ac­tiv­i­ties, and has been told that it en­joys absolute im­mu­nity.” He more than dou­bled the agen­cy’s size in 2025, and its bud­get is now larger than those of all other fed­eral law-en­force­ment agen­cies com­bined, and larger than the en­tire mil­i­tary bud­gets of all but 15 coun­tries. This is go­ing to af­fect every com­mu­nity, every city,” the Cato Institute scholar David Bier re­cently ob­served. Really al­most every­one in our coun­try is go­ing to come in con­tact with this, one way or the other.” In Minneapolis and else­where, the agency has be­haved provoca­tively, some­times bru­tally, and ar­guably il­le­gally—be­hav­iors that Trump and his staff have en­cour­aged, shielded, and sent cam­era crews to pub­li­cize, per­haps in the hope of elic­it­ing vi­o­lent re­sis­tance that would jus­tify fur­ther crack­downs, a stan­dard fas­cist strat­a­gem. Homeland Security Secretary Kristi Noem’s re­cent ap­pear­ance with a sign read­ing One of ours, all of yours seemed to nod to­ward an­other fas­cist standby, col­lec­tive pun­ish­ment—as did the ad­min­is­tra­tion’s de­ci­sion to flood Minneapolis with thou­sands of of­fi­cers af­ter res­i­dents there be­gan protest­ing fed­eral tac­tics, a pri­or­i­ti­za­tion that was ex­plic­itly ret­ribu­tive.

Undermining elec­tions. Trump’s re­cent mus­ing that there should be no 2026 elec­tion may or may not have been joc­u­lar (as the White House has main­tained), but he and his MAGA sup­port­ers be­lieve they never lose an elec­tion, pe­riod. They went to great lengths to over­turn the 2020 elec­tion, as the pros­e­cu­tor Jack Smith’s in­dict­ment of Trump and sub­se­quent re­port de­tail ad nau­seam. Rigging, steal­ing, or out­right can­cel­ing elec­tions is, of course, job one for fas­cists. Although Trump is term-lim­ited, we must not ex­pect that he and his MAGA loy­al­ists will vol­un­tar­ily turn over the White House to a Democrat in 2029, re­gard­less of what the vot­ers say—and the sec­ond in­sur­rec­tion will be far bet­ter or­ga­nized than the first.

What’s pri­vate is pub­lic. Classical fas­cism re­jects the fun­da­men­tal lib­eral dis­tinc­tion be­tween the gov­ern­ment and the pri­vate sec­tor, per Mussolini’s dic­tum: No in­di­vid­u­als or groups out­side the State.” Among Trump’s most au­da­cious (if only in­ter­mit­tently suc­cess­ful) ini­tia­tives are his ef­forts to com­man­deer pri­vate en­ti­ties, in­clud­ing law firms, uni­ver­si­ties, and cor­po­ra­tions. One of his first acts as pres­i­dent last year was to brazenly defy a newly en­acted law by tak­ing the own­er­ship of TikTok into his own hands. Bolton un­der­stood this men­tal­ity when he said, He can’t tell the dif­fer­ence be­tween his own per­sonal in­ter­est and the na­tional in­ter­est, if he even un­der­stands what the na­tional in­ter­est is.”

Attacks on news me­dia. Shortly af­ter tak­ing of­fice in 2017, Trump de­nounced the news me­dia as the en­emy of the American peo­ple,” a phrase fa­mil­iar from dic­ta­tor­ships abroad. His hos­til­ity never re­lented, but in his sec­ond term, it has reached new heights. Trump has threat­ened broad­cast li­censes, abused his reg­u­la­tory au­thor­ity, ma­nip­u­lated own­er­ship deals, filed ex­or­bi­tant law­suits, played fa­vorites with jour­nal­is­tic ac­cess, searched a re­porter’s home, and vil­i­fied news out­lets and jour­nal­ists. Although Trump can­not dom­i­nate news me­dia in the United States in the way that Prime Minister Viktor Orbán has done in Hungary, he is run­ning the Orbán play­book. No other pres­i­dent, not even Richard Nixon (no friend of the me­dia), has used such bla­tantly il­lib­eral tac­tics against the press.

Territorial and mil­i­tary ag­gres­sion. One rea­son I held out against iden­ti­fy­ing Trumpism with fas­cism in his first term was Trump’s ap­par­ent lack of in­ter­est in ag­gres­sion against other states; if any­thing, he had seemed shy about us­ing force abroad. Well, that was then. In his sec­ond term, he has used mil­i­tary force promis­cu­ously. Of course, many pres­i­dents have de­ployed force, but Trump’s ex­plic­itly preda­tory use of it to grab Venezuela’s oil and his gang­ster-style threat to take Greenland from Denmark the easy way” or the hard way” were 1930s-style au­thor­i­tar­ian moves. The same goes for his con­tempt for in­ter­na­tional law, bind­ing al­liances, and transna­tional or­ga­ni­za­tions such as the European Union—all of which im­pede the state’s un­con­strained ex­er­cise of its will, a cen­tral fas­cist tenet. (Mussolini: Equally for­eign to the spirit of Fascism … are all in­ter­na­tion­al­is­tic or League su­per­struc­tures which, as his­tory shows, crum­ble to the ground when­ever the heart of na­tions is deeply stirred by sen­ti­men­tal, ide­al­is­tic or prac­ti­cal con­sid­er­a­tions.”)

Transnational reach. Like au­thor­i­tar­i­ans gen­er­ally, fas­cists love com­pany; the world is safer for them if there are more of them. In his sec­ond term, Trump has bro­ken with long-stand­ing U. S. pol­icy by di­al­ing back sup­port for hu­man rights while prais­ing and sup­port­ing au­thor­i­tar­ian pop­ulists and il­lib­eral na­tion­al­ists in Serbia, Poland, Hungary, Germany, Turkey, El Salvador, and Slovakia, among other places—and by be­ing weirdly def­er­en­tial to the strong­man Russian President Vladimir Putin. Even more strik­ing is his de facto align­ment against America’s lib­eral al­lies and their par­ties in Europe, which he holds in con­tempt.

Blood-and-soil na­tion­al­ism. A fas­cist trade­mark is its in­sis­tence that the coun­try is not just a col­lec­tion of in­di­vid­u­als but a peo­ple, a Volk: a mys­ti­cally de­fined and eth­ni­cally pure group bound to­gether by shared blood, cul­ture, and des­tiny. In keep­ing with that idea, Trump has re­pu­di­ated birthright cit­i­zen­ship, and Vance has called to redefine the mean­ing of American cit­i­zen­ship in the 21st cen­tury” so that pri­or­ity goes to Americans with longer his­tor­i­cal ties: the peo­ple whose an­ces­tors fought in the Civil War,” as he put it, or peo­ple whom oth­ers on the MAGA right call heritage Americans.” In other words, some Americans are more volk­ish than oth­ers.

White and Christian na­tion­al­ism. While Vance, Trump, and MAGA do not pro­pound an ex­plicit ide­ol­ogy of racial hi­er­ar­chy, they make no se­cret of pin­ing for a whiter, more Christian America. Trump has found many ways to com­mu­ni­cate this: for ex­am­ple, by mak­ing clear his dis­dain for shithole” coun­tries and his pref­er­ence for white Christian im­mi­grants; by point­edly ac­cept­ing white South Africans as po­lit­i­cal refugees (while clos­ing the door to most other asy­lum seek­ers); by re­nam­ing mil­i­tary bases to share the names of Confederate gen­er­als (after Congress or­dered their names re­moved); by say­ing that civil-rights laws led to whites’ be­ing very badly treated.” In his National Security Strategy, he cas­ti­gates Europe for al­low­ing im­mi­gra­tion to un­der­mine civilizational self-con­fi­dence” and pro­claims, We want Europe to re­main European,” a ral­ly­ing cry of white Christian na­tion­al­ists across the con­ti­nent. Taking his cue, the Department of Homeland Security has prop­a­gated unashamedly white-na­tion­al­ist themes, and na­tional parks and mu­se­ums have scrubbed their ex­hibits of ref­er­ences to slav­ery.

Mobs and street thugs. The use of mili­tias and mobs to ha­rass, rough up, and oth­er­wise in­tim­i­date op­po­nents is a stan­dard fas­cist strat­a­gem (the text­book ex­am­ple be­ing Hitler’s Kristallnacht pogrom in 1938). As few will need re­mind­ing, the Trump-MAGA par­al­lel is the mob and mili­tia vi­o­lence against the U. S. Capitol on January 6, 2021. Trump know­ingly laid ground­work for this op­er­a­tion, call­ing on mili­tia forces to stand back and stand by” in September 2020 and later dog-whistling Be there, will be wild!” to his sup­port­ers. His par­don of all of the Capitol at­tack­ers—more than 1,500, in­clud­ing the most vi­o­lent—only proved what we knew, which is that they had his bless­ing. While Trump has found state vi­o­lence ad­e­quate to his pur­poses so far in his sec­ond term, street vi­o­lence is self-ev­i­dently in his reper­toire.

Leader ag­gran­dize­ment. Since 2016, when he de­clared that I alone can fix it” and bragged that his sup­port­ers would re­main loyal if he shot some­one on Fifth Avenue, Trump has cul­ti­vated a per­son­al­ity cult. Although some of his ef­forts at self-ag­gran­dize­ment can seem com­i­cal (the gild­ing of the Oval Office, the re­nam­ing of the Kennedy Center, the pro­posed tri­umphal arch), he un­der­stands the cen­tral­ity of leader wor­ship in a fas­cist-style regime. In sharp con­tradis­tinc­tion to the American pres­i­den­tial tra­di­tion since George Washington, he makes no pre­tense of serv­ing the peo­ple or the Constitution. His mind­set, his sym­bol­ism, and his rhetoric all un­der­score the point he made to The New York Times this month: his own mind and moral­ity are the only lim­its on his global power. This is Fascism 101.

Alternative facts. As Orwell, Hannah Arendt, and prac­ti­cally every other scholar of au­thor­i­tar­i­an­ism have em­pha­sized, cre­at­ing a re­al­ity-dis­tor­tion field is the first thing a fascis­tic gov­ern­ment will do, the bet­ter to drive its own twisted nar­ra­tive, con­fuse the cit­i­zenry, de­mor­al­ize po­lit­i­cal op­po­nents, and jus­tify every man­ner of cor­rup­tion and abuse. While other pres­i­dents (including some good ones) have lied, none have come close to Trump’s de­ploy­ment of Russian-style mass dis­in­for­ma­tion, as I de­tail in my book The Constitution of Knowledge. From the start of his first term, Trump has made alternative facts” a hall­mark of his gov­ern­ing style, is­su­ing lies, ex­ag­ger­a­tions, and half-truths at a rate of 20 a day. Predictably, his sec­ond term has brought more of the same. Following his lead, a MAGA-fied post­mod­ern right glee­fully trashes ob­jec­tiv­ity as elit­ism and truth as a mask for power.

Politics as war. A dis­tinc­tive mark of fas­cism is its con­cep­tion of pol­i­tics, best cap­tured by Carl Schmitt, an early-20th-cen­tury German po­lit­i­cal the­o­rist whose doc­trines le­git­imized Nazism. Schmitt re­jected the Madisonian view of pol­i­tics as a so­cial ne­go­ti­a­tion in which dif­fer­ent fac­tions, in­ter­ests, and ide­ol­ogy come to agree­ment, the core idea of our Constitution. Rather, he saw pol­i­tics as a state of war be­tween en­e­mies, nei­ther of which can un­der­stand the other and both of which feel ex­is­ten­tially threat­ened—and only one of which can win. The aim of Schmittian pol­i­tics is not to share the coun­try but to dom­i­nate or de­stroy the other side. This con­cep­tion has been ev­i­dent in MAGA pol­i­tics since Michael Anton (now a Trump-administration of­fi­cial) pub­lished his fa­mous ar­ti­cle ar­gu­ing that the 2016 elec­tion was a life-and-death bat­tle to save the coun­try from the left (a Flight 93” elec­tion: charge the cock­pit or you die”). In the speech given by Stephen Miller at Charlie Kirk’s memo­r­ial ser­vice, MAGAs em­brace of Schmittian to­tal­ism found its apoth­e­o­sis: We are the storm. And our en­e­mies can­not com­pre­hend our strength, our de­ter­mi­na­tion, our re­solve, our pas­sion … You are noth­ing. You are wicked­ness.”

Governing as rev­o­lu­tion. Although born in rev­o­lu­tion, the American lib­eral tra­di­tion, es­pe­cially its con­ser­v­a­tive branch, prizes con­ti­nu­ity, sta­bil­ity, and in­cre­men­tal change guided by rea­son. Fascism, by con­trast, is not re­ac­tionary but rev­o­lu­tion­ary,” as Mussolini in­sisted. It seeks to up­root and re­place the old or­der and em­braces bold, ex­hil­a­rat­ing ac­tion un­shack­led to ra­tio­nal de­lib­er­a­tion. MAGA em­braces its own rev­o­lu­tion­ary ethos, what Russell Vought, the ad­min­is­tra­tion’s Office of Management and Budget di­rec­tor and prob­a­bly its most for­mi­da­ble in­tel­lect, has called radical con­sti­tu­tion­al­ism,” a doc­trine that would vi­ti­ate many checks on pres­i­den­tial power. In pur­suit of this vi­sion, Vought told Tucker Carlson in a November 2024 in­ter­view, The pres­i­dent has to move ex­ec­u­tively as fast and as ag­gres­sively as pos­si­ble, with a rad­i­cal con­sti­tu­tional per­spec­tive, to be able to dis­man­tle that [federal] bu­reau­cracy and their power cen­ters” be­cause the bu­reau­cra­cies hate the American peo­ple.” He pre­dicted, If you have a rad­i­cal con­sti­tu­tion­al­ism, it’s go­ing to be desta­bi­liz­ing … But it’s also ex­hil­a­rat­ing.” He said he would put fed­eral agen­cies in trauma,” an idea echoed by Christopher Rufo, an ar­chi­tect of Trump’s at­tack on uni­ver­si­ties, which Rufo de­scribed as a counterrevolution blue­print” to put uni­ver­si­ties in an ex­is­ten­tial ter­ror.” As Trump shut­tered a con­gres­sion­ally man­dated agency, re­named an in­ter­na­tional body of wa­ter, ar­rested an op-ed writer, de­ported im­mi­grants to a for­eign gu­lag, ter­ror­ized American cities, threat­ened an ally, and more, he showed how it looks when a rad­i­cal­ized state aban­dons ra­tio­nal de­lib­er­a­tion and goes to war against it­self.

One can ob­ject that there are el­e­ments of clas­si­cal European fas­cism that are not found in Trumpism (mass ral­lies and pub­lic rit­u­als, for ex­am­ple)—or that there are ad­di­tional el­e­ments of Trumpism that be­long on the list (MAGAs hy­per­mas­culin­ity, misog­yny, and co-op­tion of Christianity all re­sem­ble fas­cist pat­terns). The ex­er­cise of com­par­ing fas­cis­m’s var­i­ous forms is not pre­cise. If his­to­ri­ans ob­ject that Trump is not a copy of Mussolini or Hitler or Franco, the re­ply is yes—but so what? Trump is build­ing some­thing new on old prin­ci­ples. He is show­ing us in real time what 21st-century American fas­cism looks like.

If, how­ever, Trump is a fas­cist pres­i­dent, that does not mean that America is a fas­cist coun­try. The courts, the states, and the me­dia re­main in­de­pen­dent of him, and his ef­forts to brow­beat them will likely fail. He may lose his grip on Congress in November. He has not suc­ceeded in mold­ing pub­lic opin­ion, ex­cept against him­self. He has out­run the man­date of his vot­ers, his coali­tion is frac­tur­ing, and he has ne­glected tools that al­low pres­i­dents to make en­dur­ing change. He and his party may defy the Constitution, but they can­not rewrite it, thank good­ness.

Read: How to tell if your pres­i­dent is a dic­ta­tor

So the United States, once the world’s ex­em­plary lib­eral democ­racy, is now a hy­brid state com­bin­ing a fas­cist leader and a lib­eral Constitution; but no, it has not fallen to fas­cism. And it will not.

In which case, is there any point in call­ing Trump a fas­cist, even if true? Doesn’t that alien­ate his vot­ers? Wouldn’t it be bet­ter just to de­scribe his ac­tions with­out la­bel­ing him con­tro­ver­sially?

Until re­cently, I thought so. No longer. The re­sem­blances are too many and too strong to deny. Americans who sup­port lib­eral democ­racy need to rec­og­nize what we’re deal­ing with in or­der to cope with it, and to rec­og­nize some­thing, one must name it. Trump has re­vealed him­self, and we must name what we see.

...

Read the original on www.theatlantic.com »

5 409 shares, 25 trendiness

Oneplus phone update introduces hardware anti-rollback

...

Read the original on consumerrights.wiki »

6 398 shares, 20 trendiness

DOOMBUDS

It’s al­most your turn, get ready!

* Use WASD to move around and the ar­row keys to look left and right.

* Space to shoot, Shift to sprint. E to in­ter­act with doors/​ob­jects.

* Number keys for se­lect­ing weapons. Escape/Enter for menu use.

* Press Tab to show the map. If you die, press E to respawn, noob.

So… what ex­actly is this?

You know the 1993 clas­sic DOOM? I made it run on an ear­bud, then I con­nected it to the in­ter­net and made it pos­si­ble for vis­i­tors like you to sit in a queue for hours play the game re­motely!.

Yeah but it won’t just run on any old ear­bud, this only works with the Pinebuds Pro, the only ear­buds with open source firmware.

Can I look at the code or run this on my own Pinebuds?

You sure can! There are two rel­e­vant re­pos:

* DOOMBuds for the DOOM port that will run on your ear­bud

* DOOMBUDS-JS to in­ter­act with the ear­bud through your browser

Wait, why am I look­ing at a twitch stream?

This was a nec­es­sary op­ti­mi­sa­tion to avoid pay­ing out­go­ing band­width fees, once you’re 5th in the queue, the twitch player will switch to a low-la­tency MJPEG stream.

wow this front end code is atro­cious, state man­age­ment is every­whe-

shhhh don’t look don’t look it’s ok just join the queue

Give us more info, how did you get this to work?

Let’s switch to a more read­able font first.

I’ll put out an ar­ti­cle / video div­ing deeper into this later, but here are a few bits of info:

This pro­ject is made up of four parts:

The DOOM port that runs on the ear­buds

The serial server’ that acts as a bridge be­tween the ear­buds and the web server and also transcodes the MJPEG stream to twitch

The web server that serves as­sets, man­ages the queue, for­wards key­presses and dis­plays the MJPEG stream

The sta­tic web­page that tells your browser what to dis­play on the screen and how to com­mu­ni­cate with the web server

The firmware pushes up against a few hard­ware lim­i­ta­tions:

Serial Connection

Earbuds don’t have dis­plays, so the only way to trans­fer data to/​from them is ei­ther via blue­tooth, or the UART con­tact pads.

Bluetooth is pretty slow, you’d be lucky to get a con­sis­tent 1mbps con­nec­tion, UART is eas­ily the bet­ter op­tion.

DOOMs frame­buffer is (width * height) bytes, 320 * 200 = 96kB. (doom’s in­ter­nal frame­buffer is 8-bit not 24-bit)

The UART con­nec­tion pro­vides us with 2.4mbps of us­able band­width. 2,400,000 / 8 / 96,000 gives us… 3 frames per sec­ond.

Clearly we need to com­press the video stream. Modern video codecs like h264 con­sume way too much CPU and RAM.

The only fea­si­ble ap­proach is send­ing the video as an MJPEG stream. MJPEG is a stream of JPEG im­ages shown one af­ter the other.

I found an ex­cel­lent JPEG en­coder for em­bed­ded de­vices here, thanks Larry!

A con­ser­v­a­tive es­ti­mate for the av­er­age HIGH qual­ity JPEG frame is around 13.5KB, but most scenes (without en­e­mies) are around 11kb.

Theoretical max­i­mum FPS:

- Optimistic: `2,400,000 / (11,000 * 8)` = 27.3 FPS

- Conservative: `2,400,000 / (13,500 * 8)` = 22.2 FPS

CPU

The stock open source firmware has the CPU set to 100mhz, so I cranked that up to 300mhz and dis­abled low power mode.

The Cortex-M4F run­ning at 300mhz is ac­tu­ally more than enough for DOOM, how­ever it strug­gles with JPEG en­cod­ing.

This is why it maxes out at ~18fps, I don’t think there’s much else I can do to speed it up.

RAM

By de­fault, we only have ac­cess to 768KB of RAM, af­ter dis­abling the co-proces­sor it gets bumped up to the ad­ver­tised 992KB.

DOOM re­quires 4MB of RAM, though there are plenty of op­ti­mi­sa­tions that can re­duce this amount.

Pre-generating lookup ta­bles, mak­ing vari­ables const, read­ing const vari­ables from flash, dis­abling DOOMs caching sys­tem, re­mov­ing un­needed vari­ables. It all adds up!

FLASH

The share­ware DOOM 1 wad (assets file) is 4.2MB and the ear­buds can only store 4MB of data.

Thankfully, frag­glet, a well-known doom mod­der, has al­ready solved this is­sue for me.

Squashware is his trimmed-down DOOM 1 wad that is only 1.7MB in size.

With this wad file, every­thing com­fort­ably fits in flash.

I thought you’d never ask! (please hire me)

...

Read the original on doombuds.com »

7 306 shares, 13 trendiness

Introduction to PostgreSQL Indexes

This text is for de­vel­op­ers that have an in­tu­itive knowl­edge of what data­base in­dexes are, but don’t nec­es­sar­ily know how they work in­ter­naly, what are the trade­offs as­so­ci­ated with in­dexes, what are the types of in­dexes pro­vided by post­gres and how you can use some of its more ad­vanced op­tions to make them more op­ti­mized for your use case.

Indexes are spe­cial data­base ob­jects pri­mar­ily de­signed to in­crease the speed of data ac­cess, by al­low­ing the data­base to read less data from the disk. They can also be used to en­force con­straints like pri­mary keys, unique keys and ex­clu­sion. Indexes are im­por­tant for per­for­mance but do not speedup a query un­less the query matches the columns and data types in the in­dex. Also, as a very rough rule of thumb, an in­dex will only help if less than 15-20% of the table will be re­turned in the query, oth­er­wise the query plan­ner, a part of post­gres used to de­ter­mine how the query is go­ing to be ex­e­cuted, might pre­fer a se­quen­tial scan. In fact, re­al­ity is much more com­plex than this rule of thumb. The query plan­ner uses sta­tis­tics and pre­de­fined costs as­so­ci­ated with each type of scan to do its job, but we’re only go­ing ap­proach the query plan­ner be­hav­ior tan­gen­tially in this ar­ti­cle. So, if your query re­turns a large per­cent­age of the table, con­sider refac­tor­ing it, us­ing sum­mary ta­bles or other tech­niques be­fore throw­ing an in­dex at the prob­lem. With that in mind, let’s give a closer look at how Postgres stores your data in the disk and how in­dexes help to speedup query­ing this data.

There are six types of in­dexes avail­able in the de­fault post­gres in­stal­la­tion and more types avail­able through ex­ten­sions. Typically, they work by as­so­ci­at­ing a key value with a data lo­ca­tion in one or more rows of the table con­tain­ing that key. Each line is iden­ti­fied by a TID, or tu­ple id.

To un­der­stand in­dexes, it is im­por­tant to first un­der­stand how post­gres stores table data on disk. Every table in post­gres has one or more cor­re­spond­ing files on disk, de­pend­ing on its size. This set of files is called a heap and it is di­vided into 8kb pagesh. All table rows, in­ter­nally re­ferred to as tuples”, are saved in these files and do not have a spe­cific or­der. The in­dex is a tree struc­ture that links the in­dexes columns to the row lo­ca­tors, also known as ctid, in the heap. We’ll zoom into the in­dex in­ter­nals later.

To see the heap files we can use a few post­gres in­ter­nal ta­bles to see where they’re lo­cated in the disk. First, we can en­ter psql and use show da­ta_di­rec­tory to show the di­rec­tory Postgres uses to store data­bases phys­i­cal files.

Now we can use the in­ter­nal pg_­class to find the file where the heap table is stored:

Finally, we can check the file on disk by run­ning this com­mand in the shell (ls $PGDATA/base/

The file has size 0 be­cause we haven’t done any INSERTs in this table yet.

Let’s add a cou­ple of rows to our table:

We can add the ctid field to the query to re­trieve the ctid of each line. The ctid is an in­ter­nal field that has the ad­dress of the line in the heap. Think of it as a pointer to the row lo­ca­tion in the heap. It con­sists of a tu­ple in the for­mat (m, n) where m is the block id and n is the tu­ple off­set. ctid” stands for current tu­ple id”. Here you can note that the row with id one is stored in the page 0, off­set 1.

Let’s add more play­ers to the table so that the to­tal rows is one mil­lion:

After adding more rows to the table its cor­re­spond­ing file is 30MB. Internally, it is di­vided into 8kb pages.

When we query a table with­out an in­dex, Postgres reads all tu­ples in every page and ap­ply a fil­ter. For ex­am­ple, let’s an­a­lyze the com­mand be­low that searches for rows whose name col­umn value is equal to Ronaldo” and show how the data­base per­formed this search. We use the ex­plain com­mand with the op­tions (analyse, buffers). analyse will ac­tu­ally ex­e­cute the query in­stead of just us­ing cost es­ti­mates, and the buffers op­tion shows how much IO work was done.

Note the in out­put the line start­ing with -> Parallel Seq scan on foo”. This line de­notes that the data­base per­formed a se­quen­tial search and read all the rows in the table. The ex­e­cu­tion time for this query was 265.021ms. Also note the line that says Buffers: shared hit=97 read=6272”. This mean that we needed to read 97 pages from mem­ory, and 6272 pages from disk.

Now let’s add an in­dex on the name col­umn and see how the same query per­forms. We’re us­ing the com­mand cre­ate in­dex con­cur­rently be­cause we don’t want to block the table for writes.

Here we see that the in­dex was used and that in this case the ex­e­cu­tion time was re­duced from 264.21 to 0.074 mil­lisec­onds, and the data­base only needed to read 4 pages! The re­duc­tion in ex­e­cu­tion time hap­pens be­cause, now, in­stead of read­ing all the rows in the table, the data­base uses the in­dex. The in­dex is a tree struc­ture map­ping the value Ronaldo” to the ctid(s) of the rows that have this value in the name col­umn (in our ex­am­ple we only have one such row). The ctid is then used to quickly lo­cate these rows on the heap.

If we use \di+ to show the in­dexes in our data­base we can see that the in­dex we’ve cre­ated oc­cu­pies 30MB, roughly the same size as the foo table.

It is im­por­tant to high­light that the ex­tra speed brought by in­dices is as­so­ci­ated with sev­eral costs that must be con­sid­ered when de­cid­ing where and how to ap­ply them.

Indexes are stored in a sep­a­rate area of the heap and take up ad­di­tional disk space. The more in­dexes a table has, the greater the amount of disk space re­quired to store them. This in­curs in ad­di­tional stor­age costs for your data­base and for back­ups, in­creased repli­ca­tion traf­fic, and in­creased backup and failover re­cov­ery times. Bear in mind that its not un­com­mon for btree in­dexes to be larger than the table it­self. Learning about par­tial in­dexes, and mul­ti­col­umn in­dexes, as well as about other more space ef­fi­cient in­dex types such as BRIN can be help­ful.

Also, there is a main­te­nance cost in writ­ing op­er­a­tions such as UPDATE, INSERT and DELETE, if a field that is part of an in­dex is mod­i­fied, the cor­re­spond­ing in­dex needs to be up­dated, which can add sig­nif­i­cant over­head to the writ­ing process.

The query plan­ner (also known as query op­ti­mizer) is the com­po­nent re­spon­si­ble for de­ter­min­ing the best ex­e­cu­tion strat­egy for a query. With more in­dexes avail­able, the query plan­ner has more op­tions to con­sider, which can in­crease the time needed to plan the query, es­pe­cially in sys­tems with many com­plex queries or where there are many in­dexes avail­able.

PostgreSQL main­tains a por­tion of fre­quently ac­cessed data and in­dex pages in mem­ory in its shared buffers. When an in­dex is used, the rel­e­vant in­dex pages are loaded into shared buffers to speed up ac­cess. The more in­dexes you have and the more they are used, the more shared buffer mem­ory is nec­es­sary. Since shared buffers are lim­ited and are also used for caching data pages, fill­ing the shared buffers with in­dexes can lead to less ef­fi­cient caching of table data. It’s also good to keep in mind that the whole in­dexed col­umn is copied in every node of the btree, since there’s a limit in node size ca­pac­ity, the larger the in­dexed col­umn the deeper the tree will be.

Another as­pect of mem­ory us­age is that PostgreSQL uses work mem­ory when it ex­e­cutes queries that in­volves sort­ing or com­plex in­dex scans (involving multi-col­umn or cov­er­ing in­dexes). Larger in­dexes re­quire more mem­ory for these op­er­a­tions. Also, in­dexes re­quire mem­ory to store some meta­data about their struc­ture, col­umn names and sta­tis­tics in the sys­tem cat­a­log cache. And fi­nally in­dexes re­quire mem­ory for main­tainance op­er­a­tions like vac­u­um­ing and rein­dex­ing op­er­a­tions.

The B-Tree is a very pow­er­ful data struc­ture, pre­sent not only in Postgres but in al­most every data­base man­age­ment sys­tem, since it is a very good gen­eral pur­pose in­dex. It was in­vented by Rudolf Bayer and Edward M. McCreight while work­ing at Boeing. Nobody re­ally knows if the B” in B-tree stands for Bayer, Boeing, bal­anced or bet­ter, and it does­n’t re­ally mat­ter. What re­ally mat­ters is that it en­ables us to search el­e­ments in the tree in O(log n) time. If you’re not fa­mil­iar with Big-O no­ta­tion, all you need to know is that is is re­ally fast - you only need to make 20 com­par­isons in or­der to find an el­e­ment in a set with 1 mil­lion items. Moreover, it can main­tain O(log n) time com­plex­ity for data sets that are larger than the RAM avail­able on a com­puter. This means that disks can be used to ex­tend RAM, thanks to the btree ef­fi­cient pre­ven­tion of disk page ac­cesses to find the de­sired data. In PostgreSQL the btree is the most com­mon type of in­dex and its the de­fault, it’s also used to sup­port sys­tem and TOAST in­dexes. Even an empty data­base has hun­dreds of btree in­dexes. It is the only in­dex type that can be used for pri­mary and unique key con­straints.

In con­trast with a bi­nary tree, the BTree is a bal­anced tree and all of its leave nodes have the same dis­tance from the root. The root nodes and in­ner nodes have point­ers to lower lev­els, and the leaf nodes have the keys and point­ers to the heap. Postgres btrees also have point­ers to the left and right nodes for eas­ier for­ward and back­ward scan­ning. Nodes can have mul­ti­ple keys and these keys are sorted so that it’s easy to walk in or­dered di­rec­tions and to per­form ORDER BY and JOIN op­er­a­tions. The val­ues are only stored in the leaf nodes, this makes the tree more com­pact and fa­cil­i­tates a full tra­ver­sal of the ob­jects in a tree with just a lin­ear pass through all the leaf nodes. This is just a sim­pli­fied de­scrip­tion of PostgreSQL Btree in­dexes, if you want to get into the low level de­tails, I sug­gest you to read the README and the pa­per that in­spired them. Below there’s a sim­pli­fied il­lus­tra­tion of a Postgres Btree.

Postgres can use mul­ti­ple in­dexes to han­dle cases that can­not be han­dled by sin­gle in­dex scans, by form­ing AND and OR con­di­tions across sev­eral in­dex scans with the sup­port of bitmaps. The bitmaps are ANDed or ORed to­gether as needed by the query and fi­nally the table rows are vis­ited and re­turned. Let’s say we have a query like this:

If the age and lo­gin_­count columns are in­dexed, post­gres scans in­dex age for all pages with age=30 and makes a bitmap where the pages that might con­tain rows with age=30 are true. In a sim­i­lar way, it builds a bitmap us­ing the lo­gin_­count in­dex. It then ANDs the two bitmaps to form a third bitmap, and per­forms a table scan, only read­ing the pages that might con­tain can­di­date val­ues, and only adding the rows where age=30 and lo­gin_­count=100 to the re­sult set.

Multi-column in­dexes are an al­ter­na­tive for us­ing mul­ti­ple in­dexes. They’re gen­er­aly go­ing to be smaller and faster than us­ing mul­ti­ple in­dexes, but they’ll also be less flex­i­ble. That’s be­cause the or­der of the columns mat­ter, be­cause the data­base can search for a sub­set of the in­dexed columns, as long as they are the left­most columns. For ex­am­ple, if you have an in­dex on col­umn a and an­other in­dex on col­umn b, these in­dexes will serve all the of queries be­low:

On the other hand, only the first two queries would use an in­dex if you cre­ated a multi-col­umn in­dex on (a, b) with a com­mand like cre­ate in­dex on my_table(a, b); So, when build­ing multi-col­umn in­dexes choose the or­der of the columns well so that your in­dex can be used by the most queries pos­si­ble.

Partial in­dexes al­low you to use a con­di­tional ex­pres­sion to con­trol what sub­set of rows will be in­dexed, this can bring you many ben­e­fits:

* your in­dex can be smaller and more likely fit in RAM.

* your in­dex is shal­lower, so lookups are quicker

* less over­head for in­dex/​up­date/​delete (but can also mean more over­head if the col­umn you’re us­ing to fil­ter rows in/​out of the in­dex is up­dated very fre­quently trig­ger­ing con­stant in­dex main­te­nance)

They’re mostly use­ful in sit­u­a­tions where you don’t care about some rows, or when you’re in­dex­ing on a col­umn where the pro­por­tion of one value is much greater than oth­ers. I’ll give two ex­am­ples be­low.

Let’s say you have a rules table where the rows can be marked as en­abled/​dis­abled, the vast ma­jor­ity of the rows are dis­abled and in your queries you only care about en­abled rows. In this case, you would have a par­tial in­dex, fil­ter­ing out the dis­able rows like this:

Now imag­ine you’re build­ing a todo ap­pli­ca­tion and the sta­tus col­umn value can be ei­ther TODO, DOING, and DONE. Suppose you have 1M rows and this is the cur­rent dis­tri­b­u­tion of rows in each sta­tus:

Since post­gres keeps sta­tis­tics about the dis­tri­b­u­tion of val­ues in your table columns and knows that the vast ma­jor­ity of the rows are in the TODO sta­tus, it would choose to do a se­quen­tial scan on the tasks table when you have sta­tus=‘TODO’ in the WHERE clause of your query, even if you have an in­dex on sta­tus, leav­ing most part of the in­dex un­used and wast­ing space. In this case, a par­tial scan such as the one be­low is rec­om­mended:

If you have a query that se­lects only columns in an in­dex, Postgres has all in­for­ma­tion needed by the query in the in­dex and does­n’t need to fetch pages from the heap to re­turn the re­sult. This op­ti­miza­tion is called in­dex-only scan. To un­der­stand how it works, con­sider the fol­low­ing sce­nario:

In the first query, post­gres can do an in­dex-only scan and avoid fetch­ing data from the heap be­cause the val­ues a and b are pre­sent in the in­dex. In the sec­ond query, since c is­n’t in the in­dex, pos­gres needs to fol­low the ref­er­ence to the heap to fetch its value. In the first query we al­lowed post­gres do to an in­dex-only scan with the help of a multi-col­umn in­dex, but we could also achieve the same re­sult by us­ing a cov­er­ing in­dex. The syn­tax for cre­at­ing a cov­er­ing in­dex looks like this:

This is more space ef­fi­cient than cre­at­ing a multi-col­umn in­dex on (a, b, c), be­cause c will only be in­serted at the leaf nodes of the btree. Also, we might want to use a cov­er­ing in­dex in cases where we want an unique in­dex and c would break” the unique­ness of the in­dex.

Expression in­dexes to in­dex the re­sult of an ex­pres­sion or func­tion, rather than just the raw col­umn val­ues. This can be ex­tremely use­ful when you fre­quently query based on a trans­formed ver­sion of your data. It is nec­es­sary if you use a func­tion as part of a where clause as in the ex­am­ple be­low:

In this ex­am­ple above, Postgres won’t use the in­dex be­cause it was was built against the name col­umn. In or­der to make it work, the in­dex key has to call the lower func­tion just like it’s used in the where clase. To fix it, do:

Now, when you run a query like this:

Now PostgreSQL can use the ex­pres­sion in­dex to ef­fi­ciently find the match­ing rows.

Expression in­dexes can be cre­ated us­ing var­i­ous types of ex­pres­sions:

User-defined func­tions: As long as they are im­mutable.

The hash in­dex dif­fers from B-Tree in strucutre, it is much more alike a hashmap data struc­ture pre­sent in most pro­gram­ming lan­guages (e.g. dict in Python, ar­ray in php, HashMap in java, etc). Instead of adding the full col­umn value to the in­dex, a 32bit hash code is de­rived from it and added to the hash. This makes hash in­dexes much smaller than btrees when in­dex­ing longer data such as UUIDs, URLs, etc. Any data type can be in­dexed with the help of post­gres hash­ing func­tions. If you type \df hash* and press TAB in psql, you’ll see that there are more then 50 hash re­lated func­tions. Although it grace­fully han­dles hash con­flicts, it works bet­ter for even dis­tri­b­u­tion of hash val­ues and is most suited to unique or mostly unique data. Under the cor­rect con­di­tions it will not only be smaller than btree in­dexes, but also it will be faster for reads when com­pared with btress. Here’s what the of­fi­cial docs says about it:

In a B-tree in­dex, searches must de­scend through the tree un­til the leaf page is found. In ta­bles with mil­lions of rows, this de­scent can in­crease ac­cess time to data. The equiv­a­lent of a leaf page in a hash in­dex is re­ferred to as a bucket page. In con­trast, a hash in­dex al­lows ac­cess­ing the bucket pages di­rectly, thereby po­ten­tially re­duc­ing in­dex ac­cess time in larger ta­bles. This re­duc­tion in logical I/O” be­comes even more pro­nounced on in­dexes/​data larger than shared_buffers/​RAM.”

As for its lim­i­ta­tions, it only sup­ports equal­ity op­er­a­tions and is­n’t go­ing to be help­ful if you need to or­der by the in­dexed field. It also does­n’t sup­port multi-col­umn in­dexes and check­ing for unique­ness. For a in-depth analy­sis of how hash in­dexes fare in re­la­tion to btree, check Evgeniy Demin’s blog post on the sub­ject.

BRIN stands for Block Range Index and its name tells a lot about how it is im­ple­mented. Nodes in BRIN in­dexes store the min­i­mum and max­i­mum val­ues of a range of val­ues pre­sent in the page re­ferred by the in­dex. This makes the in­dex more com­pact and cache friendly, but re­stricts the use cases for it. If you have a very large in a work load that is heavy on writes and low on deletes and up­dates. You can think of a BRIN in­dex as an op­ti­mizer for se­quen­tial scans of large amounts of data in very large data­bases, and is a good op­ti­miza­tion to try be­fore par­ti­tion­ing a table. For a BRIN in­dex to work well, the in­dex key should be a col­umn that strongly cor­re­lates to the lo­ca­tion of the row in the heap. Some good use cases for BRIN are ap­pend-only ta­bles and ta­bles stor­ing time se­ries data.

BRIN won’t work well for ta­bles where the rows are up­dated con­stantly, due to the na­ture of MVCC that du­pli­cates rows and stores them in a dif­fer­ent part of the heap. This tu­ple du­pli­ca­tion and mov­ing af­fect the cor­re­la­tion neg­a­tively and re­duces the ef­fec­tive­ness of the in­dex. Using ex­ten­sions such as pg_repack or pg_squeeze is­n’t rec­om­mended for ta­bles that use BRIN in­dexes, since they change the in­ter­nal data lay­our fo the table and mess up the cor­re­la­tion. Also, this in­dex is lossy in the sense that the in­dex leaf nodes point to pages taht might con­tain a value within a par­tic­u­lar range. For this rea­son a BRIN is more help­ful if you need to re­turn large sub­set of data, and a btree would be more read per­for­mant for queries that only re­turn one or few rows. You can make the in­dex more or less lossy by ad­just­ing the page_per_range con­fig­u­ra­tion, the trade off will be in­dex size.

Generalized in­verted in­dex is ap­pro­pri­ate for when you want to search for an item in com­pos­ite data, such as find­ing a word in a blob of text, an item in an ar­ray or an ob­ject in a JSON. The GIN is gen­er­al­ized in the sense that it does­n’t need to know how it will acel­er­ate the search for some item. Instead, there’s a set of cus­tom strate­gies spe­cific for each data type. Please note that in or­der to in­dex an JSON value it needs to be stored in a JSONB col­umn. Similarly, if you’re in­dex­ing text it’s bet­ter to store it as (or con­vert it to) tsvec­tor or use the pg_trgm ex­ten­sion.

The Generalized Search Tree and the Space-Partitioned Generalized Search Tree are tree struc­tures that can be use as a base tem­plate to im­ple­ment in­dexes for spe­cific data types. You can think of them as frame­work for build­ing in­dexes. The GiST is a bal­anced tree and the SP-GiST al­low for the de­vel­op­ment of non-bal­anced data struc­tures. They are use­ful for in­dex­ing points and geo­met­ric types, inet, ranges and text vec­tors. You can find an ex­ten­sive list of the built-in strate­gies shipped with post­gres in the of­fi­cial doc­u­men­ta­tion. If you need an in­dex to en­able full-text search in your ap­pli­ca­tion, you’ll have to choose be­tween GIN and GiST. Roughly speak­ing, GIN is faster for lookups but it’s big­ger and has greater build­ing and main­tainance costs. So the right in­dex type for you will de­pend on your ap­pli­ca­tion re­quire­ments.

Understanding and ef­fec­tively us­ing in­dexes is cru­cial for op­ti­miz­ing data­base per­for­mance in PostgreSQL. While in­dexes can greatly speed up query ex­e­cu­tion and im­prove over­all ef­fi­ciency, it’s im­por­tant to be mind­ful of their im­pact on write op­er­a­tions and stor­age. By care­fully se­lect­ing the ap­pro­pri­ate types of in­dexes based on your spe­cific use cases you can en­sure that your PostgreSQL data­base re­mains both fast and ef­fi­cient. I hope this ar­ti­cle taught you at least one or two things you did­n’t know about Postgres in­dexes, and that you’re bet­ter equiped to deal with dif­fer­ent sce­nar­ios in­volv­ing data­bases from now on.

...

Read the original on dlt.github.io »

8 305 shares, 10 trendiness

White House alters arrest photo of ICE protester, says "the memes will continue"

The Trump White House yes­ter­day posted a ma­nip­u­lated photo of Nekima Levy Armstrong, a Minnesota civil rights at­tor­ney who was ar­rested af­ter protest­ing in a church where a pas­tor is al­legedly also an Immigration and Customs Enforcement (ICE) of­fi­cial.

Secretary of Homeland Security Kristi Noem posted what seems to be the orig­i­nal photo of Armstrong be­ing led away by an of­fi­cer yes­ter­day morn­ing. A half hour later, the of­fi­cial White House X ac­count posted an al­tered ver­sion in which Armstrong’s face was ma­nip­u­lated to make it ap­pear that she was cry­ing.

The White House shared an AI-edited photo of Nekima, de­pict­ing her in tears and scared when, in ac­tu­al­ity, she was poised, de­ter­mined, and un­afraid,” NAACP President and CEO Derrick Johnson said yes­ter­day.

Reader-added con­text on X said, This photo has been dig­i­tally al­tered to make Nekima Levy Armstrong ap­pear to be in dis­tress. The Director of DHS her­self posted the unedited photo in an ear­lier an­nounce­ment.” White House Deputy Communications Director Kaelan Dorr de­fended the post af­ter crit­i­cism of the im­age ma­nip­u­la­tion.

Enforcement of the law will con­tinue. The memes will con­tinue. Thank you for your at­ten­tion to this mat­ter,” Dorr wrote. The White House post with the ma­nip­u­lated im­age called Levy Armstrong a far-left ag­i­ta­tor” who orchestrated[ed] church ri­ots in Minnesota.”

A DHS press re­lease about the ar­rest used the same im­age posted by Noem, with­out the al­ter­ation.

Jordan Kushner, an at­tor­ney for Levy Armstrong, said, It is just so out­ra­geous that the White House would make up sto­ries about some­one to try and dis­credit them. She was com­pletely calm and com­posed and ra­tio­nal. There was no one cry­ing. So this is just out­ra­geous defama­tion.”

Speaking to The Associated Press, Kushner also said that the video Levy Armstrong’s hus­band shot dismantles what they claim’ and that the video would be re­leased soon.”

...

Read the original on arstechnica.com »

9 298 shares, 6 trendiness

Iran Protest Death Toll Could Top 30,000

As many as 30,000 peo­ple could have been killed in the streets of Iran on Jan. 8 and 9 alone, two se­nior of­fi­cials of the coun­try’s Ministry of Health told TIME—indicating a dra­matic surge in the death toll. So many peo­ple were slaugh­tered by Iranian se­cu­rity ser­vices on that Thursday and Friday, it over­whelmed the state’s ca­pac­ity to dis­pose of the dead. Stocks of body bags were ex­hausted, the of­fi­cials said, and eigh­teen-wheel semi-trail­ers re­placed am­bu­lances.

The gov­ern­men­t’s in­ter­nal count of the dead, not pre­vi­ously re­vealed, far sur­passes the toll of 3,117 an­nounced on Jan. 21 by regime hard­lin­ers who re­port di­rectly to Iran’s Supreme Leader Ali Khamenei. (Ministries re­port to the elected President.) The 30,000 fig­ure is also far be­yond tal­lies be­ing com­piled by ac­tivists me­thod­i­cally as­sign­ing names to the dead. As of Saturday, the U. S.-based Human Rights Activists News Agency said it had con­firmed 5,459 deaths and is in­ves­ti­gat­ing 17,031 more.TIME has been un­able to in­de­pen­dently ver­ify these fig­ures.The Health Ministry’s two-day fig­ure roughly aligns with a count gath­ered by physi­cians and first re­spon­ders, and also shared with TIME. That sur­rep­ti­tious tally of deaths recorded by hos­pi­tals stood at 30,304 as of Friday, ac­cord­ing to Dr. Amir Parasta, a German-Iranian eye sur­geon who pre­pared a re­port of the data. Parasta said that num­ber does not re­flect protest-re­lated deaths of peo­ple reg­is­tered at mil­i­tary hos­pi­tals, whose bod­ies were taken di­rectly to morgues, or that hap­pened in lo­cales the in­quiry did not reach. Iran’s National Security Council has said protests took place in around 4,000 lo­ca­tions across the coun­try.

We are get­ting closer to re­al­ity,” Dr. Parasta said. But I guess the real fig­ures are still way higher.”That ap­pears to be the re­al­ity im­plicit in the gov­ern­men­t’s in­ter­nal fig­ure of more than 30,000 deaths in two days. A slaugh­ter on that scale, in the space of 48 hours, had ex­perts on mass killing grop­ing for com­par­isons.“Most spasms of killing are not from shoot­ings,” said Les Roberts, a pro­fes­sor at Columbia University who spe­cial­izes in the epi­demi­ol­ogy of vi­o­lent death. In Aleppo [Syria] and in Fallujah [Iraq], when spasms of death this high have oc­curred over a few days, it in­volved mostly ex­plo­sives with some shoot­ing.”The only par­al­lel of­fered by on­line data­bases oc­curred in the Holocaust. On the out­skirts of Kyiv on Sept. 29 and 30, 1941, Nazi death squads ex­e­cuted 33,000 Ukrainian Jews by gun­shot in a ravine known as Babyn Yar. In Iran, the killing fields ex­tended across the coun­try where, since Dec. 28, hun­dreds of thou­sands of cit­i­zens had as­sem­bled in the streets chant­ing first, for re­lief from an econ­omy in freefall, and soon for the down­fall of the Islamic regime. During the first week, se­cu­rity forces con­fronted some demon­stra­tions, us­ing mostly non-lethal force, but with of­fi­cials also of­fer­ing con­cil­ia­tory lan­guage, the regime re­sponse was un­cer­tain. That changed dur­ing the week­end com­menc­ing Jan. 8. Protests peaked, as op­po­si­tion groups, in­clud­ing Reza Pahlavi, the ex­iled son of Iran’s for­mer shah, urged peo­ple to join the throngs, and U.S. President Donald Trump re­peated vows to pro­tect them, though no help ar­rived.

Witnesses say mil­lions were in the streets when au­thor­i­ties shut down the in­ter­net and all other com­mu­ni­ca­tions with the out­side world. Rooftop snipers and trucks mounted with heavy ma­chine guns opened fire, ac­cord­ing to eye­wit­nesses and cell phone footage. On Friday, Jan. 9, an of­fi­cial of the Islamic Revolutionary Guard Corps warned on state tele­vi­sion to any­one ven­tur­ing into the streets, if … a bul­let hits you, don’t com­plain.”It took days for the re­al­ity to pen­e­trate the in­ter­net black­out. Images of the blood­ied bod­ies trick­led out via il­licit Starlink satel­lite in­ter­net con­nec­tions. The task of count­ing the dead was ham­pered, how­ever, be­cause the au­thor­i­ties had also cut off lines of com­mu­ni­ca­tions in­side Iran. The first firm in­for­ma­tion came from a Tehran doc­tor who told TIME that just six hos­pi­tals in the cap­i­tal had recorded at least 217 pro­tester deaths af­ter Thursday’s as­sault. Health care work­ers in Iran es­ti­mated at least 16,500 pro­test­ers had been killed by Jan. 10, ac­cord­ing to an ear­lier re­port by Dr. Parasta in Munich. Friday’s up­date built on that re­search, he said.

I am gen­uinely im­pressed by how quickly this work was pulled to­gether un­der ex­tremely con­strained and risky con­di­tions,” said Paul B. Spiegel, a pro­fes­sor at the Johns Hopkins University International School of Health. Like Roberts, he ex­pressed wari­ness of ex­trap­o­lat­ing from the fig­ures pro­vided by hos­pi­tals. Roberts, who trav­eled into war zones to re­search civil­ian death rates in Iraq and the Democratic Republic of Congo, said, the 30,000 ver­i­fied deaths are al­most cer­tainly an un­der­es­ti­mate.”The emer­gence of the Ministry of Health num­bers ap­pears to con­firm that—while un­der­scor­ing the stakes for both Iranians and a regime that, in 1979, came to power when a sit­ting gov­ern­ment was con­fronted by mil­lions of peo­ple de­mand­ing its down­fall. On Friday, Jan. 9, Sahba Rashtian, an as­pir­ing an­i­ma­tion artist, joined friends on the streets in Isfahan, a city in cen­tral Iran fa­mous for its beauty. Before any­one started chant­ing,” a friend told TIME, Sahba was seen col­lapsed on the ground. Her sis­ter no­ticed blood on her hand.”

Sahba died on an op­er­at­ing table at a nearby hos­pi­tal. She was 23.

She al­ways joked about her beau­ti­ful name,” her friend said. She’d laugh and say, Sahba means wine, and I am for­bid­den in the Islamic Republic.’”

At the bur­ial, the friend said, re­li­gious rites were barred, and Rashtian’s fa­ther wore white.

Congratulations,” he told mourn­ers, ac­cord­ing to the friend. My daugh­ter be­came a mar­tyr on the path to free­dom.”

...

Read the original on time.com »

10 266 shares, 11 trendiness

FAA creates drone no-fly zone for ICE operations

The Federal Aviation Administration has is­sued a na­tion­wide se­cu­rity no­tice, ef­fec­tively cre­at­ing a mov­ing drone no-fly zone around op­er­a­tions con­ducted by Immigration and Customs Enforcement (ICE) and other com­po­nents of the Department of Homeland Security.

The no­tice, NOTAM FDC 6/4375, pro­hibits un­manned air­craft sys­tems from op­er­at­ing within 3,000 feet lat­er­ally and 1,000 feet ver­ti­cally of DHS fa­cil­i­ties and mo­bile as­sets, in­clud­ing ground ve­hi­cle con­voys and their es­corts. The re­stric­tion ap­plies na­tion­wide and con­tin­u­ously, rather than at fixed lo­ca­tions or dur­ing de­fined time win­dows.

Because ICE operates under DHS and rou­tinely con­ducts en­force­ment ac­tions us­ing mo­bile ve­hi­cle con­voys in pub­lic spaces, the re­stric­tion func­tions as a drone no-fly zone around ICE op­er­a­tions, in­clud­ing ar­rests, trans­port ac­tiv­i­ties and other field ac­tions.

The FAA clas­si­fies the re­stricted air­space as national de­fense air­space,” and cites its au­thor­ity un­der fed­eral se­cu­rity statutes. Drone op­er­a­tors who vi­o­late the re­stric­tion may face crim­i­nal pros­e­cu­tion, civil penal­ties, ad­min­is­tra­tive en­force­ment ac­tions, or re­vo­ca­tion of FAA op­er­at­ing priv­i­leges. The no­tice also states that drones deemed a cred­i­ble se­cu­rity threat may be in­ter­cepted, seized, dam­aged, or de­stroyed.

Unlike tra­di­tional Temporary Flight Restrictions, the NOTAM does not pro­vide ge­o­graphic co­or­di­nates, ac­ti­va­tion times, or pub­lic no­ti­fi­ca­tion when the re­stric­tion is in ef­fect near a spe­cific lo­ca­tion. Instead, the re­stricted air­space moves with DHS as­sets, mean­ing the no-fly zone can ap­pear wher­ever ICE or other DHS units op­er­ate.

The new NOTAM re­places an ear­lier se­cu­rity no­tice, FDC 5/6378, which cov­ered sim­i­lar fed­eral agen­cies but was less ex­plicit about mo­bile op­er­a­tions. The up­dated ver­sion re­moves am­bi­gu­ity by clearly stat­ing that the re­stric­tion ap­plies to mov­ing DHS as­sets, in­clud­ing ve­hi­cles and con­voys, and not just fixed fa­cil­i­ties such as of­fices or bases.

That clar­i­fi­ca­tion has drawn at­ten­tion from drone op­er­a­tors and civil lib­er­ties groups be­cause it cre­ates dy­namic, in­vis­i­ble ex­clu­sion zones that may be im­pos­si­ble to iden­tify in real time. The FAA does not pub­lish pub­lic track­ing of DHS or ICE move­ments, and the NOTAM does not in­clude a mech­a­nism for drone pi­lots to de­ter­mine when cov­ered as­sets are nearby.

In prac­ti­cal terms, a drone op­er­a­tor fly­ing legally in a pub­lic area could un­know­ingly en­ter re­stricted air­space if an ICE con­voy passes within the pro­tected ra­dius. The FAA in­structs op­er­a­tors to exercise cau­tion” when fly­ing near DHS fa­cil­i­ties and mo­bile as­sets, but of­fers no spe­cific guid­ance on how to do so in en­vi­ron­ments where en­force­ment ac­tiv­ity is not pub­licly dis­closed.

The no­tice men­tions lim­ited ex­cep­tions. Drone op­er­a­tions con­ducted in di­rect sup­port of na­tional de­fense, home­land se­cu­rity, law en­force­ment, fire­fight­ing, search and res­cue, or dis­as­ter re­sponse mis­sions may be au­tho­rized with ad­vance co­or­di­na­tion. Operators seek­ing ap­proval are in­structed to co­or­di­nate with DHS or other cov­ered agen­cies, or con­tact the FAAs System Operations Support Center.

The FAA cites mul­ti­ple fed­eral statutes as the le­gal ba­sis for the re­stric­tion, in­clud­ing laws gov­ern­ing na­tional de­fense air­space and counter-UAS mit­i­ga­tion.

...

Read the original on www.aerotime.aero »

To add this web app to your iOS home screen tap the share button and select "Add to the Home Screen".

10HN is also available as an iOS App

If you visit 10HN only rarely, check out the the best articles from the past week.

If you like 10HN please leave feedback and share

Visit pancik.com for more.