10 interesting stories served every morning and every evening.




1 1,624 shares, 68 trendiness

Backing up Spotify

Anna’s Blog

Updates about Anna’s Archive, the largest truly open li­brary in hu­man his­tory.

We backed up Spotify (metadata and mu­sic files). It’s dis­trib­uted in bulk tor­rents (~300TB), grouped by pop­u­lar­ity.

This re­lease in­cludes the largest pub­licly avail­able mu­sic meta­data data­base with 256 mil­lion tracks and 186 mil­lion unique ISRCs.

It’s the world’s first preservation archive” for mu­sic which is fully open (meaning it can eas­ily be mir­rored by any­one with enough disk space), with 86 mil­lion mu­sic files, rep­re­sent­ing around 99.6% of lis­tens.

Anna’s Archive nor­mally fo­cuses on text (e.g. books and pa­pers). We ex­plained in The crit­i­cal win­dow of shadow li­braries” that we do this be­cause text has the high­est in­for­ma­tion den­sity. But our mis­sion (preserving hu­man­i­ty’s knowl­edge and cul­ture) does­n’t dis­tin­guish among me­dia types. Sometimes an op­por­tu­nity comes along out­side of text. This is such a case.

A while ago, we dis­cov­ered a way to scrape Spotify at scale. We saw a role for us here to build a mu­sic archive pri­mar­ily aimed at preser­va­tion.

Generally speak­ing, mu­sic is al­ready fairly well pre­served. There are many mu­sic en­thu­si­asts in the world who dig­i­tized their CD and LP col­lec­tions, shared them through tor­rents or other dig­i­tal means, and metic­u­lously cat­a­logued them.

However, these ex­ist­ing ef­forts have some ma­jor is­sues:

Over-focus on the most pop­u­lar artists. There is a long tail of mu­sic which only gets pre­served when a sin­gle per­son cares enough to share it. And such files are of­ten poorly seeded.

Over-focus on the high­est pos­si­ble qual­ity. Since these are cre­ated by au­dio­philes with high end equip­ment and fans of a par­tic­u­lar artist, they chase the high­est pos­si­ble file qual­ity (e.g. loss­less FLAC). This in­flates the file size and makes it hard to keep a full archive of all mu­sic that hu­man­ity has ever pro­duced.

No au­thor­i­ta­tive list of tor­rents aim­ing to rep­re­sent all mu­sic ever pro­duced. An equiv­a­lent of our book tor­rent list (which ag­gre­gate tor­rents from LibGen, Sci-Hub, Z-Lib, and many more) does not ex­ist for mu­sic.

This Spotify scrape is our hum­ble at­tempt to start such a preservation archive” for mu­sic. Of course Spotify does­n’t have all the mu­sic in the world, but it’s a great start.

Before we dive into the de­tails of this col­lec­tion, here is a quick overview:

Spotify has around 256 mil­lion tracks. This col­lec­tion con­tains meta­data for an es­ti­mated 99.9% of tracks.

We archived around 86 mil­lion mu­sic files, rep­re­sent­ing around 99.6% of lis­tens. It’s a lit­tle un­der 300TB in to­tal size.

We pri­mar­ily used Spotify’s popularity” met­ric to pri­or­i­tize tracks. View the top 10,000 most pop­u­lar songs in this HTML file (13.8MB gzipped).

For pop­u­lar­ity>0, we got close to all tracks on the plat­form. The qual­ity is the orig­i­nal OGG Vorbis at 160kbit/s. Metadata was added with­out reen­cod­ing the au­dio (and an archive of diff files is avail­able to re­con­struct the orig­i­nal files from Spotify, as well as a meta­data file with orig­i­nal hashes and check­sums).

For pop­u­lar­ity=0, we got files rep­re­sent­ing about half the num­ber of lis­tens (either orig­i­nal or a copy with the same ISRC). The au­dio is reen­coded to OGG Opus at 75kbit/s — sound­ing the same to most peo­ple, but no­tice­able to an ex­pert.

The cut­off is 2025-07, any­thing re­leased af­ter that date may not be pre­sent (though in some cases it is).

This is by far the largest mu­sic meta­data data­base that is pub­licly avail­able. For com­par­i­son, we have 256 mil­lion tracks, while oth­ers have 50-150 mil­lion. Our data is well-an­no­tated: MusicBrainz has 5 mil­lion unique ISRCs, while our data­base has 186 mil­lion.

This is the world’s first preservation archive” for mu­sic which is fully open (meaning it can eas­ily be mir­rored by any­one with enough disk space).

The data will be re­leased in dif­fer­ent stages on our Torrents page:

[ ] .zstdpatch files (to re­con­struct orig­i­nal files be­fore we added em­bed­ded meta­data)

For now this is a tor­rents-only archive aimed at preser­va­tion, but if there is enough in­ter­est, we could add down­load­ing of in­di­vid­ual files to Anna’s Archive. Please let us know if you’d like this.

Please help pre­serve these files:

Seed these tor­rents (on the Torrents page of Anna’s Archive). Even a seed­ing a few tor­rents helps!

With your help, hu­man­i­ty’s mu­si­cal her­itage will be for­ever pro­tected from de­struc­tion by nat­ural dis­as­ters, wars, bud­get cuts, and other cat­a­stro­phes.

In this blog we will an­a­lyze the data and look at de­tails of the re­lease. We hope you en­joy.

Let’s dive into the data! Here’s some high-level sta­tis­tics pulled from the meta­data:

The most con­ve­nient avail­able way to sort songs on Spotify is us­ing the pop­u­lar­ity met­ric, de­fined as fol­lows:

The pop­u­lar­ity of a track is a value be­tween 0 and 100, with 100 be­ing the most pop­u­lar. The pop­u­lar­ity is cal­cu­lated by al­go­rithm and is based, in the most part, on the to­tal num­ber of plays the track has had and how re­cent those plays are.

Generally speak­ing, songs that are be­ing played a lot now will have a higher pop­u­lar­ity than songs that were played a lot in the past. Duplicate tracks (e.g. the same track from a sin­gle and an al­bum) are rated in­de­pen­dently. Artist and al­bum pop­u­lar­ity is de­rived math­e­mat­i­cally from track pop­u­lar­ity.

If we group songs by pop­u­lar­ity, we see that there is an ex­tremely large tail end:

≥70% of songs are ones al­most no one ever lis­tens to (stream count < 1000). To see some de­tail, we can plot this on a log­a­rith­mic scale:

The top 10,000 songs span pop­u­lar­i­ties 70-100. You can view them all in this HTML file (13.8MB gzipped).

Additionally, we can es­ti­mate the num­ber of lis­tens per track and to­tal num­ber per pop­u­lar­ity. The stream count data is es­ti­mated since it is dif­fi­cult to fetch at scale, so we sam­pled it ran­domly.

As we can see, most of the lis­tens come from songs with a pop­u­lar­ity be­tween 50 and 80, even though there’s only 210.000 songs with pop­u­lar­ity ≥50, around 0.1% of songs. Note the huge (subjectively es­ti­mated) er­ror bar on pop=0 — the rea­son for this is that Spotify does not pub­lish stream counts for songs with < 1000 streams.

We can also es­ti­mate that the top three songs (as of writ­ing) have a higher to­tal stream count than the bot­tom 20-100 mil­lion songs com­bined:

se­lect json_­group_ar­ray(artists.name), tracks.name, tracks.pop­u­lar­ity

from tracks

join track­_artists on track­_rowid = tracks.rowid

join artists on artist_rowid = artists.rowid

where tracks.id in (select id from tracks or­der by pop­u­lar­ity desc limit 3)

group by tracks.id;

Note that the pop­u­lar­ity is very time-de­pen­dent and not di­rectly trans­lat­able into stream counts, so these top songs are ba­si­cally ar­bi­trary.

We have archived around 86 mil­lion songs from Spotify, or­der­ing by pop­u­lar­ity de­scend­ing. While this only rep­re­sents 37% of songs, it rep­re­sents around 99.6% of lis­tens:

Put an­other way, for any ran­dom song a per­son lis­tens to, there is a 99.6% like­li­hood that it is part of the archive. We ex­pect this num­ber to be higher if you fil­ter to only hu­man-cre­ated songs. Do re­mem­ber though that the er­ror bar on lis­tens for pop­u­lar­ity 0 is large.

For pop­u­lar­ity=0, we or­dered tracks by a sec­ondary im­por­tance met­ric based on artist fol­low­ers and al­bum pop­u­lar­ity, and fetched in de­scend­ing or­der.

We have stopped here due to the long tail end with di­min­ish­ing re­turns (700TB+ ad­di­tional stor­age for mi­nor ben­e­fit), as well as the bad qual­ity of songs with pop­u­lar­ity=0 (many AI gen­er­ated, hard to fil­ter).

Before div­ing into more fun stats, let’s look at how the col­lec­tion it­self is struc­tured. It’s in two parts: meta­data and mu­sic files, both of which are dis­trib­uted through tor­rents.

The meta­data tor­rents con­tain, based on sta­tis­ti­cal analy­sis, around 99.9% of artists, al­bums, tracks. The meta­data is pub­lished as com­pact queryable SQLite data­bases. Care was taken, by do­ing API re­sponse re­con­struc­tion, that there is (almost) no data loss in the con­ver­sion from the API JSON.

The meta­data for artists, al­bums, tracks is less than 200 GB com­pressed. The sec­ondary meta­data of au­dio analy­sis is 4TB com­pressed.

We look at more de­tail at the struc­ture of the meta­data at the end of this blog post.

The data it­self is dis­trib­uted in the Anna’s Archive Containers (AAC) for­mat. This is a stan­dard which we cre­ated a few years ago for dis­trib­ut­ing files across mul­ti­ple tor­rents. It is not to be con­fused with the Advanced Audio Coding (AAC) en­cod­ing for­mat.

Since the orig­i­nal files con­tain zero meta­data, as much meta­data as pos­si­ble was added to the OGG files, in­clud­ing ti­tle, url, ISRC, UPC, al­bum art, re­play­gain in­for­ma­tion, etc. The in­valid OGG data packet Spotify prepends to every track file was stripped — it is pre­sent in the track­_­files db.

For pop­u­lar­ity>0, the qual­ity is the orig­i­nal OGG Vorbis at 160kbit/s. Metadata was added with­out reen­cod­ing the au­dio (and an archive of diff files is avail­able to re­con­struct the orig­i­nal files from Spotify).

For pop­u­lar­ity=0, the au­dio is reen­coded to OGG Opus at 75kbit/s — sound­ing the same to most peo­ple, but no­tice­able to an ex­pert.

There is a known bug where the REPLAYGAIN_ALBUM_PEAK vor­bis­com­ment tag value is a copy-paste of REPLAYGAIN_ALBUM_GAIN in­stead of the cor­rect value for many files.

Many peo­ple com­plain about how Spotify shuf­fles tracks. Since we have meta­data for 99.9+% of tracks on Spotify, we can cre­ate a true shuf­fle across all songs on Spotify!

$ sqlite3 spo­ti­fy_­clean.sqlite3

sqlite> .mode table

sqlite> with ran­dom_ids as (select value as inx, (abs(random())%(select max(rowid) from tracks)) as trowid from gen­er­ate_se­ries(0)) se­lect inx,tracks.id,tracks.pop­u­lar­ity,tracks.name from ran­dom_ids join tracks on tracks.rowid=trowid limit 20;

| inx | id | pop­u­lar­ity | name |

| 0 | 7KS7cm2arAGA2VZaZ2XvNa | 0 | Just Derry |

| 1 | 1BkLS2tmxD088l2ojUW5cv | 0 | Kapitel 37 - Aber erst wird gegessen - Schon wieder Weihnach |

| | | | ten mit der buck­li­gen Verwandtschaft |

| 2 | 5RSU7MELzCaPweG8ALmjLK | 0 | El Buen Pastor |

| 3 | 1YNIl8AKIFltYH8O2coSoT | 0 | You Are The One |

| 4 | 1GxMuEYWs6Lzbn2EcHAYVx | 0 | Waorani |

| 5 | 4NhARf6pjwDpbyQdZeSsW3 | 0 | Magic in the Sand |

| 6 | 7pDrZ6rGaO6FHk6QtTKvQo | 0 | Yo No Fui |

| 7 | 15w4LBQ6rkf3QA2OiSMBRD | 25 | 你走 |

| 8 | 5Tx7jRLKfYlay199QB2MSs | 0 | Soul Clap |

| 9 | 3L7CkCD9595MuM0SVuBZ64 | 1 | Xuân Và Tuổi Trẻ |

| 10 | 4S6EkSnfxlU5UQUOZs7bKR | 1 | Elle était belle |

| 11 | 0ZIOUYrrArvSTq6mrbVqa1 | 0 | Kapitel 7.2 - Die Welt der Magie - 4 in 1 Sammelband: Weiße |

| | | | Magie | Medialität, Channeling & Trance | Divination & Wahrs |

| | | | agen | Energetisches Heilen |

| 12 | 4VfKaW1X1FKv8qlrgKbwfT | 0 | Pura en­er­gia |

| 13 | 1VugH5kD8tnMKAPeeeTK9o | 10 | Dalia |

| 14 | 6NPPbOybTFLL0LzMEbVvuo | 4 | Teil 12 - Folge 2: Arkadien brennt |

| 15 | 1VSVrAbaxNllk7ojNGXDym | 3 | Bre Petrunko |

| 16 | 4NSmBO7uzkuES7vDLvHtX8 | 0 | Paranoia |

| 17 | 7AHhiIXvx09DRZGQIsbcxB | 0 | Sand Underfoot Moments |

| 18 | 0sitt32n4JoSM1ewOWL7hs | 0 | Start Over Again |

| 19 | 080Zimdx271ixXbzdZOqSx | 3 | Auf all eu­ren Wegen |

Or, fil­ter­ing to only some­what pop­u­lar songs

sqlite> with ran­dom_ids as (select value as inx, (abs(random())%(select max(rowid) from tracks)) as trowid from gen­er­ate_se­ries(0)) se­lect inx,tracks.id,tracks.pop­u­lar­ity,al­bums.name as al­bum_­name,tracks.name from ran­dom_ids join tracks on tracks.rowid=trowid join al­bums on al­bums.rowid = al­bum_rowid

where tracks.pop­u­lar­ity >= 10 limit 20;

| inx | id | pop­u­lar­ity | al­bum_­name | name |

| 32 | 1om6LphEpiLpl9irlOsnzb | 23 | The Essential Widespread Panic | Love Tractor |

| 47 | 2PCtPCRDia6spej5xcxbvW | 20 | Desatinos Desplumados | Sirena |

| 65 | 5wmR10WloZqVVdIpYhdaqq | 20 | Um Passeio pela Harpa Cristã - Vol 6 | As Santas Escrituras |

