Normal view
记录一次踩坑过程(clion + cmake + vcpkg)
首先结论放这里:编写 cmake 文件时,project(xxx)
放在越后边越好,避免在它之后定义和构建相关的宏变量
好的,下边是踩坑经历:
楼主在写一个程序时,突发奇想的想分别使用 vs 工具链和 mingw 工具链跑下代码,所需要的库文件都是用 vcpkg
下载的。
拿 CMAKE_TOOLCHAIN_FILE
举例,使用 vcpkg
+ cmake
,就需要定义这个值(指明你的 vcpkg.cmake
放在哪个路径下,通常是 xxx/vcpkg/scripts/buildsystems/vcpkg.cmake
)。要定义这个值,要么就是在执行 cmake 构建命令时加上 -DCMAKE_TOOLCHAIN_FILE
参数,要么就是直接在 cmake 文件中指定。第二种方法很好理解,直接在 cmake 文件定义就行( clion 在构建时会将其添加进 cache variable
),而第一种,如果是在 clion 中,你就需要在如下图位置指定:

那么问题就来了,由于楼主需要分别使用 msvc
和 gcc
编译,所以需要定义 VCPKG_TARGET_TRIPLET
来选用 vcpkg
中库文件的 triplet ,第一次用 msvc 编译项目,没有任何问题,但换成 mingw 后就出现莫名其妙的问题(例如 cmake 构建不成功,构建成功但链接时找不到对应的 lib )。在进行了一系列的排查发现,虽然我在 cmake 中指定了 set(VCPKG_TARGET_TRIPLET x64-mingw-dynamic)
,但 clion 的 cache variable
中的 VCPKG_TARGET_TRIPLET
的值雷打不动的为 x64-windows
(因为先用的是 vs 工具链的,所以 clion 一直用的是缓存的值)。在经过很长一段时间的折磨后,我突发奇想的将所有设计 vcpkg
的宏定义提到了 cmake 文件的最前边,然后问题就解决了。
# 从原先的这样
cmake_minimum_required(VERSION 3.30)
project(myproject)
set(CMAKE_TOOLCHAIN_FILE "D:/development-tool/vcpkg/scripts/buildsystems/vcpkg.cmake")
set(VCPKG_TARGET_TRIPLET x64-mingw-dynamic)
# ...
# 变成这样
cmake_minimum_required(VERSION 3.30)
set(CMAKE_TOOLCHAIN_FILE "D:/development-tool/vcpkg/scripts/buildsystems/vcpkg.cmake")
set(VCPKG_TARGET_TRIPLET x64-mingw-dynamic)
# ...
project(myproject)
# ...
最后想通了,在 project()
前定义宏,这些宏就能够在项目在构建前使用,这样 clion 就能够先写入 cache variable
,这样就确保项目构建的行为是根据 cmake 文件中来的。反之在 project()
后定义,这些宏就变为在项目构建过程中才能使用,这就导致了 clion 需要在构建前指定 vcpkg 某些宏找不到,所以 clion 用的是缓存的值。
相信有一部分人和我一样,在开始写 cmake 时,喜欢用默认的模板来写,而默认模板的 project()
又是最先写的,等到项目逐渐的开发,需要往 cmake 中假如越来越多东西,这些东西很容易就加到 project()
后,然后一些在构建前需要用到的宏无法被识别,从而引发一系列问题。
这个点可能是 cmake 很常规的一个点,但如果忽略了,就可能像我一样,在 google->ai 后陷入“明明都是按照语法来的,怎么死活就跑不起来”,然后无能狂怒数个小时的情况。
最后再分享点心得,如果什么都看着正常,但项目就是跑不起来,可以看看 cache variable
中的值是否有问题

