6 comments

  • holg 2 hours ago
    In the early 90s I wrote AutoLISP code for AutoCAD 9/10 that enabled a CSV → template → parametric drawing workflow. You could define components in spreadsheets, feed them through templates, and generate complete technical drawings automatically.

    I've never seen anyone else use this approach. Now I've built an interpreter in Rust/WASM so it can run in the browser - partly nostalgia, partly preservation before this knowledge disappears entirely.

    The lisp/ folder contains some LSP files from that era, others i recreated from memory.

    Repo: https://github.com/holg/acadlisp/

    What kind of drawings were you generating? Electrical schematics, mechanical parts, architecture? We also have some playground, to toy around with LISP and some function generator, to demonstrate Lisp usage for math...

    • 51Cards 1 hour ago
      We were on the same page. I also built something similar for a Conveyor company here in Canada in the early 90's. We parameterized all their tech drawings (or at least the initial versions) from their component libraries. Was a great project. Not sure how long they used it, they eventually acquired the resources to support it internally (I was an independent AutoLISP contractor). Good times back then. I haven't done AutoLISP in years now but great to see it's still around.
      • holg 29 minutes ago
        Ha, so I wasn't alone! Conveyors are a perfect fit - standardized components, parametric variations. The pattern was obvious once you saw it. Good to know it worked for you too.
    • lambda 2 hours ago
      I get a 404 for that repo; is it private?

      Also, the page you link to in the original post is in German; it might be nice to have an English page for the mostly English speaking audience here on HN

      • holg 2 hours ago
        fixed it, thx for the notice
      • weare 1 hour ago
        [flagged]
    • stocksinsmocks 1 hour ago
      I have a lot of interest in this space for infrastructure design. Thanks for sharing.
  • buildsjets 1 hour ago
    I had to accomplish pretty much the same exact task circa 1999, but in Aldus Pagemaker using Postscript.

    My first job out of college was a 6 month contact at a fairly small industrial control manufacturer that had been purchased by a larger conglomerate. All of their engineering documentation needed to be converted to the new company’s format.

    The old company had devised a scheme whereby a wire harness could be completely described by the part number, which encoded the wire size, color, length, and termination. The new company wanted a detail drawing for each wire, with thousands in the database.

    I made a library of reusable glyphs that could be stored in Pagemaker layers, and connected with postscript generated lines, and a script to iterate through the part number database and generate drawings.

    • holg 16 minutes ago
      Wire harness specs in part numbers - elegant. Same pattern, different purpose: you generated final documentation, we generated DXF that fed back into CAD workflows. And what's running on this page is the same - a real interpreter executing AutoLISP against JSON data, outputting valid DXF. Not a slideshow, a local data engine with demo data loaded.
  • zenethian 17 minutes ago
    This website is a mess on mobile. Cool concept though!
  • ofrzeta 1 hour 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 1 hour ago
      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 1 hour ago
      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 12 minutes ago
        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.
  • kayo_20211030 1 hour ago
    Super interesting. Thanks. AutoLisp was both a pain and underrated. But, it was perfect for this sort of stuff. Much easier than generating the dxf files directly, say using postscript ;-). I love the modern recreations and UI.
    • holg 54 minutes ago
      Thanks! You nailed it - AutoLISP was the right abstraction. Direct DXF/PostScript meant entity tables and coordinate gymnastics. (command "LINE" p1 p2) just did the thing. What's running here: real WASM interpreter executing AutoLISP, not a slideshow. SVG native, DXF export (AC1009), all text editable, JSON data feed instead of CSV. My brother could open this page and start working the same workflow we did in '91 - better feed, better output. And Rust is a surprisingly natural fit - Lisp's explicit stack discipline maps cleanly onto ownership. What Rust enforces, Lisp already wants.
  • pjmlp 2 hours ago
    AutoCad nowadays uses .NET as well, and thus any CLR enabled language, with a MSIL backend.

    https://help.autodesk.com/view/OARX/2024/ENU/?guid=GUID-390A...

    • holg 2 hours ago
      sure it does, but Lisp is special, and for those times it was very special. I did not want to show how it is done nowadays, but how we had done it 33 yrs ago... And now there is the emulator as the web-page, this is what i wanted to share (everything works as wasm in the browser)...