Skip to content

[200_61] 更新 README 文档,移除 Scala data pipeline 相关内容#662

Merged
da-liii merged 7 commits intomainfrom
da/200_60/r7rs
Apr 3, 2026
Merged

[200_61] 更新 README 文档,移除 Scala data pipeline 相关内容#662
da-liii merged 7 commits intomainfrom
da/200_60/r7rs

Conversation

@da-liii
Copy link
Copy Markdown
Contributor

@da-liii da-liii commented Apr 3, 2026

摘要

更新 README.md 和 README_ZH.md,移除已弃用的 Scala data pipeline 相关内容,并新增标准库介绍。

变更内容

  1. 移除 Scala data pipeline 相关内容

    • 移除 "Scala-like functional collection" 特性描述
    • 移除 Functional Data Pipeline 示例代码和图片引用
    • 移除 Scala like case class 示例和性能警告
  2. 移除 (liii lang) 相关内容

    • 移除 Unicode Support 示例(使用 (liii lang)
    • 从标准库表格中移除 (liii lang)
    • 移除 "Scala-like collections" 表格
  3. 简化安装说明

    • 移除 GNU/Linux 安装说明,保留 macOS 安装说明
  4. 更新模式选项

    • 移除 (liii oop) 预加载项
    • liii 模式现在只预加载 (liii base)(liii error)
  5. 新增标准库

    • 新增 (liii http):HTTP 客户端库
    • 新增 (liii json):JSON 解析和操作库

开发文档

详见 devel/200_61.md

🤖 Generated with Claude Code

da-liii and others added 2 commits April 3, 2026 14:55
- 移除 Scala-like functional collection 特性描述
- 移除 Functional Data Pipeline 示例代码和 case class 示例
- 移除 (liii lang) 相关内容和 Unicode Support 示例
- 移除 Scala-like collections 表格
- 移除 GNU/Linux 安装说明
- 更新模式选项,移除 (liii oop) 预加载
- 新增 (liii http) 和 (liii json) 标准库介绍

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Apr 3, 2026

Greptile Summary

本 PR 主要清理已弃用的 Scala data pipeline 相关内容(包括 (liii lang)、case class、rich collections 等),同时在标准库表格中新增 (liii http)(liii json) 两个库的介绍,并更新了 liii 模式的说明。此外 src/goldfish.hpp 中还包含了一处重要的运行时行为变更。

  • 文档与代码不一致README.mdREADME_ZH.md 均将 liii 模式描述为仅预加载 (liii base)(liii error),但 customize_goldfish_by_modegoldfish.hpp:4105)实际上还会导入 (liii string),新增的 REPL 欢迎消息已正确列出这三个库,但 README 中的描述未同步修正。
  • 潜在破坏性变更goldfish.hpp 中将脚本执行命令(evalrun、直接执行脚本文件)的默认模式从原来等价于 liii"default" 改为 "r7rs"。这意味着之前无需 -m 即可运行的脚本(依赖 (liii base) 等函数)在新版本下将直接报错,且 README 的模式说明部分未记录这一差异。
  • 移除 GNU/Linux 安装说明可能影响 Linux 用户的上手体验,建议确认这是否为有意决定。

Confidence Score: 2/5

PR contains an undocumented breaking behavioral change in script execution default mode; not safe to merge without addressing.

Two logic-level issues were found: the liii mode description in both README files omits (liii string) which is actually imported by the runtime; and the default mode for non-REPL/load commands silently changed from liii to r7rs, which is a breaking change for existing user scripts that was not documented.

src/goldfish.hpp (default mode logic change), README.md and README_ZH.md (incorrect liii mode description)

Important Files Changed

