{"id":26341,"library":"roselisp","title":"Roselisp","description":"Scheme-like Lisp interpreter and transpiler to JavaScript, self-hosted, also provides decompilation from JS to Lisp. Current version 0.0.1 (early development). Key differentiators: supports both interpretation and compilation to JavaScript, includes decompilation, self-hosted, MPL-2.0 licensed unlike many Lisp implementations. Useful for embedding Lisp in JS projects or learning compiler construction.","status":"active","version":"0.0.1","language":"javascript","source_language":"en","source_url":"https://github.com/epsil/roselisp","tags":["javascript","lisp","typescript"],"install":[{"cmd":"npm install roselisp","lang":"bash","label":"npm"},{"cmd":"yarn add roselisp","lang":"bash","label":"yarn"},{"cmd":"pnpm add roselisp","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"ESM only; package exports a default export.","wrong":"const roselisp = require('roselisp')","symbol":"default","correct":"import roselisp from 'roselisp'"},{"note":"Named export for interpreting Lisp code; available as of v0.0.1.","wrong":"","symbol":"interpret","correct":"import { interpret } from 'roselisp'"},{"note":"Named export for compiling Lisp to JavaScript.","wrong":"","symbol":"compile","correct":"import { compile } from 'roselisp'"}],"quickstart":{"code":"import roselisp from 'roselisp';\n\nconst code = `(define (hello) (display \"Hello from Roselisp!\"))`;\nconst result = roselisp.interpret(code);\nconsole.log(result); // outputs hello function definition\n\n// Compile to JavaScript\nconst jsCode = roselisp.compile(code);\nconsole.log(jsCode); // outputs JS representation\n\n// Decompile JavaScript to Lisp (if structured)\nconst lispCode = roselisp.decompile('function hello() { console.log(\"Hello from Roselisp!\"); }');\nconsole.log(lispCode);","lang":"typescript","description":"Imports Roselisp, interprets a Lisp definition, compiles to JS, and decompiles JS back to Lisp using named exports."},"warnings":[{"fix":"Use 'import' syntax instead of 'require()'.","message":"ESM-only: package does not support CommonJS require()","severity":"breaking","affected_versions":">=0.0.1"},{"fix":"Use `npm install -g roselisp` with appropriate permissions or use npx.","message":"Global install may require sudo on Unix systems","severity":"deprecated","affected_versions":">=0.0.1"},{"fix":"Pin exact version or expect breaking changes.","message":"API may change drastically as version is 0.0.1 (unstable).","severity":"gotcha","affected_versions":">=0.0.1"},{"fix":"Use decompile only on JS generated by roselisp's compiler.","message":"Decompilation is imperfect; only works for JS that matches patterns emitted by compiler.","severity":"gotcha","affected_versions":">=0.0.1"},{"fix":"Use JavaScript for I/O, pass data to Lisp via bindings.","message":"Interpreted code runs in a sandboxed environment; no direct Node.js I/O access.","severity":"gotcha","affected_versions":">=0.0.1"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run `npm install roselisp` in your project.","cause":"Package not installed or not in node_modules","error":"Error: Cannot find module 'roselisp'"},{"fix":"Use `import { interpret } from 'roselisp'` instead.","cause":"Using default import incorrectly; API uses named exports interpret/compile","error":"TypeError: roselisp.interpret is not a function"},{"fix":"Use `import` syntax or enable ESM in package.json: `\"type\": \"module\"`.","cause":"Using CommonJS require() with an ESM-only package","error":"SyntaxError: Unexpected token 'export'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}