《寓言》将神奇物品变成了《哈利·波特》中汤姆·里德尔的日记。
Fable turned reMarkable into Tom Riddle's diary from Harry Potter

原始链接: https://github.com/MaximeRivest/Riddle

“The Diary” 是一个针对 reMarkable Paper Pro 的实验性项目,它将该平板电脑转变为一本基于手写输入的交互式日记。通过利用大语言模型(LLM)后端(通过兼容 OpenAI 的 API 或本地 `pi` 设置),设备可以读取你的手写输入,进行“思考”,并以流畅的字体在纸面上逐笔渲染出动画回复。 该项目提供两种模式:一种用于方便集成 AppLoad 启动器的窗口版本,以及一种挂起原生界面以提供超低延迟直接电子墨水绘图的“接管”模式。 **主要功能包括:** * **直观交互:** 书写并暂停即可获得回复;画一个大大的“?”获取指南;使用五指点击退出。 * **可定制后端:** 支持任何具备视觉能力的 OpenAI 兼容模型,用于分析你的手写文本。 * **先进工程:** 使用 Rust 构建,采用原始 evdev 输入和自定义的基于 C 语言的电子墨水渲染。 **警告:** 这是一个高风险的高级修改项目,它以 root 权限运行并会改变系统行为。用户应熟悉 SSH、Linux 命令行工具,并掌握恢复设备的备份方法。与 reMarkable AS 无关联。

Hacker News 社区正在讨论由 Maxime Rivest 开发的项目“Fable”。该项目利用生成式 AI 重现了《哈利·波特》中汤姆·里德尔的日记。 对此项目的评价褒贬不一。一些用户认为,将它与具有精神控制能力的诅咒物品进行类比令人不安,但考虑到围绕生成式 AI 的争议,这种对比又显得颇具讽刺意味。另一些用户则对开发速度之快印象深刻,评论者指出,与过去缓慢的工程流程相比,现代工具让创作者能够极其迅速地“将想法变为现实”。 讨论串还提出了一些实际的批评,特别是在项目文档方面。用户指出,项目的 README 文档缺乏直接演示,访客必须跳转到 X(原推特)的外部链接才能看到项目运行效果,而登录弹窗进一步阻碍了用户体验。尽管存在技术障碍,且网友们调侃称商务部需要介入监管,但该项目还是引发了关于当前 AI 能力发展速度及其潜在令人不安之处的广泛讨论。
相关文章

原文

Write on the page with your pen. After a pause, the diary drinks your ink — your words fade into the paper — the page thinks for a moment, and an answer writes itself back in a flowing hand, stroke by stroke, then fades away.

No screen glow, no keyboard, no chat UI. Just ink appearing on paper.

This is the diary from the demo.

🪄 New to this? Start here

You need a reMarkable Paper Pro in developer mode with a launcher installed. If that sounds like a lot, it isn't — remagic walks you through turning on developer mode and sets up everything with one command. Come back here, drop riddle in, and start writing to Tom.

Already have xovi + AppLoad? Download the latest release — a ready-to-drop bundle, no compiler needed — or build from source.

Install the prebuilt bundle

  1. Grab riddle-appload-aarch64.zip from the latest release and unzip it.
  2. Copy the folder to your tablet: scp -O -r riddle [email protected]:/home/root/xovi/exthome/appload/
  3. Add an API key: cp oracle.env.example oracle.env in that folder and put your RIDDLE_OPENAI_KEY in it (any OpenAI-compatible key). Or skip it to use pi.
  4. In AppLoad: tap Reload, then The Diary. Write, and rest your pen.

