#1044 苹果 M4 芯片有什么不一样

2025-04-18

苹果电脑的芯片发展可以分成三个阶段:

  • 1994 年到 2005 年:使用 IBM 的 PowerPC 架构
  • 2006 年到 2020 年:改用 Intel 的 x86 架构
  • 2020 年底开始:全面转向自研的 ARM 架构 M 系列芯片(M1 ~ M4)
    苹果肯定是觉得 Intel 做的不好,然后选择更加开放的 ARM 标准做魔改。
    看到网上的评价,应该是非常成功的,移动设备的功耗 + 桌面设备的性能,并且比传统的 CPU 更加面向未来。

1. 架构不同:ARM vs x86

M 系列基于 ARM 架构,强调低功耗高效能;而传统 Intel / AMD 芯片是 x86 架构,更强调通用计算能力。
ARM 原本是移动端主流架构,苹果通过深度优化,做出了媲美甚至超越传统 PC 的性能,同时拥有更长续航。

拓展阅读:网易号,Apple M4 成为新单核性能冠军,击败英特尔的 Core i9-14900KS

2. SoC 设计:高度集成

M 系列采用 SoC(System on a Chip)设计,把 CPU、GPU、NPU(神经网络引擎)、内存控制器等都集成在一颗芯片中,减少延迟、提高带宽。传统 PC 芯片大多是分散式设计,效率和功耗控制上不如 SoC。

3. 统一内存架构(UMA)

M 系列的 CPU 和 GPU 共享同一套高速内存,数据无需来回搬运,适合图形、视频、AI 场景。传统 PC 中,CPU 和 GPU 使用不同内存,需要频繁复制数据。

阮一峰的《科技爱好者周刊(第 345 期)》中是这么说的:

大芯片指的是 CPU、GPU、内存封装在一块芯片里面,典型代表是苹果的 M 系列芯片。
这种设计使得 CPU 和 GPU 共享内存,并且有极大的内存带宽,这就是为什么苹果电脑不需要 Nvidia 显卡,也能运行 AI 模型。

4. 软件生态的适配和进化

苹果在 2020 年 M1 发布时推出了 Rosetta 2 翻译层,用于兼容旧的 x86 应用。现在,大量主流 macOS 应用已经原生适配 ARM,性能更强、能耗更低。开发者也逐步转向以 ARM 为主的架构优化。

5. M4 的新特性

M4 是第五代 Apple Silicon,主要升级包括:

  • 采用台积电第二代 3nm 工艺,性能与能效进一步提升
  • 神经网络引擎更强,面向 AI 原生支持(如生成式模型、照片处理)
  • 新一代 GPU 架构,支持动态缓存和光线追踪
  • 加强视频编解码引擎,更适合 4K/8K 视频处理

#1043 brew 自动更新的提示

2025-04-11

brew 执行命令的时候总是提醒这个:

Adjust how often this is run with HOMEBREW_AUTO_UPDATE_SECS or disable with
HOMEBREW_NO_AUTO_UPDATE. Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
  1. 关闭自动更新:环境变量中添加:

    export HOMEBREW_NO_AUTO_UPDATE=1
    
  2. 忽略提示:环境变量中添加:

    export HOMEBREW_NO_ENV_HINTS=1
    
  3. 调整更新频率:环境变量中添加:

    # 改成每周一次
    export HOMEBREW_AUTO_UPDATE_SECS=604800
    

我就是在 ~/.zshrc 文件中添加:

# brew 自动更新配置
# 自动更新时不在终端打印提示信息
export HOMEBREW_NO_ENV_HINTS=1
# 频率每周检查一次
export HOMEBREW_AUTO_UPDATE_SECS=604800

手动更新:

# update brew
brew update

# upgrade all installed packages
brew upgrade

#1042 开发环境电脑配置

2025-04-05

我又开始思考如何替换公司的那台老 Dell 笔记本了。

现有机器

家里:

  • Dell 光影精灵

    i7-12700H
    8G 4800MHz * 2
    500G SSD
    RTX 3050 (4 GB GDDR6)
    Windows 11
    

公司:

  • MacBook Pro 13″
  • Dell Inspiron 14R (5437)(i5-4200U / 8G DDR3 1600MHz / 500G HDD)

替换机器

零刻 EQR6(国补之后大约 2200)

  • AMD 锐龙 R9 6900HX(8 核 16 线程,4.9 GHz)
  • 16GB DDR5 4800MHz * 2
  • 1TB (M.2 2280 PCIe 4.0 X4)
  • AMD Radeon 680M 显卡(12CUs,2400 MHz)
  • 双千兆网卡 + WIFI 6 + 蓝牙 5.2 + 85W 电源

作用:

  1. Linxu 环境(Ubuntu 24.04)
    1. 定时任务
  2. 网络环境(OpenVPN 等)
  Mac Mini M4 零刻 EQR6
