2025-05-23

31 篇热帖

1. Claude 4 (www.anthropic.com)

Discover Claude 4's breakthrough AI capabilities. Experience more reliable, interpretable assistance for complex tasks across work and learning.

3. Postgres IDE in VS Code (techcommunity.microsoft.com)

We are excited to announce the public preview of the brand-new PostgreSQL extension for Visual Studio Code (VS Code), designed to simplify PostgreSQL...

6. The Future of Flatpak (lwn.net)

At the Linux Application Summit (LAS) in April, Sebastian Wick said that, by many metrics, Flat [...]

10. How I ended up flying for Yemen's national airline – and survived (www.pprune.org)

Terms and Endearment - Yemenia Expat Contract: Full Info - A carrier which is very rarely mentioned on here, I’m going to give you an insight into what it is like to work for them under one of those famous expat contracts that have floated about here and there in the past. I understand 99% of you will see the advert

12. Remote Prompt Injection in Gitlab Duo Leads to Source Code Theft (www.legitsecurity.com)

The Legit research team unearthed vulnerabilities in GitLab Duo.

13. Sketchy Calendar (www.inkandswitch.com)

Can we have a calendar that combines the convenience of a digital calendar with the simplicity and expressivity you get from pen & paper?

14. We’ll be ending web hosting for your apps on Glitch (blog.glitch.com)

We’ve got an important update for the Glitch community today: We’ll be ending web hosting for your apps on Glitch.

16. Writing A Job Runner (In Elixir) (Again) (10 years later) (github.com)

Contribute to notactuallytreyanastasio/genstage_tutorial_2025 development by creating an account on GitHub.

17. Remembering Alasdair MacIntyre (www.wordonfire.org)

What I do know is this. I have never met, nor do I ever expect to meet, a philosopher as fascinating as Alasdair MacIntyre.

18. Show HN: Defuddle, an HTML-to-Markdown alternative to Readability (github.com)

Get the main content of any page as Markdown. Contribute to kepano/defuddle development by creating an account on GitHub.

19. Caesar's Last Breath (charliesabino.com)

How many molecules from Caesar’s last breath do we inhale with each breath we take? Shockingly, the answer is about one molecule—we actually do share breaths...

20. Now you can watch the Internet Archive preserve documents in real time (www.theverge.com)

The Internet Archive has launched a new livestream on YouTube that captures the process of digitizing microfiche — complete with lo-fi beats.

22. Loading Pydantic models from JSON without running out of memory (pythonspeed.com)

该文章针对加载大型JSON文件到Pydantic模型时内存占用过高的问题,提出了两种优化方案。

核心问题

使用Pydantic默认的 model_validate_json() 方法解析一个100MB的JSON文件时,峰值内存占用约为文件大小的20倍(约2000MB),这对处理大规模数据构成挑战。

解决方案

为降低内存占用,文章从两个层面进行优化:

  1. 采用流式JSON解析器 (ijson)

    • 原理ijson 增量式解析JSON,避免一次性将整个文件加载到内存中,而是逐键值对流式读取。
    • 效果:此方法将峰值内存占用从2000MB降至1200MB。虽然解析速度会变慢,但主要内存消耗转移到了最终创建的对象上。
  2. 使用带__slots__的数据类

    • 原理:Python对象使用 __slots__ 可以固定属性列表,从而显著减少每个实例的内存开销。
    • 实现:将Pydantic的 BaseModel 改为使用 pydantic.dataclasses 并开启 slots=True 选项。同时,解析代码需相应调整,使用 ijson 流式解析并手动构建数据类实例。
    • 效果:结合 ijsonslots,峰值内存占用进一步降低至450MB。

结果对比

方法 峰值内存占用 (MB)
Pydantic model_validate_json() 2000
仅使用 ijson 流式解析 1200
使用 ijson + 带 slots 的数据类 450

结论

尽管Pydantic官方尚未集成这些优化,但用户可以通过自行组合 ijsondataclass(slots=True) 来大幅降低处理大型JSON文件时的内存消耗。

23. 1,145 pull requests per day (saile.it)

在2025年Stripe Sessions的开幕主题演讲中,Patrick Collison分享了一个关键数据:2024年,Stripe平均每天完成1,145个拉取请求,且这些请求都已完全部署到生产环境。与此同时,其API在全年的不可用时间少于一分钟。

Stripe目前拥有约8,500名员工,其中约40%为工程师。据此估算,平均每位工程师大约每3天就能向生产环境交付一次变更。考虑到Stripe在2024年处理了高达1.4万亿美元的支付交易量,这一工程效率尤为引人注目。

根据谷歌发布的DORA 2024研究报告,顶尖的软件交付表现意味着“每日多次部署”且失败率低于5%。仅凭上述指标,Stripe无疑属于顶尖交付表现者的前1%。

