一些Web开发者还没有意识到浏览器们早就在进行的重大转变:状态分区(state partitioning ),不同浏览器可能会给它不同的名字,但是效果类似。
今天我想提出的一个部分是缓存分区(cache partitioning)。关于这个的介绍,Chrome Developers的这篇Gaining security and privacy by partitioning the cache介绍得很清楚。
这个特性最大的影响,就是单独域名CDN优势不再。原先,当你使用jsdelivr之类的CDN时,如果其它网站已经引用并且缓存了相应文件,你的网站也可以使用相应缓存。缓存分区之后,你的引用需要单独下载和缓存。
同时,单独域名CDN还需要单独创建连接来验证缓存和下载。开发者们应该重新考虑单独域名CDN对性能的影响。
今天我想提出的一个部分是缓存分区(cache partitioning)。关于这个的介绍,Chrome Developers的这篇Gaining security and privacy by partitioning the cache介绍得很清楚。
这个特性最大的影响,就是单独域名CDN优势不再。原先,当你使用jsdelivr之类的CDN时,如果其它网站已经引用并且缓存了相应文件,你的网站也可以使用相应缓存。缓存分区之后,你的引用需要单独下载和缓存。
同时,单独域名CDN还需要单独创建连接来验证缓存和下载。开发者们应该重新考虑单独域名CDN对性能的影响。
Chrome for Developers
Gaining security and privacy by partitioning the cache | Blog | Chrome for Developers
Chrome's HTTP cache partitioning helps with better security and privacy.
https://youtu.be/FOlzYBD4vxo
看ChatGPT玩底特律:变人,很好玩啊哈哈哈
看ChatGPT玩底特律:变人,很好玩啊哈哈哈
YouTube
ChatGPT plays Detroit: Become Human - Part 1 - The Hostage
https://www.youtube.com/playlist?list=PLo0oKDTpmXYcSxA2O2ggdpi_3AHEEutjB
FAQ (updated 12.09.2023):
*"I don't get it, how exactly does ChatGPT play the game?"*
(aka "It's fake, it's clickbait, it can't play the game, it's scripted by a human," etc... all that…
FAQ (updated 12.09.2023):
*"I don't get it, how exactly does ChatGPT play the game?"*
(aka "It's fake, it's clickbait, it can't play the game, it's scripted by a human," etc... all that…
Danny Lin @kdrag0n@mastodon.social
More people need to know about the "tabular numbers" feature that modern fonts have
Use it to make numbers to line up with a UI font (or anything not monospace)
CSS: font-feature-settings: tnum
SwiftUI: .font(.body.monospacedDigit()) https://files.mastodon.social/media_attachments/files/111/036/694/450/932/045/small/de9136d33fc7cc93.png
https://mastodon.social/@kdrag0n/111036694598062129
More people need to know about the "tabular numbers" feature that modern fonts have
Use it to make numbers to line up with a UI font (or anything not monospace)
CSS: font-feature-settings: tnum
SwiftUI: .font(.body.monospacedDigit()) https://files.mastodon.social/media_attachments/files/111/036/694/450/932/045/small/de9136d33fc7cc93.png
https://mastodon.social/@kdrag0n/111036694598062129
Per Axbom @axbom@axbom.me
"Do the languages we speak shape the way we think? Do they merely express thoughts, or do the structures in languages (without our knowledge or consent) shape the very thoughts we wish to express?
Take "Humpty Dumpty sat on a...
Even this snippet of a nursery rhyme reveals how much languages can differ from one another. In English, we have to mark the verb for tense; in this case, we say "sat" rather than "sit." In Indonesian you need not (in fact, you can't) change the verb to mark tense.
In Russian, you would have to mark tense and also gender, changing the verb if Mrs. Dumpty did the sitting. You would also have to decide if the sitting event was completed or not. If our ovoid hero sat on the wall for the entire time he was meant to, it would be a different form of the verb than if, say, he had a great fall.
In Turkish, you would have to include in the verb how you acquired this information. For example, if you saw the chubby fellow on the wall with your own eyes, you'd use one form of the verb, but if you had simply read or heard about it, you'd use a different form.
Do English, Indonesian, Russian and Turkish speakers end up attending to, understanding, and remembering their experiences differently simply because they speak different languages?"
The answer is yes.
In a world of sharing ideas across languages, understanding how and why languages make us think, behave and reason differently from each other is increasingly important.
"All this new research shows us that the languages we speak not only reflect or express our thoughts, but also shape the very thoughts we wish to express.
The structures that exist in our languages profoundly shape how we construct reality, and help make us as smart and sophisticated as we are."
« Watch Lera Boroditsky's talk. Lera Boroditsky is an associate professor of cognitive science at University of California San Diego and editor in chief of Frontiers in Cultural Psychology. She previously served on the faculty at MIT and at Stanford. Her research is on the relationships between mind, world and language (or how humans get so smart).
She once used the Indonesian exclusive "we" correctly before breakfast and was proud of herself about it all day. »
https://www.ted.com/talks/lera_boroditsky_how_language_shapes_the_way_we_think
The quotes above are from her 2010 Wall Street Journal article Lost in Translation:
http://lera.ucsd.edu/papers/wsj.pdf
Also read:
The myth of language universals: language diversity and its importance for cognitive science
https://pubmed.ncbi.nlm.nih.gov/19857320/
https://axbom.me/objects/205ba26b-564b-4aef-9153-b6e6fce9840f
"Do the languages we speak shape the way we think? Do they merely express thoughts, or do the structures in languages (without our knowledge or consent) shape the very thoughts we wish to express?
Take "Humpty Dumpty sat on a...
Even this snippet of a nursery rhyme reveals how much languages can differ from one another. In English, we have to mark the verb for tense; in this case, we say "sat" rather than "sit." In Indonesian you need not (in fact, you can't) change the verb to mark tense.
In Russian, you would have to mark tense and also gender, changing the verb if Mrs. Dumpty did the sitting. You would also have to decide if the sitting event was completed or not. If our ovoid hero sat on the wall for the entire time he was meant to, it would be a different form of the verb than if, say, he had a great fall.
In Turkish, you would have to include in the verb how you acquired this information. For example, if you saw the chubby fellow on the wall with your own eyes, you'd use one form of the verb, but if you had simply read or heard about it, you'd use a different form.
Do English, Indonesian, Russian and Turkish speakers end up attending to, understanding, and remembering their experiences differently simply because they speak different languages?"
The answer is yes.
In a world of sharing ideas across languages, understanding how and why languages make us think, behave and reason differently from each other is increasingly important.
"All this new research shows us that the languages we speak not only reflect or express our thoughts, but also shape the very thoughts we wish to express.
The structures that exist in our languages profoundly shape how we construct reality, and help make us as smart and sophisticated as we are."
« Watch Lera Boroditsky's talk. Lera Boroditsky is an associate professor of cognitive science at University of California San Diego and editor in chief of Frontiers in Cultural Psychology. She previously served on the faculty at MIT and at Stanford. Her research is on the relationships between mind, world and language (or how humans get so smart).
She once used the Indonesian exclusive "we" correctly before breakfast and was proud of herself about it all day. »
https://www.ted.com/talks/lera_boroditsky_how_language_shapes_the_way_we_think
The quotes above are from her 2010 Wall Street Journal article Lost in Translation:
http://lera.ucsd.edu/papers/wsj.pdf
Also read:
The myth of language universals: language diversity and its importance for cognitive science
https://pubmed.ncbi.nlm.nih.gov/19857320/
https://axbom.me/objects/205ba26b-564b-4aef-9153-b6e6fce9840f
Ted
How language shapes the way we think
There are about 7,000 languages spoken around the world -- and they all have different sounds, vocabularies and structures. But do they shape the way we think? Cognitive scientist Lera Boroditsky shares examples of language -- from an Aboriginal community…
端傳媒 Initium Media @initiumnews@mastodon.cloud
【重磅合作報導:一場控菸博奕,被菸草商綁架了政策制定的中國政府】https://bit.ly/3PI9yQa
過去二十年來,全球菸草使用率下降了11%,而在中國,這個數字僅下降了1%。卷菸仍然無處不在 —— 中國每年銷售逾2.4萬億支卷菸,佔全球總量約達46%。
吸菸流行,帶來嚴峻的公共健康後果,與吸菸有關的死亡人口將激增,更影響著中國7億非吸菸者。
政府不是沒意識到,但控菸措施遲遲未能實施,皆因菸草業界。「就像一場足球比賽,他們既是球員又是裁判。」
端傳媒與專注全球公共衛生的新媒體「The Examination」、德國《明鏡》、調查新聞機構「Paper Trail Media」、奧地利《標準報》合作完成,同時發表在《今日美國》。這次報導得到普利策中心的資助。
為什麼明明想要推行無菸城市了、早20年前就加入《世界衛生組織菸草控制框架公約》了,至今,中國吸菸流行仍難以遏制?一枝菸為何在中國依然是你我常見,背後是甚麼龐大的利益與產業生態?
這些發問,值得深入且專業的調查與解答,也是此次「中國菸癮」三篇系列專題,端想帶給讀者的。
https://mastodon.cloud/@initiumnews/111090527228989326
【重磅合作報導:一場控菸博奕,被菸草商綁架了政策制定的中國政府】https://bit.ly/3PI9yQa
過去二十年來,全球菸草使用率下降了11%,而在中國,這個數字僅下降了1%。卷菸仍然無處不在 —— 中國每年銷售逾2.4萬億支卷菸,佔全球總量約達46%。
吸菸流行,帶來嚴峻的公共健康後果,與吸菸有關的死亡人口將激增,更影響著中國7億非吸菸者。
政府不是沒意識到,但控菸措施遲遲未能實施,皆因菸草業界。「就像一場足球比賽,他們既是球員又是裁判。」
端傳媒與專注全球公共衛生的新媒體「The Examination」、德國《明鏡》、調查新聞機構「Paper Trail Media」、奧地利《標準報》合作完成,同時發表在《今日美國》。這次報導得到普利策中心的資助。
為什麼明明想要推行無菸城市了、早20年前就加入《世界衛生組織菸草控制框架公約》了,至今,中國吸菸流行仍難以遏制?一枝菸為何在中國依然是你我常見,背後是甚麼龐大的利益與產業生態?
這些發問,值得深入且專業的調查與解答,也是此次「中國菸癮」三篇系列專題,端想帶給讀者的。
https://mastodon.cloud/@initiumnews/111090527228989326
端傳媒 Initium Media
1.4 萬億人民幣如何綁架政府?中國控菸博弈|端傳媒 Initium Media
「你們要控菸?我告訴你們,這是在賣國,公務員工資的1/10都是拿我們的錢。」
https://ioc.exchange/@shac/111099766302290499
关于苹果第一个64-bit处理器的故事
关于苹果第一个64-bit处理器的故事
IOC.exchange
shac ron ₪ (@shac@ioc.exchange)
Attached: 1 image
Ten years ago today #Apple launched the #iPhone 5S and announced the #arm64 CPU inside. It was the first public disclosure of a 64-bit ARM architecture, and it was available for you to buy in a phone. Nobody else was even close to having…
Ten years ago today #Apple launched the #iPhone 5S and announced the #arm64 CPU inside. It was the first public disclosure of a 64-bit ARM architecture, and it was available for you to buy in a phone. Nobody else was even close to having…
我最喜欢的名言:
[Qualcomm高级副总裁兼首席营销官]Anand Chandrasekher说:“我知道有很多噪音,因为苹果在他们的A7上做了[64位]。”“我认为他们正在做一个营销噱头。消费者从中获益为零。”
“主要是......你需要它来获得超过4GB的内存可寻址性。就是这样。你真的不需要它来提高性能,64位应用程序大多是大型服务器级应用程序,”Chandrasekher说。 https://ioc.exchange/@shac/111100301966419451
“🤥”
[Qualcomm高级副总裁兼首席营销官]Anand Chandrasekher说:“我知道有很多噪音,因为苹果在他们的A7上做了[64位]。”“我认为他们正在做一个营销噱头。消费者从中获益为零。”
“主要是......你需要它来获得超过4GB的内存可寻址性。就是这样。你真的不需要它来提高性能,64位应用程序大多是大型服务器级应用程序,”Chandrasekher说。 https://ioc.exchange/@shac/111100301966419451
“🤥”
IOC.exchange
shac ron ₪ (@shac@ioc.exchange)
My favorite quote:
“I know there's a lot of noise because Apple did [64-bit] on their A7," said [Qualcomm senior vice president and chief marketing officer] Anand Chandrasekher. "I think they are doing a marketing gimmick. There's zero benefit a consumer…
“I know there's a lot of noise because Apple did [64-bit] on their A7," said [Qualcomm senior vice president and chief marketing officer] Anand Chandrasekher. "I think they are doing a marketing gimmick. There's zero benefit a consumer…
前几天Python 3.12.0已经正式发布咯,我觉得非常值得关注的更新:
- GIL影响范围缩小到解释器级别,Python API暂时还没落地(要3.13),只是支持在C API创建独立GIL的解释器
- 类型参数语法和类型别名语法
比如说要想使用类型参数
- **kwargs支持使用TypedDict提供详细的类型(使用typing.Unpack)。
- 字典、列表、集合表达式(就是类似
- 诸多性能改进
- GIL影响范围缩小到解释器级别,Python API暂时还没落地(要3.13),只是支持在C API创建独立GIL的解释器
- 类型参数语法和类型别名语法
比如说要想使用类型参数
from typing import TypeVar现在可以写成
_T = TypeVar('_T')
def max(*args: _T) -> _T:
...
def max[T](*args: T) -> T:新的类型别名语法也可以直接使用类型参数:
....
type Point[T] = tuple[T, T]额外举个例子,也可以直接声明ParamSpec:
type Wrapped[**P, R] = Callable[P, R]简直是个巨大进步🎉
- **kwargs支持使用TypedDict提供详细的类型(使用typing.Unpack)。
- 字典、列表、集合表达式(就是类似
[ x for x in any_list ]这种)现在直接inline执行,性能提高。这导致一些行为变化,可能破坏一些库的黑魔法。- 诸多性能改进