价格 4499 2799
价格(优惠后) 4499 - 750 - 750 = 2999 2799 - 560 = 2239
CPU M4
10 核(4 + 6)
AMD Ryzen 9 6900HX
8 核 16 线程, 3.3GHz
内存 16GB 16GB x 2
硬盘 256GB 1TB M.2 SSD
显卡 - AMD Radeon 680M (12CUs, 2400MHz)

苹果优惠:教育优惠 750,国家补贴 750(20%)
零刻优惠:国家补贴 560(20%)

参考资料与拓展阅读

#1040 重要的是坚持(耐力)

2025-03-24

3 月 21 号,《科技爱好者周刊(第 342 期):面试的 AI 作弊----用数字人去面试》上看到的观点,和我的想法比较契合。

最重要的:

  1. 智慧
  2. 坚持
  3. 忍受(挫败、孤独、前途迷茫)

人们常常低估耐力的作用,只把它理解成比别人更努力、更持久。

实际上,耐力也是坚守自己的价值观和目标的能力,即使在看上去很难做到的时候,也不放弃。

在缺乏明显进展的情况下,坚持去实现目标的能力,这就是耐力。

在一个充满诱惑分散你注意力的世界中保持专注,克服困难,继续前进,你需要耐力。

耐力是人们可以培养的最有用的品质之一。它比力量、智力、速度、魅力等特质,具有更大的适用性,日常生活很多时候都能用到。

更聪明的人某些时候会表现出色,比你更快地解决难题。但只要凭着耐力,你可以解决更多的问题。

#1039 女儿的英语学习计划

2025-03-24

女儿自从去年取消了英语班的课程之后,一直在放羊。
虽说是在家指导她学习,但总归是东一榔头、西一棒槌,没有计划,也不成体系。

这里总结和思考如下:

  1. 之前的英语班课程重新梳理,复习
  2. 音标书
  3. 绘本
  4. 加强听、说、读、写四个方面的提升(女儿现在能读出来,但是听和写就不大行)
  5. 继续国际音标的拼读训练
  6. 接入小学三年级的英语课程
  7. 等这些都搞完了,再考虑制定成体系的学习计划

TODO:

  1. 每天下班在家准备一个主题的课文
  2. 女儿每天学习上一周准备的课文,要求:
    1. 背诵
    2. 词汇
      1. 默写
      2. 音标拼写和默写

#1038 关于 MCP Server(Model Context Protocol)

2025-03-19

Model Context Protocol(模型上下文协议,简称 MCP)是由 Anthropic 公司于 2024 年末推出的开放标准协议,旨在为大型语言模型(LLM)与外部数据源、工具及系统提供标准化连接接口。其核心目标是解决传统 AI 系统集成复杂、维护困难的问题,通过定义通用规则实现 LLM 与数据库、API、本地文件等资源的即插即用式交互。

我的理解:就是用来向 AI 模型拓展一些功能,比如获取数据、运行程序、发送邮件、订购商品等,将 AI 这个大脑连接上真实世界。

Anthropic 就是做 Claude AI 编程模型的那家公司,设计这套协议用来拓展 AI 模型,比如执行目录查看、编辑文件、文本查找、文本替换、Git 提交、执行代码格式化工具。

但是这套协议可以用来拓展到方方面面,比如将我司的邮件服务、短信服务、AppPush 等提供出去,这样支持 MCP 的 IDE 可以在开发过程中直接发送邮件、短信、应用推送出去了。
最简单的场景,比如执行单元测试之后,将测试结果推送给相关人员。

因为目前只有几个 IDE 支持,但是我们也不一定只能用来做代码开发,直接在里面管理工作理论上也是可行。
还拿邮件功能举例,比如可以开发 MCP 接入自己的客户信息,然后在 AI 交互中安排自动化场景营销任务。
PS:MCP 这样的开放标准肯定是 AI 应用的大势所趋。

flowchart
    subgraph APP
        AppStart[App 启动]
        AppGetTask[接收任务]
        AppParse[解析 AI 输出]
        AppRun[App 执行任务]
    end

    subgraph MCP[MCP Server]
        McpResource[资源/接口]
        McpRun[MCP 执行任务]
    end

    User --> |提交任务|AppGetTask
    AppGetTask --> |请求大模型<BR>系统提示词 + 任务描述|Model[AI 大模型]
    AppStart -->|获取信息| McpResource
    Model --> AppParse --> AppRun
    AppRun <--> McpRun

资源:

Introducing the Model Context Protocol

2024 年 11 月 25 日
https://www.anthropic.com/news/model-context-protocol

Today, we're open-sourcing the Model Context Protocol (MCP), a new standard for connecting AI assistants to the systems where data lives, including content repositories, business tools, and development environments. Its aim is to help frontier models produce better, more relevant responses.

As AI assistants gain mainstream adoption, the industry has invested heavily in model capabilities, achieving rapid advances in reasoning and quality. Yet even the most sophisticated models are constrained by their isolation from data—trapped behind information silos and legacy systems. Every new data source requires its own custom implementation, making truly connected systems difficult to scale.