在如此庞大的规模下,能实现并维持这样的交付速度和可靠性,体现了其在自动化测试、持续部署与回滚、系统可观测性、代码所有权管理等方面的重大投入和高级工程文化。行业观察指出,Stripe拥有一种要求严苛但极为先进的工程文化。

其核心启示在于,目标并非单纯追求数字,而是消除阻碍快速交付用户价值的摩擦。这反映了对工程文化的正确构建:信任变更、提供必要的工具支持、赋予工程师自主权,并持续专注于为用户交付价值。

24. The metre originated in the French Revolution (www.abc.net.au)

The next time you pick up a bag of spuds from the supermarket or fill up the car with petrol, you can thank a treaty signed in 1875 for the metric system that underpins daily life.

25. Contacts let you see in the dark with your eyes closed (scitechdaily.com)

Imagine slipping on a pair of contact lenses and suddenly being able to see infrared light—without any bulky equipment or even a battery. That’s now a reality thanks to breakthrough lenses developed by scientists that convert invisible infrared into visible colors. Mice tested with the lenses nav

26. How Does Claude 4 Think? – Sholto Douglas and Trenton Bricken (www.dwarkesh.com)

Listen now | Scaling reinforcement learning, tracing circuits, and the path to fully autonomous agents

27. 32 bits that changed microprocessor design (spectrum.ieee.org)

Bell Labs’ pioneering CMOS chip BELLMAC-32 is an IEEE Milestone

28. The "AI 2027" Scenario: How realistic is it? (garymarcus.substack.com)

Everyone’s been talking about it. JD Vance read it. What does it actually tell us?

30. KumoRFM: A Foundation Model for In-Context Learning on Relational Data (kumo.ai)

KumoRFM:关系数据的上下文学习基础模型

核心问题: 关系数据(存储在数据库中的多表结构)是极具价值的信息资产,但当前人工智能浪潮主要惠及非结构化数据(如文本、图像)。针对关系数据的预测任务,从业者仍依赖传统机器学习,需要为每个数据集和任务构建特定模型,耗时费力。

解决方案:KumoRFM 是一个为关系数据预测任务构建的基础模型,它能够直接在关系数据库上进行准确预测,而无需针对特定数据或任务进行训练。

核心能力与关键技术

  1. 任务定义与输入:

    • 模型通过一种名为 预测查询语言 的专用语言接收查询,该查询定义了预测目标、目标实体以及任何过滤器或聚合函数。
    • 支持的任务类型包括回归、二元分类、多类/多标签分类和链接预测。
  2. 核心创新:上下文学习:

    • 模型不进行传统监督训练。它在推理时应用 上下文学习
    • 接收查询后,系统会自动从数据库的历史数据中采样,生成 带标签的上下文示例(相关的历史子图)。
    • 模型利用这些上下文示例来推理和预测当前查询,使其能够处理从未见过的新数据集或新任务,无需重新训练。
  3. 架构设计:

    • 数据表示: 将关系数据库内部转换为时序异构图。表格对应节点类型,行对应节点,外键关系构成边。节点可携带多模态信息(数值、类别、时间戳、文本等)。
    • 表格不变编码: 使用一个对列宽不变的编码器,根据列的语义类型(如数值、类别、时间戳)将单元格转换为密集向量表示。
    • 关系图Transformer: 这是一个新颖的模块,能在图结构内执行注意力机制。它利用节点类型、时间信息、结构邻近性(如与锚节点的跳数距离)和局部子图模式等位置编码,实现跨相关表格的信息整合与推理。
    • 可解释性模块: 提供全局数据层面和单个实体层面的解释。
    • 微调支持: 对于生产部署或高吞吐任务,支持对预训练模型进行任务特定微调,以替代上下文学习。

性能与优势

通过在涵盖七个领域、30个预测任务的 RelBench 基准上进行评估,KumoRFM 展现出以下优势:

  • 卓越性能: 在不进行任务特定训练的情况下(上下文学习),平均性能比传统的特征工程方法和端到端监督深度学习方法高出2%至8%。当针对特定任务进行微调时,性能可平均再提升10%至30%。
  • 极高效率: 速度比依赖监督训练的传统方法快 几个数量级。它将首次预测所需的人力时间从数十小时缩短至约1秒,代码量从数百行降至1行。
  • 零代码与泛化能力: 无需手动特征工程或定制模型开发,即可支持任意关系模式、处理数据异构性,并支持对任意实体、任意目标在任意未来时间点的实时查询。

结论: KumoRFM 将预训练、上下文学习和关系图推理整合到一个统一的基础模型中,为结构化数据的预测建模开辟了新路径。它能够在最小化工作量的情况下实现实时预测,为驱动更快速、更智能的业务决策铺平了道路。

31. “Secret Mall Apartment,” a Protest for Place (modernagejournal.com)

Young artists find a new way to resist the impermanence of modernity.