⚠️ This modifies your device. It runs as root, stops the vendor UI (in takeover mode), and drives the e-ink engine directly. It has only been tested on a reMarkable Paper Pro (ferrari, aarch64, OS 3.26–3.27). It may not work on other models or OS versions, and you use it entirely at your own risk. Not affiliated with reMarkable AS. Keep SSH access working before you install anything — that is your escape hatch.

 pen (raw evdev, full 4096-level pressure, hardware event rate)
   │ strokes
   ▼
 riddle ── idle 2.8s → commit page → PNG ──► oracle (resident LLM process,
   │                                          streams reply sentence-by-sentence)
   ▼ strokes (Dancing Script → skeletonized to single-pixel pen paths)
 display backend
   ├── qtfb        — windowed, inside xochitl (AppLoad app)
   └── quill       — full takeover: xochitl stopped, vendor e-ink engine
                     driven directly for instant ink (lowest latency there is)
  • riddle/ — the app (Rust). Pen input, ink surface, handwriting synthesis (rasterize → Zhang-Suen thinning → stroke tracing → animated replay), the oracle process manager, and both display backends.
  • quill/ — the takeover display host (C/C++). An epfb-re-style QImage-constructor interposition shim over the vendor libqsgepaper.so waveform engine, exposed as a small C ABI (quill_init / quill_buffer / quill_swap) that riddle links against with --features takeover. Includes scribble, a minimal pen-to-glass latency demo.
Do this And
Write, then rest the pen The diary drinks your ink and Tom replies
Flip the marker Erase
Draw a large ? Summon the built-in guide
Tap five fingers at once Leave the diary
Power button The page turns to "The diary sleeps.", then the tablet suspends; press again to wake exactly where you were

The oracle (the "spirit" in the diary)

The diary's replies come from a vision LLM that reads your handwriting from the committed page (sent as an inline PNG). There are two backends, chosen at startup — pick whichever you have:

Option A — any OpenAI-compatible API (easiest, zero setup)

Set an API key and riddle talks straight to an OpenAI-compatible /chat/completions endpoint. Works with OpenAI, OpenRouter, Groq, a local server — anything that speaks the format. No extra software on the tablet.

export RIDDLE_OPENAI_KEY="sk-..."                       # required
export RIDDLE_OPENAI_BASE="https://api.openai.com/v1"   # optional (default)
export RIDDLE_OPENAI_MODEL="gpt-4o-mini"                # optional; must see images

Any vision-capable model works. Example with OpenRouter:

export RIDDLE_OPENAI_KEY="$OPENROUTER_API_KEY"
export RIDDLE_OPENAI_BASE="https://openrouter.ai/api/v1"
export RIDDLE_OPENAI_MODEL="openai/gpt-4o-mini"

Verify your setup before launching the diary:

riddle --oracle-test path/to/handwriting.png   # prints the streamed reply

Measured ~0.9–1.1 s to first ink on-device. The HTTPS is built into riddle (pure-Rust, no extra libraries).

Option B — pi (the power path)

If you already run pi, riddle will use a resident pi --mode rpc process kept warm (Node + your subscription auth loaded once), so each turn pays only model latency. Used automatically when RIDDLE_OPENAI_KEY is not set.

Both stream the reply sentence-by-sentence, so the quill starts writing seconds before the model finishes. The persona prompt lives in riddle/src/oracle.rs.

Cross-compiled from x86_64. Two flavours:

Windowed (AppLoad/qtfb) — easiest

Requires xovi + AppLoad on the device.

cd riddle
cargo build --release --target aarch64-unknown-linux-gnu

Install to /home/root/xovi/exthome/appload/riddle/ with external.manifest.json, appload-launch.sh, and the binary.

Takeover (instant ink) — the one from the demo

Requires the reMarkable SDK toolchain (~/rm-sdk-3.26) because the linked vendor Qt libs need its glibc, and libqsgepaper.so pulled from your own device (it is proprietary and not distributed here):

cd quill && ./build.sh          # pulls libqsgepaper.so from the device over ssh,
                                # builds libquill.so + scribble
cd ../riddle && ./build-takeover.sh

Deploy libquill.so to /home/root/quill/ and riddle-takeover to /home/root/riddle/riddle, plus scripts/riddle-takeover.sh. Launching via AppLoad (appload-launch.sh) detaches into a transient systemd unit, stops xochitl, runs the diary, and always restores xochitl on exit — exit with the power button, a 5-finger tap, or SIGTERM. If anything wedges: ssh [email protected] 'systemctl start xochitl'.

The reply hand is Dancing Script (SIL OFL 1.1 — see riddle/fonts/OFL.txt).

MIT for everything in this repository (see LICENSE). The vendor libraries it interposes (libqsgepaper.so, Qt) are not included and must come from your own device/SDK.

联系我们 contact @ memedata.com