MCP addresses this challenge. It provides a universal, open standard for connecting AI systems with data sources, replacing fragmented integrations with a single protocol. The result is a simpler, more reliable way to give AI systems access to the data they need.

Model Context Protocol

The Model Context Protocol is an open standard that enables developers to build secure, two-way connections between their data sources and AI-powered tools. The architecture is straightforward: developers can either expose their data through MCP servers or build AI applications (MCP clients) that connect to these servers.

Today, we're introducing three major components of the Model Context Protocol for developers:

  • The Model Context Protocol specification and SDKs
  • Local MCP server support in the Claude Desktop apps
  • An open-source repository of MCP servers

Claude 3.5 Sonnet is adept at quickly building MCP server implementations, making it easy for organizations and individuals to rapidly connect their most important datasets with a range of AI-powered tools. To help developers start exploring, we’re sharing pre-built MCP servers for popular enterprise systems like Google Drive, Slack, GitHub, Git, Postgres, and Puppeteer.

Early adopters like Block and Apollo have integrated MCP into their systems, while development tools companies including Zed, Replit, Codeium, and Sourcegraph are working with MCP to enhance their platforms—enabling AI agents to better retrieve relevant information to further understand the context around a coding task and produce more nuanced and functional code with fewer attempts.

"At Block, open source is more than a development model—it’s the foundation of our work and a commitment to creating technology that drives meaningful change and serves as a public good for all,” said Dhanji R. Prasanna, Chief Technology Officer at Block. “Open technologies like the Model Context Protocol are the bridges that connect AI to real-world applications, ensuring innovation is accessible, transparent, and rooted in collaboration. We are excited to partner on a protocol and use it to build agentic systems, which remove the burden of the mechanical so people can focus on the creative.”

Instead of maintaining separate connectors for each data source, developers can now build against a standard protocol. As the ecosystem matures, AI systems will maintain context as they move between different tools and datasets, replacing today's fragmented integrations with a more sustainable architecture.

Getting started

Developers can start building and testing MCP connectors today. All Claude.ai plans support connecting MCP servers to the Claude Desktop app.

Claude for Work customers can begin testing MCP servers locally, connecting Claude to internal systems and datasets. We'll soon provide developer toolkits for deploying remote production MCP servers that can serve your entire Claude for Work organization.

To start building:

  • Install pre-built MCP servers through the Claude Desktop app
  • Follow our quickstart guide to build your first MCP server
  • Contribute to our open-source repositories of connectors and implementations

An open community

We’re committed to building MCP as a collaborative, open-source project and ecosystem, and we’re eager to hear your feedback. Whether you’re an AI tool developer, an enterprise looking to leverage existing data, or an early adopter exploring the frontier, we invite you to build the future of context-aware AI together.

#1037 转载:Android 15 提供原生 Linux 终端

2025-03-16

Android 的 Linux 终端应用现已广泛适用于 Pixel 设备,获取方法如下

你需要一部 Pixel 设备、最新的软件更新,以及几分钟的时间。

作者:Andy Walker
2025 年 3 月 7 日

TL;DR(摘要)

  • Android 的 Linux 终端应用现已广泛适用于运行 2025 年 3 月更新的 Pixel 设备。
  • 该基于 Debian 的环境允许用户随身携带完整的 Linux 实例,尽管仍缺乏一些便捷功能。

去年年底,我们曾报道过,Google 正在开发一款原生的 Linux 终端应用,使智能手机用户能够随身携带桌面级 Linux 发行版。从那时起,我们已经看到该应用随着 Android 15 测试版推送。而现在,随着 2025 年 3 月的 Pixel 更新,这款应用的稳定版本已更广泛地适用于运行最新稳定版 Android 的 Google 手机用户。

“设置” > “系统” > “开发者选项” 中启用 Linux 开发环境后,Linux 终端应用的图标会自动出现。当我激活该功能并点击图标时,系统提示我下载 567MB 的文件。

尽管我在 Pixel 8 上首次尝试运行该终端时失败了,但第二次尝试成功了。越过这个小障碍后,我便可以通过应用列表中的快捷方式打开终端,并运行诸如 helpdffree -m 等基础命令。当然,你也可以执行更高级的命令。

值得注意的是,该 Linux 环境基于 Debian,这是最成熟的 Linux 发行版之一。与原生终端应用 Termux 不同,Linux 终端应用是通过 Android 虚拟化框架(AVF) 在虚拟机中运行的。

不过,该 Linux 终端应用仍然缺少一些功能。其中最大的缺陷可能是 不支持 GUI 应用,但正如我们之前进行的《Doom》演示所示,这项功能计划在 Android 16 中推出。

对大多数用户来说,Android 上的 Linux 终端应用或许并不算特别激动人心或具有颠覆性,但对于开发者和高级用户而言,这无疑是一个巨大的进步。它使用户能够在移动设备上运行桌面级 Linux 应用,为各种需求提供便利。