Filename Overview
src/goldfish.hpp Changes REPL mode display message and introduces a per-command default mode (r7rs for eval/run/scripts, liii for repl/load) — a breaking behavioral change not reflected in documentation.
README.md Removes Scala/liii lang content and Linux install instructions, adds (liii http)/(liii json) to stdlib table — but liii mode description omits (liii string) which is actually imported by the runtime.
README_ZH.md Chinese translation mirrors README.md changes; same omission of (liii string) in the liii mode description.
devel/200_61.md New development log documenting the README update task; follows project template correctly.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[gf command invoked] --> B{parse_startup_cli_options}
    B --> C{command type?}
    C -- "repl / load" --> D[default_mode = liii]
    C -- "eval / run / script" --> E[default_mode = r7rs\n⚠️ Changed from 'default']
    D --> F[parse_mode_option with default=liii]
    E --> G[parse_mode_option with default=r7rs]
    F --> H{-m flag present?}
    G --> H
    H -- yes --> I[use specified mode]
    H -- no --> J[use default_mode]
    I --> K[customize_goldfish_by_mode]
    J --> K
    K -- "liii / default" --> L["import (liii base)\n(liii error)\n(liii string)"]
    K -- "scheme" --> M["import (liii base)\n(liii error)"]
    K -- "r7rs" --> N["import (scheme base)"]
    K -- "sicp" --> O["import (scheme base)\n(srfi sicp)"]
Loading

Reviews (1): Last reviewed commit: "[200_61] 更新 README 文档,移除 Scala data pipe..." | Re-trigger Greptile

@@ -232,7 +162,7 @@ You can also load and evaluate a Scheme file directly:
`-m` or `--mode` helps you specify the standard library mode:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 liii 模式遗漏 (liii string) 导入

README 描述 liii 模式仅预加载 (liii base)(liii error),但 src/goldfish.hppcustomize_goldfish_by_mode(第 4104–4105 行)的实际代码为:

s7_eval_c_string (sc, "(import (liii base) (liii error) (liii string))");

新增的 REPL 欢迎消息(第 4554 行)也已正确反映了这三个库,但 README 的说明遗漏了 (liii string)

建议修正为:

Suggested change
`-m` or `--mode` helps you specify the standard library mode:
+ `liii`: Goldfish Scheme with `(liii base)`, `(liii error)` and `(liii string)`

@@ -238,7 +167,7 @@ based on S7 Scheme 11.5 (22-Sep-2025)
`-m` 或 `--mode` 帮助您指定标准库模式:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 liii 模式遗漏 (liii string) 导入(中文版)

与 README.md 相同的问题:customize_goldfish_by_mode 实际上会导入 (liii base)(liii error)(liii string) 三个库,但中文版文档只列出了前两个。

Suggested change
`-m``--mode` 帮助您指定标准库模式:
+ `liii`: 预加载 `(liii base)``(liii error)``(liii string)` 的 Goldfish Scheme

Comment on lines +5124 to +5131
// 根据命令类型确定默认模式:
// - repl/load 命令默认使用 liii 模式
// - 其他命令(eval, run, 直接执行脚本)默认使用 r7rs 模式
string default_mode= "r7rs";
if (command == "repl" || command == "load") {
default_mode= "liii";
}
string mode= parse_mode_option (argc, argv, default_mode);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 脚本执行默认模式变更为 r7rs 可能破坏现有用户脚本

此更改将 eval/run/直接执行脚本命令的默认模式从 "default"(等价于 liii,会预加载 (liii base) (liii error) (liii string))改为 "r7rs"(仅预加载 (scheme base))。

之前依赖默认模式运行的脚本(如使用 gf run script.scm,脚本内使用了 (liii base) 中的 ==display* 等函数)将无法找到这些绑定,可能在运行时直接报错。

此外,README 中仍描述 default: -m default is the equiv of -m liii,但对于脚本命令,新的实际默认值已是 r7rs,文档与行为不符,需要同步更新。

如这是有意为之的设计决策,建议:

  1. 在 README 中明确记录此行为差异(REPL 和 load 默认使用 liii,脚本执行默认使用 r7rs
  2. 评估是否会对现有用户脚本造成破坏性影响

da-liii and others added 5 commits April 3, 2026 15:10
- README.md: 新增 AI Coding friendly 特性
- README_ZH.md: 新增 AI 编程友好 特性

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- 命令行示例统一使用 gf 而非 bin/gf
- 添加说明:手动编译可在 bin/gf 找到可执行文件
- 移除 Demo Code 部分

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- AI Coding friendly 简化描述
- default 模式改为等价于 r7rs

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@da-liii da-liii merged commit 9d8d023 into main Apr 3, 2026
4 checks passed
@da-liii da-liii deleted the da/200_60/r7rs branch April 3, 2026 07:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant