← 返回日报
预计 1 分钟

cl-bbs: the schemeBBS-like textboard rewritten in Common Lisp

摘要

这是一个名为 cl-bbs 的匿名文本论坛(BBS)引擎项目,用 Common Lisp 实现,目标是高性能复刻早期 MIT Scheme SchemeBBS 的交互与页面结构(如使用 dl/dt/dd 组织帖子与线程)。系统采用纯服务端渲染,完全不依赖 JavaScript。 功能上包括统一的线程末尾发帖表单、支持加粗/斜体/等宽/删除线(spoiler)/引用块等基础富文本标记;支持 >> 数字 的帖子引用跳转;图片直链自动预览;URL 自动转链接;动态板块头部解析;以及通过 cookie 保存的多主题切换。 技术栈方面使用 Roswell + SBCL 的 Common Lisp 环境,Web 层基于 Hunchentoot / Clack / Lack,HTML 生成使用 cl-who,数据以 s-expression 形式存储在本地文件系统中(data/sexp/)。项目还包含 Qlot 依赖锁定的沙箱环境,以及一套 29 条断言的测试用例,用于验证路由、cookie 和格式化规则等行为。服务器默认运行在本地 8222 端口,并提供测试与启动脚本流程。

荐读理由

读者画像明确排除‘纯当日快讯 / 蹭热点 / 标题党’,内容是 GitHub 项目页面(无正文创新价值),属于已知老生常谈的 Lisp 文本板克隆

原文

cl-bbs

An anonymous textboard (BBS) engine written in Common Lisp. It is a high-performance, modern clone of the original MIT Scheme SchemeBBS (which ran behind dis.4chan.org and world4ch /prog/).

Features

  • Seamless SchemeBBS Layout: Displays threads, index lists, and posts inside definition lists (<dl>, <dt>, <dd>) exactly conforming to the original SchemeBBS style.

  • Single Trailing Forms: Conforms to the original textboard paradigm where a single posting form is rendered at the very end of the thread (no per-post forms).

  • Comprehensive Formatting Support:

    • Bold: **text** -> <b>text</b>

    • Italic: __text__ -> <i>text</i>

    • Monospace: text -> <code>text</code> (Uses the standard backtick notation)

    • Spoilers: ~~text~~ -> <del>text</del>

    • Blockquotes: Lines starting with > are rendered as <blockquote> blocks.

    • Post References: >>7 are dynamically hyperlinked to jump anchors inside the thread page.

    • Direct Image Link Previews: Direct links to images (.png, .jpg, .jpeg, .gif, .webp, .bmp) are automatically converted into elegant clickable image previews.

    • Standard URLs: Standard URLs are automatically formatted as standard hyperlinks.

  • Dynamic Board Headers: Centered and left-aligned board listing headers (e.g. [ foo | prog ]) are scanned and displayed dynamically at the top of every page.

  • Theme Preferences (Cookies): Choose between multiple themes (default, classic, dark, mona, no) on the /board/preferences page. Selections are stored inside browser cookies (theme) and persistent.

  • Zero JavaScript Required: The application is completely server-rendered.

  • Local Qlot Sandbox: Locked sandbox dependencies pinned via qlfile to ensure backwards compatibility across environments.

  • 29-Assertion Test Suite: Comprehensive test coverage verifying cookies, routing pipelines, and formatting rules.

Getting Started

Prerequisites

You must have Roswell and Qlot installed:

# Install Roswell
# (Follow Roswell platform instructions)

# Install Qlot
ros install qlot

Installation

Clone the repository and install dependencies locally:

# Fetch and lock dependencies locally
qlot install

Running the Server

Start the Hunchentoot/Clack server:

make server

The server will boot and listen locally on port 8222.

Running Tests

Execute the automated Parachute test suite:

make check

Software Stack

  • Lisp: Common Lisp (SBCL) loaded via Roswell.

  • Web Server: Hunchentoot, Clack, Lack.

  • HTML Templating: cl-who (HTML generation).

  • Data Store: S-expression files saved inside plain-text files under data/sexp/.

Lobsters · 1 赞 · 0 评 讨论 → 阅读原文 →

这条对你有帮助吗?