dream-lang
raw JSON → 0.0.1 verified Fri May 01 auth: no javascript abandoned
dream-lang (v0.0.1) is a minimal JavaScript transpiler that compiles to JavaScript, described as a language between ClojureScript and CoffeeScript. It is extremely early-stage (v0.0.0 is referenced in the README) and self-compiling. Release cadence is unknown as the project appears abandoned or very experimental. Differentiators include Lisp-like syntax with indentation and parentheses alternatives, support for pattern matching via switch, set! mutation, and regex literals. However, it is not production-ready and lacks tests and core features like macros and infix operators.
Common errors
error command not found: dream ↓
cause dream-lang is not installed globally or not in PATH.
fix
Install globally: npm install -g dream-lang
error Error: Cannot find module 'dream-lang' ↓
cause Attempting to require dream-lang as a Node.js module instead of using CLI.
fix
Use dream-lang as a CLI transpiler: npm install -g dream-lang && dream file.dream
Warnings
gotcha The package is v0.0.1 but README refers to v0.0.0; it is extremely early and unstable. ↓
fix Do not use in production. Consider alternatives like CoffeeScript or ClojureScript.
gotcha No test suite, no documentation beyond README, and no breaking change policy. ↓
fix Expect any update to break existing code. Avoid using in any project.
Install
npm install dream-lang yarn add dream-lang pnpm add dream-lang Imports
- dream-lang (CLI) wrong
const dream = require('dream-lang')correctnpm install -g dream-lang && dream file.dream
Quickstart
// Install dream-lang globally
npm install -g dream-lang@0.0.1
// Create a file example.dream with:
def greet(name)
console.log "Hello" name
greet "World"
// Compile to JavaScript:
dream example.dream
// Output: example.js
// Contains:
function greet(name) {
console.log('Hello', name);
}
greet('World');