Skip to content

Instantly share code, notes, and snippets.

@2b3pro
2b3pro / roam_datalog_cheatsheet.md
Last active April 8, 2025 04:01
Roam Research Datalog Cheatsheet

Roam Research Datalog Cheatsheet

Basic Structure

  • Roam uses Datascript (JavaScript/ClojureScript Datalog implementation)
  • Each fact is a datom: [entity-id attribute value transaction-id]

Core Components

Entity IDs

@hanxiao
hanxiao / testRegex.js
Last active May 2, 2025 15:29
Regex for chunking by using all semantic cues
// Updated: Aug. 20, 2024
// Run: node testRegex.js whatever.txt
// Live demo: https://jina.ai/tokenizer
// LICENSE: Apache-2.0 (https://www.apache.org/licenses/LICENSE-2.0)
// COPYRIGHT: Jina AI
const fs = require('fs');
const util = require('util');
// Define variables for magic numbers
const MAX_HEADING_LENGTH = 7;