| 89 | 5xCuYNX3QlPsxhKLbWlQO9 | 11 | No Me Amenaces | No Me Amenaces |

| 96 | 2GRmiDIcIwhQnkxakNyUy4 | 16 | Very Bad Truth (Kingston Universi… | Kapitel 8.3 - Very Bad Truth |

| 98 | 5720pe1PjNXoMcbDPmyeLW | 11 | Kleiner Eisbär: Hilf mir fliegen! | Kapitel 06: Hilf mir fliegen! |

| 109 | 1mRXGNVsfD9UtFw6r5YtzF | 11 | Lunar Archive | Outdoor Seating |

| 110 | 5XOQwf6vkcJxWG9zgqVEWI | 19 | Teenage Dream | Firework |

| 125 | 0rbHOp8B4CpPXXZSekySvv | 15 | Previa y Cachengue 2025 | Debi tirar mas fo­tos |

...

Read the original on annas-archive.li »

2 1,477 shares, 58 trendiness

60 Minutes : CBS News : Free Download, Borrow, and Streaming : Internet Archive

Skip to main con­tent

Ask the pub­lish­ers to re­store ac­cess to 500,000+ books.

8 Days Left: The year is al­most over—help us fin­ish strong in 2025!

Please Don’t Scroll Past This

Can you chip in? As an in­de­pen­dent non­profit, the Internet Archive is fight­ing for uni­ver­sal ac­cess to qual­ity in­for­ma­tion. We build and main­tain all our own sys­tems, but we don’t charge for ac­cess, sell user in­for­ma­tion, or run ads. We’d be deeply grate­ful if you’d join the one in a thou­sand users that sup­port us fi­nan­cially.

We un­der­stand that not every­one can do­nate right now, but if you can af­ford to con­tribute this Thursday, we promise it will be put to good use. Our re­sources are cru­cial for knowl­edge lovers every­where—so if you find all these bits and bytes use­ful, please pitch in.

Please Don’t Scroll Past This The Internet Archive is work­ing to keep the record straight by record­ing gov­ern­ment web­sites, news pub­li­ca­tions, his­tor­i­cal doc­u­ments, and more. If you find our li­brary use­ful, please pitch in.

Remind Me

By sub­mit­ting, you agree to re­ceive donor-re­lated emails from the Internet Archive. Your pri­vacy is im­por­tant to us. We do not sell or trade your in­for­ma­tion with any­one.

An icon used to rep­re­sent a menu that can be

tog­gled by in­ter­act­ing with this icon.

An il­lus­tra­tion of an open book.

An il­lus­tra­tion of two cells of a film

strip.

An il­lus­tra­tion of an au­dio speaker.

An il­lus­tra­tion of two pho­tographs.

An il­lus­tra­tion of a per­son’s head and chest.

An il­lus­tra­tion of a hor­i­zon­tal line over an up

point­ing ar­row.

Search the his­tory of more than 1 tril­lion web pages.

Capture a web page as it ap­pears now for use as a trusted ci­ta­tion in the fu­ture.

Internet Archive’s in-browser video theater” re­quires JavaScript to be en­abled.

It ap­pears your browser does not have it turned on.

Please see your browser set­tings for this fea­ture.

Sharyn Alfonsi’s Inside CECOT for 60 Minutes, which was cen­sored by Bari Weiss, as it ap­peared on Canada’s Global TV app.

...

Read the original on archive.org »

3 1,350 shares, 56 trendiness

Jmail, logged in as jeevacation@gmail.com

...

Read the original on www.jmail.world »

4 1,272 shares, 49 trendiness

mquickjs/README.md at main · bellard/mquickjs

To see all avail­able qual­i­fiers, see our doc­u­men­ta­tion.

We read every piece of feed­back, and take your in­put very se­ri­ously.

Secure your code as you build

To see all avail­able qual­i­fiers, see our doc­u­men­ta­tion.

We read every piece of feed­back, and take your in­put very se­ri­ously.

Secure your code as you build

You signed in with an­other tab or win­dow. Reload to re­fresh your ses­sion.

You signed out in an­other tab or win­dow. Reload to re­fresh your ses­sion.

You switched ac­counts on an­other tab or win­dow. Reload to re­fresh your ses­sion.

...

Read the original on github.com »

5 1,067 shares, 44 trendiness

Cardiff couple invited man in for Christmas, he stayed for 45 years

Christmas is of­ten re­garded as a time for good­will, but one young UK cou­ple’s act of kind­ness 50 years ago changed their lives for­ever.

On 23 December 1975, Rob Parsons and his wife Dianne were prepar­ing for Christmas at their Cardiff home when they heard a knock at the door.

On their doorstep stood a man with a bin bag con­tain­ing his pos­ses­sions in his right hand and a frozen chicken in his left.

Rob stud­ied the man’s face and vaguely re­mem­bered him as Ronnie Lockwood, some­one he would oc­ca­sion­ally see at Sunday School as a boy and who he was told to be kind to as he was a bit dif­fer­ent”.

I said Ronnie, what’s with the chicken?’ He said somebody gave it to me for Christmas’. And then I said two words that changed all of our lives.

And I’m not ex­actly sure why I said them. I said come in.”

...

Read the original on www.bbc.co.uk »

6 934 shares, 37 trendiness

Some Epstein file redactions are being undone with hacks

People ex­am­in­ing doc­u­ments re­leased by the Department of Justice in the Jeffrey Epstein case dis­cov­ered that some of the file redac­tion can be un­done with Photoshop tech­niques, or by sim­ply high­light­ing text to paste into a word pro­cess­ing file.

Un-redacted text from these doc­u­ments be­gan cir­cu­lat­ing through so­cial me­dia on Monday evening. An ex­hibit in a civil case in the Virgin Islands against Darren K Indyke and Richard D Kahn, two ex­ecu­tors of Epstein’s es­tate, con­tains redacted al­le­ga­tions ex­plain­ing how Epstein and his as­so­ci­ates had fa­cil­i­tated the sex­ual abuse of chil­dren. The ex­hibit was the sec­ond amended com­plaint in the state case against Indyke and Kahn.

In sec­tion 85, the redacted por­tion states: Between September 2015 and June 2019, Indyke signed (FAC) for over $400,000 made payable to young fe­male mod­els and ac­tresses, in­clud­ing a for­mer Russian model who re­ceived over $380,000 through monthly pay­ments of $8,333 made over a pe­riod of more than three and a half years un­til the mid­dle of 2019.”

Prosecutors in the Virgin Islands set­tled its civil sex-traf­fick­ing case against Epstein’s es­tate, Indyke and Kahn in 2022 for $105m, plus one half of the pro­ceeds from the sale of Little St James, the is­land on which Epstein resided and on which many of his crimes oc­curred. The jus­tice de­part­ment press re­lease an­nounc­ing the set­tle­ment did not in­clude an ad­mis­sion of li­a­bil­ity.

Indyke, an at­tor­ney who rep­re­sented Epstein for decades, has not been crim­i­nally in­dicted by fed­eral au­thor­i­ties. He was hired by the Parlatore Law Group in 2022, be­fore the jus­tice de­part­ment set­tled the Epstein case. That firm rep­re­sents the de­fense sec­re­tary, Pete Hegseth, and pre­vi­ously rep­re­sented Donald Trump in his de­fense against charges stem­ming from the dis­cov­ery of clas­si­fied gov­ern­ment doc­u­ments stored at Trump’s Florida es­tate. Calls and email seek­ing com­ment from Indyke and the Parlatore Law Group have not yet been re­turned.

Trump has re­peat­edly de­nied any knowl­edge of or in­volve­ment in Epstein’s crim­i­nal ac­tiv­i­ties and any wrong­do­ing.

Other sec­tions fur­ther al­lege how Epstein’s en­ter­prise con­cealed crimes.

Defendants also at­tempted to con­ceal their crim­i­nal sex traf­fick­ing and abuse, con­duct by pay­ing large sums of money to par­tic­i­pant-wit­nesses, in­clud­ing by pay­ing for their at­tor­neys’ fees and case costs in lit­i­ga­tion re­lated to this con­duct,” reads one redacted pas­sage.

Epstein also threat­ened harm to vic­tims and helped re­lease dam­ag­ing sto­ries about them to dam­age their cred­i­bil­ity when they tried to go pub­lic with their sto­ries of be­ing traf­ficked and sex­u­ally abused. Epstein also in­structed one or more Epstein Enterprise par­tic­i­pant-wit­nesses to de­stroy ev­i­dence rel­e­vant to on­go­ing court pro­ceed­ings in­volv­ing Defendants’ crim­i­nal sex traf­fick­ing and abuse con­duct.”

Redactions of sec­tions 184 through 192 of the doc­u­ment de­scribe prop­erty taxes paid by com­pa­nies in­cor­po­rated by Epstein on prop­er­ties that were not on the bal­ance sheet for those firms.

For in­stance, Cypress’s Balance Sheet as of December 31, 2018 did not re­flect any as­sets other than cash of $18,824. Further, Cypress re­ported only $301 in ex­penses for the year ended December 31, 2018, de­spite it pay­ing $106,394.60 in Santa Fe prop­erty taxes on November 6, 2018,” reads one redacted pas­sage.

Similarly, in 2017, Cypress re­ported as its only as­set cash in the amount of $29,736 and ex­penses of $150, de­spite it pay­ing $55,770.41 and $113,679.56 in Santa Fe prop­erty taxes dur­ing 2017.”

The Epstein Files Transparency Act signed into law last month per­mits the Department of Justice to with­hold cer­tain in­for­ma­tion such as the per­sonal in­for­ma­tion of vic­tims and ma­te­ri­als that would jeop­ar­dize an ac­tive fed­eral in­ves­ti­ga­tion”.

It was un­clear how prop­erty ma­te­r­ial com­plies with the redac­tion stan­dard un­der the law. An in­quiry to the Department of Justice has not yet been an­swered.

...

Read the original on www.theguardian.com »

7 740 shares, 42 trendiness

Maybe the Default Settings Are Too High

I’ve been read­ing Lord of the Rings for two months and I’m just at the end of the first part. It’s not be­cause I’m not en­joy­ing it. It’s one of the most en­joy­able read­ing ex­pe­ri­ences I can re­mem­ber.

From the be­gin­ning, I’ve read the whole thing aloud. I’ve found read­ing aloud help­ful for stay­ing en­gaged — lim­it­ing my­self to mouth-speed rather than eye-speed means I won’t rush, miss im­por­tant de­tails, and then lose in­ter­est, which has al­ways been a prob­lem for me.

At first I was anx­ious to read a 1,500-page book this way, be­cause it would take so long. But, as some­one pointed out to me, if I’m en­joy­ing it, why would I want to be done with it sooner?

So I tried slow­ing down even more, and dis­cov­ered some­thing. I slowed to a pace that felt al­most ab­surd, treat­ing each sen­tence as though it might be a par­tic­u­larly im­por­tant one. I gave each one maybe triple the usual time and at­ten­tion, ig­nor­ing the fact that there are hun­dreds of pages to go.

This leisurely pace made Middle-Earth blos­som be­fore my eyes. When I paused af­ter each comma, and let each sen­tence ring for a small mo­ment af­ter the pe­riod, the events of the story reached me with more weight and strength. That ex­tra time gave space for Tolkien’s im­ages and moods to prop­a­gate in my mind, which they did au­to­mat­i­cally.

Some part of me still wanted to rush and get on with it, to make good time, to gloss over the songs and lore to get to Moria and Mount Doom and the other mar­quee mo­ments of the story. But the more I ig­nored that im­pulse, the bet­ter the ex­pe­ri­ence got.

By of­fer­ing the book about triple the usual amount of at­ten­tive­ness, I was get­ting about triple the sto­ry­ness (i.e. mean­ing, en­gage­ment, lit­er­ary plea­sure). Whatever the thing is that I’m seek­ing when I pick up a novel in the first place, there’s much more of it avail­able at this pace.

This ef­fect re­minded me of a para­dox around eat­ing I rec­og­nized long ago. When you slow down your eat­ing speed, say to half or a third your de­fault speed, you get much more en­joy­ment out of a smaller amount of food. The ex­tra at­ten­tion given to each bite al­lows more of the good stuff,” what­ever that is ex­actly, to reach you.

What’s para­dox­i­cal is that it’s pre­cisely the seek­ing of that good stuff” that nor­mally dri­ves me to eat so quickly, and miss most of what I’m seek­ing. When you try to bar­rel ahead to ac­cess the good stuff quicker, you get less of it in the end. Slow down and much more of it is re­leased.

And it’s re­leased au­to­mat­i­cally, in both read­ing and eat­ing. You don’t have to search it out. The good stuff (the mean­ing in the text, the plea­sure in the eat­ing) just rises up to meet you in that ex­tra time you give it. Slowing down, and of­fer­ing more time to the act of con­sump­tion, im­me­di­ately in­creases read­ing com­pre­hen­sion (and eat­ing com­pre­hen­sion).

Both are anal­o­gous to slow­ing down while you vac­uum a car­pet. If you pass the vac­uum head too quickly, you miss half the dirt. Slow down, and you can hear how much more grit is sent skit­ter­ing up the tube. The suc­tion and bris­tles are work­ing, but they need more time to do their work fully, to draw up the deeper-ly­ing stuff.

It seems that my de­fault con­sump­tion speeds for read­ing and eat­ing (and maybe every­thing else) re­duce the re­wards of those things sig­nif­i­cantly, un­der­min­ing the point of do­ing ei­ther.

Part of it is my own im­pa­tience. But I also sus­pect that mod­ern liv­ing, with its in­fi­nite sup­ply of con­sum­ables, tends to push our rate-of-in­take di­als too high. I’m not go­ing to run out of books, or snacks, or op­por­tu­ni­ties to learn some­thing. There’s al­ways more, so not every crust of bread or printed page needs to be ap­pre­ci­ated fully.

Internally though, the mind is jug­gling like Lucy and Ethel on the con­veyor belt at the choco­late fac­tory. Our re­cep­tors for mean­ing and ap­pre­ci­a­tion, like the vac­uum head, need more time to do their full work, to make all the con­nec­tions they’re de­signed to make.

It might sound like I’m just of­fer­ing clichés — less is more, stop and smell the roses, take your time — and I guess I am. But clichés suf­fer the same is­sue: they are of­ten pro­found in­sights, con­sumed and passed on too rapidly for their real mean­ing to reg­is­ter any­more. You re­ally should stop and smell roses, as you know if you’re in the habit of do­ing that.

At least see what hap­pens when you re­duce your con­sump­tion speed — of any­thing, but es­pe­cially books, in­for­ma­tion, and food — by a half, or two thirds. Notice that (1) some­thing in you re­ally wants to plow through at the high­est vi­able set­ting, and (2) how much more of the re­ward is re­leased when you slow down any­way.

As far as I can tell, al­most every­thing be­comes more sat­is­fy­ing when you give it more time and in­ten­tion, even things like check­ing the mail­box or writ­ing a shop­ping list.

Slowing down your rate of con­sump­tion will in­evitably change what you want to con­sume. Reading throw­away news ar­ti­cles or AI slop with great care and at­ten­tion is only go­ing to show you how empty of value it is. Reading dense writ­ing in inky old books, crafted for your mind by great mas­ters, be­comes eas­ier with­out the rushed pace, and the mean­ing just blooms out of it.

Same with food. Try to sa­vor a cheap, waxy chocolate” bar, or a bag of store-brand cheese puffs, and you dis­cover a harsh taste that you don’t want to look at too closely. Enjoy a home­made pas­try with great at­ten­tion, and dis­cover there’s even more in it than you re­al­ized.

Mass pro­duc­tion is good in so many ways, but the faster we tend to con­sume its fruits, the more we end up seek­ing things for their glossy, can­died sur­faces. The more we go for these sur­face-level re­wards, the more the cul­ture fo­cuses on of­fer­ing only that part — such as TikTok videos, processed food, CGI-forward movies, and pub­lic dis­course in the form of un­ex­am­ined talk­ing points.

Who knows how far we’ve drifted from the best modes of con­sum­ing the things we value. Once some­thing be­comes a norm, it seems like an ap­pro­pri­ate stan­dard, no mat­ter how much has been lost. Apparently, read­ing silently and alone was un­usual un­til as late as the 18th cen­tury. Certainly sit-down meals and cook­ing at home were.

I don’t mean to sound like a scold. Let’s say none of this is morally good or bad. It’s just that in so much of what we do, we could be get­ting much more of the part of it that we re­ally seek — but it’s only avail­able at slower speeds.

If you’re cu­ri­ous, try con­sum­ing things more slowly, so slowly it seems silly to oth­ers — say a third your ha­bit­ual speed — and see what rises up to meet you.

Recently I opened a dis­cus­sion fo­rum for Raptitude read­ers who want to give some­thing up for the month of December (alcohol, so­cial me­dia, snacks, etc).

It’s been a real suc­cess, and many peo­ple want to do some­thing sim­i­lar in January. If you want to quit some­thing, or just give it up for a month, you’re in­vited to join.

Follow this link at the end of this post to get an in­vite.

...

Read the original on www.raptitude.com »

8 737 shares, 30 trendiness

Flock Exposed Its AI-Powered Cameras to the Internet. We Tracked Ourselves

Flock

Flock Exposed Its AI-Powered Cameras to the Internet. We Tracked Ourselves

Flock left at least 60 of its peo­ple-track­ing Condor PTZ cam­eras live stream­ing and ex­posed to the open in­ter­net.

I am stand­ing on the cor­ner of Harris Road and Young Street out­side of the Crossroads Business Park in Bakersfield, California, look­ing up at a Flock sur­veil­lance cam­era bolted high above a traf­fic sig­nal. On my phone, I am watch­ing my­self in real time as the cam­era records and livestreams me—with­out any pass­word or lo­gin—to the open in­ter­net. I wan­der into the in­ter­sec­tion, stare at the cam­era and wave. On the livestream, I can see my­self clearly. Hundreds of miles away, my col­leagues are re­motely watch­ing me too through the ex­posed feed. Flock left livestreams and ad­min­is­tra­tor con­trol pan­els for at least 60 of its AI-enabled Condor cam­eras around the coun­try ex­posed to the open in­ter­net, where any­one could watch them, down­load 30 days worth of video archive, and change set­tings, see log files, and run di­ag­nos­tics. Un­like many of Flock’s cam­eras, which are de­signed to cap­ture li­cense plates as peo­ple drive by, Flock’s Condor cam­eras are pan-tilt-zoom (PTZ) cam­eras de­signed to record and track peo­ple, not ve­hi­cles. Condor cam­eras can be set to au­to­mat­i­cally zoom in on peo­ple’s faces as they walk through a park­ing lot, down a pub­lic street, or play on a play­ground, or they can be con­trolled man­u­ally, ac­cord­ing to mar­ket­ing ma­te­r­ial on Flock’s web­site. We watched Condor cam­eras zoom in on a woman walk­ing her dog on a bike path in sub­ur­ban Atlanta; a cam­era fol­lowed a man walk­ing through a Macy’s park­ing lot in Bakersfield; sur­veil chil­dren swing­ing on a swingset at a play­ground; and film high-res video of peo­ple sit­ting at a stop­light in traf­fic. In one case, we were able to watch a man rollerblade down Brookhaven, Georgia’s Peachtree Creek Greenway bike path. The Flock cam­era zoomed in on him and tracked him as he rolled past. Minutes later, he showed up on an­other ex­posed cam­era livestream fur­ther down the bike path. The cam­er­a’s res­o­lu­tion was good enough that we were able to see that, when he stopped be­neath one of the cam­eras, he was watch­ing rollerblad­ing videos on his phone.The ex­po­sure was ini­tially dis­cov­ered by YouTuber and tech­nol­o­gist Benn Jordan and was shared with se­cu­rity re­searcher Jon GainSec” Gaines, who re­cently found nu­mer­ous vul­ner­a­bil­i­ties in sev­eral other mod­els of Flock’s au­to­mated li­cense plate reader (ALPR) cam­eras. They shared the de­tails of what they found  with me, and I ver­i­fied many of the de­tails seen in the ex­posed por­tals by dri­ving to Bakersfield to walk in front of two cam­eras there while I watched my­self on the livestream. I also pulled Flock’s con­tracts with cities for Condor cam­eras, pulled de­tails from com­pany pre­sen­ta­tions about the tech­nol­ogy, and ge­olo­cated a hand­ful of the cam­eras to cities and towns across the United States. Jordan also filmed him­self in front of sev­eral of the cam­eras on the Peachtree Creek Greenway bike path. Jordan said he and Gaines dis­cov­ered many of the ex­posed cam­eras with Shodan, an in­ter­net of things search en­gine that re­searchers reg­u­larly use to iden­tify im­prop­erly se­cured de­vices. Af­ter find­ing links to the feed, immediately, we were just with­out any user­name, with­out any pass­word, we were just see­ing every­thing from play­grounds to park­ing lots with peo­ple, Christmas shop­ping and un­load­ing their stuff into cars,” Jordan told me in an in­ter­view. I think it was like the first time that I ac­tu­ally got like im­me­di­ately scared … I think the one that af­fected me most was as play­ground. You could see un­at­tended kids, and that’s some­thing I want peo­ple to know about so they can un­der­stand how dan­ger­ous this is.” In a YouTube video about his re­search, Jordan said he was able to use footage pulled from the ex­posed feed to iden­tify spe­cific peo­ple us­ing open source in­ves­ti­ga­tion tools in or­der to show how triv­ially an ex­po­sure like this could be abused.

This post is for paid mem­bers only

Become a paid mem­ber for un­lim­ited ad-free ac­cess to ar­ti­cles, bonus pod­cast con­tent, and more.

Subscribe

Sign up for free ac­cess to this post

Free mem­bers get ac­cess to posts like this one along with an email round-up of our week’s sto­ries.

Subscribe

Already have an ac­count? Sign in

More like this

Flock Uses Overseas Gig Workers to Build its Surveillance AI

Flock ac­ci­den­tally ex­posed train­ing ma­te­ri­als and a panel which tracked what its AI an­no­ta­tors were work­ing on. It showed that Flock, which has cam­eras in thou­sands of U.S. com­mu­ni­ties, is us­ing work­ers in the Philippines to re­view and clas­sify footage.

Cops Used Flock to Monitor No Kings Protests Around the Country

A mas­sive cache of Flock lookups col­lated by the Electronic Frontier Foundation (EFF) shows as many as 50 fed­eral, state, and lo­cal agen­cies used Flock dur­ing protests over the last year.

Most dri­vers are un­aware that San Jose’s Police Department is track­ing their lo­ca­tions and do not know all that their saved lo­ca­tion data can re­veal about their pri­vate lives and ac­tiv­i­ties.”

Why I Quit Streaming And Got Back Into Cassettes

In the age of Spotify and AI slop, tapes re­mind us what we’re miss­ing when we stop tak­ing risks.

Podcast: We Tracked Ourselves with Exposed Flock Cameras

How we tracked our­selves with ex­posed Flock cam­eras; a year in re­view; and our per­sonal rec­om­men­da­tions on all sorts of things.

iCloud, Mega, and as a tor­rent. Archivists have up­loaded the 60 Minutes episode Bari Weiss spiked.

...

Read the original on www.404media.co »

9 710 shares, 27 trendiness

Ruby 4.0.0 Released

We are pleased to an­nounce the re­lease of Ruby 4.0.0. Ruby 4.0 in­tro­duces Ruby Box” and ZJIT, and adds many im­prove­ments.

Ruby Box is a new (experimental) fea­ture to pro­vide sep­a­ra­tion about de­f­i­n­i­tions. Ruby Box is en­abled when an en­vi­ron­ment vari­able RUBY_BOX=1 is spec­i­fied. The class is Ruby::Box.

Definitions loaded in a box are iso­lated in the box. Ruby Box can iso­late/​sep­a­rate mon­key patches, changes of global/​class vari­ables, class/​mod­ule de­f­i­n­i­tions, and loaded na­tive/​ruby li­braries from other boxes.

* Run test cases in box to pro­tect other tests when the test case uses mon­key patches to over­ride some­thing

* Run web app boxes in par­al­lel to ex­e­cute blue-green de­ploy­ment on an app server in a Ruby process

* Run web app boxes in par­al­lel to eval­u­ate de­pen­dency up­dates for a cer­tain pe­riod of time by check­ing re­sponse diff us­ing Ruby code

* Used as the foun­da­tion (low-level) API to im­ple­ment kind of package” (high-level) API (it is not de­signed yet)

For the de­tail of Ruby Box”, see Ruby::Box. [Feature #21311] [Misc #21385]

ZJIT is a new just-in-time (JIT) com­piler, which is de­vel­oped as the next gen­er­a­tion of YJIT. You need Rust 1.85.0 or newer to build Ruby with ZJIT sup­port, and ZJIT is en­abled when –zjit is spec­i­fied.

We’re build­ing a new com­piler for Ruby be­cause we want to both raise the per­for­mance ceil­ing (bigger com­pi­la­tion unit size and SSA IR) and en­cour­age more out­side con­tri­bu­tion (by be­com­ing a more tra­di­tional method com­piler). See our blog post for more de­tails.

ZJIT is faster than the in­ter­preter, but not yet as fast as YJIT. We en­cour­age you to ex­per­i­ment with ZJIT, but maybe hold off on de­ploy­ing it in pro­duc­tion for now. Stay tuned for Ruby 4.1 ZJIT.

Ractor, Ruby’s par­al­lel ex­e­cu­tion mech­a­nism, has re­ceived sev­eral im­prove­ments. A new class, Ractor::Port, was in­tro­duced to ad­dress is­sues re­lated to mes­sage send­ing and re­ceiv­ing (see our blog post). Additionally, Ractor.shareable_proc makes it eas­ier to share Proc ob­jects be­tween Ractors.

On the per­for­mance side, many in­ter­nal data struc­tures have been im­proved to sig­nif­i­cantly re­duce con­tention on a global lock, un­lock­ing bet­ter par­al­lelism. Ractors also now share less in­ter­nal data, re­sult­ing in less CPU cache con­tention when run­ning in par­al­lel.

Ractor was first in­tro­duced in Ruby 3.0 as an ex­per­i­men­tal fea­ture. We aim to re­move its experimental” sta­tus next year.

*nil no longer calls nil.to_a, sim­i­lar to how **nil does not call nil.to_hash. [Feature #21047]

Logical bi­nary op­er­a­tors (||, &&, and and or) at the be­gin­ning of a line con­tinue the pre­vi­ous line, like flu­ent dot. The fol­low­ing code ex­am­ples are equal:

We only list stdlib changes that are no­table fea­ture changes.

Other changes are listed in the fol­low­ing sec­tions. We also listed re­lease his­tory from the pre­vi­ous bun­dled ver­sion that is Ruby 3.4.0 if it has GitHub re­leases.

The fol­low­ing bun­dled gems are pro­moted from de­fault gems.

The fol­low­ing de­fault gem is added.

The fol­low­ing de­fault gems are up­dated.

The fol­low­ing bun­dled gems are up­dated.

Ruby 4.0 bun­dled RubyGems and Bundler ver­sion 4. see the fol­low­ing links for de­tails.

Dropped sup­port for MSVC ver­sions older than 14.0 (_MSC_VER 1900).

This means Visual Studio 2015 or later is now re­quired.

* Dropped sup­port for MSVC ver­sions older than 14.0 (_MSC_VER 1900).

This means Visual Studio 2015 or later is now re­quired.

The fol­low­ing meth­ods were re­moved from Ractor due to the ad­di­tion of Ractor::Port:

Process::Status#& and Process::Status#>> have been re­moved. They were dep­re­cated in Ruby 3.3. [Bug #19868]

rb_­path_check has been re­moved. This func­tion was used for

$SAFE path check­ing which was re­moved in Ruby 2.7, and was al­ready dep­re­cated. [Feature #20971]

A back­trace for ArgumentError of wrong num­ber of ar­gu­ments” now in­clude the re­ceiver’s class or mod­ule name (e.g., in Foo#bar

in­stead of in bar). [Bug #21698]

Backtraces no longer dis­play in­ter­nal frames. These meth­ods now ap­pear as if it is in the Ruby source file, con­sis­tent with other C-implemented meth­ods. [Bug #20968]

ruby -e [1].fetch_values(42)’

:211:in Array#fetch’: in­dex 42 out­side of ar­ray bounds: -1…1 (IndexError)

from :211:in block in Array#fetch_values’

from

$ ruby -e [1].fetch_values(42)’

-e:1:in Array#fetch_values’: in­dex 42 out­side of ar­ray bounds: -1…1 (IndexError)

from -e:1:in ′

CGI li­brary is re­moved from the de­fault gems. Now we only pro­vide cgi/​es­cape for the fol­low­ing meth­ods:

With the move of Set from stdlib to core class, set/​sort­ed_set.rb has been re­moved, and SortedSet is no longer an au­toloaded con­stant. Please in­stall the sort­ed_set gem and re­quire sorted_set’ to use SortedSet. [Feature #21287]

The de­fault be­hav­ior of au­to­mat­i­cally set­ting the Content-Type header

to ap­pli­ca­tion/​x-www-form-ur­len­coded for re­quests with a body

(e.g., POST, PUT) when the header was not ex­plic­itly set has been

re­moved. If your ap­pli­ca­tion re­lied on this au­to­matic de­fault, your

re­quests will now be sent with­out a Content-Type header, po­ten­tially

break­ing com­pat­i­bil­ity with cer­tain servers.

[GH-net-http #205]

* The de­fault be­hav­ior of au­to­mat­i­cally set­ting the Content-Type header

to ap­pli­ca­tion/​x-www-form-ur­len­coded for re­quests with a body

(e.g., POST, PUT) when the header was not ex­plic­itly set has been

re­moved. If your ap­pli­ca­tion re­lied on this au­to­matic de­fault, your

re­quests will now be sent with­out a Content-Type header, po­ten­tially

break­ing com­pat­i­bil­ity with cer­tain servers.

[GH-net-http #205]

rb_thread­_fd_­close is dep­re­cated and now a no-op. If you need to ex­pose

file de­scrip­tors from C ex­ten­sions to Ruby code, cre­ate an IO in­stance

us­ing RUBY_IO_MODE_EXTERNAL and use rb_io_­close(io) to close it (this

also in­ter­rupts and waits for all pend­ing op­er­a­tions on the IO

in­stance). Directly clos­ing file de­scrip­tors does not in­ter­rupt pend­ing

op­er­a­tions, and may lead to un­de­fined be­hav­iour. In other words, if two

IO ob­jects share the same file de­scrip­tor, clos­ing one does not af­fect

the other. [Feature #18455]

* rb_thread­_fd_­close is dep­re­cated and now a no-op. If you need to ex­pose

file de­scrip­tors from C ex­ten­sions to Ruby code, cre­ate an IO in­stance

us­ing RUBY_IO_MODE_EXTERNAL and use rb_io_­close(io) to close it (this

also in­ter­rupts and waits for all pend­ing op­er­a­tions on the IO

in­stance). Directly clos­ing file de­scrip­tors does not in­ter­rupt pend­ing

op­er­a­tions, and may lead to un­de­fined be­hav­iour. In other words, if two

IO ob­jects share the same file de­scrip­tor, clos­ing one does not af­fect

the other. [Feature #18455]

rb_thread­_­cal­l_with­_gvl now works with or with­out the GVL.

This al­lows gems to avoid check­ing ru­by_thread­_has_gvl_p.

Please still be dili­gent about the GVL. [Feature #20750]

* rb_thread­_­cal­l_with­_gvl now works with or with­out the GVL.

This al­lows gems to avoid check­ing ru­by_thread­_has_gvl_p.

Please still be dili­gent about the GVL. [Feature #20750]

A C API for Set has been added. The fol­low­ing meth­ods are sup­ported: [Feature #21459]

A C API for Set has been added. The fol­low­ing meth­ods are sup­ported: [Feature #21459]

* Class#new (ex. Object.new) is faster in all cases, but es­pe­cially when pass­ing key­word ar­gu­ments. This has also been in­te­grated into YJIT and ZJIT. [Feature #21254]

* GC heaps of dif­fer­ent size pools now grow in­de­pen­dently, re­duc­ing mem­ory us­age when only some pools con­tain long-lived ob­jects

* GC sweep­ing is faster on pages of large ob­jects

* Generic ivar” ob­jects (String, Array, TypedData, etc.) now use a new in­ter­nal fields” ob­ject for faster in­stance vari­able ac­cess

* The GC avoids main­tain­ing an in­ter­nal id2ref table un­til it is first used, mak­ing ob­jec­t_id al­lo­ca­tion and GC sweep­ing faster

* ob­jec­t_id and hash are faster on Class and Module ob­jects

* Random, Enumerator::Product, Enumerator::Chain, Addrinfo,

StringScanner, and some in­ter­nal ob­jects are now write-bar­rier pro­tected,

which re­duces GC over­head.

A lot of work has gone into mak­ing Ractors more sta­ble, per­for­mant, and us­able. These im­prove­ments bring Ractor im­ple­men­ta­tion closer to leav­ing ex­per­i­men­tal sta­tus.

* Performance im­prove­ments

Frozen strings and the sym­bol table in­ter­nally use a lock-free hash set [Feature #21268]

Class (and generic ivar) in­stance vari­able ac­cess is faster and avoids lock­ing

CPU cache con­tention is avoided in ob­ject al­lo­ca­tion by us­ing a per-rac­tor counter

CPU cache con­tention is avoided in xmal­loc/​xfree by us­ing a thread-lo­cal counter

* Frozen strings and the sym­bol table in­ter­nally use a lock-free hash set [Feature #21268]

* Class (and generic ivar) in­stance vari­able ac­cess is faster and avoids lock­ing

* CPU cache con­tention is avoided in ob­ject al­lo­ca­tion by us­ing a per-rac­tor counter

* CPU cache con­tention is avoided in xmal­loc/​xfree by us­ing a thread-lo­cal counter

...

Read the original on www.ruby-lang.org »

10 687 shares, 28 trendiness

Introducing CSS Grid Lanes

It’s here, the fu­ture of ma­sonry lay­outs on the web! After the ground­work laid by Mozilla, years of ef­fort by Apple’s WebKit team, and many rounds de­bate at the CSS Working Group with all the browsers, it’s now clear how it works.

.container {

dis­play: grid-lanes;

grid-tem­plate-columns: re­peat(auto-fill, min­max(250px, 1fr));

gap: 16px;

Try it to­day in Safari Technology Preview 234.

Let’s break down ex­actly how to cre­ate this clas­sic lay­out.

Let’s start by ap­ply­ing dis­play: grid-lanes to the main el­e­ment to cre­ate a Grid con­tainer ready to make this kind of lay­out. Then we use grid-tem­plate-columns to cre­ate the lanes” with the full power of CSS Grid.

In this case, we’ll use re­peat(auto-fill, min­max(250px, 1fr)) to cre­ate flex­i­ble columns at least 250 pix­els wide. The browser will de­cide how many columns to make, fill­ing all avail­able space.

And then, gap: 16px gives us 16 pixel gaps be­tween the lanes, and 16 pixel gaps be­tween items within the lanes.

.container {

dis­play: grid-lanes;

grid-tem­plate-columns: re­peat(auto-fill, min­max(250px, 1fr));

gap: 16px;

That’s it! In three lines of CSS, with zero me­dia queries or con­tainer queries, we cre­ated a flex­i­ble lay­out that works on all screen sizes.

Think of it like a high­way of cars in bumper-to-bumper traf­fic.

Just like the clas­sic Masonry li­brary, as the browser de­cides where to put each item, the next one is placed in whichever col­umn gets it clos­est to the top of the win­dow. Like traf­fic, each car changes lanes” to end up in the lane that gets them the fur­thest ahead”.

This lay­out makes it pos­si­ble for users to tab across the lanes to all cur­rently-vis­i­ble con­tent, (not down the first col­umn be­low the fold to the very bot­tom, and then back to the top of the sec­ond col­umn). It also makes it pos­si­ble for you to build a site that keeps load­ing more con­tent as the user scrolls, in­fi­nitely, with­out need­ing JavaScript to han­dle the lay­out.

Because Grid Lanes uses the full power of CSS Grid to de­fine lanes us­ing grid-tem­plate-*, it’s easy to cre­ate cre­ative de­sign vari­a­tions.

For ex­am­ple, we can cre­ate a flex­i­ble lay­out with al­ter­nat­ing nar­row and wide columns — where both the first and last columns are al­ways nar­row, even as the num­ber of columns changes with the view­port size. This is ac­com­plished with grid-tem­plate-columns: re­peat(auto-fill, min­max(8rem, 1fr) min­max(16rem, 2fr)) min­max(8rem, 1fr).

There’s a whole world of pos­si­bil­i­ties us­ing grid-tem­plate-* syn­tax.

Since we have the full power of Grid lay­out, we can also span lanes, of course.

main {

dis­play: grid-lanes;

grid-tem­plate-columns: re­peat(auto-fill, min­max(20ch, 1fr));

gap: 2lh;

ar­ti­cle {

grid-col­umn: span 1;

@media (1250px < width) {

ar­ti­cle:nth-child(1) {

grid-col­umn: span 4;

ar­ti­cle:nth-child(2), ar­ti­cle:nth-child(3), ar­ti­cle:nth-child(4), ar­ti­cle:nth-child(5), ar­ti­cle:nth-child(6), ar­ti­cle:nth-child(7), ar­ti­cle:nth-child(8) {

grid-col­umn: span 2;

All the ar­ti­cle teasers are first set to span 1 col­umn. Then the 1st item is specif­i­cally told to span 4 columns, while the 2nd — 8th to span 2 columns. This cre­ates a far more dy­namic graphic de­sign than the typ­i­cal sym­met­ri­cal, every­thing the same-width, every­thing the same-height lay­out that’s dom­i­nated over the last decade.

We can also ex­plic­itly place items while us­ing Grid Lanes. Here, the header is al­ways placed in the last col­umn, no mat­ter how many columns ex­ist.

main {

dis­play: grid-lanes;

grid-tem­plate-columns: re­peat(auto-fill, min­max(24ch, 1fr));

header {

grid-col­umn: -3 / -1;

Yes, lanes can go ei­ther di­rec­tion! All of the ex­am­ples above hap­pen to cre­ate a waterfall” shape, where the con­tent is laid out in columns. But Grid Lanes can be used to cre­ate a lay­out in the other di­rec­tion, in a brick” lay­out shape.

The browser au­to­mat­i­cally cre­ates a wa­ter­fall lay­out when you de­fine columns with grid-tem­plate-columns, like this:

.container {

dis­play: grid-lanes;

grid-tem­plate-columns: 1fr 1fr 1fr 1fr;

If you want a brick lay­out in the other di­rec­tion, in­stead de­fine the rows with grid-tem­plate-rows:

.container {

dis­play: grid-lanes;

grid-tem­plate-rows: 1fr 1fr 1fr;

This works au­to­mat­i­cally thanks to a new de­fault for­grid-auto-flow, the nor­mal value. It fig­ures out whether to cre­ate columns or rows based on whether you de­fined the lanes us­ing grid-tem­plate-columns or grid-tem­plate-rows.

The CSS Working Group is still dis­cussing which prop­erty will ex­plic­itly con­trol the flow ori­en­ta­tion, and what its syn­tax will be. The de­bate is over whether to reuse grid-auto-flow or cre­ate new prop­er­ties like grid-lanes-di­rec­tion. If you’re in­ter­ested in read­ing about the op­tions be­ing con­sid­ered or chime in with your thoughts, see this dis­cus­sion.

However, since nor­mal will be the ini­tial value ei­ther way, you don’t have to wait for this de­ci­sion to learn Grid Lanes. When you de­fine only one di­rec­tion — grid-tem­plate-rows or grid-tem­plate-columns — it will Just Work™. (If it does­n’t, check if grid-auto-flow is set to a con­flict­ing value. You ca­nun­set it if needed.)

Tolerance” is a new con­cept cre­ated for Grid Lanes. It lets you ad­just just how picky the lay­out al­go­rithm is when de­cid­ing where to place items.

Look at the next draw­ing. Notice that Car 4 is a tiny bit shorter than Car 1. When the tolerance” is zero, Car 6 ends up in the right-most lane, while Car 7 is on the left. Car 6 ends up be­hind Car 4 on the right be­cause that gets it a tiny bit closer down the road” (closer to the top of the Grid con­tainer). Car 7 then takes the next-clos­est-to-the-top slot, and ends up be­hind Car 1 on the left. The end re­sult? The first hor­i­zon­tal group­ing of con­tent is or­dered 1, 2, 3, 4, and the next is 7, 5, 6.

But the dif­fer­ence in length be­tween Car 1 and Car 4 is tiny. Car 6 is­n’t mean­ing­fully closer to the top of the page. And hav­ing item 6 on the right, with item 7 on the left is likely an un­ex­pected ex­pe­ri­ence — es­pe­cially for users who are tab­bing through con­tent, or when the con­tent or­der is some­how la­beled.

These tiny dif­fer­ences in size don’t mat­ter in any prac­ti­cal sense. Instead, the browser should con­sider item sizes like Car 1 and Car 4 to be a tie. That’s why the de­fault for item-tol­er­ance is 1em — which means only dif­fer­ences in con­tent length greater than 1 em will mat­ter when fig­ur­ing out where the next item goes.

If you’d like the lay­out of items to shuf­fle around less, you can set a higher value for item-tol­er­ance. In the next di­gram, the tol­er­ance is set to half-a-car, caus­ing the cars to lay out ba­si­cally from left to right and only mov­ing to an­other lane to avoid the ex­tra-long limo. Now, the hor­i­zon­tal group­ings of con­tent are 1, 2, 3, 4, and 5, 6, 7.

Think of tol­er­ance as how chill you want the car dri­vers to be. Will they change lanes to get just a few inches ahead? Or will they only move if there’s a lot of space in the other lane? The amount of space you want them to care about is the amount you set in item-tol­er­ance.

Remember that peo­ple tab­bing through the page will see each item high­lighted as it comes into fo­cus, and may be ex­pe­ri­enc­ing the page through a screen­reader. An item tol­er­ance that’s set too high can cre­ate an awk­ward ex­pe­ri­ence jump­ing up and down the lay­out. An item tol­er­ance that’s too low can re­sult in jump­ing back and forth across the lay­out more than nec­es­sary. Adjust item-tol­er­ance to some­thing ap­pro­pri­ate for the sizes and size vari­a­tions of your con­tent.

Currently, this prop­erty is named item-tol­er­ance in the spec­i­fi­ca­tion and in Safari Technology Preview 234. However, there is still a chance this name will change, per­haps to some­thing like flow-tol­er­ance or pack-tol­er­ance. If you have a pref­er­ence, or ideas for a bet­ter name, you can chime in here. Keep an eye out for up­dates about the fi­nal name be­fore us­ing this prop­erty on pro­duc­tion web­sites.

Try out Grid Lanes in Safari Technology Preview 234! All of the demos at we­bkit.org/​demos/​grid3 have been up­dated with the new syn­tax, in­clud­ing other use cases for Grid Lanes. It’s not just for im­ages! For ex­am­ple, a mega menu footer full of links sud­denly be­comes easy to lay­out.

.container {

dis­play: grid-lanes;

grid-tem­plate-columns: re­peat(auto-fill, min­max(max-con­tent, 24ch));

col­umn-gap: 4lh;

There are a few last de­ci­sions for the CSS Working Group to make. But over­all, the fea­ture as de­scribed in this ar­ti­cle is ready to go. It’s time to try it out. And it’s fi­nally safe to com­mit the ba­sic syn­tax to mem­ory!

We’d love for you to make some demos! Demonstrate what new use cases you can imag­ine. And let us know about any bugs or pos­si­ble im­prove­ments you dis­cover. Ping Jen Simmons on Bluesky or Mastodon with links, com­ments and ideas.

Our team has been work­ing on this since mid-2022, im­ple­ment­ing in WebKit and writ­ing the web stan­dard. We can’t wait to see what you will do with it.

...

Read the original on webkit.org »

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.