Remix.run Logo
ofrzeta 9 hours ago

related: "In Version 2.5, AutoLISP allowed access to the DWG database. AutoLISP was based on XLISP, a public domain version of LISP written by David Betz. Betz later complained that Autodesk had failed to acknowledge the source, which the company later did." (https://www.shapr3d.com/history-of-cad/autodesk-and-autocad)

https://github.com/dbetz/xlisp

holg 9 hours ago | parent | next [-]

Thanks for the link! I didn't know about the XLISP controversy.

My interpreter doesn't aim for full compatibility - just enough to run the schematic generation workflow from 1991. The core is: defun, setq, car/cdr, recursion, and the (command ...) interface to draw entities.

The interesting part was how templates could trigger other templates - inserting a contactor (Schütz) would automatically generate its coil in the control circuit. Code writing code, classic LISP.

cmrdporcupine 9 hours ago | parent | prev [-]

I remember using Betz's stuff on my Atari ST in the 80s (and then other stuff he did decades later on the Parallax Propeller chip, where he is an active community member). XLISP, advsys, and his scheme dialect, too.

I always wondered if he got compensated for the stuff he did that then got used in AutoCAD.

Sounds like no

holg 8 hours ago | parent [-]

Fun idea: I'll try to compile Betz's original XLISP (C) to WASM too. Then we can benchmark 1980s C vs 2024 Rust, both running in the browser. Will probably be a crappy benchmark, but entertaining - and a nice tribute to the source.

cmrdporcupine 7 hours ago | parent [-]

I'm betting I could get an agentic tool to convert the whole thing (XLISP and/or XSCHEME) to modern Rust or Zig in a half a day.

holg 6 hours ago | parent [-]

Just the simple interpreter, built in Rust, but yes we can also use the real xlisp, it is pure c, so easy to handle for emscripten, i built in the Benchmark, the original xlisp c in wasm vs the homebrewn interpreter