mac 更了公测 3 啥也没干一直在吃内存吃了几十个 g 了
关于在 Java 里面实现命名参数的一些想法
最近看到了一篇文章,Approximating Named Arguments in Java,讲的是怎么在 Java 里面模拟类似 Python 的命名参数,整体来说不算太出乎我的意料吧,主要还是原地改状态和 builder 模式,还有个 with 的写法虽然看起来有点意思,但总感觉缺点什么。
不过看到这个风格的写法的时候,突然想起了之前自己写的一个项目里面用 lambda 来模拟模式匹配的写法。
kMeans(X, nClusters, opts -> opts.maxIter = 1000);
String guess = new Match<Shape, String>(new Circle())
.is(Circle.class, (circle) -> "我是一个圆")
.is(Square.class, (square) -> "我有点方")
.otherwise((Shape shape) -> "你看不见我")
.get();
然后突然想,是不是可以用一个 lambda 参数来当占位符,来变相实现命名参数。大概是(maxIter -> 1000)
这样的感觉。
但仔细想的话,Java 里面没有 currying 和 uncurrying 的概念,换句话说,本来我构想的在 Java 里应该用的是 Supplier 接口,但现在我手头上的是 Function<T, U>而且其中的 T 无法被忽略掉。似乎是一个很致命的问题。
看起来就卡死了……
然后想了想,其实我需要的是一个能把 Function<T, U>消掉的东西,回忆了一下最近 code review 从隔壁 senior 学来的 static class 的一些奇怪的写法,然后又想了想自己最近在搞的 Ref<T>,然后折腾出了一坨这玩意:
static final class KMeans {
static final class Options {
int maxIter = 300;
double tol = 1e-4;
boolean verbose = false;
// ...
}
@FunctionalInterface
interface Param {
void apply(Options o);
}
static Param maxIter(IntSupplier s) {
return o -> o.maxIter = s.getAsInt();
}
static Param tol(DoubleSupplier s) {
return o -> o.tol = s.getAsDouble();
}
static Param verbose(BooleanSupplier s) {
return o -> o.verbose = s.getAsBoolean();
}
static Output kMeans(Data X, int nClusters, int maxIter, boolean verbose, double tol, ...) { ... } // 这里是具体的代码逻辑
static Output kMeans(Data X, int nClusters, Param... params) {
var options = new Options();
Arrays.stream(params).forEach(applier -> applier.apply(options));
// 然后就可以继续实现具体的代码逻辑了
}
}
psvm 里面可能长这样:
var X = new Data(...);
var res1 = KMeans.kMeans(X, 3, 1000, 1e-8, ...); // 常见的写法
var res2 = KMeans.kMeans(X, 3,
KMeans.verbose(() -> true),
KMeans.tol(() -> 1e-6),
KMeans.maxIter(() -> 1000),
...); // 现在可以这么写了,而且顺序也可以换来换去
// 如果不用担心 import 会变得乱七八糟的话还可以这样
var res3 = kMeans(X, 3,
maxIter(() -> 1000), tol(() -> 1e-6), verbose(() -> true), ...);
感觉看起来有点像 Python 的命名语法,也不至于像 builder 模式那么啰嗦了。
但是总感觉好像还是有点啰嗦(
然后还可以稍微再改改。
interface Constant {
static Param maxIter(int maxIter) {
return o -> o.maxIter = maxIter;
}
static Param tol(double tol) {
return o -> o.tol = tol;
}
}
// 用法
IntSupplier someOtherCalc = () -> { return ... ; } // 假设它会返回 2048
var res4 = kMeans(X, 3,
maxIter(someOtherCalc)
Constant.tol(1e-6),
Constant.verbose(true), ...);
但似乎显得更怪异了,而且这么写代码感觉会被人打(
换 V2EX 币的时候提示 okx 这个主网币不足怎么解决?
我从 bybit 转了点 usdt 过来新开的 okx 上,踩了一大堆坑,先是要 apt 跨链,然后现在又卡在这个主网币,明明是 0 手续费的。。。
https://imgur.la/images/2025/08/15/Screenshot_2025-08-15-05-01-47-11_1a01c1dfc8c0ea31a9d50a905953499e.md.jpg 
比特币相关代码,技术!
研究比特币相关代码,技术的朋友。一起来,聊聊比特币扩容问题。
Crunch time in Alaska: Trump set to meet Putin in push for Ukraine peace


US and Russian officials will converge on the state of Alaska ahead of a highly anticipated Friday meeting between Presidents Donald Trump and Vladimir Putin.
The pair will meet for the first time in six years, as Trump tries to enact a key campaign pledge to end Russia's war in Ukraine.
The US president, who has portrayed himself as a global peacemaker, hopes to leverage his personal relationship with Putin to achieve a ceasefire breakthrough where others have failed.
On Thursday he assessed there was a "25% chance" the meeting would not be successful.
Ukraine's leader Volodymyr Zelensky has been excluded from the talks, and warned that any resolutions made in his absence will be meaningless.
The summit comes exactly one week after Trump's deadline for Russia to reach a ceasefire or face tough new sanctions.
It was always highly unlikely that Kyiv and Moscow – who have been locked in a bloody war since Russia launched its full-scale invasion of Ukraine in 2022 – would reach an agreement to end hostilities before that deadline.
There was scepticism about whether Trump would stand by his threat of imposing sanctions on countries that do business with Russia, which would have resulted in a blistering trade war with China. He has, however, gone as far as to say he will impose secondary tariffs on India later this month over its purchases of Russian oil.
Last week's announcement that Trump and Putin would meet had the effect of tacitly pausing the sanctions countdown - and awarding both sides more time to think about their next move.
Throughout the week, the American approach to the aims and hopes for the summit has been varied – shifting from the positive, to the cautious, to the menacing.
At the latter extreme, Trump has threatened "very severe consequences" if his Russian counterpart does not agree to end the war. What seemed to harden his approach was a group call on Wednesday with European leaders including Zelensky.
On the other hand, Kyiv will have been alarmed when Trump mooted the "swapping of territories" and the White House indicated that the president would take a passive approach by treating the meeting as a "listening exercise".
All the while, the Russians have remained mostly silent – refusing to engage with speculation and rumours of frozen frontlines, territorial exchanges or minerals deals between Moscow and Washington.
There is consistency in that silence. Whenever Kremlin officials have spoken this week, it has been to reiterate Putin's seemingly intractable position on the conflict.
They have restated that the war will only end once Russia gains full sovereignty over the Ukrainian regions it partially occupies – Donetsk and Luhansk, known as the Donbas, as well as Kherson and Zaporizhzhia – and a pledge that Kyiv will demilitarise and not join Nato, the military alliance of Western powers.
But Trump seems convinced that the usually convivial relationship he has cultivated with Putin could help him unlock a deal to end the conflict and further his image as a global peacemaker.
The issue has become central to the question of what Trump has delivered on the world stage since returning to the US presidency. He has a domestic audience to keep happy, and many of his supporters backed him for his pledge to swiftly end the war and disentangle America from expensive foreign conflicts more generally.
Ahead of the summit - his first meeting with Putin for six years - the American hopes that his negotiating style will pay dividends where other efforts to end the war have failed.
His top officials have stressed the importance of him meeting Putin in person, and Trump himself has talked up his business-like instincts, saying he may know "in the first two minutes... exactly whether or not a deal can be made".
Europe finds itself in the unenviable position of being caught between the two sides and excluded from Friday's discussion.
During their last-minute call with Trump on Wednesday, European leaders emerged tentatively optimistic that once in Alaska the US president would fight their corner.
Like Ukraine itself, they have endured several turbulent months, during which Trump had a memorable White House bust-up with Zelensky and later temporarily paused military supplies for Kyiv - a markedly different stance to his predecessor Joe Biden.
Ukraine has been sidelined ahead of Friday, too.
Despite protests by the Ukrainian leader that any agreement struck by Trump and Putin without input from Kyiv would amount to "dead decisions", it became increasingly clear as the week progressed that the US-Russia meeting would remain a bilateral only.
While he was careful to keep Trump onside, Zelensky felt he had to intervene after the US president's throwaway comments about the need to see "some swapping, changes in land" between Russia and Ukraine.
"We will not withdraw from the Donbas. We cannot do that," the Ukrainian president said, with a hint of exasperation, as speculation over potential territorial concessions reached a height on Tuesday.
"Everyone forgets the first part: our territories are illegally occupied. For the Russians, the Donbas is a bridgehead for a future new offensive," he said, arguing that he would "pave the way" for further conflict on its soil if he gave up the region.
Like many of his compatriots, Zelensky is convinced that Putin wants to destroy Ukraine's sovereignty and people, and believes any concession to Russia would result in renewed and perhaps fatal aggression in the near future.
That is why he has consistently pushed to be invited into the room with Trump and Putin.
While this will not be the case during Friday's summit, the US president has pledged to update Zelensky soon afterwards - and has indicated he is angling for a "quick" three-way meeting in the near future.
What Putin would have to gain from such a meeting is unclear. The Kremlin has always said Putin and Zelensky have no reason to meet until much further down the negotiating line.
But that could still be far off. Ultimately, Putin's "central objective lies in obtaining... the geopolitical 'neutralisation' of Ukraine," according to analyst Tatyana Stanovaya.
"It is extremely difficult to convey what is truly at stake... as people often simply cannot accept that Putin might want so much - and be serious about it. Unfortunately, he can."
The frenzied lead-up to the Alaska summit has revealed that if Trump's position on a potential resolution of the conflict is still subject to change, Putin's is not.
Alaska will offer them a meeting place; common ground at the negotiating table may be harder to find.
Follow the BBC's coverage of the war in Ukraine
Dame Vera Lynn's audition records to be released
Dame Vera Lynn's audition records are to be released for the first time, 90 years after they were first recorded.
The late singer's first records were discovered when her daughter, Virginia Lewis-Jones, donated her mother's record collection to the British Library's Sound Archive.
The donations were made when she moved out of her home in East Sussex, where Dame Vera had lived with her husband Harry Lewis for 40 years.
Along with the three silver aluminium audition records, which are labelled by hand, a copy of Dame Vera's first record, It's Home, recorded in 1935 with bandleader Howard Baker, was also found.
Recorded after trumpeter Baker invited Dame Vera to join his band in 1933, the first record is one of just 100 copies pressed.
Virginia said: "It's so wonderful to hear Ma's voice from those early days, right at the start of her career.
"I always had the feeling these would be worth exploring so I am absolutely thrilled that the audition tapes we've never heard can now be brought to life, and add significantly to what we already know about Ma."


The audition discs will be released by Decca, with What A Difference A Day Makes released as a single on Friday to mark the 80th anniversary of VJ Day.
Further previously unheard and rare tracks from them will feature on a new album called Hidden Treasures, which will be released on 7 November.
Dame Vera made her name during the Second World War, when her rousing songs such as We'll Meet Again, (There'll Be Bluebirds Over) The White Cliffs Of Dover and There'll Always Be An England, earned her the affectionate name Forces' Sweetheart.
Her final studio album, Unforgettable, was released in 2010.
She died in June 2020, aged 103, after she became the oldest artist to have a top 40 album in the UK, in May that year, with her greatest hits album 100.
Follow BBC Sussex on Facebook, on X, and on Instagram. Send your story ideas to southeasttoday@bbc.co.uk or WhatsApp us on 08081 002250.
How Trump and Putin's past meetings went - and what to expect this time


US President Donald Trump's summit with Russian counterpart Vladimir Putin on Friday is a blockbuster moment in world politics that calls to mind several memorable previous meetings.
These events have tended to deliver major news headlines, as well as some glimpses into the intriguing, unpredictable and much-scrutinised personal relationship between the two leaders.
Looking back at the images also gives clues as to how they might approach Friday's head-to-head in Alaska, during which they will discuss ending the war in Ukraine.
The two bring very different approaches to private meetings, according to former officials who have dealt with either or both leaders behind closed doors.


Their first meeting came in July 2017, at a G20 summit in Germany. It was just months after Trump entered the White House, while Putin already had decades of political experience under his belt.
In front of the world's cameras, the two exchanged warm words, and a businesslike handshake, which set the tone for a generally respectful relationship. In the years to come, the duo went on to express their mutual admiration - although Trump recently told the BBC he was "disappointed" with Putin over the bloodshed in Ukraine.
In fact, Ukraine was raised in that very first meeting, when Trump highlighted Russia's efforts to destabilise its neighbour. Three years before, Moscow had illegally annexed the Crimean peninsula.
Fast-forward to 2025 - with Putin's full-scale invasion of Ukraine into its fourth year - and Trump is eager to play the role of peacemaker by negotiating a ceasefire.
Trump said on Wednesday there would be "very severe consequences" if the Russian leader did not agree to end the war. At other times, he has taken a softer tone, and has said he simply envisages the meeting to be a "feel-out" exercise.


Trump and Putin again came face-to-face once more in 2017, at an economic forum in Vietnam. They were pictured chatting among other world leaders, and one snap appeared to show Putin talking directly into his opposite number's ear.
Trump will be familiar with Putin's ability to dominate conversations with lengthy, quickly spoken monologues that give his conversant few opportunities to respond, according to diplomats who described the Russian leader's style to the BBC.
"Everything in all meetings with Putin is about power," observed Sir Laurie Bristow, the UK ambassador to Russia from 2016 to 2020. "Who is in control of the timing, the substance, the agenda, the tone - the point is that you never quite know what you're going to get."
As a result, Sir Laurie said, "the interpreters can find it hard to keep up", and it was vital from Trump's perspective that he brought one of his own. Trump's envoy Steve Witkoff allegedly relied on Kremlin translators during a meeting of his own earlier this year.
Former Trump aide Fiona Hill agreed with Sir Laurie, recalling in an interview with the Telegraph her own experiences of dealing with Putin: "He does make fun of Trump. He uses the Russian language in a way that can be quite sarcastic and ironic. It's totally lost in translation."


Perhaps the most overt public display of friendliness between Trump and Putin came when they met for closed-door talks in Helsinki, Finland, in July 2018.
Trump defended Russia over accusations of interference in the 2016 US presidential election, and sided with Putin over the assessments of his own intelligence agencies. The move earned him cross-party condemnation back home in the US.
The Helsinki meeting also produced a memorably informal image of Putin gifting Trump a football from the recent men's World Cup, which had been hosted by Russia.
Such gestures on Putin's part were always carefully calculated, according to Sir Tony Brenton, another former British ambassador to Russia. Sir Tony recalled Putin showing "Russian old-world courtesy" during meetings in which he was present in the mid-2000s, although "there was always a degree of reserve underneath it, and he was never a very spontaneous character".
He added: "The footballs and the smiles, the jokes and that sort of stuff… he's not naturally a 'hail fellow well met' guy, but he does work at it when he thinks it's important for the relationship."


The pair met for further G20 summits in Argentina, in November 2018, and in Japan in June 2019.
John Bolton, Trump's former national security adviser with whom he later fell out, was present on the latter occasion. He told the BBC he was struck by the men's differing attitudes to detail, which he put down to Putin's training in the Soviet intelligence service.
Of Putin, he said: "I've never seen him any way other than being prepared, very calm, very reasonable in his presentation, and I think that's part of his KGB training."
By contrast, Bolton said, Trump's approach to private meetings was similar to his press conferences in public, in that he was prone to freewheeling statements that could surprise even his own aides. "He doesn't really prepare for them because he doesn't really think he needs to; he doesn't think he needs the background information. I'm sure they're preparing briefing materials as we always did, and he won't read them."
Trump believed that a healthy personal relationship with another leader would mean a healthy state-to-state relationship, Bolton said - and Putin knew this. "He will use his KGB training to try and manipulate Trump. He's done it before and he'll do it again."
Trump himself has downplayed expectations ahead of Friday's meeting in Alaska, remarking: "I think it'll be good. But it might be bad."


Follow BBC's coverage of the war in Ukraine
- ANALYSIS: What do Putin and Trump each want from summit?
- EXPLAINER: Where in Alaska is Trump meeting Putin and why?
- VISUALS: The war-ravaged Ukrainian territories in maps
- VERIFY: Russian attacks on Ukraine double since Trump inauguration
- GROUND REPORT: Left out of talks, exhausted Ukrainians fear unjust peace
Putin must 'prove he is serious about peace,' says Starmer


There is a "viable chance" of a ceasefire between Russia and Ukraine, Prime Minister Sir Keir Starmer has said, ahead of Friday's summit between US President Donald Trump and Russian President Vladimir Putin.
The two leaders are meeting in Alaska to discuss how to end the war in Ukraine.
Ukrainian President Volodymyr Zelensky and other European leaders, who are not attending the meeting, held a joint call with Trump on Wednesday to reiterate their position.
Following the call, Sir Keir said Ukraine's "territorial integrity" had to be protected and that "international borders cannot and must not be changed by force". Zelensky
Last week Trump warned there could be "some swapping of territories, to the betterment of both", leading to fears Ukraine may have to give up some areas in order to end the bloody conflict
Ukraine has insisted it will not accept Russian control of land it has seized, including Crimea, while Moscow wants to maintain control.
It also wants assurances that Ukraine will not join the Nato military alliance and a limit on the size of its army.
Addressing a virtual meeting of the European leaders following the call with Trump, Sir Keir said "any ceasefire would have to be lasting and to be lasting it would need security guarantees".
"That is why we set up this coalition of the willing," he added.
The coalition is a group of mainly European countries who have pledged to provide military support to Ukraine - including potentially boots on the ground - in order to deter Russia from breaching any agreed peace deal.
Sir Keir said the coalition had "credible" military plans ready that could be used in the event of a ceasefire.
He said the leaders of the group were also ready to increase economic pressure on Russia if necessary, for example through increasing sanctions.
He also praised Trump's efforts to reach an agreement, saying: "For three-and-a-bit years this conflict has been going on and we haven't got anywhere near the prospect of an actually a viable solution, a viable way of bringing it to a ceasefire.
"Now we do have that chance, because of the work the president has put in."
Following his call with European leaders, Trump told a press conference there was a chance of a meeting between Putin and Zelensky.
He said he would use his initial meeting with Putin to "find out where we are and what we're doing", adding: "We'll have a quick second meeting between President Putin and President Zelensky and myself, if they'd like to have me there."
He also warned Putin that he would face "very severe consequences" if he did not agree to end the war after Friday's summit.
Zelensky, who joined the call while in Berlin to meet German Chancellor Friedrich Merz, said the US was ready to continue its support of Ukraine and accused Russia of not wanting peace.
"Putin cannot fool us," he said
20250815
特色列表
你知道吗?

- 哪一個地鐵路網服務紐約都會區,且為最古老地鐵路網之一?
- 第79任美國海軍部長是哪位美國商人?
- 臺灣台中市,哪處1953年落成的防空洞是為了防止北京故宮文物遭空襲而建?
- 求職者向企業介紹自身經歷的文件稱為什麼?
- 哪個諷刺網站收錄了許多長得像希特勒的貓?(圖)
- 哪個2024年11月5日成立的政黨由前加告兹行政长官、2024年摩爾多瓦總統選舉候选人伊琳娜·弗拉赫領導?
Thousands Ask Harvard Not to ‘Give in’ and Pay Fine to Trump
© Sophie Park for The New York Times
科技爱好者周刊(第 361 期):暗网 Tor 安全吗?
这里记录每周值得分享的科技内容,周五发布。
本杂志开源,欢迎投稿。另有《谁在招人》服务,发布程序员招聘信息。合作请邮件联系(yifeng.ruan@gmail.com)。
封面图
去年建成开放的烟台时光塔,是一个海边的文化建筑,下层是露天剧场,中间是望海平台,上层是图书馆、展览厅、咖啡馆。(via)
暗网 Tor 安全吗?
1、
大家知道 Tor 浏览器吧?
它是访问暗网(dark web)的主要工具。
所谓暗网,就是普通浏览器打不开、必须用专门工具访问的互联网。
之所以暗网要用专门工具访问,是因为它采用了特殊的设计,保证让访问者高度匿名,难以追踪。
如果你希望执行秘密的互联网操作,就可以使用暗网。同样的,地下网站希望保密,不愿意暴露自己,那就可以做一个暗网版本,正常互联网无法访问。
暗网有专门域名 .onion,这种域名的网站都是要用 Tor 打开的。
2、
我一直以为 Tor/暗网很安全,可以保证访问者的匿名,无法找到真人。
因为它的设计是防追踪的。它不是直接访问目标网址,而是寻找一个随机的中继节点。
它规定,必须通过3个中继节点,才能连接目标网站。每个中继节点,只知道上一个节点和下一个节点,因此该节点即使被黑,黑客也看不到完整的通信线路。
理论上,只有三个中继节点都被破解,才能追踪用户。但是,这些节点是在全世界随机选择的,全被破解的概率实在很低。
这种设计叫做"洋葱路由",就像剥洋葱一样,必须一层层解开所有的中继节点,才能了解完整的访问链路。事实上,Tor 这个词就是洋葱路由(The Onion Router)的首字母缩写。
3、
上周,我读到一篇文章,彻底动摇了对 Tor 的信心。
我震惊地发现,Tor 是美国政府开发的。
1997年,美国海军研究实验室(NRL)发明了 Tor。最初的动机是,防止外国政府追踪美国的机密通信。
美国的情报人员在国外,要向中情局的服务器发送机密消息,不希望被外国政府察觉和追踪,但又必须使用外国的民用线路,怎么办?
答案就是 Tor。通过洋葱路由,Tor 可以在民用通信线路上,让外国的互联网提供商无法找到人员位置和目标网址。
2004年,美国政府公开了这个项目的源码。电子前沿基金会 (EFF) 接手继续开发,逐渐演变成今天的 Tor,但是底层设计并没有大的改动。
开源之后,美国政府并没有放手这个项目,多年来一直大力资助。2012年,Tor 项目的年度预算200万美元,80%来自美国政府。
我查了最新的2023~2024年度财务报表,790多万的总收入中,依然有200多万来自政府。
美国政府大力资助 Tor,是因为这个项目对他们有利用价值。
我相信,Tor 源码应该是可靠的,没有植入后门,毕竟它是开源的,要经受全世界程序员的审查。但是,美国政府肯定了解源码的所有细节,很可能会部署他们自己修改过的版本,添加一些不为人知的改动。
根据以前透露的消息,很多的 Tor 中继节点是美国政府架设的(具体比例无法查实)。所以我认为,不能假设 Tor 是安全的,美国政府很可能监视 Tor 的通信。
曾经非常著名的暗网黑市网站"丝绸之路"(上图),就是完全依托于 Tor 来访问。但是,2013年被美国政府查封,创始人也被抓了。这也从一个侧面说明,Tor 并不安全。
科技动态
1、上周,中国的载人月球登陆器"揽月",在河北省怀来县进行了着陆起飞测试。
它挂在一个钢盘下面,钢盘使用钢索牵引,可以上下运动,用来模拟月球引力。
2、美国宾州大学发布了一个演示,监视手机通话时的微小震动,可以还原出通话内容。
手机通话时,扬声器会震动,通过激光雷达,在3米外监视手机,可以感受到这种震动,从而还原出语音。
再通过 Whisper 模型,将语音转成文字,就能得到通话内容,准确率为60%。
3、一位美国程序员,制作了一个木质的像素显示器。
这个显示器的每个像素点,都是一个小木块,有一面涂黑。
显示器的控制器是一个树莓派,收到显示图案后,计算出哪些木块需要转动,然后驱动一个机械臂转动这些木块。
最后的显示效果如下。
4、谷歌披露,安卓系统内置了一个全球地震预警系统,可以向用户发出地震警报。
安卓手机都有加速度计,就是手机横置时让屏幕翻转的那种传感器,它可以侦测到手机的移动。
如果系统发现,同一个地理区域的手机突然同时震动,就说明地震了。谷歌就会向该区域的用户推送地震警报。
该系统于2021年4月,首先在新西兰和希腊上线,已覆盖98个国家/地区。2023年11月的菲律宾6.7级地震,2023年11月的尼泊尔5.7级地震,它都发送了警报。
5、人类为什么需要睡眠?最近一篇论文指出,睡眠与细胞线粒体有关。
在有氧状态下,线粒体的不间断活动会导致自身裂变,所以需要一个静止期(睡眠)来修复,并补充能量。
结论就是,只要生物需要氧气,就需要睡眠,因为有氧活动会消耗线粒体。
文章
1、锚点定位简介(英文)
CSS 的新语法"锚点定位"(anchor position),可以不使用 JavaScript,只用 CSS 就完成弹出菜单对某个锚点元素<a>
的定位。
2、使用 Rclone 挂载网盘到本地(英文)
本文介绍使用 Rclone 这个工具,将网盘(比如微软的 OneDrive),挂载成一个本地目录。
3、如何选择英文字体(英文)
本文介绍选择合适的英文字体的一些注意点。
4、我的 NotebookLM 使用方法(英文)
NotebookLM 是现在公认的最佳 AI 笔记工具,作者写了他的使用方法,用它来"看"没看过的电视剧,我觉得有参考价值。
5、Docker 运行图形界面软件的一种方法(英文)
本文介绍使用 Wayland 协议,把图形界面软件放在 Docker 容器运行。
6、为什么 π² ≈ g?(英文)
π² 等于9.86,很接近重力加速度 g 的9.8。本文告诉你,这不是巧合,跟米的定义(北极到赤道的距离的百万分之一)有关。
工具
1、Battery
一个 Macbook 笔记本的小工具,使得充电只能充到80%。
2、Readeck
一个自托管的 Web 应用,用来收藏书签,自动保存网页内容。
一个 CSS 库,提供一套精简、可扩展的样式方案。
一个自托管的 Web 应用,用来统一管理你的虚拟主机、共享主机和域名,参见介绍文章。
5、Kimu
基于 Web 的视频编辑器,支持接入 AI,代码开源。
6、vYinn(殷人)
古籍印章图案的制作工具。(@shanleiguang 投稿)
7、Call-Me
一个开源网站,在浏览器中实现一对一视频通话,有 Demo。(@miroslavpejic85 投稿)
一个基于 Web 的 Markdown 编辑器,生成适配微信公众号/社交平台的可视化 HTML 代码。(@xiaobox 投稿)
另有一个使用 AI 生成的微信 Markdown 编辑器。(@geekjourneyx 投稿)
9、流畅阅读(FluentRead)
浏览器开源插件,"沉浸式翻译"的开源替代品,支持多种翻译引擎和 AI 大模型,提供双语翻译、划词翻译等特性。(@Bistutu 投稿)
10、Diff Excel
一个开源的桌面应用,用来比较两个 Excel 表格的差异,使用 Go 语言编写。(@zbuzhi 投稿)
AI 相关
将提问直接附在 URL 后面,对大模型提问,比如 818233.xyz/你是什么模型 。(@yvonuk 投稿)
2、AI Short Video Factory(短视频工厂)
一个开源的 Web 应用,上传视频素材,给出提示词,AI 自动生成短视频和文案。(@YILS-LIN 投稿)
AI 地图,用户搜索一个主题,它会显示相关地图和解释文章,比如苏东坡的地图。(@klemperer 投稿)
资源
这个网页号称由100万张网页截图组成,可以放大缩小查看。
这个网站将各大互联网公司的技术文章(英文)收集在一起。
这个网站的创意很棒,你输入一个街道地址,它输出该地址的 3D 地图文件,可以 3D 打印出来,供视障人士触摸使用。
这个网站收集各种定价页的设计。
图片
一位法国摄影师为古典雕塑,穿上流行的当代服饰。
这样的组合不仅有趣,还给人一种耳目一新的感觉。
这说明,一个人给别人的感觉和自身的气质,很大程度上与服装打扮有关。
文摘
1、我的技术退步了
五年前,我大学毕业时,很热衷于软件开发,参与了一大堆开源项目。
我全身心投入,为这些项目投入了数千小时。虽然没有回报,但我非常享受这些时间,项目用户也对我的工作评价很高。
毕业后,我开始找工作。我认为,公司会看重我的开源经历。我想错了。
我申请了600多个职位,告诉公司我为开源项目做了许多贡献,但结果只收到了3个 offer。最终,我接受了一家创业公司的 offer。
白天,我为这家创业公司工作八九个小时。回到家后,我继续投入自己的开源项目,直到深夜。
我的薪水少得可怜,但是我乐在其中。我的技能快速提高,社区影响力也显著提升。
终于有一天,我认清了现实。公司的项目根本不能体现我的价值,知道我价值的人,又不是能付钱给我的人。我退缩了,开始苦练 Leetcode。
我不再在开源项目投入很多时间,项目社区也渐渐失去了活力。放弃开源项目让我很难过,但我因此进入了一家大公司,我的薪水增加了5倍。
我把所有时间投入了公司的项目,得到了领导的好评。我的邮箱开始塞满了各种挖我跳槽的邮件。
但是,我知道,自己的技术退步了。公司的项目很枯燥,没有挑战性,使用的是内部技术栈。
此外,我也远不如以前快乐。
我想我会攒点钱,过几年就退休,希望那时开源世界还像以前一样。
言论
1、
AI 公司的融资有多么疯狂,前 OpenAI 公司首席科学家伊尔亚·苏茨克维在2024年筹集了10亿美元,几个月前又筹集了20亿美元,他的公司估值320亿美元。
据我所知,它唯一的产出就是网站上仅有的370个词,每个词价值8000多万美元,其中148个词还是关于合伙人离开公司的事情。不过,至少他还有个网站,有些创始人拿到钱以后简直销声匿迹了。
-- Substack 周刊
2、
保险公司十分担心,随着全球变暖、极端天气越来越多,资产的损失风险快速上升,世界正变得无法保险了。
-- 《世界很快将无法投保》
3、
Windows 11 的更新包,原本叫做春季包和秋季包。后来,有人反映,这不适用于南半球,就改名为 H1 更新包 和 H2 更新包。
-- 《为什么 Windows 更新包叫做 H1 和 H2》
4、
十多年来,编程训练营一直是硅谷的支柱产业。如今,AI 使得公司减少入门级职位的招聘,并且学生可以跟随 AI 自学,编程训练营正在逐渐消失。
-- 路透社
5、
人们以为自己在思考,其实是在重新编排自己的偏见。
-- 威廉·詹姆斯(William James),美国哲学家
往年回顾
《黑神话:悟空》可以产业化吗?(#314)
Elasticsearch 的启示(#264)
你的地图是错的(#214)
培训班 vs 大学,求职成功率比较(#164)
(完)
文档信息
- 版权声明:自由转载-非商用-非衍生-保持署名(创意共享3.0许可证)
- 发表日期: 2025年8月15日
中国新增签证类别发给外国青年科技人才
中国将为外国青年科技人才新增签证类别,10月1日起施行。
据中国央视新闻报道,中国国务院决定修订《外国人入境出境管理条例》,新增K字签证,发给入境的外国青年科技人才。
根据修订版条例,申请K字签证,应当符合中国政府有关主管部门规定的外国青年科技人才的条件和要求,并提交相应的证明材料。
中国司法部、外交部、公安部、国家移民局负责人介绍,K字签证签发给从境内外知名高校或者科研机构科学、技术、工程、数学学科领域专业毕业,并获得相应学历学位证书(学士学位及以上),或者在上述机构从事相关专业教育、科研工作的外国青年科技人才。
负责人也说,相较于现有的12类普通签证,K字签证将在入境次数、有效期、停留期方面为持证人提供更多便利。持证人入境后可从事教育、科技、文化等领域交流及创业、商务等活动。K字签证仅对年龄和教育背景或工作经历有特定要求,不要求国内有聘用或邀请单位,申办流程也将更为便利。
-
NYT | Top Stories
- Phil Knight, Ex-Nike Chief, and His Wife Pledge $2 Billion to Oregon Cancer Center
Phil Knight, Ex-Nike Chief, and His Wife Pledge $2 Billion to Oregon Cancer Center
20250815
From today's featured article
The Rani of Jhansi (died 1858) was one of the leading figures of the Indian Rebellion of 1857. After the death of the raja of Jhansi in 1853, the British East India Company, the overlord of Jhansi, refused to acknowledge his young wife—the Rani—as regent. They instead annexed Jhansi, ignoring her vigorous protests. In May 1857, the Indian troops at Jhansi joined the ongoing rebellion and massacred the town's British residents; the Rani's complicity in the killing remains uncertain. She took control of Jhansi and attempted to rule peacefully, but the British decided to consider her an enemy and attacked Jhansi in March and April 1858. The Rani escaped on horseback and continued to fight, before dying in battle near Gwalior Fort. Her story and legend became closely associated with Hindu mythology, Indian nationalism and the developing independence movement. She remains revered in most of modern India, and has been extensively depicted in artwork, cinema, and literature. (Full article...)
Did you know ...

- ... that Elizabeth Gunning (caricature pictured) was the subject of a pamphlet war about forged love letters, and used her notoriety to market her first novel?
- ... that part of the Bolton Percy hoard was discovered by schoolboys?
- ... that Jake Larson went viral on TikTok for discussing his experiences of World War II?
- ... that the Mesola red deer survived only in a single woodland in Italy until 2023?
- ... that a university building designed in 1952 was built in 2020, needing only minor adjustments to meet building codes?
- ... that sportsman Nándor Dáni competed in athletics, cycling, rowing, and speed skating during his career?
- ... that government-owned grocery stores in the United States include city-owned supermarkets and military commissaries?
- ... that more than 200 British warships assembled for a fleet review just days before the start of the First World War?
- ... that Victor Hall, who died twice in 1986, is still alive?
In the news
- Colombian senator Miguel Uribe Turbay (pictured), a pre-candidate in the 2026 presidential election, dies two months after being shot.
- American astronaut Jim Lovell, the commander of Apollo 13, dies at the age of 97.
- A helicopter crash in the Ashanti Region, Ghana, kills eight people on board including ministers Edward Omane Boamah and Ibrahim Murtala Muhammed.
- In cycling, Pauline Ferrand-Prévot wins the Tour de France Femmes.
On this day
August 15: Independence Day in India (1947); National Liberation Day of Korea (1945)
- 1018 – Byzantine general Eustathios Daphnomeles captured and blinded Ibatzes of Bulgaria by means of a ruse, ending the last resistance against Emperor Basil II's conquest of Bulgaria.
- 1461 – Byzantine–Ottoman wars: The Empire of Trebizond, the longest-surviving Byzantine successor state, was conquered by Ottoman forces following a month-long siege.
- 1812 – War of 1812: Potawatomi warriors ambushed a United States Army convoy after it had evacuated Fort Dearborn (site pictured), in present-day Chicago, and razed the fort.
- 1963 – President Fulbert Youlou was overthrown in the Republic of Congo, after a three-day uprising in the capital.
- 2005 – The Helsinki Agreement between the Free Aceh Movement and the Government of Indonesia was signed, ending more than 28 years of fighting.
- Stephen Breyer (b. 1938)
- Anne, Princess Royal (b. 1950)
- Rosalía Mera (d. 2013)
- Gerd Müller (d. 2021)
From today's featured list
There are an estimated two thousand ghost towns in the U.S. state of Oklahoma. These towns began for a number of reasons, often as liquor towns, boomtowns, or mining towns, with some pre-dating statehood. The population and activity later declined in these locations due to the exhaustion of natural resources, manmade or natural disasters, urbanization, the creation of a water source, or after being bypassed by highways and interstates. These places vary in their current states with some having completely disappeared while others still have small communities. A small number have also gained notability for other reasons, such as being part of the Tar Creek Superfund site, for existing in an unusual location, or for crimes. The earliest known ghost town in Oklahoma was said to have been one by 1839 while the latest were evacuated in 2010. (Full list...)
Today's featured picture

The Great Trigonometrical Survey was a project that aimed to survey the entire Indian subcontinent with scientific precision. It was begun in 1802 by the British infantry officer William Lambton, under the auspices of the East India Company. Under the leadership of his successor, George Everest, the project was made the responsibility of the Survey of India. Everest was succeeded by Andrew Scott Waugh, and after 1861, the project was led by James Walker, who oversaw its completion in 1871. Among the many accomplishments of the Survey were the demarcation of the British territories in India and the measurement of the heights of Mount Everest, K2, and Kanchenjunga. The Survey had an enormous scientific impact as well, being responsible for one of the first accurate measurements of a section of an arc of longitude, and for measurements of the geodesic anomaly, which led to the development of the theories of isostasy. The native surveyors employed in the Himalayas, especially in Tibet (where Europeans were not allowed), were called pundits, and included cousins Nain Singh Rawat and Krishna Singh Rawat. This image shows the 1922 index to the Great Trigonometrical Survey.
Image: Survey of India
每日一语 2025.8.14
不是共情资本,是了解国情。
Judge Halts White House Effort to Defund Schools With D.E.I. Programs
© Eric Lee for The New York Times
PBS Slashes Budget by 21% After Federal Funding Cuts
© Katie Oyan/Associated Press
Pentagon belatedly defends Driscoll against Loomer attacks
© Mark Schiefelbein/AP
俄罗斯和乌克兰周四交换了84名战俘

俄乌双方交换了84名战俘,其中一些人自2014年俄罗斯吞并克里米亚时起就被关押。
在备受期待的普京与特朗普峰会召开的前夕,俄罗斯国防部周四宣布,俄乌双方交换了84名战俘。俄罗斯国防部称,“84名俄罗斯军人从基辅政权控制的领土上返回。作为交换,84名乌克兰武装部队的战俘被移交(给乌克兰)。”
乌克兰总统泽连斯基随后也证实了俄罗斯国防部此前的这一有关战俘交换的宣布。泽连斯基强调,此次交换涉及军人和平民。他说,“今天获释的人中,包括自2014年、2016年和2017年以来被俄方关押的平民。”换句话说,其中一些人自2014年俄罗斯吞并克里米亚时起就被关押。
泽连斯基还补充说,在周四获释的战俘中,也有参与保卫港口城市马里乌波尔的乌克兰士兵。马里乌波尔于2022年被俄军围困。
仍然根据乌克兰总统,阿联酋发挥了调解作用,就像过去的类似行动一样。
根据俄罗斯和乌克兰今年五月至七月在土耳其伊斯坦布尔举行的三轮直接会谈所达成的协议,俄乌交战双方今年已交换了数千名战俘。
Obama praises Texas Democrats amid redistricting furor
Former President Barack Obama met Thursday with Texas House Democrats to praise them for leaving the state to stop a GOP-backed redistricting effort.
Obama also pointed to the response by California — which launched its own redistricting retaliation on Thursday — as a result of the Texas Democrats’ own protest, which he views as a temporary offset. He told them he prefers congressional maps to be drawn by independent commissions rather than politicians, but recognized the need for a Democratic response.
“He acknowledged what Texas is doing is wrong, and you have to be able to stand up in this moment,” state Rep. Ann Johnson, who attended the meeting, told POLITICO.
“He was very clear: If we are all playing to our higher angels as politicians, we should want the people determining our lines,” she said. “We should be brave enough to let the voters pick our lines and compete on fair ideas. And that's what he wants. That's what all of us want.”
Obama was joined on call by former Attorney General Eric Holder, chair of the National Democratic Redistricting Committee.
The meeting comes as Obama will headline a fundraiser for the NDRC next week in Martha’s Vineyard in response to Republicans’ redistricting efforts.
The meeting was first reported by ABC.
The group of Texas Democrats have been in Illinois for nearly two weeks to deny Republicans the ability to pass a new map carving out five more seats at the request of President Donald Trump. The final day of the special session, ordered by Gov. Greg Abbott, is Friday. Democrats indicated on Thursday they are willing to return home if the session ends on Friday, and if California Democrats introduce their own map adding more seats in retaliation. That process is already in motion in California: Gov. Gavin Newsom formally launched his campaign for a new House map on Thursday.
During the 30-minute call, Obama heard directly from Texas Democratic Reps. Barbara Gervin-Hawkins and Rep. Christian Manuel, and he praised the lawmakers for standing up to the attacks they’ve faced since decamping earlier this month, including bomb threats and lawsuits.
© Erin Hooley/AP
加沙民防机构表示:以色列军方加大对加沙城的轰炸力度

法新社报道,巴萨尔表示:“以色列占领军正在加大对加沙城泽囤社区的袭击力度。”
他说:“这个地区已连续第四天遭受军事行动,造成大量人员伤亡。”
“从今天黎明以来,我们已接到这个社区28个家庭和居民的电话,其中一些人的孩子已被杀害。”
“由于炮火,许多人无法离开这些地区”。
泽囤社区居民Maram Kashko告诉法新社,过去四天,空袭次数有所增加。
“我的侄子、侄子的妻子和他们的孩子在炮击中丧生”。
周三,以色列军方负责人表示,他已批准一项新的加沙地带行动计划,旨在解救所有人质并击败哈马斯。
以色列军方计划控制加沙城及其周边的难民营,这些地区是巴勒斯坦领土上人口最稠密的地区之一,这个地区已遭受超过22个月的战争破坏。除了严峻的人道主义局势外,加沙地带正经历一段极端高温天气,这对难民来说尤其艰难。
北京表示愿意帮助泰国和柬埔寨修复两国关系, 泰国感谢

中国外交部发表声明称,王毅对柬泰两国外长表示:“中方支持柬泰两国开展对话,消除误解,重建互信。”
王毅表示:“中国有句古话,‘兄弟阋xì于墙,外御其侮’……我相信双方能够妥善管控具体分歧,携手应对各种全球性挑战。”
泰国外交部在社交媒体平台X上发表声明称,泰国外交部长马里斯·桑詹蓬萨感谢中方的斡旋作用,并呼吁加强与柬方在边境地区扫雷方面的合作。
在美国总统特朗普的干预下,泰国和柬埔寨双方在持续了五天的暴力冲突后达成停火协议。
上周在马来西亚, 泰国和柬埔寨的国防官员会谈后,双方同意延长停火协议。
法新社报道,自停火以来,冲突已停止,但仍有多名泰国士兵因地雷爆炸受伤,局势持续紧张。
泰国称这些地雷是最近埋设的。柬埔寨至今仍散落着数十年冲突留下的地雷,并坚决否认埋设了新的地雷。
上个月,泰国和柬埔寨之间长期存在的边境争端升级为冲突,涉及炮击、空袭和步兵交火,造成至少43人死亡,30多万人流离失所。
特朗普在用“土地交换”来解决俄乌冲突的问题上反反复复

特朗普说,“我不想用‘瓜分’这个词。但你知道,在某种程度上,这个词用得还不错,好吗?”
俄罗斯的攻势愈演愈烈,泽连斯基被排除在周五的会晤之外,加剧了欧洲的担心,欧盟国家担心特朗普和普京可能会达成一项迫使乌克兰做出痛苦让步的协议。
特朗普最初表示将会进行一些“土地交换”,但在周三与欧洲领导人交谈后,他似乎收回了这一说法。
可到了星期四,特朗普在福克斯新闻电台的讲话表明,他又不排除某种形式的领土交换。
特朗普和俄罗斯总统将于周五在阿拉斯加安克雷奇郊外的一个美国空军基地举行峰会,旨在解决乌克兰冲突。
特朗普表示,与普京面谈的结果不成功的可能性有25%,但这次会议仅仅是第二次三方会谈的前奏,到第二次三方会谈的时候将就乌克兰战争达成实质性协议。
Trump Sought to Minimize Expectations for Putin Talks
© Doug Mills/The New York Times
What Do You Want to See in New York’s Future?
© Todd Heisler/The New York Times
Adams Pushes to Force Drug Users Off NYC Streets
© Angelina Katsanis for The New York Times
Eric Adams Vetoes Bill to Raise Wages for Instacart Workers
© Hilary Swift for The New York Times